diff --git a/.env.example b/.env.example index f6911efe3..74f817210 100644 --- a/.env.example +++ b/.env.example @@ -3,5 +3,4 @@ APP_DEBUG=false APP_KEY= APP_URL=http://panel.test APP_INSTALLED=false -APP_TIMEZONE=UTC APP_LOCALE=en diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 0053987b4..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,15 +0,0 @@ -# Lines starting with '#' are comments. -# Each line is a file pattern followed by one or more owners. - -# More details are here: https://help.github.com/articles/about-codeowners/ - -# The '*' pattern is global owners. - -# Order is important. The last matching pattern has the most precedence. -# The folders are ordered as follows: - -# In each subsection folders are ordered first by depth, then alphabetically. -# This should make it easy to add new rules without breaking existing ones. - -# Global -* @pelican-dev/panel diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d1d95bafa..8ac88b97c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -213,3 +213,79 @@ jobs: - name: Integration tests run: vendor/bin/pest tests/Integration + + postgresql: + name: PostgreSQL + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [8.2, 8.3, 8.4] + database: ["postgres:14"] + services: + database: + image: ${{ matrix.database }} + env: + POSTGRES_DB: testing + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_HOST_AUTH_METHOD: trust + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: + APP_ENV: testing + APP_DEBUG: "false" + APP_KEY: ThisIsARandomStringForTests12345 + APP_TIMEZONE: UTC + APP_URL: http://localhost/ + CACHE_DRIVER: array + MAIL_MAILER: array + SESSION_DRIVER: array + QUEUE_CONNECTION: sync + DB_CONNECTION: pgsql + DB_HOST: 127.0.0.1 + DB_DATABASE: testing + DB_USERNAME: postgres + DB_PASSWORD: postgres + GUZZLE_TIMEOUT: 60 + GUZZLE_CONNECT_TIMEOUT: 60 + steps: + - name: Code Checkout + uses: actions/checkout@v4 + + - name: Get cache directory + id: composer-cache + run: | + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} + restore-keys: | + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: bcmath, curl, gd, mbstring, mysql, openssl, pdo, tokenizer, xml, zip + tools: composer:v2 + coverage: none + + - name: Install dependencies + run: composer install --no-interaction --no-suggest --no-progress --no-scripts + + - name: Unit tests + run: vendor/bin/pest tests/Unit + env: + DB_HOST: UNIT_NO_DB + SKIP_MIGRATIONS: true + + - name: Integration tests + run: vendor/bin/pest tests/Integration diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index b00b810b4..da5f6ae55 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.2, 8.3, 8.4] + php: [ 8.2, 8.3, 8.4 ] steps: - name: Code Checkout uses: actions/checkout@v4 @@ -68,4 +68,4 @@ jobs: run: composer install --no-interaction --no-suggest --no-progress --no-scripts - name: PHPStan - run: vendor/bin/phpstan --memory-limit=-1 \ No newline at end of file + run: vendor/bin/phpstan --memory-limit=-1 --error-format=github diff --git a/.gitignore b/.gitignore index 91984a1ab..4024bbde7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /.phpunit.cache /node_modules /public/build -/public/hot /public/storage /storage/*.key /storage/pail @@ -24,8 +23,7 @@ yarn-error.log /.vscode public/assets/manifest.json -/database/*.sqlite -/database/*.sqlite-journal +/database/*.sqlite* filament-monaco-editor/ _ide_helper* /.phpstorm.meta.php diff --git a/Dockerfile b/Dockerfile index b06a65c09..ccc06a934 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,9 @@ # syntax=docker.io/docker/dockerfile:1.13-labs # Pelican Production Dockerfile - -# For those who want to build this Dockerfile themselves, uncomment lines 6-12 and replace "localhost:5000/base-php:$TARGETARCH" on lines 17 and 67 with "base". - -# FROM --platform=$TARGETOS/$TARGETARCH php:8.3-fpm-alpine as base - -# ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ - -# RUN install-php-extensions bcmath gd intl zip opcache pcntl posix pdo_mysql - -# RUN rm /usr/local/bin/install-php-extensions +## +# If you want to build this locally you want to run `docker build -f Dockerfile.dev` +## # ================================ # Stage 1-1: Composer Install @@ -82,13 +75,16 @@ RUN chown root:www-data ./ \ && chmod 750 ./ \ # Files should not have execute set, but directories need it && find ./ -type d -exec chmod 750 {} \; \ - # Symlink to env/database path, as www-data won't be able to write to webroot + # Create necessary directories + && mkdir -p /pelican-data/storage /var/www/html/storage/app/public /var/run/supervisord /etc/supercronic \ + # Symlinks for env, database, and avatars && ln -s /pelican-data/.env ./.env \ && ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \ - # Create necessary directories - && mkdir -p /pelican-data /var/run/supervisord /etc/supercronic \ - # Finally allow www-data write permissions where necessary - && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord \ + && ln -sf /var/www/html/storage/app/public /var/www/html/public/storage \ + && ln -s /pelican-data/storage/avatars /var/www/html/storage/app/public/avatars \ + && ln -s /pelican-data/storage/fonts /var/www/html/storage/app/public/fonts \ + # Allow www-data write permissions where necessary + && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ && chmod -R u+rwX,g+rwX,o-rwx /pelican-data ./storage ./bootstrap/cache /var/run/supervisord # Configure Supervisor diff --git a/Dockerfile.base b/Dockerfile.base index 082a54c63..42b6923cf 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,10 +1,10 @@ # ================================ # Stage 0: Build PHP Base Image # ================================ -FROM --platform=$TARGETOS/$TARGETARCH php:8.3-fpm-alpine +FROM --platform=$TARGETOS/$TARGETARCH php:8.4-fpm-alpine ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN install-php-extensions bcmath gd intl zip opcache pcntl posix pdo_mysql +RUN install-php-extensions bcmath gd intl zip opcache pcntl posix pdo_mysql pdo_pgsql -RUN rm /usr/local/bin/install-php-extensions \ No newline at end of file +RUN rm /usr/local/bin/install-php-extensions diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 000000000..797576e25 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,112 @@ +# syntax=docker.io/docker/dockerfile:1.13-labs +# Pelican Development Dockerfile + +FROM --platform=$TARGETOS/$TARGETARCH php:8.4-fpm-alpine AS base + +ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + +RUN install-php-extensions bcmath gd intl zip opcache pcntl posix pdo_mysql pdo_pgsql + +RUN rm /usr/local/bin/install-php-extensions + +# ================================ +# Stage 1-1: Composer Install +# ================================ +FROM --platform=$TARGETOS/$TARGETARCH base AS composer + +WORKDIR /build + +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer + +# Copy bare minimum to install Composer dependencies +COPY composer.json composer.lock ./ + +RUN composer install --no-dev --no-interaction --no-autoloader --no-scripts + +# ================================ +# Stage 1-2: Yarn Install +# ================================ +FROM --platform=$TARGETOS/$TARGETARCH node:20-alpine AS yarn + +WORKDIR /build + +# Copy bare minimum to install Yarn dependencies +COPY package.json yarn.lock ./ + +RUN yarn config set network-timeout 300000 \ + && yarn install --frozen-lockfile + +# ================================ +# Stage 2-1: Composer Optimize +# ================================ +FROM --platform=$TARGETOS/$TARGETARCH composer AS composerbuild + +# Copy full code to optimize autoload +COPY --exclude=Caddyfile --exclude=docker/ . ./ + +RUN composer dump-autoload --optimize + +# ================================ +# Stage 2-2: Build Frontend Assets +# ================================ +FROM --platform=$TARGETOS/$TARGETARCH yarn AS yarnbuild + +WORKDIR /build + +# Copy full code +COPY --exclude=Caddyfile --exclude=docker/ . ./ +COPY --from=composer /build . + +RUN yarn run build + +# ================================ +# Stage 5: Build Final Application Image +# ================================ +FROM --platform=$TARGETOS/$TARGETARCH base AS final + +WORKDIR /var/www/html + +# Install additional required libraries +RUN apk update && apk add --no-cache \ + caddy ca-certificates supervisor supercronic + +COPY --chown=root:www-data --chmod=640 --from=composerbuild /build . +COPY --chown=root:www-data --chmod=640 --from=yarnbuild /build/public ./public + +# Set permissions +# First ensure all files are owned by root and restrict www-data to read access +RUN chown root:www-data ./ \ + && chmod 750 ./ \ + # Files should not have execute set, but directories need it + && find ./ -type d -exec chmod 750 {} \; \ + # Create necessary directories + && mkdir -p /pelican-data/storage /var/www/html/storage/app/public /var/run/supervisord /etc/supercronic \ + # Symlinks for env, database, and avatars + && ln -s /pelican-data/.env ./.env \ + && ln -s /pelican-data/database/database.sqlite ./database/database.sqlite \ + && ln -sf /var/www/html/storage/app/public /var/www/html/public/storage \ + && ln -s /pelican-data/storage/avatars /var/www/html/storage/app/public/avatars \ + && ln -s /pelican-data/storage/fonts /var/www/html/storage/app/public/fonts \ + # Allow www-data write permissions where necessary + && chown -R www-data:www-data /pelican-data ./storage ./bootstrap/cache /var/run/supervisord /var/www/html/public/storage \ + && chmod -R u+rwX,g+rwX,o-rwx /pelican-data ./storage ./bootstrap/cache /var/run/supervisord + +# Configure Supervisor +COPY docker/supervisord.conf /etc/supervisord.conf +COPY docker/Caddyfile /etc/caddy/Caddyfile +# Add Laravel scheduler to crontab +COPY docker/crontab /etc/supercronic/crontab + +COPY docker/entrypoint.sh ./docker/entrypoint.sh + +HEALTHCHECK --interval=5m --timeout=10s --start-period=5s --retries=3 \ + CMD curl -f http://localhost/up || exit 1 + +EXPOSE 80 443 + +VOLUME /pelican-data + +USER www-data + +ENTRYPOINT [ "/bin/ash", "docker/entrypoint.sh" ] +CMD [ "supervisord", "-n", "-c", "/etc/supervisord.conf" ] diff --git a/app/Checks/NodeVersionsCheck.php b/app/Checks/NodeVersionsCheck.php index 801ac8617..856b82c5d 100644 --- a/app/Checks/NodeVersionsCheck.php +++ b/app/Checks/NodeVersionsCheck.php @@ -14,9 +14,9 @@ class NodeVersionsCheck extends Check public function run(): Result { - $all = Node::query()->count(); + $all = Node::all(); - if ($all === 0) { + if ($all->isEmpty()) { $result = Result::make() ->notificationMessage(trans('admin/health.results.nodeversions.no_nodes_created')) ->shortSummary(trans('admin/health.results.nodeversions.no_nodes')); @@ -25,16 +25,18 @@ class NodeVersionsCheck extends Check return $result; } - $latestVersion = $this->versionService->latestWingsVersion(); - - $outdated = Node::query()->get() - ->filter(fn (Node $node) => !isset($node->systemInformation()['exception']) && $node->systemInformation()['version'] !== $latestVersion) + $outdated = $all + ->filter(fn (Node $node) => !isset($node->systemInformation()['exception']) && !$this->versionService->isLatestWings($node->systemInformation()['version'])) ->count(); + $all = $all->count(); + $latestVersion = $this->versionService->latestWingsVersion(); + $result = Result::make() ->meta([ 'all' => $all, 'outdated' => $outdated, + 'latestVersion' => $latestVersion, ]) ->shortSummary($outdated === 0 ? trans('admin/health.results.nodeversions.all_up_to_date') : trans('admin/health.results.nodeversions.outdated', ['outdated' => $outdated, 'all' => $all])); diff --git a/app/Console/Commands/Environment/AppSettingsCommand.php b/app/Console/Commands/Environment/AppSettingsCommand.php index a16f38176..928c7c74e 100644 --- a/app/Console/Commands/Environment/AppSettingsCommand.php +++ b/app/Console/Commands/Environment/AppSettingsCommand.php @@ -3,7 +3,6 @@ namespace App\Console\Commands\Environment; use Illuminate\Console\Command; -use Illuminate\Support\Facades\Artisan; class AppSettingsCommand extends Command { @@ -21,9 +20,13 @@ class AppSettingsCommand extends Command if (!config('app.key')) { $this->comment('Generating app key'); - Artisan::call('key:generate'); + $this->call('key:generate'); } - Artisan::call('filament:optimize'); + $this->comment('Creating storage link'); + $this->call('storage:link'); + + $this->comment('Caching components & icons'); + $this->call('filament:optimize'); } } diff --git a/app/Console/Commands/Environment/RedisSetupCommand.php b/app/Console/Commands/Environment/RedisSetupCommand.php index f3acd50ef..39dbf2ad5 100644 --- a/app/Console/Commands/Environment/RedisSetupCommand.php +++ b/app/Console/Commands/Environment/RedisSetupCommand.php @@ -35,7 +35,7 @@ class RedisSetupCommand extends Command { $this->variables['CACHE_STORE'] = 'redis'; $this->variables['QUEUE_CONNECTION'] = 'redis'; - $this->variables['SESSION_DRIVERS'] = 'redis'; + $this->variables['SESSION_DRIVER'] = 'redis'; $this->requestRedisSettings(); diff --git a/app/Console/Commands/Maintenance/CleanServiceBackupFilesCommand.php b/app/Console/Commands/Maintenance/CleanServiceBackupFilesCommand.php index 7a54c0b54..d178f21b7 100644 --- a/app/Console/Commands/Maintenance/CleanServiceBackupFilesCommand.php +++ b/app/Console/Commands/Maintenance/CleanServiceBackupFilesCommand.php @@ -6,6 +6,7 @@ use Carbon\Carbon; use Illuminate\Console\Command; use Illuminate\Contracts\Filesystem\Filesystem; use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory; +use SplFileInfo; class CleanServiceBackupFilesCommand extends Command { @@ -32,9 +33,10 @@ class CleanServiceBackupFilesCommand extends Command */ public function handle(): void { + /** @var SplFileInfo[] */ $files = $this->disk->files('services/.bak'); - collect($files)->each(function (\SplFileInfo $file) { + collect($files)->each(function ($file) { $lastModified = Carbon::createFromTimestamp($this->disk->lastModified($file->getPath())); if ($lastModified->diffInMinutes(Carbon::now()) > self::BACKUP_THRESHOLD_MINUTES) { $this->disk->delete($file->getPath()); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 13113d2b5..48fbe6b84 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -30,8 +30,11 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule): void { - // https://laravel.com/docs/10.x/upgrade#redis-cache-tags - $schedule->command('cache:prune-stale-tags')->hourly(); + if (config('cache.default') === 'redis') { + // https://laravel.com/docs/10.x/upgrade#redis-cache-tags + // This only needs to run when using redis. anything else throws an error. + $schedule->command('cache:prune-stale-tags')->hourly(); + } // Execute scheduled commands for servers every minute, as if there was a normal cron running. $schedule->command(ProcessRunnableCommand::class)->everyMinute()->withoutOverlapping(); diff --git a/app/Enums/BackupStatus.php b/app/Enums/BackupStatus.php new file mode 100644 index 000000000..077fca54f --- /dev/null +++ b/app/Enums/BackupStatus.php @@ -0,0 +1,37 @@ + 'tabler-circle-dashed', + self::Successful => 'tabler-circle-check', + self::Failed => 'tabler-circle-x', + }; + } + + public function getColor(): string + { + return match ($this) { + self::InProgress => 'primary', + self::Successful => 'success', + self::Failed => 'danger', + }; + } + + public function getLabel(): string + { + return str($this->value)->headline(); + } +} diff --git a/app/Enums/ConsoleWidgetPosition.php b/app/Enums/ConsoleWidgetPosition.php new file mode 100644 index 000000000..81153b973 --- /dev/null +++ b/app/Enums/ConsoleWidgetPosition.php @@ -0,0 +1,11 @@ + 'warning', self::Missing => 'danger', self::Stopping => 'warning', - self::Offline => 'gray', + self::Offline => 'danger', }; } diff --git a/app/Enums/RolePermissionModels.php b/app/Enums/RolePermissionModels.php index 069910957..013d5b857 100644 --- a/app/Enums/RolePermissionModels.php +++ b/app/Enums/RolePermissionModels.php @@ -14,4 +14,24 @@ enum RolePermissionModels: string case Server = 'server'; case User = 'user'; case Webhook = 'webhook'; + + public function viewAny(): string + { + return RolePermissionPrefixes::ViewAny->value . ' ' . $this->value; + } + + public function view(): string + { + return RolePermissionPrefixes::View->value . ' ' . $this->value; + } + + public function create(): string + { + return RolePermissionPrefixes::Create->value . ' ' . $this->value; + } + + public function update(): string + { + return RolePermissionPrefixes::Update->value . ' ' . $this->value; + } } diff --git a/app/Exceptions/Repository/FileNotEditableException.php b/app/Exceptions/Repository/FileNotEditableException.php new file mode 100644 index 000000000..7963161b3 --- /dev/null +++ b/app/Exceptions/Repository/FileNotEditableException.php @@ -0,0 +1,7 @@ + + */ + protected static array $providers = []; + + public static function getProvider(string $id): ?self + { + return Arr::get(static::$providers, $id); + } + + /** + * @return array + */ + public static function getAll(): array + { + return static::$providers; + } + + public function __construct() + { + static::$providers[$this->getId()] = $this; + } + + abstract public function getId(): string; + + abstract public function get(User $user): ?string; + + public function getName(): string + { + return Str::title($this->getId()); + } +} diff --git a/app/Extensions/Avatar/Providers/GravatarProvider.php b/app/Extensions/Avatar/Providers/GravatarProvider.php new file mode 100644 index 000000000..21e69c587 --- /dev/null +++ b/app/Extensions/Avatar/Providers/GravatarProvider.php @@ -0,0 +1,24 @@ +email); + } + + public static function register(): self + { + return new self(); + } +} diff --git a/app/Extensions/Avatar/Providers/UiAvatarsProvider.php b/app/Extensions/Avatar/Providers/UiAvatarsProvider.php new file mode 100644 index 000000000..4ee211cdb --- /dev/null +++ b/app/Extensions/Avatar/Providers/UiAvatarsProvider.php @@ -0,0 +1,30 @@ +findOrFail($host); - } - - config()->set('database.connections.' . $connection, [ - 'driver' => self::DB_DRIVER, - 'host' => $host->host, - 'port' => $host->port, - 'database' => $database, - 'username' => $host->username, - 'password' => $host->password, - 'charset' => self::DB_CHARSET, - 'collation' => self::DB_COLLATION, - ]); - } -} diff --git a/app/Extensions/Features/FeatureProvider.php b/app/Extensions/Features/FeatureProvider.php new file mode 100644 index 000000000..2558bd1ed --- /dev/null +++ b/app/Extensions/Features/FeatureProvider.php @@ -0,0 +1,51 @@ + + */ + protected static array $providers = []; + + /** + * @param string[] $id + * @return self|static[] + */ + public static function getProviders(string|array|null $id = null): array|self + { + if (is_array($id)) { + return array_intersect_key(static::$providers, array_flip($id)); + } + + return $id ? static::$providers[$id] : static::$providers; + } + + protected function __construct(protected Application $app) + { + if (array_key_exists($this->getId(), static::$providers)) { + if (!$this->app->runningUnitTests()) { + logger()->warning("Tried to create duplicate Feature provider with id '{$this->getId()}'"); + } + + return; + } + + static::$providers[$this->getId()] = $this; + } + + abstract public function getId(): string; + + /** + * A matching subset string (case-insensitive) from the console output + * + * @return array + */ + abstract public function getListeners(): array; + + abstract public function getAction(): Action; +} diff --git a/app/Extensions/Features/GSLToken.php b/app/Extensions/Features/GSLToken.php new file mode 100644 index 000000000..7f6f0ff83 --- /dev/null +++ b/app/Extensions/Features/GSLToken.php @@ -0,0 +1,127 @@ + */ + public function getListeners(): array + { + return [ + '(gsl token expired)', + '(account not found)', + ]; + } + + public function getId(): string + { + return 'gsl_token'; + } + + public function getAction(): Action + { + /** @var Server $server */ + $server = Filament::getTenant(); + + /** @var ServerVariable $serverVariable */ + $serverVariable = $server->serverVariables()->whereHas('variable', function (Builder $query) { + $query->where('env_variable', 'STEAM_ACC'); + })->first(); + + return Action::make($this->getId()) + ->requiresConfirmation() + ->modalHeading('Invalid GSL token') + ->modalDescription('It seems like your Gameserver Login Token (GSL token) is invalid or has expired.') + ->modalSubmitActionLabel('Update GSL Token') + ->disabledForm(fn () => !auth()->user()->can(Permission::ACTION_STARTUP_UPDATE, $server)) + ->form([ + Placeholder::make('info') + ->label(new HtmlString(Blade::render('You can either generate a new one and enter it below or leave the field blank to remove it completely.'))), + TextInput::make('gsltoken') + ->label('GSL Token') + ->rules([ + fn (): Closure => function (string $attribute, $value, Closure $fail) use ($serverVariable) { + $validator = Validator::make(['validatorkey' => $value], [ + 'validatorkey' => $serverVariable->variable->rules, + ]); + + if ($validator->fails()) { + $message = str($validator->errors()->first())->replace('validatorkey', $serverVariable->variable->name); + + $fail($message); + } + }, + ]) + ->hintIcon('tabler-code') + ->label(fn () => $serverVariable->variable->name) + ->hintIconTooltip(fn () => implode('|', $serverVariable->variable->rules)) + ->prefix(fn () => '{{' . $serverVariable->variable->env_variable . '}}') + ->helperText(fn () => empty($serverVariable->variable->description) ? '—' : $serverVariable->variable->description), + ]) + ->action(function (array $data, DaemonPowerRepository $powerRepository) use ($server, $serverVariable) { + /** @var Server $server */ + $server = Filament::getTenant(); + try { + $new = $data['gsltoken'] ?? ''; + $original = $serverVariable->variable_value; + + $serverVariable->update([ + 'variable_value' => $new, + ]); + + if ($original !== $new) { + + Activity::event('server:startup.edit') + ->property([ + 'variable' => $serverVariable->variable->env_variable, + 'old' => $original, + 'new' => $new, + ]) + ->log(); + } + + $powerRepository->setServer($server)->send('restart'); + + Notification::make() + ->title('GSL Token updated') + ->body('Server will restart now.') + ->success() + ->send(); + } catch (Exception $exception) { + Notification::make() + ->title('Could not update GSL Token') + ->body($exception->getMessage()) + ->danger() + ->send(); + } + }); + } + + public static function register(Application $app): self + { + return new self($app); + } +} diff --git a/app/Extensions/Features/JavaVersion.php b/app/Extensions/Features/JavaVersion.php new file mode 100644 index 000000000..10701bb97 --- /dev/null +++ b/app/Extensions/Features/JavaVersion.php @@ -0,0 +1,100 @@ + */ + public function getListeners(): array + { + return [ + 'java.lang.UnsupportedClassVersionError', + 'unsupported major.minor version', + 'has been compiled by a more recent version of the java runtime', + 'minecraft 1.17 requires running the server with java 16 or above', + 'minecraft 1.18 requires running the server with java 17 or above', + 'minecraft 1.19 requires running the server with java 17 or above', + ]; + } + + public function getId(): string + { + return 'java_version'; + } + + public function getAction(): Action + { + /** @var Server $server */ + $server = Filament::getTenant(); + + return Action::make($this->getId()) + ->requiresConfirmation() + ->modalHeading('Unsupported Java Version') + ->modalDescription('This server is currently running an unsupported version of Java and cannot be started.') + ->modalSubmitActionLabel('Update Docker Image') + ->disabledForm(fn () => !auth()->user()->can(Permission::ACTION_STARTUP_DOCKER_IMAGE, $server)) + ->form([ + Placeholder::make('java') + ->label('Please select a supported version from the list below to continue starting the server.'), + Select::make('image') + ->label('Docker Image') + ->disabled(fn () => !in_array($server->image, $server->egg->docker_images)) + ->options(fn () => collect($server->egg->docker_images)->mapWithKeys(fn ($key, $value) => [$key => $value])) + ->selectablePlaceholder(false) + ->default(fn () => $server->image) + ->notIn(fn () => $server->image) + ->required() + ->preload() + ->native(false), + ]) + ->action(function (array $data, DaemonPowerRepository $powerRepository) use ($server) { + try { + $new = $data['image']; + $original = $server->image; + $server->forceFill(['image' => $new])->saveOrFail(); + + if ($original !== $server->image) { + Activity::event('server:startup.image') + ->property(['old' => $original, 'new' => $new]) + ->log(); + } + + $powerRepository->setServer($server)->send('restart'); + + Notification::make() + ->title('Docker image updated') + ->body('Server will restart now.') + ->success() + ->send(); + } catch (Exception $exception) { + Notification::make() + ->title('Could not update docker image') + ->body($exception->getMessage()) + ->danger() + ->send(); + } + }); + } + + public static function register(Application $app): self + { + return new self($app); + } +} diff --git a/app/Extensions/Features/MinecraftEula.php b/app/Extensions/Features/MinecraftEula.php new file mode 100644 index 000000000..9b4ccccd1 --- /dev/null +++ b/app/Extensions/Features/MinecraftEula.php @@ -0,0 +1,71 @@ + */ + public function getListeners(): array + { + return [ + 'you need to agree to the eula in order to run the server', + ]; + } + + public function getId(): string + { + return 'eula'; + } + + public function getAction(): Action + { + return Action::make($this->getId()) + ->requiresConfirmation() + ->modalHeading('Minecraft EULA') + ->modalDescription(new HtmlString(Blade::render('By pressing "I Accept" below you are indicating your agreement to the Minecraft EULA .'))) + ->modalSubmitActionLabel('I Accept') + ->action(function (DaemonFileRepository $fileRepository, DaemonPowerRepository $powerRepository) { + try { + /** @var Server $server */ + $server = Filament::getTenant(); + + $fileRepository->setServer($server)->putContent('eula.txt', 'eula=true'); + + $powerRepository->setServer($server)->send('restart'); + + Notification::make() + ->title('Minecraft EULA accepted') + ->body('Server will restart now.') + ->success() + ->send(); + } catch (Exception $exception) { + Notification::make() + ->title('Could not accept Minecraft EULA') + ->body($exception->getMessage()) + ->danger() + ->send(); + } + }); + } + + public static function register(Application $app): self + { + return new self($app); + } +} diff --git a/app/Extensions/Features/PIDLimit.php b/app/Extensions/Features/PIDLimit.php new file mode 100644 index 000000000..dfae1d8c4 --- /dev/null +++ b/app/Extensions/Features/PIDLimit.php @@ -0,0 +1,76 @@ + */ + public function getListeners(): array + { + return [ + 'pthread_create failed', + 'failed to create thread', + 'unable to create thread', + 'unable to create native thread', + 'unable to create new native thread', + 'exception in thread "craft async scheduler management thread"', + ]; + } + + public function getId(): string + { + return 'pid_limit'; + } + + public function getAction(): Action + { + return Action::make($this->getId()) + ->requiresConfirmation() + ->icon('tabler-alert-triangle') + ->modalHeading(fn () => auth()->user()->isAdmin() ? 'Memory or process limit reached...' : 'Possible resource limit reached...') + ->modalDescription(new HtmlString(Blade::render( + auth()->user()->isAdmin() ? <<<'HTML' +

+ This server has reached the maximum process or memory limit. +

+

+ Increasing container_pid_limit in the wings + configuration, config.yml, might help resolve + this issue. +

+

+ Note: Wings must be restarted for the configuration file changes to take effect +

+ HTML + : + <<<'HTML' +

+ This server is attempting to use more resources than allocated. Please contact the administrator + and give them the error below. +

+

+ + pthread_create failed, Possibly out of memory or process/resource limits reached + +

+ HTML + ))) + ->modalCancelActionLabel('Close') + ->action(fn () => null); + } + + public static function register(Application $app): self + { + return new self($app); + } +} diff --git a/app/Extensions/Features/SteamDiskSpace.php b/app/Extensions/Features/SteamDiskSpace.php new file mode 100644 index 000000000..c4479a987 --- /dev/null +++ b/app/Extensions/Features/SteamDiskSpace.php @@ -0,0 +1,64 @@ + */ + public function getListeners(): array + { + return [ + 'steamcmd needs 250mb of free disk space to update', + '0x202 after update job', + ]; + } + + public function getId(): string + { + return 'steam_disk_space'; + } + + public function getAction(): Action + { + return Action::make($this->getId()) + ->requiresConfirmation() + ->modalHeading('Out of available disk space...') + ->modalDescription(new HtmlString(Blade::render( + auth()->user()->isAdmin() ? <<<'HTML' +

+ This server has run out of available disk space and cannot complete the install or update + process. +

+

+ Ensure the machine has enough disk space by typing{' '} + df -h on the machine hosting + this server. Delete files or increase the available disk space to resolve the issue. +

+ HTML + : + <<<'HTML' +

+ This server has run out of available disk space and cannot complete the install or update + process. Please get in touch with the administrator(s) and inform them of disk space issues. +

+ HTML + ))) + ->modalCancelActionLabel('Close') + ->action(fn () => null); + } + + public static function register(Application $app): self + { + return new self($app); + } +} diff --git a/app/Extensions/OAuth/Providers/DiscordProvider.php b/app/Extensions/OAuth/Providers/DiscordProvider.php index fd2392d92..5981172f9 100644 --- a/app/Extensions/OAuth/Providers/DiscordProvider.php +++ b/app/Extensions/OAuth/Providers/DiscordProvider.php @@ -6,8 +6,8 @@ use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Wizard\Step; use Illuminate\Foundation\Application; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\HtmlString; -use Illuminate\Support\Str; use SocialiteProviders\Discord\Provider; use Webbingbrasil\FilamentCopyActions\Forms\Actions\CopyAction; @@ -34,15 +34,15 @@ final class DiscordProvider extends OAuthProvider Step::make('Register new Discord OAuth App') ->schema([ Placeholder::make('') - ->content(new HtmlString('

Visit the Discord Developer Portal and click on New Application. Enter a Name (e.g. your panel name) and click on Create.

Copy the Client ID and the Client Secret, you will need them in the final step.

')), + ->content(new HtmlString(Blade::render('

Visit the Discord Developer Portal and click on New Application. Enter a Name (e.g. your panel name) and click on Create.

Copy the Client ID and the Client Secret from the OAuth2 tab, you will need them in the final step.

'))), Placeholder::make('') ->content(new HtmlString('

Under Redirects add the below URL.

')), TextInput::make('_noenv_callback') ->label('Redirect URL') ->dehydrated() ->disabled() - ->hintAction(fn () => request()->isSecure() ? CopyAction::make() : null) - ->formatStateUsing(fn () => config('app.url') . (Str::endsWith(config('app.url'), '/') ? '' : '/') . 'auth/oauth/callback/discord'), + ->hintAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null) + ->formatStateUsing(fn () => url('/auth/oauth/callback/discord')), ]), ], parent::getSetupSteps()); } diff --git a/app/Extensions/OAuth/Providers/GithubProvider.php b/app/Extensions/OAuth/Providers/GithubProvider.php index bbf98f8a3..e0190e882 100644 --- a/app/Extensions/OAuth/Providers/GithubProvider.php +++ b/app/Extensions/OAuth/Providers/GithubProvider.php @@ -6,8 +6,8 @@ use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Wizard\Step; use Illuminate\Foundation\Application; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\HtmlString; -use Illuminate\Support\Str; use Webbingbrasil\FilamentCopyActions\Forms\Actions\CopyAction; final class GithubProvider extends OAuthProvider @@ -28,13 +28,13 @@ final class GithubProvider extends OAuthProvider Step::make('Register new Github OAuth App') ->schema([ Placeholder::make('') - ->content(new HtmlString('

Visit the Github Developer Dashboard, go to OAuth Apps and click on New OAuth App.

Enter an Application name (e.g. your panel name), set Homepage URL to your panel url and enter the below url as Authorization callback URL.

')), + ->content(new HtmlString(Blade::render('

Visit the Github Developer Dashboard, go to OAuth Apps and click on New OAuth App.

Enter an Application name (e.g. your panel name), set Homepage URL to your panel url and enter the below url as Authorization callback URL.

'))), TextInput::make('_noenv_callback') ->label('Authorization callback URL') ->dehydrated() ->disabled() - ->hintAction(fn () => request()->isSecure() ? CopyAction::make() : null) - ->default(fn () => config('app.url') . (Str::endsWith(config('app.url'), '/') ? '' : '/') . 'auth/oauth/callback/github'), + ->hintAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null) + ->default(fn () => url('/auth/oauth/callback/github')), Placeholder::make('') ->content(new HtmlString('

When you filled all fields click on Register application.

')), ]), diff --git a/app/Extensions/OAuth/Providers/GitlabProvider.php b/app/Extensions/OAuth/Providers/GitlabProvider.php index 71a497ad0..25b9a4855 100644 --- a/app/Extensions/OAuth/Providers/GitlabProvider.php +++ b/app/Extensions/OAuth/Providers/GitlabProvider.php @@ -8,7 +8,6 @@ use Filament\Forms\Components\Wizard\Step; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Blade; use Illuminate\Support\HtmlString; -use Illuminate\Support\Str; use Webbingbrasil\FilamentCopyActions\Forms\Actions\CopyAction; final class GitlabProvider extends OAuthProvider @@ -54,8 +53,8 @@ final class GitlabProvider extends OAuthProvider ->label('Redirect URI') ->dehydrated() ->disabled() - ->hintAction(fn () => request()->isSecure() ? CopyAction::make() : null) - ->default(fn () => config('app.url') . (Str::endsWith(config('app.url'), '/') ? '' : '/') . 'auth/oauth/callback/gitlab'), + ->hintAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null) + ->default(fn () => url('/auth/oauth/callback/gitlab')), ]), ], parent::getSetupSteps()); } diff --git a/app/Extensions/OAuth/Providers/SteamProvider.php b/app/Extensions/OAuth/Providers/SteamProvider.php index 34787a43b..85e61ee1b 100644 --- a/app/Extensions/OAuth/Providers/SteamProvider.php +++ b/app/Extensions/OAuth/Providers/SteamProvider.php @@ -6,6 +6,7 @@ use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Wizard\Step; use Illuminate\Foundation\Application; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\HtmlString; use SocialiteProviders\Steam\Provider; @@ -58,7 +59,7 @@ final class SteamProvider extends OAuthProvider Step::make('Create API Key') ->schema([ Placeholder::make('') - ->content(new HtmlString('Visit https://steamcommunity.com/dev/apikey to generate an API key.')), + ->content(new HtmlString(Blade::render('Visit https://steamcommunity.com/dev/apikey to generate an API key.'))), ]), ], parent::getSetupSteps()); } diff --git a/app/Filament/Admin/Pages/Dashboard.php b/app/Filament/Admin/Pages/Dashboard.php index 018468732..c5f3b19c9 100644 --- a/app/Filament/Admin/Pages/Dashboard.php +++ b/app/Filament/Admin/Pages/Dashboard.php @@ -2,36 +2,13 @@ namespace App\Filament\Admin\Pages; -use App\Filament\Admin\Resources\NodeResource\Pages\CreateNode; -use App\Filament\Admin\Resources\NodeResource\Pages\ListNodes; -use App\Models\Egg; -use App\Models\Node; -use App\Models\Server; -use App\Models\User; use App\Services\Helpers\SoftwareVersionService; -use Filament\Actions\CreateAction; -use Filament\Pages\Page; +use Filament\Pages\Dashboard as BaseDashboard; -class Dashboard extends Page +class Dashboard extends BaseDashboard { protected static ?string $navigationIcon = 'tabler-layout-dashboard'; - protected static string $view = 'filament.pages.dashboard'; - - protected ?string $heading = ''; - - public function getTitle(): string - { - return trans('admin/dashboard.title'); - } - - public static function getNavigationLabel(): string - { - return trans('admin/dashboard.title'); - } - - protected static ?string $slug = '/'; - private SoftwareVersionService $softwareVersionService; public function mount(SoftwareVersionService $softwareVersionService): void @@ -39,51 +16,18 @@ class Dashboard extends Page $this->softwareVersionService = $softwareVersionService; } - public function getViewData(): array + public function getColumns(): int { - return [ - 'inDevelopment' => config('app.version') === 'canary', - 'version' => $this->softwareVersionService->currentPanelVersion(), - 'latestVersion' => $this->softwareVersionService->latestPanelVersion(), - 'isLatest' => $this->softwareVersionService->isLatestPanel(), - 'eggsCount' => Egg::query()->count(), - 'nodesList' => ListNodes::getUrl(), - 'nodesCount' => Node::query()->count(), - 'serversCount' => Server::query()->count(), - 'usersCount' => User::query()->count(), + return 1; + } - 'devActions' => [ - CreateAction::make() - ->label(trans('admin/dashboard.sections.intro-developers.button_issues')) - ->icon('tabler-brand-github') - ->url('https://github.com/pelican-dev/panel/issues', true), - ], - 'updateActions' => [ - CreateAction::make() - ->label(trans('admin/dashboard.sections.intro-update-available.heading')) - ->icon('tabler-clipboard-text') - ->url('https://pelican.dev/docs/panel/update', true) - ->color('warning'), - ], - 'nodeActions' => [ - CreateAction::make() - ->label(trans('admin/dashboard.sections.intro-first-node.button_label')) - ->icon('tabler-server-2') - ->url(CreateNode::getUrl()), - ], - 'supportActions' => [ - CreateAction::make() - ->label(trans('admin/dashboard.sections.intro-support.button_donate')) - ->icon('tabler-cash') - ->url('https://pelican.dev/donate', true) - ->color('success'), - ], - 'helpActions' => [ - CreateAction::make() - ->label(trans('admin/dashboard.sections.intro-help.button_docs')) - ->icon('tabler-speedboat') - ->url('https://pelican.dev/docs', true), - ], - ]; + public function getHeading(): string + { + return trans('admin/dashboard.heading'); + } + + public function getSubheading(): string + { + return trans('admin/dashboard.version', ['version' => $this->softwareVersionService->currentPanelVersion()]); } } diff --git a/app/Filament/Admin/Pages/Settings.php b/app/Filament/Admin/Pages/Settings.php index 4529996de..17c22f9e3 100644 --- a/app/Filament/Admin/Pages/Settings.php +++ b/app/Filament/Admin/Pages/Settings.php @@ -2,6 +2,7 @@ namespace App\Filament\Admin\Pages; +use App\Extensions\Avatar\AvatarProvider; use App\Extensions\Captcha\Providers\CaptchaProvider; use App\Extensions\OAuth\Providers\OAuthProvider; use App\Models\Backup; @@ -12,6 +13,7 @@ use Filament\Actions\Action; use Filament\Forms\Components\Actions; use Filament\Forms\Components\Actions\Action as FormAction; use Filament\Forms\Components\Component; +use Filament\Forms\Components\FileUpload; use Filament\Forms\Components\Group; use Filament\Forms\Components\Hidden; use Filament\Forms\Components\Section; @@ -32,6 +34,7 @@ use Filament\Pages\Concerns\InteractsWithHeaderActions; use Filament\Pages\Page; use Filament\Support\Enums\MaxWidth; use Illuminate\Http\Client\Factory; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Notification as MailNotification; use Illuminate\Support\Str; @@ -134,26 +137,50 @@ class Settings extends Page implements HasForms ->default(env('APP_FAVICON', '/pelican.ico')) ->placeholder('/pelican.ico'), ]), - Toggle::make('APP_DEBUG') - ->label(trans('admin/setting.general.debug_mode')) - ->inline(false) - ->onIcon('tabler-check') - ->offIcon('tabler-x') - ->onColor('success') - ->offColor('danger') - ->formatStateUsing(fn ($state): bool => (bool) $state) - ->afterStateUpdated(fn ($state, Set $set) => $set('APP_DEBUG', (bool) $state)) - ->default(env('APP_DEBUG', config('app.debug'))), - ToggleButtons::make('FILAMENT_TOP_NAVIGATION') - ->label(trans('admin/setting.general.navigation')) - ->inline() - ->options([ - false => trans('admin/setting.general.sidebar'), - true => trans('admin/setting.general.topbar'), - ]) - ->formatStateUsing(fn ($state): bool => (bool) $state) - ->afterStateUpdated(fn ($state, Set $set) => $set('FILAMENT_TOP_NAVIGATION', (bool) $state)) - ->default(env('FILAMENT_TOP_NAVIGATION', config('panel.filament.top-navigation'))), + Group::make() + ->columns(2) + ->schema([ + Toggle::make('APP_DEBUG') + ->label(trans('admin/setting.general.debug_mode')) + ->inline(false) + ->onIcon('tabler-check') + ->offIcon('tabler-x') + ->onColor('success') + ->offColor('danger') + ->formatStateUsing(fn ($state): bool => (bool) $state) + ->afterStateUpdated(fn ($state, Set $set) => $set('APP_DEBUG', (bool) $state)) + ->default(env('APP_DEBUG', config('app.debug'))), + ToggleButtons::make('FILAMENT_TOP_NAVIGATION') + ->label(trans('admin/setting.general.navigation')) + ->inline() + ->options([ + false => trans('admin/setting.general.sidebar'), + true => trans('admin/setting.general.topbar'), + ]) + ->formatStateUsing(fn ($state): bool => (bool) $state) + ->afterStateUpdated(fn ($state, Set $set) => $set('FILAMENT_TOP_NAVIGATION', (bool) $state)) + ->default(env('FILAMENT_TOP_NAVIGATION', config('panel.filament.top-navigation'))), + ]), + Group::make() + ->columns(2) + ->schema([ + Select::make('FILAMENT_AVATAR_PROVIDER') + ->label(trans('admin/setting.general.avatar_provider')) + ->native(false) + ->options(collect(AvatarProvider::getAll())->mapWithKeys(fn ($provider) => [$provider->getId() => $provider->getName()])) + ->selectablePlaceholder(false) + ->default(env('FILAMENT_AVATAR_PROVIDER', config('panel.filament.avatar-provider'))), + Toggle::make('FILAMENT_UPLOADABLE_AVATARS') + ->label(trans('admin/setting.general.uploadable_avatars')) + ->inline(false) + ->onIcon('tabler-check') + ->offIcon('tabler-x') + ->onColor('success') + ->offColor('danger') + ->formatStateUsing(fn ($state) => (bool) $state) + ->afterStateUpdated(fn ($state, Set $set) => $set('FILAMENT_UPLOADABLE_AVATARS', (bool) $state)) + ->default(env('FILAMENT_UPLOADABLE_AVATARS', config('panel.filament.uploadable-avatars'))), + ]), ToggleButtons::make('PANEL_USE_BINARY_PREFIX') ->label(trans('admin/setting.general.unit_prefix')) ->inline() @@ -175,12 +202,18 @@ class Settings extends Page implements HasForms ->formatStateUsing(fn ($state): int => (int) $state) ->afterStateUpdated(fn ($state, Set $set) => $set('APP_2FA_REQUIRED', (int) $state)) ->default(env('APP_2FA_REQUIRED', config('panel.auth.2fa_required'))), + Select::make('FILAMENT_WIDTH') + ->label(trans('admin/setting.general.display_width')) + ->native(false) + ->options(MaxWidth::class) + ->selectablePlaceholder(false) + ->default(env('FILAMENT_WIDTH', config('panel.filament.display-width'))), TagsInput::make('TRUSTED_PROXIES') ->label(trans('admin/setting.general.trusted_proxies')) ->separator() ->splitKeys(['Tab', ' ']) ->placeholder(trans('admin/setting.general.trusted_proxies_help')) - ->default(env('TRUSTED_PROXIES', implode(',', config('trustedproxy.proxies')))) + ->default(env('TRUSTED_PROXIES', implode(',', Arr::wrap(config('trustedproxy.proxies'))))) ->hintActions([ FormAction::make('clear') ->label(trans('admin/setting.general.clear')) @@ -215,12 +248,6 @@ class Settings extends Page implements HasForms $set('TRUSTED_PROXIES', $ips->values()->all()); }), ]), - Select::make('FILAMENT_WIDTH') - ->label(trans('admin/setting.general.display_width')) - ->native(false) - ->options(MaxWidth::class) - ->selectablePlaceholder(false) - ->default(env('FILAMENT_WIDTH', config('panel.filament.display-width'))), ]; } @@ -702,10 +729,17 @@ class Settings extends Page implements HasForms ->onColor('success') ->offColor('danger') ->live() - ->columnSpanFull() + ->columnSpan(1) ->formatStateUsing(fn ($state): bool => (bool) $state) ->afterStateUpdated(fn ($state, Set $set) => $set('PANEL_EDITABLE_SERVER_DESCRIPTIONS', (bool) $state)) ->default(env('PANEL_EDITABLE_SERVER_DESCRIPTIONS', config('panel.editable_server_descriptions'))), + FileUpload::make('ConsoleFonts') + ->hint(trans('admin/setting.misc.server.console_font_hint')) + ->label(trans('admin/setting.misc.server.console_font_upload')) + ->directory('fonts') + ->columnSpan(1) + ->maxFiles(1) + ->preserveFilenames(), ]), Section::make(trans('admin/setting.misc.webhook.title')) ->description(trans('admin/setting.misc.webhook.helper')) @@ -734,6 +768,7 @@ class Settings extends Page implements HasForms { try { $data = $this->form->getState(); + unset($data['ConsoleFonts']); // Convert bools to a string, so they are correctly written to the .env file $data = array_map(fn ($value) => is_bool($value) ? ($value ? 'true' : 'false') : $value, $data); diff --git a/app/Filament/Admin/Resources/DatabaseHostResource.php b/app/Filament/Admin/Resources/DatabaseHostResource.php index 421d39c6b..0b6fb29b5 100644 --- a/app/Filament/Admin/Resources/DatabaseHostResource.php +++ b/app/Filament/Admin/Resources/DatabaseHostResource.php @@ -16,6 +16,7 @@ use Filament\Tables\Actions\EditAction; use Filament\Tables\Actions\ViewAction; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; +use Illuminate\Database\Eloquent\Builder; class DatabaseHostResource extends Resource { @@ -27,7 +28,7 @@ class DatabaseHostResource extends Resource public static function getNavigationBadge(): ?string { - return static::getModel()::count() ?: null; + return (string) static::getEloquentQuery()->count() ?: null; } public static function getNavigationLabel(): string @@ -144,7 +145,7 @@ class DatabaseHostResource extends Resource ->preload() ->helperText(trans('admin/databasehost.linked_nodes_help')) ->label(trans('admin/databasehost.linked_nodes')) - ->relationship('nodes', 'name'), + ->relationship('nodes', 'name', fn (Builder $query) => $query->whereIn('nodes.id', auth()->user()->accessibleNodes()->pluck('id'))), ]), ]); } @@ -158,4 +159,13 @@ class DatabaseHostResource extends Resource 'edit' => Pages\EditDatabaseHost::route('/{record}/edit'), ]; } + + public static function getEloquentQuery(): Builder + { + $query = parent::getEloquentQuery(); + + return $query->whereHas('nodes', function (Builder $query) { + $query->whereIn('nodes.id', auth()->user()->accessibleNodes()->pluck('id')); + })->orDoesntHave('nodes'); + } } diff --git a/app/Filament/Admin/Resources/DatabaseHostResource/Pages/CreateDatabaseHost.php b/app/Filament/Admin/Resources/DatabaseHostResource/Pages/CreateDatabaseHost.php index 157bc1b9d..ff876440f 100644 --- a/app/Filament/Admin/Resources/DatabaseHostResource/Pages/CreateDatabaseHost.php +++ b/app/Filament/Admin/Resources/DatabaseHostResource/Pages/CreateDatabaseHost.php @@ -4,14 +4,30 @@ namespace App\Filament\Admin\Resources\DatabaseHostResource\Pages; use App\Filament\Admin\Resources\DatabaseHostResource; use App\Services\Databases\Hosts\HostCreationService; +use Filament\Forms\Components\Fieldset; +use Filament\Forms\Components\Hidden; +use Filament\Forms\Components\Placeholder; +use Filament\Forms\Components\Select; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; +use Filament\Forms\Components\Wizard\Step; +use Filament\Forms\Get; +use Filament\Forms\Set; use Filament\Notifications\Notification; use Filament\Resources\Pages\CreateRecord; +use Filament\Resources\Pages\CreateRecord\Concerns\HasWizard; use Filament\Support\Exceptions\Halt; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\HtmlString; +use Illuminate\Support\Str; use PDOException; +use Webbingbrasil\FilamentCopyActions\Forms\Actions\CopyAction; class CreateDatabaseHost extends CreateRecord { + use HasWizard; + protected static string $resource = DatabaseHostResource::class; protected static bool $canCreateAnother = false; @@ -23,18 +39,118 @@ class CreateDatabaseHost extends CreateRecord $this->service = $service; } - protected function getHeaderActions(): array + /** @return Step[] */ + public function getSteps(): array { return [ - $this->getCreateFormAction()->formId('form'), + Step::make(trans('admin/databasehost.setup.preparations')) + ->columns() + ->schema([ + Placeholder::make('') + ->content(trans('admin/databasehost.setup.note')), + Toggle::make('different_server') + ->label(new HtmlString(trans('admin/databasehost.setup.different_server'))) + ->dehydrated(false) + ->live() + ->columnSpanFull() + ->afterStateUpdated(fn ($state, Set $set) => $state ? $set('panel_ip', gethostbyname(str(config('app.url'))->replace(['http:', 'https:', '/'], ''))) : '127.0.0.1'), + Hidden::make('panel_ip') + ->default('127.0.0.1') + ->dehydrated(false), + TextInput::make('username') + ->label(trans('admin/databasehost.username')) + ->helperText(trans('admin/databasehost.username_help')) + ->required() + ->default('pelicanuser') + ->maxLength(255), + TextInput::make('password') + ->label(trans('admin/databasehost.password')) + ->helperText(trans('admin/databasehost.password_help')) + ->required() + ->default(Str::password(16)) + ->password() + ->revealable() + ->maxLength(255), + ]) + ->afterValidation(function (Get $get, Set $set) { + $set('create_user', "CREATE USER '{$get('username')}'@'{$get('panel_ip')}' IDENTIFIED BY '{$get('password')}';"); + $set('assign_permissions', "GRANT ALL PRIVILEGES ON *.* TO '{$get('username')}'@'{$get('panel_ip')}' WITH GRANT OPTION;"); + }), + Step::make(trans('admin/databasehost.setup.database_setup')) + ->schema([ + Fieldset::make(trans('admin/databasehost.setup.database_user')) + ->schema([ + Placeholder::make('') + ->content(new HtmlString(trans('admin/databasehost.setup.cli_login'))) + ->columnSpanFull(), + TextInput::make('create_user') + ->label(trans('admin/databasehost.setup.command_create_user')) + ->default(fn (Get $get) => "CREATE USER '{$get('username')}'@'{$get('panel_ip')}' IDENTIFIED BY '{$get('password')}';") + ->disabled() + ->dehydrated(false) + ->suffixAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null) + ->columnSpanFull(), + TextInput::make('assign_permissions') + ->label(trans('admin/databasehost.setup.command_assign_permissions')) + ->default(fn (Get $get) => "GRANT ALL PRIVILEGES ON *.* TO '{$get('username')}'@'{$get('panel_ip')}' WITH GRANT OPTION;") + ->disabled() + ->dehydrated(false) + ->suffixAction(fn (string $state) => request()->isSecure() ? CopyAction::make()->copyable($state) : null) + ->columnSpanFull(), + Placeholder::make('') + ->content(new HtmlString(trans('admin/databasehost.setup.cli_exit'))) + ->columnSpanFull(), + ]), + Fieldset::make(trans('admin/databasehost.setup.external_access')) + ->schema([ + Placeholder::make('') + ->content(new HtmlString(trans('admin/databasehost.setup.allow_external_access'))) + ->columnSpanFull(), + ]), + ]), + Step::make(trans('admin/databasehost.setup.panel_setup')) + ->columns([ + 'default' => 2, + 'lg' => 3, + ]) + ->schema([ + TextInput::make('host') + ->columnSpan(2) + ->label(trans('admin/databasehost.host')) + ->helperText(trans('admin/databasehost.host_help')) + ->required() + ->live(onBlur: true) + ->afterStateUpdated(fn ($state, Set $set) => $set('name', $state)) + ->maxLength(255), + TextInput::make('port') + ->label(trans('admin/databasehost.port')) + ->helperText(trans('admin/databasehost.port_help')) + ->required() + ->numeric() + ->default(3306) + ->minValue(0) + ->maxValue(65535), + TextInput::make('max_databases') + ->label(trans('admin/databasehost.max_database')) + ->helpertext(trans('admin/databasehost.max_databases_help')) + ->placeholder(trans('admin/databasehost.unlimited')) + ->numeric(), + TextInput::make('name') + ->label(trans('admin/databasehost.display_name')) + ->helperText(trans('admin/databasehost.display_name_help')) + ->required() + ->maxLength(60), + Select::make('node_ids') + ->multiple() + ->searchable() + ->preload() + ->helperText(trans('admin/databasehost.linked_nodes_help')) + ->label(trans('admin/databasehost.linked_nodes')) + ->relationship('nodes', 'name', fn (Builder $query) => $query->whereIn('nodes.id', auth()->user()->accessibleNodes()->pluck('id'))), + ]), ]; } - protected function getFormActions(): array - { - return []; - } - protected function handleRecordCreation(array $data): Model { try { diff --git a/app/Filament/Admin/Resources/EggResource.php b/app/Filament/Admin/Resources/EggResource.php index ec787f988..2fe7d9d4e 100644 --- a/app/Filament/Admin/Resources/EggResource.php +++ b/app/Filament/Admin/Resources/EggResource.php @@ -21,7 +21,7 @@ class EggResource extends Resource public static function getNavigationGroup(): ?string { - return trans('admin/dashboard.server'); + return config('panel.filament.top-navigation', false) ? null : trans('admin/dashboard.server'); } public static function getNavigationLabel(): string diff --git a/app/Filament/Admin/Resources/EggResource/Pages/CreateEgg.php b/app/Filament/Admin/Resources/EggResource/Pages/CreateEgg.php index 8d1f1b582..e10d5521b 100644 --- a/app/Filament/Admin/Resources/EggResource/Pages/CreateEgg.php +++ b/app/Filament/Admin/Resources/EggResource/Pages/CreateEgg.php @@ -243,6 +243,7 @@ class CreateEgg extends CreateRecord ->default('ghcr.io/pelican-eggs/installers:debian'), Select::make('script_entry') ->label(trans('admin/egg.script_entry')) + ->native(false) ->selectablePlaceholder(false) ->default('bash') ->options(['bash', 'ash', '/bin/bash']) diff --git a/app/Filament/Admin/Resources/EggResource/Pages/EditEgg.php b/app/Filament/Admin/Resources/EggResource/Pages/EditEgg.php index 357600b70..39bd6b9e7 100644 --- a/app/Filament/Admin/Resources/EggResource/Pages/EditEgg.php +++ b/app/Filament/Admin/Resources/EggResource/Pages/EditEgg.php @@ -235,6 +235,7 @@ class EditEgg extends EditRecord ->placeholder('ghcr.io/pelican-eggs/installers:debian'), Select::make('script_entry') ->label(trans('admin/egg.script_entry')) + ->native(false) ->selectablePlaceholder(false) ->options(['bash', 'ash', '/bin/bash']) ->required(), diff --git a/app/Filament/Admin/Resources/MountResource.php b/app/Filament/Admin/Resources/MountResource.php index 6ad032e5a..7336cb741 100644 --- a/app/Filament/Admin/Resources/MountResource.php +++ b/app/Filament/Admin/Resources/MountResource.php @@ -18,6 +18,7 @@ use Filament\Tables\Actions\EditAction; use Filament\Tables\Actions\ViewAction; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; +use Illuminate\Database\Eloquent\Builder; class MountResource extends Resource { @@ -44,7 +45,7 @@ class MountResource extends Resource public static function getNavigationBadge(): ?string { - return static::getModel()::count() ?: null; + return (string) static::getEloquentQuery()->count() ?: null; } public static function getNavigationGroup(): ?string @@ -147,7 +148,7 @@ class MountResource extends Resource ->preload(), Select::make('nodes')->multiple() ->label(trans('admin/mount.nodes')) - ->relationship('nodes', 'name') + ->relationship('nodes', 'name', fn (Builder $query) => $query->whereIn('nodes.id', auth()->user()->accessibleNodes()->pluck('id'))) ->searchable(['name', 'fqdn']) ->preload(), ]), @@ -170,4 +171,13 @@ class MountResource extends Resource 'edit' => Pages\EditMount::route('/{record}/edit'), ]; } + + public static function getEloquentQuery(): Builder + { + $query = parent::getEloquentQuery(); + + return $query->whereHas('nodes', function (Builder $query) { + $query->whereIn('nodes.id', auth()->user()->accessibleNodes()->pluck('id')); + })->orDoesntHave('nodes'); + } } diff --git a/app/Filament/Admin/Resources/NodeResource.php b/app/Filament/Admin/Resources/NodeResource.php index 2219bde47..3c1169cfe 100644 --- a/app/Filament/Admin/Resources/NodeResource.php +++ b/app/Filament/Admin/Resources/NodeResource.php @@ -6,6 +6,7 @@ use App\Filament\Admin\Resources\NodeResource\Pages; use App\Filament\Admin\Resources\NodeResource\RelationManagers; use App\Models\Node; use Filament\Resources\Resource; +use Illuminate\Database\Eloquent\Builder; class NodeResource extends Resource { @@ -32,12 +33,12 @@ class NodeResource extends Resource public static function getNavigationGroup(): ?string { - return trans('admin/dashboard.server'); + return config('panel.filament.top-navigation', false) ? null : trans('admin/dashboard.server'); } public static function getNavigationBadge(): ?string { - return static::getModel()::count() ?: null; + return (string) static::getEloquentQuery()->count() ?: null; } public static function getRelations(): array @@ -56,4 +57,11 @@ class NodeResource extends Resource 'edit' => Pages\EditNode::route('/{record}/edit'), ]; } + + public static function getEloquentQuery(): Builder + { + $query = parent::getEloquentQuery(); + + return $query->whereIn('id', auth()->user()->accessibleNodes()->pluck('id')); + } } diff --git a/app/Filament/Admin/Resources/NodeResource/Pages/CreateNode.php b/app/Filament/Admin/Resources/NodeResource/Pages/CreateNode.php index a5b7fcc72..65c4dd16e 100644 --- a/app/Filament/Admin/Resources/NodeResource/Pages/CreateNode.php +++ b/app/Filament/Admin/Resources/NodeResource/Pages/CreateNode.php @@ -3,9 +3,11 @@ namespace App\Filament\Admin\Resources\NodeResource\Pages; use App\Filament\Admin\Resources\NodeResource; +use App\Models\Node; use Filament\Forms; use Filament\Forms\Components\Actions\Action; use Filament\Forms\Components\Grid; +use Filament\Forms\Components\Hidden; use Filament\Forms\Components\TagsInput; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\ToggleButtons; @@ -44,7 +46,8 @@ class CreateNode extends CreateRecord ->required() ->autofocus() ->live(debounce: 1500) - ->rule('prohibited', fn ($state) => is_ip($state) && request()->isSecure()) + ->rules(Node::getRulesForField('fqdn')) + ->prohibited(fn ($state) => is_ip($state) && request()->isSecure()) ->label(fn ($state) => is_ip($state) ? trans('admin/node.ip_address') : trans('admin/node.domain')) ->placeholder(fn ($state) => is_ip($state) ? '192.168.1.1' : 'node.example.com') ->helperText(function ($state) { @@ -147,14 +150,15 @@ class CreateNode extends CreateRecord ->required() ->maxLength(100), - ToggleButtons::make('scheme') + Hidden::make('scheme') + ->default(fn () => request()->isSecure() ? 'https' : 'http'), + + Hidden::make('behind_proxy') + ->default(false), + + ToggleButtons::make('connection') ->label(trans('admin/node.ssl')) - ->columnSpan([ - 'default' => 1, - 'sm' => 1, - 'md' => 1, - 'lg' => 1, - ]) + ->columnSpan(1) ->inline() ->helperText(function (Get $get) { if (request()->isSecure()) { @@ -167,20 +171,29 @@ class CreateNode extends CreateRecord return ''; }) - ->disableOptionWhen(fn (string $value): bool => $value === 'http' && request()->isSecure()) + ->disableOptionWhen(fn (string $value) => $value === 'http' && request()->isSecure()) ->options([ 'http' => 'HTTP', 'https' => 'HTTPS (SSL)', + 'https_proxy' => 'HTTPS with (reverse) proxy', ]) ->colors([ 'http' => 'warning', 'https' => 'success', + 'https_proxy' => 'success', ]) ->icons([ 'http' => 'tabler-lock-open-off', 'https' => 'tabler-lock', + 'https_proxy' => 'tabler-shield-lock', ]) - ->default(fn () => request()->isSecure() ? 'https' : 'http'), + ->default(fn () => request()->isSecure() ? 'https' : 'http') + ->live() + ->dehydrated(false) + ->afterStateUpdated(function ($state, Set $set) { + $set('scheme', $state === 'http' ? 'http' : 'https'); + $set('behind_proxy', $state === 'https_proxy'); + }), ]), Step::make('advanced') ->label(trans('admin/node.tabs.advanced_settings')) diff --git a/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php b/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php index 98d7099b1..c93ad412b 100644 --- a/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php +++ b/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php @@ -4,6 +4,7 @@ namespace App\Filament\Admin\Resources\NodeResource\Pages; use App\Filament\Admin\Resources\NodeResource; use App\Models\Node; +use App\Repositories\Daemon\DaemonConfigurationRepository; use App\Services\Helpers\SoftwareVersionService; use App\Services\Nodes\NodeAutoDeployService; use App\Services\Nodes\NodeUpdateService; @@ -13,6 +14,7 @@ use Filament\Forms; use Filament\Forms\Components\Actions as FormActions; use Filament\Forms\Components\Fieldset; use Filament\Forms\Components\Grid; +use Filament\Forms\Components\Hidden; use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\Tabs; use Filament\Forms\Components\Tabs\Tab; @@ -26,7 +28,7 @@ use Filament\Forms\Set; use Filament\Notifications\Notification; use Filament\Resources\Pages\EditRecord; use Filament\Support\Enums\Alignment; -use Illuminate\Database\Eloquent\Model; +use Illuminate\Http\Client\ConnectionException; use Illuminate\Support\HtmlString; use Webbingbrasil\FilamentCopyActions\Forms\Actions\CopyAction; @@ -34,12 +36,13 @@ class EditNode extends EditRecord { protected static string $resource = NodeResource::class; - private bool $errored = false; + private DaemonConfigurationRepository $daemonConfigurationRepository; private NodeUpdateService $nodeUpdateService; - public function boot(NodeUpdateService $nodeUpdateService): void + public function boot(DaemonConfigurationRepository $daemonConfigurationRepository, NodeUpdateService $nodeUpdateService): void { + $this->daemonConfigurationRepository = $daemonConfigurationRepository; $this->nodeUpdateService = $nodeUpdateService; } @@ -108,7 +111,8 @@ class EditNode extends EditRecord ->required() ->autofocus() ->live(debounce: 1500) - ->rule('prohibited', fn ($state) => is_ip($state) && request()->isSecure()) + ->rules(Node::getRulesForField('fqdn')) + ->prohibited(fn ($state) => is_ip($state) && request()->isSecure()) ->label(fn ($state) => is_ip($state) ? trans('admin/node.ip_address') : trans('admin/node.domain')) ->placeholder(fn ($state) => is_ip($state) ? '192.168.1.1' : 'node.example.com') ->helperText(function ($state) { @@ -196,7 +200,9 @@ class EditNode extends EditRecord ]) ->required() ->maxLength(100), - ToggleButtons::make('scheme') + Hidden::make('scheme'), + Hidden::make('behind_proxy'), + ToggleButtons::make('connection') ->label(trans('admin/node.ssl')) ->columnSpan(1) ->inline() @@ -211,20 +217,30 @@ class EditNode extends EditRecord return ''; }) - ->disableOptionWhen(fn (string $value): bool => $value === 'http' && request()->isSecure()) + ->disableOptionWhen(fn (string $value) => $value === 'http' && request()->isSecure()) ->options([ 'http' => 'HTTP', 'https' => 'HTTPS (SSL)', + 'https_proxy' => 'HTTPS with (reverse) proxy', ]) ->colors([ 'http' => 'warning', 'https' => 'success', + 'https_proxy' => 'success', ]) ->icons([ 'http' => 'tabler-lock-open-off', 'https' => 'tabler-lock', + 'https_proxy' => 'tabler-shield-lock', ]) - ->default(fn () => request()->isSecure() ? 'https' : 'http'), ]), + ->formatStateUsing(fn (Get $get) => $get('scheme') === 'http' ? 'http' : ($get('behind_proxy') ? 'https_proxy' : 'https')) + ->live() + ->dehydrated(false) + ->afterStateUpdated(function ($state, Set $set) { + $set('scheme', $state === 'http' ? 'http' : 'https'); + $set('behind_proxy', $state === 'https_proxy'); + }), + ]), Tab::make('adv') ->label(trans('admin/node.tabs.advanced_settings')) ->columns([ @@ -596,39 +612,6 @@ class EditNode extends EditRecord return $data; } - protected function handleRecordUpdate(Model $record, array $data): Model - { - if (!$record instanceof Node) { - return $record; - } - - try { - $record = $this->nodeUpdateService->handle($record, $data); - } catch (Exception $exception) { - $this->errored = true; - - Notification::make() - ->title(trans('admin/node.error_connecting', ['node' => $record->name])) - ->body(trans('admin/node.error_connecting_description')) - ->color('warning') - ->icon('tabler-database') - ->warning() - ->send(); - - } - - return parent::handleRecordUpdate($record, $data); - } - - protected function getSavedNotification(): ?Notification - { - if ($this->errored) { - return null; - } - - return parent::getSavedNotification(); - } - protected function getFormActions(): array { return []; @@ -647,6 +630,31 @@ class EditNode extends EditRecord protected function afterSave(): void { $this->fillForm(); + + /** @var Node $node */ + $node = $this->record; + + $changed = collect($node->getChanges())->except(['updated_at', 'name', 'tags', 'public', 'maintenance_mode', 'memory', 'memory_overallocate', 'disk', 'disk_overallocate', 'cpu', 'cpu_overallocate'])->all(); + + try { + if ($changed) { + $this->daemonConfigurationRepository->setNode($node)->update($node); + } + parent::getSavedNotification()?->send(); + } catch (ConnectionException) { + Notification::make() + ->title(trans('admin/node.error_connecting', ['node' => $node->name])) + ->body(trans('admin/node.error_connecting_description')) + ->color('warning') + ->icon('tabler-database') + ->warning() + ->send(); + } + } + + protected function getSavedNotification(): ?Notification + { + return null; } protected function getColumnSpan(): ?int diff --git a/app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php b/app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php index 73840530e..4c11002d0 100644 --- a/app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php +++ b/app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php @@ -12,8 +12,7 @@ use Filament\Forms\Components\TextInput; use Filament\Forms\Get; use Filament\Forms\Set; use Filament\Resources\RelationManagers\RelationManager; -use Filament\Tables; -use Filament\Tables\Actions\BulkActionGroup; +use Filament\Tables\Actions\Action; use Filament\Tables\Actions\DeleteBulkAction; use Filament\Tables\Columns\SelectColumn; use Filament\Tables\Columns\TextColumn; @@ -32,18 +31,12 @@ class AllocationsRelationManager extends RelationManager public function setTitle(): string { return trans('admin/server.allocations'); - } public function table(Table $table): Table { return $table - ->recordTitleAttribute('ip') - - // Non Primary Allocations - // ->checkIfRecordIsSelectableUsing(fn (Allocation $allocation) => $allocation->id !== $allocation->server?->allocation_id) - - // All assigned allocations + ->recordTitleAttribute('address') ->checkIfRecordIsSelectableUsing(fn (Allocation $allocation) => $allocation->server_id === null) ->paginationPageOptions(['10', '20', '50', '100', '200', '500']) ->searchable() @@ -72,14 +65,14 @@ class AllocationsRelationManager extends RelationManager ->label(trans('admin/node.table.ip')), ]) ->headerActions([ - Tables\Actions\Action::make('create new allocation') + Action::make('create new allocation') ->label(trans('admin/node.create_allocation')) ->form(fn () => [ Select::make('allocation_ip') ->options(collect($this->getOwnerRecord()->ipAddresses())->mapWithKeys(fn (string $ip) => [$ip => $ip])) ->label(trans('admin/node.ip_address')) ->inlineLabel() - ->ipv4() + ->ip() ->helperText(trans('admin/node.ip_help')) ->afterStateUpdated(fn (Set $set) => $set('allocation_ports', [])) ->live() @@ -96,19 +89,15 @@ class AllocationsRelationManager extends RelationManager ->inlineLabel() ->live() ->disabled(fn (Get $get) => empty($get('allocation_ip'))) - ->afterStateUpdated(fn ($state, Set $set, Get $get) => $set('allocation_ports', - CreateServer::retrieveValidPorts($this->getOwnerRecord(), $state, $get('allocation_ip'))) - ) + ->afterStateUpdated(fn ($state, Set $set, Get $get) => $set('allocation_ports', CreateServer::retrieveValidPorts($this->getOwnerRecord(), $state, $get('allocation_ip')))) ->splitKeys(['Tab', ' ', ',']) ->required(), ]) ->action(fn (array $data, AssignmentService $service) => $service->handle($this->getOwnerRecord(), $data)), ]) - ->bulkActions([ - BulkActionGroup::make([ - DeleteBulkAction::make() - ->authorize(fn () => auth()->user()->can('update node')), - ]), + ->groupedBulkActions([ + DeleteBulkAction::make() + ->authorize(fn () => auth()->user()->can('update node')), ]); } } diff --git a/app/Filament/Admin/Resources/NodeResource/Widgets/NodeCpuChart.php b/app/Filament/Admin/Resources/NodeResource/Widgets/NodeCpuChart.php index c5ad7099e..6601514c7 100644 --- a/app/Filament/Admin/Resources/NodeResource/Widgets/NodeCpuChart.php +++ b/app/Filament/Admin/Resources/NodeResource/Widgets/NodeCpuChart.php @@ -27,7 +27,7 @@ class NodeCpuChart extends ChartWidget $this->cpuHistory = session()->get('cpuHistory', []); $this->cpuHistory[] = [ - 'cpu' => Number::format($data['cpu_percent'] * $threads, maxPrecision: 2), + 'cpu' => round($data['cpu_percent'] * $threads, 2), 'timestamp' => now(auth()->user()->timezone ?? 'UTC')->format('H:i:s'), ]; diff --git a/app/Filament/Admin/Resources/NodeResource/Widgets/NodeMemoryChart.php b/app/Filament/Admin/Resources/NodeResource/Widgets/NodeMemoryChart.php index 25672be57..7ef04331e 100644 --- a/app/Filament/Admin/Resources/NodeResource/Widgets/NodeMemoryChart.php +++ b/app/Filament/Admin/Resources/NodeResource/Widgets/NodeMemoryChart.php @@ -27,9 +27,9 @@ class NodeMemoryChart extends ChartWidget $this->memoryHistory = session()->get('memoryHistory', []); $this->memoryHistory[] = [ - 'memory' => Number::format(config('panel.use_binary_prefix') + 'memory' => round(config('panel.use_binary_prefix') ? $value / 1024 / 1024 / 1024 - : $value / 1000 / 1000 / 1000, maxPrecision: 2), + : $value / 1000 / 1000 / 1000, 2), 'timestamp' => now(auth()->user()->timezone ?? 'UTC')->format('H:i:s'), ]; diff --git a/app/Filament/Admin/Resources/NodeResource/Widgets/NodeStorageChart.php b/app/Filament/Admin/Resources/NodeResource/Widgets/NodeStorageChart.php index 7f9be2d6f..c70eec8d2 100644 --- a/app/Filament/Admin/Resources/NodeResource/Widgets/NodeStorageChart.php +++ b/app/Filament/Admin/Resources/NodeResource/Widgets/NodeStorageChart.php @@ -4,7 +4,6 @@ namespace App\Filament\Admin\Resources\NodeResource\Widgets; use App\Models\Node; use Filament\Widgets\ChartWidget; -use Illuminate\Support\Number; class NodeStorageChart extends ChartWidget { @@ -46,8 +45,8 @@ class NodeStorageChart extends ChartWidget $unused = $total - $used; - $used = Number::format($used, maxPrecision: 2); - $unused = Number::format($unused, maxPrecision: 2); + $used = round($used, 2); + $unused = round($unused, 2); return [ 'datasets' => [ diff --git a/app/Filament/Admin/Resources/RoleResource.php b/app/Filament/Admin/Resources/RoleResource.php index b823171e6..db3050574 100644 --- a/app/Filament/Admin/Resources/RoleResource.php +++ b/app/Filament/Admin/Resources/RoleResource.php @@ -2,8 +2,6 @@ namespace App\Filament\Admin\Resources; -use App\Enums\RolePermissionModels; -use App\Enums\RolePermissionPrefixes; use App\Filament\Admin\Resources\RoleResource\Pages; use App\Models\Role; use Filament\Forms\Components\Actions\Action; @@ -12,6 +10,7 @@ use Filament\Forms\Components\Component; use Filament\Forms\Components\Fieldset; use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\Section; +use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; use Filament\Forms\Form; use Filament\Forms\Get; @@ -50,7 +49,7 @@ class RoleResource extends Resource public static function getNavigationGroup(): ?string { - return trans('admin/dashboard.user'); + return config('panel.filament.top-navigation', false) ? trans('admin/dashboard.advanced') : trans('admin/dashboard.user'); } public static function getNavigationBadge(): ?string @@ -71,6 +70,11 @@ class RoleResource extends Resource ->badge() ->counts('permissions') ->formatStateUsing(fn (Role $role, $state) => $role->isRootAdmin() ? trans('admin/role.all') : $state), + TextColumn::make('nodes.name') + ->icon('tabler-server-2') + ->label(trans('admin/role.nodes')) + ->badge() + ->placeholder(trans('admin/role.all')), TextColumn::make('users_count') ->label(trans('admin/role.users')) ->counts('users') @@ -95,32 +99,16 @@ class RoleResource extends Resource public static function form(Form $form): Form { - $permissions = []; + $permissionSections = []; - foreach (RolePermissionModels::cases() as $model) { + foreach (Role::getPermissionList() as $model => $permissions) { $options = []; - foreach (RolePermissionPrefixes::cases() as $prefix) { - $options[$prefix->value . ' ' . strtolower($model->value)] = Str::headline($prefix->value); + foreach ($permissions as $permission) { + $options[$permission . ' ' . strtolower($model)] = Str::headline($permission); } - if (array_key_exists($model->value, Role::MODEL_SPECIFIC_PERMISSIONS)) { - foreach (Role::MODEL_SPECIFIC_PERMISSIONS[$model->value] as $permission) { - $options[$permission . ' ' . strtolower($model->value)] = Str::headline($permission); - } - } - - $permissions[] = self::makeSection($model->value, $options); - } - - foreach (Role::SPECIAL_PERMISSIONS as $model => $prefixes) { - $options = []; - - foreach ($prefixes as $prefix) { - $options[$prefix . ' ' . strtolower($model)] = Str::headline($prefix); - } - - $permissions[] = self::makeSection($model, $options); + $permissionSections[] = self::makeSection($model, $options); } return $form @@ -137,12 +125,20 @@ class RoleResource extends Resource ->hidden(), Fieldset::make(trans('admin/role.permissions')) ->columns(3) - ->schema($permissions) + ->schema($permissionSections) ->hidden(fn (Get $get) => $get('name') === Role::ROOT_ADMIN), Placeholder::make('permissions') ->label(trans('admin/role.permissions')) ->content(trans('admin/role.root_admin', ['role' => Role::ROOT_ADMIN])) ->visible(fn (Get $get) => $get('name') === Role::ROOT_ADMIN), + Select::make('nodes') + ->label(trans('admin/role.nodes')) + ->multiple() + ->relationship('nodes', 'name') + ->searchable(['name', 'fqdn']) + ->preload() + ->hint(trans('admin/role.nodes_hint')) + ->hidden(fn (Get $get) => $get('name') === Role::ROOT_ADMIN), ]); } diff --git a/app/Filament/Admin/Resources/ServerResource.php b/app/Filament/Admin/Resources/ServerResource.php index 4e92a0715..ec39ab7f8 100644 --- a/app/Filament/Admin/Resources/ServerResource.php +++ b/app/Filament/Admin/Resources/ServerResource.php @@ -3,8 +3,12 @@ namespace App\Filament\Admin\Resources; use App\Filament\Admin\Resources\ServerResource\Pages; +use App\Models\Mount; use App\Models\Server; +use Filament\Forms\Components\CheckboxList; +use Filament\Forms\Get; use Filament\Resources\Resource; +use Illuminate\Database\Eloquent\Builder; class ServerResource extends Resource { @@ -31,12 +35,35 @@ class ServerResource extends Resource public static function getNavigationGroup(): ?string { - return trans('admin/dashboard.server'); + return config('panel.filament.top-navigation', false) ? null : trans('admin/dashboard.server'); } public static function getNavigationBadge(): ?string { - return static::getModel()::count() ?: null; + return (string) static::getEloquentQuery()->count() ?: null; + } + + public static function getMountCheckboxList(Get $get): CheckboxList + { + $allowedMounts = Mount::all(); + $node = $get('node_id'); + $egg = $get('egg_id'); + + if ($node && $egg) { + $allowedMounts = $allowedMounts->filter(fn (Mount $mount) => ($mount->nodes->isEmpty() || $mount->nodes->contains($node)) && + ($mount->eggs->isEmpty() || $mount->eggs->contains($egg)) + ); + } + + return CheckboxList::make('mounts') + ->label('') + ->relationship('mounts') + ->live() + ->options(fn () => $allowedMounts->mapWithKeys(fn ($mount) => [$mount->id => $mount->name])) + ->descriptions(fn () => $allowedMounts->mapWithKeys(fn ($mount) => [$mount->id => "$mount->source -> $mount->target"])) + ->helperText(fn () => $allowedMounts->isEmpty() ? trans('admin/server.no_mounts') : null) + ->bulkToggleable() + ->columnSpanFull(); } public static function getPages(): array @@ -47,4 +74,13 @@ class ServerResource extends Resource 'edit' => Pages\EditServer::route('/{record}/edit'), ]; } + + public static function getEloquentQuery(): Builder + { + $query = parent::getEloquentQuery(); + + return $query->whereHas('node', function (Builder $query) { + $query->whereIn('id', auth()->user()->accessibleNodes()->pluck('id')); + }); + } } diff --git a/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php b/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php index 6508c42f6..a58a42e48 100644 --- a/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php +++ b/app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php @@ -15,7 +15,6 @@ use Closure; use Exception; use Filament\Forms; use Filament\Forms\Components\Actions\Action; -use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\Component; use Filament\Forms\Components\Fieldset; use Filament\Forms\Components\Grid; @@ -109,14 +108,20 @@ class CreateServer extends CreateRecord ->disabledOn('edit') ->prefixIcon('tabler-server-2') ->selectablePlaceholder(false) - ->default(fn () => ($this->node = Node::query()->latest()->first())?->id) + ->default(function () { + /** @var ?Node $latestNode */ + $latestNode = auth()->user()->accessibleNodes()->latest()->first(); + $this->node = $latestNode; + + return $this->node?->id; + }) ->columnSpan([ 'default' => 1, 'sm' => 2, 'md' => 2, ]) ->live() - ->relationship('node', 'name') + ->relationship('node', 'name', fn (Builder $query) => $query->whereIn('id', auth()->user()->accessibleNodes()->pluck('id'))) ->searchable() ->preload() ->afterStateUpdated(function (Set $set, $state) { @@ -183,10 +188,7 @@ class CreateServer extends CreateRecord $set('allocation_additional', null); $set('allocation_additional.needstobeastringhere.extra_allocations', null); }) - ->getOptionLabelFromRecordUsing( - fn (Allocation $allocation) => "$allocation->ip:$allocation->port" . - ($allocation->ip_alias ? " ($allocation->ip_alias)" : '') - ) + ->getOptionLabelFromRecordUsing(fn (Allocation $allocation) => $allocation->address) ->placeholder(function (Get $get) { $node = Node::find($get('node_id')); @@ -212,7 +214,7 @@ class CreateServer extends CreateRecord ->label(trans('admin/server.ip_address'))->inlineLabel() ->helperText(trans('admin/server.ip_address_helper')) ->afterStateUpdated(fn (Set $set) => $set('allocation_ports', [])) - ->ipv4() + ->ip() ->live() ->required(), TextInput::make('allocation_alias') @@ -263,10 +265,7 @@ class CreateServer extends CreateRecord ->columnSpan(2) ->disabled(fn (Get $get) => $get('../../node_id') === null) ->searchable(['ip', 'port', 'ip_alias']) - ->getOptionLabelFromRecordUsing( - fn (Allocation $allocation) => "$allocation->ip:$allocation->port" . - ($allocation->ip_alias ? " ($allocation->ip_alias)" : '') - ) + ->getOptionLabelFromRecordUsing(fn (Allocation $allocation) => $allocation->address) ->placeholder(trans('admin/server.select_additional')) ->disableOptionsWhenSelectedInSiblingRepeaterItems() ->relationship( @@ -426,7 +425,7 @@ class CreateServer extends CreateRecord Repeater::make('server_variables') ->label('') - ->relationship('serverVariables') + ->relationship('serverVariables', fn (Builder $query) => $query->orderByPowerJoins('variable.sort')) ->saveRelationshipsBeforeChildrenUsing(null) ->saveRelationshipsUsing(null) ->grid(2) @@ -744,7 +743,7 @@ class CreateServer extends CreateRecord 'lg' => 4, ]) ->columnSpan(6) - ->schema([ + ->schema(fn (Get $get) => [ Select::make('select_image') ->label(trans('admin/server.image_name')) ->live() @@ -792,19 +791,13 @@ class CreateServer extends CreateRecord ]), KeyValue::make('docker_labels') + ->live() ->label('Container Labels') ->keyLabel(trans('admin/server.title')) ->valueLabel(trans('admin/server.description')) ->columnSpanFull(), - CheckboxList::make('mounts') - ->label('Mounts') - ->live() - ->relationship('mounts') - ->options(fn () => $this->node?->mounts->mapWithKeys(fn ($mount) => [$mount->id => $mount->name]) ?? []) - ->descriptions(fn () => $this->node?->mounts->mapWithKeys(fn ($mount) => [$mount->id => "$mount->source -> $mount->target"]) ?? []) - ->helperText(fn () => $this->node?->mounts->isNotEmpty() ? '' : 'No Mounts exist for this Node') - ->columnSpanFull(), + ServerResource::getMountCheckboxList($get), ]), ]), ]) diff --git a/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php b/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php index 11ae0aea6..d1bb332b3 100644 --- a/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php +++ b/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php @@ -2,16 +2,18 @@ namespace App\Filament\Admin\Resources\ServerResource\Pages; +use AbdelhamidErrahmouni\FilamentMonacoEditor\MonacoEditor; use App\Enums\SuspendAction; use App\Filament\Admin\Resources\ServerResource; use App\Filament\Admin\Resources\ServerResource\RelationManagers\AllocationsRelationManager; use App\Filament\Components\Forms\Actions\PreviewStartupAction; use App\Filament\Components\Forms\Actions\RotateDatabasePasswordAction; use App\Filament\Server\Pages\Console; +use App\Models\Allocation; use App\Models\Database; use App\Models\DatabaseHost; use App\Models\Egg; -use App\Models\Mount; +use App\Models\Node; use App\Models\Server; use App\Models\ServerVariable; use App\Models\User; @@ -28,8 +30,9 @@ use Closure; use Exception; use Filament\Actions; use Filament\Forms; +use Filament\Forms\Components\Actions as FormActions; use Filament\Forms\Components\Actions\Action; -use Filament\Forms\Components\CheckboxList; +use Filament\Forms\Components\Component; use Filament\Forms\Components\Fieldset; use Filament\Forms\Components\Grid; use Filament\Forms\Components\Hidden; @@ -48,10 +51,12 @@ use Filament\Forms\Get; use Filament\Forms\Set; use Filament\Notifications\Notification; use Filament\Resources\Pages\EditRecord; +use Filament\Support\Enums\Alignment; use Illuminate\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\Model; use Illuminate\Http\Client\ConnectionException; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; +use Illuminate\Support\HtmlString; use LogicException; use Webbingbrasil\FilamentCopyActions\Forms\Actions\CopyAction; @@ -59,8 +64,6 @@ class EditServer extends EditRecord { protected static string $resource = ServerResource::class; - private bool $errored = false; - private DaemonServerRepository $daemonServerRepository; public function boot(DaemonServerRepository $daemonServerRepository): void @@ -133,7 +136,39 @@ class EditServer extends EditRecord 'sm' => 1, 'md' => 1, 'lg' => 1, - ]), + ]) + ->hintAction( + Action::make('view_install_log') + ->label(trans('admin/server.view_install_log')) + //->visible(fn (Server $server) => $server->isFailedInstall()) + ->modalHeading('') + ->modalSubmitAction(false) + ->modalFooterActionsAlignment(Alignment::Right) + ->modalCancelActionLabel(trans('filament::components/modal.actions.close.label')) + ->form([ + MonacoEditor::make('logs') + ->hiddenLabel() + ->placeholderText(trans('admin/server.no_log')) + ->formatStateUsing(function (Server $server, DaemonServerRepository $serverRepository) { + try { + return $serverRepository->setServer($server)->getInstallLogs(); + } catch (ConnectionException) { + Notification::make() + ->title(trans('admin/server.notifications.error_connecting', ['node' => $server->node->name])) + ->body(trans('admin/server.notifications.log_failed')) + ->color('warning') + ->warning() + ->send(); + } catch (Exception) { + return ''; + } + + return ''; + }) + ->language('shell') + ->view('filament.plugins.monaco-editor-logs'), + ]) + ), Textarea::make('description') ->label(trans('admin/server.description')) @@ -173,7 +208,7 @@ class EditServer extends EditRecord ->maxLength(255), Select::make('node_id') ->label(trans('admin/server.node')) - ->relationship('node', 'name') + ->relationship('node', 'name', fn (Builder $query) => $query->whereIn('id', auth()->user()->accessibleNodes()->pluck('id'))) ->columnSpan([ 'default' => 2, 'sm' => 1, @@ -482,6 +517,7 @@ class EditServer extends EditRecord ]), KeyValue::make('docker_labels') + ->live() ->label(trans('admin/server.container_labels')) ->keyLabel(trans('admin/server.title')) ->valueLabel(trans('admin/server.description')) @@ -591,7 +627,7 @@ class EditServer extends EditRecord ]); } - return $query; + return $query->orderByPowerJoins('variable.sort'); }) ->grid() ->mutateRelationshipDataBeforeSaveUsing(function (array &$data): array { @@ -646,14 +682,8 @@ class EditServer extends EditRecord ]), Tab::make(trans('admin/server.mounts')) ->icon('tabler-layers-linked') - ->schema([ - CheckboxList::make('mounts') - ->label('') - ->relationship('mounts') - ->options(fn (Server $server) => $server->node->mounts->filter(fn (Mount $mount) => $mount->eggs->contains($server->egg))->mapWithKeys(fn (Mount $mount) => [$mount->id => $mount->name])) - ->descriptions(fn (Server $server) => $server->node->mounts->mapWithKeys(fn (Mount $mount) => [$mount->id => "$mount->source -> $mount->target"])) - ->helperText(fn (Server $server) => $server->node->mounts->isNotEmpty() ? '' : trans('admin/server.no_mounts')) - ->columnSpanFull(), + ->schema(fn (Get $get) => [ + ServerResource::getMountCheckboxList($get), ]), Tab::make(trans('admin/server.databases')) ->hidden(fn () => !auth()->user()->can('viewList database')) @@ -686,8 +716,8 @@ class EditServer extends EditRecord ->requiresConfirmation() ->modalIcon('tabler-database-x') ->modalHeading(trans('admin/server.delete_db_heading')) - ->modalSubmitActionLabel(fn (Get $get) => 'Delete ' . $get('database') . '?') - ->modalDescription(fn (Get $get) => trans('admin/server.delete_db') . $get('database') . '?') + ->modalSubmitActionLabel(trans('filament-actions::delete.single.label')) + ->modalDescription(fn (Get $get) => trans('admin/server.delete_db', ['name' => $get('database')])) ->action(function (DatabaseManagementService $databaseManagementService, $record) { $databaseManagementService->delete($record); $this->fillForm(); @@ -731,7 +761,7 @@ class EditServer extends EditRecord ->deletable(false) ->addable(false) ->columnSpan(4), - Forms\Components\Actions::make([ + FormActions::make([ Action::make('createDatabase') ->authorize(fn () => auth()->user()->can('create database')) ->disabled(fn () => DatabaseHost::query()->count() < 1) @@ -799,14 +829,50 @@ class EditServer extends EditRecord Grid::make() ->columnSpan(3) ->schema([ - Forms\Components\Actions::make([ + FormActions::make([ Action::make('toggleInstall') ->label(trans('admin/server.toggle_install')) ->disabled(fn (Server $server) => $server->isSuspended()) - ->action(function (ToggleInstallService $service, Server $server) { - $service->handle($server); + ->modal(fn (Server $server) => $server->isFailedInstall()) + ->modalHeading(trans('admin/server.toggle_install_failed_header')) + ->modalDescription(trans('admin/server.toggle_install_failed_desc')) + ->modalSubmitActionLabel(trans('admin/server.reinstall')) + ->action(function (ToggleInstallService $toggleService, ReinstallServerService $reinstallService, Server $server) { + if ($server->isFailedInstall()) { + try { + $reinstallService->handle($server); - $this->refreshFormData(['status', 'docker']); + Notification::make() + ->title(trans('admin/server.notifications.reinstall_started')) + ->success() + ->send(); + + $this->refreshFormData(['status', 'docker']); + } catch (Exception) { + Notification::make() + ->title(trans('admin/server.notifications.reinstall_failed')) + ->body(trans('admin/server.notifications.error_connecting', ['node' => $server->node->name])) + ->danger() + ->send(); + } + } else { + try { + $toggleService->handle($server); + + Notification::make() + ->title(trans('admin/server.notifications.install_toggled')) + ->success() + ->send(); + + $this->refreshFormData(['status', 'docker']); + } catch (Exception $exception) { + Notification::make() + ->title(trans('admin/server.notifications.install_toggle_failed')) + ->body($exception->getMessage()) + ->danger() + ->send(); + } + } }), ])->fullWidth(), ToggleButtons::make('') @@ -815,7 +881,7 @@ class EditServer extends EditRecord Grid::make() ->columnSpan(3) ->schema([ - Forms\Components\Actions::make([ + FormActions::make([ Action::make('toggleSuspend') ->label(trans('admin/server.suspend')) ->color('warning') @@ -823,12 +889,20 @@ class EditServer extends EditRecord ->action(function (SuspensionService $suspensionService, Server $server) { try { $suspensionService->handle($server, SuspendAction::Suspend); - } catch (\Exception $exception) { - Notification::make()->warning()->title(trans('admin/server.notifications.server_suspension'))->body($exception->getMessage())->send(); - } - Notification::make()->success()->title(trans('admin/server.notifications.server_suspended'))->send(); - $this->refreshFormData(['status', 'docker']); + Notification::make() + ->success() + ->title(trans('admin/server.notifications.server_suspended')) + ->send(); + + $this->refreshFormData(['status', 'docker']); + } catch (Exception) { + Notification::make() + ->warning() + ->title(trans('admin/server.notifications.server_suspension')) + ->body(trans('admin/server.notifications.error_connecting', ['node' => $server->node->name])) + ->send(); + } }), Action::make('toggleUnsuspend') ->label(trans('admin/server.unsuspend')) @@ -837,12 +911,20 @@ class EditServer extends EditRecord ->action(function (SuspensionService $suspensionService, Server $server) { try { $suspensionService->handle($server, SuspendAction::Unsuspend); - } catch (\Exception $exception) { - Notification::make()->warning()->title(trans('admin/server.notifications.server_suspension'))->body($exception->getMessage())->send(); - } - Notification::make()->success()->title(trans('admin/server.notifications.server_unsuspended'))->send(); - $this->refreshFormData(['status', 'docker']); + Notification::make() + ->success() + ->title(trans('admin/server.notifications.server_unsuspended')) + ->send(); + + $this->refreshFormData(['status', 'docker']); + } catch (Exception) { + Notification::make() + ->warning() + ->title(trans('admin/server.notifications.server_suspension')) + ->body(trans('admin/server.notifications.error_connecting', ['node' => $server->node->name])) + ->send(); + } }), ])->fullWidth(), ToggleButtons::make('') @@ -855,42 +937,36 @@ class EditServer extends EditRecord Grid::make() ->columnSpan(3) ->schema([ - Forms\Components\Actions::make([ + FormActions::make([ Action::make('transfer') ->label(trans('admin/server.transfer')) - // ->action(fn (TransferServerService $transfer, Server $server) => $transfer->handle($server, [])) - ->disabled() //TODO! - ->form([ //TODO! - Select::make('newNode') - ->label('New Node') - ->required() - ->options([ - true => 'on', - false => 'off', - ]), - Select::make('newMainAllocation') - ->label('New Main Allocation') - ->required() - ->options([ - true => 'on', - false => 'off', - ]), - Select::make('newAdditionalAllocation') - ->label('New Additional Allocations') - ->options([ - true => 'on', - false => 'off', - ]), - ]) - ->modalheading(trans('admin/server.transfer')), + ->disabled(fn (Server $server) => Node::count() <= 1 || $server->isInConflictState()) + ->modalheading(trans('admin/server.transfer')) + ->form($this->transferServer()) + ->action(function (TransferServerService $transfer, Server $server, $data) { + try { + $transfer->handle($server, Arr::get($data, 'node_id'), Arr::get($data, 'allocation_id'), Arr::get($data, 'allocation_additional', [])); + + Notification::make() + ->title('Transfer started') + ->success() + ->send(); + } catch (Exception $exception) { + Notification::make() + ->title('Transfer failed') + ->body($exception->getMessage()) + ->danger() + ->send(); + } + }), ])->fullWidth(), ToggleButtons::make('') - ->hint(trans('admin/server.transfer_help')), + ->hint(new HtmlString(trans('admin/server.transfer_help'))), ]), Grid::make() ->columnSpan(3) ->schema([ - Forms\Components\Actions::make([ + FormActions::make([ Action::make('reinstall') ->label(trans('admin/server.reinstall')) ->color('danger') @@ -898,7 +974,24 @@ class EditServer extends EditRecord ->modalHeading(trans('admin/server.reinstall_modal_heading')) ->modalDescription(trans('admin/server.reinstall_modal_description')) ->disabled(fn (Server $server) => $server->isSuspended()) - ->action(fn (ReinstallServerService $service, Server $server) => $service->handle($server)), + ->action(function (ReinstallServerService $service, Server $server) { + try { + $service->handle($server); + + Notification::make() + ->title(trans('admin/server.notifications.reinstall_started')) + ->success() + ->send(); + + $this->refreshFormData(['status', 'docker']); + } catch (Exception) { + Notification::make() + ->title(trans('admin/server.notifications.reinstall_failed')) + ->body(trans('admin/server.notifications.error_connecting', ['node' => $server->node->name])) + ->danger() + ->send(); + } + }), ])->fullWidth(), ToggleButtons::make('') ->hint(trans('admin/server.reinstall_help')), @@ -909,32 +1002,86 @@ class EditServer extends EditRecord ]); } - protected function transferServer(Form $form): Form + /** @return Component[] */ + protected function transferServer(): array { - return $form - ->columns() - ->schema([ - Select::make('toNode') - ->label('New Node'), - TextInput::make('newAllocation') - ->label('Allocation'), - ]); - + return [ + Select::make('node_id') + ->label(trans('admin/server.node')) + ->prefixIcon('tabler-server-2') + ->selectablePlaceholder(false) + ->default(fn (Server $server) => Node::whereNot('id', $server->node->id)->first()?->id) + ->required() + ->live() + ->options(fn (Server $server) => Node::whereNot('id', $server->node->id)->pluck('name', 'id')->all()), + Select::make('allocation_id') + ->label(trans('admin/server.primary_allocation')) + ->required() + ->prefixIcon('tabler-network') + ->disabled(fn (Get $get) => !$get('node_id')) + ->options(fn (Get $get) => Allocation::where('node_id', $get('node_id'))->whereNull('server_id')->get()->mapWithKeys(fn (Allocation $allocation) => [$allocation->id => $allocation->address])) + ->searchable(['ip', 'port', 'ip_alias']) + ->placeholder(trans('admin/server.select_allocation')), + Select::make('allocation_additional') + ->label(trans('admin/server.additional_allocations')) + ->multiple() + ->prefixIcon('tabler-network') + ->disabled(fn (Get $get) => !$get('node_id')) + ->options(fn (Get $get) => Allocation::where('node_id', $get('node_id'))->whereNull('server_id')->when($get('allocation_id'), fn ($query) => $query->whereNot('id', $get('allocation_id')))->get()->mapWithKeys(fn (Allocation $allocation) => [$allocation->id => $allocation->address])) + ->searchable(['ip', 'port', 'ip_alias']) + ->placeholder(trans('admin/server.select_additional')), + ]; } protected function getHeaderActions(): array { + /** @var Server $server */ + $server = $this->getRecord(); + + $canForceDelete = cache()->get("servers.$server->uuid.canForceDelete", false); + return [ Actions\Action::make('Delete') - ->successRedirectUrl(route('filament.admin.resources.servers.index')) ->color('danger') - ->label(trans('filament-actions::delete.single.modal.actions.delete.label')) + ->label(trans('filament-actions::delete.single.label')) + ->modalHeading(trans('filament-actions::delete.single.modal.heading', ['label' => $this->getRecordTitle()])) + ->modalSubmitActionLabel(trans('filament-actions::delete.single.label')) ->requiresConfirmation() ->action(function (Server $server, ServerDeletionService $service) { - $service->handle($server); + try { + $service->handle($server); - return redirect(ListServers::getUrl(panel: 'admin')); + return redirect(ListServers::getUrl(panel: 'admin')); + } catch (ConnectionException) { + cache()->put("servers.$server->uuid.canForceDelete", true, now()->addMinutes(5)); + + Notification::make() + ->title(trans('admin/server.notifications.error_server_delete')) + ->body(trans('admin/server.notifications.error_server_delete_body')) + ->color('warning') + ->icon('tabler-database') + ->warning() + ->send(); + } }) + ->hidden(fn () => $canForceDelete) + ->authorize(fn (Server $server) => auth()->user()->can('delete server', $server)), + Actions\Action::make('ForceDelete') + ->color('danger') + ->label(trans('filament-actions::force-delete.single.label')) + ->modalHeading(trans('filament-actions::force-delete.single.modal.heading', ['label' => $this->getRecordTitle()])) + ->modalSubmitActionLabel(trans('filament-actions::force-delete.single.label')) + ->requiresConfirmation() + ->action(function (Server $server, ServerDeletionService $service) { + try { + $service->withForce()->handle($server); + + return redirect(ListServers::getUrl(panel: 'admin')); + } catch (ConnectionException) { + cache()->forget("servers.$server->uuid.canForceDelete"); + } + }) + ->visible(fn () => $canForceDelete) ->authorize(fn (Server $server) => auth()->user()->can('delete server', $server)), Actions\Action::make('console') ->label(trans('admin/server.console')) @@ -956,44 +1103,37 @@ class EditServer extends EditRecord $data['description'] = ''; } - unset($data['docker'], $data['status']); + unset($data['docker'], $data['status'], $data['allocation_id']); return $data; } - protected function handleRecordUpdate(Model $record, array $data): Model + protected function afterSave(): void { - if (!$record instanceof Server) { - return $record; - } + /** @var Server $server */ + $server = $this->record; - /** @var Server $record */ - $record = parent::handleRecordUpdate($record, $data); + $changed = collect($server->getChanges())->except(['updated_at', 'name', 'owner_id', 'condition', 'description', 'external_id', 'tags', 'cpu_pinning', 'allocation_limit', 'database_limit', 'backup_limit', 'skip_scripts'])->all(); try { - $this->daemonServerRepository->setServer($record)->sync(); + if ($changed) { + $this->daemonServerRepository->setServer($server)->sync(); + } + parent::getSavedNotification()?->send(); } catch (ConnectionException) { - $this->errored = true; - Notification::make() - ->title(trans('admin/server.notifications.error_connecting', ['node' => $record->node->name])) + ->title(trans('admin/server.notifications.error_connecting', ['node' => $server->node->name])) ->body(trans('admin/server.notifications.error_connecting_description')) ->color('warning') ->icon('tabler-database') ->warning() ->send(); } - - return $record; } protected function getSavedNotification(): ?Notification { - if ($this->errored) { - return null; - } - - return parent::getSavedNotification(); + return null; } public function getRelationManagers(): array diff --git a/app/Filament/Admin/Resources/ServerResource/RelationManagers/AllocationsRelationManager.php b/app/Filament/Admin/Resources/ServerResource/RelationManagers/AllocationsRelationManager.php index ab5975dbc..14ca71d1d 100644 --- a/app/Filament/Admin/Resources/ServerResource/RelationManagers/AllocationsRelationManager.php +++ b/app/Filament/Admin/Resources/ServerResource/RelationManagers/AllocationsRelationManager.php @@ -12,14 +12,17 @@ use Filament\Forms\Components\TextInput; use Filament\Forms\Get; use Filament\Forms\Set; use Filament\Resources\RelationManagers\RelationManager; -use Filament\Tables; +use Filament\Support\Exceptions\Halt; use Filament\Tables\Actions\Action; use Filament\Tables\Actions\AssociateAction; use Filament\Tables\Actions\CreateAction; +use Filament\Tables\Actions\DissociateAction; +use Filament\Tables\Actions\DissociateBulkAction; use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextInputColumn; use Filament\Tables\Table; +use Illuminate\Database\Eloquent\Collection; /** * @method Server getOwnerRecord() @@ -32,15 +35,18 @@ class AllocationsRelationManager extends RelationManager { return $table ->selectCurrentPageOnly() - ->recordTitleAttribute('ip') - ->recordTitle(fn (Allocation $allocation) => "$allocation->ip:$allocation->port") + ->recordTitleAttribute('address') + ->recordTitle(fn (Allocation $allocation) => $allocation->address) ->checkIfRecordIsSelectableUsing(fn (Allocation $record) => $record->id !== $this->getOwnerRecord()->allocation_id) ->inverseRelationship('server') ->heading(trans('admin/server.allocations')) ->columns([ - TextColumn::make('ip')->label(trans('admin/server.ip_address')), - TextColumn::make('port')->label(trans('admin/server.port')), - TextInputColumn::make('ip_alias')->label(trans('admin/server.alias')), + TextColumn::make('ip') + ->label(trans('admin/server.ip_address')), + TextColumn::make('port') + ->label(trans('admin/server.port')), + TextInputColumn::make('ip_alias') + ->label(trans('admin/server.alias')), IconColumn::make('primary') ->icon(fn ($state) => match ($state) { true => 'tabler-star-filled', @@ -56,8 +62,11 @@ class AllocationsRelationManager extends RelationManager ]) ->actions([ Action::make('make-primary') + ->label(trans('admin/server.make_primary')) ->action(fn (Allocation $allocation) => $this->getOwnerRecord()->update(['allocation_id' => $allocation->id]) && $this->deselectAllTableRecords()) - ->label(fn (Allocation $allocation) => $allocation->id === $this->getOwnerRecord()->allocation_id ? '' : trans('admin/server.make_primary')), + ->hidden(fn (Allocation $allocation) => $allocation->id === $this->getOwnerRecord()->allocation_id), + DissociateAction::make() + ->hidden(fn (Allocation $allocation) => $allocation->id === $this->getOwnerRecord()->allocation_id), ]) ->headerActions([ CreateAction::make()->label(trans('admin/server.create_allocation')) @@ -67,7 +76,8 @@ class AllocationsRelationManager extends RelationManager ->options(collect($this->getOwnerRecord()->node->ipAddresses())->mapWithKeys(fn (string $ip) => [$ip => $ip])) ->label(trans('admin/server.ip_address')) ->inlineLabel() - ->ipv4() + ->ip() + ->live() ->afterStateUpdated(fn (Set $set) => $set('allocation_ports', [])) ->required(), TextInput::make('allocation_alias') @@ -81,9 +91,8 @@ class AllocationsRelationManager extends RelationManager ->label(trans('admin/server.ports')) ->inlineLabel() ->live() - ->afterStateUpdated(fn ($state, Set $set, Get $get) => $set('allocation_ports', - CreateServer::retrieveValidPorts($this->getOwnerRecord()->node, $state, $get('allocation_ip'))) - ) + ->disabled(fn (Get $get) => empty($get('allocation_ip'))) + ->afterStateUpdated(fn ($state, Set $set, Get $get) => $set('allocation_ports', CreateServer::retrieveValidPorts($this->getOwnerRecord()->node, $state, $get('allocation_ip')))) ->splitKeys(['Tab', ' ', ',']) ->required(), ]) @@ -96,10 +105,21 @@ class AllocationsRelationManager extends RelationManager ->recordSelectSearchColumns(['ip', 'port']) ->label(trans('admin/server.add_allocation')), ]) - ->bulkActions([ - Tables\Actions\BulkActionGroup::make([ - Tables\Actions\DissociateBulkAction::make(), - ]), + ->groupedBulkActions([ + DissociateBulkAction::make() + ->before(function (DissociateBulkAction $action, Collection $records) { + $records = $records->filter(function ($allocation) { + /** @var Allocation $allocation */ + return $allocation->id !== $this->getOwnerRecord()->allocation_id; + }); + + if ($records->isEmpty()) { + $action->failureNotificationTitle(trans('admin/server.notifications.dissociate_primary'))->failure(); + throw new Halt(); + } + + return $records; + }), ]); } } diff --git a/app/Filament/Admin/Resources/UserResource.php b/app/Filament/Admin/Resources/UserResource.php index 3291481a6..04bb45a43 100644 --- a/app/Filament/Admin/Resources/UserResource.php +++ b/app/Filament/Admin/Resources/UserResource.php @@ -6,6 +6,7 @@ use App\Filament\Admin\Resources\UserResource\Pages; use App\Filament\Admin\Resources\UserResource\RelationManagers; use App\Models\Role; use App\Models\User; +use Filament\Facades\Filament; use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\TextInput; use Filament\Forms\Form; @@ -17,6 +18,7 @@ use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; +use Illuminate\Database\Eloquent\Builder; class UserResource extends Resource { @@ -43,7 +45,7 @@ class UserResource extends Resource public static function getNavigationGroup(): ?string { - return trans('admin/dashboard.user'); + return config('panel.filament.top-navigation', false) ? null : trans('admin/dashboard.user'); } public static function getNavigationBadge(): ?string @@ -58,8 +60,9 @@ class UserResource extends Resource ImageColumn::make('picture') ->visibleFrom('lg') ->label('') - ->extraImgAttributes(['class' => 'rounded-full']) - ->defaultImageUrl(fn (User $user) => 'https://gravatar.com/avatar/' . md5(strtolower($user->email))), + ->circular() + ->alignCenter() + ->defaultImageUrl(fn (User $user) => Filament::getUserAvatarUrl($user)), TextColumn::make('username') ->label(trans('admin/user.username')), TextColumn::make('email') @@ -120,17 +123,26 @@ class UserResource extends Resource ->hintIconTooltip(fn ($operation) => $operation === 'create' ? trans('admin/user.password_help') : null) ->password(), CheckboxList::make('roles') - ->disableOptionWhen(fn (string $value): bool => $value == Role::getRootAdmin()->id) - ->relationship('roles', 'name') - ->saveRelationshipsUsing(function (User $user, array $state) { - $roles = collect($state)->map(fn ($role) => Role::findById($role))->filter(fn ($role) => $role->id !== Role::getRootAdmin()->id); - - $user->syncRoles($roles); - }) + ->hidden(fn (User $user) => $user->isRootAdmin()) + ->relationship('roles', 'name', fn (Builder $query) => $query->whereNot('id', Role::getRootAdmin()->id)) + ->saveRelationshipsUsing(fn (User $user, array $state) => $user->syncRoles(collect($state)->map(fn ($role) => Role::findById($role)))) ->dehydrated() ->label(trans('admin/user.admin_roles')) ->columnSpanFull() ->bulkToggleable(false), + CheckboxList::make('root_admin_role') + ->visible(fn (User $user) => $user->isRootAdmin()) + ->disabled() + ->options([ + 'root_admin' => Role::ROOT_ADMIN, + ]) + ->descriptions([ + 'root_admin' => trans('admin/role.root_admin', ['role' => Role::ROOT_ADMIN]), + ]) + ->formatStateUsing(fn () => ['root_admin']) + ->dehydrated(false) + ->label(trans('admin/user.admin_roles')) + ->columnSpanFull(), ]); } diff --git a/app/Filament/Admin/Resources/UserResource/Pages/CreateUser.php b/app/Filament/Admin/Resources/UserResource/Pages/CreateUser.php index 44fdbdb1f..8666d31a2 100644 --- a/app/Filament/Admin/Resources/UserResource/Pages/CreateUser.php +++ b/app/Filament/Admin/Resources/UserResource/Pages/CreateUser.php @@ -33,6 +33,13 @@ class CreateUser extends CreateRecord return []; } + protected function prepareForValidation($attributes): array + { + $attributes['data']['email'] = mb_strtolower($attributes['data']['email']); + + return $attributes; + } + protected function handleRecordCreation(array $data): Model { $data['root_admin'] = false; diff --git a/app/Filament/Admin/Widgets/CanaryWidget.php b/app/Filament/Admin/Widgets/CanaryWidget.php new file mode 100644 index 000000000..80e4c07f8 --- /dev/null +++ b/app/Filament/Admin/Widgets/CanaryWidget.php @@ -0,0 +1,32 @@ + [ + CreateAction::make() + ->label(trans('admin/dashboard.sections.intro-developers.button_issues')) + ->icon('tabler-brand-github') + ->url('https://github.com/pelican-dev/panel/issues', true), + ], + ]; + } +} diff --git a/app/Filament/Admin/Widgets/HelpWidget.php b/app/Filament/Admin/Widgets/HelpWidget.php new file mode 100644 index 000000000..97be7b1e6 --- /dev/null +++ b/app/Filament/Admin/Widgets/HelpWidget.php @@ -0,0 +1,27 @@ + [ + CreateAction::make() + ->label(trans('admin/dashboard.sections.intro-help.button_docs')) + ->icon('tabler-speedboat') + ->url('https://pelican.dev/docs', true), + ], + ]; + } +} diff --git a/app/Filament/Admin/Widgets/NoNodesWidget.php b/app/Filament/Admin/Widgets/NoNodesWidget.php new file mode 100644 index 000000000..bf4e75dbc --- /dev/null +++ b/app/Filament/Admin/Widgets/NoNodesWidget.php @@ -0,0 +1,34 @@ + [ + CreateAction::make() + ->label(trans('admin/dashboard.sections.intro-first-node.button_label')) + ->icon('tabler-server-2') + ->url(CreateNode::getUrl()), + ], + ]; + } +} diff --git a/app/Filament/Admin/Widgets/SupportWidget.php b/app/Filament/Admin/Widgets/SupportWidget.php new file mode 100644 index 000000000..c9eff0b7c --- /dev/null +++ b/app/Filament/Admin/Widgets/SupportWidget.php @@ -0,0 +1,28 @@ + [ + CreateAction::make() + ->label(trans('admin/dashboard.sections.intro-support.button_donate')) + ->icon('tabler-cash') + ->url('https://pelican.dev/donate', true) + ->color('success'), + ], + ]; + } +} diff --git a/app/Filament/Admin/Widgets/UpdateWidget.php b/app/Filament/Admin/Widgets/UpdateWidget.php new file mode 100644 index 000000000..95ad87e61 --- /dev/null +++ b/app/Filament/Admin/Widgets/UpdateWidget.php @@ -0,0 +1,39 @@ +softwareVersionService = $softwareVersionService; + } + + public function getViewData(): array + { + return [ + 'version' => $this->softwareVersionService->currentPanelVersion(), + 'latestVersion' => $this->softwareVersionService->latestPanelVersion(), + 'isLatest' => $this->softwareVersionService->isLatestPanel(), + 'actions' => [ + CreateAction::make() + ->label(trans('admin/dashboard.sections.intro-update-available.heading')) + ->icon('tabler-clipboard-text') + ->url('https://pelican.dev/docs/panel/update', true) + ->color('warning'), + ], + ]; + } +} diff --git a/app/Filament/App/Resources/ServerResource/Pages/ListServers.php b/app/Filament/App/Resources/ServerResource/Pages/ListServers.php index 2f9ff8fd9..66651ab56 100644 --- a/app/Filament/App/Resources/ServerResource/Pages/ListServers.php +++ b/app/Filament/App/Resources/ServerResource/Pages/ListServers.php @@ -2,52 +2,179 @@ namespace App\Filament\App\Resources\ServerResource\Pages; +use App\Enums\ServerResourceType; use App\Filament\App\Resources\ServerResource; use App\Filament\Components\Tables\Columns\ServerEntryColumn; use App\Filament\Server\Pages\Console; +use App\Models\Permission; use App\Models\Server; +use App\Repositories\Daemon\DaemonPowerRepository; +use AymanAlhattami\FilamentContextMenu\Columns\ContextMenuTextColumn; +use Filament\Notifications\Notification; use Filament\Resources\Components\Tab; use Filament\Resources\Pages\ListRecords; +use Filament\Tables\Actions\Action; +use Filament\Tables\Columns\ColumnGroup; use Filament\Tables\Columns\Layout\Stack; +use Filament\Tables\Columns\TextColumn; use Filament\Tables\Filters\SelectFilter; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Http\Client\ConnectionException; +use Livewire\Attributes\On; class ListServers extends ListRecords { protected static string $resource = ServerResource::class; + public const DANGER_THRESHOLD = 0.9; + + public const WARNING_THRESHOLD = 0.7; + + private DaemonPowerRepository $daemonPowerRepository; + + public function boot(): void + { + $this->daemonPowerRepository = new DaemonPowerRepository(); + } + public function table(Table $table): Table { $baseQuery = auth()->user()->accessibleServers(); + $menuOptions = function (Server $server) { + $status = $server->retrieveStatus(); + + return [ + Action::make('start') + ->color('primary') + ->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_START, $server)) + ->visible(fn () => $status->isStartable()) + ->dispatch('powerAction', ['server' => $server, 'action' => 'start']) + ->icon('tabler-player-play-filled'), + Action::make('restart') + ->color('gray') + ->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_RESTART, $server)) + ->visible(fn () => $status->isRestartable()) + ->dispatch('powerAction', ['server' => $server, 'action' => 'restart']) + ->icon('tabler-refresh'), + Action::make('stop') + ->color('danger') + ->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_STOP, $server)) + ->visible(fn () => $status->isStoppable()) + ->dispatch('powerAction', ['server' => $server, 'action' => 'stop']) + ->icon('tabler-player-stop-filled'), + Action::make('kill') + ->color('danger') + ->tooltip('This can result in data corruption and/or data loss!') + ->dispatch('powerAction', ['server' => $server, 'action' => 'kill']) + ->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_STOP, $server)) + ->visible(fn () => $status->isKillable()) + ->icon('tabler-alert-square'), + ]; + }; + + $viewOne = [ + ContextMenuTextColumn::make('condition') + ->label('') + ->default('unknown') + ->wrap() + ->badge() + ->alignCenter() + ->tooltip(fn (Server $server) => $server->formatResource('uptime', type: ServerResourceType::Time)) + ->icon(fn (Server $server) => $server->condition->getIcon()) + ->color(fn (Server $server) => $server->condition->getColor()) + ->contextMenuActions($menuOptions) + ->enableContextMenu(fn (Server $server) => !$server->isInConflictState()), + ]; + + $viewTwo = [ + ContextMenuTextColumn::make('name') + ->label('') + ->size('md') + ->searchable() + ->contextMenuActions($menuOptions) + ->enableContextMenu(fn (Server $server) => !$server->isInConflictState()), + ContextMenuTextColumn::make('allocation.address') + ->label('') + ->badge() + ->copyable(request()->isSecure()) + ->contextMenuActions($menuOptions) + ->enableContextMenu(fn (Server $server) => !$server->isInConflictState()), + ]; + + $viewThree = [ + TextColumn::make('cpuUsage') + ->label('') + ->icon('tabler-cpu') + ->tooltip(fn (Server $server) => 'Usage Limit: ' . $server->formatResource('cpu', limit: true, type: ServerResourceType::Percentage, precision: 0)) + ->state(fn (Server $server) => $server->formatResource('cpu_absolute', type: ServerResourceType::Percentage)) + ->color(fn (Server $server) => $this->getResourceColor($server, 'cpu')), + TextColumn::make('memoryUsage') + ->label('') + ->icon('tabler-memory') + ->tooltip(fn (Server $server) => 'Usage Limit: ' . $server->formatResource('memory', limit: true)) + ->state(fn (Server $server) => $server->formatResource('memory_bytes')) + ->color(fn (Server $server) => $this->getResourceColor($server, 'memory')), + TextColumn::make('diskUsage') + ->label('') + ->icon('tabler-device-floppy') + ->tooltip(fn (Server $server) => 'Usage Limit: ' . $server->formatResource('disk', limit: true)) + ->state(fn (Server $server) => $server->formatResource('disk_bytes')) + ->color(fn (Server $server) => $this->getResourceColor($server, 'disk')), + ]; + return $table ->paginated(false) ->query(fn () => $baseQuery) ->poll('15s') - ->columns([ - Stack::make([ - ServerEntryColumn::make('server_entry') - ->searchable(['name']), - ]), - ]) + ->columns( + (auth()->user()->getCustomization()['dashboard_layout'] ?? 'grid') === 'grid' + ? [ + Stack::make([ + ServerEntryColumn::make('server_entry') + ->searchable(['name']), + ]), + ] + : [ + ColumnGroup::make('Status') + ->label('Status') + ->columns($viewOne), + ColumnGroup::make('Server') + ->label('Servers') + ->columns($viewTwo), + ColumnGroup::make('Resources') + ->label('Resources') + ->columns($viewThree), + ] + ) + ->recordUrl(fn (Server $server) => Console::getUrl(panel: 'server', tenant: $server)) ->contentGrid([ 'default' => 1, 'md' => 2, ]) - ->recordUrl(fn (Server $server) => Console::getUrl(panel: 'server', tenant: $server)) ->emptyStateIcon('tabler-brand-docker') ->emptyStateDescription('') - ->emptyStateHeading('You don\'t have access to any servers!') + ->emptyStateHeading(fn () => $this->activeTab === 'my' ? 'You don\'t own any servers!' : 'You don\'t have access to any servers!') ->persistFiltersInSession() ->filters([ SelectFilter::make('egg') ->relationship('egg', 'name', fn (Builder $query) => $query->whereIn('id', $baseQuery->pluck('egg_id'))) ->searchable() ->preload(), + SelectFilter::make('owner') + ->relationship('user', 'username', fn (Builder $query) => $query->whereIn('id', $baseQuery->pluck('owner_id'))) + ->searchable() + ->hidden(fn () => $this->activeTab === 'my') + ->preload(), ]); } + public function updatedActiveTab(): void + { + $this->resetTable(); + } + public function getTabs(): array { $all = auth()->user()->accessibleServers(); @@ -67,4 +194,71 @@ class ListServers extends ListRecords ->badge($all->count()), ]; } + + public function getResourceColor(Server $server, string $resource): ?string + { + $current = null; + $limit = null; + + switch ($resource) { + case 'cpu': + $current = $server->resources()['cpu_absolute'] ?? 0; + $limit = $server->cpu; + if ($server->cpu === 0) { + return null; + } + break; + + case 'memory': + $current = $server->resources()['memory_bytes'] ?? 0; + $limit = $server->memory * 2 ** 20; + if ($server->memory === 0) { + return null; + } + break; + + case 'disk': + $current = $server->resources()['disk_bytes'] ?? 0; + $limit = $server->disk * 2 ** 20; + if ($server->disk === 0) { + return null; + } + break; + + default: + return null; + } + + if ($current >= $limit * self::DANGER_THRESHOLD) { + return 'danger'; + } + + if ($current >= $limit * self::WARNING_THRESHOLD) { + return 'warning'; + } + + return null; + + } + + #[On('powerAction')] + public function powerAction(Server $server, string $action): void + { + try { + $this->daemonPowerRepository->setServer($server)->send($action); + + Notification::make() + ->title('Power Action') + ->body($action . ' sent to ' . $server->name) + ->success() + ->send(); + + $this->redirect(self::getUrl(['activeTab' => $this->activeTab])); + } catch (ConnectionException) { + Notification::make() + ->title(trans('exceptions.node.error_connecting', ['node' => $server->node->name])) + ->danger() + ->send(); + } + } } diff --git a/app/Filament/Components/Forms/Fields/CopyFrom.php b/app/Filament/Components/Forms/Fields/CopyFrom.php index 40463f2f6..6e74ba2ce 100644 --- a/app/Filament/Components/Forms/Fields/CopyFrom.php +++ b/app/Filament/Components/Forms/Fields/CopyFrom.php @@ -17,6 +17,12 @@ class CopyFrom extends Select $this->placeholder(trans('admin/egg.none')); + $this->preload(); + + $this->searchable(); + + $this->native(false); + $this->live(); } diff --git a/app/Filament/Pages/Auth/EditProfile.php b/app/Filament/Pages/Auth/EditProfile.php index 107a520a0..362812dfe 100644 --- a/app/Filament/Pages/Auth/EditProfile.php +++ b/app/Filament/Pages/Auth/EditProfile.php @@ -19,6 +19,7 @@ use chillerlan\QRCode\QROptions; use DateTimeZone; use Filament\Forms\Components\Actions; use Filament\Forms\Components\Actions\Action; +use Filament\Forms\Components\FileUpload; use Filament\Forms\Components\Grid; use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\Repeater; @@ -29,6 +30,7 @@ use Filament\Forms\Components\Tabs\Tab; use Filament\Forms\Components\TagsInput; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\ToggleButtons; use Filament\Forms\Get; use Filament\Notifications\Notification; use Filament\Pages\Auth\EditProfile as BaseEditProfile; @@ -38,6 +40,7 @@ use Filament\Support\Exceptions\Halt; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Facades\Storage; use Illuminate\Support\HtmlString; use Illuminate\Validation\Rules\Password; use Laravel\Socialite\Facades\Socialite; @@ -125,6 +128,21 @@ class EditProfile extends BaseEditProfile ->helperText(fn ($state, LanguageService $languageService) => new HtmlString($languageService->isLanguageTranslated($state) ? '' : trans('profile.language_help', ['state' => $state]))) ->options(fn (LanguageService $languageService) => $languageService->getAvailableLanguages()) ->native(false), + FileUpload::make('avatar') + ->visible(fn () => config('panel.filament.uploadable-avatars')) + ->avatar() + ->acceptedFileTypes(['image/png']) + ->directory('avatars') + ->getUploadedFileNameForStorageUsing(fn () => $this->getUser()->id . '.png') + ->hintAction(function (FileUpload $fileUpload) { + $path = $fileUpload->getDirectory() . '/' . $this->getUser()->id . '.png'; + + return Action::make('remove_avatar') + ->icon('tabler-photo-minus') + ->iconButton() + ->hidden(fn () => !$fileUpload->getDisk()->exists($path)) + ->action(fn () => $fileUpload->getDisk()->delete($path)); + }), ]), Tab::make(trans('profile.tabs.oauth')) @@ -242,6 +260,7 @@ class EditProfile extends BaseEditProfile ->password(), ]; }), + Tab::make(trans('profile.tabs.api_keys')) ->icon('tabler-key') ->schema([ @@ -261,7 +280,7 @@ class EditProfile extends BaseEditProfile Action::make('Create') ->label(trans('filament-actions::create.single.modal.actions.create.label')) ->disabled(fn (Get $get) => $get('description') === null) - ->successRedirectUrl(self::getUrl(['tab' => '-api-keys-tab'])) + ->successRedirectUrl(self::getUrl(['tab' => '-api-keys-tab'], panel: 'app')) ->action(function (Get $get, Action $action, User $user) { $token = $user->createToken( $get('description'), @@ -308,9 +327,11 @@ class EditProfile extends BaseEditProfile ]), ]), ]), + Tab::make(trans('profile.tabs.ssh_keys')) ->icon('tabler-lock-code') ->hidden(), + Tab::make(trans('profile.tabs.activity')) ->icon('tabler-history') ->schema([ @@ -325,6 +346,105 @@ class EditProfile extends BaseEditProfile Placeholder::make('activity!')->label('')->content(fn (ActivityLog $log) => new HtmlString($log->htmlable())), ]), ]), + + Tab::make(trans('profile.tabs.customization')) + ->icon('tabler-adjustments') + ->schema([ + Section::make(trans('profile.dashboard')) + ->collapsible() + ->icon('tabler-dashboard') + ->schema([ + ToggleButtons::make('dashboard_layout') + ->label(trans('profile.dashboard_layout')) + ->inline() + ->required() + ->options([ + 'grid' => trans('profile.grid'), + 'table' => trans('profile.table'), + ]), + ]), + Section::make(trans('profile.console')) + ->collapsible() + ->icon('tabler-brand-tabler') + ->columns(4) + ->schema([ + TextInput::make('console_font_size') + ->label(trans('profile.font_size')) + ->columnSpan(1) + ->minValue(1) + ->numeric() + ->required() + ->default(14), + Select::make('console_font') + ->label(trans('profile.font')) + ->required() + ->options(function () { + $fonts = [ + 'monospace' => 'monospace', //default + ]; + + if (!Storage::disk('public')->exists('fonts')) { + Storage::disk('public')->makeDirectory('fonts'); + $this->fillForm(); + } + + foreach (Storage::disk('public')->allFiles('fonts') as $file) { + $fileInfo = pathinfo($file); + + if ($fileInfo['extension'] === 'ttf') { + $fonts[$fileInfo['filename']] = $fileInfo['filename']; + } + } + + return $fonts; + }) + ->reactive() + ->default('monospace') + ->afterStateUpdated(fn ($state, callable $set) => $set('font_preview', $state)), + Placeholder::make('font_preview') + ->label(trans('profile.font_preview')) + ->columnSpan(2) + ->content(function (Get $get) { + $fontName = $get('console_font') ?? 'monospace'; + $fontSize = $get('console_font_size') . 'px'; + $fontUrl = asset("storage/fonts/{$fontName}.ttf"); + + return new HtmlString(<< + @font-face { + font-family: "CustomPreviewFont"; + src: url("$fontUrl"); + } + .preview-text { + font-family: "CustomPreviewFont"; + font-size: $fontSize; + margin-top: 10px; + display: block; + } + + The quick blue pelican jumps over the lazy pterodactyl. :) + HTML); + }), + TextInput::make('console_graph_period') + ->label(trans('profile.graph_period')) + ->suffix(trans('profile.seconds')) + ->hintIcon('tabler-question-mark') + ->hintIconTooltip(trans('profile.graph_period_helper')) + ->columnSpan(2) + ->numeric() + ->default(30) + ->minValue(10) + ->maxValue(120) + ->required(), + TextInput::make('console_rows') + ->label(trans('profile.rows')) + ->minValue(1) + ->numeric() + ->required() + ->columnSpan(2) + ->default(30), + ]), + ]), ]), ]) ->operation('edit') @@ -345,7 +465,7 @@ class EditProfile extends BaseEditProfile $tokens = $this->toggleTwoFactorService->handle($record, $token, true); cache()->put("users.$record->id.2fa.tokens", implode("\n", $tokens), now()->addSeconds(15)); - $this->redirectRoute('filament.admin.auth.profile', ['tab' => '-2fa-tab']); + $this->redirect(self::getUrl(['tab' => '-2fa-tab'], panel: 'app')); } if ($token = $data['2fa-disable-code'] ?? null) { @@ -381,4 +501,33 @@ class EditProfile extends BaseEditProfile ]; } + + protected function mutateFormDataBeforeSave(array $data): array + { + $moarbetterdata = [ + 'console_font' => $data['console_font'], + 'console_font_size' => $data['console_font_size'], + 'console_rows' => $data['console_rows'], + 'console_graph_period' => $data['console_graph_period'], + 'dashboard_layout' => $data['dashboard_layout'], + ]; + + unset($data['console_font'],$data['console_font_size'], $data['console_rows'], $data['dashboard_layout']); + $data['customization'] = json_encode($moarbetterdata); + + return $data; + } + + protected function mutateFormDataBeforeFill(array $data): array + { + $moarbetterdata = json_decode($data['customization'], true); + + $data['console_font'] = $moarbetterdata['console_font'] ?? 'monospace'; + $data['console_font_size'] = $moarbetterdata['console_font_size'] ?? 14; + $data['console_rows'] = $moarbetterdata['console_rows'] ?? 30; + $data['console_graph_period'] = $moarbetterdata['console_graph_period'] ?? 30; + $data['dashboard_layout'] = $moarbetterdata['dashboard_layout'] ?? 'grid'; + + return $data; + } } diff --git a/app/Filament/Pages/Auth/Login.php b/app/Filament/Pages/Auth/Login.php index 60179fff1..832a12087 100644 --- a/app/Filament/Pages/Auth/Login.php +++ b/app/Filament/Pages/Auth/Login.php @@ -57,11 +57,22 @@ class Login extends BaseLogin return null; } - $isValidToken = $this->google2FA->verifyKey( - $user->totp_secret, - $token, - Config::integer('panel.auth.2fa.window'), - ); + $isValidToken = false; + if (strlen($token) === $this->google2FA->getOneTimePasswordLength()) { + $isValidToken = $this->google2FA->verifyKey( + $user->totp_secret, + $token, + Config::integer('panel.auth.2fa.window'), + ); + } else { + foreach ($user->recoveryTokens as $recoveryToken) { + if (password_verify($token, $recoveryToken->token)) { + $isValidToken = true; + $recoveryToken->delete(); + break; + } + } + } if (!$isValidToken) { // Buffer to prevent bruteforce @@ -108,7 +119,9 @@ class Login extends BaseLogin { return TextInput::make('2fa') ->label(trans('auth.two-factor-code')) - ->hidden(fn () => !$this->verifyTwoFactor) + ->hintIcon('tabler-question-mark') + ->hintIconTooltip(trans('auth.two-factor-hint')) + ->visible(fn () => $this->verifyTwoFactor) ->required() ->live(); } diff --git a/app/Filament/Server/Pages/Console.php b/app/Filament/Server/Pages/Console.php index 855da8585..8e30310c5 100644 --- a/app/Filament/Server/Pages/Console.php +++ b/app/Filament/Server/Pages/Console.php @@ -2,18 +2,21 @@ namespace App\Filament\Server\Pages; +use App\Enums\ConsoleWidgetPosition; use App\Enums\ContainerStatus; use App\Exceptions\Http\Server\ServerStateConflictException; +use App\Extensions\Features\FeatureProvider; use App\Filament\Server\Widgets\ServerConsole; use App\Filament\Server\Widgets\ServerCpuChart; use App\Filament\Server\Widgets\ServerMemoryChart; -// use App\Filament\Server\Widgets\ServerNetworkChart; +use App\Filament\Server\Widgets\ServerNetworkChart; use App\Filament\Server\Widgets\ServerOverview; use App\Livewire\AlertBanner; use App\Models\Permission; use App\Models\Server; -use Filament\Actions\Action; +use Filament\Actions\Concerns\InteractsWithActions; use Filament\Facades\Filament; +use Filament\Actions\Action; use Filament\Pages\Page; use Filament\Support\Enums\ActionSize; use Filament\Widgets\Widget; @@ -22,6 +25,8 @@ use Livewire\Attributes\On; class Console extends Page { + use InteractsWithActions; + protected static ?string $navigationIcon = 'tabler-brand-tabler'; protected static ?int $navigationSort = 1; @@ -38,14 +43,38 @@ class Console extends Page try { $server->validateCurrentState(); } catch (ServerStateConflictException $exception) { - AlertBanner::make() - ->warning() + AlertBanner::make('server_conflict') ->title('Warning') ->body($exception->getMessage()) + ->warning() ->send(); } } + public function boot(): void + { + /** @var Server $server */ + $server = Filament::getTenant(); + /** @var FeatureProvider $feature */ + foreach ($server->egg->features() as $feature) { + $this->cacheAction($feature->getAction()); + } + } + + #[On('mount-feature')] + public function mountFeature(string $data): void + { + $data = json_decode($data); + $feature = data_get($data, 'key'); + + $feature = FeatureProvider::getProviders($feature); + if ($this->getMountedAction()) { + return; + } + $this->mountAction($feature->getId()); + sleep(2); // TODO find a better way + } + public function getWidgetData(): array { return [ @@ -54,18 +83,41 @@ class Console extends Page ]; } + /** @var array>> */ + protected static array $customWidgets = []; + + /** @param class-string[] $customWidgets */ + public static function registerCustomWidgets(ConsoleWidgetPosition $position, array $customWidgets): void + { + static::$customWidgets[$position->value] = array_unique(array_merge(static::$customWidgets[$position->value] ?? [], $customWidgets)); + } + /** * @return class-string[] */ public function getWidgets(): array { - return [ - ServerOverview::class, - ServerConsole::class, + $allWidgets = []; + + $allWidgets = array_merge($allWidgets, static::$customWidgets[ConsoleWidgetPosition::Top->value] ?? []); + + $allWidgets[] = ServerOverview::class; + + $allWidgets = array_merge($allWidgets, static::$customWidgets[ConsoleWidgetPosition::AboveConsole->value] ?? []); + + $allWidgets[] = ServerConsole::class; + + $allWidgets = array_merge($allWidgets, static::$customWidgets[ConsoleWidgetPosition::BelowConsole->value] ?? []); + + $allWidgets = array_merge($allWidgets, [ ServerCpuChart::class, ServerMemoryChart::class, - //ServerNetworkChart::class, TODO: convert units. - ]; + ServerNetworkChart::class, + ]); + + $allWidgets = array_merge($allWidgets, static::$customWidgets[ConsoleWidgetPosition::Bottom->value] ?? []); + + return array_unique($allWidgets); } /** @@ -102,32 +154,33 @@ class Console extends Page Action::make('start') ->color('primary') ->size(ActionSize::ExtraLarge) - ->action(fn () => $this->dispatch('setServerState', state: 'start', uuid: $server->uuid)) + ->dispatch('setServerState', ['state' => 'start', 'uuid' => $server->uuid]) ->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_START, $server)) - ->disabled(fn () => $server->isInConflictState() || !$this->status->isStartable()), + ->disabled(fn () => $server->isInConflictState() || !$this->status->isStartable()) + ->icon('tabler-player-play-filled'), Action::make('restart') ->color('gray') ->size(ActionSize::ExtraLarge) - ->action(fn () => $this->dispatch('setServerState', state: 'restart', uuid: $server->uuid)) + ->dispatch('setServerState', ['state' => 'restart', 'uuid' => $server->uuid]) ->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_RESTART, $server)) - ->disabled(fn () => $server->isInConflictState() || !$this->status->isRestartable()), + ->disabled(fn () => $server->isInConflictState() || !$this->status->isRestartable()) + ->icon('tabler-reload'), Action::make('stop') ->color('danger') ->size(ActionSize::ExtraLarge) - ->action(fn () => $this->dispatch('setServerState', state: 'stop', uuid: $server->uuid)) + ->dispatch('setServerState', ['state' => 'stop', 'uuid' => $server->uuid]) ->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_STOP, $server)) ->hidden(fn () => $this->status->isStartingOrStopping() || $this->status->isKillable()) - ->disabled(fn () => $server->isInConflictState() || !$this->status->isStoppable()), + ->disabled(fn () => $server->isInConflictState() || !$this->status->isStoppable()) + ->icon('tabler-player-stop-filled'), Action::make('kill') ->color('danger') - ->requiresConfirmation() - ->modalHeading('Do you wish to kill this server?') - ->modalDescription('This can result in data corruption and/or data loss!') - ->modalSubmitActionLabel('Kill Server') + ->tooltip('This can result in data corruption and/or data loss!') ->size(ActionSize::ExtraLarge) - ->action(fn () => $this->dispatch('setServerState', state: 'kill', uuid: $server->uuid)) + ->dispatch('setServerState', ['state' => 'kill', 'uuid' => $server->uuid]) ->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_STOP, $server)) - ->hidden(fn () => $server->isInConflictState() || !$this->status->isKillable()), + ->hidden(fn () => $server->isInConflictState() || !$this->status->isKillable()) + ->icon('tabler-alert-square'), ]; } } diff --git a/app/Filament/Server/Pages/Startup.php b/app/Filament/Server/Pages/Startup.php index 6275e0437..d95704a5a 100644 --- a/app/Filament/Server/Pages/Startup.php +++ b/app/Filament/Server/Pages/Startup.php @@ -18,6 +18,7 @@ use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; use Filament\Forms\Form; use Filament\Notifications\Notification; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Facades\Validator; class Startup extends ServerFormPage @@ -100,7 +101,7 @@ class Startup extends ServerFormPage ->schema([ Repeater::make('server_variables') ->label('') - ->relationship('viewableServerVariables') + ->relationship('serverVariables', fn (Builder $query) => $query->where('egg_variables.user_viewable', true)->orderByPowerJoins('variable.sort')) ->grid() ->disabled(fn () => !auth()->user()->can(Permission::ACTION_STARTUP_UPDATE, $server)) ->reorderable(false)->addable(false)->deletable(false) diff --git a/app/Filament/Server/Resources/ActivityResource.php b/app/Filament/Server/Resources/ActivityResource.php index 2565c3285..a69eedaf9 100644 --- a/app/Filament/Server/Resources/ActivityResource.php +++ b/app/Filament/Server/Resources/ActivityResource.php @@ -30,8 +30,7 @@ class ActivityResource extends Resource /** @var Server $server */ $server = Filament::getTenant(); - return $server->activity() - ->getQuery() + return ActivityLog::whereHas('subjects', fn (Builder $query) => $query->where('subject_id', $server->id)) ->whereNotIn('activity_logs.event', ActivityLog::DISABLED_EVENTS) ->when(config('activity.hide_admin_activity'), function (Builder $builder) use ($server) { // We could do this with a query and a lot of joins, but that gets pretty diff --git a/app/Filament/Server/Resources/ActivityResource/Pages/ListActivities.php b/app/Filament/Server/Resources/ActivityResource/Pages/ListActivities.php index 2c238b425..9c953d81d 100644 --- a/app/Filament/Server/Resources/ActivityResource/Pages/ListActivities.php +++ b/app/Filament/Server/Resources/ActivityResource/Pages/ListActivities.php @@ -19,6 +19,7 @@ use Filament\Tables\Actions\ViewAction; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Filters\SelectFilter; use Filament\Tables\Table; +use Illuminate\Support\Arr; use Illuminate\Support\HtmlString; class ListActivities extends ListRecords @@ -31,7 +32,7 @@ class ListActivities extends ListRecords $server = Filament::getTenant(); return $table - ->paginated([25, 50, 100, 250]) + ->paginated([25, 50]) ->defaultPaginationPageOption(25) ->columns([ TextColumn::make('event') @@ -98,7 +99,7 @@ class ListActivities extends ListRecords DateTimePicker::make('timestamp'), KeyValue::make('properties') ->label('Metadata') - ->formatStateUsing(fn ($state) => collect($state)->filter(fn ($item) => !is_array($item))->all()), + ->formatStateUsing(fn ($state) => Arr::dot($state)), ]), ]) ->filters([ diff --git a/app/Filament/Server/Resources/BackupResource/Pages/ListBackups.php b/app/Filament/Server/Resources/BackupResource/Pages/ListBackups.php index 6377d6d06..b6a9d3a6c 100644 --- a/app/Filament/Server/Resources/BackupResource/Pages/ListBackups.php +++ b/app/Filament/Server/Resources/BackupResource/Pages/ListBackups.php @@ -2,6 +2,7 @@ namespace App\Filament\Server\Resources\BackupResource\Pages; +use App\Enums\BackupStatus; use App\Enums\ServerState; use App\Facades\Activity; use App\Filament\Server\Resources\BackupResource; @@ -70,13 +71,14 @@ class ListBackups extends ListRecords ->label('Created') ->since() ->sortable(), - IconColumn::make('is_successful') - ->label('Successful') - ->boolean(), + TextColumn::make('status') + ->label('Status') + ->badge(), IconColumn::make('is_locked') ->visibleFrom('md') ->label('Lock Status') - ->icon(fn (Backup $backup) => !$backup->is_locked ? 'tabler-lock-open' : 'tabler-lock'), + ->trueIcon('tabler-lock') + ->falseIcon('tabler-lock-open'), ]) ->actions([ ActionGroup::make([ @@ -84,12 +86,14 @@ class ListBackups extends ListRecords ->icon(fn (Backup $backup) => !$backup->is_locked ? 'tabler-lock' : 'tabler-lock-open') ->authorize(fn () => auth()->user()->can(Permission::ACTION_BACKUP_DELETE, $server)) ->label(fn (Backup $backup) => !$backup->is_locked ? 'Lock' : 'Unlock') - ->action(fn (BackupController $backupController, Backup $backup, Request $request) => $backupController->toggleLock($request, $server, $backup)), + ->action(fn (BackupController $backupController, Backup $backup, Request $request) => $backupController->toggleLock($request, $server, $backup)) + ->visible(fn (Backup $backup) => $backup->status === BackupStatus::Successful), Action::make('download') ->color('primary') ->icon('tabler-download') ->authorize(fn () => auth()->user()->can(Permission::ACTION_BACKUP_DOWNLOAD, $server)) - ->url(fn (DownloadLinkService $downloadLinkService, Backup $backup, Request $request) => $downloadLinkService->handle($backup, $request->user()), true), + ->url(fn (DownloadLinkService $downloadLinkService, Backup $backup, Request $request) => $downloadLinkService->handle($backup, $request->user()), true) + ->visible(fn (Backup $backup) => $backup->status === BackupStatus::Successful), Action::make('restore') ->color('success') ->icon('tabler-folder-up') @@ -138,12 +142,14 @@ class ListBackups extends ListRecords return Notification::make() ->title('Restoring Backup') ->send(); - }), + }) + ->visible(fn (Backup $backup) => $backup->status === BackupStatus::Successful), DeleteAction::make('delete') - ->disabled(fn (Backup $backup): bool => $backup->is_locked) + ->disabled(fn (Backup $backup) => $backup->is_locked) ->modalDescription(fn (Backup $backup) => 'Do you wish to delete, ' . $backup->name . '?') ->modalSubmitActionLabel('Delete Backup') - ->action(fn (BackupController $backupController, Backup $backup, Request $request) => $backupController->delete($request, $server, $backup)), + ->action(fn (BackupController $backupController, Backup $backup, Request $request) => $backupController->delete($request, $server, $backup)) + ->visible(fn (Backup $backup) => $backup->status !== BackupStatus::InProgress), ]), ]); } @@ -180,7 +186,6 @@ class ListBackups extends ListRecords ->body($backup->name . ' created.') ->success() ->send(); - } catch (HttpException $e) { return Notification::make() ->danger() diff --git a/app/Filament/Server/Resources/DatabaseResource/Pages/ListDatabases.php b/app/Filament/Server/Resources/DatabaseResource/Pages/ListDatabases.php index 30549c6d3..3c7eda0aa 100644 --- a/app/Filament/Server/Resources/DatabaseResource/Pages/ListDatabases.php +++ b/app/Filament/Server/Resources/DatabaseResource/Pages/ListDatabases.php @@ -2,7 +2,6 @@ namespace App\Filament\Server\Resources\DatabaseResource\Pages; -use App\Facades\Activity; use App\Filament\Components\Forms\Actions\RotateDatabasePasswordAction; use App\Filament\Components\Tables\Columns\DateTimeColumn; use App\Filament\Server\Resources\DatabaseResource; @@ -82,12 +81,7 @@ class ListDatabases extends ListRecords ViewAction::make() ->modalHeading(fn (Database $database) => 'Viewing ' . $database->database), DeleteAction::make() - ->after(function (Database $database) { - Activity::event('server:database.delete') - ->subject($database) - ->property('name', $database->database) - ->log(); - }), + ->using(fn (Database $database, DatabaseManagementService $service) => $service->delete($database)), ]); } diff --git a/app/Filament/Server/Resources/FileResource/Pages/EditFiles.php b/app/Filament/Server/Resources/FileResource/Pages/EditFiles.php index 21821f9f3..f1c3abee7 100644 --- a/app/Filament/Server/Resources/FileResource/Pages/EditFiles.php +++ b/app/Filament/Server/Resources/FileResource/Pages/EditFiles.php @@ -4,6 +4,8 @@ namespace App\Filament\Server\Resources\FileResource\Pages; use AbdelhamidErrahmouni\FilamentMonacoEditor\MonacoEditor; use App\Enums\EditorLanguages; +use App\Exceptions\Http\Server\FileSizeTooLargeException; +use App\Exceptions\Repository\FileNotEditableException; use App\Facades\Activity; use App\Filament\Server\Resources\FileResource; use App\Livewire\AlertBanner; @@ -24,6 +26,8 @@ use Filament\Resources\Pages\Page; use Filament\Resources\Pages\PageRegistration; use Filament\Support\Enums\Alignment; use Illuminate\Contracts\Filesystem\FileNotFoundException; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Http\Client\ConnectionException; use Illuminate\Routing\Route; use Illuminate\Support\Facades\Route as RouteFacade; use Livewire\Attributes\Locked; @@ -45,6 +49,8 @@ class EditFiles extends Page #[Locked] public string $path; + private DaemonFileRepository $fileRepository; + /** @var array */ public ?array $data = []; @@ -66,12 +72,8 @@ class EditFiles extends Page ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) ->icon('tabler-device-floppy') ->keyBindings('mod+shift+s') - ->action(function (DaemonFileRepository $fileRepository) use ($server) { - $data = $this->form->getState(); - - $fileRepository - ->setServer($server) - ->putContent($this->path, $data['editor'] ?? ''); + ->action(function () { + $this->getDaemonFileRepository()->putContent($this->path, $this->data['editor'] ?? ''); Activity::event('server:file.write') ->property('file', $this->path) @@ -90,12 +92,8 @@ class EditFiles extends Page ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) ->icon('tabler-device-floppy') ->keyBindings('mod+s') - ->action(function (DaemonFileRepository $fileRepository) use ($server) { - $data = $this->form->getState(); - - $fileRepository - ->setServer($server) - ->putContent($this->path, $data['editor'] ?? ''); + ->action(function () { + $this->getDaemonFileRepository()->putContent($this->path, $this->data['editor'] ?? ''); Activity::event('server:file.write') ->property('file', $this->path) @@ -117,21 +115,48 @@ class EditFiles extends Page ->schema([ Select::make('lang') ->label('Syntax Highlighting') + ->searchable() + ->native(false) ->live() ->options(EditorLanguages::class) ->selectablePlaceholder(false) ->afterStateUpdated(fn ($state) => $this->dispatch('setLanguage', lang: $state)) ->default(fn () => EditorLanguages::fromWithAlias(pathinfo($this->path, PATHINFO_EXTENSION))), MonacoEditor::make('editor') - ->label('') - ->placeholderText('') - ->default(function (DaemonFileRepository $fileRepository) use ($server) { + ->hiddenLabel() + ->showPlaceholder(false) + ->default(function () { try { - return $fileRepository - ->setServer($server) - ->getContent($this->path, config('panel.files.max_edit_size')); + return $this->getDaemonFileRepository()->getContent($this->path, config('panel.files.max_edit_size')); + } catch (FileSizeTooLargeException) { + AlertBanner::make() + ->title('' . basename($this->path) . ' is too large!') + ->body('Max is ' . convert_bytes_to_readable(config('panel.files.max_edit_size'))) + ->danger() + ->closable() + ->send(); + + $this->redirect(ListFiles::getUrl(['path' => dirname($this->path)])); } catch (FileNotFoundException) { - abort(404, $this->path . ' not found.'); + AlertBanner::make() + ->title('' . basename($this->path) . ' not found!') + ->danger() + ->closable() + ->send(); + + $this->redirect(ListFiles::getUrl(['path' => dirname($this->path)])); + } catch (FileNotEditableException) { + AlertBanner::make() + ->title('' . basename($this->path) . ' is a directory') + ->danger() + ->closable() + ->send(); + + $this->redirect(ListFiles::getUrl(['path' => dirname($this->path)])); + } catch (ConnectionException) { + // Alert banner for this one will be handled by ListFiles + + $this->redirect(ListFiles::getUrl(['path' => dirname($this->path)])); } }) ->language(fn (Get $get) => $get('lang')) @@ -149,12 +174,21 @@ class EditFiles extends Page $this->form->fill(); if (str($path)->endsWith('.pelicanignore')) { - AlertBanner::make() + AlertBanner::make('.pelicanignore_info') ->title('You\'re editing a .pelicanignore file!') ->body('Any files or directories listed in here will be excluded from backups. Wildcards are supported by using an asterisk (*).
You can negate a prior rule by prepending an exclamation point (!).') ->info() ->closable() ->send(); + + try { + $this->getDaemonFileRepository()->getDirectory('/'); + } catch (ConnectionException) { + AlertBanner::make('node_connection_error') + ->title('Could not connect to the node!') + ->danger() + ->send(); + } } } @@ -200,6 +234,23 @@ class EditFiles extends Page return $breadcrumbs; } + private function getDaemonFileRepository(): DaemonFileRepository + { + /** @var Server $server */ + $server = Filament::getTenant(); + $this->fileRepository ??= (new DaemonFileRepository())->setServer($server); + + return $this->fileRepository; + } + + /** + * @param array $parameters + */ + public static function getUrl(array $parameters = [], bool $isAbsolute = true, ?string $panel = null, ?Model $tenant = null): string + { + return parent::getUrl($parameters, $isAbsolute, $panel, $tenant) . '/'; + } + public static function route(string $path): PageRegistration { return new PageRegistration( diff --git a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php index 49ce60224..df598af21 100644 --- a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php +++ b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php @@ -12,7 +12,6 @@ use App\Models\Server; use App\Repositories\Daemon\DaemonFileRepository; use App\Filament\Components\Tables\Columns\BytesColumn; use App\Filament\Components\Tables\Columns\DateTimeColumn; -use App\Livewire\AlertBanner; use Filament\Actions\Action as HeaderAction; use Filament\Facades\Filament; use Filament\Forms\Components\CheckboxList; @@ -30,16 +29,15 @@ use Filament\Resources\Pages\PageRegistration; use Filament\Tables\Actions\Action; use Filament\Tables\Actions\ActionGroup; use Filament\Tables\Actions\BulkAction; -use Filament\Tables\Actions\BulkActionGroup; use Filament\Tables\Actions\DeleteAction; use Filament\Tables\Actions\DeleteBulkAction; use Filament\Tables\Actions\EditAction; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Collection; -use Illuminate\Http\Client\ConnectionException; use Illuminate\Http\UploadedFile; use Illuminate\Routing\Route; +use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Route as RouteFacade; use Livewire\Attributes\Locked; @@ -48,25 +46,10 @@ class ListFiles extends ListRecords protected static string $resource = FileResource::class; #[Locked] - public string $path; + public string $path = '/'; private DaemonFileRepository $fileRepository; - private bool $isDisabled = false; - - public function mount(?string $path = null): void - { - parent::mount(); - $this->path = $path ?? '/'; - - try { - $this->getDaemonFileRepository()->getDirectory('/'); - } catch (ConnectionException) { - $this->isDisabled = true; - $this->getFailureNotification(); - } - } - public function getBreadcrumbs(): array { $resource = static::getResource(); @@ -92,8 +75,8 @@ class ListFiles extends ListRecords $files = File::get($server, $this->path); return $table - ->paginated([25, 50, 100, 250]) - ->defaultPaginationPageOption(50) + ->paginated([25, 50]) + ->defaultPaginationPageOption(25) ->query(fn () => $files->orderByDesc('is_directory')) ->defaultSort('name') ->columns([ @@ -124,21 +107,18 @@ class ListFiles extends ListRecords ->actions([ Action::make('view') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ, $server)) - ->disabled($this->isDisabled) ->label('Open') ->icon('tabler-eye') ->visible(fn (File $file) => $file->is_directory) ->url(fn (File $file) => self::getUrl(['path' => join_paths($this->path, $file->name)])), EditAction::make('edit') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ_CONTENT, $server)) - ->disabled($this->isDisabled) ->icon('tabler-edit') ->visible(fn (File $file) => $file->canEdit()) ->url(fn (File $file) => EditFiles::getUrl(['path' => join_paths($this->path, $file->name)])), ActionGroup::make([ Action::make('rename') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) - ->disabled($this->isDisabled) ->label('Rename') ->icon('tabler-forms') ->form([ @@ -167,7 +147,6 @@ class ListFiles extends ListRecords }), Action::make('copy') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_CREATE, $server)) - ->disabled($this->isDisabled) ->label('Copy') ->icon('tabler-copy') ->visible(fn (File $file) => $file->is_file) @@ -187,14 +166,12 @@ class ListFiles extends ListRecords }), Action::make('download') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ_CONTENT, $server)) - ->disabled($this->isDisabled) ->label('Download') ->icon('tabler-download') ->visible(fn (File $file) => $file->is_file) ->url(fn (File $file) => DownloadFiles::getUrl(['path' => join_paths($this->path, $file->name)]), true), Action::make('move') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) - ->disabled($this->isDisabled) ->label('Move') ->icon('tabler-replace') ->form([ @@ -230,7 +207,6 @@ class ListFiles extends ListRecords }), Action::make('permissions') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) - ->disabled($this->isDisabled) ->label('Permissions') ->icon('tabler-license') ->form([ @@ -287,19 +263,26 @@ class ListFiles extends ListRecords }), Action::make('archive') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_ARCHIVE, $server)) - ->disabled($this->isDisabled) ->label('Archive') ->icon('tabler-archive') - ->action(function (File $file) { - $this->getDaemonFileRepository()->compressFiles($this->path, [$file->name]); + ->form([ + TextInput::make('name') + ->label('Archive name') + ->placeholder(fn () => 'archive-' . str(Carbon::now()->toRfc3339String())->replace(':', '')->before('+0000') . 'Z') + ->suffix('.tar.gz'), + ]) + ->action(function ($data, File $file) { + $archive = $this->getDaemonFileRepository()->compressFiles($this->path, [$file->name], $data['name']); Activity::event('server:file.compress') + ->property('name', $archive['name']) ->property('directory', $this->path) ->property('files', [$file->name]) ->log(); Notification::make() ->title('Archive created') + ->body($archive['name']) ->success() ->send(); @@ -307,7 +290,6 @@ class ListFiles extends ListRecords }), Action::make('unarchive') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_ARCHIVE, $server)) - ->disabled($this->isDisabled) ->label('Unarchive') ->icon('tabler-archive') ->visible(fn (File $file) => $file->isArchive()) @@ -329,7 +311,6 @@ class ListFiles extends ListRecords ]), DeleteAction::make() ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_DELETE, $server)) - ->disabled($this->isDisabled) ->label('') ->icon('tabler-trash') ->requiresConfirmation() @@ -344,75 +325,77 @@ class ListFiles extends ListRecords ->log(); }), ]) - ->bulkActions([ - BulkActionGroup::make([ - BulkAction::make('move') - ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) - ->disabled($this->isDisabled) - ->form([ - TextInput::make('location') - ->label('Directory') - ->hint('Enter the new directory, relative to the current directory.') - ->required() - ->live(), - Placeholder::make('new_location') - ->content(fn (Get $get) => resolve_path('./' . join_paths($this->path, $get('location') ?? ''))), - ]) - ->action(function (Collection $files, $data) { - $location = rtrim($data['location'], '/'); + ->groupedBulkActions([ + BulkAction::make('move') + ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) + ->form([ + TextInput::make('location') + ->label('Directory') + ->hint('Enter the new directory, relative to the current directory.') + ->required() + ->live(), + Placeholder::make('new_location') + ->content(fn (Get $get) => resolve_path('./' . join_paths($this->path, $get('location') ?? ''))), + ]) + ->action(function (Collection $files, $data) { + $location = rtrim($data['location'], '/'); - $files = $files->map(fn ($file) => ['to' => join_paths($location, $file['name']), 'from' => $file['name']])->toArray(); - $this->getDaemonFileRepository() - ->renameFiles($this->path, $files); + $files = $files->map(fn ($file) => ['to' => join_paths($location, $file['name']), 'from' => $file['name']])->toArray(); + $this->getDaemonFileRepository()->renameFiles($this->path, $files); - Activity::event('server:file.rename') - ->property('directory', $this->path) - ->property('files', $files) - ->log(); + Activity::event('server:file.rename') + ->property('directory', $this->path) + ->property('files', $files) + ->log(); - Notification::make() - ->title(count($files) . ' Files were moved to ' . resolve_path(join_paths($this->path, $location))) - ->success() - ->send(); - }), - BulkAction::make('archive') - ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_ARCHIVE, $server)) - ->disabled($this->isDisabled) - ->action(function (Collection $files) { - $files = $files->map(fn ($file) => $file['name'])->toArray(); + Notification::make() + ->title(count($files) . ' Files were moved to ' . resolve_path(join_paths($this->path, $location))) + ->success() + ->send(); + }), + BulkAction::make('archive') + ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_ARCHIVE, $server)) + ->form([ + TextInput::make('name') + ->label('Archive name') + ->placeholder(fn () => 'archive-' . str(Carbon::now()->toRfc3339String())->replace(':', '')->before('+0000') . 'Z') + ->suffix('.tar.gz'), + ]) + ->action(function ($data, Collection $files) { + $files = $files->map(fn ($file) => $file['name'])->toArray(); - $this->getDaemonFileRepository()->compressFiles($this->path, $files); + $archive = $this->getDaemonFileRepository()->compressFiles($this->path, $files, $data['name']); - Activity::event('server:file.compress') - ->property('directory', $this->path) - ->property('files', $files) - ->log(); + Activity::event('server:file.compress') + ->property('name', $archive['name']) + ->property('directory', $this->path) + ->property('files', $files) + ->log(); - Notification::make() - ->title('Archive created') - ->success() - ->send(); + Notification::make() + ->title('Archive created') + ->body($archive['name']) + ->success() + ->send(); - return redirect(ListFiles::getUrl(['path' => $this->path])); - }), - DeleteBulkAction::make() - ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_DELETE, $server)) - ->disabled($this->isDisabled) - ->action(function (Collection $files) { - $files = $files->map(fn ($file) => $file['name'])->toArray(); - $this->getDaemonFileRepository()->deleteFiles($this->path, $files); + return redirect(ListFiles::getUrl(['path' => $this->path])); + }), + DeleteBulkAction::make() + ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_DELETE, $server)) + ->action(function (Collection $files) { + $files = $files->map(fn ($file) => $file['name'])->toArray(); + $this->getDaemonFileRepository()->deleteFiles($this->path, $files); - Activity::event('server:file.delete') - ->property('directory', $this->path) - ->property('files', $files) - ->log(); + Activity::event('server:file.delete') + ->property('directory', $this->path) + ->property('files', $files) + ->log(); - Notification::make() - ->title(count($files) . ' Files deleted.') - ->success() - ->send(); - }), - ]), + Notification::make() + ->title(count($files) . ' Files deleted.') + ->success() + ->send(); + }), ]); } @@ -424,7 +407,6 @@ class ListFiles extends ListRecords return [ HeaderAction::make('new_file') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_CREATE, $server)) - ->disabled($this->isDisabled) ->label('New File') ->color('gray') ->keyBindings('') @@ -442,6 +424,8 @@ class ListFiles extends ListRecords ->required(), Select::make('lang') ->label('Syntax Highlighting') + ->searchable() + ->native(false) ->live() ->options(EditorLanguages::class) ->selectablePlaceholder(false) @@ -454,7 +438,6 @@ class ListFiles extends ListRecords ]), HeaderAction::make('new_folder') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_CREATE, $server)) - ->disabled($this->isDisabled) ->label('New Folder') ->color('gray') ->action(function ($data) { @@ -471,7 +454,6 @@ class ListFiles extends ListRecords ]), HeaderAction::make('upload') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_CREATE, $server)) - ->disabled($this->isDisabled) ->label('Upload') ->action(function ($data) { if (count($data['files']) > 0 && !isset($data['url'])) { @@ -521,14 +503,14 @@ class ListFiles extends ListRecords ]), HeaderAction::make('search') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ, $server)) - ->disabled($this->isDisabled) ->label('Global Search') ->modalSubmitActionLabel('Search') ->form([ TextInput::make('searchTerm') ->placeholder('Enter a search term, e.g. *.txt') + ->required() ->regex('/^[^*]*\*?[^*]*$/') - ->minLength(3), + ->minValue(3), ]) ->action(fn ($data) => redirect(SearchFiles::getUrl([ 'searchTerm' => $data['searchTerm'], @@ -563,14 +545,6 @@ class ListFiles extends ListRecords return $this->fileRepository; } - public function getFailureNotification(): AlertBanner - { - return AlertBanner::make() - ->title('Could not connect to the node!') - ->danger() - ->send(); - } - public static function route(string $path): PageRegistration { return new PageRegistration( diff --git a/app/Filament/Server/Resources/FileResource/Pages/SearchFiles.php b/app/Filament/Server/Resources/FileResource/Pages/SearchFiles.php index e844dbc83..9df82baf5 100644 --- a/app/Filament/Server/Resources/FileResource/Pages/SearchFiles.php +++ b/app/Filament/Server/Resources/FileResource/Pages/SearchFiles.php @@ -12,6 +12,7 @@ use Filament\Resources\Pages\ListRecords; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; use Livewire\Attributes\Locked; +use Livewire\Attributes\Url; class SearchFiles extends ListRecords { @@ -22,15 +23,8 @@ class SearchFiles extends ListRecords #[Locked] public string $searchTerm; - #[Locked] - public string $path; - - public function mount(?string $searchTerm = null, ?string $path = null): void - { - parent::mount(); - $this->searchTerm = $searchTerm; - $this->path = $path ?? '/'; - } + #[Url] + public string $path = '/'; public function getBreadcrumbs(): array { diff --git a/app/Filament/Server/Resources/ScheduleResource.php b/app/Filament/Server/Resources/ScheduleResource.php index 5c0a5021c..0e07402d7 100644 --- a/app/Filament/Server/Resources/ScheduleResource.php +++ b/app/Filament/Server/Resources/ScheduleResource.php @@ -4,9 +4,12 @@ namespace App\Filament\Server\Resources; use App\Filament\Server\Resources\ScheduleResource\Pages; use App\Filament\Server\Resources\ScheduleResource\RelationManagers\TasksRelationManager; +use App\Helpers\Utilities; use App\Models\Permission; use App\Models\Schedule; use App\Models\Server; +use Carbon\Carbon; +use Exception; use Filament\Facades\Filament; use Filament\Forms\Components\Actions; use Filament\Forms\Components\Actions\Action; @@ -17,7 +20,9 @@ use Filament\Forms\Components\Toggle; use Filament\Forms\Components\ToggleButtons; use Filament\Forms\Form; use Filament\Forms\Set; +use Filament\Notifications\Notification; use Filament\Resources\Resource; +use Filament\Support\Exceptions\Halt; use Illuminate\Database\Eloquent\Model; class ScheduleResource extends Resource @@ -314,4 +319,18 @@ class ScheduleResource extends Resource 'edit' => Pages\EditSchedule::route('/{record}/edit'), ]; } + + public static function getNextRun(string $minute, string $hour, string $dayOfMonth, string $month, string $dayOfWeek): Carbon + { + try { + return Utilities::getScheduleNextRunDate($minute, $hour, $dayOfMonth, $month, $dayOfWeek); + } catch (Exception) { + Notification::make() + ->title('The cron data provided does not evaluate to a valid expression') + ->danger() + ->send(); + + throw new Halt(); + } + } } diff --git a/app/Filament/Server/Resources/ScheduleResource/Pages/CreateSchedule.php b/app/Filament/Server/Resources/ScheduleResource/Pages/CreateSchedule.php index 3594bb3c4..b85fe213f 100644 --- a/app/Filament/Server/Resources/ScheduleResource/Pages/CreateSchedule.php +++ b/app/Filament/Server/Resources/ScheduleResource/Pages/CreateSchedule.php @@ -2,14 +2,10 @@ namespace App\Filament\Server\Resources\ScheduleResource\Pages; -use App\Exceptions\DisplayException; use App\Facades\Activity; use App\Filament\Server\Resources\ScheduleResource; -use App\Helpers\Utilities; use App\Models\Schedule; use App\Models\Server; -use Carbon\Carbon; -use Exception; use Filament\Facades\Filament; use Filament\Resources\Pages\CreateRecord; @@ -39,27 +35,18 @@ class CreateSchedule extends CreateRecord } if (!isset($data['next_run_at'])) { - $data['next_run_at'] = $this->getNextRunAt($data['cron_minute'], $data['cron_hour'], $data['cron_day_of_month'], $data['cron_month'], $data['cron_day_of_week']); + $data['next_run_at'] = ScheduleResource::getNextRun( + $data['cron_minute'], + $data['cron_hour'], + $data['cron_day_of_month'], + $data['cron_month'], + $data['cron_day_of_week'] + ); } return $data; } - protected function getNextRunAt(string $minute, string $hour, string $dayOfMonth, string $month, string $dayOfWeek): Carbon - { - try { - return Utilities::getScheduleNextRunDate( - $minute, - $hour, - $dayOfMonth, - $month, - $dayOfWeek - ); - } catch (Exception) { - throw new DisplayException('The cron data provided does not evaluate to a valid expression.'); - } - } - public function getBreadcrumbs(): array { return []; diff --git a/app/Filament/Server/Resources/ScheduleResource/Pages/EditSchedule.php b/app/Filament/Server/Resources/ScheduleResource/Pages/EditSchedule.php index 3014d0c20..02957adcd 100644 --- a/app/Filament/Server/Resources/ScheduleResource/Pages/EditSchedule.php +++ b/app/Filament/Server/Resources/ScheduleResource/Pages/EditSchedule.php @@ -22,6 +22,19 @@ class EditSchedule extends EditRecord ->log(); } + protected function mutateFormDataBeforeSave(array $data): array + { + $data['next_run_at'] = ScheduleResource::getNextRun( + $data['cron_minute'], + $data['cron_hour'], + $data['cron_day_of_month'], + $data['cron_month'], + $data['cron_day_of_week'] + ); + + return $data; + } + protected function getHeaderActions(): array { return [ diff --git a/app/Filament/Server/Resources/ScheduleResource/Pages/ListSchedules.php b/app/Filament/Server/Resources/ScheduleResource/Pages/ListSchedules.php index 5aca82b53..0f79e8a40 100644 --- a/app/Filament/Server/Resources/ScheduleResource/Pages/ListSchedules.php +++ b/app/Filament/Server/Resources/ScheduleResource/Pages/ListSchedules.php @@ -39,8 +39,10 @@ class ListSchedules extends ListRecords ->sortable(), DateTimeColumn::make('next_run_at') ->label('Next run') + ->placeholder('Never') ->since() - ->sortable(), + ->sortable() + ->state(fn (Schedule $schedule) => $schedule->is_active ? $schedule->next_run_at : null), ]) ->actions([ ViewAction::make(), diff --git a/app/Filament/Server/Resources/UserResource.php b/app/Filament/Server/Resources/UserResource.php index ff3c870ec..abad10e62 100644 --- a/app/Filament/Server/Resources/UserResource.php +++ b/app/Filament/Server/Resources/UserResource.php @@ -5,7 +5,6 @@ namespace App\Filament\Server\Resources; use App\Filament\Server\Resources\UserResource\Pages; use App\Models\Permission; use App\Models\Server; -use App\Models\Subuser; use App\Models\User; use App\Services\Subusers\SubuserDeletionService; use App\Services\Subusers\SubuserUpdateService; @@ -20,8 +19,8 @@ use Filament\Forms\Components\Tabs\Tab; use Filament\Forms\Components\TextInput; use Filament\Forms\Set; use Filament\Notifications\Notification; -use Filament\Tables\Actions\DeleteAction; use Filament\Resources\Resource; +use Filament\Tables\Actions\DeleteAction; use Filament\Tables\Actions\EditAction; use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\TextColumn; @@ -84,6 +83,35 @@ class UserResource extends Resource /** @var Server $server */ $server = Filament::getTenant(); + $tabs = []; + $permissionsArray = []; + + foreach (Permission::permissionData() as $data) { + $options = []; + $descriptions = []; + + foreach ($data['permissions'] as $permission) { + $options[$permission] = str($permission)->headline(); + $descriptions[$permission] = trans('server/users.permissions.' . $data['name'] . '_' . str($permission)->replace('-', '_')); + $permissionsArray[$data['name']][] = $permission; + } + + $tabs[] = Tab::make(str($data['name'])->headline()) + ->schema([ + Section::make() + ->description(trans('server/users.permissions.' . $data['name'] . '_desc')) + ->icon($data['icon']) + ->schema([ + CheckboxList::make($data['name']) + ->label('') + ->bulkToggleable() + ->columns(2) + ->options($options) + ->descriptions($descriptions), + ]), + ]); + } + return $table ->paginated(false) ->searchable(false) @@ -91,21 +119,21 @@ class UserResource extends Resource ImageColumn::make('picture') ->visibleFrom('lg') ->label('') - ->extraImgAttributes(['class' => 'rounded-full']) - ->defaultImageUrl(fn (User $user) => 'https://gravatar.com/avatar/' . md5(strtolower($user->email))), + ->alignCenter()->circular() + ->defaultImageUrl(fn (User $user) => Filament::getUserAvatarUrl($user)), TextColumn::make('username') ->searchable(), TextColumn::make('email') ->searchable(), TextColumn::make('permissions') - ->state(fn (User $user) => count(Subuser::query()->where('user_id', $user->id)->where('server_id', $server->id)->first()->permissions)), + ->state(fn (User $user) => count($server->subusers->where('user_id', $user->id)->first()->permissions)), ]) ->actions([ DeleteAction::make() ->label('Remove User') ->hidden(fn (User $user) => auth()->user()->id === $user->id) ->action(function (User $user, SubuserDeletionService $subuserDeletionService) use ($server) { - $subuser = Subuser::query()->where('user_id', $user->id)->where('server_id', $server->id)->first(); + $subuser = $server->subusers->where('user_id', $user->id)->first(); $subuserDeletionService->handle($subuser, $server); Notification::make() @@ -119,7 +147,7 @@ class UserResource extends Resource ->authorize(fn () => auth()->user()->can(Permission::ACTION_USER_UPDATE, $server)) ->modalHeading(fn (User $user) => 'Editing ' . $user->email) ->action(function (array $data, SubuserUpdateService $subuserUpdateService, User $user) use ($server) { - $subuser = Subuser::query()->where('user_id', $user->id)->where('server_id', $server->id)->first(); + $subuser = $server->subusers->where('user_id', $user->id)->first(); $permissions = collect($data) ->forget('email') @@ -159,67 +187,8 @@ class UserResource extends Resource Actions::make([ Action::make('assignAll') ->label('Assign All') - ->action(function (Set $set) { - $permissions = [ - 'control' => [ - 'console', - 'start', - 'stop', - 'restart', - ], - 'user' => [ - 'read', - 'create', - 'update', - 'delete', - ], - 'file' => [ - 'read', - 'read-content', - 'create', - 'update', - 'delete', - 'archive', - 'sftp', - ], - 'backup' => [ - 'read', - 'create', - 'delete', - 'download', - 'restore', - ], - 'allocation' => [ - 'read', - 'create', - 'update', - 'delete', - ], - 'startup' => [ - 'read', - 'update', - 'docker-image', - ], - 'database' => [ - 'read', - 'create', - 'update', - 'delete', - 'view_password', - ], - 'schedule' => [ - 'read', - 'create', - 'update', - 'delete', - ], - 'settings' => [ - 'rename', - 'reinstall', - 'activity', - ], - ]; - + ->action(function (Set $set) use ($permissionsArray) { + $permissions = $permissionsArray; foreach ($permissions as $key => $value) { $allValues = array_unique($value); $set($key, $allValues); @@ -234,243 +203,25 @@ class UserResource extends Resource ]), Tabs::make() ->columnSpanFull() - ->schema([ - Tab::make('Console') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.control_desc')) - ->icon('tabler-terminal-2') - ->schema([ - CheckboxList::make('control') - ->formatStateUsing(function (User $user, Set $set) use ($server) { - $permissionsArray = Subuser::query() - ->where('user_id', $user->id) - ->where('server_id', $server->id) - ->first() - ->permissions; - - $transformedPermissions = []; - - foreach ($permissionsArray as $permission) { - [$group, $action] = explode('.', $permission, 2); - $transformedPermissions[$group][] = $action; - } - - foreach ($transformedPermissions as $key => $value) { - $set($key, $value); - } - - return $transformedPermissions['control'] ?? []; - }) - ->bulkToggleable() - ->label('') - ->options([ - 'console' => 'Console', - 'start' => 'Start', - 'stop' => 'Stop', - 'restart' => 'Restart', - ]) - ->descriptions([ - 'console' => trans('server/users.permissions.control_console'), - 'start' => trans('server/users.permissions.control_start'), - 'stop' => trans('server/users.permissions.control_stop'), - 'restart' => trans('server/users.permissions.control_restart'), - ]), - ]), - ]), - Tab::make('User') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.user_desc')) - ->icon('tabler-users') - ->schema([ - CheckboxList::make('user') - ->bulkToggleable() - ->label('') - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - ]) - ->descriptions([ - 'create' => trans('server/users.permissions.user_create'), - 'read' => trans('server/users.permissions.user_read'), - 'update' => trans('server/users.permissions.user_update'), - 'delete' => trans('server/users.permissions.user_delete'), - ]), - ]), - ]), - Tab::make('File') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.file_desc')) - ->icon('tabler-folders') - ->schema([ - CheckboxList::make('file') - ->bulkToggleable() - ->label('') - ->options([ - 'read' => 'Read', - 'read-content' => 'Read Content', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - 'archive' => 'Archive', - 'sftp' => 'SFTP', - ]) - ->descriptions([ - 'create' => trans('server/users.permissions.file_create'), - 'read' => trans('server/users.permissions.file_read'), - 'read-content' => trans('server/users.permissions.file_read_content'), - 'update' => trans('server/users.permissions.file_update'), - 'delete' => trans('server/users.permissions.file_delete'), - 'archive' => trans('server/users.permissions.file_archive'), - 'sftp' => trans('server/users.permissions.file_sftp'), - ]), - ]), - ]), - Tab::make('Backup') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.backup_desc')) - ->icon('tabler-download') - ->schema([ - CheckboxList::make('backup') - ->bulkToggleable() - ->label('') - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'delete' => 'Delete', - 'download' => 'Download', - 'restore' => 'Restore', - ]) - ->descriptions([ - 'create' => trans('server/users.permissions.backup_create'), - 'read' => trans('server/users.permissions.backup_read'), - 'delete' => trans('server/users.permissions.backup_delete'), - 'download' => trans('server/users.permissions.backup_download'), - 'restore' => trans('server/users.permissions.backup_restore'), - ]), - ]), - ]), - Tab::make('Allocation') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.allocation_desc')) - ->icon('tabler-network') - ->schema([ - CheckboxList::make('allocation') - ->bulkToggleable() - ->label('') - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.allocation_read'), - 'create' => trans('server/users.permissions.allocation_create'), - 'update' => trans('server/users.permissions.allocation_update'), - 'delete' => trans('server/users.permissions.allocation_delete'), - ]), - ]), - ]), - Tab::make('Startup') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.startup_desc')) - ->icon('tabler-question-mark') - ->schema([ - CheckboxList::make('startup') - ->bulkToggleable() - ->label('') - ->options([ - 'read' => 'Read', - 'update' => 'Update', - 'docker-image' => 'Docker Image', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.startup_read'), - 'update' => trans('server/users.permissions.startup_update'), - 'docker-image' => trans('server/users.permissions.startup_docker_image'), - ]), - ]), - ]), - Tab::make('Database') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.database_desc')) - ->icon('tabler-database') - ->schema([ - CheckboxList::make('database') - ->bulkToggleable() - ->label('') - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - 'view_password' => 'View Password', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.database_read'), - 'create' => trans('server/users.permissions.database_create'), - 'update' => trans('server/users.permissions.database_update'), - 'delete' => trans('server/users.permissions.database_delete'), - 'view_password' => trans('server/users.permissions.database_view_password'), - ]), - ]), - ]), - Tab::make('Schedule') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.schedule_desc')) - ->icon('tabler-clock') - ->schema([ - CheckboxList::make('schedule') - ->bulkToggleable() - ->label('') - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.schedule_read'), - 'create' => trans('server/users.permissions.schedule_create'), - 'update' => trans('server/users.permissions.schedule_update'), - 'delete' => trans('server/users.permissions.schedule_delete'), - ]), - ]), - ]), - Tab::make('Settings') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.settings_desc')) - ->icon('tabler-settings') - ->schema([ - CheckboxList::make('settings') - ->bulkToggleable() - ->label('') - ->options([ - 'rename' => 'Rename', - 'reinstall' => 'Reinstall', - 'activity' => 'Activity', - ]) - ->descriptions([ - 'rename' => trans('server/users.permissions.setting_rename'), - 'reinstall' => trans('server/users.permissions.setting_reinstall'), - 'activity' => trans('server/users.permissions.activity_desc'), - ]), - ]), - ]), - ]), + ->schema($tabs), ]), - ]), + ]) + ->mutateRecordDataUsing(function ($data, User $user) use ($server) { + $permissionsArray = $server->subusers->where('user_id', $user->id)->first()->permissions; + + $transformedPermissions = []; + + foreach ($permissionsArray as $permission) { + [$group, $action] = explode('.', $permission, 2); + $transformedPermissions[$group][] = $action; + } + + foreach ($transformedPermissions as $key => $value) { + $data[$key] = $value; + } + + return $data; + }), ]); } diff --git a/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php b/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php index 21a82ceee..ce0201e32 100644 --- a/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php +++ b/app/Filament/Server/Resources/UserResource/Pages/ListUsers.php @@ -10,12 +10,13 @@ use App\Services\Subusers\SubuserCreationService; use Exception; use Filament\Actions; use Filament\Facades\Filament; -use Filament\Forms\Components\Actions as assignAll; use Filament\Forms\Components\Actions\Action; +use Filament\Forms\Components\Actions as assignAll; use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\Grid; use Filament\Forms\Components\Section; use Filament\Forms\Components\Tabs; +use Filament\Forms\Components\Tabs\Tab; use Filament\Forms\Components\TextInput; use Filament\Forms\Get; use Filament\Forms\Set; @@ -31,6 +32,35 @@ class ListUsers extends ListRecords /** @var Server $server */ $server = Filament::getTenant(); + $tabs = []; + $permissionsArray = []; + + foreach (Permission::permissionData() as $data) { + $options = []; + $descriptions = []; + + foreach ($data['permissions'] as $permission) { + $options[$permission] = str($permission)->headline(); + $descriptions[$permission] = trans('server/users.permissions.' . $data['name'] . '_' . str($permission)->replace('-', '_')); + $permissionsArray[$data['name']][] = $permission; + } + + $tabs[] = Tab::make(str($data['name'])->headline()) + ->schema([ + Section::make() + ->description(trans('server/users.permissions.' . $data['name'] . '_desc')) + ->icon($data['icon']) + ->schema([ + CheckboxList::make($data['name']) + ->label('') + ->bulkToggleable() + ->columns(2) + ->options($options) + ->descriptions($descriptions), + ]), + ]); + } + return [ Actions\CreateAction::make('invite') ->label('Invite User') @@ -59,72 +89,10 @@ class ListUsers extends ListRecords assignAll::make([ Action::make('assignAll') ->label('Assign All') - ->action(function (Set $set, Get $get) { - $permissions = [ - 'control' => [ - 'console', - 'start', - 'stop', - 'restart', - ], - 'user' => [ - 'read', - 'create', - 'update', - 'delete', - ], - 'file' => [ - 'read', - 'read-content', - 'create', - 'update', - 'delete', - 'archive', - 'sftp', - ], - 'backup' => [ - 'read', - 'create', - 'delete', - 'download', - 'restore', - ], - 'allocation' => [ - 'read', - 'create', - 'update', - 'delete', - ], - 'startup' => [ - 'read', - 'update', - 'docker-image', - ], - 'database' => [ - 'read', - 'create', - 'update', - 'delete', - 'view_password', - ], - 'schedule' => [ - 'read', - 'create', - 'update', - 'delete', - ], - 'settings' => [ - 'rename', - 'reinstall', - ], - 'activity' => [ - 'read', - ], - ]; - + ->action(function (Set $set, Get $get) use ($permissionsArray) { + $permissions = $permissionsArray; foreach ($permissions as $key => $value) { - $currentValues = $get($key) ?? []; - $allValues = array_unique(array_merge($currentValues, $value)); + $allValues = array_unique($value); $set($key, $allValues); } }), @@ -137,249 +105,7 @@ class ListUsers extends ListRecords ]), Tabs::make() ->columnSpanFull() - ->schema([ - Tabs\Tab::make('Console') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.control_desc')) - ->icon('tabler-terminal-2') - ->schema([ - CheckboxList::make('control') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'console' => 'Console', - 'start' => 'Start', - 'stop' => 'Stop', - 'restart' => 'Restart', - ]) - ->descriptions([ - 'console' => trans('server/users.permissions.control_console'), - 'start' => trans('server/users.permissions.control_start'), - 'stop' => trans('server/users.permissions.control_stop'), - 'restart' => trans('server/users.permissions.control_restart'), - ]), - ]), - ]), - Tabs\Tab::make('User') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.user_desc')) - ->icon('tabler-users') - ->schema([ - CheckboxList::make('user') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - ]) - ->descriptions([ - 'create' => trans('server/users.permissions.user_create'), - 'read' => trans('server/users.permissions.user_read'), - 'update' => trans('server/users.permissions.user_update'), - 'delete' => trans('server/users.permissions.user_delete'), - ]), - ]), - ]), - Tabs\Tab::make('File') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.file_desc')) - ->icon('tabler-folders') - ->schema([ - CheckboxList::make('file') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'read' => 'Read', - 'read-content' => 'Read Content', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - 'archive' => 'Archive', - 'sftp' => 'SFTP', - ]) - ->descriptions([ - 'create' => trans('server/users.permissions.file_create'), - 'read' => trans('server/users.permissions.file_read'), - 'read-content' => trans('server/users.permissions.file_read_content'), - 'update' => trans('server/users.permissions.file_update'), - 'delete' => trans('server/users.permissions.file_delete'), - 'archive' => trans('server/users.permissions.file_archive'), - 'sftp' => trans('server/users.permissions.file_sftp'), - ]), - ]), - ]), - Tabs\Tab::make('Backup') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.backup_desc')) - ->icon('tabler-download') - ->schema([ - CheckboxList::make('backup') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'delete' => 'Delete', - 'download' => 'Download', - 'restore' => 'Restore', - ]) - ->descriptions([ - 'create' => trans('server/users.permissions.backup_create'), - 'read' => trans('server/users.permissions.backup_read'), - 'delete' => trans('server/users.permissions.backup_delete'), - 'download' => trans('server/users.permissions.backup_download'), - 'restore' => trans('server/users.permissions.backup_restore'), - ]), - ]), - ]), - Tabs\Tab::make('Allocation') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.allocation_desc')) - ->icon('tabler-network') - ->schema([ - CheckboxList::make('allocation') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.allocation_read'), - 'create' => trans('server/users.permissions.allocation_create'), - 'update' => trans('server/users.permissions.allocation_update'), - 'delete' => trans('server/users.permissions.allocation_delete'), - ]), - ]), - ]), - Tabs\Tab::make('Startup') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.startup_desc')) - ->icon('tabler-question-mark') - ->schema([ - CheckboxList::make('startup') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'read' => 'Read', - 'update' => 'Update', - 'docker-image' => 'Docker Image', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.startup_read'), - 'update' => trans('server/users.permissions.startup_update'), - 'docker-image' => trans('server/users.permissions.startup_docker_image'), - ]), - ]), - ]), - Tabs\Tab::make('Database') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.database_desc')) - ->icon('tabler-database') - ->schema([ - CheckboxList::make('database') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - 'view_password' => 'View Password', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.database_read'), - 'create' => trans('server/users.permissions.database_create'), - 'update' => trans('server/users.permissions.database_update'), - 'delete' => trans('server/users.permissions.database_delete'), - 'view_password' => trans('server/users.permissions.database_view_password'), - ]), - ]), - ]), - Tabs\Tab::make('Schedule') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.schedule_desc')) - ->icon('tabler-clock') - ->schema([ - CheckboxList::make('schedule') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'read' => 'Read', - 'create' => 'Create', - 'update' => 'Update', - 'delete' => 'Delete', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.schedule_read'), - 'create' => trans('server/users.permissions.schedule_create'), - 'update' => trans('server/users.permissions.schedule_update'), - 'delete' => trans('server/users.permissions.schedule_delete'), - ]), - ]), - ]), - Tabs\Tab::make('Settings') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.settings_desc')) - ->icon('tabler-settings') - ->schema([ - CheckboxList::make('settings') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'rename' => 'Rename', - 'reinstall' => 'Reinstall', - 'activity' => 'Activity', - ]) - ->descriptions([ - 'rename' => trans('server/users.permissions.setting_rename'), - 'reinstall' => trans('server/users.permissions.setting_reinstall'), - 'activity' => trans('server/users.permissions.activity_desc'), - ]), - ]), - ]), - Tabs\Tab::make('Activity') - ->schema([ - Section::make() - ->description(trans('server/users.permissions.activity_desc')) - ->icon('tabler-stack') - ->schema([ - CheckboxList::make('activity') - ->bulkToggleable() - ->label('') - ->columns(2) - ->options([ - 'read' => 'Read', - ]) - ->descriptions([ - 'read' => trans('server/users.permissions.activity_read'), - ]), - ]), - ]), - ]), - + ->schema($tabs), ]), ]) ->modalHeading('Invite User') diff --git a/app/Filament/Server/Widgets/ServerConsole.php b/app/Filament/Server/Widgets/ServerConsole.php index fab490942..20d17e719 100644 --- a/app/Filament/Server/Widgets/ServerConsole.php +++ b/app/Filament/Server/Widgets/ServerConsole.php @@ -11,6 +11,7 @@ use App\Services\Nodes\NodeJWTService; use App\Services\Servers\GetUserPermissionsService; use Filament\Widgets\Widget; use Illuminate\Support\Arr; +use Livewire\Attributes\Session; use Livewire\Attributes\On; class ServerConsole extends Widget @@ -26,6 +27,7 @@ class ServerConsole extends Widget public ?User $user = null; /** @var string[] */ + #[Session(key: 'server.{server.id}.history')] public array $history = []; public int $historyIndex = 0; @@ -130,7 +132,7 @@ class ServerConsole extends Widget #[On('websocket-error')] public function websocketError(): void { - AlertBanner::make() + AlertBanner::make('websocket_error') ->title('Could not connect to websocket!') ->body('Check your browser console for more details.') ->danger() diff --git a/app/Filament/Server/Widgets/ServerCpuChart.php b/app/Filament/Server/Widgets/ServerCpuChart.php index 7f6cb4458..a9fd434f7 100644 --- a/app/Filament/Server/Widgets/ServerCpuChart.php +++ b/app/Filament/Server/Widgets/ServerCpuChart.php @@ -4,6 +4,7 @@ namespace App\Filament\Server\Widgets; use App\Models\Server; use Carbon\Carbon; +use Filament\Facades\Filament; use Filament\Support\RawJs; use Filament\Widgets\ChartWidget; use Illuminate\Support\Number; @@ -16,10 +17,19 @@ class ServerCpuChart extends ChartWidget public ?Server $server = null; + public static function canView(): bool + { + /** @var Server $server */ + $server = Filament::getTenant(); + + return !$server->isInConflictState() && !$server->retrieveStatus()->isOffline(); + } + protected function getData(): array { + $period = auth()->user()->getCustomization()['console_graph_period'] ?? 30; $cpu = collect(cache()->get("servers.{$this->server->id}.cpu_absolute")) - ->slice(-10) + ->slice(-$period) ->map(fn ($value, $key) => [ 'cpu' => Number::format($value, maxPrecision: 2), 'timestamp' => Carbon::createFromTimestamp($key, auth()->user()->timezone ?? 'UTC')->format('H:i:s'), diff --git a/app/Filament/Server/Widgets/ServerMemoryChart.php b/app/Filament/Server/Widgets/ServerMemoryChart.php index 8f2d5f640..704e61581 100644 --- a/app/Filament/Server/Widgets/ServerMemoryChart.php +++ b/app/Filament/Server/Widgets/ServerMemoryChart.php @@ -4,6 +4,7 @@ namespace App\Filament\Server\Widgets; use App\Models\Server; use Carbon\Carbon; +use Filament\Facades\Filament; use Filament\Support\RawJs; use Filament\Widgets\ChartWidget; use Illuminate\Support\Number; @@ -16,9 +17,19 @@ class ServerMemoryChart extends ChartWidget public ?Server $server = null; + public static function canView(): bool + { + /** @var Server $server */ + $server = Filament::getTenant(); + + return !$server->isInConflictState() && !$server->retrieveStatus()->isOffline(); + } + protected function getData(): array { - $memUsed = collect(cache()->get("servers.{$this->server->id}.memory_bytes"))->slice(-10) + $period = auth()->user()->getCustomization()['console_graph_period'] ?? 30; + $memUsed = collect(cache()->get("servers.{$this->server->id}.memory_bytes")) + ->slice(-$period) ->map(fn ($value, $key) => [ 'memory' => Number::format(config('panel.use_binary_prefix') ? $value / 1024 / 1024 / 1024 : $value / 1000 / 1000 / 1000, maxPrecision: 2), 'timestamp' => Carbon::createFromTimestamp($key, auth()->user()->timezone ?? 'UTC')->format('H:i:s'), diff --git a/app/Filament/Server/Widgets/ServerNetworkChart.php b/app/Filament/Server/Widgets/ServerNetworkChart.php index 8caf58e64..79c9a2d15 100644 --- a/app/Filament/Server/Widgets/ServerNetworkChart.php +++ b/app/Filament/Server/Widgets/ServerNetworkChart.php @@ -4,61 +4,72 @@ namespace App\Filament\Server\Widgets; use App\Models\Server; use Carbon\Carbon; +use Filament\Facades\Filament; use Filament\Support\RawJs; use Filament\Widgets\ChartWidget; class ServerNetworkChart extends ChartWidget { - protected static ?string $heading = 'Network'; - protected static ?string $pollingInterval = '1s'; - protected static ?string $maxHeight = '300px'; + protected static ?string $maxHeight = '200px'; public ?Server $server = null; + public static function canView(): bool + { + /** @var Server $server */ + $server = Filament::getTenant(); + + return !$server->isInConflictState() && !$server->retrieveStatus()->isOffline(); + } + protected function getData(): array { - $data = cache()->get("servers.{$this->server->id}.network"); + $previous = null; - $rx = collect($data) - ->slice(-10) - ->map(fn ($value, $key) => [ - 'rx' => $value->rx_bytes, - 'timestamp' => Carbon::createFromTimestamp($key, (auth()->user()->timezone ?? 'UTC'))->format('H:i:s'), - ]) - ->all(); + $period = auth()->user()->getCustomization()['console_graph_period'] ?? 30; + $net = collect(cache()->get("servers.{$this->server->id}.network")) + ->slice(-$period) + ->map(function ($current, $timestamp) use (&$previous) { + $net = null; - $tx = collect($data) - ->slice(-10) - ->map(fn ($value, $key) => [ - 'tx' => $value->rx_bytes, - 'timestamp' => Carbon::createFromTimestamp($key, (auth()->user()->timezone ?? 'UTC'))->format('H:i:s'), - ]) + if ($previous !== null) { + $net = [ + 'rx' => max(0, $current->rx_bytes - $previous->rx_bytes), + 'tx' => max(0, $current->tx_bytes - $previous->tx_bytes), + 'timestamp' => Carbon::createFromTimestamp($timestamp, auth()->user()->timezone ?? 'UTC')->format('H:i:s'), + ]; + } + + $previous = $current; + + return $net; + }) ->all(); return [ 'datasets' => [ [ 'label' => 'Inbound', - 'data' => array_column($rx, 'rx'), + 'data' => array_column($net, 'rx'), 'backgroundColor' => [ - 'rgba(96, 165, 250, 0.3)', + 'rgba(100, 255, 105, 0.5)', ], 'tension' => '0.3', 'fill' => true, ], [ 'label' => 'Outbound', - 'data' => array_column($tx, 'tx'), + 'data' => array_column($net, 'tx'), 'backgroundColor' => [ - 'rgba(165, 96, 250, 0.3)', + 'rgba(96, 165, 250, 0.3)', ], 'tension' => '0.3', 'fill' => true, ], ], - 'labels' => array_column($rx, 'timestamp'), + 'labels' => array_column($net, 'timestamp'), ]; } @@ -69,25 +80,38 @@ class ServerNetworkChart extends ChartWidget protected function getOptions(): RawJs { + // TODO: use "panel.use_binary_prefix" config value return RawJs::make(<<<'JS' { scales: { x: { - grid: { - display: false, - }, - ticks: { - display: true, - }, - display: false, //debug + display: false, }, y: { + min: 0, ticks: { display: true, + callback(value) { + const bytes = typeof value === 'string' ? parseInt(value, 10) : value; + + if (bytes < 1) return '0 Bytes'; + + const i = Math.floor(Math.log(bytes) / Math.log(1024)); + const number = Number((bytes / Math.pow(1024, i)).toFixed(2)); + + return `${number} ${['Bytes', 'KiB', 'MiB', 'GiB', 'TiB'][i]}`; + }, }, }, } } JS); } + + public function getHeading(): string + { + $lastData = collect(cache()->get("servers.{$this->server->id}.network"))->last(); + + return 'Network - ↓' . convert_bytes_to_readable($lastData->rx_bytes ?? 0) . ' - ↑' . convert_bytes_to_readable($lastData->tx_bytes ?? 0); + } } diff --git a/app/Filament/Server/Widgets/ServerOverview.php b/app/Filament/Server/Widgets/ServerOverview.php index e3c77583f..f81362b67 100644 --- a/app/Filament/Server/Widgets/ServerOverview.php +++ b/app/Filament/Server/Widgets/ServerOverview.php @@ -4,7 +4,6 @@ namespace App\Filament\Server\Widgets; use App\Enums\ContainerStatus; use App\Filament\Server\Components\SmallStatBlock; -use App\Filament\Server\Components\StatBlock; use App\Models\Server; use Carbon\CarbonInterface; use Filament\Widgets\StatsOverviewWidget; @@ -19,13 +18,12 @@ class ServerOverview extends StatsOverviewWidget protected function getStats(): array { return [ - StatBlock::make('Name', $this->server->name) - ->description($this->server->description) + SmallStatBlock::make('Name', $this->server->name) ->extraAttributes([ 'class' => 'overflow-x-auto', ]), - StatBlock::make('Status', $this->status()), - StatBlock::make('Address', $this->server->allocation->address) + SmallStatBlock::make('Status', $this->status()), + SmallStatBlock::make('Address', $this->server->allocation->address) ->extraAttributes([ 'class' => 'overflow-x-auto', ]), diff --git a/app/Http/Controllers/Api/Application/Servers/ServerManagementController.php b/app/Http/Controllers/Api/Application/Servers/ServerManagementController.php index 09a9c689d..bd6babb41 100644 --- a/app/Http/Controllers/Api/Application/Servers/ServerManagementController.php +++ b/app/Http/Controllers/Api/Application/Servers/ServerManagementController.php @@ -13,6 +13,7 @@ use App\Services\Servers\TransferServerService; use Dedoc\Scramble\Attributes\Group; use Illuminate\Http\Client\ConnectionException; use Illuminate\Http\Response; +use Illuminate\Support\Arr; #[Group('Server', weight: 4)] class ServerManagementController extends ApplicationApiController @@ -82,15 +83,24 @@ class ServerManagementController extends ApplicationApiController $validatedData = $request->validate([ 'node_id' => 'required|exists:nodes,id', 'allocation_id' => 'required|bail|unique:servers|exists:allocations,id', - 'allocation_additional' => 'nullable', + 'allocation_additional' => 'nullable|array', + 'allocation_additional.*' => 'integer|exists:allocations,id', ]); - if ($this->transferServerService->handle($server, $validatedData)) { - // Transfer started + if ($this->transferServerService->handle($server, Arr::get($validatedData, 'node_id'), Arr::get($validatedData, 'allocation_id'), Arr::get($validatedData, 'allocation_additional', []))) { + /** + * Transfer started + * + * @status 204 + */ return $this->returnNoContent(); } - // Node was not viable + /** + * Node was not viable + * + * @status 406 + */ return $this->returnNotAcceptable(); } @@ -104,7 +114,11 @@ class ServerManagementController extends ApplicationApiController public function cancelTransfer(ServerWriteRequest $request, Server $server): Response { if (!$transfer = $server->transfer) { - // Server is not transferring + /** + * Server is not transferring + * + * @status 406 + */ return $this->returnNotAcceptable(); } @@ -113,6 +127,11 @@ class ServerManagementController extends ApplicationApiController $this->daemonServerRepository->setServer($server)->cancelTransfer(); + /** + * Transfer cancelled + * + * @status 204 + */ return $this->returnNoContent(); } } diff --git a/app/Http/Controllers/Api/Client/Servers/FileController.php b/app/Http/Controllers/Api/Client/Servers/FileController.php index 88162a776..133c92202 100644 --- a/app/Http/Controllers/Api/Client/Servers/FileController.php +++ b/app/Http/Controllers/Api/Client/Servers/FileController.php @@ -172,8 +172,8 @@ class FileController extends ClientApiController Activity::event('server:file.rename') ->property('directory', $request->input('root')) ->property('files', $files) - ->property('to', $files['to']) - ->property('from', $files['from']) + ->property('to', $files[0]['to']) + ->property('from', $files[0]['from']) ->log(); return new JsonResponse([], Response::HTTP_NO_CONTENT); @@ -210,10 +210,12 @@ class FileController extends ClientApiController { $file = $this->fileRepository->setServer($server)->compressFiles( $request->input('root'), - $request->input('files') + $request->input('files'), + $request->input('name') ); Activity::event('server:file.compress') + ->property('name', $file['name']) ->property('directory', $request->input('root')) ->property('files', $request->input('files')) ->log(); diff --git a/app/Http/Controllers/Api/Client/Servers/PowerController.php b/app/Http/Controllers/Api/Client/Servers/PowerController.php index b1843d192..dcf78e0a7 100644 --- a/app/Http/Controllers/Api/Client/Servers/PowerController.php +++ b/app/Http/Controllers/Api/Client/Servers/PowerController.php @@ -9,6 +9,7 @@ use App\Repositories\Daemon\DaemonPowerRepository; use App\Http\Controllers\Api\Client\ClientApiController; use App\Http\Requests\Api\Client\Servers\SendPowerRequest; use Dedoc\Scramble\Attributes\Group; +use Illuminate\Http\Client\ConnectionException; #[Group('Server', weight: 2)] class PowerController extends ClientApiController @@ -25,6 +26,8 @@ class PowerController extends ClientApiController * Send power action * * Send a power action to a server. + * + * @throws ConnectionException */ public function index(SendPowerRequest $request, Server $server): Response { diff --git a/app/Http/Controllers/Api/Client/Servers/SettingsController.php b/app/Http/Controllers/Api/Client/Servers/SettingsController.php index ddb512b9f..169f825b5 100644 --- a/app/Http/Controllers/Api/Client/Servers/SettingsController.php +++ b/app/Http/Controllers/Api/Client/Servers/SettingsController.php @@ -36,26 +36,22 @@ class SettingsController extends ClientApiController $name = $request->input('name'); $description = $request->has('description') ? (string) $request->input('description') : $server->description; - $server->name = $name; - - if (config('panel.editable_server_descriptions')) { - $server->description = $description; - } - - $server->save(); - if ($server->name !== $name) { Activity::event('server:settings.rename') ->property(['old' => $server->name, 'new' => $name]) ->log(); + $server->name = $name; } - if ($server->description !== $description) { + if ($server->description !== $description && config('panel.editable_server_descriptions')) { Activity::event('server:settings.description') ->property(['old' => $server->description, 'new' => $description]) ->log(); + $server->description = $description; } + $server->save(); + return new JsonResponse([], Response::HTTP_NO_CONTENT); } diff --git a/app/Http/Controllers/Api/Client/Servers/StartupController.php b/app/Http/Controllers/Api/Client/Servers/StartupController.php index 0e09ae202..5b8c1a26c 100644 --- a/app/Http/Controllers/Api/Client/Servers/StartupController.php +++ b/app/Http/Controllers/Api/Client/Servers/StartupController.php @@ -37,7 +37,7 @@ class StartupController extends ClientApiController $startup = $this->startupCommandService->handle($server); return $this->fractal->collection( - $server->variables()->orderBy('sort')->where('user_viewable', true)->get() + $server->variables()->where('user_viewable', true)->orderBy('sort')->get() ) ->transformWith($this->getTransformer(EggVariableTransformer::class)) ->addMeta([ diff --git a/app/Http/Controllers/Api/Remote/ActivityProcessingController.php b/app/Http/Controllers/Api/Remote/ActivityProcessingController.php index 3b6badaa5..ab84eb626 100644 --- a/app/Http/Controllers/Api/Remote/ActivityProcessingController.php +++ b/app/Http/Controllers/Api/Remote/ActivityProcessingController.php @@ -5,10 +5,8 @@ namespace App\Http\Controllers\Api\Remote; use Carbon\Carbon; use Illuminate\Support\Str; use App\Models\User; -use Webmozart\Assert\Assert; use App\Models\Server; use App\Models\ActivityLog; -use App\Models\ActivityLogSubject; use App\Http\Controllers\Controller; use App\Http\Requests\Api\Remote\ActivityEventRequest; @@ -16,8 +14,6 @@ class ActivityProcessingController extends Controller { public function __invoke(ActivityEventRequest $request): void { - $tz = Carbon::now()->getTimezone(); - /** @var \App\Models\Node $node */ $node = $request->attributes->get('node'); @@ -51,11 +47,8 @@ class ActivityProcessingController extends Controller $log = [ 'ip' => empty($datum['ip']) ? '127.0.0.1' : $datum['ip'], 'event' => $datum['event'], - 'properties' => json_encode($datum['metadata'] ?? []), - // We have to change the time to the current timezone due to the way Laravel is handling - // the date casting internally. If we just leave it in UTC it ends up getting double-cast - // and the time is way off. - 'timestamp' => $when->setTimezone($tz), + 'properties' => $datum['metadata'] ?? [], + 'timestamp' => $when, ]; if ($user = $users->get($datum['user'])) { @@ -71,19 +64,17 @@ class ActivityProcessingController extends Controller } foreach ($logs as $key => $data) { - Assert::isInstanceOf($server = $servers->get($key), Server::class); + $server = $servers->get($key); + assert($server instanceof Server); - $batch = []; foreach ($data as $datum) { - $id = ActivityLog::insertGetId($datum); - $batch[] = [ - 'activity_log_id' => $id, + /** @var ActivityLog $activityLog */ + $activityLog = ActivityLog::forceCreate($datum); + $activityLog->subjects()->create([ 'subject_id' => $server->id, 'subject_type' => $server->getMorphClass(), - ]; + ]); } - - ActivityLogSubject::insert($batch); } } } diff --git a/app/Http/Controllers/Auth/OAuthController.php b/app/Http/Controllers/Auth/OAuthController.php index c5ca51d3b..313bca976 100644 --- a/app/Http/Controllers/Auth/OAuthController.php +++ b/app/Http/Controllers/Auth/OAuthController.php @@ -44,6 +44,20 @@ class OAuthController extends Controller return redirect()->route('auth.login'); } + // Check for errors (https://www.oauth.com/oauth2-servers/server-side-apps/possible-errors/) + if ($request->get('error')) { + report($request->get('error_description') ?? $request->get('error')); + + Notification::make() + ->title('Something went wrong') + ->body($request->get('error')) + ->danger() + ->persistent() + ->send(); + + return redirect()->route('auth.login'); + } + $oauthUser = Socialite::driver($driver)->user(); // User is already logged in and wants to link a new OAuth Provider @@ -53,7 +67,7 @@ class OAuthController extends Controller $this->updateService->handle($request->user(), ['oauth' => $oauth]); - return redirect(EditProfile::getUrl(['tab' => '-oauth-tab'])); + return redirect(EditProfile::getUrl(['tab' => '-oauth-tab'], panel: 'app')); } try { diff --git a/app/Http/Middleware/RequireTwoFactorAuthentication.php b/app/Http/Middleware/RequireTwoFactorAuthentication.php index 3a098c5bd..5bb02d128 100644 --- a/app/Http/Middleware/RequireTwoFactorAuthentication.php +++ b/app/Http/Middleware/RequireTwoFactorAuthentication.php @@ -5,6 +5,9 @@ namespace App\Http\Middleware; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Exceptions\Http\TwoFactorAuthRequiredException; +use App\Filament\Pages\Auth\EditProfile; +use App\Livewire\AlertBanner; +use App\Models\User; class RequireTwoFactorAuthentication { @@ -14,11 +17,6 @@ class RequireTwoFactorAuthentication public const LEVEL_ALL = 2; - /** - * The route to redirect a user to enable 2FA. - */ - protected string $redirectRoute = '/account'; - /** * Check the user state on the incoming request to determine if they should be allowed to * proceed or not. This checks if the Panel is configured to require 2FA on an account in @@ -29,31 +27,37 @@ class RequireTwoFactorAuthentication */ public function handle(Request $request, \Closure $next): mixed { + /** @var ?User $user */ $user = $request->user(); + $uri = rtrim($request->getRequestUri(), '/') . '/'; $current = $request->route()->getName(); - if (!$user || Str::startsWith($uri, ['/auth/']) || Str::startsWith($current, ['auth.', 'account.'])) { + if (!$user || Str::startsWith($uri, ['/auth/', '/profile']) || Str::startsWith($current, ['auth.', 'account.', 'filament.app.auth.'])) { return $next($request); } - /** @var \App\Models\User $user */ $level = (int) config('panel.auth.2fa_required'); - // If this setting is not configured, or the user is already using 2FA then we can just - // send them right through, nothing else needs to be checked. - // - // If the level is set as admin and the user is not an admin, pass them through as well. + if ($level === self::LEVEL_NONE || $user->use_totp) { + // If this setting is not configured, or the user is already using 2FA then we can just send them right through, nothing else needs to be checked. return $next($request); - } elseif ($level === self::LEVEL_ADMIN && !$user->isRootAdmin()) { + } elseif ($level === self::LEVEL_ADMIN && !$user->isAdmin()) { + // If the level is set as admin and the user is not an admin, pass them through as well. return $next($request); } - // For API calls return an exception which gets rendered nicely in the API response. + // For API calls return an exception which gets rendered nicely in the API response... if ($request->isJson() || Str::startsWith($uri, '/api/')) { throw new TwoFactorAuthRequiredException(); } - return redirect()->to($this->redirectRoute); + // ... otherwise display banner and redirect to profile + AlertBanner::make('2fa_must_be_enabled') + ->body(trans('auth.2fa_must_be_enabled')) + ->warning() + ->send(); + + return redirect(EditProfile::getUrl(['tab' => '-2fa-tab'], panel: 'app')); } } diff --git a/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php b/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php index c24d5518a..2f5b67587 100644 --- a/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php +++ b/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php @@ -18,26 +18,7 @@ class StoreNodeRequest extends ApplicationApiRequest */ public function rules(?array $rules = null): array { - return collect($rules ?? Node::getRules())->only([ - 'public', - 'name', - 'description', - 'fqdn', - 'scheme', - 'behind_proxy', - 'maintenance_mode', - 'memory', - 'memory_overallocate', - 'disk', - 'disk_overallocate', - 'cpu', - 'cpu_overallocate', - 'upload_size', - 'daemon_listen', - 'daemon_sftp', - 'daemon_sftp_alias', - 'daemon_base', - ])->mapWithKeys(function ($value, $key) { + return collect($rules ?? Node::getRules())->mapWithKeys(function ($value, $key) { return [snake_case($key) => $value]; })->toArray(); } diff --git a/app/Http/Requests/Api/Application/Servers/UpdateServerBuildConfigurationRequest.php b/app/Http/Requests/Api/Application/Servers/UpdateServerBuildConfigurationRequest.php index 8c8d9e0ec..052ae1d4b 100644 --- a/app/Http/Requests/Api/Application/Servers/UpdateServerBuildConfigurationRequest.php +++ b/app/Http/Requests/Api/Application/Servers/UpdateServerBuildConfigurationRequest.php @@ -12,7 +12,7 @@ class UpdateServerBuildConfigurationRequest extends ServerWriteRequest */ public function rules(): array { - $rules = Server::getRulesForUpdate($this->parameter('server', Server::class)); + $rules = $this->route() ? Server::getRulesForUpdate($this->parameter('server', Server::class)) : Server::getRules(); return [ 'allocation' => $rules['allocation_id'], @@ -26,13 +26,17 @@ class UpdateServerBuildConfigurationRequest extends ServerWriteRequest 'limits.threads' => $this->requiredToOptional('threads', $rules['threads'], true), 'limits.disk' => $this->requiredToOptional('disk', $rules['disk'], true), - // Legacy rules to maintain backwards compatable API support without requiring - // a major version bump. + // Deprecated - use limits.memory 'memory' => $this->requiredToOptional('memory', $rules['memory']), + // Deprecated - use limits.swap 'swap' => $this->requiredToOptional('swap', $rules['swap']), + // Deprecated - use limits.io 'io' => $this->requiredToOptional('io', $rules['io']), + // Deprecated - use limits.cpu 'cpu' => $this->requiredToOptional('cpu', $rules['cpu']), + // Deprecated - use limits.threads 'threads' => $this->requiredToOptional('threads', $rules['threads']), + // Deprecated - use limits.disk 'disk' => $this->requiredToOptional('disk', $rules['disk']), 'add_allocations' => 'bail|array', diff --git a/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php b/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php index 0d781a9bf..ad419e8ac 100644 --- a/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php +++ b/app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php @@ -11,7 +11,7 @@ class UpdateServerDetailsRequest extends ServerWriteRequest */ public function rules(): array { - $rules = Server::getRulesForUpdate($this->parameter('server', Server::class)); + $rules = $this->route() ? Server::getRulesForUpdate($this->parameter('server', Server::class)) : Server::getRules(); return [ 'external_id' => $rules['external_id'], diff --git a/app/Http/Requests/Api/Application/Servers/UpdateServerStartupRequest.php b/app/Http/Requests/Api/Application/Servers/UpdateServerStartupRequest.php index c03bb9bdb..d1330c9ae 100644 --- a/app/Http/Requests/Api/Application/Servers/UpdateServerStartupRequest.php +++ b/app/Http/Requests/Api/Application/Servers/UpdateServerStartupRequest.php @@ -17,12 +17,12 @@ class UpdateServerStartupRequest extends ApplicationApiRequest */ public function rules(): array { - $data = Server::getRulesForUpdate($this->parameter('server', Server::class)); + $rules = $this->route() ? Server::getRulesForUpdate($this->parameter('server', Server::class)) : Server::getRules(); return [ 'startup' => 'sometimes|string', 'environment' => 'present|array', - 'egg' => $data['egg_id'], + 'egg' => $rules['egg_id'], 'image' => 'sometimes|string', 'skip_scripts' => 'present|boolean', ]; diff --git a/app/Http/Requests/Api/Client/Servers/Files/CompressFilesRequest.php b/app/Http/Requests/Api/Client/Servers/Files/CompressFilesRequest.php index 6e060a6d3..9c53e6d7f 100644 --- a/app/Http/Requests/Api/Client/Servers/Files/CompressFilesRequest.php +++ b/app/Http/Requests/Api/Client/Servers/Files/CompressFilesRequest.php @@ -21,6 +21,7 @@ class CompressFilesRequest extends ClientApiRequest 'root' => 'sometimes|nullable|string', 'files' => 'required|array', 'files.*' => 'string', + 'name' => 'sometimes|nullable|string', ]; } } diff --git a/app/Livewire/AlertBanner.php b/app/Livewire/AlertBanner.php index a35ebae8f..773046081 100644 --- a/app/Livewire/AlertBanner.php +++ b/app/Livewire/AlertBanner.php @@ -44,9 +44,8 @@ final class AlertBanner implements Wireable public static function fromLivewire(mixed $value): AlertBanner { - $static = AlertBanner::make(); + $static = AlertBanner::make($value['id']); - $static->id($value['id']); $static->title($value['title']); $static->body($value['body']); $static->status($value['status']); diff --git a/app/Livewire/AlertBannerContainer.php b/app/Livewire/AlertBannerContainer.php index 8f2c03f3c..d5d7bf60c 100644 --- a/app/Livewire/AlertBannerContainer.php +++ b/app/Livewire/AlertBannerContainer.php @@ -3,6 +3,7 @@ namespace App\Livewire; use Illuminate\Contracts\View\View; +use Livewire\Attributes\On; use Livewire\Component; class AlertBannerContainer extends Component @@ -16,6 +17,7 @@ class AlertBannerContainer extends Component $this->pullFromSession(); } + #[On('alertBannerSent')] public function pullFromSession(): void { foreach (session()->pull('alert-banners', []) as $alertBanner) { diff --git a/app/Livewire/Installer/Steps/DatabaseStep.php b/app/Livewire/Installer/Steps/DatabaseStep.php index 2751d1a47..387a50fe2 100644 --- a/app/Livewire/Installer/Steps/DatabaseStep.php +++ b/app/Livewire/Installer/Steps/DatabaseStep.php @@ -19,6 +19,7 @@ class DatabaseStep 'sqlite' => 'SQLite', 'mariadb' => 'MariaDB', 'mysql' => 'MySQL', + 'pgsql' => 'PostgreSQL', ]; public static function make(PanelInstaller $installer): Step @@ -39,15 +40,24 @@ class DatabaseStep ->afterStateUpdated(function ($state, Set $set, Get $get) { $set('env_database.DB_DATABASE', $state === 'sqlite' ? 'database.sqlite' : 'panel'); - if ($state === 'sqlite') { - $set('env_database.DB_HOST', null); - $set('env_database.DB_PORT', null); - $set('env_database.DB_USERNAME', null); - $set('env_database.DB_PASSWORD', null); - } else { - $set('env_database.DB_HOST', $get('env_database.DB_HOST') ?? '127.0.0.1'); - $set('env_database.DB_PORT', $get('env_database.DB_PORT') ?? '3306'); - $set('env_database.DB_USERNAME', $get('env_database.DB_USERNAME') ?? 'pelican'); + switch ($state) { + case 'sqlite': + $set('env_database.DB_HOST', null); + $set('env_database.DB_PORT', null); + $set('env_database.DB_USERNAME', null); + $set('env_database.DB_PASSWORD', null); + break; + case 'mariadb': + case 'mysql': + $set('env_database.DB_HOST', $get('env_database.DB_HOST') ?? '127.0.0.1'); + $set('env_database.DB_USERNAME', $get('env_database.DB_USERNAME') ?? 'pelican'); + $set('env_database.DB_PORT', '3306'); + break; + case 'pgsql': + $set('env_database.DB_HOST', $get('env_database.DB_HOST') ?? '127.0.0.1'); + $set('env_database.DB_USERNAME', $get('env_database.DB_USERNAME') ?? 'pelican'); + $set('env_database.DB_PORT', '5432'); + break; } }), TextInput::make('env_database.DB_DATABASE') @@ -114,7 +124,6 @@ class DatabaseStep 'database' => $database, 'username' => $username, 'password' => $password, - 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'strict' => true, ]); diff --git a/app/Models/ActivityLog.php b/app/Models/ActivityLog.php index cad17c3e6..ab78204bd 100644 --- a/app/Models/ActivityLog.php +++ b/app/Models/ActivityLog.php @@ -6,6 +6,7 @@ use App\Traits\HasValidation; use Carbon\Carbon; use Illuminate\Support\Facades\Event; use App\Events\ActivityLogged; +use Filament\Facades\Filament; use Filament\Support\Contracts\HasIcon; use Filament\Support\Contracts\HasLabel; use Illuminate\Database\Eloquent\Builder; @@ -120,11 +121,6 @@ class ActivityLog extends Model implements HasIcon, HasLabel return $builder->whereMorphedTo('actor', $actor); } - /** - * Returns models to be pruned. - * - * @see https://laravel.com/docs/9.x/eloquent#pruning-models - */ public function prunable(): Builder { if (is_null(config('activity.prune_days'))) { @@ -134,10 +130,6 @@ class ActivityLog extends Model implements HasIcon, HasLabel return static::where('timestamp', '<=', Carbon::now()->subDays(config('activity.prune_days'))); } - /** - * Boots the model event listeners. This will trigger an activity log event every - * time a new model is inserted which can then be captured and worked with as needed. - */ protected static function boot(): void { parent::boot(); @@ -181,9 +173,11 @@ class ActivityLog extends Model implements HasIcon, HasLabel ]); } + $avatarUrl = Filament::getUserAvatarUrl($user); + return "
- +

$user->username — $this->event

diff --git a/app/Models/Allocation.php b/app/Models/Allocation.php index 505ed4a2e..39ae0ad60 100644 --- a/app/Models/Allocation.php +++ b/app/Models/Allocation.php @@ -72,6 +72,20 @@ class Allocation extends Model static::deleting(function (self $allocation) { throw_if($allocation->server_id, new ServerUsingAllocationException(trans('exceptions.allocations.server_using'))); }); + + static::updating(function ($allocation) { + $originalServerId = $allocation->getOriginal('server_id'); + if (!$originalServerId) { + return; + } + $server = Server::find($originalServerId); + if (!$server) { + return; + } + if ($allocation->isDirty('server_id') && is_null($allocation->server_id) && $allocation->id === $server->allocation_id) { + return false; + } + }); } protected function casts(): array @@ -103,7 +117,7 @@ class Allocation extends Model protected function address(): Attribute { return Attribute::make( - get: fn () => "$this->alias:$this->port", + get: fn () => (is_ipv6($this->alias) ? "[$this->alias]" : $this->alias) . ":$this->port", ); } diff --git a/app/Models/Backup.php b/app/Models/Backup.php index b4f807a4f..e07d19948 100644 --- a/app/Models/Backup.php +++ b/app/Models/Backup.php @@ -7,6 +7,8 @@ use App\Traits\HasValidation; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use App\Eloquent\BackupQueryBuilder; +use App\Enums\BackupStatus; +use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\Relations\BelongsTo; @@ -23,6 +25,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; * @property int $bytes * @property string|null $upload_id * @property \Carbon\CarbonImmutable|null $completed_at + * @property BackupStatus $status * @property \Carbon\CarbonImmutable $created_at * @property \Carbon\CarbonImmutable $updated_at * @property \Carbon\CarbonImmutable|null $deleted_at @@ -79,6 +82,13 @@ class Backup extends Model implements Validatable ]; } + protected function status(): Attribute + { + return Attribute::make( + get: fn () => !$this->completed_at ? BackupStatus::InProgress : ($this->is_successful ? BackupStatus::Successful : BackupStatus::Failed), + ); + } + public function server(): BelongsTo { return $this->belongsTo(Server::class); diff --git a/app/Models/Database.php b/app/Models/Database.php index 80fac2c38..0b7624cec 100644 --- a/app/Models/Database.php +++ b/app/Models/Database.php @@ -8,7 +8,6 @@ use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; -use Illuminate\Support\Facades\DB; /** * @property int $id @@ -36,8 +35,6 @@ class Database extends Model implements Validatable */ public const RESOURCE_NAME = 'server_database'; - public const DEFAULT_CONNECTION_NAME = 'dynamic'; - /** * The attributes excluded from the model's JSON form. */ @@ -104,7 +101,7 @@ class Database extends Model implements Validatable */ private function run(string $statement): bool { - return DB::connection(self::DEFAULT_CONNECTION_NAME)->statement($statement); + return $this->host->buildConnection()->statement($statement); } /** diff --git a/app/Models/DatabaseHost.php b/app/Models/DatabaseHost.php index c8512c1de..ddaac259c 100644 --- a/app/Models/DatabaseHost.php +++ b/app/Models/DatabaseHost.php @@ -4,10 +4,12 @@ namespace App\Models; use App\Contracts\Validatable; use App\Traits\HasValidation; +use Illuminate\Database\Connection; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Support\Facades\DB; /** * @property int $id @@ -82,4 +84,21 @@ class DatabaseHost extends Model implements Validatable { return $this->hasMany(Database::class); } + + public function buildConnection(string $database = 'mysql', string $charset = 'utf8', string $collation = 'utf8_unicode_ci'): Connection + { + /** @var Connection $connection */ + $connection = DB::build([ + 'driver' => 'mysql', + 'host' => $this->host, + 'port' => $this->port, + 'database' => $database, + 'username' => $this->username, + 'password' => $this->password, + 'charset' => $charset, + 'collation' => $collation, + ]); + + return $connection; + } } diff --git a/app/Models/Egg.php b/app/Models/Egg.php index 300371f25..54883e4ba 100644 --- a/app/Models/Egg.php +++ b/app/Models/Egg.php @@ -5,11 +5,13 @@ namespace App\Models; use App\Contracts\Validatable; use App\Exceptions\Service\Egg\HasChildrenException; use App\Exceptions\Service\HasActiveServersException; +use App\Extensions\Features\FeatureProvider; use App\Traits\HasValidation; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Support\Str; /** @@ -70,19 +72,6 @@ class Egg extends Model implements Validatable */ public const EXPORT_VERSION = 'PLCN_v1'; - /** - * Different features that can be enabled on any given egg. These are used internally - * to determine which types of frontend functionality should be shown to the user. Eggs - * will automatically inherit features from a parent egg if they are already configured - * to copy configuration values from said egg. - * - * To skip copying the features, an empty array value should be passed in ("[]") rather - * than leaving it null. - */ - public const FEATURE_EULA_POPUP = 'eula'; - - public const FEATURE_FASTDL = 'fastdl'; - /** * Fields that are not mass assignable. */ @@ -172,6 +161,12 @@ class Egg extends Model implements Validatable }); } + /** @return array */ + public function features(): array + { + return FeatureProvider::getProviders($this->features); + } + /** * Returns the install script for the egg; if egg is copying from another * it will return the copied script. @@ -289,6 +284,11 @@ class Egg extends Model implements Validatable return $this->configFrom->file_denylist; } + public function mounts(): MorphToMany + { + return $this->morphToMany(Mount::class, 'mountable'); + } + /** * Gets all servers associated with this egg. */ diff --git a/app/Models/File.php b/app/Models/File.php index 80077f63e..b8d9cfef2 100644 --- a/app/Models/File.php +++ b/app/Models/File.php @@ -12,6 +12,9 @@ use Illuminate\Http\Client\ConnectionException; use Sushi\Sushi; /** + * \App\Models\File. + * + * @property int $id * @property string $name * @property Carbon $created_at * @property Carbon $modified_at @@ -27,11 +30,7 @@ class File extends Model { use Sushi; - protected $primaryKey = 'name'; - - public $incrementing = false; - - protected $keyType = 'string'; + protected int $sushiInsertChunkSize = 100; public const ARCHIVE_MIMES = [ 'application/vnd.rar', // .rar @@ -151,23 +150,17 @@ class File extends Model try { $fileRepository = (new DaemonFileRepository())->setServer(self::$server); - $contents = []; - - try { - if (!is_null(self::$searchTerm)) { - $contents = cache()->remember('file_search_' . self::$path . '_' . self::$searchTerm, now()->addMinute(), fn () => $fileRepository->search(self::$searchTerm, self::$path)); - } else { - $contents = $fileRepository->getDirectory(self::$path ?? '/'); - } - } catch (ConnectionException $exception) { - report($exception); + if (!is_null(self::$searchTerm)) { + $contents = cache()->remember('file_search_' . self::$path . '_' . self::$searchTerm, now()->addMinute(), fn () => $fileRepository->search(self::$searchTerm, self::$path)); + } else { + $contents = $fileRepository->getDirectory(self::$path ?? '/'); } if (isset($contents['error'])) { throw new Exception($contents['error']); } - return array_map(function ($file) { + $rows = array_map(function ($file) { return [ 'name' => $file['name'], 'created_at' => Carbon::parse($file['created'])->timezone('UTC'), @@ -181,6 +174,14 @@ class File extends Model 'mime_type' => $file['mime'], ]; }, $contents); + + $rowCount = count($rows); + $limit = 999; + if ($rowCount > $limit) { + $this->sushiInsertChunkSize = min(floor($limit / count($this->getSchema())), $rowCount); + } + + return $rows; } catch (Exception $exception) { report($exception); @@ -189,8 +190,12 @@ class File extends Model $message = $message->after('cURL error 7: ')->before(' after '); } + if ($exception instanceof ConnectionException) { + $message = str('Node connection failed'); + } + AlertBanner::make() - ->title('Could not load files') + ->title('Could not load files!') ->body($message->toString()) ->danger() ->send(); diff --git a/app/Models/Mount.php b/app/Models/Mount.php index ebcd51e2d..b50d91bf2 100644 --- a/app/Models/Mount.php +++ b/app/Models/Mount.php @@ -5,7 +5,7 @@ namespace App\Models; use App\Contracts\Validatable; use App\Traits\HasValidation; use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\Relations\BelongsToMany; +use Illuminate\Database\Eloquent\Relations\MorphToMany; /** * @property int $id @@ -102,24 +102,24 @@ class Mount extends Model implements Validatable /** * Returns all eggs that have this mount assigned. */ - public function eggs(): BelongsToMany + public function eggs(): MorphToMany { - return $this->belongsToMany(Egg::class); + return $this->morphedByMany(Egg::class, 'mountable'); } /** * Returns all nodes that have this mount assigned. */ - public function nodes(): BelongsToMany + public function nodes(): MorphToMany { - return $this->belongsToMany(Node::class); + return $this->morphedByMany(Node::class, 'mountable'); } /** * Returns all servers that have this mount assigned. */ - public function servers(): BelongsToMany + public function servers(): MorphToMany { - return $this->belongsToMany(Server::class); + return $this->morphedByMany(Server::class, 'mountable'); } } diff --git a/app/Models/MountNode.php b/app/Models/MountNode.php deleted file mode 100644 index 9c011a3b9..000000000 --- a/app/Models/MountNode.php +++ /dev/null @@ -1,14 +0,0 @@ - ['required', 'string', 'min:1', 'max:100'], 'description' => ['string', 'nullable'], 'public' => ['boolean'], - 'fqdn' => ['required', 'string'], + 'fqdn' => ['required', 'string', 'notIn:0.0.0.0,127.0.0.1,localhost'], 'scheme' => ['required', 'string', 'in:http,https'], 'behind_proxy' => ['boolean'], 'memory' => ['required', 'numeric', 'min:0'], @@ -214,7 +217,7 @@ class Node extends Model implements Validatable ], ], 'allowed_mounts' => $this->mounts->pluck('source')->toArray(), - 'remote' => route('filament.app.resources...index'), + 'remote' => config('app.url'), ]; } @@ -239,9 +242,9 @@ class Node extends Model implements Validatable return $this->maintenance_mode; } - public function mounts(): HasManyThrough + public function mounts(): MorphToMany { - return $this->hasManyThrough(Mount::class, MountNode::class, 'node_id', 'id', 'id', 'mount_id'); + return $this->morphToMany(Mount::class, 'mountable'); } /** @@ -268,6 +271,11 @@ class Node extends Model implements Validatable return $this->belongsToMany(DatabaseHost::class); } + public function roles(): HasManyThrough + { + return $this->hasManyThrough(Role::class, NodeRole::class, 'node_id', 'id', 'id', 'role_id'); + } + /** * Returns a boolean if the node is viable for an additional server to be placed on it. */ @@ -365,16 +373,20 @@ class Node extends Model implements Validatable ]; try { - $this->systemInformation(); - return Http::daemon($this) + $data = Http::daemon($this) ->connectTimeout(1) ->timeout(1) ->get('/api/system/utilization') - ->json() ?? $default; + ->json(); + + if ($data['memory_total']) { + return $data; + } } catch (Exception) { - return $default; } + + return $default; } /** @return string[] */ @@ -392,10 +404,11 @@ class Node extends Model implements Validatable } } - // Only IPV4 - $ips = $ips->filter(fn (string $ip) => filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false); + $ips = $ips->filter(fn (string $ip) => is_ip($ip)); + // TODO: remove later $ips->push('0.0.0.0'); + $ips->push('::'); return $ips->unique()->all(); }); diff --git a/app/Models/NodeRole.php b/app/Models/NodeRole.php new file mode 100644 index 000000000..f9fe1e85c --- /dev/null +++ b/app/Models/NodeRole.php @@ -0,0 +1,12 @@ + ['required', 'string'], ]; - /** - * All the permissions available on the system. You should use self::permissions() - * to retrieve them, and not directly access this array as it is subject to change. - * - * @see Permission::permissions() - * - * @var array, - * }> - */ - protected static array $permissions = [ - 'websocket' => [ - 'description' => 'Allows the user to connect to the server websocket, giving them access to view console output and realtime server stats.', - 'keys' => [ - 'connect' => 'Allows a user to connect to the websocket instance for a server to stream the console.', - ], - ], - - 'control' => [ - 'description' => 'Permissions that control a user\'s ability to control the power state of a server, or send commands.', - 'keys' => [ - 'console' => 'Allows a user to send commands to the server instance via the console.', - 'start' => 'Allows a user to start the server if it is stopped.', - 'stop' => 'Allows a user to stop a server if it is running.', - 'restart' => 'Allows a user to perform a server restart. This allows them to start the server if it is offline, but not put the server in a completely stopped state.', - ], - ], - - 'user' => [ - 'description' => 'Permissions that allow a user to manage other subusers on a server. They will never be able to edit their own account, or assign permissions they do not have themselves.', - 'keys' => [ - 'create' => 'Allows a user to create new subusers for the server.', - 'read' => 'Allows the user to view subusers and their permissions for the server.', - 'update' => 'Allows a user to modify other subusers.', - 'delete' => 'Allows a user to delete a subuser from the server.', - ], - ], - - 'file' => [ - 'description' => 'Permissions that control a user\'s ability to modify the filesystem for this server.', - 'keys' => [ - 'create' => 'Allows a user to create additional files and folders via the Panel or direct upload.', - 'read' => 'Allows a user to view the contents of a directory, but not view the contents of or download files.', - 'read-content' => 'Allows a user to view the contents of a given file. This will also allow the user to download files.', - 'update' => 'Allows a user to update the contents of an existing file or directory.', - 'delete' => 'Allows a user to delete files or directories.', - 'archive' => 'Allows a user to archive the contents of a directory as well as decompress existing archives on the system.', - 'sftp' => 'Allows a user to connect to SFTP and manage server files using the other assigned file permissions.', - ], - ], - - 'backup' => [ - 'description' => 'Permissions that control a user\'s ability to generate and manage server backups.', - 'keys' => [ - 'create' => 'Allows a user to create new backups for this server.', - 'read' => 'Allows a user to view all backups that exist for this server.', - 'delete' => 'Allows a user to remove backups from the system.', - 'download' => 'Allows a user to download a backup for the server. Danger: this allows a user to access all files for the server in the backup.', - 'restore' => 'Allows a user to restore a backup for the server. Danger: this allows the user to delete all the server files in the process.', - ], - ], - - // Controls permissions for editing or viewing a server's allocations. - 'allocation' => [ - 'description' => 'Permissions that control a user\'s ability to modify the port allocations for this server.', - 'keys' => [ - 'read' => 'Allows a user to view all allocations currently assigned to this server. Users with any level of access to this server can always view the primary allocation.', - 'create' => 'Allows a user to assign additional allocations to the server.', - 'update' => 'Allows a user to change the primary server allocation and attach notes to each allocation.', - 'delete' => 'Allows a user to delete an allocation from the server.', - ], - ], - - // Controls permissions for editing or viewing a server's startup parameters. - 'startup' => [ - 'description' => 'Permissions that control a user\'s ability to view this server\'s startup parameters.', - 'keys' => [ - 'read' => 'Allows a user to view the startup variables for a server.', - 'update' => 'Allows a user to modify the startup variables for the server.', - 'docker-image' => 'Allows a user to modify the Docker image used when running the server.', - ], - ], - - 'database' => [ - 'description' => 'Permissions that control a user\'s access to the database management for this server.', - 'keys' => [ - 'create' => 'Allows a user to create a new database for this server.', - 'read' => 'Allows a user to view the database associated with this server.', - 'update' => 'Allows a user to rotate the password on a database instance. If the user does not have the view_password permission they will not see the updated password.', - 'delete' => 'Allows a user to remove a database instance from this server.', - 'view_password' => 'Allows a user to view the password associated with a database instance for this server.', - ], - ], - - 'schedule' => [ - 'description' => 'Permissions that control a user\'s access to the schedule management for this server.', - 'keys' => [ - 'create' => 'Allows a user to create new schedules for this server.', // task.create-schedule - 'read' => 'Allows a user to view schedules and the tasks associated with them for this server.', // task.view-schedule, task.list-schedules - 'update' => 'Allows a user to update schedules and schedule tasks for this server.', // task.edit-schedule, task.queue-schedule, task.toggle-schedule - 'delete' => 'Allows a user to delete schedules for this server.', // task.delete-schedule - ], - ], - - 'settings' => [ - 'description' => 'Permissions that control a user\'s access to the settings for this server.', - 'keys' => [ - 'rename' => 'Allows a user to rename this server and change the description of it.', - 'reinstall' => 'Allows a user to trigger a reinstall of this server.', - ], - ], - - 'activity' => [ - 'description' => 'Permissions that control a user\'s access to the server activity logs.', - 'keys' => [ - 'read' => 'Allows a user to view the activity logs for the server.', - ], - ], - ]; - protected function casts(): array { return [ @@ -241,11 +121,92 @@ class Permission extends Model implements Validatable ]; } + /** + * All the permissions available on the system. + * + * @return array + */ + public static function permissionData(): array + { + return [ + [ + 'name' => 'control', + 'icon' => 'tabler-terminal-2', + 'permissions' => ['console', 'start', 'stop', 'restart'], + ], + [ + 'name' => 'user', + 'icon' => 'tabler-users', + 'permissions' => ['read', 'create', 'update', 'delete'], + ], + [ + 'name' => 'file', + 'icon' => 'tabler-files', + 'permissions' => ['read', 'read-content', 'create', 'update', 'delete', 'archive', 'sftp'], + ], + [ + 'name' => 'backup', + 'icon' => 'tabler-file-zip', + 'permissions' => ['read', 'create', 'delete', 'download', 'restore'], + ], + [ + 'name' => 'allocation', + 'icon' => 'tabler-network', + 'permissions' => ['read', 'create', 'update', 'delete'], + ], + [ + 'name' => 'startup', + 'icon' => 'tabler-player-play', + 'permissions' => ['read', 'update', 'docker-image'], + ], + [ + 'name' => 'database', + 'icon' => 'tabler-database', + 'permissions' => ['read', 'create', 'update', 'delete', 'view-password'], + ], + [ + 'name' => 'schedule', + 'icon' => 'tabler-clock', + 'permissions' => ['read', 'create', 'update', 'delete'], + ], + [ + 'name' => 'settings', + 'icon' => 'tabler-settings', + 'permissions' => ['rename', 'reinstall'], + ], + [ + 'name' => 'activity', + 'icon' => 'tabler-stack', + 'permissions' => ['read'], + ], + ]; + } + /** * Returns all the permissions available on the system for a user to have when controlling a server. */ public static function permissions(): Collection { - return Collection::make(self::$permissions); + $permissions = [ + 'websocket' => [ + 'description' => 'Allows the user to connect to the server websocket, giving them access to view console output and realtime server stats.', + 'keys' => [ + 'connect' => 'Allows a user to connect to the websocket instance for a server to stream the console.', + ], + ], + ]; + + foreach (static::permissionData() as $data) { + $permissions[$data['name']] = [ + 'description' => trans('server/users.permissions.' . $data['name'] . '_desc'), + 'keys' => collect($data['permissions'])->mapWithKeys(fn ($key) => [$key => trans('server/users.permissions.' . $data['name'] . '_' . str($key)->replace('-', '_'))])->toArray(), + ]; + } + + return collect($permissions); } } diff --git a/app/Models/RecoveryToken.php b/app/Models/RecoveryToken.php index ba64b82f0..4b4598a93 100644 --- a/app/Models/RecoveryToken.php +++ b/app/Models/RecoveryToken.php @@ -19,7 +19,7 @@ class RecoveryToken extends Model implements Validatable use HasValidation; /** - * There are no updates to this model, only inserts and deletes. + * There are no updates to this model, only creates and deletes. */ public const UPDATED_AT = null; diff --git a/app/Models/Role.php b/app/Models/Role.php index 31210e2fa..16cbf8402 100644 --- a/app/Models/Role.php +++ b/app/Models/Role.php @@ -2,6 +2,10 @@ namespace App\Models; +use App\Enums\RolePermissionModels; +use App\Enums\RolePermissionPrefixes; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Spatie\Permission\Models\Role as BaseRole; /** @@ -12,9 +16,13 @@ use Spatie\Permission\Models\Role as BaseRole; * @property int|null $permissions_count * @property \Illuminate\Database\Eloquent\Collection|\App\Models\User[] $users * @property int|null $users_count + * @property \Illuminate\Database\Eloquent\Collection|\App\Models\Node[] $nodes + * @property int|null $nodes_count */ class Role extends BaseRole { + use HasFactory; + public const RESOURCE_NAME = 'role'; public const ROOT_ADMIN = 'Root Admin'; @@ -41,6 +49,76 @@ class Role extends BaseRole ], ]; + /** @var array> */ + protected static array $customPermissions = []; + + /** @param array> $customPermissions */ + public static function registerCustomPermissions(array $customPermissions): void + { + static::$customPermissions = [ + ...static::$customPermissions, + ...$customPermissions, + ]; + } + + public static function registerCustomDefaultPermissions(string $model): void + { + $permissions = []; + + foreach (RolePermissionPrefixes::cases() as $prefix) { + $permissions[] = $prefix->value; + } + + static::registerCustomPermissions([ + $model => $permissions, + ]); + } + + /** @return array> */ + public static function getPermissionList(): array + { + $allPermissions = []; + + // Standard permissions for our default model + foreach (RolePermissionModels::cases() as $model) { + $allPermissions[$model->value] ??= []; + + foreach (RolePermissionPrefixes::cases() as $prefix) { + array_push($allPermissions[$model->value], $prefix->value); + } + + if (array_key_exists($model->value, Role::MODEL_SPECIFIC_PERMISSIONS)) { + foreach (static::MODEL_SPECIFIC_PERMISSIONS[$model->value] as $permission) { + array_push($allPermissions[$model->value], $permission); + } + } + } + + // Special permissions for our default models + foreach (static::SPECIAL_PERMISSIONS as $model => $prefixes) { + $allPermissions[$model] ??= []; + + foreach ($prefixes as $prefix) { + array_push($allPermissions[$model], $prefix); + } + } + + // Custom third party permissions + foreach (static::$customPermissions as $model => $prefixes) { + $allPermissions[$model] ??= []; + + foreach ($prefixes as $prefix) { + array_push($allPermissions[$model], $prefix); + } + } + + foreach ($allPermissions as $model => $permissions) { + $allPermissions[$model] = array_unique($permissions); + } + + return $allPermissions; + } + public function isRootAdmin(): bool { return $this->name === self::ROOT_ADMIN; @@ -53,4 +131,9 @@ class Role extends BaseRole return $role; } + + public function nodes(): BelongsToMany + { + return $this->belongsToMany(Node::class, NodeRole::class); + } } diff --git a/app/Models/Server.php b/app/Models/Server.php index c405987c3..0115b1bbf 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -12,7 +12,6 @@ use Carbon\CarbonInterface; use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Http\Client\ConnectionException; use Illuminate\Notifications\Notifiable; use Illuminate\Database\Query\JoinClause; @@ -232,7 +231,12 @@ class Server extends Model implements Validatable public function isInstalled(): bool { - return $this->status !== ServerState::Installing && $this->status !== ServerState::InstallFailed; + return $this->status !== ServerState::Installing && !$this->isFailedInstall(); + } + + public function isFailedInstall(): bool + { + return $this->status === ServerState::InstallFailed || $this->status === ServerState::ReinstallFailed; } public function isSuspended(): bool @@ -310,14 +314,6 @@ class Server extends Model implements Validatable return $this->hasMany(ServerVariable::class); } - /** @deprecated use serverVariables */ - public function viewableServerVariables(): HasMany - { - return $this->serverVariables() - ->join('egg_variables', 'egg_variables.id', '=', 'server_variables.variable_id') - ->where('egg_variables.user_viewable', true); - } - /** * Gets information for the node associated with this server. */ @@ -358,9 +354,9 @@ class Server extends Model implements Validatable return $this->hasMany(Backup::class); } - public function mounts(): BelongsToMany + public function mounts(): MorphToMany { - return $this->belongsToMany(Mount::class); + return $this->morphToMany(Mount::class, 'mountable'); } /** @@ -480,7 +476,7 @@ class Server extends Model implements Validatable } if ($resourceAmount === 0 & $limit) { - return 'Unlimited'; + return "\u{221E}"; } if ($type === ServerResourceType::Percentage) { diff --git a/app/Models/User.php b/app/Models/User.php index ec906ba88..c8d8800b8 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -4,12 +4,12 @@ namespace App\Models; use App\Contracts\Validatable; use App\Exceptions\DisplayException; +use App\Extensions\Avatar\AvatarProvider; use App\Rules\Username; use App\Facades\Activity; use App\Traits\HasValidation; use DateTimeZone; use Filament\Models\Contracts\FilamentUser; -use Filament\Models\Contracts\HasAvatar; use Filament\Models\Contracts\HasName; use Filament\Models\Contracts\HasTenants; use Filament\Panel; @@ -24,6 +24,7 @@ use Illuminate\Auth\Authenticatable; use Illuminate\Notifications\Notifiable; use Illuminate\Database\Eloquent\Builder; use App\Models\Traits\HasAccessTokens; +use Filament\Models\Contracts\HasAvatar; use Illuminate\Auth\Passwords\CanResetPassword; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Foundation\Auth\Access\Authorizable; @@ -31,7 +32,7 @@ use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; -use App\Notifications\SendPasswordReset as ResetPasswordNotification; +use Illuminate\Support\Facades\Storage; use ResourceBundle; use Spatie\Permission\Traits\HasRoles; @@ -51,7 +52,6 @@ use Spatie\Permission\Traits\HasRoles; * @property string|null $totp_secret * @property \Illuminate\Support\Carbon|null $totp_authenticated_at * @property string[]|null $oauth - * @property bool $gravatar * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Database\Eloquent\Collection|\App\Models\ApiKey[] $apiKeys @@ -69,6 +69,7 @@ use Spatie\Permission\Traits\HasRoles; * @property int|null $tokens_count * @property \Illuminate\Database\Eloquent\Collection|\App\Models\Role[] $roles * @property int|null $roles_count + * @property string|null $customization * * @method static \Database\Factories\UserFactory factory(...$parameters) * @method static Builder|User newModelQuery() @@ -77,7 +78,6 @@ use Spatie\Permission\Traits\HasRoles; * @method static Builder|User whereCreatedAt($value) * @method static Builder|User whereEmail($value) * @method static Builder|User whereExternalId($value) - * @method static Builder|User whereGravatar($value) * @method static Builder|User whereId($value) * @method static Builder|User whereLanguage($value) * @method static Builder|User whereTimezone($value) @@ -124,8 +124,8 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac 'use_totp', 'totp_secret', 'totp_authenticated_at', - 'gravatar', 'oauth', + 'customization', ]; /** @@ -143,6 +143,7 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac 'use_totp' => false, 'totp_secret' => null, 'oauth' => '[]', + 'customization' => null, ]; /** @var array */ @@ -157,16 +158,20 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac 'use_totp' => ['boolean'], 'totp_secret' => ['nullable', 'string'], 'oauth' => ['array', 'nullable'], + 'customization' => ['array', 'nullable'], + 'customization.console_rows' => ['integer', 'min:1'], + 'customization.console_font' => ['string'], + 'customization.console_font_size' => ['integer', 'min:1'], ]; protected function casts(): array { return [ 'use_totp' => 'boolean', - 'gravatar' => 'boolean', 'totp_authenticated_at' => 'datetime', 'totp_secret' => 'encrypted', 'oauth' => 'array', + 'customization' => 'array', ]; } @@ -179,6 +184,10 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac return true; }); + static::saving(function (self $user) { + $user->email = mb_strtolower($user->email); + }); + static::deleting(function (self $user) { throw_if($user->servers()->count() > 0, new DisplayException(trans('exceptions.users.has_servers'))); @@ -201,21 +210,6 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac return $rules; } - /** - * Send the password reset notification. - * - * @param string $token - */ - public function sendPasswordResetNotification($token): void - { - Activity::event('auth:reset-password') - ->withRequestMetadata() - ->subject($this) - ->log('sending password reset email'); - - $this->notify(new ResetPasswordNotification($token)); - } - public function username(): Attribute { return Attribute::make( @@ -292,6 +286,22 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac }); } + public function accessibleNodes(): Builder + { + // Root admins can access all nodes + if ($this->isRootAdmin()) { + return Node::query(); + } + + // Check if there are no restrictions from any role + $roleIds = $this->roles()->pluck('id'); + if (!NodeRole::whereIn('role_id', $roleIds)->exists()) { + return Node::query(); + } + + return Node::whereHas('roles', fn (Builder $builder) => $builder->whereIn('roles.id', $roleIds)); + } + public function subusers(): HasMany { return $this->hasMany(Subuser::class); @@ -383,16 +393,37 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac public function getFilamentAvatarUrl(): ?string { - return 'https://gravatar.com/avatar/' . md5(strtolower($this->email)); + if (config('panel.filament.uploadable-avatars')) { + $path = "avatars/$this->id.png"; + + if (Storage::disk('public')->exists($path)) { + return Storage::url($path); + } + } + + $provider = AvatarProvider::getProvider(config('panel.filament.avatar-provider')); + + return $provider?->get($this); } - public function canTarget(Model $user): bool + public function canTarget(Model $model): bool { + // Root admins can target everyone and everything if ($this->isRootAdmin()) { return true; } - return $user instanceof User && !$user->isRootAdmin(); + // Make sure normal admins can't target root admins + if ($model instanceof User) { + return !$model->isRootAdmin(); + } + + // Make sure the user can only target accessible nodes + if ($model instanceof Node) { + return $this->accessibleNodes()->where('id', $model->id)->exists(); + } + + return false; } public function getTenants(Panel $panel): array|Collection @@ -414,4 +445,10 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac return false; } + + /** @return array */ + public function getCustomization(): array + { + return json_decode($this->customization, true) ?? []; + } } diff --git a/app/Notifications/AccountCreated.php b/app/Notifications/AccountCreated.php index 241f0ae5d..4f3ba975d 100644 --- a/app/Notifications/AccountCreated.php +++ b/app/Notifications/AccountCreated.php @@ -3,6 +3,7 @@ namespace App\Notifications; use App\Models\User; +use Filament\Facades\Filament; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; @@ -29,7 +30,7 @@ class AccountCreated extends Notification implements ShouldQueue ->line('Email: ' . $notifiable->email); if (!is_null($this->token)) { - return $message->action('Setup Your Account', url('/auth/password/reset/' . $this->token . '?email=' . urlencode($notifiable->email))); + return $message->action('Setup Your Account', Filament::getResetPasswordUrl($this->token, $notifiable)); } return $message; diff --git a/app/Notifications/AddedToServer.php b/app/Notifications/AddedToServer.php index 0979225a7..07af25443 100644 --- a/app/Notifications/AddedToServer.php +++ b/app/Notifications/AddedToServer.php @@ -2,6 +2,7 @@ namespace App\Notifications; +use App\Filament\Server\Pages\Console; use App\Models\Server; use App\Models\User; use Illuminate\Bus\Queueable; @@ -27,6 +28,6 @@ class AddedToServer extends Notification implements ShouldQueue ->greeting('Hello ' . $notifiable->username . '!') ->line('You have been added as a subuser for the following server, allowing you certain control over the server.') ->line('Server Name: ' . $this->server->name) - ->action('Visit Server', url('/server/' . $this->server->uuid_short)); + ->action('Visit Server', Console::getUrl(panel: 'server', tenant: $this->server)); } } diff --git a/app/Notifications/RemovedFromServer.php b/app/Notifications/RemovedFromServer.php index aa2717638..bc16d3c9a 100644 --- a/app/Notifications/RemovedFromServer.php +++ b/app/Notifications/RemovedFromServer.php @@ -28,6 +28,6 @@ class RemovedFromServer extends Notification implements ShouldQueue ->greeting('Hello ' . $notifiable->username . '.') ->line('You have been removed as a subuser for the following server.') ->line('Server Name: ' . $this->server->name) - ->action('Visit Panel', config('app.url')); + ->action('Visit Panel', url('')); } } diff --git a/app/Notifications/SendPasswordReset.php b/app/Notifications/SendPasswordReset.php deleted file mode 100644 index 91132b06a..000000000 --- a/app/Notifications/SendPasswordReset.php +++ /dev/null @@ -1,31 +0,0 @@ -subject('Reset Password') - ->line('You are receiving this email because we received a password reset request for your account.') - ->action('Reset Password', url('/auth/password/reset/' . $this->token . '?email=' . urlencode($notifiable->email))) - ->line('If you did not request a password reset, no further action is required.'); - } -} diff --git a/app/Notifications/ServerInstalled.php b/app/Notifications/ServerInstalled.php index 988a15722..162482918 100644 --- a/app/Notifications/ServerInstalled.php +++ b/app/Notifications/ServerInstalled.php @@ -2,10 +2,10 @@ namespace App\Notifications; +use App\Filament\Server\Pages\Console; use App\Models\User; use Illuminate\Bus\Queueable; use App\Models\Server; -use App\Filament\App\Resources\ServerResource\Pages\ListServers; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; @@ -28,6 +28,6 @@ class ServerInstalled extends Notification implements ShouldQueue ->greeting('Hello ' . $notifiable->username . '.') ->line('Your server has finished installing and is now ready for you to use.') ->line('Server Name: ' . $this->server->name) - ->action('Login and Begin Using', ListServers::getUrl()); + ->action('Login and Begin Using', Console::getUrl(panel: 'server', tenant: $this->server)); } } diff --git a/app/Policies/DatabaseHostPolicy.php b/app/Policies/DatabaseHostPolicy.php index b93954064..75eb8386d 100644 --- a/app/Policies/DatabaseHostPolicy.php +++ b/app/Policies/DatabaseHostPolicy.php @@ -2,9 +2,28 @@ namespace App\Policies; +use App\Models\DatabaseHost; +use App\Models\User; + class DatabaseHostPolicy { use DefaultPolicies; protected string $modelName = 'databasehost'; + + public function before(User $user, string $ability, string|DatabaseHost $databaseHost): ?bool + { + // For "viewAny" the $databaseHost param is the class name + if (is_string($databaseHost)) { + return null; + } + + foreach ($databaseHost->nodes as $node) { + if (!$user->canTarget($node)) { + return false; + } + } + + return null; + } } diff --git a/app/Policies/MountPolicy.php b/app/Policies/MountPolicy.php index 4f9d58b63..9495dd08d 100644 --- a/app/Policies/MountPolicy.php +++ b/app/Policies/MountPolicy.php @@ -2,9 +2,28 @@ namespace App\Policies; +use App\Models\Mount; +use App\Models\User; + class MountPolicy { use DefaultPolicies; protected string $modelName = 'mount'; + + public function before(User $user, string $ability, string|Mount $mount): ?bool + { + // For "viewAny" the $mount param is the class name + if (is_string($mount)) { + return null; + } + + foreach ($mount->nodes as $node) { + if (!$user->canTarget($node)) { + return false; + } + } + + return null; + } } diff --git a/app/Policies/NodePolicy.php b/app/Policies/NodePolicy.php index 8f23cc666..6a459155c 100644 --- a/app/Policies/NodePolicy.php +++ b/app/Policies/NodePolicy.php @@ -2,9 +2,26 @@ namespace App\Policies; +use App\Models\Node; +use App\Models\User; + class NodePolicy { use DefaultPolicies; protected string $modelName = 'node'; + + public function before(User $user, string $ability, string|Node $node): ?bool + { + // For "viewAny" the $node param is the class name + if (is_string($node)) { + return null; + } + + if (!$user->canTarget($node)) { + return false; + } + + return null; + } } diff --git a/app/Policies/ServerPolicy.php b/app/Policies/ServerPolicy.php index 48d4e5cc3..b9fe590f8 100644 --- a/app/Policies/ServerPolicy.php +++ b/app/Policies/ServerPolicy.php @@ -21,6 +21,11 @@ class ServerPolicy return null; } + // Make sure user can target node of the server + if (!$user->canTarget($server->node)) { + return false; + } + // Owner has full server permissions if ($server->owner_id === $user->id) { return true; diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 843169eff..4c3e7ea34 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -10,9 +10,16 @@ use App\Checks\NodeVersionsCheck; use App\Checks\PanelVersionCheck; use App\Checks\ScheduleCheck; use App\Checks\UsedDiskSpaceCheck; +use App\Extensions\Avatar\Providers\GravatarProvider; +use App\Extensions\Avatar\Providers\UiAvatarsProvider; use App\Extensions\OAuth\Providers\GitlabProvider; use App\Models; use App\Extensions\Captcha\Providers\TurnstileProvider; +use App\Extensions\Features\GSLToken; +use App\Extensions\Features\JavaVersion; +use App\Extensions\Features\MinecraftEula; +use App\Extensions\Features\PIDLimit; +use App\Extensions\Features\SteamDiskSpace; use App\Extensions\OAuth\Providers\AuthentikProvider; use App\Extensions\OAuth\Providers\CommonProvider; use App\Extensions\OAuth\Providers\DiscordProvider; @@ -37,8 +44,13 @@ use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Str; use Laravel\Sanctum\Sanctum; +use Livewire\Component; +use Livewire\Livewire; use Spatie\Health\Facades\Health; +use function Livewire\on; +use function Livewire\store; + class AppServiceProvider extends ServiceProvider { /** @@ -70,6 +82,7 @@ class AppServiceProvider extends ServiceProvider 'ssh_key' => Models\UserSSHKey::class, 'task' => Models\Task::class, 'user' => Models\User::class, + 'node' => Models\Node::class, ]); Http::macro( @@ -110,6 +123,17 @@ class AppServiceProvider extends ServiceProvider // Default Captcha provider TurnstileProvider::register($app); + // Default Avatar providers + GravatarProvider::register(); + UiAvatarsProvider::register(); + + // Default Feature providers + GSLToken::register($app); + JavaVersion::register($app); + MinecraftEula::register($app); + PIDLimit::register($app); + SteamDiskSpace::register($app); + FilamentColor::register([ 'danger' => Color::Red, 'gray' => Color::Zinc, @@ -139,6 +163,22 @@ class AppServiceProvider extends ServiceProvider fn () => Blade::render('filament.layouts.footer'), ); + on('dehydrate', function (Component $component) { + if (!Livewire::isLivewireRequest()) { + return; + } + + if (store($component)->has('redirect')) { + return; + } + + if (count(session()->get('alert-banners') ?? []) <= 0) { + return; + } + + $component->dispatch('alertBannerSent'); + }); + // Don't run any health checks during tests if (!$app->runningUnitTests()) { Health::checks([ diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index edaf32766..83db82839 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -5,6 +5,7 @@ namespace App\Providers\Filament; use App\Filament\Pages\Auth\Login; use App\Filament\Pages\Auth\EditProfile; use App\Http\Middleware\LanguageMiddleware; +use App\Http\Middleware\RequireTwoFactorAuthentication; use Filament\Http\Middleware\Authenticate; use Filament\Http\Middleware\DisableBladeIconComponents; use Filament\Http\Middleware\DispatchServingFilamentEvent; @@ -36,13 +37,16 @@ class AdminPanelProvider extends PanelProvider ->brandLogo(config('app.logo')) ->brandLogoHeight('2rem') ->favicon(config('app.favicon', '/pelican.ico')) - ->topNavigation(config('panel.filament.top-navigation', true)) + ->topNavigation(config('panel.filament.top-navigation', false)) ->maxContentWidth(config('panel.filament.display-width', 'screen-2xl')) - ->profile(EditProfile::class, false) ->login(Login::class) + ->passwordReset() ->userMenuItems([ + 'profile' => MenuItem::make() + ->label(fn () => trans('filament-panels::pages/auth/edit-profile.label')) + ->url(fn () => EditProfile::getUrl(panel: 'app')), MenuItem::make() - ->label(trans('profile.exit_admin')) + ->label(fn () => trans('profile.exit_admin')) ->url('/') ->icon('tabler-arrow-back') ->sort(24), @@ -57,6 +61,7 @@ class AdminPanelProvider extends PanelProvider ->sidebarCollapsibleOnDesktop() ->discoverResources(in: app_path('Filament/Admin/Resources'), for: 'App\\Filament\\Admin\\Resources') ->discoverPages(in: app_path('Filament/Admin/Pages'), for: 'App\\Filament\\Admin\\Pages') + ->discoverWidgets(in: app_path('Filament/Admin/Widgets'), for: 'App\\Filament\\Admin\\Widgets') ->middleware([ EncryptCookies::class, AddQueuedCookiesToResponse::class, @@ -68,6 +73,7 @@ class AdminPanelProvider extends PanelProvider DisableBladeIconComponents::class, DispatchServingFilamentEvent::class, LanguageMiddleware::class, + RequireTwoFactorAuthentication::class, ]) ->authMiddleware([ Authenticate::class, diff --git a/app/Providers/Filament/AppPanelProvider.php b/app/Providers/Filament/AppPanelProvider.php index 8d5111878..44ac35ec9 100644 --- a/app/Providers/Filament/AppPanelProvider.php +++ b/app/Providers/Filament/AppPanelProvider.php @@ -4,6 +4,8 @@ namespace App\Providers\Filament; use App\Filament\Pages\Auth\Login; use App\Filament\Pages\Auth\EditProfile; +use App\Http\Middleware\LanguageMiddleware; +use App\Http\Middleware\RequireTwoFactorAuthentication; use Filament\Facades\Filament; use Filament\Http\Middleware\Authenticate; use Filament\Http\Middleware\DisableBladeIconComponents; @@ -32,11 +34,12 @@ class AppPanelProvider extends PanelProvider ->brandLogo(config('app.logo')) ->brandLogoHeight('2rem') ->favicon(config('app.favicon', '/pelican.ico')) - ->topNavigation(config('panel.filament.top-navigation', true)) + ->topNavigation(config('panel.filament.top-navigation', false)) ->maxContentWidth(config('panel.filament.display-width', 'screen-2xl')) ->navigation(false) ->profile(EditProfile::class, false) ->login(Login::class) + ->passwordReset() ->userMenuItems([ MenuItem::make() ->label('Admin') @@ -56,6 +59,8 @@ class AppPanelProvider extends PanelProvider SubstituteBindings::class, DisableBladeIconComponents::class, DispatchServingFilamentEvent::class, + LanguageMiddleware::class, + RequireTwoFactorAuthentication::class, ]) ->authMiddleware([ Authenticate::class, diff --git a/app/Providers/Filament/ServerPanelProvider.php b/app/Providers/Filament/ServerPanelProvider.php index d409b4dd8..d047c80b8 100644 --- a/app/Providers/Filament/ServerPanelProvider.php +++ b/app/Providers/Filament/ServerPanelProvider.php @@ -7,6 +7,8 @@ use App\Filament\Pages\Auth\Login; use App\Filament\Admin\Resources\ServerResource\Pages\EditServer; use App\Filament\Pages\Auth\EditProfile; use App\Http\Middleware\Activity\ServerSubject; +use App\Http\Middleware\LanguageMiddleware; +use App\Http\Middleware\RequireTwoFactorAuthentication; use App\Models\Server; use Filament\Facades\Filament; use Filament\Http\Middleware\Authenticate; @@ -39,11 +41,14 @@ class ServerPanelProvider extends PanelProvider ->brandLogo(config('app.logo')) ->brandLogoHeight('2rem') ->favicon(config('app.favicon', '/pelican.ico')) - ->topNavigation(config('panel.filament.top-navigation', true)) + ->topNavigation(config('panel.filament.top-navigation', false)) ->maxContentWidth(config('panel.filament.display-width', 'screen-2xl')) ->login(Login::class) + ->passwordReset() ->userMenuItems([ - 'profile' => MenuItem::make()->label('Profile')->url(fn () => EditProfile::getUrl(panel: 'app')), + 'profile' => MenuItem::make() + ->label(fn () => trans('filament-panels::pages/auth/edit-profile.label')) + ->url(fn () => EditProfile::getUrl(panel: 'app')), MenuItem::make() ->label('Server List') ->icon('tabler-brand-docker') @@ -58,7 +63,7 @@ class ServerPanelProvider extends PanelProvider ]) ->navigationItems([ NavigationItem::make('Open in Admin') - ->url(fn () => EditServer::getUrl(['record' => Filament::getTenant()], panel: 'admin', tenant: null), true) + ->url(fn () => EditServer::getUrl(['record' => Filament::getTenant()], panel: 'admin')) ->visible(fn () => auth()->user()->can('view server', Filament::getTenant())) ->icon('tabler-arrow-back') ->sort(99), @@ -76,6 +81,8 @@ class ServerPanelProvider extends PanelProvider SubstituteBindings::class, DisableBladeIconComponents::class, DispatchServingFilamentEvent::class, + LanguageMiddleware::class, + RequireTwoFactorAuthentication::class, ServerSubject::class, ]) ->authMiddleware([ diff --git a/app/Repositories/Daemon/DaemonConfigurationRepository.php b/app/Repositories/Daemon/DaemonConfigurationRepository.php index 48d2b35c4..916e7d459 100644 --- a/app/Repositories/Daemon/DaemonConfigurationRepository.php +++ b/app/Repositories/Daemon/DaemonConfigurationRepository.php @@ -21,14 +21,7 @@ class DaemonConfigurationRepository extends DaemonRepository ->connectTimeout(3) ->get('/api/system') ->throwIf(function ($result) { - $header = $result->header('User-Agent'); - if ( - filled($header) && - preg_match('/^Pelican Wings\/v(?:\d+\.\d+\.\d+|develop) \(id:(\w*)\)$/', $header, $matches) && - array_get($matches, 1, '') !== $this->node->daemon_token_id - ) { - throw new ConnectionException($result->effectiveUri()->__toString() . ' does not match node token_id !'); - } + $this->enforceValidNodeToken($result); if (!$result->collect()->has(['architecture', 'cpu_count', 'kernel_version', 'os', 'version'])) { throw new ConnectionException($result->effectiveUri()->__toString() . ' is not Pelican Wings !'); } diff --git a/app/Repositories/Daemon/DaemonFileRepository.php b/app/Repositories/Daemon/DaemonFileRepository.php index 70cba278c..f7d5c78e3 100644 --- a/app/Repositories/Daemon/DaemonFileRepository.php +++ b/app/Repositories/Daemon/DaemonFileRepository.php @@ -5,6 +5,7 @@ namespace App\Repositories\Daemon; use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Http\Client\Response; use App\Exceptions\Http\Server\FileSizeTooLargeException; +use App\Exceptions\Repository\FileNotEditableException; use Illuminate\Http\Client\ConnectionException; class DaemonFileRepository extends DaemonRepository @@ -29,6 +30,10 @@ class DaemonFileRepository extends DaemonRepository throw new FileSizeTooLargeException(); } + if ($response->getStatusCode() === 400) { + throw new FileNotEditableException(); + } + if ($response->getStatusCode() === 404) { throw new FileNotFoundException(); } @@ -133,7 +138,7 @@ class DaemonFileRepository extends DaemonRepository * * @throws ConnectionException */ - public function compressFiles(?string $root, array $files): array + public function compressFiles(?string $root, array $files, ?string $name): array { return $this->getHttpClient() // Wait for up to 15 minutes for the archive to be completed when calling this endpoint @@ -143,6 +148,7 @@ class DaemonFileRepository extends DaemonRepository [ 'root' => $root ?? '/', 'files' => $files, + 'name' => $name ?? '', ] )->json(); } diff --git a/app/Repositories/Daemon/DaemonRepository.php b/app/Repositories/Daemon/DaemonRepository.php index ae7440a50..6b3b553d6 100644 --- a/app/Repositories/Daemon/DaemonRepository.php +++ b/app/Repositories/Daemon/DaemonRepository.php @@ -7,6 +7,8 @@ use Illuminate\Http\Client\PendingRequest; use Illuminate\Support\Facades\Http; use Webmozart\Assert\Assert; use App\Models\Server; +use Illuminate\Http\Client\ConnectionException; +use Illuminate\Http\Client\Response; abstract class DaemonRepository { @@ -47,6 +49,24 @@ abstract class DaemonRepository { Assert::isInstanceOf($this->node, Node::class); - return Http::daemon($this->node, $headers); + return Http::daemon($this->node, $headers)->throwIf(fn ($condition) => $this->enforceValidNodeToken($condition)); + } + + protected function enforceValidNodeToken(Response|bool $condition): bool + { + if (is_bool($condition)) { + return $condition; + } + + $header = $condition->header('User-Agent'); + if ( + empty($header) || + preg_match('/^Pelican Wings\/v(?:\d+\.\d+\.\d+|develop) \(id:(\w*)\)$/', $header, $matches) && + array_get($matches, 1, '') !== $this->node->daemon_token_id + ) { + throw new ConnectionException($condition->effectiveUri()->__toString() . ' does not match node token_id !'); + } + + return true; } } diff --git a/app/Repositories/Daemon/DaemonServerRepository.php b/app/Repositories/Daemon/DaemonServerRepository.php index 673673b98..551dc16fe 100644 --- a/app/Repositories/Daemon/DaemonServerRepository.php +++ b/app/Repositories/Daemon/DaemonServerRepository.php @@ -141,4 +141,12 @@ class DaemonServerRepository extends DaemonRepository 'jtis' => [md5($id . $this->server->uuid)], ]); } + + public function getInstallLogs(): string + { + return $this->getHttpClient() + ->get("/api/servers/{$this->server->uuid}/install-logs") + ->throw() + ->json('data'); + } } diff --git a/app/Services/Activity/ActivityLogService.php b/app/Services/Activity/ActivityLogService.php index 402f433c3..7cb7a214f 100644 --- a/app/Services/Activity/ActivityLogService.php +++ b/app/Services/Activity/ActivityLogService.php @@ -10,7 +10,6 @@ use Illuminate\Support\Collection; use App\Models\ActivityLog; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Request; -use App\Models\ActivityLogSubject; use App\Models\Server; use Filament\Facades\Filament; use Illuminate\Database\ConnectionInterface; @@ -236,16 +235,12 @@ class ActivityLogService $response = $this->connection->transaction(function () { $this->activity->save(); - $subjects = Collection::make($this->subjects) - ->map(fn (Model $subject) => [ - 'activity_log_id' => $this->activity->id, + foreach ($this->subjects as $subject) { + $this->activity->subjects()->forceCreate([ 'subject_id' => $subject->getKey(), 'subject_type' => $subject->getMorphClass(), - ]) - ->values() - ->toArray(); - - ActivityLogSubject::insert($subjects); + ]); + } return $this->activity; }); diff --git a/app/Services/Allocations/AssignmentService.php b/app/Services/Allocations/AssignmentService.php index 242a14872..39c67c37e 100644 --- a/app/Services/Allocations/AssignmentService.php +++ b/app/Services/Allocations/AssignmentService.php @@ -51,12 +51,7 @@ class AssignmentService } try { - // TODO: how should we approach supporting IPv6 with this? - // gethostbyname only supports IPv4, but the alternative (dns_get_record) returns - // an array of records, which is not ideal for this use case, we need a SINGLE - // IP to use, not multiple. - $underlying = gethostbyname($data['allocation_ip']); - $parsed = Network::parse($underlying); + $parsed = Network::parse($data['allocation_ip']); } catch (\Exception $exception) { throw new DisplayException("Could not parse provided allocation IP address ({$data['allocation_ip']}): {$exception->getMessage()}", $exception); } @@ -70,7 +65,7 @@ class AssignmentService throw new InvalidPortMappingException($port); } - $insertData = []; + $newAllocations = []; if (preg_match(self::PORT_RANGE_REGEX, $port, $matches)) { $block = range($matches[1], $matches[2]); @@ -83,7 +78,7 @@ class AssignmentService } foreach ($block as $unit) { - $insertData[] = [ + $newAllocations[] = [ 'node_id' => $node->id, 'ip' => $ip->__toString(), 'port' => (int) $unit, @@ -96,7 +91,7 @@ class AssignmentService throw new PortOutOfRangeException(); } - $insertData[] = [ + $newAllocations[] = [ 'node_id' => $node->id, 'ip' => $ip->__toString(), 'port' => (int) $port, @@ -105,8 +100,8 @@ class AssignmentService ]; } - foreach ($insertData as $insert) { - $allocation = Allocation::query()->create($insert); + foreach ($newAllocations as $newAllocation) { + $allocation = Allocation::query()->create($newAllocation); $ids[] = $allocation->id; } } diff --git a/app/Services/Databases/DatabaseManagementService.php b/app/Services/Databases/DatabaseManagementService.php index 88146f709..b82c06934 100644 --- a/app/Services/Databases/DatabaseManagementService.php +++ b/app/Services/Databases/DatabaseManagementService.php @@ -7,7 +7,6 @@ use App\Models\Server; use App\Models\Database; use App\Helpers\Utilities; use Illuminate\Database\ConnectionInterface; -use App\Extensions\DynamicDatabaseConnection; use App\Exceptions\Repository\DuplicateDatabaseNameException; use App\Exceptions\Service\Database\TooManyDatabasesException; use App\Exceptions\Service\Database\DatabaseClientFeatureNotEnabledException; @@ -32,7 +31,6 @@ class DatabaseManagementService public function __construct( protected ConnectionInterface $connection, - protected DynamicDatabaseConnection $dynamic, ) {} /** @@ -94,8 +92,6 @@ class DatabaseManagementService return $this->connection->transaction(function () use ($data) { $database = $this->createModel($data); - $this->dynamic->set('dynamic', $data['database_host_id']); - $database->createDatabase($database->database); $database->createUser( $database->username, @@ -122,13 +118,18 @@ class DatabaseManagementService */ public function delete(Database $database): ?bool { - $this->dynamic->set('dynamic', $database->database_host_id); + return $this->connection->transaction(function () use ($database) { + $database->dropDatabase($database->database); + $database->dropUser($database->username, $database->remote); + $database->flush(); - $database->dropDatabase($database->database); - $database->dropUser($database->username, $database->remote); - $database->flush(); + Activity::event('server:database.delete') + ->subject($database) + ->property('name', $database->database) + ->log(); - return $database->delete(); + return $database->delete(); + }); } /** diff --git a/app/Services/Databases/DatabasePasswordService.php b/app/Services/Databases/DatabasePasswordService.php index 110c5abe5..c2abb1cc5 100644 --- a/app/Services/Databases/DatabasePasswordService.php +++ b/app/Services/Databases/DatabasePasswordService.php @@ -5,7 +5,6 @@ namespace App\Services\Databases; use App\Models\Database; use App\Helpers\Utilities; use Illuminate\Database\ConnectionInterface; -use App\Extensions\DynamicDatabaseConnection; class DatabasePasswordService { @@ -14,7 +13,6 @@ class DatabasePasswordService */ public function __construct( private ConnectionInterface $connection, - private DynamicDatabaseConnection $dynamic, ) {} /** @@ -29,8 +27,6 @@ class DatabasePasswordService $password = Utilities::randomStringWithSpecialCharacters(24); $this->connection->transaction(function () use ($database, $password) { - $this->dynamic->set('dynamic', $database->database_host_id); - $database->update([ 'password' => $password, ]); diff --git a/app/Services/Databases/Hosts/HostCreationService.php b/app/Services/Databases/Hosts/HostCreationService.php index 13dd54bd7..974ef3272 100644 --- a/app/Services/Databases/Hosts/HostCreationService.php +++ b/app/Services/Databases/Hosts/HostCreationService.php @@ -3,9 +3,7 @@ namespace App\Services\Databases\Hosts; use App\Models\DatabaseHost; -use Illuminate\Database\DatabaseManager; use Illuminate\Database\ConnectionInterface; -use App\Extensions\DynamicDatabaseConnection; class HostCreationService { @@ -14,8 +12,6 @@ class HostCreationService */ public function __construct( private ConnectionInterface $connection, - private DatabaseManager $databaseManager, - private DynamicDatabaseConnection $dynamic, ) {} /** @@ -48,8 +44,7 @@ class HostCreationService $host->nodes()->sync(array_get($data, 'node_ids', [])); // Confirm access using the provided credentials before saving data. - $this->dynamic->set('dynamic', $host); - $this->databaseManager->connection('dynamic')->getPdo(); + $host->buildConnection()->getPdo(); return $host; }); diff --git a/app/Services/Databases/Hosts/HostUpdateService.php b/app/Services/Databases/Hosts/HostUpdateService.php index cf9add21f..cafe9b402 100644 --- a/app/Services/Databases/Hosts/HostUpdateService.php +++ b/app/Services/Databases/Hosts/HostUpdateService.php @@ -3,9 +3,7 @@ namespace App\Services\Databases\Hosts; use App\Models\DatabaseHost; -use Illuminate\Database\DatabaseManager; use Illuminate\Database\ConnectionInterface; -use App\Extensions\DynamicDatabaseConnection; class HostUpdateService { @@ -14,8 +12,6 @@ class HostUpdateService */ public function __construct( private ConnectionInterface $connection, - private DatabaseManager $databaseManager, - private DynamicDatabaseConnection $dynamic, ) {} /** @@ -38,8 +34,8 @@ class HostUpdateService return $this->connection->transaction(function () use ($data, $host) { $host->update($data); - $this->dynamic->set('dynamic', $host); - $this->databaseManager->connection('dynamic')->getPdo(); + // Confirm access using the provided credentials before saving data. + $host->buildConnection()->getPdo(); return $host; }); diff --git a/app/Services/Deployment/AllocationSelectionService.php b/app/Services/Deployment/AllocationSelectionService.php index d589b6368..a18ceafd0 100644 --- a/app/Services/Deployment/AllocationSelectionService.php +++ b/app/Services/Deployment/AllocationSelectionService.php @@ -155,8 +155,8 @@ class AllocationSelectionService $query->whereIn('node_id', $nodes); } - return $query->groupBy('ip') - ->get() + return $query + ->groupBy('ip') ->pluck('ip') ->toArray(); } diff --git a/app/Services/Servers/EnvironmentService.php b/app/Services/Servers/EnvironmentService.php index 3979fa55c..686bbfcce 100644 --- a/app/Services/Servers/EnvironmentService.php +++ b/app/Services/Servers/EnvironmentService.php @@ -47,14 +47,6 @@ class EnvironmentService $variables->put($key, object_get($server, $object)); } - // Process variables set in the configuration file. - foreach (config('panel.environment_variables', []) as $key => $object) { - $variables->put( - $key, - is_callable($object) ? call_user_func($object, $server) : object_get($server, $object) - ); - } - // Process dynamically included environment variables. foreach ($this->additional as $key => $closure) { $variables->put($key, call_user_func($closure, $server)); diff --git a/app/Services/Servers/ServerConfigurationStructureService.php b/app/Services/Servers/ServerConfigurationStructureService.php index 541d07399..b0c8156c3 100644 --- a/app/Services/Servers/ServerConfigurationStructureService.php +++ b/app/Services/Servers/ServerConfigurationStructureService.php @@ -101,6 +101,9 @@ class ServerConfigurationStructureService 'egg' => [ 'id' => $server->egg->uuid, 'file_denylist' => $server->egg->inherit_file_denylist, + 'features' => collect($server->egg->features())->mapWithKeys(fn ($feature) => [ + $feature->getId() => $feature->getListeners(), + ])->all(), ], ]; diff --git a/app/Services/Servers/ServerCreationService.php b/app/Services/Servers/ServerCreationService.php index 26f38bbc6..542693cc8 100644 --- a/app/Services/Servers/ServerCreationService.php +++ b/app/Services/Servers/ServerCreationService.php @@ -3,7 +3,6 @@ namespace App\Services\Servers; use App\Enums\ServerState; -use App\Models\ServerVariable; use Illuminate\Http\Client\ConnectionException; use Ramsey\Uuid\Uuid; use Illuminate\Support\Arr; @@ -199,20 +198,11 @@ class ServerCreationService */ private function storeEggVariables(Server $server, Collection $variables): void { - $now = now(); - - $records = $variables->map(function ($result) use ($server, $now) { - return [ - 'server_id' => $server->id, - 'variable_id' => $result->id, - 'variable_value' => $result->value ?? '', - 'created_at' => $now, - 'updated_at' => $now, - ]; - })->toArray(); - - if (!empty($records)) { - ServerVariable::query()->insert($records); + foreach ($variables as $variable) { + $server->serverVariables()->forceCreate([ + 'variable_id' => $variable->id, + 'variable_value' => $variable->value ?? '', + ]); } } diff --git a/app/Services/Servers/ToggleInstallService.php b/app/Services/Servers/ToggleInstallService.php index 01ee6de41..770db8443 100644 --- a/app/Services/Servers/ToggleInstallService.php +++ b/app/Services/Servers/ToggleInstallService.php @@ -9,7 +9,7 @@ class ToggleInstallService { public function handle(Server $server): void { - if ($server->status === ServerState::InstallFailed) { + if ($server->isFailedInstall()) { abort(500, trans('exceptions.server.marked_as_failed')); } diff --git a/app/Services/Servers/TransferServerService.php b/app/Services/Servers/TransferServerService.php index dec6d435a..f394f4c7c 100644 --- a/app/Services/Servers/TransferServerService.php +++ b/app/Services/Servers/TransferServerService.php @@ -22,37 +22,28 @@ class TransferServerService private NodeJWTService $nodeJWTService, ) {} - private function notify(Server $server, Plain $token): void + private function notify(ServerTransfer $transfer, Plain $token): void { - Http::daemon($server->node)->post('/api/transfer', [ - 'json' => [ - 'server_id' => $server->uuid, - 'url' => $server->node->getConnectionAddress() . "/api/servers/$server->uuid/archive", - 'token' => 'Bearer ' . $token->toString(), - 'server' => [ - 'uuid' => $server->uuid, - 'start_on_completion' => false, - ], + Http::daemon($transfer->oldNode)->post("/api/servers/{$transfer->server->uuid}/transfer", [ + 'url' => $transfer->newNode->getConnectionAddress() . '/api/transfers', + 'token' => 'Bearer ' . $token->toString(), + 'server' => [ + 'uuid' => $transfer->server->uuid, + 'start_on_completion' => false, ], - ])->toPsrResponse(); + ]); } /** * Starts a transfer of a server to a new node. * - * @param array{ - * allocation_id: int, - * node_id: int, - * allocation_additional?: ?int[], - * } $data + * @param int[] $additional_allocations * * @throws \Throwable */ - public function handle(Server $server, array $data): bool + public function handle(Server $server, int $node_id, int $allocation_id, array $additional_allocations): bool { - $node_id = $data['node_id']; - $allocation_id = intval($data['allocation_id']); - $additional_allocations = array_map(intval(...), $data['allocation_additional'] ?? []); + $additional_allocations = array_map(intval(...), $additional_allocations); // Check if the node is viable for the transfer. $node = Node::query() @@ -94,7 +85,7 @@ class TransferServerService ->handle($transfer->newNode, $server->uuid, 'sha256'); // Notify the source node of the pending outgoing transfer. - $this->notify($server, $token); + $this->notify($transfer, $token); return $transfer; }); diff --git a/app/Services/Users/ToggleTwoFactorService.php b/app/Services/Users/ToggleTwoFactorService.php index 0edec54fd..434e5d3ef 100644 --- a/app/Services/Users/ToggleTwoFactorService.php +++ b/app/Services/Users/ToggleTwoFactorService.php @@ -2,9 +2,6 @@ namespace App\Services\Users; -use App\Models\RecoveryToken; -use Carbon\Carbon; -use Illuminate\Support\Str; use App\Models\User; use PragmaRX\Google2FA\Google2FA; use Illuminate\Database\ConnectionInterface; @@ -49,27 +46,14 @@ class ToggleTwoFactorService // on their account. $tokens = []; if ((!$toggleState && !$user->use_totp) || $toggleState) { - $inserts = []; + $user->recoveryTokens()->delete(); for ($i = 0; $i < 10; $i++) { - $token = Str::random(10); - - $inserts[] = [ - 'user_id' => $user->id, + $token = str_random(10); + $user->recoveryTokens()->forceCreate([ 'token' => password_hash($token, PASSWORD_DEFAULT), - // insert() won't actually set the time on the models, so make sure we do this - // manually here. - 'created_at' => Carbon::now(), - ]; - + ]); $tokens[] = $token; } - - // Before inserting any new records make sure all the old ones are deleted to avoid - // any issues or storing an unnecessary number of tokens in the database. - $user->recoveryTokens()->delete(); - - // Bulk insert the hashed tokens. - RecoveryToken::query()->insert($inserts); } $user->totp_authenticated_at = now(); diff --git a/app/Transformers/Api/Application/EggTransformer.php b/app/Transformers/Api/Application/EggTransformer.php index be342f24f..a416ed026 100644 --- a/app/Transformers/Api/Application/EggTransformer.php +++ b/app/Transformers/Api/Application/EggTransformer.php @@ -46,6 +46,7 @@ class EggTransformer extends BaseTransformer 'name' => $model->name, 'author' => $model->author, 'description' => $model->description, + 'features' => $model->features, // "docker_image" is deprecated, but left here to avoid breaking too many things at once // in external software. We'll remove it down the road once things have gotten the chance // to upgrade to using "docker_images". diff --git a/app/helpers.php b/app/helpers.php index 0fe63c7a5..6098eff07 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -18,6 +18,20 @@ if (!function_exists('is_ip')) { } } +if (!function_exists('is_ipv4')) { + function is_ipv4(?string $address): bool + { + return $address !== null && filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false; + } +} + +if (!function_exists('is_ipv6')) { + function is_ipv6(?string $address): bool + { + return $address !== null && filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false; + } +} + if (!function_exists('convert_bytes_to_readable')) { function convert_bytes_to_readable(int $bytes, int $decimals = 2, ?int $base = null): string { diff --git a/compose.yml b/compose.yml index 9b7e6175e..becbab503 100644 --- a/compose.yml +++ b/compose.yml @@ -35,9 +35,9 @@ services: ports: - "80:80" - "443:443" - # - "9000:9000" # enable when not using caddy to be abel to reach php-fpm + # - "9000:9000" # enable when not using caddy to be able to reach php-fpm extra_hosts: - - "host.docker.internal:host-gateway" # shows the panel on te internal docker network as well. usually '172.17.0.1' + - "host.docker.internal:host-gateway" # shows the panel on the internal docker network as well. usually '172.17.0.1' volumes: - pelican-data:/pelican-data - pelican-logs:/var/www/html/storage/logs diff --git a/composer.json b/composer.json index 5ec7852a8..1174df9e0 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name": "pelican-dev/panel", "description": "The free, open-source game management panel. Supporting Minecraft, Spigot, BungeeCord, and SRCDS servers.", + "license": "AGPL-3.0-only", "require": { "php": "^8.2 || ^8.3 || ^8.4", "ext-intl": "*", @@ -9,17 +10,18 @@ "ext-pdo": "*", "ext-zip": "*", "abdelhamiderrahmouni/filament-monaco-editor": "^0.2.5", - "aws/aws-sdk-php": "^3.341", + "aws/aws-sdk-php": "^3.343", + "aymanalhattami/filament-context-menu": "^1.0", "calebporzio/sushi": "^2.5", "chillerlan/php-qrcode": "^5.0.2", "dedoc/scramble": "^0.12.10", "doctrine/dbal": "~3.6.0", - "filament/filament": "3.3.3", + "filament/filament": "^3.3", "guzzlehttp/guzzle": "^7.9", - "laravel/framework": "^12.2", + "laravel/framework": "^12.13", "laravel/helpers": "^1.7", - "laravel/sanctum": "^4.0.2", - "laravel/socialite": "^5.18", + "laravel/sanctum": "^4.1", + "laravel/socialite": "^5.20", "laravel/tinker": "^2.10.1", "laravel/ui": "^4.6", "lcobucci/jwt": "~4.3.0", @@ -33,10 +35,10 @@ "socialiteproviders/authentik": "^5.2", "socialiteproviders/discord": "^4.2", "socialiteproviders/steam": "^4.3", - "spatie/laravel-data": "^4.13", + "spatie/laravel-data": "^4.15", "spatie/laravel-fractal": "^6.3", - "spatie/laravel-health": "^1.32", - "spatie/laravel-permission": "^6.16", + "spatie/laravel-health": "^1.34", + "spatie/laravel-permission": "^6.17", "spatie/laravel-query-builder": "^6.3", "spatie/temporary-directory": "^2.3", "symfony/http-client": "^7.2", @@ -49,14 +51,16 @@ "require-dev": { "barryvdh/laravel-ide-helper": "^3.5", "fakerphp/faker": "^1.23.1", - "larastan/larastan": "^3.1", + "larastan/larastan": "^3.4", + "laravel/pail": "^1.2.2", "laravel/pint": "^1.15.3", "laravel/sail": "^1.41", "mockery/mockery": "^1.6.11", "nunomaduro/collision": "^8.6", "pestphp/pest": "^3.7", - "spatie/laravel-ignition": "^2.9", - "laravel/pail": "^1.2.2" + "pestphp/pest-plugin-faker": "^3.0", + "pestphp/pest-plugin-livewire": "^3.0", + "spatie/laravel-ignition": "^2.9" }, "autoload": { "files": [ @@ -80,11 +84,8 @@ "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump" ], - "post-root-package-install": [ - "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" - ], - "post-create-project-cmd": [ - "@php artisan key:generate --ansi" + "post-install-cmd": [ + "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "dev": [ "Composer\\Config::disableProcessTimeout", @@ -97,6 +98,9 @@ "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true + }, + "platform": { + "php": "8.2" } }, "minimum-stability": "stable", diff --git a/composer.lock b/composer.lock index 2575f3c34..0cbafa4bb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7bdf17dde3abc6f87fd48674c3034f49", + "content-hash": "a24a7b46deafee826d9c132b6554e97b", "packages": [ { "name": "abdelhamiderrahmouni/filament-monaco-editor", @@ -173,16 +173,16 @@ }, { "name": "amphp/byte-stream", - "version": "v2.1.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93" + "reference": "55a6bd071aec26fa2a3e002618c20c35e3df1b46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/daa00f2efdbd71565bf64ffefa89e37542addf93", - "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/55a6bd071aec26fa2a3e002618c20c35e3df1b46", + "reference": "55a6bd071aec26fa2a3e002618c20c35e3df1b46", "shasum": "" }, "require": { @@ -236,7 +236,7 @@ ], "support": { "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v2.1.1" + "source": "https://github.com/amphp/byte-stream/tree/v2.1.2" }, "funding": [ { @@ -244,7 +244,7 @@ "type": "github" } ], - "time": "2024-02-17T04:49:38+00:00" + "time": "2025-03-16T17:10:27+00:00" }, { "name": "amphp/cache", @@ -548,16 +548,16 @@ }, { "name": "amphp/pipeline", - "version": "v1.2.2", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/amphp/pipeline.git", - "reference": "97cbf289f4d8877acfe58dd90ed5a4370a43caa4" + "reference": "7b52598c2e9105ebcddf247fc523161581930367" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/pipeline/zipball/97cbf289f4d8877acfe58dd90ed5a4370a43caa4", - "reference": "97cbf289f4d8877acfe58dd90ed5a4370a43caa4", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/7b52598c2e9105ebcddf247fc523161581930367", + "reference": "7b52598c2e9105ebcddf247fc523161581930367", "shasum": "" }, "require": { @@ -603,7 +603,7 @@ ], "support": { "issues": "https://github.com/amphp/pipeline/issues", - "source": "https://github.com/amphp/pipeline/tree/v1.2.2" + "source": "https://github.com/amphp/pipeline/tree/v1.2.3" }, "funding": [ { @@ -611,7 +611,7 @@ "type": "github" } ], - "time": "2025-01-19T15:42:46+00:00" + "time": "2025-03-16T16:33:53+00:00" }, { "name": "amphp/process", @@ -900,16 +900,16 @@ }, { "name": "anourvalar/eloquent-serialize", - "version": "1.2.29", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/AnourValar/eloquent-serialize.git", - "reference": "0919c91e548d01261308fd54d27fc05a83c79d03" + "reference": "060632195821e066de1fc0f869881dd585e2f299" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/0919c91e548d01261308fd54d27fc05a83c79d03", - "reference": "0919c91e548d01261308fd54d27fc05a83c79d03", + "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/060632195821e066de1fc0f869881dd585e2f299", + "reference": "060632195821e066de1fc0f869881dd585e2f299", "shasum": "" }, "require": { @@ -960,9 +960,9 @@ ], "support": { "issues": "https://github.com/AnourValar/eloquent-serialize/issues", - "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.29" + "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.3.1" }, - "time": "2025-02-25T05:18:46+00:00" + "time": "2025-04-06T06:54:34+00:00" }, { "name": "aws/aws-crt-php", @@ -1020,16 +1020,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.342.6", + "version": "3.343.6", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "2ad93ef447289da27892707efa683c1ae7ced85f" + "reference": "3746aca8cbed5f46beba850e0a480ef58e71b197" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2ad93ef447289da27892707efa683c1ae7ced85f", - "reference": "2ad93ef447289da27892707efa683c1ae7ced85f", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3746aca8cbed5f46beba850e0a480ef58e71b197", + "reference": "3746aca8cbed5f46beba850e0a480ef58e71b197", "shasum": "" }, "require": { @@ -1111,21 +1111,97 @@ "support": { "forum": "https://github.com/aws/aws-sdk-php/discussions", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.342.6" + "source": "https://github.com/aws/aws-sdk-php/tree/3.343.6" }, - "time": "2025-03-14T18:01:18+00:00" + "time": "2025-05-07T18:10:08+00:00" + }, + { + "name": "aymanalhattami/filament-context-menu", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/aymanalhattami/filament-context-menu.git", + "reference": "5118d36303e86891d3037e6e26882d548b880b9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aymanalhattami/filament-context-menu/zipball/5118d36303e86891d3037e6e26882d548b880b9c", + "reference": "5118d36303e86891d3037e6e26882d548b880b9c", + "shasum": "" + }, + "require": { + "filament/filament": "^3.0", + "php": "^8.2", + "spatie/laravel-package-tools": "^1.15.0" + }, + "require-dev": { + "larastan/larastan": "^2.0", + "laravel/pint": "^1.0", + "nunomaduro/collision": "^8.0", + "orchestra/testbench": "^9.0", + "pestphp/pest": "^3.0", + "pestphp/pest-plugin-arch": "^3.0", + "pestphp/pest-plugin-laravel": "^3.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Skeleton": "AymanAlhattami\\FilamentContextMenu\\Facades\\FilamentContextMenu" + }, + "providers": [ + "AymanAlhattami\\FilamentContextMenu\\FilamentContextMenuServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "AymanAlhattami\\FilamentContextMenu\\": "src/", + "AymanAlhattami\\FilamentContextMenu\\Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ayman Alhattami", + "email": "ayman.m.alhattami@gmail.com", + "role": "Developer" + } + ], + "description": "context menu (right click menu) for filament", + "homepage": "https://github.com/aymanalhattami/filament-context-menu", + "keywords": [ + "ayman alhattami", + "context menu", + "filament", + "filament admin panel", + "filament context menu", + "filament_context_menu", + "laravel" + ], + "support": { + "issues": "https://github.com/aymanalhattami/filament-context-menu/issues", + "source": "https://github.com/aymanalhattami/filament-context-menu" + }, + "time": "2024-09-22T10:47:31+00:00" }, { "name": "blade-ui-kit/blade-heroicons", "version": "2.6.0", "source": { "type": "git", - "url": "https://github.com/blade-ui-kit/blade-heroicons.git", + "url": "https://github.com/driesvints/blade-heroicons.git", "reference": "4553b2a1f6c76f0ac7f3bc0de4c0cfa06a097d19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/4553b2a1f6c76f0ac7f3bc0de4c0cfa06a097d19", + "url": "https://api.github.com/repos/driesvints/blade-heroicons/zipball/4553b2a1f6c76f0ac7f3bc0de4c0cfa06a097d19", "reference": "4553b2a1f6c76f0ac7f3bc0de4c0cfa06a097d19", "shasum": "" }, @@ -1169,8 +1245,8 @@ "laravel" ], "support": { - "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", - "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.6.0" + "issues": "https://github.com/driesvints/blade-heroicons/issues", + "source": "https://github.com/driesvints/blade-heroicons/tree/2.6.0" }, "funding": [ { @@ -1189,12 +1265,12 @@ "version": "1.8.0", "source": { "type": "git", - "url": "https://github.com/blade-ui-kit/blade-icons.git", + "url": "https://github.com/driesvints/blade-icons.git", "reference": "7b743f27476acb2ed04cb518213d78abe096e814" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/7b743f27476acb2ed04cb518213d78abe096e814", + "url": "https://api.github.com/repos/driesvints/blade-icons/zipball/7b743f27476acb2ed04cb518213d78abe096e814", "reference": "7b743f27476acb2ed04cb518213d78abe096e814", "shasum": "" }, @@ -1758,16 +1834,16 @@ }, { "name": "dedoc/scramble", - "version": "v0.12.12", + "version": "v0.12.19", "source": { "type": "git", "url": "https://github.com/dedoc/scramble.git", - "reference": "c209db61ecb517c573e59666f16030bda5adc8db" + "reference": "f6516eb82c7c86e57e2cfaead4a05b900e4b5ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dedoc/scramble/zipball/c209db61ecb517c573e59666f16030bda5adc8db", - "reference": "c209db61ecb517c573e59666f16030bda5adc8db", + "url": "https://api.github.com/repos/dedoc/scramble/zipball/f6516eb82c7c86e57e2cfaead4a05b900e4b5ecc", + "reference": "f6516eb82c7c86e57e2cfaead4a05b900e4b5ecc", "shasum": "" }, "require": { @@ -1822,7 +1898,7 @@ ], "support": { "issues": "https://github.com/dedoc/scramble/issues", - "source": "https://github.com/dedoc/scramble/tree/v0.12.12" + "source": "https://github.com/dedoc/scramble/tree/v0.12.19" }, "funding": [ { @@ -1830,7 +1906,7 @@ "type": "github" } ], - "time": "2025-03-15T10:08:07+00:00" + "time": "2025-04-23T09:41:53+00:00" }, { "name": "dflydev/dot-access-data", @@ -2115,26 +2191,29 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.4", + "version": "1.1.5", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", - "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=13" + }, "require-dev": { - "doctrine/coding-standard": "^9 || ^12", - "phpstan/phpstan": "1.4.10 || 2.0.3", + "doctrine/coding-standard": "^9 || ^12 || ^13", + "phpstan/phpstan": "1.4.10 || 2.1.11", "phpstan/phpstan-phpunit": "^1.0 || ^2", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12", "psr/log": "^1 || ^2 || ^3" }, "suggest": { @@ -2154,9 +2233,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.4" + "source": "https://github.com/doctrine/deprecations/tree/1.1.5" }, - "time": "2024-12-07T21:18:45+00:00" + "time": "2025-04-07T20:06:18+00:00" }, { "name": "doctrine/event-manager", @@ -2484,16 +2563,16 @@ }, { "name": "egulias/email-validator", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "b115554301161fa21467629f1e1391c1936de517" + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b115554301161fa21467629f1e1391c1936de517", - "reference": "b115554301161fa21467629f1e1391c1936de517", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", "shasum": "" }, "require": { @@ -2539,7 +2618,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.3" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.4" }, "funding": [ { @@ -2547,20 +2626,20 @@ "type": "github" } ], - "time": "2024-12-27T00:36:43+00:00" + "time": "2025-03-06T22:45:56+00:00" }, { "name": "filament/actions", - "version": "v3.3.3", + "version": "v3.3.14", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "acaaa861bc01f72a73cb5faedcc3fecbbbf599c6" + "reference": "08caa8dec43ebf4192dcd999cca786656a3dbc90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/acaaa861bc01f72a73cb5faedcc3fecbbbf599c6", - "reference": "acaaa861bc01f72a73cb5faedcc3fecbbbf599c6", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/08caa8dec43ebf4192dcd999cca786656a3dbc90", + "reference": "08caa8dec43ebf4192dcd999cca786656a3dbc90", "shasum": "" }, "require": { @@ -2600,20 +2679,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-02-25T08:19:06+00:00" + "time": "2025-04-30T09:16:43+00:00" }, { "name": "filament/filament", - "version": "v3.3.3", + "version": "v3.3.14", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "6ca7e497517a78413777ab74a0688a70337f6b4f" + "reference": "2c4783bdd973967cc2dbc2dc518c70b04839ace3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/6ca7e497517a78413777ab74a0688a70337f6b4f", - "reference": "6ca7e497517a78413777ab74a0688a70337f6b4f", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/2c4783bdd973967cc2dbc2dc518c70b04839ace3", + "reference": "2c4783bdd973967cc2dbc2dc518c70b04839ace3", "shasum": "" }, "require": { @@ -2665,20 +2744,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-05T09:26:29+00:00" + "time": "2025-04-30T09:16:38+00:00" }, { "name": "filament/forms", - "version": "v3.3.3", + "version": "v3.3.14", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "420f6b2b30288c853024d189213e38f644dd6f6e" + "reference": "22e62dc2b4c68018e9846aadf7e8c5310d0e38cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/420f6b2b30288c853024d189213e38f644dd6f6e", - "reference": "420f6b2b30288c853024d189213e38f644dd6f6e", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/22e62dc2b4c68018e9846aadf7e8c5310d0e38cf", + "reference": "22e62dc2b4c68018e9846aadf7e8c5310d0e38cf", "shasum": "" }, "require": { @@ -2721,20 +2800,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-05T09:26:39+00:00" + "time": "2025-04-30T09:16:39+00:00" }, { "name": "filament/infolists", - "version": "v3.3.3", + "version": "v3.3.14", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "3498bfd23670f94d9c2160d2a7382775dfc97430" + "reference": "cc71f1c15f132660986384d302a33a2b20618a96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/3498bfd23670f94d9c2160d2a7382775dfc97430", - "reference": "3498bfd23670f94d9c2160d2a7382775dfc97430", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/cc71f1c15f132660986384d302a33a2b20618a96", + "reference": "cc71f1c15f132660986384d302a33a2b20618a96", "shasum": "" }, "require": { @@ -2772,20 +2851,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-03T08:11:43+00:00" + "time": "2025-04-23T06:39:44+00:00" }, { "name": "filament/notifications", - "version": "v3.3.3", + "version": "v3.3.14", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "8cfe18e5d04ba72d777753ed632bbcf3408236a2" + "reference": "edf7960621b2181b4c2fc040b0712fbd5dd036ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/8cfe18e5d04ba72d777753ed632bbcf3408236a2", - "reference": "8cfe18e5d04ba72d777753ed632bbcf3408236a2", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/edf7960621b2181b4c2fc040b0712fbd5dd036ef", + "reference": "edf7960621b2181b4c2fc040b0712fbd5dd036ef", "shasum": "" }, "require": { @@ -2824,20 +2903,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-02-25T08:18:58+00:00" + "time": "2025-04-23T06:39:49+00:00" }, { "name": "filament/support", - "version": "v3.3.3", + "version": "v3.3.14", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "fb5ff99b8f7559815434c109d505c12c141510da" + "reference": "0ab49fdb2bc937257d6f8e1f7b97a03216a43656" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/fb5ff99b8f7559815434c109d505c12c141510da", - "reference": "fb5ff99b8f7559815434c109d505c12c141510da", + "url": "https://api.github.com/repos/filamentphp/support/zipball/0ab49fdb2bc937257d6f8e1f7b97a03216a43656", + "reference": "0ab49fdb2bc937257d6f8e1f7b97a03216a43656", "shasum": "" }, "require": { @@ -2883,20 +2962,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-05T09:26:25+00:00" + "time": "2025-04-30T09:16:34+00:00" }, { "name": "filament/tables", - "version": "v3.3.3", + "version": "v3.3.14", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "5f2fbd8f0c6ffd19b2462269778ed96ce3c6fd35" + "reference": "bb5fad7306c39fdbb08d97982073114ac465bf92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/5f2fbd8f0c6ffd19b2462269778ed96ce3c6fd35", - "reference": "5f2fbd8f0c6ffd19b2462269778ed96ce3c6fd35", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/bb5fad7306c39fdbb08d97982073114ac465bf92", + "reference": "bb5fad7306c39fdbb08d97982073114ac465bf92", "shasum": "" }, "require": { @@ -2935,20 +3014,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-03-03T09:07:30+00:00" + "time": "2025-04-30T09:16:33+00:00" }, { "name": "filament/widgets", - "version": "v3.3.3", + "version": "v3.3.14", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", - "reference": "3bbd19044e19f93711f3690c441a3a0d35696aa1" + "reference": "048c5a4bf0477efbe2910c54a1aeb55c64cf1348" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/widgets/zipball/3bbd19044e19f93711f3690c441a3a0d35696aa1", - "reference": "3bbd19044e19f93711f3690c441a3a0d35696aa1", + "url": "https://api.github.com/repos/filamentphp/widgets/zipball/048c5a4bf0477efbe2910c54a1aeb55c64cf1348", + "reference": "048c5a4bf0477efbe2910c54a1aeb55c64cf1348", "shasum": "" }, "require": { @@ -2979,20 +3058,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2025-02-19T08:42:37+00:00" + "time": "2025-04-23T06:39:59+00:00" }, { "name": "firebase/php-jwt", - "version": "v6.11.0", + "version": "v6.11.1", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712" + "reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712", - "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/d1e91ecf8c598d073d0995afa8cd5c75c6e19e66", + "reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66", "shasum": "" }, "require": { @@ -3040,9 +3119,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.11.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.11.1" }, - "time": "2025-01-23T05:11:06+00:00" + "time": "2025-04-09T20:32:01+00:00" }, { "name": "fruitcake/php-cors", @@ -3179,16 +3258,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "version": "7.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", "shasum": "" }, "require": { @@ -3285,7 +3364,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" }, "funding": [ { @@ -3301,20 +3380,20 @@ "type": "tidelift" } ], - "time": "2024-07-24T11:22:20+00:00" + "time": "2025-03-27T13:37:11+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.4", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", "shasum": "" }, "require": { @@ -3368,7 +3447,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" + "source": "https://github.com/guzzle/promises/tree/2.2.0" }, "funding": [ { @@ -3384,20 +3463,20 @@ "type": "tidelift" } ], - "time": "2024-10-17T10:06:22+00:00" + "time": "2025-03-27T13:27:01+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.7.0", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", "shasum": "" }, "require": { @@ -3484,7 +3563,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.1" }, "funding": [ { @@ -3500,7 +3579,7 @@ "type": "tidelift" } ], - "time": "2024-07-18T11:15:46+00:00" + "time": "2025-03-27T12:30:47+00:00" }, { "name": "guzzlehttp/uri-template", @@ -3648,16 +3727,16 @@ }, { "name": "kirschbaum-development/eloquent-power-joins", - "version": "4.2.2", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/kirschbaum-development/eloquent-power-joins.git", - "reference": "a307fab78c291526fba754e6ac8a86f7bd58d45d" + "reference": "d04e06b12e5e7864c303b8a8c6045bfcd4e2c641" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/a307fab78c291526fba754e6ac8a86f7bd58d45d", - "reference": "a307fab78c291526fba754e6ac8a86f7bd58d45d", + "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/d04e06b12e5e7864c303b8a8c6045bfcd4e2c641", + "reference": "d04e06b12e5e7864c303b8a8c6045bfcd4e2c641", "shasum": "" }, "require": { @@ -3705,22 +3784,22 @@ ], "support": { "issues": "https://github.com/kirschbaum-development/eloquent-power-joins/issues", - "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/4.2.2" + "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/4.2.3" }, - "time": "2025-03-08T01:26:00+00:00" + "time": "2025-04-01T14:41:56+00:00" }, { "name": "laravel/framework", - "version": "v12.2.0", + "version": "v12.13.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "2fb06941bc69ea92f28b2888535ab144ee006889" + "reference": "52b588bcd8efc6d01bc1493d2d67848f8065f269" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/2fb06941bc69ea92f28b2888535ab144ee006889", - "reference": "2fb06941bc69ea92f28b2888535ab144ee006889", + "url": "https://api.github.com/repos/laravel/framework/zipball/52b588bcd8efc6d01bc1493d2d67848f8065f269", + "reference": "52b588bcd8efc6d01bc1493d2d67848f8065f269", "shasum": "" }, "require": { @@ -3741,7 +3820,7 @@ "guzzlehttp/uri-template": "^1.0", "laravel/prompts": "^0.3.0", "laravel/serializable-closure": "^1.3|^2.0", - "league/commonmark": "^2.6", + "league/commonmark": "^2.7", "league/flysystem": "^3.25.1", "league/flysystem-local": "^3.25.1", "league/uri": "^7.5.1", @@ -3829,11 +3908,11 @@ "league/flysystem-sftp-v3": "^3.25.1", "mockery/mockery": "^1.6.10", "orchestra/testbench-core": "^10.0.0", - "pda/pheanstalk": "^5.0.6", + "pda/pheanstalk": "^5.0.6|^7.0.0", "php-http/discovery": "^1.15", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.5.35|^11.5.3|^12.0.1", - "predis/predis": "^2.3", + "predis/predis": "^2.3|^3.0", "resend/resend-php": "^0.10.0", "symfony/cache": "^7.2.0", "symfony/http-client": "^7.2.0", @@ -3865,7 +3944,7 @@ "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", "php-http/discovery": "Required to use PSR-7 bridging features (^1.15).", "phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.5.3|^12.0.1).", - "predis/predis": "Required to use the predis connector (^2.3).", + "predis/predis": "Required to use the predis connector (^2.3|^3.0).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", @@ -3922,7 +4001,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2025-03-12T14:38:20+00:00" + "time": "2025-05-07T17:29:01+00:00" }, { "name": "laravel/helpers", @@ -4042,16 +4121,16 @@ }, { "name": "laravel/sanctum", - "version": "v4.0.8", + "version": "v4.1.1", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "ec1dd9ddb2ab370f79dfe724a101856e0963f43c" + "reference": "a360a6a1fd2400ead4eb9b6a9c1bb272939194f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/ec1dd9ddb2ab370f79dfe724a101856e0963f43c", - "reference": "ec1dd9ddb2ab370f79dfe724a101856e0963f43c", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/a360a6a1fd2400ead4eb9b6a9c1bb272939194f5", + "reference": "a360a6a1fd2400ead4eb9b6a9c1bb272939194f5", "shasum": "" }, "require": { @@ -4102,20 +4181,20 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2025-01-26T19:34:36+00:00" + "time": "2025-04-23T13:03:38+00:00" }, { "name": "laravel/serializable-closure", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "f379c13663245f7aa4512a7869f62eb14095f23f" + "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f379c13663245f7aa4512a7869f62eb14095f23f", - "reference": "f379c13663245f7aa4512a7869f62eb14095f23f", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b352cf0534aa1ae6b4d825d1e762e35d43f8a841", + "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841", "shasum": "" }, "require": { @@ -4163,20 +4242,20 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2025-02-11T15:03:05+00:00" + "time": "2025-03-19T13:51:03+00:00" }, { "name": "laravel/socialite", - "version": "v5.18.0", + "version": "v5.20.0", "source": { "type": "git", "url": "https://github.com/laravel/socialite.git", - "reference": "7809dc71250e074cd42970f0f803f2cddc04c5de" + "reference": "30972c12a41f71abeb418bc9ff157da8d9231519" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/7809dc71250e074cd42970f0f803f2cddc04c5de", - "reference": "7809dc71250e074cd42970f0f803f2cddc04c5de", + "url": "https://api.github.com/repos/laravel/socialite/zipball/30972c12a41f71abeb418bc9ff157da8d9231519", + "reference": "30972c12a41f71abeb418bc9ff157da8d9231519", "shasum": "" }, "require": { @@ -4193,7 +4272,7 @@ "require-dev": { "mockery/mockery": "^1.0", "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0", - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^1.12.23", "phpunit/phpunit": "^8.0|^9.3|^10.4|^11.5" }, "type": "library", @@ -4235,7 +4314,7 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2025-02-11T13:38:19+00:00" + "time": "2025-04-21T14:21:34+00:00" }, { "name": "laravel/tinker", @@ -4506,16 +4585,16 @@ }, { "name": "league/commonmark", - "version": "2.6.1", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "d990688c91cedfb69753ffc2512727ec646df2ad" + "reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d990688c91cedfb69753ffc2512727ec646df2ad", - "reference": "d990688c91cedfb69753ffc2512727ec646df2ad", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6fbb36d44824ed4091adbcf4c7d4a3923cdb3405", + "reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405", "shasum": "" }, "require": { @@ -4552,7 +4631,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.7-dev" + "dev-main": "2.8-dev" } }, "autoload": { @@ -4609,7 +4688,7 @@ "type": "tidelift" } ], - "time": "2024-12-29T14:10:59+00:00" + "time": "2025-05-05T12:20:28+00:00" }, { "name": "league/config", @@ -4695,16 +4774,16 @@ }, { "name": "league/csv", - "version": "9.22.0", + "version": "9.23.0", "source": { "type": "git", "url": "https://github.com/thephpleague/csv.git", - "reference": "afc109aa11f3086b8be8dfffa04ac31480b36b76" + "reference": "774008ad8a634448e4f8e288905e070e8b317ff3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/csv/zipball/afc109aa11f3086b8be8dfffa04ac31480b36b76", - "reference": "afc109aa11f3086b8be8dfffa04ac31480b36b76", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/774008ad8a634448e4f8e288905e070e8b317ff3", + "reference": "774008ad8a634448e4f8e288905e070e8b317ff3", "shasum": "" }, "require": { @@ -4782,7 +4861,7 @@ "type": "github" } ], - "time": "2025-02-28T10:00:39+00:00" + "time": "2025-03-28T06:52:04+00:00" }, { "name": "league/flysystem", @@ -5397,16 +5476,16 @@ }, { "name": "livewire/livewire", - "version": "v3.6.2", + "version": "v3.6.3", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "8f8914731f5eb43b6bb145d87c8d5a9edfc89313" + "reference": "56aa1bb63a46e06181c56fa64717a7287e19115e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/8f8914731f5eb43b6bb145d87c8d5a9edfc89313", - "reference": "8f8914731f5eb43b6bb145d87c8d5a9edfc89313", + "url": "https://api.github.com/repos/livewire/livewire/zipball/56aa1bb63a46e06181c56fa64717a7287e19115e", + "reference": "56aa1bb63a46e06181c56fa64717a7287e19115e", "shasum": "" }, "require": { @@ -5461,7 +5540,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v3.6.2" + "source": "https://github.com/livewire/livewire/tree/v3.6.3" }, "funding": [ { @@ -5469,7 +5548,7 @@ "type": "github" } ], - "time": "2025-03-12T20:24:15+00:00" + "time": "2025-04-12T22:26:52+00:00" }, { "name": "masterminds/html5", @@ -5540,16 +5619,16 @@ }, { "name": "monolog/monolog", - "version": "3.8.1", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6", "shasum": "" }, "require": { @@ -5627,7 +5706,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.8.1" + "source": "https://github.com/Seldaek/monolog/tree/3.9.0" }, "funding": [ { @@ -5639,7 +5718,7 @@ "type": "tidelift" } ], - "time": "2024-12-05T17:15:07+00:00" + "time": "2025-03-24T10:02:05+00:00" }, { "name": "mtdowling/jmespath.php", @@ -5709,16 +5788,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.0", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "024473a478be9df5fdaca2c793f2232fe788e414" + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414", - "reference": "024473a478be9df5fdaca2c793f2232fe788e414", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", "shasum": "" }, "require": { @@ -5757,7 +5836,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" }, "funding": [ { @@ -5765,20 +5844,20 @@ "type": "tidelift" } ], - "time": "2025-02-12T12:17:51+00:00" + "time": "2025-04-29T12:36:36+00:00" }, { "name": "nesbot/carbon", - "version": "3.8.6", + "version": "3.9.1", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon.git", - "reference": "ff2f20cf83bd4d503720632ce8a426dc747bf7fd" + "reference": "ced71f79398ece168e24f7f7710462f462310d4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/ff2f20cf83bd4d503720632ce8a426dc747bf7fd", - "reference": "ff2f20cf83bd4d503720632ce8a426dc747bf7fd", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/ced71f79398ece168e24f7f7710462f462310d4d", + "reference": "ced71f79398ece168e24f7f7710462f462310d4d", "shasum": "" }, "require": { @@ -5871,7 +5950,7 @@ "type": "tidelift" } ], - "time": "2025-02-20T17:33:38+00:00" + "time": "2025-05-01T19:51:51+00:00" }, { "name": "nette/schema", @@ -5937,16 +6016,16 @@ }, { "name": "nette/utils", - "version": "v4.0.5", + "version": "v4.0.6", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96" + "reference": "ce708655043c7050eb050df361c5e313cf708309" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", - "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", + "url": "https://api.github.com/repos/nette/utils/zipball/ce708655043c7050eb050df361c5e313cf708309", + "reference": "ce708655043c7050eb050df361c5e313cf708309", "shasum": "" }, "require": { @@ -6017,9 +6096,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.5" + "source": "https://github.com/nette/utils/tree/v4.0.6" }, - "time": "2024-08-07T15:39:19+00:00" + "time": "2025-03-30T21:06:30+00:00" }, { "name": "nikic/php-parser", @@ -6498,16 +6577,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.1", + "version": "5.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8" + "reference": "92dde6a5919e34835c506ac8c523ef095a95ed62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", - "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/92dde6a5919e34835c506ac8c523ef095a95ed62", + "reference": "92dde6a5919e34835c506ac8c523ef095a95ed62", "shasum": "" }, "require": { @@ -6556,9 +6635,9 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.1" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.2" }, - "time": "2024-12-07T09:39:29+00:00" + "time": "2025-04-13T19:20:35+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -6904,16 +6983,16 @@ }, { "name": "predis/predis", - "version": "v2.3.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/predis/predis.git", - "reference": "bac46bfdb78cd6e9c7926c697012aae740cb9ec9" + "reference": "f49e13ee3a2a825631562aa0223ac922ec5d058b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/bac46bfdb78cd6e9c7926c697012aae740cb9ec9", - "reference": "bac46bfdb78cd6e9c7926c697012aae740cb9ec9", + "url": "https://api.github.com/repos/predis/predis/zipball/f49e13ee3a2a825631562aa0223ac922ec5d058b", + "reference": "f49e13ee3a2a825631562aa0223ac922ec5d058b", "shasum": "" }, "require": { @@ -6922,6 +7001,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.3", "phpstan/phpstan": "^1.9", + "phpunit/phpcov": "^6.0 || ^8.0", "phpunit/phpunit": "^8.0 || ^9.4" }, "suggest": { @@ -6944,7 +7024,7 @@ "role": "Maintainer" } ], - "description": "A flexible and feature-complete Redis client for PHP.", + "description": "A flexible and feature-complete Redis/Valkey client for PHP.", "homepage": "http://github.com/predis/predis", "keywords": [ "nosql", @@ -6953,7 +7033,7 @@ ], "support": { "issues": "https://github.com/predis/predis/issues", - "source": "https://github.com/predis/predis/tree/v2.3.0" + "source": "https://github.com/predis/predis/tree/v2.4.0" }, "funding": [ { @@ -6961,7 +7041,7 @@ "type": "github" } ], - "time": "2024-11-21T20:00:02+00:00" + "time": "2025-04-30T15:16:02+00:00" }, { "name": "psr/cache", @@ -7426,16 +7506,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.7", + "version": "v0.12.8", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c" + "reference": "85057ceedee50c49d4f6ecaff73ee96adb3b3625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", - "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/85057ceedee50c49d4f6ecaff73ee96adb3b3625", + "reference": "85057ceedee50c49d4f6ecaff73ee96adb3b3625", "shasum": "" }, "require": { @@ -7499,9 +7579,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.7" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.8" }, - "time": "2024-12-10T01:58:33+00:00" + "time": "2025-03-16T03:05:19+00:00" }, { "name": "ralouphie/getallheaders", @@ -7549,16 +7629,16 @@ }, { "name": "ramsey/collection", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109" + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109", - "reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", "shasum": "" }, "require": { @@ -7619,9 +7699,9 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.1.0" + "source": "https://github.com/ramsey/collection/tree/2.1.1" }, - "time": "2025-03-02T04:48:29+00:00" + "time": "2025-03-22T05:38:12+00:00" }, { "name": "ramsey/uuid", @@ -8461,16 +8541,16 @@ }, { "name": "spatie/laravel-data", - "version": "4.14.0", + "version": "4.15.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-data.git", - "reference": "3e1240353569e8fb64b5859eed01652d5df3358b" + "reference": "cb97afe6c0dadeb2e76ea1b7220cd04ed33dcca9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-data/zipball/3e1240353569e8fb64b5859eed01652d5df3358b", - "reference": "3e1240353569e8fb64b5859eed01652d5df3358b", + "url": "https://api.github.com/repos/spatie/laravel-data/zipball/cb97afe6c0dadeb2e76ea1b7220cd04ed33dcca9", + "reference": "cb97afe6c0dadeb2e76ea1b7220cd04ed33dcca9", "shasum": "" }, "require": { @@ -8483,6 +8563,7 @@ "require-dev": { "fakerphp/faker": "^1.14", "friendsofphp/php-cs-fixer": "^3.0", + "inertiajs/inertia-laravel": "^2.0", "livewire/livewire": "^3.0", "mockery/mockery": "^1.6", "nesbot/carbon": "^2.63|^3.0", @@ -8531,7 +8612,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-data/issues", - "source": "https://github.com/spatie/laravel-data/tree/4.14.0" + "source": "https://github.com/spatie/laravel-data/tree/4.15.1" }, "funding": [ { @@ -8539,7 +8620,7 @@ "type": "github" } ], - "time": "2025-03-14T14:26:23+00:00" + "time": "2025-04-10T06:06:27+00:00" }, { "name": "spatie/laravel-fractal", @@ -8624,16 +8705,16 @@ }, { "name": "spatie/laravel-health", - "version": "1.32.5", + "version": "1.34.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-health.git", - "reference": "afd55006d1ffe312b1e81cd0b6417f6a5226ae82" + "reference": "283d7d5dffeeff6452c9a182f466c327fec6db3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-health/zipball/afd55006d1ffe312b1e81cd0b6417f6a5226ae82", - "reference": "afd55006d1ffe312b1e81cd0b6417f6a5226ae82", + "url": "https://api.github.com/repos/spatie/laravel-health/zipball/283d7d5dffeeff6452c9a182f466c327fec6db3b", + "reference": "283d7d5dffeeff6452c9a182f466c327fec6db3b", "shasum": "" }, "require": { @@ -8705,7 +8786,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/laravel-health/tree/1.32.5" + "source": "https://github.com/spatie/laravel-health/tree/1.34.1" }, "funding": [ { @@ -8713,20 +8794,20 @@ "type": "github" } ], - "time": "2025-03-08T12:16:07+00:00" + "time": "2025-04-17T06:34:01+00:00" }, { "name": "spatie/laravel-package-tools", - "version": "1.19.0", + "version": "1.92.4", "source": { "type": "git", "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa" + "reference": "d20b1969f836d210459b78683d85c9cd5c5f508c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa", - "reference": "1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/d20b1969f836d210459b78683d85c9cd5c5f508c", + "reference": "d20b1969f836d210459b78683d85c9cd5c5f508c", "shasum": "" }, "require": { @@ -8737,6 +8818,7 @@ "mockery/mockery": "^1.5", "orchestra/testbench": "^7.7|^8.0|^9.0|^10.0", "pestphp/pest": "^1.23|^2.1|^3.1", + "phpunit/php-code-coverage": "^9.0|^10.0|^11.0", "phpunit/phpunit": "^9.5.24|^10.5|^11.5", "spatie/pest-plugin-test-time": "^1.1|^2.2" }, @@ -8765,7 +8847,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.19.0" + "source": "https://github.com/spatie/laravel-package-tools/tree/1.92.4" }, "funding": [ { @@ -8773,20 +8855,20 @@ "type": "github" } ], - "time": "2025-02-06T14:58:20+00:00" + "time": "2025-04-11T15:27:14+00:00" }, { "name": "spatie/laravel-permission", - "version": "6.16.0", + "version": "6.17.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-permission.git", - "reference": "4fa03c06509e037a4d42c131d0f181e3e4bbd483" + "reference": "02ada8f638b643713fa2fb543384738e27346ddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/4fa03c06509e037a4d42c131d0f181e3e4bbd483", - "reference": "4fa03c06509e037a4d42c131d0f181e3e4bbd483", + "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/02ada8f638b643713fa2fb543384738e27346ddb", + "reference": "02ada8f638b643713fa2fb543384738e27346ddb", "shasum": "" }, "require": { @@ -8848,7 +8930,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-permission/issues", - "source": "https://github.com/spatie/laravel-permission/tree/6.16.0" + "source": "https://github.com/spatie/laravel-permission/tree/6.17.0" }, "funding": [ { @@ -8856,20 +8938,20 @@ "type": "github" } ], - "time": "2025-02-28T20:29:57+00:00" + "time": "2025-04-08T15:06:14+00:00" }, { "name": "spatie/laravel-query-builder", - "version": "6.3.1", + "version": "6.3.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-query-builder.git", - "reference": "465d9b7364590c9ae3ee3738ff8a293e685dd588" + "reference": "3675f7bace346dc5243f58fa7c531e36471200f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-query-builder/zipball/465d9b7364590c9ae3ee3738ff8a293e685dd588", - "reference": "465d9b7364590c9ae3ee3738ff8a293e685dd588", + "url": "https://api.github.com/repos/spatie/laravel-query-builder/zipball/3675f7bace346dc5243f58fa7c531e36471200f4", + "reference": "3675f7bace346dc5243f58fa7c531e36471200f4", "shasum": "" }, "require": { @@ -8929,7 +9011,7 @@ "type": "custom" } ], - "time": "2025-02-19T07:14:53+00:00" + "time": "2025-04-16T07:30:03+00:00" }, { "name": "spatie/php-structure-discoverer", @@ -9210,16 +9292,16 @@ }, { "name": "symfony/console", - "version": "v7.2.1", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" + "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "url": "https://api.github.com/repos/symfony/console/zipball/0e2e3f38c192e93e622e41ec37f4ca70cfedf218", + "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218", "shasum": "" }, "require": { @@ -9283,7 +9365,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.1" + "source": "https://github.com/symfony/console/tree/v7.2.6" }, "funding": [ { @@ -9299,7 +9381,7 @@ "type": "tidelift" } ], - "time": "2024-12-11T03:49:26+00:00" + "time": "2025-04-07T19:09:28+00:00" }, { "name": "symfony/css-selector", @@ -9435,16 +9517,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.2.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "aabf79938aa795350c07ce6464dd1985607d95d5" + "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/aabf79938aa795350c07ce6464dd1985607d95d5", - "reference": "aabf79938aa795350c07ce6464dd1985607d95d5", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", + "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", "shasum": "" }, "require": { @@ -9490,7 +9572,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.2.4" + "source": "https://github.com/symfony/error-handler/tree/v7.2.5" }, "funding": [ { @@ -9506,7 +9588,7 @@ "type": "tidelift" } ], - "time": "2025-02-02T20:27:07+00:00" + "time": "2025-03-03T07:12:39+00:00" }, { "name": "symfony/event-dispatcher", @@ -9730,16 +9812,16 @@ }, { "name": "symfony/html-sanitizer", - "version": "v7.2.3", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/html-sanitizer.git", - "reference": "91443febe34cfa5e8e00425f892e6316db95bc23" + "reference": "1bd0c8fd5938d9af3f081a7c43d360ddefd494ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/91443febe34cfa5e8e00425f892e6316db95bc23", - "reference": "91443febe34cfa5e8e00425f892e6316db95bc23", + "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/1bd0c8fd5938d9af3f081a7c43d360ddefd494ca", + "reference": "1bd0c8fd5938d9af3f081a7c43d360ddefd494ca", "shasum": "" }, "require": { @@ -9779,7 +9861,7 @@ "sanitizer" ], "support": { - "source": "https://github.com/symfony/html-sanitizer/tree/v7.2.3" + "source": "https://github.com/symfony/html-sanitizer/tree/v7.2.6" }, "funding": [ { @@ -9795,7 +9877,7 @@ "type": "tidelift" } ], - "time": "2025-01-27T11:08:17+00:00" + "time": "2025-03-31T08:29:03+00:00" }, { "name": "symfony/http-client", @@ -9972,16 +10054,16 @@ }, { "name": "symfony/http-foundation", - "version": "v7.2.3", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0" + "reference": "6023ec7607254c87c5e69fb3558255aca440d72b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ee1b504b8926198be89d05e5b6fc4c3810c090f0", - "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6023ec7607254c87c5e69fb3558255aca440d72b", + "reference": "6023ec7607254c87c5e69fb3558255aca440d72b", "shasum": "" }, "require": { @@ -10030,7 +10112,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.2.3" + "source": "https://github.com/symfony/http-foundation/tree/v7.2.6" }, "funding": [ { @@ -10046,20 +10128,20 @@ "type": "tidelift" } ], - "time": "2025-01-17T10:56:55+00:00" + "time": "2025-04-09T08:14:01+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.2.4", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "9f1103734c5789798fefb90e91de4586039003ed" + "reference": "f9dec01e6094a063e738f8945ef69c0cfcf792ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f1103734c5789798fefb90e91de4586039003ed", - "reference": "9f1103734c5789798fefb90e91de4586039003ed", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f9dec01e6094a063e738f8945ef69c0cfcf792ec", + "reference": "f9dec01e6094a063e738f8945ef69c0cfcf792ec", "shasum": "" }, "require": { @@ -10144,7 +10226,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.2.4" + "source": "https://github.com/symfony/http-kernel/tree/v7.2.6" }, "funding": [ { @@ -10160,20 +10242,20 @@ "type": "tidelift" } ], - "time": "2025-02-26T11:01:22+00:00" + "time": "2025-05-02T09:04:03+00:00" }, { "name": "symfony/mailer", - "version": "v7.2.3", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "f3871b182c44997cf039f3b462af4a48fb85f9d3" + "reference": "998692469d6e698c6eadc7ef37a6530a9eabb356" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/f3871b182c44997cf039f3b462af4a48fb85f9d3", - "reference": "f3871b182c44997cf039f3b462af4a48fb85f9d3", + "url": "https://api.github.com/repos/symfony/mailer/zipball/998692469d6e698c6eadc7ef37a6530a9eabb356", + "reference": "998692469d6e698c6eadc7ef37a6530a9eabb356", "shasum": "" }, "require": { @@ -10224,7 +10306,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.2.3" + "source": "https://github.com/symfony/mailer/tree/v7.2.6" }, "funding": [ { @@ -10240,7 +10322,7 @@ "type": "tidelift" } ], - "time": "2025-01-27T11:08:17+00:00" + "time": "2025-04-04T09:50:51+00:00" }, { "name": "symfony/mailgun-mailer", @@ -10313,16 +10395,16 @@ }, { "name": "symfony/mime", - "version": "v7.2.4", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "87ca22046b78c3feaff04b337f33b38510fd686b" + "reference": "706e65c72d402539a072d0d6ad105fff6c161ef1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/87ca22046b78c3feaff04b337f33b38510fd686b", - "reference": "87ca22046b78c3feaff04b337f33b38510fd686b", + "url": "https://api.github.com/repos/symfony/mime/zipball/706e65c72d402539a072d0d6ad105fff6c161ef1", + "reference": "706e65c72d402539a072d0d6ad105fff6c161ef1", "shasum": "" }, "require": { @@ -10377,7 +10459,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.2.4" + "source": "https://github.com/symfony/mime/tree/v7.2.6" }, "funding": [ { @@ -10393,11 +10475,11 @@ "type": "tidelift" } ], - "time": "2025-02-19T08:51:20+00:00" + "time": "2025-04-27T13:34:41+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -10456,7 +10538,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" }, "funding": [ { @@ -10476,7 +10558,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -10534,7 +10616,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" }, "funding": [ { @@ -10554,16 +10636,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" + "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", - "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3", + "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3", "shasum": "" }, "require": { @@ -10617,7 +10699,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.32.0" }, "funding": [ { @@ -10633,11 +10715,11 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-09-10T14:38:51+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -10698,7 +10780,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" }, "funding": [ { @@ -10718,19 +10800,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -10778,7 +10861,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -10794,20 +10877,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", "shasum": "" }, "require": { @@ -10858,7 +10941,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" }, "funding": [ { @@ -10874,11 +10957,11 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-01-02T08:10:11+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", @@ -10934,7 +11017,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.32.0" }, "funding": [ { @@ -10954,7 +11037,7 @@ }, { "name": "symfony/polyfill-uuid", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", @@ -11013,7 +11096,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.32.0" }, "funding": [ { @@ -11033,16 +11116,16 @@ }, { "name": "symfony/postmark-mailer", - "version": "v7.2.4", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/postmark-mailer.git", - "reference": "d11c8ce0ff5974a2ee4a9a3297ba89ecdf6d1952" + "reference": "71ac001f8bc2ac36cc0bbea3fd6f4a4087d0cec0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/postmark-mailer/zipball/d11c8ce0ff5974a2ee4a9a3297ba89ecdf6d1952", - "reference": "d11c8ce0ff5974a2ee4a9a3297ba89ecdf6d1952", + "url": "https://api.github.com/repos/symfony/postmark-mailer/zipball/71ac001f8bc2ac36cc0bbea3fd6f4a4087d0cec0", + "reference": "71ac001f8bc2ac36cc0bbea3fd6f4a4087d0cec0", "shasum": "" }, "require": { @@ -11083,7 +11166,7 @@ "description": "Symfony Postmark Mailer Bridge", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/postmark-mailer/tree/v7.2.4" + "source": "https://github.com/symfony/postmark-mailer/tree/v7.2.6" }, "funding": [ { @@ -11099,20 +11182,20 @@ "type": "tidelift" } ], - "time": "2025-02-26T08:19:39+00:00" + "time": "2025-04-30T07:52:47+00:00" }, { "name": "symfony/process", - "version": "v7.2.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf" + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf", - "reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf", + "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", "shasum": "" }, "require": { @@ -11144,7 +11227,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.4" + "source": "https://github.com/symfony/process/tree/v7.2.5" }, "funding": [ { @@ -11160,7 +11243,7 @@ "type": "tidelift" } ], - "time": "2025-02-05T08:33:46+00:00" + "time": "2025-03-13T12:21:46+00:00" }, { "name": "symfony/routing", @@ -11328,16 +11411,16 @@ }, { "name": "symfony/string", - "version": "v7.2.0", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" + "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", + "url": "https://api.github.com/repos/symfony/string/zipball/a214fe7d62bd4df2a76447c67c6b26e1d5e74931", + "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931", "shasum": "" }, "require": { @@ -11395,7 +11478,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.2.0" + "source": "https://github.com/symfony/string/tree/v7.2.6" }, "funding": [ { @@ -11411,20 +11494,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:26+00:00" + "time": "2025-04-20T20:18:16+00:00" }, { "name": "symfony/translation", - "version": "v7.2.4", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "283856e6981286cc0d800b53bd5703e8e363f05a" + "reference": "e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/283856e6981286cc0d800b53bd5703e8e363f05a", - "reference": "283856e6981286cc0d800b53bd5703e8e363f05a", + "url": "https://api.github.com/repos/symfony/translation/zipball/e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6", + "reference": "e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6", "shasum": "" }, "require": { @@ -11490,7 +11573,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.2.4" + "source": "https://github.com/symfony/translation/tree/v7.2.6" }, "funding": [ { @@ -11506,7 +11589,7 @@ "type": "tidelift" } ], - "time": "2025-02-13T10:27:23+00:00" + "time": "2025-04-07T19:09:28+00:00" }, { "name": "symfony/translation-contracts", @@ -11662,16 +11745,16 @@ }, { "name": "symfony/var-dumper", - "version": "v7.2.3", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "82b478c69745d8878eb60f9a049a4d584996f73a" + "reference": "9c46038cd4ed68952166cf7001b54eb539184ccb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/82b478c69745d8878eb60f9a049a4d584996f73a", - "reference": "82b478c69745d8878eb60f9a049a4d584996f73a", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9c46038cd4ed68952166cf7001b54eb539184ccb", + "reference": "9c46038cd4ed68952166cf7001b54eb539184ccb", "shasum": "" }, "require": { @@ -11725,7 +11808,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.2.3" + "source": "https://github.com/symfony/var-dumper/tree/v7.2.6" }, "funding": [ { @@ -11741,20 +11824,20 @@ "type": "tidelift" } ], - "time": "2025-01-17T11:39:41+00:00" + "time": "2025-04-09T08:14:01+00:00" }, { "name": "symfony/yaml", - "version": "v7.2.3", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ac238f173df0c9c1120f862d0f599e17535a87ec" + "reference": "0feafffb843860624ddfd13478f481f4c3cd8b23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ac238f173df0c9c1120f862d0f599e17535a87ec", - "reference": "ac238f173df0c9c1120f862d0f599e17535a87ec", + "url": "https://api.github.com/repos/symfony/yaml/zipball/0feafffb843860624ddfd13478f481f4c3cd8b23", + "reference": "0feafffb843860624ddfd13478f481f4c3cd8b23", "shasum": "" }, "require": { @@ -11797,7 +11880,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.2.3" + "source": "https://github.com/symfony/yaml/tree/v7.2.6" }, "funding": [ { @@ -11813,7 +11896,7 @@ "type": "tidelift" } ], - "time": "2025-01-07T12:55:42+00:00" + "time": "2025-04-04T10:10:11+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -11872,16 +11955,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.6.1", + "version": "v5.6.2", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af", "shasum": "" }, "require": { @@ -11940,7 +12023,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.2" }, "funding": [ { @@ -11952,7 +12035,7 @@ "type": "tidelift" } ], - "time": "2024-07-20T21:52:34+00:00" + "time": "2025-04-30T23:37:27+00:00" }, { "name": "voku/portable-ascii", @@ -12290,16 +12373,16 @@ }, { "name": "brianium/paratest", - "version": "v7.7.0", + "version": "v7.8.3", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "4fb3f73bc5a4c3146bac2850af7dc72435a32daf" + "reference": "a585c346ddf1bec22e51e20b5387607905604a71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/4fb3f73bc5a4c3146bac2850af7dc72435a32daf", - "reference": "4fb3f73bc5a4c3146bac2850af7dc72435a32daf", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/a585c346ddf1bec22e51e20b5387607905604a71", + "reference": "a585c346ddf1bec22e51e20b5387607905604a71", "shasum": "" }, "require": { @@ -12310,23 +12393,23 @@ "fidry/cpu-core-counter": "^1.2.0", "jean85/pretty-package-versions": "^2.1.0", "php": "~8.2.0 || ~8.3.0 || ~8.4.0", - "phpunit/php-code-coverage": "^11.0.8", - "phpunit/php-file-iterator": "^5.1.0", - "phpunit/php-timer": "^7.0.1", - "phpunit/phpunit": "^11.5.1", - "sebastian/environment": "^7.2.0", - "symfony/console": "^6.4.14 || ^7.2.1", - "symfony/process": "^6.4.14 || ^7.2.0" + "phpunit/php-code-coverage": "^11.0.9 || ^12.0.4", + "phpunit/php-file-iterator": "^5.1.0 || ^6", + "phpunit/php-timer": "^7.0.1 || ^8", + "phpunit/phpunit": "^11.5.11 || ^12.0.6", + "sebastian/environment": "^7.2.0 || ^8", + "symfony/console": "^6.4.17 || ^7.2.1", + "symfony/process": "^6.4.19 || ^7.2.4" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-pcov": "*", "ext-posix": "*", - "phpstan/phpstan": "^2.0.3", + "phpstan/phpstan": "^2.1.6", "phpstan/phpstan-deprecation-rules": "^2.0.1", - "phpstan/phpstan-phpunit": "^2.0.1", - "phpstan/phpstan-strict-rules": "^2", - "squizlabs/php_codesniffer": "^3.11.1", + "phpstan/phpstan-phpunit": "^2.0.4", + "phpstan/phpstan-strict-rules": "^2.0.3", + "squizlabs/php_codesniffer": "^3.11.3", "symfony/filesystem": "^6.4.13 || ^7.2.0" }, "bin": [ @@ -12367,7 +12450,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.7.0" + "source": "https://github.com/paratestphp/paratest/tree/v7.8.3" }, "funding": [ { @@ -12379,20 +12462,20 @@ "type": "paypal" } ], - "time": "2024-12-11T14:50:44+00:00" + "time": "2025-03-05T08:29:11+00:00" }, { "name": "composer/class-map-generator", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9" + "reference": "134b705ddb0025d397d8318a75825fe3c9d1da34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ffe442c5974c44a9343e37a0abcb1cc37319f5b9", - "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/134b705ddb0025d397d8318a75825fe3c9d1da34", + "reference": "134b705ddb0025d397d8318a75825fe3c9d1da34", "shasum": "" }, "require": { @@ -12436,7 +12519,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.6.0" + "source": "https://github.com/composer/class-map-generator/tree/1.6.1" }, "funding": [ { @@ -12452,7 +12535,7 @@ "type": "tidelift" } ], - "time": "2025-02-05T10:05:34+00:00" + "time": "2025-03-24T13:50:44+00:00" }, { "name": "composer/pcre", @@ -12730,20 +12813,20 @@ }, { "name": "hamcrest/hamcrest-php", - "version": "v2.0.1", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", "shasum": "" }, "require": { - "php": "^5.3|^7.0|^8.0" + "php": "^7.4|^8.0" }, "replace": { "cordoval/hamcrest-php": "*", @@ -12751,8 +12834,8 @@ "kodova/hamcrest-php": "*" }, "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { @@ -12775,22 +12858,22 @@ ], "support": { "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" }, - "time": "2020-07-09T08:09:16+00:00" + "time": "2025-04-30T06:54:44+00:00" }, { "name": "iamcal/sql-parser", - "version": "v0.5", + "version": "v0.6", "source": { "type": "git", "url": "https://github.com/iamcal/SQLParser.git", - "reference": "644fd994de3b54e5d833aecf406150aa3b66ca88" + "reference": "947083e2dca211a6f12fb1beb67a01e387de9b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/iamcal/SQLParser/zipball/644fd994de3b54e5d833aecf406150aa3b66ca88", - "reference": "644fd994de3b54e5d833aecf406150aa3b66ca88", + "url": "https://api.github.com/repos/iamcal/SQLParser/zipball/947083e2dca211a6f12fb1beb67a01e387de9b62", + "reference": "947083e2dca211a6f12fb1beb67a01e387de9b62", "shasum": "" }, "require-dev": { @@ -12816,22 +12899,22 @@ "description": "MySQL schema parser", "support": { "issues": "https://github.com/iamcal/SQLParser/issues", - "source": "https://github.com/iamcal/SQLParser/tree/v0.5" + "source": "https://github.com/iamcal/SQLParser/tree/v0.6" }, - "time": "2024-03-22T22:46:32+00:00" + "time": "2025-03-17T16:59:46+00:00" }, { "name": "jean85/pretty-package-versions", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "3c4e5f62ba8d7de1734312e4fff32f67a8daaf10" + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/3c4e5f62ba8d7de1734312e4fff32f67a8daaf10", - "reference": "3c4e5f62ba8d7de1734312e4fff32f67a8daaf10", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a", + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a", "shasum": "" }, "require": { @@ -12841,8 +12924,9 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "jean85/composer-provided-replaced-stub-package": "^1.0", - "phpstan/phpstan": "^1.4", + "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^7.5|^8.5|^9.6", + "rector/rector": "^2.0", "vimeo/psalm": "^4.3 || ^5.0" }, "type": "library", @@ -12875,46 +12959,46 @@ ], "support": { "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.0" + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.1" }, - "time": "2024-11-18T16:19:46+00:00" + "time": "2025-03-19T14:43:43+00:00" }, { "name": "larastan/larastan", - "version": "v3.2.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/larastan/larastan.git", - "reference": "d84d5a3b6536a586899ad6855a3e098473703690" + "reference": "1042fa0c2ee490bb6da7381f3323f7292ad68222" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/larastan/larastan/zipball/d84d5a3b6536a586899ad6855a3e098473703690", - "reference": "d84d5a3b6536a586899ad6855a3e098473703690", + "url": "https://api.github.com/repos/larastan/larastan/zipball/1042fa0c2ee490bb6da7381f3323f7292ad68222", + "reference": "1042fa0c2ee490bb6da7381f3323f7292ad68222", "shasum": "" }, "require": { "ext-json": "*", - "iamcal/sql-parser": "^0.5.0", - "illuminate/console": "^11.41.3 || ^12.0", - "illuminate/container": "^11.41.3 || ^12.0", - "illuminate/contracts": "^11.41.3 || ^12.0", - "illuminate/database": "^11.41.3 || ^12.0", - "illuminate/http": "^11.41.3 || ^12.0", - "illuminate/pipeline": "^11.41.3 || ^12.0", - "illuminate/support": "^11.41.3 || ^12.0", + "iamcal/sql-parser": "^0.6.0", + "illuminate/console": "^11.44.2 || ^12.4.1", + "illuminate/container": "^11.44.2 || ^12.4.1", + "illuminate/contracts": "^11.44.2 || ^12.4.1", + "illuminate/database": "^11.44.2 || ^12.4.1", + "illuminate/http": "^11.44.2 || ^12.4.1", + "illuminate/pipeline": "^11.44.2 || ^12.4.1", + "illuminate/support": "^11.44.2 || ^12.4.1", "php": "^8.2", - "phpstan/phpstan": "^2.1.3" + "phpstan/phpstan": "^2.1.11" }, "require-dev": { - "doctrine/coding-standard": "^12.0", - "laravel/framework": "^11.41.3 || ^12.0", - "mockery/mockery": "^1.6", - "nikic/php-parser": "^5.3", - "orchestra/canvas": "^v9.1.3 || ^10.0", - "orchestra/testbench-core": "^9.5.2 || ^10.0", - "phpstan/phpstan-deprecation-rules": "^2.0.0", - "phpunit/phpunit": "^10.5.35 || ^11.3.6" + "doctrine/coding-standard": "^13", + "laravel/framework": "^11.44.2 || ^12.7.2", + "mockery/mockery": "^1.6.12", + "nikic/php-parser": "^5.4", + "orchestra/canvas": "^v9.2.2 || ^10.0.1", + "orchestra/testbench-core": "^9.12.0 || ^10.1", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpunit/phpunit": "^10.5.35 || ^11.5.15" }, "suggest": { "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" @@ -12943,13 +13027,9 @@ { "name": "Can Vural", "email": "can9119@gmail.com" - }, - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" } ], - "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", + "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel", "keywords": [ "PHPStan", "code analyse", @@ -12962,7 +13042,7 @@ ], "support": { "issues": "https://github.com/larastan/larastan/issues", - "source": "https://github.com/larastan/larastan/tree/v3.2.0" + "source": "https://github.com/larastan/larastan/tree/v3.4.0" }, "funding": [ { @@ -12970,7 +13050,7 @@ "type": "github" } ], - "time": "2025-03-14T21:54:26+00:00" + "time": "2025-04-22T09:44:59+00:00" }, { "name": "laravel/pail", @@ -13052,16 +13132,16 @@ }, { "name": "laravel/pint", - "version": "v1.21.2", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "370772e7d9e9da087678a0edf2b11b6960e40558" + "reference": "7ddfaa6523a675fae5c4123ee38fc6bfb8ee4f36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/370772e7d9e9da087678a0edf2b11b6960e40558", - "reference": "370772e7d9e9da087678a0edf2b11b6960e40558", + "url": "https://api.github.com/repos/laravel/pint/zipball/7ddfaa6523a675fae5c4123ee38fc6bfb8ee4f36", + "reference": "7ddfaa6523a675fae5c4123ee38fc6bfb8ee4f36", "shasum": "" }, "require": { @@ -13072,9 +13152,9 @@ "php": "^8.2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.72.0", + "friendsofphp/php-cs-fixer": "^3.75.0", "illuminate/view": "^11.44.2", - "larastan/larastan": "^3.2.0", + "larastan/larastan": "^3.3.1", "laravel-zero/framework": "^11.36.1", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^2.3", @@ -13114,20 +13194,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-03-14T22:31:42+00:00" + "time": "2025-04-08T22:11:45+00:00" }, { "name": "laravel/sail", - "version": "v1.41.0", + "version": "v1.42.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "fe1a4ada0abb5e4bd99eb4e4b0d87906c00cdeec" + "reference": "2edaaf77f3c07a4099965bb3d7dfee16e801c0f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/fe1a4ada0abb5e4bd99eb4e4b0d87906c00cdeec", - "reference": "fe1a4ada0abb5e4bd99eb4e4b0d87906c00cdeec", + "url": "https://api.github.com/repos/laravel/sail/zipball/2edaaf77f3c07a4099965bb3d7dfee16e801c0f6", + "reference": "2edaaf77f3c07a4099965bb3d7dfee16e801c0f6", "shasum": "" }, "require": { @@ -13177,7 +13257,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2025-01-24T15:45:36+00:00" + "time": "2025-04-29T14:26:46+00:00" }, { "name": "mockery/mockery", @@ -13264,38 +13344,39 @@ }, { "name": "nunomaduro/collision", - "version": "v8.7.0", + "version": "v8.8.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "586cb8181a257a2152b6a855ca8d9598878a1a26" + "reference": "4cf9f3b47afff38b139fb79ce54fc71799022ce8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/586cb8181a257a2152b6a855ca8d9598878a1a26", - "reference": "586cb8181a257a2152b6a855ca8d9598878a1a26", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/4cf9f3b47afff38b139fb79ce54fc71799022ce8", + "reference": "4cf9f3b47afff38b139fb79ce54fc71799022ce8", "shasum": "" }, "require": { - "filp/whoops": "^2.17.0", + "filp/whoops": "^2.18.0", "nunomaduro/termwind": "^2.3.0", "php": "^8.2.0", - "symfony/console": "^7.2.1" + "symfony/console": "^7.2.5" }, "conflict": { - "laravel/framework": "<11.39.1 || >=13.0.0", - "phpunit/phpunit": "<11.5.3 || >=12.0.0" + "laravel/framework": "<11.44.2 || >=13.0.0", + "phpunit/phpunit": "<11.5.15 || >=13.0.0" }, "require-dev": { - "larastan/larastan": "^2.10.0", - "laravel/framework": "^11.44.2", + "brianium/paratest": "^7.8.3", + "larastan/larastan": "^3.2", + "laravel/framework": "^11.44.2 || ^12.6", "laravel/pint": "^1.21.2", "laravel/sail": "^1.41.0", "laravel/sanctum": "^4.0.8", "laravel/tinker": "^2.10.1", - "orchestra/testbench-core": "^9.12.0", - "pestphp/pest": "^3.7.4", - "sebastian/environment": "^6.1.0 || ^7.2.0" + "orchestra/testbench-core": "^9.12.0 || ^10.1", + "pestphp/pest": "^3.8.0", + "sebastian/environment": "^7.2.0 || ^8.0" }, "type": "library", "extra": { @@ -13358,42 +13439,42 @@ "type": "patreon" } ], - "time": "2025-03-14T22:37:40+00:00" + "time": "2025-04-03T14:33:09+00:00" }, { "name": "pestphp/pest", - "version": "v3.7.4", + "version": "v3.8.2", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "4a987d3d5c4e3ba36c76fecbf56113baac2d1b2b" + "reference": "c6244a8712968dbac88eb998e7ff3b5caa556b0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/4a987d3d5c4e3ba36c76fecbf56113baac2d1b2b", - "reference": "4a987d3d5c4e3ba36c76fecbf56113baac2d1b2b", + "url": "https://api.github.com/repos/pestphp/pest/zipball/c6244a8712968dbac88eb998e7ff3b5caa556b0d", + "reference": "c6244a8712968dbac88eb998e7ff3b5caa556b0d", "shasum": "" }, "require": { - "brianium/paratest": "^7.7.0", - "nunomaduro/collision": "^8.6.1", + "brianium/paratest": "^7.8.3", + "nunomaduro/collision": "^8.8.0", "nunomaduro/termwind": "^2.3.0", "pestphp/pest-plugin": "^3.0.0", - "pestphp/pest-plugin-arch": "^3.0.0", + "pestphp/pest-plugin-arch": "^3.1.0", "pestphp/pest-plugin-mutate": "^3.0.5", "php": "^8.2.0", - "phpunit/phpunit": "^11.5.3" + "phpunit/phpunit": "^11.5.15" }, "conflict": { "filp/whoops": "<2.16.0", - "phpunit/phpunit": ">11.5.3", + "phpunit/phpunit": ">11.5.15", "sebastian/exporter": "<6.0.0", "webmozart/assert": "<1.11.0" }, "require-dev": { - "pestphp/pest-dev-tools": "^3.3.0", - "pestphp/pest-plugin-type-coverage": "^3.2.3", - "symfony/process": "^7.2.0" + "pestphp/pest-dev-tools": "^3.4.0", + "pestphp/pest-plugin-type-coverage": "^3.5.0", + "symfony/process": "^7.2.5" }, "bin": [ "bin/pest" @@ -13458,7 +13539,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v3.7.4" + "source": "https://github.com/pestphp/pest/tree/v3.8.2" }, "funding": [ { @@ -13470,7 +13551,7 @@ "type": "github" } ], - "time": "2025-01-23T14:03:29+00:00" + "time": "2025-04-17T10:53:02+00:00" }, { "name": "pestphp/pest-plugin", @@ -13544,16 +13625,16 @@ }, { "name": "pestphp/pest-plugin-arch", - "version": "v3.0.0", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-arch.git", - "reference": "0a27e55a270cfe73d8cb70551b91002ee2cb64b0" + "reference": "db7bd9cb1612b223e16618d85475c6f63b9c8daa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/0a27e55a270cfe73d8cb70551b91002ee2cb64b0", - "reference": "0a27e55a270cfe73d8cb70551b91002ee2cb64b0", + "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/db7bd9cb1612b223e16618d85475c6f63b9c8daa", + "reference": "db7bd9cb1612b223e16618d85475c6f63b9c8daa", "shasum": "" }, "require": { @@ -13562,8 +13643,8 @@ "ta-tikoma/phpunit-architecture-test": "^0.8.4" }, "require-dev": { - "pestphp/pest": "^3.0.0", - "pestphp/pest-dev-tools": "^3.0.0" + "pestphp/pest": "^3.8.1", + "pestphp/pest-dev-tools": "^3.4.0" }, "type": "library", "extra": { @@ -13598,7 +13679,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-arch/tree/v3.0.0" + "source": "https://github.com/pestphp/pest-plugin-arch/tree/v3.1.1" }, "funding": [ { @@ -13610,7 +13691,138 @@ "type": "github" } ], - "time": "2024-09-08T23:23:55+00:00" + "time": "2025-04-16T22:59:48+00:00" + }, + { + "name": "pestphp/pest-plugin-faker", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/pestphp/pest-plugin-faker.git", + "reference": "48343e2806cfc12a042dead90ffff4a043167e3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pestphp/pest-plugin-faker/zipball/48343e2806cfc12a042dead90ffff4a043167e3e", + "reference": "48343e2806cfc12a042dead90ffff4a043167e3e", + "shasum": "" + }, + "require": { + "fakerphp/faker": "^1.23.1", + "pestphp/pest": "^3.0.0", + "php": "^8.2" + }, + "require-dev": { + "pestphp/pest-dev-tools": "^3.0.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Faker.php" + ], + "psr-4": { + "Pest\\Faker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The Pest Faker Plugin", + "keywords": [ + "faker", + "framework", + "pest", + "php", + "plugin", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin-faker/tree/v3.0.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2024-09-08T23:56:08+00:00" + }, + { + "name": "pestphp/pest-plugin-livewire", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/pestphp/pest-plugin-livewire.git", + "reference": "e2f2edb0a7d414d6837d87908a0e148256d3bf89" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pestphp/pest-plugin-livewire/zipball/e2f2edb0a7d414d6837d87908a0e148256d3bf89", + "reference": "e2f2edb0a7d414d6837d87908a0e148256d3bf89", + "shasum": "" + }, + "require": { + "livewire/livewire": "^3.5.6", + "pestphp/pest": "^3.0.0", + "php": "^8.1" + }, + "require-dev": { + "orchestra/testbench": "^9.4.0", + "pestphp/pest-dev-tools": "^3.0.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Autoload.php" + ], + "psr-4": { + "Pest\\Livewire\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The Pest Livewire Plugin", + "keywords": [ + "framework", + "livewire", + "pest", + "php", + "plugin", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin-livewire/tree/v3.0.0" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2024-09-09T00:05:59+00:00" }, { "name": "pestphp/pest-plugin-mutate", @@ -13804,16 +14016,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.8", + "version": "2.1.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "f9adff3b87c03b12cc7e46a30a524648e497758f" + "reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f9adff3b87c03b12cc7e46a30a524648e497758f", - "reference": "f9adff3b87c03b12cc7e46a30a524648e497758f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8f2e03099cac24ff3b379864d171c5acbfc6b9a2", + "reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2", "shasum": "" }, "require": { @@ -13858,7 +14070,7 @@ "type": "github" } ], - "time": "2025-03-09T09:30:48+00:00" + "time": "2025-05-02T15:32:28+00:00" }, { "name": "phpunit/php-code-coverage", @@ -14185,16 +14397,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.3", + "version": "11.5.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "30e319e578a7b5da3543073e30002bf82042f701" + "reference": "4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/30e319e578a7b5da3543073e30002bf82042f701", - "reference": "30e319e578a7b5da3543073e30002bf82042f701", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c", + "reference": "4b6a4ee654e5e0c5e1f17e2f83c0f4c91dee1f9c", "shasum": "" }, "require": { @@ -14204,24 +14416,24 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.1", + "myclabs/deep-copy": "^1.13.0", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0.8", + "phpunit/php-code-coverage": "^11.0.9", "phpunit/php-file-iterator": "^5.1.0", "phpunit/php-invoker": "^5.0.1", "phpunit/php-text-template": "^4.0.1", "phpunit/php-timer": "^7.0.1", "sebastian/cli-parser": "^3.0.2", - "sebastian/code-unit": "^3.0.2", - "sebastian/comparator": "^6.3.0", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.1", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.0", "sebastian/exporter": "^6.3.0", "sebastian/global-state": "^7.0.2", "sebastian/object-enumerator": "^6.0.1", - "sebastian/type": "^5.1.0", + "sebastian/type": "^5.1.2", "sebastian/version": "^5.0.2", "staabm/side-effects-detector": "^1.0.5" }, @@ -14266,7 +14478,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.15" }, "funding": [ { @@ -14282,7 +14494,7 @@ "type": "tidelift" } ], - "time": "2025-01-13T09:36:00+00:00" + "time": "2025-03-23T16:02:11+00:00" }, { "name": "sebastian/cli-parser", @@ -14343,16 +14555,16 @@ }, { "name": "sebastian/code-unit", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca" + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", - "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", "shasum": "" }, "require": { @@ -14388,7 +14600,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", "security": "https://github.com/sebastianbergmann/code-unit/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" }, "funding": [ { @@ -14396,7 +14608,7 @@ "type": "github" } ], - "time": "2024-12-12T09:59:06+00:00" + "time": "2025-03-19T07:56:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -15101,16 +15313,16 @@ }, { "name": "sebastian/type", - "version": "5.1.0", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", - "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", "shasum": "" }, "require": { @@ -15146,7 +15358,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" + "source": "https://github.com/sebastianbergmann/type/tree/5.1.2" }, "funding": [ { @@ -15154,7 +15366,7 @@ "type": "github" } ], - "time": "2024-09-17T13:12:04+00:00" + "time": "2025-03-18T13:35:50+00:00" }, { "name": "sebastian/version", @@ -15212,16 +15424,16 @@ }, { "name": "spatie/backtrace", - "version": "1.7.1", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/spatie/backtrace.git", - "reference": "0f2477c520e3729de58e061b8192f161c99f770b" + "reference": "80ae5fabe2a1e3bc7df5c7ca5d91b094dc314b20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/0f2477c520e3729de58e061b8192f161c99f770b", - "reference": "0f2477c520e3729de58e061b8192f161c99f770b", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/80ae5fabe2a1e3bc7df5c7ca5d91b094dc314b20", + "reference": "80ae5fabe2a1e3bc7df5c7ca5d91b094dc314b20", "shasum": "" }, "require": { @@ -15259,7 +15471,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/backtrace/tree/1.7.1" + "source": "https://github.com/spatie/backtrace/tree/1.7.3" }, "funding": [ { @@ -15271,7 +15483,7 @@ "type": "other" } ], - "time": "2024-12-02T13:28:15+00:00" + "time": "2025-05-07T07:20:00+00:00" }, { "name": "spatie/error-solutions", @@ -15644,23 +15856,23 @@ }, { "name": "ta-tikoma/phpunit-architecture-test", - "version": "0.8.4", + "version": "0.8.5", "source": { "type": "git", "url": "https://github.com/ta-tikoma/phpunit-architecture-test.git", - "reference": "89f0dea1cb0f0d5744d3ec1764a286af5e006636" + "reference": "cf6fb197b676ba716837c886baca842e4db29005" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/89f0dea1cb0f0d5744d3ec1764a286af5e006636", - "reference": "89f0dea1cb0f0d5744d3ec1764a286af5e006636", + "url": "https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/cf6fb197b676ba716837c886baca842e4db29005", + "reference": "cf6fb197b676ba716837c886baca842e4db29005", "shasum": "" }, "require": { "nikic/php-parser": "^4.18.0 || ^5.0.0", "php": "^8.1.0", "phpdocumentor/reflection-docblock": "^5.3.0", - "phpunit/phpunit": "^10.5.5 || ^11.0.0", + "phpunit/phpunit": "^10.5.5 || ^11.0.0 || ^12.0.0", "symfony/finder": "^6.4.0 || ^7.0.0" }, "require-dev": { @@ -15697,9 +15909,9 @@ ], "support": { "issues": "https://github.com/ta-tikoma/phpunit-architecture-test/issues", - "source": "https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.8.4" + "source": "https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.8.5" }, - "time": "2024-01-05T14:10:56+00:00" + "time": "2025-04-20T20:23:40+00:00" }, { "name": "theseer/tokenizer", @@ -15754,7 +15966,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -15765,6 +15977,9 @@ "ext-pdo": "*", "ext-zip": "*" }, - "platform-dev": [], + "platform-dev": {}, + "platform-overrides": { + "php": "8.2" + }, "plugin-api-version": "2.6.0" } diff --git a/config/database.php b/config/database.php index 3336c3894..f866df436 100644 --- a/config/database.php +++ b/config/database.php @@ -89,6 +89,21 @@ return [ ]) : [], ], + 'pgsql' => [ + 'driver' => 'pgsql', + 'url' => env('DB_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'panel'), + 'username' => env('DB_USERNAME', 'pelican'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => env('DB_CHARSET', 'utf8'), + 'prefix' => '', + 'prefix_indexes' => true, + 'search_path' => 'public', + 'sslmode' => 'prefer', + ], + ], /* diff --git a/config/panel.php b/config/panel.php index a42053a5d..504092db4 100644 --- a/config/panel.php +++ b/config/panel.php @@ -1,13 +1,6 @@ [ '2fa_required' => env('APP_2FA_REQUIRED', 0), @@ -18,65 +11,15 @@ return [ ], ], - /* - |-------------------------------------------------------------------------- - | Pagination - |-------------------------------------------------------------------------- - | - | Certain pagination result counts can be configured here and will take - | effect globally. - */ - - 'paginate' => [ - 'frontend' => [ - 'servers' => env('APP_PAGINATE_FRONT_SERVERS', 15), - ], - 'admin' => [ - 'servers' => env('APP_PAGINATE_ADMIN_SERVERS', 25), - 'users' => env('APP_PAGINATE_ADMIN_USERS', 25), - ], - 'api' => [ - 'nodes' => env('APP_PAGINATE_API_NODES', 25), - 'servers' => env('APP_PAGINATE_API_SERVERS', 25), - 'users' => env('APP_PAGINATE_API_USERS', 25), - ], - ], - - /* - |-------------------------------------------------------------------------- - | Guzzle Connections - |-------------------------------------------------------------------------- - | - | Configure the timeout to be used for Guzzle connections here. - */ - 'guzzle' => [ 'timeout' => env('GUZZLE_TIMEOUT', 15), 'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 5), ], - /* - |-------------------------------------------------------------------------- - | CDN - |-------------------------------------------------------------------------- - | - | Information for the panel to use when contacting the CDN to confirm - | if panel is up to date. - */ - 'cdn' => [ 'cache_time' => 60, - 'url' => 'https://cdn.pelican.dev/releases/latest.json', ], - /* - |-------------------------------------------------------------------------- - | Client Features - |-------------------------------------------------------------------------- - | - | Allow clients to turn features on or off - */ - 'client_features' => [ 'databases' => [ 'enabled' => env('PANEL_CLIENT_DATABASES_ENABLED', true), @@ -95,56 +38,10 @@ return [ ], ], - /* - |-------------------------------------------------------------------------- - | File Editor - |-------------------------------------------------------------------------- - | - | This array includes the MIME filetypes that can be edited via the web. - */ - 'files' => [ 'max_edit_size' => env('PANEL_FILES_MAX_EDIT_SIZE', 1024 * 1024 * 4), ], - /* - |-------------------------------------------------------------------------- - | Dynamic Environment Variables - |-------------------------------------------------------------------------- - | - | Place dynamic environment variables here that should be auto-appended - | to server environment fields when the server is created or updated. - | - | Items should be in 'key' => 'value' format, where key is the environment - | variable name, and value is the server-object key. For example: - | - | 'P_SERVER_CREATED_AT' => 'created_at' - */ - - 'environment_variables' => [ - 'P_SERVER_ALLOCATION_LIMIT' => 'allocation_limit', - ], - - /* - |-------------------------------------------------------------------------- - | Asset Verification - |-------------------------------------------------------------------------- - | - | This section controls the output format for JS & CSS assets. - */ - - 'assets' => [ - 'use_hash' => env('PANEL_USE_ASSET_HASH', false), - ], - - /* - |-------------------------------------------------------------------------- - | Email Notification Settings - |-------------------------------------------------------------------------- - | - | This section controls what notifications are sent to users. - */ - 'email' => [ // Should an email be sent to a server owner once their server has completed it's first install process? 'send_install_notification' => env('PANEL_SEND_INSTALL_NOTIFICATION', true), @@ -152,44 +49,22 @@ return [ 'send_reinstall_notification' => env('PANEL_SEND_REINSTALL_NOTIFICATION', true), ], - /* - |-------------------------------------------------------------------------- - | FilamentPHP Settings - |-------------------------------------------------------------------------- - | - | This section controls Filament configurations - */ - 'filament' => [ 'top-navigation' => env('FILAMENT_TOP_NAVIGATION', false), 'display-width' => env('FILAMENT_WIDTH', 'screen-2xl'), + 'avatar-provider' => env('FILAMENT_AVATAR_PROVIDER', 'gravatar'), + 'uploadable-avatars' => env('FILAMENT_UPLOADABLE_AVATARS', false), ], 'use_binary_prefix' => env('PANEL_USE_BINARY_PREFIX', true), 'editable_server_descriptions' => env('PANEL_EDITABLE_SERVER_DESCRIPTIONS', true), - /* - |-------------------------------------------------------------------------- - | API Settings - |-------------------------------------------------------------------------- - | - | This section controls Api Key configurations - */ - 'api' => [ 'key_limit' => env('API_KEYS_LIMIT', 25), 'key_expire_time' => env('API_KEYS_EXPIRE_TIME', 720), ], - /* - |-------------------------------------------------------------------------- - | Webhook Settings - |-------------------------------------------------------------------------- - | - | This section controls Webhook configurations - */ - 'webhook' => [ 'prune_days' => env('APP_WEBHOOK_PRUNE_DAYS', 30), ], diff --git a/database/Factories/PermissionFactory.php b/database/Factories/PermissionFactory.php new file mode 100644 index 000000000..7b73fac68 --- /dev/null +++ b/database/Factories/PermissionFactory.php @@ -0,0 +1,18 @@ + $this->faker->name(), + 'guard_name' => $this->faker->name(), + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), + ]; + } +} diff --git a/database/Seeders/eggs/minecraft/egg-sponge--sponge-vanilla.json b/database/Seeders/eggs/minecraft/egg-sponge--sponge-vanilla.json index 2296aba9a..6f87376da 100644 --- a/database/Seeders/eggs/minecraft/egg-sponge--sponge-vanilla.json +++ b/database/Seeders/eggs/minecraft/egg-sponge--sponge-vanilla.json @@ -4,11 +4,11 @@ "version": "PLCN_v1", "update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/minecraft\/egg-sponge--sponge-vanilla.json" }, - "exported_at": "2025-03-18T12:35:50+00:00", - "name": "Sponge (SpongeVanilla)", + "exported_at": "2025-04-25T06:05:10+00:00", + "name": "Sponge", "author": "panel@example.com", "uuid": "f0d2f88f-1ff3-42a0-b03f-ac44c5571e6d", - "description": "SpongeVanilla is the SpongeAPI implementation for Vanilla Minecraft.", + "description": "A community-driven open source Minecraft: Java Edition modding platform.", "tags": [ "minecraft" ], @@ -34,28 +34,42 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\n# Sponge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\ncurl -sSL \"https:\/\/repo.spongepowered.org\/maven\/org\/spongepowered\/spongevanilla\/${SPONGE_VERSION}\/spongevanilla-${SPONGE_VERSION}.jar\" -o ${SERVER_JARFILE}", + "script": "#!\/bin\/ash\r\n# Sponge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\nif [ $MINECRAFT_VERSION = 'latest' ] || [ -z $MINECRAFT_VERSION ]; then\r\n TARGET_VERSION_JSON=$(curl -sSL https:\/\/dl-api.spongepowered.org\/v2\/groups\/org.spongepowered\/artifacts\/${SPONGE_TYPE}\/latest?recommended=true)\r\n if [ -z \"${TARGET_VERSION_JSON}\" ]; then\r\n echo -e \"Failed to find latest recommended version!\"\r\n exit 1\r\n fi\r\n echo -e \"Found latest version for ${SPONGE_TYPE}\"\r\nelse\r\n if [ $SPONGE_TYPE = 'spongevanilla' ]; then \r\n VERSIONS_JSON=$(curl -sSL https:\/\/dl-api.spongepowered.org\/v2\/groups\/org.spongepowered\/artifacts\/${SPONGE_TYPE}\/versions?tags=,minecraft:${MINECRAFT_VERSION}&offset=0&limit=1)\r\n else\r\n FORGETAG='forge'\r\n if [ $SPONGE_TYPE = 'spongeneo' ]; then\r\n FORGETAG='neoforge'\r\n fi\r\n VERSIONS_JSON=$(curl -sSL https:\/\/dl-api.spongepowered.org\/v2\/groups\/org.spongepowered\/artifacts\/${SPONGE_TYPE}\/versions?tags=,minecraft:${MINECRAFT_VERSION},${FORGETAG}:${FORGE_VERSION}&offset=0&limit=1)\r\n fi\r\n \r\n if [ -z \"${VERSIONS_JSON}\" ]; then\r\n echo -e \"Failed to find recommended ${MINECRAFT_VERSION} version for ${SPONGE_TYPE} ${FORGE_VERSION}!\"\r\n exit 1\r\n fi\r\n \r\n VERSION_KEY=$(echo $VERSIONS_JSON | jq -r '.artifacts | to_entries[0].key')\r\n TARGET_VERSION_JSON=$(curl -sSL https:\/\/dl-api.spongepowered.org\/v2\/groups\/org.spongepowered\/artifacts\/${SPONGE_TYPE}\/versions\/${VERSION_KEY})\r\n \r\n if [ -z \"${TARGET_VERSION_JSON}\" ]; then\r\n echo -e \"Failed to find ${VERSION_KEY} for ${SPONGE_TYPE} ${FORGE_VERSION}!\"\r\n exit 1\r\n fi\r\n\r\n echo -e \"Found ${MINECRAFT_VERSION} for ${SPONGE_TYPE}\"\r\nfi\r\n\r\nTARGET_VERSION=`echo $TARGET_VERSION_JSON | jq '.assets[] | select(.classifier == \"universal\")'`\r\nif [ -z \"${TARGET_VERSION}\" ]; then\r\n TARGET_VERSION=`echo $TARGET_VERSION_JSON | jq '.assets[] | select(.classifier == \"\" and .extension == \"jar\")'`\r\nfi\r\n\r\nif [ -z \"${TARGET_VERSION}\" ]; then\r\n echo -e \"Failed to get download url data from the selected version\"\r\n exit 1\r\nfi\r\n\r\nSPONGE_URL=$(echo $TARGET_VERSION | jq -r '.downloadUrl')\r\nCHECKSUM=$(echo $TARGET_VERSION | jq -r '.md5')\r\necho -e \"Found file at ${SPONGE_URL} with checksum ${CHECKSUM}\"\r\n\r\necho -e \"running: curl -o ${SERVER_JARFILE} ${SPONGE_URL}\"\r\ncurl -o ${SERVER_JARFILE} ${SPONGE_URL}\r\n\r\nif [ $(basename $(md5sum ${SERVER_JARFILE})) = ${CHECKSUM} ] ; then\r\n echo \"Checksum passed\"\r\nelse\r\n echo \"Checksum failed\"\r\nfi\r\n\r\necho -e \"Install Complete\"", "container": "ghcr.io\/parkervcp\/installers:alpine", "entrypoint": "ash" } }, "variables": [ { - "name": "Sponge Version", - "description": "The version of SpongeVanilla to download and use.", - "env_variable": "SPONGE_VERSION", - "default_value": "1.12.2-7.3.0", + "sort": 3, + "name": "Forge\/Neoforge Version", + "description": "The modding api target version if set to `spongeforge` or `spongeneo`. Leave blank if using `spongevanilla`", + "env_variable": "FORGE_VERSION", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": [ + "string" + ] + }, + { + "sort": 1, + "name": "Minecraft Version", + "description": "The version of Minecraft to target. Use \"latest\" to install the latest version. Go to Settings > Reinstall Server to apply.", + "env_variable": "MINECRAFT_VERSION", + "default_value": "latest", "user_viewable": true, "user_editable": true, "rules": [ "required", - "regex:\/^([a-zA-Z0-9.\\-_]+)$\/" - ], - "sort": 1 + "string", + "between:3,15" + ] }, { + "sort": 4, "name": "Server Jar File", - "description": "The name of the Jarfile to use when running SpongeVanilla.", + "description": "The name of the Jarfile to use when running Sponge.", "env_variable": "SERVER_JARFILE", "default_value": "server.jar", "user_viewable": true, @@ -63,8 +77,20 @@ "rules": [ "required", "regex:\/^([\\w\\d._-]+)(\\.jar)$\/" - ], - "sort": 2 + ] + }, + { + "sort": 2, + "name": "Sponge Type", + "description": "SpongeVanilla if you are only using Sponge plugins.\nSpongeForge when using Forge mods and Sponge plugins.\nSpongeNeo when using NeoForge mods and Sponge plugins.", + "env_variable": "SPONGE_TYPE", + "default_value": "spongevanilla", + "user_viewable": true, + "user_editable": true, + "rules": [ + "required", + "in:spongevanilla,spongeforge,spongeneo" + ] } ] -} \ No newline at end of file +} diff --git a/database/migrations/2016_01_23_195851_add_api_keys.php b/database/migrations/2016_01_23_195851_add_api_keys.php index 6dfe066f6..8c37d9cab 100644 --- a/database/migrations/2016_01_23_195851_add_api_keys.php +++ b/database/migrations/2016_01_23_195851_add_api_keys.php @@ -12,7 +12,7 @@ return new class extends Migration { Schema::create('api_keys', function (Blueprint $table) { $table->increments('id'); - $table->char('public', 16); + $table->string('public', 16)->nullable(); $table->text('secret'); $table->text('allowed_ips')->nullable(); $table->timestamps(); diff --git a/database/migrations/2016_01_23_200159_add_downloads.php b/database/migrations/2016_01_23_200159_add_downloads.php index 493e71ef9..b20ea0abe 100644 --- a/database/migrations/2016_01_23_200159_add_downloads.php +++ b/database/migrations/2016_01_23_200159_add_downloads.php @@ -12,8 +12,8 @@ return new class extends Migration { Schema::create('downloads', function (Blueprint $table) { $table->increments('id'); - $table->char('token', 36)->unique(); - $table->char('server', 36); + $table->string('token', 36)->unique(); + $table->string('server', 36); $table->text('path'); $table->timestamps(); }); diff --git a/database/migrations/2016_01_23_200648_add_nodes.php b/database/migrations/2016_01_23_200648_add_nodes.php index 2344b8f83..4bcdcc1a0 100644 --- a/database/migrations/2016_01_23_200648_add_nodes.php +++ b/database/migrations/2016_01_23_200648_add_nodes.php @@ -21,7 +21,7 @@ return new class extends Migration $table->mediumInteger('memory_overallocate')->unsigned()->nullable(); $table->integer('disk')->unsigned(); $table->mediumInteger('disk_overallocate')->unsigned()->nullable(); - $table->char('daemonSecret', 36)->unique(); + $table->string('daemonSecret', 36)->unique(); $table->smallInteger('daemonListen')->unsigned()->default(8080); $table->smallInteger('daemonSFTP')->unsgined()->default(2022); $table->string('daemonBase')->default('/home/daemon-files'); diff --git a/database/migrations/2016_01_23_201748_add_servers.php b/database/migrations/2016_01_23_201748_add_servers.php index 580339d17..cad8ded3c 100644 --- a/database/migrations/2016_01_23_201748_add_servers.php +++ b/database/migrations/2016_01_23_201748_add_servers.php @@ -12,8 +12,8 @@ return new class extends Migration { Schema::create('servers', function (Blueprint $table) { $table->increments('id'); - $table->char('uuid', 36)->unique(); - $table->char('uuidShort', 8)->unique(); + $table->string('uuid', 36)->unique(); + $table->string('uuidShort', 8)->unique(); $table->mediumInteger('node')->unsigned(); $table->string('name'); $table->tinyInteger('active')->unsigned(); @@ -29,7 +29,7 @@ return new class extends Migration $table->mediumInteger('service')->unsigned(); $table->mediumInteger('option')->unsigned(); $table->text('startup'); - $table->char('daemonSecret', 36)->unique(); + $table->string('daemonSecret', 36)->unique(); $table->string('username')->unique(); $table->tinyInteger('installed')->unsigned()->default(0); $table->timestamps(); diff --git a/database/migrations/2016_01_23_203150_add_subusers.php b/database/migrations/2016_01_23_203150_add_subusers.php index 44cb8dfc3..b4d360acf 100644 --- a/database/migrations/2016_01_23_203150_add_subusers.php +++ b/database/migrations/2016_01_23_203150_add_subusers.php @@ -14,7 +14,7 @@ return new class extends Migration $table->increments('id'); $table->integer('user_id')->unsigned(); $table->integer('server_id')->unsigned(); - $table->char('daemonSecret', 36)->unique(); + $table->string('daemonSecret', 36)->unique(); $table->timestamps(); }); } diff --git a/database/migrations/2016_01_23_203159_add_users.php b/database/migrations/2016_01_23_203159_add_users.php index 7c3e8afa1..3a4077e2e 100644 --- a/database/migrations/2016_01_23_203159_add_users.php +++ b/database/migrations/2016_01_23_203159_add_users.php @@ -12,14 +12,14 @@ return new class extends Migration { Schema::create('users', function (Blueprint $table) { $table->increments('id'); - $table->char('uuid', 36)->unique(); + $table->string('uuid', 36)->unique(); $table->string('email')->unique(); $table->text('password'); $table->string('remember_token')->nullable(); - $table->char('language', 5)->default('en'); + $table->string('language', 5)->default('en'); $table->tinyInteger('root_admin')->unsigned()->default(0); $table->tinyInteger('use_totp')->unsigned(); - $table->char('totp_secret', 16)->nullable(); + $table->string('totp_secret', 16)->nullable(); $table->timestamps(); }); } diff --git a/database/migrations/2016_08_30_213301_modify_ip_storage_method.php b/database/migrations/2016_08_30_213301_modify_ip_storage_method.php index 774697eb5..ddbbe1c2f 100644 --- a/database/migrations/2016_08_30_213301_modify_ip_storage_method.php +++ b/database/migrations/2016_08_30_213301_modify_ip_storage_method.php @@ -11,7 +11,7 @@ return new class extends Migration public function up(): void { Schema::table('servers', function (Blueprint $table) { - $table->mediumInteger('allocation')->unsigned()->after('oom_disabled'); + $table->mediumInteger('allocation')->nullable()->unsigned()->after('oom_disabled'); }); // Parse All Servers diff --git a/database/migrations/2016_09_04_172028_update_failed_jobs_table.php b/database/migrations/2016_09_04_172028_update_failed_jobs_table.php index e0a6b889c..5f34b55d6 100644 --- a/database/migrations/2016_09_04_172028_update_failed_jobs_table.php +++ b/database/migrations/2016_09_04_172028_update_failed_jobs_table.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('failed_jobs', function (Blueprint $table) { - $table->text('exception'); + $table->text('exception')->nullable(); }); } diff --git a/database/migrations/2016_09_04_182835_create_notifications_table.php b/database/migrations/2016_09_04_182835_create_notifications_table.php index 788e37be0..604362096 100644 --- a/database/migrations/2016_09_04_182835_create_notifications_table.php +++ b/database/migrations/2016_09_04_182835_create_notifications_table.php @@ -14,7 +14,7 @@ return new class extends Migration $table->string('id')->primary(); $table->string('type'); $table->morphs('notifiable'); - $table->text('data'); + $table->json('data'); $table->timestamp('read_at')->nullable(); $table->timestamps(); }); diff --git a/database/migrations/2016_09_07_163017_add_unique_identifier.php b/database/migrations/2016_09_07_163017_add_unique_identifier.php index ad186c385..dbbcd0f25 100644 --- a/database/migrations/2016_09_07_163017_add_unique_identifier.php +++ b/database/migrations/2016_09_07_163017_add_unique_identifier.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('services', function (Blueprint $table) { - $table->char('author', 36)->after('id'); + $table->string('author', 36)->nullable()->after('id'); }); } diff --git a/database/migrations/2016_09_17_194246_add_docker_image_column.php b/database/migrations/2016_09_17_194246_add_docker_image_column.php index f71993c41..7d1350c66 100644 --- a/database/migrations/2016_09_17_194246_add_docker_image_column.php +++ b/database/migrations/2016_09_17_194246_add_docker_image_column.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('servers', function (Blueprint $table) { - $table->string('image')->after('daemonSecret'); + $table->string('image')->nullable()->after('daemonSecret'); }); // Populate the column diff --git a/database/migrations/2016_10_07_152117_build_api_log_table.php b/database/migrations/2016_10_07_152117_build_api_log_table.php index 0fa86e4ed..b6001b35a 100644 --- a/database/migrations/2016_10_07_152117_build_api_log_table.php +++ b/database/migrations/2016_10_07_152117_build_api_log_table.php @@ -15,8 +15,8 @@ return new class extends Migration $table->increments('id'); $table->boolean('authorized'); $table->text('error')->nullable(); - $table->char('key', 16)->nullable(); - $table->char('method', 6); + $table->string('key', 16)->nullable(); + $table->string('method', 6); $table->text('route'); $table->text('content')->nullable(); $table->text('user_agent'); diff --git a/database/migrations/2016_10_14_164802_update_api_keys.php b/database/migrations/2016_10_14_164802_update_api_keys.php index 0d4032f9b..1fc36084f 100644 --- a/database/migrations/2016_10_14_164802_update_api_keys.php +++ b/database/migrations/2016_10_14_164802_update_api_keys.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('api_keys', function (Blueprint $table) { - $table->unsignedInteger('user')->after('id'); + $table->unsignedInteger('user')->nullable()->after('id'); $table->text('memo')->after('allowed_ips')->nullable(); $table->timestamp('expires_at')->after('memo')->nullable(); }); diff --git a/database/migrations/2016_10_23_203522_add_foreign_permissions.php b/database/migrations/2016_10_23_203522_add_foreign_permissions.php deleted file mode 100644 index 8af4860b4..000000000 --- a/database/migrations/2016_10_23_203522_add_foreign_permissions.php +++ /dev/null @@ -1,33 +0,0 @@ -foreign('user_id')->references('id')->on('users'); - $table->foreign('server_id')->references('id')->on('servers'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('permissions', function (Blueprint $table) { - $table->dropForeign('permissions_user_id_foreign'); - $table->dropForeign('permissions_server_id_foreign'); - - $table->dropIndex('permissions_user_id_foreign'); - $table->dropIndex('permissions_server_id_foreign'); - }); - } -}; diff --git a/database/migrations/2016_11_11_220649_add_pack_support.php b/database/migrations/2016_11_11_220649_add_pack_support.php index 07ed33861..58436dbd6 100644 --- a/database/migrations/2016_11_11_220649_add_pack_support.php +++ b/database/migrations/2016_11_11_220649_add_pack_support.php @@ -14,7 +14,7 @@ return new class extends Migration Schema::create('service_packs', function (Blueprint $table) { $table->increments('id'); $table->unsignedInteger('option'); - $table->char('uuid', 36)->unique(); + $table->string('uuid', 36)->unique(); $table->string('name'); $table->string('version'); $table->text('description')->nullable(); diff --git a/database/migrations/2017_01_07_154228_create_node_configuration_tokens_table.php b/database/migrations/2017_01_07_154228_create_node_configuration_tokens_table.php index 8be53ea8a..11d9fcb1f 100644 --- a/database/migrations/2017_01_07_154228_create_node_configuration_tokens_table.php +++ b/database/migrations/2017_01_07_154228_create_node_configuration_tokens_table.php @@ -13,7 +13,7 @@ return new class extends Migration { Schema::create('node_configuration_tokens', function (Blueprint $table) { $table->increments('id'); - $table->char('token', 32); + $table->string('token', 32); $table->timestamp('expires_at'); $table->integer('node')->unsigned(); $table->foreign('node')->references('id')->on('nodes'); diff --git a/database/migrations/2017_01_12_135449_add_more_user_data.php b/database/migrations/2017_01_12_135449_add_more_user_data.php index aa8609505..59d9fa230 100644 --- a/database/migrations/2017_01_12_135449_add_more_user_data.php +++ b/database/migrations/2017_01_12_135449_add_more_user_data.php @@ -15,7 +15,7 @@ return new class extends Migration Schema::table('users', function (Blueprint $table) { $table->string('name_first')->after('email')->nullable(); $table->string('name_last')->after('name_first')->nullable(); - $table->string('username')->after('uuid'); + $table->string('username')->after('uuid')->nullable(); $table->boolean('gravatar')->after('totp_secret')->default(true); }); diff --git a/database/migrations/2017_02_02_175548_UpdateColumnNames.php b/database/migrations/2017_02_02_175548_UpdateColumnNames.php index 9fbae3352..be93ba61a 100644 --- a/database/migrations/2017_02_02_175548_UpdateColumnNames.php +++ b/database/migrations/2017_02_02_175548_UpdateColumnNames.php @@ -19,7 +19,7 @@ return new class extends Migration $table->dropForeign(['option']); $table->dropForeign(['pack']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('servers_node_foreign'); $table->dropIndex('servers_owner_foreign'); $table->dropIndex('servers_allocation_foreign'); diff --git a/database/migrations/2017_02_03_140948_UpdateNodesTable.php b/database/migrations/2017_02_03_140948_UpdateNodesTable.php index 07186787b..825b5a828 100644 --- a/database/migrations/2017_02_03_140948_UpdateNodesTable.php +++ b/database/migrations/2017_02_03_140948_UpdateNodesTable.php @@ -14,7 +14,7 @@ return new class extends Migration Schema::table('nodes', function (Blueprint $table) { $table->dropForeign(['location']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('nodes_location_foreign'); } @@ -31,7 +31,7 @@ return new class extends Migration Schema::table('nodes', function (Blueprint $table) { $table->dropForeign(['location_id']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('nodes_location_id_foreign'); } diff --git a/database/migrations/2017_02_03_155554_RenameColumns.php b/database/migrations/2017_02_03_155554_RenameColumns.php index e61b72ab3..73aead0c3 100644 --- a/database/migrations/2017_02_03_155554_RenameColumns.php +++ b/database/migrations/2017_02_03_155554_RenameColumns.php @@ -15,7 +15,7 @@ return new class extends Migration $table->dropForeign(['node']); $table->dropForeign(['assigned_to']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('allocations_node_foreign'); $table->dropIndex('allocations_assigned_to_foreign'); } @@ -36,7 +36,7 @@ return new class extends Migration $table->dropForeign(['node_id']); $table->dropForeign(['server_id']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('allocations_node_id_foreign'); $table->dropIndex('allocations_server_id_foreign'); } diff --git a/database/migrations/2017_02_05_164123_AdjustColumnNames.php b/database/migrations/2017_02_05_164123_AdjustColumnNames.php index 275eccaea..c8262430f 100644 --- a/database/migrations/2017_02_05_164123_AdjustColumnNames.php +++ b/database/migrations/2017_02_05_164123_AdjustColumnNames.php @@ -14,7 +14,7 @@ return new class extends Migration Schema::table('service_options', function (Blueprint $table) { $table->dropForeign(['parent_service']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('service_options_parent_service_foreign'); } @@ -31,7 +31,7 @@ return new class extends Migration Schema::table('service_options', function (Blueprint $table) { $table->dropForeign(['service_id']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('service_options_service_id_foreign'); } diff --git a/database/migrations/2017_02_05_164516_AdjustColumnNamesForServicePacks.php b/database/migrations/2017_02_05_164516_AdjustColumnNamesForServicePacks.php index 5369b68e7..929b3559c 100644 --- a/database/migrations/2017_02_05_164516_AdjustColumnNamesForServicePacks.php +++ b/database/migrations/2017_02_05_164516_AdjustColumnNamesForServicePacks.php @@ -14,7 +14,7 @@ return new class extends Migration Schema::table('service_packs', function (Blueprint $table) { $table->dropForeign(['option']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('service_packs_option_foreign'); } @@ -31,7 +31,7 @@ return new class extends Migration Schema::table('service_packs', function (Blueprint $table) { $table->dropForeign(['option_id']); - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropIndex('service_packs_option_id_foreign'); } diff --git a/database/migrations/2017_02_09_174834_SetupPermissionsPivotTable.php b/database/migrations/2017_02_09_174834_SetupPermissionsPivotTable.php deleted file mode 100644 index e1af0b0a3..000000000 --- a/database/migrations/2017_02_09_174834_SetupPermissionsPivotTable.php +++ /dev/null @@ -1,81 +0,0 @@ -unsignedInteger('subuser_id')->after('id'); - }); - - DB::transaction(function () { - foreach (Subuser::all() as &$subuser) { - Permission::where('user_id', $subuser->user_id)->where('server_id', $subuser->server_id)->update([ - 'subuser_id' => $subuser->id, - ]); - } - }); - - Schema::table('permissions', function (Blueprint $table) { - - $table->dropForeign(['server_id']); - $table->dropForeign(['user_id']); - - if (Schema::getConnection()->getDriverName() !== 'sqlite') { - $table->dropIndex('permissions_server_id_foreign'); - $table->dropIndex('permissions_user_id_foreign'); - } else { - $table->dropForeign(['server_id']); - $table->dropForeign(['user_id']); - } - - $table->dropColumn('server_id'); - $table->dropColumn('user_id'); - $table->dropColumn('created_at'); - $table->dropColumn('updated_at'); - $table->foreign('subuser_id')->references('id')->on('subusers'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('permissions', function (Blueprint $table) { - $table->unsignedInteger('server_id')->after('subuser_id'); - $table->unsignedInteger('user_id')->after('server_id'); - $table->timestamps(); - }); - - DB::transaction(function () { - foreach (Subuser::all() as &$subuser) { - Permission::where('subuser_id', $subuser->id)->update([ - 'user_id' => $subuser->user_id, - 'server_id' => $subuser->server_id, - ]); - } - }); - - Schema::table('permissions', function (Blueprint $table) { - if (Schema::getConnection()->getDriverName() !== 'sqlite') { - $table->dropForeign('permissions_subuser_id_foreign'); - $table->dropIndex('permissions_subuser_id_foreign'); - } - $table->dropColumn('subuser_id'); - - $table->foreign('server_id')->references('id')->on('servers'); - $table->foreign('user_id')->references('id')->on('users'); - }); - } -}; diff --git a/database/migrations/2017_02_10_171858_UpdateAPIKeyColumnNames.php b/database/migrations/2017_02_10_171858_UpdateAPIKeyColumnNames.php index 177d59952..d67bc2d90 100644 --- a/database/migrations/2017_02_10_171858_UpdateAPIKeyColumnNames.php +++ b/database/migrations/2017_02_10_171858_UpdateAPIKeyColumnNames.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('api_keys', function (Blueprint $table) { - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropForeign('api_keys_user_foreign'); $table->dropIndex('api_keys_user_foreign'); } @@ -28,7 +28,7 @@ return new class extends Migration public function down(): void { Schema::table('api_keys', function (Blueprint $table) { - if (Schema::getConnection()->getDriverName() !== 'sqlite') { + if (!in_array(Schema::getConnection()->getDriverName(), ['sqlite', 'pgsql'])) { $table->dropForeign('api_keys_user_id_foreign'); $table->dropIndex('api_keys_user_id_foreign'); } diff --git a/database/migrations/2017_03_12_150648_MoveFunctionsFromFileToDatabase.php b/database/migrations/2017_03_12_150648_MoveFunctionsFromFileToDatabase.php index bf44de9ad..349696c45 100644 --- a/database/migrations/2017_03_12_150648_MoveFunctionsFromFileToDatabase.php +++ b/database/migrations/2017_03_12_150648_MoveFunctionsFromFileToDatabase.php @@ -44,7 +44,7 @@ EOF; public function up(): void { Schema::table('services', function (Blueprint $table) { - $table->text('index_file')->after('startup'); + $table->text('index_file')->nullable()->after('startup'); }); DB::transaction(function () { diff --git a/database/migrations/2017_03_31_221948_AddServerDescriptionColumn.php b/database/migrations/2017_03_31_221948_AddServerDescriptionColumn.php index cbda35f54..38fd4b240 100644 --- a/database/migrations/2017_03_31_221948_AddServerDescriptionColumn.php +++ b/database/migrations/2017_03_31_221948_AddServerDescriptionColumn.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('servers', function (Blueprint $table) { - $table->text('description')->after('name'); + $table->text('description')->nullable()->after('name'); }); } diff --git a/database/migrations/2017_05_01_141528_DeleteDownloadTable.php b/database/migrations/2017_05_01_141528_DeleteDownloadTable.php index 685fb317d..14e394eaf 100644 --- a/database/migrations/2017_05_01_141528_DeleteDownloadTable.php +++ b/database/migrations/2017_05_01_141528_DeleteDownloadTable.php @@ -21,8 +21,8 @@ return new class extends Migration { Schema::create('downloads', function (Blueprint $table) { $table->increments('id'); - $table->char('token', 36)->unique(); - $table->char('server', 36); + $table->string('token', 36)->unique(); + $table->string('server', 36); $table->text('path'); $table->timestamps(); }); diff --git a/database/migrations/2017_05_01_141559_DeleteNodeConfigurationTable.php b/database/migrations/2017_05_01_141559_DeleteNodeConfigurationTable.php index 16d17b30f..34b180879 100644 --- a/database/migrations/2017_05_01_141559_DeleteNodeConfigurationTable.php +++ b/database/migrations/2017_05_01_141559_DeleteNodeConfigurationTable.php @@ -21,7 +21,7 @@ return new class extends Migration { Schema::create('node_configuration_tokens', function (Blueprint $table) { $table->increments('id'); - $table->char('token', 32); + $table->string('token', 32); $table->unsignedInteger('node_id'); $table->timestamps(); }); diff --git a/database/migrations/2017_07_08_152806_ChangeUserPermissionsToDeleteOnUserDeletion.php b/database/migrations/2017_07_08_152806_ChangeUserPermissionsToDeleteOnUserDeletion.php index a3dc806d5..32d91b926 100644 --- a/database/migrations/2017_07_08_152806_ChangeUserPermissionsToDeleteOnUserDeletion.php +++ b/database/migrations/2017_07_08_152806_ChangeUserPermissionsToDeleteOnUserDeletion.php @@ -11,12 +11,6 @@ return new class extends Migration */ public function up(): void { - Schema::table('permissions', function (Blueprint $table) { - $table->dropForeign(['subuser_id']); - - $table->foreign('subuser_id')->references('id')->on('subusers')->onDelete('cascade'); - }); - Schema::table('subusers', function (Blueprint $table) { $table->dropForeign(['user_id']); $table->dropForeign(['server_id']); @@ -38,11 +32,5 @@ return new class extends Migration $table->foreign('user_id')->references('id')->on('users'); $table->foreign('server_id')->references('id')->on('servers'); }); - - Schema::table('permissions', function (Blueprint $table) { - $table->dropForeign(['subuser_id']); - - $table->foreign('subuser_id')->references('id')->on('subusers'); - }); } }; diff --git a/database/migrations/2017_09_13_211810_UpdateOldPermissionsToPointToNewScheduleSystem.php b/database/migrations/2017_09_13_211810_UpdateOldPermissionsToPointToNewScheduleSystem.php deleted file mode 100644 index aca8afb6c..000000000 --- a/database/migrations/2017_09_13_211810_UpdateOldPermissionsToPointToNewScheduleSystem.php +++ /dev/null @@ -1,43 +0,0 @@ -where('permission', 'like', '%-task%')->get(); - foreach ($permissions as $record) { - $parts = explode('-', $record->permission); - if (!in_array(array_get($parts, 1), ['tasks', 'task']) || count($parts) !== 2) { - continue; - } - - $newPermission = $parts[0] . '-' . str_replace('task', 'schedule', $parts[1]); - - DB::table('permissions')->where('id', '=', $record->id)->update(['permission' => $newPermission]); - } - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - $permissions = DB::table('permissions')->where('permission', 'like', '%-schedule%')->get(); - foreach ($permissions as $record) { - $parts = explode('-', $record->permission); - if (!in_array(array_get($parts, 1), ['schedules', 'schedule']) || count($parts) !== 2) { - continue; - } - - $newPermission = $parts[0] . '-' . str_replace('schedule', 'task', $parts[1]); - - DB::table('permissions')->where('id', '=', $record->id)->update(['permission' => $newPermission]); - } - } -}; diff --git a/database/migrations/2017_09_23_173628_RemoveDaemonSecretFromServersTable.php b/database/migrations/2017_09_23_173628_RemoveDaemonSecretFromServersTable.php index ab2e8056e..a26c13c9d 100644 --- a/database/migrations/2017_09_23_173628_RemoveDaemonSecretFromServersTable.php +++ b/database/migrations/2017_09_23_173628_RemoveDaemonSecretFromServersTable.php @@ -44,7 +44,7 @@ return new class extends Migration public function down(): void { Schema::table('servers', function (Blueprint $table) { - $table->char('daemonSecret', 36)->after('startup')->unique(); + $table->string('daemonSecret', 36)->after('startup')->unique(); }); DB::table('daemon_keys')->truncate(); diff --git a/database/migrations/2017_09_23_185022_RemoveDaemonSecretFromSubusersTable.php b/database/migrations/2017_09_23_185022_RemoveDaemonSecretFromSubusersTable.php index 9090be407..6216dd5d8 100644 --- a/database/migrations/2017_09_23_185022_RemoveDaemonSecretFromSubusersTable.php +++ b/database/migrations/2017_09_23_185022_RemoveDaemonSecretFromSubusersTable.php @@ -42,7 +42,7 @@ return new class extends Migration public function down(): void { Schema::table('subusers', function (Blueprint $table) { - $table->char('daemonSecret', 36)->after('server_id'); + $table->string('daemonSecret', 36)->after('server_id'); }); $subusers = DB::table('subusers')->get(); diff --git a/database/migrations/2017_10_02_202000_ChangeServicesToUseAMoreUniqueIdentifier.php b/database/migrations/2017_10_02_202000_ChangeServicesToUseAMoreUniqueIdentifier.php index 3ffe5a866..901363f01 100644 --- a/database/migrations/2017_10_02_202000_ChangeServicesToUseAMoreUniqueIdentifier.php +++ b/database/migrations/2017_10_02_202000_ChangeServicesToUseAMoreUniqueIdentifier.php @@ -18,7 +18,7 @@ return new class extends Migration $table->dropUnique(['file']); $table->string('author')->change(); - $table->char('uuid', 36)->after('id'); + $table->string('uuid', 36)->nullable()->after('id'); $table->dropColumn('folder'); $table->dropColumn('startup'); $table->dropColumn('index_file'); diff --git a/database/migrations/2017_10_02_202007_ChangeToABetterUniqueServiceConfiguration.php b/database/migrations/2017_10_02_202007_ChangeToABetterUniqueServiceConfiguration.php index 92d86500e..1a2497cd3 100644 --- a/database/migrations/2017_10_02_202007_ChangeToABetterUniqueServiceConfiguration.php +++ b/database/migrations/2017_10_02_202007_ChangeToABetterUniqueServiceConfiguration.php @@ -14,8 +14,8 @@ return new class extends Migration public function up(): void { Schema::table('service_options', function (Blueprint $table) { - $table->char('uuid', 36)->after('id'); - $table->string('author')->after('service_id'); + $table->string('uuid', 36)->nullable()->after('id'); + $table->string('author')->nullable()->after('service_id'); $table->dropColumn('tag'); }); diff --git a/database/migrations/2017_11_19_122708_MigratePubPrivFormatToSingleKey.php b/database/migrations/2017_11_19_122708_MigratePubPrivFormatToSingleKey.php index 7cc32110a..82c25e65e 100644 --- a/database/migrations/2017_11_19_122708_MigratePubPrivFormatToSingleKey.php +++ b/database/migrations/2017_11_19_122708_MigratePubPrivFormatToSingleKey.php @@ -31,10 +31,21 @@ return new class extends Migration if (Schema::getConnection()->getDriverName() === 'sqlite') { Schema::table('api_keys', function (Blueprint $table) { $table->dropColumn('public'); - $table->char('secret', 32)->change(); + $table->string('secret', 32)->change(); $table->renameColumn('secret', 'token'); $table->string('token', 32)->unique()->change(); }); + } elseif (Schema::getConnection()->getDriverName() === 'pgsql') { + // Rename column 'secret' to 'token' + DB::statement('ALTER TABLE api_keys RENAME COLUMN secret TO token'); + + // Change data type of 'token' to CHAR(32) and set NOT NULL constraint + DB::statement('ALTER TABLE api_keys ALTER COLUMN token TYPE CHAR(32)'); + DB::statement('ALTER TABLE api_keys ALTER COLUMN token SET NOT NULL'); + + // Add unique constraint on 'token' + DB::statement('ALTER TABLE api_keys ADD CONSTRAINT api_keys_token_unique UNIQUE (token)'); + } else { DB::statement('ALTER TABLE `api_keys` CHANGE `secret` `token` CHAR(32) NOT NULL, ADD UNIQUE INDEX `api_keys_token_unique` (`token`(32))'); } @@ -49,7 +60,7 @@ return new class extends Migration DB::statement('ALTER TABLE `api_keys` CHANGE `token` `secret` TEXT, DROP INDEX `api_keys_token_unique`'); Schema::table('api_keys', function (Blueprint $table) { - $table->char('public', 16)->after('user_id'); + $table->string('public', 16)->after('user_id'); }); DB::transaction(function () { diff --git a/database/migrations/2018_01_13_142012_SetupTableForKeyEncryption.php b/database/migrations/2018_01_13_142012_SetupTableForKeyEncryption.php index fcd1a534f..946d21591 100644 --- a/database/migrations/2018_01_13_142012_SetupTableForKeyEncryption.php +++ b/database/migrations/2018_01_13_142012_SetupTableForKeyEncryption.php @@ -16,7 +16,7 @@ return new class extends Migration public function up(): void { Schema::table('api_keys', function (Blueprint $table) { - $table->char('identifier', 16)->nullable()->unique()->after('user_id'); + $table->string('identifier', 16)->nullable()->unique()->after('user_id'); $table->dropUnique(['token']); }); diff --git a/database/migrations/2018_03_15_124536_add_description_to_nodes.php b/database/migrations/2018_03_15_124536_add_description_to_nodes.php index ffcac428a..7f1120ca6 100644 --- a/database/migrations/2018_03_15_124536_add_description_to_nodes.php +++ b/database/migrations/2018_03_15_124536_add_description_to_nodes.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('nodes', function (Blueprint $table) { - $table->text('description')->after('name'); + $table->text('description')->nullable()->after('name'); }); } diff --git a/database/migrations/2020_03_22_163911_merge_permissions_table_into_subusers.php b/database/migrations/2020_03_22_163911_merge_permissions_table_into_subusers.php index 6a9280b5f..c90d485ce 100644 --- a/database/migrations/2020_03_22_163911_merge_permissions_table_into_subusers.php +++ b/database/migrations/2020_03_22_163911_merge_permissions_table_into_subusers.php @@ -1,64 +1,11 @@ P::ACTION_CONTROL_START, - 'power-stop' => P::ACTION_CONTROL_STOP, - 'power-restart' => P::ACTION_CONTROL_RESTART, - 'power-kill' => P::ACTION_CONTROL_STOP, - 'send-command' => P::ACTION_CONTROL_CONSOLE, - 'list-subusers' => P::ACTION_USER_READ, - 'view-subuser' => P::ACTION_USER_READ, - 'edit-subuser' => P::ACTION_USER_UPDATE, - 'create-subuser' => P::ACTION_USER_CREATE, - 'delete-subuser' => P::ACTION_USER_DELETE, - 'view-allocations' => P::ACTION_ALLOCATION_READ, - 'edit-allocation' => P::ACTION_ALLOCATION_UPDATE, - 'view-startup' => P::ACTION_STARTUP_READ, - 'edit-startup' => P::ACTION_STARTUP_UPDATE, - 'view-databases' => P::ACTION_DATABASE_READ, - // Better to just break this flow a bit than accidentally grant a dangerous permission. - 'reset-db-password' => P::ACTION_DATABASE_UPDATE, - 'delete-database' => P::ACTION_DATABASE_DELETE, - 'create-database' => P::ACTION_DATABASE_CREATE, - 'access-sftp' => P::ACTION_FILE_SFTP, - 'list-files' => P::ACTION_FILE_READ, - 'edit-files' => P::ACTION_FILE_READ_CONTENT, - 'save-files' => P::ACTION_FILE_UPDATE, - 'create-files' => P::ACTION_FILE_CREATE, - 'delete-files' => P::ACTION_FILE_DELETE, - 'compress-files' => P::ACTION_FILE_ARCHIVE, - 'list-schedules' => P::ACTION_SCHEDULE_READ, - 'view-schedule' => P::ACTION_SCHEDULE_READ, - 'edit-schedule' => P::ACTION_SCHEDULE_UPDATE, - 'create-schedule' => P::ACTION_SCHEDULE_CREATE, - 'delete-schedule' => P::ACTION_SCHEDULE_DELETE, - // Skipping these permissions as they are granted if you have more specific read/write permissions. - 'move-files' => null, - 'copy-files' => null, - 'decompress-files' => null, - 'upload-files' => null, - 'download-files' => null, - // These permissions do not exist in 1.0 - 'toggle-schedule' => null, - 'queue-schedule' => null, - ]; - /** * Run the migrations. */ @@ -67,31 +14,6 @@ return new class extends Migration Schema::table('subusers', function (Blueprint $table) { $table->json('permissions')->nullable()->after('server_id'); }); - - $cursor = DB::table('permissions') - ->select(['subuser_id']) - ->selectRaw('GROUP_CONCAT(permission) as permissions') - ->from('permissions') - ->groupBy(['subuser_id']) - ->cursor(); - - DB::transaction(function () use (&$cursor) { - $cursor->each(function ($datum) { - $updated = Collection::make(explode(',', $datum->permissions)) - ->map(function ($value) { - return self::$permissionsMap[$value] ?? null; - })->filter(function ($value) { - return !is_null($value) && $value !== Permission::ACTION_WEBSOCKET_CONNECT; - }) - // All subusers get this permission, so make sure it gets pushed into the array. - ->merge([Permission::ACTION_WEBSOCKET_CONNECT]) - ->unique() - ->values() - ->toJson(); - - DB::update('UPDATE subusers SET permissions = ? WHERE id = ?', [$updated, $datum->subuser_id]); - }); - }); } /** @@ -99,25 +21,6 @@ return new class extends Migration */ public function down(): void { - $flipped = array_flip(array_filter(self::$permissionsMap)); - - foreach (DB::select('SELECT id, permissions FROM subusers') as $datum) { - $values = []; - foreach (json_decode($datum->permissions, true) as $permission) { - $v = $flipped[$permission] ?? null; - if (!empty($v)) { - $values[] = $datum->id; - $values[] = $v; - } - } - - if (!empty($values)) { - $string = 'VALUES ' . implode(', ', array_fill(0, count($values) / 2, '(?, ?)')); - - DB::insert('INSERT INTO permissions(`subuser_id`, `permission`) ' . $string, $values); - } - } - Schema::table('subusers', function (Blueprint $table) { $table->dropColumn('permissions'); }); diff --git a/database/migrations/2020_04_03_230614_create_backups_table.php b/database/migrations/2020_04_03_230614_create_backups_table.php index b45e43f63..079cb4fdb 100644 --- a/database/migrations/2020_04_03_230614_create_backups_table.php +++ b/database/migrations/2020_04_03_230614_create_backups_table.php @@ -14,7 +14,7 @@ return new class extends Migration Schema::create('backups', function (Blueprint $table) { $table->bigIncrements('id'); $table->unsignedInteger('server_id'); - $table->char('uuid', 36); + $table->string('uuid', 36); $table->string('name'); $table->text('ignored_files'); $table->string('disk'); diff --git a/database/migrations/2020_04_10_141024_store_node_tokens_as_encrypted_value.php b/database/migrations/2020_04_10_141024_store_node_tokens_as_encrypted_value.php index 911461d70..9b54cf4a3 100644 --- a/database/migrations/2020_04_10_141024_store_node_tokens_as_encrypted_value.php +++ b/database/migrations/2020_04_10_141024_store_node_tokens_as_encrypted_value.php @@ -21,8 +21,8 @@ return new class extends Migration }); Schema::table('nodes', function (Blueprint $table) { - $table->char('uuid', 36)->after('id'); - $table->char('daemon_token_id', 16)->after('upload_size'); + $table->string('uuid', 36)->nullable()->after('id'); + $table->string('daemon_token_id', 16)->nullable()->after('upload_size'); $table->renameColumn('daemonSecret', 'daemon_token'); }); diff --git a/database/migrations/2020_05_20_234655_add_mounts_table.php b/database/migrations/2020_05_20_234655_add_mounts_table.php index 602e1040a..c048668d6 100644 --- a/database/migrations/2020_05_20_234655_add_mounts_table.php +++ b/database/migrations/2020_05_20_234655_add_mounts_table.php @@ -13,7 +13,7 @@ return new class extends Migration { Schema::create('mounts', function (Blueprint $table) { $table->increments('id')->unique(); - $table->char('uuid', 36)->unique(); + $table->string('uuid', 36)->unique(); $table->string('name')->unique(); $table->text('description')->nullable(); $table->string('source'); diff --git a/database/migrations/2020_09_13_110047_drop_packs_table.php b/database/migrations/2020_09_13_110047_drop_packs_table.php index 2a3bf7019..7b9d8a6ca 100644 --- a/database/migrations/2020_09_13_110047_drop_packs_table.php +++ b/database/migrations/2020_09_13_110047_drop_packs_table.php @@ -22,7 +22,7 @@ return new class extends Migration Schema::create('packs', function (Blueprint $table) { $table->increments('id'); $table->unsignedInteger('egg_id'); - $table->char('uuid', 36)->unique(); + $table->string('uuid', 36)->unique(); $table->string('name'); $table->string('version'); $table->text('description')->nullable(); diff --git a/database/migrations/2020_12_12_102435_support_multiple_docker_images_and_updates.php b/database/migrations/2020_12_12_102435_support_multiple_docker_images_and_updates.php index 9e84f8e1d..e503f892e 100644 --- a/database/migrations/2020_12_12_102435_support_multiple_docker_images_and_updates.php +++ b/database/migrations/2020_12_12_102435_support_multiple_docker_images_and_updates.php @@ -18,7 +18,11 @@ return new class extends Migration }); Schema::table('eggs', function (Blueprint $table) { - DB::statement('UPDATE `eggs` SET `docker_images` = JSON_ARRAY(docker_image)'); + if (Schema::getConnection()->getDriverName() === 'pgsql') { + DB::statement('UPDATE eggs SET docker_images = json_build_array(docker_image)'); + } else { + DB::statement('UPDATE eggs SET docker_images = JSON_ARRAY(docker_image)'); + } }); Schema::table('eggs', function (Blueprint $table) { @@ -36,7 +40,7 @@ return new class extends Migration }); Schema::table('eggs', function (Blueprint $table) { - DB::statement('UPDATE `eggs` SET `docker_image` = JSON_UNQUOTE(JSON_EXTRACT(docker_images, "$[0]"))'); + DB::statement('UPDATE eggs SET docker_image = JSON_UNQUOTE(JSON_EXTRACT(docker_images, "$[0]"))'); }); Schema::table('eggs', function (Blueprint $table) { diff --git a/database/migrations/2020_12_14_013707_make_successful_nullable_in_server_transfers.php b/database/migrations/2020_12_14_013707_make_successful_nullable_in_server_transfers.php index c90e6a31d..524ffab74 100644 --- a/database/migrations/2020_12_14_013707_make_successful_nullable_in_server_transfers.php +++ b/database/migrations/2020_12_14_013707_make_successful_nullable_in_server_transfers.php @@ -1,5 +1,6 @@ getDriverName() === 'pgsql') { + // Drop existing default first + DB::statement('ALTER TABLE server_transfers ALTER COLUMN successful DROP DEFAULT'); + + // Change type to boolean explicitly casting smallint values + DB::statement('ALTER TABLE server_transfers ALTER COLUMN successful TYPE BOOLEAN USING (successful <> 0)'); + + // Set column nullable if desired + DB::statement('ALTER TABLE server_transfers ALTER COLUMN successful DROP NOT NULL'); + + return; + } + Schema::table('server_transfers', function (Blueprint $table) { $table->boolean('successful')->nullable()->default(null)->change(); }); @@ -21,6 +35,17 @@ return new class extends Migration */ public function down(): void { + if (Schema::getConnection()->getDriverName() === 'pgsql') { + // Convert boolean back to smallint + DB::statement('ALTER TABLE server_transfers ALTER COLUMN successful TYPE SMALLINT USING (CASE WHEN successful THEN 1 ELSE 0 END)'); + + // Restore previous defaults and constraints + DB::statement('ALTER TABLE server_transfers ALTER COLUMN successful SET DEFAULT 0'); + DB::statement('ALTER TABLE server_transfers ALTER COLUMN successful SET NOT NULL'); + + return; + } + Schema::table('server_transfers', function (Blueprint $table) { $table->boolean('successful')->default(0)->change(); }); diff --git a/database/migrations/2020_12_17_014330_add_archived_field_to_server_transfers_table.php b/database/migrations/2020_12_17_014330_add_archived_field_to_server_transfers_table.php index e11be7d3e..a2045504f 100644 --- a/database/migrations/2020_12_17_014330_add_archived_field_to_server_transfers_table.php +++ b/database/migrations/2020_12_17_014330_add_archived_field_to_server_transfers_table.php @@ -18,7 +18,7 @@ return new class extends Migration // Update archived to all be true on existing transfers. Schema::table('server_transfers', function (Blueprint $table) { - DB::statement('UPDATE `server_transfers` SET `archived` = 1 WHERE `successful` = 1'); + DB::table('server_transfers')->where('successful', 1)->update(['archived' => 1]); }); } diff --git a/database/migrations/2020_12_24_092449_make_allocation_fields_json.php b/database/migrations/2020_12_24_092449_make_allocation_fields_json.php index 1fb88bb05..ce04aa4b4 100644 --- a/database/migrations/2020_12_24_092449_make_allocation_fields_json.php +++ b/database/migrations/2020_12_24_092449_make_allocation_fields_json.php @@ -11,6 +11,15 @@ return new class extends Migration */ public function up(): void { + if (Schema::getConnection()->getDriverName() === 'pgsql') { + Schema::table('server_transfers', function (Blueprint $table) { + DB::statement('ALTER TABLE server_transfers ALTER COLUMN old_additional_allocations TYPE JSON USING old_additional_allocations::json'); + DB::statement('ALTER TABLE server_transfers ALTER COLUMN new_additional_allocations TYPE JSON USING new_additional_allocations::json'); + }); + + return; + } + Schema::table('server_transfers', function (Blueprint $table) { $table->json('old_additional_allocations')->nullable()->change(); $table->json('new_additional_allocations')->nullable()->change(); diff --git a/database/migrations/2021_01_10_153937_add_file_denylist_to_egg_configs.php b/database/migrations/2021_01_10_153937_add_file_denylist_to_egg_configs.php index 1b78788a9..5883fc50e 100644 --- a/database/migrations/2021_01_10_153937_add_file_denylist_to_egg_configs.php +++ b/database/migrations/2021_01_10_153937_add_file_denylist_to_egg_configs.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('eggs', function (Blueprint $table) { - $table->text('file_denylist')->after('docker_images'); + $table->text('file_denylist')->nullable()->after('docker_images'); }); } diff --git a/database/migrations/2021_01_13_013420_add_cron_month.php b/database/migrations/2021_01_13_013420_add_cron_month.php index 786846027..06f07d392 100644 --- a/database/migrations/2021_01_13_013420_add_cron_month.php +++ b/database/migrations/2021_01_13_013420_add_cron_month.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('schedules', function (Blueprint $table) { - $table->string('cron_month')->after('cron_day_of_week'); + $table->string('cron_month')->nullable()->after('cron_day_of_week'); }); } diff --git a/database/migrations/2021_01_17_102401_create_audit_logs_table.php b/database/migrations/2021_01_17_102401_create_audit_logs_table.php index 43b02d63f..e2aed6ec7 100644 --- a/database/migrations/2021_01_17_102401_create_audit_logs_table.php +++ b/database/migrations/2021_01_17_102401_create_audit_logs_table.php @@ -13,7 +13,7 @@ return new class extends Migration { Schema::create('audit_logs', function (Blueprint $table) { $table->id(); - $table->char('uuid', 36); + $table->string('uuid', 36); $table->boolean('is_system')->default(false); $table->unsignedInteger('user_id')->nullable(); $table->unsignedInteger('server_id')->nullable(); diff --git a/database/migrations/2021_01_17_152623_add_generic_server_status_column.php b/database/migrations/2021_01_17_152623_add_generic_server_status_column.php index b864ee628..6aeac2be9 100644 --- a/database/migrations/2021_01_17_152623_add_generic_server_status_column.php +++ b/database/migrations/2021_01_17_152623_add_generic_server_status_column.php @@ -17,9 +17,9 @@ return new class extends Migration }); DB::transaction(function () { - DB::update('UPDATE servers SET `status` = \'suspended\' WHERE `suspended` = 1'); - DB::update('UPDATE servers SET `status` = \'installing\' WHERE `installed` = 0'); - DB::update('UPDATE servers SET `status` = \'install_failed\' WHERE `installed` = 2'); + DB::table('servers')->where('suspended', 1)->update(['status' => 'suspended']); + DB::table('servers')->where('suspended', 0)->update(['status' => 'installing']); + DB::table('servers')->where('suspended', 2)->update(['status' => 'install_failed']); }); Schema::table('servers', function (Blueprint $table) { diff --git a/database/migrations/2021_03_21_104718_force_cron_month_field_to_have_value_if_missing.php b/database/migrations/2021_03_21_104718_force_cron_month_field_to_have_value_if_missing.php index ada00daef..0b2e36fa7 100644 --- a/database/migrations/2021_03_21_104718_force_cron_month_field_to_have_value_if_missing.php +++ b/database/migrations/2021_03_21_104718_force_cron_month_field_to_have_value_if_missing.php @@ -13,7 +13,9 @@ return new class extends Migration public function up(): void { Schema::table('schedules', function (Blueprint $table) { - DB::update("UPDATE `schedules` SET `cron_month` = '*' WHERE `cron_month` = ''"); + DB::table('schedules') + ->where('cron_month', '') + ->update(['cron_month' => '*']); }); } diff --git a/database/migrations/2021_07_12_013420_remove_userinteraction.php b/database/migrations/2021_07_12_013420_remove_userinteraction.php index 25e0a1528..18fd072fd 100644 --- a/database/migrations/2021_07_12_013420_remove_userinteraction.php +++ b/database/migrations/2021_07_12_013420_remove_userinteraction.php @@ -2,6 +2,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Database\Migrations\Migration; +use Illuminate\Support\Facades\Schema; return new class extends Migration { @@ -10,6 +11,14 @@ return new class extends Migration */ public function up(): void { + if (Schema::getConnection()->getDriverName() === 'pgsql') { + DB::table('eggs')->update([ + 'config_startup' => DB::raw("config_startup::jsonb - 'userInteraction'"), + ]); + + return; + } + // Remove User Interaction from startup config DB::table('eggs')->update([ 'config_startup' => DB::raw('JSON_REMOVE(config_startup, \'$.userInteraction\')'), diff --git a/database/migrations/2022_05_28_135717_create_activity_logs_table.php b/database/migrations/2022_05_28_135717_create_activity_logs_table.php index 186125aa3..03c50952a 100644 --- a/database/migrations/2022_05_28_135717_create_activity_logs_table.php +++ b/database/migrations/2022_05_28_135717_create_activity_logs_table.php @@ -13,7 +13,7 @@ return new class extends Migration { Schema::create('activity_logs', function (Blueprint $table) { $table->id(); - $table->char('batch', 36)->nullable(); + $table->string('batch', 36)->nullable(); $table->string('event')->index(); $table->string('ip'); $table->text('description')->nullable(); diff --git a/database/migrations/2024_03_12_154408_remove_nests_table.php b/database/migrations/2024_03_12_154408_remove_nests_table.php index 42d1315b9..11dfb13b0 100644 --- a/database/migrations/2024_03_12_154408_remove_nests_table.php +++ b/database/migrations/2024_03_12_154408_remove_nests_table.php @@ -11,7 +11,7 @@ return new class extends Migration public function up(): void { Schema::table('eggs', function (Blueprint $table) { - $table->text('tags'); + $table->text('tags')->nullable(); }); DB::table('eggs')->update(['tags' => '[]']); @@ -58,7 +58,7 @@ return new class extends Migration Schema::create('nests', function (Blueprint $table) { $table->increments('id'); - $table->char('uuid', 36)->unique(); + $table->string('uuid', 36)->unique(); $table->string('author'); $table->string('name'); $table->text('description')->nullable(); diff --git a/database/migrations/2024_03_14_055537_remove_locations_table.php b/database/migrations/2024_03_14_055537_remove_locations_table.php index bdd0c382a..5bbaf4ee5 100644 --- a/database/migrations/2024_03_14_055537_remove_locations_table.php +++ b/database/migrations/2024_03_14_055537_remove_locations_table.php @@ -10,7 +10,7 @@ return new class extends Migration public function up(): void { Schema::table('nodes', function (Blueprint $table) { - $table->text('tags'); + $table->text('tags')->nullable(); }); DB::table('nodes')->update(['tags' => '[]']); diff --git a/database/migrations/2024_07_25_072050_convert_rules_to_array.php b/database/migrations/2024_07_25_072050_convert_rules_to_array.php index 6646a6661..e7db3153b 100644 --- a/database/migrations/2024_07_25_072050_convert_rules_to_array.php +++ b/database/migrations/2024_07_25_072050_convert_rules_to_array.php @@ -16,6 +16,12 @@ return new class extends Migration DB::table('egg_variables')->where('id', $eggVariable->id)->update(['rules' => explode('|', $eggVariable->rules)]); }); + if (Schema::getConnection()->getDriverName() === 'pgsql') { + DB::statement('ALTER TABLE egg_variables ALTER COLUMN rules TYPE JSON USING rules::json'); + + return; + } + Schema::table('egg_variables', function (Blueprint $table) { $table->json('rules')->change(); }); diff --git a/database/migrations/2016_01_25_234418_rename_permissions_column.php b/database/migrations/2025_03_28_104348_drop_gravatar_column_in_users.php similarity index 54% rename from database/migrations/2016_01_25_234418_rename_permissions_column.php rename to database/migrations/2025_03_28_104348_drop_gravatar_column_in_users.php index 181fa1dba..bc352ba36 100644 --- a/database/migrations/2016_01_25_234418_rename_permissions_column.php +++ b/database/migrations/2025_03_28_104348_drop_gravatar_column_in_users.php @@ -1,7 +1,8 @@ renameColumn('permissions', 'permission'); + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('gravatar'); }); } @@ -20,6 +21,8 @@ return new class extends Migration */ public function down(): void { - Schema::table('permissions', function (Blueprint $table) {}); + Schema::table('users', function (Blueprint $table) { + $table->boolean('gravatar')->default(true); + }); } }; diff --git a/database/migrations/2025_04_01_033956_egg_variable_unique_foreign_key.php b/database/migrations/2025_04_01_033956_egg_variable_unique_foreign_key.php new file mode 100644 index 000000000..64f011b71 --- /dev/null +++ b/database/migrations/2025_04_01_033956_egg_variable_unique_foreign_key.php @@ -0,0 +1,30 @@ +unique(['egg_id', 'env_variable']); + $table->unique(['egg_id', 'name']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('egg_variables', function (Blueprint $table) { + $table->dropUnique(['egg_id', 'env_variable']); + $table->dropUnique(['egg_id', 'name']); + }); + } +}; diff --git a/database/migrations/2025_04_01_214953_add_customization_column.php b/database/migrations/2025_04_01_214953_add_customization_column.php new file mode 100644 index 000000000..51ff112fb --- /dev/null +++ b/database/migrations/2025_04_01_214953_add_customization_column.php @@ -0,0 +1,28 @@ +json('customization')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('customization'); + }); + } +}; diff --git a/database/migrations/2025_04_07_062945_remove_additional_roles_of_root_admins.php b/database/migrations/2025_04_07_062945_remove_additional_roles_of_root_admins.php new file mode 100644 index 000000000..25dd02999 --- /dev/null +++ b/database/migrations/2025_04_07_062945_remove_additional_roles_of_root_admins.php @@ -0,0 +1,27 @@ +filter(fn ($user) => $user->isRootAdmin()); + foreach ($rootAdmins as $rootAdmin) { + $rootAdmin->syncRoles(Role::getRootAdmin()); + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // No going back + } +}; diff --git a/database/migrations/2025_04_08_113556_create_node_role_table.php b/database/migrations/2025_04_08_113556_create_node_role_table.php new file mode 100644 index 000000000..42f51c73a --- /dev/null +++ b/database/migrations/2025_04_08_113556_create_node_role_table.php @@ -0,0 +1,32 @@ +unsignedInteger('node_id'); + $table->unsignedBigInteger('role_id'); + + $table->unique(['node_id', 'role_id']); + + $table->foreign('node_id')->references('id')->on('nodes')->cascadeOnDelete(); + $table->foreign('role_id')->references('id')->on('roles')->cascadeOnDelete(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('node_role'); + } +}; diff --git a/database/migrations/2025_05_01_193002_move_to_mountables.php b/database/migrations/2025_05_01_193002_move_to_mountables.php new file mode 100644 index 000000000..36bf52bfb --- /dev/null +++ b/database/migrations/2025_05_01_193002_move_to_mountables.php @@ -0,0 +1,93 @@ +unsignedInteger('mount_id'); + + $table->string('mountable_type'); + $table->unsignedBigInteger('mountable_id'); + $table->index(['mountable_id', 'mountable_type'], 'mountables_mountable_id_mountable_type_index'); + + $table->foreign('mount_id') + ->references('id') // mount id + ->on('mounts') + ->onDelete('cascade'); + + $table->primary(['mount_id', 'mountable_id', 'mountable_type'], + 'mountables_mountable_type_primary'); + }); + + Schema::table('mount_node', function (Blueprint $table) { + $table->dropForeign(['node_id']); + $table->dropForeign(['mount_id']); + $table->dropUnique(['node_id', 'mount_id']); + }); + + $inserts = []; + $nodeMounts = DB::table('mount_node')->get(); + $nodeMounts->each(function ($mount) use (&$inserts) { + $inserts[] = [ + 'mount_id' => $mount->mount_id, + 'mountable_type' => 'node', + 'mountable_id' => $mount->node_id, + ]; + }); + + Schema::table('mount_server', function (Blueprint $table) { + $table->dropForeign(['server_id']); + $table->dropForeign(['mount_id']); + $table->dropUnique(['server_id', 'mount_id']); + }); + + $serverMounts = DB::table('mount_server')->get(); + $serverMounts->each(function ($mount) use (&$inserts) { + $inserts[] = [ + 'mount_id' => $mount->mount_id, + 'mountable_type' => 'server', + 'mountable_id' => $mount->server_id, + ]; + }); + + Schema::table('egg_mount', function (Blueprint $table) { + $table->dropForeign(['egg_id']); + $table->dropForeign(['mount_id']); + $table->dropUnique(['egg_id', 'mount_id']); + }); + + $eggMounts = DB::table('egg_mount')->get(); + $eggMounts->each(function ($mount) use (&$inserts) { + $inserts[] = [ + 'mount_id' => $mount->mount_id, + 'mountable_type' => 'egg', + 'mountable_id' => $mount->egg_id, + ]; + }); + + DB::transaction(function () use ($inserts) { + DB::table('mountables')->insert($inserts); + }); + + Schema::drop('mount_node'); + Schema::drop('mount_server'); + Schema::drop('egg_mount'); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // Not needed + } +}; diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 77f79291f..000000000 --- a/docker/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# Pelican Panel - Docker Image -This is a ready to use docker image for the panel. - -## Requirements -This docker image requires some additional software to function. The software can either be provided in other containers (see the [docker-compose.yml](https://github.com/pelican-dev/panel/blob/develop/docker-compose.example.yml) as an example) or as existing instances. - -A mysql database is required. We recommend the stock [MariaDB Image](https://hub.docker.com/_/mariadb/) image if you prefer to run it in a docker container. As a non-containerized option we recommend mariadb. - -A caching software is required as well. We recommend the stock [Redis Image](https://hub.docker.com/_/redis/) image. You can choose any of the [supported options](#cache-drivers). - -You can provide additional settings using a custom `.env` file or by setting the appropriate environment variables in the docker-compose file. - -## Setup - -Start the docker container and the required dependencies (either provide existing ones or start containers as well, see the [docker-compose.yml](https://github.com/pelican-dev/panel/blob/develop/docker-compose.example.yml) file as an example. - -After the startup is complete you'll need to create a user. -If you are running the docker container without docker-compose, use: -``` -docker exec -it php artisan p:user:make -``` -If you are using docker compose use -``` -docker-compose exec panel php artisan p:user:make -``` - -## Environment Variables -There are multiple environment variables to configure the panel when not providing your own `.env` file, see the following table for details on each available option. - -Note: If your `APP_URL` starts with `https://` you need to provide an `LE_EMAIL` as well so Certificates can be generated. - -| Variable | Description | Required | -|-------------------| ------------------------------------------------------------------------------ | -------- | -| `APP_URL` | The URL the panel will be reachable with (including protocol) | yes | -| `APP_TIMEZONE` | The timezone to use for the panel | yes | -| `LE_EMAIL` | The email used for letsencrypt certificate generation | yes | -| `DB_HOST` | The host of the mysql instance | yes | -| `DB_PORT` | The port of the mysql instance | yes | -| `DB_DATABASE` | The name of the mysql database | yes | -| `DB_USERNAME` | The mysql user | yes | -| `DB_PASSWORD` | The mysql password for the specified user | yes | -| `CACHE_STORE` | The cache driver (see [Cache drivers](#cache-drivers) for detais) | yes | -| `SESSION_DRIVER` | | yes | -| `QUEUE_DRIVER` | | yes | -| `REDIS_HOST` | The hostname or IP address of the redis database | yes | -| `REDIS_PASSWORD` | The password used to secure the redis database | maybe | -| `REDIS_PORT` | The port the redis database is using on the host | maybe | -| `MAIL_DRIVER` | The email driver (see [Mail drivers](#mail-drivers) for details) | yes | -| `MAIL_FROM` | The email that should be used as the sender email | yes | -| `MAIL_HOST` | The host of your mail driver instance | maybe | -| `MAIL_PORT` | The port of your mail driver instance | maybe | -| `MAIL_USERNAME` | The username for your mail driver | maybe | -| `MAIL_PASSWORD` | The password for your mail driver | maybe | - - -### Cache drivers -You can choose between different cache drivers depending on what you prefer. -We recommend redis when using docker as it can be started in a container easily. - -| Driver | Description | Required variables | -| -------- | ------------------------------------ | ------------------------------------------------------ | -| redis | host where redis is running | `REDIS_HOST` | -| redis | port redis is running on | `REDIS_PORT` | -| redis | redis database password | `REDIS_PASSWORD` | - -### Mail drivers -You can choose between different mail drivers according to your needs. -Every driver requires `MAIL_FROM` to be set. - -| Driver | Description | Required variables | -| -------- | ------------------------------------ | ------------------------------------------------------------- | -| mail | uses the installed php mail | | -| mandrill | [Mandrill](http://www.mandrill.com/) | `MAIL_USERNAME` | -| postmark | [Postmark](https://postmarkapp.com/) | `MAIL_USERNAME` | -| mailgun | [Mailgun](https://www.mailgun.com/) | `MAIL_USERNAME`, `MAIL_HOST` | -| smtp | Any SMTP server can be configured | `MAIL_USERNAME`, `MAIL_HOST`, `MAIL_PASSWORD`, `MAIL_PORT` | diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index c97577bf3..1089ea539 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -23,7 +23,7 @@ else echo -e "APP_INSTALLED=false" >> /pelican-data/.env fi -mkdir /pelican-data/database /var/www/html/storage/logs/supervisord 2>/dev/null +mkdir -p /pelican-data/database /pelican-data/storage/avatars /pelican-data/storage/fonts /var/www/html/storage/logs/supervisord 2>/dev/null if ! grep -q "APP_KEY=" .env || grep -q "APP_KEY=$" .env; then echo "Generating APP_KEY..." diff --git a/lang/en/activity.php b/lang/en/activity.php index d734daca5..9518ac970 100644 --- a/lang/en/activity.php +++ b/lang/en/activity.php @@ -11,7 +11,6 @@ return [ 'fail' => 'Failed log in', 'success' => 'Logged in', 'password-reset' => 'Password reset', - 'reset-password' => 'Requested password reset', 'checkpoint' => 'Two-factor authentication requested', 'recovery-token' => 'Used two-factor recovery token', 'token' => 'Solved two-factor challenge', diff --git a/lang/en/admin/apikey.php b/lang/en/admin/apikey.php index a6f45b790..c71e0d24b 100644 --- a/lang/en/admin/apikey.php +++ b/lang/en/admin/apikey.php @@ -2,7 +2,7 @@ return [ 'title' => 'Application API Keys', - 'empty_table' => 'No API keys.', + 'empty_table' => 'No API keys', 'whitelist' => 'Whitelisted IPv4 Addresses', 'whitelist_help' => 'API keys can be restricted to only work from specific IPv4 addresses. Enter each address on a new line.', 'whitelist_placeholder' => 'Example: 127.0.0.1 or 192.168.1.1', diff --git a/lang/en/admin/dashboard.php b/lang/en/admin/dashboard.php index 0cfa8b9ef..49ff57726 100644 --- a/lang/en/admin/dashboard.php +++ b/lang/en/admin/dashboard.php @@ -1,10 +1,7 @@ 'Dashboard', - 'overview' => 'Overview', 'heading' => 'Welcome to Pelican!', - 'expand_sections' => 'You can expand the following sections:', 'version' => 'Version: :version', 'advanced' => 'Advanced', 'server' => 'Server', diff --git a/lang/en/admin/databasehost.php b/lang/en/admin/databasehost.php index ccd12e47d..263b25e0e 100644 --- a/lang/en/admin/databasehost.php +++ b/lang/en/admin/databasehost.php @@ -45,4 +45,30 @@ return [ 'rotated' => 'Password Rotated', 'rotate_error' => 'Password Rotation Failed', 'databases' => 'Databases', + + 'setup' => [ + 'preparations' => 'Preparations', + 'database_setup' => 'Database Setup', + 'panel_setup' => 'Panel Setup', + + 'note' => 'Currently, only MySQL/ MariaDB databases are supported for database hosts!', + 'different_server' => 'Are the panel and the database not on the same server?', + + 'database_user' => 'Database User', + 'cli_login' => 'Use mysql -u root -p to access mysql cli.', + 'command_create_user' => 'Command to create the user', + 'command_assign_permissions' => 'Command to assign permissions', + 'cli_exit' => 'To exit mysql cli run exit.', + 'external_access' => 'External Access', + 'allow_external_access' => ' +

Chances are you\'ll need to allow external access to this MySQL instance in order to allow servers to connect to it.

+
+

To do this, open my.cnf, which varies in location depending on your OS and how MySQL was installed. You can type find /etc -iname my.cnf to locate it.

+
+

Open my.cnf, add text below to the bottom of the file and save it:
+ [mysqld]
bind-address=0.0.0.0

+
+

Restart MySQL/ MariaDB to apply these changes. This will override the default MySQL configuration, which by default will only accept requests from localhost. Updating this will allow connections on all interfaces, and thus, external connections. Make sure to allow the MySQL port (default 3306) in your firewall.

+ ', + ], ]; diff --git a/lang/en/admin/egg.php b/lang/en/admin/egg.php index 1f5e8423f..db7171f2b 100644 --- a/lang/en/admin/egg.php +++ b/lang/en/admin/egg.php @@ -77,7 +77,7 @@ return [ 'script_install' => 'Install Script', 'no_eggs' => 'No Eggs', 'no_servers' => 'No Servers', - 'no_servers_help' => 'No Servers are assigned to this Egg.', + 'no_servers_help' => 'No Servers are assigned to this Egg', 'update' => 'Update|Update selected', 'updated' => 'Egg updated|:count/:total Eggs updated', diff --git a/lang/en/admin/role.php b/lang/en/admin/role.php index 1b99c0625..c4871ac7a 100644 --- a/lang/en/admin/role.php +++ b/lang/en/admin/role.php @@ -12,4 +12,6 @@ return [ 'root_admin' => 'The :role has all permissions.', 'root_admin_delete' => 'Can\'t delete Root Admin', 'users' => 'Users', + 'nodes' => 'Nodes', + 'nodes_hint' => 'Leave empty to allow access to all nodes.', ]; diff --git a/lang/en/admin/server.php b/lang/en/admin/server.php index 893979f46..4b64320f9 100644 --- a/lang/en/admin/server.php +++ b/lang/en/admin/server.php @@ -64,13 +64,16 @@ return [ 'reinstall_modal_heading' => 'Are you sure you want to reinstall this server?', 'reinstall_modal_description' => '!! This can result in unrecoverable data loss !!', 'server_status' => 'Server Status', + 'view_install_log' => 'View install log', 'uuid' => 'UUID', 'node' => 'Node', 'short_uuid' => 'Short UUID', 'toggle_install' => 'Toggle Install Status', 'toggle_install_help' => 'If you need to change the install status from uninstalled to installed, or vice versa, you may do so with this button.', + 'toggle_install_failed_header' => 'Server is in failed state', + 'toggle_install_failed_desc' => 'Do you want to reinstall the server to fix this?', 'transfer' => 'Transfer', - 'transfer_help' => 'Transfer this server to another node connected to this panel. Warning! This feature has not been fully tested and may have bugs.', + 'transfer_help' => 'Transfer this server to another node connected to this panel.
Warning! This feature is still experimental. Consider manually making a backup first to avoid data loss!', 'condition' => 'Condition', 'suspend_all' => 'Suspend All Servers', 'unsuspend_all' => 'Unsuspend All Servers', @@ -83,7 +86,7 @@ return [ 'allocations' => 'Allocations', 'databases' => 'Databases', 'no_databases' => 'No Databases exist for this Server', - 'delete_db' => 'Are you sure you want to delete', + 'delete_db' => 'Are you sure you want to delete :name ?', 'delete_db_heading' => 'Delete Database?', 'backups' => 'Backups', 'egg' => 'Egg', @@ -98,6 +101,7 @@ return [ 'create_allocation' => 'Create Allocation', 'add_allocation' => 'Add Allocation', 'view' => 'View', + 'no_log' => 'No Log Available', 'tabs' => [ 'information' => 'Information', 'egg_configuration' => 'Egg Configuration', @@ -109,6 +113,8 @@ return [ 'server_suspend_help' => 'This will suspend the Server, stop any running processes, and immediately block the user from being able to access their files or otherwise manage the Server through the panel or API.', 'server_unsuspend_help' => 'This will unsuspend the Server and restore normal user access.', 'server_unsuspended' => 'Server has been unsuspended', + 'error_server_delete' => 'Server couldn\'t be safely deleted.', + 'error_server_delete_body' => 'You may Force Delete it.', 'create_failed' => 'Could not create Server', 'invalid_port_range' => 'Invalid Port Range', 'invalid_port_range_body' => 'Your port range are not valid integers: :port', @@ -116,9 +122,15 @@ return [ 'too_many_ports_body' => 'The current limit is :limit number of ports at one time.', 'invalid_port' => 'Port not in valid range', 'invalid_port_body' => ':i is not in the valid port range between :portFloor-:portCeil', + 'dissociate_primary' => 'Cannot dissociate primary allocation', 'already_exists' => 'Port already in use', 'already_exists_body' => ':i is already with an allocation', 'error_connecting' => 'Error connecting to :node', 'error_connecting_description' => 'The configuration could not be automatically synced on Wings, you will need to manually restart the server.', + 'install_toggled' => 'Install status toggled', + 'install_toggle_failed' => 'Could not toggle install status', + 'reinstall_started' => 'Reinstall started', + 'reinstall_failed' => 'Could not start reinstall', + 'log_failed' => 'Could not connect to Wings to retrieve server install log.', ], ]; diff --git a/lang/en/admin/setting.php b/lang/en/admin/setting.php index 729c9e265..9f0ee01be 100644 --- a/lang/en/admin/setting.php +++ b/lang/en/admin/setting.php @@ -34,6 +34,8 @@ return [ 'clear' => 'Clear', 'set_to_cf' => 'Set to Cloudflare IPs', 'display_width' => 'Display Width', + 'avatar_provider' => 'Avatar Provider', + 'uploadable_avatars' => 'Allow users to upload own avatar?', ], 'captcha' => [ 'enable' => 'Enable', @@ -135,6 +137,8 @@ return [ 'title' => 'Servers', 'helper' => 'Settings for Servers', 'edit_server_desc' => 'Allow Users to edit Descriptions?', + 'console_font_upload' => 'Console Font Upload', + 'console_font_hint' => 'Only *.ttf fonts are supported. Mono fonts strongly recommended!', ], 'webhook' => [ 'title' => 'Webhooks', diff --git a/lang/en/auth.php b/lang/en/auth.php index d8fb89a75..d88b09397 100644 --- a/lang/en/auth.php +++ b/lang/en/auth.php @@ -16,7 +16,9 @@ return [ 'failed' => 'These credentials do not match our records.', 'failed-two-factor' => 'Incorrect 2FA Code', 'two-factor-code' => 'Two Factor Code', + 'two-factor-hint' => 'You may use backup codes if you lost access to your device.', 'password' => 'The provided password is incorrect.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + '2fa_must_be_enabled' => 'The administrator has required that 2-Factor Authentication must be enabled for your account in order to use the Panel.', ]; diff --git a/lang/en/exceptions.php b/lang/en/exceptions.php index 711ce7ac9..ed17349d2 100644 --- a/lang/en/exceptions.php +++ b/lang/en/exceptions.php @@ -4,6 +4,7 @@ return [ 'daemon_connection_failed' => 'There was an exception while attempting to communicate with the daemon resulting in a HTTP/:code response code. This exception has been logged.', 'node' => [ 'servers_attached' => 'A node must have no servers linked to it in order to be deleted.', + 'error_connecting' => 'Error connecting to :node', 'daemon_off_config_updated' => 'The daemon configuration has been updated, however there was an error encountered while attempting to automatically update the configuration file on the Daemon. You will need to manually update the configuration file (config.yml) for the daemon to apply these changes.', ], 'allocations' => [ diff --git a/lang/en/profile.php b/lang/en/profile.php index daea83628..525f6f235 100644 --- a/lang/en/profile.php +++ b/lang/en/profile.php @@ -9,6 +9,7 @@ return [ 'api_keys' => 'API Keys', 'ssh_keys' => 'SSH Keys', '2fa' => '2FA', + 'customization' => 'Customization', ], 'username' => 'Username', 'exit_admin' => 'Exit Admin', @@ -38,4 +39,16 @@ return [ 'description' => 'Description', 'allowed_ips' => 'Allowed IPs', 'allowed_ips_help' => 'Press enter to add a new IP address or leave blank to allow any IP address', + 'dashboard' => 'Dashboard', + 'dashboard_layout' => 'Dashboard Layout', + 'console' => 'Console', + 'grid' => 'Grid', + 'table' => 'Table', + 'rows' => 'Rows', + 'font_size' => 'Font Size', + 'font' => 'Font', + 'font_preview' => 'Font Preview', + 'seconds' => 'Seconds', + 'graph_period' => 'Graph Period', + 'graph_period_helper' => 'The amount of data points, seconds, shown on the console graphs.', ]; diff --git a/lang/en/server/users.php b/lang/en/server/users.php index 77d90b370..cb570da58 100644 --- a/lang/en/server/users.php +++ b/lang/en/server/users.php @@ -15,8 +15,8 @@ return [ 'startup_read' => 'Allows a user to view the startup variables for a server.', 'startup_update' => 'Allows a user to modify the startup variables for the server.', 'startup_docker_image' => 'Allows a user to modify the Docker image used when running the server.', - 'setting_reinstall' => 'Allows a user to trigger a reinstall of this server.', - 'setting_rename' => 'Allows a user to rename this server and change the description of it.', + 'settings_reinstall' => 'Allows a user to trigger a reinstall of this server.', + 'settings_rename' => 'Allows a user to rename this server and change the description of it.', 'activity_read' => 'Allows a user to view the activity logs for the server.', 'websocket_*' => 'Allows a user access to the websocket for this server.', 'control_console' => 'Allows a user to send data to the server console.', diff --git a/public/css/aymanalhattami/filament-context-menu/filament-context-menu-styles.css b/public/css/aymanalhattami/filament-context-menu/filament-context-menu-styles.css new file mode 100644 index 000000000..49943cf90 --- /dev/null +++ b/public/css/aymanalhattami/filament-context-menu/filament-context-menu-styles.css @@ -0,0 +1 @@ +/*! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.fixed{position:fixed}.relative{position:relative}.z-50{z-index:50}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mt-1{margin-top:.25rem}.block{display:block}.flex{display:flex}.h-px{height:1px}.w-full{width:100%}.min-w-48{min-width:12rem}.max-w-2xl{max-width:42rem}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.justify-between{justify-content:space-between}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.pl-8{padding-left:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity))}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid #0000;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-gray-950\/5{--tw-ring-color:#0307120d}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.context-menu-filament-action a,.context-menu-filament-action button{width:100%;justify-content:flex-start}.hover\:bg-neutral-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}@media (prefers-color-scheme:dark){.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:bg-white\/5{background-color:#ffffff0d}.dark\:text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.dark\:ring-white\/10{--tw-ring-color:#ffffff1a}.dark\:hover\:bg-white\/5:hover{background-color:#ffffff0d}} \ No newline at end of file diff --git a/public/css/filament/filament/app.css b/public/css/filament/filament/app.css index cf1fc9f7b..3491f2db2 100644 --- a/public/css/filament/filament/app.css +++ b/public/css/filament/filament/app.css @@ -1 +1 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border-color:rgba(var(--gray-200),1);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:rgba(var(--gray-400),1);opacity:1}input::placeholder,textarea::placeholder{color:rgba(var(--gray-400),1);opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:rgba(var(--gray-500),var(--tw-border-opacity,1));border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:rgba(var(--gray-500),var(--tw-text-opacity,1));opacity:1}input::placeholder,textarea::placeholder{color:rgba(var(--gray-500),var(--tw-text-opacity,1));opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:rgba(var(--gray-500),var(--tw-border-opacity,1));border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}:root.dark{color-scheme:dark}[data-field-wrapper]{scroll-margin-top:8rem}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-bottom:3em;margin-top:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){border-inline-start-color:var(--tw-prose-quote-borders);border-inline-start-width:.25rem;color:var(--tw-prose-quotes);font-style:italic;font-weight:500;margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em;quotes:"\201C""\201D""\2018""\2019"}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:2.25em;font-weight:800;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.5em;font-weight:700;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.25em;font-weight:600;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-bottom:2em;margin-top:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);color:var(--tw-prose-kbd);font-family:inherit;font-size:.875em;font-weight:500;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:var(--tw-prose-pre-bg);border-radius:.375rem;color:var(--tw-prose-pre-code);font-size:.875em;font-weight:400;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;overflow-x:auto;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.7142857;margin-bottom:2em;margin-top:2em;table-layout:auto;width:100%}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-color:var(--tw-prose-th-borders);border-bottom-width:1px}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em;vertical-align:bottom}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-color:var(--tw-prose-td-borders);border-bottom-width:1px}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-color:var(--tw-prose-th-borders);border-top-width:1px}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5em;margin-top:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-bottom:.8888889em;margin-top:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;line-height:1.2;margin-bottom:.8em;margin-top:0}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;line-height:1.4;margin-bottom:.8em;margin-top:1.6em}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-bottom:.4444444em;margin-top:1.5555556em}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.4285714;margin-bottom:.5714286em;margin-top:1.4285714em}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.8571429em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-top:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.25rem;font-size:.8571429em;line-height:1.6666667;margin-bottom:1.6666667em;margin-top:1.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-top:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.2857143em;margin-top:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5714286em;margin-top:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5714286em;margin-top:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2.8571429em;margin-top:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-top:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-base{font-size:1rem;line-height:1.75}.prose-base :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose-base :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose-base :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em}.prose-base :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.25em;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose-base :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.5em;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose-base :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.25em;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose-base :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose-base :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-base :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose-base :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-base :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-base :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-base :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.375rem;font-size:.875em;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose-base :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose-base :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose-base :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5em;margin-top:.5em}.prose-base :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose-base :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose-base :where(.prose-base>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose-base :where(.prose-base>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(.prose-base>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose-base :where(.prose-base>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(.prose-base>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose-base :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose-base :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose-base :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose-base :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:3em;margin-top:3em}.prose-base :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.7142857}.prose-base :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose-base :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-base :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-base :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose-base :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-base :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-base :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-base :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose-base :where(.prose-base>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(.prose-base>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-lg{font-size:1.125rem;line-height:1.7777778}.prose-lg :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em}.prose-lg :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2222222em;line-height:1.4545455;margin-bottom:1.0909091em;margin-top:1.0909091em}.prose-lg :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.6666667em;margin-top:1.6666667em;padding-inline-start:1em}.prose-lg :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.6666667em;line-height:1;margin-bottom:.8333333em;margin-top:0}.prose-lg :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.6666667em;line-height:1.3333333;margin-bottom:1.0666667em;margin-top:1.8666667em}.prose-lg :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.3333333em;line-height:1.5;margin-bottom:.6666667em;margin-top:1.6666667em}.prose-lg :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.5555556;margin-bottom:.4444444em;margin-top:1.7777778em}.prose-lg :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-lg :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.8888889em;padding-inline-end:.4444444em;padding-bottom:.2222222em;padding-top:.2222222em;padding-inline-start:.4444444em}.prose-lg :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-lg :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8666667em}.prose-lg :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-lg :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.375rem;font-size:.8888889em;line-height:1.75;margin-bottom:2em;margin-top:2em;padding-inline-end:1.5em;padding-bottom:1em;padding-top:1em;padding-inline-start:1.5em}.prose-lg :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.5555556em}.prose-lg :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.5555556em}.prose-lg :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.6666667em;margin-top:.6666667em}.prose-lg :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4444444em}.prose-lg :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4444444em}.prose-lg :where(.prose-lg>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.8888889em;margin-top:.8888889em}.prose-lg :where(.prose-lg>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(.prose-lg>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em}.prose-lg :where(.prose-lg>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(.prose-lg>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em}.prose-lg :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.8888889em;margin-top:.8888889em}.prose-lg :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em}.prose-lg :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.6666667em;padding-inline-start:1.5555556em}.prose-lg :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:3.1111111em;margin-top:3.1111111em}.prose-lg :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em;line-height:1.5}.prose-lg :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.75em;padding-bottom:.75em;padding-inline-start:.75em}.prose-lg :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-lg :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-lg :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.75em;padding-bottom:.75em;padding-top:.75em;padding-inline-start:.75em}.prose-lg :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-lg :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-lg :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-lg :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em;line-height:1.5;margin-top:1em}.prose-lg :where(.prose-lg>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(.prose-lg>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-4{inset:1rem}.inset-x-0{left:0;right:0}.inset-x-4{left:1rem;right:1rem}.inset-y-0{bottom:0;top:0}.-bottom-1\/2{bottom:-50%}.-top-1{top:-.25rem}.-top-1\/2{top:-50%}.-top-2{top:-.5rem}.-top-3{top:-.75rem}.bottom-0{bottom:0}.bottom-1\/2{bottom:50%}.end-0{inset-inline-end:0}.end-4{inset-inline-end:1rem}.end-6{inset-inline-end:1.5rem}.left-3{left:.75rem}.start-0{inset-inline-start:0}.start-full{inset-inline-start:100%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.top-6{top:1.5rem}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[1\]{z-index:1}.order-first{order:-9999}.col-\[--col-span-default\]{grid-column:var(--col-span-default)}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.col-start-3{grid-column-start:3}.col-start-\[--col-start-default\]{grid-column-start:var(--col-start-default)}.row-start-2{grid-row-start:2}.-m-0\.5{margin:-.125rem}.-m-1{margin:-.25rem}.-m-1\.5{margin:-.375rem}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.-m-3{margin:-.75rem}.-m-3\.5{margin:-.875rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-1{margin-bottom:-.25rem;margin-top:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.my-16{margin-bottom:4rem;margin-top:4rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-auto{margin-bottom:auto;margin-top:auto}.\!mt-0{margin-top:0!important}.-mb-4{margin-bottom:-1rem}.-mb-6{margin-bottom:-1.5rem}.-me-2{margin-inline-end:-.5rem}.-ms-0\.5{margin-inline-start:-.125rem}.-ms-1{margin-inline-start:-.25rem}.-ms-2{margin-inline-start:-.5rem}.-mt-3{margin-top:-.75rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.-mt-7{margin-top:-1.75rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.me-1{margin-inline-end:.25rem}.me-3{margin-inline-end:.75rem}.me-4{margin-inline-end:1rem}.me-6{margin-inline-end:1.5rem}.ml-auto{margin-left:auto}.ms-1{margin-inline-start:.25rem}.ms-6{margin-inline-start:1.5rem}.ms-auto{margin-inline-start:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-\[--line-clamp\]{-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp);display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.hidden{display:none}.h-0{height:0}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-16{height:4rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[100dvh\],.h-dvh{height:100dvh}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.min-h-\[theme\(spacing\.48\)\]{min-height:12rem}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[--sidebar-width\]{width:var(--sidebar-width)}.w-\[calc\(100\%\+2rem\)\]{width:calc(100% + 2rem)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-48{min-width:12rem}.min-w-\[theme\(spacing\.4\)\]{min-width:1rem}.min-w-\[theme\(spacing\.5\)\]{min-width:1.25rem}.min-w-\[theme\(spacing\.6\)\]{min-width:1.5rem}.min-w-\[theme\(spacing\.8\)\]{min-width:2rem}.\!max-w-2xl{max-width:42rem!important}.\!max-w-3xl{max-width:48rem!important}.\!max-w-4xl{max-width:56rem!important}.\!max-w-5xl{max-width:64rem!important}.\!max-w-6xl{max-width:72rem!important}.\!max-w-7xl{max-width:80rem!important}.\!max-w-\[14rem\]{max-width:14rem!important}.\!max-w-lg{max-width:32rem!important}.\!max-w-md{max-width:28rem!important}.\!max-w-sm{max-width:24rem!important}.\!max-w-xl{max-width:36rem!important}.\!max-w-xs{max-width:20rem!important}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-md{max-width:28rem}.max-w-min{max-width:-moz-min-content;max-width:min-content}.max-w-none{max-width:none}.max-w-prose{max-width:65ch}.max-w-screen-2xl{max-width:1536px}.max-w-screen-lg{max-width:1024px}.max-w-screen-md{max-width:768px}.max-w-screen-sm{max-width:640px}.max-w-screen-xl{max-width:1280px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-x-1\/4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\/4{--tw-translate-x:-25%}.-translate-x-12{--tw-translate-x:-3rem}.-translate-x-12,.-translate-x-5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-5{--tw-translate-x:-1.25rem}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-12{--tw-translate-y:-3rem}.-translate-y-12,.-translate-y-3\/4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-3\/4{--tw-translate-y:-75%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x:3rem}.translate-x-5{--tw-translate-x:1.25rem}.translate-x-5,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-12{--tw-translate-y:3rem}.-rotate-180,.translate-y-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate:-180deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.resize{resize:both}.scroll-mt-9{scroll-margin-top:2.25rem}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.columns-\[--cols-default\]{-moz-columns:var(--cols-default);columns:var(--cols-default)}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[--cols-default\]{grid-template-columns:var(--cols-default)}.grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr}.grid-cols-\[repeat\(7\2c minmax\(theme\(spacing\.7\)\2c 1fr\)\)\]{grid-template-columns:repeat(7,minmax(1.75rem,1fr))}.grid-cols-\[repeat\(auto-fit\2c minmax\(0\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}.grid-rows-\[1fr_auto_1fr\]{grid-template-rows:1fr auto 1fr}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-start{justify-items:start}.justify-items-center{justify-items:center}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-2\.5{-moz-column-gap:.625rem;column-gap:.625rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-1\.5{row-gap:.375rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-7{row-gap:1.75rem}.gap-y-8{row-gap:2rem}.gap-y-px{row-gap:1px}.-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.25rem*var(--tw-space-x-reverse))}.-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.5rem*var(--tw-space-x-reverse))}.-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.75rem*var(--tw-space-x-reverse))}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1rem*var(--tw-space-x-reverse))}.-space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.25rem*var(--tw-space-x-reverse))}.-space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.5rem*var(--tw-space-x-reverse))}.-space-x-7>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.75rem*var(--tw-space-x-reverse))}.-space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-2rem*var(--tw-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgba(var(--gray-100),var(--tw-divide-opacity,1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgba(var(--gray-200),var(--tw-divide-opacity,1))}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-x-clip{overflow-x:clip}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-xl{border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-x-\[0\.5px\]{border-left-width:.5px;border-right-width:.5px}.border-y{border-bottom-width:1px;border-top-width:1px}.\!border-t-0{border-top-width:0!important}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-e{border-inline-end-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.\!border-none{border-style:none!important}.border-none{border-style:none}.border-gray-100{--tw-border-opacity:1;border-color:rgba(var(--gray-100),var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgba(var(--gray-200),var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgba(var(--gray-300),var(--tw-border-opacity,1))}.border-gray-600{--tw-border-opacity:1;border-color:rgba(var(--gray-600),var(--tw-border-opacity,1))}.border-primary-500{--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.border-primary-600{--tw-border-opacity:1;border-color:rgba(var(--primary-600),var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity:1;border-top-color:rgba(var(--gray-200),var(--tw-border-opacity,1))}.\!bg-gray-50{--tw-bg-opacity:1!important;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))!important}.\!bg-gray-700{--tw-bg-opacity:1!important;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))!important}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-custom-100{--tw-bg-opacity:1;background-color:rgba(var(--c-100),var(--tw-bg-opacity,1))}.bg-custom-50{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.bg-custom-600{--tw-bg-opacity:1;background-color:rgba(var(--c-600),var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(var(--gray-200),var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.bg-gray-950\/50{background-color:rgba(var(--gray-950),.5)}.bg-primary-500{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.bg-primary-600{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/0{background-color:hsla(0,0%,100%,0)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.\!bg-none{background-image:none!important}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pe-0{padding-inline-end:0}.pe-1{padding-inline-end:.25rem}.pe-2{padding-inline-end:.5rem}.pe-3{padding-inline-end:.75rem}.pe-4{padding-inline-end:1rem}.pe-6{padding-inline-end:1.5rem}.pe-8{padding-inline-end:2rem}.ps-0{padding-inline-start:0}.ps-1{padding-inline-start:.25rem}.ps-2{padding-inline-start:.5rem}.ps-3{padding-inline-start:.75rem}.ps-4{padding-inline-start:1rem}.ps-\[5\.25rem\]{padding-inline-start:5.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-extralight{font-weight:200}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-loose{line-height:2}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.text-custom-400{--tw-text-opacity:1;color:rgba(var(--c-400),var(--tw-text-opacity,1))}.text-custom-50{--tw-text-opacity:1;color:rgba(var(--c-50),var(--tw-text-opacity,1))}.text-custom-500{--tw-text-opacity:1;color:rgba(var(--c-500),var(--tw-text-opacity,1))}.text-custom-600{--tw-text-opacity:1;color:rgba(var(--c-600),var(--tw-text-opacity,1))}.text-custom-700\/50{color:rgba(var(--c-700),.5)}.text-danger-600{--tw-text-opacity:1;color:rgba(var(--danger-600),var(--tw-text-opacity,1))}.text-gray-100{--tw-text-opacity:1;color:rgba(var(--gray-100),var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgba(var(--gray-600),var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.text-gray-700\/50{color:rgba(var(--gray-700),.5)}.text-gray-950{--tw-text-opacity:1;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.text-primary-400{--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.text-primary-500{--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.text-primary-600{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-0{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-custom-600{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-600),var(--tw-ring-opacity,1))}.ring-custom-600\/10{--tw-ring-color:rgba(var(--c-600),0.1)}.ring-custom-600\/20{--tw-ring-color:rgba(var(--c-600),0.2)}.ring-danger-600{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-200),var(--tw-ring-opacity,1))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-300),var(--tw-ring-opacity,1))}.ring-gray-600\/10{--tw-ring-color:rgba(var(--gray-600),0.1)}.ring-gray-900\/10{--tw-ring-color:rgba(var(--gray-900),0.1)}.ring-gray-950\/10{--tw-ring-color:rgba(var(--gray-950),0.1)}.ring-gray-950\/5{--tw-ring-color:rgba(var(--gray-950),0.05)}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.delay-100{transition-delay:.1s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[transform\:translateZ\(0\)\]{transform:translateZ(0)}.dark\:prose-invert:is(.dark *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-y-0:before{bottom:0;content:var(--tw-content);top:0}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-0\.5:before{content:var(--tw-content);width:.125rem}.before\:bg-primary-600:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1));content:var(--tw-content)}.first\:border-s-0:first-child{border-inline-start-width:0}.first\:border-t-0:first-child{border-top-width:0}.last\:border-e-0:last-child{border-inline-end-width:0}.first-of-type\:ps-1:first-of-type{padding-inline-start:.25rem}.last-of-type\:pe-1:last-of-type{padding-inline-end:.25rem}.checked\:ring-0:checked{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:bg-gray-50:focus-within{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.hover\:bg-custom-400\/10:hover{background-color:rgba(var(--c-400),.1)}.hover\:bg-custom-50:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.hover\:bg-custom-500:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.hover\:bg-gray-400\/10:hover{background-color:rgba(var(--gray-400),.1)}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.hover\:text-custom-600:hover{--tw-text-opacity:1;color:rgba(var(--c-600),var(--tw-text-opacity,1))}.hover\:text-custom-700\/75:hover{color:rgba(var(--c-700),.75)}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.hover\:text-gray-700\/75:hover{color:rgba(var(--gray-700),.75)}.hover\:opacity-100:hover{opacity:1}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-danger-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.focus\:ring-primary-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.checked\:focus\:ring-danger-500\/50:focus:checked{--tw-ring-color:rgba(var(--danger-500),0.5)}.checked\:focus\:ring-primary-500\/50:focus:checked{--tw-ring-color:rgba(var(--primary-500),0.5)}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-primary-500:focus-visible{--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.focus-visible\:bg-custom-50:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.focus-visible\:bg-gray-100:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.focus-visible\:bg-gray-50:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.focus-visible\:text-custom-700\/75:focus-visible{color:rgba(var(--c-700),.75)}.focus-visible\:text-gray-500:focus-visible{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.focus-visible\:text-gray-700\/75:focus-visible{color:rgba(var(--gray-700),.75)}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.focus-visible\:ring-custom-500\/50:focus-visible{--tw-ring-color:rgba(var(--c-500),0.5)}.focus-visible\:ring-custom-600:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-600),var(--tw-ring-opacity,1))}.focus-visible\:ring-gray-400\/40:focus-visible{--tw-ring-color:rgba(var(--gray-400),0.4)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.focus-visible\:ring-primary-600:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.enabled\:cursor-wait:enabled{cursor:wait}.enabled\:opacity-70:enabled{opacity:.7}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:bg-gray-50:disabled{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.disabled\:text-gray-50:disabled{--tw-text-opacity:1;color:rgba(var(--gray-50),var(--tw-text-opacity,1))}.disabled\:text-gray-500:disabled{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.disabled\:opacity-70:disabled{opacity:.7}.disabled\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled{-webkit-text-fill-color:rgba(var(--gray-500),1)}.disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled::-moz-placeholder{-webkit-text-fill-color:rgba(var(--gray-400),1)}.disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled::placeholder{-webkit-text-fill-color:rgba(var(--gray-400),1)}.disabled\:checked\:bg-gray-400:checked:disabled{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.disabled\:checked\:text-gray-400:checked:disabled{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group\/item:first-child .group-first\/item\:rounded-s-lg{border-end-start-radius:.5rem;border-start-start-radius:.5rem}.group\/item:last-child .group-last\/item\:rounded-e-lg{border-end-end-radius:.5rem;border-start-end-radius:.5rem}.group:hover .group-hover\:text-gray-500,.group\/button:hover .group-hover\/button\:text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.group:hover .group-hover\:text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.group\/item:hover .group-hover\/item\:underline,.group\/link:hover .group-hover\/link\:underline{text-decoration-line:underline}.group:focus-visible .group-focus-visible\:text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.group:focus-visible .group-focus-visible\:text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.group\/item:focus-visible .group-focus-visible\/item\:underline{text-decoration-line:underline}.group\/link:focus-visible .group-focus-visible\/link\:underline{text-decoration-line:underline}.dark\:flex:is(.dark *){display:flex}.dark\:hidden:is(.dark *){display:none}.dark\:divide-white\/10:is(.dark *)>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.1)}.dark\:divide-white\/5:is(.dark *)>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.05)}.dark\:border-gray-600:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--gray-600),var(--tw-border-opacity,1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--gray-700),var(--tw-border-opacity,1))}.dark\:border-primary-500:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.dark\:border-white\/10:is(.dark *){border-color:hsla(0,0%,100%,.1)}.dark\:border-white\/5:is(.dark *){border-color:hsla(0,0%,100%,.05)}.dark\:border-t-white\/10:is(.dark *){border-top-color:hsla(0,0%,100%,.1)}.dark\:\!bg-gray-700:is(.dark *){--tw-bg-opacity:1!important;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))!important}.dark\:bg-custom-400\/10:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:bg-custom-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}.dark\:bg-custom-500\/20:is(.dark *){background-color:rgba(var(--c-500),.2)}.dark\:bg-gray-400\/10:is(.dark *){background-color:rgba(var(--gray-400),.1)}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}.dark\:bg-gray-500\/20:is(.dark *){background-color:rgba(var(--gray-500),.2)}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-800),var(--tw-bg-opacity,1))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.dark\:bg-gray-900\/30:is(.dark *){background-color:rgba(var(--gray-900),.3)}.dark\:bg-gray-950:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-950),var(--tw-bg-opacity,1))}.dark\:bg-gray-950\/75:is(.dark *){background-color:rgba(var(--gray-950),.75)}.dark\:bg-primary-400:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-400),var(--tw-bg-opacity,1))}.dark\:bg-primary-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-white\/10:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\:bg-white\/5:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:text-custom-300\/50:is(.dark *){color:rgba(var(--c-300),.5)}.dark\:text-custom-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--c-400),var(--tw-text-opacity,1))}.dark\:text-custom-400\/10:is(.dark *){color:rgba(var(--c-400),.1)}.dark\:text-danger-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--danger-400),var(--tw-text-opacity,1))}.dark\:text-danger-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--danger-500),var(--tw-text-opacity,1))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.dark\:text-gray-300\/50:is(.dark *){color:rgba(var(--gray-300),.5)}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:text-gray-700:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.dark\:text-gray-800:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-800),var(--tw-text-opacity,1))}.dark\:text-primary-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.dark\:text-primary-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\:text-white\/5:is(.dark *){color:hsla(0,0%,100%,.05)}.dark\:ring-custom-400\/30:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.3)}.dark\:ring-custom-500:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-500),var(--tw-ring-opacity,1))}.dark\:ring-danger-500:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:ring-gray-400\/20:is(.dark *){--tw-ring-color:rgba(var(--gray-400),0.2)}.dark\:ring-gray-50\/10:is(.dark *){--tw-ring-color:rgba(var(--gray-50),0.1)}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-700),var(--tw-ring-opacity,1))}.dark\:ring-gray-900:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-900),var(--tw-ring-opacity,1))}.dark\:ring-white\/10:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1)}.dark\:ring-white\/20:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:before\:bg-primary-500:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1));content:var(--tw-content)}.dark\:checked\:bg-danger-500:checked:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--danger-500),var(--tw-bg-opacity,1))}.dark\:checked\:bg-primary-500:checked:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.dark\:focus-within\:bg-white\/5:focus-within:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:hover\:bg-custom-400:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-400),var(--tw-bg-opacity,1))}.dark\:hover\:bg-custom-400\/10:hover:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:hover\:bg-white\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\:hover\:bg-white\/5:hover:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:hover\:text-custom-300:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--c-300),var(--tw-text-opacity,1))}.dark\:hover\:text-custom-300\/75:hover:is(.dark *){color:rgba(var(--c-300),.75)}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.dark\:hover\:text-gray-300\/75:hover:is(.dark *){color:rgba(var(--gray-300),.75)}.dark\:hover\:text-gray-400:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:hover\:ring-white\/20:hover:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)}.dark\:focus\:ring-danger-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:focus\:ring-primary-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.dark\:checked\:focus\:ring-danger-400\/50:focus:checked:is(.dark *){--tw-ring-color:rgba(var(--danger-400),0.5)}.dark\:checked\:focus\:ring-primary-400\/50:focus:checked:is(.dark *){--tw-ring-color:rgba(var(--primary-400),0.5)}.dark\:focus-visible\:border-primary-500:focus-visible:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.dark\:focus-visible\:bg-custom-400\/10:focus-visible:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:focus-visible\:bg-white\/5:focus-visible:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:focus-visible\:text-custom-300\/75:focus-visible:is(.dark *){color:rgba(var(--c-300),.75)}.dark\:focus-visible\:text-gray-300\/75:focus-visible:is(.dark *){color:rgba(var(--gray-300),.75)}.dark\:focus-visible\:text-gray-400:focus-visible:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:focus-visible\:ring-custom-400\/50:focus-visible:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.5)}.dark\:focus-visible\:ring-custom-500:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-500),var(--tw-ring-opacity,1))}.dark\:focus-visible\:ring-primary-500:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.dark\:disabled\:bg-transparent:disabled:is(.dark *){background-color:transparent}.dark\:disabled\:text-gray-400:disabled:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:disabled\:ring-white\/10:disabled:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1)}.dark\:disabled\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled:is(.dark *){-webkit-text-fill-color:rgba(var(--gray-400),1)}.dark\:disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled:is(.dark *)::-moz-placeholder{-webkit-text-fill-color:rgba(var(--gray-500),1)}.dark\:disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled:is(.dark *)::placeholder{-webkit-text-fill-color:rgba(var(--gray-500),1)}.dark\:disabled\:checked\:bg-gray-600:checked:disabled:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}.group\/button:hover .dark\:group-hover\/button\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group:hover .dark\:group-hover\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.group:hover .dark\:group-hover\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group:focus-visible .dark\:group-focus-visible\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.group:focus-visible .dark\:group-focus-visible\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:relative{position:relative}.sm\:inset-x-auto{left:auto;right:auto}.sm\:end-0{inset-inline-end:0}.sm\:col-\[--col-span-sm\]{grid-column:var(--col-span-sm)}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-start-\[--col-start-sm\]{grid-column-start:var(--col-start-sm)}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:-my-2{margin-bottom:-.5rem;margin-top:-.5rem}.sm\:ms-auto{margin-inline-start:auto}.sm\:mt-7{margin-top:1.75rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:table-cell{display:table-cell}.sm\:grid{display:grid}.sm\:inline-grid{display:inline-grid}.sm\:hidden{display:none}.sm\:w-\[calc\(100\%\+3rem\)\]{width:calc(100% + 3rem)}.sm\:w-screen{width:100vw}.sm\:max-w-sm{max-width:24rem}.sm\:columns-\[--cols-sm\]{-moz-columns:var(--cols-sm);columns:var(--cols-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[--cols-sm\]{grid-template-columns:var(--cols-sm)}.sm\:grid-cols-\[repeat\(auto-fit\2c minmax\(0\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}.sm\:grid-rows-\[1fr_auto_3fr\]{grid-template-rows:1fr auto 3fr}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-1{gap:.25rem}.sm\:gap-3{gap:.75rem}.sm\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.sm\:rounded-xl{border-radius:.75rem}.sm\:p-10{padding:2.5rem}.sm\:px-12{padding-left:3rem;padding-right:3rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.sm\:pe-3{padding-inline-end:.75rem}.sm\:pe-6{padding-inline-end:1.5rem}.sm\:ps-3{padding-inline-start:.75rem}.sm\:ps-6{padding-inline-start:1.5rem}.sm\:pt-1\.5{padding-top:.375rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}.sm\:first-of-type\:ps-3:first-of-type{padding-inline-start:.75rem}.sm\:first-of-type\:ps-6:first-of-type{padding-inline-start:1.5rem}.sm\:last-of-type\:pe-3:last-of-type{padding-inline-end:.75rem}.sm\:last-of-type\:pe-6:last-of-type{padding-inline-end:1.5rem}}@media (min-width:768px){.md\:bottom-4{bottom:1rem}.md\:order-first{order:-9999}.md\:col-\[--col-span-md\]{grid-column:var(--col-span-md)}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-start-\[--col-start-md\]{grid-column-start:var(--col-start-md)}.md\:block{display:block}.md\:flex{display:flex}.md\:table-cell{display:table-cell}.md\:inline-grid{display:inline-grid}.md\:hidden{display:none}.md\:w-max{width:-moz-max-content;width:max-content}.md\:max-w-60{max-width:15rem}.md\:columns-\[--cols-md\]{-moz-columns:var(--cols-md);columns:var(--cols-md)}.md\:grid-flow-col{grid-auto-flow:column}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[--cols-md\]{grid-template-columns:var(--cols-md)}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:justify-end{justify-content:flex-end}.md\:gap-1{gap:.25rem}.md\:gap-3{gap:.75rem}.md\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(0px*var(--tw-divide-y-reverse));border-top-width:calc(0px*(1 - var(--tw-divide-y-reverse)))}.md\:overflow-x-auto{overflow-x:auto}.md\:rounded-xl{border-radius:.75rem}.md\:p-20{padding:5rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:pe-6{padding-inline-end:1.5rem}.md\:ps-3{padding-inline-start:.75rem}}@media (min-width:1024px){.lg\:sticky{position:sticky}.lg\:z-0{z-index:0}.lg\:col-\[--col-span-lg\]{grid-column:var(--col-span-lg)}.lg\:col-start-\[--col-start-lg\]{grid-column-start:var(--col-start-lg)}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:table-cell{display:table-cell}.lg\:inline-grid{display:inline-grid}.lg\:hidden{display:none}.lg\:h-full{height:100%}.lg\:max-w-xs{max-width:20rem}.lg\:-translate-x-full{--tw-translate-x:-100%}.lg\:-translate-x-full,.lg\:translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:translate-x-0{--tw-translate-x:0px}.lg\:columns-\[--cols-lg\]{-moz-columns:var(--cols-lg);columns:var(--cols-lg)}.lg\:grid-cols-\[--cols-lg\]{grid-template-columns:var(--cols-lg)}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:items-center{align-items:center}.lg\:gap-1{gap:.25rem}.lg\:gap-3{gap:.75rem}.lg\:bg-transparent{background-color:transparent}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pe-8{padding-inline-end:2rem}.lg\:shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.lg\:shadow-none,.lg\:shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.lg\:shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.lg\:ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.lg\:transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.lg\:transition-none{transition-property:none}.lg\:delay-100{transition-delay:.1s}.dark\:lg\:bg-transparent:is(.dark *){background-color:transparent}}@media (min-width:1280px){.xl\:col-\[--col-span-xl\]{grid-column:var(--col-span-xl)}.xl\:col-start-\[--col-start-xl\]{grid-column-start:var(--col-start-xl)}.xl\:block{display:block}.xl\:table-cell{display:table-cell}.xl\:inline-grid{display:inline-grid}.xl\:hidden{display:none}.xl\:columns-\[--cols-xl\]{-moz-columns:var(--cols-xl);columns:var(--cols-xl)}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-\[--cols-xl\]{grid-template-columns:var(--cols-xl)}.xl\:flex-row{flex-direction:row}.xl\:items-start{align-items:flex-start}.xl\:items-end{align-items:flex-end}.xl\:items-center{align-items:center}.xl\:gap-1{gap:.25rem}.xl\:gap-3{gap:.75rem}}@media (min-width:1536px){.\32xl\:col-\[--col-span-2xl\]{grid-column:var(--col-span-2xl)}.\32xl\:col-start-\[--col-start-2xl\]{grid-column-start:var(--col-start-2xl)}.\32xl\:block{display:block}.\32xl\:table-cell{display:table-cell}.\32xl\:inline-grid{display:inline-grid}.\32xl\:hidden{display:none}.\32xl\:columns-\[--cols-2xl\]{-moz-columns:var(--cols-2xl);columns:var(--cols-2xl)}.\32xl\:grid-cols-\[--cols-2xl\]{grid-template-columns:var(--cols-2xl)}.\32xl\:flex-row{flex-direction:row}.\32xl\:items-start{align-items:flex-start}.\32xl\:items-end{align-items:flex-end}.\32xl\:items-center{align-items:center}.\32xl\:gap-1{gap:.25rem}.\32xl\:gap-3{gap:.75rem}}.ltr\:hidden:where([dir=ltr],[dir=ltr] *){display:none}.rtl\:hidden:where([dir=rtl],[dir=rtl] *){display:none}.rtl\:-translate-x-0:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:-translate-x-5:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:-translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-1\/2:where([dir=rtl],[dir=rtl] *){--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-1\/4:where([dir=rtl],[dir=rtl] *){--tw-translate-x:25%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:flex-row-reverse:where([dir=rtl],[dir=rtl] *){flex-direction:row-reverse}.rtl\:divide-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}@media (min-width:1024px){.rtl\:lg\:-translate-x-0:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:lg\:translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}.\[\&\.trix-active\]\:bg-gray-50.trix-active{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.\[\&\.trix-active\]\:text-primary-600.trix-active{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1))}.dark\:\[\&\.trix-active\]\:bg-white\/5.trix-active:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:\[\&\.trix-active\]\:text-primary-400.trix-active:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.\[\&\:\:-ms-reveal\]\:hidden::-ms-reveal{display:none}.\[\&\:not\(\:first-of-type\)\]\:border-s:not(:first-of-type){border-inline-start-width:1px}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-2:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-danger-600:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-primary-600:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.dark\:\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-danger-500:focus-within:not(:has(.fi-ac-action:focus)):is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-primary-500:focus-within:not(:has(.fi-ac-action:focus)):is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.\[\&\:not\(\:last-of-type\)\]\:border-e:not(:last-of-type){border-inline-end-width:1px}.\[\&\:not\(\:nth-child\(1_of_\.fi-btn\)\)\]\:shadow-\[-1px_0_0_0_theme\(colors\.gray\.200\)\]:not(:nth-child(1 of .fi-btn)){--tw-shadow:-1px 0 0 0 rgba(var(--gray-200),1);--tw-shadow-colored:-1px 0 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:\[\&\:not\(\:nth-child\(1_of_\.fi-btn\)\)\]\:shadow-\[-1px_0_0_0_theme\(colors\.white\/20\%\)\]:not(:nth-child(1 of .fi-btn)):is(.dark *){--tw-shadow:-1px 0 0 0 hsla(0,0%,100%,.2);--tw-shadow-colored:-1px 0 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\[\&\:not\(\:nth-last-child\(1_of_\.fi-btn\)\)\]\:me-px:not(:nth-last-child(1 of .fi-btn)){margin-inline-end:1px}.\[\&\:nth-child\(1_of_\.fi-btn\)\]\:rounded-s-lg:nth-child(1 of .fi-btn){border-end-start-radius:.5rem;border-start-start-radius:.5rem}.\[\&\:nth-last-child\(1_of_\.fi-btn\)\]\:rounded-e-lg:nth-last-child(1 of .fi-btn){border-end-end-radius:.5rem;border-start-end-radius:.5rem}.\[\&\>\*\:first-child\]\:relative>:first-child{position:relative}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&\>\*\:first-child\]\:before\:absolute>:first-child:before{content:var(--tw-content);position:absolute}.\[\&\>\*\:first-child\]\:before\:inset-y-0>:first-child:before{bottom:0;content:var(--tw-content);top:0}.\[\&\>\*\:first-child\]\:before\:start-0>:first-child:before{content:var(--tw-content);inset-inline-start:0}.\[\&\>\*\:first-child\]\:before\:w-0\.5>:first-child:before{content:var(--tw-content);width:.125rem}.\[\&\>\*\:first-child\]\:before\:bg-primary-600>:first-child:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1));content:var(--tw-content)}.\[\&\>\*\:first-child\]\:dark\:before\:bg-primary-500:is(.dark *)>:first-child:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1));content:var(--tw-content)}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\.choices\\_\\_inner\]\:ps-0 .choices__inner{padding-inline-start:0}.\[\&_\.fi-badge-delete-button\]\:hidden .fi-badge-delete-button{display:none}.\[\&_\.filepond--root\]\:font-sans .filepond--root{font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.\[\&_optgroup\]\:bg-white optgroup{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_optgroup\]\:dark\:bg-gray-900:is(.dark *) optgroup{--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.\[\&_option\]\:bg-white option{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_option\]\:dark\:bg-gray-900:is(.dark *) option{--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}:checked+*>.\[\:checked\+\*\>\&\]\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}@media(hover:hover){.\[\@media\(hover\:hover\)\]\:transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[\@media\(hover\:hover\)\]\:duration-75{transition-duration:75ms}}input:checked+.\[input\:checked\+\&\]\:bg-custom-600{--tw-bg-opacity:1;background-color:rgba(var(--c-600),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:bg-gray-400{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}input:checked+.\[input\:checked\+\&\]\:ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}input:checked+.\[input\:checked\+\&\]\:hover\:bg-custom-500:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:bg-custom-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:bg-gray-600:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:hover\:bg-custom-400:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-400),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:hover\:bg-gray-500:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}input:checked:focus-visible+.\[input\:checked\:focus-visible\+\&\]\:ring-custom-500\/50{--tw-ring-color:rgba(var(--c-500),0.5)}input:checked:focus-visible+.dark\:\[input\:checked\:focus-visible\+\&\]\:ring-custom-400\/50:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.5)}input:focus-visible+.\[input\:focus-visible\+\&\]\:z-10{z-index:10}input:focus-visible+.\[input\:focus-visible\+\&\]\:ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}input:focus-visible+.\[input\:focus-visible\+\&\]\:ring-gray-950\/10{--tw-ring-color:rgba(var(--gray-950),0.1)}input:focus-visible+.dark\:\[input\:focus-visible\+\&\]\:ring-white\/20:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)} \ No newline at end of file +*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border-color:rgba(var(--gray-200),1);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:rgba(var(--gray-400),1);opacity:1}input::placeholder,textarea::placeholder{color:rgba(var(--gray-400),1);opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:rgba(var(--gray-500),var(--tw-border-opacity,1));border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:rgba(var(--gray-500),var(--tw-text-opacity,1));opacity:1}input::placeholder,textarea::placeholder{color:rgba(var(--gray-500),var(--tw-text-opacity,1));opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:rgba(var(--gray-500),var(--tw-border-opacity,1));border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}:root.dark{color-scheme:dark}[data-field-wrapper]{scroll-margin-top:8rem}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-bottom:3em;margin-top:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){border-inline-start-color:var(--tw-prose-quote-borders);border-inline-start-width:.25rem;color:var(--tw-prose-quotes);font-style:italic;font-weight:500;margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em;quotes:"\201C""\201D""\2018""\2019"}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:2.25em;font-weight:800;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.5em;font-weight:700;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.25em;font-weight:600;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-bottom:2em;margin-top:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);color:var(--tw-prose-kbd);font-family:inherit;font-size:.875em;font-weight:500;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:var(--tw-prose-pre-bg);border-radius:.375rem;color:var(--tw-prose-pre-code);font-size:.875em;font-weight:400;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;overflow-x:auto;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.7142857;margin-bottom:2em;margin-top:2em;table-layout:auto;width:100%}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-color:var(--tw-prose-th-borders);border-bottom-width:1px}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em;vertical-align:bottom}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-color:var(--tw-prose-td-borders);border-bottom-width:1px}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-color:var(--tw-prose-th-borders);border-top-width:1px}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5em;margin-top:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-bottom:.8888889em;margin-top:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;line-height:1.2;margin-bottom:.8em;margin-top:0}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;line-height:1.4;margin-bottom:.8em;margin-top:1.6em}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-bottom:.4444444em;margin-top:1.5555556em}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.4285714;margin-bottom:.5714286em;margin-top:1.4285714em}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.8571429em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-top:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.25rem;font-size:.8571429em;line-height:1.6666667;margin-bottom:1.6666667em;margin-top:1.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-top:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.2857143em;margin-top:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5714286em;margin-top:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5714286em;margin-top:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2.8571429em;margin-top:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-top:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-base{font-size:1rem;line-height:1.75}.prose-base :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose-base :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose-base :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em}.prose-base :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.25em;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose-base :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.5em;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose-base :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.25em;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose-base :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose-base :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-base :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose-base :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-base :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-base :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-base :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.375rem;font-size:.875em;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose-base :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose-base :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose-base :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5em;margin-top:.5em}.prose-base :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose-base :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose-base :where(.prose-base>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose-base :where(.prose-base>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(.prose-base>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose-base :where(.prose-base>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(.prose-base>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose-base :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose-base :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose-base :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose-base :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:3em;margin-top:3em}.prose-base :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.7142857}.prose-base :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose-base :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-base :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-base :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose-base :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-base :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-base :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-base :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose-base :where(.prose-base>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(.prose-base>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-lg{font-size:1.125rem;line-height:1.7777778}.prose-lg :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em}.prose-lg :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2222222em;line-height:1.4545455;margin-bottom:1.0909091em;margin-top:1.0909091em}.prose-lg :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.6666667em;margin-top:1.6666667em;padding-inline-start:1em}.prose-lg :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.6666667em;line-height:1;margin-bottom:.8333333em;margin-top:0}.prose-lg :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.6666667em;line-height:1.3333333;margin-bottom:1.0666667em;margin-top:1.8666667em}.prose-lg :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.3333333em;line-height:1.5;margin-bottom:.6666667em;margin-top:1.6666667em}.prose-lg :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.5555556;margin-bottom:.4444444em;margin-top:1.7777778em}.prose-lg :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-lg :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.8888889em;padding-inline-end:.4444444em;padding-bottom:.2222222em;padding-top:.2222222em;padding-inline-start:.4444444em}.prose-lg :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-lg :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8666667em}.prose-lg :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-lg :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.375rem;font-size:.8888889em;line-height:1.75;margin-bottom:2em;margin-top:2em;padding-inline-end:1.5em;padding-bottom:1em;padding-top:1em;padding-inline-start:1.5em}.prose-lg :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.5555556em}.prose-lg :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.5555556em}.prose-lg :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.6666667em;margin-top:.6666667em}.prose-lg :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4444444em}.prose-lg :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4444444em}.prose-lg :where(.prose-lg>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.8888889em;margin-top:.8888889em}.prose-lg :where(.prose-lg>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(.prose-lg>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em}.prose-lg :where(.prose-lg>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(.prose-lg>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em}.prose-lg :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.8888889em;margin-top:.8888889em}.prose-lg :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em}.prose-lg :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.6666667em;padding-inline-start:1.5555556em}.prose-lg :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:3.1111111em;margin-top:3.1111111em}.prose-lg :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em;line-height:1.5}.prose-lg :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.75em;padding-bottom:.75em;padding-inline-start:.75em}.prose-lg :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-lg :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-lg :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.75em;padding-bottom:.75em;padding-top:.75em;padding-inline-start:.75em}.prose-lg :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-lg :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-lg :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-lg :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em;line-height:1.5;margin-top:1em}.prose-lg :where(.prose-lg>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(.prose-lg>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-4{inset:1rem}.inset-x-0{left:0;right:0}.inset-x-4{left:1rem;right:1rem}.inset-y-0{bottom:0;top:0}.-bottom-1\/2{bottom:-50%}.-top-1{top:-.25rem}.-top-1\/2{top:-50%}.-top-2{top:-.5rem}.-top-3{top:-.75rem}.bottom-0{bottom:0}.bottom-1\/2{bottom:50%}.end-0{inset-inline-end:0}.end-4{inset-inline-end:1rem}.end-6{inset-inline-end:1.5rem}.left-3{left:.75rem}.start-0{inset-inline-start:0}.start-full{inset-inline-start:100%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.top-6{top:1.5rem}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[1\]{z-index:1}.order-first{order:-9999}.col-\[--col-span-default\]{grid-column:var(--col-span-default)}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.col-start-3{grid-column-start:3}.col-start-\[--col-start-default\]{grid-column-start:var(--col-start-default)}.row-start-2{grid-row-start:2}.-m-0\.5{margin:-.125rem}.-m-1{margin:-.25rem}.-m-1\.5{margin:-.375rem}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.-m-3{margin:-.75rem}.-m-3\.5{margin:-.875rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-1{margin-bottom:-.25rem;margin-top:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.my-16{margin-bottom:4rem;margin-top:4rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-auto{margin-bottom:auto;margin-top:auto}.\!mt-0{margin-top:0!important}.-mb-4{margin-bottom:-1rem}.-mb-6{margin-bottom:-1.5rem}.-me-2{margin-inline-end:-.5rem}.-ms-0\.5{margin-inline-start:-.125rem}.-ms-1{margin-inline-start:-.25rem}.-ms-2{margin-inline-start:-.5rem}.-mt-3{margin-top:-.75rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.-mt-7{margin-top:-1.75rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.me-1{margin-inline-end:.25rem}.me-3{margin-inline-end:.75rem}.me-4{margin-inline-end:1rem}.me-6{margin-inline-end:1.5rem}.ml-auto{margin-left:auto}.ms-1{margin-inline-start:.25rem}.ms-6{margin-inline-start:1.5rem}.ms-auto{margin-inline-start:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-\[--line-clamp\]{-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp);display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.hidden{display:none}.h-0{height:0}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-16{height:4rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[100dvh\],.h-dvh{height:100dvh}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.min-h-\[theme\(spacing\.48\)\]{min-height:12rem}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[--sidebar-width\]{width:var(--sidebar-width)}.w-\[calc\(100\%\+2rem\)\]{width:calc(100% + 2rem)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-48{min-width:12rem}.min-w-\[theme\(spacing\.4\)\]{min-width:1rem}.min-w-\[theme\(spacing\.5\)\]{min-width:1.25rem}.min-w-\[theme\(spacing\.6\)\]{min-width:1.5rem}.min-w-\[theme\(spacing\.8\)\]{min-width:2rem}.\!max-w-2xl{max-width:42rem!important}.\!max-w-3xl{max-width:48rem!important}.\!max-w-4xl{max-width:56rem!important}.\!max-w-5xl{max-width:64rem!important}.\!max-w-6xl{max-width:72rem!important}.\!max-w-7xl{max-width:80rem!important}.\!max-w-\[14rem\]{max-width:14rem!important}.\!max-w-lg{max-width:32rem!important}.\!max-w-md{max-width:28rem!important}.\!max-w-sm{max-width:24rem!important}.\!max-w-xl{max-width:36rem!important}.\!max-w-xs{max-width:20rem!important}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-md{max-width:28rem}.max-w-min{max-width:-moz-min-content;max-width:min-content}.max-w-none{max-width:none}.max-w-prose{max-width:65ch}.max-w-screen-2xl{max-width:1536px}.max-w-screen-lg{max-width:1024px}.max-w-screen-md{max-width:768px}.max-w-screen-sm{max-width:640px}.max-w-screen-xl{max-width:1280px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-x-1\/4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\/4{--tw-translate-x:-25%}.-translate-x-12{--tw-translate-x:-3rem}.-translate-x-12,.-translate-x-5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-5{--tw-translate-x:-1.25rem}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-12{--tw-translate-y:-3rem}.-translate-y-12,.-translate-y-3\/4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-3\/4{--tw-translate-y:-75%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x:3rem}.translate-x-5{--tw-translate-x:1.25rem}.translate-x-5,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-12{--tw-translate-y:3rem}.-rotate-180,.translate-y-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate:-180deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.resize{resize:both}.scroll-mt-9{scroll-margin-top:2.25rem}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.columns-\[--cols-default\]{-moz-columns:var(--cols-default);columns:var(--cols-default)}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[--cols-default\]{grid-template-columns:var(--cols-default)}.grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr}.grid-cols-\[repeat\(7\2c minmax\(theme\(spacing\.7\)\2c 1fr\)\)\]{grid-template-columns:repeat(7,minmax(1.75rem,1fr))}.grid-cols-\[repeat\(auto-fit\2c minmax\(0\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}.grid-rows-\[1fr_auto_1fr\]{grid-template-rows:1fr auto 1fr}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-start{justify-items:start}.justify-items-center{justify-items:center}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-2\.5{-moz-column-gap:.625rem;column-gap:.625rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-1\.5{row-gap:.375rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-7{row-gap:1.75rem}.gap-y-8{row-gap:2rem}.gap-y-px{row-gap:1px}.-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.25rem*var(--tw-space-x-reverse))}.-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.5rem*var(--tw-space-x-reverse))}.-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.75rem*var(--tw-space-x-reverse))}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1rem*var(--tw-space-x-reverse))}.-space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.25rem*var(--tw-space-x-reverse))}.-space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.5rem*var(--tw-space-x-reverse))}.-space-x-7>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.75rem*var(--tw-space-x-reverse))}.-space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-2rem*var(--tw-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgba(var(--gray-100),var(--tw-divide-opacity,1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgba(var(--gray-200),var(--tw-divide-opacity,1))}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-x-clip{overflow-x:clip}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-xl{border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-x-\[0\.5px\]{border-left-width:.5px;border-right-width:.5px}.border-y{border-bottom-width:1px;border-top-width:1px}.\!border-t-0{border-top-width:0!important}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-e{border-inline-end-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.\!border-none{border-style:none!important}.border-none{border-style:none}.border-gray-100{--tw-border-opacity:1;border-color:rgba(var(--gray-100),var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgba(var(--gray-200),var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgba(var(--gray-300),var(--tw-border-opacity,1))}.border-gray-600{--tw-border-opacity:1;border-color:rgba(var(--gray-600),var(--tw-border-opacity,1))}.border-primary-500{--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.border-primary-600{--tw-border-opacity:1;border-color:rgba(var(--primary-600),var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity:1;border-top-color:rgba(var(--gray-200),var(--tw-border-opacity,1))}.\!bg-gray-50{--tw-bg-opacity:1!important;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))!important}.\!bg-gray-700{--tw-bg-opacity:1!important;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))!important}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-custom-100{--tw-bg-opacity:1;background-color:rgba(var(--c-100),var(--tw-bg-opacity,1))}.bg-custom-50{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.bg-custom-600{--tw-bg-opacity:1;background-color:rgba(var(--c-600),var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(var(--gray-200),var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.bg-gray-950\/50{background-color:rgba(var(--gray-950),.5)}.bg-primary-500{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.bg-primary-600{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/0{background-color:hsla(0,0%,100%,0)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.\!bg-none{background-image:none!important}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pe-0{padding-inline-end:0}.pe-1{padding-inline-end:.25rem}.pe-2{padding-inline-end:.5rem}.pe-3{padding-inline-end:.75rem}.pe-4{padding-inline-end:1rem}.pe-6{padding-inline-end:1.5rem}.pe-8{padding-inline-end:2rem}.ps-0{padding-inline-start:0}.ps-1{padding-inline-start:.25rem}.ps-2{padding-inline-start:.5rem}.ps-3{padding-inline-start:.75rem}.ps-4{padding-inline-start:1rem}.ps-\[5\.25rem\]{padding-inline-start:5.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-extralight{font-weight:200}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-loose{line-height:2}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.text-custom-400{--tw-text-opacity:1;color:rgba(var(--c-400),var(--tw-text-opacity,1))}.text-custom-50{--tw-text-opacity:1;color:rgba(var(--c-50),var(--tw-text-opacity,1))}.text-custom-500{--tw-text-opacity:1;color:rgba(var(--c-500),var(--tw-text-opacity,1))}.text-custom-600{--tw-text-opacity:1;color:rgba(var(--c-600),var(--tw-text-opacity,1))}.text-custom-700\/50{color:rgba(var(--c-700),.5)}.text-danger-600{--tw-text-opacity:1;color:rgba(var(--danger-600),var(--tw-text-opacity,1))}.text-gray-100{--tw-text-opacity:1;color:rgba(var(--gray-100),var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgba(var(--gray-600),var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.text-gray-700\/50{color:rgba(var(--gray-700),.5)}.text-gray-950{--tw-text-opacity:1;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.text-primary-400{--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.text-primary-500{--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.text-primary-600{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-0{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-custom-600{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-600),var(--tw-ring-opacity,1))}.ring-custom-600\/10{--tw-ring-color:rgba(var(--c-600),0.1)}.ring-custom-600\/20{--tw-ring-color:rgba(var(--c-600),0.2)}.ring-danger-600{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-200),var(--tw-ring-opacity,1))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-300),var(--tw-ring-opacity,1))}.ring-gray-600\/10{--tw-ring-color:rgba(var(--gray-600),0.1)}.ring-gray-900\/10{--tw-ring-color:rgba(var(--gray-900),0.1)}.ring-gray-950\/10{--tw-ring-color:rgba(var(--gray-950),0.1)}.ring-gray-950\/5{--tw-ring-color:rgba(var(--gray-950),0.05)}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.delay-100{transition-delay:.1s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[transform\:translateZ\(0\)\]{transform:translateZ(0)}.dark\:prose-invert:is(.dark *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-y-0:before{bottom:0;content:var(--tw-content);top:0}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-0\.5:before{content:var(--tw-content);width:.125rem}.before\:bg-primary-600:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1));content:var(--tw-content)}.first\:border-s-0:first-child{border-inline-start-width:0}.first\:border-t-0:first-child{border-top-width:0}.last\:border-e-0:last-child{border-inline-end-width:0}.first-of-type\:ps-1:first-of-type{padding-inline-start:.25rem}.last-of-type\:pe-1:last-of-type{padding-inline-end:.25rem}.checked\:ring-0:checked{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:bg-gray-50:focus-within{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.hover\:bg-custom-400\/10:hover{background-color:rgba(var(--c-400),.1)}.hover\:bg-custom-50:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.hover\:bg-custom-500:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.hover\:bg-gray-400\/10:hover{background-color:rgba(var(--gray-400),.1)}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.hover\:text-custom-600:hover{--tw-text-opacity:1;color:rgba(var(--c-600),var(--tw-text-opacity,1))}.hover\:text-custom-700\/75:hover{color:rgba(var(--c-700),.75)}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.hover\:text-gray-700\/75:hover{color:rgba(var(--gray-700),.75)}.hover\:opacity-100:hover{opacity:1}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-danger-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.focus\:ring-primary-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.checked\:focus\:ring-danger-500\/50:focus:checked{--tw-ring-color:rgba(var(--danger-500),0.5)}.checked\:focus\:ring-primary-500\/50:focus:checked{--tw-ring-color:rgba(var(--primary-500),0.5)}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-primary-500:focus-visible{--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.focus-visible\:bg-custom-50:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.focus-visible\:bg-gray-100:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.focus-visible\:bg-gray-50:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.focus-visible\:text-custom-700\/75:focus-visible{color:rgba(var(--c-700),.75)}.focus-visible\:text-gray-500:focus-visible{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.focus-visible\:text-gray-700\/75:focus-visible{color:rgba(var(--gray-700),.75)}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.focus-visible\:ring-custom-500\/50:focus-visible{--tw-ring-color:rgba(var(--c-500),0.5)}.focus-visible\:ring-custom-600:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-600),var(--tw-ring-opacity,1))}.focus-visible\:ring-gray-400\/40:focus-visible{--tw-ring-color:rgba(var(--gray-400),0.4)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.focus-visible\:ring-primary-600:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px}.enabled\:cursor-wait:enabled{cursor:wait}.enabled\:opacity-70:enabled{opacity:.7}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:bg-gray-50:disabled{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.disabled\:text-gray-50:disabled{--tw-text-opacity:1;color:rgba(var(--gray-50),var(--tw-text-opacity,1))}.disabled\:text-gray-500:disabled{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.disabled\:opacity-70:disabled{opacity:.7}.disabled\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled{-webkit-text-fill-color:rgba(var(--gray-500),1)}.disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled::-moz-placeholder{-webkit-text-fill-color:rgba(var(--gray-400),1)}.disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled::placeholder{-webkit-text-fill-color:rgba(var(--gray-400),1)}.disabled\:checked\:bg-gray-400:checked:disabled{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.disabled\:checked\:text-gray-400:checked:disabled{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group\/item:first-child .group-first\/item\:rounded-s-lg{border-end-start-radius:.5rem;border-start-start-radius:.5rem}.group\/item:last-child .group-last\/item\:rounded-e-lg{border-end-end-radius:.5rem;border-start-end-radius:.5rem}.group:hover .group-hover\:text-gray-500,.group\/button:hover .group-hover\/button\:text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.group:hover .group-hover\:text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.group\/item:hover .group-hover\/item\:underline,.group\/link:hover .group-hover\/link\:underline{text-decoration-line:underline}.group:focus-visible .group-focus-visible\:text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.group:focus-visible .group-focus-visible\:text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.group\/item:focus-visible .group-focus-visible\/item\:underline{text-decoration-line:underline}.group\/link:focus-visible .group-focus-visible\/link\:underline{text-decoration-line:underline}.dark\:flex:is(.dark *){display:flex}.dark\:hidden:is(.dark *){display:none}.dark\:divide-white\/10:is(.dark *)>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.1)}.dark\:divide-white\/5:is(.dark *)>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.05)}.dark\:border-gray-600:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--gray-600),var(--tw-border-opacity,1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--gray-700),var(--tw-border-opacity,1))}.dark\:border-primary-500:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.dark\:border-white\/10:is(.dark *){border-color:hsla(0,0%,100%,.1)}.dark\:border-white\/5:is(.dark *){border-color:hsla(0,0%,100%,.05)}.dark\:border-t-white\/10:is(.dark *){border-top-color:hsla(0,0%,100%,.1)}.dark\:\!bg-gray-700:is(.dark *){--tw-bg-opacity:1!important;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))!important}.dark\:bg-custom-400\/10:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:bg-custom-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}.dark\:bg-custom-500\/20:is(.dark *){background-color:rgba(var(--c-500),.2)}.dark\:bg-gray-400\/10:is(.dark *){background-color:rgba(var(--gray-400),.1)}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}.dark\:bg-gray-500\/20:is(.dark *){background-color:rgba(var(--gray-500),.2)}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-800),var(--tw-bg-opacity,1))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.dark\:bg-gray-900\/30:is(.dark *){background-color:rgba(var(--gray-900),.3)}.dark\:bg-gray-950:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-950),var(--tw-bg-opacity,1))}.dark\:bg-gray-950\/75:is(.dark *){background-color:rgba(var(--gray-950),.75)}.dark\:bg-primary-400:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-400),var(--tw-bg-opacity,1))}.dark\:bg-primary-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-white\/10:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\:bg-white\/5:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:text-custom-300\/50:is(.dark *){color:rgba(var(--c-300),.5)}.dark\:text-custom-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--c-400),var(--tw-text-opacity,1))}.dark\:text-custom-400\/10:is(.dark *){color:rgba(var(--c-400),.1)}.dark\:text-danger-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--danger-400),var(--tw-text-opacity,1))}.dark\:text-danger-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--danger-500),var(--tw-text-opacity,1))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.dark\:text-gray-300\/50:is(.dark *){color:rgba(var(--gray-300),.5)}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:text-gray-700:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.dark\:text-gray-800:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-800),var(--tw-text-opacity,1))}.dark\:text-primary-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.dark\:text-primary-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\:text-white\/5:is(.dark *){color:hsla(0,0%,100%,.05)}.dark\:ring-custom-400\/30:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.3)}.dark\:ring-custom-500:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-500),var(--tw-ring-opacity,1))}.dark\:ring-danger-500:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:ring-gray-400\/20:is(.dark *){--tw-ring-color:rgba(var(--gray-400),0.2)}.dark\:ring-gray-50\/10:is(.dark *){--tw-ring-color:rgba(var(--gray-50),0.1)}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-700),var(--tw-ring-opacity,1))}.dark\:ring-gray-900:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-900),var(--tw-ring-opacity,1))}.dark\:ring-white\/10:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1)}.dark\:ring-white\/20:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:before\:bg-primary-500:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1));content:var(--tw-content)}.dark\:checked\:bg-danger-500:checked:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--danger-500),var(--tw-bg-opacity,1))}.dark\:checked\:bg-primary-500:checked:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.dark\:focus-within\:bg-white\/5:focus-within:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:hover\:bg-custom-400:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-400),var(--tw-bg-opacity,1))}.dark\:hover\:bg-custom-400\/10:hover:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:hover\:bg-white\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\:hover\:bg-white\/5:hover:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:hover\:text-custom-300:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--c-300),var(--tw-text-opacity,1))}.dark\:hover\:text-custom-300\/75:hover:is(.dark *){color:rgba(var(--c-300),.75)}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.dark\:hover\:text-gray-300\/75:hover:is(.dark *){color:rgba(var(--gray-300),.75)}.dark\:hover\:text-gray-400:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:hover\:ring-white\/20:hover:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)}.dark\:focus\:ring-danger-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:focus\:ring-primary-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.dark\:checked\:focus\:ring-danger-400\/50:focus:checked:is(.dark *){--tw-ring-color:rgba(var(--danger-400),0.5)}.dark\:checked\:focus\:ring-primary-400\/50:focus:checked:is(.dark *){--tw-ring-color:rgba(var(--primary-400),0.5)}.dark\:focus-visible\:border-primary-500:focus-visible:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.dark\:focus-visible\:bg-custom-400\/10:focus-visible:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:focus-visible\:bg-white\/5:focus-visible:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:focus-visible\:text-custom-300\/75:focus-visible:is(.dark *){color:rgba(var(--c-300),.75)}.dark\:focus-visible\:text-gray-300\/75:focus-visible:is(.dark *){color:rgba(var(--gray-300),.75)}.dark\:focus-visible\:text-gray-400:focus-visible:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:focus-visible\:ring-custom-400\/50:focus-visible:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.5)}.dark\:focus-visible\:ring-custom-500:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-500),var(--tw-ring-opacity,1))}.dark\:focus-visible\:ring-primary-500:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.dark\:focus-visible\:ring-offset-gray-900:focus-visible:is(.dark *){--tw-ring-offset-color:rgba(var(--gray-900),1)}.dark\:disabled\:bg-transparent:disabled:is(.dark *){background-color:transparent}.dark\:disabled\:text-gray-400:disabled:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:disabled\:ring-white\/10:disabled:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1)}.dark\:disabled\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled:is(.dark *){-webkit-text-fill-color:rgba(var(--gray-400),1)}.dark\:disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled:is(.dark *)::-moz-placeholder{-webkit-text-fill-color:rgba(var(--gray-500),1)}.dark\:disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled:is(.dark *)::placeholder{-webkit-text-fill-color:rgba(var(--gray-500),1)}.dark\:disabled\:checked\:bg-gray-600:checked:disabled:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}.group\/button:hover .dark\:group-hover\/button\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group:hover .dark\:group-hover\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.group:hover .dark\:group-hover\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group:focus-visible .dark\:group-focus-visible\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.group:focus-visible .dark\:group-focus-visible\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:relative{position:relative}.sm\:inset-x-auto{left:auto;right:auto}.sm\:end-0{inset-inline-end:0}.sm\:col-\[--col-span-sm\]{grid-column:var(--col-span-sm)}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-start-\[--col-start-sm\]{grid-column-start:var(--col-start-sm)}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:-my-2{margin-bottom:-.5rem;margin-top:-.5rem}.sm\:ms-auto{margin-inline-start:auto}.sm\:mt-7{margin-top:1.75rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:table-cell{display:table-cell}.sm\:grid{display:grid}.sm\:inline-grid{display:inline-grid}.sm\:hidden{display:none}.sm\:w-\[calc\(100\%\+3rem\)\]{width:calc(100% + 3rem)}.sm\:w-screen{width:100vw}.sm\:max-w-sm{max-width:24rem}.sm\:columns-\[--cols-sm\]{-moz-columns:var(--cols-sm);columns:var(--cols-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[--cols-sm\]{grid-template-columns:var(--cols-sm)}.sm\:grid-cols-\[repeat\(auto-fit\2c minmax\(0\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}.sm\:grid-rows-\[1fr_auto_3fr\]{grid-template-rows:1fr auto 3fr}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-1{gap:.25rem}.sm\:gap-3{gap:.75rem}.sm\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.sm\:rounded-xl{border-radius:.75rem}.sm\:p-10{padding:2.5rem}.sm\:px-12{padding-left:3rem;padding-right:3rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.sm\:pe-3{padding-inline-end:.75rem}.sm\:pe-6{padding-inline-end:1.5rem}.sm\:ps-3{padding-inline-start:.75rem}.sm\:ps-6{padding-inline-start:1.5rem}.sm\:pt-1\.5{padding-top:.375rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}.sm\:first-of-type\:ps-3:first-of-type{padding-inline-start:.75rem}.sm\:first-of-type\:ps-6:first-of-type{padding-inline-start:1.5rem}.sm\:last-of-type\:pe-3:last-of-type{padding-inline-end:.75rem}.sm\:last-of-type\:pe-6:last-of-type{padding-inline-end:1.5rem}}@media (min-width:768px){.md\:bottom-4{bottom:1rem}.md\:order-first{order:-9999}.md\:col-\[--col-span-md\]{grid-column:var(--col-span-md)}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-start-\[--col-start-md\]{grid-column-start:var(--col-start-md)}.md\:block{display:block}.md\:flex{display:flex}.md\:table-cell{display:table-cell}.md\:inline-grid{display:inline-grid}.md\:hidden{display:none}.md\:w-max{width:-moz-max-content;width:max-content}.md\:max-w-60{max-width:15rem}.md\:columns-\[--cols-md\]{-moz-columns:var(--cols-md);columns:var(--cols-md)}.md\:grid-flow-col{grid-auto-flow:column}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[--cols-md\]{grid-template-columns:var(--cols-md)}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:justify-end{justify-content:flex-end}.md\:gap-1{gap:.25rem}.md\:gap-3{gap:.75rem}.md\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(0px*var(--tw-divide-y-reverse));border-top-width:calc(0px*(1 - var(--tw-divide-y-reverse)))}.md\:overflow-x-auto{overflow-x:auto}.md\:rounded-xl{border-radius:.75rem}.md\:p-20{padding:5rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:pe-6{padding-inline-end:1.5rem}.md\:ps-3{padding-inline-start:.75rem}}@media (min-width:1024px){.lg\:sticky{position:sticky}.lg\:z-0{z-index:0}.lg\:col-\[--col-span-lg\]{grid-column:var(--col-span-lg)}.lg\:col-start-\[--col-start-lg\]{grid-column-start:var(--col-start-lg)}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:table-cell{display:table-cell}.lg\:inline-grid{display:inline-grid}.lg\:hidden{display:none}.lg\:h-full{height:100%}.lg\:max-w-xs{max-width:20rem}.lg\:-translate-x-full{--tw-translate-x:-100%}.lg\:-translate-x-full,.lg\:translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:translate-x-0{--tw-translate-x:0px}.lg\:columns-\[--cols-lg\]{-moz-columns:var(--cols-lg);columns:var(--cols-lg)}.lg\:grid-cols-\[--cols-lg\]{grid-template-columns:var(--cols-lg)}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:items-center{align-items:center}.lg\:gap-1{gap:.25rem}.lg\:gap-3{gap:.75rem}.lg\:bg-transparent{background-color:transparent}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pe-8{padding-inline-end:2rem}.lg\:shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.lg\:shadow-none,.lg\:shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.lg\:shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.lg\:ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.lg\:transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.lg\:transition-none{transition-property:none}.lg\:delay-100{transition-delay:.1s}.dark\:lg\:bg-transparent:is(.dark *){background-color:transparent}}@media (min-width:1280px){.xl\:col-\[--col-span-xl\]{grid-column:var(--col-span-xl)}.xl\:col-start-\[--col-start-xl\]{grid-column-start:var(--col-start-xl)}.xl\:block{display:block}.xl\:table-cell{display:table-cell}.xl\:inline-grid{display:inline-grid}.xl\:hidden{display:none}.xl\:columns-\[--cols-xl\]{-moz-columns:var(--cols-xl);columns:var(--cols-xl)}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-\[--cols-xl\]{grid-template-columns:var(--cols-xl)}.xl\:flex-row{flex-direction:row}.xl\:items-start{align-items:flex-start}.xl\:items-end{align-items:flex-end}.xl\:items-center{align-items:center}.xl\:gap-1{gap:.25rem}.xl\:gap-3{gap:.75rem}}@media (min-width:1536px){.\32xl\:col-\[--col-span-2xl\]{grid-column:var(--col-span-2xl)}.\32xl\:col-start-\[--col-start-2xl\]{grid-column-start:var(--col-start-2xl)}.\32xl\:block{display:block}.\32xl\:table-cell{display:table-cell}.\32xl\:inline-grid{display:inline-grid}.\32xl\:hidden{display:none}.\32xl\:columns-\[--cols-2xl\]{-moz-columns:var(--cols-2xl);columns:var(--cols-2xl)}.\32xl\:grid-cols-\[--cols-2xl\]{grid-template-columns:var(--cols-2xl)}.\32xl\:flex-row{flex-direction:row}.\32xl\:items-start{align-items:flex-start}.\32xl\:items-end{align-items:flex-end}.\32xl\:items-center{align-items:center}.\32xl\:gap-1{gap:.25rem}.\32xl\:gap-3{gap:.75rem}}.ltr\:hidden:where([dir=ltr],[dir=ltr] *){display:none}.rtl\:hidden:where([dir=rtl],[dir=rtl] *){display:none}.rtl\:-translate-x-0:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:-translate-x-5:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:-translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-1\/2:where([dir=rtl],[dir=rtl] *){--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-1\/4:where([dir=rtl],[dir=rtl] *){--tw-translate-x:25%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:flex-row-reverse:where([dir=rtl],[dir=rtl] *){flex-direction:row-reverse}.rtl\:divide-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}@media (min-width:1024px){.rtl\:lg\:-translate-x-0:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:lg\:translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}.\[\&\.trix-active\]\:bg-gray-50.trix-active{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.\[\&\.trix-active\]\:text-primary-600.trix-active{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1))}.dark\:\[\&\.trix-active\]\:bg-white\/5.trix-active:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:\[\&\.trix-active\]\:text-primary-400.trix-active:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.\[\&\:\:-ms-reveal\]\:hidden::-ms-reveal{display:none}.\[\&\:not\(\:first-of-type\)\]\:border-s:not(:first-of-type){border-inline-start-width:1px}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-2:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-danger-600:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-primary-600:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.dark\:\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-danger-500:focus-within:not(:has(.fi-ac-action:focus)):is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-primary-500:focus-within:not(:has(.fi-ac-action:focus)):is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.\[\&\:not\(\:last-of-type\)\]\:border-e:not(:last-of-type){border-inline-end-width:1px}.\[\&\:not\(\:nth-child\(1_of_\.fi-btn\)\)\]\:shadow-\[-1px_0_0_0_theme\(colors\.gray\.200\)\]:not(:nth-child(1 of .fi-btn)){--tw-shadow:-1px 0 0 0 rgba(var(--gray-200),1);--tw-shadow-colored:-1px 0 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:\[\&\:not\(\:nth-child\(1_of_\.fi-btn\)\)\]\:shadow-\[-1px_0_0_0_theme\(colors\.white\/20\%\)\]:not(:nth-child(1 of .fi-btn)):is(.dark *){--tw-shadow:-1px 0 0 0 hsla(0,0%,100%,.2);--tw-shadow-colored:-1px 0 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\[\&\:not\(\:nth-last-child\(1_of_\.fi-btn\)\)\]\:me-px:not(:nth-last-child(1 of .fi-btn)){margin-inline-end:1px}.\[\&\:nth-child\(1_of_\.fi-btn\)\]\:rounded-s-lg:nth-child(1 of .fi-btn){border-end-start-radius:.5rem;border-start-start-radius:.5rem}.\[\&\:nth-last-child\(1_of_\.fi-btn\)\]\:rounded-e-lg:nth-last-child(1 of .fi-btn){border-end-end-radius:.5rem;border-start-end-radius:.5rem}.\[\&\>\*\:first-child\]\:relative>:first-child{position:relative}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&\>\*\:first-child\]\:before\:absolute>:first-child:before{content:var(--tw-content);position:absolute}.\[\&\>\*\:first-child\]\:before\:inset-y-0>:first-child:before{bottom:0;content:var(--tw-content);top:0}.\[\&\>\*\:first-child\]\:before\:start-0>:first-child:before{content:var(--tw-content);inset-inline-start:0}.\[\&\>\*\:first-child\]\:before\:w-0\.5>:first-child:before{content:var(--tw-content);width:.125rem}.\[\&\>\*\:first-child\]\:before\:bg-primary-600>:first-child:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1));content:var(--tw-content)}.\[\&\>\*\:first-child\]\:dark\:before\:bg-primary-500:is(.dark *)>:first-child:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1));content:var(--tw-content)}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\.choices\\_\\_inner\]\:ps-0 .choices__inner{padding-inline-start:0}.\[\&_\.fi-badge-delete-button\]\:hidden .fi-badge-delete-button{display:none}.\[\&_\.filepond--root\]\:font-sans .filepond--root{font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.\[\&_optgroup\]\:bg-white optgroup{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_optgroup\]\:dark\:bg-gray-900:is(.dark *) optgroup{--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.\[\&_option\]\:bg-white option{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_option\]\:dark\:bg-gray-900:is(.dark *) option{--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}:checked+*>.\[\:checked\+\*\>\&\]\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}@media(hover:hover){.\[\@media\(hover\:hover\)\]\:transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[\@media\(hover\:hover\)\]\:duration-75{transition-duration:75ms}}input:checked+.\[input\:checked\+\&\]\:bg-custom-600{--tw-bg-opacity:1;background-color:rgba(var(--c-600),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:bg-gray-400{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}input:checked+.\[input\:checked\+\&\]\:ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}input:checked+.\[input\:checked\+\&\]\:hover\:bg-custom-500:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:bg-custom-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:bg-gray-600:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:hover\:bg-custom-400:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-400),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:hover\:bg-gray-500:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}input:checked:focus-visible+.\[input\:checked\:focus-visible\+\&\]\:ring-custom-500\/50{--tw-ring-color:rgba(var(--c-500),0.5)}input:checked:focus-visible+.dark\:\[input\:checked\:focus-visible\+\&\]\:ring-custom-400\/50:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.5)}input:focus-visible+.\[input\:focus-visible\+\&\]\:z-10{z-index:10}input:focus-visible+.\[input\:focus-visible\+\&\]\:ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}input:focus-visible+.\[input\:focus-visible\+\&\]\:ring-gray-950\/10{--tw-ring-color:rgba(var(--gray-950),0.1)}input:focus-visible+.dark\:\[input\:focus-visible\+\&\]\:ring-white\/20:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)} \ No newline at end of file diff --git a/public/css/filament/forms/forms.css b/public/css/filament/forms/forms.css index 1e8418f90..c3ec78f92 100644 --- a/public/css/filament/forms/forms.css +++ b/public/css/filament/forms/forms.css @@ -1,4 +1,4 @@ -input::-webkit-datetime-edit{display:block;padding:0}.cropper-container{-webkit-touch-callout:none;direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{inset:0;position:absolute}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.filepond--assistant{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--browser.filepond--browser{font-size:0;left:1em;margin:0;opacity:0;padding:0;position:absolute;top:1.75em;width:calc(100% - 2em)}.filepond--data{border:none;contain:strict;height:0;margin:0;padding:0;visibility:hidden;width:0}.filepond--data,.filepond--drip{pointer-events:none;position:absolute}.filepond--drip{background:rgba(0,0,0,.01);border-radius:.5em;inset:0;opacity:.1;overflow:hidden}.filepond--drip-blob{background:#292625;border-radius:50%;height:8em;margin-left:-4em;margin-top:-4em;transform-origin:center center;width:8em}.filepond--drip-blob,.filepond--drop-label{left:0;position:absolute;top:0;will-change:transform,opacity}.filepond--drop-label{align-items:center;color:#4f4f4f;display:flex;height:0;justify-content:center;margin:0;right:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;line-height:1.5;text-align:center}.filepond--label-action{-webkit-text-decoration-skip:ink;cursor:pointer;text-decoration:underline;text-decoration-color:#a7a4a4;text-decoration-skip-ink:auto}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{border:none;font-family:inherit;font-size:1em;height:1.625em;line-height:inherit;margin:0;outline:none;padding:0;width:1.625em;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--file-action-button.filepond--file-action-button svg{height:100%;width:100%}.filepond--file-action-button.filepond--file-action-button:after{content:"";inset:-.75em;position:absolute}.filepond--file-action-button{background-color:#00000080;background-image:none;border-radius:50%;box-shadow:0 0 #fff0;color:#fff;cursor:auto;transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em #ffffffe6}.filepond--file-action-button[disabled]{background-color:#00000040;color:#ffffff80}.filepond--file-action-button[hidden]{display:none}.filepond--file-info{align-items:flex-start;display:flex;flex:1;flex-direction:column;margin:0 .5em 0 0;min-width:0;pointer-events:none;position:static;-webkit-user-select:none;-moz-user-select:none;user-select:none;will-change:transform,opacity}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{align-items:flex-end;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;pointer-events:none;position:static;text-align:right;-webkit-user-select:none;-moz-user-select:none;user-select:none;will-change:transform,opacity}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;height:100%;margin:0;min-width:0;padding:0}.filepond--file-wrapper.filepond--file-wrapper>legend{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--file{align-items:flex-start;border-radius:.5em;color:#fff;display:flex;height:100%;padding:.5625em;position:static}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes shake{10%,90%{transform:translate(-.0625em)}20%,80%{transform:translate(.125em)}30%,50%,70%{transform:translate(-.25em)}40%,60%{transform:translate(.25em)}}@keyframes fall{0%{animation-timing-function:ease-out;opacity:0;transform:scale(.5)}70%{animation-timing-function:ease-in-out;opacity:1;transform:scale(1.1)}to{animation-timing-function:ease-out;transform:scale(1)}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:"";inset:0;position:absolute;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{left:0;margin:.25em;padding:0;position:absolute;right:0;top:0;touch-action:auto;will-change:transform,opacity;z-index:1}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em #00000040}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{box-shadow:0 0 0 transparent;transition:box-shadow .125s ease-in-out}.filepond--item[data-drag-state=drag]{cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em #00000053}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{left:0;margin:0;position:absolute;right:0;top:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);overflow-x:hidden;overflow-y:scroll}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#0000004d;border:.3125em solid transparent;border-radius:99999px}.filepond--list.filepond--list{list-style-type:none;margin:0;padding:0;position:absolute;top:0;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{height:100%;margin:0;max-width:none;width:100%}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{align-items:center;bottom:0;display:flex;height:auto;justify-content:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{height:100%;margin-bottom:0;margin-top:0;overflow:hidden}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{height:100%;left:0;right:0}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status,.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{background-color:#f1f0ef;border-radius:.5em}.filepond--panel{height:100%!important;left:0;margin:0;pointer-events:none;position:absolute;right:0;top:0}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{background-color:transparent!important;border:none!important;transform-style:preserve-3d}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{left:0;margin:0;padding:0;position:absolute;right:0;top:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom:none!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.filepond--panel-top:after{background-color:inherit;bottom:-1px;content:"";height:2px;left:0;position:absolute;right:0}.filepond--panel-bottom,.filepond--panel-center{backface-visibility:hidden;transform:translate3d(0,.5em,0);transform-origin:left top;will-change:transform}.filepond--panel-bottom{border-top:none!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.filepond--panel-bottom:before{background-color:inherit;content:"";height:2px;left:0;position:absolute;right:0;top:-1px}.filepond--panel-center{border-bottom:none!important;border-radius:0!important;border-top:none!important;height:100px!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{color:#fff;height:1.25em;margin:0;pointer-events:none;position:static;width:1.25em;will-change:transform,opacity}.filepond--progress-indicator svg{height:100%;transform-box:fill-box;vertical-align:top;width:100%}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;contain:layout style size;direction:ltr;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:450;line-height:normal;margin-bottom:1em;position:relative;text-align:left;text-rendering:optimizeLegibility}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-bottom:1em;margin-top:1em}.filepond--root .filepond--credits{bottom:-14px;color:inherit;font-size:11px;line-height:.85;opacity:.4;position:absolute;right:0;text-decoration:none;z-index:3}.filepond--root .filepond--credits[style]{bottom:auto;margin-top:14px;top:0}.filepond--action-edit-item.filepond--action-edit-item{height:2em;padding:.1875em;width:2em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{background:transparent;border:none;color:inherit;font-family:inherit;line-height:inherit;margin:0 0 0 .25em;outline:none;padding:0;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{height:1.3125em;width:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}.filepond--image-preview-markup{left:0;position:absolute;top:0}.filepond--image-preview-wrapper{z-index:2}.filepond--image-preview-overlay{display:block;left:0;margin:0;max-height:7rem;min-height:5rem;opacity:0;pointer-events:none;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:2}.filepond--image-preview-overlay svg{color:inherit;height:auto;max-height:inherit;width:100%}.filepond--image-preview-overlay-idle{color:#282828d9;mix-blend-mode:multiply}.filepond--image-preview-overlay-success{color:#369763;mix-blend-mode:normal}.filepond--image-preview-overlay-failure{color:#c44e47;mix-blend-mode:normal}@supports (-webkit-marquee-repetition:infinite) and ((-o-object-fit:fill) or (object-fit:fill)){.filepond--image-preview-overlay-idle{mix-blend-mode:normal}}.filepond--image-preview-wrapper{background:rgba(0,0,0,.01);border-radius:.45em;height:100%;left:0;margin:0;overflow:hidden;position:absolute;right:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.filepond--image-preview{align-items:center;background:#222;display:flex;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;will-change:transform,opacity;z-index:1}.filepond--image-clip{margin:0 auto;overflow:hidden;position:relative}.filepond--image-clip[data-transparency-indicator=grid] canvas,.filepond--image-clip[data-transparency-indicator=grid] img{background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0h50v50H0M50 50h50v50H50'/%3E%3C/svg%3E");background-size:1.25em 1.25em}.filepond--image-bitmap,.filepond--image-vector{left:0;position:absolute;top:0;will-change:transform}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview-wrapper{border-radius:0}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview{align-items:center;display:flex;height:100%;justify-content:center}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-wrapper{border-radius:99999rem}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-overlay{bottom:0;top:auto;transform:scaleY(-1)}.filepond--root[data-style-panel-layout~=circle] .filepond--file .filepond--file-action-button[data-align*=bottom]:not([data-align*=center]){margin-bottom:.325em}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=left]{left:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=right]{right:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=left],.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=right]{margin-bottom:.5125em}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=center]{margin-bottom:.1875em;margin-left:.1875em;margin-top:0}.filepond--media-preview audio{display:none}.filepond--media-preview .audioplayer{margin:2.3em auto auto;width:calc(100% - 1.4em)}.filepond--media-preview .playpausebtn{background-position:50%;background-repeat:no-repeat;border:none;border-radius:25px;cursor:pointer;float:left;height:25px;margin-right:.3em;margin-top:.3em;outline:none;width:25px}.filepond--media-preview .playpausebtn:hover{background-color:#00000080}.filepond--media-preview .play{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAyElEQVQ4T9XUsWoCQRRG4XPaFL5SfIy8gKYKBCysrax8Ahs7qzQ2qVIFOwsrsbEWLEK6EBFGBrIQhN2d3dnGgalm+Jh7789Ix8uOPe4YDCH0gZ66atKW0pJDCE/AEngDXtRjCpwCRucbGANzNVTBqWBhfAJDdV+GNgWj8wtM41bPt3AbsDB2f69d/0dzwC0wUDe54A8wAWbqJbfkD+BZPeQO5QsYqYu6LKb0MIb7VT3VYfG8CnwEHtT3FKi4c8e/TZMyk3LYFrwCgMdHFbRDKS8AAAAASUVORK5CYII=)}.filepond--media-preview .pause{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAh0lEQVQ4T+2UsQkCURBE30PLMbAMMResQrAPsQ0TK9AqDKxGZeTLD74aGNwlhzfZssvADDMrPcOe+RggYZIJcG2s2KinMidZAvu6u6uzT8u+JCeZArfmcKUeK+EaONTdQy23bxgJX8aPHvIHsSnVuzTx36rn2pQFsGuqN//ZlK7vbIDvq6vkJ9yteBXzecYbAAAAAElFTkSuQmCC)}.filepond--media-preview .timeline{background:hsla(0,0%,100%,.3);border-radius:15px;float:left;height:3px;margin-top:1em;width:calc(100% - 2.5em)}.filepond--media-preview .playhead{background:#fff;border-radius:50%;height:13px;margin-top:-5px;width:13px}.filepond--media-preview-wrapper{background:rgba(0,0,0,.01);border-radius:.45em;height:100%;left:0;margin:0;overflow:hidden;pointer-events:auto;position:absolute;right:0;top:0}.filepond--media-preview-wrapper:before{background:linear-gradient(180deg,#000 0,transparent);content:" ";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#000000",endColorstr="#00000000",GradientType=0);height:2em;position:absolute;width:100%;z-index:3}.filepond--media-preview{display:block;height:100%;position:relative;transform-origin:center center;width:100%;will-change:transform,opacity;z-index:1}.filepond--media-preview audio,.filepond--media-preview video{width:100%;will-change:transform}.filepond--root{--tw-bg-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.1);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);margin-bottom:0}.filepond--root:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2);background-color:hsla(0,0%,100%,.05)}.filepond--root[data-disabled=disabled]{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.filepond--root[data-disabled=disabled]:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1);background-color:transparent}.filepond--panel-root{background-color:transparent}.filepond--drop-label label{--tw-text-opacity:1;color:rgba(var(--gray-600),var(--tw-text-opacity,1));font-size:.875rem;line-height:1.25rem;padding:.75rem!important}.filepond--drop-label label:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.filepond--label-action{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1));font-weight:500;text-decoration-line:none;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.filepond--label-action:hover{--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.filepond--label-action:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.filepond--label-action:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.filepond--drip-blob{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.filepond--drip-blob:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}.filepond--root[data-style-panel-layout=grid] .filepond--item{display:inline;width:calc(50% - .5rem)}@media (min-width:1024px){.filepond--root[data-style-panel-layout=grid] .filepond--item{width:calc(33.33% - .5rem)}}.filepond--download-icon{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));display:inline-block;height:1rem;margin-inline-end:.25rem;pointer-events:auto;vertical-align:bottom;width:1rem}.filepond--download-icon:hover{background-color:hsla(0,0%,100%,.7)}.filepond--download-icon{-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWRvd25sb2FkIj48cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNE03IDEwbDUgNSA1LTVNMTIgMTVWMyIvPjwvc3ZnPg==);mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWRvd25sb2FkIj48cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNE03IDEwbDUgNSA1LTVNMTIgMTVWMyIvPjwvc3ZnPg==);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}.filepond--open-icon{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));display:inline-block;height:1rem;margin-inline-end:.25rem;pointer-events:auto;vertical-align:bottom;width:1rem}.filepond--open-icon:hover{background-color:hsla(0,0%,100%,.7)}.filepond--open-icon{-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTBhMiAyIDAgMCAwIDItMnYtNE0xNCA0aDZtMCAwdjZtMC02TDEwIDE0Ii8+PC9zdmc+);mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTBhMiAyIDAgMCAwIDItMnYtNE0xNCA0aDZtMCAwdjZtMC02TDEwIDE0Ii8+PC9zdmc+);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}.filepond--file-action-button.filepond--action-edit-item{background-color:rgba(0,0,0,.5)}.cropper-drag-box.cropper-crop.cropper-modal{background-color:rgba(var(--gray-100),.5);opacity:1}.cropper-drag-box.cropper-crop.cropper-modal:is(.dark *){background-color:rgba(var(--gray-900),.8)}.fi-fo-file-upload-circle-cropper .cropper-face,.fi-fo-file-upload-circle-cropper .cropper-view-box{border-radius:50%}.CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}.CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{background:#7e7;border:0!important;width:auto}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{inset:-50px 0 0;overflow:hidden;position:absolute}.CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;overflow:hidden;position:relative}.CodeMirror-scroll{height:100%;margin-bottom:-50px;margin-right:-50px;outline:0;overflow:scroll!important;padding-bottom:50px;position:relative;z-index:0}.CodeMirror-sizer{border-right:50px solid transparent;position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{display:none;outline:0;position:absolute;z-index:6}.CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}.CodeMirror-scrollbar-filler{bottom:0;right:0}.CodeMirror-gutter-filler{bottom:0;left:0}.CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}.CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-50px;vertical-align:top;white-space:normal}.CodeMirror-gutter-wrapper{background:0 0!important;border:none!important;position:absolute;z-index:4}.CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}.CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{word-wrap:normal;-webkit-tap-highlight-color:transparent;background:0 0;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;z-index:2}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{inset:0;position:absolute;z-index:0}.CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.CodeMirror-cursor{pointer-events:none;position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:0 0}.EasyMDEContainer{display:block}.CodeMirror-rtl pre{direction:rtl}.EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}.EasyMDEContainer .CodeMirror{word-wrap:break-word;border:1px solid #ced4da;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;font:inherit;height:auto;padding:10px;z-index:0}.EasyMDEContainer .CodeMirror-scroll{cursor:text}.EasyMDEContainer .CodeMirror-fullscreen{background:#fff;border-bottom-right-radius:0!important;border-right:none!important;height:auto;inset:50px 0 0;position:fixed!important;z-index:8}.EasyMDEContainer .CodeMirror-sided{width:50%!important}.EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-bottom-right-radius:0;border-right:none!important;flex:1 1 auto;position:relative}.EasyMDEContainer .CodeMirror-placeholder{opacity:.5}.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}.editor-toolbar{border-left:1px solid #ced4da;border-right:1px solid #ced4da;border-top:1px solid #ced4da;border-top-left-radius:4px;border-top-right-radius:4px;padding:9px 10px;position:relative;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none}.editor-toolbar.fullscreen{background:#fff;border:0;box-sizing:border-box;height:50px;left:0;opacity:1;padding-bottom:10px;padding-top:10px;position:fixed;top:0;width:100%;z-index:9}.editor-toolbar.fullscreen:before{background:linear-gradient(90deg,#fff 0,hsla(0,0%,100%,0));height:50px;left:0;margin:0;padding:0;position:fixed;top:0;width:20px}.editor-toolbar.fullscreen:after{background:linear-gradient(90deg,hsla(0,0%,100%,0) 0,#fff);height:50px;margin:0;padding:0;position:fixed;right:0;top:0;width:20px}.EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}.editor-toolbar .easymde-dropdown,.editor-toolbar button{background:0 0;border:1px solid transparent;border-radius:3px;cursor:pointer;display:inline-block;height:30px;margin:0;padding:0;text-align:center;text-decoration:none!important}.editor-toolbar button{font-weight:700;min-width:30px;padding:0 6px;white-space:nowrap}.editor-toolbar button.active,.editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar i.separator{border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;display:inline-block;margin:0 6px;text-indent:-10px;width:0}.editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;position:relative;top:2px;vertical-align:text-bottom}.editor-toolbar button.heading-1:after{content:"1"}.editor-toolbar button.heading-2:after{content:"2"}.editor-toolbar button.heading-3:after{content:"3"}.editor-toolbar button.heading-bigger:after{content:"\25b2"}.editor-toolbar button.heading-smaller:after{content:"\25bc"}.editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width:700px){.editor-toolbar i.no-mobile{display:none}}.editor-statusbar{color:#959694;font-size:12px;padding:8px 10px;text-align:right}.EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}.editor-statusbar span{display:inline-block;margin-left:1em;min-width:4em}.editor-statusbar .lines:before{content:"lines: "}.editor-statusbar .words:before{content:"words: "}.editor-statusbar .characters:before{content:"characters: "}.editor-preview-full{height:100%;left:0;position:absolute;top:0;width:100%;z-index:7}.editor-preview-full,.editor-preview-side{box-sizing:border-box;display:none;overflow:auto}.editor-preview-side{word-wrap:break-word;border:1px solid #ddd;bottom:0;position:fixed;right:0;top:50px;width:50%;z-index:9}.editor-preview-active-side{display:block}.EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}.editor-preview-active{display:block}.editor-preview{background:#fafafa;padding:10px}.editor-preview>p{margin-top:0}.editor-preview pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th{border:1px solid #ddd;padding:5px}.cm-s-easymde .cm-tag{color:#63a35c}.cm-s-easymde .cm-attribute{color:#795da3}.cm-s-easymde .cm-string{color:#183691}.cm-s-easymde .cm-header-1{font-size:calc(1.375rem + 1.5vw)}.cm-s-easymde .cm-header-2{font-size:calc(1.325rem + .9vw)}.cm-s-easymde .cm-header-3{font-size:calc(1.3rem + .6vw)}.cm-s-easymde .cm-header-4{font-size:calc(1.275rem + .3vw)}.cm-s-easymde .cm-header-5{font-size:1.25rem}.cm-s-easymde .cm-header-6{font-size:1rem}.cm-s-easymde .cm-header-1,.cm-s-easymde .cm-header-2,.cm-s-easymde .cm-header-3,.cm-s-easymde .cm-header-4,.cm-s-easymde .cm-header-5,.cm-s-easymde .cm-header-6{line-height:1.2;margin-bottom:.5rem}.cm-s-easymde .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.cm-s-easymde .cm-link{color:#7f8c8d}.cm-s-easymde .cm-url{color:#aab2b3}.cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}.editor-toolbar .easymde-dropdown{border:1px solid #fff;border-radius:0;position:relative}.editor-toolbar .easymde-dropdown,.editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff,#fff 84%,#333 0,#333)}.easymde-dropdown-content{background-color:#f9f9f9;box-shadow:0 8px 16px #0003;display:block;padding:8px;position:absolute;top:30px;visibility:hidden;z-index:2}.easymde-dropdown:active .easymde-dropdown-content,.easymde-dropdown:focus .easymde-dropdown-content,.easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}.easymde-dropdown-content button{display:block}span[data-img-src]:after{background-image:var(--bg-image);background-repeat:no-repeat;background-size:contain;content:"";display:block;height:0;max-height:100%;max-width:100%;padding-top:var(--height);width:var(--width)}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}:root{--color-cm-red:#991b1b;--color-cm-orange:#9a3412;--color-cm-amber:#92400e;--color-cm-yellow:#854d0e;--color-cm-lime:#3f6212;--color-cm-green:#166534;--color-cm-emerald:#065f46;--color-cm-teal:#115e59;--color-cm-cyan:#155e75;--color-cm-sky:#075985;--color-cm-blue:#1e40af;--color-cm-indigo:#3730a3;--color-cm-violet:#5b21b6;--color-cm-purple:#6b21a8;--color-cm-fuchsia:#86198f;--color-cm-pink:#9d174d;--color-cm-rose:#9f1239;--color-cm-gray:#18181b;--color-cm-gray-muted:#71717a;--color-cm-gray-background:#e4e4e7}.dark{--color-cm-red:#f87171;--color-cm-orange:#fb923c;--color-cm-amber:#fbbf24;--color-cm-yellow:#facc15;--color-cm-lime:#a3e635;--color-cm-green:#4ade80;--color-cm-emerald:#4ade80;--color-cm-teal:#2dd4bf;--color-cm-cyan:#22d3ee;--color-cm-sky:#38bdf8;--color-cm-blue:#60a5fa;--color-cm-indigo:#818cf8;--color-cm-violet:#a78bfa;--color-cm-purple:#c084fc;--color-cm-fuchsia:#e879f9;--color-cm-pink:#f472b6;--color-cm-rose:#fb7185;--color-cm-gray:#fafafa;--color-cm-gray-muted:#a1a1aa;--color-cm-gray-background:#52525b}.cm-s-easymde .cm-comment{background-color:transparent;color:var(--color-cm-gray-muted)}.EasyMDEContainer .CodeMirror-cursor{border-color:currentColor}.dark .EasyMDEContainer .cm-s-easymde span.CodeMirror-selectedtext{filter:invert(100%)}.EasyMDEContainer .cm-s-easymde .cm-keyword{color:var(--color-cm-violet)}.EasyMDEContainer .cm-s-easymde .cm-atom{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-number{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-def{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-variable{color:var(--color-cm-yellow)}.EasyMDEContainer .cm-s-easymde .cm-variable-2{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-variable-3{color:var(--color-cm-emerald)}.EasyMDEContainer .cm-s-easymde .cm-operator,.EasyMDEContainer .cm-s-easymde .cm-property{color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-string,.EasyMDEContainer .cm-s-easymde .cm-string-2{color:var(--color-cm-rose)}.EasyMDEContainer .cm-s-easymde .cm-meta{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-error{color:var(--color-cm-red)}.EasyMDEContainer .cm-s-easymde .cm-qualifier{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-builtin{color:var(--color-cm-violet)}.EasyMDEContainer .cm-s-easymde .cm-bracket{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-tag{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-attribute{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-hr{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-formatting-quote{color:var(--color-cm-sky)}.EasyMDEContainer .cm-s-easymde .cm-formatting-quote+.cm-quote{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-formatting-list,.EasyMDEContainer .cm-s-easymde .cm-formatting-list+.cm-variable-2,.EasyMDEContainer .cm-s-easymde .cm-tab+.cm-variable-2{color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-link{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-tag{color:var(--color-cm-red)}.EasyMDEContainer .cm-s-easymde .cm-attribute{color:var(--color-cm-amber)}.EasyMDEContainer .cm-s-easymde .cm-attribute+.cm-string{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-formatting-code+.cm-comment:not(.cm-formatting-code){background-color:var(--color-cm-gray-background);color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-header-1{font-size:1.875rem;line-height:2.25rem}.EasyMDEContainer .cm-s-easymde .cm-header-2{font-size:1.5rem;line-height:2rem}.EasyMDEContainer .cm-s-easymde .cm-header-3{font-size:1.25rem;line-height:1.75rem}.EasyMDEContainer .cm-s-easymde .cm-header-4{font-size:1.125rem;line-height:1.75rem}.EasyMDEContainer .cm-s-easymde .cm-header-5{font-size:1rem;line-height:1.5rem}.EasyMDEContainer .cm-s-easymde .cm-header-6{font-size:.875rem;line-height:1.25rem}.EasyMDEContainer .cm-s-easymde .cm-comment{background-image:none}.EasyMDEContainer .CodeMirror,.EasyMDEContainer .cm-s-easymde .cm-formatting-code-block,.EasyMDEContainer .cm-s-easymde .cm-tab+.cm-comment{background-color:transparent;color:inherit}.EasyMDEContainer .CodeMirror{border-style:none;padding:.375rem .75rem}.EasyMDEContainer .CodeMirror-scroll{height:auto}.EasyMDEContainer .editor-toolbar{--tw-border-opacity:1;border-color:rgba(var(--gray-200),var(--tw-border-opacity,1));border-radius:0;border-width:0 0 1px;-moz-column-gap:.25rem;column-gap:.25rem;display:flex;overflow-x:auto;padding:.5rem .625rem}.EasyMDEContainer .editor-toolbar:is(.dark *){border-color:hsla(0,0%,100%,.1)}.EasyMDEContainer .editor-toolbar button{border-radius:.5rem;border-style:none;cursor:pointer;display:grid;height:2rem;padding:0;place-content:center;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:2rem}.EasyMDEContainer .editor-toolbar button:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:hover:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button:focus-visible:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button.active{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button.active:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button:before{--tw-bg-opacity:1;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1));display:block;height:1.25rem;width:1.25rem}.EasyMDEContainer .editor-toolbar button:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:before{content:"";-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.EasyMDEContainer .editor-toolbar button.active:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button.active:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--primary-400),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar .separator{border-style:none;margin:0!important;width:.25rem}.EasyMDEContainer .editor-toolbar .bold:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M4 3a1 1 0 0 1 1-1h6a4.5 4.5 0 0 1 3.274 7.587A4.75 4.75 0 0 1 11.25 18H5a1 1 0 0 1-1-1V3Zm2.5 5.5v-4H11a2 2 0 1 1 0 4H6.5Zm0 2.5v4.5h4.75a2.25 2.25 0 0 0 0-4.5H6.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M4 3a1 1 0 0 1 1-1h6a4.5 4.5 0 0 1 3.274 7.587A4.75 4.75 0 0 1 11.25 18H5a1 1 0 0 1-1-1V3Zm2.5 5.5v-4H11a2 2 0 1 1 0 4H6.5Zm0 2.5v4.5h4.75a2.25 2.25 0 0 0 0-4.5H6.5Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .italic:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M8 2.75A.75.75 0 0 1 8.75 2h7.5a.75.75 0 0 1 0 1.5h-3.215l-4.483 13h2.698a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3.215l4.483-13H8.75A.75.75 0 0 1 8 2.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M8 2.75A.75.75 0 0 1 8.75 2h7.5a.75.75 0 0 1 0 1.5h-3.215l-4.483 13h2.698a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3.215l4.483-13H8.75A.75.75 0 0 1 8 2.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .strikethrough:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M11.617 3.963c-1.186-.318-2.418-.323-3.416.015-.992.336-1.49.91-1.642 1.476-.152.566-.007 1.313.684 2.1.528.6 1.273 1.1 2.128 1.446h7.879a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5h3.813a5.976 5.976 0 0 1-.447-.456C5.18 7.479 4.798 6.231 5.11 5.066c.312-1.164 1.268-2.055 2.61-2.509 1.336-.451 2.877-.42 4.286-.043.856.23 1.684.592 2.409 1.074a.75.75 0 1 1-.83 1.25 6.723 6.723 0 0 0-1.968-.875Zm1.909 8.123a.75.75 0 0 1 1.015.309c.53.99.607 2.062.18 3.01-.421.94-1.289 1.648-2.441 2.038-1.336.452-2.877.42-4.286.043-1.409-.377-2.759-1.121-3.69-2.18a.75.75 0 1 1 1.127-.99c.696.791 1.765 1.403 2.952 1.721 1.186.318 2.418.323 3.416-.015.853-.288 1.34-.756 1.555-1.232.21-.467.205-1.049-.136-1.69a.75.75 0 0 1 .308-1.014Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M11.617 3.963c-1.186-.318-2.418-.323-3.416.015-.992.336-1.49.91-1.642 1.476-.152.566-.007 1.313.684 2.1.528.6 1.273 1.1 2.128 1.446h7.879a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5h3.813a5.976 5.976 0 0 1-.447-.456C5.18 7.479 4.798 6.231 5.11 5.066c.312-1.164 1.268-2.055 2.61-2.509 1.336-.451 2.877-.42 4.286-.043.856.23 1.684.592 2.409 1.074a.75.75 0 1 1-.83 1.25 6.723 6.723 0 0 0-1.968-.875Zm1.909 8.123a.75.75 0 0 1 1.015.309c.53.99.607 2.062.18 3.01-.421.94-1.289 1.648-2.441 2.038-1.336.452-2.877.42-4.286.043-1.409-.377-2.759-1.121-3.69-2.18a.75.75 0 1 1 1.127-.99c.696.791 1.765 1.403 2.952 1.721 1.186.318 2.418.323 3.416-.015.853-.288 1.34-.756 1.555-1.232.21-.467.205-1.049-.136-1.69a.75.75 0 0 1 .308-1.014Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .link:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z'/%3E%3Cpath d='M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z'/%3E%3Cpath d='M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .heading:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M2.75 4a.75.75 0 0 1 .75.75v4.5h5v-4.5a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0v-4.5h-5v4.5a.75.75 0 0 1-1.5 0V4.75A.75.75 0 0 1 2.75 4ZM13 8.75a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 .75.75v5.75h1a.75.75 0 0 1 0 1.5h-3.5a.75.75 0 0 1 0-1.5h1v-5h-1a.75.75 0 0 1-.75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M2.75 4a.75.75 0 0 1 .75.75v4.5h5v-4.5a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0v-4.5h-5v4.5a.75.75 0 0 1-1.5 0V4.75A.75.75 0 0 1 2.75 4ZM13 8.75a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 .75.75v5.75h1a.75.75 0 0 1 0 1.5h-3.5a.75.75 0 0 1 0-1.5h1v-5h-1a.75.75 0 0 1-.75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .quote:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M10 2c-2.236 0-4.43.18-6.57.524C1.993 2.755 1 4.014 1 5.426v5.148c0 1.413.993 2.67 2.43 2.902 1.168.188 2.352.327 3.55.414.28.02.521.18.642.413l1.713 3.293a.75.75 0 0 0 1.33 0l1.713-3.293a.783.783 0 0 1 .642-.413 41.102 41.102 0 0 0 3.55-.414c1.437-.231 2.43-1.49 2.43-2.902V5.426c0-1.413-.993-2.67-2.43-2.902A41.289 41.289 0 0 0 10 2ZM6.75 6a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 2.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5h-3.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M10 2c-2.236 0-4.43.18-6.57.524C1.993 2.755 1 4.014 1 5.426v5.148c0 1.413.993 2.67 2.43 2.902 1.168.188 2.352.327 3.55.414.28.02.521.18.642.413l1.713 3.293a.75.75 0 0 0 1.33 0l1.713-3.293a.783.783 0 0 1 .642-.413 41.102 41.102 0 0 0 3.55-.414c1.437-.231 2.43-1.49 2.43-2.902V5.426c0-1.413-.993-2.67-2.43-2.902A41.289 41.289 0 0 0 10 2ZM6.75 6a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 2.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5h-3.5Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .code:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6.28 5.22a.75.75 0 0 1 0 1.06L2.56 10l3.72 3.72a.75.75 0 0 1-1.06 1.06L.97 10.53a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Zm7.44 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L17.44 10l-3.72-3.72a.75.75 0 0 1 0-1.06Zm-2.343-3.209a.75.75 0 0 1 .612.867l-2.5 14.5a.75.75 0 0 1-1.478-.255l2.5-14.5a.75.75 0 0 1 .866-.612Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6.28 5.22a.75.75 0 0 1 0 1.06L2.56 10l3.72 3.72a.75.75 0 0 1-1.06 1.06L.97 10.53a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Zm7.44 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L17.44 10l-3.72-3.72a.75.75 0 0 1 0-1.06Zm-2.343-3.209a.75.75 0 0 1 .612.867l-2.5 14.5a.75.75 0 0 1-1.478-.255l2.5-14.5a.75.75 0 0 1 .866-.612Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .unordered-list:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6 4.75A.75.75 0 0 1 6.75 4h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 4.75ZM6 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 10Zm0 5.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75a.75.75 0 0 1-.75-.75ZM1.99 4.75a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0 10.5a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0-5.25a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1V10Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6 4.75A.75.75 0 0 1 6.75 4h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 4.75ZM6 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 10Zm0 5.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75a.75.75 0 0 1-.75-.75ZM1.99 4.75a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0 10.5a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0-5.25a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1V10Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .ordered-list:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M3 1.25a.75.75 0 0 0 0 1.5h.25v2.5a.75.75 0 0 0 1.5 0V2A.75.75 0 0 0 4 1.25H3Zm-.03 7.404a3.5 3.5 0 0 1 1.524-.12.034.034 0 0 1-.012.012L2.415 9.579A.75.75 0 0 0 2 10.25v1c0 .414.336.75.75.75h2.5a.75.75 0 0 0 0-1.5H3.927l1.225-.613c.52-.26.848-.79.848-1.371 0-.647-.429-1.327-1.193-1.451a5.03 5.03 0 0 0-2.277.155.75.75 0 0 0 .44 1.434ZM7.75 3a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm-5.125-1.625a.75.75 0 0 0 0 1.5h1.5a.125.125 0 0 1 0 .25H3.5a.75.75 0 0 0 0 1.5h.625a.125.125 0 0 1 0 .25h-1.5a.75.75 0 0 0 0 1.5h1.5a1.625 1.625 0 0 0 1.37-2.5 1.625 1.625 0 0 0-1.37-2.5h-1.5Z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M3 1.25a.75.75 0 0 0 0 1.5h.25v2.5a.75.75 0 0 0 1.5 0V2A.75.75 0 0 0 4 1.25H3Zm-.03 7.404a3.5 3.5 0 0 1 1.524-.12.034.034 0 0 1-.012.012L2.415 9.579A.75.75 0 0 0 2 10.25v1c0 .414.336.75.75.75h2.5a.75.75 0 0 0 0-1.5H3.927l1.225-.613c.52-.26.848-.79.848-1.371 0-.647-.429-1.327-1.193-1.451a5.03 5.03 0 0 0-2.277.155.75.75 0 0 0 .44 1.434ZM7.75 3a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm-5.125-1.625a.75.75 0 0 0 0 1.5h1.5a.125.125 0 0 1 0 .25H3.5a.75.75 0 0 0 0 1.5h.625a.125.125 0 0 1 0 .25h-1.5a.75.75 0 0 0 0 1.5h1.5a1.625 1.625 0 0 0 1.37-2.5 1.625 1.625 0 0 0-1.37-2.5h-1.5Z'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .table:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .upload-image:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .undo:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M7.793 2.232a.75.75 0 0 1-.025 1.06L3.622 7.25h10.003a5.375 5.375 0 0 1 0 10.75H10.75a.75.75 0 0 1 0-1.5h2.875a3.875 3.875 0 0 0 0-7.75H3.622l4.146 3.957a.75.75 0 0 1-1.036 1.085l-5.5-5.25a.75.75 0 0 1 0-1.085l5.5-5.25a.75.75 0 0 1 1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M7.793 2.232a.75.75 0 0 1-.025 1.06L3.622 7.25h10.003a5.375 5.375 0 0 1 0 10.75H10.75a.75.75 0 0 1 0-1.5h2.875a3.875 3.875 0 0 0 0-7.75H3.622l4.146 3.957a.75.75 0 0 1-1.036 1.085l-5.5-5.25a.75.75 0 0 1 0-1.085l5.5-5.25a.75.75 0 0 1 1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .redo:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M12.207 2.232a.75.75 0 0 0 .025 1.06l4.146 3.958H6.375a5.375 5.375 0 0 0 0 10.75H9.25a.75.75 0 0 0 0-1.5H6.375a3.875 3.875 0 0 1 0-7.75h10.003l-4.146 3.957a.75.75 0 0 0 1.036 1.085l5.5-5.25a.75.75 0 0 0 0-1.085l-5.5-5.25a.75.75 0 0 0-1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M12.207 2.232a.75.75 0 0 0 .025 1.06l4.146 3.958H6.375a5.375 5.375 0 0 0 0 10.75H9.25a.75.75 0 0 0 0-1.5H6.375a3.875 3.875 0 0 1 0-7.75h10.003l-4.146 3.957a.75.75 0 0 0 1.036 1.085l5.5-5.25a.75.75 0 0 0 0-1.085l-5.5-5.25a.75.75 0 0 0-1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-statusbar{display:none}.fi-fo-rich-editor trix-toolbar .trix-dialogs{position:relative}.fi-fo-rich-editor trix-toolbar .trix-dialog{--tw-bg-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1));border-radius:.5rem;bottom:auto;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);left:0;padding:.5rem;position:absolute;right:0;top:1rem}.fi-fo-rich-editor trix-toolbar .trix-dialog:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-800),var(--tw-bg-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields{display:flex;flex-direction:column;gap:.5rem;width:100%}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group{display:flex;gap:.5rem}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.1);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.375rem;border-style:none;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);color:rgba(var(--gray-950),var(--tw-text-opacity,1));display:block;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;padding-bottom:.375rem;padding-inline-end:.75rem;padding-top:.375rem;padding-inline-start:.75rem;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *){--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-color:hsla(0,0%,100%,.2);background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1));color:rgb(255 255 255/var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:focus-within:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}@media (min-width:640px){.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input{font-size:.875rem;line-height:1.5rem}}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group .trix-button{--tw-bg-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-200),var(--tw-ring-opacity,1));background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);font-size:.75rem;line-height:1rem;padding:.125rem .5rem}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group .trix-button:is(.dark *){--tw-bg-opacity:1;--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-600),var(--tw-ring-opacity,1));background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))}.fi-fo-rich-editor trix-editor:empty:before{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-editor:empty:is(.dark *):before{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-editor:empty:before{content:attr(placeholder)}.fi-fo-rich-editor trix-editor.prose :where(ol):not(:where([class~=not-prose] *)),.fi-fo-rich-editor trix-editor.prose :where(ul):not(:where([class~=not-prose] *)){padding-inline-end:0!important;padding-inline-start:1.625em!important}.fi-fo-rich-editor trix-editor.prose :where(ul>li):not(:where([class~=not-prose] *)){padding-inline-end:0!important;padding-inline-start:.375em!important}select:not(.choices){background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E")}[dir=rtl] select{background-position:left .5rem center!important}.choices{outline:2px solid transparent;outline-offset:2px;position:relative}.choices [hidden]{display:none!important}.choices[data-type*=select-one] .has-no-choices{display:none}.choices[data-type*=select-one] .choices__input{display:block;margin:0;width:100%}.choices__inner{background-repeat:no-repeat;outline:2px solid transparent;outline-offset:2px;padding-bottom:.375rem;padding-inline-end:2rem;padding-top:.375rem;padding-inline-start:.75rem}@media (min-width:640px){.choices__inner{font-size:.875rem;line-height:1.5rem}}.choices__inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-size:1.5em 1.5em}.choices.is-disabled .choices__inner{cursor:default}[dir=rtl] .choices__inner{background-position:left .5rem center}.choices__list--single{display:inline-block}.choices__list--single .choices__item{--tw-text-opacity:1;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.choices__list--single .choices__item:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices.is-disabled .choices__list--single .choices__item{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices.is-disabled .choices__list--single .choices__item:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__list--multiple{display:flex;flex-wrap:wrap;gap:.375rem}.choices__list--multiple:not(:empty){margin-bottom:.25rem;margin-left:-.25rem;margin-right:-.25rem;padding-bottom:.125rem;padding-top:.125rem}.choices__list--multiple .choices__item{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-inset:inset;--tw-ring-color:rgba(var(--primary-600),0.1);align-items:center;background-color:rgba(var(--primary-50),var(--tw-bg-opacity,1));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);color:rgba(var(--primary-600),var(--tw-text-opacity,1));display:inline-flex;font-size:.75rem;font-weight:500;gap:.25rem;line-height:1rem;padding:.25rem .5rem;word-break:break-all}.choices__list--multiple .choices__item:is(.dark *){--tw-text-opacity:1;--tw-ring-color:rgba(var(--primary-400),0.3);background-color:rgba(var(--primary-400),.1);color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.choices__list--dropdown,.choices__list[aria-expanded]{--tw-bg-opacity:1;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.05);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);display:none;font-size:.875rem;line-height:1.25rem;margin-top:.5rem;overflow:hidden;overflow-wrap:break-word;position:absolute;top:100%;width:100%;will-change:visibility;z-index:10}.choices__list--dropdown:is(.dark *),.choices__list[aria-expanded]:is(.dark *){--tw-bg-opacity:1;--tw-ring-color:hsla(0,0%,100%,.1);background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.is-active.choices__list--dropdown,.is-active.choices__list[aria-expanded]{display:block;padding:.25rem}.choices__list--dropdown .choices__list,.choices__list[aria-expanded] .choices__list{max-height:15rem;overflow:auto;will-change:scroll-position}.choices__item--choice{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1));padding:.5rem;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.choices__item--choice:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__item--choice.choices__item--selectable{--tw-text-opacity:1;border-radius:.375rem;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.choices__item--choice.choices__item--selectable:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices__list--dropdown .choices__item--selectable.is-highlighted,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.choices__list--dropdown .choices__item--selectable.is-highlighted:is(.dark *),.choices__list[aria-expanded] .choices__item--selectable.is-highlighted:is(.dark *){background-color:hsla(0,0%,100%,.05)}.choices__item{cursor:default}.choices__item--disabled{pointer-events:none}.choices__item--disabled:disabled{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__item--disabled:disabled:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices.is-disabled .choices__placeholder.choices__item,.choices__placeholder.choices__item{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1));cursor:default}.choices.is-disabled .choices__placeholder.choices__item:is(.dark *),.choices__placeholder.choices__item:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__button{background-color:transparent;background-position:50%;background-repeat:no-repeat;border-width:0;outline:2px solid transparent;outline-offset:2px;text-indent:-9999px}.choices[data-type*=select-one] .choices__button{height:1rem;inset-inline-end:0;margin-inline-end:2.25rem;opacity:.5;padding:0;position:absolute;transition-duration:75ms;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:1rem}.choices[data-type*=select-one] .choices__button:is(.dark *){opacity:.4}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=);background-size:.7142em .7142em;top:calc(50% - .5714em)}.dark .choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=)}.choices[data-type*=select-multiple] .choices__button{height:1rem;opacity:.5;width:1rem}.choices[data-type*=select-multiple] .choices__button:is(.dark *){opacity:.4}.choices[data-type*=select-multiple] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=);background-size:.7142em .7142em}.dark .choices[data-type*=select-multiple] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=)}.choices[data-type*=select-multiple] .choices__button:focus-visible,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=select-one] .choices__button:focus-visible,.choices[data-type*=select-one] .choices__button:hover{opacity:.7}.choices[data-type*=select-multiple] .choices__button:focus-visible:is(.dark *),.choices[data-type*=select-multiple] .choices__button:hover:is(.dark *),.choices[data-type*=select-one] .choices__button:focus-visible:is(.dark *),.choices[data-type*=select-one] .choices__button:hover:is(.dark *){opacity:.6}.choices.is-disabled .choices__button,.choices[data-type*=select-one] .choices__item[data-value=""] .choices__button{display:none}.choices__input{--tw-text-opacity:1;background-color:transparent!important;border-style:none;color:rgba(var(--gray-950),var(--tw-text-opacity,1));font-size:1rem!important;line-height:1.5rem!important;padding:0!important;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.choices__input::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__input::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__input:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.choices__input:disabled{--tw-text-opacity:1;-webkit-text-fill-color:rgba(var(--gray-500),1);color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices__input:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:disabled:is(.dark *){--tw-text-opacity:1;-webkit-text-fill-color:rgba(var(--gray-400),1);color:rgba(var(--gray-400),var(--tw-text-opacity,1))}@media (min-width:640px){.choices__input{font-size:.875rem!important;line-height:1.5rem}}.choices__list--dropdown .choices__input{padding:.5rem!important}.choices__input::-webkit-search-cancel-button,.choices__input::-webkit-search-decoration,.choices__input::-webkit-search-results-button,.choices__input::-webkit-search-results-decoration{display:none}.choices__input::-ms-clear,.choices__input::-ms-reveal{display:none;height:0;width:0}.choices__group{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1));padding:1rem .5rem .5rem}.choices__group:first-child{padding-top:.5rem}.choices__group:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.webkit-calendar-picker-indicator\:opacity-0::-webkit-calendar-picker-indicator{opacity:0}/*! Bundled license information: +input::-webkit-datetime-edit{display:block;padding:0}.cropper-container{-webkit-touch-callout:none;direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{inset:0;position:absolute}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.filepond--assistant{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--browser.filepond--browser{font-size:0;left:1em;margin:0;opacity:0;padding:0;position:absolute;top:1.75em;width:calc(100% - 2em)}.filepond--data{border:none;contain:strict;height:0;margin:0;padding:0;visibility:hidden;width:0}.filepond--data,.filepond--drip{pointer-events:none;position:absolute}.filepond--drip{background:#00000003;border-radius:.5em;inset:0;opacity:.1;overflow:hidden}.filepond--drip-blob{background:#292625;border-radius:50%;height:8em;margin-left:-4em;margin-top:-4em;transform-origin:center center;width:8em}.filepond--drip-blob,.filepond--drop-label{left:0;position:absolute;top:0;will-change:transform,opacity}.filepond--drop-label{align-items:center;color:#4f4f4f;display:flex;height:0;justify-content:center;margin:0;right:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;line-height:1.5;text-align:center}.filepond--label-action{-webkit-text-decoration-skip:ink;cursor:pointer;text-decoration:underline;text-decoration-color:#a7a4a4;text-decoration-skip-ink:auto}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{border:none;font-family:inherit;font-size:1em;height:1.625em;line-height:inherit;margin:0;outline:none;padding:0;width:1.625em;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--file-action-button.filepond--file-action-button svg{height:100%;width:100%}.filepond--file-action-button.filepond--file-action-button:after{content:"";inset:-.75em;position:absolute}.filepond--file-action-button{background-color:#00000080;background-image:none;border-radius:50%;box-shadow:0 0 #fff0;color:#fff;cursor:auto;transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em #ffffffe6}.filepond--file-action-button[disabled]{background-color:#00000040;color:#ffffff80}.filepond--file-action-button[hidden]{display:none}.filepond--file-info{align-items:flex-start;display:flex;flex:1;flex-direction:column;margin:0 .5em 0 0;min-width:0;pointer-events:none;position:static;-webkit-user-select:none;-moz-user-select:none;user-select:none;will-change:transform,opacity}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{align-items:flex-end;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;pointer-events:none;position:static;text-align:right;-webkit-user-select:none;-moz-user-select:none;user-select:none;will-change:transform,opacity}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;height:100%;margin:0;min-width:0;padding:0}.filepond--file-wrapper.filepond--file-wrapper>legend{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--file{align-items:flex-start;border-radius:.5em;color:#fff;display:flex;height:100%;padding:.5625em;position:static}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes shake{10%,90%{transform:translate(-.0625em)}20%,80%{transform:translate(.125em)}30%,50%,70%{transform:translate(-.25em)}40%,60%{transform:translate(.25em)}}@keyframes fall{0%{animation-timing-function:ease-out;opacity:0;transform:scale(.5)}70%{animation-timing-function:ease-in-out;opacity:1;transform:scale(1.1)}to{animation-timing-function:ease-out;transform:scale(1)}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:"";inset:0;position:absolute;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{left:0;margin:.25em;padding:0;position:absolute;right:0;top:0;touch-action:auto;will-change:transform,opacity;z-index:1}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em #00000040}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{box-shadow:0 0 0 transparent;transition:box-shadow .125s ease-in-out}.filepond--item[data-drag-state=drag]{cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em #00000053}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{left:0;margin:0;position:absolute;right:0;top:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);overflow-x:hidden;overflow-y:scroll}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#0000004d;border:.3125em solid transparent;border-radius:99999px}.filepond--list.filepond--list{list-style-type:none;margin:0;padding:0;position:absolute;top:0;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{height:100%;margin:0;max-width:none;width:100%}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{align-items:center;bottom:0;display:flex;height:auto;justify-content:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{height:100%;margin-bottom:0;margin-top:0;overflow:hidden}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{height:100%;left:0;right:0}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status,.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{background-color:#f1f0ef;border-radius:.5em}.filepond--panel{height:100%!important;left:0;margin:0;pointer-events:none;position:absolute;right:0;top:0}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{background-color:transparent!important;border:none!important;transform-style:preserve-3d}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{left:0;margin:0;padding:0;position:absolute;right:0;top:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom:none!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.filepond--panel-top:after{background-color:inherit;bottom:-1px;content:"";height:2px;left:0;position:absolute;right:0}.filepond--panel-bottom,.filepond--panel-center{backface-visibility:hidden;transform:translate3d(0,.5em,0);transform-origin:left top;will-change:transform}.filepond--panel-bottom{border-top:none!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.filepond--panel-bottom:before{background-color:inherit;content:"";height:2px;left:0;position:absolute;right:0;top:-1px}.filepond--panel-center{border-bottom:none!important;border-radius:0!important;border-top:none!important;height:100px!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{color:#fff;height:1.25em;margin:0;pointer-events:none;position:static;width:1.25em;will-change:transform,opacity}.filepond--progress-indicator svg{height:100%;transform-box:fill-box;vertical-align:top;width:100%}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;contain:layout style size;direction:ltr;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:450;line-height:normal;margin-bottom:1em;position:relative;text-align:left;text-rendering:optimizeLegibility}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-bottom:1em;margin-top:1em}.filepond--root .filepond--credits{bottom:-14px;color:inherit;font-size:11px;line-height:.85;opacity:.4;position:absolute;right:0;text-decoration:none;z-index:3}.filepond--root .filepond--credits[style]{bottom:auto;margin-top:14px;top:0}.filepond--action-edit-item.filepond--action-edit-item{height:2em;padding:.1875em;width:2em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{background:transparent;border:none;color:inherit;font-family:inherit;line-height:inherit;margin:0 0 0 .25em;outline:none;padding:0;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{height:1.3125em;width:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}.filepond--image-preview-markup{left:0;position:absolute;top:0}.filepond--image-preview-wrapper{z-index:2}.filepond--image-preview-overlay{display:block;left:0;margin:0;max-height:7rem;min-height:5rem;opacity:0;pointer-events:none;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:2}.filepond--image-preview-overlay svg{color:inherit;height:auto;max-height:inherit;width:100%}.filepond--image-preview-overlay-idle{color:#282828d9;mix-blend-mode:multiply}.filepond--image-preview-overlay-success{color:#369763;mix-blend-mode:normal}.filepond--image-preview-overlay-failure{color:#c44e47;mix-blend-mode:normal}@supports (-webkit-marquee-repetition:infinite) and ((-o-object-fit:fill) or (object-fit:fill)){.filepond--image-preview-overlay-idle{mix-blend-mode:normal}}.filepond--image-preview-wrapper{background:#00000003;border-radius:.45em;height:100%;left:0;margin:0;overflow:hidden;position:absolute;right:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.filepond--image-preview{align-items:center;background:#222;display:flex;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;will-change:transform,opacity;z-index:1}.filepond--image-clip{margin:0 auto;overflow:hidden;position:relative}.filepond--image-clip[data-transparency-indicator=grid] canvas,.filepond--image-clip[data-transparency-indicator=grid] img{background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0h50v50H0M50 50h50v50H50'/%3E%3C/svg%3E");background-size:1.25em 1.25em}.filepond--image-bitmap,.filepond--image-vector{left:0;position:absolute;top:0;will-change:transform}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview-wrapper{border-radius:0}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview{align-items:center;display:flex;height:100%;justify-content:center}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-wrapper{border-radius:99999rem}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-overlay{bottom:0;top:auto;transform:scaleY(-1)}.filepond--root[data-style-panel-layout~=circle] .filepond--file .filepond--file-action-button[data-align*=bottom]:not([data-align*=center]){margin-bottom:.325em}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=left]{left:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=right]{right:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=left],.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=right]{margin-bottom:.5125em}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=center]{margin-bottom:.1875em;margin-left:.1875em;margin-top:0}.filepond--media-preview audio{display:none}.filepond--media-preview .audioplayer{margin:2.3em auto auto;width:calc(100% - 1.4em)}.filepond--media-preview .playpausebtn{background-position:50%;background-repeat:no-repeat;border:none;border-radius:25px;cursor:pointer;float:left;height:25px;margin-right:.3em;margin-top:.3em;outline:none;width:25px}.filepond--media-preview .playpausebtn:hover{background-color:#00000080}.filepond--media-preview .play{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAyElEQVQ4T9XUsWoCQRRG4XPaFL5SfIy8gKYKBCysrax8Ahs7qzQ2qVIFOwsrsbEWLEK6EBFGBrIQhN2d3dnGgalm+Jh7789Ix8uOPe4YDCH0gZ66atKW0pJDCE/AEngDXtRjCpwCRucbGANzNVTBqWBhfAJDdV+GNgWj8wtM41bPt3AbsDB2f69d/0dzwC0wUDe54A8wAWbqJbfkD+BZPeQO5QsYqYu6LKb0MIb7VT3VYfG8CnwEHtT3FKi4c8e/TZMyk3LYFrwCgMdHFbRDKS8AAAAASUVORK5CYII=)}.filepond--media-preview .pause{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAh0lEQVQ4T+2UsQkCURBE30PLMbAMMResQrAPsQ0TK9AqDKxGZeTLD74aGNwlhzfZssvADDMrPcOe+RggYZIJcG2s2KinMidZAvu6u6uzT8u+JCeZArfmcKUeK+EaONTdQy23bxgJX8aPHvIHsSnVuzTx36rn2pQFsGuqN//ZlK7vbIDvq6vkJ9yteBXzecYbAAAAAElFTkSuQmCC)}.filepond--media-preview .timeline{background:#ffffff4d;border-radius:15px;float:left;height:3px;margin-top:1em;width:calc(100% - 2.5em)}.filepond--media-preview .playhead{background:#fff;border-radius:50%;height:13px;margin-top:-5px;width:13px}.filepond--media-preview-wrapper{background:#00000003;border-radius:.45em;height:100%;left:0;margin:0;overflow:hidden;pointer-events:auto;position:absolute;right:0;top:0}.filepond--media-preview-wrapper:before{background:linear-gradient(180deg,#000,#0000);content:" ";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#000000",endColorstr="#00000000",GradientType=0);height:2em;position:absolute;width:100%;z-index:3}.filepond--media-preview{display:block;height:100%;position:relative;transform-origin:center center;width:100%;will-change:transform,opacity;z-index:1}.filepond--media-preview audio,.filepond--media-preview video{width:100%;will-change:transform}.filepond--root{--tw-bg-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.1);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);margin-bottom:0}.filepond--root:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2);background-color:hsla(0,0%,100%,.05)}.filepond--root[data-disabled=disabled]{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.filepond--root[data-disabled=disabled]:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1);background-color:transparent}.filepond--panel-root{background-color:transparent}.filepond--drop-label label{--tw-text-opacity:1;color:rgba(var(--gray-600),var(--tw-text-opacity,1));font-size:.875rem;line-height:1.25rem;padding:.75rem!important}.filepond--drop-label label:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.filepond--label-action{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1));font-weight:500;text-decoration-line:none;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.filepond--label-action:hover{--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.filepond--label-action:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.filepond--label-action:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.filepond--drip-blob{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.filepond--drip-blob:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}.filepond--root[data-style-panel-layout=grid] .filepond--item{display:inline;width:calc(50% - .5rem)}@media (min-width:1024px){.filepond--root[data-style-panel-layout=grid] .filepond--item{width:calc(33.33% - .5rem)}}.filepond--download-icon{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));display:inline-block;height:1rem;margin-inline-end:.25rem;pointer-events:auto;vertical-align:bottom;width:1rem}.filepond--download-icon:hover{background-color:hsla(0,0%,100%,.7)}.filepond--download-icon{-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWRvd25sb2FkIj48cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNE03IDEwbDUgNSA1LTVNMTIgMTVWMyIvPjwvc3ZnPg==);mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWRvd25sb2FkIj48cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNE03IDEwbDUgNSA1LTVNMTIgMTVWMyIvPjwvc3ZnPg==);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}.filepond--open-icon{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));display:inline-block;height:1rem;margin-inline-end:.25rem;pointer-events:auto;vertical-align:bottom;width:1rem}.filepond--open-icon:hover{background-color:hsla(0,0%,100%,.7)}.filepond--open-icon{-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTBhMiAyIDAgMCAwIDItMnYtNE0xNCA0aDZtMCAwdjZtMC02TDEwIDE0Ii8+PC9zdmc+);mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTBhMiAyIDAgMCAwIDItMnYtNE0xNCA0aDZtMCAwdjZtMC02TDEwIDE0Ii8+PC9zdmc+);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}.filepond--file-action-button.filepond--action-edit-item{background-color:rgba(0,0,0,.5)}.cropper-drag-box.cropper-crop.cropper-modal{background-color:rgba(var(--gray-100),.5);opacity:1}.cropper-drag-box.cropper-crop.cropper-modal:is(.dark *){background-color:rgba(var(--gray-900),.8)}.fi-fo-file-upload-circle-cropper .cropper-face,.fi-fo-file-upload-circle-cropper .cropper-view-box{border-radius:50%}.CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}.CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{background:#7e7;border:0!important;width:auto}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{inset:-50px 0 0;overflow:hidden;position:absolute}.CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;overflow:hidden;position:relative}.CodeMirror-scroll{height:100%;margin-bottom:-50px;margin-right:-50px;outline:0;overflow:scroll!important;padding-bottom:50px;position:relative;z-index:0}.CodeMirror-sizer{border-right:50px solid transparent;position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{display:none;outline:0;position:absolute;z-index:6}.CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}.CodeMirror-scrollbar-filler{bottom:0;right:0}.CodeMirror-gutter-filler{bottom:0;left:0}.CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}.CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-50px;vertical-align:top;white-space:normal}.CodeMirror-gutter-wrapper{background:0 0!important;border:none!important;position:absolute;z-index:4}.CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}.CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{word-wrap:normal;-webkit-tap-highlight-color:transparent;background:0 0;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;z-index:2}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{inset:0;position:absolute;z-index:0}.CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.CodeMirror-cursor{pointer-events:none;position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:0 0}.EasyMDEContainer{display:block}.CodeMirror-rtl pre{direction:rtl}.EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}.EasyMDEContainer .CodeMirror{word-wrap:break-word;border:1px solid #ced4da;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;font:inherit;height:auto;padding:10px;z-index:0}.EasyMDEContainer .CodeMirror-scroll{cursor:text}.EasyMDEContainer .CodeMirror-fullscreen{background:#fff;border-bottom-right-radius:0!important;border-right:none!important;height:auto;inset:50px 0 0;position:fixed!important;z-index:8}.EasyMDEContainer .CodeMirror-sided{width:50%!important}.EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-bottom-right-radius:0;border-right:none!important;flex:1 1 auto;position:relative}.EasyMDEContainer .CodeMirror-placeholder{opacity:.5}.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}.editor-toolbar{border-left:1px solid #ced4da;border-right:1px solid #ced4da;border-top:1px solid #ced4da;border-top-left-radius:4px;border-top-right-radius:4px;padding:9px 10px;position:relative;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none}.editor-toolbar.fullscreen{background:#fff;border:0;box-sizing:border-box;height:50px;left:0;opacity:1;padding-bottom:10px;padding-top:10px;position:fixed;top:0;width:100%;z-index:9}.editor-toolbar.fullscreen:before{background:linear-gradient(90deg,#fff 0,#fff0);height:50px;left:0;margin:0;padding:0;position:fixed;top:0;width:20px}.editor-toolbar.fullscreen:after{background:linear-gradient(90deg,#fff0 0,#fff);height:50px;margin:0;padding:0;position:fixed;right:0;top:0;width:20px}.EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}.editor-toolbar .easymde-dropdown,.editor-toolbar button{background:0 0;border:1px solid transparent;border-radius:3px;cursor:pointer;display:inline-block;height:30px;margin:0;padding:0;text-align:center;text-decoration:none!important}.editor-toolbar button{font-weight:700;min-width:30px;padding:0 6px;white-space:nowrap}.editor-toolbar button.active,.editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar i.separator{border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;display:inline-block;margin:0 6px;text-indent:-10px;width:0}.editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;position:relative;top:2px;vertical-align:text-bottom}.editor-toolbar button.heading-1:after{content:"1"}.editor-toolbar button.heading-2:after{content:"2"}.editor-toolbar button.heading-3:after{content:"3"}.editor-toolbar button.heading-bigger:after{content:"\25b2"}.editor-toolbar button.heading-smaller:after{content:"\25bc"}.editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width:700px){.editor-toolbar i.no-mobile{display:none}}.editor-statusbar{color:#959694;font-size:12px;padding:8px 10px;text-align:right}.EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}.editor-statusbar span{display:inline-block;margin-left:1em;min-width:4em}.editor-statusbar .lines:before{content:"lines: "}.editor-statusbar .words:before{content:"words: "}.editor-statusbar .characters:before{content:"characters: "}.editor-preview-full{height:100%;left:0;position:absolute;top:0;width:100%;z-index:7}.editor-preview-full,.editor-preview-side{box-sizing:border-box;display:none;overflow:auto}.editor-preview-side{word-wrap:break-word;border:1px solid #ddd;bottom:0;position:fixed;right:0;top:50px;width:50%;z-index:9}.editor-preview-active-side{display:block}.EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}.editor-preview-active{display:block}.editor-preview{background:#fafafa;padding:10px}.editor-preview>p{margin-top:0}.editor-preview pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th{border:1px solid #ddd;padding:5px}.cm-s-easymde .cm-tag{color:#63a35c}.cm-s-easymde .cm-attribute{color:#795da3}.cm-s-easymde .cm-string{color:#183691}.cm-s-easymde .cm-header-1{font-size:calc(1.375rem + 1.5vw)}.cm-s-easymde .cm-header-2{font-size:calc(1.325rem + .9vw)}.cm-s-easymde .cm-header-3{font-size:calc(1.3rem + .6vw)}.cm-s-easymde .cm-header-4{font-size:calc(1.275rem + .3vw)}.cm-s-easymde .cm-header-5{font-size:1.25rem}.cm-s-easymde .cm-header-6{font-size:1rem}.cm-s-easymde .cm-header-1,.cm-s-easymde .cm-header-2,.cm-s-easymde .cm-header-3,.cm-s-easymde .cm-header-4,.cm-s-easymde .cm-header-5,.cm-s-easymde .cm-header-6{line-height:1.2;margin-bottom:.5rem}.cm-s-easymde .cm-comment{background:#0000000d;border-radius:2px}.cm-s-easymde .cm-link{color:#7f8c8d}.cm-s-easymde .cm-url{color:#aab2b3}.cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}.editor-toolbar .easymde-dropdown{border:1px solid #fff;border-radius:0;position:relative}.editor-toolbar .easymde-dropdown,.editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0 84%,#333 50% 100%)}.easymde-dropdown-content{background-color:#f9f9f9;box-shadow:0 8px 16px #0003;display:block;padding:8px;position:absolute;top:30px;visibility:hidden;z-index:2}.easymde-dropdown:active .easymde-dropdown-content,.easymde-dropdown:focus .easymde-dropdown-content,.easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}.easymde-dropdown-content button{display:block}span[data-img-src]:after{background-image:var(--bg-image);background-repeat:no-repeat;background-size:contain;content:"";display:block;height:0;max-height:100%;max-width:100%;padding-top:var(--height);width:var(--width)}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:#ff000026}:root{--color-cm-red:#991b1b;--color-cm-orange:#9a3412;--color-cm-amber:#92400e;--color-cm-yellow:#854d0e;--color-cm-lime:#3f6212;--color-cm-green:#166534;--color-cm-emerald:#065f46;--color-cm-teal:#115e59;--color-cm-cyan:#155e75;--color-cm-sky:#075985;--color-cm-blue:#1e40af;--color-cm-indigo:#3730a3;--color-cm-violet:#5b21b6;--color-cm-purple:#6b21a8;--color-cm-fuchsia:#86198f;--color-cm-pink:#9d174d;--color-cm-rose:#9f1239;--color-cm-gray:#18181b;--color-cm-gray-muted:#71717a;--color-cm-gray-background:#e4e4e7}.dark{--color-cm-red:#f87171;--color-cm-orange:#fb923c;--color-cm-amber:#fbbf24;--color-cm-yellow:#facc15;--color-cm-lime:#a3e635;--color-cm-green:#4ade80;--color-cm-emerald:#4ade80;--color-cm-teal:#2dd4bf;--color-cm-cyan:#22d3ee;--color-cm-sky:#38bdf8;--color-cm-blue:#60a5fa;--color-cm-indigo:#818cf8;--color-cm-violet:#a78bfa;--color-cm-purple:#c084fc;--color-cm-fuchsia:#e879f9;--color-cm-pink:#f472b6;--color-cm-rose:#fb7185;--color-cm-gray:#fafafa;--color-cm-gray-muted:#a1a1aa;--color-cm-gray-background:#52525b}.cm-s-easymde .cm-comment{background-color:transparent;color:var(--color-cm-gray-muted)}.EasyMDEContainer .CodeMirror-cursor{border-color:currentColor}.dark .EasyMDEContainer .cm-s-easymde span.CodeMirror-selectedtext{filter:invert(100%)}.EasyMDEContainer .cm-s-easymde .cm-keyword{color:var(--color-cm-violet)}.EasyMDEContainer .cm-s-easymde .cm-atom{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-number{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-def{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-variable{color:var(--color-cm-yellow)}.EasyMDEContainer .cm-s-easymde .cm-variable-2{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-variable-3{color:var(--color-cm-emerald)}.EasyMDEContainer .cm-s-easymde .cm-operator,.EasyMDEContainer .cm-s-easymde .cm-property{color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-string,.EasyMDEContainer .cm-s-easymde .cm-string-2{color:var(--color-cm-rose)}.EasyMDEContainer .cm-s-easymde .cm-meta{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-error{color:var(--color-cm-red)}.EasyMDEContainer .cm-s-easymde .cm-qualifier{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-builtin{color:var(--color-cm-violet)}.EasyMDEContainer .cm-s-easymde .cm-bracket{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-tag{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-attribute{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-hr{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-formatting-quote{color:var(--color-cm-sky)}.EasyMDEContainer .cm-s-easymde .cm-formatting-quote+.cm-quote{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-formatting-list,.EasyMDEContainer .cm-s-easymde .cm-formatting-list+.cm-variable-2,.EasyMDEContainer .cm-s-easymde .cm-tab+.cm-variable-2{color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-link{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-tag{color:var(--color-cm-red)}.EasyMDEContainer .cm-s-easymde .cm-attribute{color:var(--color-cm-amber)}.EasyMDEContainer .cm-s-easymde .cm-attribute+.cm-string{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-formatting-code+.cm-comment:not(.cm-formatting-code){background-color:var(--color-cm-gray-background);color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-header-1{font-size:1.875rem;line-height:2.25rem}.EasyMDEContainer .cm-s-easymde .cm-header-2{font-size:1.5rem;line-height:2rem}.EasyMDEContainer .cm-s-easymde .cm-header-3{font-size:1.25rem;line-height:1.75rem}.EasyMDEContainer .cm-s-easymde .cm-header-4{font-size:1.125rem;line-height:1.75rem}.EasyMDEContainer .cm-s-easymde .cm-header-5{font-size:1rem;line-height:1.5rem}.EasyMDEContainer .cm-s-easymde .cm-header-6{font-size:.875rem;line-height:1.25rem}.EasyMDEContainer .cm-s-easymde .cm-comment{background-image:none}.EasyMDEContainer .CodeMirror,.EasyMDEContainer .cm-s-easymde .cm-formatting-code-block,.EasyMDEContainer .cm-s-easymde .cm-tab+.cm-comment{background-color:transparent;color:inherit}.EasyMDEContainer .CodeMirror{border-style:none;padding:.375rem .75rem}.EasyMDEContainer .CodeMirror-scroll{height:auto}.EasyMDEContainer .editor-toolbar{--tw-border-opacity:1;border-color:rgba(var(--gray-200),var(--tw-border-opacity,1));border-radius:0;border-width:0 0 1px;-moz-column-gap:.25rem;column-gap:.25rem;display:flex;overflow-x:auto;padding:.5rem .625rem}.EasyMDEContainer .editor-toolbar:is(.dark *){border-color:hsla(0,0%,100%,.1)}.EasyMDEContainer .editor-toolbar button{border-radius:.5rem;border-style:none;cursor:pointer;display:grid;height:2rem;padding:0;place-content:center;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:2rem}.EasyMDEContainer .editor-toolbar button:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:hover:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button:focus-visible:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button.active{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button.active:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button:before{--tw-bg-opacity:1;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1));display:block;height:1.25rem;width:1.25rem}.EasyMDEContainer .editor-toolbar button:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:before{content:"";-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.EasyMDEContainer .editor-toolbar button.active:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button.active:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--primary-400),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar .separator{border-style:none;margin:0!important;width:.25rem}.EasyMDEContainer .editor-toolbar .bold:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M4 3a1 1 0 0 1 1-1h6a4.5 4.5 0 0 1 3.274 7.587A4.75 4.75 0 0 1 11.25 18H5a1 1 0 0 1-1-1V3Zm2.5 5.5v-4H11a2 2 0 1 1 0 4H6.5Zm0 2.5v4.5h4.75a2.25 2.25 0 0 0 0-4.5H6.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M4 3a1 1 0 0 1 1-1h6a4.5 4.5 0 0 1 3.274 7.587A4.75 4.75 0 0 1 11.25 18H5a1 1 0 0 1-1-1V3Zm2.5 5.5v-4H11a2 2 0 1 1 0 4H6.5Zm0 2.5v4.5h4.75a2.25 2.25 0 0 0 0-4.5H6.5Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .italic:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M8 2.75A.75.75 0 0 1 8.75 2h7.5a.75.75 0 0 1 0 1.5h-3.215l-4.483 13h2.698a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3.215l4.483-13H8.75A.75.75 0 0 1 8 2.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M8 2.75A.75.75 0 0 1 8.75 2h7.5a.75.75 0 0 1 0 1.5h-3.215l-4.483 13h2.698a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3.215l4.483-13H8.75A.75.75 0 0 1 8 2.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .strikethrough:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M11.617 3.963c-1.186-.318-2.418-.323-3.416.015-.992.336-1.49.91-1.642 1.476-.152.566-.007 1.313.684 2.1.528.6 1.273 1.1 2.128 1.446h7.879a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5h3.813a5.976 5.976 0 0 1-.447-.456C5.18 7.479 4.798 6.231 5.11 5.066c.312-1.164 1.268-2.055 2.61-2.509 1.336-.451 2.877-.42 4.286-.043.856.23 1.684.592 2.409 1.074a.75.75 0 1 1-.83 1.25 6.723 6.723 0 0 0-1.968-.875Zm1.909 8.123a.75.75 0 0 1 1.015.309c.53.99.607 2.062.18 3.01-.421.94-1.289 1.648-2.441 2.038-1.336.452-2.877.42-4.286.043-1.409-.377-2.759-1.121-3.69-2.18a.75.75 0 1 1 1.127-.99c.696.791 1.765 1.403 2.952 1.721 1.186.318 2.418.323 3.416-.015.853-.288 1.34-.756 1.555-1.232.21-.467.205-1.049-.136-1.69a.75.75 0 0 1 .308-1.014Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M11.617 3.963c-1.186-.318-2.418-.323-3.416.015-.992.336-1.49.91-1.642 1.476-.152.566-.007 1.313.684 2.1.528.6 1.273 1.1 2.128 1.446h7.879a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5h3.813a5.976 5.976 0 0 1-.447-.456C5.18 7.479 4.798 6.231 5.11 5.066c.312-1.164 1.268-2.055 2.61-2.509 1.336-.451 2.877-.42 4.286-.043.856.23 1.684.592 2.409 1.074a.75.75 0 1 1-.83 1.25 6.723 6.723 0 0 0-1.968-.875Zm1.909 8.123a.75.75 0 0 1 1.015.309c.53.99.607 2.062.18 3.01-.421.94-1.289 1.648-2.441 2.038-1.336.452-2.877.42-4.286.043-1.409-.377-2.759-1.121-3.69-2.18a.75.75 0 1 1 1.127-.99c.696.791 1.765 1.403 2.952 1.721 1.186.318 2.418.323 3.416-.015.853-.288 1.34-.756 1.555-1.232.21-.467.205-1.049-.136-1.69a.75.75 0 0 1 .308-1.014Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .link:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z'/%3E%3Cpath d='M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z'/%3E%3Cpath d='M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .heading:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M2.75 4a.75.75 0 0 1 .75.75v4.5h5v-4.5a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0v-4.5h-5v4.5a.75.75 0 0 1-1.5 0V4.75A.75.75 0 0 1 2.75 4ZM13 8.75a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 .75.75v5.75h1a.75.75 0 0 1 0 1.5h-3.5a.75.75 0 0 1 0-1.5h1v-5h-1a.75.75 0 0 1-.75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M2.75 4a.75.75 0 0 1 .75.75v4.5h5v-4.5a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0v-4.5h-5v4.5a.75.75 0 0 1-1.5 0V4.75A.75.75 0 0 1 2.75 4ZM13 8.75a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 .75.75v5.75h1a.75.75 0 0 1 0 1.5h-3.5a.75.75 0 0 1 0-1.5h1v-5h-1a.75.75 0 0 1-.75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .quote:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M10 2c-2.236 0-4.43.18-6.57.524C1.993 2.755 1 4.014 1 5.426v5.148c0 1.413.993 2.67 2.43 2.902 1.168.188 2.352.327 3.55.414.28.02.521.18.642.413l1.713 3.293a.75.75 0 0 0 1.33 0l1.713-3.293a.783.783 0 0 1 .642-.413 41.102 41.102 0 0 0 3.55-.414c1.437-.231 2.43-1.49 2.43-2.902V5.426c0-1.413-.993-2.67-2.43-2.902A41.289 41.289 0 0 0 10 2ZM6.75 6a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 2.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5h-3.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M10 2c-2.236 0-4.43.18-6.57.524C1.993 2.755 1 4.014 1 5.426v5.148c0 1.413.993 2.67 2.43 2.902 1.168.188 2.352.327 3.55.414.28.02.521.18.642.413l1.713 3.293a.75.75 0 0 0 1.33 0l1.713-3.293a.783.783 0 0 1 .642-.413 41.102 41.102 0 0 0 3.55-.414c1.437-.231 2.43-1.49 2.43-2.902V5.426c0-1.413-.993-2.67-2.43-2.902A41.289 41.289 0 0 0 10 2ZM6.75 6a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 2.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5h-3.5Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .code:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6.28 5.22a.75.75 0 0 1 0 1.06L2.56 10l3.72 3.72a.75.75 0 0 1-1.06 1.06L.97 10.53a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Zm7.44 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L17.44 10l-3.72-3.72a.75.75 0 0 1 0-1.06Zm-2.343-3.209a.75.75 0 0 1 .612.867l-2.5 14.5a.75.75 0 0 1-1.478-.255l2.5-14.5a.75.75 0 0 1 .866-.612Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6.28 5.22a.75.75 0 0 1 0 1.06L2.56 10l3.72 3.72a.75.75 0 0 1-1.06 1.06L.97 10.53a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Zm7.44 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L17.44 10l-3.72-3.72a.75.75 0 0 1 0-1.06Zm-2.343-3.209a.75.75 0 0 1 .612.867l-2.5 14.5a.75.75 0 0 1-1.478-.255l2.5-14.5a.75.75 0 0 1 .866-.612Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .unordered-list:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6 4.75A.75.75 0 0 1 6.75 4h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 4.75ZM6 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 10Zm0 5.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75a.75.75 0 0 1-.75-.75ZM1.99 4.75a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0 10.5a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0-5.25a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1V10Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6 4.75A.75.75 0 0 1 6.75 4h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 4.75ZM6 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 10Zm0 5.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75a.75.75 0 0 1-.75-.75ZM1.99 4.75a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0 10.5a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0-5.25a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1V10Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .ordered-list:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M3 1.25a.75.75 0 0 0 0 1.5h.25v2.5a.75.75 0 0 0 1.5 0V2A.75.75 0 0 0 4 1.25H3Zm-.03 7.404a3.5 3.5 0 0 1 1.524-.12.034.034 0 0 1-.012.012L2.415 9.579A.75.75 0 0 0 2 10.25v1c0 .414.336.75.75.75h2.5a.75.75 0 0 0 0-1.5H3.927l1.225-.613c.52-.26.848-.79.848-1.371 0-.647-.429-1.327-1.193-1.451a5.03 5.03 0 0 0-2.277.155.75.75 0 0 0 .44 1.434ZM7.75 3a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm-5.125-1.625a.75.75 0 0 0 0 1.5h1.5a.125.125 0 0 1 0 .25H3.5a.75.75 0 0 0 0 1.5h.625a.125.125 0 0 1 0 .25h-1.5a.75.75 0 0 0 0 1.5h1.5a1.625 1.625 0 0 0 1.37-2.5 1.625 1.625 0 0 0-1.37-2.5h-1.5Z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M3 1.25a.75.75 0 0 0 0 1.5h.25v2.5a.75.75 0 0 0 1.5 0V2A.75.75 0 0 0 4 1.25H3Zm-.03 7.404a3.5 3.5 0 0 1 1.524-.12.034.034 0 0 1-.012.012L2.415 9.579A.75.75 0 0 0 2 10.25v1c0 .414.336.75.75.75h2.5a.75.75 0 0 0 0-1.5H3.927l1.225-.613c.52-.26.848-.79.848-1.371 0-.647-.429-1.327-1.193-1.451a5.03 5.03 0 0 0-2.277.155.75.75 0 0 0 .44 1.434ZM7.75 3a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm-5.125-1.625a.75.75 0 0 0 0 1.5h1.5a.125.125 0 0 1 0 .25H3.5a.75.75 0 0 0 0 1.5h.625a.125.125 0 0 1 0 .25h-1.5a.75.75 0 0 0 0 1.5h1.5a1.625 1.625 0 0 0 1.37-2.5 1.625 1.625 0 0 0-1.37-2.5h-1.5Z'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .table:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .upload-image:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .undo:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M7.793 2.232a.75.75 0 0 1-.025 1.06L3.622 7.25h10.003a5.375 5.375 0 0 1 0 10.75H10.75a.75.75 0 0 1 0-1.5h2.875a3.875 3.875 0 0 0 0-7.75H3.622l4.146 3.957a.75.75 0 0 1-1.036 1.085l-5.5-5.25a.75.75 0 0 1 0-1.085l5.5-5.25a.75.75 0 0 1 1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M7.793 2.232a.75.75 0 0 1-.025 1.06L3.622 7.25h10.003a5.375 5.375 0 0 1 0 10.75H10.75a.75.75 0 0 1 0-1.5h2.875a3.875 3.875 0 0 0 0-7.75H3.622l4.146 3.957a.75.75 0 0 1-1.036 1.085l-5.5-5.25a.75.75 0 0 1 0-1.085l5.5-5.25a.75.75 0 0 1 1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .redo:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M12.207 2.232a.75.75 0 0 0 .025 1.06l4.146 3.958H6.375a5.375 5.375 0 0 0 0 10.75H9.25a.75.75 0 0 0 0-1.5H6.375a3.875 3.875 0 0 1 0-7.75h10.003l-4.146 3.957a.75.75 0 0 0 1.036 1.085l5.5-5.25a.75.75 0 0 0 0-1.085l-5.5-5.25a.75.75 0 0 0-1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M12.207 2.232a.75.75 0 0 0 .025 1.06l4.146 3.958H6.375a5.375 5.375 0 0 0 0 10.75H9.25a.75.75 0 0 0 0-1.5H6.375a3.875 3.875 0 0 1 0-7.75h10.003l-4.146 3.957a.75.75 0 0 0 1.036 1.085l5.5-5.25a.75.75 0 0 0 0-1.085l-5.5-5.25a.75.75 0 0 0-1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-statusbar{display:none}.fi-fo-rich-editor trix-toolbar .trix-dialogs{position:relative}.fi-fo-rich-editor trix-toolbar .trix-dialog{--tw-bg-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1));border-radius:.5rem;bottom:auto;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);left:0;padding:.5rem;position:absolute;right:0;top:1rem}.fi-fo-rich-editor trix-toolbar .trix-dialog:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-800),var(--tw-bg-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields{display:flex;flex-direction:column;gap:.5rem;width:100%}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group{display:flex;gap:.5rem}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.1);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.375rem;border-style:none;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);color:rgba(var(--gray-950),var(--tw-text-opacity,1));display:block;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;padding-bottom:.375rem;padding-inline-end:.75rem;padding-top:.375rem;padding-inline-start:.75rem;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *){--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-color:hsla(0,0%,100%,.2);background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1));color:rgb(255 255 255/var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:focus-within:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}@media (min-width:640px){.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input{font-size:.875rem;line-height:1.5rem}}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group .trix-button{--tw-bg-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-200),var(--tw-ring-opacity,1));background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);font-size:.75rem;line-height:1rem;padding:.125rem .5rem}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group .trix-button:is(.dark *){--tw-bg-opacity:1;--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-600),var(--tw-ring-opacity,1));background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))}.fi-fo-rich-editor trix-editor:empty:before{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-editor:empty:is(.dark *):before{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-editor:empty:before{content:attr(placeholder)}.fi-fo-rich-editor trix-editor.prose :where(ol):not(:where([class~=not-prose] *)),.fi-fo-rich-editor trix-editor.prose :where(ul):not(:where([class~=not-prose] *)){padding-inline-end:0!important;padding-inline-start:1.625em!important}.fi-fo-rich-editor trix-editor.prose :where(ul>li):not(:where([class~=not-prose] *)){padding-inline-end:0!important;padding-inline-start:.375em!important}select:not(.choices){background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E")}[dir=rtl] select{background-position:left .5rem center!important}.choices{outline:2px solid transparent;outline-offset:2px;position:relative}.choices [hidden]{display:none!important}.choices[data-type*=select-one] .has-no-choices{display:none}.choices[data-type*=select-one] .choices__input{display:block;margin:0;width:100%}.choices__inner{background-repeat:no-repeat;outline:2px solid transparent;outline-offset:2px;padding-bottom:.375rem;padding-inline-end:2rem;padding-top:.375rem;padding-inline-start:.75rem}@media (min-width:640px){.choices__inner{font-size:.875rem;line-height:1.5rem}}.choices__inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-size:1.5em 1.5em;&:has(.choices__button){padding-inline-end:3.5rem}}.choices.is-disabled .choices__inner{cursor:default}[dir=rtl] .choices__inner{background-position:left .5rem center}.choices__list--single{display:inline-block}.choices__list--single .choices__item{--tw-text-opacity:1;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.choices__list--single .choices__item:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices.is-disabled .choices__list--single .choices__item{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices.is-disabled .choices__list--single .choices__item:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__list--multiple{display:flex;flex-wrap:wrap;gap:.375rem}.choices__list--multiple:not(:empty){margin-bottom:.25rem;margin-left:-.25rem;margin-right:-.25rem;padding-bottom:.125rem;padding-top:.125rem}.choices__list--multiple .choices__item{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-inset:inset;--tw-ring-color:rgba(var(--primary-600),0.1);align-items:center;background-color:rgba(var(--primary-50),var(--tw-bg-opacity,1));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);color:rgba(var(--primary-600),var(--tw-text-opacity,1));display:inline-flex;font-size:.75rem;font-weight:500;gap:.25rem;line-height:1rem;padding:.25rem .5rem;word-break:break-all}.choices__list--multiple .choices__item:is(.dark *){--tw-text-opacity:1;--tw-ring-color:rgba(var(--primary-400),0.3);background-color:rgba(var(--primary-400),.1);color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.choices__list--dropdown,.choices__list[aria-expanded]{--tw-bg-opacity:1;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.05);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);display:none;font-size:.875rem;line-height:1.25rem;margin-top:.5rem;overflow:hidden;overflow-wrap:break-word;position:absolute;top:100%;width:100%;will-change:visibility;z-index:10}.choices__list--dropdown:is(.dark *),.choices__list[aria-expanded]:is(.dark *){--tw-bg-opacity:1;--tw-ring-color:hsla(0,0%,100%,.1);background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.is-active.choices__list--dropdown,.is-active.choices__list[aria-expanded]{display:block;padding:.25rem}.choices__list--dropdown .choices__list,.choices__list[aria-expanded] .choices__list{max-height:15rem;overflow:auto;will-change:scroll-position}.choices__item--choice{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1));padding:.5rem;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.choices__item--choice:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__item--choice.choices__item--selectable{--tw-text-opacity:1;border-radius:.375rem;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.choices__item--choice.choices__item--selectable:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices__list--dropdown .choices__item--selectable.is-highlighted,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.choices__list--dropdown .choices__item--selectable.is-highlighted:is(.dark *),.choices__list[aria-expanded] .choices__item--selectable.is-highlighted:is(.dark *){background-color:hsla(0,0%,100%,.05)}.choices__item{cursor:default}.choices__item--disabled{pointer-events:none}.choices__item--disabled:disabled{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__item--disabled:disabled:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices.is-disabled .choices__placeholder.choices__item,.choices__placeholder.choices__item{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1));cursor:default}.choices.is-disabled .choices__placeholder.choices__item:is(.dark *),.choices__placeholder.choices__item:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__button{background-color:transparent;background-position:50%;background-repeat:no-repeat;border-width:0;outline:2px solid transparent;outline-offset:2px;text-indent:-9999px}.choices[data-type*=select-one] .choices__button{height:1rem;inset-inline-end:0;margin-inline-end:2.25rem;opacity:.5;padding:0;position:absolute;transition-duration:75ms;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:1rem}.choices[data-type*=select-one] .choices__button:is(.dark *){opacity:.4}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=);background-size:.7142em .7142em;top:calc(50% - .5714em)}.dark .choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=)}.choices[data-type*=select-multiple] .choices__button{height:1rem;opacity:.5;width:1rem}.choices[data-type*=select-multiple] .choices__button:is(.dark *){opacity:.4}.choices[data-type*=select-multiple] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=);background-size:.7142em .7142em}.dark .choices[data-type*=select-multiple] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=)}.choices[data-type*=select-multiple] .choices__button:focus-visible,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=select-one] .choices__button:focus-visible,.choices[data-type*=select-one] .choices__button:hover{opacity:.7}.choices[data-type*=select-multiple] .choices__button:focus-visible:is(.dark *),.choices[data-type*=select-multiple] .choices__button:hover:is(.dark *),.choices[data-type*=select-one] .choices__button:focus-visible:is(.dark *),.choices[data-type*=select-one] .choices__button:hover:is(.dark *){opacity:.6}.choices.is-disabled .choices__button,.choices[data-type*=select-one] .choices__item[data-value=""] .choices__button{display:none}.choices__input{--tw-text-opacity:1;background-color:transparent!important;border-style:none;color:rgba(var(--gray-950),var(--tw-text-opacity,1));font-size:1rem!important;line-height:1.5rem!important;padding:0!important;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.choices__input::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__input::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__input:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.choices__input:disabled{--tw-text-opacity:1;-webkit-text-fill-color:rgba(var(--gray-500),1);color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices__input:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:disabled:is(.dark *){--tw-text-opacity:1;-webkit-text-fill-color:rgba(var(--gray-400),1);color:rgba(var(--gray-400),var(--tw-text-opacity,1))}@media (min-width:640px){.choices__input{font-size:.875rem!important;line-height:1.5rem}}.choices__list--dropdown .choices__input{padding:.5rem!important}.choices__input::-webkit-search-cancel-button,.choices__input::-webkit-search-decoration,.choices__input::-webkit-search-results-button,.choices__input::-webkit-search-results-decoration{display:none}.choices__input::-ms-clear,.choices__input::-ms-reveal{display:none;height:0;width:0}.choices__group{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1));padding:1rem .5rem .5rem}.choices__group:first-child{padding-top:.5rem}.choices__group:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.webkit-calendar-picker-indicator\:opacity-0::-webkit-calendar-picker-indicator{opacity:0}/*! Bundled license information: cropperjs/dist/cropper.min.css: (*! diff --git a/public/css/filament/server/console.css b/public/css/filament/server/console.css index 756897334..51c2d8957 100644 --- a/public/css/filament/server/console.css +++ b/public/css/filament/server/console.css @@ -1,3 +1,4 @@ + #terminal { border-top-left-radius: 10px; border-top-right-radius: 10px; @@ -14,7 +15,7 @@ padding-right: 10px; } -input:read-only { +#send-command:read-only { cursor: not-allowed; } diff --git a/public/js/filament/filament/echo.js b/public/js/filament/filament/echo.js index ae6d56dd2..65edaf5eb 100644 --- a/public/js/filament/filament/echo.js +++ b/public/js/filament/filament/echo.js @@ -1,4 +1,4 @@ -(()=>{var Ci=Object.create;var he=Object.defineProperty;var Ti=Object.getOwnPropertyDescriptor;var Pi=Object.getOwnPropertyNames;var xi=Object.getPrototypeOf,Oi=Object.prototype.hasOwnProperty;var Ai=(l,h)=>()=>(h||l((h={exports:{}}).exports,h),h.exports);var Ei=(l,h,a,c)=>{if(h&&typeof h=="object"||typeof h=="function")for(let s of Pi(h))!Oi.call(l,s)&&s!==a&&he(l,s,{get:()=>h[s],enumerable:!(c=Ti(h,s))||c.enumerable});return l};var Li=(l,h,a)=>(a=l!=null?Ci(xi(l)):{},Ei(h||!l||!l.__esModule?he(a,"default",{value:l,enumerable:!0}):a,l));var me=Ai((vt,It)=>{(function(h,a){typeof vt=="object"&&typeof It=="object"?It.exports=a():typeof define=="function"&&define.amd?define([],a):typeof vt=="object"?vt.Pusher=a():h.Pusher=a()})(window,function(){return function(l){var h={};function a(c){if(h[c])return h[c].exports;var s=h[c]={i:c,l:!1,exports:{}};return l[c].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=l,a.c=h,a.d=function(c,s,f){a.o(c,s)||Object.defineProperty(c,s,{enumerable:!0,get:f})},a.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},a.t=function(c,s){if(s&1&&(c=a(c)),s&8||s&4&&typeof c=="object"&&c&&c.__esModule)return c;var f=Object.create(null);if(a.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:c}),s&2&&typeof c!="string")for(var d in c)a.d(f,d,function(N){return c[N]}.bind(null,d));return f},a.n=function(c){var s=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(s,"a",s),s},a.o=function(c,s){return Object.prototype.hasOwnProperty.call(c,s)},a.p="",a(a.s=2)}([function(l,h,a){"use strict";var c=this&&this.__extends||function(){var b=function(v,y){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,O){w.__proto__=O}||function(w,O){for(var I in O)O.hasOwnProperty(I)&&(w[I]=O[I])},b(v,y)};return function(v,y){b(v,y);function w(){this.constructor=v}v.prototype=y===null?Object.create(y):(w.prototype=y.prototype,new w)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=256,f=function(){function b(v){v===void 0&&(v="="),this._paddingCharacter=v}return b.prototype.encodedLength=function(v){return this._paddingCharacter?(v+2)/3*4|0:(v*8+5)/6|0},b.prototype.encode=function(v){for(var y="",w=0;w>>3*6&63),y+=this._encodeByte(O>>>2*6&63),y+=this._encodeByte(O>>>1*6&63),y+=this._encodeByte(O>>>0*6&63)}var I=v.length-w;if(I>0){var O=v[w]<<16|(I===2?v[w+1]<<8:0);y+=this._encodeByte(O>>>3*6&63),y+=this._encodeByte(O>>>2*6&63),I===2?y+=this._encodeByte(O>>>1*6&63):y+=this._paddingCharacter||"",y+=this._paddingCharacter||""}return y},b.prototype.maxDecodedLength=function(v){return this._paddingCharacter?v/4*3|0:(v*6+7)/8|0},b.prototype.decodedLength=function(v){return this.maxDecodedLength(v.length-this._getPaddingLength(v))},b.prototype.decode=function(v){if(v.length===0)return new Uint8Array(0);for(var y=this._getPaddingLength(v),w=v.length-y,O=new Uint8Array(this.maxDecodedLength(w)),I=0,q=0,M=0,J=0,F=0,z=0,B=0;q>>4,O[I++]=F<<4|z>>>2,O[I++]=z<<6|B,M|=J&s,M|=F&s,M|=z&s,M|=B&s;if(q>>4,M|=J&s,M|=F&s),q>>2,M|=z&s),q>>8&0-65-26+97,y+=51-v>>>8&26-97-52+48,y+=61-v>>>8&52-48-62+43,y+=62-v>>>8&62-43-63+47,String.fromCharCode(y)},b.prototype._decodeChar=function(v){var y=s;return y+=(42-v&v-44)>>>8&-s+v-43+62,y+=(46-v&v-48)>>>8&-s+v-47+63,y+=(47-v&v-58)>>>8&-s+v-48+52,y+=(64-v&v-91)>>>8&-s+v-65+0,y+=(96-v&v-123)>>>8&-s+v-97+26,y},b.prototype._getPaddingLength=function(v){var y=0;if(this._paddingCharacter){for(var w=v.length-1;w>=0&&v[w]===this._paddingCharacter;w--)y++;if(v.length<4||y>2)throw new Error("Base64Coder: incorrect padding")}return y},b}();h.Coder=f;var d=new f;function N(b){return d.encode(b)}h.encode=N;function P(b){return d.decode(b)}h.decode=P;var T=function(b){c(v,b);function v(){return b!==null&&b.apply(this,arguments)||this}return v.prototype._encodeByte=function(y){var w=y;return w+=65,w+=25-y>>>8&0-65-26+97,w+=51-y>>>8&26-97-52+48,w+=61-y>>>8&52-48-62+45,w+=62-y>>>8&62-45-63+95,String.fromCharCode(w)},v.prototype._decodeChar=function(y){var w=s;return w+=(44-y&y-46)>>>8&-s+y-45+62,w+=(94-y&y-96)>>>8&-s+y-95+63,w+=(47-y&y-58)>>>8&-s+y-48+52,w+=(64-y&y-91)>>>8&-s+y-65+0,w+=(96-y&y-123)>>>8&-s+y-97+26,w},v}(f);h.URLSafeCoder=T;var S=new T;function C(b){return S.encode(b)}h.encodeURLSafe=C;function x(b){return S.decode(b)}h.decodeURLSafe=x,h.encodedLength=function(b){return d.encodedLength(b)},h.maxDecodedLength=function(b){return d.maxDecodedLength(b)},h.decodedLength=function(b){return d.decodedLength(b)}},function(l,h,a){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var c="utf8: invalid string",s="utf8: invalid source encoding";function f(P){for(var T=new Uint8Array(d(P)),S=0,C=0;C>6,T[S++]=128|x&63):x<55296?(T[S++]=224|x>>12,T[S++]=128|x>>6&63,T[S++]=128|x&63):(C++,x=(x&1023)<<10,x|=P.charCodeAt(C)&1023,x+=65536,T[S++]=240|x>>18,T[S++]=128|x>>12&63,T[S++]=128|x>>6&63,T[S++]=128|x&63)}return T}h.encode=f;function d(P){for(var T=0,S=0;S=P.length-1)throw new Error(c);S++,T+=4}else throw new Error(c)}return T}h.encodedLength=d;function N(P){for(var T=[],S=0;S=P.length)throw new Error(s);var b=P[++S];if((b&192)!==128)throw new Error(s);C=(C&31)<<6|b&63,x=128}else if(C<240){if(S>=P.length-1)throw new Error(s);var b=P[++S],v=P[++S];if((b&192)!==128||(v&192)!==128)throw new Error(s);C=(C&15)<<12|(b&63)<<6|v&63,x=2048}else if(C<248){if(S>=P.length-2)throw new Error(s);var b=P[++S],v=P[++S],y=P[++S];if((b&192)!==128||(v&192)!==128||(y&192)!==128)throw new Error(s);C=(C&15)<<18|(b&63)<<12|(v&63)<<6|y&63,x=65536}else throw new Error(s);if(C=55296&&C<=57343)throw new Error(s);if(C>=65536){if(C>1114111)throw new Error(s);C-=65536,T.push(String.fromCharCode(55296|C>>10)),C=56320|C&1023}}T.push(String.fromCharCode(C))}return T.join("")}h.decode=N},function(l,h,a){l.exports=a(3).default},function(l,h,a){"use strict";a.r(h);var c=function(){function e(t,n){this.lastId=0,this.prefix=t,this.name=n}return e.prototype.create=function(t){this.lastId++;var n=this.lastId,r=this.prefix+n,i=this.name+"["+n+"]",o=!1,u=function(){o||(t.apply(null,arguments),o=!0)};return this[n]=u,{number:n,id:r,name:i,callback:u}},e.prototype.remove=function(t){delete this[t.number]},e}(),s=new c("_pusher_script_","Pusher.ScriptReceivers"),f={VERSION:"7.6.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},d=f,N=function(){function e(t){this.options=t,this.receivers=t.receivers||s,this.loading={}}return e.prototype.load=function(t,n,r){var i=this;if(i.loading[t]&&i.loading[t].length>0)i.loading[t].push(r);else{i.loading[t]=[r];var o=m.createScriptRequest(i.getPath(t,n)),u=i.receivers.create(function(p){if(i.receivers.remove(u),i.loading[t]){var _=i.loading[t];delete i.loading[t];for(var g=function(E){E||o.cleanup()},k=0;k<_.length;k++)_[k](p,g)}});o.send(u)}},e.prototype.getRoot=function(t){var n,r=m.getDocument().location.protocol;return t&&t.useTLS||r==="https:"?n=this.options.cdn_https:n=this.options.cdn_http,n.replace(/\/*$/,"")+"/"+this.options.version},e.prototype.getPath=function(t,n){return this.getRoot(n)+"/"+t+this.options.suffix+".js"},e}(),P=N,T=new c("_pusher_dependencies","Pusher.DependenciesReceivers"),S=new P({cdn_http:d.cdn_http,cdn_https:d.cdn_https,version:d.VERSION,suffix:d.dependency_suffix,receivers:T}),C={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},x=function(e){var t="See:",n=C.urls[e];if(!n)return"";var r;return n.fullUrl?r=n.fullUrl:n.path&&(r=C.baseUrl+n.path),r?t+" "+r:""},b={buildLogSuffix:x},v;(function(e){e.UserAuthentication="user-authentication",e.ChannelAuthorization="channel-authorization"})(v||(v={}));var y=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),O=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),I=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),q=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),M=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),J=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),F=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),z=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),B=function(e){y(t,e);function t(n,r){var i=this.constructor,o=e.call(this,r)||this;return o.status=n,Object.setPrototypeOf(o,i.prototype),o}return t}(Error),ke=function(e,t,n,r,i){var o=m.createXHR();o.open("POST",n.endpoint,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var u in n.headers)o.setRequestHeader(u,n.headers[u]);if(n.headersProvider!=null){var p=n.headersProvider();for(var u in p)o.setRequestHeader(u,p[u])}return o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200){var _=void 0,g=!1;try{_=JSON.parse(o.responseText),g=!0}catch{i(new B(200,"JSON returned from "+r.toString()+" endpoint was invalid, yet status code was 200. Data was: "+o.responseText),null)}g&&i(null,_)}else{var k="";switch(r){case v.UserAuthentication:k=b.buildLogSuffix("authenticationEndpoint");break;case v.ChannelAuthorization:k="Clients must be authorized to join private or presence channels. "+b.buildLogSuffix("authorizationEndpoint");break}i(new B(o.status,"Unable to retrieve auth string from "+r.toString()+" endpoint - "+("received status: "+o.status+" from "+n.endpoint+". "+k)),null)}},o.send(t),o},Se=ke;function Ce(e){return Ee(Oe(e))}for(var nt=String.fromCharCode,Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te={},ct=0,Pe=Z.length;ct>>6)+nt(128|t&63):nt(224|t>>>12&15)+nt(128|t>>>6&63)+nt(128|t&63)},Oe=function(e){return e.replace(/[^\x00-\x7F]/g,xe)},Ae=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),r=[Z.charAt(n>>>18),Z.charAt(n>>>12&63),t>=2?"=":Z.charAt(n>>>6&63),t>=1?"=":Z.charAt(n&63)];return r.join("")},Ee=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,Ae)},Le=function(){function e(t,n,r,i){var o=this;this.clear=n,this.timer=t(function(){o.timer&&(o.timer=i(o.timer))},r)}return e.prototype.isRunning=function(){return this.timer!==null},e.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},e}(),jt=Le,Nt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();function Re(e){window.clearTimeout(e)}function Ie(e){window.clearInterval(e)}var Q=function(e){Nt(t,e);function t(n,r){return e.call(this,setTimeout,Re,n,function(i){return r(),null})||this}return t}(jt),je=function(e){Nt(t,e);function t(n,r){return e.call(this,setInterval,Ie,n,function(i){return r(),i})||this}return t}(jt),Ne={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(e){return new Q(0,e)},method:function(e){for(var t=[],n=1;n0)for(var i=0;i=1002&&e.code<=1004?"backoff":null:e.code===4e3?"tls_only":e.code<4100?"refused":e.code<4200?"backoff":e.code<4300?"retry":"refused"},getCloseError:function(e){return e.code!==1e3&&e.code!==1001?{type:"PusherError",data:{code:e.code,message:e.reason||e.message}}:null}},K=Vt,Cn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tn=function(e){Cn(t,e);function t(n,r){var i=e.call(this)||this;return i.id=n,i.transport=r,i.activityTimeout=r.activityTimeout,i.bindListeners(),i}return t.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},t.prototype.send=function(n){return this.transport.send(n)},t.prototype.send_event=function(n,r,i){var o={event:n,data:r};return i&&(o.channel=i),A.debug("Event sent",o),this.send(K.encodeMessage(o))},t.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},t.prototype.close=function(){this.transport.close()},t.prototype.bindListeners=function(){var n=this,r={message:function(o){var u;try{u=K.decodeMessage(o)}catch(p){n.emit("error",{type:"MessageParseError",error:p,data:o.data})}if(u!==void 0){switch(A.debug("Event recd",u),u.event){case"pusher:error":n.emit("error",{type:"PusherError",data:u.data});break;case"pusher:ping":n.emit("ping");break;case"pusher:pong":n.emit("pong");break}n.emit("message",u)}},activity:function(){n.emit("activity")},error:function(o){n.emit("error",o)},closed:function(o){i(),o&&o.code&&n.handleCloseEvent(o),n.transport=null,n.emit("closed")}},i=function(){W(r,function(o,u){n.transport.unbind(u,o)})};W(r,function(o,u){n.transport.bind(u,o)})},t.prototype.handleCloseEvent=function(n){var r=K.getCloseAction(n),i=K.getCloseError(n);i&&this.emit("error",i),r&&this.emit(r,{action:r,error:i})},t}(V),Pn=Tn,xn=function(){function e(t,n){this.transport=t,this.callback=n,this.bindListeners()}return e.prototype.close=function(){this.unbindListeners(),this.transport.close()},e.prototype.bindListeners=function(){var t=this;this.onMessage=function(n){t.unbindListeners();var r;try{r=K.processHandshake(n)}catch(i){t.finish("error",{error:i}),t.transport.close();return}r.action==="connected"?t.finish("connected",{connection:new Pn(r.id,t.transport),activityTimeout:r.activityTimeout}):(t.finish(r.action,{error:r.error}),t.transport.close())},this.onClosed=function(n){t.unbindListeners();var r=K.getCloseAction(n)||"backoff",i=K.getCloseError(n);t.finish(r,{error:i})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},e.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},e.prototype.finish=function(t,n){this.callback(U({transport:this.transport,action:t},n))},e}(),On=xn,An=function(){function e(t,n){this.timeline=t,this.options=n||{}}return e.prototype.send=function(t,n){this.timeline.isEmpty()||this.timeline.send(m.TimelineTransport.getAgent(this,t),n)},e}(),En=An,Ln=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rn=function(e){Ln(t,e);function t(n,r){var i=e.call(this,function(o,u){A.debug("No callbacks on "+n+" for "+o)})||this;return i.name=n,i.pusher=r,i.subscribed=!1,i.subscriptionPending=!1,i.subscriptionCancelled=!1,i}return t.prototype.authorize=function(n,r){return r(null,{auth:""})},t.prototype.trigger=function(n,r){if(n.indexOf("client-")!==0)throw new w("Event '"+n+"' does not start with 'client-'");if(!this.subscribed){var i=b.buildLogSuffix("triggeringClientEvents");A.warn("Client event triggered before channel 'subscription_succeeded' event . "+i)}return this.pusher.send_event(n,r,this.name)},t.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},t.prototype.handleEvent=function(n){var r=n.event,i=n.data;if(r==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(n);else if(r==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(n);else if(r.indexOf("pusher_internal:")!==0){var o={};this.emit(r,i,o)}},t.prototype.handleSubscriptionSucceededEvent=function(n){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",n.data)},t.prototype.handleSubscriptionCountEvent=function(n){n.data.subscription_count&&(this.subscriptionCount=n.data.subscription_count),this.emit("pusher:subscription_count",n.data)},t.prototype.subscribe=function(){var n=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(r,i){r?(n.subscriptionPending=!1,A.error(r.toString()),n.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:r.message},r instanceof B?{status:r.status}:{}))):n.pusher.send_event("pusher:subscribe",{auth:i.auth,channel_data:i.channel_data,channel:n.name})}))},t.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},t.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},t.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},t}(V),bt=Rn,In=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jn=function(e){In(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.authorize=function(n,r){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:n},r)},t}(bt),mt=jn,Nn=function(){function e(){this.reset()}return e.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null},e.prototype.each=function(t){var n=this;W(this.members,function(r,i){t(n.get(i))})},e.prototype.setMyID=function(t){this.myID=t},e.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},e.prototype.addMember=function(t){return this.get(t.user_id)===null&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)},e.prototype.removeMember=function(t){var n=this.get(t.user_id);return n&&(delete this.members[t.user_id],this.count--),n},e.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},e}(),qn=Nn,Un=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(u){u(o)})}return new(n||(n=Promise))(function(o,u){function p(k){try{g(r.next(k))}catch(E){u(E)}}function _(k){try{g(r.throw(k))}catch(E){u(E)}}function g(k){k.done?o(k.value):i(k.value).then(p,_)}g((r=r.apply(e,t||[])).next())})},Hn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function p(g){return function(k){return _([g,k])}}function _(g){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=g[0]&2?i.return:g[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,g[1])).done)return o;switch(i=0,o&&(g=[g[0]&2,o.value]),g[0]){case 0:case 1:o=g;break;case 4:return n.label++,{value:g[1],done:!1};case 5:n.label++,i=g[1],g=[0];continue;case 7:g=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(g[0]===6||g[0]===2)){n=0;continue}if(g[0]===3&&(!o||g[1]>o[0]&&g[1]0&&this.emit("connecting_in",Math.round(n/1e3)),this.retryTimer=new Q(n||0,function(){r.disconnectInternally(),r.connect()})},t.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},t.prototype.setUnavailableTimer=function(){var n=this;this.unavailableTimer=new Q(this.options.unavailableTimeout,function(){n.updateState("unavailable")})},t.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},t.prototype.sendActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Q(this.options.pongTimeout,function(){n.timeline.error({pong_timed_out:n.options.pongTimeout}),n.retryIn(0)})},t.prototype.resetActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Q(this.activityTimeout,function(){n.sendActivityCheck()}))},t.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},t.prototype.buildConnectionCallbacks=function(n){var r=this;return U({},n,{message:function(i){r.resetActivityCheck(),r.emit("message",i)},ping:function(){r.send_event("pusher:pong",{})},activity:function(){r.resetActivityCheck()},error:function(i){r.emit("error",i)},closed:function(){r.abandonConnection(),r.shouldRetry()&&r.retryIn(1e3)}})},t.prototype.buildHandshakeCallbacks=function(n){var r=this;return U({},n,{connected:function(i){r.activityTimeout=Math.min(r.options.activityTimeout,i.activityTimeout,i.connection.activityTimeout||1/0),r.clearUnavailableTimer(),r.setConnection(i.connection),r.socket_id=r.connection.id,r.updateState("connected",{socket_id:r.socket_id})}})},t.prototype.buildErrorCallbacks=function(){var n=this,r=function(i){return function(o){o.error&&n.emit("error",{type:"WebSocketError",error:o.error}),i(o)}};return{tls_only:r(function(){n.usingTLS=!0,n.updateStrategy(),n.retryIn(0)}),refused:r(function(){n.disconnect()}),backoff:r(function(){n.retryIn(1e3)}),retry:r(function(){n.retryIn(0)})}},t.prototype.setConnection=function(n){this.connection=n;for(var r in this.connectionCallbacks)this.connection.bind(r,this.connectionCallbacks[r]);this.resetActivityCheck()},t.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var n in this.connectionCallbacks)this.connection.unbind(n,this.connectionCallbacks[n]);var r=this.connection;return this.connection=null,r}},t.prototype.updateState=function(n,r){var i=this.state;if(this.state=n,i!==n){var o=n;o==="connected"&&(o+=" with new socket ID "+r.socket_id),A.debug("State changed",i+" -> "+o),this.timeline.info({state:n,params:r}),this.emit("state_change",{previous:i,current:n}),this.emit(n,r)}},t.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},t}(V),Gn=Vn,Qn=function(){function e(){this.channels={}}return e.prototype.add=function(t,n){return this.channels[t]||(this.channels[t]=Yn(t,n)),this.channels[t]},e.prototype.all=function(){return Ue(this.channels)},e.prototype.find=function(t){return this.channels[t]},e.prototype.remove=function(t){var n=this.channels[t];return delete this.channels[t],n},e.prototype.disconnect=function(){W(this.channels,function(t){t.disconnect()})},e}(),Kn=Qn;function Yn(e,t){if(e.indexOf("private-encrypted-")===0){if(t.config.nacl)return G.createEncryptedChannel(e,t,t.config.nacl);var n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",r=b.buildLogSuffix("encryptedChannelSupport");throw new J(n+". "+r)}else{if(e.indexOf("private-")===0)return G.createPrivateChannel(e,t);if(e.indexOf("presence-")===0)return G.createPresenceChannel(e,t);if(e.indexOf("#")===0)throw new O('Cannot create a channel with name "'+e+'".');return G.createChannel(e,t)}}var $n={createChannels:function(){return new Kn},createConnectionManager:function(e,t){return new Gn(e,t)},createChannel:function(e,t){return new bt(e,t)},createPrivateChannel:function(e,t){return new mt(e,t)},createPresenceChannel:function(e,t){return new zn(e,t)},createEncryptedChannel:function(e,t,n){return new Jn(e,t,n)},createTimelineSender:function(e,t){return new En(e,t)},createHandshake:function(e,t){return new On(e,t)},createAssistantToTheTransportManager:function(e,t,n){return new Sn(e,t,n)}},G=$n,Zn=function(){function e(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return e.prototype.getAssistant=function(t){return G.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},e.prototype.isAlive=function(){return this.livesLeft>0},e.prototype.reportDeath=function(){this.livesLeft-=1},e}(),Gt=Zn,tr=function(){function e(t,n){this.strategies=t,this.loop=!!n.loop,this.failFast=!!n.failFast,this.timeout=n.timeout,this.timeoutLimit=n.timeoutLimit}return e.prototype.isSupported=function(){return zt(this.strategies,j.method("isSupported"))},e.prototype.connect=function(t,n){var r=this,i=this.strategies,o=0,u=this.timeout,p=null,_=function(g,k){k?n(null,k):(o=o+1,r.loop&&(o=o%i.length),o0&&(o=new Q(r.timeout,function(){u.abort(),i(!0)})),u=t.connect(n,function(p,_){p&&o&&o.isRunning()&&!r.failFast||(o&&o.ensureAborted(),i(p,_))}),{abort:function(){o&&o.ensureAborted(),u.abort()},forceMinPriority:function(p){u.forceMinPriority(p)}}},e}(),Y=tr,er=function(){function e(t){this.strategies=t}return e.prototype.isSupported=function(){return zt(this.strategies,j.method("isSupported"))},e.prototype.connect=function(t,n){return nr(this.strategies,t,function(r,i){return function(o,u){if(i[r].error=o,o){rr(i)&&n(!0);return}rt(i,function(p){p.forceMinPriority(u.transport.priority)}),n(null,u)}})},e}(),kt=er;function nr(e,t,n){var r=Dt(e,function(i,o,u,p){return i.connect(t,n(o,p))});return{abort:function(){rt(r,ir)},forceMinPriority:function(i){rt(r,function(o){o.forceMinPriority(i)})}}}function rr(e){return Me(e,function(t){return!!t.error})}function ir(e){!e.error&&!e.aborted&&(e.abort(),e.aborted=!0)}var or=function(){function e(t,n,r){this.strategy=t,this.transports=n,this.ttl=r.ttl||1800*1e3,this.usingTLS=r.useTLS,this.timeline=r.timeline}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.usingTLS,i=ar(r),o=[this.strategy];if(i&&i.timestamp+this.ttl>=j.now()){var u=this.transports[i.transport];u&&(this.timeline.info({cached:!0,transport:i.transport,latency:i.latency}),o.push(new Y([u],{timeout:i.latency*2+1e3,failFast:!0})))}var p=j.now(),_=o.pop().connect(t,function g(k,E){k?(Qt(r),o.length>0?(p=j.now(),_=o.pop().connect(t,g)):n(k)):(cr(r,E.transport.name,j.now()-p),n(null,E))});return{abort:function(){_.abort()},forceMinPriority:function(g){t=g,_&&_.forceMinPriority(g)}}},e}(),sr=or;function St(e){return"pusherTransport"+(e?"TLS":"NonTLS")}function ar(e){var t=m.getLocalStorage();if(t)try{var n=t[St(e)];if(n)return JSON.parse(n)}catch{Qt(e)}return null}function cr(e,t,n){var r=m.getLocalStorage();if(r)try{r[St(e)]=ut({timestamp:j.now(),transport:t,latency:n})}catch{}}function Qt(e){var t=m.getLocalStorage();if(t)try{delete t[St(e)]}catch{}}var ur=function(){function e(t,n){var r=n.delay;this.strategy=t,this.options={delay:r}}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.strategy,i,o=new Q(this.options.delay,function(){i=r.connect(t,n)});return{abort:function(){o.ensureAborted(),i&&i.abort()},forceMinPriority:function(u){t=u,i&&i.forceMinPriority(u)}}},e}(),lt=ur,hr=function(){function e(t,n,r){this.test=t,this.trueBranch=n,this.falseBranch=r}return e.prototype.isSupported=function(){var t=this.test()?this.trueBranch:this.falseBranch;return t.isSupported()},e.prototype.connect=function(t,n){var r=this.test()?this.trueBranch:this.falseBranch;return r.connect(t,n)},e}(),it=hr,lr=function(){function e(t){this.strategy=t}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.strategy.connect(t,function(i,o){o&&r.abort(),n(i,o)});return r},e}(),fr=lr;function ot(e){return function(){return e.isSupported()}}var pr=function(e,t,n){var r={};function i(ce,mi,wi,ki,Si){var ue=n(e,ce,mi,wi,ki,Si);return r[ce]=ue,ue}var o=Object.assign({},t,{hostNonTLS:e.wsHost+":"+e.wsPort,hostTLS:e.wsHost+":"+e.wssPort,httpPath:e.wsPath}),u=Object.assign({},o,{useTLS:!0}),p=Object.assign({},t,{hostNonTLS:e.httpHost+":"+e.httpPort,hostTLS:e.httpHost+":"+e.httpsPort,httpPath:e.httpPath}),_={loop:!0,timeout:15e3,timeoutLimit:6e4},g=new Gt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),k=new Gt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),E=i("ws","ws",3,o,g),X=i("wss","ws",3,u,g),vi=i("sockjs","sockjs",1,p),ne=i("xhr_streaming","xhr_streaming",1,p,k),yi=i("xdr_streaming","xdr_streaming",1,p,k),re=i("xhr_polling","xhr_polling",1,p),gi=i("xdr_polling","xdr_polling",1,p),ie=new Y([E],_),_i=new Y([X],_),bi=new Y([vi],_),oe=new Y([new it(ot(ne),ne,yi)],_),se=new Y([new it(ot(re),re,gi)],_),ae=new Y([new it(ot(oe),new kt([oe,new lt(se,{delay:4e3})]),se)],_),xt=new it(ot(ae),ae,bi),Ot;return t.useTLS?Ot=new kt([ie,new lt(xt,{delay:2e3})]):Ot=new kt([ie,new lt(_i,{delay:2e3}),new lt(xt,{delay:5e3})]),new sr(new fr(new it(ot(E),Ot,xt)),r,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},dr=pr,vr=function(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?"s":"")})),e.hooks.isInitialized()?e.changeState("initialized"):e.hooks.file?(e.changeState("initializing"),S.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,n){e.hooks.isInitialized()?(e.changeState("initialized"),n(!0)):(t&&e.onError(t),e.onClose(),n(!1))})):e.onClose()},yr={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit("error",new I),e.close()},t.onerror=function(n){e.emit("error",n),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit("finished",200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}},gr=yr,_r=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),br=256*1024,mr=function(e){_r(t,e);function t(n,r,i){var o=e.call(this)||this;return o.hooks=n,o.method=r,o.url=i,o}return t.prototype.start=function(n){var r=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){r.close()},m.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(n)},t.prototype.close=function(){this.unloader&&(m.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},t.prototype.onChunk=function(n,r){for(;;){var i=this.advanceBuffer(r);if(i)this.emit("chunk",{status:n,data:i});else break}this.isBufferTooLong(r)&&this.emit("buffer_too_long")},t.prototype.advanceBuffer=function(n){var r=n.slice(this.position),i=r.indexOf(` +(()=>{var Ci=Object.create;var he=Object.defineProperty;var Ti=Object.getOwnPropertyDescriptor;var Pi=Object.getOwnPropertyNames;var xi=Object.getPrototypeOf,Oi=Object.prototype.hasOwnProperty;var Ai=(l,h)=>()=>(h||l((h={exports:{}}).exports,h),h.exports);var Ei=(l,h,a,c)=>{if(h&&typeof h=="object"||typeof h=="function")for(let s of Pi(h))!Oi.call(l,s)&&s!==a&&he(l,s,{get:()=>h[s],enumerable:!(c=Ti(h,s))||c.enumerable});return l};var Li=(l,h,a)=>(a=l!=null?Ci(xi(l)):{},Ei(h||!l||!l.__esModule?he(a,"default",{value:l,enumerable:!0}):a,l));var me=Ai((vt,It)=>{(function(h,a){typeof vt=="object"&&typeof It=="object"?It.exports=a():typeof define=="function"&&define.amd?define([],a):typeof vt=="object"?vt.Pusher=a():h.Pusher=a()})(window,function(){return function(l){var h={};function a(c){if(h[c])return h[c].exports;var s=h[c]={i:c,l:!1,exports:{}};return l[c].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=l,a.c=h,a.d=function(c,s,f){a.o(c,s)||Object.defineProperty(c,s,{enumerable:!0,get:f})},a.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},a.t=function(c,s){if(s&1&&(c=a(c)),s&8||s&4&&typeof c=="object"&&c&&c.__esModule)return c;var f=Object.create(null);if(a.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:c}),s&2&&typeof c!="string")for(var d in c)a.d(f,d,function(N){return c[N]}.bind(null,d));return f},a.n=function(c){var s=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(s,"a",s),s},a.o=function(c,s){return Object.prototype.hasOwnProperty.call(c,s)},a.p="",a(a.s=2)}([function(l,h,a){"use strict";var c=this&&this.__extends||function(){var b=function(v,y){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,O){w.__proto__=O}||function(w,O){for(var I in O)O.hasOwnProperty(I)&&(w[I]=O[I])},b(v,y)};return function(v,y){b(v,y);function w(){this.constructor=v}v.prototype=y===null?Object.create(y):(w.prototype=y.prototype,new w)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=256,f=function(){function b(v){v===void 0&&(v="="),this._paddingCharacter=v}return b.prototype.encodedLength=function(v){return this._paddingCharacter?(v+2)/3*4|0:(v*8+5)/6|0},b.prototype.encode=function(v){for(var y="",w=0;w>>3*6&63),y+=this._encodeByte(O>>>2*6&63),y+=this._encodeByte(O>>>1*6&63),y+=this._encodeByte(O>>>0*6&63)}var I=v.length-w;if(I>0){var O=v[w]<<16|(I===2?v[w+1]<<8:0);y+=this._encodeByte(O>>>3*6&63),y+=this._encodeByte(O>>>2*6&63),I===2?y+=this._encodeByte(O>>>1*6&63):y+=this._paddingCharacter||"",y+=this._paddingCharacter||""}return y},b.prototype.maxDecodedLength=function(v){return this._paddingCharacter?v/4*3|0:(v*6+7)/8|0},b.prototype.decodedLength=function(v){return this.maxDecodedLength(v.length-this._getPaddingLength(v))},b.prototype.decode=function(v){if(v.length===0)return new Uint8Array(0);for(var y=this._getPaddingLength(v),w=v.length-y,O=new Uint8Array(this.maxDecodedLength(w)),I=0,q=0,M=0,J=0,F=0,z=0,B=0;q>>4,O[I++]=F<<4|z>>>2,O[I++]=z<<6|B,M|=J&s,M|=F&s,M|=z&s,M|=B&s;if(q>>4,M|=J&s,M|=F&s),q>>2,M|=z&s),q>>8&6,y+=51-v>>>8&-75,y+=61-v>>>8&-15,y+=62-v>>>8&3,String.fromCharCode(y)},b.prototype._decodeChar=function(v){var y=s;return y+=(42-v&v-44)>>>8&-s+v-43+62,y+=(46-v&v-48)>>>8&-s+v-47+63,y+=(47-v&v-58)>>>8&-s+v-48+52,y+=(64-v&v-91)>>>8&-s+v-65+0,y+=(96-v&v-123)>>>8&-s+v-97+26,y},b.prototype._getPaddingLength=function(v){var y=0;if(this._paddingCharacter){for(var w=v.length-1;w>=0&&v[w]===this._paddingCharacter;w--)y++;if(v.length<4||y>2)throw new Error("Base64Coder: incorrect padding")}return y},b}();h.Coder=f;var d=new f;function N(b){return d.encode(b)}h.encode=N;function P(b){return d.decode(b)}h.decode=P;var T=function(b){c(v,b);function v(){return b!==null&&b.apply(this,arguments)||this}return v.prototype._encodeByte=function(y){var w=y;return w+=65,w+=25-y>>>8&6,w+=51-y>>>8&-75,w+=61-y>>>8&-13,w+=62-y>>>8&49,String.fromCharCode(w)},v.prototype._decodeChar=function(y){var w=s;return w+=(44-y&y-46)>>>8&-s+y-45+62,w+=(94-y&y-96)>>>8&-s+y-95+63,w+=(47-y&y-58)>>>8&-s+y-48+52,w+=(64-y&y-91)>>>8&-s+y-65+0,w+=(96-y&y-123)>>>8&-s+y-97+26,w},v}(f);h.URLSafeCoder=T;var S=new T;function C(b){return S.encode(b)}h.encodeURLSafe=C;function x(b){return S.decode(b)}h.decodeURLSafe=x,h.encodedLength=function(b){return d.encodedLength(b)},h.maxDecodedLength=function(b){return d.maxDecodedLength(b)},h.decodedLength=function(b){return d.decodedLength(b)}},function(l,h,a){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var c="utf8: invalid string",s="utf8: invalid source encoding";function f(P){for(var T=new Uint8Array(d(P)),S=0,C=0;C>6,T[S++]=128|x&63):x<55296?(T[S++]=224|x>>12,T[S++]=128|x>>6&63,T[S++]=128|x&63):(C++,x=(x&1023)<<10,x|=P.charCodeAt(C)&1023,x+=65536,T[S++]=240|x>>18,T[S++]=128|x>>12&63,T[S++]=128|x>>6&63,T[S++]=128|x&63)}return T}h.encode=f;function d(P){for(var T=0,S=0;S=P.length-1)throw new Error(c);S++,T+=4}else throw new Error(c)}return T}h.encodedLength=d;function N(P){for(var T=[],S=0;S=P.length)throw new Error(s);var b=P[++S];if((b&192)!==128)throw new Error(s);C=(C&31)<<6|b&63,x=128}else if(C<240){if(S>=P.length-1)throw new Error(s);var b=P[++S],v=P[++S];if((b&192)!==128||(v&192)!==128)throw new Error(s);C=(C&15)<<12|(b&63)<<6|v&63,x=2048}else if(C<248){if(S>=P.length-2)throw new Error(s);var b=P[++S],v=P[++S],y=P[++S];if((b&192)!==128||(v&192)!==128||(y&192)!==128)throw new Error(s);C=(C&15)<<18|(b&63)<<12|(v&63)<<6|y&63,x=65536}else throw new Error(s);if(C=55296&&C<=57343)throw new Error(s);if(C>=65536){if(C>1114111)throw new Error(s);C-=65536,T.push(String.fromCharCode(55296|C>>10)),C=56320|C&1023}}T.push(String.fromCharCode(C))}return T.join("")}h.decode=N},function(l,h,a){l.exports=a(3).default},function(l,h,a){"use strict";a.r(h);var c=function(){function e(t,n){this.lastId=0,this.prefix=t,this.name=n}return e.prototype.create=function(t){this.lastId++;var n=this.lastId,r=this.prefix+n,i=this.name+"["+n+"]",o=!1,u=function(){o||(t.apply(null,arguments),o=!0)};return this[n]=u,{number:n,id:r,name:i,callback:u}},e.prototype.remove=function(t){delete this[t.number]},e}(),s=new c("_pusher_script_","Pusher.ScriptReceivers"),f={VERSION:"7.6.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},d=f,N=function(){function e(t){this.options=t,this.receivers=t.receivers||s,this.loading={}}return e.prototype.load=function(t,n,r){var i=this;if(i.loading[t]&&i.loading[t].length>0)i.loading[t].push(r);else{i.loading[t]=[r];var o=m.createScriptRequest(i.getPath(t,n)),u=i.receivers.create(function(p){if(i.receivers.remove(u),i.loading[t]){var _=i.loading[t];delete i.loading[t];for(var g=function(E){E||o.cleanup()},k=0;k<_.length;k++)_[k](p,g)}});o.send(u)}},e.prototype.getRoot=function(t){var n,r=m.getDocument().location.protocol;return t&&t.useTLS||r==="https:"?n=this.options.cdn_https:n=this.options.cdn_http,n.replace(/\/*$/,"")+"/"+this.options.version},e.prototype.getPath=function(t,n){return this.getRoot(n)+"/"+t+this.options.suffix+".js"},e}(),P=N,T=new c("_pusher_dependencies","Pusher.DependenciesReceivers"),S=new P({cdn_http:d.cdn_http,cdn_https:d.cdn_https,version:d.VERSION,suffix:d.dependency_suffix,receivers:T}),C={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},x=function(e){var t="See:",n=C.urls[e];if(!n)return"";var r;return n.fullUrl?r=n.fullUrl:n.path&&(r=C.baseUrl+n.path),r?t+" "+r:""},b={buildLogSuffix:x},v;(function(e){e.UserAuthentication="user-authentication",e.ChannelAuthorization="channel-authorization"})(v||(v={}));var y=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),O=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),I=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),q=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),M=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),J=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),F=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),z=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),B=function(e){y(t,e);function t(n,r){var i=this.constructor,o=e.call(this,r)||this;return o.status=n,Object.setPrototypeOf(o,i.prototype),o}return t}(Error),ke=function(e,t,n,r,i){var o=m.createXHR();o.open("POST",n.endpoint,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var u in n.headers)o.setRequestHeader(u,n.headers[u]);if(n.headersProvider!=null){var p=n.headersProvider();for(var u in p)o.setRequestHeader(u,p[u])}return o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200){var _=void 0,g=!1;try{_=JSON.parse(o.responseText),g=!0}catch{i(new B(200,"JSON returned from "+r.toString()+" endpoint was invalid, yet status code was 200. Data was: "+o.responseText),null)}g&&i(null,_)}else{var k="";switch(r){case v.UserAuthentication:k=b.buildLogSuffix("authenticationEndpoint");break;case v.ChannelAuthorization:k="Clients must be authorized to join private or presence channels. "+b.buildLogSuffix("authorizationEndpoint");break}i(new B(o.status,"Unable to retrieve auth string from "+r.toString()+" endpoint - "+("received status: "+o.status+" from "+n.endpoint+". "+k)),null)}},o.send(t),o},Se=ke;function Ce(e){return Ee(Oe(e))}for(var nt=String.fromCharCode,Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te={},ct=0,Pe=Z.length;ct>>6)+nt(128|t&63):nt(224|t>>>12&15)+nt(128|t>>>6&63)+nt(128|t&63)},Oe=function(e){return e.replace(/[^\x00-\x7F]/g,xe)},Ae=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),r=[Z.charAt(n>>>18),Z.charAt(n>>>12&63),t>=2?"=":Z.charAt(n>>>6&63),t>=1?"=":Z.charAt(n&63)];return r.join("")},Ee=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,Ae)},Le=function(){function e(t,n,r,i){var o=this;this.clear=n,this.timer=t(function(){o.timer&&(o.timer=i(o.timer))},r)}return e.prototype.isRunning=function(){return this.timer!==null},e.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},e}(),jt=Le,Nt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();function Re(e){window.clearTimeout(e)}function Ie(e){window.clearInterval(e)}var Q=function(e){Nt(t,e);function t(n,r){return e.call(this,setTimeout,Re,n,function(i){return r(),null})||this}return t}(jt),je=function(e){Nt(t,e);function t(n,r){return e.call(this,setInterval,Ie,n,function(i){return r(),i})||this}return t}(jt),Ne={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(e){return new Q(0,e)},method:function(e){for(var t=[],n=1;n0)for(var i=0;i=1002&&e.code<=1004?"backoff":null:e.code===4e3?"tls_only":e.code<4100?"refused":e.code<4200?"backoff":e.code<4300?"retry":"refused"},getCloseError:function(e){return e.code!==1e3&&e.code!==1001?{type:"PusherError",data:{code:e.code,message:e.reason||e.message}}:null}},K=Vt,Cn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tn=function(e){Cn(t,e);function t(n,r){var i=e.call(this)||this;return i.id=n,i.transport=r,i.activityTimeout=r.activityTimeout,i.bindListeners(),i}return t.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},t.prototype.send=function(n){return this.transport.send(n)},t.prototype.send_event=function(n,r,i){var o={event:n,data:r};return i&&(o.channel=i),A.debug("Event sent",o),this.send(K.encodeMessage(o))},t.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},t.prototype.close=function(){this.transport.close()},t.prototype.bindListeners=function(){var n=this,r={message:function(o){var u;try{u=K.decodeMessage(o)}catch(p){n.emit("error",{type:"MessageParseError",error:p,data:o.data})}if(u!==void 0){switch(A.debug("Event recd",u),u.event){case"pusher:error":n.emit("error",{type:"PusherError",data:u.data});break;case"pusher:ping":n.emit("ping");break;case"pusher:pong":n.emit("pong");break}n.emit("message",u)}},activity:function(){n.emit("activity")},error:function(o){n.emit("error",o)},closed:function(o){i(),o&&o.code&&n.handleCloseEvent(o),n.transport=null,n.emit("closed")}},i=function(){W(r,function(o,u){n.transport.unbind(u,o)})};W(r,function(o,u){n.transport.bind(u,o)})},t.prototype.handleCloseEvent=function(n){var r=K.getCloseAction(n),i=K.getCloseError(n);i&&this.emit("error",i),r&&this.emit(r,{action:r,error:i})},t}(V),Pn=Tn,xn=function(){function e(t,n){this.transport=t,this.callback=n,this.bindListeners()}return e.prototype.close=function(){this.unbindListeners(),this.transport.close()},e.prototype.bindListeners=function(){var t=this;this.onMessage=function(n){t.unbindListeners();var r;try{r=K.processHandshake(n)}catch(i){t.finish("error",{error:i}),t.transport.close();return}r.action==="connected"?t.finish("connected",{connection:new Pn(r.id,t.transport),activityTimeout:r.activityTimeout}):(t.finish(r.action,{error:r.error}),t.transport.close())},this.onClosed=function(n){t.unbindListeners();var r=K.getCloseAction(n)||"backoff",i=K.getCloseError(n);t.finish(r,{error:i})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},e.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},e.prototype.finish=function(t,n){this.callback(U({transport:this.transport,action:t},n))},e}(),On=xn,An=function(){function e(t,n){this.timeline=t,this.options=n||{}}return e.prototype.send=function(t,n){this.timeline.isEmpty()||this.timeline.send(m.TimelineTransport.getAgent(this,t),n)},e}(),En=An,Ln=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rn=function(e){Ln(t,e);function t(n,r){var i=e.call(this,function(o,u){A.debug("No callbacks on "+n+" for "+o)})||this;return i.name=n,i.pusher=r,i.subscribed=!1,i.subscriptionPending=!1,i.subscriptionCancelled=!1,i}return t.prototype.authorize=function(n,r){return r(null,{auth:""})},t.prototype.trigger=function(n,r){if(n.indexOf("client-")!==0)throw new w("Event '"+n+"' does not start with 'client-'");if(!this.subscribed){var i=b.buildLogSuffix("triggeringClientEvents");A.warn("Client event triggered before channel 'subscription_succeeded' event . "+i)}return this.pusher.send_event(n,r,this.name)},t.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},t.prototype.handleEvent=function(n){var r=n.event,i=n.data;if(r==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(n);else if(r==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(n);else if(r.indexOf("pusher_internal:")!==0){var o={};this.emit(r,i,o)}},t.prototype.handleSubscriptionSucceededEvent=function(n){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",n.data)},t.prototype.handleSubscriptionCountEvent=function(n){n.data.subscription_count&&(this.subscriptionCount=n.data.subscription_count),this.emit("pusher:subscription_count",n.data)},t.prototype.subscribe=function(){var n=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(r,i){r?(n.subscriptionPending=!1,A.error(r.toString()),n.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:r.message},r instanceof B?{status:r.status}:{}))):n.pusher.send_event("pusher:subscribe",{auth:i.auth,channel_data:i.channel_data,channel:n.name})}))},t.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},t.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},t.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},t}(V),bt=Rn,In=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jn=function(e){In(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.authorize=function(n,r){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:n},r)},t}(bt),mt=jn,Nn=function(){function e(){this.reset()}return e.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null},e.prototype.each=function(t){var n=this;W(this.members,function(r,i){t(n.get(i))})},e.prototype.setMyID=function(t){this.myID=t},e.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},e.prototype.addMember=function(t){return this.get(t.user_id)===null&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)},e.prototype.removeMember=function(t){var n=this.get(t.user_id);return n&&(delete this.members[t.user_id],this.count--),n},e.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},e}(),qn=Nn,Un=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(u){u(o)})}return new(n||(n=Promise))(function(o,u){function p(k){try{g(r.next(k))}catch(E){u(E)}}function _(k){try{g(r.throw(k))}catch(E){u(E)}}function g(k){k.done?o(k.value):i(k.value).then(p,_)}g((r=r.apply(e,t||[])).next())})},Hn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function p(g){return function(k){return _([g,k])}}function _(g){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=g[0]&2?i.return:g[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,g[1])).done)return o;switch(i=0,o&&(g=[g[0]&2,o.value]),g[0]){case 0:case 1:o=g;break;case 4:return n.label++,{value:g[1],done:!1};case 5:n.label++,i=g[1],g=[0];continue;case 7:g=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(g[0]===6||g[0]===2)){n=0;continue}if(g[0]===3&&(!o||g[1]>o[0]&&g[1]0&&this.emit("connecting_in",Math.round(n/1e3)),this.retryTimer=new Q(n||0,function(){r.disconnectInternally(),r.connect()})},t.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},t.prototype.setUnavailableTimer=function(){var n=this;this.unavailableTimer=new Q(this.options.unavailableTimeout,function(){n.updateState("unavailable")})},t.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},t.prototype.sendActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Q(this.options.pongTimeout,function(){n.timeline.error({pong_timed_out:n.options.pongTimeout}),n.retryIn(0)})},t.prototype.resetActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Q(this.activityTimeout,function(){n.sendActivityCheck()}))},t.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},t.prototype.buildConnectionCallbacks=function(n){var r=this;return U({},n,{message:function(i){r.resetActivityCheck(),r.emit("message",i)},ping:function(){r.send_event("pusher:pong",{})},activity:function(){r.resetActivityCheck()},error:function(i){r.emit("error",i)},closed:function(){r.abandonConnection(),r.shouldRetry()&&r.retryIn(1e3)}})},t.prototype.buildHandshakeCallbacks=function(n){var r=this;return U({},n,{connected:function(i){r.activityTimeout=Math.min(r.options.activityTimeout,i.activityTimeout,i.connection.activityTimeout||1/0),r.clearUnavailableTimer(),r.setConnection(i.connection),r.socket_id=r.connection.id,r.updateState("connected",{socket_id:r.socket_id})}})},t.prototype.buildErrorCallbacks=function(){var n=this,r=function(i){return function(o){o.error&&n.emit("error",{type:"WebSocketError",error:o.error}),i(o)}};return{tls_only:r(function(){n.usingTLS=!0,n.updateStrategy(),n.retryIn(0)}),refused:r(function(){n.disconnect()}),backoff:r(function(){n.retryIn(1e3)}),retry:r(function(){n.retryIn(0)})}},t.prototype.setConnection=function(n){this.connection=n;for(var r in this.connectionCallbacks)this.connection.bind(r,this.connectionCallbacks[r]);this.resetActivityCheck()},t.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var n in this.connectionCallbacks)this.connection.unbind(n,this.connectionCallbacks[n]);var r=this.connection;return this.connection=null,r}},t.prototype.updateState=function(n,r){var i=this.state;if(this.state=n,i!==n){var o=n;o==="connected"&&(o+=" with new socket ID "+r.socket_id),A.debug("State changed",i+" -> "+o),this.timeline.info({state:n,params:r}),this.emit("state_change",{previous:i,current:n}),this.emit(n,r)}},t.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},t}(V),Gn=Vn,Qn=function(){function e(){this.channels={}}return e.prototype.add=function(t,n){return this.channels[t]||(this.channels[t]=Yn(t,n)),this.channels[t]},e.prototype.all=function(){return Ue(this.channels)},e.prototype.find=function(t){return this.channels[t]},e.prototype.remove=function(t){var n=this.channels[t];return delete this.channels[t],n},e.prototype.disconnect=function(){W(this.channels,function(t){t.disconnect()})},e}(),Kn=Qn;function Yn(e,t){if(e.indexOf("private-encrypted-")===0){if(t.config.nacl)return G.createEncryptedChannel(e,t,t.config.nacl);var n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",r=b.buildLogSuffix("encryptedChannelSupport");throw new J(n+". "+r)}else{if(e.indexOf("private-")===0)return G.createPrivateChannel(e,t);if(e.indexOf("presence-")===0)return G.createPresenceChannel(e,t);if(e.indexOf("#")===0)throw new O('Cannot create a channel with name "'+e+'".');return G.createChannel(e,t)}}var $n={createChannels:function(){return new Kn},createConnectionManager:function(e,t){return new Gn(e,t)},createChannel:function(e,t){return new bt(e,t)},createPrivateChannel:function(e,t){return new mt(e,t)},createPresenceChannel:function(e,t){return new zn(e,t)},createEncryptedChannel:function(e,t,n){return new Jn(e,t,n)},createTimelineSender:function(e,t){return new En(e,t)},createHandshake:function(e,t){return new On(e,t)},createAssistantToTheTransportManager:function(e,t,n){return new Sn(e,t,n)}},G=$n,Zn=function(){function e(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return e.prototype.getAssistant=function(t){return G.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},e.prototype.isAlive=function(){return this.livesLeft>0},e.prototype.reportDeath=function(){this.livesLeft-=1},e}(),Gt=Zn,tr=function(){function e(t,n){this.strategies=t,this.loop=!!n.loop,this.failFast=!!n.failFast,this.timeout=n.timeout,this.timeoutLimit=n.timeoutLimit}return e.prototype.isSupported=function(){return zt(this.strategies,j.method("isSupported"))},e.prototype.connect=function(t,n){var r=this,i=this.strategies,o=0,u=this.timeout,p=null,_=function(g,k){k?n(null,k):(o=o+1,r.loop&&(o=o%i.length),o0&&(o=new Q(r.timeout,function(){u.abort(),i(!0)})),u=t.connect(n,function(p,_){p&&o&&o.isRunning()&&!r.failFast||(o&&o.ensureAborted(),i(p,_))}),{abort:function(){o&&o.ensureAborted(),u.abort()},forceMinPriority:function(p){u.forceMinPriority(p)}}},e}(),Y=tr,er=function(){function e(t){this.strategies=t}return e.prototype.isSupported=function(){return zt(this.strategies,j.method("isSupported"))},e.prototype.connect=function(t,n){return nr(this.strategies,t,function(r,i){return function(o,u){if(i[r].error=o,o){rr(i)&&n(!0);return}rt(i,function(p){p.forceMinPriority(u.transport.priority)}),n(null,u)}})},e}(),kt=er;function nr(e,t,n){var r=Dt(e,function(i,o,u,p){return i.connect(t,n(o,p))});return{abort:function(){rt(r,ir)},forceMinPriority:function(i){rt(r,function(o){o.forceMinPriority(i)})}}}function rr(e){return Me(e,function(t){return!!t.error})}function ir(e){!e.error&&!e.aborted&&(e.abort(),e.aborted=!0)}var or=function(){function e(t,n,r){this.strategy=t,this.transports=n,this.ttl=r.ttl||1800*1e3,this.usingTLS=r.useTLS,this.timeline=r.timeline}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.usingTLS,i=ar(r),o=[this.strategy];if(i&&i.timestamp+this.ttl>=j.now()){var u=this.transports[i.transport];u&&(this.timeline.info({cached:!0,transport:i.transport,latency:i.latency}),o.push(new Y([u],{timeout:i.latency*2+1e3,failFast:!0})))}var p=j.now(),_=o.pop().connect(t,function g(k,E){k?(Qt(r),o.length>0?(p=j.now(),_=o.pop().connect(t,g)):n(k)):(cr(r,E.transport.name,j.now()-p),n(null,E))});return{abort:function(){_.abort()},forceMinPriority:function(g){t=g,_&&_.forceMinPriority(g)}}},e}(),sr=or;function St(e){return"pusherTransport"+(e?"TLS":"NonTLS")}function ar(e){var t=m.getLocalStorage();if(t)try{var n=t[St(e)];if(n)return JSON.parse(n)}catch{Qt(e)}return null}function cr(e,t,n){var r=m.getLocalStorage();if(r)try{r[St(e)]=ut({timestamp:j.now(),transport:t,latency:n})}catch{}}function Qt(e){var t=m.getLocalStorage();if(t)try{delete t[St(e)]}catch{}}var ur=function(){function e(t,n){var r=n.delay;this.strategy=t,this.options={delay:r}}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.strategy,i,o=new Q(this.options.delay,function(){i=r.connect(t,n)});return{abort:function(){o.ensureAborted(),i&&i.abort()},forceMinPriority:function(u){t=u,i&&i.forceMinPriority(u)}}},e}(),lt=ur,hr=function(){function e(t,n,r){this.test=t,this.trueBranch=n,this.falseBranch=r}return e.prototype.isSupported=function(){var t=this.test()?this.trueBranch:this.falseBranch;return t.isSupported()},e.prototype.connect=function(t,n){var r=this.test()?this.trueBranch:this.falseBranch;return r.connect(t,n)},e}(),it=hr,lr=function(){function e(t){this.strategy=t}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.strategy.connect(t,function(i,o){o&&r.abort(),n(i,o)});return r},e}(),fr=lr;function ot(e){return function(){return e.isSupported()}}var pr=function(e,t,n){var r={};function i(ce,mi,wi,ki,Si){var ue=n(e,ce,mi,wi,ki,Si);return r[ce]=ue,ue}var o=Object.assign({},t,{hostNonTLS:e.wsHost+":"+e.wsPort,hostTLS:e.wsHost+":"+e.wssPort,httpPath:e.wsPath}),u=Object.assign({},o,{useTLS:!0}),p=Object.assign({},t,{hostNonTLS:e.httpHost+":"+e.httpPort,hostTLS:e.httpHost+":"+e.httpsPort,httpPath:e.httpPath}),_={loop:!0,timeout:15e3,timeoutLimit:6e4},g=new Gt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),k=new Gt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),E=i("ws","ws",3,o,g),X=i("wss","ws",3,u,g),vi=i("sockjs","sockjs",1,p),ne=i("xhr_streaming","xhr_streaming",1,p,k),yi=i("xdr_streaming","xdr_streaming",1,p,k),re=i("xhr_polling","xhr_polling",1,p),gi=i("xdr_polling","xdr_polling",1,p),ie=new Y([E],_),_i=new Y([X],_),bi=new Y([vi],_),oe=new Y([new it(ot(ne),ne,yi)],_),se=new Y([new it(ot(re),re,gi)],_),ae=new Y([new it(ot(oe),new kt([oe,new lt(se,{delay:4e3})]),se)],_),xt=new it(ot(ae),ae,bi),Ot;return t.useTLS?Ot=new kt([ie,new lt(xt,{delay:2e3})]):Ot=new kt([ie,new lt(_i,{delay:2e3}),new lt(xt,{delay:5e3})]),new sr(new fr(new it(ot(E),Ot,xt)),r,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},dr=pr,vr=function(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?"s":"")})),e.hooks.isInitialized()?e.changeState("initialized"):e.hooks.file?(e.changeState("initializing"),S.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,n){e.hooks.isInitialized()?(e.changeState("initialized"),n(!0)):(t&&e.onError(t),e.onClose(),n(!1))})):e.onClose()},yr={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit("error",new I),e.close()},t.onerror=function(n){e.emit("error",n),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit("finished",200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}},gr=yr,_r=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),br=256*1024,mr=function(e){_r(t,e);function t(n,r,i){var o=e.call(this)||this;return o.hooks=n,o.method=r,o.url=i,o}return t.prototype.start=function(n){var r=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){r.close()},m.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(n)},t.prototype.close=function(){this.unloader&&(m.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},t.prototype.onChunk=function(n,r){for(;;){var i=this.advanceBuffer(r);if(i)this.emit("chunk",{status:n,data:i});else break}this.isBufferTooLong(r)&&this.emit("buffer_too_long")},t.prototype.advanceBuffer=function(n){var r=n.slice(this.position),i=r.indexOf(` `);return i!==-1?(this.position+=i+1,r.slice(0,i)):null},t.prototype.isBufferTooLong=function(n){return this.position===n.length&&n.length>br},t}(V),wr=mr,Ct;(function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=3]="CLOSED"})(Ct||(Ct={}));var $=Ct,kr=1,Sr=function(){function e(t,n){this.hooks=t,this.session=Yt(1e3)+"/"+xr(8),this.location=Cr(n),this.readyState=$.CONNECTING,this.openStream()}return e.prototype.send=function(t){return this.sendRaw(JSON.stringify([t]))},e.prototype.ping=function(){this.hooks.sendHeartbeat(this)},e.prototype.close=function(t,n){this.onClose(t,n,!0)},e.prototype.sendRaw=function(t){if(this.readyState===$.OPEN)try{return m.createSocketRequest("POST",Kt(Tr(this.location,this.session))).start(t),!0}catch{return!1}else return!1},e.prototype.reconnect=function(){this.closeStream(),this.openStream()},e.prototype.onClose=function(t,n,r){this.closeStream(),this.readyState=$.CLOSED,this.onclose&&this.onclose({code:t,reason:n,wasClean:r})},e.prototype.onChunk=function(t){if(t.status===200){this.readyState===$.OPEN&&this.onActivity();var n,r=t.data.slice(0,1);switch(r){case"o":n=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(n);break;case"a":n=JSON.parse(t.data.slice(1)||"[]");for(var i=0;i0&&e.onChunk(n.status,n.responseText);break;case 4:n.responseText&&n.responseText.length>0&&e.onChunk(n.status,n.responseText),e.emit("finished",n.status),e.close();break}},n},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},jr=Ir,Nr={createStreamingSocket:function(e){return this.createSocket(Er,e)},createPollingSocket:function(e){return this.createSocket(Rr,e)},createSocket:function(e,t){return new Or(e,t)},createXHR:function(e,t){return this.createRequest(jr,e,t)},createRequest:function(e,t,n){return new wr(e,t,n)}},$t=Nr;$t.createXDR=function(e,t){return this.createRequest(gr,e,t)};var qr=$t,Ur={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:s,DependenciesReceivers:T,getDefaultStrategy:dr,Transports:_n,transportConnectionInitializer:vr,HTTPFactory:qr,TimelineTransport:Ze,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(e){var t=this;window.Pusher=e;var n=function(){t.onDocumentBody(e.ready)};window.JSON?n():S.load("json2",{},n)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:Se,jsonp:We}},onDocumentBody:function(e){var t=this;document.body?e():setTimeout(function(){t.onDocumentBody(e)},0)},createJSONPRequest:function(e,t){return new Ke(e,t)},createScriptRequest:function(e){return new Ge(e)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var e=this.getXHRAPI();return new e},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return wn},createWebSocket:function(e){var t=this.getWebSocketAPI();return new t(e)},createSocketRequest:function(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(t.indexOf("https:")===0))return this.HTTPFactory.createXDR(e,t);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var e=this.getXHRAPI();return!!e&&new e().withCredentials!==void 0},isXDRSupported:function(e){var t=e?"https:":"http:",n=this.getProtocol();return!!window.XDomainRequest&&n===t},addUnloadListener:function(e){window.addEventListener!==void 0?window.addEventListener("unload",e,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",e)},removeUnloadListener:function(e){window.addEventListener!==void 0?window.removeEventListener("unload",e,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",e)},randomInt:function(e){var t=function(){var n=window.crypto||window.msCrypto,r=n.getRandomValues(new Uint32Array(1))[0];return r/Math.pow(2,32)};return Math.floor(t()*e)}},m=Ur,Tt;(function(e){e[e.ERROR=3]="ERROR",e[e.INFO=6]="INFO",e[e.DEBUG=7]="DEBUG"})(Tt||(Tt={}));var ft=Tt,Dr=function(){function e(t,n,r){this.key=t,this.session=n,this.events=[],this.options=r||{},this.sent=0,this.uniqueID=0}return e.prototype.log=function(t,n){t<=this.options.level&&(this.events.push(U({},n,{timestamp:j.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},e.prototype.error=function(t){this.log(ft.ERROR,t)},e.prototype.info=function(t){this.log(ft.INFO,t)},e.prototype.debug=function(t){this.log(ft.DEBUG,t)},e.prototype.isEmpty=function(){return this.events.length===0},e.prototype.send=function(t,n){var r=this,i=U({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(i,function(o,u){o||r.sent++,n&&n(o,u)}),!0},e.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},e}(),Hr=Dr,Mr=function(){function e(t,n,r,i){this.name=t,this.priority=n,this.transport=r,this.options=i||{}}return e.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},e.prototype.connect=function(t,n){var r=this;if(this.isSupported()){if(this.priority"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ii(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function ji(l,h){if(h&&(typeof h=="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ii(l)}function H(l){var h=Ri();return function(){var c=pt(l),s;if(h){var f=pt(this).constructor;s=Reflect.construct(c,arguments,f)}else s=c.apply(this,arguments);return ji(this,s)}}var Et=function(){function l(){L(this,l)}return R(l,[{key:"listenForWhisper",value:function(a,c){return this.listen(".client-"+a,c)}},{key:"notification",value:function(a){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",a)}},{key:"stopListeningForWhisper",value:function(a,c){return this.stopListening(".client-"+a,c)}}]),l}(),de=function(){function l(h){L(this,l),this.namespace=h}return R(l,[{key:"format",value:function(a){return[".","\\"].includes(a.charAt(0))?a.substring(1):(this.namespace&&(a=this.namespace+"."+a),a.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(a){this.namespace=a}}]),l}();function Ni(l){try{new l}catch(h){if(h.message.includes("is not a constructor"))return!1}return!0}var Lt=function(l){D(a,l);var h=H(a);function a(c,s,f){var d;return L(this,a),d=h.call(this),d.name=s,d.pusher=c,d.options=f,d.eventFormatter=new de(d.options.namespace),d.subscribe(),d}return R(a,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(s,f){return this.on(this.eventFormatter.format(s),f),this}},{key:"listenToAll",value:function(s){var f=this;return this.subscription.bind_global(function(d,N){if(!d.startsWith("pusher:")){var P=f.options.namespace.replace(/\./g,"\\"),T=d.startsWith(P)?d.substring(P.length+1):"."+d;s(T,N)}}),this}},{key:"stopListening",value:function(s,f){return f?this.subscription.unbind(this.eventFormatter.format(s),f):this.subscription.unbind(this.eventFormatter.format(s)),this}},{key:"stopListeningToAll",value:function(s){return s?this.subscription.unbind_global(s):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(s){return this.on("pusher:subscription_succeeded",function(){s()}),this}},{key:"error",value:function(s){return this.on("pusher:subscription_error",function(f){s(f)}),this}},{key:"on",value:function(s,f){return this.subscription.bind(s,f),this}}]),a}(Et),ve=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),f),this}}]),a}(Lt),qi=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),f),this}}]),a}(Lt),Ui=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"here",value:function(s){return this.on("pusher:subscription_succeeded",function(f){s(Object.keys(f.members).map(function(d){return f.members[d]}))}),this}},{key:"joining",value:function(s){return this.on("pusher:member_added",function(f){s(f.info)}),this}},{key:"whisper",value:function(s,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),f),this}},{key:"leaving",value:function(s){return this.on("pusher:member_removed",function(f){s(f.info)}),this}}]),a}(ve),ye=function(l){D(a,l);var h=H(a);function a(c,s,f){var d;return L(this,a),d=h.call(this),d.events={},d.listeners={},d.name=s,d.socket=c,d.options=f,d.eventFormatter=new de(d.options.namespace),d.subscribe(),d}return R(a,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(s,f){return this.on(this.eventFormatter.format(s),f),this}},{key:"stopListening",value:function(s,f){return this.unbindEvent(this.eventFormatter.format(s),f),this}},{key:"subscribed",value:function(s){return this.on("connect",function(f){s(f)}),this}},{key:"error",value:function(s){return this}},{key:"on",value:function(s,f){var d=this;return this.listeners[s]=this.listeners[s]||[],this.events[s]||(this.events[s]=function(N,P){d.name===N&&d.listeners[s]&&d.listeners[s].forEach(function(T){return T(P)})},this.socket.on(s,this.events[s])),this.listeners[s].push(f),this}},{key:"unbind",value:function(){var s=this;Object.keys(this.events).forEach(function(f){s.unbindEvent(f)})}},{key:"unbindEvent",value:function(s,f){this.listeners[s]=this.listeners[s]||[],f&&(this.listeners[s]=this.listeners[s].filter(function(d){return d!==f})),(!f||this.listeners[s].length===0)&&(this.events[s]&&(this.socket.removeListener(s,this.events[s]),delete this.events[s]),delete this.listeners[s])}}]),a}(Et),ge=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(s),data:f}),this}}]),a}(ye),Di=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"here",value:function(s){return this.on("presence:subscribed",function(f){s(f.map(function(d){return d.user_info}))}),this}},{key:"joining",value:function(s){return this.on("presence:joining",function(f){return s(f.user_info)}),this}},{key:"whisper",value:function(s,f){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(s),data:f}),this}},{key:"leaving",value:function(s){return this.on("presence:leaving",function(f){return s(f.user_info)}),this}}]),a}(ge),dt=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(s,f){return this}},{key:"listenToAll",value:function(s){return this}},{key:"stopListening",value:function(s,f){return this}},{key:"subscribed",value:function(s){return this}},{key:"error",value:function(s){return this}},{key:"on",value:function(s,f){return this}}]),a}(Et),_e=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this}}]),a}(dt),Hi=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this}}]),a}(dt),Mi=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"here",value:function(s){return this}},{key:"joining",value:function(s){return this}},{key:"whisper",value:function(s,f){return this}},{key:"leaving",value:function(s){return this}}]),a}(_e),Rt=function(){function l(h){L(this,l),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(h),this.connect()}return R(l,[{key:"setOptions",value:function(a){this.options=at(this._defaultOptions,a);var c=this.csrfToken();return c&&(this.options.auth.headers["X-CSRF-TOKEN"]=c,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=c),c=this.options.bearerToken,c&&(this.options.auth.headers.Authorization="Bearer "+c,this.options.userAuthentication.headers.Authorization="Bearer "+c),a}},{key:"csrfToken",value:function(){var a;return typeof window<"u"&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"&&(a=document.querySelector('meta[name="csrf-token"]'))?a.getAttribute("content"):null}}]),l}(),fe=function(l){D(a,l);var h=H(a);function a(){var c;return L(this,a),c=h.apply(this,arguments),c.channels={},c}return R(a,[{key:"connect",value:function(){typeof this.options.client<"u"?this.pusher=this.options.client:this.options.Pusher?this.pusher=new this.options.Pusher(this.options.key,this.options):this.pusher=new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(s,f,d){return this.channel(s).listen(f,d)}},{key:"channel",value:function(s){return this.channels[s]||(this.channels[s]=new Lt(this.pusher,s,this.options)),this.channels[s]}},{key:"privateChannel",value:function(s){return this.channels["private-"+s]||(this.channels["private-"+s]=new ve(this.pusher,"private-"+s,this.options)),this.channels["private-"+s]}},{key:"encryptedPrivateChannel",value:function(s){return this.channels["private-encrypted-"+s]||(this.channels["private-encrypted-"+s]=new qi(this.pusher,"private-encrypted-"+s,this.options)),this.channels["private-encrypted-"+s]}},{key:"presenceChannel",value:function(s){return this.channels["presence-"+s]||(this.channels["presence-"+s]=new Ui(this.pusher,"presence-"+s,this.options)),this.channels["presence-"+s]}},{key:"leave",value:function(s){var f=this,d=[s,"private-"+s,"private-encrypted-"+s,"presence-"+s];d.forEach(function(N,P){f.leaveChannel(N)})}},{key:"leaveChannel",value:function(s){this.channels[s]&&(this.channels[s].unsubscribe(),delete this.channels[s])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),a}(Rt),pe=function(l){D(a,l);var h=H(a);function a(){var c;return L(this,a),c=h.apply(this,arguments),c.channels={},c}return R(a,[{key:"connect",value:function(){var s=this,f=this.getSocketIO();return this.socket=f(this.options.host,this.options),this.socket.on("reconnect",function(){Object.values(s.channels).forEach(function(d){d.subscribe()})}),this.socket}},{key:"getSocketIO",value:function(){if(typeof this.options.client<"u")return this.options.client;if(typeof io<"u")return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(s,f,d){return this.channel(s).listen(f,d)}},{key:"channel",value:function(s){return this.channels[s]||(this.channels[s]=new ye(this.socket,s,this.options)),this.channels[s]}},{key:"privateChannel",value:function(s){return this.channels["private-"+s]||(this.channels["private-"+s]=new ge(this.socket,"private-"+s,this.options)),this.channels["private-"+s]}},{key:"presenceChannel",value:function(s){return this.channels["presence-"+s]||(this.channels["presence-"+s]=new Di(this.socket,"presence-"+s,this.options)),this.channels["presence-"+s]}},{key:"leave",value:function(s){var f=this,d=[s,"private-"+s,"presence-"+s];d.forEach(function(N){f.leaveChannel(N)})}},{key:"leaveChannel",value:function(s){this.channels[s]&&(this.channels[s].unsubscribe(),delete this.channels[s])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),a}(Rt),zi=function(l){D(a,l);var h=H(a);function a(){var c;return L(this,a),c=h.apply(this,arguments),c.channels={},c}return R(a,[{key:"connect",value:function(){}},{key:"listen",value:function(s,f,d){return new dt}},{key:"channel",value:function(s){return new dt}},{key:"privateChannel",value:function(s){return new _e}},{key:"encryptedPrivateChannel",value:function(s){return new Hi}},{key:"presenceChannel",value:function(s){return new Mi}},{key:"leave",value:function(s){}},{key:"leaveChannel",value:function(s){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),a}(Rt),be=function(){function l(h){L(this,l),this.options=h,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return R(l,[{key:"channel",value:function(a){return this.connector.channel(a)}},{key:"connect",value:function(){if(this.options.broadcaster=="reverb")this.connector=new fe(at(at({},this.options),{cluster:""}));else if(this.options.broadcaster=="pusher")this.connector=new fe(this.options);else if(this.options.broadcaster=="socket.io")this.connector=new pe(this.options);else if(this.options.broadcaster=="null")this.connector=new zi(this.options);else if(typeof this.options.broadcaster=="function"&&Ni(this.options.broadcaster))this.connector=new this.options.broadcaster(this.options);else throw new Error("Broadcaster ".concat(st(this.options.broadcaster)," ").concat(this.options.broadcaster," is not supported."))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(a){return this.connector.presenceChannel(a)}},{key:"leave",value:function(a){this.connector.leave(a)}},{key:"leaveChannel",value:function(a){this.connector.leaveChannel(a)}},{key:"leaveAllChannels",value:function(){for(var a in this.connector.channels)this.leaveChannel(a)}},{key:"listen",value:function(a,c,s){return this.connector.listen(a,c,s)}},{key:"private",value:function(a){return this.connector.privateChannel(a)}},{key:"encryptedPrivate",value:function(a){if(this.connector instanceof pe)throw new Error("Broadcaster ".concat(st(this.options.broadcaster)," ").concat(this.options.broadcaster," does not support encrypted private channels."));return this.connector.encryptedPrivateChannel(a)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),(typeof Turbo>"u"?"undefined":st(Turbo))==="object"&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var a=this;Vue.http.interceptors.push(function(c,s){a.socketId()&&c.headers.set("X-Socket-ID",a.socketId()),s()})}},{key:"registerAxiosRequestInterceptor",value:function(){var a=this;axios.interceptors.request.use(function(c){return a.socketId()&&(c.headers["X-Socket-Id"]=a.socketId()),c})}},{key:"registerjQueryAjaxSetup",value:function(){var a=this;typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter(function(c,s,f){a.socketId()&&f.setRequestHeader("X-Socket-Id",a.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var a=this;document.addEventListener("turbo:before-fetch-request",function(c){c.detail.fetchOptions.headers["X-Socket-Id"]=a.socketId()})}}]),l}();var we=Li(me(),1);window.EchoFactory=be;window.Pusher=we.default;})(); /*! Bundled license information: diff --git a/public/js/filament/forms/components/file-upload.js b/public/js/filament/forms/components/file-upload.js index cd792e215..e78c02a69 100644 --- a/public/js/filament/forms/components/file-upload.js +++ b/public/js/filament/forms/components/file-upload.js @@ -1,6 +1,6 @@ -var er=Object.defineProperty;var tr=(e,t)=>{for(var i in t)er(e,i,{get:t[i],enumerable:!0})};var oa={};tr(oa,{FileOrigin:()=>Ct,FileStatus:()=>bt,OptionTypes:()=>Ui,Status:()=>oo,create:()=>ft,destroy:()=>gt,find:()=>Hi,getOptions:()=>ji,parse:()=>Wi,registerPlugin:()=>ve,setOptions:()=>Ft,supported:()=>Gi});var ir=e=>e instanceof HTMLElement,ar=(e,t=[],i=[])=>{let a={...e},n=[],o=[],l=()=>({...a}),r=()=>{let f=[...n];return n.length=0,f},s=()=>{let f=[...o];o.length=0,f.forEach(({type:g,data:h})=>{p(g,h)})},p=(f,g,h)=>{if(h&&!document.hidden){o.push({type:f,data:g});return}u[f]&&u[f](g),n.push({type:f,data:g})},c=(f,...g)=>m[f]?m[f](...g):null,d={getState:l,processActionQueue:r,processDispatchQueue:s,dispatch:p,query:c},m={};t.forEach(f=>{m={...f(a),...m}});let u={};return i.forEach(f=>{u={...f(p,c,a),...u}}),d},nr=(e,t,i)=>{if(typeof i=="function"){e[t]=i;return}Object.defineProperty(e,t,{...i})},te=(e,t)=>{for(let i in e)e.hasOwnProperty(i)&&t(i,e[i])},We=e=>{let t={};return te(e,i=>{nr(t,i,e[i])}),t},se=(e,t,i=null)=>{if(i===null)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,i)},or="http://www.w3.org/2000/svg",lr=["svg","path"],Pa=e=>lr.includes(e),oi=(e,t,i={})=>{typeof t=="object"&&(i=t,t=null);let a=Pa(e)?document.createElementNS(or,e):document.createElement(e);return t&&(Pa(e)?se(a,"class",t):a.className=t),te(i,(n,o)=>{se(a,n,o)}),a},rr=e=>(t,i)=>{typeof i<"u"&&e.children[i]?e.insertBefore(t,e.children[i]):e.appendChild(t)},sr=(e,t)=>(i,a)=>(typeof a<"u"?t.splice(a,0,i):t.push(i),i),cr=(e,t)=>i=>(t.splice(t.indexOf(i),1),i.element.parentNode&&e.removeChild(i.element),i),dr=(()=>typeof window<"u"&&typeof window.document<"u")(),bn=()=>dr,pr=bn()?oi("svg"):{},mr="children"in pr?e=>e.children.length:e=>e.childNodes.length,Tn=(e,t,i,a)=>{let n=i[0]||e.left,o=i[1]||e.top,l=n+e.width,r=o+e.height*(a[1]||1),s={element:{...e},inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:n,top:o,right:l,bottom:r}};return t.filter(p=>!p.isRectIgnored()).map(p=>p.rect).forEach(p=>{Da(s.inner,{...p.inner}),Da(s.outer,{...p.outer})}),Fa(s.inner),s.outer.bottom+=s.element.marginBottom,s.outer.right+=s.element.marginRight,Fa(s.outer),s},Da=(e,t)=>{t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},Fa=e=>{e.width=e.right-e.left,e.height=e.bottom-e.top},$e=e=>typeof e=="number",ur=(e,t,i,a=.001)=>Math.abs(e-t){let a=null,n=null,o=0,l=!1,p=We({interpolate:(c,d)=>{if(l)return;if(!($e(a)&&$e(n))){l=!0,o=0;return}let m=-(n-a)*e;o+=m/i,n+=o,o*=t,ur(n,a,o)||d?(n=a,o=0,l=!0,p.onupdate(n),p.oncomplete(n)):p.onupdate(n)},target:{set:c=>{if($e(c)&&!$e(n)&&(n=c),a===null&&(a=c,n=c),a=c,n===a||typeof a>"u"){l=!0,o=0,p.onupdate(n),p.oncomplete(n);return}l=!1},get:()=>a},resting:{get:()=>l},onupdate:c=>{},oncomplete:c=>{}});return p};var gr=e=>e<.5?2*e*e:-1+(4-2*e)*e,hr=({duration:e=500,easing:t=gr,delay:i=0}={})=>{let a=null,n,o,l=!0,r=!1,s=null,c=We({interpolate:(d,m)=>{l||s===null||(a===null&&(a=d),!(d-a=e||m?(n=1,o=r?0:1,c.onupdate(o*s),c.oncomplete(o*s),l=!0):(o=n/e,c.onupdate((n>=0?t(r?1-o:o):0)*s))))},target:{get:()=>r?0:s,set:d=>{if(s===null){s=d,c.onupdate(d),c.oncomplete(d);return}dl},onupdate:d=>{},oncomplete:d=>{}});return c},za={spring:fr,tween:hr},Er=(e,t,i)=>{let a=e[t]&&typeof e[t][i]=="object"?e[t][i]:e[t]||e,n=typeof a=="string"?a:a.type,o=typeof a=="object"?{...a}:{};return za[n]?za[n](o):null},qi=(e,t,i,a=!1)=>{t=Array.isArray(t)?t:[t],t.forEach(n=>{e.forEach(o=>{let l=o,r=()=>i[o],s=p=>i[o]=p;typeof o=="object"&&(l=o.key,r=o.getter||r,s=o.setter||s),!(n[l]&&!a)&&(n[l]={get:r,set:s})})})},br=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a})=>{let n={...t},o=[];return te(e,(l,r)=>{let s=Er(r);if(!s)return;s.onupdate=c=>{t[l]=c},s.target=n[l],qi([{key:l,setter:c=>{s.target!==c&&(s.target=c)},getter:()=>t[l]}],[i,a],t,!0),o.push(s)}),{write:l=>{let r=document.hidden,s=!0;return o.forEach(p=>{p.resting||(s=!1),p.interpolate(l,r)}),s},destroy:()=>{}}},Tr=e=>(t,i)=>{e.addEventListener(t,i)},Ir=e=>(t,i)=>{e.removeEventListener(t,i)},vr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,viewState:n,view:o})=>{let l=[],r=Tr(o.element),s=Ir(o.element);return a.on=(p,c)=>{l.push({type:p,fn:c}),r(p,c)},a.off=(p,c)=>{l.splice(l.findIndex(d=>d.type===p&&d.fn===c),1),s(p,c)},{write:()=>!0,destroy:()=>{l.forEach(p=>{s(p.type,p.fn)})}}},xr=({mixinConfig:e,viewProps:t,viewExternalAPI:i})=>{qi(e,i,t)},ue=e=>e!=null,yr={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},_r=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,view:n})=>{let o={...t},l={};qi(e,[i,a],t);let r=()=>[t.translateX||0,t.translateY||0],s=()=>[t.scaleX||0,t.scaleY||0],p=()=>n.rect?Tn(n.rect,n.childViews,r(),s()):null;return i.rect={get:p},a.rect={get:p},e.forEach(c=>{t[c]=typeof o[c]>"u"?yr[c]:o[c]}),{write:()=>{if(Rr(l,t))return wr(n.element,t),Object.assign(l,{...t}),!0},destroy:()=>{}}},Rr=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!0;for(let i in t)if(t[i]!==e[i])return!0;return!1},wr=(e,{opacity:t,perspective:i,translateX:a,translateY:n,scaleX:o,scaleY:l,rotateX:r,rotateY:s,rotateZ:p,originX:c,originY:d,width:m,height:u})=>{let f="",g="";(ue(c)||ue(d))&&(g+=`transform-origin: ${c||0}px ${d||0}px;`),ue(i)&&(f+=`perspective(${i}px) `),(ue(a)||ue(n))&&(f+=`translate3d(${a||0}px, ${n||0}px, 0) `),(ue(o)||ue(l))&&(f+=`scale3d(${ue(o)?o:1}, ${ue(l)?l:1}, 1) `),ue(p)&&(f+=`rotateZ(${p}rad) `),ue(r)&&(f+=`rotateX(${r}rad) `),ue(s)&&(f+=`rotateY(${s}rad) `),f.length&&(g+=`transform:${f};`),ue(t)&&(g+=`opacity:${t};`,t===0&&(g+="visibility:hidden;"),t<1&&(g+="pointer-events:none;")),ue(u)&&(g+=`height:${u}px;`),ue(m)&&(g+=`width:${m}px;`);let h=e.elementCurrentStyle||"";(g.length!==h.length||g!==h)&&(e.style.cssText=g,e.elementCurrentStyle=g)},Sr={styles:_r,listeners:vr,animations:br,apis:xr},Ca=(e={},t={},i={})=>(t.layoutCalculated||(e.paddingTop=parseInt(i.paddingTop,10)||0,e.marginTop=parseInt(i.marginTop,10)||0,e.marginRight=parseInt(i.marginRight,10)||0,e.marginBottom=parseInt(i.marginBottom,10)||0,e.marginLeft=parseInt(i.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=t.offsetParent===null,e),ne=({tag:e="div",name:t=null,attributes:i={},read:a=()=>{},write:n=()=>{},create:o=()=>{},destroy:l=()=>{},filterFrameActionsForChild:r=(u,f)=>f,didCreateView:s=()=>{},didWriteView:p=()=>{},ignoreRect:c=!1,ignoreRectUpdate:d=!1,mixins:m=[]}={})=>(u,f={})=>{let g=oi(e,`filepond--${t}`,i),h=window.getComputedStyle(g,null),I=Ca(),E=null,T=!1,v=[],y=[],b={},w={},x=[n],_=[a],P=[l],O=()=>g,M=()=>v.concat(),N=()=>b,S=k=>(H,q)=>H(k,q),D=()=>E||(E=Tn(I,v,[0,0],[1,1]),E),R=()=>h,L=()=>{E=null,v.forEach(q=>q._read()),!(d&&I.width&&I.height)&&Ca(I,g,h);let H={root:$,props:f,rect:I};_.forEach(q=>q(H))},z=(k,H,q)=>{let le=H.length===0;return x.forEach(ee=>{ee({props:f,root:$,actions:H,timestamp:k,shouldOptimize:q})===!1&&(le=!1)}),y.forEach(ee=>{ee.write(k)===!1&&(le=!1)}),v.filter(ee=>!!ee.element.parentNode).forEach(ee=>{ee._write(k,r(ee,H),q)||(le=!1)}),v.forEach((ee,dt)=>{ee.element.parentNode||($.appendChild(ee.element,dt),ee._read(),ee._write(k,r(ee,H),q),le=!1)}),T=le,p({props:f,root:$,actions:H,timestamp:k}),le},F=()=>{y.forEach(k=>k.destroy()),P.forEach(k=>{k({root:$,props:f})}),v.forEach(k=>k._destroy())},G={element:{get:O},style:{get:R},childViews:{get:M}},C={...G,rect:{get:D},ref:{get:N},is:k=>t===k,appendChild:rr(g),createChildView:S(u),linkView:k=>(v.push(k),k),unlinkView:k=>{v.splice(v.indexOf(k),1)},appendChildView:sr(g,v),removeChildView:cr(g,v),registerWriter:k=>x.push(k),registerReader:k=>_.push(k),registerDestroyer:k=>P.push(k),invalidateLayout:()=>g.layoutCalculated=!1,dispatch:u.dispatch,query:u.query},Y={element:{get:O},childViews:{get:M},rect:{get:D},resting:{get:()=>T},isRectIgnored:()=>c,_read:L,_write:z,_destroy:F},Q={...G,rect:{get:()=>I}};Object.keys(m).sort((k,H)=>k==="styles"?1:H==="styles"?-1:0).forEach(k=>{let H=Sr[k]({mixinConfig:m[k],viewProps:f,viewState:w,viewInternalAPI:C,viewExternalAPI:Y,view:We(Q)});H&&y.push(H)});let $=We(C);o({root:$,props:f});let pe=mr(g);return v.forEach((k,H)=>{$.appendChild(k.element,pe+H)}),s($),We(Y)},Lr=(e,t,i=60)=>{let a="__framePainter";if(window[a]){window[a].readers.push(e),window[a].writers.push(t);return}window[a]={readers:[e],writers:[t]};let n=window[a],o=1e3/i,l=null,r=null,s=null,p=null,c=()=>{document.hidden?(s=()=>window.setTimeout(()=>d(performance.now()),o),p=()=>window.clearTimeout(r)):(s=()=>window.requestAnimationFrame(d),p=()=>window.cancelAnimationFrame(r))};document.addEventListener("visibilitychange",()=>{p&&p(),c(),d(performance.now())});let d=m=>{r=s(d),l||(l=m);let u=m-l;u<=o||(l=m-u%o,n.readers.forEach(f=>f()),n.writers.forEach(f=>f(m)))};return c(),d(performance.now()),{pause:()=>{p(r)}}},ge=(e,t)=>({root:i,props:a,actions:n=[],timestamp:o,shouldOptimize:l})=>{n.filter(r=>e[r.type]).forEach(r=>e[r.type]({root:i,props:a,action:r.data,timestamp:o,shouldOptimize:l})),t&&t({root:i,props:a,actions:n,timestamp:o,shouldOptimize:l})},Na=(e,t)=>t.parentNode.insertBefore(e,t),Ba=(e,t)=>t.parentNode.insertBefore(e,t.nextSibling),ci=e=>Array.isArray(e),Be=e=>e==null,Ar=e=>e.trim(),di=e=>""+e,Mr=(e,t=",")=>Be(e)?[]:ci(e)?e:di(e).split(t).map(Ar).filter(i=>i.length),In=e=>typeof e=="boolean",vn=e=>In(e)?e:e==="true",fe=e=>typeof e=="string",xn=e=>$e(e)?e:fe(e)?di(e).replace(/[a-z]+/gi,""):0,ni=e=>parseInt(xn(e),10),ka=e=>parseFloat(xn(e)),Et=e=>$e(e)&&isFinite(e)&&Math.floor(e)===e,Va=(e,t=1e3)=>{if(Et(e))return e;let i=di(e).trim();return/MB$/i.test(i)?(i=i.replace(/MB$i/,"").trim(),ni(i)*t*t):/KB/i.test(i)?(i=i.replace(/KB$i/,"").trim(),ni(i)*t):ni(i)},Xe=e=>typeof e=="function",Or=e=>{let t=self,i=e.split("."),a=null;for(;a=i.shift();)if(t=t[a],!t)return null;return t},Ga={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},Pr=e=>{let t={};return t.url=fe(e)?e:e.url||"",t.timeout=e.timeout?parseInt(e.timeout,10):0,t.headers=e.headers?e.headers:{},te(Ga,i=>{t[i]=Dr(i,e[i],Ga[i],t.timeout,t.headers)}),t.process=e.process||fe(e)||e.url?t.process:null,t.remove=e.remove||null,delete t.headers,t},Dr=(e,t,i,a,n)=>{if(t===null)return null;if(typeof t=="function")return t;let o={url:i==="GET"||i==="PATCH"?`?${e}=`:"",method:i,headers:n,withCredentials:!1,timeout:a,onload:null,ondata:null,onerror:null};if(fe(t))return o.url=t,o;if(Object.assign(o,t),fe(o.headers)){let l=o.headers.split(/:(.+)/);o.headers={header:l[0],value:l[1]}}return o.withCredentials=vn(o.withCredentials),o},Fr=e=>Pr(e),zr=e=>e===null,ce=e=>typeof e=="object"&&e!==null,Cr=e=>ce(e)&&fe(e.url)&&ce(e.process)&&ce(e.revert)&&ce(e.restore)&&ce(e.fetch),Di=e=>ci(e)?"array":zr(e)?"null":Et(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":Cr(e)?"api":typeof e,Nr=e=>e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'),Br={array:Mr,boolean:vn,int:e=>Di(e)==="bytes"?Va(e):ni(e),number:ka,float:ka,bytes:Va,string:e=>Xe(e)?e:di(e),function:e=>Or(e),serverapi:Fr,object:e=>{try{return JSON.parse(Nr(e))}catch{return null}}},kr=(e,t)=>Br[t](e),yn=(e,t,i)=>{if(e===t)return e;let a=Di(e);if(a!==i){let n=kr(e,i);if(a=Di(n),n===null)throw`Trying to assign value with incorrect type to "${option}", allowed type: "${i}"`;e=n}return e},Vr=(e,t)=>{let i=e;return{enumerable:!0,get:()=>i,set:a=>{i=yn(a,e,t)}}},Gr=e=>{let t={};return te(e,i=>{let a=e[i];t[i]=Vr(a[0],a[1])}),We(t)},Ur=e=>({items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:Gr(e)}),pi=(e,t="-")=>e.split(/(?=[A-Z])/).map(i=>i.toLowerCase()).join(t),Wr=(e,t)=>{let i={};return te(t,a=>{i[a]={get:()=>e.getState().options[a],set:n=>{e.dispatch(`SET_${pi(a,"_").toUpperCase()}`,{value:n})}}}),i},Hr=e=>(t,i,a)=>{let n={};return te(e,o=>{let l=pi(o,"_").toUpperCase();n[`SET_${l}`]=r=>{try{a.options[o]=r.value}catch{}t(`DID_SET_${l}`,{value:a.options[o]})}}),n},jr=e=>t=>{let i={};return te(e,a=>{i[`GET_${pi(a,"_").toUpperCase()}`]=n=>t.options[a]}),i},_e={API:1,DROP:2,BROWSE:3,PASTE:4,NONE:5},Yi=()=>Math.random().toString(36).substring(2,11),$i=(e,t)=>e.splice(t,1),qr=(e,t)=>{t?e():document.hidden?Promise.resolve(1).then(e):setTimeout(e,0)},mi=()=>{let e=[],t=(a,n)=>{$i(e,e.findIndex(o=>o.event===a&&(o.cb===n||!n)))},i=(a,n,o)=>{e.filter(l=>l.event===a).map(l=>l.cb).forEach(l=>qr(()=>l(...n),o))};return{fireSync:(a,...n)=>{i(a,n,!0)},fire:(a,...n)=>{i(a,n,!1)},on:(a,n)=>{e.push({event:a,cb:n})},onOnce:(a,n)=>{e.push({event:a,cb:(...o)=>{t(a,n),n(...o)}})},off:t}},_n=(e,t,i)=>{Object.getOwnPropertyNames(e).filter(a=>!i.includes(a)).forEach(a=>Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(e,a)))},Yr=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],he=e=>{let t={};return _n(e,t,Yr),t},$r=e=>{e.forEach((t,i)=>{t.released&&$i(e,i)})},U={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},re={INPUT:1,LIMBO:2,LOCAL:3},Rn=e=>/[^0-9]+/.exec(e),wn=()=>Rn(1.1.toLocaleString())[0],Xr=()=>{let e=wn(),t=1e3.toLocaleString(),i=1e3.toString();return t!==i?Rn(t)[0]:e==="."?",":"."},A={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},Xi=[],Ae=(e,t,i)=>new Promise((a,n)=>{let o=Xi.filter(r=>r.key===e).map(r=>r.cb);if(o.length===0){a(t);return}let l=o.shift();o.reduce((r,s)=>r.then(p=>s(p,i)),l(t,i)).then(r=>a(r)).catch(r=>n(r))}),tt=(e,t,i)=>Xi.filter(a=>a.key===e).map(a=>a.cb(t,i)),Qr=(e,t)=>Xi.push({key:e,cb:t}),Zr=e=>Object.assign(pt,e),li=()=>({...pt}),Kr=e=>{te(e,(t,i)=>{pt[t]&&(pt[t][0]=yn(i,pt[t][0],pt[t][1]))})},pt={id:[null,A.STRING],name:["filepond",A.STRING],disabled:[!1,A.BOOLEAN],className:[null,A.STRING],required:[!1,A.BOOLEAN],captureMethod:[null,A.STRING],allowSyncAcceptAttribute:[!0,A.BOOLEAN],allowDrop:[!0,A.BOOLEAN],allowBrowse:[!0,A.BOOLEAN],allowPaste:[!0,A.BOOLEAN],allowMultiple:[!1,A.BOOLEAN],allowReplace:[!0,A.BOOLEAN],allowRevert:[!0,A.BOOLEAN],allowRemove:[!0,A.BOOLEAN],allowProcess:[!0,A.BOOLEAN],allowReorder:[!1,A.BOOLEAN],allowDirectoriesOnly:[!1,A.BOOLEAN],storeAsFile:[!1,A.BOOLEAN],forceRevert:[!1,A.BOOLEAN],maxFiles:[null,A.INT],checkValidity:[!1,A.BOOLEAN],itemInsertLocationFreedom:[!0,A.BOOLEAN],itemInsertLocation:["before",A.STRING],itemInsertInterval:[75,A.INT],dropOnPage:[!1,A.BOOLEAN],dropOnElement:[!0,A.BOOLEAN],dropValidation:[!1,A.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],A.ARRAY],instantUpload:[!0,A.BOOLEAN],maxParallelUploads:[2,A.INT],allowMinimumUploadDuration:[!0,A.BOOLEAN],chunkUploads:[!1,A.BOOLEAN],chunkForce:[!1,A.BOOLEAN],chunkSize:[5e6,A.INT],chunkRetryDelays:[[500,1e3,3e3],A.ARRAY],server:[null,A.SERVER_API],fileSizeBase:[1e3,A.INT],labelFileSizeBytes:["bytes",A.STRING],labelFileSizeKilobytes:["KB",A.STRING],labelFileSizeMegabytes:["MB",A.STRING],labelFileSizeGigabytes:["GB",A.STRING],labelDecimalSeparator:[wn(),A.STRING],labelThousandsSeparator:[Xr(),A.STRING],labelIdle:['Drag & Drop your files or Browse',A.STRING],labelInvalidField:["Field contains invalid files",A.STRING],labelFileWaitingForSize:["Waiting for size",A.STRING],labelFileSizeNotAvailable:["Size not available",A.STRING],labelFileCountSingular:["file in list",A.STRING],labelFileCountPlural:["files in list",A.STRING],labelFileLoading:["Loading",A.STRING],labelFileAdded:["Added",A.STRING],labelFileLoadError:["Error during load",A.STRING],labelFileRemoved:["Removed",A.STRING],labelFileRemoveError:["Error during remove",A.STRING],labelFileProcessing:["Uploading",A.STRING],labelFileProcessingComplete:["Upload complete",A.STRING],labelFileProcessingAborted:["Upload cancelled",A.STRING],labelFileProcessingError:["Error during upload",A.STRING],labelFileProcessingRevertError:["Error during revert",A.STRING],labelTapToCancel:["tap to cancel",A.STRING],labelTapToRetry:["tap to retry",A.STRING],labelTapToUndo:["tap to undo",A.STRING],labelButtonRemoveItem:["Remove",A.STRING],labelButtonAbortItemLoad:["Abort",A.STRING],labelButtonRetryItemLoad:["Retry",A.STRING],labelButtonAbortItemProcessing:["Cancel",A.STRING],labelButtonUndoItemProcessing:["Undo",A.STRING],labelButtonRetryItemProcessing:["Retry",A.STRING],labelButtonProcessItem:["Upload",A.STRING],iconRemove:['',A.STRING],iconProcess:['',A.STRING],iconRetry:['',A.STRING],iconUndo:['',A.STRING],iconDone:['',A.STRING],oninit:[null,A.FUNCTION],onwarning:[null,A.FUNCTION],onerror:[null,A.FUNCTION],onactivatefile:[null,A.FUNCTION],oninitfile:[null,A.FUNCTION],onaddfilestart:[null,A.FUNCTION],onaddfileprogress:[null,A.FUNCTION],onaddfile:[null,A.FUNCTION],onprocessfilestart:[null,A.FUNCTION],onprocessfileprogress:[null,A.FUNCTION],onprocessfileabort:[null,A.FUNCTION],onprocessfilerevert:[null,A.FUNCTION],onprocessfile:[null,A.FUNCTION],onprocessfiles:[null,A.FUNCTION],onremovefile:[null,A.FUNCTION],onpreparefile:[null,A.FUNCTION],onupdatefiles:[null,A.FUNCTION],onreorderfiles:[null,A.FUNCTION],beforeDropFile:[null,A.FUNCTION],beforeAddFile:[null,A.FUNCTION],beforeRemoveFile:[null,A.FUNCTION],beforePrepareFile:[null,A.FUNCTION],stylePanelLayout:[null,A.STRING],stylePanelAspectRatio:[null,A.STRING],styleItemPanelAspectRatio:[null,A.STRING],styleButtonRemoveItemPosition:["left",A.STRING],styleButtonProcessItemPosition:["right",A.STRING],styleLoadIndicatorPosition:["right",A.STRING],styleProgressIndicatorPosition:["right",A.STRING],styleButtonRemoveItemAlign:[!1,A.BOOLEAN],files:[[],A.ARRAY],credits:[["https://pqina.nl/","Powered by PQINA"],A.ARRAY]},Qe=(e,t)=>Be(t)?e[0]||null:Et(t)?e[t]||null:(typeof t=="object"&&(t=t.id),e.find(i=>i.id===t)||null),Sn=e=>{if(Be(e))return e;if(/:/.test(e)){let t=e.split(":");return t[1]/t[0]}return parseFloat(e)},Me=e=>e.filter(t=>!t.archived),Ln={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},Kt=null,Jr=()=>{if(Kt===null)try{let e=new DataTransfer;e.items.add(new File(["hello world"],"This_Works.txt"));let t=document.createElement("input");t.setAttribute("type","file"),t.files=e.files,Kt=t.files.length===1}catch{Kt=!1}return Kt},es=[U.LOAD_ERROR,U.PROCESSING_ERROR,U.PROCESSING_REVERT_ERROR],ts=[U.LOADING,U.PROCESSING,U.PROCESSING_QUEUED,U.INIT],is=[U.PROCESSING_COMPLETE],as=e=>es.includes(e.status),ns=e=>ts.includes(e.status),os=e=>is.includes(e.status),Ua=e=>ce(e.options.server)&&(ce(e.options.server.process)||Xe(e.options.server.process)),ls=e=>({GET_STATUS:()=>{let t=Me(e.items),{EMPTY:i,ERROR:a,BUSY:n,IDLE:o,READY:l}=Ln;return t.length===0?i:t.some(as)?a:t.some(ns)?n:t.some(os)?l:o},GET_ITEM:t=>Qe(e.items,t),GET_ACTIVE_ITEM:t=>Qe(Me(e.items),t),GET_ACTIVE_ITEMS:()=>Me(e.items),GET_ITEMS:()=>e.items,GET_ITEM_NAME:t=>{let i=Qe(e.items,t);return i?i.filename:null},GET_ITEM_SIZE:t=>{let i=Qe(e.items,t);return i?i.fileSize:null},GET_STYLES:()=>Object.keys(e.options).filter(t=>/^style/.test(t)).map(t=>({name:t,value:e.options[t]})),GET_PANEL_ASPECT_RATIO:()=>/circle/.test(e.options.stylePanelLayout)?1:Sn(e.options.stylePanelAspectRatio),GET_ITEM_PANEL_ASPECT_RATIO:()=>e.options.styleItemPanelAspectRatio,GET_ITEMS_BY_STATUS:t=>Me(e.items).filter(i=>i.status===t),GET_TOTAL_ITEMS:()=>Me(e.items).length,SHOULD_UPDATE_FILE_INPUT:()=>e.options.storeAsFile&&Jr()&&!Ua(e),IS_ASYNC:()=>Ua(e),GET_FILE_SIZE_LABELS:t=>({labelBytes:t("GET_LABEL_FILE_SIZE_BYTES")||void 0,labelKilobytes:t("GET_LABEL_FILE_SIZE_KILOBYTES")||void 0,labelMegabytes:t("GET_LABEL_FILE_SIZE_MEGABYTES")||void 0,labelGigabytes:t("GET_LABEL_FILE_SIZE_GIGABYTES")||void 0})}),rs=e=>{let t=Me(e.items).length;if(!e.options.allowMultiple)return t===0;let i=e.options.maxFiles;return i===null||tMath.max(Math.min(i,e),t),ss=(e,t,i)=>e.splice(t,0,i),cs=(e,t,i)=>Be(t)?null:typeof i>"u"?(e.push(t),t):(i=An(i,0,e.length),ss(e,i,t),t),Fi=e=>/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e),zt=e=>`${e}`.split("/").pop().split("?").shift(),ui=e=>e.split(".").pop(),ds=e=>{if(typeof e!="string")return"";let t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?t==="jpeg"?"jpg":t:""},Mt=(e,t="")=>(t+e).slice(-t.length),Mn=(e=new Date)=>`${e.getFullYear()}-${Mt(e.getMonth()+1,"00")}-${Mt(e.getDate(),"00")}_${Mt(e.getHours(),"00")}-${Mt(e.getMinutes(),"00")}-${Mt(e.getSeconds(),"00")}`,ht=(e,t,i=null,a=null)=>{let n=typeof i=="string"?e.slice(0,e.size,i):e.slice(0,e.size,e.type);return n.lastModifiedDate=new Date,e._relativePath&&(n._relativePath=e._relativePath),fe(t)||(t=Mn()),t&&a===null&&ui(t)?n.name=t:(a=a||ds(n.type),n.name=t+(a?"."+a:"")),n},ps=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,On=(e,t)=>{let i=ps();if(i){let a=new i;return a.append(e),a.getBlob(t)}return new Blob([e],{type:t})},ms=(e,t)=>{let i=new ArrayBuffer(e.length),a=new Uint8Array(i);for(let n=0;n(/^data:(.+);/.exec(e)||[])[1]||null,us=e=>e.split(",")[1].replace(/\s/g,""),fs=e=>atob(us(e)),gs=e=>{let t=Pn(e),i=fs(e);return ms(i,t)},hs=(e,t,i)=>ht(gs(e),t,null,i),Es=e=>{if(!/^content-disposition:/i.test(e))return null;let t=e.split(/filename=|filename\*=.+''/).splice(1).map(i=>i.trim().replace(/^["']|[;"']{0,2}$/g,"")).filter(i=>i.length);return t.length?decodeURI(t[t.length-1]):null},bs=e=>{if(/content-length:/i.test(e)){let t=e.match(/[0-9]+/)[0];return t?parseInt(t,10):null}return null},Ts=e=>/x-content-transfer-id:/i.test(e)&&(e.split(":")[1]||"").trim()||null,Qi=e=>{let t={source:null,name:null,size:null},i=e.split(` -`);for(let a of i){let n=Es(a);if(n){t.name=n;continue}let o=bs(a);if(o){t.size=o;continue}let l=Ts(a);if(l){t.source=l;continue}}return t},Is=e=>{let t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},i=()=>t.progress,a=()=>{t.request&&t.request.abort&&t.request.abort()},n=()=>{let r=t.source;l.fire("init",r),r instanceof File?l.fire("load",r):r instanceof Blob?l.fire("load",ht(r,r.name)):Fi(r)?l.fire("load",hs(r)):o(r)},o=r=>{if(!e){l.fire("error",{type:"error",body:"Can't load URL",code:400});return}t.timestamp=Date.now(),t.request=e(r,s=>{t.duration=Date.now()-t.timestamp,t.complete=!0,s instanceof Blob&&(s=ht(s,s.name||zt(r))),l.fire("load",s instanceof Blob?s:s?s.body:null)},s=>{l.fire("error",typeof s=="string"?{type:"error",code:0,body:s}:s)},(s,p,c)=>{if(c&&(t.size=c),t.duration=Date.now()-t.timestamp,!s){t.progress=null;return}t.progress=p/c,l.fire("progress",t.progress)},()=>{l.fire("abort")},s=>{let p=Qi(typeof s=="string"?s:s.headers);l.fire("meta",{size:t.size||p.size,filename:p.name,source:p.source})})},l={...mi(),setSource:r=>t.source=r,getProgress:i,abort:a,load:n};return l},Wa=e=>/GET|HEAD/.test(e),Ze=(e,t,i)=>{let a={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{n=!0,l.abort()}},n=!1,o=!1;i={method:"POST",headers:{},withCredentials:!1,...i},t=encodeURI(t),Wa(i.method)&&e&&(t=`${t}${encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))}`);let l=new XMLHttpRequest,r=Wa(i.method)?l:l.upload;return r.onprogress=s=>{n||a.onprogress(s.lengthComputable,s.loaded,s.total)},l.onreadystatechange=()=>{l.readyState<2||l.readyState===4&&l.status===0||o||(o=!0,a.onheaders(l))},l.onload=()=>{l.status>=200&&l.status<300?a.onload(l):a.onerror(l)},l.onerror=()=>a.onerror(l),l.onabort=()=>{n=!0,a.onabort()},l.ontimeout=()=>a.ontimeout(l),l.open(i.method,t,!0),Et(i.timeout)&&(l.timeout=i.timeout),Object.keys(i.headers).forEach(s=>{let p=unescape(encodeURIComponent(i.headers[s]));l.setRequestHeader(s,p)}),i.responseType&&(l.responseType=i.responseType),i.withCredentials&&(l.withCredentials=!0),l.send(e),a},ie=(e,t,i,a)=>({type:e,code:t,body:i,headers:a}),Ke=e=>t=>{e(ie("error",0,"Timeout",t.getAllResponseHeaders()))},Ha=e=>/\?/.test(e),Dt=(...e)=>{let t="";return e.forEach(i=>{t+=Ha(t)&&Ha(i)?i.replace(/\?/,"&"):i}),t},Si=(e="",t)=>{if(typeof t=="function")return t;if(!t||!fe(t.url))return null;let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,o,l,r,s,p)=>{let c=Ze(n,Dt(e,t.url),{...t,responseType:"blob"});return c.onload=d=>{let m=d.getAllResponseHeaders(),u=Qi(m).name||zt(n);o(ie("load",d.status,t.method==="HEAD"?null:ht(i(d.response),u),m))},c.onerror=d=>{l(ie("error",d.status,a(d.response)||d.statusText,d.getAllResponseHeaders()))},c.onheaders=d=>{p(ie("headers",d.status,null,d.getAllResponseHeaders()))},c.ontimeout=Ke(l),c.onprogress=r,c.onabort=s,c}},xe={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},vs=(e,t,i,a,n,o,l,r,s,p,c)=>{let d=[],{chunkTransferId:m,chunkServer:u,chunkSize:f,chunkRetryDelays:g}=c,h={serverId:m,aborted:!1},I=t.ondata||(S=>S),E=t.onload||((S,D)=>D==="HEAD"?S.getResponseHeader("Upload-Offset"):S.response),T=t.onerror||(S=>null),v=S=>{let D=new FormData;ce(n)&&D.append(i,JSON.stringify(n));let R=typeof t.headers=="function"?t.headers(a,n):{...t.headers,"Upload-Length":a.size},L={...t,headers:R},z=Ze(I(D),Dt(e,t.url),L);z.onload=F=>S(E(F,L.method)),z.onerror=F=>l(ie("error",F.status,T(F.response)||F.statusText,F.getAllResponseHeaders())),z.ontimeout=Ke(l)},y=S=>{let D=Dt(e,u.url,h.serverId),L={headers:typeof t.headers=="function"?t.headers(h.serverId):{...t.headers},method:"HEAD"},z=Ze(null,D,L);z.onload=F=>S(E(F,L.method)),z.onerror=F=>l(ie("error",F.status,T(F.response)||F.statusText,F.getAllResponseHeaders())),z.ontimeout=Ke(l)},b=Math.floor(a.size/f);for(let S=0;S<=b;S++){let D=S*f,R=a.slice(D,D+f,"application/offset+octet-stream");d[S]={index:S,size:R.size,offset:D,data:R,file:a,progress:0,retries:[...g],status:xe.QUEUED,error:null,request:null,timeout:null}}let w=()=>o(h.serverId),x=S=>S.status===xe.QUEUED||S.status===xe.ERROR,_=S=>{if(h.aborted)return;if(S=S||d.find(x),!S){d.every(C=>C.status===xe.COMPLETE)&&w();return}S.status=xe.PROCESSING,S.progress=null;let D=u.ondata||(C=>C),R=u.onerror||(C=>null),L=u.onload||(()=>{}),z=Dt(e,u.url,h.serverId),F=typeof u.headers=="function"?u.headers(S):{...u.headers,"Content-Type":"application/offset+octet-stream","Upload-Offset":S.offset,"Upload-Length":a.size,"Upload-Name":a.name},G=S.request=Ze(D(S.data),z,{...u,headers:F});G.onload=C=>{L(C,S.index,d.length),S.status=xe.COMPLETE,S.request=null,M()},G.onprogress=(C,Y,Q)=>{S.progress=C?Y:null,O()},G.onerror=C=>{S.status=xe.ERROR,S.request=null,S.error=R(C.response)||C.statusText,P(S)||l(ie("error",C.status,R(C.response)||C.statusText,C.getAllResponseHeaders()))},G.ontimeout=C=>{S.status=xe.ERROR,S.request=null,P(S)||Ke(l)(C)},G.onabort=()=>{S.status=xe.QUEUED,S.request=null,s()}},P=S=>S.retries.length===0?!1:(S.status=xe.WAITING,clearTimeout(S.timeout),S.timeout=setTimeout(()=>{_(S)},S.retries.shift()),!0),O=()=>{let S=d.reduce((R,L)=>R===null||L.progress===null?null:R+L.progress,0);if(S===null)return r(!1,0,0);let D=d.reduce((R,L)=>R+L.size,0);r(!0,S,D)},M=()=>{d.filter(D=>D.status===xe.PROCESSING).length>=1||_()},N=()=>{d.forEach(S=>{clearTimeout(S.timeout),S.request&&S.request.abort()})};return h.serverId?y(S=>{h.aborted||(d.filter(D=>D.offset{D.status=xe.COMPLETE,D.progress=D.size}),M())}):v(S=>{h.aborted||(p(S),h.serverId=S,M())}),{abort:()=>{h.aborted=!0,N()}}},xs=(e,t,i,a)=>(n,o,l,r,s,p,c)=>{if(!n)return;let d=a.chunkUploads,m=d&&n.size>a.chunkSize,u=d&&(m||a.chunkForce);if(n instanceof Blob&&u)return vs(e,t,i,n,o,l,r,s,p,c,a);let f=t.ondata||(y=>y),g=t.onload||(y=>y),h=t.onerror||(y=>null),I=typeof t.headers=="function"?t.headers(n,o)||{}:{...t.headers},E={...t,headers:I};var T=new FormData;ce(o)&&T.append(i,JSON.stringify(o)),(n instanceof Blob?[{name:null,file:n}]:n).forEach(y=>{T.append(i,y.file,y.name===null?y.file.name:`${y.name}${y.file.name}`)});let v=Ze(f(T),Dt(e,t.url),E);return v.onload=y=>{l(ie("load",y.status,g(y.response),y.getAllResponseHeaders()))},v.onerror=y=>{r(ie("error",y.status,h(y.response)||y.statusText,y.getAllResponseHeaders()))},v.ontimeout=Ke(r),v.onprogress=s,v.onabort=p,v},ys=(e="",t,i,a)=>typeof t=="function"?(...n)=>t(i,...n,a):!t||!fe(t.url)?null:xs(e,t,i,a),Ot=(e="",t)=>{if(typeof t=="function")return t;if(!t||!fe(t.url))return(n,o)=>o();let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,o,l)=>{let r=Ze(n,e+t.url,t);return r.onload=s=>{o(ie("load",s.status,i(s.response),s.getAllResponseHeaders()))},r.onerror=s=>{l(ie("error",s.status,a(s.response)||s.statusText,s.getAllResponseHeaders()))},r.ontimeout=Ke(l),r}},Dn=(e=0,t=1)=>e+Math.random()*(t-e),_s=(e,t=1e3,i=0,a=25,n=250)=>{let o=null,l=Date.now(),r=()=>{let s=Date.now()-l,p=Dn(a,n);s+p>t&&(p=s+p-t);let c=s/t;if(c>=1||document.hidden){e(1);return}e(c),o=setTimeout(r,p)};return t>0&&r(),{clear:()=>{clearTimeout(o)}}},Rs=(e,t)=>{let i={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},{allowMinimumUploadDuration:a}=t,n=(c,d)=>{let m=()=>{i.duration===0||i.progress===null||p.fire("progress",p.getProgress())},u=()=>{i.complete=!0,p.fire("load-perceived",i.response.body)};p.fire("start"),i.timestamp=Date.now(),i.perceivedPerformanceUpdater=_s(f=>{i.perceivedProgress=f,i.perceivedDuration=Date.now()-i.timestamp,m(),i.response&&i.perceivedProgress===1&&!i.complete&&u()},a?Dn(750,1500):0),i.request=e(c,d,f=>{i.response=ce(f)?f:{type:"load",code:200,body:`${f}`,headers:{}},i.duration=Date.now()-i.timestamp,i.progress=1,p.fire("load",i.response.body),(!a||a&&i.perceivedProgress===1)&&u()},f=>{i.perceivedPerformanceUpdater.clear(),p.fire("error",ce(f)?f:{type:"error",code:0,body:`${f}`})},(f,g,h)=>{i.duration=Date.now()-i.timestamp,i.progress=f?g/h:null,m()},()=>{i.perceivedPerformanceUpdater.clear(),p.fire("abort",i.response?i.response.body:null)},f=>{p.fire("transfer",f)})},o=()=>{i.request&&(i.perceivedPerformanceUpdater.clear(),i.request.abort&&i.request.abort(),i.complete=!0)},l=()=>{o(),i.complete=!1,i.perceivedProgress=0,i.progress=0,i.timestamp=null,i.perceivedDuration=0,i.duration=0,i.request=null,i.response=null},r=a?()=>i.progress?Math.min(i.progress,i.perceivedProgress):null:()=>i.progress||null,s=a?()=>Math.min(i.duration,i.perceivedDuration):()=>i.duration,p={...mi(),process:n,abort:o,getProgress:r,getDuration:s,reset:l};return p},Fn=e=>e.substring(0,e.lastIndexOf("."))||e,ws=e=>{let t=[e.name,e.size,e.type];return e instanceof Blob||Fi(e)?t[0]=e.name||Mn():Fi(e)?(t[1]=e.length,t[2]=Pn(e)):fe(e)&&(t[0]=zt(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},Je=e=>!!(e instanceof File||e instanceof Blob&&e.name),zn=e=>{if(!ce(e))return e;let t=ci(e)?[]:{};for(let i in e){if(!e.hasOwnProperty(i))continue;let a=e[i];t[i]=a&&ce(a)?zn(a):a}return t},Ss=(e=null,t=null,i=null)=>{let a=Yi(),n={archived:!1,frozen:!1,released:!1,source:null,file:i,serverFileReference:t,transferId:null,processingAborted:!1,status:t?U.PROCESSING_COMPLETE:U.INIT,activeLoader:null,activeProcessor:null},o=null,l={},r=x=>n.status=x,s=(x,..._)=>{n.released||n.frozen||b.fire(x,..._)},p=()=>ui(n.file.name),c=()=>n.file.type,d=()=>n.file.size,m=()=>n.file,u=(x,_,P)=>{if(n.source=x,b.fireSync("init"),n.file){b.fireSync("load-skip");return}n.file=ws(x),_.on("init",()=>{s("load-init")}),_.on("meta",O=>{n.file.size=O.size,n.file.filename=O.filename,O.source&&(e=re.LIMBO,n.serverFileReference=O.source,n.status=U.PROCESSING_COMPLETE),s("load-meta")}),_.on("progress",O=>{r(U.LOADING),s("load-progress",O)}),_.on("error",O=>{r(U.LOAD_ERROR),s("load-request-error",O)}),_.on("abort",()=>{r(U.INIT),s("load-abort")}),_.on("load",O=>{n.activeLoader=null;let M=S=>{n.file=Je(S)?S:n.file,e===re.LIMBO&&n.serverFileReference?r(U.PROCESSING_COMPLETE):r(U.IDLE),s("load")},N=S=>{n.file=O,s("load-meta"),r(U.LOAD_ERROR),s("load-file-error",S)};if(n.serverFileReference){M(O);return}P(O,M,N)}),_.setSource(x),n.activeLoader=_,_.load()},f=()=>{n.activeLoader&&n.activeLoader.load()},g=()=>{if(n.activeLoader){n.activeLoader.abort();return}r(U.INIT),s("load-abort")},h=(x,_)=>{if(n.processingAborted){n.processingAborted=!1;return}if(r(U.PROCESSING),o=null,!(n.file instanceof Blob)){b.on("load",()=>{h(x,_)});return}x.on("load",M=>{n.transferId=null,n.serverFileReference=M}),x.on("transfer",M=>{n.transferId=M}),x.on("load-perceived",M=>{n.activeProcessor=null,n.transferId=null,n.serverFileReference=M,r(U.PROCESSING_COMPLETE),s("process-complete",M)}),x.on("start",()=>{s("process-start")}),x.on("error",M=>{n.activeProcessor=null,r(U.PROCESSING_ERROR),s("process-error",M)}),x.on("abort",M=>{n.activeProcessor=null,n.serverFileReference=M,r(U.IDLE),s("process-abort"),o&&o()}),x.on("progress",M=>{s("process-progress",M)});let P=M=>{n.archived||x.process(M,{...l})},O=console.error;_(n.file,P,O),n.activeProcessor=x},I=()=>{n.processingAborted=!1,r(U.PROCESSING_QUEUED)},E=()=>new Promise(x=>{if(!n.activeProcessor){n.processingAborted=!0,r(U.IDLE),s("process-abort"),x();return}o=()=>{x()},n.activeProcessor.abort()}),T=(x,_)=>new Promise((P,O)=>{let M=n.serverFileReference!==null?n.serverFileReference:n.transferId;if(M===null){P();return}x(M,()=>{n.serverFileReference=null,n.transferId=null,P()},N=>{if(!_){P();return}r(U.PROCESSING_REVERT_ERROR),s("process-revert-error"),O(N)}),r(U.IDLE),s("process-revert")}),v=(x,_,P)=>{let O=x.split("."),M=O[0],N=O.pop(),S=l;O.forEach(D=>S=S[D]),JSON.stringify(S[N])!==JSON.stringify(_)&&(S[N]=_,s("metadata-update",{key:M,value:l[M],silent:P}))},b={id:{get:()=>a},origin:{get:()=>e,set:x=>e=x},serverId:{get:()=>n.serverFileReference},transferId:{get:()=>n.transferId},status:{get:()=>n.status},filename:{get:()=>n.file.name},filenameWithoutExtension:{get:()=>Fn(n.file.name)},fileExtension:{get:p},fileType:{get:c},fileSize:{get:d},file:{get:m},relativePath:{get:()=>n.file._relativePath},source:{get:()=>n.source},getMetadata:x=>zn(x?l[x]:l),setMetadata:(x,_,P)=>{if(ce(x)){let O=x;return Object.keys(O).forEach(M=>{v(M,O[M],_)}),x}return v(x,_,P),_},extend:(x,_)=>w[x]=_,abortLoad:g,retryLoad:f,requestProcessing:I,abortProcessing:E,load:u,process:h,revert:T,...mi(),freeze:()=>n.frozen=!0,release:()=>n.released=!0,released:{get:()=>n.released},archive:()=>n.archived=!0,archived:{get:()=>n.archived},setFile:x=>n.file=x},w=We(b);return w},Ls=(e,t)=>Be(t)?0:fe(t)?e.findIndex(i=>i.id===t):-1,ja=(e,t)=>{let i=Ls(e,t);if(!(i<0))return e[i]||null},qa=(e,t,i,a,n,o)=>{let l=Ze(null,e,{method:"GET",responseType:"blob"});return l.onload=r=>{let s=r.getAllResponseHeaders(),p=Qi(s).name||zt(e);t(ie("load",r.status,ht(r.response,p),s))},l.onerror=r=>{i(ie("error",r.status,r.statusText,r.getAllResponseHeaders()))},l.onheaders=r=>{o(ie("headers",r.status,null,r.getAllResponseHeaders()))},l.ontimeout=Ke(i),l.onprogress=a,l.onabort=n,l},Ya=e=>(e.indexOf("//")===0&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]),As=e=>(e.indexOf(":")>-1||e.indexOf("//")>-1)&&Ya(location.href)!==Ya(e),Jt=e=>(...t)=>Xe(e)?e(...t):e,Ms=e=>!Je(e.file),Li=(e,t)=>{clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout(()=>{e("DID_UPDATE_ITEMS",{items:Me(t.items)})},0)},$a=(e,...t)=>new Promise(i=>{if(!e)return i(!0);let a=e(...t);if(a==null)return i(!0);if(typeof a=="boolean")return i(a);typeof a.then=="function"&&a.then(i)}),Ai=(e,t)=>{e.items.sort((i,a)=>t(he(i),he(a)))},ye=(e,t)=>({query:i,success:a=()=>{},failure:n=()=>{},...o}={})=>{let l=Qe(e.items,i);if(!l){n({error:ie("error",0,"Item not found"),file:null});return}t(l,a,n,o||{})},Os=(e,t,i)=>({ABORT_ALL:()=>{Me(i.items).forEach(a=>{a.freeze(),a.abortLoad(),a.abortProcessing()})},DID_SET_FILES:({value:a=[]})=>{let n=a.map(l=>({source:l.source?l.source:l,options:l.options})),o=Me(i.items);o.forEach(l=>{n.find(r=>r.source===l.source||r.source===l.file)||e("REMOVE_ITEM",{query:l,remove:!1})}),o=Me(i.items),n.forEach((l,r)=>{o.find(s=>s.source===l.source||s.file===l.source)||e("ADD_ITEM",{...l,interactionMethod:_e.NONE,index:r})})},DID_UPDATE_ITEM_METADATA:({id:a,action:n,change:o})=>{o.silent||(clearTimeout(i.itemUpdateTimeout),i.itemUpdateTimeout=setTimeout(()=>{let l=ja(i.items,a);if(!t("IS_ASYNC")){Ae("SHOULD_PREPARE_OUTPUT",!1,{item:l,query:t,action:n,change:o}).then(c=>{let d=t("GET_BEFORE_PREPARE_FILE");d&&(c=d(l,c)),c&&e("REQUEST_PREPARE_OUTPUT",{query:a,item:l,success:m=>{e("DID_PREPARE_OUTPUT",{id:a,file:m})}},!0)});return}l.origin===re.LOCAL&&e("DID_LOAD_ITEM",{id:l.id,error:null,serverFileReference:l.source});let r=()=>{setTimeout(()=>{e("REQUEST_ITEM_PROCESSING",{query:a})},32)},s=c=>{l.revert(Ot(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(c?r:()=>{}).catch(()=>{})},p=c=>{l.abortProcessing().then(c?r:()=>{})};if(l.status===U.PROCESSING_COMPLETE)return s(i.options.instantUpload);if(l.status===U.PROCESSING)return p(i.options.instantUpload);i.options.instantUpload&&r()},0))},MOVE_ITEM:({query:a,index:n})=>{let o=Qe(i.items,a);if(!o)return;let l=i.items.indexOf(o);n=An(n,0,i.items.length-1),l!==n&&i.items.splice(n,0,i.items.splice(l,1)[0])},SORT:({compare:a})=>{Ai(i,a),e("DID_SORT_ITEMS",{items:t("GET_ACTIVE_ITEMS")})},ADD_ITEMS:({items:a,index:n,interactionMethod:o,success:l=()=>{},failure:r=()=>{}})=>{let s=n;if(n===-1||typeof n>"u"){let u=t("GET_ITEM_INSERT_LOCATION"),f=t("GET_TOTAL_ITEMS");s=u==="before"?0:f}let p=t("GET_IGNORED_FILES"),c=u=>Je(u)?!p.includes(u.name.toLowerCase()):!Be(u),m=a.filter(c).map(u=>new Promise((f,g)=>{e("ADD_ITEM",{interactionMethod:o,source:u.source||u,success:f,failure:g,index:s++,options:u.options||{}})}));Promise.all(m).then(l).catch(r)},ADD_ITEM:({source:a,index:n=-1,interactionMethod:o,success:l=()=>{},failure:r=()=>{},options:s={}})=>{if(Be(a)){r({error:ie("error",0,"No source"),file:null});return}if(Je(a)&&i.options.ignoredFiles.includes(a.name.toLowerCase()))return;if(!rs(i)){if(i.options.allowMultiple||!i.options.allowMultiple&&!i.options.allowReplace){let E=ie("warning",0,"Max files");e("DID_THROW_MAX_FILES",{source:a,error:E}),r({error:E,file:null});return}let I=Me(i.items)[0];if(I.status===U.PROCESSING_COMPLETE||I.status===U.PROCESSING_REVERT_ERROR){let E=t("GET_FORCE_REVERT");if(I.revert(Ot(i.options.server.url,i.options.server.revert),E).then(()=>{E&&e("ADD_ITEM",{source:a,index:n,interactionMethod:o,success:l,failure:r,options:s})}).catch(()=>{}),E)return}e("REMOVE_ITEM",{query:I.id})}let p=s.type==="local"?re.LOCAL:s.type==="limbo"?re.LIMBO:re.INPUT,c=Ss(p,p===re.INPUT?null:a,s.file);Object.keys(s.metadata||{}).forEach(I=>{c.setMetadata(I,s.metadata[I])}),tt("DID_CREATE_ITEM",c,{query:t,dispatch:e});let d=t("GET_ITEM_INSERT_LOCATION");i.options.itemInsertLocationFreedom||(n=d==="before"?-1:i.items.length),cs(i.items,c,n),Xe(d)&&a&&Ai(i,d);let m=c.id;c.on("init",()=>{e("DID_INIT_ITEM",{id:m})}),c.on("load-init",()=>{e("DID_START_ITEM_LOAD",{id:m})}),c.on("load-meta",()=>{e("DID_UPDATE_ITEM_META",{id:m})}),c.on("load-progress",I=>{e("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:m,progress:I})}),c.on("load-request-error",I=>{let E=Jt(i.options.labelFileLoadError)(I);if(I.code>=400&&I.code<500){e("DID_THROW_ITEM_INVALID",{id:m,error:I,status:{main:E,sub:`${I.code} (${I.body})`}}),r({error:I,file:he(c)});return}e("DID_THROW_ITEM_LOAD_ERROR",{id:m,error:I,status:{main:E,sub:i.options.labelTapToRetry}})}),c.on("load-file-error",I=>{e("DID_THROW_ITEM_INVALID",{id:m,error:I.status,status:I.status}),r({error:I.status,file:he(c)})}),c.on("load-abort",()=>{e("REMOVE_ITEM",{query:m})}),c.on("load-skip",()=>{c.on("metadata-update",I=>{Je(c.file)&&e("DID_UPDATE_ITEM_METADATA",{id:m,change:I})}),e("COMPLETE_LOAD_ITEM",{query:m,item:c,data:{source:a,success:l}})}),c.on("load",()=>{let I=E=>{if(!E){e("REMOVE_ITEM",{query:m});return}c.on("metadata-update",T=>{e("DID_UPDATE_ITEM_METADATA",{id:m,change:T})}),Ae("SHOULD_PREPARE_OUTPUT",!1,{item:c,query:t}).then(T=>{let v=t("GET_BEFORE_PREPARE_FILE");v&&(T=v(c,T));let y=()=>{e("COMPLETE_LOAD_ITEM",{query:m,item:c,data:{source:a,success:l}}),Li(e,i)};if(T){e("REQUEST_PREPARE_OUTPUT",{query:m,item:c,success:b=>{e("DID_PREPARE_OUTPUT",{id:m,file:b}),y()}},!0);return}y()})};Ae("DID_LOAD_ITEM",c,{query:t,dispatch:e}).then(()=>{$a(t("GET_BEFORE_ADD_FILE"),he(c)).then(I)}).catch(E=>{if(!E||!E.error||!E.status)return I(!1);e("DID_THROW_ITEM_INVALID",{id:m,error:E.error,status:E.status})})}),c.on("process-start",()=>{e("DID_START_ITEM_PROCESSING",{id:m})}),c.on("process-progress",I=>{e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:m,progress:I})}),c.on("process-error",I=>{e("DID_THROW_ITEM_PROCESSING_ERROR",{id:m,error:I,status:{main:Jt(i.options.labelFileProcessingError)(I),sub:i.options.labelTapToRetry}})}),c.on("process-revert-error",I=>{e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:m,error:I,status:{main:Jt(i.options.labelFileProcessingRevertError)(I),sub:i.options.labelTapToRetry}})}),c.on("process-complete",I=>{e("DID_COMPLETE_ITEM_PROCESSING",{id:m,error:null,serverFileReference:I}),e("DID_DEFINE_VALUE",{id:m,value:I})}),c.on("process-abort",()=>{e("DID_ABORT_ITEM_PROCESSING",{id:m})}),c.on("process-revert",()=>{e("DID_REVERT_ITEM_PROCESSING",{id:m}),e("DID_DEFINE_VALUE",{id:m,value:null})}),e("DID_ADD_ITEM",{id:m,index:n,interactionMethod:o}),Li(e,i);let{url:u,load:f,restore:g,fetch:h}=i.options.server||{};c.load(a,Is(p===re.INPUT?fe(a)&&As(a)&&h?Si(u,h):qa:p===re.LIMBO?Si(u,g):Si(u,f)),(I,E,T)=>{Ae("LOAD_FILE",I,{query:t}).then(E).catch(T)})},REQUEST_PREPARE_OUTPUT:({item:a,success:n,failure:o=()=>{}})=>{let l={error:ie("error",0,"Item not found"),file:null};if(a.archived)return o(l);Ae("PREPARE_OUTPUT",a.file,{query:t,item:a}).then(r=>{Ae("COMPLETE_PREPARE_OUTPUT",r,{query:t,item:a}).then(s=>{if(a.archived)return o(l);n(s)})})},COMPLETE_LOAD_ITEM:({item:a,data:n})=>{let{success:o,source:l}=n,r=t("GET_ITEM_INSERT_LOCATION");if(Xe(r)&&l&&Ai(i,r),e("DID_LOAD_ITEM",{id:a.id,error:null,serverFileReference:a.origin===re.INPUT?null:l}),o(he(a)),a.origin===re.LOCAL){e("DID_LOAD_LOCAL_ITEM",{id:a.id});return}if(a.origin===re.LIMBO){e("DID_COMPLETE_ITEM_PROCESSING",{id:a.id,error:null,serverFileReference:l}),e("DID_DEFINE_VALUE",{id:a.id,value:a.serverId||l});return}t("IS_ASYNC")&&i.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:a.id})},RETRY_ITEM_LOAD:ye(i,a=>{a.retryLoad()}),REQUEST_ITEM_PREPARE:ye(i,(a,n,o)=>{e("REQUEST_PREPARE_OUTPUT",{query:a.id,item:a,success:l=>{e("DID_PREPARE_OUTPUT",{id:a.id,file:l}),n({file:a,output:l})},failure:o},!0)}),REQUEST_ITEM_PROCESSING:ye(i,(a,n,o)=>{if(!(a.status===U.IDLE||a.status===U.PROCESSING_ERROR)){let r=()=>e("REQUEST_ITEM_PROCESSING",{query:a,success:n,failure:o}),s=()=>document.hidden?r():setTimeout(r,32);a.status===U.PROCESSING_COMPLETE||a.status===U.PROCESSING_REVERT_ERROR?a.revert(Ot(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(s).catch(()=>{}):a.status===U.PROCESSING&&a.abortProcessing().then(s);return}a.status!==U.PROCESSING_QUEUED&&(a.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:a.id}),e("PROCESS_ITEM",{query:a,success:n,failure:o},!0))}),PROCESS_ITEM:ye(i,(a,n,o)=>{let l=t("GET_MAX_PARALLEL_UPLOADS");if(t("GET_ITEMS_BY_STATUS",U.PROCESSING).length===l){i.processingQueue.push({id:a.id,success:n,failure:o});return}if(a.status===U.PROCESSING)return;let s=()=>{let c=i.processingQueue.shift();if(!c)return;let{id:d,success:m,failure:u}=c,f=Qe(i.items,d);if(!f||f.archived){s();return}e("PROCESS_ITEM",{query:d,success:m,failure:u},!0)};a.onOnce("process-complete",()=>{n(he(a)),s();let c=i.options.server;if(i.options.instantUpload&&a.origin===re.LOCAL&&Xe(c.remove)){let u=()=>{};a.origin=re.LIMBO,i.options.server.remove(a.source,u,u)}t("GET_ITEMS_BY_STATUS",U.PROCESSING_COMPLETE).length===i.items.length&&e("DID_COMPLETE_ITEM_PROCESSING_ALL")}),a.onOnce("process-error",c=>{o({error:c,file:he(a)}),s()});let p=i.options;a.process(Rs(ys(p.server.url,p.server.process,p.name,{chunkTransferId:a.transferId,chunkServer:p.server.patch,chunkUploads:p.chunkUploads,chunkForce:p.chunkForce,chunkSize:p.chunkSize,chunkRetryDelays:p.chunkRetryDelays}),{allowMinimumUploadDuration:t("GET_ALLOW_MINIMUM_UPLOAD_DURATION")}),(c,d,m)=>{Ae("PREPARE_OUTPUT",c,{query:t,item:a}).then(u=>{e("DID_PREPARE_OUTPUT",{id:a.id,file:u}),d(u)}).catch(m)})}),RETRY_ITEM_PROCESSING:ye(i,a=>{e("REQUEST_ITEM_PROCESSING",{query:a})}),REQUEST_REMOVE_ITEM:ye(i,a=>{$a(t("GET_BEFORE_REMOVE_FILE"),he(a)).then(n=>{n&&e("REMOVE_ITEM",{query:a})})}),RELEASE_ITEM:ye(i,a=>{a.release()}),REMOVE_ITEM:ye(i,(a,n,o,l)=>{let r=()=>{let p=a.id;ja(i.items,p).archive(),e("DID_REMOVE_ITEM",{error:null,id:p,item:a}),Li(e,i),n(he(a))},s=i.options.server;a.origin===re.LOCAL&&s&&Xe(s.remove)&&l.remove!==!1?(e("DID_START_ITEM_REMOVE",{id:a.id}),s.remove(a.source,()=>r(),p=>{e("DID_THROW_ITEM_REMOVE_ERROR",{id:a.id,error:ie("error",0,p,null),status:{main:Jt(i.options.labelFileRemoveError)(p),sub:i.options.labelTapToRetry}})})):((l.revert&&a.origin!==re.LOCAL&&a.serverId!==null||i.options.chunkUploads&&a.file.size>i.options.chunkSize||i.options.chunkUploads&&i.options.chunkForce)&&a.revert(Ot(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")),r())}),ABORT_ITEM_LOAD:ye(i,a=>{a.abortLoad()}),ABORT_ITEM_PROCESSING:ye(i,a=>{if(a.serverId){e("REVERT_ITEM_PROCESSING",{id:a.id});return}a.abortProcessing().then(()=>{i.options.instantUpload&&e("REMOVE_ITEM",{query:a.id})})}),REQUEST_REVERT_ITEM_PROCESSING:ye(i,a=>{if(!i.options.instantUpload){e("REVERT_ITEM_PROCESSING",{query:a});return}let n=r=>{r&&e("REVERT_ITEM_PROCESSING",{query:a})},o=t("GET_BEFORE_REMOVE_FILE");if(!o)return n(!0);let l=o(he(a));if(l==null)return n(!0);if(typeof l=="boolean")return n(l);typeof l.then=="function"&&l.then(n)}),REVERT_ITEM_PROCESSING:ye(i,a=>{a.revert(Ot(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(()=>{(i.options.instantUpload||Ms(a))&&e("REMOVE_ITEM",{query:a.id})}).catch(()=>{})}),SET_OPTIONS:({options:a})=>{let n=Object.keys(a),o=Ps.filter(r=>n.includes(r));[...o,...Object.keys(a).filter(r=>!o.includes(r))].forEach(r=>{e(`SET_${pi(r,"_").toUpperCase()}`,{value:a[r]})})}}),Ps=["server"],Zi=e=>e,ke=e=>document.createElement(e),ae=(e,t)=>{let i=e.childNodes[0];i?t!==i.nodeValue&&(i.nodeValue=t):(i=document.createTextNode(t),e.appendChild(i))},Xa=(e,t,i,a)=>{let n=(a%360-90)*Math.PI/180;return{x:e+i*Math.cos(n),y:t+i*Math.sin(n)}},Ds=(e,t,i,a,n,o)=>{let l=Xa(e,t,i,n),r=Xa(e,t,i,a);return["M",l.x,l.y,"A",i,i,0,o,0,r.x,r.y].join(" ")},Fs=(e,t,i,a,n)=>{let o=1;return n>a&&n-a<=.5&&(o=0),a>n&&a-n>=.5&&(o=0),Ds(e,t,i,Math.min(.9999,a)*360,Math.min(.9999,n)*360,o)},zs=({root:e,props:t})=>{t.spin=!1,t.progress=0,t.opacity=0;let i=oi("svg");e.ref.path=oi("path",{"stroke-width":2,"stroke-linecap":"round"}),i.appendChild(e.ref.path),e.ref.svg=i,e.appendChild(i)},Cs=({root:e,props:t})=>{if(t.opacity===0)return;t.align&&(e.element.dataset.align=t.align);let i=parseInt(se(e.ref.path,"stroke-width"),10),a=e.rect.element.width*.5,n=0,o=0;t.spin?(n=0,o=.5):(n=0,o=t.progress);let l=Fs(a,a,a-i,n,o);se(e.ref.path,"d",l),se(e.ref.path,"stroke-opacity",t.spin||t.progress>0?1:0)},Qa=ne({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:zs,write:Cs,mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),Ns=({root:e,props:t})=>{e.element.innerHTML=(t.icon||"")+`${t.label}`,t.isDisabled=!1},Bs=({root:e,props:t})=>{let{isDisabled:i}=t,a=e.query("GET_DISABLED")||t.opacity===0;a&&!i?(t.isDisabled=!0,se(e.element,"disabled","disabled")):!a&&i&&(t.isDisabled=!1,e.element.removeAttribute("disabled"))},Cn=ne({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:Ns,write:Bs}),Nn=(e,t=".",i=1e3,a={})=>{let{labelBytes:n="bytes",labelKilobytes:o="KB",labelMegabytes:l="MB",labelGigabytes:r="GB"}=a;e=Math.round(Math.abs(e));let s=i,p=i*i,c=i*i*i;return ee.toFixed(t).split(".").filter(a=>a!=="0").join(i),ks=({root:e,props:t})=>{let i=ke("span");i.className="filepond--file-info-main",se(i,"aria-hidden","true"),e.appendChild(i),e.ref.fileName=i;let a=ke("span");a.className="filepond--file-info-sub",e.appendChild(a),e.ref.fileSize=a,ae(a,e.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),ae(i,Zi(e.query("GET_ITEM_NAME",t.id)))},zi=({root:e,props:t})=>{ae(e.ref.fileSize,Nn(e.query("GET_ITEM_SIZE",t.id),".",e.query("GET_FILE_SIZE_BASE"),e.query("GET_FILE_SIZE_LABELS",e.query))),ae(e.ref.fileName,Zi(e.query("GET_ITEM_NAME",t.id)))},Ka=({root:e,props:t})=>{if(Et(e.query("GET_ITEM_SIZE",t.id))){zi({root:e,props:t});return}ae(e.ref.fileSize,e.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Vs=ne({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:ge({DID_LOAD_ITEM:zi,DID_UPDATE_ITEM_META:zi,DID_THROW_ITEM_LOAD_ERROR:Ka,DID_THROW_ITEM_INVALID:Ka}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},create:ks,mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),Bn=e=>Math.round(e*100),Gs=({root:e})=>{let t=ke("span");t.className="filepond--file-status-main",e.appendChild(t),e.ref.main=t;let i=ke("span");i.className="filepond--file-status-sub",e.appendChild(i),e.ref.sub=i,kn({root:e,action:{progress:null}})},kn=({root:e,action:t})=>{let i=t.progress===null?e.query("GET_LABEL_FILE_LOADING"):`${e.query("GET_LABEL_FILE_LOADING")} ${Bn(t.progress)}%`;ae(e.ref.main,i),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},Us=({root:e,action:t})=>{let i=t.progress===null?e.query("GET_LABEL_FILE_PROCESSING"):`${e.query("GET_LABEL_FILE_PROCESSING")} ${Bn(t.progress)}%`;ae(e.ref.main,i),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},Ws=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},Hs=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING_ABORTED")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_RETRY"))},js=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_UNDO"))},Ja=({root:e})=>{ae(e.ref.main,""),ae(e.ref.sub,"")},Pt=({root:e,action:t})=>{ae(e.ref.main,t.status.main),ae(e.ref.sub,t.status.sub)},qs=ne({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:ge({DID_LOAD_ITEM:Ja,DID_REVERT_ITEM_PROCESSING:Ja,DID_REQUEST_ITEM_PROCESSING:Ws,DID_ABORT_ITEM_PROCESSING:Hs,DID_COMPLETE_ITEM_PROCESSING:js,DID_UPDATE_ITEM_PROCESS_PROGRESS:Us,DID_UPDATE_ITEM_LOAD_PROGRESS:kn,DID_THROW_ITEM_LOAD_ERROR:Pt,DID_THROW_ITEM_INVALID:Pt,DID_THROW_ITEM_PROCESSING_ERROR:Pt,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:Pt,DID_THROW_ITEM_REMOVE_ERROR:Pt}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},create:Gs,mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),Ci={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},Ni=[];te(Ci,e=>{Ni.push(e)});var Ie=e=>{if(Bi(e)==="right")return 0;let t=e.ref.buttonRemoveItem.rect.element;return t.hidden?null:t.width+t.left},Ys=e=>e.ref.buttonAbortItemLoad.rect.element.width,ei=e=>Math.floor(e.ref.buttonRemoveItem.rect.element.height/4),$s=e=>Math.floor(e.ref.buttonRemoveItem.rect.element.left/2),Xs=e=>e.query("GET_STYLE_LOAD_INDICATOR_POSITION"),Qs=e=>e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION"),Bi=e=>e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION"),Zs={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:Xs},processProgressIndicator:{opacity:0,align:Qs},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},en={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie}},Mi={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},mt={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:Bi},info:{translateX:Ie},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:Bi},buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{opacity:1,translateX:Ie}},DID_LOAD_ITEM:en,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie}},DID_START_ITEM_PROCESSING:Mi,DID_REQUEST_ITEM_PROCESSING:Mi,DID_UPDATE_ITEM_PROCESS_PROGRESS:Mi,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:Ie}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ie},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:en},Ks=ne({create:({root:e})=>{e.element.innerHTML=e.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),Js=({root:e,props:t})=>{let i=Object.keys(Ci).reduce((f,g)=>(f[g]={...Ci[g]},f),{}),{id:a}=t,n=e.query("GET_ALLOW_REVERT"),o=e.query("GET_ALLOW_REMOVE"),l=e.query("GET_ALLOW_PROCESS"),r=e.query("GET_INSTANT_UPLOAD"),s=e.query("IS_ASYNC"),p=e.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN"),c;s?l&&!n?c=f=>!/RevertItemProcessing/.test(f):!l&&n?c=f=>!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(f):!l&&!n&&(c=f=>!/Process/.test(f)):c=f=>!/Process/.test(f);let d=c?Ni.filter(c):Ni.concat();if(r&&n&&(i.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",i.RevertItemProcessing.icon="GET_ICON_REMOVE"),s&&!n){let f=mt.DID_COMPLETE_ITEM_PROCESSING;f.info.translateX=$s,f.info.translateY=ei,f.status.translateY=ei,f.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(s&&!l&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach(f=>{mt[f].status.translateY=ei}),mt.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=Ys),p&&n){i.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";let f=mt.DID_COMPLETE_ITEM_PROCESSING;f.info.translateX=Ie,f.status.translateY=ei,f.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}o||(i.RemoveItem.disabled=!0),te(i,(f,g)=>{let h=e.createChildView(Cn,{label:e.query(g.label),icon:e.query(g.icon),opacity:0});d.includes(f)&&e.appendChildView(h),g.disabled&&(h.element.setAttribute("disabled","disabled"),h.element.setAttribute("hidden","hidden")),h.element.dataset.align=e.query(`GET_STYLE_${g.align}`),h.element.classList.add(g.className),h.on("click",I=>{I.stopPropagation(),!g.disabled&&e.dispatch(g.action,{query:a})}),e.ref[`button${f}`]=h}),e.ref.processingCompleteIndicator=e.appendChildView(e.createChildView(Ks)),e.ref.processingCompleteIndicator.element.dataset.align=e.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),e.ref.info=e.appendChildView(e.createChildView(Vs,{id:a})),e.ref.status=e.appendChildView(e.createChildView(qs,{id:a}));let m=e.appendChildView(e.createChildView(Qa,{opacity:0,align:e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));m.element.classList.add("filepond--load-indicator"),e.ref.loadProgressIndicator=m;let u=e.appendChildView(e.createChildView(Qa,{opacity:0,align:e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));u.element.classList.add("filepond--process-indicator"),e.ref.processProgressIndicator=u,e.ref.activeStyles=[]},ec=({root:e,actions:t,props:i})=>{tc({root:e,actions:t,props:i});let a=t.concat().filter(n=>/^DID_/.test(n.type)).reverse().find(n=>mt[n.type]);if(a){e.ref.activeStyles=[];let n=mt[a.type];te(Zs,(o,l)=>{let r=e.ref[o];te(l,(s,p)=>{let c=n[o]&&typeof n[o][s]<"u"?n[o][s]:p;e.ref.activeStyles.push({control:r,key:s,value:c})})})}e.ref.activeStyles.forEach(({control:n,key:o,value:l})=>{n[o]=typeof l=="function"?l(e):l})},tc=ge({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:({root:e,action:t})=>{e.ref.buttonAbortItemProcessing.label=t.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:({root:e,action:t})=>{e.ref.buttonAbortItemLoad.label=t.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:({root:e,action:t})=>{e.ref.buttonAbortItemRemoval.label=t.value},DID_REQUEST_ITEM_PROCESSING:({root:e})=>{e.ref.processProgressIndicator.spin=!0,e.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:({root:e})=>{e.ref.loadProgressIndicator.spin=!0,e.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:({root:e})=>{e.ref.processProgressIndicator.spin=!0,e.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:({root:e,action:t})=>{e.ref.loadProgressIndicator.spin=!1,e.ref.loadProgressIndicator.progress=t.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:({root:e,action:t})=>{e.ref.processProgressIndicator.spin=!1,e.ref.processProgressIndicator.progress=t.progress}}),ic=ne({create:Js,write:ec,didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},name:"file"}),ac=({root:e,props:t})=>{e.ref.fileName=ke("legend"),e.appendChild(e.ref.fileName),e.ref.file=e.appendChildView(e.createChildView(ic,{id:t.id})),e.ref.data=!1},nc=({root:e,props:t})=>{ae(e.ref.fileName,Zi(e.query("GET_ITEM_NAME",t.id)))},oc=ne({create:ac,ignoreRect:!0,write:ge({DID_LOAD_ITEM:nc}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},tag:"fieldset",name:"file-wrapper"}),tn={type:"spring",damping:.6,mass:7},lc=({root:e,props:t})=>{[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:tn},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:tn},styles:["translateY"]}}].forEach(i=>{rc(e,i,t.name)}),e.element.classList.add(`filepond--${t.name}`),e.ref.scalable=null},rc=(e,t,i)=>{let a=ne({name:`panel-${t.name} filepond--${i}`,mixins:t.mixins,ignoreRectUpdate:!0}),n=e.createChildView(a,t.props);e.ref[t.name]=e.appendChildView(n)},sc=({root:e,props:t})=>{if((e.ref.scalable===null||t.scalable!==e.ref.scalable)&&(e.ref.scalable=In(t.scalable)?t.scalable:!0,e.element.dataset.scalable=e.ref.scalable),!t.height)return;let i=e.ref.top.rect.element,a=e.ref.bottom.rect.element,n=Math.max(i.height+a.height,t.height);e.ref.center.translateY=i.height,e.ref.center.scaleY=(n-i.height-a.height)/100,e.ref.bottom.translateY=n-a.height},Vn=ne({name:"panel",read:({root:e,props:t})=>t.heightCurrent=e.ref.bottom.translateY,write:sc,create:lc,ignoreRect:!0,mixins:{apis:["height","heightCurrent","scalable"]}}),cc=e=>{let t=e.map(a=>a.id),i;return{setIndex:a=>{i=a},getIndex:()=>i,getItemIndex:a=>t.indexOf(a.id)}},an={type:"spring",stiffness:.75,damping:.45,mass:10},nn="spring",on={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},dc=({root:e,props:t})=>{if(e.ref.handleClick=a=>e.dispatch("DID_ACTIVATE_ITEM",{id:t.id}),e.element.id=`filepond--item-${t.id}`,e.element.addEventListener("click",e.ref.handleClick),e.ref.container=e.appendChildView(e.createChildView(oc,{id:t.id})),e.ref.panel=e.appendChildView(e.createChildView(Vn,{name:"item-panel"})),e.ref.panel.height=null,t.markedForRemoval=!1,!e.query("GET_ALLOW_REORDER"))return;e.element.dataset.dragState="idle";let i=a=>{if(!a.isPrimary)return;let n=!1,o={x:a.pageX,y:a.pageY};t.dragOrigin={x:e.translateX,y:e.translateY},t.dragCenter={x:a.offsetX,y:a.offsetY};let l=cc(e.query("GET_ACTIVE_ITEMS"));e.dispatch("DID_GRAB_ITEM",{id:t.id,dragState:l});let r=d=>{if(!d.isPrimary)return;d.stopPropagation(),d.preventDefault(),t.dragOffset={x:d.pageX-o.x,y:d.pageY-o.y},t.dragOffset.x*t.dragOffset.x+t.dragOffset.y*t.dragOffset.y>16&&!n&&(n=!0,e.element.removeEventListener("click",e.ref.handleClick)),e.dispatch("DID_DRAG_ITEM",{id:t.id,dragState:l})},s=d=>{d.isPrimary&&(t.dragOffset={x:d.pageX-o.x,y:d.pageY-o.y},c())},p=()=>{c()},c=()=>{document.removeEventListener("pointercancel",p),document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",s),e.dispatch("DID_DROP_ITEM",{id:t.id,dragState:l}),n&&setTimeout(()=>e.element.addEventListener("click",e.ref.handleClick),0)};document.addEventListener("pointercancel",p),document.addEventListener("pointermove",r),document.addEventListener("pointerup",s)};e.element.addEventListener("pointerdown",i)},pc=ge({DID_UPDATE_PANEL_HEIGHT:({root:e,action:t})=>{e.height=t.height}}),mc=ge({DID_GRAB_ITEM:({root:e,props:t})=>{t.dragOrigin={x:e.translateX,y:e.translateY}},DID_DRAG_ITEM:({root:e})=>{e.element.dataset.dragState="drag"},DID_DROP_ITEM:({root:e,props:t})=>{t.dragOffset=null,t.dragOrigin=null,e.element.dataset.dragState="drop"}},({root:e,actions:t,props:i,shouldOptimize:a})=>{e.element.dataset.dragState==="drop"&&e.scaleX<=1&&(e.element.dataset.dragState="idle");let n=t.concat().filter(l=>/^DID_/.test(l.type)).reverse().find(l=>on[l.type]);n&&n.type!==i.currentState&&(i.currentState=n.type,e.element.dataset.filepondItemState=on[i.currentState]||"");let o=e.query("GET_ITEM_PANEL_ASPECT_RATIO")||e.query("GET_PANEL_ASPECT_RATIO");o?a||(e.height=e.rect.element.width*o):(pc({root:e,actions:t,props:i}),!e.height&&e.ref.container.rect.element.height>0&&(e.height=e.ref.container.rect.element.height)),a&&(e.ref.panel.height=null),e.ref.panel.height=e.height}),uc=ne({create:dc,write:mc,destroy:({root:e,props:t})=>{e.element.removeEventListener("click",e.ref.handleClick),e.dispatch("RELEASE_ITEM",{query:t.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:nn,scaleY:nn,translateX:an,translateY:an,opacity:{type:"tween",duration:150}}}}),Ki=(e,t)=>Math.max(1,Math.floor((e+1)/t)),Ji=(e,t,i)=>{if(!i)return;let a=e.rect.element.width,n=t.length,o=null;if(n===0||i.topE){if(i.left{se(e.element,"role","list"),e.ref.lastItemSpanwDate=Date.now()},gc=({root:e,action:t})=>{let{id:i,index:a,interactionMethod:n}=t;e.ref.addIndex=a;let o=Date.now(),l=o,r=1;if(n!==_e.NONE){r=0;let s=e.query("GET_ITEM_INSERT_INTERVAL"),p=o-e.ref.lastItemSpanwDate;l=p{e.dragOffset?(e.translateX=null,e.translateY=null,e.translateX=e.dragOrigin.x+e.dragOffset.x,e.translateY=e.dragOrigin.y+e.dragOffset.y,e.scaleX=1.025,e.scaleY=1.025):(e.translateX=t,e.translateY=i,Date.now()>e.spawnDate&&(e.opacity===0&&hc(e,t,i,a,n),e.scaleX=1,e.scaleY=1,e.opacity=1))},hc=(e,t,i,a,n)=>{e.interactionMethod===_e.NONE?(e.translateX=null,e.translateX=t,e.translateY=null,e.translateY=i):e.interactionMethod===_e.DROP?(e.translateX=null,e.translateX=t-a*20,e.translateY=null,e.translateY=i-n*10,e.scaleX=.8,e.scaleY=.8):e.interactionMethod===_e.BROWSE?(e.translateY=null,e.translateY=i-30):e.interactionMethod===_e.API&&(e.translateX=null,e.translateX=t-30,e.translateY=null)},Ec=({root:e,action:t})=>{let{id:i}=t,a=e.childViews.find(n=>n.id===i);a&&(a.scaleX=.9,a.scaleY=.9,a.opacity=0,a.markedForRemoval=!0)},Oi=e=>e.rect.element.height+e.rect.element.marginBottom*.5+e.rect.element.marginTop*.5,bc=e=>e.rect.element.width+e.rect.element.marginLeft*.5+e.rect.element.marginRight*.5,Tc=({root:e,action:t})=>{let{id:i,dragState:a}=t,n=e.query("GET_ITEM",{id:i}),o=e.childViews.find(h=>h.id===i),l=e.childViews.length,r=a.getItemIndex(n);if(!o)return;let s={x:o.dragOrigin.x+o.dragOffset.x+o.dragCenter.x,y:o.dragOrigin.y+o.dragOffset.y+o.dragCenter.y},p=Oi(o),c=bc(o),d=Math.floor(e.rect.outer.width/c);d>l&&(d=l);let m=Math.floor(l/d+1);ti.setHeight=p*m,ti.setWidth=c*d;var u={y:Math.floor(s.y/p),x:Math.floor(s.x/c),getGridIndex:function(){return s.y>ti.getHeight||s.y<0||s.x>ti.getWidth||s.x<0?r:this.y*d+this.x},getColIndex:function(){let I=e.query("GET_ACTIVE_ITEMS"),E=e.childViews.filter(O=>O.rect.element.height),T=I.map(O=>E.find(M=>M.id===O.id)),v=T.findIndex(O=>O===o),y=Oi(o),b=T.length,w=b,x=0,_=0,P=0;for(let O=0;OO){if(s.y1?u.getGridIndex():u.getColIndex();e.dispatch("MOVE_ITEM",{query:o,index:f});let g=a.getIndex();if(g===void 0||g!==f){if(a.setIndex(f),g===void 0)return;e.dispatch("DID_REORDER_ITEMS",{items:e.query("GET_ACTIVE_ITEMS"),origin:r,target:f})}},Ic=ge({DID_ADD_ITEM:gc,DID_REMOVE_ITEM:Ec,DID_DRAG_ITEM:Tc}),vc=({root:e,props:t,actions:i,shouldOptimize:a})=>{Ic({root:e,props:t,actions:i});let{dragCoordinates:n}=t,o=e.rect.element.width,l=e.childViews.filter(T=>T.rect.element.height),r=e.query("GET_ACTIVE_ITEMS").map(T=>l.find(v=>v.id===T.id)).filter(T=>T),s=n?Ji(e,r,n):null,p=e.ref.addIndex||null;e.ref.addIndex=null;let c=0,d=0,m=0;if(r.length===0)return;let u=r[0].rect.element,f=u.marginTop+u.marginBottom,g=u.marginLeft+u.marginRight,h=u.width+g,I=u.height+f,E=Ki(o,h);if(E===1){let T=0,v=0;r.forEach((y,b)=>{if(s){let _=b-s;_===-2?v=-f*.25:_===-1?v=-f*.75:_===0?v=f*.75:_===1?v=f*.25:v=0}a&&(y.translateX=null,y.translateY=null),y.markedForRemoval||ln(y,0,T+v);let x=(y.rect.element.height+f)*(y.markedForRemoval?y.opacity:1);T+=x})}else{let T=0,v=0;r.forEach((y,b)=>{b===s&&(c=1),b===p&&(m+=1),y.markedForRemoval&&y.opacity<.5&&(d-=1);let w=b+m+c+d,x=w%E,_=Math.floor(w/E),P=x*h,O=_*I,M=Math.sign(P-T),N=Math.sign(O-v);T=P,v=O,!y.markedForRemoval&&(a&&(y.translateX=null,y.translateY=null),ln(y,P,O,M,N))})}},xc=(e,t)=>t.filter(i=>i.data&&i.data.id?e.id===i.data.id:!0),yc=ne({create:fc,write:vc,tag:"ul",name:"list",didWriteView:({root:e})=>{e.childViews.filter(t=>t.markedForRemoval&&t.opacity===0&&t.resting).forEach(t=>{t._destroy(),e.removeChildView(t)})},filterFrameActionsForChild:xc,mixins:{apis:["dragCoordinates"]}}),_c=({root:e,props:t})=>{e.ref.list=e.appendChildView(e.createChildView(yc)),t.dragCoordinates=null,t.overflowing=!1},Rc=({root:e,props:t,action:i})=>{e.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(t.dragCoordinates={left:i.position.scopeLeft-e.ref.list.rect.element.left,top:i.position.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},wc=({props:e})=>{e.dragCoordinates=null},Sc=ge({DID_DRAG:Rc,DID_END_DRAG:wc}),Lc=({root:e,props:t,actions:i})=>{if(Sc({root:e,props:t,actions:i}),e.ref.list.dragCoordinates=t.dragCoordinates,t.overflowing&&!t.overflow&&(t.overflowing=!1,e.element.dataset.state="",e.height=null),t.overflow){let a=Math.round(t.overflow);a!==e.height&&(t.overflowing=!0,e.element.dataset.state="overflow",e.height=a)}},Ac=ne({create:_c,write:Lc,name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),Oe=(e,t,i,a="")=>{i?se(e,t,a):e.removeAttribute(t)},Mc=e=>{if(!(!e||e.value==="")){try{e.value=""}catch{}if(e.value){let t=ke("form"),i=e.parentNode,a=e.nextSibling;t.appendChild(e),t.reset(),a?i.insertBefore(e,a):i.appendChild(e)}}},Oc=({root:e,props:t})=>{e.element.id=`filepond--browser-${t.id}`,se(e.element,"name",e.query("GET_NAME")),se(e.element,"aria-controls",`filepond--assistant-${t.id}`),se(e.element,"aria-labelledby",`filepond--drop-label-${t.id}`),Gn({root:e,action:{value:e.query("GET_ACCEPTED_FILE_TYPES")}}),Un({root:e,action:{value:e.query("GET_ALLOW_MULTIPLE")}}),Wn({root:e,action:{value:e.query("GET_ALLOW_DIRECTORIES_ONLY")}}),ki({root:e}),Hn({root:e,action:{value:e.query("GET_REQUIRED")}}),jn({root:e,action:{value:e.query("GET_CAPTURE_METHOD")}}),e.ref.handleChange=i=>{if(!e.element.value)return;let a=Array.from(e.element.files).map(n=>(n._relativePath=n.webkitRelativePath,n));setTimeout(()=>{t.onload(a),Mc(e.element)},250)},e.element.addEventListener("change",e.ref.handleChange)},Gn=({root:e,action:t})=>{e.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&Oe(e.element,"accept",!!t.value,t.value?t.value.join(","):"")},Un=({root:e,action:t})=>{Oe(e.element,"multiple",t.value)},Wn=({root:e,action:t})=>{Oe(e.element,"webkitdirectory",t.value)},ki=({root:e})=>{let t=e.query("GET_DISABLED"),i=e.query("GET_ALLOW_BROWSE"),a=t||!i;Oe(e.element,"disabled",a)},Hn=({root:e,action:t})=>{t.value?e.query("GET_TOTAL_ITEMS")===0&&Oe(e.element,"required",!0):Oe(e.element,"required",!1)},jn=({root:e,action:t})=>{Oe(e.element,"capture",!!t.value,t.value===!0?"":t.value)},rn=({root:e})=>{let{element:t}=e;if(e.query("GET_TOTAL_ITEMS")>0){Oe(t,"required",!1),Oe(t,"name",!1);let i=e.query("GET_ACTIVE_ITEMS"),a=!1;for(let n=0;n{e.query("GET_CHECK_VALIDITY")&&e.element.setCustomValidity(e.query("GET_LABEL_INVALID_FIELD"))},Dc=ne({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:Oc,destroy:({root:e})=>{e.element.removeEventListener("change",e.ref.handleChange)},write:ge({DID_LOAD_ITEM:rn,DID_REMOVE_ITEM:rn,DID_THROW_ITEM_INVALID:Pc,DID_SET_DISABLED:ki,DID_SET_ALLOW_BROWSE:ki,DID_SET_ALLOW_DIRECTORIES_ONLY:Wn,DID_SET_ALLOW_MULTIPLE:Un,DID_SET_ACCEPTED_FILE_TYPES:Gn,DID_SET_CAPTURE_METHOD:jn,DID_SET_REQUIRED:Hn})}),sn={ENTER:13,SPACE:32},Fc=({root:e,props:t})=>{let i=ke("label");se(i,"for",`filepond--browser-${t.id}`),se(i,"id",`filepond--drop-label-${t.id}`),e.ref.handleKeyDown=a=>{(a.keyCode===sn.ENTER||a.keyCode===sn.SPACE)&&(a.preventDefault(),e.ref.label.click())},e.ref.handleClick=a=>{a.target===i||i.contains(a.target)||e.ref.label.click()},i.addEventListener("keydown",e.ref.handleKeyDown),e.element.addEventListener("click",e.ref.handleClick),qn(i,t.caption),e.appendChild(i),e.ref.label=i},qn=(e,t)=>{e.innerHTML=t;let i=e.querySelector(".filepond--label-action");return i&&se(i,"tabindex","0"),t},zc=ne({name:"drop-label",ignoreRect:!0,create:Fc,destroy:({root:e})=>{e.ref.label.addEventListener("keydown",e.ref.handleKeyDown),e.element.removeEventListener("click",e.ref.handleClick)},write:ge({DID_SET_LABEL_IDLE:({root:e,action:t})=>{qn(e.ref.label,t.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),Cc=ne({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),Nc=({root:e})=>{let t=e.rect.element.width*.5,i=e.rect.element.height*.5;e.ref.blob=e.appendChildView(e.createChildView(Cc,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:t,translateY:i}))},Bc=({root:e,action:t})=>{if(!e.ref.blob){Nc({root:e});return}e.ref.blob.translateX=t.position.scopeLeft,e.ref.blob.translateY=t.position.scopeTop,e.ref.blob.scaleX=1,e.ref.blob.scaleY=1,e.ref.blob.opacity=1},kc=({root:e})=>{e.ref.blob&&(e.ref.blob.opacity=0)},Vc=({root:e})=>{e.ref.blob&&(e.ref.blob.scaleX=2.5,e.ref.blob.scaleY=2.5,e.ref.blob.opacity=0)},Gc=({root:e,props:t,actions:i})=>{Uc({root:e,props:t,actions:i});let{blob:a}=e.ref;i.length===0&&a&&a.opacity===0&&(e.removeChildView(a),e.ref.blob=null)},Uc=ge({DID_DRAG:Bc,DID_DROP:Vc,DID_END_DRAG:kc}),Wc=ne({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:Gc}),Yn=(e,t)=>{try{let i=new DataTransfer;t.forEach(a=>{a instanceof File?i.items.add(a):i.items.add(new File([a],a.name,{type:a.type}))}),e.files=i.files}catch{return!1}return!0},Hc=({root:e})=>{e.ref.fields={};let t=document.createElement("legend");t.textContent="Files",e.element.appendChild(t)},fi=(e,t)=>e.ref.fields[t],ea=e=>{e.query("GET_ACTIVE_ITEMS").forEach(t=>{e.ref.fields[t.id]&&e.element.appendChild(e.ref.fields[t.id])})},cn=({root:e})=>ea(e),jc=({root:e,action:t})=>{let n=!(e.query("GET_ITEM",t.id).origin===re.LOCAL)&&e.query("SHOULD_UPDATE_FILE_INPUT"),o=ke("input");o.type=n?"file":"hidden",o.name=e.query("GET_NAME"),e.ref.fields[t.id]=o,ea(e)},qc=({root:e,action:t})=>{let i=fi(e,t.id);if(!i||(t.serverFileReference!==null&&(i.value=t.serverFileReference),!e.query("SHOULD_UPDATE_FILE_INPUT")))return;let a=e.query("GET_ITEM",t.id);Yn(i,[a.file])},Yc=({root:e,action:t})=>{e.query("SHOULD_UPDATE_FILE_INPUT")&&setTimeout(()=>{let i=fi(e,t.id);i&&Yn(i,[t.file])},0)},$c=({root:e})=>{e.element.disabled=e.query("GET_DISABLED")},Xc=({root:e,action:t})=>{let i=fi(e,t.id);i&&(i.parentNode&&i.parentNode.removeChild(i),delete e.ref.fields[t.id])},Qc=({root:e,action:t})=>{let i=fi(e,t.id);i&&(t.value===null?i.removeAttribute("value"):i.type!="file"&&(i.value=t.value),ea(e))},Zc=ge({DID_SET_DISABLED:$c,DID_ADD_ITEM:jc,DID_LOAD_ITEM:qc,DID_REMOVE_ITEM:Xc,DID_DEFINE_VALUE:Qc,DID_PREPARE_OUTPUT:Yc,DID_REORDER_ITEMS:cn,DID_SORT_ITEMS:cn}),Kc=ne({tag:"fieldset",name:"data",create:Hc,write:Zc,ignoreRect:!0}),Jc=e=>"getRootNode"in e?e.getRootNode():document,ed=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],td=["css","csv","html","txt"],id={zip:"zip|compressed",epub:"application/epub+zip"},$n=(e="")=>(e=e.toLowerCase(),ed.includes(e)?"image/"+(e==="jpg"?"jpeg":e==="svg"?"svg+xml":e):td.includes(e)?"text/"+e:id[e]||""),ta=e=>new Promise((t,i)=>{let a=dd(e);if(a.length&&!ad(e))return t(a);nd(e).then(t)}),ad=e=>e.files?e.files.length>0:!1,nd=e=>new Promise((t,i)=>{let a=(e.items?Array.from(e.items):[]).filter(n=>od(n)).map(n=>ld(n));if(!a.length){t(e.files?Array.from(e.files):[]);return}Promise.all(a).then(n=>{let o=[];n.forEach(l=>{o.push.apply(o,l)}),t(o.filter(l=>l).map(l=>(l._relativePath||(l._relativePath=l.webkitRelativePath),l)))}).catch(console.error)}),od=e=>{if(Xn(e)){let t=ia(e);if(t)return t.isFile||t.isDirectory}return e.kind==="file"},ld=e=>new Promise((t,i)=>{if(cd(e)){rd(ia(e)).then(t).catch(i);return}t([e.getAsFile()])}),rd=e=>new Promise((t,i)=>{let a=[],n=0,o=0,l=()=>{o===0&&n===0&&t(a)},r=s=>{n++;let p=s.createReader(),c=()=>{p.readEntries(d=>{if(d.length===0){n--,l();return}d.forEach(m=>{m.isDirectory?r(m):(o++,m.file(u=>{let f=sd(u);m.fullPath&&(f._relativePath=m.fullPath),a.push(f),o--,l()}))}),c()},i)};c()};r(e)}),sd=e=>{if(e.type.length)return e;let t=e.lastModifiedDate,i=e.name,a=$n(ui(e.name));return a.length&&(e=e.slice(0,e.size,a),e.name=i,e.lastModifiedDate=t),e},cd=e=>Xn(e)&&(ia(e)||{}).isDirectory,Xn=e=>"webkitGetAsEntry"in e,ia=e=>e.webkitGetAsEntry(),dd=e=>{let t=[];try{if(t=md(e),t.length)return t;t=pd(e)}catch{}return t},pd=e=>{let t=e.getData("url");return typeof t=="string"&&t.length?[t]:[]},md=e=>{let t=e.getData("text/html");if(typeof t=="string"&&t.length){let i=t.match(/src\s*=\s*"(.+?)"/);if(i)return[i[1]]}return[]},ri=[],et=e=>({pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}),ud=(e,t,i)=>{let a=fd(t),n={element:e,filterElement:i,state:null,ondrop:()=>{},onenter:()=>{},ondrag:()=>{},onexit:()=>{},onload:()=>{},allowdrop:()=>{}};return n.destroy=a.addListener(n),n},fd=e=>{let t=ri.find(a=>a.element===e);if(t)return t;let i=gd(e);return ri.push(i),i},gd=e=>{let t=[],i={dragenter:Ed,dragover:bd,dragleave:Id,drop:Td},a={};te(i,(o,l)=>{a[o]=l(e,t),e.addEventListener(o,a[o],!1)});let n={element:e,addListener:o=>(t.push(o),()=>{t.splice(t.indexOf(o),1),t.length===0&&(ri.splice(ri.indexOf(n),1),te(i,l=>{e.removeEventListener(l,a[l],!1)}))})};return n},hd=(e,t)=>("elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)),aa=(e,t)=>{let i=Jc(t),a=hd(i,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return a===t||t.contains(a)},Qn=null,ii=(e,t)=>{try{e.dropEffect=t}catch{}},Ed=(e,t)=>i=>{i.preventDefault(),Qn=i.target,t.forEach(a=>{let{element:n,onenter:o}=a;aa(i,n)&&(a.state="enter",o(et(i)))})},bd=(e,t)=>i=>{i.preventDefault();let a=i.dataTransfer;ta(a).then(n=>{let o=!1;t.some(l=>{let{filterElement:r,element:s,onenter:p,onexit:c,ondrag:d,allowdrop:m}=l;ii(a,"copy");let u=m(n);if(!u){ii(a,"none");return}if(aa(i,s)){if(o=!0,l.state===null){l.state="enter",p(et(i));return}if(l.state="over",r&&!u){ii(a,"none");return}d(et(i))}else r&&!o&&ii(a,"none"),l.state&&(l.state=null,c(et(i)))})})},Td=(e,t)=>i=>{i.preventDefault();let a=i.dataTransfer;ta(a).then(n=>{t.forEach(o=>{let{filterElement:l,element:r,ondrop:s,onexit:p,allowdrop:c}=o;if(o.state=null,!(l&&!aa(i,r))){if(!c(n))return p(et(i));s(et(i),n)}})})},Id=(e,t)=>i=>{Qn===i.target&&t.forEach(a=>{let{onexit:n}=a;a.state=null,n(et(i))})},vd=(e,t,i)=>{e.classList.add("filepond--hopper");let{catchesDropsOnPage:a,requiresDropOnElement:n,filterItems:o=c=>c}=i,l=ud(e,a?document.documentElement:e,n),r="",s="";l.allowdrop=c=>t(o(c)),l.ondrop=(c,d)=>{let m=o(d);if(!t(m)){p.ondragend(c);return}s="drag-drop",p.onload(m,c)},l.ondrag=c=>{p.ondrag(c)},l.onenter=c=>{s="drag-over",p.ondragstart(c)},l.onexit=c=>{s="drag-exit",p.ondragend(c)};let p={updateHopperState:()=>{r!==s&&(e.dataset.hopperState=s,r=s)},onload:()=>{},ondragstart:()=>{},ondrag:()=>{},ondragend:()=>{},destroy:()=>{l.destroy()}};return p},Vi=!1,ut=[],Zn=e=>{let t=document.activeElement;if(t&&(/textarea|input/i.test(t.nodeName)||t.getAttribute("contenteditable")==="true")){let a=!1,n=t;for(;n!==document.body;){if(n.classList.contains("filepond--root")){a=!0;break}n=n.parentNode}if(!a)return}ta(e.clipboardData).then(a=>{a.length&&ut.forEach(n=>n(a))})},xd=e=>{ut.includes(e)||(ut.push(e),!Vi&&(Vi=!0,document.addEventListener("paste",Zn)))},yd=e=>{$i(ut,ut.indexOf(e)),ut.length===0&&(document.removeEventListener("paste",Zn),Vi=!1)},_d=()=>{let e=i=>{t.onload(i)},t={destroy:()=>{yd(e)},onload:()=>{}};return xd(e),t},Rd=({root:e,props:t})=>{e.element.id=`filepond--assistant-${t.id}`,se(e.element,"role","alert"),se(e.element,"aria-live","polite"),se(e.element,"aria-relevant","additions")},dn=null,pn=null,Pi=[],gi=(e,t)=>{e.element.textContent=t},wd=e=>{e.element.textContent=""},Kn=(e,t,i)=>{let a=e.query("GET_TOTAL_ITEMS");gi(e,`${i} ${t}, ${a} ${a===1?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL")}`),clearTimeout(pn),pn=setTimeout(()=>{wd(e)},1500)},Jn=e=>e.element.parentNode.contains(document.activeElement),Sd=({root:e,action:t})=>{if(!Jn(e))return;e.element.textContent="";let i=e.query("GET_ITEM",t.id);Pi.push(i.filename),clearTimeout(dn),dn=setTimeout(()=>{Kn(e,Pi.join(", "),e.query("GET_LABEL_FILE_ADDED")),Pi.length=0},750)},Ld=({root:e,action:t})=>{if(!Jn(e))return;let i=t.item;Kn(e,i.filename,e.query("GET_LABEL_FILE_REMOVED"))},Ad=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename,n=e.query("GET_LABEL_FILE_PROCESSING_COMPLETE");gi(e,`${a} ${n}`)},mn=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename,n=e.query("GET_LABEL_FILE_PROCESSING_ABORTED");gi(e,`${a} ${n}`)},ai=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename;gi(e,`${t.status.main} ${a} ${t.status.sub}`)},Md=ne({create:Rd,ignoreRect:!0,ignoreRectUpdate:!0,write:ge({DID_LOAD_ITEM:Sd,DID_REMOVE_ITEM:Ld,DID_COMPLETE_ITEM_PROCESSING:Ad,DID_ABORT_ITEM_PROCESSING:mn,DID_REVERT_ITEM_PROCESSING:mn,DID_THROW_ITEM_REMOVE_ERROR:ai,DID_THROW_ITEM_LOAD_ERROR:ai,DID_THROW_ITEM_INVALID:ai,DID_THROW_ITEM_PROCESSING_ERROR:ai}),tag:"span",name:"assistant"}),eo=(e,t="-")=>e.replace(new RegExp(`${t}.`,"g"),i=>i.charAt(1).toUpperCase()),to=(e,t=16,i=!0)=>{let a=Date.now(),n=null;return(...o)=>{clearTimeout(n);let l=Date.now()-a,r=()=>{a=Date.now(),e(...o)};le.preventDefault(),Pd=({root:e,props:t})=>{let i=e.query("GET_ID");i&&(e.element.id=i);let a=e.query("GET_CLASS_NAME");a&&a.split(" ").filter(s=>s.length).forEach(s=>{e.element.classList.add(s)}),e.ref.label=e.appendChildView(e.createChildView(zc,{...t,translateY:null,caption:e.query("GET_LABEL_IDLE")})),e.ref.list=e.appendChildView(e.createChildView(Ac,{translateY:null})),e.ref.panel=e.appendChildView(e.createChildView(Vn,{name:"panel-root"})),e.ref.assistant=e.appendChildView(e.createChildView(Md,{...t})),e.ref.data=e.appendChildView(e.createChildView(Kc,{...t})),e.ref.measure=ke("div"),e.ref.measure.style.height="100%",e.element.appendChild(e.ref.measure),e.ref.bounds=null,e.query("GET_STYLES").filter(s=>!Be(s.value)).map(({name:s,value:p})=>{e.element.dataset[s]=p}),e.ref.widthPrevious=null,e.ref.widthUpdated=to(()=>{e.ref.updateHistory=[],e.dispatch("DID_RESIZE_ROOT")},250),e.ref.previousAspectRatio=null,e.ref.updateHistory=[];let n=window.matchMedia("(pointer: fine) and (hover: hover)").matches,o="PointerEvent"in window;e.query("GET_ALLOW_REORDER")&&o&&!n&&(e.element.addEventListener("touchmove",si,{passive:!1}),e.element.addEventListener("gesturestart",si));let l=e.query("GET_CREDITS");if(l.length===2){let s=document.createElement("a");s.className="filepond--credits",s.href=l[0],s.tabIndex=-1,s.target="_blank",s.rel="noopener noreferrer nofollow",s.textContent=l[1],e.element.appendChild(s),e.ref.credits=s}},Dd=({root:e,props:t,actions:i})=>{if(Bd({root:e,props:t,actions:i}),i.filter(b=>/^DID_SET_STYLE_/.test(b.type)).filter(b=>!Be(b.data.value)).map(({type:b,data:w})=>{let x=eo(b.substring(8).toLowerCase(),"_");e.element.dataset[x]=w.value,e.invalidateLayout()}),e.rect.element.hidden)return;e.rect.element.width!==e.ref.widthPrevious&&(e.ref.widthPrevious=e.rect.element.width,e.ref.widthUpdated());let a=e.ref.bounds;a||(a=e.ref.bounds=Cd(e),e.element.removeChild(e.ref.measure),e.ref.measure=null);let{hopper:n,label:o,list:l,panel:r}=e.ref;n&&n.updateHopperState();let s=e.query("GET_PANEL_ASPECT_RATIO"),p=e.query("GET_ALLOW_MULTIPLE"),c=e.query("GET_TOTAL_ITEMS"),d=p?e.query("GET_MAX_FILES")||Od:1,m=c===d,u=i.find(b=>b.type==="DID_ADD_ITEM");if(m&&u){let b=u.data.interactionMethod;o.opacity=0,p?o.translateY=-40:b===_e.API?o.translateX=40:b===_e.BROWSE?o.translateY=40:o.translateY=30}else m||(o.opacity=1,o.translateX=0,o.translateY=0);let f=Fd(e),g=zd(e),h=o.rect.element.height,I=!p||m?0:h,E=m?l.rect.element.marginTop:0,T=c===0?0:l.rect.element.marginBottom,v=I+E+g.visual+T,y=I+E+g.bounds+T;if(l.translateY=Math.max(0,I-l.rect.element.marginTop)-f.top,s){let b=e.rect.element.width,w=b*s;s!==e.ref.previousAspectRatio&&(e.ref.previousAspectRatio=s,e.ref.updateHistory=[]);let x=e.ref.updateHistory;x.push(b);let _=2;if(x.length>_*2){let O=x.length,M=O-10,N=0;for(let S=O;S>=M;S--)if(x[S]===x[S-2]&&N++,N>=_)return}r.scalable=!1,r.height=w;let P=w-I-(T-f.bottom)-(m?E:0);g.visual>P?l.overflow=P:l.overflow=null,e.height=w}else if(a.fixedHeight){r.scalable=!1;let b=a.fixedHeight-I-(T-f.bottom)-(m?E:0);g.visual>b?l.overflow=b:l.overflow=null}else if(a.cappedHeight){let b=v>=a.cappedHeight,w=Math.min(a.cappedHeight,v);r.scalable=!0,r.height=b?w:w-f.top-f.bottom;let x=w-I-(T-f.bottom)-(m?E:0);v>a.cappedHeight&&g.visual>x?l.overflow=x:l.overflow=null,e.height=Math.min(a.cappedHeight,y-f.top-f.bottom)}else{let b=c>0?f.top+f.bottom:0;r.scalable=!0,r.height=Math.max(h,v-b),e.height=Math.max(h,y-b)}e.ref.credits&&r.heightCurrent&&(e.ref.credits.style.transform=`translateY(${r.heightCurrent}px)`)},Fd=e=>{let t=e.ref.list.childViews[0].childViews[0];return t?{top:t.rect.element.marginTop,bottom:t.rect.element.marginBottom}:{top:0,bottom:0}},zd=e=>{let t=0,i=0,a=e.ref.list,n=a.childViews[0],o=n.childViews.filter(E=>E.rect.element.height),l=e.query("GET_ACTIVE_ITEMS").map(E=>o.find(T=>T.id===E.id)).filter(E=>E);if(l.length===0)return{visual:t,bounds:i};let r=n.rect.element.width,s=Ji(n,l,a.dragCoordinates),p=l[0].rect.element,c=p.marginTop+p.marginBottom,d=p.marginLeft+p.marginRight,m=p.width+d,u=p.height+c,f=typeof s<"u"&&s>=0?1:0,g=l.find(E=>E.markedForRemoval&&E.opacity<.45)?-1:0,h=l.length+f+g,I=Ki(r,m);return I===1?l.forEach(E=>{let T=E.rect.element.height+c;i+=T,t+=T*E.opacity}):(i=Math.ceil(h/I)*u,t=i),{visual:t,bounds:i}},Cd=e=>{let t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:t===0?null:t}},na=(e,t)=>{let i=e.query("GET_ALLOW_REPLACE"),a=e.query("GET_ALLOW_MULTIPLE"),n=e.query("GET_TOTAL_ITEMS"),o=e.query("GET_MAX_FILES"),l=t.length;return!a&&l>1?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:ie("warning",0,"Max files")}),!0):(o=a?o:1,!a&&i?!1:Et(o)&&n+l>o?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:ie("warning",0,"Max files")}),!0):!1)},Nd=(e,t,i)=>{let a=e.childViews[0];return Ji(a,t,{left:i.scopeLeft-a.rect.element.left,top:i.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},un=e=>{let t=e.query("GET_ALLOW_DROP"),i=e.query("GET_DISABLED"),a=t&&!i;if(a&&!e.ref.hopper){let n=vd(e.element,o=>{let l=e.query("GET_BEFORE_DROP_FILE")||(()=>!0);return e.query("GET_DROP_VALIDATION")?o.every(s=>tt("ALLOW_HOPPER_ITEM",s,{query:e.query}).every(p=>p===!0)&&l(s)):!0},{filterItems:o=>{let l=e.query("GET_IGNORED_FILES");return o.filter(r=>Je(r)?!l.includes(r.name.toLowerCase()):!0)},catchesDropsOnPage:e.query("GET_DROP_ON_PAGE"),requiresDropOnElement:e.query("GET_DROP_ON_ELEMENT")});n.onload=(o,l)=>{let s=e.ref.list.childViews[0].childViews.filter(c=>c.rect.element.height),p=e.query("GET_ACTIVE_ITEMS").map(c=>s.find(d=>d.id===c.id)).filter(c=>c);Ae("ADD_ITEMS",o,{dispatch:e.dispatch}).then(c=>{if(na(e,c))return!1;e.dispatch("ADD_ITEMS",{items:c,index:Nd(e.ref.list,p,l),interactionMethod:_e.DROP})}),e.dispatch("DID_DROP",{position:l}),e.dispatch("DID_END_DRAG",{position:l})},n.ondragstart=o=>{e.dispatch("DID_START_DRAG",{position:o})},n.ondrag=to(o=>{e.dispatch("DID_DRAG",{position:o})}),n.ondragend=o=>{e.dispatch("DID_END_DRAG",{position:o})},e.ref.hopper=n,e.ref.drip=e.appendChildView(e.createChildView(Wc))}else!a&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removeChildView(e.ref.drip))},fn=(e,t)=>{let i=e.query("GET_ALLOW_BROWSE"),a=e.query("GET_DISABLED"),n=i&&!a;n&&!e.ref.browser?e.ref.browser=e.appendChildView(e.createChildView(Dc,{...t,onload:o=>{Ae("ADD_ITEMS",o,{dispatch:e.dispatch}).then(l=>{if(na(e,l))return!1;e.dispatch("ADD_ITEMS",{items:l,index:-1,interactionMethod:_e.BROWSE})})}}),0):!n&&e.ref.browser&&(e.removeChildView(e.ref.browser),e.ref.browser=null)},gn=e=>{let t=e.query("GET_ALLOW_PASTE"),i=e.query("GET_DISABLED"),a=t&&!i;a&&!e.ref.paster?(e.ref.paster=_d(),e.ref.paster.onload=n=>{Ae("ADD_ITEMS",n,{dispatch:e.dispatch}).then(o=>{if(na(e,o))return!1;e.dispatch("ADD_ITEMS",{items:o,index:-1,interactionMethod:_e.PASTE})})}):!a&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},Bd=ge({DID_SET_ALLOW_BROWSE:({root:e,props:t})=>{fn(e,t)},DID_SET_ALLOW_DROP:({root:e})=>{un(e)},DID_SET_ALLOW_PASTE:({root:e})=>{gn(e)},DID_SET_DISABLED:({root:e,props:t})=>{un(e),gn(e),fn(e,t),e.query("GET_DISABLED")?e.element.dataset.disabled="disabled":e.element.removeAttribute("data-disabled")}}),kd=ne({name:"root",read:({root:e})=>{e.ref.measure&&(e.ref.measureHeight=e.ref.measure.offsetHeight)},create:Pd,write:Dd,destroy:({root:e})=>{e.ref.paster&&e.ref.paster.destroy(),e.ref.hopper&&e.ref.hopper.destroy(),e.element.removeEventListener("touchmove",si),e.element.removeEventListener("gesturestart",si)},mixins:{styles:["height"]}}),Vd=(e={})=>{let t=null,i=li(),a=ar(Ur(i),[ls,jr(i)],[Os,Hr(i)]);a.dispatch("SET_OPTIONS",{options:e});let n=()=>{document.hidden||a.dispatch("KICK")};document.addEventListener("visibilitychange",n);let o=null,l=!1,r=!1,s=null,p=null,c=()=>{l||(l=!0),clearTimeout(o),o=setTimeout(()=>{l=!1,s=null,p=null,r&&(r=!1,a.dispatch("DID_STOP_RESIZE"))},500)};window.addEventListener("resize",c);let d=kd(a,{id:Yi()}),m=!1,u=!1,f={_read:()=>{l&&(p=window.innerWidth,s||(s=p),!r&&p!==s&&(a.dispatch("DID_START_RESIZE"),r=!0)),u&&m&&(m=d.element.offsetParent===null),!m&&(d._read(),u=d.rect.element.hidden)},_write:R=>{let L=a.processActionQueue().filter(z=>!/^SET_/.test(z.type));m&&!L.length||(E(L),m=d._write(R,L,r),$r(a.query("GET_ITEMS")),m&&a.processDispatchQueue())}},g=R=>L=>{let z={type:R};if(!L)return z;if(L.hasOwnProperty("error")&&(z.error=L.error?{...L.error}:null),L.status&&(z.status={...L.status}),L.file&&(z.output=L.file),L.source)z.file=L.source;else if(L.item||L.id){let F=L.item?L.item:a.query("GET_ITEM",L.id);z.file=F?he(F):null}return L.items&&(z.items=L.items.map(he)),/progress/.test(R)&&(z.progress=L.progress),L.hasOwnProperty("origin")&&L.hasOwnProperty("target")&&(z.origin=L.origin,z.target=L.target),z},h={DID_DESTROY:g("destroy"),DID_INIT:g("init"),DID_THROW_MAX_FILES:g("warning"),DID_INIT_ITEM:g("initfile"),DID_START_ITEM_LOAD:g("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:g("addfileprogress"),DID_LOAD_ITEM:g("addfile"),DID_THROW_ITEM_INVALID:[g("error"),g("addfile")],DID_THROW_ITEM_LOAD_ERROR:[g("error"),g("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[g("error"),g("removefile")],DID_PREPARE_OUTPUT:g("preparefile"),DID_START_ITEM_PROCESSING:g("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:g("processfileprogress"),DID_ABORT_ITEM_PROCESSING:g("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:g("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:g("processfiles"),DID_REVERT_ITEM_PROCESSING:g("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[g("error"),g("processfile")],DID_REMOVE_ITEM:g("removefile"),DID_UPDATE_ITEMS:g("updatefiles"),DID_ACTIVATE_ITEM:g("activatefile"),DID_REORDER_ITEMS:g("reorderfiles")},I=R=>{let L={pond:D,...R};delete L.type,d.element.dispatchEvent(new CustomEvent(`FilePond:${R.type}`,{detail:L,bubbles:!0,cancelable:!0,composed:!0}));let z=[];R.hasOwnProperty("error")&&z.push(R.error),R.hasOwnProperty("file")&&z.push(R.file);let F=["type","error","file"];Object.keys(R).filter(C=>!F.includes(C)).forEach(C=>z.push(R[C])),D.fire(R.type,...z);let G=a.query(`GET_ON${R.type.toUpperCase()}`);G&&G(...z)},E=R=>{R.length&&R.filter(L=>h[L.type]).forEach(L=>{let z=h[L.type];(Array.isArray(z)?z:[z]).forEach(F=>{L.type==="DID_INIT_ITEM"?I(F(L.data)):setTimeout(()=>{I(F(L.data))},0)})})},T=R=>a.dispatch("SET_OPTIONS",{options:R}),v=R=>a.query("GET_ACTIVE_ITEM",R),y=R=>new Promise((L,z)=>{a.dispatch("REQUEST_ITEM_PREPARE",{query:R,success:F=>{L(F)},failure:F=>{z(F)}})}),b=(R,L={})=>new Promise((z,F)=>{_([{source:R,options:L}],{index:L.index}).then(G=>z(G&&G[0])).catch(F)}),w=R=>R.file&&R.id,x=(R,L)=>(typeof R=="object"&&!w(R)&&!L&&(L=R,R=void 0),a.dispatch("REMOVE_ITEM",{...L,query:R}),a.query("GET_ACTIVE_ITEM",R)===null),_=(...R)=>new Promise((L,z)=>{let F=[],G={};if(ci(R[0]))F.push.apply(F,R[0]),Object.assign(G,R[1]||{});else{let C=R[R.length-1];typeof C=="object"&&!(C instanceof Blob)&&Object.assign(G,R.pop()),F.push(...R)}a.dispatch("ADD_ITEMS",{items:F,index:G.index,interactionMethod:_e.API,success:L,failure:z})}),P=()=>a.query("GET_ACTIVE_ITEMS"),O=R=>new Promise((L,z)=>{a.dispatch("REQUEST_ITEM_PROCESSING",{query:R,success:F=>{L(F)},failure:F=>{z(F)}})}),M=(...R)=>{let L=Array.isArray(R[0])?R[0]:R,z=L.length?L:P();return Promise.all(z.map(y))},N=(...R)=>{let L=Array.isArray(R[0])?R[0]:R;if(!L.length){let z=P().filter(F=>!(F.status===U.IDLE&&F.origin===re.LOCAL)&&F.status!==U.PROCESSING&&F.status!==U.PROCESSING_COMPLETE&&F.status!==U.PROCESSING_REVERT_ERROR);return Promise.all(z.map(O))}return Promise.all(L.map(O))},S=(...R)=>{let L=Array.isArray(R[0])?R[0]:R,z;typeof L[L.length-1]=="object"?z=L.pop():Array.isArray(R[0])&&(z=R[1]);let F=P();return L.length?L.map(C=>$e(C)?F[C]?F[C].id:null:C).filter(C=>C).map(C=>x(C,z)):Promise.all(F.map(C=>x(C,z)))},D={...mi(),...f,...Wr(a,i),setOptions:T,addFile:b,addFiles:_,getFile:v,processFile:O,prepareFile:y,removeFile:x,moveFile:(R,L)=>a.dispatch("MOVE_ITEM",{query:R,index:L}),getFiles:P,processFiles:N,removeFiles:S,prepareFiles:M,sort:R=>a.dispatch("SORT",{compare:R}),browse:()=>{var R=d.element.querySelector("input[type=file]");R&&R.click()},destroy:()=>{D.fire("destroy",d.element),a.dispatch("ABORT_ALL"),d._destroy(),window.removeEventListener("resize",c),document.removeEventListener("visibilitychange",n),a.dispatch("DID_DESTROY")},insertBefore:R=>Na(d.element,R),insertAfter:R=>Ba(d.element,R),appendTo:R=>R.appendChild(d.element),replaceElement:R=>{Na(d.element,R),R.parentNode.removeChild(R),t=R},restoreElement:()=>{t&&(Ba(t,d.element),d.element.parentNode.removeChild(d.element),t=null)},isAttachedTo:R=>d.element===R||t===R,element:{get:()=>d.element},status:{get:()=>a.query("GET_STATUS")}};return a.dispatch("DID_INIT"),We(D)},io=(e={})=>{let t={};return te(li(),(a,n)=>{t[a]=n[0]}),Vd({...t,...e})},Gd=e=>e.charAt(0).toLowerCase()+e.slice(1),Ud=e=>eo(e.replace(/^data-/,"")),ao=(e,t)=>{te(t,(i,a)=>{te(e,(n,o)=>{let l=new RegExp(i);if(!l.test(n)||(delete e[n],a===!1))return;if(fe(a)){e[a]=o;return}let s=a.group;ce(a)&&!e[s]&&(e[s]={}),e[s][Gd(n.replace(l,""))]=o}),a.mapping&&ao(e[a.group],a.mapping)})},Wd=(e,t={})=>{let i=[];te(e.attributes,n=>{i.push(e.attributes[n])});let a=i.filter(n=>n.name).reduce((n,o)=>{let l=se(e,o.name);return n[Ud(o.name)]=l===o.name?!0:l,n},{});return ao(a,t),a},Hd=(e,t={})=>{let i={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};tt("SET_ATTRIBUTE_TO_OPTION_MAP",i);let a={...t},n=Wd(e.nodeName==="FIELDSET"?e.querySelector("input[type=file]"):e,i);Object.keys(n).forEach(l=>{ce(n[l])?(ce(a[l])||(a[l]={}),Object.assign(a[l],n[l])):a[l]=n[l]}),a.files=(t.files||[]).concat(Array.from(e.querySelectorAll("input:not([type=file])")).map(l=>({source:l.value,options:{type:l.dataset.type}})));let o=io(a);return e.files&&Array.from(e.files).forEach(l=>{o.addFile(l)}),o.replaceElement(e),o},jd=(...e)=>ir(e[0])?Hd(...e):io(...e),qd=["fire","_read","_write"],hn=e=>{let t={};return _n(e,t,qd),t},Yd=(e,t)=>e.replace(/(?:{([a-zA-Z]+)})/g,(i,a)=>t[a]),$d=e=>{let t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),i=URL.createObjectURL(t),a=new Worker(i);return{transfer:(n,o)=>{},post:(n,o,l)=>{let r=Yi();a.onmessage=s=>{s.data.id===r&&o(s.data.message)},a.postMessage({id:r,message:n},l)},terminate:()=>{a.terminate(),URL.revokeObjectURL(i)}}},Xd=e=>new Promise((t,i)=>{let a=new Image;a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),no=(e,t)=>{let i=e.slice(0,e.size,e.type);return i.lastModifiedDate=e.lastModifiedDate,i.name=t,i},Qd=e=>no(e,e.name),En=[],Zd=e=>{if(En.includes(e))return;En.push(e);let t=e({addFilter:Qr,utils:{Type:A,forin:te,isString:fe,isFile:Je,toNaturalFileSize:Nn,replaceInString:Yd,getExtensionFromFilename:ui,getFilenameWithoutExtension:Fn,guesstimateMimeType:$n,getFileFromBlob:ht,getFilenameFromURL:zt,createRoute:ge,createWorker:$d,createView:ne,createItemAPI:he,loadImage:Xd,copyFile:Qd,renameFile:no,createBlob:On,applyFilterChain:Ae,text:ae,getNumericAspectRatioFromString:Sn},views:{fileActionButton:Cn}});Zr(t.options)},Kd=()=>Object.prototype.toString.call(window.operamini)==="[object OperaMini]",Jd=()=>"Promise"in window,ep=()=>"slice"in Blob.prototype,tp=()=>"URL"in window&&"createObjectURL"in window.URL,ip=()=>"visibilityState"in document,ap=()=>"performance"in window,np=()=>"supports"in(window.CSS||{}),op=()=>/MSIE|Trident/.test(window.navigator.userAgent),Gi=(()=>{let e=bn()&&!Kd()&&ip()&&Jd()&&ep()&&tp()&&ap()&&(np()||op());return()=>e})(),Ue={apps:[]},lp="filepond",it=()=>{},oo={},bt={},Ct={},Ui={},ft=it,gt=it,Wi=it,Hi=it,ve=it,ji=it,Ft=it;if(Gi()){Lr(()=>{Ue.apps.forEach(i=>i._read())},i=>{Ue.apps.forEach(a=>a._write(i))});let e=()=>{document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:Gi,create:ft,destroy:gt,parse:Wi,find:Hi,registerPlugin:ve,setOptions:Ft}})),document.removeEventListener("DOMContentLoaded",e)};document.readyState!=="loading"?setTimeout(()=>e(),0):document.addEventListener("DOMContentLoaded",e);let t=()=>te(li(),(i,a)=>{Ui[i]=a[1]});oo={...Ln},Ct={...re},bt={...U},Ui={},t(),ft=(...i)=>{let a=jd(...i);return a.on("destroy",gt),Ue.apps.push(a),hn(a)},gt=i=>{let a=Ue.apps.findIndex(n=>n.isAttachedTo(i));return a>=0?(Ue.apps.splice(a,1)[0].restoreElement(),!0):!1},Wi=i=>Array.from(i.querySelectorAll(`.${lp}`)).filter(o=>!Ue.apps.find(l=>l.isAttachedTo(o))).map(o=>ft(o)),Hi=i=>{let a=Ue.apps.find(n=>n.isAttachedTo(i));return a?hn(a):null},ve=(...i)=>{i.forEach(Zd),t()},ji=()=>{let i={};return te(li(),(a,n)=>{i[a]=n[0]}),i},Ft=i=>(ce(i)&&(Ue.apps.forEach(a=>{a.setOptions(i)}),Kr(i)),ji())}function lo(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),i.push.apply(i,a)}return i}function yo(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,a=new Array(t);i
',_p=Number.isNaN||Fe.isNaN;function j(e){return typeof e=="number"&&!_p(e)}var Io=function(t){return t>0&&t<1/0};function la(e){return typeof e>"u"}function ot(e){return sa(e)==="object"&&e!==null}var Rp=Object.prototype.hasOwnProperty;function It(e){if(!ot(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&Rp.call(i,"isPrototypeOf")}catch{return!1}}function Ee(e){return typeof e=="function"}var wp=Array.prototype.slice;function Do(e){return Array.from?Array.from(e):wp.call(e)}function oe(e,t){return e&&Ee(t)&&(Array.isArray(e)||j(e.length)?Do(e).forEach(function(i,a){t.call(e,i,a,e)}):ot(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)})),e}var J=Object.assign||function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n0&&a.forEach(function(o){ot(o)&&Object.keys(o).forEach(function(l){t[l]=o[l]})}),t},Sp=/\.\d*(?:0|9){12}\d*$/;function xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Sp.test(e)?Math.round(e*t)/t:e}var Lp=/^width|height|left|top|marginLeft|marginTop$/;function je(e,t){var i=e.style;oe(t,function(a,n){Lp.test(n)&&j(a)&&(a="".concat(a,"px")),i[n]=a})}function Ap(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function de(e,t){if(t){if(j(e.length)){oe(e,function(a){de(a,t)});return}if(e.classList){e.classList.add(t);return}var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function De(e,t){if(t){if(j(e.length)){oe(e,function(i){De(i,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function vt(e,t,i){if(t){if(j(e.length)){oe(e,function(a){vt(a,t,i)});return}i?de(e,t):De(e,t)}}var Mp=/([a-z\d])([A-Z])/g;function xa(e){return e.replace(Mp,"$1-$2").toLowerCase()}function Ea(e,t){return ot(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(xa(t)))}function Wt(e,t,i){ot(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(xa(t)),i)}function Op(e,t){if(ot(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(xa(t)))}var Fo=/\s\s*/,zo=function(){var e=!1;if(Ti){var t=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(o){t=o}});Fe.addEventListener("test",i,a),Fe.removeEventListener("test",i,a)}return e}();function Pe(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;t.trim().split(Fo).forEach(function(o){if(!zo){var l=e.listeners;l&&l[o]&&l[o][i]&&(n=l[o][i],delete l[o][i],Object.keys(l[o]).length===0&&delete l[o],Object.keys(l).length===0&&delete e.listeners)}e.removeEventListener(o,n,a)})}function Re(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;t.trim().split(Fo).forEach(function(o){if(a.once&&!zo){var l=e.listeners,r=l===void 0?{}:l;n=function(){delete r[o][i],e.removeEventListener(o,n,a);for(var p=arguments.length,c=new Array(p),d=0;dMath.abs(i)&&(i=m)})}),i}function Ei(e,t){var i=e.pageX,a=e.pageY,n={endX:i,endY:a};return t?n:yo({startX:i,startY:a},n)}function Fp(e){var t=0,i=0,a=0;return oe(e,function(n){var o=n.startX,l=n.startY;t+=o,i+=l,a+=1}),t/=a,i/=a,{pageX:t,pageY:i}}function qe(e){var t=e.aspectRatio,i=e.height,a=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",o=Io(a),l=Io(i);if(o&&l){var r=i*t;n==="contain"&&r>a||n==="cover"&&r90?{width:s,height:r}:{width:r,height:s}}function Cp(e,t,i,a){var n=t.aspectRatio,o=t.naturalWidth,l=t.naturalHeight,r=t.rotate,s=r===void 0?0:r,p=t.scaleX,c=p===void 0?1:p,d=t.scaleY,m=d===void 0?1:d,u=i.aspectRatio,f=i.naturalWidth,g=i.naturalHeight,h=a.fillColor,I=h===void 0?"transparent":h,E=a.imageSmoothingEnabled,T=E===void 0?!0:E,v=a.imageSmoothingQuality,y=v===void 0?"low":v,b=a.maxWidth,w=b===void 0?1/0:b,x=a.maxHeight,_=x===void 0?1/0:x,P=a.minWidth,O=P===void 0?0:P,M=a.minHeight,N=M===void 0?0:M,S=document.createElement("canvas"),D=S.getContext("2d"),R=qe({aspectRatio:u,width:w,height:_}),L=qe({aspectRatio:u,width:O,height:N},"cover"),z=Math.min(R.width,Math.max(L.width,f)),F=Math.min(R.height,Math.max(L.height,g)),G=qe({aspectRatio:n,width:w,height:_}),C=qe({aspectRatio:n,width:O,height:N},"cover"),Y=Math.min(G.width,Math.max(C.width,o)),Q=Math.min(G.height,Math.max(C.height,l)),$=[-Y/2,-Q/2,Y,Q];return S.width=xt(z),S.height=xt(F),D.fillStyle=I,D.fillRect(0,0,z,F),D.save(),D.translate(z/2,F/2),D.rotate(s*Math.PI/180),D.scale(c,m),D.imageSmoothingEnabled=T,D.imageSmoothingQuality=y,D.drawImage.apply(D,[e].concat(Ro($.map(function(pe){return Math.floor(xt(pe))})))),D.restore(),S}var No=String.fromCharCode;function Np(e,t,i){var a="";i+=t;for(var n=t;n0;)i.push(No.apply(null,Do(n.subarray(0,a)))),n=n.subarray(a);return"data:".concat(t,";base64,").concat(btoa(i.join("")))}function Gp(e){var t=new DataView(e),i;try{var a,n,o;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var l=t.byteLength,r=2;r+1=8&&(o=p+d)}}}if(o){var m=t.getUint16(o,a),u,f;for(f=0;f=0?o:Oo),height:Math.max(a.offsetHeight,l>=0?l:Po)};this.containerData=r,je(n,{width:r.width,height:r.height}),de(t,be),De(n,be)},initCanvas:function(){var t=this.containerData,i=this.imageData,a=this.options.viewMode,n=Math.abs(i.rotate)%180===90,o=n?i.naturalHeight:i.naturalWidth,l=n?i.naturalWidth:i.naturalHeight,r=o/l,s=t.width,p=t.height;t.height*r>t.width?a===3?s=t.height*r:p=t.width/r:a===3?p=t.width/r:s=t.height*r;var c={aspectRatio:r,naturalWidth:o,naturalHeight:l,width:s,height:p};this.canvasData=c,this.limited=a===1||a===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=J({},c)},limitCanvas:function(t,i){var a=this.options,n=this.containerData,o=this.canvasData,l=this.cropBoxData,r=a.viewMode,s=o.aspectRatio,p=this.cropped&&l;if(t){var c=Number(a.minCanvasWidth)||0,d=Number(a.minCanvasHeight)||0;r>1?(c=Math.max(c,n.width),d=Math.max(d,n.height),r===3&&(d*s>c?c=d*s:d=c/s)):r>0&&(c?c=Math.max(c,p?l.width:0):d?d=Math.max(d,p?l.height:0):p&&(c=l.width,d=l.height,d*s>c?c=d*s:d=c/s));var m=qe({aspectRatio:s,width:c,height:d});c=m.width,d=m.height,o.minWidth=c,o.minHeight=d,o.maxWidth=1/0,o.maxHeight=1/0}if(i)if(r>(p?0:1)){var u=n.width-o.width,f=n.height-o.height;o.minLeft=Math.min(0,u),o.minTop=Math.min(0,f),o.maxLeft=Math.max(0,u),o.maxTop=Math.max(0,f),p&&this.limited&&(o.minLeft=Math.min(l.left,l.left+(l.width-o.width)),o.minTop=Math.min(l.top,l.top+(l.height-o.height)),o.maxLeft=l.left,o.maxTop=l.top,r===2&&(o.width>=n.width&&(o.minLeft=Math.min(0,u),o.maxLeft=Math.max(0,u)),o.height>=n.height&&(o.minTop=Math.min(0,f),o.maxTop=Math.max(0,f))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=n.width,o.maxTop=n.height},renderCanvas:function(t,i){var a=this.canvasData,n=this.imageData;if(i){var o=zp({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),l=o.width,r=o.height,s=a.width*(l/a.naturalWidth),p=a.height*(r/a.naturalHeight);a.left-=(s-a.width)/2,a.top-=(p-a.height)/2,a.width=s,a.height=p,a.aspectRatio=l/r,a.naturalWidth=l,a.naturalHeight=r,this.limitCanvas(!0,!1)}(a.width>a.maxWidth||a.widtha.maxHeight||a.heighti.width?o.height=o.width/a:o.width=o.height*a),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*n),o.height=Math.max(o.minHeight,o.height*n),o.left=i.left+(i.width-o.width)/2,o.top=i.top+(i.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=J({},o)},limitCropBox:function(t,i){var a=this.options,n=this.containerData,o=this.canvasData,l=this.cropBoxData,r=this.limited,s=a.aspectRatio;if(t){var p=Number(a.minCropBoxWidth)||0,c=Number(a.minCropBoxHeight)||0,d=r?Math.min(n.width,o.width,o.width+o.left,n.width-o.left):n.width,m=r?Math.min(n.height,o.height,o.height+o.top,n.height-o.top):n.height;p=Math.min(p,n.width),c=Math.min(c,n.height),s&&(p&&c?c*s>p?c=p/s:p=c*s:p?c=p/s:c&&(p=c*s),m*s>d?m=d/s:d=m*s),l.minWidth=Math.min(p,d),l.minHeight=Math.min(c,m),l.maxWidth=d,l.maxHeight=m}i&&(r?(l.minLeft=Math.max(0,o.left),l.minTop=Math.max(0,o.top),l.maxLeft=Math.min(n.width,o.left+o.width)-l.width,l.maxTop=Math.min(n.height,o.top+o.height)-l.height):(l.minLeft=0,l.minTop=0,l.maxLeft=n.width-l.width,l.maxTop=n.height-l.height))},renderCropBox:function(){var t=this.options,i=this.containerData,a=this.cropBoxData;(a.width>a.maxWidth||a.widtha.maxHeight||a.height=i.width&&a.height>=i.height?So:Ia),je(this.cropBox,J({width:a.width,height:a.height},Gt({translateX:a.left,translateY:a.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),yt(this.element,ma,this.getData())}},Hp={initPreview:function(){var t=this.element,i=this.crossOrigin,a=this.options.preview,n=i?this.crossOriginUrl:this.url,o=t.alt||"The image to preview",l=document.createElement("img");if(i&&(l.crossOrigin=i),l.src=n,l.alt=o,this.viewBox.appendChild(l),this.viewBoxImage=l,!!a){var r=a;typeof a=="string"?r=t.ownerDocument.querySelectorAll(a):a.querySelector&&(r=[a]),this.previews=r,oe(r,function(s){var p=document.createElement("img");Wt(s,hi,{width:s.offsetWidth,height:s.offsetHeight,html:s.innerHTML}),i&&(p.crossOrigin=i),p.src=n,p.alt=o,p.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',s.innerHTML="",s.appendChild(p)})}},resetPreview:function(){oe(this.previews,function(t){var i=Ea(t,hi);je(t,{width:i.width,height:i.height}),t.innerHTML=i.html,Op(t,hi)})},preview:function(){var t=this.imageData,i=this.canvasData,a=this.cropBoxData,n=a.width,o=a.height,l=t.width,r=t.height,s=a.left-i.left-t.left,p=a.top-i.top-t.top;!this.cropped||this.disabled||(je(this.viewBoxImage,J({width:l,height:r},Gt(J({translateX:-s,translateY:-p},t)))),oe(this.previews,function(c){var d=Ea(c,hi),m=d.width,u=d.height,f=m,g=u,h=1;n&&(h=m/n,g=o*h),o&&g>u&&(h=u/o,f=n*h,g=u),je(c,{width:f,height:g}),je(c.getElementsByTagName("img")[0],J({width:l*h,height:r*h},Gt(J({translateX:-s*h,translateY:-p*h},t))))}))}},jp={bind:function(){var t=this.element,i=this.options,a=this.cropper;Ee(i.cropstart)&&Re(t,ga,i.cropstart),Ee(i.cropmove)&&Re(t,fa,i.cropmove),Ee(i.cropend)&&Re(t,ua,i.cropend),Ee(i.crop)&&Re(t,ma,i.crop),Ee(i.zoom)&&Re(t,ha,i.zoom),Re(a,mo,this.onCropStart=this.cropStart.bind(this)),i.zoomable&&i.zoomOnWheel&&Re(a,Eo,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&Re(a,po,this.onDblclick=this.dblclick.bind(this)),Re(t.ownerDocument,uo,this.onCropMove=this.cropMove.bind(this)),Re(t.ownerDocument,fo,this.onCropEnd=this.cropEnd.bind(this)),i.responsive&&Re(window,ho,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,i=this.options,a=this.cropper;Ee(i.cropstart)&&Pe(t,ga,i.cropstart),Ee(i.cropmove)&&Pe(t,fa,i.cropmove),Ee(i.cropend)&&Pe(t,ua,i.cropend),Ee(i.crop)&&Pe(t,ma,i.crop),Ee(i.zoom)&&Pe(t,ha,i.zoom),Pe(a,mo,this.onCropStart),i.zoomable&&i.zoomOnWheel&&Pe(a,Eo,this.onWheel,{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&Pe(a,po,this.onDblclick),Pe(t.ownerDocument,uo,this.onCropMove),Pe(t.ownerDocument,fo,this.onCropEnd),i.responsive&&Pe(window,ho,this.onResize)}},qp={resize:function(){if(!this.disabled){var t=this.options,i=this.container,a=this.containerData,n=i.offsetWidth/a.width,o=i.offsetHeight/a.height,l=Math.abs(n-1)>Math.abs(o-1)?n:o;if(l!==1){var r,s;t.restore&&(r=this.getCanvasData(),s=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(oe(r,function(p,c){r[c]=p*l})),this.setCropBoxData(oe(s,function(p,c){s[c]=p*l})))}}},dblclick:function(){this.disabled||this.options.dragMode===Mo||this.setDragMode(Ap(this.dragBox,da)?Ao:va)},wheel:function(t){var i=this,a=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){i.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*a,t)))},cropStart:function(t){var i=t.buttons,a=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(j(i)&&i!==1||j(a)&&a!==0||t.ctrlKey))){var n=this.options,o=this.pointers,l;t.changedTouches?oe(t.changedTouches,function(r){o[r.identifier]=Ei(r)}):o[t.pointerId||0]=Ei(t),Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?l=Lo:l=Ea(t.target,Ut),Tp.test(l)&&yt(this.element,ga,{originalEvent:t,action:l})!==!1&&(t.preventDefault(),this.action=l,this.cropping=!1,l===wo&&(this.cropping=!0,de(this.dragBox,bi)))}},cropMove:function(t){var i=this.action;if(!(this.disabled||!i)){var a=this.pointers;t.preventDefault(),yt(this.element,fa,{originalEvent:t,action:i})!==!1&&(t.changedTouches?oe(t.changedTouches,function(n){J(a[n.identifier]||{},Ei(n,!0))}):J(a[t.pointerId||0]||{},Ei(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var i=this.action,a=this.pointers;t.changedTouches?oe(t.changedTouches,function(n){delete a[n.identifier]}):delete a[t.pointerId||0],i&&(t.preventDefault(),Object.keys(a).length||(this.action=""),this.cropping&&(this.cropping=!1,vt(this.dragBox,bi,this.cropped&&this.options.modal)),yt(this.element,ua,{originalEvent:t,action:i}))}}},Yp={change:function(t){var i=this.options,a=this.canvasData,n=this.containerData,o=this.cropBoxData,l=this.pointers,r=this.action,s=i.aspectRatio,p=o.left,c=o.top,d=o.width,m=o.height,u=p+d,f=c+m,g=0,h=0,I=n.width,E=n.height,T=!0,v;!s&&t.shiftKey&&(s=d&&m?d/m:1),this.limited&&(g=o.minLeft,h=o.minTop,I=g+Math.min(n.width,a.width,a.left+a.width),E=h+Math.min(n.height,a.height,a.top+a.height));var y=l[Object.keys(l)[0]],b={x:y.endX-y.startX,y:y.endY-y.startY},w=function(_){switch(_){case at:u+b.x>I&&(b.x=I-u);break;case nt:p+b.xE&&(b.y=E-f);break}};switch(r){case Ia:p+=b.x,c+=b.y;break;case at:if(b.x>=0&&(u>=I||s&&(c<=h||f>=E))){T=!1;break}w(at),d+=b.x,d<0&&(r=nt,d=-d,p-=d),s&&(m=d/s,c+=(o.height-m)/2);break;case He:if(b.y<=0&&(c<=h||s&&(p<=g||u>=I))){T=!1;break}w(He),m-=b.y,c+=b.y,m<0&&(r=Tt,m=-m,c-=m),s&&(d=m*s,p+=(o.width-d)/2);break;case nt:if(b.x<=0&&(p<=g||s&&(c<=h||f>=E))){T=!1;break}w(nt),d-=b.x,p+=b.x,d<0&&(r=at,d=-d,p-=d),s&&(m=d/s,c+=(o.height-m)/2);break;case Tt:if(b.y>=0&&(f>=E||s&&(p<=g||u>=I))){T=!1;break}w(Tt),m+=b.y,m<0&&(r=He,m=-m,c-=m),s&&(d=m*s,p+=(o.width-d)/2);break;case Nt:if(s){if(b.y<=0&&(c<=h||u>=I)){T=!1;break}w(He),m-=b.y,c+=b.y,d=m*s}else w(He),w(at),b.x>=0?uh&&(m-=b.y,c+=b.y):(m-=b.y,c+=b.y);d<0&&m<0?(r=Vt,m=-m,d=-d,c-=m,p-=d):d<0?(r=Bt,d=-d,p-=d):m<0&&(r=kt,m=-m,c-=m);break;case Bt:if(s){if(b.y<=0&&(c<=h||p<=g)){T=!1;break}w(He),m-=b.y,c+=b.y,d=m*s,p+=o.width-d}else w(He),w(nt),b.x<=0?p>g?(d-=b.x,p+=b.x):b.y<=0&&c<=h&&(T=!1):(d-=b.x,p+=b.x),b.y<=0?c>h&&(m-=b.y,c+=b.y):(m-=b.y,c+=b.y);d<0&&m<0?(r=kt,m=-m,d=-d,c-=m,p-=d):d<0?(r=Nt,d=-d,p-=d):m<0&&(r=Vt,m=-m,c-=m);break;case Vt:if(s){if(b.x<=0&&(p<=g||f>=E)){T=!1;break}w(nt),d-=b.x,p+=b.x,m=d/s}else w(Tt),w(nt),b.x<=0?p>g?(d-=b.x,p+=b.x):b.y>=0&&f>=E&&(T=!1):(d-=b.x,p+=b.x),b.y>=0?f=0&&(u>=I||f>=E)){T=!1;break}w(at),d+=b.x,m=d/s}else w(Tt),w(at),b.x>=0?u=0&&f>=E&&(T=!1):d+=b.x,b.y>=0?f0?r=b.y>0?kt:Nt:b.x<0&&(p-=d,r=b.y>0?Vt:Bt),b.y<0&&(c-=m),this.cropped||(De(this.cropBox,be),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}T&&(o.width=d,o.height=m,o.left=p,o.top=c,this.action=r,this.renderCropBox()),oe(l,function(x){x.startX=x.endX,x.startY=x.endY})}},$p={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&de(this.dragBox,bi),De(this.cropBox,be),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=J({},this.initialImageData),this.canvasData=J({},this.initialCanvasData),this.cropBoxData=J({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(J(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),De(this.dragBox,bi),de(this.cropBox,be)),this},replace:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),i?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,oe(this.previews,function(a){a.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,De(this.cropper,so)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,de(this.cropper,so)),this},destroy:function(){var t=this.element;return t[K]?(t[K]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.canvasData,n=a.left,o=a.top;return this.moveTo(la(t)?t:n+Number(t),la(i)?i:o+Number(i))},moveTo:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.canvasData,n=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.movable&&(j(t)&&(a.left=t,n=!0),j(i)&&(a.top=i,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,i){var a=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(a.width*t/a.naturalWidth,null,i)},zoomTo:function(t,i,a){var n=this.options,o=this.canvasData,l=o.width,r=o.height,s=o.naturalWidth,p=o.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var c=s*t,d=p*t;if(yt(this.element,ha,{ratio:t,oldRatio:l/s,originalEvent:a})===!1)return this;if(a){var m=this.pointers,u=Co(this.cropper),f=m&&Object.keys(m).length?Fp(m):{pageX:a.pageX,pageY:a.pageY};o.left-=(c-l)*((f.pageX-u.left-o.left)/l),o.top-=(d-r)*((f.pageY-u.top-o.top)/r)}else It(i)&&j(i.x)&&j(i.y)?(o.left-=(c-l)*((i.x-o.left)/l),o.top-=(d-r)*((i.y-o.top)/r)):(o.left-=(c-l)/2,o.top-=(d-r)/2);o.width=c,o.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),j(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var i=this.imageData.scaleY;return this.scale(t,j(i)?i:1)},scaleY:function(t){var i=this.imageData.scaleX;return this.scale(j(i)?i:1,t)},scale:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.imageData,n=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.scalable&&(j(t)&&(a.scaleX=t,n=!0),j(i)&&(a.scaleY=i,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData,l;if(this.ready&&this.cropped){l={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(oe(l,function(c,d){l[d]=c/r}),t){var s=Math.round(l.y+l.height),p=Math.round(l.x+l.width);l.x=Math.round(l.x),l.y=Math.round(l.y),l.width=p-l.x,l.height=s-l.y}}else l={x:0,y:0,width:0,height:0};return i.rotatable&&(l.rotate=a.rotate||0),i.scalable&&(l.scaleX=a.scaleX||1,l.scaleY=a.scaleY||1),l},setData:function(t){var i=this.options,a=this.imageData,n=this.canvasData,o={};if(this.ready&&!this.disabled&&It(t)){var l=!1;i.rotatable&&j(t.rotate)&&t.rotate!==a.rotate&&(a.rotate=t.rotate,l=!0),i.scalable&&(j(t.scaleX)&&t.scaleX!==a.scaleX&&(a.scaleX=t.scaleX,l=!0),j(t.scaleY)&&t.scaleY!==a.scaleY&&(a.scaleY=t.scaleY,l=!0)),l&&this.renderCanvas(!0,!0);var r=a.width/a.naturalWidth;j(t.x)&&(o.left=t.x*r+n.left),j(t.y)&&(o.top=t.y*r+n.top),j(t.width)&&(o.width=t.width*r),j(t.height)&&(o.height=t.height*r),this.setCropBoxData(o)}return this},getContainerData:function(){return this.ready?J({},this.containerData):{}},getImageData:function(){return this.sized?J({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,i={};return this.ready&&oe(["left","top","width","height","naturalWidth","naturalHeight"],function(a){i[a]=t[a]}),i},setCanvasData:function(t){var i=this.canvasData,a=i.aspectRatio;return this.ready&&!this.disabled&&It(t)&&(j(t.left)&&(i.left=t.left),j(t.top)&&(i.top=t.top),j(t.width)?(i.width=t.width,i.height=t.width/a):j(t.height)&&(i.height=t.height,i.width=t.height*a),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,i;return this.ready&&this.cropped&&(i={left:t.left,top:t.top,width:t.width,height:t.height}),i||{}},setCropBoxData:function(t){var i=this.cropBoxData,a=this.options.aspectRatio,n,o;return this.ready&&this.cropped&&!this.disabled&&It(t)&&(j(t.left)&&(i.left=t.left),j(t.top)&&(i.top=t.top),j(t.width)&&t.width!==i.width&&(n=!0,i.width=t.width),j(t.height)&&t.height!==i.height&&(o=!0,i.height=t.height),a&&(n?i.height=i.width/a:o&&(i.width=i.height*a)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var i=this.canvasData,a=Cp(this.image,this.imageData,i,t);if(!this.cropped)return a;var n=this.getData(t.rounded),o=n.x,l=n.y,r=n.width,s=n.height,p=a.width/Math.floor(i.naturalWidth);p!==1&&(o*=p,l*=p,r*=p,s*=p);var c=r/s,d=qe({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),m=qe({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=qe({aspectRatio:c,width:t.width||(p!==1?a.width:r),height:t.height||(p!==1?a.height:s)}),f=u.width,g=u.height;f=Math.min(d.width,Math.max(m.width,f)),g=Math.min(d.height,Math.max(m.height,g));var h=document.createElement("canvas"),I=h.getContext("2d");h.width=xt(f),h.height=xt(g),I.fillStyle=t.fillColor||"transparent",I.fillRect(0,0,f,g);var E=t.imageSmoothingEnabled,T=E===void 0?!0:E,v=t.imageSmoothingQuality;I.imageSmoothingEnabled=T,v&&(I.imageSmoothingQuality=v);var y=a.width,b=a.height,w=o,x=l,_,P,O,M,N,S;w<=-r||w>y?(w=0,_=0,O=0,N=0):w<=0?(O=-w,w=0,_=Math.min(y,r+w),N=_):w<=y&&(O=0,_=Math.min(r,y-w),N=_),_<=0||x<=-s||x>b?(x=0,P=0,M=0,S=0):x<=0?(M=-x,x=0,P=Math.min(b,s+x),S=P):x<=b&&(M=0,P=Math.min(s,b-x),S=P);var D=[w,x,_,P];if(N>0&&S>0){var R=f/r;D.push(O*R,M*R,N*R,S*R)}return I.drawImage.apply(I,[a].concat(Ro(D.map(function(L){return Math.floor(xt(L))})))),h},setAspectRatio:function(t){var i=this.options;return!this.disabled&&!la(t)&&(i.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var i=this.options,a=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var o=t===va,l=i.movable&&t===Ao;t=o||l?t:Mo,i.dragMode=t,Wt(a,Ut,t),vt(a,da,o),vt(a,pa,l),i.cropBoxMovable||(Wt(n,Ut,t),vt(n,da,o),vt(n,pa,l))}return this}},Xp=Fe.Cropper,ya=function(){function e(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(sp(this,e),!t||!xp.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=J({},To,It(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return cp(e,[{key:"init",value:function(){var i=this.element,a=i.tagName.toLowerCase(),n;if(!i[K]){if(i[K]=this,a==="img"){if(this.isImg=!0,n=i.getAttribute("src")||"",this.originalUrl=n,!n)return;n=i.src}else a==="canvas"&&window.HTMLCanvasElement&&(n=i.toDataURL());this.load(n)}}},{key:"load",value:function(i){var a=this;if(i){this.url=i,this.imageData={};var n=this.element,o=this.options;if(!o.rotatable&&!o.scalable&&(o.checkOrientation=!1),!o.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Ip.test(i)){vp.test(i)?this.read(kp(i)):this.clone();return}var l=new XMLHttpRequest,r=this.clone.bind(this);this.reloading=!0,this.xhr=l,l.onabort=r,l.onerror=r,l.ontimeout=r,l.onprogress=function(){l.getResponseHeader("content-type")!==bo&&l.abort()},l.onload=function(){a.read(l.response)},l.onloadend=function(){a.reloading=!1,a.xhr=null},o.checkCrossOrigin&&vo(i)&&n.crossOrigin&&(i=xo(i)),l.open("GET",i,!0),l.responseType="arraybuffer",l.withCredentials=n.crossOrigin==="use-credentials",l.send()}}},{key:"read",value:function(i){var a=this.options,n=this.imageData,o=Gp(i),l=0,r=1,s=1;if(o>1){this.url=Vp(i,bo);var p=Up(o);l=p.rotate,r=p.scaleX,s=p.scaleY}a.rotatable&&(n.rotate=l),a.scalable&&(n.scaleX=r,n.scaleY=s),this.clone()}},{key:"clone",value:function(){var i=this.element,a=this.url,n=i.crossOrigin,o=a;this.options.checkCrossOrigin&&vo(a)&&(n||(n="anonymous"),o=xo(a)),this.crossOrigin=n,this.crossOriginUrl=o;var l=document.createElement("img");n&&(l.crossOrigin=n),l.src=o||a,l.alt=i.alt||"The image to crop",this.image=l,l.onload=this.start.bind(this),l.onerror=this.stop.bind(this),de(l,co),i.parentNode.insertBefore(l,i.nextSibling)}},{key:"start",value:function(){var i=this,a=this.image;a.onload=null,a.onerror=null,this.sizing=!0;var n=Fe.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Fe.navigator.userAgent),o=function(p,c){J(i.imageData,{naturalWidth:p,naturalHeight:c,aspectRatio:p/c}),i.initialImageData=J({},i.imageData),i.sizing=!1,i.sized=!0,i.build()};if(a.naturalWidth&&!n){o(a.naturalWidth,a.naturalHeight);return}var l=document.createElement("img"),r=document.body||document.documentElement;this.sizingImage=l,l.onload=function(){o(l.width,l.height),n||r.removeChild(l)},l.src=a.src,n||(l.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(l))}},{key:"stop",value:function(){var i=this.image;i.onload=null,i.onerror=null,i.parentNode.removeChild(i),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var i=this.element,a=this.options,n=this.image,o=i.parentNode,l=document.createElement("div");l.innerHTML=yp;var r=l.querySelector(".".concat(K,"-container")),s=r.querySelector(".".concat(K,"-canvas")),p=r.querySelector(".".concat(K,"-drag-box")),c=r.querySelector(".".concat(K,"-crop-box")),d=c.querySelector(".".concat(K,"-face"));this.container=o,this.cropper=r,this.canvas=s,this.dragBox=p,this.cropBox=c,this.viewBox=r.querySelector(".".concat(K,"-view-box")),this.face=d,s.appendChild(n),de(i,be),o.insertBefore(r,i.nextSibling),De(n,co),this.initPreview(),this.bind(),a.initialAspectRatio=Math.max(0,a.initialAspectRatio)||NaN,a.aspectRatio=Math.max(0,a.aspectRatio)||NaN,a.viewMode=Math.max(0,Math.min(3,Math.round(a.viewMode)))||0,de(c,be),a.guides||de(c.getElementsByClassName("".concat(K,"-dashed")),be),a.center||de(c.getElementsByClassName("".concat(K,"-center")),be),a.background&&de(r,"".concat(K,"-bg")),a.highlight||de(d,gp),a.cropBoxMovable&&(de(d,pa),Wt(d,Ut,Ia)),a.cropBoxResizable||(de(c.getElementsByClassName("".concat(K,"-line")),be),de(c.getElementsByClassName("".concat(K,"-point")),be)),this.render(),this.ready=!0,this.setDragMode(a.dragMode),a.autoCrop&&this.crop(),this.setData(a.data),Ee(a.ready)&&Re(i,go,a.ready,{once:!0}),yt(i,go)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var i=this.cropper.parentNode;i&&i.removeChild(this.cropper),De(this.element,be)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Xp,e}},{key:"setDefaults",value:function(i){J(To,It(i)&&i)}}])}();J(ya.prototype,Wp,Hp,jp,qp,Yp,$p);var Bo={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(Bo);var ko=Bo;var Vo={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(Vo);var Go=Vo;var we=function(e,t,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(e):a?a.value:t.get(e)},_t,Ht,lt,_a=class{constructor(...t){_t.set(this,new Map),Ht.set(this,new Map),lt.set(this,new Map);for(let i of t)this.define(i)}define(t,i=!1){for(let[a,n]of Object.entries(t)){a=a.toLowerCase(),n=n.map(r=>r.toLowerCase()),we(this,lt,"f").has(a)||we(this,lt,"f").set(a,new Set);let o=we(this,lt,"f").get(a),l=!0;for(let r of n){let s=r.startsWith("*");if(r=s?r.slice(1):r,o?.add(r),l&&we(this,Ht,"f").set(a,r),l=!1,s)continue;let p=we(this,_t,"f").get(r);if(p&&p!=a&&!i)throw new Error(`"${a} -> ${r}" conflicts with "${p} -> ${r}". Pass \`force=true\` to override this definition.`);we(this,_t,"f").set(r,a)}}return this}getType(t){if(typeof t!="string")return null;let i=t.replace(/^.*[/\\]/,"").toLowerCase(),a=i.replace(/^.*\./,"").toLowerCase(),n=i.length{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(let t of we(this,lt,"f").values())Object.freeze(t);return this}_getTestState(){return{types:we(this,_t,"f"),extensions:we(this,Ht,"f")}}};_t=new WeakMap,Ht=new WeakMap,lt=new WeakMap;var Ra=_a;var Uo=new Ra(Go,ko)._freeze();var Wo=({addFilter:e,utils:t})=>{let{Type:i,replaceInString:a,toNaturalFileSize:n}=t;return e("ALLOW_HOPPER_ITEM",(o,{query:l})=>{if(!l("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;let r=l("GET_MAX_FILE_SIZE");if(r!==null&&o.size>r)return!1;let s=l("GET_MIN_FILE_SIZE");return!(s!==null&&o.sizenew Promise((r,s)=>{if(!l("GET_ALLOW_FILE_SIZE_VALIDATION"))return r(o);let p=l("GET_FILE_VALIDATE_SIZE_FILTER");if(p&&!p(o))return r(o);let c=l("GET_MAX_FILE_SIZE");if(c!==null&&o.size>c){s({status:{main:l("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:a(l("GET_LABEL_MAX_FILE_SIZE"),{filesize:n(c,".",l("GET_FILE_SIZE_BASE"),l("GET_FILE_SIZE_LABELS",l))})}});return}let d=l("GET_MIN_FILE_SIZE");if(d!==null&&o.sizef+g.fileSize,0)>m){s({status:{main:l("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:a(l("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:n(m,".",l("GET_FILE_SIZE_BASE"),l("GET_FILE_SIZE_LABELS",l))})}});return}r(o)})),{options:{allowFileSizeValidation:[!0,i.BOOLEAN],maxFileSize:[null,i.INT],minFileSize:[null,i.INT],maxTotalFileSize:[null,i.INT],fileValidateSizeFilter:[null,i.FUNCTION],labelMinFileSizeExceeded:["File is too small",i.STRING],labelMinFileSize:["Minimum file size is {filesize}",i.STRING],labelMaxFileSizeExceeded:["File is too large",i.STRING],labelMaxFileSize:["Maximum file size is {filesize}",i.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",i.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",i.STRING]}}},Qp=typeof window<"u"&&typeof window.document<"u";Qp&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Wo}));var Ho=Wo;var jo=({addFilter:e,utils:t})=>{let{Type:i,isString:a,replaceInString:n,guesstimateMimeType:o,getExtensionFromFilename:l,getFilenameFromURL:r}=t,s=(u,f)=>{let g=(/^[^/]+/.exec(u)||[]).pop(),h=f.slice(0,-2);return g===h},p=(u,f)=>u.some(g=>/\*$/.test(g)?s(f,g):g===f),c=u=>{let f="";if(a(u)){let g=r(u),h=l(g);h&&(f=o(h))}else f=u.type;return f},d=(u,f,g)=>{if(f.length===0)return!0;let h=c(u);return g?new Promise((I,E)=>{g(u,h).then(T=>{p(f,T)?I():E()}).catch(E)}):p(f,h)},m=u=>f=>u[f]===null?!1:u[f]||f;return e("SET_ATTRIBUTE_TO_OPTION_MAP",u=>Object.assign(u,{accept:"acceptedFileTypes"})),e("ALLOW_HOPPER_ITEM",(u,{query:f})=>f("GET_ALLOW_FILE_TYPE_VALIDATION")?d(u,f("GET_ACCEPTED_FILE_TYPES")):!0),e("LOAD_FILE",(u,{query:f})=>new Promise((g,h)=>{if(!f("GET_ALLOW_FILE_TYPE_VALIDATION")){g(u);return}let I=f("GET_ACCEPTED_FILE_TYPES"),E=f("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),T=d(u,I,E),v=()=>{let y=I.map(m(f("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter(w=>w!==!1),b=y.filter((w,x)=>y.indexOf(w)===x);h({status:{main:f("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:n(f("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:b.join(", "),allButLastType:b.slice(0,-1).join(", "),lastType:b[b.length-1]})}})};if(typeof T=="boolean")return T?g(u):v();T.then(()=>{g(u)}).catch(v)})),{options:{allowFileTypeValidation:[!0,i.BOOLEAN],acceptedFileTypes:[[],i.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",i.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",i.STRING],fileValidateTypeLabelExpectedTypesMap:[{},i.OBJECT],fileValidateTypeDetectType:[null,i.FUNCTION]}}},Zp=typeof window<"u"&&typeof window.document<"u";Zp&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:jo}));var qo=jo;var Yo=e=>/^image/.test(e.type),$o=({addFilter:e,utils:t})=>{let{Type:i,isFile:a,getNumericAspectRatioFromString:n}=t,o=(p,c)=>!(!Yo(p.file)||!c("GET_ALLOW_IMAGE_CROP")),l=p=>typeof p=="object",r=p=>typeof p=="number",s=(p,c)=>p.setMetadata("crop",Object.assign({},p.getMetadata("crop"),c));return e("DID_CREATE_ITEM",(p,{query:c})=>{p.extend("setImageCrop",d=>{if(!(!o(p,c)||!l(center)))return p.setMetadata("crop",d),d}),p.extend("setImageCropCenter",d=>{if(!(!o(p,c)||!l(d)))return s(p,{center:d})}),p.extend("setImageCropZoom",d=>{if(!(!o(p,c)||!r(d)))return s(p,{zoom:Math.max(1,d)})}),p.extend("setImageCropRotation",d=>{if(!(!o(p,c)||!r(d)))return s(p,{rotation:d})}),p.extend("setImageCropFlip",d=>{if(!(!o(p,c)||!l(d)))return s(p,{flip:d})}),p.extend("setImageCropAspectRatio",d=>{if(!o(p,c)||typeof d>"u")return;let m=p.getMetadata("crop"),u=n(d),f={center:{x:.5,y:.5},flip:m?Object.assign({},m.flip):{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:u};return p.setMetadata("crop",f),f})}),e("DID_LOAD_ITEM",(p,{query:c})=>new Promise((d,m)=>{let u=p.file;if(!a(u)||!Yo(u)||!c("GET_ALLOW_IMAGE_CROP")||p.getMetadata("crop"))return d(p);let g=c("GET_IMAGE_CROP_ASPECT_RATIO");p.setMetadata("crop",{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:g?n(g):null}),d(p)})),{options:{allowImageCrop:[!0,i.BOOLEAN],imageCropAspectRatio:[null,i.STRING]}}},Kp=typeof window<"u"&&typeof window.document<"u";Kp&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:$o}));var Xo=$o;var wa=e=>/^image/.test(e.type),Qo=e=>{let{addFilter:t,utils:i,views:a}=e,{Type:n,createRoute:o,createItemAPI:l=c=>c}=i,{fileActionButton:r}=a;t("SHOULD_REMOVE_ON_REVERT",(c,{item:d,query:m})=>new Promise(u=>{let{file:f}=d,g=m("GET_ALLOW_IMAGE_EDIT")&&m("GET_IMAGE_EDIT_ALLOW_EDIT")&&wa(f);u(!g)})),t("DID_LOAD_ITEM",(c,{query:d,dispatch:m})=>new Promise((u,f)=>{if(c.origin>1){u(c);return}let{file:g}=c;if(!d("GET_ALLOW_IMAGE_EDIT")||!d("GET_IMAGE_EDIT_INSTANT_EDIT")){u(c);return}if(!wa(g)){u(c);return}let h=(E,T,v)=>y=>{s.shift(),y?T(E):v(E),m("KICK"),I()},I=()=>{if(!s.length)return;let{item:E,resolve:T,reject:v}=s[0];m("EDIT_ITEM",{id:E.id,handleEditorResponse:h(E,T,v)})};p({item:c,resolve:u,reject:f}),s.length===1&&I()})),t("DID_CREATE_ITEM",(c,{query:d,dispatch:m})=>{c.extend("edit",()=>{m("EDIT_ITEM",{id:c.id})})});let s=[],p=c=>(s.push(c),c);return t("CREATE_VIEW",c=>{let{is:d,view:m,query:u}=c;if(!u("GET_ALLOW_IMAGE_EDIT"))return;let f=u("GET_ALLOW_IMAGE_PREVIEW");if(!(d("file-info")&&!f||d("file")&&f))return;let h=u("GET_IMAGE_EDIT_EDITOR");if(!h)return;h.filepondCallbackBridge||(h.outputData=!0,h.outputFile=!1,h.filepondCallbackBridge={onconfirm:h.onconfirm||(()=>{}),oncancel:h.oncancel||(()=>{})});let I=({root:v,props:y,action:b})=>{let{id:w}=y,{handleEditorResponse:x}=b;h.cropAspectRatio=v.query("GET_IMAGE_CROP_ASPECT_RATIO")||h.cropAspectRatio,h.outputCanvasBackgroundColor=v.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||h.outputCanvasBackgroundColor;let _=v.query("GET_ITEM",w);if(!_)return;let P=_.file,O=_.getMetadata("crop"),M={center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},N=_.getMetadata("resize"),S=_.getMetadata("filter")||null,D=_.getMetadata("filters")||null,R=_.getMetadata("colors")||null,L=_.getMetadata("markup")||null,z={crop:O||M,size:N?{upscale:N.upscale,mode:N.mode,width:N.size.width,height:N.size.height}:null,filter:D?D.id||D.matrix:v.query("GET_ALLOW_IMAGE_FILTER")&&v.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!R?S:null,color:R,markup:L};h.onconfirm=({data:F})=>{let{crop:G,size:C,filter:Y,color:Q,colorMatrix:$,markup:pe}=F,k={};if(G&&(k.crop=G),C){let H=(_.getMetadata("resize")||{}).size,q={width:C.width,height:C.height};!(q.width&&q.height)&&H&&(q.width=H.width,q.height=H.height),(q.width||q.height)&&(k.resize={upscale:C.upscale,mode:C.mode,size:q})}pe&&(k.markup=pe),k.colors=Q,k.filters=Y,k.filter=$,_.setMetadata(k),h.filepondCallbackBridge.onconfirm(F,l(_)),x&&(h.onclose=()=>{x(!0),h.onclose=null})},h.oncancel=()=>{h.filepondCallbackBridge.oncancel(l(_)),x&&(h.onclose=()=>{x(!1),h.onclose=null})},h.open(P,z)},E=({root:v,props:y})=>{if(!u("GET_IMAGE_EDIT_ALLOW_EDIT"))return;let{id:b}=y,w=u("GET_ITEM",b);if(!w)return;let x=w.file;if(wa(x))if(v.ref.handleEdit=_=>{_.stopPropagation(),v.dispatch("EDIT_ITEM",{id:b})},f){let _=m.createChildView(r,{label:"edit",icon:u("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});_.element.classList.add("filepond--action-edit-item"),_.element.dataset.align=u("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),_.on("click",v.ref.handleEdit),v.ref.buttonEditItem=m.appendChildView(_)}else{let _=m.element.querySelector(".filepond--file-info-main"),P=document.createElement("button");P.className="filepond--action-edit-item-alt",P.innerHTML=u("GET_IMAGE_EDIT_ICON_EDIT")+"edit",P.addEventListener("click",v.ref.handleEdit),_.appendChild(P),v.ref.editButton=P}};m.registerDestroyer(({root:v})=>{v.ref.buttonEditItem&&v.ref.buttonEditItem.off("click",v.ref.handleEdit),v.ref.editButton&&v.ref.editButton.removeEventListener("click",v.ref.handleEdit)});let T={EDIT_ITEM:I,DID_LOAD_ITEM:E};if(f){let v=({root:y})=>{y.ref.buttonEditItem&&(y.ref.buttonEditItem.opacity=1)};T.DID_IMAGE_PREVIEW_SHOW=v}m.registerWriter(o(T))}),{options:{allowImageEdit:[!0,n.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",n.STRING],imageEditInstantEdit:[!1,n.BOOLEAN],imageEditAllowEdit:[!0,n.BOOLEAN],imageEditIconEdit:['',n.STRING],imageEditEditor:[null,n.OBJECT]}}},Jp=typeof window<"u"&&typeof window.document<"u";Jp&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Qo}));var Zo=Qo;var em=e=>/^image\/jpeg/.test(e.type),rt={JPEG:65496,APP1:65505,EXIF:1165519206,TIFF:18761,Orientation:274,Unknown:65280},st=(e,t,i=!1)=>e.getUint16(t,i),Ko=(e,t,i=!1)=>e.getUint32(t,i),tm=e=>new Promise((t,i)=>{let a=new FileReader;a.onload=function(n){let o=new DataView(n.target.result);if(st(o,0)!==rt.JPEG){t(-1);return}let l=o.byteLength,r=2;for(;rtypeof window<"u"&&typeof window.document<"u")(),am=()=>im,nm="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=",Jo,Ii=am()?new Image:{};Ii.onload=()=>Jo=Ii.naturalWidth>Ii.naturalHeight;Ii.src=nm;var om=()=>Jo,el=({addFilter:e,utils:t})=>{let{Type:i,isFile:a}=t;return e("DID_LOAD_ITEM",(n,{query:o})=>new Promise((l,r)=>{let s=n.file;if(!a(s)||!em(s)||!o("GET_ALLOW_IMAGE_EXIF_ORIENTATION")||!om())return l(n);tm(s).then(p=>{n.setMetadata("exif",{orientation:p}),l(n)})})),{options:{allowImageExifOrientation:[!0,i.BOOLEAN]}}},lm=typeof window<"u"&&typeof window.document<"u";lm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:el}));var tl=el;var rm=e=>/^image/.test(e.type),il=(e,t)=>qt(e.x*t,e.y*t),al=(e,t)=>qt(e.x+t.x,e.y+t.y),sm=e=>{let t=Math.sqrt(e.x*e.x+e.y*e.y);return t===0?{x:0,y:0}:qt(e.x/t,e.y/t)},vi=(e,t,i)=>{let a=Math.cos(t),n=Math.sin(t),o=qt(e.x-i.x,e.y-i.y);return qt(i.x+a*o.x-n*o.y,i.y+n*o.x+a*o.y)},qt=(e=0,t=0)=>({x:e,y:t}),Te=(e,t,i=1,a)=>{if(typeof e=="string")return parseFloat(e)*i;if(typeof e=="number")return e*(a?t[a]:Math.min(t.width,t.height))},cm=(e,t,i)=>{let a=e.borderStyle||e.lineStyle||"solid",n=e.backgroundColor||e.fontColor||"transparent",o=e.borderColor||e.lineColor||"transparent",l=Te(e.borderWidth||e.lineWidth,t,i),r=e.lineCap||"round",s=e.lineJoin||"round",p=typeof a=="string"?"":a.map(d=>Te(d,t,i)).join(","),c=e.opacity||1;return{"stroke-linecap":r,"stroke-linejoin":s,"stroke-width":l||0,"stroke-dasharray":p,stroke:o,fill:n,opacity:c}},Se=e=>e!=null,dm=(e,t,i=1)=>{let a=Te(e.x,t,i,"width")||Te(e.left,t,i,"width"),n=Te(e.y,t,i,"height")||Te(e.top,t,i,"height"),o=Te(e.width,t,i,"width"),l=Te(e.height,t,i,"height"),r=Te(e.right,t,i,"width"),s=Te(e.bottom,t,i,"height");return Se(n)||(Se(l)&&Se(s)?n=t.height-l-s:n=s),Se(a)||(Se(o)&&Se(r)?a=t.width-o-r:a=r),Se(o)||(Se(a)&&Se(r)?o=t.width-a-r:o=0),Se(l)||(Se(n)&&Se(s)?l=t.height-n-s:l=0),{x:a||0,y:n||0,width:o||0,height:l||0}},pm=e=>e.map((t,i)=>`${i===0?"M":"L"} ${t.x} ${t.y}`).join(" "),Ce=(e,t)=>Object.keys(t).forEach(i=>e.setAttribute(i,t[i])),mm="http://www.w3.org/2000/svg",Rt=(e,t)=>{let i=document.createElementNS(mm,e);return t&&Ce(i,t),i},um=e=>Ce(e,{...e.rect,...e.styles}),fm=e=>{let t=e.rect.x+e.rect.width*.5,i=e.rect.y+e.rect.height*.5,a=e.rect.width*.5,n=e.rect.height*.5;return Ce(e,{cx:t,cy:i,rx:a,ry:n,...e.styles})},gm={contain:"xMidYMid meet",cover:"xMidYMid slice"},hm=(e,t)=>{Ce(e,{...e.rect,...e.styles,preserveAspectRatio:gm[t.fit]||"none"})},Em={left:"start",center:"middle",right:"end"},bm=(e,t,i,a)=>{let n=Te(t.fontSize,i,a),o=t.fontFamily||"sans-serif",l=t.fontWeight||"normal",r=Em[t.textAlign]||"start";Ce(e,{...e.rect,...e.styles,"stroke-width":0,"font-weight":l,"font-size":n,"font-family":o,"text-anchor":r}),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},Tm=(e,t,i,a)=>{Ce(e,{...e.rect,...e.styles,fill:"none"});let n=e.childNodes[0],o=e.childNodes[1],l=e.childNodes[2],r=e.rect,s={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(Ce(n,{x1:r.x,y1:r.y,x2:s.x,y2:s.y}),!t.lineDecoration)return;o.style.display="none",l.style.display="none";let p=sm({x:s.x-r.x,y:s.y-r.y}),c=Te(.05,i,a);if(t.lineDecoration.indexOf("arrow-begin")!==-1){let d=il(p,c),m=al(r,d),u=vi(r,2,m),f=vi(r,-2,m);Ce(o,{style:"display:block;",d:`M${u.x},${u.y} L${r.x},${r.y} L${f.x},${f.y}`})}if(t.lineDecoration.indexOf("arrow-end")!==-1){let d=il(p,-c),m=al(s,d),u=vi(s,2,m),f=vi(s,-2,m);Ce(l,{style:"display:block;",d:`M${u.x},${u.y} L${s.x},${s.y} L${f.x},${f.y}`})}},Im=(e,t,i,a)=>{Ce(e,{...e.styles,fill:"none",d:pm(t.points.map(n=>({x:Te(n.x,i,a,"width"),y:Te(n.y,i,a,"height")})))})},xi=e=>t=>Rt(e,{id:t.id}),vm=e=>{let t=Rt("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=()=>{t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},xm=e=>{let t=Rt("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),i=Rt("line");t.appendChild(i);let a=Rt("path");t.appendChild(a);let n=Rt("path");return t.appendChild(n),t},ym={image:vm,rect:xi("rect"),ellipse:xi("ellipse"),text:xi("text"),path:xi("path"),line:xm},_m={rect:um,ellipse:fm,image:hm,text:bm,path:Im,line:Tm},Rm=(e,t)=>ym[e](t),wm=(e,t,i,a,n)=>{t!=="path"&&(e.rect=dm(i,a,n)),e.styles=cm(i,a,n),_m[t](e,i,a,n)},Sm=["x","y","left","top","right","bottom","width","height"],Lm=e=>typeof e=="string"&&/%/.test(e)?parseFloat(e)/100:e,Am=e=>{let[t,i]=e,a=i.points?{}:Sm.reduce((n,o)=>(n[o]=Lm(i[o]),n),{});return[t,{zIndex:0,...i,...a}]},Mm=(e,t)=>e[1].zIndex>t[1].zIndex?1:e[1].zIndexe.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:({root:t,props:i})=>{if(!i.dirty)return;let{crop:a,resize:n,markup:o}=i,l=i.width,r=i.height,s=a.width,p=a.height;if(n){let{size:u}=n,f=u&&u.width,g=u&&u.height,h=n.mode,I=n.upscale;f&&!g&&(g=f),g&&!f&&(f=g);let E=s{let[f,g]=u,h=Rm(f,g);wm(h,f,g,c,d),t.element.appendChild(h)})}}),jt=(e,t)=>({x:e,y:t}),Pm=(e,t)=>e.x*t.x+e.y*t.y,nl=(e,t)=>jt(e.x-t.x,e.y-t.y),Dm=(e,t)=>Pm(nl(e,t),nl(e,t)),ol=(e,t)=>Math.sqrt(Dm(e,t)),ll=(e,t)=>{let i=e,a=1.5707963267948966,n=t,o=1.5707963267948966-t,l=Math.sin(a),r=Math.sin(n),s=Math.sin(o),p=Math.cos(o),c=i/l,d=c*r,m=c*s;return jt(p*d,p*m)},Fm=(e,t)=>{let i=e.width,a=e.height,n=ll(i,t),o=ll(a,t),l=jt(e.x+Math.abs(n.x),e.y-Math.abs(n.y)),r=jt(e.x+e.width+Math.abs(o.y),e.y+Math.abs(o.x)),s=jt(e.x-Math.abs(o.y),e.y+e.height-Math.abs(o.x));return{width:ol(l,r),height:ol(l,s)}},zm=(e,t,i=1)=>{let a=e.height/e.width,n=1,o=t,l=1,r=a;r>o&&(r=o,l=r/a);let s=Math.max(n/l,o/r),p=e.width/(i*s*l),c=p*t;return{width:p,height:c}},sl=(e,t,i,a)=>{let n=a.x>.5?1-a.x:a.x,o=a.y>.5?1-a.y:a.y,l=n*2*e.width,r=o*2*e.height,s=Fm(t,i);return Math.max(s.width/l,s.height/r)},cl=(e,t)=>{let i=e.width,a=i*t;a>e.height&&(a=e.height,i=a/t);let n=(e.width-i)*.5,o=(e.height-a)*.5;return{x:n,y:o,width:i,height:a}},Cm=(e,t={})=>{let{zoom:i,rotation:a,center:n,aspectRatio:o}=t;o||(o=e.height/e.width);let l=zm(e,o,i),r={x:l.width*.5,y:l.height*.5},s={x:0,y:0,width:l.width,height:l.height,center:r},p=typeof t.scaleToFit>"u"||t.scaleToFit,c=sl(e,cl(s,o),a,p?n:{x:.5,y:.5}),d=i*c;return{widthFloat:l.width/d,heightFloat:l.height/d,width:Math.round(l.width/d),height:Math.round(l.height/d)}},ze={type:"spring",stiffness:.5,damping:.45,mass:10},Nm=e=>e.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:({root:t,props:i})=>{t.appendChild(i.image)}}),Bm=e=>e.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:ze,originY:ze,scaleX:ze,scaleY:ze,translateX:ze,translateY:ze,rotateZ:ze}},create:({root:t,props:i})=>{i.width=i.image.width,i.height=i.image.height,t.ref.bitmap=t.appendChildView(t.createChildView(Nm(e),{image:i.image}))},write:({root:t,props:i})=>{let{flip:a}=i.crop,{bitmap:n}=t.ref;n.scaleX=a.horizontal?-1:1,n.scaleY=a.vertical?-1:1}}),km=e=>e.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","opacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function({root:t,props:i}){i.background&&(t.element.style.backgroundColor=i.background)},create:({root:t,props:i})=>{t.ref.image=t.appendChildView(t.createChildView(Bm(e),Object.assign({},i))),t.ref.createMarkup=()=>{t.ref.markup||(t.ref.markup=t.appendChildView(t.createChildView(Om(e),Object.assign({},i))))},t.ref.destroyMarkup=()=>{t.ref.markup&&(t.removeChildView(t.ref.markup),t.ref.markup=null)};let a=t.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");a!==null&&(a==="grid"?t.element.dataset.transparencyIndicator=a:t.element.dataset.transparencyIndicator="color")},write:({root:t,props:i,shouldOptimize:a})=>{let{crop:n,markup:o,resize:l,dirty:r,width:s,height:p}=i;t.ref.image.crop=n;let c={x:0,y:0,width:s,height:p,center:{x:s*.5,y:p*.5}},d={width:t.ref.image.width,height:t.ref.image.height},m={x:n.center.x*d.width,y:n.center.y*d.height},u={x:c.center.x-d.width*n.center.x,y:c.center.y-d.height*n.center.y},f=Math.PI*2+n.rotation%(Math.PI*2),g=n.aspectRatio||d.height/d.width,h=typeof n.scaleToFit>"u"||n.scaleToFit,I=sl(d,cl(c,g),f,h?n.center:{x:.5,y:.5}),E=n.zoom*I;o&&o.length?(t.ref.createMarkup(),t.ref.markup.width=s,t.ref.markup.height=p,t.ref.markup.resize=l,t.ref.markup.dirty=r,t.ref.markup.markup=o,t.ref.markup.crop=Cm(d,n)):t.ref.markup&&t.ref.destroyMarkup();let T=t.ref.image;if(a){T.originX=null,T.originY=null,T.translateX=null,T.translateY=null,T.rotateZ=null,T.scaleX=null,T.scaleY=null;return}T.originX=m.x,T.originY=m.y,T.translateX=u.x,T.translateY=u.y,T.rotateZ=f,T.scaleX=E,T.scaleY=E}}),Vm=e=>e.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:ze,scaleY:ze,translateY:ze,opacity:{type:"tween",duration:400}}},create:({root:t,props:i})=>{t.ref.clip=t.appendChildView(t.createChildView(km(e),{id:i.id,image:i.image,crop:i.crop,markup:i.markup,resize:i.resize,dirty:i.dirty,background:i.background}))},write:({root:t,props:i,shouldOptimize:a})=>{let{clip:n}=t.ref,{image:o,crop:l,markup:r,resize:s,dirty:p}=i;if(n.crop=l,n.markup=r,n.resize=s,n.dirty=p,n.opacity=a?0:1,a||t.rect.element.hidden)return;let c=o.height/o.width,d=l.aspectRatio||c,m=t.rect.inner.width,u=t.rect.inner.height,f=t.query("GET_IMAGE_PREVIEW_HEIGHT"),g=t.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),h=t.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),I=t.query("GET_PANEL_ASPECT_RATIO"),E=t.query("GET_ALLOW_MULTIPLE");I&&!E&&(f=m*I,d=I);let T=f!==null?f:Math.max(g,Math.min(m*d,h)),v=T/d;v>m&&(v=m,T=v*d),T>u&&(T=u,v=u/d),n.width=v,n.height=T}}),Gm=` +var pr=Object.defineProperty;var mr=(e,t)=>{for(var i in t)pr(e,i,{get:t[i],enumerable:!0})};var la={};mr(la,{FileOrigin:()=>Ct,FileStatus:()=>Et,OptionTypes:()=>Ui,Status:()=>ll,create:()=>gt,destroy:()=>ft,find:()=>Hi,getOptions:()=>ji,parse:()=>Wi,registerPlugin:()=>ve,setOptions:()=>Ft,supported:()=>Gi});var ur=e=>e instanceof HTMLElement,gr=(e,t=[],i=[])=>{let a={...e},n=[],l=[],o=()=>({...a}),r=()=>{let g=[...n];return n.length=0,g},s=()=>{let g=[...l];l.length=0,g.forEach(({type:f,data:h})=>{p(f,h)})},p=(g,f,h)=>{if(h&&!document.hidden){l.push({type:g,data:f});return}u[g]&&u[g](f),n.push({type:g,data:f})},c=(g,...f)=>m[g]?m[g](...f):null,d={getState:o,processActionQueue:r,processDispatchQueue:s,dispatch:p,query:c},m={};t.forEach(g=>{m={...g(a),...m}});let u={};return i.forEach(g=>{u={...g(p,c,a),...u}}),d},fr=(e,t,i)=>{if(typeof i=="function"){e[t]=i;return}Object.defineProperty(e,t,{...i})},te=(e,t)=>{for(let i in e)e.hasOwnProperty(i)&&t(i,e[i])},We=e=>{let t={};return te(e,i=>{fr(t,i,e[i])}),t},ce=(e,t,i=null)=>{if(i===null)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,i)},hr="http://www.w3.org/2000/svg",br=["svg","path"],za=e=>br.includes(e),li=(e,t,i={})=>{typeof t=="object"&&(i=t,t=null);let a=za(e)?document.createElementNS(hr,e):document.createElement(e);return t&&(za(e)?ce(a,"class",t):a.className=t),te(i,(n,l)=>{ce(a,n,l)}),a},Er=e=>(t,i)=>{typeof i<"u"&&e.children[i]?e.insertBefore(t,e.children[i]):e.appendChild(t)},Tr=(e,t)=>(i,a)=>(typeof a<"u"?t.splice(a,0,i):t.push(i),i),Ir=(e,t)=>i=>(t.splice(t.indexOf(i),1),i.element.parentNode&&e.removeChild(i.element),i),vr=typeof window<"u"&&typeof window.document<"u",En=()=>vr,xr=En()?li("svg"):{},yr="children"in xr?e=>e.children.length:e=>e.childNodes.length,Tn=(e,t,i,a)=>{let n=i[0]||e.left,l=i[1]||e.top,o=n+e.width,r=l+e.height*(a[1]||1),s={element:{...e},inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:n,top:l,right:o,bottom:r}};return t.filter(p=>!p.isRectIgnored()).map(p=>p.rect).forEach(p=>{Oa(s.inner,{...p.inner}),Oa(s.outer,{...p.outer})}),Fa(s.inner),s.outer.bottom+=s.element.marginBottom,s.outer.right+=s.element.marginRight,Fa(s.outer),s},Oa=(e,t)=>{t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},Fa=e=>{e.width=e.right-e.left,e.height=e.bottom-e.top},$e=e=>typeof e=="number",Rr=(e,t,i,a=.001)=>Math.abs(e-t){let a=null,n=null,l=0,o=!1,p=We({interpolate:(c,d)=>{if(o)return;if(!($e(a)&&$e(n))){o=!0,l=0;return}let m=-(n-a)*e;l+=m/i,n+=l,l*=t,Rr(n,a,l)||d?(n=a,l=0,o=!0,p.onupdate(n),p.oncomplete(n)):p.onupdate(n)},target:{set:c=>{if($e(c)&&!$e(n)&&(n=c),a===null&&(a=c,n=c),a=c,n===a||typeof a>"u"){o=!0,l=0,p.onupdate(n),p.oncomplete(n);return}o=!1},get:()=>a},resting:{get:()=>o},onupdate:c=>{},oncomplete:c=>{}});return p};var _r=e=>e<.5?2*e*e:-1+(4-2*e)*e,wr=({duration:e=500,easing:t=_r,delay:i=0}={})=>{let a=null,n,l,o=!0,r=!1,s=null,c=We({interpolate:(d,m)=>{o||s===null||(a===null&&(a=d),!(d-a=e||m?(n=1,l=r?0:1,c.onupdate(l*s),c.oncomplete(l*s),o=!0):(l=n/e,c.onupdate((n>=0?t(r?1-l:l):0)*s))))},target:{get:()=>r?0:s,set:d=>{if(s===null){s=d,c.onupdate(d),c.oncomplete(d);return}do},onupdate:d=>{},oncomplete:d=>{}});return c},Da={spring:Sr,tween:wr},Lr=(e,t,i)=>{let a=e[t]&&typeof e[t][i]=="object"?e[t][i]:e[t]||e,n=typeof a=="string"?a:a.type,l=typeof a=="object"?{...a}:{};return Da[n]?Da[n](l):null},Yi=(e,t,i,a=!1)=>{t=Array.isArray(t)?t:[t],t.forEach(n=>{e.forEach(l=>{let o=l,r=()=>i[l],s=p=>i[l]=p;typeof l=="object"&&(o=l.key,r=l.getter||r,s=l.setter||s),!(n[o]&&!a)&&(n[o]={get:r,set:s})})})},Mr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a})=>{let n={...t},l=[];return te(e,(o,r)=>{let s=Lr(r);if(!s)return;s.onupdate=c=>{t[o]=c},s.target=n[o],Yi([{key:o,setter:c=>{s.target!==c&&(s.target=c)},getter:()=>t[o]}],[i,a],t,!0),l.push(s)}),{write:o=>{let r=document.hidden,s=!0;return l.forEach(p=>{p.resting||(s=!1),p.interpolate(o,r)}),s},destroy:()=>{}}},Ar=e=>(t,i)=>{e.addEventListener(t,i)},Pr=e=>(t,i)=>{e.removeEventListener(t,i)},zr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,viewState:n,view:l})=>{let o=[],r=Ar(l.element),s=Pr(l.element);return a.on=(p,c)=>{o.push({type:p,fn:c}),r(p,c)},a.off=(p,c)=>{o.splice(o.findIndex(d=>d.type===p&&d.fn===c),1),s(p,c)},{write:()=>!0,destroy:()=>{o.forEach(p=>{s(p.type,p.fn)})}}},Or=({mixinConfig:e,viewProps:t,viewExternalAPI:i})=>{Yi(e,i,t)},ue=e=>e!=null,Fr={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},Dr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,view:n})=>{let l={...t},o={};Yi(e,[i,a],t);let r=()=>[t.translateX||0,t.translateY||0],s=()=>[t.scaleX||0,t.scaleY||0],p=()=>n.rect?Tn(n.rect,n.childViews,r(),s()):null;return i.rect={get:p},a.rect={get:p},e.forEach(c=>{t[c]=typeof l[c]>"u"?Fr[c]:l[c]}),{write:()=>{if(Cr(o,t))return Br(n.element,t),Object.assign(o,{...t}),!0},destroy:()=>{}}},Cr=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!0;for(let i in t)if(t[i]!==e[i])return!0;return!1},Br=(e,{opacity:t,perspective:i,translateX:a,translateY:n,scaleX:l,scaleY:o,rotateX:r,rotateY:s,rotateZ:p,originX:c,originY:d,width:m,height:u})=>{let g="",f="";(ue(c)||ue(d))&&(f+=`transform-origin: ${c||0}px ${d||0}px;`),ue(i)&&(g+=`perspective(${i}px) `),(ue(a)||ue(n))&&(g+=`translate3d(${a||0}px, ${n||0}px, 0) `),(ue(l)||ue(o))&&(g+=`scale3d(${ue(l)?l:1}, ${ue(o)?o:1}, 1) `),ue(p)&&(g+=`rotateZ(${p}rad) `),ue(r)&&(g+=`rotateX(${r}rad) `),ue(s)&&(g+=`rotateY(${s}rad) `),g.length&&(f+=`transform:${g};`),ue(t)&&(f+=`opacity:${t};`,t===0&&(f+="visibility:hidden;"),t<1&&(f+="pointer-events:none;")),ue(u)&&(f+=`height:${u}px;`),ue(m)&&(f+=`width:${m}px;`);let h=e.elementCurrentStyle||"";(f.length!==h.length||f!==h)&&(e.style.cssText=f,e.elementCurrentStyle=f)},Nr={styles:Dr,listeners:zr,animations:Mr,apis:Or},Ca=(e={},t={},i={})=>(t.layoutCalculated||(e.paddingTop=parseInt(i.paddingTop,10)||0,e.marginTop=parseInt(i.marginTop,10)||0,e.marginRight=parseInt(i.marginRight,10)||0,e.marginBottom=parseInt(i.marginBottom,10)||0,e.marginLeft=parseInt(i.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=t.offsetParent===null,e),ne=({tag:e="div",name:t=null,attributes:i={},read:a=()=>{},write:n=()=>{},create:l=()=>{},destroy:o=()=>{},filterFrameActionsForChild:r=(u,g)=>g,didCreateView:s=()=>{},didWriteView:p=()=>{},ignoreRect:c=!1,ignoreRectUpdate:d=!1,mixins:m=[]}={})=>(u,g={})=>{let f=li(e,`filepond--${t}`,i),h=window.getComputedStyle(f,null),I=Ca(),b=null,T=!1,v=[],y=[],E={},_={},x=[n],R=[a],z=[o],P=()=>f,A=()=>v.concat(),B=()=>E,w=k=>(H,Y)=>H(k,Y),O=()=>b||(b=Tn(I,v,[0,0],[1,1]),b),S=()=>h,L=()=>{b=null,v.forEach(Y=>Y._read()),!(d&&I.width&&I.height)&&Ca(I,f,h);let H={root:K,props:g,rect:I};R.forEach(Y=>Y(H))},D=(k,H,Y)=>{let re=H.length===0;return x.forEach(ee=>{ee({props:g,root:K,actions:H,timestamp:k,shouldOptimize:Y})===!1&&(re=!1)}),y.forEach(ee=>{ee.write(k)===!1&&(re=!1)}),v.filter(ee=>!!ee.element.parentNode).forEach(ee=>{ee._write(k,r(ee,H),Y)||(re=!1)}),v.forEach((ee,dt)=>{ee.element.parentNode||(K.appendChild(ee.element,dt),ee._read(),ee._write(k,r(ee,H),Y),re=!1)}),T=re,p({props:g,root:K,actions:H,timestamp:k}),re},F=()=>{y.forEach(k=>k.destroy()),z.forEach(k=>{k({root:K,props:g})}),v.forEach(k=>k._destroy())},G={element:{get:P},style:{get:S},childViews:{get:A}},C={...G,rect:{get:O},ref:{get:B},is:k=>t===k,appendChild:Er(f),createChildView:w(u),linkView:k=>(v.push(k),k),unlinkView:k=>{v.splice(v.indexOf(k),1)},appendChildView:Tr(f,v),removeChildView:Ir(f,v),registerWriter:k=>x.push(k),registerReader:k=>R.push(k),registerDestroyer:k=>z.push(k),invalidateLayout:()=>f.layoutCalculated=!1,dispatch:u.dispatch,query:u.query},q={element:{get:P},childViews:{get:A},rect:{get:O},resting:{get:()=>T},isRectIgnored:()=>c,_read:L,_write:D,_destroy:F},X={...G,rect:{get:()=>I}};Object.keys(m).sort((k,H)=>k==="styles"?1:H==="styles"?-1:0).forEach(k=>{let H=Nr[k]({mixinConfig:m[k],viewProps:g,viewState:_,viewInternalAPI:C,viewExternalAPI:q,view:We(X)});H&&y.push(H)});let K=We(C);l({root:K,props:g});let oe=yr(f);return v.forEach((k,H)=>{K.appendChild(k.element,oe+H)}),s(K),We(q)},kr=(e,t,i=60)=>{let a="__framePainter";if(window[a]){window[a].readers.push(e),window[a].writers.push(t);return}window[a]={readers:[e],writers:[t]};let n=window[a],l=1e3/i,o=null,r=null,s=null,p=null,c=()=>{document.hidden?(s=()=>window.setTimeout(()=>d(performance.now()),l),p=()=>window.clearTimeout(r)):(s=()=>window.requestAnimationFrame(d),p=()=>window.cancelAnimationFrame(r))};document.addEventListener("visibilitychange",()=>{p&&p(),c(),d(performance.now())});let d=m=>{r=s(d),o||(o=m);let u=m-o;u<=l||(o=m-u%l,n.readers.forEach(g=>g()),n.writers.forEach(g=>g(m)))};return c(),d(performance.now()),{pause:()=>{p(r)}}},fe=(e,t)=>({root:i,props:a,actions:n=[],timestamp:l,shouldOptimize:o})=>{n.filter(r=>e[r.type]).forEach(r=>e[r.type]({root:i,props:a,action:r.data,timestamp:l,shouldOptimize:o})),t&&t({root:i,props:a,actions:n,timestamp:l,shouldOptimize:o})},Ba=(e,t)=>t.parentNode.insertBefore(e,t),Na=(e,t)=>t.parentNode.insertBefore(e,t.nextSibling),ci=e=>Array.isArray(e),ke=e=>e==null,Vr=e=>e.trim(),di=e=>""+e,Gr=(e,t=",")=>ke(e)?[]:ci(e)?e:di(e).split(t).map(Vr).filter(i=>i.length),In=e=>typeof e=="boolean",vn=e=>In(e)?e:e==="true",ge=e=>typeof e=="string",xn=e=>$e(e)?e:ge(e)?di(e).replace(/[a-z]+/gi,""):0,ni=e=>parseInt(xn(e),10),ka=e=>parseFloat(xn(e)),bt=e=>$e(e)&&isFinite(e)&&Math.floor(e)===e,Va=(e,t=1e3)=>{if(bt(e))return e;let i=di(e).trim();return/MB$/i.test(i)?(i=i.replace(/MB$i/,"").trim(),ni(i)*t*t):/KB/i.test(i)?(i=i.replace(/KB$i/,"").trim(),ni(i)*t):ni(i)},Xe=e=>typeof e=="function",Ur=e=>{let t=self,i=e.split("."),a=null;for(;a=i.shift();)if(t=t[a],!t)return null;return t},Ga={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},Wr=e=>{let t={};return t.url=ge(e)?e:e.url||"",t.timeout=e.timeout?parseInt(e.timeout,10):0,t.headers=e.headers?e.headers:{},te(Ga,i=>{t[i]=Hr(i,e[i],Ga[i],t.timeout,t.headers)}),t.process=e.process||ge(e)||e.url?t.process:null,t.remove=e.remove||null,delete t.headers,t},Hr=(e,t,i,a,n)=>{if(t===null)return null;if(typeof t=="function")return t;let l={url:i==="GET"||i==="PATCH"?`?${e}=`:"",method:i,headers:n,withCredentials:!1,timeout:a,onload:null,ondata:null,onerror:null};if(ge(t))return l.url=t,l;if(Object.assign(l,t),ge(l.headers)){let o=l.headers.split(/:(.+)/);l.headers={header:o[0],value:o[1]}}return l.withCredentials=vn(l.withCredentials),l},jr=e=>Wr(e),Yr=e=>e===null,de=e=>typeof e=="object"&&e!==null,qr=e=>de(e)&&ge(e.url)&&de(e.process)&&de(e.revert)&&de(e.restore)&&de(e.fetch),Oi=e=>ci(e)?"array":Yr(e)?"null":bt(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":qr(e)?"api":typeof e,$r=e=>e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'),Xr={array:Gr,boolean:vn,int:e=>Oi(e)==="bytes"?Va(e):ni(e),number:ka,float:ka,bytes:Va,string:e=>Xe(e)?e:di(e),function:e=>Ur(e),serverapi:jr,object:e=>{try{return JSON.parse($r(e))}catch{return null}}},Kr=(e,t)=>Xr[t](e),yn=(e,t,i)=>{if(e===t)return e;let a=Oi(e);if(a!==i){let n=Kr(e,i);if(a=Oi(n),n===null)throw`Trying to assign value with incorrect type to "${option}", allowed type: "${i}"`;e=n}return e},Qr=(e,t)=>{let i=e;return{enumerable:!0,get:()=>i,set:a=>{i=yn(a,e,t)}}},Zr=e=>{let t={};return te(e,i=>{let a=e[i];t[i]=Qr(a[0],a[1])}),We(t)},Jr=e=>({items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:Zr(e)}),pi=(e,t="-")=>e.split(/(?=[A-Z])/).map(i=>i.toLowerCase()).join(t),es=(e,t)=>{let i={};return te(t,a=>{i[a]={get:()=>e.getState().options[a],set:n=>{e.dispatch(`SET_${pi(a,"_").toUpperCase()}`,{value:n})}}}),i},ts=e=>(t,i,a)=>{let n={};return te(e,l=>{let o=pi(l,"_").toUpperCase();n[`SET_${o}`]=r=>{try{a.options[l]=r.value}catch{}t(`DID_SET_${o}`,{value:a.options[l]})}}),n},is=e=>t=>{let i={};return te(e,a=>{i[`GET_${pi(a,"_").toUpperCase()}`]=n=>t.options[a]}),i},Re={API:1,DROP:2,BROWSE:3,PASTE:4,NONE:5},qi=()=>Math.random().toString(36).substring(2,11),$i=(e,t)=>e.splice(t,1),as=(e,t)=>{t?e():document.hidden?Promise.resolve(1).then(e):setTimeout(e,0)},mi=()=>{let e=[],t=(a,n)=>{$i(e,e.findIndex(l=>l.event===a&&(l.cb===n||!n)))},i=(a,n,l)=>{e.filter(o=>o.event===a).map(o=>o.cb).forEach(o=>as(()=>o(...n),l))};return{fireSync:(a,...n)=>{i(a,n,!0)},fire:(a,...n)=>{i(a,n,!1)},on:(a,n)=>{e.push({event:a,cb:n})},onOnce:(a,n)=>{e.push({event:a,cb:(...l)=>{t(a,n),n(...l)}})},off:t}},Rn=(e,t,i)=>{Object.getOwnPropertyNames(e).filter(a=>!i.includes(a)).forEach(a=>Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(e,a)))},ns=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],he=e=>{let t={};return Rn(e,t,ns),t},ls=e=>{e.forEach((t,i)=>{t.released&&$i(e,i)})},U={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},se={INPUT:1,LIMBO:2,LOCAL:3},Sn=e=>/[^0-9]+/.exec(e),_n=()=>Sn(1.1.toLocaleString())[0],os=()=>{let e=_n(),t=1e3.toLocaleString();return t!=="1000"?Sn(t)[0]:e==="."?",":"."},M={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},Xi=[],Ae=(e,t,i)=>new Promise((a,n)=>{let l=Xi.filter(r=>r.key===e).map(r=>r.cb);if(l.length===0){a(t);return}let o=l.shift();l.reduce((r,s)=>r.then(p=>s(p,i)),o(t,i)).then(r=>a(r)).catch(r=>n(r))}),tt=(e,t,i)=>Xi.filter(a=>a.key===e).map(a=>a.cb(t,i)),rs=(e,t)=>Xi.push({key:e,cb:t}),ss=e=>Object.assign(pt,e),oi=()=>({...pt}),cs=e=>{te(e,(t,i)=>{pt[t]&&(pt[t][0]=yn(i,pt[t][0],pt[t][1]))})},pt={id:[null,M.STRING],name:["filepond",M.STRING],disabled:[!1,M.BOOLEAN],className:[null,M.STRING],required:[!1,M.BOOLEAN],captureMethod:[null,M.STRING],allowSyncAcceptAttribute:[!0,M.BOOLEAN],allowDrop:[!0,M.BOOLEAN],allowBrowse:[!0,M.BOOLEAN],allowPaste:[!0,M.BOOLEAN],allowMultiple:[!1,M.BOOLEAN],allowReplace:[!0,M.BOOLEAN],allowRevert:[!0,M.BOOLEAN],allowRemove:[!0,M.BOOLEAN],allowProcess:[!0,M.BOOLEAN],allowReorder:[!1,M.BOOLEAN],allowDirectoriesOnly:[!1,M.BOOLEAN],storeAsFile:[!1,M.BOOLEAN],forceRevert:[!1,M.BOOLEAN],maxFiles:[null,M.INT],checkValidity:[!1,M.BOOLEAN],itemInsertLocationFreedom:[!0,M.BOOLEAN],itemInsertLocation:["before",M.STRING],itemInsertInterval:[75,M.INT],dropOnPage:[!1,M.BOOLEAN],dropOnElement:[!0,M.BOOLEAN],dropValidation:[!1,M.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],M.ARRAY],instantUpload:[!0,M.BOOLEAN],maxParallelUploads:[2,M.INT],allowMinimumUploadDuration:[!0,M.BOOLEAN],chunkUploads:[!1,M.BOOLEAN],chunkForce:[!1,M.BOOLEAN],chunkSize:[5e6,M.INT],chunkRetryDelays:[[500,1e3,3e3],M.ARRAY],server:[null,M.SERVER_API],fileSizeBase:[1e3,M.INT],labelFileSizeBytes:["bytes",M.STRING],labelFileSizeKilobytes:["KB",M.STRING],labelFileSizeMegabytes:["MB",M.STRING],labelFileSizeGigabytes:["GB",M.STRING],labelDecimalSeparator:[_n(),M.STRING],labelThousandsSeparator:[os(),M.STRING],labelIdle:['Drag & Drop your files or Browse',M.STRING],labelInvalidField:["Field contains invalid files",M.STRING],labelFileWaitingForSize:["Waiting for size",M.STRING],labelFileSizeNotAvailable:["Size not available",M.STRING],labelFileCountSingular:["file in list",M.STRING],labelFileCountPlural:["files in list",M.STRING],labelFileLoading:["Loading",M.STRING],labelFileAdded:["Added",M.STRING],labelFileLoadError:["Error during load",M.STRING],labelFileRemoved:["Removed",M.STRING],labelFileRemoveError:["Error during remove",M.STRING],labelFileProcessing:["Uploading",M.STRING],labelFileProcessingComplete:["Upload complete",M.STRING],labelFileProcessingAborted:["Upload cancelled",M.STRING],labelFileProcessingError:["Error during upload",M.STRING],labelFileProcessingRevertError:["Error during revert",M.STRING],labelTapToCancel:["tap to cancel",M.STRING],labelTapToRetry:["tap to retry",M.STRING],labelTapToUndo:["tap to undo",M.STRING],labelButtonRemoveItem:["Remove",M.STRING],labelButtonAbortItemLoad:["Abort",M.STRING],labelButtonRetryItemLoad:["Retry",M.STRING],labelButtonAbortItemProcessing:["Cancel",M.STRING],labelButtonUndoItemProcessing:["Undo",M.STRING],labelButtonRetryItemProcessing:["Retry",M.STRING],labelButtonProcessItem:["Upload",M.STRING],iconRemove:['',M.STRING],iconProcess:['',M.STRING],iconRetry:['',M.STRING],iconUndo:['',M.STRING],iconDone:['',M.STRING],oninit:[null,M.FUNCTION],onwarning:[null,M.FUNCTION],onerror:[null,M.FUNCTION],onactivatefile:[null,M.FUNCTION],oninitfile:[null,M.FUNCTION],onaddfilestart:[null,M.FUNCTION],onaddfileprogress:[null,M.FUNCTION],onaddfile:[null,M.FUNCTION],onprocessfilestart:[null,M.FUNCTION],onprocessfileprogress:[null,M.FUNCTION],onprocessfileabort:[null,M.FUNCTION],onprocessfilerevert:[null,M.FUNCTION],onprocessfile:[null,M.FUNCTION],onprocessfiles:[null,M.FUNCTION],onremovefile:[null,M.FUNCTION],onpreparefile:[null,M.FUNCTION],onupdatefiles:[null,M.FUNCTION],onreorderfiles:[null,M.FUNCTION],beforeDropFile:[null,M.FUNCTION],beforeAddFile:[null,M.FUNCTION],beforeRemoveFile:[null,M.FUNCTION],beforePrepareFile:[null,M.FUNCTION],stylePanelLayout:[null,M.STRING],stylePanelAspectRatio:[null,M.STRING],styleItemPanelAspectRatio:[null,M.STRING],styleButtonRemoveItemPosition:["left",M.STRING],styleButtonProcessItemPosition:["right",M.STRING],styleLoadIndicatorPosition:["right",M.STRING],styleProgressIndicatorPosition:["right",M.STRING],styleButtonRemoveItemAlign:[!1,M.BOOLEAN],files:[[],M.ARRAY],credits:[["https://pqina.nl/","Powered by PQINA"],M.ARRAY]},Ke=(e,t)=>ke(t)?e[0]||null:bt(t)?e[t]||null:(typeof t=="object"&&(t=t.id),e.find(i=>i.id===t)||null),wn=e=>{if(ke(e))return e;if(/:/.test(e)){let t=e.split(":");return t[1]/t[0]}return parseFloat(e)},Pe=e=>e.filter(t=>!t.archived),Ln={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},Zt=null,ds=()=>{if(Zt===null)try{let e=new DataTransfer;e.items.add(new File(["hello world"],"This_Works.txt"));let t=document.createElement("input");t.setAttribute("type","file"),t.files=e.files,Zt=t.files.length===1}catch{Zt=!1}return Zt},ps=[U.LOAD_ERROR,U.PROCESSING_ERROR,U.PROCESSING_REVERT_ERROR],ms=[U.LOADING,U.PROCESSING,U.PROCESSING_QUEUED,U.INIT],us=[U.PROCESSING_COMPLETE],gs=e=>ps.includes(e.status),fs=e=>ms.includes(e.status),hs=e=>us.includes(e.status),Ua=e=>de(e.options.server)&&(de(e.options.server.process)||Xe(e.options.server.process)),bs=e=>({GET_STATUS:()=>{let t=Pe(e.items),{EMPTY:i,ERROR:a,BUSY:n,IDLE:l,READY:o}=Ln;return t.length===0?i:t.some(gs)?a:t.some(fs)?n:t.some(hs)?o:l},GET_ITEM:t=>Ke(e.items,t),GET_ACTIVE_ITEM:t=>Ke(Pe(e.items),t),GET_ACTIVE_ITEMS:()=>Pe(e.items),GET_ITEMS:()=>e.items,GET_ITEM_NAME:t=>{let i=Ke(e.items,t);return i?i.filename:null},GET_ITEM_SIZE:t=>{let i=Ke(e.items,t);return i?i.fileSize:null},GET_STYLES:()=>Object.keys(e.options).filter(t=>/^style/.test(t)).map(t=>({name:t,value:e.options[t]})),GET_PANEL_ASPECT_RATIO:()=>/circle/.test(e.options.stylePanelLayout)?1:wn(e.options.stylePanelAspectRatio),GET_ITEM_PANEL_ASPECT_RATIO:()=>e.options.styleItemPanelAspectRatio,GET_ITEMS_BY_STATUS:t=>Pe(e.items).filter(i=>i.status===t),GET_TOTAL_ITEMS:()=>Pe(e.items).length,SHOULD_UPDATE_FILE_INPUT:()=>e.options.storeAsFile&&ds()&&!Ua(e),IS_ASYNC:()=>Ua(e),GET_FILE_SIZE_LABELS:t=>({labelBytes:t("GET_LABEL_FILE_SIZE_BYTES")||void 0,labelKilobytes:t("GET_LABEL_FILE_SIZE_KILOBYTES")||void 0,labelMegabytes:t("GET_LABEL_FILE_SIZE_MEGABYTES")||void 0,labelGigabytes:t("GET_LABEL_FILE_SIZE_GIGABYTES")||void 0})}),Es=e=>{let t=Pe(e.items).length;if(!e.options.allowMultiple)return t===0;let i=e.options.maxFiles;return i===null||tMath.max(Math.min(i,e),t),Ts=(e,t,i)=>e.splice(t,0,i),Is=(e,t,i)=>ke(t)?null:typeof i>"u"?(e.push(t),t):(i=Mn(i,0,e.length),Ts(e,i,t),t),Fi=e=>/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e),Dt=e=>`${e}`.split("/").pop().split("?").shift(),ui=e=>e.split(".").pop(),vs=e=>{if(typeof e!="string")return"";let t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?t==="jpeg"?"jpg":t:""},At=(e,t="")=>(t+e).slice(-t.length),An=(e=new Date)=>`${e.getFullYear()}-${At(e.getMonth()+1,"00")}-${At(e.getDate(),"00")}_${At(e.getHours(),"00")}-${At(e.getMinutes(),"00")}-${At(e.getSeconds(),"00")}`,ht=(e,t,i=null,a=null)=>{let n=typeof i=="string"?e.slice(0,e.size,i):e.slice(0,e.size,e.type);return n.lastModifiedDate=new Date,e._relativePath&&(n._relativePath=e._relativePath),ge(t)||(t=An()),t&&a===null&&ui(t)?n.name=t:(a=a||vs(n.type),n.name=t+(a?"."+a:"")),n},xs=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,Pn=(e,t)=>{let i=xs();if(i){let a=new i;return a.append(e),a.getBlob(t)}return new Blob([e],{type:t})},ys=(e,t)=>{let i=new ArrayBuffer(e.length),a=new Uint8Array(i);for(let n=0;n(/^data:(.+);/.exec(e)||[])[1]||null,Rs=e=>e.split(",")[1].replace(/\s/g,""),Ss=e=>atob(Rs(e)),_s=e=>{let t=zn(e),i=Ss(e);return ys(i,t)},ws=(e,t,i)=>ht(_s(e),t,null,i),Ls=e=>{if(!/^content-disposition:/i.test(e))return null;let t=e.split(/filename=|filename\*=.+''/).splice(1).map(i=>i.trim().replace(/^["']|[;"']{0,2}$/g,"")).filter(i=>i.length);return t.length?decodeURI(t[t.length-1]):null},Ms=e=>{if(/content-length:/i.test(e)){let t=e.match(/[0-9]+/)[0];return t?parseInt(t,10):null}return null},As=e=>/x-content-transfer-id:/i.test(e)&&(e.split(":")[1]||"").trim()||null,Ki=e=>{let t={source:null,name:null,size:null},i=e.split(` +`);for(let a of i){let n=Ls(a);if(n){t.name=n;continue}let l=Ms(a);if(l){t.size=l;continue}let o=As(a);if(o){t.source=o;continue}}return t},Ps=e=>{let t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},i=()=>t.progress,a=()=>{t.request&&t.request.abort&&t.request.abort()},n=()=>{let r=t.source;o.fire("init",r),r instanceof File?o.fire("load",r):r instanceof Blob?o.fire("load",ht(r,r.name)):Fi(r)?o.fire("load",ws(r)):l(r)},l=r=>{if(!e){o.fire("error",{type:"error",body:"Can't load URL",code:400});return}t.timestamp=Date.now(),t.request=e(r,s=>{t.duration=Date.now()-t.timestamp,t.complete=!0,s instanceof Blob&&(s=ht(s,s.name||Dt(r))),o.fire("load",s instanceof Blob?s:s?s.body:null)},s=>{o.fire("error",typeof s=="string"?{type:"error",code:0,body:s}:s)},(s,p,c)=>{if(c&&(t.size=c),t.duration=Date.now()-t.timestamp,!s){t.progress=null;return}t.progress=p/c,o.fire("progress",t.progress)},()=>{o.fire("abort")},s=>{let p=Ki(typeof s=="string"?s:s.headers);o.fire("meta",{size:t.size||p.size,filename:p.name,source:p.source})})},o={...mi(),setSource:r=>t.source=r,getProgress:i,abort:a,load:n};return o},Wa=e=>/GET|HEAD/.test(e),Qe=(e,t,i)=>{let a={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{n=!0,o.abort()}},n=!1,l=!1;i={method:"POST",headers:{},withCredentials:!1,...i},t=encodeURI(t),Wa(i.method)&&e&&(t=`${t}${encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))}`);let o=new XMLHttpRequest,r=Wa(i.method)?o:o.upload;return r.onprogress=s=>{n||a.onprogress(s.lengthComputable,s.loaded,s.total)},o.onreadystatechange=()=>{o.readyState<2||o.readyState===4&&o.status===0||l||(l=!0,a.onheaders(o))},o.onload=()=>{o.status>=200&&o.status<300?a.onload(o):a.onerror(o)},o.onerror=()=>a.onerror(o),o.onabort=()=>{n=!0,a.onabort()},o.ontimeout=()=>a.ontimeout(o),o.open(i.method,t,!0),bt(i.timeout)&&(o.timeout=i.timeout),Object.keys(i.headers).forEach(s=>{let p=unescape(encodeURIComponent(i.headers[s]));o.setRequestHeader(s,p)}),i.responseType&&(o.responseType=i.responseType),i.withCredentials&&(o.withCredentials=!0),o.send(e),a},ie=(e,t,i,a)=>({type:e,code:t,body:i,headers:a}),Ze=e=>t=>{e(ie("error",0,"Timeout",t.getAllResponseHeaders()))},Ha=e=>/\?/.test(e),Ot=(...e)=>{let t="";return e.forEach(i=>{t+=Ha(t)&&Ha(i)?i.replace(/\?/,"&"):i}),t},wi=(e="",t)=>{if(typeof t=="function")return t;if(!t||!ge(t.url))return null;let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,l,o,r,s,p)=>{let c=Qe(n,Ot(e,t.url),{...t,responseType:"blob"});return c.onload=d=>{let m=d.getAllResponseHeaders(),u=Ki(m).name||Dt(n);l(ie("load",d.status,t.method==="HEAD"?null:ht(i(d.response),u),m))},c.onerror=d=>{o(ie("error",d.status,a(d.response)||d.statusText,d.getAllResponseHeaders()))},c.onheaders=d=>{p(ie("headers",d.status,null,d.getAllResponseHeaders()))},c.ontimeout=Ze(o),c.onprogress=r,c.onabort=s,c}},xe={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},zs=(e,t,i,a,n,l,o,r,s,p,c)=>{let d=[],{chunkTransferId:m,chunkServer:u,chunkSize:g,chunkRetryDelays:f}=c,h={serverId:m,aborted:!1},I=t.ondata||(w=>w),b=t.onload||((w,O)=>O==="HEAD"?w.getResponseHeader("Upload-Offset"):w.response),T=t.onerror||(w=>null),v=w=>{let O=new FormData;de(n)&&O.append(i,JSON.stringify(n));let S=typeof t.headers=="function"?t.headers(a,n):{...t.headers,"Upload-Length":a.size},L={...t,headers:S},D=Qe(I(O),Ot(e,t.url),L);D.onload=F=>w(b(F,L.method)),D.onerror=F=>o(ie("error",F.status,T(F.response)||F.statusText,F.getAllResponseHeaders())),D.ontimeout=Ze(o)},y=w=>{let O=Ot(e,u.url,h.serverId),L={headers:typeof t.headers=="function"?t.headers(h.serverId):{...t.headers},method:"HEAD"},D=Qe(null,O,L);D.onload=F=>w(b(F,L.method)),D.onerror=F=>o(ie("error",F.status,T(F.response)||F.statusText,F.getAllResponseHeaders())),D.ontimeout=Ze(o)},E=Math.floor(a.size/g);for(let w=0;w<=E;w++){let O=w*g,S=a.slice(O,O+g,"application/offset+octet-stream");d[w]={index:w,size:S.size,offset:O,data:S,file:a,progress:0,retries:[...f],status:xe.QUEUED,error:null,request:null,timeout:null}}let _=()=>l(h.serverId),x=w=>w.status===xe.QUEUED||w.status===xe.ERROR,R=w=>{if(h.aborted)return;if(w=w||d.find(x),!w){d.every(C=>C.status===xe.COMPLETE)&&_();return}w.status=xe.PROCESSING,w.progress=null;let O=u.ondata||(C=>C),S=u.onerror||(C=>null),L=u.onload||(()=>{}),D=Ot(e,u.url,h.serverId),F=typeof u.headers=="function"?u.headers(w):{...u.headers,"Content-Type":"application/offset+octet-stream","Upload-Offset":w.offset,"Upload-Length":a.size,"Upload-Name":a.name},G=w.request=Qe(O(w.data),D,{...u,headers:F});G.onload=C=>{L(C,w.index,d.length),w.status=xe.COMPLETE,w.request=null,A()},G.onprogress=(C,q,X)=>{w.progress=C?q:null,P()},G.onerror=C=>{w.status=xe.ERROR,w.request=null,w.error=S(C.response)||C.statusText,z(w)||o(ie("error",C.status,S(C.response)||C.statusText,C.getAllResponseHeaders()))},G.ontimeout=C=>{w.status=xe.ERROR,w.request=null,z(w)||Ze(o)(C)},G.onabort=()=>{w.status=xe.QUEUED,w.request=null,s()}},z=w=>w.retries.length===0?!1:(w.status=xe.WAITING,clearTimeout(w.timeout),w.timeout=setTimeout(()=>{R(w)},w.retries.shift()),!0),P=()=>{let w=d.reduce((S,L)=>S===null||L.progress===null?null:S+L.progress,0);if(w===null)return r(!1,0,0);let O=d.reduce((S,L)=>S+L.size,0);r(!0,w,O)},A=()=>{d.filter(O=>O.status===xe.PROCESSING).length>=1||R()},B=()=>{d.forEach(w=>{clearTimeout(w.timeout),w.request&&w.request.abort()})};return h.serverId?y(w=>{h.aborted||(d.filter(O=>O.offset{O.status=xe.COMPLETE,O.progress=O.size}),A())}):v(w=>{h.aborted||(p(w),h.serverId=w,A())}),{abort:()=>{h.aborted=!0,B()}}},Os=(e,t,i,a)=>(n,l,o,r,s,p,c)=>{if(!n)return;let d=a.chunkUploads,m=d&&n.size>a.chunkSize,u=d&&(m||a.chunkForce);if(n instanceof Blob&&u)return zs(e,t,i,n,l,o,r,s,p,c,a);let g=t.ondata||(y=>y),f=t.onload||(y=>y),h=t.onerror||(y=>null),I=typeof t.headers=="function"?t.headers(n,l)||{}:{...t.headers},b={...t,headers:I};var T=new FormData;de(l)&&T.append(i,JSON.stringify(l)),(n instanceof Blob?[{name:null,file:n}]:n).forEach(y=>{T.append(i,y.file,y.name===null?y.file.name:`${y.name}${y.file.name}`)});let v=Qe(g(T),Ot(e,t.url),b);return v.onload=y=>{o(ie("load",y.status,f(y.response),y.getAllResponseHeaders()))},v.onerror=y=>{r(ie("error",y.status,h(y.response)||y.statusText,y.getAllResponseHeaders()))},v.ontimeout=Ze(r),v.onprogress=s,v.onabort=p,v},Fs=(e="",t,i,a)=>typeof t=="function"?(...n)=>t(i,...n,a):!t||!ge(t.url)?null:Os(e,t,i,a),Pt=(e="",t)=>{if(typeof t=="function")return t;if(!t||!ge(t.url))return(n,l)=>l();let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,l,o)=>{let r=Qe(n,e+t.url,t);return r.onload=s=>{l(ie("load",s.status,i(s.response),s.getAllResponseHeaders()))},r.onerror=s=>{o(ie("error",s.status,a(s.response)||s.statusText,s.getAllResponseHeaders()))},r.ontimeout=Ze(o),r}},On=(e=0,t=1)=>e+Math.random()*(t-e),Ds=(e,t=1e3,i=0,a=25,n=250)=>{let l=null,o=Date.now(),r=()=>{let s=Date.now()-o,p=On(a,n);s+p>t&&(p=s+p-t);let c=s/t;if(c>=1||document.hidden){e(1);return}e(c),l=setTimeout(r,p)};return t>0&&r(),{clear:()=>{clearTimeout(l)}}},Cs=(e,t)=>{let i={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},{allowMinimumUploadDuration:a}=t,n=(c,d)=>{let m=()=>{i.duration===0||i.progress===null||p.fire("progress",p.getProgress())},u=()=>{i.complete=!0,p.fire("load-perceived",i.response.body)};p.fire("start"),i.timestamp=Date.now(),i.perceivedPerformanceUpdater=Ds(g=>{i.perceivedProgress=g,i.perceivedDuration=Date.now()-i.timestamp,m(),i.response&&i.perceivedProgress===1&&!i.complete&&u()},a?On(750,1500):0),i.request=e(c,d,g=>{i.response=de(g)?g:{type:"load",code:200,body:`${g}`,headers:{}},i.duration=Date.now()-i.timestamp,i.progress=1,p.fire("load",i.response.body),(!a||a&&i.perceivedProgress===1)&&u()},g=>{i.perceivedPerformanceUpdater.clear(),p.fire("error",de(g)?g:{type:"error",code:0,body:`${g}`})},(g,f,h)=>{i.duration=Date.now()-i.timestamp,i.progress=g?f/h:null,m()},()=>{i.perceivedPerformanceUpdater.clear(),p.fire("abort",i.response?i.response.body:null)},g=>{p.fire("transfer",g)})},l=()=>{i.request&&(i.perceivedPerformanceUpdater.clear(),i.request.abort&&i.request.abort(),i.complete=!0)},o=()=>{l(),i.complete=!1,i.perceivedProgress=0,i.progress=0,i.timestamp=null,i.perceivedDuration=0,i.duration=0,i.request=null,i.response=null},r=a?()=>i.progress?Math.min(i.progress,i.perceivedProgress):null:()=>i.progress||null,s=a?()=>Math.min(i.duration,i.perceivedDuration):()=>i.duration,p={...mi(),process:n,abort:l,getProgress:r,getDuration:s,reset:o};return p},Fn=e=>e.substring(0,e.lastIndexOf("."))||e,Bs=e=>{let t=[e.name,e.size,e.type];return e instanceof Blob||Fi(e)?t[0]=e.name||An():Fi(e)?(t[1]=e.length,t[2]=zn(e)):ge(e)&&(t[0]=Dt(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},Je=e=>!!(e instanceof File||e instanceof Blob&&e.name),Dn=e=>{if(!de(e))return e;let t=ci(e)?[]:{};for(let i in e){if(!e.hasOwnProperty(i))continue;let a=e[i];t[i]=a&&de(a)?Dn(a):a}return t},Ns=(e=null,t=null,i=null)=>{let a=qi(),n={archived:!1,frozen:!1,released:!1,source:null,file:i,serverFileReference:t,transferId:null,processingAborted:!1,status:t?U.PROCESSING_COMPLETE:U.INIT,activeLoader:null,activeProcessor:null},l=null,o={},r=x=>n.status=x,s=(x,...R)=>{n.released||n.frozen||E.fire(x,...R)},p=()=>ui(n.file.name),c=()=>n.file.type,d=()=>n.file.size,m=()=>n.file,u=(x,R,z)=>{if(n.source=x,E.fireSync("init"),n.file){E.fireSync("load-skip");return}n.file=Bs(x),R.on("init",()=>{s("load-init")}),R.on("meta",P=>{n.file.size=P.size,n.file.filename=P.filename,P.source&&(e=se.LIMBO,n.serverFileReference=P.source,n.status=U.PROCESSING_COMPLETE),s("load-meta")}),R.on("progress",P=>{r(U.LOADING),s("load-progress",P)}),R.on("error",P=>{r(U.LOAD_ERROR),s("load-request-error",P)}),R.on("abort",()=>{r(U.INIT),s("load-abort")}),R.on("load",P=>{n.activeLoader=null;let A=w=>{n.file=Je(w)?w:n.file,e===se.LIMBO&&n.serverFileReference?r(U.PROCESSING_COMPLETE):r(U.IDLE),s("load")},B=w=>{n.file=P,s("load-meta"),r(U.LOAD_ERROR),s("load-file-error",w)};if(n.serverFileReference){A(P);return}z(P,A,B)}),R.setSource(x),n.activeLoader=R,R.load()},g=()=>{n.activeLoader&&n.activeLoader.load()},f=()=>{if(n.activeLoader){n.activeLoader.abort();return}r(U.INIT),s("load-abort")},h=(x,R)=>{if(n.processingAborted){n.processingAborted=!1;return}if(r(U.PROCESSING),l=null,!(n.file instanceof Blob)){E.on("load",()=>{h(x,R)});return}x.on("load",A=>{n.transferId=null,n.serverFileReference=A}),x.on("transfer",A=>{n.transferId=A}),x.on("load-perceived",A=>{n.activeProcessor=null,n.transferId=null,n.serverFileReference=A,r(U.PROCESSING_COMPLETE),s("process-complete",A)}),x.on("start",()=>{s("process-start")}),x.on("error",A=>{n.activeProcessor=null,r(U.PROCESSING_ERROR),s("process-error",A)}),x.on("abort",A=>{n.activeProcessor=null,n.serverFileReference=A,r(U.IDLE),s("process-abort"),l&&l()}),x.on("progress",A=>{s("process-progress",A)});let z=A=>{n.archived||x.process(A,{...o})},P=console.error;R(n.file,z,P),n.activeProcessor=x},I=()=>{n.processingAborted=!1,r(U.PROCESSING_QUEUED)},b=()=>new Promise(x=>{if(!n.activeProcessor){n.processingAborted=!0,r(U.IDLE),s("process-abort"),x();return}l=()=>{x()},n.activeProcessor.abort()}),T=(x,R)=>new Promise((z,P)=>{let A=n.serverFileReference!==null?n.serverFileReference:n.transferId;if(A===null){z();return}x(A,()=>{n.serverFileReference=null,n.transferId=null,z()},B=>{if(!R){z();return}r(U.PROCESSING_REVERT_ERROR),s("process-revert-error"),P(B)}),r(U.IDLE),s("process-revert")}),v=(x,R,z)=>{let P=x.split("."),A=P[0],B=P.pop(),w=o;P.forEach(O=>w=w[O]),JSON.stringify(w[B])!==JSON.stringify(R)&&(w[B]=R,s("metadata-update",{key:A,value:o[A],silent:z}))},E={id:{get:()=>a},origin:{get:()=>e,set:x=>e=x},serverId:{get:()=>n.serverFileReference},transferId:{get:()=>n.transferId},status:{get:()=>n.status},filename:{get:()=>n.file.name},filenameWithoutExtension:{get:()=>Fn(n.file.name)},fileExtension:{get:p},fileType:{get:c},fileSize:{get:d},file:{get:m},relativePath:{get:()=>n.file._relativePath},source:{get:()=>n.source},getMetadata:x=>Dn(x?o[x]:o),setMetadata:(x,R,z)=>{if(de(x)){let P=x;return Object.keys(P).forEach(A=>{v(A,P[A],R)}),x}return v(x,R,z),R},extend:(x,R)=>_[x]=R,abortLoad:f,retryLoad:g,requestProcessing:I,abortProcessing:b,load:u,process:h,revert:T,...mi(),freeze:()=>n.frozen=!0,release:()=>n.released=!0,released:{get:()=>n.released},archive:()=>n.archived=!0,archived:{get:()=>n.archived},setFile:x=>n.file=x},_=We(E);return _},ks=(e,t)=>ke(t)?0:ge(t)?e.findIndex(i=>i.id===t):-1,ja=(e,t)=>{let i=ks(e,t);if(!(i<0))return e[i]||null},Ya=(e,t,i,a,n,l)=>{let o=Qe(null,e,{method:"GET",responseType:"blob"});return o.onload=r=>{let s=r.getAllResponseHeaders(),p=Ki(s).name||Dt(e);t(ie("load",r.status,ht(r.response,p),s))},o.onerror=r=>{i(ie("error",r.status,r.statusText,r.getAllResponseHeaders()))},o.onheaders=r=>{l(ie("headers",r.status,null,r.getAllResponseHeaders()))},o.ontimeout=Ze(i),o.onprogress=a,o.onabort=n,o},qa=e=>(e.indexOf("//")===0&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]),Vs=e=>(e.indexOf(":")>-1||e.indexOf("//")>-1)&&qa(location.href)!==qa(e),Jt=e=>(...t)=>Xe(e)?e(...t):e,Gs=e=>!Je(e.file),Li=(e,t)=>{clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout(()=>{e("DID_UPDATE_ITEMS",{items:Pe(t.items)})},0)},$a=(e,...t)=>new Promise(i=>{if(!e)return i(!0);let a=e(...t);if(a==null)return i(!0);if(typeof a=="boolean")return i(a);typeof a.then=="function"&&a.then(i)}),Mi=(e,t)=>{e.items.sort((i,a)=>t(he(i),he(a)))},ye=(e,t)=>({query:i,success:a=()=>{},failure:n=()=>{},...l}={})=>{let o=Ke(e.items,i);if(!o){n({error:ie("error",0,"Item not found"),file:null});return}t(o,a,n,l||{})},Us=(e,t,i)=>({ABORT_ALL:()=>{Pe(i.items).forEach(a=>{a.freeze(),a.abortLoad(),a.abortProcessing()})},DID_SET_FILES:({value:a=[]})=>{let n=a.map(o=>({source:o.source?o.source:o,options:o.options})),l=Pe(i.items);l.forEach(o=>{n.find(r=>r.source===o.source||r.source===o.file)||e("REMOVE_ITEM",{query:o,remove:!1})}),l=Pe(i.items),n.forEach((o,r)=>{l.find(s=>s.source===o.source||s.file===o.source)||e("ADD_ITEM",{...o,interactionMethod:Re.NONE,index:r})})},DID_UPDATE_ITEM_METADATA:({id:a,action:n,change:l})=>{l.silent||(clearTimeout(i.itemUpdateTimeout),i.itemUpdateTimeout=setTimeout(()=>{let o=ja(i.items,a);if(!t("IS_ASYNC")){Ae("SHOULD_PREPARE_OUTPUT",!1,{item:o,query:t,action:n,change:l}).then(c=>{let d=t("GET_BEFORE_PREPARE_FILE");d&&(c=d(o,c)),c&&e("REQUEST_PREPARE_OUTPUT",{query:a,item:o,success:m=>{e("DID_PREPARE_OUTPUT",{id:a,file:m})}},!0)});return}o.origin===se.LOCAL&&e("DID_LOAD_ITEM",{id:o.id,error:null,serverFileReference:o.source});let r=()=>{setTimeout(()=>{e("REQUEST_ITEM_PROCESSING",{query:a})},32)},s=c=>{o.revert(Pt(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(c?r:()=>{}).catch(()=>{})},p=c=>{o.abortProcessing().then(c?r:()=>{})};if(o.status===U.PROCESSING_COMPLETE)return s(i.options.instantUpload);if(o.status===U.PROCESSING)return p(i.options.instantUpload);i.options.instantUpload&&r()},0))},MOVE_ITEM:({query:a,index:n})=>{let l=Ke(i.items,a);if(!l)return;let o=i.items.indexOf(l);n=Mn(n,0,i.items.length-1),o!==n&&i.items.splice(n,0,i.items.splice(o,1)[0])},SORT:({compare:a})=>{Mi(i,a),e("DID_SORT_ITEMS",{items:t("GET_ACTIVE_ITEMS")})},ADD_ITEMS:({items:a,index:n,interactionMethod:l,success:o=()=>{},failure:r=()=>{}})=>{let s=n;if(n===-1||typeof n>"u"){let u=t("GET_ITEM_INSERT_LOCATION"),g=t("GET_TOTAL_ITEMS");s=u==="before"?0:g}let p=t("GET_IGNORED_FILES"),c=u=>Je(u)?!p.includes(u.name.toLowerCase()):!ke(u),m=a.filter(c).map(u=>new Promise((g,f)=>{e("ADD_ITEM",{interactionMethod:l,source:u.source||u,success:g,failure:f,index:s++,options:u.options||{}})}));Promise.all(m).then(o).catch(r)},ADD_ITEM:({source:a,index:n=-1,interactionMethod:l,success:o=()=>{},failure:r=()=>{},options:s={}})=>{if(ke(a)){r({error:ie("error",0,"No source"),file:null});return}if(Je(a)&&i.options.ignoredFiles.includes(a.name.toLowerCase()))return;if(!Es(i)){if(i.options.allowMultiple||!i.options.allowMultiple&&!i.options.allowReplace){let b=ie("warning",0,"Max files");e("DID_THROW_MAX_FILES",{source:a,error:b}),r({error:b,file:null});return}let I=Pe(i.items)[0];if(I.status===U.PROCESSING_COMPLETE||I.status===U.PROCESSING_REVERT_ERROR){let b=t("GET_FORCE_REVERT");if(I.revert(Pt(i.options.server.url,i.options.server.revert),b).then(()=>{b&&e("ADD_ITEM",{source:a,index:n,interactionMethod:l,success:o,failure:r,options:s})}).catch(()=>{}),b)return}e("REMOVE_ITEM",{query:I.id})}let p=s.type==="local"?se.LOCAL:s.type==="limbo"?se.LIMBO:se.INPUT,c=Ns(p,p===se.INPUT?null:a,s.file);Object.keys(s.metadata||{}).forEach(I=>{c.setMetadata(I,s.metadata[I])}),tt("DID_CREATE_ITEM",c,{query:t,dispatch:e});let d=t("GET_ITEM_INSERT_LOCATION");i.options.itemInsertLocationFreedom||(n=d==="before"?-1:i.items.length),Is(i.items,c,n),Xe(d)&&a&&Mi(i,d);let m=c.id;c.on("init",()=>{e("DID_INIT_ITEM",{id:m})}),c.on("load-init",()=>{e("DID_START_ITEM_LOAD",{id:m})}),c.on("load-meta",()=>{e("DID_UPDATE_ITEM_META",{id:m})}),c.on("load-progress",I=>{e("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:m,progress:I})}),c.on("load-request-error",I=>{let b=Jt(i.options.labelFileLoadError)(I);if(I.code>=400&&I.code<500){e("DID_THROW_ITEM_INVALID",{id:m,error:I,status:{main:b,sub:`${I.code} (${I.body})`}}),r({error:I,file:he(c)});return}e("DID_THROW_ITEM_LOAD_ERROR",{id:m,error:I,status:{main:b,sub:i.options.labelTapToRetry}})}),c.on("load-file-error",I=>{e("DID_THROW_ITEM_INVALID",{id:m,error:I.status,status:I.status}),r({error:I.status,file:he(c)})}),c.on("load-abort",()=>{e("REMOVE_ITEM",{query:m})}),c.on("load-skip",()=>{c.on("metadata-update",I=>{Je(c.file)&&e("DID_UPDATE_ITEM_METADATA",{id:m,change:I})}),e("COMPLETE_LOAD_ITEM",{query:m,item:c,data:{source:a,success:o}})}),c.on("load",()=>{let I=b=>{if(!b){e("REMOVE_ITEM",{query:m});return}c.on("metadata-update",T=>{e("DID_UPDATE_ITEM_METADATA",{id:m,change:T})}),Ae("SHOULD_PREPARE_OUTPUT",!1,{item:c,query:t}).then(T=>{let v=t("GET_BEFORE_PREPARE_FILE");v&&(T=v(c,T));let y=()=>{e("COMPLETE_LOAD_ITEM",{query:m,item:c,data:{source:a,success:o}}),Li(e,i)};if(T){e("REQUEST_PREPARE_OUTPUT",{query:m,item:c,success:E=>{e("DID_PREPARE_OUTPUT",{id:m,file:E}),y()}},!0);return}y()})};Ae("DID_LOAD_ITEM",c,{query:t,dispatch:e}).then(()=>{$a(t("GET_BEFORE_ADD_FILE"),he(c)).then(I)}).catch(b=>{if(!b||!b.error||!b.status)return I(!1);e("DID_THROW_ITEM_INVALID",{id:m,error:b.error,status:b.status})})}),c.on("process-start",()=>{e("DID_START_ITEM_PROCESSING",{id:m})}),c.on("process-progress",I=>{e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:m,progress:I})}),c.on("process-error",I=>{e("DID_THROW_ITEM_PROCESSING_ERROR",{id:m,error:I,status:{main:Jt(i.options.labelFileProcessingError)(I),sub:i.options.labelTapToRetry}})}),c.on("process-revert-error",I=>{e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:m,error:I,status:{main:Jt(i.options.labelFileProcessingRevertError)(I),sub:i.options.labelTapToRetry}})}),c.on("process-complete",I=>{e("DID_COMPLETE_ITEM_PROCESSING",{id:m,error:null,serverFileReference:I}),e("DID_DEFINE_VALUE",{id:m,value:I})}),c.on("process-abort",()=>{e("DID_ABORT_ITEM_PROCESSING",{id:m})}),c.on("process-revert",()=>{e("DID_REVERT_ITEM_PROCESSING",{id:m}),e("DID_DEFINE_VALUE",{id:m,value:null})}),e("DID_ADD_ITEM",{id:m,index:n,interactionMethod:l}),Li(e,i);let{url:u,load:g,restore:f,fetch:h}=i.options.server||{};c.load(a,Ps(p===se.INPUT?ge(a)&&Vs(a)&&h?wi(u,h):Ya:p===se.LIMBO?wi(u,f):wi(u,g)),(I,b,T)=>{Ae("LOAD_FILE",I,{query:t}).then(b).catch(T)})},REQUEST_PREPARE_OUTPUT:({item:a,success:n,failure:l=()=>{}})=>{let o={error:ie("error",0,"Item not found"),file:null};if(a.archived)return l(o);Ae("PREPARE_OUTPUT",a.file,{query:t,item:a}).then(r=>{Ae("COMPLETE_PREPARE_OUTPUT",r,{query:t,item:a}).then(s=>{if(a.archived)return l(o);n(s)})})},COMPLETE_LOAD_ITEM:({item:a,data:n})=>{let{success:l,source:o}=n,r=t("GET_ITEM_INSERT_LOCATION");if(Xe(r)&&o&&Mi(i,r),e("DID_LOAD_ITEM",{id:a.id,error:null,serverFileReference:a.origin===se.INPUT?null:o}),l(he(a)),a.origin===se.LOCAL){e("DID_LOAD_LOCAL_ITEM",{id:a.id});return}if(a.origin===se.LIMBO){e("DID_COMPLETE_ITEM_PROCESSING",{id:a.id,error:null,serverFileReference:o}),e("DID_DEFINE_VALUE",{id:a.id,value:a.serverId||o});return}t("IS_ASYNC")&&i.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:a.id})},RETRY_ITEM_LOAD:ye(i,a=>{a.retryLoad()}),REQUEST_ITEM_PREPARE:ye(i,(a,n,l)=>{e("REQUEST_PREPARE_OUTPUT",{query:a.id,item:a,success:o=>{e("DID_PREPARE_OUTPUT",{id:a.id,file:o}),n({file:a,output:o})},failure:l},!0)}),REQUEST_ITEM_PROCESSING:ye(i,(a,n,l)=>{if(!(a.status===U.IDLE||a.status===U.PROCESSING_ERROR)){let r=()=>e("REQUEST_ITEM_PROCESSING",{query:a,success:n,failure:l}),s=()=>document.hidden?r():setTimeout(r,32);a.status===U.PROCESSING_COMPLETE||a.status===U.PROCESSING_REVERT_ERROR?a.revert(Pt(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(s).catch(()=>{}):a.status===U.PROCESSING&&a.abortProcessing().then(s);return}a.status!==U.PROCESSING_QUEUED&&(a.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:a.id}),e("PROCESS_ITEM",{query:a,success:n,failure:l},!0))}),PROCESS_ITEM:ye(i,(a,n,l)=>{let o=t("GET_MAX_PARALLEL_UPLOADS");if(t("GET_ITEMS_BY_STATUS",U.PROCESSING).length===o){i.processingQueue.push({id:a.id,success:n,failure:l});return}if(a.status===U.PROCESSING)return;let s=()=>{let c=i.processingQueue.shift();if(!c)return;let{id:d,success:m,failure:u}=c,g=Ke(i.items,d);if(!g||g.archived){s();return}e("PROCESS_ITEM",{query:d,success:m,failure:u},!0)};a.onOnce("process-complete",()=>{n(he(a)),s();let c=i.options.server;if(i.options.instantUpload&&a.origin===se.LOCAL&&Xe(c.remove)){let u=()=>{};a.origin=se.LIMBO,i.options.server.remove(a.source,u,u)}t("GET_ITEMS_BY_STATUS",U.PROCESSING_COMPLETE).length===i.items.length&&e("DID_COMPLETE_ITEM_PROCESSING_ALL")}),a.onOnce("process-error",c=>{l({error:c,file:he(a)}),s()});let p=i.options;a.process(Cs(Fs(p.server.url,p.server.process,p.name,{chunkTransferId:a.transferId,chunkServer:p.server.patch,chunkUploads:p.chunkUploads,chunkForce:p.chunkForce,chunkSize:p.chunkSize,chunkRetryDelays:p.chunkRetryDelays}),{allowMinimumUploadDuration:t("GET_ALLOW_MINIMUM_UPLOAD_DURATION")}),(c,d,m)=>{Ae("PREPARE_OUTPUT",c,{query:t,item:a}).then(u=>{e("DID_PREPARE_OUTPUT",{id:a.id,file:u}),d(u)}).catch(m)})}),RETRY_ITEM_PROCESSING:ye(i,a=>{e("REQUEST_ITEM_PROCESSING",{query:a})}),REQUEST_REMOVE_ITEM:ye(i,a=>{$a(t("GET_BEFORE_REMOVE_FILE"),he(a)).then(n=>{n&&e("REMOVE_ITEM",{query:a})})}),RELEASE_ITEM:ye(i,a=>{a.release()}),REMOVE_ITEM:ye(i,(a,n,l,o)=>{let r=()=>{let p=a.id;ja(i.items,p).archive(),e("DID_REMOVE_ITEM",{error:null,id:p,item:a}),Li(e,i),n(he(a))},s=i.options.server;a.origin===se.LOCAL&&s&&Xe(s.remove)&&o.remove!==!1?(e("DID_START_ITEM_REMOVE",{id:a.id}),s.remove(a.source,()=>r(),p=>{e("DID_THROW_ITEM_REMOVE_ERROR",{id:a.id,error:ie("error",0,p,null),status:{main:Jt(i.options.labelFileRemoveError)(p),sub:i.options.labelTapToRetry}})})):((o.revert&&a.origin!==se.LOCAL&&a.serverId!==null||i.options.chunkUploads&&a.file.size>i.options.chunkSize||i.options.chunkUploads&&i.options.chunkForce)&&a.revert(Pt(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")),r())}),ABORT_ITEM_LOAD:ye(i,a=>{a.abortLoad()}),ABORT_ITEM_PROCESSING:ye(i,a=>{if(a.serverId){e("REVERT_ITEM_PROCESSING",{id:a.id});return}a.abortProcessing().then(()=>{i.options.instantUpload&&e("REMOVE_ITEM",{query:a.id})})}),REQUEST_REVERT_ITEM_PROCESSING:ye(i,a=>{if(!i.options.instantUpload){e("REVERT_ITEM_PROCESSING",{query:a});return}let n=r=>{r&&e("REVERT_ITEM_PROCESSING",{query:a})},l=t("GET_BEFORE_REMOVE_FILE");if(!l)return n(!0);let o=l(he(a));if(o==null)return n(!0);if(typeof o=="boolean")return n(o);typeof o.then=="function"&&o.then(n)}),REVERT_ITEM_PROCESSING:ye(i,a=>{a.revert(Pt(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(()=>{(i.options.instantUpload||Gs(a))&&e("REMOVE_ITEM",{query:a.id})}).catch(()=>{})}),SET_OPTIONS:({options:a})=>{let n=Object.keys(a),l=Ws.filter(r=>n.includes(r));[...l,...Object.keys(a).filter(r=>!l.includes(r))].forEach(r=>{e(`SET_${pi(r,"_").toUpperCase()}`,{value:a[r]})})}}),Ws=["server"],Qi=e=>e,Ve=e=>document.createElement(e),ae=(e,t)=>{let i=e.childNodes[0];i?t!==i.nodeValue&&(i.nodeValue=t):(i=document.createTextNode(t),e.appendChild(i))},Xa=(e,t,i,a)=>{let n=(a%360-90)*Math.PI/180;return{x:e+i*Math.cos(n),y:t+i*Math.sin(n)}},Hs=(e,t,i,a,n,l)=>{let o=Xa(e,t,i,n),r=Xa(e,t,i,a);return["M",o.x,o.y,"A",i,i,0,l,0,r.x,r.y].join(" ")},js=(e,t,i,a,n)=>{let l=1;return n>a&&n-a<=.5&&(l=0),a>n&&a-n>=.5&&(l=0),Hs(e,t,i,Math.min(.9999,a)*360,Math.min(.9999,n)*360,l)},Ys=({root:e,props:t})=>{t.spin=!1,t.progress=0,t.opacity=0;let i=li("svg");e.ref.path=li("path",{"stroke-width":2,"stroke-linecap":"round"}),i.appendChild(e.ref.path),e.ref.svg=i,e.appendChild(i)},qs=({root:e,props:t})=>{if(t.opacity===0)return;t.align&&(e.element.dataset.align=t.align);let i=parseInt(ce(e.ref.path,"stroke-width"),10),a=e.rect.element.width*.5,n=0,l=0;t.spin?(n=0,l=.5):(n=0,l=t.progress);let o=js(a,a,a-i,n,l);ce(e.ref.path,"d",o),ce(e.ref.path,"stroke-opacity",t.spin||t.progress>0?1:0)},Ka=ne({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:Ys,write:qs,mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),$s=({root:e,props:t})=>{e.element.innerHTML=(t.icon||"")+`${t.label}`,t.isDisabled=!1},Xs=({root:e,props:t})=>{let{isDisabled:i}=t,a=e.query("GET_DISABLED")||t.opacity===0;a&&!i?(t.isDisabled=!0,ce(e.element,"disabled","disabled")):!a&&i&&(t.isDisabled=!1,e.element.removeAttribute("disabled"))},Cn=ne({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:$s,write:Xs}),Bn=(e,t=".",i=1e3,a={})=>{let{labelBytes:n="bytes",labelKilobytes:l="KB",labelMegabytes:o="MB",labelGigabytes:r="GB"}=a;e=Math.round(Math.abs(e));let s=i,p=i*i,c=i*i*i;return ee.toFixed(t).split(".").filter(a=>a!=="0").join(i),Ks=({root:e,props:t})=>{let i=Ve("span");i.className="filepond--file-info-main",ce(i,"aria-hidden","true"),e.appendChild(i),e.ref.fileName=i;let a=Ve("span");a.className="filepond--file-info-sub",e.appendChild(a),e.ref.fileSize=a,ae(a,e.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),ae(i,Qi(e.query("GET_ITEM_NAME",t.id)))},Di=({root:e,props:t})=>{ae(e.ref.fileSize,Bn(e.query("GET_ITEM_SIZE",t.id),".",e.query("GET_FILE_SIZE_BASE"),e.query("GET_FILE_SIZE_LABELS",e.query))),ae(e.ref.fileName,Qi(e.query("GET_ITEM_NAME",t.id)))},Za=({root:e,props:t})=>{if(bt(e.query("GET_ITEM_SIZE",t.id))){Di({root:e,props:t});return}ae(e.ref.fileSize,e.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Qs=ne({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:fe({DID_LOAD_ITEM:Di,DID_UPDATE_ITEM_META:Di,DID_THROW_ITEM_LOAD_ERROR:Za,DID_THROW_ITEM_INVALID:Za}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},create:Ks,mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),Nn=e=>Math.round(e*100),Zs=({root:e})=>{let t=Ve("span");t.className="filepond--file-status-main",e.appendChild(t),e.ref.main=t;let i=Ve("span");i.className="filepond--file-status-sub",e.appendChild(i),e.ref.sub=i,kn({root:e,action:{progress:null}})},kn=({root:e,action:t})=>{let i=t.progress===null?e.query("GET_LABEL_FILE_LOADING"):`${e.query("GET_LABEL_FILE_LOADING")} ${Nn(t.progress)}%`;ae(e.ref.main,i),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},Js=({root:e,action:t})=>{let i=t.progress===null?e.query("GET_LABEL_FILE_PROCESSING"):`${e.query("GET_LABEL_FILE_PROCESSING")} ${Nn(t.progress)}%`;ae(e.ref.main,i),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},ec=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},tc=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING_ABORTED")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_RETRY"))},ic=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_UNDO"))},Ja=({root:e})=>{ae(e.ref.main,""),ae(e.ref.sub,"")},zt=({root:e,action:t})=>{ae(e.ref.main,t.status.main),ae(e.ref.sub,t.status.sub)},ac=ne({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:fe({DID_LOAD_ITEM:Ja,DID_REVERT_ITEM_PROCESSING:Ja,DID_REQUEST_ITEM_PROCESSING:ec,DID_ABORT_ITEM_PROCESSING:tc,DID_COMPLETE_ITEM_PROCESSING:ic,DID_UPDATE_ITEM_PROCESS_PROGRESS:Js,DID_UPDATE_ITEM_LOAD_PROGRESS:kn,DID_THROW_ITEM_LOAD_ERROR:zt,DID_THROW_ITEM_INVALID:zt,DID_THROW_ITEM_PROCESSING_ERROR:zt,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:zt,DID_THROW_ITEM_REMOVE_ERROR:zt}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},create:Zs,mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),Ci={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},Bi=[];te(Ci,e=>{Bi.push(e)});var Ie=e=>{if(Ni(e)==="right")return 0;let t=e.ref.buttonRemoveItem.rect.element;return t.hidden?null:t.width+t.left},nc=e=>e.ref.buttonAbortItemLoad.rect.element.width,ei=e=>Math.floor(e.ref.buttonRemoveItem.rect.element.height/4),lc=e=>Math.floor(e.ref.buttonRemoveItem.rect.element.left/2),oc=e=>e.query("GET_STYLE_LOAD_INDICATOR_POSITION"),rc=e=>e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION"),Ni=e=>e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION"),sc={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:oc},processProgressIndicator:{opacity:0,align:rc},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},en={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie}},Ai={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},mt={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:Ni},info:{translateX:Ie},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:Ni},buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{opacity:1,translateX:Ie}},DID_LOAD_ITEM:en,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie}},DID_START_ITEM_PROCESSING:Ai,DID_REQUEST_ITEM_PROCESSING:Ai,DID_UPDATE_ITEM_PROCESS_PROGRESS:Ai,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:Ie}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ie},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:en},cc=ne({create:({root:e})=>{e.element.innerHTML=e.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),dc=({root:e,props:t})=>{let i=Object.keys(Ci).reduce((g,f)=>(g[f]={...Ci[f]},g),{}),{id:a}=t,n=e.query("GET_ALLOW_REVERT"),l=e.query("GET_ALLOW_REMOVE"),o=e.query("GET_ALLOW_PROCESS"),r=e.query("GET_INSTANT_UPLOAD"),s=e.query("IS_ASYNC"),p=e.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN"),c;s?o&&!n?c=g=>!/RevertItemProcessing/.test(g):!o&&n?c=g=>!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(g):!o&&!n&&(c=g=>!/Process/.test(g)):c=g=>!/Process/.test(g);let d=c?Bi.filter(c):Bi.concat();if(r&&n&&(i.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",i.RevertItemProcessing.icon="GET_ICON_REMOVE"),s&&!n){let g=mt.DID_COMPLETE_ITEM_PROCESSING;g.info.translateX=lc,g.info.translateY=ei,g.status.translateY=ei,g.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(s&&!o&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach(g=>{mt[g].status.translateY=ei}),mt.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=nc),p&&n){i.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";let g=mt.DID_COMPLETE_ITEM_PROCESSING;g.info.translateX=Ie,g.status.translateY=ei,g.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}l||(i.RemoveItem.disabled=!0),te(i,(g,f)=>{let h=e.createChildView(Cn,{label:e.query(f.label),icon:e.query(f.icon),opacity:0});d.includes(g)&&e.appendChildView(h),f.disabled&&(h.element.setAttribute("disabled","disabled"),h.element.setAttribute("hidden","hidden")),h.element.dataset.align=e.query(`GET_STYLE_${f.align}`),h.element.classList.add(f.className),h.on("click",I=>{I.stopPropagation(),!f.disabled&&e.dispatch(f.action,{query:a})}),e.ref[`button${g}`]=h}),e.ref.processingCompleteIndicator=e.appendChildView(e.createChildView(cc)),e.ref.processingCompleteIndicator.element.dataset.align=e.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),e.ref.info=e.appendChildView(e.createChildView(Qs,{id:a})),e.ref.status=e.appendChildView(e.createChildView(ac,{id:a}));let m=e.appendChildView(e.createChildView(Ka,{opacity:0,align:e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));m.element.classList.add("filepond--load-indicator"),e.ref.loadProgressIndicator=m;let u=e.appendChildView(e.createChildView(Ka,{opacity:0,align:e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));u.element.classList.add("filepond--process-indicator"),e.ref.processProgressIndicator=u,e.ref.activeStyles=[]},pc=({root:e,actions:t,props:i})=>{mc({root:e,actions:t,props:i});let a=t.concat().filter(n=>/^DID_/.test(n.type)).reverse().find(n=>mt[n.type]);if(a){e.ref.activeStyles=[];let n=mt[a.type];te(sc,(l,o)=>{let r=e.ref[l];te(o,(s,p)=>{let c=n[l]&&typeof n[l][s]<"u"?n[l][s]:p;e.ref.activeStyles.push({control:r,key:s,value:c})})})}e.ref.activeStyles.forEach(({control:n,key:l,value:o})=>{n[l]=typeof o=="function"?o(e):o})},mc=fe({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:({root:e,action:t})=>{e.ref.buttonAbortItemProcessing.label=t.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:({root:e,action:t})=>{e.ref.buttonAbortItemLoad.label=t.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:({root:e,action:t})=>{e.ref.buttonAbortItemRemoval.label=t.value},DID_REQUEST_ITEM_PROCESSING:({root:e})=>{e.ref.processProgressIndicator.spin=!0,e.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:({root:e})=>{e.ref.loadProgressIndicator.spin=!0,e.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:({root:e})=>{e.ref.processProgressIndicator.spin=!0,e.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:({root:e,action:t})=>{e.ref.loadProgressIndicator.spin=!1,e.ref.loadProgressIndicator.progress=t.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:({root:e,action:t})=>{e.ref.processProgressIndicator.spin=!1,e.ref.processProgressIndicator.progress=t.progress}}),uc=ne({create:dc,write:pc,didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},name:"file"}),gc=({root:e,props:t})=>{e.ref.fileName=Ve("legend"),e.appendChild(e.ref.fileName),e.ref.file=e.appendChildView(e.createChildView(uc,{id:t.id})),e.ref.data=!1},fc=({root:e,props:t})=>{ae(e.ref.fileName,Qi(e.query("GET_ITEM_NAME",t.id)))},hc=ne({create:gc,ignoreRect:!0,write:fe({DID_LOAD_ITEM:fc}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},tag:"fieldset",name:"file-wrapper"}),tn={type:"spring",damping:.6,mass:7},bc=({root:e,props:t})=>{[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:tn},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:tn},styles:["translateY"]}}].forEach(i=>{Ec(e,i,t.name)}),e.element.classList.add(`filepond--${t.name}`),e.ref.scalable=null},Ec=(e,t,i)=>{let a=ne({name:`panel-${t.name} filepond--${i}`,mixins:t.mixins,ignoreRectUpdate:!0}),n=e.createChildView(a,t.props);e.ref[t.name]=e.appendChildView(n)},Tc=({root:e,props:t})=>{if((e.ref.scalable===null||t.scalable!==e.ref.scalable)&&(e.ref.scalable=In(t.scalable)?t.scalable:!0,e.element.dataset.scalable=e.ref.scalable),!t.height)return;let i=e.ref.top.rect.element,a=e.ref.bottom.rect.element,n=Math.max(i.height+a.height,t.height);e.ref.center.translateY=i.height,e.ref.center.scaleY=(n-i.height-a.height)/100,e.ref.bottom.translateY=n-a.height},Vn=ne({name:"panel",read:({root:e,props:t})=>t.heightCurrent=e.ref.bottom.translateY,write:Tc,create:bc,ignoreRect:!0,mixins:{apis:["height","heightCurrent","scalable"]}}),Ic=e=>{let t=e.map(a=>a.id),i;return{setIndex:a=>{i=a},getIndex:()=>i,getItemIndex:a=>t.indexOf(a.id)}},an={type:"spring",stiffness:.75,damping:.45,mass:10},nn="spring",ln={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},vc=({root:e,props:t})=>{if(e.ref.handleClick=a=>e.dispatch("DID_ACTIVATE_ITEM",{id:t.id}),e.element.id=`filepond--item-${t.id}`,e.element.addEventListener("click",e.ref.handleClick),e.ref.container=e.appendChildView(e.createChildView(hc,{id:t.id})),e.ref.panel=e.appendChildView(e.createChildView(Vn,{name:"item-panel"})),e.ref.panel.height=null,t.markedForRemoval=!1,!e.query("GET_ALLOW_REORDER"))return;e.element.dataset.dragState="idle";let i=a=>{if(!a.isPrimary)return;let n=!1,l={x:a.pageX,y:a.pageY};t.dragOrigin={x:e.translateX,y:e.translateY},t.dragCenter={x:a.offsetX,y:a.offsetY};let o=Ic(e.query("GET_ACTIVE_ITEMS"));e.dispatch("DID_GRAB_ITEM",{id:t.id,dragState:o});let r=d=>{if(!d.isPrimary)return;d.stopPropagation(),d.preventDefault(),t.dragOffset={x:d.pageX-l.x,y:d.pageY-l.y},t.dragOffset.x*t.dragOffset.x+t.dragOffset.y*t.dragOffset.y>16&&!n&&(n=!0,e.element.removeEventListener("click",e.ref.handleClick)),e.dispatch("DID_DRAG_ITEM",{id:t.id,dragState:o})},s=d=>{d.isPrimary&&(t.dragOffset={x:d.pageX-l.x,y:d.pageY-l.y},c())},p=()=>{c()},c=()=>{document.removeEventListener("pointercancel",p),document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",s),e.dispatch("DID_DROP_ITEM",{id:t.id,dragState:o}),n&&setTimeout(()=>e.element.addEventListener("click",e.ref.handleClick),0)};document.addEventListener("pointercancel",p),document.addEventListener("pointermove",r),document.addEventListener("pointerup",s)};e.element.addEventListener("pointerdown",i)},xc=fe({DID_UPDATE_PANEL_HEIGHT:({root:e,action:t})=>{e.height=t.height}}),yc=fe({DID_GRAB_ITEM:({root:e,props:t})=>{t.dragOrigin={x:e.translateX,y:e.translateY}},DID_DRAG_ITEM:({root:e})=>{e.element.dataset.dragState="drag"},DID_DROP_ITEM:({root:e,props:t})=>{t.dragOffset=null,t.dragOrigin=null,e.element.dataset.dragState="drop"}},({root:e,actions:t,props:i,shouldOptimize:a})=>{e.element.dataset.dragState==="drop"&&e.scaleX<=1&&(e.element.dataset.dragState="idle");let n=t.concat().filter(o=>/^DID_/.test(o.type)).reverse().find(o=>ln[o.type]);n&&n.type!==i.currentState&&(i.currentState=n.type,e.element.dataset.filepondItemState=ln[i.currentState]||"");let l=e.query("GET_ITEM_PANEL_ASPECT_RATIO")||e.query("GET_PANEL_ASPECT_RATIO");l?a||(e.height=e.rect.element.width*l):(xc({root:e,actions:t,props:i}),!e.height&&e.ref.container.rect.element.height>0&&(e.height=e.ref.container.rect.element.height)),a&&(e.ref.panel.height=null),e.ref.panel.height=e.height}),Rc=ne({create:vc,write:yc,destroy:({root:e,props:t})=>{e.element.removeEventListener("click",e.ref.handleClick),e.dispatch("RELEASE_ITEM",{query:t.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:nn,scaleY:nn,translateX:an,translateY:an,opacity:{type:"tween",duration:150}}}}),Zi=(e,t)=>Math.max(1,Math.floor((e+1)/t)),Ji=(e,t,i)=>{if(!i)return;let a=e.rect.element.width,n=t.length,l=null;if(n===0||i.topb){if(i.left{ce(e.element,"role","list"),e.ref.lastItemSpanwDate=Date.now()},_c=({root:e,action:t})=>{let{id:i,index:a,interactionMethod:n}=t;e.ref.addIndex=a;let l=Date.now(),o=l,r=1;if(n!==Re.NONE){r=0;let s=e.query("GET_ITEM_INSERT_INTERVAL"),p=l-e.ref.lastItemSpanwDate;o=p{e.dragOffset?(e.translateX=null,e.translateY=null,e.translateX=e.dragOrigin.x+e.dragOffset.x,e.translateY=e.dragOrigin.y+e.dragOffset.y,e.scaleX=1.025,e.scaleY=1.025):(e.translateX=t,e.translateY=i,Date.now()>e.spawnDate&&(e.opacity===0&&wc(e,t,i,a,n),e.scaleX=1,e.scaleY=1,e.opacity=1))},wc=(e,t,i,a,n)=>{e.interactionMethod===Re.NONE?(e.translateX=null,e.translateX=t,e.translateY=null,e.translateY=i):e.interactionMethod===Re.DROP?(e.translateX=null,e.translateX=t-a*20,e.translateY=null,e.translateY=i-n*10,e.scaleX=.8,e.scaleY=.8):e.interactionMethod===Re.BROWSE?(e.translateY=null,e.translateY=i-30):e.interactionMethod===Re.API&&(e.translateX=null,e.translateX=t-30,e.translateY=null)},Lc=({root:e,action:t})=>{let{id:i}=t,a=e.childViews.find(n=>n.id===i);a&&(a.scaleX=.9,a.scaleY=.9,a.opacity=0,a.markedForRemoval=!0)},Pi=e=>e.rect.element.height+e.rect.element.marginBottom*.5+e.rect.element.marginTop*.5,Mc=e=>e.rect.element.width+e.rect.element.marginLeft*.5+e.rect.element.marginRight*.5,Ac=({root:e,action:t})=>{let{id:i,dragState:a}=t,n=e.query("GET_ITEM",{id:i}),l=e.childViews.find(h=>h.id===i),o=e.childViews.length,r=a.getItemIndex(n);if(!l)return;let s={x:l.dragOrigin.x+l.dragOffset.x+l.dragCenter.x,y:l.dragOrigin.y+l.dragOffset.y+l.dragCenter.y},p=Pi(l),c=Mc(l),d=Math.floor(e.rect.outer.width/c);d>o&&(d=o);let m=Math.floor(o/d+1);ti.setHeight=p*m,ti.setWidth=c*d;var u={y:Math.floor(s.y/p),x:Math.floor(s.x/c),getGridIndex:function(){return s.y>ti.getHeight||s.y<0||s.x>ti.getWidth||s.x<0?r:this.y*d+this.x},getColIndex:function(){let I=e.query("GET_ACTIVE_ITEMS"),b=e.childViews.filter(P=>P.rect.element.height),T=I.map(P=>b.find(A=>A.id===P.id)),v=T.findIndex(P=>P===l),y=Pi(l),E=T.length,_=E,x=0,R=0,z=0;for(let P=0;PP){if(s.y1?u.getGridIndex():u.getColIndex();e.dispatch("MOVE_ITEM",{query:l,index:g});let f=a.getIndex();if(f===void 0||f!==g){if(a.setIndex(g),f===void 0)return;e.dispatch("DID_REORDER_ITEMS",{items:e.query("GET_ACTIVE_ITEMS"),origin:r,target:g})}},Pc=fe({DID_ADD_ITEM:_c,DID_REMOVE_ITEM:Lc,DID_DRAG_ITEM:Ac}),zc=({root:e,props:t,actions:i,shouldOptimize:a})=>{Pc({root:e,props:t,actions:i});let{dragCoordinates:n}=t,l=e.rect.element.width,o=e.childViews.filter(T=>T.rect.element.height),r=e.query("GET_ACTIVE_ITEMS").map(T=>o.find(v=>v.id===T.id)).filter(T=>T),s=n?Ji(e,r,n):null,p=e.ref.addIndex||null;e.ref.addIndex=null;let c=0,d=0,m=0;if(r.length===0)return;let u=r[0].rect.element,g=u.marginTop+u.marginBottom,f=u.marginLeft+u.marginRight,h=u.width+f,I=u.height+g,b=Zi(l,h);if(b===1){let T=0,v=0;r.forEach((y,E)=>{if(s){let R=E-s;R===-2?v=-g*.25:R===-1?v=-g*.75:R===0?v=g*.75:R===1?v=g*.25:v=0}a&&(y.translateX=null,y.translateY=null),y.markedForRemoval||on(y,0,T+v);let x=(y.rect.element.height+g)*(y.markedForRemoval?y.opacity:1);T+=x})}else{let T=0,v=0;r.forEach((y,E)=>{E===s&&(c=1),E===p&&(m+=1),y.markedForRemoval&&y.opacity<.5&&(d-=1);let _=E+m+c+d,x=_%b,R=Math.floor(_/b),z=x*h,P=R*I,A=Math.sign(z-T),B=Math.sign(P-v);T=z,v=P,!y.markedForRemoval&&(a&&(y.translateX=null,y.translateY=null),on(y,z,P,A,B))})}},Oc=(e,t)=>t.filter(i=>i.data&&i.data.id?e.id===i.data.id:!0),Fc=ne({create:Sc,write:zc,tag:"ul",name:"list",didWriteView:({root:e})=>{e.childViews.filter(t=>t.markedForRemoval&&t.opacity===0&&t.resting).forEach(t=>{t._destroy(),e.removeChildView(t)})},filterFrameActionsForChild:Oc,mixins:{apis:["dragCoordinates"]}}),Dc=({root:e,props:t})=>{e.ref.list=e.appendChildView(e.createChildView(Fc)),t.dragCoordinates=null,t.overflowing=!1},Cc=({root:e,props:t,action:i})=>{e.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(t.dragCoordinates={left:i.position.scopeLeft-e.ref.list.rect.element.left,top:i.position.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},Bc=({props:e})=>{e.dragCoordinates=null},Nc=fe({DID_DRAG:Cc,DID_END_DRAG:Bc}),kc=({root:e,props:t,actions:i})=>{if(Nc({root:e,props:t,actions:i}),e.ref.list.dragCoordinates=t.dragCoordinates,t.overflowing&&!t.overflow&&(t.overflowing=!1,e.element.dataset.state="",e.height=null),t.overflow){let a=Math.round(t.overflow);a!==e.height&&(t.overflowing=!0,e.element.dataset.state="overflow",e.height=a)}},Vc=ne({create:Dc,write:kc,name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),ze=(e,t,i,a="")=>{i?ce(e,t,a):e.removeAttribute(t)},Gc=e=>{if(!(!e||e.value==="")){try{e.value=""}catch{}if(e.value){let t=Ve("form"),i=e.parentNode,a=e.nextSibling;t.appendChild(e),t.reset(),a?i.insertBefore(e,a):i.appendChild(e)}}},Uc=({root:e,props:t})=>{e.element.id=`filepond--browser-${t.id}`,ce(e.element,"name",e.query("GET_NAME")),ce(e.element,"aria-controls",`filepond--assistant-${t.id}`),ce(e.element,"aria-labelledby",`filepond--drop-label-${t.id}`),Gn({root:e,action:{value:e.query("GET_ACCEPTED_FILE_TYPES")}}),Un({root:e,action:{value:e.query("GET_ALLOW_MULTIPLE")}}),Wn({root:e,action:{value:e.query("GET_ALLOW_DIRECTORIES_ONLY")}}),ki({root:e}),Hn({root:e,action:{value:e.query("GET_REQUIRED")}}),jn({root:e,action:{value:e.query("GET_CAPTURE_METHOD")}}),e.ref.handleChange=i=>{if(!e.element.value)return;let a=Array.from(e.element.files).map(n=>(n._relativePath=n.webkitRelativePath,n));setTimeout(()=>{t.onload(a),Gc(e.element)},250)},e.element.addEventListener("change",e.ref.handleChange)},Gn=({root:e,action:t})=>{e.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&ze(e.element,"accept",!!t.value,t.value?t.value.join(","):"")},Un=({root:e,action:t})=>{ze(e.element,"multiple",t.value)},Wn=({root:e,action:t})=>{ze(e.element,"webkitdirectory",t.value)},ki=({root:e})=>{let t=e.query("GET_DISABLED"),i=e.query("GET_ALLOW_BROWSE"),a=t||!i;ze(e.element,"disabled",a)},Hn=({root:e,action:t})=>{t.value?e.query("GET_TOTAL_ITEMS")===0&&ze(e.element,"required",!0):ze(e.element,"required",!1)},jn=({root:e,action:t})=>{ze(e.element,"capture",!!t.value,t.value===!0?"":t.value)},rn=({root:e})=>{let{element:t}=e;if(e.query("GET_TOTAL_ITEMS")>0){ze(t,"required",!1),ze(t,"name",!1);let i=e.query("GET_ACTIVE_ITEMS"),a=!1;for(let n=0;n{e.query("GET_CHECK_VALIDITY")&&e.element.setCustomValidity(e.query("GET_LABEL_INVALID_FIELD"))},Hc=ne({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:Uc,destroy:({root:e})=>{e.element.removeEventListener("change",e.ref.handleChange)},write:fe({DID_LOAD_ITEM:rn,DID_REMOVE_ITEM:rn,DID_THROW_ITEM_INVALID:Wc,DID_SET_DISABLED:ki,DID_SET_ALLOW_BROWSE:ki,DID_SET_ALLOW_DIRECTORIES_ONLY:Wn,DID_SET_ALLOW_MULTIPLE:Un,DID_SET_ACCEPTED_FILE_TYPES:Gn,DID_SET_CAPTURE_METHOD:jn,DID_SET_REQUIRED:Hn})}),sn={ENTER:13,SPACE:32},jc=({root:e,props:t})=>{let i=Ve("label");ce(i,"for",`filepond--browser-${t.id}`),ce(i,"id",`filepond--drop-label-${t.id}`),e.ref.handleKeyDown=a=>{(a.keyCode===sn.ENTER||a.keyCode===sn.SPACE)&&(a.preventDefault(),e.ref.label.click())},e.ref.handleClick=a=>{a.target===i||i.contains(a.target)||e.ref.label.click()},i.addEventListener("keydown",e.ref.handleKeyDown),e.element.addEventListener("click",e.ref.handleClick),Yn(i,t.caption),e.appendChild(i),e.ref.label=i},Yn=(e,t)=>{e.innerHTML=t;let i=e.querySelector(".filepond--label-action");return i&&ce(i,"tabindex","0"),t},Yc=ne({name:"drop-label",ignoreRect:!0,create:jc,destroy:({root:e})=>{e.ref.label.addEventListener("keydown",e.ref.handleKeyDown),e.element.removeEventListener("click",e.ref.handleClick)},write:fe({DID_SET_LABEL_IDLE:({root:e,action:t})=>{Yn(e.ref.label,t.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),qc=ne({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),$c=({root:e})=>{let t=e.rect.element.width*.5,i=e.rect.element.height*.5;e.ref.blob=e.appendChildView(e.createChildView(qc,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:t,translateY:i}))},Xc=({root:e,action:t})=>{if(!e.ref.blob){$c({root:e});return}e.ref.blob.translateX=t.position.scopeLeft,e.ref.blob.translateY=t.position.scopeTop,e.ref.blob.scaleX=1,e.ref.blob.scaleY=1,e.ref.blob.opacity=1},Kc=({root:e})=>{e.ref.blob&&(e.ref.blob.opacity=0)},Qc=({root:e})=>{e.ref.blob&&(e.ref.blob.scaleX=2.5,e.ref.blob.scaleY=2.5,e.ref.blob.opacity=0)},Zc=({root:e,props:t,actions:i})=>{Jc({root:e,props:t,actions:i});let{blob:a}=e.ref;i.length===0&&a&&a.opacity===0&&(e.removeChildView(a),e.ref.blob=null)},Jc=fe({DID_DRAG:Xc,DID_DROP:Qc,DID_END_DRAG:Kc}),ed=ne({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:Zc}),qn=(e,t)=>{try{let i=new DataTransfer;t.forEach(a=>{a instanceof File?i.items.add(a):i.items.add(new File([a],a.name,{type:a.type}))}),e.files=i.files}catch{return!1}return!0},td=({root:e})=>{e.ref.fields={};let t=document.createElement("legend");t.textContent="Files",e.element.appendChild(t)},gi=(e,t)=>e.ref.fields[t],ea=e=>{e.query("GET_ACTIVE_ITEMS").forEach(t=>{e.ref.fields[t.id]&&e.element.appendChild(e.ref.fields[t.id])})},cn=({root:e})=>ea(e),id=({root:e,action:t})=>{let n=!(e.query("GET_ITEM",t.id).origin===se.LOCAL)&&e.query("SHOULD_UPDATE_FILE_INPUT"),l=Ve("input");l.type=n?"file":"hidden",l.name=e.query("GET_NAME"),e.ref.fields[t.id]=l,ea(e)},ad=({root:e,action:t})=>{let i=gi(e,t.id);if(!i||(t.serverFileReference!==null&&(i.value=t.serverFileReference),!e.query("SHOULD_UPDATE_FILE_INPUT")))return;let a=e.query("GET_ITEM",t.id);qn(i,[a.file])},nd=({root:e,action:t})=>{e.query("SHOULD_UPDATE_FILE_INPUT")&&setTimeout(()=>{let i=gi(e,t.id);i&&qn(i,[t.file])},0)},ld=({root:e})=>{e.element.disabled=e.query("GET_DISABLED")},od=({root:e,action:t})=>{let i=gi(e,t.id);i&&(i.parentNode&&i.parentNode.removeChild(i),delete e.ref.fields[t.id])},rd=({root:e,action:t})=>{let i=gi(e,t.id);i&&(t.value===null?i.removeAttribute("value"):i.type!="file"&&(i.value=t.value),ea(e))},sd=fe({DID_SET_DISABLED:ld,DID_ADD_ITEM:id,DID_LOAD_ITEM:ad,DID_REMOVE_ITEM:od,DID_DEFINE_VALUE:rd,DID_PREPARE_OUTPUT:nd,DID_REORDER_ITEMS:cn,DID_SORT_ITEMS:cn}),cd=ne({tag:"fieldset",name:"data",create:td,write:sd,ignoreRect:!0}),dd=e=>"getRootNode"in e?e.getRootNode():document,pd=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],md=["css","csv","html","txt"],ud={zip:"zip|compressed",epub:"application/epub+zip"},$n=(e="")=>(e=e.toLowerCase(),pd.includes(e)?"image/"+(e==="jpg"?"jpeg":e==="svg"?"svg+xml":e):md.includes(e)?"text/"+e:ud[e]||""),ta=e=>new Promise((t,i)=>{let a=vd(e);if(a.length&&!gd(e))return t(a);fd(e).then(t)}),gd=e=>e.files?e.files.length>0:!1,fd=e=>new Promise((t,i)=>{let a=(e.items?Array.from(e.items):[]).filter(n=>hd(n)).map(n=>bd(n));if(!a.length){t(e.files?Array.from(e.files):[]);return}Promise.all(a).then(n=>{let l=[];n.forEach(o=>{l.push.apply(l,o)}),t(l.filter(o=>o).map(o=>(o._relativePath||(o._relativePath=o.webkitRelativePath),o)))}).catch(console.error)}),hd=e=>{if(Xn(e)){let t=ia(e);if(t)return t.isFile||t.isDirectory}return e.kind==="file"},bd=e=>new Promise((t,i)=>{if(Id(e)){Ed(ia(e)).then(t).catch(i);return}t([e.getAsFile()])}),Ed=e=>new Promise((t,i)=>{let a=[],n=0,l=0,o=()=>{l===0&&n===0&&t(a)},r=s=>{n++;let p=s.createReader(),c=()=>{p.readEntries(d=>{if(d.length===0){n--,o();return}d.forEach(m=>{m.isDirectory?r(m):(l++,m.file(u=>{let g=Td(u);m.fullPath&&(g._relativePath=m.fullPath),a.push(g),l--,o()}))}),c()},i)};c()};r(e)}),Td=e=>{if(e.type.length)return e;let t=e.lastModifiedDate,i=e.name,a=$n(ui(e.name));return a.length&&(e=e.slice(0,e.size,a),e.name=i,e.lastModifiedDate=t),e},Id=e=>Xn(e)&&(ia(e)||{}).isDirectory,Xn=e=>"webkitGetAsEntry"in e,ia=e=>e.webkitGetAsEntry(),vd=e=>{let t=[];try{if(t=yd(e),t.length)return t;t=xd(e)}catch{}return t},xd=e=>{let t=e.getData("url");return typeof t=="string"&&t.length?[t]:[]},yd=e=>{let t=e.getData("text/html");if(typeof t=="string"&&t.length){let i=t.match(/src\s*=\s*"(.+?)"/);if(i)return[i[1]]}return[]},ri=[],et=e=>({pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}),Rd=(e,t,i)=>{let a=Sd(t),n={element:e,filterElement:i,state:null,ondrop:()=>{},onenter:()=>{},ondrag:()=>{},onexit:()=>{},onload:()=>{},allowdrop:()=>{}};return n.destroy=a.addListener(n),n},Sd=e=>{let t=ri.find(a=>a.element===e);if(t)return t;let i=_d(e);return ri.push(i),i},_d=e=>{let t=[],i={dragenter:Ld,dragover:Md,dragleave:Pd,drop:Ad},a={};te(i,(l,o)=>{a[l]=o(e,t),e.addEventListener(l,a[l],!1)});let n={element:e,addListener:l=>(t.push(l),()=>{t.splice(t.indexOf(l),1),t.length===0&&(ri.splice(ri.indexOf(n),1),te(i,o=>{e.removeEventListener(o,a[o],!1)}))})};return n},wd=(e,t)=>("elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)),aa=(e,t)=>{let i=dd(t),a=wd(i,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return a===t||t.contains(a)},Kn=null,ii=(e,t)=>{try{e.dropEffect=t}catch{}},Ld=(e,t)=>i=>{i.preventDefault(),Kn=i.target,t.forEach(a=>{let{element:n,onenter:l}=a;aa(i,n)&&(a.state="enter",l(et(i)))})},Md=(e,t)=>i=>{i.preventDefault();let a=i.dataTransfer;ta(a).then(n=>{let l=!1;t.some(o=>{let{filterElement:r,element:s,onenter:p,onexit:c,ondrag:d,allowdrop:m}=o;ii(a,"copy");let u=m(n);if(!u){ii(a,"none");return}if(aa(i,s)){if(l=!0,o.state===null){o.state="enter",p(et(i));return}if(o.state="over",r&&!u){ii(a,"none");return}d(et(i))}else r&&!l&&ii(a,"none"),o.state&&(o.state=null,c(et(i)))})})},Ad=(e,t)=>i=>{i.preventDefault();let a=i.dataTransfer;ta(a).then(n=>{t.forEach(l=>{let{filterElement:o,element:r,ondrop:s,onexit:p,allowdrop:c}=l;if(l.state=null,!(o&&!aa(i,r))){if(!c(n))return p(et(i));s(et(i),n)}})})},Pd=(e,t)=>i=>{Kn===i.target&&t.forEach(a=>{let{onexit:n}=a;a.state=null,n(et(i))})},zd=(e,t,i)=>{e.classList.add("filepond--hopper");let{catchesDropsOnPage:a,requiresDropOnElement:n,filterItems:l=c=>c}=i,o=Rd(e,a?document.documentElement:e,n),r="",s="";o.allowdrop=c=>t(l(c)),o.ondrop=(c,d)=>{let m=l(d);if(!t(m)){p.ondragend(c);return}s="drag-drop",p.onload(m,c)},o.ondrag=c=>{p.ondrag(c)},o.onenter=c=>{s="drag-over",p.ondragstart(c)},o.onexit=c=>{s="drag-exit",p.ondragend(c)};let p={updateHopperState:()=>{r!==s&&(e.dataset.hopperState=s,r=s)},onload:()=>{},ondragstart:()=>{},ondrag:()=>{},ondragend:()=>{},destroy:()=>{o.destroy()}};return p},Vi=!1,ut=[],Qn=e=>{let t=document.activeElement;if(t&&(/textarea|input/i.test(t.nodeName)||t.getAttribute("contenteditable")==="true")){let a=!1,n=t;for(;n!==document.body;){if(n.classList.contains("filepond--root")){a=!0;break}n=n.parentNode}if(!a)return}ta(e.clipboardData).then(a=>{a.length&&ut.forEach(n=>n(a))})},Od=e=>{ut.includes(e)||(ut.push(e),!Vi&&(Vi=!0,document.addEventListener("paste",Qn)))},Fd=e=>{$i(ut,ut.indexOf(e)),ut.length===0&&(document.removeEventListener("paste",Qn),Vi=!1)},Dd=()=>{let e=i=>{t.onload(i)},t={destroy:()=>{Fd(e)},onload:()=>{}};return Od(e),t},Cd=({root:e,props:t})=>{e.element.id=`filepond--assistant-${t.id}`,ce(e.element,"role","alert"),ce(e.element,"aria-live","polite"),ce(e.element,"aria-relevant","additions")},dn=null,pn=null,zi=[],fi=(e,t)=>{e.element.textContent=t},Bd=e=>{e.element.textContent=""},Zn=(e,t,i)=>{let a=e.query("GET_TOTAL_ITEMS");fi(e,`${i} ${t}, ${a} ${a===1?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL")}`),clearTimeout(pn),pn=setTimeout(()=>{Bd(e)},1500)},Jn=e=>e.element.parentNode.contains(document.activeElement),Nd=({root:e,action:t})=>{if(!Jn(e))return;e.element.textContent="";let i=e.query("GET_ITEM",t.id);zi.push(i.filename),clearTimeout(dn),dn=setTimeout(()=>{Zn(e,zi.join(", "),e.query("GET_LABEL_FILE_ADDED")),zi.length=0},750)},kd=({root:e,action:t})=>{if(!Jn(e))return;let i=t.item;Zn(e,i.filename,e.query("GET_LABEL_FILE_REMOVED"))},Vd=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename,n=e.query("GET_LABEL_FILE_PROCESSING_COMPLETE");fi(e,`${a} ${n}`)},mn=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename,n=e.query("GET_LABEL_FILE_PROCESSING_ABORTED");fi(e,`${a} ${n}`)},ai=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename;fi(e,`${t.status.main} ${a} ${t.status.sub}`)},Gd=ne({create:Cd,ignoreRect:!0,ignoreRectUpdate:!0,write:fe({DID_LOAD_ITEM:Nd,DID_REMOVE_ITEM:kd,DID_COMPLETE_ITEM_PROCESSING:Vd,DID_ABORT_ITEM_PROCESSING:mn,DID_REVERT_ITEM_PROCESSING:mn,DID_THROW_ITEM_REMOVE_ERROR:ai,DID_THROW_ITEM_LOAD_ERROR:ai,DID_THROW_ITEM_INVALID:ai,DID_THROW_ITEM_PROCESSING_ERROR:ai}),tag:"span",name:"assistant"}),el=(e,t="-")=>e.replace(new RegExp(`${t}.`,"g"),i=>i.charAt(1).toUpperCase()),tl=(e,t=16,i=!0)=>{let a=Date.now(),n=null;return(...l)=>{clearTimeout(n);let o=Date.now()-a,r=()=>{a=Date.now(),e(...l)};oe.preventDefault(),Wd=({root:e,props:t})=>{let i=e.query("GET_ID");i&&(e.element.id=i);let a=e.query("GET_CLASS_NAME");a&&a.split(" ").filter(s=>s.length).forEach(s=>{e.element.classList.add(s)}),e.ref.label=e.appendChildView(e.createChildView(Yc,{...t,translateY:null,caption:e.query("GET_LABEL_IDLE")})),e.ref.list=e.appendChildView(e.createChildView(Vc,{translateY:null})),e.ref.panel=e.appendChildView(e.createChildView(Vn,{name:"panel-root"})),e.ref.assistant=e.appendChildView(e.createChildView(Gd,{...t})),e.ref.data=e.appendChildView(e.createChildView(cd,{...t})),e.ref.measure=Ve("div"),e.ref.measure.style.height="100%",e.element.appendChild(e.ref.measure),e.ref.bounds=null,e.query("GET_STYLES").filter(s=>!ke(s.value)).map(({name:s,value:p})=>{e.element.dataset[s]=p}),e.ref.widthPrevious=null,e.ref.widthUpdated=tl(()=>{e.ref.updateHistory=[],e.dispatch("DID_RESIZE_ROOT")},250),e.ref.previousAspectRatio=null,e.ref.updateHistory=[];let n=window.matchMedia("(pointer: fine) and (hover: hover)").matches,l="PointerEvent"in window;e.query("GET_ALLOW_REORDER")&&l&&!n&&(e.element.addEventListener("touchmove",si,{passive:!1}),e.element.addEventListener("gesturestart",si));let o=e.query("GET_CREDITS");if(o.length===2){let s=document.createElement("a");s.className="filepond--credits",s.href=o[0],s.tabIndex=-1,s.target="_blank",s.rel="noopener noreferrer nofollow",s.textContent=o[1],e.element.appendChild(s),e.ref.credits=s}},Hd=({root:e,props:t,actions:i})=>{if(Xd({root:e,props:t,actions:i}),i.filter(E=>/^DID_SET_STYLE_/.test(E.type)).filter(E=>!ke(E.data.value)).map(({type:E,data:_})=>{let x=el(E.substring(8).toLowerCase(),"_");e.element.dataset[x]=_.value,e.invalidateLayout()}),e.rect.element.hidden)return;e.rect.element.width!==e.ref.widthPrevious&&(e.ref.widthPrevious=e.rect.element.width,e.ref.widthUpdated());let a=e.ref.bounds;a||(a=e.ref.bounds=qd(e),e.element.removeChild(e.ref.measure),e.ref.measure=null);let{hopper:n,label:l,list:o,panel:r}=e.ref;n&&n.updateHopperState();let s=e.query("GET_PANEL_ASPECT_RATIO"),p=e.query("GET_ALLOW_MULTIPLE"),c=e.query("GET_TOTAL_ITEMS"),d=p?e.query("GET_MAX_FILES")||Ud:1,m=c===d,u=i.find(E=>E.type==="DID_ADD_ITEM");if(m&&u){let E=u.data.interactionMethod;l.opacity=0,p?l.translateY=-40:E===Re.API?l.translateX=40:E===Re.BROWSE?l.translateY=40:l.translateY=30}else m||(l.opacity=1,l.translateX=0,l.translateY=0);let g=jd(e),f=Yd(e),h=l.rect.element.height,I=!p||m?0:h,b=m?o.rect.element.marginTop:0,T=c===0?0:o.rect.element.marginBottom,v=I+b+f.visual+T,y=I+b+f.bounds+T;if(o.translateY=Math.max(0,I-o.rect.element.marginTop)-g.top,s){let E=e.rect.element.width,_=E*s;s!==e.ref.previousAspectRatio&&(e.ref.previousAspectRatio=s,e.ref.updateHistory=[]);let x=e.ref.updateHistory;x.push(E);let R=2;if(x.length>R*2){let P=x.length,A=P-10,B=0;for(let w=P;w>=A;w--)if(x[w]===x[w-2]&&B++,B>=R)return}r.scalable=!1,r.height=_;let z=_-I-(T-g.bottom)-(m?b:0);f.visual>z?o.overflow=z:o.overflow=null,e.height=_}else if(a.fixedHeight){r.scalable=!1;let E=a.fixedHeight-I-(T-g.bottom)-(m?b:0);f.visual>E?o.overflow=E:o.overflow=null}else if(a.cappedHeight){let E=v>=a.cappedHeight,_=Math.min(a.cappedHeight,v);r.scalable=!0,r.height=E?_:_-g.top-g.bottom;let x=_-I-(T-g.bottom)-(m?b:0);v>a.cappedHeight&&f.visual>x?o.overflow=x:o.overflow=null,e.height=Math.min(a.cappedHeight,y-g.top-g.bottom)}else{let E=c>0?g.top+g.bottom:0;r.scalable=!0,r.height=Math.max(h,v-E),e.height=Math.max(h,y-E)}e.ref.credits&&r.heightCurrent&&(e.ref.credits.style.transform=`translateY(${r.heightCurrent}px)`)},jd=e=>{let t=e.ref.list.childViews[0].childViews[0];return t?{top:t.rect.element.marginTop,bottom:t.rect.element.marginBottom}:{top:0,bottom:0}},Yd=e=>{let t=0,i=0,a=e.ref.list,n=a.childViews[0],l=n.childViews.filter(b=>b.rect.element.height),o=e.query("GET_ACTIVE_ITEMS").map(b=>l.find(T=>T.id===b.id)).filter(b=>b);if(o.length===0)return{visual:t,bounds:i};let r=n.rect.element.width,s=Ji(n,o,a.dragCoordinates),p=o[0].rect.element,c=p.marginTop+p.marginBottom,d=p.marginLeft+p.marginRight,m=p.width+d,u=p.height+c,g=typeof s<"u"&&s>=0?1:0,f=o.find(b=>b.markedForRemoval&&b.opacity<.45)?-1:0,h=o.length+g+f,I=Zi(r,m);return I===1?o.forEach(b=>{let T=b.rect.element.height+c;i+=T,t+=T*b.opacity}):(i=Math.ceil(h/I)*u,t=i),{visual:t,bounds:i}},qd=e=>{let t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:t===0?null:t}},na=(e,t)=>{let i=e.query("GET_ALLOW_REPLACE"),a=e.query("GET_ALLOW_MULTIPLE"),n=e.query("GET_TOTAL_ITEMS"),l=e.query("GET_MAX_FILES"),o=t.length;return!a&&o>1?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:ie("warning",0,"Max files")}),!0):(l=a?l:1,!a&&i?!1:bt(l)&&n+o>l?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:ie("warning",0,"Max files")}),!0):!1)},$d=(e,t,i)=>{let a=e.childViews[0];return Ji(a,t,{left:i.scopeLeft-a.rect.element.left,top:i.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},un=e=>{let t=e.query("GET_ALLOW_DROP"),i=e.query("GET_DISABLED"),a=t&&!i;if(a&&!e.ref.hopper){let n=zd(e.element,l=>{let o=e.query("GET_BEFORE_DROP_FILE")||(()=>!0);return e.query("GET_DROP_VALIDATION")?l.every(s=>tt("ALLOW_HOPPER_ITEM",s,{query:e.query}).every(p=>p===!0)&&o(s)):!0},{filterItems:l=>{let o=e.query("GET_IGNORED_FILES");return l.filter(r=>Je(r)?!o.includes(r.name.toLowerCase()):!0)},catchesDropsOnPage:e.query("GET_DROP_ON_PAGE"),requiresDropOnElement:e.query("GET_DROP_ON_ELEMENT")});n.onload=(l,o)=>{let s=e.ref.list.childViews[0].childViews.filter(c=>c.rect.element.height),p=e.query("GET_ACTIVE_ITEMS").map(c=>s.find(d=>d.id===c.id)).filter(c=>c);Ae("ADD_ITEMS",l,{dispatch:e.dispatch}).then(c=>{if(na(e,c))return!1;e.dispatch("ADD_ITEMS",{items:c,index:$d(e.ref.list,p,o),interactionMethod:Re.DROP})}),e.dispatch("DID_DROP",{position:o}),e.dispatch("DID_END_DRAG",{position:o})},n.ondragstart=l=>{e.dispatch("DID_START_DRAG",{position:l})},n.ondrag=tl(l=>{e.dispatch("DID_DRAG",{position:l})}),n.ondragend=l=>{e.dispatch("DID_END_DRAG",{position:l})},e.ref.hopper=n,e.ref.drip=e.appendChildView(e.createChildView(ed))}else!a&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removeChildView(e.ref.drip))},gn=(e,t)=>{let i=e.query("GET_ALLOW_BROWSE"),a=e.query("GET_DISABLED"),n=i&&!a;n&&!e.ref.browser?e.ref.browser=e.appendChildView(e.createChildView(Hc,{...t,onload:l=>{Ae("ADD_ITEMS",l,{dispatch:e.dispatch}).then(o=>{if(na(e,o))return!1;e.dispatch("ADD_ITEMS",{items:o,index:-1,interactionMethod:Re.BROWSE})})}}),0):!n&&e.ref.browser&&(e.removeChildView(e.ref.browser),e.ref.browser=null)},fn=e=>{let t=e.query("GET_ALLOW_PASTE"),i=e.query("GET_DISABLED"),a=t&&!i;a&&!e.ref.paster?(e.ref.paster=Dd(),e.ref.paster.onload=n=>{Ae("ADD_ITEMS",n,{dispatch:e.dispatch}).then(l=>{if(na(e,l))return!1;e.dispatch("ADD_ITEMS",{items:l,index:-1,interactionMethod:Re.PASTE})})}):!a&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},Xd=fe({DID_SET_ALLOW_BROWSE:({root:e,props:t})=>{gn(e,t)},DID_SET_ALLOW_DROP:({root:e})=>{un(e)},DID_SET_ALLOW_PASTE:({root:e})=>{fn(e)},DID_SET_DISABLED:({root:e,props:t})=>{un(e),fn(e),gn(e,t),e.query("GET_DISABLED")?e.element.dataset.disabled="disabled":e.element.removeAttribute("data-disabled")}}),Kd=ne({name:"root",read:({root:e})=>{e.ref.measure&&(e.ref.measureHeight=e.ref.measure.offsetHeight)},create:Wd,write:Hd,destroy:({root:e})=>{e.ref.paster&&e.ref.paster.destroy(),e.ref.hopper&&e.ref.hopper.destroy(),e.element.removeEventListener("touchmove",si),e.element.removeEventListener("gesturestart",si)},mixins:{styles:["height"]}}),Qd=(e={})=>{let t=null,i=oi(),a=gr(Jr(i),[bs,is(i)],[Us,ts(i)]);a.dispatch("SET_OPTIONS",{options:e});let n=()=>{document.hidden||a.dispatch("KICK")};document.addEventListener("visibilitychange",n);let l=null,o=!1,r=!1,s=null,p=null,c=()=>{o||(o=!0),clearTimeout(l),l=setTimeout(()=>{o=!1,s=null,p=null,r&&(r=!1,a.dispatch("DID_STOP_RESIZE"))},500)};window.addEventListener("resize",c);let d=Kd(a,{id:qi()}),m=!1,u=!1,g={_read:()=>{o&&(p=window.innerWidth,s||(s=p),!r&&p!==s&&(a.dispatch("DID_START_RESIZE"),r=!0)),u&&m&&(m=d.element.offsetParent===null),!m&&(d._read(),u=d.rect.element.hidden)},_write:S=>{let L=a.processActionQueue().filter(D=>!/^SET_/.test(D.type));m&&!L.length||(b(L),m=d._write(S,L,r),ls(a.query("GET_ITEMS")),m&&a.processDispatchQueue())}},f=S=>L=>{let D={type:S};if(!L)return D;if(L.hasOwnProperty("error")&&(D.error=L.error?{...L.error}:null),L.status&&(D.status={...L.status}),L.file&&(D.output=L.file),L.source)D.file=L.source;else if(L.item||L.id){let F=L.item?L.item:a.query("GET_ITEM",L.id);D.file=F?he(F):null}return L.items&&(D.items=L.items.map(he)),/progress/.test(S)&&(D.progress=L.progress),L.hasOwnProperty("origin")&&L.hasOwnProperty("target")&&(D.origin=L.origin,D.target=L.target),D},h={DID_DESTROY:f("destroy"),DID_INIT:f("init"),DID_THROW_MAX_FILES:f("warning"),DID_INIT_ITEM:f("initfile"),DID_START_ITEM_LOAD:f("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:f("addfileprogress"),DID_LOAD_ITEM:f("addfile"),DID_THROW_ITEM_INVALID:[f("error"),f("addfile")],DID_THROW_ITEM_LOAD_ERROR:[f("error"),f("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[f("error"),f("removefile")],DID_PREPARE_OUTPUT:f("preparefile"),DID_START_ITEM_PROCESSING:f("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:f("processfileprogress"),DID_ABORT_ITEM_PROCESSING:f("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:f("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:f("processfiles"),DID_REVERT_ITEM_PROCESSING:f("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[f("error"),f("processfile")],DID_REMOVE_ITEM:f("removefile"),DID_UPDATE_ITEMS:f("updatefiles"),DID_ACTIVATE_ITEM:f("activatefile"),DID_REORDER_ITEMS:f("reorderfiles")},I=S=>{let L={pond:O,...S};delete L.type,d.element.dispatchEvent(new CustomEvent(`FilePond:${S.type}`,{detail:L,bubbles:!0,cancelable:!0,composed:!0}));let D=[];S.hasOwnProperty("error")&&D.push(S.error),S.hasOwnProperty("file")&&D.push(S.file);let F=["type","error","file"];Object.keys(S).filter(C=>!F.includes(C)).forEach(C=>D.push(S[C])),O.fire(S.type,...D);let G=a.query(`GET_ON${S.type.toUpperCase()}`);G&&G(...D)},b=S=>{S.length&&S.filter(L=>h[L.type]).forEach(L=>{let D=h[L.type];(Array.isArray(D)?D:[D]).forEach(F=>{L.type==="DID_INIT_ITEM"?I(F(L.data)):setTimeout(()=>{I(F(L.data))},0)})})},T=S=>a.dispatch("SET_OPTIONS",{options:S}),v=S=>a.query("GET_ACTIVE_ITEM",S),y=S=>new Promise((L,D)=>{a.dispatch("REQUEST_ITEM_PREPARE",{query:S,success:F=>{L(F)},failure:F=>{D(F)}})}),E=(S,L={})=>new Promise((D,F)=>{R([{source:S,options:L}],{index:L.index}).then(G=>D(G&&G[0])).catch(F)}),_=S=>S.file&&S.id,x=(S,L)=>(typeof S=="object"&&!_(S)&&!L&&(L=S,S=void 0),a.dispatch("REMOVE_ITEM",{...L,query:S}),a.query("GET_ACTIVE_ITEM",S)===null),R=(...S)=>new Promise((L,D)=>{let F=[],G={};if(ci(S[0]))F.push.apply(F,S[0]),Object.assign(G,S[1]||{});else{let C=S[S.length-1];typeof C=="object"&&!(C instanceof Blob)&&Object.assign(G,S.pop()),F.push(...S)}a.dispatch("ADD_ITEMS",{items:F,index:G.index,interactionMethod:Re.API,success:L,failure:D})}),z=()=>a.query("GET_ACTIVE_ITEMS"),P=S=>new Promise((L,D)=>{a.dispatch("REQUEST_ITEM_PROCESSING",{query:S,success:F=>{L(F)},failure:F=>{D(F)}})}),A=(...S)=>{let L=Array.isArray(S[0])?S[0]:S,D=L.length?L:z();return Promise.all(D.map(y))},B=(...S)=>{let L=Array.isArray(S[0])?S[0]:S;if(!L.length){let D=z().filter(F=>!(F.status===U.IDLE&&F.origin===se.LOCAL)&&F.status!==U.PROCESSING&&F.status!==U.PROCESSING_COMPLETE&&F.status!==U.PROCESSING_REVERT_ERROR);return Promise.all(D.map(P))}return Promise.all(L.map(P))},w=(...S)=>{let L=Array.isArray(S[0])?S[0]:S,D;typeof L[L.length-1]=="object"?D=L.pop():Array.isArray(S[0])&&(D=S[1]);let F=z();return L.length?L.map(C=>$e(C)?F[C]?F[C].id:null:C).filter(C=>C).map(C=>x(C,D)):Promise.all(F.map(C=>x(C,D)))},O={...mi(),...g,...es(a,i),setOptions:T,addFile:E,addFiles:R,getFile:v,processFile:P,prepareFile:y,removeFile:x,moveFile:(S,L)=>a.dispatch("MOVE_ITEM",{query:S,index:L}),getFiles:z,processFiles:B,removeFiles:w,prepareFiles:A,sort:S=>a.dispatch("SORT",{compare:S}),browse:()=>{var S=d.element.querySelector("input[type=file]");S&&S.click()},destroy:()=>{O.fire("destroy",d.element),a.dispatch("ABORT_ALL"),d._destroy(),window.removeEventListener("resize",c),document.removeEventListener("visibilitychange",n),a.dispatch("DID_DESTROY")},insertBefore:S=>Ba(d.element,S),insertAfter:S=>Na(d.element,S),appendTo:S=>S.appendChild(d.element),replaceElement:S=>{Ba(d.element,S),S.parentNode.removeChild(S),t=S},restoreElement:()=>{t&&(Na(t,d.element),d.element.parentNode.removeChild(d.element),t=null)},isAttachedTo:S=>d.element===S||t===S,element:{get:()=>d.element},status:{get:()=>a.query("GET_STATUS")}};return a.dispatch("DID_INIT"),We(O)},il=(e={})=>{let t={};return te(oi(),(a,n)=>{t[a]=n[0]}),Qd({...t,...e})},Zd=e=>e.charAt(0).toLowerCase()+e.slice(1),Jd=e=>el(e.replace(/^data-/,"")),al=(e,t)=>{te(t,(i,a)=>{te(e,(n,l)=>{let o=new RegExp(i);if(!o.test(n)||(delete e[n],a===!1))return;if(ge(a)){e[a]=l;return}let s=a.group;de(a)&&!e[s]&&(e[s]={}),e[s][Zd(n.replace(o,""))]=l}),a.mapping&&al(e[a.group],a.mapping)})},ep=(e,t={})=>{let i=[];te(e.attributes,n=>{i.push(e.attributes[n])});let a=i.filter(n=>n.name).reduce((n,l)=>{let o=ce(e,l.name);return n[Jd(l.name)]=o===l.name?!0:o,n},{});return al(a,t),a},tp=(e,t={})=>{let i={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};tt("SET_ATTRIBUTE_TO_OPTION_MAP",i);let a={...t},n=ep(e.nodeName==="FIELDSET"?e.querySelector("input[type=file]"):e,i);Object.keys(n).forEach(o=>{de(n[o])?(de(a[o])||(a[o]={}),Object.assign(a[o],n[o])):a[o]=n[o]}),a.files=(t.files||[]).concat(Array.from(e.querySelectorAll("input:not([type=file])")).map(o=>({source:o.value,options:{type:o.dataset.type}})));let l=il(a);return e.files&&Array.from(e.files).forEach(o=>{l.addFile(o)}),l.replaceElement(e),l},ip=(...e)=>ur(e[0])?tp(...e):il(...e),ap=["fire","_read","_write"],hn=e=>{let t={};return Rn(e,t,ap),t},np=(e,t)=>e.replace(/(?:{([a-zA-Z]+)})/g,(i,a)=>t[a]),lp=e=>{let t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),i=URL.createObjectURL(t),a=new Worker(i);return{transfer:(n,l)=>{},post:(n,l,o)=>{let r=qi();a.onmessage=s=>{s.data.id===r&&l(s.data.message)},a.postMessage({id:r,message:n},o)},terminate:()=>{a.terminate(),URL.revokeObjectURL(i)}}},op=e=>new Promise((t,i)=>{let a=new Image;a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),nl=(e,t)=>{let i=e.slice(0,e.size,e.type);return i.lastModifiedDate=e.lastModifiedDate,i.name=t,i},rp=e=>nl(e,e.name),bn=[],sp=e=>{if(bn.includes(e))return;bn.push(e);let t=e({addFilter:rs,utils:{Type:M,forin:te,isString:ge,isFile:Je,toNaturalFileSize:Bn,replaceInString:np,getExtensionFromFilename:ui,getFilenameWithoutExtension:Fn,guesstimateMimeType:$n,getFileFromBlob:ht,getFilenameFromURL:Dt,createRoute:fe,createWorker:lp,createView:ne,createItemAPI:he,loadImage:op,copyFile:rp,renameFile:nl,createBlob:Pn,applyFilterChain:Ae,text:ae,getNumericAspectRatioFromString:wn},views:{fileActionButton:Cn}});ss(t.options)},cp=()=>Object.prototype.toString.call(window.operamini)==="[object OperaMini]",dp=()=>"Promise"in window,pp=()=>"slice"in Blob.prototype,mp=()=>"URL"in window&&"createObjectURL"in window.URL,up=()=>"visibilityState"in document,gp=()=>"performance"in window,fp=()=>"supports"in(window.CSS||{}),hp=()=>/MSIE|Trident/.test(window.navigator.userAgent),Gi=(()=>{let e=En()&&!cp()&&up()&&dp()&&pp()&&mp()&&gp()&&(fp()||hp());return()=>e})(),Ue={apps:[]},bp="filepond",it=()=>{},ll={},Et={},Ct={},Ui={},gt=it,ft=it,Wi=it,Hi=it,ve=it,ji=it,Ft=it;if(Gi()){kr(()=>{Ue.apps.forEach(i=>i._read())},i=>{Ue.apps.forEach(a=>a._write(i))});let e=()=>{document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:Gi,create:gt,destroy:ft,parse:Wi,find:Hi,registerPlugin:ve,setOptions:Ft}})),document.removeEventListener("DOMContentLoaded",e)};document.readyState!=="loading"?setTimeout(()=>e(),0):document.addEventListener("DOMContentLoaded",e);let t=()=>te(oi(),(i,a)=>{Ui[i]=a[1]});ll={...Ln},Ct={...se},Et={...U},Ui={},t(),gt=(...i)=>{let a=ip(...i);return a.on("destroy",ft),Ue.apps.push(a),hn(a)},ft=i=>{let a=Ue.apps.findIndex(n=>n.isAttachedTo(i));return a>=0?(Ue.apps.splice(a,1)[0].restoreElement(),!0):!1},Wi=i=>Array.from(i.querySelectorAll(`.${bp}`)).filter(l=>!Ue.apps.find(o=>o.isAttachedTo(l))).map(l=>gt(l)),Hi=i=>{let a=Ue.apps.find(n=>n.isAttachedTo(i));return a?hn(a):null},ve=(...i)=>{i.forEach(sp),t()},ji=()=>{let i={};return te(oi(),(a,n)=>{i[a]=n[0]}),i},Ft=i=>(de(i)&&(Ue.apps.forEach(a=>{a.setOptions(i)}),cs(i)),ji())}function ol(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),i.push.apply(i,a)}return i}function xl(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,a=new Array(t);i
',Dp=Number.isNaN||De.isNaN;function j(e){return typeof e=="number"&&!Dp(e)}var Tl=function(t){return t>0&&t<1/0};function oa(e){return typeof e>"u"}function lt(e){return sa(e)==="object"&&e!==null}var Cp=Object.prototype.hasOwnProperty;function It(e){if(!lt(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&Cp.call(i,"isPrototypeOf")}catch{return!1}}function be(e){return typeof e=="function"}var Bp=Array.prototype.slice;function zl(e){return Array.from?Array.from(e):Bp.call(e)}function le(e,t){return e&&be(t)&&(Array.isArray(e)||j(e.length)?zl(e).forEach(function(i,a){t.call(e,i,a,e)}):lt(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)})),e}var J=Object.assign||function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n0&&a.forEach(function(l){lt(l)&&Object.keys(l).forEach(function(o){t[o]=l[o]})}),t},Np=/\.\d*(?:0|9){12}\d*$/;function xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Np.test(e)?Math.round(e*t)/t:e}var kp=/^width|height|left|top|marginLeft|marginTop$/;function je(e,t){var i=e.style;le(t,function(a,n){kp.test(n)&&j(a)&&(a="".concat(a,"px")),i[n]=a})}function Vp(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function pe(e,t){if(t){if(j(e.length)){le(e,function(a){pe(a,t)});return}if(e.classList){e.classList.add(t);return}var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function Fe(e,t){if(t){if(j(e.length)){le(e,function(i){Fe(i,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function vt(e,t,i){if(t){if(j(e.length)){le(e,function(a){vt(a,t,i)});return}i?pe(e,t):Fe(e,t)}}var Gp=/([a-z\d])([A-Z])/g;function xa(e){return e.replace(Gp,"$1-$2").toLowerCase()}function ba(e,t){return lt(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(xa(t)))}function Wt(e,t,i){lt(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(xa(t)),i)}function Up(e,t){if(lt(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(xa(t)))}var Ol=/\s\s*/,Fl=function(){var e=!1;if(Ti){var t=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(l){t=l}});De.addEventListener("test",i,a),De.removeEventListener("test",i,a)}return e}();function Oe(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;t.trim().split(Ol).forEach(function(l){if(!Fl){var o=e.listeners;o&&o[l]&&o[l][i]&&(n=o[l][i],delete o[l][i],Object.keys(o[l]).length===0&&delete o[l],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(l,n,a)})}function Se(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;t.trim().split(Ol).forEach(function(l){if(a.once&&!Fl){var o=e.listeners,r=o===void 0?{}:o;n=function(){delete r[l][i],e.removeEventListener(l,n,a);for(var p=arguments.length,c=new Array(p),d=0;dMath.abs(i)&&(i=m)})}),i}function bi(e,t){var i=e.pageX,a=e.pageY,n={endX:i,endY:a};return t?n:xl({startX:i,startY:a},n)}function jp(e){var t=0,i=0,a=0;return le(e,function(n){var l=n.startX,o=n.startY;t+=l,i+=o,a+=1}),t/=a,i/=a,{pageX:t,pageY:i}}function Ye(e){var t=e.aspectRatio,i=e.height,a=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",l=Tl(a),o=Tl(i);if(l&&o){var r=i*t;n==="contain"&&r>a||n==="cover"&&r90?{width:s,height:r}:{width:r,height:s}}function qp(e,t,i,a){var n=t.aspectRatio,l=t.naturalWidth,o=t.naturalHeight,r=t.rotate,s=r===void 0?0:r,p=t.scaleX,c=p===void 0?1:p,d=t.scaleY,m=d===void 0?1:d,u=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,h=a.fillColor,I=h===void 0?"transparent":h,b=a.imageSmoothingEnabled,T=b===void 0?!0:b,v=a.imageSmoothingQuality,y=v===void 0?"low":v,E=a.maxWidth,_=E===void 0?1/0:E,x=a.maxHeight,R=x===void 0?1/0:x,z=a.minWidth,P=z===void 0?0:z,A=a.minHeight,B=A===void 0?0:A,w=document.createElement("canvas"),O=w.getContext("2d"),S=Ye({aspectRatio:u,width:_,height:R}),L=Ye({aspectRatio:u,width:P,height:B},"cover"),D=Math.min(S.width,Math.max(L.width,g)),F=Math.min(S.height,Math.max(L.height,f)),G=Ye({aspectRatio:n,width:_,height:R}),C=Ye({aspectRatio:n,width:P,height:B},"cover"),q=Math.min(G.width,Math.max(C.width,l)),X=Math.min(G.height,Math.max(C.height,o)),K=[-q/2,-X/2,q,X];return w.width=xt(D),w.height=xt(F),O.fillStyle=I,O.fillRect(0,0,D,F),O.save(),O.translate(D/2,F/2),O.rotate(s*Math.PI/180),O.scale(c,m),O.imageSmoothingEnabled=T,O.imageSmoothingQuality=y,O.drawImage.apply(O,[e].concat(Rl(K.map(function(oe){return Math.floor(xt(oe))})))),O.restore(),w}var Cl=String.fromCharCode;function $p(e,t,i){var a="";i+=t;for(var n=t;n0;)i.push(Cl.apply(null,zl(n.subarray(0,a)))),n=n.subarray(a);return"data:".concat(t,";base64,").concat(btoa(i.join("")))}function Zp(e){var t=new DataView(e),i;try{var a,n,l;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,r=2;r+1=8&&(l=p+d)}}}if(l){var m=t.getUint16(l,a),u,g;for(g=0;g=0?l:Al),height:Math.max(a.offsetHeight,o>=0?o:Pl)};this.containerData=r,je(n,{width:r.width,height:r.height}),pe(t,Ee),Fe(n,Ee)},initCanvas:function(){var t=this.containerData,i=this.imageData,a=this.options.viewMode,n=Math.abs(i.rotate)%180===90,l=n?i.naturalHeight:i.naturalWidth,o=n?i.naturalWidth:i.naturalHeight,r=l/o,s=t.width,p=t.height;t.height*r>t.width?a===3?s=t.height*r:p=t.width/r:a===3?p=t.width/r:s=t.height*r;var c={aspectRatio:r,naturalWidth:l,naturalHeight:o,width:s,height:p};this.canvasData=c,this.limited=a===1||a===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=J({},c)},limitCanvas:function(t,i){var a=this.options,n=this.containerData,l=this.canvasData,o=this.cropBoxData,r=a.viewMode,s=l.aspectRatio,p=this.cropped&&o;if(t){var c=Number(a.minCanvasWidth)||0,d=Number(a.minCanvasHeight)||0;r>1?(c=Math.max(c,n.width),d=Math.max(d,n.height),r===3&&(d*s>c?c=d*s:d=c/s)):r>0&&(c?c=Math.max(c,p?o.width:0):d?d=Math.max(d,p?o.height:0):p&&(c=o.width,d=o.height,d*s>c?c=d*s:d=c/s));var m=Ye({aspectRatio:s,width:c,height:d});c=m.width,d=m.height,l.minWidth=c,l.minHeight=d,l.maxWidth=1/0,l.maxHeight=1/0}if(i)if(r>(p?0:1)){var u=n.width-l.width,g=n.height-l.height;l.minLeft=Math.min(0,u),l.minTop=Math.min(0,g),l.maxLeft=Math.max(0,u),l.maxTop=Math.max(0,g),p&&this.limited&&(l.minLeft=Math.min(o.left,o.left+(o.width-l.width)),l.minTop=Math.min(o.top,o.top+(o.height-l.height)),l.maxLeft=o.left,l.maxTop=o.top,r===2&&(l.width>=n.width&&(l.minLeft=Math.min(0,u),l.maxLeft=Math.max(0,u)),l.height>=n.height&&(l.minTop=Math.min(0,g),l.maxTop=Math.max(0,g))))}else l.minLeft=-l.width,l.minTop=-l.height,l.maxLeft=n.width,l.maxTop=n.height},renderCanvas:function(t,i){var a=this.canvasData,n=this.imageData;if(i){var l=Yp({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=l.width,r=l.height,s=a.width*(o/a.naturalWidth),p=a.height*(r/a.naturalHeight);a.left-=(s-a.width)/2,a.top-=(p-a.height)/2,a.width=s,a.height=p,a.aspectRatio=o/r,a.naturalWidth=o,a.naturalHeight=r,this.limitCanvas(!0,!1)}(a.width>a.maxWidth||a.widtha.maxHeight||a.heighti.width?l.height=l.width/a:l.width=l.height*a),this.cropBoxData=l,this.limitCropBox(!0,!0),l.width=Math.min(Math.max(l.width,l.minWidth),l.maxWidth),l.height=Math.min(Math.max(l.height,l.minHeight),l.maxHeight),l.width=Math.max(l.minWidth,l.width*n),l.height=Math.max(l.minHeight,l.height*n),l.left=i.left+(i.width-l.width)/2,l.top=i.top+(i.height-l.height)/2,l.oldLeft=l.left,l.oldTop=l.top,this.initialCropBoxData=J({},l)},limitCropBox:function(t,i){var a=this.options,n=this.containerData,l=this.canvasData,o=this.cropBoxData,r=this.limited,s=a.aspectRatio;if(t){var p=Number(a.minCropBoxWidth)||0,c=Number(a.minCropBoxHeight)||0,d=r?Math.min(n.width,l.width,l.width+l.left,n.width-l.left):n.width,m=r?Math.min(n.height,l.height,l.height+l.top,n.height-l.top):n.height;p=Math.min(p,n.width),c=Math.min(c,n.height),s&&(p&&c?c*s>p?c=p/s:p=c*s:p?c=p/s:c&&(p=c*s),m*s>d?m=d/s:d=m*s),o.minWidth=Math.min(p,d),o.minHeight=Math.min(c,m),o.maxWidth=d,o.maxHeight=m}i&&(r?(o.minLeft=Math.max(0,l.left),o.minTop=Math.max(0,l.top),o.maxLeft=Math.min(n.width,l.left+l.width)-o.width,o.maxTop=Math.min(n.height,l.top+l.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,i=this.containerData,a=this.cropBoxData;(a.width>a.maxWidth||a.widtha.maxHeight||a.height=i.width&&a.height>=i.height?_l:Ia),je(this.cropBox,J({width:a.width,height:a.height},Gt({translateX:a.left,translateY:a.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),yt(this.element,ma,this.getData())}},tm={initPreview:function(){var t=this.element,i=this.crossOrigin,a=this.options.preview,n=i?this.crossOriginUrl:this.url,l=t.alt||"The image to preview",o=document.createElement("img");if(i&&(o.crossOrigin=i),o.src=n,o.alt=l,this.viewBox.appendChild(o),this.viewBoxImage=o,!!a){var r=a;typeof a=="string"?r=t.ownerDocument.querySelectorAll(a):a.querySelector&&(r=[a]),this.previews=r,le(r,function(s){var p=document.createElement("img");Wt(s,hi,{width:s.offsetWidth,height:s.offsetHeight,html:s.innerHTML}),i&&(p.crossOrigin=i),p.src=n,p.alt=l,p.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',s.innerHTML="",s.appendChild(p)})}},resetPreview:function(){le(this.previews,function(t){var i=ba(t,hi);je(t,{width:i.width,height:i.height}),t.innerHTML=i.html,Up(t,hi)})},preview:function(){var t=this.imageData,i=this.canvasData,a=this.cropBoxData,n=a.width,l=a.height,o=t.width,r=t.height,s=a.left-i.left-t.left,p=a.top-i.top-t.top;!this.cropped||this.disabled||(je(this.viewBoxImage,J({width:o,height:r},Gt(J({translateX:-s,translateY:-p},t)))),le(this.previews,function(c){var d=ba(c,hi),m=d.width,u=d.height,g=m,f=u,h=1;n&&(h=m/n,f=l*h),l&&f>u&&(h=u/l,g=n*h,f=u),je(c,{width:g,height:f}),je(c.getElementsByTagName("img")[0],J({width:o*h,height:r*h},Gt(J({translateX:-s*h,translateY:-p*h},t))))}))}},im={bind:function(){var t=this.element,i=this.options,a=this.cropper;be(i.cropstart)&&Se(t,fa,i.cropstart),be(i.cropmove)&&Se(t,ga,i.cropmove),be(i.cropend)&&Se(t,ua,i.cropend),be(i.crop)&&Se(t,ma,i.crop),be(i.zoom)&&Se(t,ha,i.zoom),Se(a,pl,this.onCropStart=this.cropStart.bind(this)),i.zoomable&&i.zoomOnWheel&&Se(a,hl,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&Se(a,dl,this.onDblclick=this.dblclick.bind(this)),Se(t.ownerDocument,ml,this.onCropMove=this.cropMove.bind(this)),Se(t.ownerDocument,ul,this.onCropEnd=this.cropEnd.bind(this)),i.responsive&&Se(window,fl,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,i=this.options,a=this.cropper;be(i.cropstart)&&Oe(t,fa,i.cropstart),be(i.cropmove)&&Oe(t,ga,i.cropmove),be(i.cropend)&&Oe(t,ua,i.cropend),be(i.crop)&&Oe(t,ma,i.crop),be(i.zoom)&&Oe(t,ha,i.zoom),Oe(a,pl,this.onCropStart),i.zoomable&&i.zoomOnWheel&&Oe(a,hl,this.onWheel,{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&Oe(a,dl,this.onDblclick),Oe(t.ownerDocument,ml,this.onCropMove),Oe(t.ownerDocument,ul,this.onCropEnd),i.responsive&&Oe(window,fl,this.onResize)}},am={resize:function(){if(!this.disabled){var t=this.options,i=this.container,a=this.containerData,n=i.offsetWidth/a.width,l=i.offsetHeight/a.height,o=Math.abs(n-1)>Math.abs(l-1)?n:l;if(o!==1){var r,s;t.restore&&(r=this.getCanvasData(),s=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(le(r,function(p,c){r[c]=p*o})),this.setCropBoxData(le(s,function(p,c){s[c]=p*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===Ml||this.setDragMode(Vp(this.dragBox,da)?Ll:va)},wheel:function(t){var i=this,a=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){i.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*a,t)))},cropStart:function(t){var i=t.buttons,a=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(j(i)&&i!==1||j(a)&&a!==0||t.ctrlKey))){var n=this.options,l=this.pointers,o;t.changedTouches?le(t.changedTouches,function(r){l[r.identifier]=bi(r)}):l[t.pointerId||0]=bi(t),Object.keys(l).length>1&&n.zoomable&&n.zoomOnTouch?o=wl:o=ba(t.target,Ut),Ap.test(o)&&yt(this.element,fa,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===Sl&&(this.cropping=!0,pe(this.dragBox,Ei)))}},cropMove:function(t){var i=this.action;if(!(this.disabled||!i)){var a=this.pointers;t.preventDefault(),yt(this.element,ga,{originalEvent:t,action:i})!==!1&&(t.changedTouches?le(t.changedTouches,function(n){J(a[n.identifier]||{},bi(n,!0))}):J(a[t.pointerId||0]||{},bi(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var i=this.action,a=this.pointers;t.changedTouches?le(t.changedTouches,function(n){delete a[n.identifier]}):delete a[t.pointerId||0],i&&(t.preventDefault(),Object.keys(a).length||(this.action=""),this.cropping&&(this.cropping=!1,vt(this.dragBox,Ei,this.cropped&&this.options.modal)),yt(this.element,ua,{originalEvent:t,action:i}))}}},nm={change:function(t){var i=this.options,a=this.canvasData,n=this.containerData,l=this.cropBoxData,o=this.pointers,r=this.action,s=i.aspectRatio,p=l.left,c=l.top,d=l.width,m=l.height,u=p+d,g=c+m,f=0,h=0,I=n.width,b=n.height,T=!0,v;!s&&t.shiftKey&&(s=d&&m?d/m:1),this.limited&&(f=l.minLeft,h=l.minTop,I=f+Math.min(n.width,a.width,a.left+a.width),b=h+Math.min(n.height,a.height,a.top+a.height));var y=o[Object.keys(o)[0]],E={x:y.endX-y.startX,y:y.endY-y.startY},_=function(R){switch(R){case at:u+E.x>I&&(E.x=I-u);break;case nt:p+E.xb&&(E.y=b-g);break}};switch(r){case Ia:p+=E.x,c+=E.y;break;case at:if(E.x>=0&&(u>=I||s&&(c<=h||g>=b))){T=!1;break}_(at),d+=E.x,d<0&&(r=nt,d=-d,p-=d),s&&(m=d/s,c+=(l.height-m)/2);break;case He:if(E.y<=0&&(c<=h||s&&(p<=f||u>=I))){T=!1;break}_(He),m-=E.y,c+=E.y,m<0&&(r=Tt,m=-m,c-=m),s&&(d=m*s,p+=(l.width-d)/2);break;case nt:if(E.x<=0&&(p<=f||s&&(c<=h||g>=b))){T=!1;break}_(nt),d-=E.x,p+=E.x,d<0&&(r=at,d=-d,p-=d),s&&(m=d/s,c+=(l.height-m)/2);break;case Tt:if(E.y>=0&&(g>=b||s&&(p<=f||u>=I))){T=!1;break}_(Tt),m+=E.y,m<0&&(r=He,m=-m,c-=m),s&&(d=m*s,p+=(l.width-d)/2);break;case Bt:if(s){if(E.y<=0&&(c<=h||u>=I)){T=!1;break}_(He),m-=E.y,c+=E.y,d=m*s}else _(He),_(at),E.x>=0?uh&&(m-=E.y,c+=E.y):(m-=E.y,c+=E.y);d<0&&m<0?(r=Vt,m=-m,d=-d,c-=m,p-=d):d<0?(r=Nt,d=-d,p-=d):m<0&&(r=kt,m=-m,c-=m);break;case Nt:if(s){if(E.y<=0&&(c<=h||p<=f)){T=!1;break}_(He),m-=E.y,c+=E.y,d=m*s,p+=l.width-d}else _(He),_(nt),E.x<=0?p>f?(d-=E.x,p+=E.x):E.y<=0&&c<=h&&(T=!1):(d-=E.x,p+=E.x),E.y<=0?c>h&&(m-=E.y,c+=E.y):(m-=E.y,c+=E.y);d<0&&m<0?(r=kt,m=-m,d=-d,c-=m,p-=d):d<0?(r=Bt,d=-d,p-=d):m<0&&(r=Vt,m=-m,c-=m);break;case Vt:if(s){if(E.x<=0&&(p<=f||g>=b)){T=!1;break}_(nt),d-=E.x,p+=E.x,m=d/s}else _(Tt),_(nt),E.x<=0?p>f?(d-=E.x,p+=E.x):E.y>=0&&g>=b&&(T=!1):(d-=E.x,p+=E.x),E.y>=0?g=0&&(u>=I||g>=b)){T=!1;break}_(at),d+=E.x,m=d/s}else _(Tt),_(at),E.x>=0?u=0&&g>=b&&(T=!1):d+=E.x,E.y>=0?g0?r=E.y>0?kt:Bt:E.x<0&&(p-=d,r=E.y>0?Vt:Nt),E.y<0&&(c-=m),this.cropped||(Fe(this.cropBox,Ee),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}T&&(l.width=d,l.height=m,l.left=p,l.top=c,this.action=r,this.renderCropBox()),le(o,function(x){x.startX=x.endX,x.startY=x.endY})}},lm={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&pe(this.dragBox,Ei),Fe(this.cropBox,Ee),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=J({},this.initialImageData),this.canvasData=J({},this.initialCanvasData),this.cropBoxData=J({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(J(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Fe(this.dragBox,Ei),pe(this.cropBox,Ee)),this},replace:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),i?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,le(this.previews,function(a){a.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Fe(this.cropper,sl)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,pe(this.cropper,sl)),this},destroy:function(){var t=this.element;return t[Z]?(t[Z]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.canvasData,n=a.left,l=a.top;return this.moveTo(oa(t)?t:n+Number(t),oa(i)?i:l+Number(i))},moveTo:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.canvasData,n=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.movable&&(j(t)&&(a.left=t,n=!0),j(i)&&(a.top=i,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,i){var a=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(a.width*t/a.naturalWidth,null,i)},zoomTo:function(t,i,a){var n=this.options,l=this.canvasData,o=l.width,r=l.height,s=l.naturalWidth,p=l.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var c=s*t,d=p*t;if(yt(this.element,ha,{ratio:t,oldRatio:o/s,originalEvent:a})===!1)return this;if(a){var m=this.pointers,u=Dl(this.cropper),g=m&&Object.keys(m).length?jp(m):{pageX:a.pageX,pageY:a.pageY};l.left-=(c-o)*((g.pageX-u.left-l.left)/o),l.top-=(d-r)*((g.pageY-u.top-l.top)/r)}else It(i)&&j(i.x)&&j(i.y)?(l.left-=(c-o)*((i.x-l.left)/o),l.top-=(d-r)*((i.y-l.top)/r)):(l.left-=(c-o)/2,l.top-=(d-r)/2);l.width=c,l.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),j(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var i=this.imageData.scaleY;return this.scale(t,j(i)?i:1)},scaleY:function(t){var i=this.imageData.scaleX;return this.scale(j(i)?i:1,t)},scale:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.imageData,n=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.scalable&&(j(t)&&(a.scaleX=t,n=!0),j(i)&&(a.scaleY=i,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.options,a=this.imageData,n=this.canvasData,l=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:l.left-n.left,y:l.top-n.top,width:l.width,height:l.height};var r=a.width/a.naturalWidth;if(le(o,function(c,d){o[d]=c/r}),t){var s=Math.round(o.y+o.height),p=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=p-o.x,o.height=s-o.y}}else o={x:0,y:0,width:0,height:0};return i.rotatable&&(o.rotate=a.rotate||0),i.scalable&&(o.scaleX=a.scaleX||1,o.scaleY=a.scaleY||1),o},setData:function(t){var i=this.options,a=this.imageData,n=this.canvasData,l={};if(this.ready&&!this.disabled&&It(t)){var o=!1;i.rotatable&&j(t.rotate)&&t.rotate!==a.rotate&&(a.rotate=t.rotate,o=!0),i.scalable&&(j(t.scaleX)&&t.scaleX!==a.scaleX&&(a.scaleX=t.scaleX,o=!0),j(t.scaleY)&&t.scaleY!==a.scaleY&&(a.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=a.width/a.naturalWidth;j(t.x)&&(l.left=t.x*r+n.left),j(t.y)&&(l.top=t.y*r+n.top),j(t.width)&&(l.width=t.width*r),j(t.height)&&(l.height=t.height*r),this.setCropBoxData(l)}return this},getContainerData:function(){return this.ready?J({},this.containerData):{}},getImageData:function(){return this.sized?J({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,i={};return this.ready&&le(["left","top","width","height","naturalWidth","naturalHeight"],function(a){i[a]=t[a]}),i},setCanvasData:function(t){var i=this.canvasData,a=i.aspectRatio;return this.ready&&!this.disabled&&It(t)&&(j(t.left)&&(i.left=t.left),j(t.top)&&(i.top=t.top),j(t.width)?(i.width=t.width,i.height=t.width/a):j(t.height)&&(i.height=t.height,i.width=t.height*a),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,i;return this.ready&&this.cropped&&(i={left:t.left,top:t.top,width:t.width,height:t.height}),i||{}},setCropBoxData:function(t){var i=this.cropBoxData,a=this.options.aspectRatio,n,l;return this.ready&&this.cropped&&!this.disabled&&It(t)&&(j(t.left)&&(i.left=t.left),j(t.top)&&(i.top=t.top),j(t.width)&&t.width!==i.width&&(n=!0,i.width=t.width),j(t.height)&&t.height!==i.height&&(l=!0,i.height=t.height),a&&(n?i.height=i.width/a:l&&(i.width=i.height*a)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var i=this.canvasData,a=qp(this.image,this.imageData,i,t);if(!this.cropped)return a;var n=this.getData(t.rounded),l=n.x,o=n.y,r=n.width,s=n.height,p=a.width/Math.floor(i.naturalWidth);p!==1&&(l*=p,o*=p,r*=p,s*=p);var c=r/s,d=Ye({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),m=Ye({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=Ye({aspectRatio:c,width:t.width||(p!==1?a.width:r),height:t.height||(p!==1?a.height:s)}),g=u.width,f=u.height;g=Math.min(d.width,Math.max(m.width,g)),f=Math.min(d.height,Math.max(m.height,f));var h=document.createElement("canvas"),I=h.getContext("2d");h.width=xt(g),h.height=xt(f),I.fillStyle=t.fillColor||"transparent",I.fillRect(0,0,g,f);var b=t.imageSmoothingEnabled,T=b===void 0?!0:b,v=t.imageSmoothingQuality;I.imageSmoothingEnabled=T,v&&(I.imageSmoothingQuality=v);var y=a.width,E=a.height,_=l,x=o,R,z,P,A,B,w;_<=-r||_>y?(_=0,R=0,P=0,B=0):_<=0?(P=-_,_=0,R=Math.min(y,r+_),B=R):_<=y&&(P=0,R=Math.min(r,y-_),B=R),R<=0||x<=-s||x>E?(x=0,z=0,A=0,w=0):x<=0?(A=-x,x=0,z=Math.min(E,s+x),w=z):x<=E&&(A=0,z=Math.min(s,E-x),w=z);var O=[_,x,R,z];if(B>0&&w>0){var S=g/r;O.push(P*S,A*S,B*S,w*S)}return I.drawImage.apply(I,[a].concat(Rl(O.map(function(L){return Math.floor(xt(L))})))),h},setAspectRatio:function(t){var i=this.options;return!this.disabled&&!oa(t)&&(i.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var i=this.options,a=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var l=t===va,o=i.movable&&t===Ll;t=l||o?t:Ml,i.dragMode=t,Wt(a,Ut,t),vt(a,da,l),vt(a,pa,o),i.cropBoxMovable||(Wt(n,Ut,t),vt(n,da,l),vt(n,pa,o))}return this}},om=De.Cropper,ya=function(){function e(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Tp(this,e),!t||!Op.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=J({},El,It(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Ip(e,[{key:"init",value:function(){var i=this.element,a=i.tagName.toLowerCase(),n;if(!i[Z]){if(i[Z]=this,a==="img"){if(this.isImg=!0,n=i.getAttribute("src")||"",this.originalUrl=n,!n)return;n=i.src}else a==="canvas"&&window.HTMLCanvasElement&&(n=i.toDataURL());this.load(n)}}},{key:"load",value:function(i){var a=this;if(i){this.url=i,this.imageData={};var n=this.element,l=this.options;if(!l.rotatable&&!l.scalable&&(l.checkOrientation=!1),!l.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Pp.test(i)){zp.test(i)?this.read(Kp(i)):this.clone();return}var o=new XMLHttpRequest,r=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=r,o.onerror=r,o.ontimeout=r,o.onprogress=function(){o.getResponseHeader("content-type")!==bl&&o.abort()},o.onload=function(){a.read(o.response)},o.onloadend=function(){a.reloading=!1,a.xhr=null},l.checkCrossOrigin&&Il(i)&&n.crossOrigin&&(i=vl(i)),o.open("GET",i,!0),o.responseType="arraybuffer",o.withCredentials=n.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(i){var a=this.options,n=this.imageData,l=Zp(i),o=0,r=1,s=1;if(l>1){this.url=Qp(i,bl);var p=Jp(l);o=p.rotate,r=p.scaleX,s=p.scaleY}a.rotatable&&(n.rotate=o),a.scalable&&(n.scaleX=r,n.scaleY=s),this.clone()}},{key:"clone",value:function(){var i=this.element,a=this.url,n=i.crossOrigin,l=a;this.options.checkCrossOrigin&&Il(a)&&(n||(n="anonymous"),l=vl(a)),this.crossOrigin=n,this.crossOriginUrl=l;var o=document.createElement("img");n&&(o.crossOrigin=n),o.src=l||a,o.alt=i.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),pe(o,cl),i.parentNode.insertBefore(o,i.nextSibling)}},{key:"start",value:function(){var i=this,a=this.image;a.onload=null,a.onerror=null,this.sizing=!0;var n=De.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(De.navigator.userAgent),l=function(p,c){J(i.imageData,{naturalWidth:p,naturalHeight:c,aspectRatio:p/c}),i.initialImageData=J({},i.imageData),i.sizing=!1,i.sized=!0,i.build()};if(a.naturalWidth&&!n){l(a.naturalWidth,a.naturalHeight);return}var o=document.createElement("img"),r=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){l(o.width,o.height),n||r.removeChild(o)},o.src=a.src,n||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(o))}},{key:"stop",value:function(){var i=this.image;i.onload=null,i.onerror=null,i.parentNode.removeChild(i),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var i=this.element,a=this.options,n=this.image,l=i.parentNode,o=document.createElement("div");o.innerHTML=Fp;var r=o.querySelector(".".concat(Z,"-container")),s=r.querySelector(".".concat(Z,"-canvas")),p=r.querySelector(".".concat(Z,"-drag-box")),c=r.querySelector(".".concat(Z,"-crop-box")),d=c.querySelector(".".concat(Z,"-face"));this.container=l,this.cropper=r,this.canvas=s,this.dragBox=p,this.cropBox=c,this.viewBox=r.querySelector(".".concat(Z,"-view-box")),this.face=d,s.appendChild(n),pe(i,Ee),l.insertBefore(r,i.nextSibling),Fe(n,cl),this.initPreview(),this.bind(),a.initialAspectRatio=Math.max(0,a.initialAspectRatio)||NaN,a.aspectRatio=Math.max(0,a.aspectRatio)||NaN,a.viewMode=Math.max(0,Math.min(3,Math.round(a.viewMode)))||0,pe(c,Ee),a.guides||pe(c.getElementsByClassName("".concat(Z,"-dashed")),Ee),a.center||pe(c.getElementsByClassName("".concat(Z,"-center")),Ee),a.background&&pe(r,"".concat(Z,"-bg")),a.highlight||pe(d,_p),a.cropBoxMovable&&(pe(d,pa),Wt(d,Ut,Ia)),a.cropBoxResizable||(pe(c.getElementsByClassName("".concat(Z,"-line")),Ee),pe(c.getElementsByClassName("".concat(Z,"-point")),Ee)),this.render(),this.ready=!0,this.setDragMode(a.dragMode),a.autoCrop&&this.crop(),this.setData(a.data),be(a.ready)&&Se(i,gl,a.ready,{once:!0}),yt(i,gl)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var i=this.cropper.parentNode;i&&i.removeChild(this.cropper),Fe(this.element,Ee)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=om,e}},{key:"setDefaults",value:function(i){J(El,It(i)&&i)}}])}();J(ya.prototype,em,tm,im,am,nm,lm);var Bl={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(Bl);var Nl=Bl;var kl={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(kl);var Vl=kl;var _e=function(e,t,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(e):a?a.value:t.get(e)},Rt,Ht,ot,Ra=class{constructor(...t){Rt.set(this,new Map),Ht.set(this,new Map),ot.set(this,new Map);for(let i of t)this.define(i)}define(t,i=!1){for(let[a,n]of Object.entries(t)){a=a.toLowerCase(),n=n.map(r=>r.toLowerCase()),_e(this,ot,"f").has(a)||_e(this,ot,"f").set(a,new Set);let l=_e(this,ot,"f").get(a),o=!0;for(let r of n){let s=r.startsWith("*");if(r=s?r.slice(1):r,l?.add(r),o&&_e(this,Ht,"f").set(a,r),o=!1,s)continue;let p=_e(this,Rt,"f").get(r);if(p&&p!=a&&!i)throw new Error(`"${a} -> ${r}" conflicts with "${p} -> ${r}". Pass \`force=true\` to override this definition.`);_e(this,Rt,"f").set(r,a)}}return this}getType(t){if(typeof t!="string")return null;let i=t.replace(/^.*[/\\]/,"").toLowerCase(),a=i.replace(/^.*\./,"").toLowerCase(),n=i.length{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(let t of _e(this,ot,"f").values())Object.freeze(t);return this}_getTestState(){return{types:_e(this,Rt,"f"),extensions:_e(this,Ht,"f")}}};Rt=new WeakMap,Ht=new WeakMap,ot=new WeakMap;var Sa=Ra;var Gl=new Sa(Vl,Nl)._freeze();var Ul=({addFilter:e,utils:t})=>{let{Type:i,replaceInString:a,toNaturalFileSize:n}=t;return e("ALLOW_HOPPER_ITEM",(l,{query:o})=>{if(!o("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;let r=o("GET_MAX_FILE_SIZE");if(r!==null&&l.size>r)return!1;let s=o("GET_MIN_FILE_SIZE");return!(s!==null&&l.sizenew Promise((r,s)=>{if(!o("GET_ALLOW_FILE_SIZE_VALIDATION"))return r(l);let p=o("GET_FILE_VALIDATE_SIZE_FILTER");if(p&&!p(l))return r(l);let c=o("GET_MAX_FILE_SIZE");if(c!==null&&l.size>c){s({status:{main:o("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:a(o("GET_LABEL_MAX_FILE_SIZE"),{filesize:n(c,".",o("GET_FILE_SIZE_BASE"),o("GET_FILE_SIZE_LABELS",o))})}});return}let d=o("GET_MIN_FILE_SIZE");if(d!==null&&l.sizeg+f.fileSize,0)>m){s({status:{main:o("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:a(o("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:n(m,".",o("GET_FILE_SIZE_BASE"),o("GET_FILE_SIZE_LABELS",o))})}});return}r(l)})),{options:{allowFileSizeValidation:[!0,i.BOOLEAN],maxFileSize:[null,i.INT],minFileSize:[null,i.INT],maxTotalFileSize:[null,i.INT],fileValidateSizeFilter:[null,i.FUNCTION],labelMinFileSizeExceeded:["File is too small",i.STRING],labelMinFileSize:["Minimum file size is {filesize}",i.STRING],labelMaxFileSizeExceeded:["File is too large",i.STRING],labelMaxFileSize:["Maximum file size is {filesize}",i.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",i.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",i.STRING]}}},rm=typeof window<"u"&&typeof window.document<"u";rm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Ul}));var Wl=Ul;var Hl=({addFilter:e,utils:t})=>{let{Type:i,isString:a,replaceInString:n,guesstimateMimeType:l,getExtensionFromFilename:o,getFilenameFromURL:r}=t,s=(u,g)=>{let f=(/^[^/]+/.exec(u)||[]).pop(),h=g.slice(0,-2);return f===h},p=(u,g)=>u.some(f=>/\*$/.test(f)?s(g,f):f===g),c=u=>{let g="";if(a(u)){let f=r(u),h=o(f);h&&(g=l(h))}else g=u.type;return g},d=(u,g,f)=>{if(g.length===0)return!0;let h=c(u);return f?new Promise((I,b)=>{f(u,h).then(T=>{p(g,T)?I():b()}).catch(b)}):p(g,h)},m=u=>g=>u[g]===null?!1:u[g]||g;return e("SET_ATTRIBUTE_TO_OPTION_MAP",u=>Object.assign(u,{accept:"acceptedFileTypes"})),e("ALLOW_HOPPER_ITEM",(u,{query:g})=>g("GET_ALLOW_FILE_TYPE_VALIDATION")?d(u,g("GET_ACCEPTED_FILE_TYPES")):!0),e("LOAD_FILE",(u,{query:g})=>new Promise((f,h)=>{if(!g("GET_ALLOW_FILE_TYPE_VALIDATION")){f(u);return}let I=g("GET_ACCEPTED_FILE_TYPES"),b=g("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),T=d(u,I,b),v=()=>{let y=I.map(m(g("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter(_=>_!==!1),E=y.filter((_,x)=>y.indexOf(_)===x);h({status:{main:g("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:n(g("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:E.join(", "),allButLastType:E.slice(0,-1).join(", "),lastType:E[E.length-1]})}})};if(typeof T=="boolean")return T?f(u):v();T.then(()=>{f(u)}).catch(v)})),{options:{allowFileTypeValidation:[!0,i.BOOLEAN],acceptedFileTypes:[[],i.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",i.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",i.STRING],fileValidateTypeLabelExpectedTypesMap:[{},i.OBJECT],fileValidateTypeDetectType:[null,i.FUNCTION]}}},sm=typeof window<"u"&&typeof window.document<"u";sm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Hl}));var jl=Hl;var Yl=e=>/^image/.test(e.type),ql=({addFilter:e,utils:t})=>{let{Type:i,isFile:a,getNumericAspectRatioFromString:n}=t,l=(p,c)=>!(!Yl(p.file)||!c("GET_ALLOW_IMAGE_CROP")),o=p=>typeof p=="object",r=p=>typeof p=="number",s=(p,c)=>p.setMetadata("crop",Object.assign({},p.getMetadata("crop"),c));return e("DID_CREATE_ITEM",(p,{query:c})=>{p.extend("setImageCrop",d=>{if(!(!l(p,c)||!o(center)))return p.setMetadata("crop",d),d}),p.extend("setImageCropCenter",d=>{if(!(!l(p,c)||!o(d)))return s(p,{center:d})}),p.extend("setImageCropZoom",d=>{if(!(!l(p,c)||!r(d)))return s(p,{zoom:Math.max(1,d)})}),p.extend("setImageCropRotation",d=>{if(!(!l(p,c)||!r(d)))return s(p,{rotation:d})}),p.extend("setImageCropFlip",d=>{if(!(!l(p,c)||!o(d)))return s(p,{flip:d})}),p.extend("setImageCropAspectRatio",d=>{if(!l(p,c)||typeof d>"u")return;let m=p.getMetadata("crop"),u=n(d),g={center:{x:.5,y:.5},flip:m?Object.assign({},m.flip):{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:u};return p.setMetadata("crop",g),g})}),e("DID_LOAD_ITEM",(p,{query:c})=>new Promise((d,m)=>{let u=p.file;if(!a(u)||!Yl(u)||!c("GET_ALLOW_IMAGE_CROP")||p.getMetadata("crop"))return d(p);let f=c("GET_IMAGE_CROP_ASPECT_RATIO");p.setMetadata("crop",{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:f?n(f):null}),d(p)})),{options:{allowImageCrop:[!0,i.BOOLEAN],imageCropAspectRatio:[null,i.STRING]}}},cm=typeof window<"u"&&typeof window.document<"u";cm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:ql}));var $l=ql;var _a=e=>/^image/.test(e.type),Xl=e=>{let{addFilter:t,utils:i,views:a}=e,{Type:n,createRoute:l,createItemAPI:o=c=>c}=i,{fileActionButton:r}=a;t("SHOULD_REMOVE_ON_REVERT",(c,{item:d,query:m})=>new Promise(u=>{let{file:g}=d,f=m("GET_ALLOW_IMAGE_EDIT")&&m("GET_IMAGE_EDIT_ALLOW_EDIT")&&_a(g);u(!f)})),t("DID_LOAD_ITEM",(c,{query:d,dispatch:m})=>new Promise((u,g)=>{if(c.origin>1){u(c);return}let{file:f}=c;if(!d("GET_ALLOW_IMAGE_EDIT")||!d("GET_IMAGE_EDIT_INSTANT_EDIT")){u(c);return}if(!_a(f)){u(c);return}let h=(b,T,v)=>y=>{s.shift(),y?T(b):v(b),m("KICK"),I()},I=()=>{if(!s.length)return;let{item:b,resolve:T,reject:v}=s[0];m("EDIT_ITEM",{id:b.id,handleEditorResponse:h(b,T,v)})};p({item:c,resolve:u,reject:g}),s.length===1&&I()})),t("DID_CREATE_ITEM",(c,{query:d,dispatch:m})=>{c.extend("edit",()=>{m("EDIT_ITEM",{id:c.id})})});let s=[],p=c=>(s.push(c),c);return t("CREATE_VIEW",c=>{let{is:d,view:m,query:u}=c;if(!u("GET_ALLOW_IMAGE_EDIT"))return;let g=u("GET_ALLOW_IMAGE_PREVIEW");if(!(d("file-info")&&!g||d("file")&&g))return;let h=u("GET_IMAGE_EDIT_EDITOR");if(!h)return;h.filepondCallbackBridge||(h.outputData=!0,h.outputFile=!1,h.filepondCallbackBridge={onconfirm:h.onconfirm||(()=>{}),oncancel:h.oncancel||(()=>{})});let I=({root:v,props:y,action:E})=>{let{id:_}=y,{handleEditorResponse:x}=E;h.cropAspectRatio=v.query("GET_IMAGE_CROP_ASPECT_RATIO")||h.cropAspectRatio,h.outputCanvasBackgroundColor=v.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||h.outputCanvasBackgroundColor;let R=v.query("GET_ITEM",_);if(!R)return;let z=R.file,P=R.getMetadata("crop"),A={center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},B=R.getMetadata("resize"),w=R.getMetadata("filter")||null,O=R.getMetadata("filters")||null,S=R.getMetadata("colors")||null,L=R.getMetadata("markup")||null,D={crop:P||A,size:B?{upscale:B.upscale,mode:B.mode,width:B.size.width,height:B.size.height}:null,filter:O?O.id||O.matrix:v.query("GET_ALLOW_IMAGE_FILTER")&&v.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!S?w:null,color:S,markup:L};h.onconfirm=({data:F})=>{let{crop:G,size:C,filter:q,color:X,colorMatrix:K,markup:oe}=F,k={};if(G&&(k.crop=G),C){let H=(R.getMetadata("resize")||{}).size,Y={width:C.width,height:C.height};!(Y.width&&Y.height)&&H&&(Y.width=H.width,Y.height=H.height),(Y.width||Y.height)&&(k.resize={upscale:C.upscale,mode:C.mode,size:Y})}oe&&(k.markup=oe),k.colors=X,k.filters=q,k.filter=K,R.setMetadata(k),h.filepondCallbackBridge.onconfirm(F,o(R)),x&&(h.onclose=()=>{x(!0),h.onclose=null})},h.oncancel=()=>{h.filepondCallbackBridge.oncancel(o(R)),x&&(h.onclose=()=>{x(!1),h.onclose=null})},h.open(z,D)},b=({root:v,props:y})=>{if(!u("GET_IMAGE_EDIT_ALLOW_EDIT"))return;let{id:E}=y,_=u("GET_ITEM",E);if(!_)return;let x=_.file;if(_a(x))if(v.ref.handleEdit=R=>{R.stopPropagation(),v.dispatch("EDIT_ITEM",{id:E})},g){let R=m.createChildView(r,{label:"edit",icon:u("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});R.element.classList.add("filepond--action-edit-item"),R.element.dataset.align=u("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),R.on("click",v.ref.handleEdit),v.ref.buttonEditItem=m.appendChildView(R)}else{let R=m.element.querySelector(".filepond--file-info-main"),z=document.createElement("button");z.className="filepond--action-edit-item-alt",z.innerHTML=u("GET_IMAGE_EDIT_ICON_EDIT")+"edit",z.addEventListener("click",v.ref.handleEdit),R.appendChild(z),v.ref.editButton=z}};m.registerDestroyer(({root:v})=>{v.ref.buttonEditItem&&v.ref.buttonEditItem.off("click",v.ref.handleEdit),v.ref.editButton&&v.ref.editButton.removeEventListener("click",v.ref.handleEdit)});let T={EDIT_ITEM:I,DID_LOAD_ITEM:b};if(g){let v=({root:y})=>{y.ref.buttonEditItem&&(y.ref.buttonEditItem.opacity=1)};T.DID_IMAGE_PREVIEW_SHOW=v}m.registerWriter(l(T))}),{options:{allowImageEdit:[!0,n.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",n.STRING],imageEditInstantEdit:[!1,n.BOOLEAN],imageEditAllowEdit:[!0,n.BOOLEAN],imageEditIconEdit:['',n.STRING],imageEditEditor:[null,n.OBJECT]}}},dm=typeof window<"u"&&typeof window.document<"u";dm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Xl}));var Kl=Xl;var pm=e=>/^image\/jpeg/.test(e.type),rt={JPEG:65496,APP1:65505,EXIF:1165519206,TIFF:18761,Orientation:274,Unknown:65280},st=(e,t,i=!1)=>e.getUint16(t,i),Ql=(e,t,i=!1)=>e.getUint32(t,i),mm=e=>new Promise((t,i)=>{let a=new FileReader;a.onload=function(n){let l=new DataView(n.target.result);if(st(l,0)!==rt.JPEG){t(-1);return}let o=l.byteLength,r=2;for(;rum,fm="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=",Zl,Ii=gm()?new Image:{};Ii.onload=()=>Zl=Ii.naturalWidth>Ii.naturalHeight;Ii.src=fm;var hm=()=>Zl,Jl=({addFilter:e,utils:t})=>{let{Type:i,isFile:a}=t;return e("DID_LOAD_ITEM",(n,{query:l})=>new Promise((o,r)=>{let s=n.file;if(!a(s)||!pm(s)||!l("GET_ALLOW_IMAGE_EXIF_ORIENTATION")||!hm())return o(n);mm(s).then(p=>{n.setMetadata("exif",{orientation:p}),o(n)})})),{options:{allowImageExifOrientation:[!0,i.BOOLEAN]}}},bm=typeof window<"u"&&typeof window.document<"u";bm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Jl}));var eo=Jl;var Em=e=>/^image/.test(e.type),to=(e,t)=>Yt(e.x*t,e.y*t),io=(e,t)=>Yt(e.x+t.x,e.y+t.y),Tm=e=>{let t=Math.sqrt(e.x*e.x+e.y*e.y);return t===0?{x:0,y:0}:Yt(e.x/t,e.y/t)},vi=(e,t,i)=>{let a=Math.cos(t),n=Math.sin(t),l=Yt(e.x-i.x,e.y-i.y);return Yt(i.x+a*l.x-n*l.y,i.y+n*l.x+a*l.y)},Yt=(e=0,t=0)=>({x:e,y:t}),Te=(e,t,i=1,a)=>{if(typeof e=="string")return parseFloat(e)*i;if(typeof e=="number")return e*(a?t[a]:Math.min(t.width,t.height))},Im=(e,t,i)=>{let a=e.borderStyle||e.lineStyle||"solid",n=e.backgroundColor||e.fontColor||"transparent",l=e.borderColor||e.lineColor||"transparent",o=Te(e.borderWidth||e.lineWidth,t,i),r=e.lineCap||"round",s=e.lineJoin||"round",p=typeof a=="string"?"":a.map(d=>Te(d,t,i)).join(","),c=e.opacity||1;return{"stroke-linecap":r,"stroke-linejoin":s,"stroke-width":o||0,"stroke-dasharray":p,stroke:l,fill:n,opacity:c}},we=e=>e!=null,vm=(e,t,i=1)=>{let a=Te(e.x,t,i,"width")||Te(e.left,t,i,"width"),n=Te(e.y,t,i,"height")||Te(e.top,t,i,"height"),l=Te(e.width,t,i,"width"),o=Te(e.height,t,i,"height"),r=Te(e.right,t,i,"width"),s=Te(e.bottom,t,i,"height");return we(n)||(we(o)&&we(s)?n=t.height-o-s:n=s),we(a)||(we(l)&&we(r)?a=t.width-l-r:a=r),we(l)||(we(a)&&we(r)?l=t.width-a-r:l=0),we(o)||(we(n)&&we(s)?o=t.height-n-s:o=0),{x:a||0,y:n||0,width:l||0,height:o||0}},xm=e=>e.map((t,i)=>`${i===0?"M":"L"} ${t.x} ${t.y}`).join(" "),Be=(e,t)=>Object.keys(t).forEach(i=>e.setAttribute(i,t[i])),ym="http://www.w3.org/2000/svg",St=(e,t)=>{let i=document.createElementNS(ym,e);return t&&Be(i,t),i},Rm=e=>Be(e,{...e.rect,...e.styles}),Sm=e=>{let t=e.rect.x+e.rect.width*.5,i=e.rect.y+e.rect.height*.5,a=e.rect.width*.5,n=e.rect.height*.5;return Be(e,{cx:t,cy:i,rx:a,ry:n,...e.styles})},_m={contain:"xMidYMid meet",cover:"xMidYMid slice"},wm=(e,t)=>{Be(e,{...e.rect,...e.styles,preserveAspectRatio:_m[t.fit]||"none"})},Lm={left:"start",center:"middle",right:"end"},Mm=(e,t,i,a)=>{let n=Te(t.fontSize,i,a),l=t.fontFamily||"sans-serif",o=t.fontWeight||"normal",r=Lm[t.textAlign]||"start";Be(e,{...e.rect,...e.styles,"stroke-width":0,"font-weight":o,"font-size":n,"font-family":l,"text-anchor":r}),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},Am=(e,t,i,a)=>{Be(e,{...e.rect,...e.styles,fill:"none"});let n=e.childNodes[0],l=e.childNodes[1],o=e.childNodes[2],r=e.rect,s={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(Be(n,{x1:r.x,y1:r.y,x2:s.x,y2:s.y}),!t.lineDecoration)return;l.style.display="none",o.style.display="none";let p=Tm({x:s.x-r.x,y:s.y-r.y}),c=Te(.05,i,a);if(t.lineDecoration.indexOf("arrow-begin")!==-1){let d=to(p,c),m=io(r,d),u=vi(r,2,m),g=vi(r,-2,m);Be(l,{style:"display:block;",d:`M${u.x},${u.y} L${r.x},${r.y} L${g.x},${g.y}`})}if(t.lineDecoration.indexOf("arrow-end")!==-1){let d=to(p,-c),m=io(s,d),u=vi(s,2,m),g=vi(s,-2,m);Be(o,{style:"display:block;",d:`M${u.x},${u.y} L${s.x},${s.y} L${g.x},${g.y}`})}},Pm=(e,t,i,a)=>{Be(e,{...e.styles,fill:"none",d:xm(t.points.map(n=>({x:Te(n.x,i,a,"width"),y:Te(n.y,i,a,"height")})))})},xi=e=>t=>St(e,{id:t.id}),zm=e=>{let t=St("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=()=>{t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},Om=e=>{let t=St("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),i=St("line");t.appendChild(i);let a=St("path");t.appendChild(a);let n=St("path");return t.appendChild(n),t},Fm={image:zm,rect:xi("rect"),ellipse:xi("ellipse"),text:xi("text"),path:xi("path"),line:Om},Dm={rect:Rm,ellipse:Sm,image:wm,text:Mm,path:Pm,line:Am},Cm=(e,t)=>Fm[e](t),Bm=(e,t,i,a,n)=>{t!=="path"&&(e.rect=vm(i,a,n)),e.styles=Im(i,a,n),Dm[t](e,i,a,n)},Nm=["x","y","left","top","right","bottom","width","height"],km=e=>typeof e=="string"&&/%/.test(e)?parseFloat(e)/100:e,Vm=e=>{let[t,i]=e,a=i.points?{}:Nm.reduce((n,l)=>(n[l]=km(i[l]),n),{});return[t,{zIndex:0,...i,...a}]},Gm=(e,t)=>e[1].zIndex>t[1].zIndex?1:e[1].zIndexe.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:({root:t,props:i})=>{if(!i.dirty)return;let{crop:a,resize:n,markup:l}=i,o=i.width,r=i.height,s=a.width,p=a.height;if(n){let{size:u}=n,g=u&&u.width,f=u&&u.height,h=n.mode,I=n.upscale;g&&!f&&(f=g),f&&!g&&(g=f);let b=s{let[g,f]=u,h=Cm(g,f);Bm(h,g,f,c,d),t.element.appendChild(h)})}}),jt=(e,t)=>({x:e,y:t}),Wm=(e,t)=>e.x*t.x+e.y*t.y,ao=(e,t)=>jt(e.x-t.x,e.y-t.y),Hm=(e,t)=>Wm(ao(e,t),ao(e,t)),no=(e,t)=>Math.sqrt(Hm(e,t)),lo=(e,t)=>{let i=e,a=1.5707963267948966,n=t,l=1.5707963267948966-t,o=Math.sin(a),r=Math.sin(n),s=Math.sin(l),p=Math.cos(l),c=i/o,d=c*r,m=c*s;return jt(p*d,p*m)},jm=(e,t)=>{let i=e.width,a=e.height,n=lo(i,t),l=lo(a,t),o=jt(e.x+Math.abs(n.x),e.y-Math.abs(n.y)),r=jt(e.x+e.width+Math.abs(l.y),e.y+Math.abs(l.x)),s=jt(e.x-Math.abs(l.y),e.y+e.height-Math.abs(l.x));return{width:no(o,r),height:no(o,s)}},Ym=(e,t,i=1)=>{let a=e.height/e.width,n=1,l=t,o=1,r=a;r>l&&(r=l,o=r/a);let s=Math.max(n/o,l/r),p=e.width/(i*s*o),c=p*t;return{width:p,height:c}},ro=(e,t,i,a)=>{let n=a.x>.5?1-a.x:a.x,l=a.y>.5?1-a.y:a.y,o=n*2*e.width,r=l*2*e.height,s=jm(t,i);return Math.max(s.width/o,s.height/r)},so=(e,t)=>{let i=e.width,a=i*t;a>e.height&&(a=e.height,i=a/t);let n=(e.width-i)*.5,l=(e.height-a)*.5;return{x:n,y:l,width:i,height:a}},qm=(e,t={})=>{let{zoom:i,rotation:a,center:n,aspectRatio:l}=t;l||(l=e.height/e.width);let o=Ym(e,l,i),r={x:o.width*.5,y:o.height*.5},s={x:0,y:0,width:o.width,height:o.height,center:r},p=typeof t.scaleToFit>"u"||t.scaleToFit,c=ro(e,so(s,l),a,p?n:{x:.5,y:.5}),d=i*c;return{widthFloat:o.width/d,heightFloat:o.height/d,width:Math.round(o.width/d),height:Math.round(o.height/d)}},Ce={type:"spring",stiffness:.5,damping:.45,mass:10},$m=e=>e.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:({root:t,props:i})=>{t.appendChild(i.image)}}),Xm=e=>e.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:Ce,originY:Ce,scaleX:Ce,scaleY:Ce,translateX:Ce,translateY:Ce,rotateZ:Ce}},create:({root:t,props:i})=>{i.width=i.image.width,i.height=i.image.height,t.ref.bitmap=t.appendChildView(t.createChildView($m(e),{image:i.image}))},write:({root:t,props:i})=>{let{flip:a}=i.crop,{bitmap:n}=t.ref;n.scaleX=a.horizontal?-1:1,n.scaleY=a.vertical?-1:1}}),Km=e=>e.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","opacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function({root:t,props:i}){i.background&&(t.element.style.backgroundColor=i.background)},create:({root:t,props:i})=>{t.ref.image=t.appendChildView(t.createChildView(Xm(e),Object.assign({},i))),t.ref.createMarkup=()=>{t.ref.markup||(t.ref.markup=t.appendChildView(t.createChildView(Um(e),Object.assign({},i))))},t.ref.destroyMarkup=()=>{t.ref.markup&&(t.removeChildView(t.ref.markup),t.ref.markup=null)};let a=t.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");a!==null&&(a==="grid"?t.element.dataset.transparencyIndicator=a:t.element.dataset.transparencyIndicator="color")},write:({root:t,props:i,shouldOptimize:a})=>{let{crop:n,markup:l,resize:o,dirty:r,width:s,height:p}=i;t.ref.image.crop=n;let c={x:0,y:0,width:s,height:p,center:{x:s*.5,y:p*.5}},d={width:t.ref.image.width,height:t.ref.image.height},m={x:n.center.x*d.width,y:n.center.y*d.height},u={x:c.center.x-d.width*n.center.x,y:c.center.y-d.height*n.center.y},g=Math.PI*2+n.rotation%(Math.PI*2),f=n.aspectRatio||d.height/d.width,h=typeof n.scaleToFit>"u"||n.scaleToFit,I=ro(d,so(c,f),g,h?n.center:{x:.5,y:.5}),b=n.zoom*I;l&&l.length?(t.ref.createMarkup(),t.ref.markup.width=s,t.ref.markup.height=p,t.ref.markup.resize=o,t.ref.markup.dirty=r,t.ref.markup.markup=l,t.ref.markup.crop=qm(d,n)):t.ref.markup&&t.ref.destroyMarkup();let T=t.ref.image;if(a){T.originX=null,T.originY=null,T.translateX=null,T.translateY=null,T.rotateZ=null,T.scaleX=null,T.scaleY=null;return}T.originX=m.x,T.originY=m.y,T.translateX=u.x,T.translateY=u.y,T.rotateZ=g,T.scaleX=b,T.scaleY=b}}),Qm=e=>e.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:Ce,scaleY:Ce,translateY:Ce,opacity:{type:"tween",duration:400}}},create:({root:t,props:i})=>{t.ref.clip=t.appendChildView(t.createChildView(Km(e),{id:i.id,image:i.image,crop:i.crop,markup:i.markup,resize:i.resize,dirty:i.dirty,background:i.background}))},write:({root:t,props:i,shouldOptimize:a})=>{let{clip:n}=t.ref,{image:l,crop:o,markup:r,resize:s,dirty:p}=i;if(n.crop=o,n.markup=r,n.resize=s,n.dirty=p,n.opacity=a?0:1,a||t.rect.element.hidden)return;let c=l.height/l.width,d=o.aspectRatio||c,m=t.rect.inner.width,u=t.rect.inner.height,g=t.query("GET_IMAGE_PREVIEW_HEIGHT"),f=t.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),h=t.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),I=t.query("GET_PANEL_ASPECT_RATIO"),b=t.query("GET_ALLOW_MULTIPLE");I&&!b&&(g=m*I,d=I);let T=g!==null?g:Math.max(f,Math.min(m*d,h)),v=T/d;v>m&&(v=m,T=v*d),T>u&&(T=u,v=u/d),n.width=v,n.height=T}}),Zm=` @@ -18,26 +18,26 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho -`,rl=0,Um=e=>e.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:({root:t,props:i})=>{let a=Gm;if(document.querySelector("base")){let n=new URL(window.location.href.replace(window.location.hash,"")).href;a=a.replace(/url\(\#/g,"url("+n+"#")}rl++,t.element.classList.add(`filepond--image-preview-overlay-${i.status}`),t.element.innerHTML=a.replace(/__UID__/g,rl)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),Wm=function(){self.onmessage=e=>{createImageBitmap(e.data.message.file).then(t=>{self.postMessage({id:e.data.id,message:t},[t])})}},Hm=function(){self.onmessage=e=>{let t=e.data.message.imageData,i=e.data.message.colorMatrix,a=t.data,n=a.length,o=i[0],l=i[1],r=i[2],s=i[3],p=i[4],c=i[5],d=i[6],m=i[7],u=i[8],f=i[9],g=i[10],h=i[11],I=i[12],E=i[13],T=i[14],v=i[15],y=i[16],b=i[17],w=i[18],x=i[19],_=0,P=0,O=0,M=0,N=0;for(;_{let i=new Image;i.onload=()=>{let a=i.naturalWidth,n=i.naturalHeight;i=null,t(a,n)},i.src=e},qm={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},Ym=(e,t,i,a)=>{a!==-1&&e.transform.apply(e,qm[a](t,i))},$m=(e,t,i,a)=>{t=Math.round(t),i=Math.round(i);let n=document.createElement("canvas");n.width=t,n.height=i;let o=n.getContext("2d");return a>=5&&a<=8&&([t,i]=[i,t]),Ym(o,t,i,a),o.drawImage(e,0,0,t,i),n},dl=e=>/^image/.test(e.type)&&!/svg/.test(e.type),Xm=10,Qm=10,Zm=e=>{let t=Math.min(Xm/e.width,Qm/e.height),i=document.createElement("canvas"),a=i.getContext("2d"),n=i.width=Math.ceil(e.width*t),o=i.height=Math.ceil(e.height*t);a.drawImage(e,0,0,n,o);let l=null;try{l=a.getImageData(0,0,n,o).data}catch{return null}let r=l.length,s=0,p=0,c=0,d=0;for(;dMath.floor(Math.sqrt(e/(t/4))),Km=(e,t)=>(t=t||document.createElement("canvas"),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t),Jm=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(new Uint8ClampedArray(e.data)),t},eu=e=>new Promise((t,i)=>{let a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),tu=e=>{let t=Um(e),i=Vm(e),{createWorker:a}=e.utils,n=(E,T,v)=>new Promise(y=>{E.ref.imageData||(E.ref.imageData=v.getContext("2d").getImageData(0,0,v.width,v.height));let b=Jm(E.ref.imageData);if(!T||T.length!==20)return v.getContext("2d").putImageData(b,0,0),y();let w=a(Hm);w.post({imageData:b,colorMatrix:T},x=>{v.getContext("2d").putImageData(x,0,0),w.terminate(),y()},[b.data.buffer])}),o=(E,T)=>{E.removeChildView(T),T.image.width=1,T.image.height=1,T._destroy()},l=({root:E})=>{let T=E.ref.images.shift();return T.opacity=0,T.translateY=-15,E.ref.imageViewBin.push(T),T},r=({root:E,props:T,image:v})=>{let y=T.id,b=E.query("GET_ITEM",{id:y});if(!b)return;let w=b.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},x=E.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),_,P,O=!1;E.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(_=b.getMetadata("markup")||[],P=b.getMetadata("resize"),O=!0);let M=E.appendChildView(E.createChildView(i,{id:y,image:v,crop:w,resize:P,markup:_,dirty:O,background:x,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),E.childViews.length);E.ref.images.push(M),M.opacity=1,M.scaleX=1,M.scaleY=1,M.translateY=0,setTimeout(()=>{E.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:y})},250)},s=({root:E,props:T})=>{let v=E.query("GET_ITEM",{id:T.id});if(!v)return;let y=E.ref.images[E.ref.images.length-1];y.crop=v.getMetadata("crop"),y.background=E.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),E.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(y.dirty=!0,y.resize=v.getMetadata("resize"),y.markup=v.getMetadata("markup"))},p=({root:E,props:T,action:v})=>{if(!/crop|filter|markup|resize/.test(v.change.key)||!E.ref.images.length)return;let y=E.query("GET_ITEM",{id:T.id});if(y){if(/filter/.test(v.change.key)){let b=E.ref.images[E.ref.images.length-1];n(E,v.change.value,b.image);return}if(/crop|markup|resize/.test(v.change.key)){let b=y.getMetadata("crop"),w=E.ref.images[E.ref.images.length-1];if(b&&b.aspectRatio&&w.crop&&w.crop.aspectRatio&&Math.abs(b.aspectRatio-w.crop.aspectRatio)>1e-5){let x=l({root:E});r({root:E,props:T,image:Km(x.image)})}else s({root:E,props:T})}}},c=E=>{let v=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),y=v?parseInt(v[1]):null;return y!==null&&y<=58?!1:"createImageBitmap"in window&&dl(E)},d=({root:E,props:T})=>{let{id:v}=T,y=E.query("GET_ITEM",v);if(!y)return;let b=URL.createObjectURL(y.file);jm(b,(w,x)=>{E.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:v,width:w,height:x})})},m=({root:E,props:T})=>{let{id:v}=T,y=E.query("GET_ITEM",v);if(!y)return;let b=URL.createObjectURL(y.file),w=()=>{eu(b).then(x)},x=_=>{URL.revokeObjectURL(b);let O=(y.getMetadata("exif")||{}).orientation||-1,{width:M,height:N}=_;if(!M||!N)return;O>=5&&O<=8&&([M,N]=[N,M]);let S=Math.max(1,window.devicePixelRatio*.75),R=E.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR")*S,L=N/M,z=E.rect.element.width,F=E.rect.element.height,G=z,C=G*L;L>1?(G=Math.min(M,z*R),C=G*L):(C=Math.min(N,F*R),G=C/L);let Y=$m(_,G,C,O),Q=()=>{let pe=E.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?Zm(data):null;y.setMetadata("color",pe,!0),"close"in _&&_.close(),E.ref.overlayShadow.opacity=1,r({root:E,props:T,image:Y})},$=y.getMetadata("filter");$?n(E,$,Y).then(Q):Q()};if(c(y.file)){let _=a(Wm);_.post({file:y.file},P=>{if(_.terminate(),!P){w();return}x(P)})}else w()},u=({root:E})=>{let T=E.ref.images[E.ref.images.length-1];T.translateY=0,T.scaleX=1,T.scaleY=1,T.opacity=1},f=({root:E})=>{E.ref.overlayShadow.opacity=1,E.ref.overlayError.opacity=0,E.ref.overlaySuccess.opacity=0},g=({root:E})=>{E.ref.overlayShadow.opacity=.25,E.ref.overlayError.opacity=1},h=({root:E})=>{E.ref.overlayShadow.opacity=.25,E.ref.overlaySuccess.opacity=1},I=({root:E})=>{E.ref.images=[],E.ref.imageData=null,E.ref.imageViewBin=[],E.ref.overlayShadow=E.appendChildView(E.createChildView(t,{opacity:0,status:"idle"})),E.ref.overlaySuccess=E.appendChildView(E.createChildView(t,{opacity:0,status:"success"})),E.ref.overlayError=E.appendChildView(E.createChildView(t,{opacity:0,status:"failure"}))};return e.utils.createView({name:"image-preview-wrapper",create:I,styles:["height"],apis:["height"],destroy:({root:E})=>{E.ref.images.forEach(T=>{T.image.width=1,T.image.height=1})},didWriteView:({root:E})=>{E.ref.images.forEach(T=>{T.dirty=!1})},write:e.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:u,DID_IMAGE_PREVIEW_CONTAINER_CREATE:d,DID_FINISH_CALCULATE_PREVIEWSIZE:m,DID_UPDATE_ITEM_METADATA:p,DID_THROW_ITEM_LOAD_ERROR:g,DID_THROW_ITEM_PROCESSING_ERROR:g,DID_THROW_ITEM_INVALID:g,DID_COMPLETE_ITEM_PROCESSING:h,DID_START_ITEM_PROCESSING:f,DID_REVERT_ITEM_PROCESSING:f},({root:E})=>{let T=E.ref.imageViewBin.filter(v=>v.opacity===0);E.ref.imageViewBin=E.ref.imageViewBin.filter(v=>v.opacity>0),T.forEach(v=>o(E,v)),T.length=0})})},pl=e=>{let{addFilter:t,utils:i}=e,{Type:a,createRoute:n,isFile:o}=i,l=tu(e);return t("CREATE_VIEW",r=>{let{is:s,view:p,query:c}=r;if(!s("file")||!c("GET_ALLOW_IMAGE_PREVIEW"))return;let d=({root:h,props:I})=>{let{id:E}=I,T=c("GET_ITEM",E);if(!T||!o(T.file)||T.archived)return;let v=T.file;if(!rm(v)||!c("GET_IMAGE_PREVIEW_FILTER_ITEM")(T))return;let y="createImageBitmap"in(window||{}),b=c("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!y&&b&&v.size>b)return;h.ref.imagePreview=p.appendChildView(p.createChildView(l,{id:E}));let w=h.query("GET_IMAGE_PREVIEW_HEIGHT");w&&h.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:T.id,height:w});let x=!y&&v.size>c("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");h.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:E},x)},m=(h,I)=>{if(!h.ref.imagePreview)return;let{id:E}=I,T=h.query("GET_ITEM",{id:E});if(!T)return;let v=h.query("GET_PANEL_ASPECT_RATIO"),y=h.query("GET_ITEM_PANEL_ASPECT_RATIO"),b=h.query("GET_IMAGE_PREVIEW_HEIGHT");if(v||y||b)return;let{imageWidth:w,imageHeight:x}=h.ref;if(!w||!x)return;let _=h.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),P=h.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),M=(T.getMetadata("exif")||{}).orientation||-1;if(M>=5&&M<=8&&([w,x]=[x,w]),!dl(T.file)||h.query("GET_IMAGE_PREVIEW_UPSCALE")){let z=2048/w;w*=z,x*=z}let N=x/w,S=(T.getMetadata("crop")||{}).aspectRatio||N,D=Math.max(_,Math.min(x,P)),R=h.rect.element.width,L=Math.min(R*S,D);h.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:T.id,height:L})},u=({root:h})=>{h.ref.shouldRescale=!0},f=({root:h,action:I})=>{I.change.key==="crop"&&(h.ref.shouldRescale=!0)},g=({root:h,action:I})=>{h.ref.imageWidth=I.width,h.ref.imageHeight=I.height,h.ref.shouldRescale=!0,h.ref.shouldDrawPreview=!0,h.dispatch("KICK")};p.registerWriter(n({DID_RESIZE_ROOT:u,DID_STOP_RESIZE:u,DID_LOAD_ITEM:d,DID_IMAGE_PREVIEW_CALCULATE_SIZE:g,DID_UPDATE_ITEM_METADATA:f},({root:h,props:I})=>{h.ref.imagePreview&&(h.rect.element.hidden||(h.ref.shouldRescale&&(m(h,I),h.ref.shouldRescale=!1),h.ref.shouldDrawPreview&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{h.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:I.id})})}),h.ref.shouldDrawPreview=!1)))}))}),{options:{allowImagePreview:[!0,a.BOOLEAN],imagePreviewFilterItem:[()=>!0,a.FUNCTION],imagePreviewHeight:[null,a.INT],imagePreviewMinHeight:[44,a.INT],imagePreviewMaxHeight:[256,a.INT],imagePreviewMaxFileSize:[null,a.INT],imagePreviewZoomFactor:[2,a.INT],imagePreviewUpscale:[!1,a.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,a.INT],imagePreviewTransparencyIndicator:[null,a.STRING],imagePreviewCalculateAverageImageColor:[!1,a.BOOLEAN],imagePreviewMarkupShow:[!0,a.BOOLEAN],imagePreviewMarkupFilter:[()=>!0,a.FUNCTION]}}},iu=typeof window<"u"&&typeof window.document<"u";iu&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:pl}));var ml=pl;var au=e=>/^image/.test(e.type),nu=(e,t)=>{let i=new Image;i.onload=()=>{let a=i.naturalWidth,n=i.naturalHeight;i=null,t({width:a,height:n})},i.onerror=()=>t(null),i.src=e},ul=({addFilter:e,utils:t})=>{let{Type:i}=t;return e("DID_LOAD_ITEM",(a,{query:n})=>new Promise((o,l)=>{let r=a.file;if(!au(r)||!n("GET_ALLOW_IMAGE_RESIZE"))return o(a);let s=n("GET_IMAGE_RESIZE_MODE"),p=n("GET_IMAGE_RESIZE_TARGET_WIDTH"),c=n("GET_IMAGE_RESIZE_TARGET_HEIGHT"),d=n("GET_IMAGE_RESIZE_UPSCALE");if(p===null&&c===null)return o(a);let m=p===null?c:p,u=c===null?m:c,f=URL.createObjectURL(r);nu(f,g=>{if(URL.revokeObjectURL(f),!g)return o(a);let{width:h,height:I}=g,E=(a.getMetadata("exif")||{}).orientation||-1;if(E>=5&&E<=8&&([h,I]=[I,h]),h===m&&I===u)return o(a);if(!d){if(s==="cover"){if(h<=m||I<=u)return o(a)}else if(h<=m&&I<=m)return o(a)}a.setMetadata("resize",{mode:s,upscale:d,size:{width:m,height:u}}),o(a)})})),{options:{allowImageResize:[!0,i.BOOLEAN],imageResizeMode:["cover",i.STRING],imageResizeUpscale:[!0,i.BOOLEAN],imageResizeTargetWidth:[null,i.INT],imageResizeTargetHeight:[null,i.INT]}}},ou=typeof window<"u"&&typeof window.document<"u";ou&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:ul}));var fl=ul;var lu=e=>/^image/.test(e.type),ru=e=>e.substr(0,e.lastIndexOf("."))||e,su={jpeg:"jpg","svg+xml":"svg"},cu=(e,t)=>{let i=ru(e),a=t.split("/")[1],n=su[a]||a;return`${i}.${n}`},du=e=>/jpeg|png|svg\+xml/.test(e)?e:"image/jpeg",pu=e=>/^image/.test(e.type),mu={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},uu=(e,t,i)=>(i===-1&&(i=1),mu[i](e,t)),Yt=(e,t)=>({x:e,y:t}),fu=(e,t)=>e.x*t.x+e.y*t.y,gl=(e,t)=>Yt(e.x-t.x,e.y-t.y),gu=(e,t)=>fu(gl(e,t),gl(e,t)),hl=(e,t)=>Math.sqrt(gu(e,t)),El=(e,t)=>{let i=e,a=1.5707963267948966,n=t,o=1.5707963267948966-t,l=Math.sin(a),r=Math.sin(n),s=Math.sin(o),p=Math.cos(o),c=i/l,d=c*r,m=c*s;return Yt(p*d,p*m)},hu=(e,t)=>{let i=e.width,a=e.height,n=El(i,t),o=El(a,t),l=Yt(e.x+Math.abs(n.x),e.y-Math.abs(n.y)),r=Yt(e.x+e.width+Math.abs(o.y),e.y+Math.abs(o.x)),s=Yt(e.x-Math.abs(o.y),e.y+e.height-Math.abs(o.x));return{width:hl(l,r),height:hl(l,s)}},Il=(e,t,i=0,a={x:.5,y:.5})=>{let n=a.x>.5?1-a.x:a.x,o=a.y>.5?1-a.y:a.y,l=n*2*e.width,r=o*2*e.height,s=hu(t,i);return Math.max(s.width/l,s.height/r)},vl=(e,t)=>{let i=e.width,a=i*t;a>e.height&&(a=e.height,i=a/t);let n=(e.width-i)*.5,o=(e.height-a)*.5;return{x:n,y:o,width:i,height:a}},bl=(e,t,i=1)=>{let a=e.height/e.width,n=1,o=t,l=1,r=a;r>o&&(r=o,l=r/a);let s=Math.max(n/l,o/r),p=e.width/(i*s*l),c=p*t;return{width:p,height:c}},xl=e=>{e.width=1,e.height=1,e.getContext("2d").clearRect(0,0,1,1)},Tl=e=>e&&(e.horizontal||e.vertical),Eu=(e,t,i)=>{if(t<=1&&!Tl(i))return e.width=e.naturalWidth,e.height=e.naturalHeight,e;let a=document.createElement("canvas"),n=e.naturalWidth,o=e.naturalHeight,l=t>=5&&t<=8;l?(a.width=o,a.height=n):(a.width=n,a.height=o);let r=a.getContext("2d");if(t&&r.transform.apply(r,uu(n,o,t)),Tl(i)){let s=[1,0,0,1,0,0];(!l&&i.horizontal||l&i.vertical)&&(s[0]=-1,s[4]=n),(!l&&i.vertical||l&&i.horizontal)&&(s[3]=-1,s[5]=o),r.transform(...s)}return r.drawImage(e,0,0,n,o),a},bu=(e,t,i={},a={})=>{let{canvasMemoryLimit:n,background:o=null}=a,l=i.zoom||1,r=Eu(e,t,i.flip),s={width:r.width,height:r.height},p=i.aspectRatio||s.height/s.width,c=bl(s,p,l);if(n){let T=c.width*c.height;if(T>n){let v=Math.sqrt(n)/Math.sqrt(T);s.width=Math.floor(s.width*v),s.height=Math.floor(s.height*v),c=bl(s,p,l)}}let d=document.createElement("canvas"),m={x:c.width*.5,y:c.height*.5},u={x:0,y:0,width:c.width,height:c.height,center:m},f=typeof i.scaleToFit>"u"||i.scaleToFit,g=l*Il(s,vl(u,p),i.rotation,f?i.center:{x:.5,y:.5});d.width=Math.round(c.width/g),d.height=Math.round(c.height/g),m.x/=g,m.y/=g;let h={x:m.x-s.width*(i.center?i.center.x:.5),y:m.y-s.height*(i.center?i.center.y:.5)},I=d.getContext("2d");o&&(I.fillStyle=o,I.fillRect(0,0,d.width,d.height)),I.translate(m.x,m.y),I.rotate(i.rotation||0),I.drawImage(r,h.x-m.x,h.y-m.y,s.width,s.height);let E=I.getImageData(0,0,d.width,d.height);return xl(d),E},Tu=(()=>typeof window<"u"&&typeof window.document<"u")();Tu&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,i){var a=this.toDataURL(t,i).split(",")[1];setTimeout(function(){for(var n=atob(a),o=n.length,l=new Uint8Array(o),r=0;rnew Promise(a=>{let n=i?i(e):e;Promise.resolve(n).then(o=>{o.toBlob(a,t.type,t.quality)})}),_i=(e,t)=>$t(e.x*t,e.y*t),Ri=(e,t)=>$t(e.x+t.x,e.y+t.y),yl=e=>{let t=Math.sqrt(e.x*e.x+e.y*e.y);return t===0?{x:0,y:0}:$t(e.x/t,e.y/t)},Ye=(e,t,i)=>{let a=Math.cos(t),n=Math.sin(t),o=$t(e.x-i.x,e.y-i.y);return $t(i.x+a*o.x-n*o.y,i.y+n*o.x+a*o.y)},$t=(e=0,t=0)=>({x:e,y:t}),me=(e,t,i=1,a)=>{if(typeof e=="string")return parseFloat(e)*i;if(typeof e=="number")return e*(a?t[a]:Math.min(t.width,t.height))},ct=(e,t,i)=>{let a=e.borderStyle||e.lineStyle||"solid",n=e.backgroundColor||e.fontColor||"transparent",o=e.borderColor||e.lineColor||"transparent",l=me(e.borderWidth||e.lineWidth,t,i),r=e.lineCap||"round",s=e.lineJoin||"round",p=typeof a=="string"?"":a.map(d=>me(d,t,i)).join(","),c=e.opacity||1;return{"stroke-linecap":r,"stroke-linejoin":s,"stroke-width":l||0,"stroke-dasharray":p,stroke:o,fill:n,opacity:c}},Le=e=>e!=null,St=(e,t,i=1)=>{let a=me(e.x,t,i,"width")||me(e.left,t,i,"width"),n=me(e.y,t,i,"height")||me(e.top,t,i,"height"),o=me(e.width,t,i,"width"),l=me(e.height,t,i,"height"),r=me(e.right,t,i,"width"),s=me(e.bottom,t,i,"height");return Le(n)||(Le(l)&&Le(s)?n=t.height-l-s:n=s),Le(a)||(Le(o)&&Le(r)?a=t.width-o-r:a=r),Le(o)||(Le(a)&&Le(r)?o=t.width-a-r:o=0),Le(l)||(Le(n)&&Le(s)?l=t.height-n-s:l=0),{x:a||0,y:n||0,width:o||0,height:l||0}},vu=e=>e.map((t,i)=>`${i===0?"M":"L"} ${t.x} ${t.y}`).join(" "),Ne=(e,t)=>Object.keys(t).forEach(i=>e.setAttribute(i,t[i])),xu="http://www.w3.org/2000/svg",wt=(e,t)=>{let i=document.createElementNS(xu,e);return t&&Ne(i,t),i},yu=e=>Ne(e,{...e.rect,...e.styles}),_u=e=>{let t=e.rect.x+e.rect.width*.5,i=e.rect.y+e.rect.height*.5,a=e.rect.width*.5,n=e.rect.height*.5;return Ne(e,{cx:t,cy:i,rx:a,ry:n,...e.styles})},Ru={contain:"xMidYMid meet",cover:"xMidYMid slice"},wu=(e,t)=>{Ne(e,{...e.rect,...e.styles,preserveAspectRatio:Ru[t.fit]||"none"})},Su={left:"start",center:"middle",right:"end"},Lu=(e,t,i,a)=>{let n=me(t.fontSize,i,a),o=t.fontFamily||"sans-serif",l=t.fontWeight||"normal",r=Su[t.textAlign]||"start";Ne(e,{...e.rect,...e.styles,"stroke-width":0,"font-weight":l,"font-size":n,"font-family":o,"text-anchor":r}),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},Au=(e,t,i,a)=>{Ne(e,{...e.rect,...e.styles,fill:"none"});let n=e.childNodes[0],o=e.childNodes[1],l=e.childNodes[2],r=e.rect,s={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(Ne(n,{x1:r.x,y1:r.y,x2:s.x,y2:s.y}),!t.lineDecoration)return;o.style.display="none",l.style.display="none";let p=yl({x:s.x-r.x,y:s.y-r.y}),c=me(.05,i,a);if(t.lineDecoration.indexOf("arrow-begin")!==-1){let d=_i(p,c),m=Ri(r,d),u=Ye(r,2,m),f=Ye(r,-2,m);Ne(o,{style:"display:block;",d:`M${u.x},${u.y} L${r.x},${r.y} L${f.x},${f.y}`})}if(t.lineDecoration.indexOf("arrow-end")!==-1){let d=_i(p,-c),m=Ri(s,d),u=Ye(s,2,m),f=Ye(s,-2,m);Ne(l,{style:"display:block;",d:`M${u.x},${u.y} L${s.x},${s.y} L${f.x},${f.y}`})}},Mu=(e,t,i,a)=>{Ne(e,{...e.styles,fill:"none",d:vu(t.points.map(n=>({x:me(n.x,i,a,"width"),y:me(n.y,i,a,"height")})))})},yi=e=>t=>wt(e,{id:t.id}),Ou=e=>{let t=wt("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=()=>{t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},Pu=e=>{let t=wt("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),i=wt("line");t.appendChild(i);let a=wt("path");t.appendChild(a);let n=wt("path");return t.appendChild(n),t},Du={image:Ou,rect:yi("rect"),ellipse:yi("ellipse"),text:yi("text"),path:yi("path"),line:Pu},Fu={rect:yu,ellipse:_u,image:wu,text:Lu,path:Mu,line:Au},zu=(e,t)=>Du[e](t),Cu=(e,t,i,a,n)=>{t!=="path"&&(e.rect=St(i,a,n)),e.styles=ct(i,a,n),Fu[t](e,i,a,n)},_l=(e,t)=>e[1].zIndex>t[1].zIndex?1:e[1].zIndexnew Promise(n=>{let{background:o=null}=a,l=new FileReader;l.onloadend=()=>{let r=l.result,s=document.createElement("div");s.style.cssText="position:absolute;pointer-events:none;width:0;height:0;visibility:hidden;",s.innerHTML=r;let p=s.querySelector("svg");document.body.appendChild(s);let c=p.getBBox();s.parentNode.removeChild(s);let d=s.querySelector("title"),m=p.getAttribute("viewBox")||"",u=p.getAttribute("width")||"",f=p.getAttribute("height")||"",g=parseFloat(u)||null,h=parseFloat(f)||null,I=(u.match(/[a-z]+/)||[])[0]||"",E=(f.match(/[a-z]+/)||[])[0]||"",T=m.split(" ").map(parseFloat),v=T.length?{x:T[0],y:T[1],width:T[2],height:T[3]}:c,y=g??v.width,b=h??v.height;p.style.overflow="visible",p.setAttribute("width",y),p.setAttribute("height",b);let w="";if(i&&i.length){let $={width:y,height:b};w=i.sort(_l).reduce((pe,k)=>{let H=zu(k[0],k[1]);return Cu(H,k[0],k[1],$),H.removeAttribute("id"),H.getAttribute("opacity")===1&&H.removeAttribute("opacity"),pe+` +`,oo=0,Jm=e=>e.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:({root:t,props:i})=>{let a=Zm;if(document.querySelector("base")){let n=new URL(window.location.href.replace(window.location.hash,"")).href;a=a.replace(/url\(\#/g,"url("+n+"#")}oo++,t.element.classList.add(`filepond--image-preview-overlay-${i.status}`),t.element.innerHTML=a.replace(/__UID__/g,oo)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),eu=function(){self.onmessage=e=>{createImageBitmap(e.data.message.file).then(t=>{self.postMessage({id:e.data.id,message:t},[t])})}},tu=function(){self.onmessage=e=>{let t=e.data.message.imageData,i=e.data.message.colorMatrix,a=t.data,n=a.length,l=i[0],o=i[1],r=i[2],s=i[3],p=i[4],c=i[5],d=i[6],m=i[7],u=i[8],g=i[9],f=i[10],h=i[11],I=i[12],b=i[13],T=i[14],v=i[15],y=i[16],E=i[17],_=i[18],x=i[19],R=0,z=0,P=0,A=0,B=0;for(;R{let i=new Image;i.onload=()=>{let a=i.naturalWidth,n=i.naturalHeight;i=null,t(a,n)},i.src=e},au={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},nu=(e,t,i,a)=>{a!==-1&&e.transform.apply(e,au[a](t,i))},lu=(e,t,i,a)=>{t=Math.round(t),i=Math.round(i);let n=document.createElement("canvas");n.width=t,n.height=i;let l=n.getContext("2d");return a>=5&&a<=8&&([t,i]=[i,t]),nu(l,t,i,a),l.drawImage(e,0,0,t,i),n},co=e=>/^image/.test(e.type)&&!/svg/.test(e.type),ou=10,ru=10,su=e=>{let t=Math.min(ou/e.width,ru/e.height),i=document.createElement("canvas"),a=i.getContext("2d"),n=i.width=Math.ceil(e.width*t),l=i.height=Math.ceil(e.height*t);a.drawImage(e,0,0,n,l);let o=null;try{o=a.getImageData(0,0,n,l).data}catch{return null}let r=o.length,s=0,p=0,c=0,d=0;for(;dMath.floor(Math.sqrt(e/(t/4))),cu=(e,t)=>(t=t||document.createElement("canvas"),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t),du=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(new Uint8ClampedArray(e.data)),t},pu=e=>new Promise((t,i)=>{let a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),mu=e=>{let t=Jm(e),i=Qm(e),{createWorker:a}=e.utils,n=(b,T,v)=>new Promise(y=>{b.ref.imageData||(b.ref.imageData=v.getContext("2d").getImageData(0,0,v.width,v.height));let E=du(b.ref.imageData);if(!T||T.length!==20)return v.getContext("2d").putImageData(E,0,0),y();let _=a(tu);_.post({imageData:E,colorMatrix:T},x=>{v.getContext("2d").putImageData(x,0,0),_.terminate(),y()},[E.data.buffer])}),l=(b,T)=>{b.removeChildView(T),T.image.width=1,T.image.height=1,T._destroy()},o=({root:b})=>{let T=b.ref.images.shift();return T.opacity=0,T.translateY=-15,b.ref.imageViewBin.push(T),T},r=({root:b,props:T,image:v})=>{let y=T.id,E=b.query("GET_ITEM",{id:y});if(!E)return;let _=E.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},x=b.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),R,z,P=!1;b.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(R=E.getMetadata("markup")||[],z=E.getMetadata("resize"),P=!0);let A=b.appendChildView(b.createChildView(i,{id:y,image:v,crop:_,resize:z,markup:R,dirty:P,background:x,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),b.childViews.length);b.ref.images.push(A),A.opacity=1,A.scaleX=1,A.scaleY=1,A.translateY=0,setTimeout(()=>{b.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:y})},250)},s=({root:b,props:T})=>{let v=b.query("GET_ITEM",{id:T.id});if(!v)return;let y=b.ref.images[b.ref.images.length-1];y.crop=v.getMetadata("crop"),y.background=b.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),b.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(y.dirty=!0,y.resize=v.getMetadata("resize"),y.markup=v.getMetadata("markup"))},p=({root:b,props:T,action:v})=>{if(!/crop|filter|markup|resize/.test(v.change.key)||!b.ref.images.length)return;let y=b.query("GET_ITEM",{id:T.id});if(y){if(/filter/.test(v.change.key)){let E=b.ref.images[b.ref.images.length-1];n(b,v.change.value,E.image);return}if(/crop|markup|resize/.test(v.change.key)){let E=y.getMetadata("crop"),_=b.ref.images[b.ref.images.length-1];if(E&&E.aspectRatio&&_.crop&&_.crop.aspectRatio&&Math.abs(E.aspectRatio-_.crop.aspectRatio)>1e-5){let x=o({root:b});r({root:b,props:T,image:cu(x.image)})}else s({root:b,props:T})}}},c=b=>{let v=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),y=v?parseInt(v[1]):null;return y!==null&&y<=58?!1:"createImageBitmap"in window&&co(b)},d=({root:b,props:T})=>{let{id:v}=T,y=b.query("GET_ITEM",v);if(!y)return;let E=URL.createObjectURL(y.file);iu(E,(_,x)=>{b.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:v,width:_,height:x})})},m=({root:b,props:T})=>{let{id:v}=T,y=b.query("GET_ITEM",v);if(!y)return;let E=URL.createObjectURL(y.file),_=()=>{pu(E).then(x)},x=R=>{URL.revokeObjectURL(E);let P=(y.getMetadata("exif")||{}).orientation||-1,{width:A,height:B}=R;if(!A||!B)return;P>=5&&P<=8&&([A,B]=[B,A]);let w=Math.max(1,window.devicePixelRatio*.75),S=b.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR")*w,L=B/A,D=b.rect.element.width,F=b.rect.element.height,G=D,C=G*L;L>1?(G=Math.min(A,D*S),C=G*L):(C=Math.min(B,F*S),G=C/L);let q=lu(R,G,C,P),X=()=>{let oe=b.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?su(data):null;y.setMetadata("color",oe,!0),"close"in R&&R.close(),b.ref.overlayShadow.opacity=1,r({root:b,props:T,image:q})},K=y.getMetadata("filter");K?n(b,K,q).then(X):X()};if(c(y.file)){let R=a(eu);R.post({file:y.file},z=>{if(R.terminate(),!z){_();return}x(z)})}else _()},u=({root:b})=>{let T=b.ref.images[b.ref.images.length-1];T.translateY=0,T.scaleX=1,T.scaleY=1,T.opacity=1},g=({root:b})=>{b.ref.overlayShadow.opacity=1,b.ref.overlayError.opacity=0,b.ref.overlaySuccess.opacity=0},f=({root:b})=>{b.ref.overlayShadow.opacity=.25,b.ref.overlayError.opacity=1},h=({root:b})=>{b.ref.overlayShadow.opacity=.25,b.ref.overlaySuccess.opacity=1},I=({root:b})=>{b.ref.images=[],b.ref.imageData=null,b.ref.imageViewBin=[],b.ref.overlayShadow=b.appendChildView(b.createChildView(t,{opacity:0,status:"idle"})),b.ref.overlaySuccess=b.appendChildView(b.createChildView(t,{opacity:0,status:"success"})),b.ref.overlayError=b.appendChildView(b.createChildView(t,{opacity:0,status:"failure"}))};return e.utils.createView({name:"image-preview-wrapper",create:I,styles:["height"],apis:["height"],destroy:({root:b})=>{b.ref.images.forEach(T=>{T.image.width=1,T.image.height=1})},didWriteView:({root:b})=>{b.ref.images.forEach(T=>{T.dirty=!1})},write:e.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:u,DID_IMAGE_PREVIEW_CONTAINER_CREATE:d,DID_FINISH_CALCULATE_PREVIEWSIZE:m,DID_UPDATE_ITEM_METADATA:p,DID_THROW_ITEM_LOAD_ERROR:f,DID_THROW_ITEM_PROCESSING_ERROR:f,DID_THROW_ITEM_INVALID:f,DID_COMPLETE_ITEM_PROCESSING:h,DID_START_ITEM_PROCESSING:g,DID_REVERT_ITEM_PROCESSING:g},({root:b})=>{let T=b.ref.imageViewBin.filter(v=>v.opacity===0);b.ref.imageViewBin=b.ref.imageViewBin.filter(v=>v.opacity>0),T.forEach(v=>l(b,v)),T.length=0})})},po=e=>{let{addFilter:t,utils:i}=e,{Type:a,createRoute:n,isFile:l}=i,o=mu(e);return t("CREATE_VIEW",r=>{let{is:s,view:p,query:c}=r;if(!s("file")||!c("GET_ALLOW_IMAGE_PREVIEW"))return;let d=({root:h,props:I})=>{let{id:b}=I,T=c("GET_ITEM",b);if(!T||!l(T.file)||T.archived)return;let v=T.file;if(!Em(v)||!c("GET_IMAGE_PREVIEW_FILTER_ITEM")(T))return;let y="createImageBitmap"in(window||{}),E=c("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!y&&E&&v.size>E)return;h.ref.imagePreview=p.appendChildView(p.createChildView(o,{id:b}));let _=h.query("GET_IMAGE_PREVIEW_HEIGHT");_&&h.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:T.id,height:_});let x=!y&&v.size>c("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");h.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:b},x)},m=(h,I)=>{if(!h.ref.imagePreview)return;let{id:b}=I,T=h.query("GET_ITEM",{id:b});if(!T)return;let v=h.query("GET_PANEL_ASPECT_RATIO"),y=h.query("GET_ITEM_PANEL_ASPECT_RATIO"),E=h.query("GET_IMAGE_PREVIEW_HEIGHT");if(v||y||E)return;let{imageWidth:_,imageHeight:x}=h.ref;if(!_||!x)return;let R=h.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),z=h.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),A=(T.getMetadata("exif")||{}).orientation||-1;if(A>=5&&A<=8&&([_,x]=[x,_]),!co(T.file)||h.query("GET_IMAGE_PREVIEW_UPSCALE")){let D=2048/_;_*=D,x*=D}let B=x/_,w=(T.getMetadata("crop")||{}).aspectRatio||B,O=Math.max(R,Math.min(x,z)),S=h.rect.element.width,L=Math.min(S*w,O);h.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:T.id,height:L})},u=({root:h})=>{h.ref.shouldRescale=!0},g=({root:h,action:I})=>{I.change.key==="crop"&&(h.ref.shouldRescale=!0)},f=({root:h,action:I})=>{h.ref.imageWidth=I.width,h.ref.imageHeight=I.height,h.ref.shouldRescale=!0,h.ref.shouldDrawPreview=!0,h.dispatch("KICK")};p.registerWriter(n({DID_RESIZE_ROOT:u,DID_STOP_RESIZE:u,DID_LOAD_ITEM:d,DID_IMAGE_PREVIEW_CALCULATE_SIZE:f,DID_UPDATE_ITEM_METADATA:g},({root:h,props:I})=>{h.ref.imagePreview&&(h.rect.element.hidden||(h.ref.shouldRescale&&(m(h,I),h.ref.shouldRescale=!1),h.ref.shouldDrawPreview&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{h.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:I.id})})}),h.ref.shouldDrawPreview=!1)))}))}),{options:{allowImagePreview:[!0,a.BOOLEAN],imagePreviewFilterItem:[()=>!0,a.FUNCTION],imagePreviewHeight:[null,a.INT],imagePreviewMinHeight:[44,a.INT],imagePreviewMaxHeight:[256,a.INT],imagePreviewMaxFileSize:[null,a.INT],imagePreviewZoomFactor:[2,a.INT],imagePreviewUpscale:[!1,a.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,a.INT],imagePreviewTransparencyIndicator:[null,a.STRING],imagePreviewCalculateAverageImageColor:[!1,a.BOOLEAN],imagePreviewMarkupShow:[!0,a.BOOLEAN],imagePreviewMarkupFilter:[()=>!0,a.FUNCTION]}}},uu=typeof window<"u"&&typeof window.document<"u";uu&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:po}));var mo=po;var gu=e=>/^image/.test(e.type),fu=(e,t)=>{let i=new Image;i.onload=()=>{let a=i.naturalWidth,n=i.naturalHeight;i=null,t({width:a,height:n})},i.onerror=()=>t(null),i.src=e},uo=({addFilter:e,utils:t})=>{let{Type:i}=t;return e("DID_LOAD_ITEM",(a,{query:n})=>new Promise((l,o)=>{let r=a.file;if(!gu(r)||!n("GET_ALLOW_IMAGE_RESIZE"))return l(a);let s=n("GET_IMAGE_RESIZE_MODE"),p=n("GET_IMAGE_RESIZE_TARGET_WIDTH"),c=n("GET_IMAGE_RESIZE_TARGET_HEIGHT"),d=n("GET_IMAGE_RESIZE_UPSCALE");if(p===null&&c===null)return l(a);let m=p===null?c:p,u=c===null?m:c,g=URL.createObjectURL(r);fu(g,f=>{if(URL.revokeObjectURL(g),!f)return l(a);let{width:h,height:I}=f,b=(a.getMetadata("exif")||{}).orientation||-1;if(b>=5&&b<=8&&([h,I]=[I,h]),h===m&&I===u)return l(a);if(!d){if(s==="cover"){if(h<=m||I<=u)return l(a)}else if(h<=m&&I<=m)return l(a)}a.setMetadata("resize",{mode:s,upscale:d,size:{width:m,height:u}}),l(a)})})),{options:{allowImageResize:[!0,i.BOOLEAN],imageResizeMode:["cover",i.STRING],imageResizeUpscale:[!0,i.BOOLEAN],imageResizeTargetWidth:[null,i.INT],imageResizeTargetHeight:[null,i.INT]}}},hu=typeof window<"u"&&typeof window.document<"u";hu&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:uo}));var go=uo;var bu=e=>/^image/.test(e.type),Eu=e=>e.substr(0,e.lastIndexOf("."))||e,Tu={jpeg:"jpg","svg+xml":"svg"},Iu=(e,t)=>{let i=Eu(e),a=t.split("/")[1],n=Tu[a]||a;return`${i}.${n}`},vu=e=>/jpeg|png|svg\+xml/.test(e)?e:"image/jpeg",xu=e=>/^image/.test(e.type),yu={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},Ru=(e,t,i)=>(i===-1&&(i=1),yu[i](e,t)),qt=(e,t)=>({x:e,y:t}),Su=(e,t)=>e.x*t.x+e.y*t.y,fo=(e,t)=>qt(e.x-t.x,e.y-t.y),_u=(e,t)=>Su(fo(e,t),fo(e,t)),ho=(e,t)=>Math.sqrt(_u(e,t)),bo=(e,t)=>{let i=e,a=1.5707963267948966,n=t,l=1.5707963267948966-t,o=Math.sin(a),r=Math.sin(n),s=Math.sin(l),p=Math.cos(l),c=i/o,d=c*r,m=c*s;return qt(p*d,p*m)},wu=(e,t)=>{let i=e.width,a=e.height,n=bo(i,t),l=bo(a,t),o=qt(e.x+Math.abs(n.x),e.y-Math.abs(n.y)),r=qt(e.x+e.width+Math.abs(l.y),e.y+Math.abs(l.x)),s=qt(e.x-Math.abs(l.y),e.y+e.height-Math.abs(l.x));return{width:ho(o,r),height:ho(o,s)}},Io=(e,t,i=0,a={x:.5,y:.5})=>{let n=a.x>.5?1-a.x:a.x,l=a.y>.5?1-a.y:a.y,o=n*2*e.width,r=l*2*e.height,s=wu(t,i);return Math.max(s.width/o,s.height/r)},vo=(e,t)=>{let i=e.width,a=i*t;a>e.height&&(a=e.height,i=a/t);let n=(e.width-i)*.5,l=(e.height-a)*.5;return{x:n,y:l,width:i,height:a}},Eo=(e,t,i=1)=>{let a=e.height/e.width,n=1,l=t,o=1,r=a;r>l&&(r=l,o=r/a);let s=Math.max(n/o,l/r),p=e.width/(i*s*o),c=p*t;return{width:p,height:c}},xo=e=>{e.width=1,e.height=1,e.getContext("2d").clearRect(0,0,1,1)},To=e=>e&&(e.horizontal||e.vertical),Lu=(e,t,i)=>{if(t<=1&&!To(i))return e.width=e.naturalWidth,e.height=e.naturalHeight,e;let a=document.createElement("canvas"),n=e.naturalWidth,l=e.naturalHeight,o=t>=5&&t<=8;o?(a.width=l,a.height=n):(a.width=n,a.height=l);let r=a.getContext("2d");if(t&&r.transform.apply(r,Ru(n,l,t)),To(i)){let s=[1,0,0,1,0,0];(!o&&i.horizontal||o&i.vertical)&&(s[0]=-1,s[4]=n),(!o&&i.vertical||o&&i.horizontal)&&(s[3]=-1,s[5]=l),r.transform(...s)}return r.drawImage(e,0,0,n,l),a},Mu=(e,t,i={},a={})=>{let{canvasMemoryLimit:n,background:l=null}=a,o=i.zoom||1,r=Lu(e,t,i.flip),s={width:r.width,height:r.height},p=i.aspectRatio||s.height/s.width,c=Eo(s,p,o);if(n){let T=c.width*c.height;if(T>n){let v=Math.sqrt(n)/Math.sqrt(T);s.width=Math.floor(s.width*v),s.height=Math.floor(s.height*v),c=Eo(s,p,o)}}let d=document.createElement("canvas"),m={x:c.width*.5,y:c.height*.5},u={x:0,y:0,width:c.width,height:c.height,center:m},g=typeof i.scaleToFit>"u"||i.scaleToFit,f=o*Io(s,vo(u,p),i.rotation,g?i.center:{x:.5,y:.5});d.width=Math.round(c.width/f),d.height=Math.round(c.height/f),m.x/=f,m.y/=f;let h={x:m.x-s.width*(i.center?i.center.x:.5),y:m.y-s.height*(i.center?i.center.y:.5)},I=d.getContext("2d");l&&(I.fillStyle=l,I.fillRect(0,0,d.width,d.height)),I.translate(m.x,m.y),I.rotate(i.rotation||0),I.drawImage(r,h.x-m.x,h.y-m.y,s.width,s.height);let b=I.getImageData(0,0,d.width,d.height);return xo(d),b},Au=typeof window<"u"&&typeof window.document<"u";Au&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,i){var a=this.toDataURL(t,i).split(",")[1];setTimeout(function(){for(var n=atob(a),l=n.length,o=new Uint8Array(l),r=0;rnew Promise(a=>{let n=i?i(e):e;Promise.resolve(n).then(l=>{l.toBlob(a,t.type,t.quality)})}),Ri=(e,t)=>$t(e.x*t,e.y*t),Si=(e,t)=>$t(e.x+t.x,e.y+t.y),yo=e=>{let t=Math.sqrt(e.x*e.x+e.y*e.y);return t===0?{x:0,y:0}:$t(e.x/t,e.y/t)},qe=(e,t,i)=>{let a=Math.cos(t),n=Math.sin(t),l=$t(e.x-i.x,e.y-i.y);return $t(i.x+a*l.x-n*l.y,i.y+n*l.x+a*l.y)},$t=(e=0,t=0)=>({x:e,y:t}),me=(e,t,i=1,a)=>{if(typeof e=="string")return parseFloat(e)*i;if(typeof e=="number")return e*(a?t[a]:Math.min(t.width,t.height))},ct=(e,t,i)=>{let a=e.borderStyle||e.lineStyle||"solid",n=e.backgroundColor||e.fontColor||"transparent",l=e.borderColor||e.lineColor||"transparent",o=me(e.borderWidth||e.lineWidth,t,i),r=e.lineCap||"round",s=e.lineJoin||"round",p=typeof a=="string"?"":a.map(d=>me(d,t,i)).join(","),c=e.opacity||1;return{"stroke-linecap":r,"stroke-linejoin":s,"stroke-width":o||0,"stroke-dasharray":p,stroke:l,fill:n,opacity:c}},Le=e=>e!=null,wt=(e,t,i=1)=>{let a=me(e.x,t,i,"width")||me(e.left,t,i,"width"),n=me(e.y,t,i,"height")||me(e.top,t,i,"height"),l=me(e.width,t,i,"width"),o=me(e.height,t,i,"height"),r=me(e.right,t,i,"width"),s=me(e.bottom,t,i,"height");return Le(n)||(Le(o)&&Le(s)?n=t.height-o-s:n=s),Le(a)||(Le(l)&&Le(r)?a=t.width-l-r:a=r),Le(l)||(Le(a)&&Le(r)?l=t.width-a-r:l=0),Le(o)||(Le(n)&&Le(s)?o=t.height-n-s:o=0),{x:a||0,y:n||0,width:l||0,height:o||0}},zu=e=>e.map((t,i)=>`${i===0?"M":"L"} ${t.x} ${t.y}`).join(" "),Ne=(e,t)=>Object.keys(t).forEach(i=>e.setAttribute(i,t[i])),Ou="http://www.w3.org/2000/svg",_t=(e,t)=>{let i=document.createElementNS(Ou,e);return t&&Ne(i,t),i},Fu=e=>Ne(e,{...e.rect,...e.styles}),Du=e=>{let t=e.rect.x+e.rect.width*.5,i=e.rect.y+e.rect.height*.5,a=e.rect.width*.5,n=e.rect.height*.5;return Ne(e,{cx:t,cy:i,rx:a,ry:n,...e.styles})},Cu={contain:"xMidYMid meet",cover:"xMidYMid slice"},Bu=(e,t)=>{Ne(e,{...e.rect,...e.styles,preserveAspectRatio:Cu[t.fit]||"none"})},Nu={left:"start",center:"middle",right:"end"},ku=(e,t,i,a)=>{let n=me(t.fontSize,i,a),l=t.fontFamily||"sans-serif",o=t.fontWeight||"normal",r=Nu[t.textAlign]||"start";Ne(e,{...e.rect,...e.styles,"stroke-width":0,"font-weight":o,"font-size":n,"font-family":l,"text-anchor":r}),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},Vu=(e,t,i,a)=>{Ne(e,{...e.rect,...e.styles,fill:"none"});let n=e.childNodes[0],l=e.childNodes[1],o=e.childNodes[2],r=e.rect,s={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(Ne(n,{x1:r.x,y1:r.y,x2:s.x,y2:s.y}),!t.lineDecoration)return;l.style.display="none",o.style.display="none";let p=yo({x:s.x-r.x,y:s.y-r.y}),c=me(.05,i,a);if(t.lineDecoration.indexOf("arrow-begin")!==-1){let d=Ri(p,c),m=Si(r,d),u=qe(r,2,m),g=qe(r,-2,m);Ne(l,{style:"display:block;",d:`M${u.x},${u.y} L${r.x},${r.y} L${g.x},${g.y}`})}if(t.lineDecoration.indexOf("arrow-end")!==-1){let d=Ri(p,-c),m=Si(s,d),u=qe(s,2,m),g=qe(s,-2,m);Ne(o,{style:"display:block;",d:`M${u.x},${u.y} L${s.x},${s.y} L${g.x},${g.y}`})}},Gu=(e,t,i,a)=>{Ne(e,{...e.styles,fill:"none",d:zu(t.points.map(n=>({x:me(n.x,i,a,"width"),y:me(n.y,i,a,"height")})))})},yi=e=>t=>_t(e,{id:t.id}),Uu=e=>{let t=_t("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=()=>{t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},Wu=e=>{let t=_t("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),i=_t("line");t.appendChild(i);let a=_t("path");t.appendChild(a);let n=_t("path");return t.appendChild(n),t},Hu={image:Uu,rect:yi("rect"),ellipse:yi("ellipse"),text:yi("text"),path:yi("path"),line:Wu},ju={rect:Fu,ellipse:Du,image:Bu,text:ku,path:Gu,line:Vu},Yu=(e,t)=>Hu[e](t),qu=(e,t,i,a,n)=>{t!=="path"&&(e.rect=wt(i,a,n)),e.styles=ct(i,a,n),ju[t](e,i,a,n)},Ro=(e,t)=>e[1].zIndex>t[1].zIndex?1:e[1].zIndexnew Promise(n=>{let{background:l=null}=a,o=new FileReader;o.onloadend=()=>{let r=o.result,s=document.createElement("div");s.style.cssText="position:absolute;pointer-events:none;width:0;height:0;visibility:hidden;",s.innerHTML=r;let p=s.querySelector("svg");document.body.appendChild(s);let c=p.getBBox();s.parentNode.removeChild(s);let d=s.querySelector("title"),m=p.getAttribute("viewBox")||"",u=p.getAttribute("width")||"",g=p.getAttribute("height")||"",f=parseFloat(u)||null,h=parseFloat(g)||null,I=(u.match(/[a-z]+/)||[])[0]||"",b=(g.match(/[a-z]+/)||[])[0]||"",T=m.split(" ").map(parseFloat),v=T.length?{x:T[0],y:T[1],width:T[2],height:T[3]}:c,y=f??v.width,E=h??v.height;p.style.overflow="visible",p.setAttribute("width",y),p.setAttribute("height",E);let _="";if(i&&i.length){let K={width:y,height:E};_=i.sort(Ro).reduce((oe,k)=>{let H=Yu(k[0],k[1]);return qu(H,k[0],k[1],K),H.removeAttribute("id"),H.getAttribute("opacity")===1&&H.removeAttribute("opacity"),oe+` `+H.outerHTML+` -`},""),w=` +`},""),_=` -${w.replace(/ /g," ")} +${_.replace(/ /g," ")} -`}let x=t.aspectRatio||b/y,_=y,P=_*x,O=typeof t.scaleToFit>"u"||t.scaleToFit,M=t.center?t.center.x:.5,N=t.center?t.center.y:.5,S=Il({width:y,height:b},vl({width:_,height:P},x),t.rotation,O?{x:M,y:N}:{x:.5,y:.5}),D=t.zoom*S,R=t.rotation*(180/Math.PI),L={x:_*.5,y:P*.5},z={x:L.x-y*M,y:L.y-b*N},F=[`rotate(${R} ${L.x} ${L.y})`,`translate(${L.x} ${L.y})`,`scale(${D})`,`translate(${-L.x} ${-L.y})`,`translate(${z.x} ${z.y})`],G=t.flip&&t.flip.horizontal,C=t.flip&&t.flip.vertical,Y=[`scale(${G?-1:1} ${C?-1:1})`,`translate(${G?-y:0} ${C?-b:0})`],Q=` -"u"||t.scaleToFit,A=t.center?t.center.x:.5,B=t.center?t.center.y:.5,w=Io({width:y,height:E},vo({width:R,height:z},x),t.rotation,P?{x:A,y:B}:{x:.5,y:.5}),O=t.zoom*w,S=t.rotation*(180/Math.PI),L={x:R*.5,y:z*.5},D={x:L.x-y*A,y:L.y-E*B},F=[`rotate(${S} ${L.x} ${L.y})`,`translate(${L.x} ${L.y})`,`scale(${O})`,`translate(${-L.x} ${-L.y})`,`translate(${D.x} ${D.y})`],G=t.flip&&t.flip.horizontal,C=t.flip&&t.flip.vertical,q=[`scale(${G?-1:1} ${C?-1:1})`,`translate(${G?-y:0} ${C?-E:0})`],X=` + ${d?d.textContent:""} - -${p.outerHTML}${w} + +${p.outerHTML}${_} -`;n(Q)},l.readAsText(e)}),Bu=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},ku=()=>{let e={resize:c,filter:p},t=(d,m)=>(d.forEach(u=>{m=e[u.type](m,u.data)}),m),i=(d,m)=>{let u=d.transforms,f=null;if(u.forEach(g=>{g.type==="filter"&&(f=g)}),f){let g=null;u.forEach(h=>{h.type==="resize"&&(g=h)}),g&&(g.data.matrix=f.data,u=u.filter(h=>h.type!=="filter"))}m(t(u,d.imageData))};self.onmessage=d=>{i(d.data.message,m=>{self.postMessage({id:d.data.id,message:m},[m.data.buffer])})};let a=1,n=1,o=1;function l(d,m,u){let f=m[d]/255,g=m[d+1]/255,h=m[d+2]/255,I=m[d+3]/255,E=f*u[0]+g*u[1]+h*u[2]+I*u[3]+u[4],T=f*u[5]+g*u[6]+h*u[7]+I*u[8]+u[9],v=f*u[10]+g*u[11]+h*u[12]+I*u[13]+u[14],y=f*u[15]+g*u[16]+h*u[17]+I*u[18]+u[19],b=Math.max(0,E*y)+a*(1-y),w=Math.max(0,T*y)+n*(1-y),x=Math.max(0,v*y)+o*(1-y);m[d]=Math.max(0,Math.min(1,b))*255,m[d+1]=Math.max(0,Math.min(1,w))*255,m[d+2]=Math.max(0,Math.min(1,x))*255}let r=self.JSON.stringify([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);function s(d){return self.JSON.stringify(d||[])===r}function p(d,m){if(!m||s(m))return d;let u=d.data,f=u.length,g=m[0],h=m[1],I=m[2],E=m[3],T=m[4],v=m[5],y=m[6],b=m[7],w=m[8],x=m[9],_=m[10],P=m[11],O=m[12],M=m[13],N=m[14],S=m[15],D=m[16],R=m[17],L=m[18],z=m[19],F=0,G=0,C=0,Y=0,Q=0,$=0,pe=0,k=0,H=0,q=0,le=0,ee=0;for(;F1&&f===!1)return p(d,I);g=d.width*S,h=d.height*S}let E=d.width,T=d.height,v=Math.round(g),y=Math.round(h),b=d.data,w=new Uint8ClampedArray(v*y*4),x=E/v,_=T/y,P=Math.ceil(x*.5),O=Math.ceil(_*.5);for(let M=0;M=-1&&le<=1&&(D=2*le*le*le-3*le*le+1,D>0)){q=4*(H+Q*E);let ee=b[q+3];C+=D*ee,L+=D,ee<255&&(D=D*ee/250),z+=D*b[q],F+=D*b[q+1],G+=D*b[q+2],R+=D}}}w[S]=z/R,w[S+1]=F/R,w[S+2]=G/R,w[S+3]=C/L,I&&l(S,w,I)}return{data:w,width:v,height:y}}},Vu=(e,t)=>{if(e.getUint32(t+4,!1)!==1165519206)return;t+=4;let i=e.getUint16(t+=6,!1)===18761;t+=e.getUint32(t+4,i);let a=e.getUint16(t,i);t+=2;for(let n=0;n{let t=new DataView(e);if(t.getUint16(0)!==65496)return null;let i=2,a,n,o=!1;for(;i=65504&&a<=65519||a===65534)||(o||(o=Vu(t,i,n)),i+n>t.byteLength)));)i+=n;return e.slice(0,i)},Uu=e=>new Promise(t=>{let i=new FileReader;i.onload=()=>t(Gu(i.result)||null),i.readAsArrayBuffer(e.slice(0,256*1024))}),Wu=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,Hu=(e,t)=>{let i=Wu();if(i){let a=new i;return a.append(e),a.getBlob(t)}return new Blob([e],{type:t})},ju=()=>Math.random().toString(36).substr(2,9),qu=e=>{let t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),i=URL.createObjectURL(t),a=new Worker(i),n=[];return{transfer:()=>{},post:(o,l,r)=>{let s=ju();n[s]=l,a.onmessage=p=>{let c=n[p.data.id];c&&(c(p.data.message),delete n[p.data.id])},a.postMessage({id:s,message:o},r)},terminate:()=>{a.terminate(),URL.revokeObjectURL(i)}}},Yu=e=>new Promise((t,i)=>{let a=new Image;a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),$u=e=>e.reduce((t,i)=>t.then(a=>i().then(Array.prototype.concat.bind(a))),Promise.resolve([])),Xu=(e,t)=>new Promise(i=>{let a={width:e.width,height:e.height},n=e.getContext("2d"),o=t.sort(_l).map(l=>()=>new Promise(r=>{af[l[0]](n,a,l[1],r)&&r()}));$u(o).then(()=>i(e))}),Lt=(e,t)=>{e.beginPath(),e.lineCap=t["stroke-linecap"],e.lineJoin=t["stroke-linejoin"],e.lineWidth=t["stroke-width"],t["stroke-dasharray"].length&&e.setLineDash(t["stroke-dasharray"].split(",")),e.fillStyle=t.fill,e.strokeStyle=t.stroke,e.globalAlpha=t.opacity||1},At=e=>{e.fill(),e.stroke(),e.globalAlpha=1},Qu=(e,t,i)=>{let a=St(i,t),n=ct(i,t);return Lt(e,n),e.rect(a.x,a.y,a.width,a.height),At(e,n),!0},Zu=(e,t,i)=>{let a=St(i,t),n=ct(i,t);Lt(e,n);let o=a.x,l=a.y,r=a.width,s=a.height,p=.5522848,c=r/2*p,d=s/2*p,m=o+r,u=l+s,f=o+r/2,g=l+s/2;return e.moveTo(o,g),e.bezierCurveTo(o,g-d,f-c,l,f,l),e.bezierCurveTo(f+c,l,m,g-d,m,g),e.bezierCurveTo(m,g+d,f+c,u,f,u),e.bezierCurveTo(f-c,u,o,g+d,o,g),At(e,n),!0},Ku=(e,t,i,a)=>{let n=St(i,t),o=ct(i,t);Lt(e,o);let l=new Image;new URL(i.src,window.location.href).origin!==window.location.origin&&(l.crossOrigin=""),l.onload=()=>{if(i.fit==="cover"){let s=n.width/n.height,p=s>1?l.width:l.height*s,c=s>1?l.width/s:l.height,d=l.width*.5-p*.5,m=l.height*.5-c*.5;e.drawImage(l,d,m,p,c,n.x,n.y,n.width,n.height)}else if(i.fit==="contain"){let s=Math.min(n.width/l.width,n.height/l.height),p=s*l.width,c=s*l.height,d=n.x+n.width*.5-p*.5,m=n.y+n.height*.5-c*.5;e.drawImage(l,0,0,l.width,l.height,d,m,p,c)}else e.drawImage(l,0,0,l.width,l.height,n.x,n.y,n.width,n.height);At(e,o),a()},l.src=i.src},Ju=(e,t,i)=>{let a=St(i,t),n=ct(i,t);Lt(e,n);let o=me(i.fontSize,t),l=i.fontFamily||"sans-serif",r=i.fontWeight||"normal",s=i.textAlign||"left";return e.font=`${r} ${o}px ${l}`,e.textAlign=s,e.fillText(i.text,a.x,a.y),At(e,n),!0},ef=(e,t,i)=>{let a=ct(i,t);Lt(e,a),e.beginPath();let n=i.points.map(l=>({x:me(l.x,t,1,"width"),y:me(l.y,t,1,"height")}));e.moveTo(n[0].x,n[0].y);let o=n.length;for(let l=1;l{let a=St(i,t),n=ct(i,t);Lt(e,n),e.beginPath();let o={x:a.x,y:a.y},l={x:a.x+a.width,y:a.y+a.height};e.moveTo(o.x,o.y),e.lineTo(l.x,l.y);let r=yl({x:l.x-o.x,y:l.y-o.y}),s=.04*Math.min(t.width,t.height);if(i.lineDecoration.indexOf("arrow-begin")!==-1){let p=_i(r,s),c=Ri(o,p),d=Ye(o,2,c),m=Ye(o,-2,c);e.moveTo(d.x,d.y),e.lineTo(o.x,o.y),e.lineTo(m.x,m.y)}if(i.lineDecoration.indexOf("arrow-end")!==-1){let p=_i(r,-s),c=Ri(l,p),d=Ye(l,2,c),m=Ye(l,-2,c);e.moveTo(d.x,d.y),e.lineTo(l.x,l.y),e.lineTo(m.x,m.y)}return At(e,n),!0},af={rect:Qu,ellipse:Zu,image:Ku,text:Ju,line:tf,path:ef},nf=e=>{let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e,0,0),t},of=(e,t,i={})=>new Promise((a,n)=>{if(!e||!pu(e))return n({status:"not an image file",file:e});let{stripImageHead:o,beforeCreateBlob:l,afterCreateBlob:r,canvasMemoryLimit:s}=i,{crop:p,size:c,filter:d,markup:m,output:u}=t,f=t.image&&t.image.orientation?Math.max(1,Math.min(8,t.image.orientation)):null,g=u&&u.quality,h=g===null?null:g/100,I=u&&u.type||null,E=u&&u.background||null,T=[];c&&(typeof c.width=="number"||typeof c.height=="number")&&T.push({type:"resize",data:c}),d&&d.length===20&&T.push({type:"filter",data:d});let v=w=>{let x=r?r(w):w;Promise.resolve(x).then(a)},y=(w,x)=>{let _=nf(w),P=m.length?Xu(_,m):_;Promise.resolve(P).then(O=>{Iu(O,x,l).then(M=>{if(xl(O),o)return v(M);Uu(e).then(N=>{N!==null&&(M=new Blob([N,M.slice(20)],{type:M.type})),v(M)})}).catch(n)})};if(/svg/.test(e.type)&&I===null)return Nu(e,p,m,{background:E}).then(w=>{a(Hu(w,"image/svg+xml"))});let b=URL.createObjectURL(e);Yu(b).then(w=>{URL.revokeObjectURL(b);let x=bu(w,f,p,{canvasMemoryLimit:s,background:E}),_={quality:h,type:I||e.type};if(!T.length)return y(x,_);let P=qu(ku);P.post({transforms:T,imageData:x},O=>{y(Bu(O),_),P.terminate()},[x.data.buffer])}).catch(n)}),lf=["x","y","left","top","right","bottom","width","height"],rf=e=>typeof e=="string"&&/%/.test(e)?parseFloat(e)/100:e,sf=e=>{let[t,i]=e,a=i.points?{}:lf.reduce((n,o)=>(n[o]=rf(i[o]),n),{});return[t,{zIndex:0,...i,...a}]},cf=e=>new Promise((t,i)=>{let a=new Image;a.src=URL.createObjectURL(e);let n=()=>{let l=a.naturalWidth,r=a.naturalHeight;l&&r&&(URL.revokeObjectURL(a.src),clearInterval(o),t({width:l,height:r}))};a.onerror=l=>{URL.revokeObjectURL(a.src),clearInterval(o),i(l)};let o=setInterval(n,1);n()});typeof window<"u"&&typeof window.document<"u"&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,i){let a=this;setTimeout(()=>{let n=a.toDataURL(t,i).split(",")[1],o=atob(n),l=o.length,r=new Uint8Array(l);for(;l--;)r[l]=o.charCodeAt(l);e(new Blob([r],{type:t||"image/png"}))})}}));var La=typeof window<"u"&&typeof window.document<"u",df=La&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Rl=({addFilter:e,utils:t})=>{let{Type:i,forin:a,getFileFromBlob:n,isFile:o}=t,l=["crop","resize","filter","markup","output"],r=c=>(d,m,u)=>d(m,c?c(u):u),s=c=>c.aspectRatio===null&&c.rotation===0&&c.zoom===1&&c.center&&c.center.x===.5&&c.center.y===.5&&c.flip&&c.flip.horizontal===!1&&c.flip.vertical===!1;e("SHOULD_PREPARE_OUTPUT",(c,{query:d})=>new Promise(m=>{m(!d("IS_ASYNC"))}));let p=(c,d,m)=>new Promise(u=>{if(!c("GET_ALLOW_IMAGE_TRANSFORM")||m.archived||!o(d)||!lu(d))return u(!1);cf(d).then(()=>{let f=c("GET_IMAGE_TRANSFORM_IMAGE_FILTER");if(f){let g=f(d);if(g==null)return handleRevert(!0);if(typeof g=="boolean")return u(g);if(typeof g.then=="function")return g.then(u)}u(!0)}).catch(f=>{u(!1)})});return e("DID_CREATE_ITEM",(c,{query:d,dispatch:m})=>{d("GET_ALLOW_IMAGE_TRANSFORM")&&c.extend("requestPrepare",()=>new Promise((u,f)=>{m("REQUEST_PREPARE_OUTPUT",{query:c.id,item:c,success:u,failure:f},!0)}))}),e("PREPARE_OUTPUT",(c,{query:d,item:m})=>new Promise(u=>{p(d,c,m).then(f=>{if(!f)return u(c);let g=[];d("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_ORIGINAL")&&g.push(()=>new Promise(x=>{x({name:d("GET_IMAGE_TRANSFORM_VARIANTS_ORIGINAL_NAME"),file:c})})),d("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_DEFAULT")&&g.push((x,_,P)=>new Promise(O=>{x(_,P).then(M=>O({name:d("GET_IMAGE_TRANSFORM_VARIANTS_DEFAULT_NAME"),file:M}))}));let h=d("GET_IMAGE_TRANSFORM_VARIANTS")||{};a(h,(x,_)=>{let P=r(_);g.push((O,M,N)=>new Promise(S=>{P(O,M,N).then(D=>S({name:x,file:D}))}))});let I=d("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY"),E=d("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY_MODE"),T=I===null?null:I/100,v=d("GET_IMAGE_TRANSFORM_OUTPUT_MIME_TYPE"),y=d("GET_IMAGE_TRANSFORM_CLIENT_TRANSFORMS")||l;m.setMetadata("output",{type:v,quality:T,client:y},!0);let b=(x,_)=>new Promise((P,O)=>{let M={..._};Object.keys(M).filter(C=>C!=="exif").forEach(C=>{y.indexOf(C)===-1&&delete M[C]});let{resize:N,exif:S,output:D,crop:R,filter:L,markup:z}=M,F={image:{orientation:S?S.orientation:null},output:D&&(D.type||typeof D.quality=="number"||D.background)?{type:D.type,quality:typeof D.quality=="number"?D.quality*100:null,background:D.background||d("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||null}:void 0,size:N&&(N.size.width||N.size.height)?{mode:N.mode,upscale:N.upscale,...N.size}:void 0,crop:R&&!s(R)?{...R}:void 0,markup:z&&z.length?z.map(sf):[],filter:L};if(F.output){let C=D.type?D.type!==x.type:!1,Y=/\/jpe?g$/.test(x.type),Q=D.quality!==null?Y&&E==="always":!1;if(!!!(F.size||F.crop||F.filter||C||Q))return P(x)}let G={beforeCreateBlob:d("GET_IMAGE_TRANSFORM_BEFORE_CREATE_BLOB"),afterCreateBlob:d("GET_IMAGE_TRANSFORM_AFTER_CREATE_BLOB"),canvasMemoryLimit:d("GET_IMAGE_TRANSFORM_CANVAS_MEMORY_LIMIT"),stripImageHead:d("GET_IMAGE_TRANSFORM_OUTPUT_STRIP_IMAGE_HEAD")};of(x,F,G).then(C=>{let Y=n(C,cu(x.name,du(C.type)));P(Y)}).catch(O)}),w=g.map(x=>x(b,c,m.getMetadata()));Promise.all(w).then(x=>{u(x.length===1&&x[0].name===null?x[0].file:x)})})})),{options:{allowImageTransform:[!0,i.BOOLEAN],imageTransformImageFilter:[null,i.FUNCTION],imageTransformOutputMimeType:[null,i.STRING],imageTransformOutputQuality:[null,i.INT],imageTransformOutputStripImageHead:[!0,i.BOOLEAN],imageTransformClientTransforms:[null,i.ARRAY],imageTransformOutputQualityMode:["always",i.STRING],imageTransformVariants:[null,i.OBJECT],imageTransformVariantsIncludeDefault:[!0,i.BOOLEAN],imageTransformVariantsDefaultName:[null,i.STRING],imageTransformVariantsIncludeOriginal:[!1,i.BOOLEAN],imageTransformVariantsOriginalName:["original_",i.STRING],imageTransformBeforeCreateBlob:[null,i.FUNCTION],imageTransformAfterCreateBlob:[null,i.FUNCTION],imageTransformCanvasMemoryLimit:[La&&df?4096*4096:null,i.INT],imageTransformCanvasBackgroundColor:[null,i.STRING]}}};La&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Rl}));var wl=Rl;var Aa=e=>/^video/.test(e.type),Xt=e=>/^audio/.test(e.type),Ma=class{constructor(t,i){this.mediaEl=t,this.audioElems=i,this.onplayhead=!1,this.duration=0,this.timelineWidth=this.audioElems.timeline.offsetWidth-this.audioElems.playhead.offsetWidth,this.moveplayheadFn=this.moveplayhead.bind(this),this.registerListeners()}registerListeners(){this.mediaEl.addEventListener("timeupdate",this.timeUpdate.bind(this),!1),this.mediaEl.addEventListener("canplaythrough",()=>this.duration=this.mediaEl.duration,!1),this.audioElems.timeline.addEventListener("click",this.timelineClicked.bind(this),!1),this.audioElems.button.addEventListener("click",this.play.bind(this)),this.audioElems.playhead.addEventListener("mousedown",this.mouseDown.bind(this),!1),window.addEventListener("mouseup",this.mouseUp.bind(this),!1)}play(){this.mediaEl.paused?this.mediaEl.play():this.mediaEl.pause(),this.audioElems.button.classList.toggle("play"),this.audioElems.button.classList.toggle("pause")}timeUpdate(){let t=this.mediaEl.currentTime/this.duration*100;this.audioElems.playhead.style.marginLeft=t+"%",this.mediaEl.currentTime===this.duration&&(this.audioElems.button.classList.toggle("play"),this.audioElems.button.classList.toggle("pause"))}moveplayhead(t){let i=t.clientX-this.getPosition(this.audioElems.timeline);i>=0&&i<=this.timelineWidth&&(this.audioElems.playhead.style.marginLeft=i+"px"),i<0&&(this.audioElems.playhead.style.marginLeft="0px"),i>this.timelineWidth&&(this.audioElems.playhead.style.marginLeft=this.timelineWidth-4+"px")}timelineClicked(t){this.moveplayhead(t),this.mediaEl.currentTime=this.duration*this.clickPercent(t)}mouseDown(){this.onplayhead=!0,window.addEventListener("mousemove",this.moveplayheadFn,!0),this.mediaEl.removeEventListener("timeupdate",this.timeUpdate.bind(this),!1)}mouseUp(t){window.removeEventListener("mousemove",this.moveplayheadFn,!0),this.onplayhead==!0&&(this.moveplayhead(t),this.mediaEl.currentTime=this.duration*this.clickPercent(t),this.mediaEl.addEventListener("timeupdate",this.timeUpdate.bind(this),!1)),this.onplayhead=!1}clickPercent(t){return(t.clientX-this.getPosition(this.audioElems.timeline))/this.timelineWidth}getPosition(t){return t.getBoundingClientRect().left}},pf=e=>e.utils.createView({name:"media-preview",tag:"div",ignoreRect:!0,create:({root:t,props:i})=>{let{id:a}=i,n=t.query("GET_ITEM",{id:i.id}),o=Xt(n.file)?"audio":"video";if(t.ref.media=document.createElement(o),t.ref.media.setAttribute("controls",!0),t.element.appendChild(t.ref.media),Xt(n.file)){let l=document.createDocumentFragment();t.ref.audio=[],t.ref.audio.container=document.createElement("div"),t.ref.audio.button=document.createElement("span"),t.ref.audio.timeline=document.createElement("div"),t.ref.audio.playhead=document.createElement("div"),t.ref.audio.container.className="audioplayer",t.ref.audio.button.className="playpausebtn play",t.ref.audio.timeline.className="timeline",t.ref.audio.playhead.className="playhead",t.ref.audio.timeline.appendChild(t.ref.audio.playhead),t.ref.audio.container.appendChild(t.ref.audio.button),t.ref.audio.container.appendChild(t.ref.audio.timeline),l.appendChild(t.ref.audio.container),t.element.appendChild(l)}},write:e.utils.createRoute({DID_MEDIA_PREVIEW_LOAD:({root:t,props:i})=>{let{id:a}=i,n=t.query("GET_ITEM",{id:i.id});if(!n)return;let o=window.URL||window.webkitURL,l=new Blob([n.file],{type:n.file.type});t.ref.media.type=n.file.type,t.ref.media.src=n.file.mock&&n.file.url||o.createObjectURL(l),Xt(n.file)&&new Ma(t.ref.media,t.ref.audio),t.ref.media.addEventListener("loadeddata",()=>{let r=75;if(Aa(n.file)){let s=t.ref.media.offsetWidth,p=t.ref.media.videoWidth/s;r=t.ref.media.videoHeight/p}t.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:i.id,height:r})},!1)}})}),mf=e=>{let t=({root:a,props:n})=>{let{id:o}=n;a.query("GET_ITEM",o)&&a.dispatch("DID_MEDIA_PREVIEW_LOAD",{id:o})},i=({root:a,props:n})=>{let o=pf(e);a.ref.media=a.appendChildView(a.createChildView(o,{id:n.id}))};return e.utils.createView({name:"media-preview-wrapper",create:i,write:e.utils.createRoute({DID_MEDIA_PREVIEW_CONTAINER_CREATE:t})})},Oa=e=>{let{addFilter:t,utils:i}=e,{Type:a,createRoute:n}=i,o=mf(e);return t("CREATE_VIEW",l=>{let{is:r,view:s,query:p}=l;if(!r("file"))return;let c=({root:d,props:m})=>{let{id:u}=m,f=p("GET_ITEM",u),g=p("GET_ALLOW_VIDEO_PREVIEW"),h=p("GET_ALLOW_AUDIO_PREVIEW");!f||f.archived||(!Aa(f.file)||!g)&&(!Xt(f.file)||!h)||(d.ref.mediaPreview=s.appendChildView(s.createChildView(o,{id:u})),d.dispatch("DID_MEDIA_PREVIEW_CONTAINER_CREATE",{id:u}))};s.registerWriter(n({DID_LOAD_ITEM:c},({root:d,props:m})=>{let{id:u}=m,f=p("GET_ITEM",u),g=d.query("GET_ALLOW_VIDEO_PREVIEW"),h=d.query("GET_ALLOW_AUDIO_PREVIEW");!f||(!Aa(f.file)||!g)&&(!Xt(f.file)||!h)||d.rect.element.hidden}))}),{options:{allowVideoPreview:[!0,a.BOOLEAN],allowAudioPreview:[!0,a.BOOLEAN]}}},uf=typeof window<"u"&&typeof window.document<"u";uf&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Oa}));var Sl={labelIdle:'\u0627\u0633\u062D\u0628 \u0648 \u0627\u062F\u0631\u062C \u0645\u0644\u0641\u0627\u062A\u0643 \u0623\u0648 \u062A\u0635\u0641\u062D ',labelInvalidField:"\u0627\u0644\u062D\u0642\u0644 \u064A\u062D\u062A\u0648\u064A \u0639\u0644\u0649 \u0645\u0644\u0641\u0627\u062A \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629",labelFileWaitingForSize:"\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u062D\u062C\u0645",labelFileSizeNotAvailable:"\u0627\u0644\u062D\u062C\u0645 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D",labelFileLoading:"\u0628\u0627\u0644\u0625\u0646\u062A\u0638\u0627\u0631",labelFileLoadError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u062D\u0645\u064A\u0644",labelFileProcessing:"\u064A\u062A\u0645 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingComplete:"\u062A\u0645 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingAborted:"\u062A\u0645 \u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingRevertError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u0631\u0627\u062C\u0639",labelFileRemoveError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062D\u0630\u0641",labelTapToCancel:"\u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0644\u063A\u0627\u0621",labelTapToRetry:"\u0627\u0646\u0642\u0631 \u0644\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",labelTapToUndo:"\u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u0631\u0627\u062C\u0639",labelButtonRemoveItem:"\u0645\u0633\u062D",labelButtonAbortItemLoad:"\u0625\u0644\u063A\u0627\u0621",labelButtonRetryItemLoad:"\u0625\u0639\u0627\u062F\u0629",labelButtonAbortItemProcessing:"\u0625\u0644\u063A\u0627\u0621",labelButtonUndoItemProcessing:"\u062A\u0631\u0627\u062C\u0639",labelButtonRetryItemProcessing:"\u0625\u0639\u0627\u062F\u0629",labelButtonProcessItem:"\u0631\u0641\u0639",labelMaxFileSizeExceeded:"\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u0627",labelMaxFileSize:"\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0627\u0644\u0623\u0642\u0635\u0649: {filesize}",labelMaxTotalFileSizeExceeded:"\u062A\u0645 \u062A\u062C\u0627\u0648\u0632 \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u062D\u062C\u0645 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A",labelMaxTotalFileSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641: {filesize}",labelFileTypeNotAllowed:"\u0645\u0644\u0641 \u0645\u0646 \u0646\u0648\u0639 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D",fileValidateTypeLabelExpectedTypes:"\u062A\u062A\u0648\u0642\u0639 {allButLastType} \u0645\u0646 {lastType}",imageValidateSizeLabelFormatError:"\u0646\u0648\u0639 \u0627\u0644\u0635\u0648\u0631\u0629 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",imageValidateSizeLabelImageSizeTooSmall:"\u0627\u0644\u0635\u0648\u0631\u0629 \u0635\u063A\u064A\u0631 \u062C\u062F\u0627",imageValidateSizeLabelImageSizeTooBig:"\u0627\u0644\u0635\u0648\u0631\u0629 \u0643\u0628\u064A\u0631\u0629 \u062C\u062F\u0627",imageValidateSizeLabelExpectedMinSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 \u0644\u0644\u0623\u0628\u0639\u0627\u062F \u0647\u0648: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0623\u0628\u0639\u0627\u062F \u0647\u0648: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0627\u0644\u062F\u0642\u0629 \u0636\u0639\u064A\u0641\u0629 \u062C\u062F\u0627",imageValidateSizeLabelImageResolutionTooHigh:"\u0627\u0644\u062F\u0642\u0629 \u0645\u0631\u062A\u0641\u0639\u0629 \u062C\u062F\u0627",imageValidateSizeLabelExpectedMinResolution:"\u0623\u0642\u0644 \u062F\u0642\u0629: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0623\u0642\u0635\u0649 \u062F\u0642\u0629: {maxResolution}"};var Ll={labelIdle:'Arrossega i deixa anar els teus fitxers o Navega ',labelInvalidField:"El camp cont\xE9 fitxers inv\xE0lids",labelFileWaitingForSize:"Esperant mida",labelFileSizeNotAvailable:"Mida no disponible",labelFileLoading:"Carregant",labelFileLoadError:"Error durant la c\xE0rrega",labelFileProcessing:"Pujant",labelFileProcessingComplete:"Pujada completada",labelFileProcessingAborted:"Pujada cancel\xB7lada",labelFileProcessingError:"Error durant la pujada",labelFileProcessingRevertError:"Error durant la reversi\xF3",labelFileRemoveError:"Error durant l'eliminaci\xF3",labelTapToCancel:"toca per cancel\xB7lar",labelTapToRetry:"toca per reintentar",labelTapToUndo:"toca per desfer",labelButtonRemoveItem:"Eliminar",labelButtonAbortItemLoad:"Cancel\xB7lar",labelButtonRetryItemLoad:"Reintentar",labelButtonAbortItemProcessing:"Cancel\xB7lar",labelButtonUndoItemProcessing:"Desfer",labelButtonRetryItemProcessing:"Reintentar",labelButtonProcessItem:"Pujar",labelMaxFileSizeExceeded:"El fitxer \xE9s massa gran",labelMaxFileSize:"La mida m\xE0xima del fitxer \xE9s {filesize}",labelMaxTotalFileSizeExceeded:"Mida m\xE0xima total excedida",labelMaxTotalFileSize:"La mida m\xE0xima total del fitxer \xE9s {filesize}",labelFileTypeNotAllowed:"Fitxer de tipus inv\xE0lid",fileValidateTypeLabelExpectedTypes:"Espera {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipus d'imatge no suportada",imageValidateSizeLabelImageSizeTooSmall:"La imatge \xE9s massa petita",imageValidateSizeLabelImageSizeTooBig:"La imatge \xE9s massa gran",imageValidateSizeLabelExpectedMinSize:"La mida m\xEDnima \xE9s {minWidth} x {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La mida m\xE0xima \xE9s {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La resoluci\xF3 \xE9s massa baixa",imageValidateSizeLabelImageResolutionTooHigh:"La resoluci\xF3 \xE9s massa alta",imageValidateSizeLabelExpectedMinResolution:"La resoluci\xF3 m\xEDnima \xE9s {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La resoluci\xF3 m\xE0xima \xE9s {maxResolution}"};var Al={labelIdle:'\u067E\u06D5\u0695\u06AF\u06D5\u06A9\u0627\u0646 \u0641\u0695\u06CE \u0628\u062F\u06D5 \u0626\u06CE\u0631\u06D5 \u0628\u06C6 \u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u06CC\u0627\u0646 \u0647\u06D5\u06B5\u0628\u0698\u06CE\u0631\u06D5 ',labelInvalidField:"\u067E\u06D5\u0695\u06AF\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06CC \u062A\u06CE\u062F\u0627\u06CC\u06D5",labelFileWaitingForSize:"\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06CC\u06CC \u0642\u06D5\u0628\u0627\u0631\u06D5",labelFileSizeNotAvailable:"\u0642\u06D5\u0628\u0627\u0631\u06D5 \u0628\u06D5\u0631\u062F\u06D5\u0633\u062A \u0646\u06CC\u06D5",labelFileLoading:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileLoadError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5\u0645\u0627\u0648\u06D5\u06CC \u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileProcessing:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileProcessingComplete:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u062A\u06D5\u0648\u0627\u0648 \u0628\u0648\u0648",labelFileProcessingAborted:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u06CC\u06D5\u0648\u06D5",labelFileProcessingError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5\u06A9\u0627\u062A\u06CC \u0628\u0627\u0631\u06A9\u0631\u062F\u0646\u062F\u0627",labelFileProcessingRevertError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5 \u06A9\u0627\u062A\u06CC \u06AF\u06D5\u0695\u0627\u0646\u06D5\u0648\u06D5",labelFileRemoveError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5 \u06A9\u0627\u062A\u06CC \u0633\u0695\u06CC\u0646\u06D5\u0648\u06D5",labelTapToCancel:"\u0628\u06C6 \u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5 Tab \u062F\u0627\u0628\u06AF\u0631\u06D5",labelTapToRetry:"tap \u062F\u0627\u0628\u06AF\u0631\u06D5 \u0628\u06C6 \u062F\u0648\u0648\u0628\u0627\u0631\u06D5\u06A9\u0631\u062F\u0646\u06D5\u0648\u06D5",labelTapToUndo:"tap \u062F\u0627\u0628\u06AF\u0631\u06D5 \u0628\u06C6 \u06AF\u06D5\u0695\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRemoveItem:"\u0633\u0695\u06CC\u0646\u06D5\u0648\u06D5",labelButtonAbortItemLoad:"\u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRetryItemLoad:"\u0647\u06D5\u0648\u06B5\u062F\u0627\u0646\u06D5\u0648\u06D5",labelButtonAbortItemProcessing:"\u067E\u06D5\u0634\u06CC\u0645\u0627\u0646\u0628\u0648\u0648\u0646\u06D5\u0648\u06D5",labelButtonUndoItemProcessing:"\u06AF\u06D5\u0695\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRetryItemProcessing:"\u0647\u06D5\u0648\u06B5\u062F\u0627\u0646\u06D5\u0648\u06D5",labelButtonProcessItem:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelMaxFileSizeExceeded:"\u067E\u06D5\u0695\u06AF\u06D5 \u0632\u06C6\u0631 \u06AF\u06D5\u0648\u0631\u06D5\u06CC\u06D5",labelMaxFileSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {filesize}",labelMaxTotalFileSizeExceeded:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5\u06CC \u06A9\u06C6\u06CC \u06AF\u0634\u062A\u06CC \u062A\u06CE\u067E\u06D5\u0695\u06CE\u0646\u062F\u0631\u0627",labelMaxTotalFileSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5\u06CC \u06A9\u06C6\u06CC \u067E\u06D5\u0695\u06AF\u06D5 {filesize}",labelFileTypeNotAllowed:"\u062C\u06C6\u0631\u06CC \u067E\u06D5\u0695\u06AF\u06D5\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5",fileValidateTypeLabelExpectedTypes:"\u062C\u06AF\u06D5 \u0644\u06D5 {allButLastType} \u06CC\u0627\u0646 {lastType}",imageValidateSizeLabelFormatError:"\u062C\u06C6\u0631\u06CC \u0648\u06CE\u0646\u06D5 \u067E\u0627\u06B5\u067E\u0634\u062A\u06CC\u06CC \u0646\u06D5\u06A9\u0631\u0627\u0648\u06D5",imageValidateSizeLabelImageSizeTooSmall:"\u0648\u06CE\u0646\u06D5\u06A9\u06D5 \u0632\u06C6\u0631 \u0628\u0686\u0648\u0648\u06A9\u06D5",imageValidateSizeLabelImageSizeTooBig:"\u0648\u06CE\u0646\u06D5\u06A9\u06D5 \u0632\u06C6\u0631 \u06AF\u06D5\u0648\u0631\u06D5\u06CC\u06D5",imageValidateSizeLabelExpectedMinSize:"\u06A9\u06D5\u0645\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC\u06D5\u06A9\u06D5\u06CC \u0632\u06C6\u0631 \u06A9\u06D5\u0645\u06D5",imageValidateSizeLabelImageResolutionTooHigh:"\u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC\u06D5\u06A9\u06D5\u06CC \u0632\u06C6\u0631 \u0628\u06D5\u0631\u0632\u06D5",imageValidateSizeLabelExpectedMinResolution:"\u06A9\u06D5\u0645\u062A\u0631\u06CC\u0646 \u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0648\u0631\u062F\u0628\u06CC\u0646\u06CC {maxResolution}"};var Ml={labelIdle:'P\u0159et\xE1hn\u011Bte soubor sem (drag&drop) nebo Vyhledat ',labelInvalidField:"Pole obsahuje chybn\xE9 soubory",labelFileWaitingForSize:"Zji\u0161\u0165uje se velikost",labelFileSizeNotAvailable:"Velikost nen\xED zn\xE1m\xE1",labelFileLoading:"P\u0159en\xE1\u0161\xED se",labelFileLoadError:"Chyba p\u0159i p\u0159enosu",labelFileProcessing:"Prob\xEDh\xE1 upload",labelFileProcessingComplete:"Upload dokon\u010Den",labelFileProcessingAborted:"Upload stornov\xE1n",labelFileProcessingError:"Chyba p\u0159i uploadu",labelFileProcessingRevertError:"Chyba p\u0159i obnov\u011B",labelFileRemoveError:"Chyba p\u0159i odstran\u011Bn\xED",labelTapToCancel:"klepn\u011Bte pro storno",labelTapToRetry:"klepn\u011Bte pro opakov\xE1n\xED",labelTapToUndo:"klepn\u011Bte pro vr\xE1cen\xED",labelButtonRemoveItem:"Odstranit",labelButtonAbortItemLoad:"Storno",labelButtonRetryItemLoad:"Opakovat",labelButtonAbortItemProcessing:"Zp\u011Bt",labelButtonUndoItemProcessing:"Vr\xE1tit",labelButtonRetryItemProcessing:"Opakovat",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Soubor je p\u0159\xEDli\u0161 velk\xFD",labelMaxFileSize:"Nejv\u011Bt\u0161\xED velikost souboru je {filesize}",labelMaxTotalFileSizeExceeded:"P\u0159ekro\u010Dena maxim\xE1ln\xED celkov\xE1 velikost souboru",labelMaxTotalFileSize:"Maxim\xE1ln\xED celkov\xE1 velikost souboru je {filesize}",labelFileTypeNotAllowed:"Soubor je nespr\xE1vn\xE9ho typu",fileValidateTypeLabelExpectedTypes:"O\u010Dek\xE1v\xE1 se {allButLastType} nebo {lastType}",imageValidateSizeLabelFormatError:"Obr\xE1zek tohoto typu nen\xED podporov\xE1n",imageValidateSizeLabelImageSizeTooSmall:"Obr\xE1zek je p\u0159\xEDli\u0161 mal\xFD",imageValidateSizeLabelImageSizeTooBig:"Obr\xE1zek je p\u0159\xEDli\u0161 velk\xFD",imageValidateSizeLabelExpectedMinSize:"Minim\xE1ln\xED rozm\u011Br je {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maxim\xE1ln\xED rozm\u011Br je {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozli\u0161en\xED je p\u0159\xEDli\u0161 mal\xE9",imageValidateSizeLabelImageResolutionTooHigh:"Rozli\u0161en\xED je p\u0159\xEDli\u0161 velk\xE9",imageValidateSizeLabelExpectedMinResolution:"Minim\xE1ln\xED rozli\u0161en\xED je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maxim\xE1ln\xED rozli\u0161en\xED je {maxResolution}"};var Ol={labelIdle:'Tr\xE6k & slip filer eller Gennemse ',labelInvalidField:"Felt indeholder ugyldige filer",labelFileWaitingForSize:"Venter p\xE5 st\xF8rrelse",labelFileSizeNotAvailable:"St\xF8rrelse ikke tilg\xE6ngelig",labelFileLoading:"Loader",labelFileLoadError:"Load fejlede",labelFileProcessing:"Uploader",labelFileProcessingComplete:"Upload f\xE6rdig",labelFileProcessingAborted:"Upload annulleret",labelFileProcessingError:"Upload fejlede",labelFileProcessingRevertError:"Fortryd fejlede",labelFileRemoveError:"Fjern fejlede",labelTapToCancel:"tryk for at annullere",labelTapToRetry:"tryk for at pr\xF8ve igen",labelTapToUndo:"tryk for at fortryde",labelButtonRemoveItem:"Fjern",labelButtonAbortItemLoad:"Annuller",labelButtonRetryItemLoad:"Fors\xF8g igen",labelButtonAbortItemProcessing:"Annuller",labelButtonUndoItemProcessing:"Fortryd",labelButtonRetryItemProcessing:"Pr\xF8v igen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Filen er for stor",labelMaxFileSize:"Maksimal filst\xF8rrelse er {filesize}",labelMaxTotalFileSizeExceeded:"Maksimal totalst\xF8rrelse overskredet",labelMaxTotalFileSize:"Maksimal total filst\xF8rrelse er {filesize}",labelFileTypeNotAllowed:"Ugyldig filtype",fileValidateTypeLabelExpectedTypes:"Forventer {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Ugyldigt format",imageValidateSizeLabelImageSizeTooSmall:"Billedet er for lille",imageValidateSizeLabelImageSizeTooBig:"Billedet er for stort",imageValidateSizeLabelExpectedMinSize:"Minimum st\xF8rrelse er {minBredde} \xD7 {minH\xF8jde}",imageValidateSizeLabelExpectedMaxSize:"Maksimal st\xF8rrelse er {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"For lav opl\xF8sning",imageValidateSizeLabelImageResolutionTooHigh:"For h\xF8j opl\xF8sning",imageValidateSizeLabelExpectedMinResolution:"Minimum opl\xF8sning er {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimal opl\xF8sning er {maxResolution}"};var Pl={labelIdle:'Dateien ablegen oder ausw\xE4hlen ',labelInvalidField:"Feld beinhaltet ung\xFCltige Dateien",labelFileWaitingForSize:"Dateigr\xF6\xDFe berechnen",labelFileSizeNotAvailable:"Dateigr\xF6\xDFe nicht verf\xFCgbar",labelFileLoading:"Laden",labelFileLoadError:"Fehler beim Laden",labelFileProcessing:"Upload l\xE4uft",labelFileProcessingComplete:"Upload abgeschlossen",labelFileProcessingAborted:"Upload abgebrochen",labelFileProcessingError:"Fehler beim Upload",labelFileProcessingRevertError:"Fehler beim Wiederherstellen",labelFileRemoveError:"Fehler beim L\xF6schen",labelTapToCancel:"abbrechen",labelTapToRetry:"erneut versuchen",labelTapToUndo:"r\xFCckg\xE4ngig",labelButtonRemoveItem:"Entfernen",labelButtonAbortItemLoad:"Verwerfen",labelButtonRetryItemLoad:"Erneut versuchen",labelButtonAbortItemProcessing:"Abbrechen",labelButtonUndoItemProcessing:"R\xFCckg\xE4ngig",labelButtonRetryItemProcessing:"Erneut versuchen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Datei ist zu gro\xDF",labelMaxFileSize:"Maximale Dateigr\xF6\xDFe: {filesize}",labelMaxTotalFileSizeExceeded:"Maximale gesamte Dateigr\xF6\xDFe \xFCberschritten",labelMaxTotalFileSize:"Maximale gesamte Dateigr\xF6\xDFe: {filesize}",labelFileTypeNotAllowed:"Dateityp ung\xFCltig",fileValidateTypeLabelExpectedTypes:"Erwartet {allButLastType} oder {lastType}",imageValidateSizeLabelFormatError:"Bildtyp nicht unterst\xFCtzt",imageValidateSizeLabelImageSizeTooSmall:"Bild ist zu klein",imageValidateSizeLabelImageSizeTooBig:"Bild ist zu gro\xDF",imageValidateSizeLabelExpectedMinSize:"Mindestgr\xF6\xDFe: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximale Gr\xF6\xDFe: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Aufl\xF6sung ist zu niedrig",imageValidateSizeLabelImageResolutionTooHigh:"Aufl\xF6sung ist zu hoch",imageValidateSizeLabelExpectedMinResolution:"Mindestaufl\xF6sung: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximale Aufl\xF6sung: {maxResolution}"};var Dl={labelIdle:'Drag & Drop your files or Browse ',labelInvalidField:"Field contains invalid files",labelFileWaitingForSize:"Waiting for size",labelFileSizeNotAvailable:"Size not available",labelFileLoading:"Loading",labelFileLoadError:"Error during load",labelFileProcessing:"Uploading",labelFileProcessingComplete:"Upload complete",labelFileProcessingAborted:"Upload cancelled",labelFileProcessingError:"Error during upload",labelFileProcessingRevertError:"Error during revert",labelFileRemoveError:"Error during remove",labelTapToCancel:"tap to cancel",labelTapToRetry:"tap to retry",labelTapToUndo:"tap to undo",labelButtonRemoveItem:"Remove",labelButtonAbortItemLoad:"Abort",labelButtonRetryItemLoad:"Retry",labelButtonAbortItemProcessing:"Cancel",labelButtonUndoItemProcessing:"Undo",labelButtonRetryItemProcessing:"Retry",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"File is too large",labelMaxFileSize:"Maximum file size is {filesize}",labelMaxTotalFileSizeExceeded:"Maximum total size exceeded",labelMaxTotalFileSize:"Maximum total file size is {filesize}",labelFileTypeNotAllowed:"File of invalid type",fileValidateTypeLabelExpectedTypes:"Expects {allButLastType} or {lastType}",imageValidateSizeLabelFormatError:"Image type not supported",imageValidateSizeLabelImageSizeTooSmall:"Image is too small",imageValidateSizeLabelImageSizeTooBig:"Image is too big",imageValidateSizeLabelExpectedMinSize:"Minimum size is {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum size is {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolution is too low",imageValidateSizeLabelImageResolutionTooHigh:"Resolution is too high",imageValidateSizeLabelExpectedMinResolution:"Minimum resolution is {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum resolution is {maxResolution}"};var Fl={labelIdle:'Arrastra y suelta tus archivos o Examina ',labelInvalidField:"El campo contiene archivos inv\xE1lidos",labelFileWaitingForSize:"Esperando tama\xF1o",labelFileSizeNotAvailable:"Tama\xF1o no disponible",labelFileLoading:"Cargando",labelFileLoadError:"Error durante la carga",labelFileProcessing:"Subiendo",labelFileProcessingComplete:"Subida completa",labelFileProcessingAborted:"Subida cancelada",labelFileProcessingError:"Error durante la subida",labelFileProcessingRevertError:"Error durante la reversi\xF3n",labelFileRemoveError:"Error durante la eliminaci\xF3n",labelTapToCancel:"toca para cancelar",labelTapToRetry:"tocar para reintentar",labelTapToUndo:"tocar para deshacer",labelButtonRemoveItem:"Eliminar",labelButtonAbortItemLoad:"Cancelar",labelButtonRetryItemLoad:"Reintentar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Deshacer",labelButtonRetryItemProcessing:"Reintentar",labelButtonProcessItem:"Subir",labelMaxFileSizeExceeded:"El archivo es demasiado grande",labelMaxFileSize:"El tama\xF1o m\xE1ximo del archivo es {filesize}",labelMaxTotalFileSizeExceeded:"Tama\xF1o total m\xE1ximo excedido",labelMaxTotalFileSize:"El tama\xF1o total m\xE1ximo del archivo es {filesize}",labelFileTypeNotAllowed:"Archivo de tipo inv\xE1lido",fileValidateTypeLabelExpectedTypes:"Espera {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagen no soportada",imageValidateSizeLabelImageSizeTooSmall:"La imagen es demasiado peque\xF1a",imageValidateSizeLabelImageSizeTooBig:"La imagen es demasiado grande",imageValidateSizeLabelExpectedMinSize:"El tama\xF1o m\xEDnimo es {minWidth} x {minHeight}",imageValidateSizeLabelExpectedMaxSize:"El tama\xF1o m\xE1ximo es {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La resoluci\xF3n es demasiado baja",imageValidateSizeLabelImageResolutionTooHigh:"La resoluci\xF3n es demasiado alta",imageValidateSizeLabelExpectedMinResolution:"La resoluci\xF3n m\xEDnima es {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La resoluci\xF3n m\xE1xima es {maxResolution}"};var zl={labelIdle:'\u0641\u0627\u06CC\u0644 \u0631\u0627 \u0627\u06CC\u0646\u062C\u0627 \u0628\u06A9\u0634\u06CC\u062F \u0648 \u0631\u0647\u0627 \u06A9\u0646\u06CC\u062F\u060C \u06CC\u0627 \u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F ',labelInvalidField:"\u0641\u06CC\u0644\u062F \u062F\u0627\u0631\u0627\u06CC \u0641\u0627\u06CC\u0644 \u0647\u0627\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A",labelFileWaitingForSize:"Waiting for size",labelFileSizeNotAvailable:"\u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0645\u062C\u0627\u0632 \u0646\u06CC\u0633\u062A",labelFileLoading:"\u062F\u0631\u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileLoadError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u0627\u062C\u0631\u0627",labelFileProcessing:"\u062F\u0631\u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileProcessingComplete:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0627\u0645\u0644 \u0634\u062F",labelFileProcessingAborted:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0644\u063A\u0648 \u0634\u062F",labelFileProcessingError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileProcessingRevertError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u062D\u0630\u0641",labelFileRemoveError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u062D\u0630\u0641",labelTapToCancel:"\u0628\u0631\u0627\u06CC \u0644\u063A\u0648 \u0636\u0631\u0628\u0647 \u0628\u0632\u0646\u06CC\u062F",labelTapToRetry:"\u0628\u0631\u0627\u06CC \u062A\u06A9\u0631\u0627\u0631 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",labelTapToUndo:"\u0628\u0631\u0627\u06CC \u0628\u0631\u06AF\u0634\u062A \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",labelButtonRemoveItem:"\u062D\u0630\u0641",labelButtonAbortItemLoad:"\u0644\u063A\u0648",labelButtonRetryItemLoad:"\u062A\u06A9\u0631\u0627\u0631",labelButtonAbortItemProcessing:"\u0644\u063A\u0648",labelButtonUndoItemProcessing:"\u0628\u0631\u06AF\u0634\u062A",labelButtonRetryItemProcessing:"\u062A\u06A9\u0631\u0627\u0631",labelButtonProcessItem:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelMaxFileSizeExceeded:"\u0641\u0627\u06CC\u0644 \u0628\u0633\u06CC\u0627\u0631 \u062D\u062C\u06CC\u0645 \u0627\u0633\u062A",labelMaxFileSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0645\u062C\u0627\u0632 \u0641\u0627\u06CC\u0644 {filesize} \u0627\u0633\u062A",labelMaxTotalFileSizeExceeded:"\u0627\u0632 \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0628\u06CC\u0634\u062A\u0631 \u0634\u062F",labelMaxTotalFileSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 {filesize} \u0627\u0633\u062A",labelFileTypeNotAllowed:"\u0646\u0648\u0639 \u0641\u0627\u06CC\u0644 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A",fileValidateTypeLabelExpectedTypes:"\u062F\u0631 \u0627\u0646\u062A\u0638\u0627\u0631 {allButLastType} \u06CC\u0627 {lastType}",imageValidateSizeLabelFormatError:"\u0641\u0631\u0645\u062A \u062A\u0635\u0648\u06CC\u0631 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0646\u0645\u06CC \u0634\u0648\u062F",imageValidateSizeLabelImageSizeTooSmall:"\u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u06A9\u0648\u0686\u06A9 \u0627\u0633\u062A",imageValidateSizeLabelImageSizeTooBig:"\u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u0628\u0632\u0631\u06AF \u0627\u0633\u062A",imageValidateSizeLabelExpectedMinSize:"\u062D\u062F\u0627\u0642\u0644 \u0627\u0646\u062F\u0627\u0632\u0647 {minWidth} \xD7 {minHeight} \u0627\u0633\u062A",imageValidateSizeLabelExpectedMaxSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0627\u0646\u062F\u0627\u0632\u0647 {maxWidth} \xD7 {maxHeight} \u0627\u0633\u062A",imageValidateSizeLabelImageResolutionTooLow:"\u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u06A9\u0645 \u0627\u0633\u062A",imageValidateSizeLabelImageResolutionTooHigh:"\u0648\u0636\u0648\u0639 \u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u0632\u06CC\u0627\u062F \u0627\u0633\u062A",imageValidateSizeLabelExpectedMinResolution:"\u062D\u062F\u0627\u0642\u0644 \u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 {minResolution} \u0627\u0633\u062A",imageValidateSizeLabelExpectedMaxResolution:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 {maxResolution} \u0627\u0633\u062A"};var Cl={labelIdle:'Ved\xE4 ja pudota tiedostoja tai Selaa ',labelInvalidField:"Kent\xE4ss\xE4 on virheellisi\xE4 tiedostoja",labelFileWaitingForSize:"Odotetaan kokoa",labelFileSizeNotAvailable:"Kokoa ei saatavilla",labelFileLoading:"Ladataan",labelFileLoadError:"Virhe latauksessa",labelFileProcessing:"L\xE4hetet\xE4\xE4n",labelFileProcessingComplete:"L\xE4hetys valmis",labelFileProcessingAborted:"L\xE4hetys peruttu",labelFileProcessingError:"Virhe l\xE4hetyksess\xE4",labelFileProcessingRevertError:"Virhe palautuksessa",labelFileRemoveError:"Virhe poistamisessa",labelTapToCancel:"peruuta napauttamalla",labelTapToRetry:"yrit\xE4 uudelleen napauttamalla",labelTapToUndo:"kumoa napauttamalla",labelButtonRemoveItem:"Poista",labelButtonAbortItemLoad:"Keskeyt\xE4",labelButtonRetryItemLoad:"Yrit\xE4 uudelleen",labelButtonAbortItemProcessing:"Peruuta",labelButtonUndoItemProcessing:"Kumoa",labelButtonRetryItemProcessing:"Yrit\xE4 uudelleen",labelButtonProcessItem:"L\xE4het\xE4",labelMaxFileSizeExceeded:"Tiedoston koko on liian suuri",labelMaxFileSize:"Tiedoston maksimikoko on {filesize}",labelMaxTotalFileSizeExceeded:"Tiedostojen yhdistetty maksimikoko ylitetty",labelMaxTotalFileSize:"Tiedostojen yhdistetty maksimikoko on {filesize}",labelFileTypeNotAllowed:"Tiedostotyyppi\xE4 ei sallita",fileValidateTypeLabelExpectedTypes:"Sallitaan {allButLastType} tai {lastType}",imageValidateSizeLabelFormatError:"Kuvatyyppi\xE4 ei tueta",imageValidateSizeLabelImageSizeTooSmall:"Kuva on liian pieni",imageValidateSizeLabelImageSizeTooBig:"Kuva on liian suuri",imageValidateSizeLabelExpectedMinSize:"Minimikoko on {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimikoko on {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resoluutio on liian pieni",imageValidateSizeLabelImageResolutionTooHigh:"Resoluutio on liian suuri",imageValidateSizeLabelExpectedMinResolution:"Minimiresoluutio on {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimiresoluutio on {maxResolution}"};var Nl={labelIdle:'Faites glisser vos fichiers ou Parcourir ',labelInvalidField:"Le champ contient des fichiers invalides",labelFileWaitingForSize:"En attente de taille",labelFileSizeNotAvailable:"Taille non disponible",labelFileLoading:"Chargement",labelFileLoadError:"Erreur durant le chargement",labelFileProcessing:"Traitement",labelFileProcessingComplete:"Traitement effectu\xE9",labelFileProcessingAborted:"Traitement interrompu",labelFileProcessingError:"Erreur durant le traitement",labelFileProcessingRevertError:"Erreur durant la restauration",labelFileRemoveError:"Erreur durant la suppression",labelTapToCancel:"appuyer pour annuler",labelTapToRetry:"appuyer pour r\xE9essayer",labelTapToUndo:"appuyer pour revenir en arri\xE8re",labelButtonRemoveItem:"Retirer",labelButtonAbortItemLoad:"Annuler",labelButtonRetryItemLoad:"Recommencer",labelButtonAbortItemProcessing:"Annuler",labelButtonUndoItemProcessing:"Revenir en arri\xE8re",labelButtonRetryItemProcessing:"Recommencer",labelButtonProcessItem:"Transf\xE9rer",labelMaxFileSizeExceeded:"Le fichier est trop volumineux",labelMaxFileSize:"La taille maximale de fichier est {filesize}",labelMaxTotalFileSizeExceeded:"Taille totale maximale d\xE9pass\xE9e",labelMaxTotalFileSize:"La taille totale maximale des fichiers est {filesize}",labelFileTypeNotAllowed:"Fichier non valide",fileValidateTypeLabelExpectedTypes:"Attendu {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Type d'image non pris en charge",imageValidateSizeLabelImageSizeTooSmall:"L'image est trop petite",imageValidateSizeLabelImageSizeTooBig:"L'image est trop grande",imageValidateSizeLabelExpectedMinSize:"La taille minimale est {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La taille maximale est {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La r\xE9solution est trop faible",imageValidateSizeLabelImageResolutionTooHigh:"La r\xE9solution est trop \xE9lev\xE9e",imageValidateSizeLabelExpectedMinResolution:"La r\xE9solution minimale est {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La r\xE9solution maximale est {maxResolution}"};var Bl={labelIdle:'Mozgasd ide a f\xE1jlt a felt\xF6lt\xE9shez, vagy tall\xF3z\xE1s ',labelInvalidField:"A mez\u0151 \xE9rv\xE9nytelen f\xE1jlokat tartalmaz",labelFileWaitingForSize:"F\xE1ljm\xE9ret kisz\xE1mol\xE1sa",labelFileSizeNotAvailable:"A f\xE1jlm\xE9ret nem el\xE9rhet\u0151",labelFileLoading:"T\xF6lt\xE9s",labelFileLoadError:"Hiba a bet\xF6lt\xE9s sor\xE1n",labelFileProcessing:"Felt\xF6lt\xE9s",labelFileProcessingComplete:"Sikeres felt\xF6lt\xE9s",labelFileProcessingAborted:"A felt\xF6lt\xE9s megszak\xEDtva",labelFileProcessingError:"Hiba t\xF6rt\xE9nt a felt\xF6lt\xE9s sor\xE1n",labelFileProcessingRevertError:"Hiba a vissza\xE1ll\xEDt\xE1s sor\xE1n",labelFileRemoveError:"Hiba t\xF6rt\xE9nt az elt\xE1vol\xEDt\xE1s sor\xE1n",labelTapToCancel:"koppints a t\xF6rl\xE9shez",labelTapToRetry:"koppints az \xFAjrakezd\xE9shez",labelTapToUndo:"koppints a visszavon\xE1shoz",labelButtonRemoveItem:"Elt\xE1vol\xEDt\xE1s",labelButtonAbortItemLoad:"Megszak\xEDt\xE1s",labelButtonRetryItemLoad:"\xDAjrapr\xF3b\xE1lkoz\xE1s",labelButtonAbortItemProcessing:"Megszak\xEDt\xE1s",labelButtonUndoItemProcessing:"Visszavon\xE1s",labelButtonRetryItemProcessing:"\xDAjrapr\xF3b\xE1lkoz\xE1s",labelButtonProcessItem:"Felt\xF6lt\xE9s",labelMaxFileSizeExceeded:"A f\xE1jl t\xFAll\xE9pte a maxim\xE1lis m\xE9retet",labelMaxFileSize:"Maxim\xE1lis f\xE1jlm\xE9ret: {filesize}",labelMaxTotalFileSizeExceeded:"T\xFAll\xE9pte a maxim\xE1lis teljes m\xE9retet",labelMaxTotalFileSize:"A maxim\xE1is teljes f\xE1jlm\xE9ret: {filesize}",labelFileTypeNotAllowed:"\xC9rv\xE9nytelen t\xEDpus\xFA f\xE1jl",fileValidateTypeLabelExpectedTypes:"Enged\xE9lyezett t\xEDpusok {allButLastType} vagy {lastType}",imageValidateSizeLabelFormatError:"A k\xE9pt\xEDpus nem t\xE1mogatott",imageValidateSizeLabelImageSizeTooSmall:"A k\xE9p t\xFAl kicsi",imageValidateSizeLabelImageSizeTooBig:"A k\xE9p t\xFAl nagy",imageValidateSizeLabelExpectedMinSize:"Minimum m\xE9ret: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum m\xE9ret: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"A felbont\xE1s t\xFAl alacsony",imageValidateSizeLabelImageResolutionTooHigh:"A felbont\xE1s t\xFAl magas",imageValidateSizeLabelExpectedMinResolution:"Minim\xE1is felbont\xE1s: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maxim\xE1lis felbont\xE1s: {maxResolution}"};var kl={labelIdle:'Seret & Jatuhkan berkas Anda atau Jelajahi',labelInvalidField:"Isian berisi berkas yang tidak valid",labelFileWaitingForSize:"Menunggu ukuran berkas",labelFileSizeNotAvailable:"Ukuran berkas tidak tersedia",labelFileLoading:"Memuat",labelFileLoadError:"Kesalahan saat memuat",labelFileProcessing:"Mengunggah",labelFileProcessingComplete:"Pengunggahan selesai",labelFileProcessingAborted:"Pengunggahan dibatalkan",labelFileProcessingError:"Kesalahan saat pengunggahan",labelFileProcessingRevertError:"Kesalahan saat pemulihan",labelFileRemoveError:"Kesalahan saat penghapusan",labelTapToCancel:"ketuk untuk membatalkan",labelTapToRetry:"ketuk untuk mencoba lagi",labelTapToUndo:"ketuk untuk mengurungkan",labelButtonRemoveItem:"Hapus",labelButtonAbortItemLoad:"Batalkan",labelButtonRetryItemLoad:"Coba Kembali",labelButtonAbortItemProcessing:"Batalkan",labelButtonUndoItemProcessing:"Urungkan",labelButtonRetryItemProcessing:"Coba Kembali",labelButtonProcessItem:"Unggah",labelMaxFileSizeExceeded:"Berkas terlalu besar",labelMaxFileSize:"Ukuran berkas maksimum adalah {filesize}",labelMaxTotalFileSizeExceeded:"Jumlah berkas maksimum terlampaui",labelMaxTotalFileSize:"Jumlah berkas maksimum adalah {filesize}",labelFileTypeNotAllowed:"Jenis berkas tidak valid",fileValidateTypeLabelExpectedTypes:"Mengharapkan {allButLastType} atau {lastType}",imageValidateSizeLabelFormatError:"Jenis citra tidak didukung",imageValidateSizeLabelImageSizeTooSmall:"Citra terlalu kecil",imageValidateSizeLabelImageSizeTooBig:"Citra terlalu besar",imageValidateSizeLabelExpectedMinSize:"Ukuran minimum adalah {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Ukuran maksimum adalah {minWidth} \xD7 {minHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolusi terlalu rendah",imageValidateSizeLabelImageResolutionTooHigh:"Resolusi terlalu tinggi",imageValidateSizeLabelExpectedMinResolution:"Resolusi minimum adalah {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolusi maksimum adalah {maxResolution}"};var Vl={labelIdle:'Trascina e rilascia i tuoi file oppure Carica ',labelInvalidField:"Il campo contiene dei file non validi",labelFileWaitingForSize:"Aspettando le dimensioni",labelFileSizeNotAvailable:"Dimensioni non disponibili",labelFileLoading:"Caricamento",labelFileLoadError:"Errore durante il caricamento",labelFileProcessing:"Caricamento",labelFileProcessingComplete:"Caricamento completato",labelFileProcessingAborted:"Caricamento cancellato",labelFileProcessingError:"Errore durante il caricamento",labelFileProcessingRevertError:"Errore durante il ripristino",labelFileRemoveError:"Errore durante l'eliminazione",labelTapToCancel:"tocca per cancellare",labelTapToRetry:"tocca per riprovare",labelTapToUndo:"tocca per ripristinare",labelButtonRemoveItem:"Elimina",labelButtonAbortItemLoad:"Cancella",labelButtonRetryItemLoad:"Ritenta",labelButtonAbortItemProcessing:"Camcella",labelButtonUndoItemProcessing:"Indietro",labelButtonRetryItemProcessing:"Ritenta",labelButtonProcessItem:"Carica",labelMaxFileSizeExceeded:"Il peso del file \xE8 eccessivo",labelMaxFileSize:"Il peso massimo del file \xE8 {filesize}",labelMaxTotalFileSizeExceeded:"Dimensione totale massima superata",labelMaxTotalFileSize:"La dimensione massima totale del file \xE8 {filesize}",labelFileTypeNotAllowed:"File non supportato",fileValidateTypeLabelExpectedTypes:"Aspetta {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipo di immagine non compatibile",imageValidateSizeLabelImageSizeTooSmall:"L'immagine \xE8 troppo piccola",imageValidateSizeLabelImageSizeTooBig:"L'immagine \xE8 troppo grande",imageValidateSizeLabelExpectedMinSize:"La dimensione minima \xE8 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La dimensione massima \xE8 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La risoluzione \xE8 troppo bassa",imageValidateSizeLabelImageResolutionTooHigh:"La risoluzione \xE8 troppo alta",imageValidateSizeLabelExpectedMinResolution:"La risoluzione minima \xE8 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La risoluzione massima \xE8 {maxResolution}"};var Gl={labelIdle:'\u1791\u17B6\u1789&\u178A\u17B6\u1780\u17CB\u17A0\u17D2\u179C\u17B6\u179B\u17CB\u17AF\u1780\u179F\u17B6\u179A\u179A\u1794\u179F\u17CB\u17A2\u17D2\u1793\u1780 \u17AC \u179F\u17D2\u179C\u17C2\u1784\u179A\u1780 ',labelInvalidField:"\u1785\u1793\u17D2\u179B\u17C4\u17C7\u1798\u17B6\u1793\u17AF\u1780\u179F\u17B6\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",labelFileWaitingForSize:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u1784\u17CB\u1785\u17B6\u17C6\u1791\u17C6\u17A0\u17C6",labelFileSizeNotAvailable:"\u1791\u17C6\u17A0\u17C6\u1798\u17B7\u1793\u17A2\u17B6\u1785\u1794\u17D2\u179A\u17BE\u1794\u17B6\u1793",labelFileLoading:"\u1780\u17C6\u1796\u17BB\u1784\u178A\u17C6\u178E\u17BE\u179A\u1780\u17B6\u179A",labelFileLoadError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178A\u17C6\u178E\u17BE\u179A\u1780\u17B6\u179A",labelFileProcessing:"\u1780\u17C6\u1796\u17BB\u1784\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelFileProcessingComplete:"\u1780\u17B6\u179A\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784\u1796\u17C1\u1789\u179B\u17C1\u1789",labelFileProcessingAborted:"\u1780\u17B6\u179A\u1794\u1784\u17D2\u17A0\u17C4\u17C7\u178F\u17D2\u179A\u17BC\u179C\u1794\u17B6\u1793\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelFileProcessingError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u1780\u17C6\u1796\u17BB\u1784\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelFileProcessingRevertError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178F\u17D2\u179A\u17A1\u1794\u17CB",labelFileRemoveError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178A\u1780\u1785\u17C1\u1789",labelTapToCancel:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelTapToRetry:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelTapToUndo:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1798\u17B7\u1793\u1792\u17D2\u179C\u17BE\u179C\u17B7\u1789",labelButtonRemoveItem:"\u1799\u1780\u1785\u17C1\u1789",labelButtonAbortItemLoad:"\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelButtonRetryItemLoad:"\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelButtonAbortItemProcessing:"\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelButtonUndoItemProcessing:"\u1798\u17B7\u1793\u1792\u17D2\u179C\u17BE\u179C\u17B7\u1789",labelButtonRetryItemProcessing:"\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelButtonProcessItem:"\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelMaxFileSizeExceeded:"\u17AF\u1780\u179F\u17B6\u179A\u1792\u17C6\u1796\u17C1\u1780",labelMaxFileSize:"\u1791\u17C6\u17A0\u17C6\u17AF\u1780\u179F\u17B6\u179A\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {filesize}",labelMaxTotalFileSizeExceeded:"\u179B\u17BE\u179F\u1791\u17C6\u17A0\u17C6\u179F\u179A\u17BB\u1794\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6",labelMaxTotalFileSize:"\u1791\u17C6\u17A0\u17C6\u17AF\u1780\u179F\u17B6\u179A\u179F\u179A\u17BB\u1794\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {filesize}",labelFileTypeNotAllowed:"\u1794\u17D2\u179A\u1797\u17C1\u1791\u17AF\u1780\u179F\u17B6\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",fileValidateTypeLabelExpectedTypes:"\u179A\u17C6\u1796\u17B9\u1784\u1790\u17B6 {allButLastType} \u17AC {lastType}",imageValidateSizeLabelFormatError:"\u1794\u17D2\u179A\u1797\u17C1\u1791\u179A\u17BC\u1794\u1797\u17B6\u1796\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",imageValidateSizeLabelImageSizeTooSmall:"\u179A\u17BC\u1794\u1797\u17B6\u1796\u178F\u17BC\u1785\u1796\u17C1\u1780",imageValidateSizeLabelImageSizeTooBig:"\u179A\u17BC\u1794\u1797\u17B6\u1796\u1792\u17C6\u1796\u17C1\u1780",imageValidateSizeLabelExpectedMinSize:"\u1791\u17C6\u17A0\u17C6\u17A2\u1794\u17D2\u1794\u1794\u179A\u1798\u17B6\u1782\u17BA {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u1791\u17C6\u17A0\u17C6\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u1791\u17B6\u1794\u1796\u17C1\u1780",imageValidateSizeLabelImageResolutionTooHigh:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u1781\u17D2\u1796\u179F\u17CB\u1796\u17C1\u1780",imageValidateSizeLabelExpectedMinResolution:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u17A2\u1794\u17D2\u1794\u1794\u179A\u1798\u17B6\u1782\u17BA {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {maxResolution}"};var Ul={labelIdle:'Drag & Drop je bestanden of Bladeren ',labelInvalidField:"Veld bevat ongeldige bestanden",labelFileWaitingForSize:"Wachten op grootte",labelFileSizeNotAvailable:"Grootte niet beschikbaar",labelFileLoading:"Laden",labelFileLoadError:"Fout tijdens laden",labelFileProcessing:"Uploaden",labelFileProcessingComplete:"Upload afgerond",labelFileProcessingAborted:"Upload geannuleerd",labelFileProcessingError:"Fout tijdens upload",labelFileProcessingRevertError:"Fout bij herstellen",labelFileRemoveError:"Fout bij verwijderen",labelTapToCancel:"tik om te annuleren",labelTapToRetry:"tik om opnieuw te proberen",labelTapToUndo:"tik om ongedaan te maken",labelButtonRemoveItem:"Verwijderen",labelButtonAbortItemLoad:"Afbreken",labelButtonRetryItemLoad:"Opnieuw proberen",labelButtonAbortItemProcessing:"Annuleren",labelButtonUndoItemProcessing:"Ongedaan maken",labelButtonRetryItemProcessing:"Opnieuw proberen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Bestand is te groot",labelMaxFileSize:"Maximale bestandsgrootte is {filesize}",labelMaxTotalFileSizeExceeded:"Maximale totale grootte overschreden",labelMaxTotalFileSize:"Maximale totale bestandsgrootte is {filesize}",labelFileTypeNotAllowed:"Ongeldig bestandstype",fileValidateTypeLabelExpectedTypes:"Verwacht {allButLastType} of {lastType}",imageValidateSizeLabelFormatError:"Afbeeldingstype niet ondersteund",imageValidateSizeLabelImageSizeTooSmall:"Afbeelding is te klein",imageValidateSizeLabelImageSizeTooBig:"Afbeelding is te groot",imageValidateSizeLabelExpectedMinSize:"Minimale afmeting is {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximale afmeting is {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolutie is te laag",imageValidateSizeLabelImageResolutionTooHigh:"Resolution is too high",imageValidateSizeLabelExpectedMinResolution:"Minimale resolutie is {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximale resolutie is {maxResolution}"};var Wl={labelIdle:'Dra og slipp filene dine, eller Bla gjennom... ',labelInvalidField:"Feltet inneholder ugyldige filer",labelFileWaitingForSize:"Venter p\xE5 st\xF8rrelse",labelFileSizeNotAvailable:"St\xF8rrelse ikke tilgjengelig",labelFileLoading:"Laster",labelFileLoadError:"Feil under lasting",labelFileProcessing:"Laster opp",labelFileProcessingComplete:"Opplasting ferdig",labelFileProcessingAborted:"Opplasting avbrutt",labelFileProcessingError:"Feil under opplasting",labelFileProcessingRevertError:"Feil under reversering",labelFileRemoveError:"Feil under flytting",labelTapToCancel:"klikk for \xE5 avbryte",labelTapToRetry:"klikk for \xE5 pr\xF8ve p\xE5 nytt",labelTapToUndo:"klikk for \xE5 angre",labelButtonRemoveItem:"Fjern",labelButtonAbortItemLoad:"Avbryt",labelButtonRetryItemLoad:"Pr\xF8v p\xE5 nytt",labelButtonAbortItemProcessing:"Avbryt",labelButtonUndoItemProcessing:"Angre",labelButtonRetryItemProcessing:"Pr\xF8v p\xE5 nytt",labelButtonProcessItem:"Last opp",labelMaxFileSizeExceeded:"Filen er for stor",labelMaxFileSize:"Maksimal filst\xF8rrelse er {filesize}",labelMaxTotalFileSizeExceeded:"Maksimal total st\xF8rrelse oversteget",labelMaxTotalFileSize:"Maksimal total st\xF8rrelse er {filesize}",labelFileTypeNotAllowed:"Ugyldig filtype",fileValidateTypeLabelExpectedTypes:"Forventer {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Bildeformat ikke st\xF8ttet",imageValidateSizeLabelImageSizeTooSmall:"Bildet er for lite",imageValidateSizeLabelImageSizeTooBig:"Bildet er for stort",imageValidateSizeLabelExpectedMinSize:"Minimumsst\xF8rrelse er {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimumsst\xF8rrelse er {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Oppl\xF8sningen er for lav",imageValidateSizeLabelImageResolutionTooHigh:"Oppl\xF8sningen er for h\xF8y",imageValidateSizeLabelExpectedMinResolution:"Minimum oppl\xF8sning er {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimal oppl\xF8sning er {maxResolution}"};var Hl={labelIdle:'Przeci\u0105gnij i upu\u015B\u0107 lub wybierz pliki',labelInvalidField:"Nieprawid\u0142owe pliki",labelFileWaitingForSize:"Pobieranie rozmiaru",labelFileSizeNotAvailable:"Nieznany rozmiar",labelFileLoading:"Wczytywanie",labelFileLoadError:"B\u0142\u0105d wczytywania",labelFileProcessing:"Przesy\u0142anie",labelFileProcessingComplete:"Przes\u0142ano",labelFileProcessingAborted:"Przerwano",labelFileProcessingError:"Przesy\u0142anie nie powiod\u0142o si\u0119",labelFileProcessingRevertError:"Co\u015B posz\u0142o nie tak",labelFileRemoveError:"Nieudane usuni\u0119cie",labelTapToCancel:"Anuluj",labelTapToRetry:"Pon\xF3w",labelTapToUndo:"Cofnij",labelButtonRemoveItem:"Usu\u0144",labelButtonAbortItemLoad:"Przerwij",labelButtonRetryItemLoad:"Pon\xF3w",labelButtonAbortItemProcessing:"Anuluj",labelButtonUndoItemProcessing:"Cofnij",labelButtonRetryItemProcessing:"Pon\xF3w",labelButtonProcessItem:"Prze\u015Blij",labelMaxFileSizeExceeded:"Plik jest zbyt du\u017Cy",labelMaxFileSize:"Dopuszczalna wielko\u015B\u0107 pliku to {filesize}",labelMaxTotalFileSizeExceeded:"Przekroczono \u0142\u0105czny rozmiar plik\xF3w",labelMaxTotalFileSize:"\u0141\u0105czny rozmiar plik\xF3w nie mo\u017Ce przekroczy\u0107 {filesize}",labelFileTypeNotAllowed:"Niedozwolony rodzaj pliku",fileValidateTypeLabelExpectedTypes:"Oczekiwano {allButLastType} lub {lastType}",imageValidateSizeLabelFormatError:"Nieobs\u0142ugiwany format obrazu",imageValidateSizeLabelImageSizeTooSmall:"Obraz jest zbyt ma\u0142y",imageValidateSizeLabelImageSizeTooBig:"Obraz jest zbyt du\u017Cy",imageValidateSizeLabelExpectedMinSize:"Minimalne wymiary obrazu to {minWidth}\xD7{minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksymalna wymiary obrazu to {maxWidth}\xD7{maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozdzielczo\u015B\u0107 jest zbyt niska",imageValidateSizeLabelImageResolutionTooHigh:"Rozdzielczo\u015B\u0107 jest zbyt wysoka",imageValidateSizeLabelExpectedMinResolution:"Minimalna rozdzielczo\u015B\u0107 to {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksymalna rozdzielczo\u015B\u0107 to {maxResolution}"};var wi={labelIdle:'Arraste e solte os arquivos ou Clique aqui ',labelInvalidField:"Arquivos inv\xE1lidos",labelFileWaitingForSize:"Calculando o tamanho do arquivo",labelFileSizeNotAvailable:"Tamanho do arquivo indispon\xEDvel",labelFileLoading:"Carregando",labelFileLoadError:"Erro durante o carregamento",labelFileProcessing:"Enviando",labelFileProcessingComplete:"Envio finalizado",labelFileProcessingAborted:"Envio cancelado",labelFileProcessingError:"Erro durante o envio",labelFileProcessingRevertError:"Erro ao reverter o envio",labelFileRemoveError:"Erro ao remover o arquivo",labelTapToCancel:"clique para cancelar",labelTapToRetry:"clique para reenviar",labelTapToUndo:"clique para desfazer",labelButtonRemoveItem:"Remover",labelButtonAbortItemLoad:"Abortar",labelButtonRetryItemLoad:"Reenviar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Desfazer",labelButtonRetryItemProcessing:"Reenviar",labelButtonProcessItem:"Enviar",labelMaxFileSizeExceeded:"Arquivo \xE9 muito grande",labelMaxFileSize:"O tamanho m\xE1ximo permitido: {filesize}",labelMaxTotalFileSizeExceeded:"Tamanho total dos arquivos excedido",labelMaxTotalFileSize:"Tamanho total permitido: {filesize}",labelFileTypeNotAllowed:"Tipo de arquivo inv\xE1lido",fileValidateTypeLabelExpectedTypes:"Tipos de arquivo suportados s\xE3o {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagem inv\xE1lida",imageValidateSizeLabelImageSizeTooSmall:"Imagem muito pequena",imageValidateSizeLabelImageSizeTooBig:"Imagem muito grande",imageValidateSizeLabelExpectedMinSize:"Tamanho m\xEDnimo permitida: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Tamanho m\xE1ximo permitido: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolu\xE7\xE3o muito baixa",imageValidateSizeLabelImageResolutionTooHigh:"Resolu\xE7\xE3o muito alta",imageValidateSizeLabelExpectedMinResolution:"Resolu\xE7\xE3o m\xEDnima permitida: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolu\xE7\xE3o m\xE1xima permitida: {maxResolution}"};var jl={labelIdle:'Trage \u0219i plaseaz\u0103 fi\u0219iere sau Caut\u0103-le ',labelInvalidField:"C\xE2mpul con\u021Bine fi\u0219iere care nu sunt valide",labelFileWaitingForSize:"\xCEn a\u0219teptarea dimensiunii",labelFileSizeNotAvailable:"Dimensiunea nu este diponibil\u0103",labelFileLoading:"Se \xEEncarc\u0103",labelFileLoadError:"Eroare la \xEEnc\u0103rcare",labelFileProcessing:"Se \xEEncarc\u0103",labelFileProcessingComplete:"\xCEnc\u0103rcare finalizat\u0103",labelFileProcessingAborted:"\xCEnc\u0103rcare anulat\u0103",labelFileProcessingError:"Eroare la \xEEnc\u0103rcare",labelFileProcessingRevertError:"Eroare la anulare",labelFileRemoveError:"Eroare la \u015Ftergere",labelTapToCancel:"apas\u0103 pentru a anula",labelTapToRetry:"apas\u0103 pentru a re\xEEncerca",labelTapToUndo:"apas\u0103 pentru a anula",labelButtonRemoveItem:"\u015Eterge",labelButtonAbortItemLoad:"Anuleaz\u0103",labelButtonRetryItemLoad:"Re\xEEncearc\u0103",labelButtonAbortItemProcessing:"Anuleaz\u0103",labelButtonUndoItemProcessing:"Anuleaz\u0103",labelButtonRetryItemProcessing:"Re\xEEncearc\u0103",labelButtonProcessItem:"\xCEncarc\u0103",labelMaxFileSizeExceeded:"Fi\u0219ierul este prea mare",labelMaxFileSize:"Dimensiunea maxim\u0103 a unui fi\u0219ier este de {filesize}",labelMaxTotalFileSizeExceeded:"Dimensiunea total\u0103 maxim\u0103 a fost dep\u0103\u0219it\u0103",labelMaxTotalFileSize:"Dimensiunea total\u0103 maxim\u0103 a fi\u0219ierelor este de {filesize}",labelFileTypeNotAllowed:"Tipul fi\u0219ierului nu este valid",fileValidateTypeLabelExpectedTypes:"Se a\u0219teapt\u0103 {allButLastType} sau {lastType}",imageValidateSizeLabelFormatError:"Formatul imaginii nu este acceptat",imageValidateSizeLabelImageSizeTooSmall:"Imaginea este prea mic\u0103",imageValidateSizeLabelImageSizeTooBig:"Imaginea este prea mare",imageValidateSizeLabelExpectedMinSize:"M\u0103rimea minim\u0103 este de {maxWidth} x {maxHeight}",imageValidateSizeLabelExpectedMaxSize:"M\u0103rimea maxim\u0103 este de {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezolu\u021Bia este prea mic\u0103",imageValidateSizeLabelImageResolutionTooHigh:"Rezolu\u021Bia este prea mare",imageValidateSizeLabelExpectedMinResolution:"Rezolu\u021Bia minim\u0103 este de {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Rezolu\u021Bia maxim\u0103 este de {maxResolution}"};var ql={labelIdle:'\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0438\u043B\u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 ',labelInvalidField:"\u041F\u043E\u043B\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0444\u0430\u0439\u043B\u044B",labelFileWaitingForSize:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0437\u043C\u0435\u0440",labelFileSizeNotAvailable:"\u0420\u0430\u0437\u043C\u0435\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F",labelFileLoading:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435",labelFileLoadError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0438",labelFileProcessing:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",labelFileProcessingComplete:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430",labelFileProcessingAborted:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u0430",labelFileProcessingError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0435",labelFileProcessingRevertError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0435",labelFileRemoveError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0438",labelTapToCancel:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B",labelTapToRetry:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelTapToUndo:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F",labelButtonRemoveItem:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",labelButtonAbortItemLoad:"\u041F\u0440\u0435\u043A\u0440\u0430\u0449\u0435\u043D\u043E",labelButtonRetryItemLoad:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelButtonAbortItemProcessing:"\u041E\u0442\u043C\u0435\u043D\u0430",labelButtonUndoItemProcessing:"\u041E\u0442\u043C\u0435\u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F",labelButtonRetryItemProcessing:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelButtonProcessItem:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",labelMaxFileSizeExceeded:"\u0424\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439",labelMaxFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: {filesize}",labelMaxTotalFileSizeExceeded:"\u041F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440",labelMaxTotalFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: {filesize}",labelFileTypeNotAllowed:"\u0424\u0430\u0439\u043B \u043D\u0435\u0432\u0435\u0440\u043D\u043E\u0433\u043E \u0442\u0438\u043F\u0430",fileValidateTypeLabelExpectedTypes:"\u041E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F {allButLastType} \u0438\u043B\u0438 {lastType}",imageValidateSizeLabelFormatError:"\u0422\u0438\u043F \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F",imageValidateSizeLabelImageSizeTooSmall:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435",imageValidateSizeLabelImageSizeTooBig:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435",imageValidateSizeLabelExpectedMinSize:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043D\u0438\u0437\u043A\u043E\u0435",imageValidateSizeLabelImageResolutionTooHigh:"\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0432\u044B\u0441\u043E\u043A\u043E\u0435",imageValidateSizeLabelExpectedMinResolution:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435: {maxResolution}"};var Yl={labelIdle:'Drag och sl\xE4pp dina filer eller Bl\xE4ddra ',labelInvalidField:"F\xE4ltet inneh\xE5ller felaktiga filer",labelFileWaitingForSize:"V\xE4ntar p\xE5 storlek",labelFileSizeNotAvailable:"Storleken finns inte tillg\xE4nglig",labelFileLoading:"Laddar",labelFileLoadError:"Fel under laddning",labelFileProcessing:"Laddar upp",labelFileProcessingComplete:"Uppladdning klar",labelFileProcessingAborted:"Uppladdning avbruten",labelFileProcessingError:"Fel under uppladdning",labelFileProcessingRevertError:"Fel under \xE5terst\xE4llning",labelFileRemoveError:"Fel under borttagning",labelTapToCancel:"tryck f\xF6r att avbryta",labelTapToRetry:"tryck f\xF6r att f\xF6rs\xF6ka igen",labelTapToUndo:"tryck f\xF6r att \xE5ngra",labelButtonRemoveItem:"Tabort",labelButtonAbortItemLoad:"Avbryt",labelButtonRetryItemLoad:"F\xF6rs\xF6k igen",labelButtonAbortItemProcessing:"Avbryt",labelButtonUndoItemProcessing:"\xC5ngra",labelButtonRetryItemProcessing:"F\xF6rs\xF6k igen",labelButtonProcessItem:"Ladda upp",labelMaxFileSizeExceeded:"Filen \xE4r f\xF6r stor",labelMaxFileSize:"St\xF6rsta till\xE5tna filstorlek \xE4r {filesize}",labelMaxTotalFileSizeExceeded:"Maximal uppladdningsstorlek uppn\xE5d",labelMaxTotalFileSize:"Maximal uppladdningsstorlek \xE4r {filesize}",labelFileTypeNotAllowed:"Felaktig filtyp",fileValidateTypeLabelExpectedTypes:"Godk\xE4nda filtyper {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Bildtypen saknar st\xF6d",imageValidateSizeLabelImageSizeTooSmall:"Bilden \xE4r f\xF6r liten",imageValidateSizeLabelImageSizeTooBig:"Bilden \xE4r f\xF6r stor",imageValidateSizeLabelExpectedMinSize:"Minimal storlek \xE4r {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximal storlek \xE4r {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Uppl\xF6sningen \xE4r f\xF6r l\xE5g",imageValidateSizeLabelImageResolutionTooHigh:"Uppl\xF6sningen \xE4r f\xF6r h\xF6g",imageValidateSizeLabelExpectedMinResolution:"Minsta till\xE5tna uppl\xF6sning \xE4r {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"H\xF6gsta till\xE5tna uppl\xF6sning \xE4r {maxResolution}"};var $l={labelIdle:'Dosyan\u0131z\u0131 S\xFCr\xFCkleyin & B\u0131rak\u0131n ya da Se\xE7in ',labelInvalidField:"Alan ge\xE7ersiz dosyalar i\xE7eriyor",labelFileWaitingForSize:"Boyut hesaplan\u0131yor",labelFileSizeNotAvailable:"Boyut mevcut de\u011Fil",labelFileLoading:"Y\xFCkleniyor",labelFileLoadError:"Y\xFCkleme s\u0131ras\u0131nda hata olu\u015Ftu",labelFileProcessing:"Y\xFCkleniyor",labelFileProcessingComplete:"Y\xFCkleme tamamland\u0131",labelFileProcessingAborted:"Y\xFCkleme iptal edildi",labelFileProcessingError:"Y\xFCklerken hata olu\u015Ftu",labelFileProcessingRevertError:"Geri \xE7ekerken hata olu\u015Ftu",labelFileRemoveError:"Kald\u0131r\u0131rken hata olu\u015Ftu",labelTapToCancel:"\u0130ptal etmek i\xE7in t\u0131klay\u0131n",labelTapToRetry:"Tekrar denemek i\xE7in t\u0131klay\u0131n",labelTapToUndo:"Geri almak i\xE7in t\u0131klay\u0131n",labelButtonRemoveItem:"Kald\u0131r",labelButtonAbortItemLoad:"\u0130ptal Et",labelButtonRetryItemLoad:"Tekrar dene",labelButtonAbortItemProcessing:"\u0130ptal et",labelButtonUndoItemProcessing:"Geri Al",labelButtonRetryItemProcessing:"Tekrar dene",labelButtonProcessItem:"Y\xFCkle",labelMaxFileSizeExceeded:"Dosya \xE7ok b\xFCy\xFCk",labelMaxFileSize:"En fazla dosya boyutu: {filesize}",labelMaxTotalFileSizeExceeded:"Maximum boyut a\u015F\u0131ld\u0131",labelMaxTotalFileSize:"Maximum dosya boyutu :{filesize}",labelFileTypeNotAllowed:"Ge\xE7ersiz dosya tipi",fileValidateTypeLabelExpectedTypes:"\u015Eu {allButLastType} ya da \u015Fu dosya olmas\u0131 gerekir: {lastType}",imageValidateSizeLabelFormatError:"Resim tipi desteklenmiyor",imageValidateSizeLabelImageSizeTooSmall:"Resim \xE7ok k\xFC\xE7\xFCk",imageValidateSizeLabelImageSizeTooBig:"Resim \xE7ok b\xFCy\xFCk",imageValidateSizeLabelExpectedMinSize:"Minimum boyut {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum boyut {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\xC7\xF6z\xFCn\xFCrl\xFCk \xE7ok d\xFC\u015F\xFCk",imageValidateSizeLabelImageResolutionTooHigh:"\xC7\xF6z\xFCn\xFCrl\xFCk \xE7ok y\xFCksek",imageValidateSizeLabelExpectedMinResolution:"Minimum \xE7\xF6z\xFCn\xFCrl\xFCk {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum \xE7\xF6z\xFCn\xFCrl\xFCk {maxResolution}"};var Xl={labelIdle:'\u041F\u0435\u0440\u0435\u0442\u044F\u0433\u043D\u0456\u0442\u044C \u0444\u0430\u0439\u043B\u0438 \u0430\u0431\u043E \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044C ',labelInvalidField:"\u041F\u043E\u043B\u0435 \u043C\u0456\u0441\u0442\u0438\u0442\u044C \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u0456 \u0444\u0430\u0439\u043B\u0438",labelFileWaitingForSize:"\u0412\u043A\u0430\u0436\u0456\u0442\u044C \u0440\u043E\u0437\u043C\u0456\u0440",labelFileSizeNotAvailable:"\u0420\u043E\u0437\u043C\u0456\u0440 \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439",labelFileLoading:"\u041E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u044F",labelFileLoadError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u043E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u0456",labelFileProcessing:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F",labelFileProcessingComplete:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E",labelFileProcessingAborted:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u043E",labelFileProcessingError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u0456",labelFileProcessingRevertError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0432\u0456\u0434\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u0456",labelFileRemoveError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0432\u0438\u0434\u0430\u043B\u0435\u043D\u043D\u0456",labelTapToCancel:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelTapToRetry:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelTapToUndo:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0432\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u044E \u0434\u0456\u044E",labelButtonRemoveItem:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",labelButtonAbortItemLoad:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelButtonRetryItemLoad:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelButtonAbortItemProcessing:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelButtonUndoItemProcessing:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u044E \u0434\u0456\u044E",labelButtonRetryItemProcessing:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelButtonProcessItem:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F",labelMaxFileSizeExceeded:"\u0424\u0430\u0439\u043B \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0438\u0439",labelMaxFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440 \u0444\u0430\u0439\u043B\u0443: {filesize}",labelMaxTotalFileSizeExceeded:"\u041F\u0435\u0440\u0435\u0432\u0438\u0449\u0435\u043D\u043E \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440",labelMaxTotalFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {filesize}",labelFileTypeNotAllowed:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0444\u0430\u0439\u043B\u0443 \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454\u0442\u044C\u0441\u044F",fileValidateTypeLabelExpectedTypes:"\u041E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F {allButLastType} \u0430\u0431\u043E {lastType}",imageValidateSizeLabelFormatError:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454\u0442\u044C\u0441\u044F",imageValidateSizeLabelImageSizeTooSmall:"\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0435",imageValidateSizeLabelImageSizeTooBig:"\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435",imageValidateSizeLabelExpectedMinSize:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0420\u043E\u0437\u043C\u0456\u0440\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0456",imageValidateSizeLabelImageResolutionTooHigh:"\u0420\u043E\u0437\u043C\u0456\u0440\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0456",imageValidateSizeLabelExpectedMinResolution:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0456 \u0440\u043E\u0437\u043C\u0456\u0440\u0438: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0456 \u0440\u043E\u0437\u043C\u0456\u0440\u0438: {maxResolution}"};var Ql={labelIdle:'K\xE9o th\u1EA3 t\u1EC7p c\u1EE7a b\u1EA1n ho\u1EB7c T\xECm ki\u1EBFm ',labelInvalidField:"Tr\u01B0\u1EDDng ch\u1EE9a c\xE1c t\u1EC7p kh\xF4ng h\u1EE3p l\u1EC7",labelFileWaitingForSize:"\u0110ang ch\u1EDD k\xEDch th\u01B0\u1EDBc",labelFileSizeNotAvailable:"K\xEDch th\u01B0\u1EDBc kh\xF4ng c\xF3 s\u1EB5n",labelFileLoading:"\u0110ang t\u1EA3i",labelFileLoadError:"L\u1ED7i khi t\u1EA3i",labelFileProcessing:"\u0110ang t\u1EA3i l\xEAn",labelFileProcessingComplete:"T\u1EA3i l\xEAn th\xE0nh c\xF4ng",labelFileProcessingAborted:"\u0110\xE3 hu\u1EF7 t\u1EA3i l\xEAn",labelFileProcessingError:"L\u1ED7i khi t\u1EA3i l\xEAn",labelFileProcessingRevertError:"L\u1ED7i khi ho\xE0n nguy\xEAn",labelFileRemoveError:"L\u1ED7i khi x\xF3a",labelTapToCancel:"nh\u1EA5n \u0111\u1EC3 h\u1EE7y",labelTapToRetry:"nh\u1EA5n \u0111\u1EC3 th\u1EED l\u1EA1i",labelTapToUndo:"nh\u1EA5n \u0111\u1EC3 ho\xE0n t\xE1c",labelButtonRemoveItem:"Xo\xE1",labelButtonAbortItemLoad:"Hu\u1EF7 b\u1ECF",labelButtonRetryItemLoad:"Th\u1EED l\u1EA1i",labelButtonAbortItemProcessing:"H\u1EE7y b\u1ECF",labelButtonUndoItemProcessing:"Ho\xE0n t\xE1c",labelButtonRetryItemProcessing:"Th\u1EED l\u1EA1i",labelButtonProcessItem:"T\u1EA3i l\xEAn",labelMaxFileSizeExceeded:"T\u1EADp tin qu\xE1 l\u1EDBn",labelMaxFileSize:"K\xEDch th\u01B0\u1EDBc t\u1EC7p t\u1ED1i \u0111a l\xE0 {filesize}",labelMaxTotalFileSizeExceeded:"\u0110\xE3 v\u01B0\u1EE3t qu\xE1 t\u1ED5ng k\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a",labelMaxTotalFileSize:"T\u1ED5ng k\xEDch th\u01B0\u1EDBc t\u1EC7p t\u1ED1i \u0111a l\xE0 {filesize}",labelFileTypeNotAllowed:"T\u1EC7p thu\u1ED9c lo\u1EA1i kh\xF4ng h\u1EE3p l\u1EC7",fileValidateTypeLabelExpectedTypes:"Ki\u1EC3u t\u1EC7p h\u1EE3p l\u1EC7 l\xE0 {allButLastType} ho\u1EB7c {lastType}",imageValidateSizeLabelFormatError:"Lo\u1EA1i h\xECnh \u1EA3nh kh\xF4ng \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3",imageValidateSizeLabelImageSizeTooSmall:"H\xECnh \u1EA3nh qu\xE1 nh\u1ECF",imageValidateSizeLabelImageSizeTooBig:"H\xECnh \u1EA3nh qu\xE1 l\u1EDBn",imageValidateSizeLabelExpectedMinSize:"K\xEDch th\u01B0\u1EDBc t\u1ED1i thi\u1EC3u l\xE0 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"K\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a l\xE0 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0110\u1ED9 ph\xE2n gi\u1EA3i qu\xE1 th\u1EA5p",imageValidateSizeLabelImageResolutionTooHigh:"\u0110\u1ED9 ph\xE2n gi\u1EA3i qu\xE1 cao",imageValidateSizeLabelExpectedMinResolution:"\u0110\u1ED9 ph\xE2n gi\u1EA3i t\u1ED1i thi\u1EC3u l\xE0 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0110\u1ED9 ph\xE2n gi\u1EA3i t\u1ED1i \u0111a l\xE0 {maxResolution}"};var Zl={labelIdle:'\u62D6\u653E\u6587\u4EF6\uFF0C\u6216\u8005 \u6D4F\u89C8 ',labelInvalidField:"\u5B57\u6BB5\u5305\u542B\u65E0\u6548\u6587\u4EF6",labelFileWaitingForSize:"\u8BA1\u7B97\u6587\u4EF6\u5927\u5C0F",labelFileSizeNotAvailable:"\u6587\u4EF6\u5927\u5C0F\u4E0D\u53EF\u7528",labelFileLoading:"\u52A0\u8F7D",labelFileLoadError:"\u52A0\u8F7D\u9519\u8BEF",labelFileProcessing:"\u4E0A\u4F20",labelFileProcessingComplete:"\u5DF2\u4E0A\u4F20",labelFileProcessingAborted:"\u4E0A\u4F20\u5DF2\u53D6\u6D88",labelFileProcessingError:"\u4E0A\u4F20\u51FA\u9519",labelFileProcessingRevertError:"\u8FD8\u539F\u51FA\u9519",labelFileRemoveError:"\u5220\u9664\u51FA\u9519",labelTapToCancel:"\u70B9\u51FB\u53D6\u6D88",labelTapToRetry:"\u70B9\u51FB\u91CD\u8BD5",labelTapToUndo:"\u70B9\u51FB\u64A4\u6D88",labelButtonRemoveItem:"\u5220\u9664",labelButtonAbortItemLoad:"\u4E2D\u6B62",labelButtonRetryItemLoad:"\u91CD\u8BD5",labelButtonAbortItemProcessing:"\u53D6\u6D88",labelButtonUndoItemProcessing:"\u64A4\u6D88",labelButtonRetryItemProcessing:"\u91CD\u8BD5",labelButtonProcessItem:"\u4E0A\u4F20",labelMaxFileSizeExceeded:"\u6587\u4EF6\u592A\u5927",labelMaxFileSize:"\u6700\u5927\u503C: {filesize}",labelMaxTotalFileSizeExceeded:"\u8D85\u8FC7\u6700\u5927\u6587\u4EF6\u5927\u5C0F",labelMaxTotalFileSize:"\u6700\u5927\u6587\u4EF6\u5927\u5C0F\uFF1A{filesize}",labelFileTypeNotAllowed:"\u6587\u4EF6\u7C7B\u578B\u65E0\u6548",fileValidateTypeLabelExpectedTypes:"\u5E94\u4E3A {allButLastType} \u6216 {lastType}",imageValidateSizeLabelFormatError:"\u4E0D\u652F\u6301\u56FE\u50CF\u7C7B\u578B",imageValidateSizeLabelImageSizeTooSmall:"\u56FE\u50CF\u592A\u5C0F",imageValidateSizeLabelImageSizeTooBig:"\u56FE\u50CF\u592A\u5927",imageValidateSizeLabelExpectedMinSize:"\u6700\u5C0F\u503C: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u6700\u5927\u503C: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u5206\u8FA8\u7387\u592A\u4F4E",imageValidateSizeLabelImageResolutionTooHigh:"\u5206\u8FA8\u7387\u592A\u9AD8",imageValidateSizeLabelExpectedMinResolution:"\u6700\u5C0F\u5206\u8FA8\u7387\uFF1A{minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u6700\u5927\u5206\u8FA8\u7387\uFF1A{maxResolution}"};var Kl={labelIdle:'\u62D6\u653E\u6A94\u6848\uFF0C\u6216\u8005 \u700F\u89BD ',labelInvalidField:"\u4E0D\u652F\u63F4\u6B64\u6A94\u6848",labelFileWaitingForSize:"\u6B63\u5728\u8A08\u7B97\u6A94\u6848\u5927\u5C0F",labelFileSizeNotAvailable:"\u6A94\u6848\u5927\u5C0F\u4E0D\u7B26",labelFileLoading:"\u8B80\u53D6\u4E2D",labelFileLoadError:"\u8B80\u53D6\u932F\u8AA4",labelFileProcessing:"\u4E0A\u50B3",labelFileProcessingComplete:"\u5DF2\u4E0A\u50B3",labelFileProcessingAborted:"\u4E0A\u50B3\u5DF2\u53D6\u6D88",labelFileProcessingError:"\u4E0A\u50B3\u767C\u751F\u932F\u8AA4",labelFileProcessingRevertError:"\u9084\u539F\u932F\u8AA4",labelFileRemoveError:"\u522A\u9664\u932F\u8AA4",labelTapToCancel:"\u9EDE\u64CA\u53D6\u6D88",labelTapToRetry:"\u9EDE\u64CA\u91CD\u8A66",labelTapToUndo:"\u9EDE\u64CA\u9084\u539F",labelButtonRemoveItem:"\u522A\u9664",labelButtonAbortItemLoad:"\u505C\u6B62",labelButtonRetryItemLoad:"\u91CD\u8A66",labelButtonAbortItemProcessing:"\u53D6\u6D88",labelButtonUndoItemProcessing:"\u53D6\u6D88",labelButtonRetryItemProcessing:"\u91CD\u8A66",labelButtonProcessItem:"\u4E0A\u50B3",labelMaxFileSizeExceeded:"\u6A94\u6848\u904E\u5927",labelMaxFileSize:"\u6700\u5927\u503C\uFF1A{filesize}",labelMaxTotalFileSizeExceeded:"\u8D85\u904E\u6700\u5927\u53EF\u4E0A\u50B3\u5927\u5C0F",labelMaxTotalFileSize:"\u6700\u5927\u53EF\u4E0A\u50B3\u5927\u5C0F\uFF1A{filesize}",labelFileTypeNotAllowed:"\u4E0D\u652F\u63F4\u6B64\u985E\u578B\u6A94\u6848",fileValidateTypeLabelExpectedTypes:"\u61C9\u70BA {allButLastType} \u6216 {lastType}",imageValidateSizeLabelFormatError:"\u4E0D\u652F\u6301\u6B64\u985E\u5716\u7247\u985E\u578B",imageValidateSizeLabelImageSizeTooSmall:"\u5716\u7247\u904E\u5C0F",imageValidateSizeLabelImageSizeTooBig:"\u5716\u7247\u904E\u5927",imageValidateSizeLabelExpectedMinSize:"\u6700\u5C0F\u5C3A\u5BF8\uFF1A{minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u6700\u5927\u5C3A\u5BF8\uFF1A{maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u89E3\u6790\u5EA6\u904E\u4F4E",imageValidateSizeLabelImageResolutionTooHigh:"\u89E3\u6790\u5EA6\u904E\u9AD8",imageValidateSizeLabelExpectedMinResolution:"\u6700\u4F4E\u89E3\u6790\u5EA6\uFF1A{minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u6700\u9AD8\u89E3\u6790\u5EA6\uFF1A{maxResolution}"};ve(Ho);ve(qo);ve(Xo);ve(Zo);ve(tl);ve(ml);ve(fl);ve(wl);ve(Oa);window.FilePond=oa;function ff({acceptedFileTypes:e,imageEditorEmptyFillColor:t,imageEditorMode:i,imageEditorViewportHeight:a,imageEditorViewportWidth:n,deleteUploadedFileUsing:o,isDeletable:l,isDisabled:r,getUploadedFilesUsing:s,imageCropAspectRatio:p,imagePreviewHeight:c,imageResizeMode:d,imageResizeTargetHeight:m,imageResizeTargetWidth:u,imageResizeUpscale:f,isAvatar:g,hasImageEditor:h,hasCircleCropper:I,canEditSvgs:E,isSvgEditingConfirmed:T,confirmSvgEditingMessage:v,disabledSvgEditingMessage:y,isDownloadable:b,isMultiple:w,isOpenable:x,isPreviewable:_,isReorderable:P,itemPanelAspectRatio:O,loadingIndicatorPosition:M,locale:N,maxFiles:S,maxSize:D,minSize:R,maxParallelUploads:L,panelAspectRatio:z,panelLayout:F,placeholder:G,removeUploadedFileButtonPosition:C,removeUploadedFileUsing:Y,reorderUploadedFilesUsing:Q,shouldAppendFiles:$,shouldOrientImageFromExif:pe,shouldTransformImage:k,state:H,uploadButtonPosition:q,uploadingMessage:le,uploadProgressIndicatorPosition:ee,uploadUsing:dt}){return{fileKeyIndex:{},pond:null,shouldUpdateState:!0,state:H,lastState:null,error:null,uploadedFileIndex:{},isEditorOpen:!1,editingFile:{},currentRatio:"",editor:{},init:async function(){Ft(Jl[N]??Jl.en),this.pond=ft(this.$refs.input,{acceptedFileTypes:e,allowImageExifOrientation:pe,allowPaste:!1,allowRemove:l,allowReorder:P,allowImagePreview:_,allowVideoPreview:_,allowAudioPreview:_,allowImageTransform:k,credits:!1,files:await this.getFiles(),imageCropAspectRatio:p,imagePreviewHeight:c,imageResizeTargetHeight:m,imageResizeTargetWidth:u,imageResizeMode:d,imageResizeUpscale:f,imageTransformOutputStripImageHead:!1,itemInsertLocation:$?"after":"before",...G&&{labelIdle:G},maxFiles:S,maxFileSize:D,minFileSize:R,...L&&{maxParallelUploads:L},styleButtonProcessItemPosition:q,styleButtonRemoveItemPosition:C,styleItemPanelAspectRatio:O,styleLoadIndicatorPosition:M,stylePanelAspectRatio:z,stylePanelLayout:F,styleProgressIndicatorPosition:ee,server:{load:async(B,W)=>{let Z=await(await fetch(B,{cache:"no-store"})).blob();W(Z)},process:(B,W,X,Z,Ve,Ge)=>{this.shouldUpdateState=!1;let Qt=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,Zt=>(Zt^crypto.getRandomValues(new Uint8Array(1))[0]&15>>Zt/4).toString(16));dt(Qt,W,Zt=>{this.shouldUpdateState=!0,Z(Zt)},Ve,Ge)},remove:async(B,W)=>{let X=this.uploadedFileIndex[B]??null;X&&(await o(X),W())},revert:async(B,W)=>{await Y(B),W()}},allowImageEdit:h,imageEditEditor:{open:B=>this.loadEditor(B),onconfirm:()=>{},oncancel:()=>this.closeEditor(),onclose:()=>this.closeEditor()},fileValidateTypeDetectType:(B,W)=>new Promise((X,Z)=>{let Ve=W||Uo.getType(B.name.split(".").pop());Ve?X(Ve):Z()})}),this.$watch("state",async()=>{if(this.pond&&this.shouldUpdateState&&this.state!==void 0){if(this.state!==null&&Object.values(this.state).filter(B=>B.startsWith("livewire-file:")).length){this.lastState=null;return}JSON.stringify(this.state)!==this.lastState&&(this.lastState=JSON.stringify(this.state),this.pond.files=await this.getFiles())}}),this.pond.on("reorderfiles",async B=>{let W=B.map(X=>X.source instanceof File?X.serverId:this.uploadedFileIndex[X.source]??null).filter(X=>X);await Q($?W:W.reverse())}),this.pond.on("initfile",async B=>{b&&(g||this.insertDownloadLink(B))}),this.pond.on("initfile",async B=>{x&&(g||this.insertOpenLink(B))}),this.pond.on("addfilestart",async B=>{B.status===bt.PROCESSING_QUEUED&&this.dispatchFormEvent("form-processing-started",{message:le})});let V=async()=>{this.pond.getFiles().filter(B=>B.status===bt.PROCESSING||B.status===bt.PROCESSING_QUEUED).length||this.dispatchFormEvent("form-processing-finished")};this.pond.on("processfile",V),this.pond.on("processfileabort",V),this.pond.on("processfilerevert",V),F==="compact circle"&&(this.pond.on("error",B=>{this.error=`${B.main}: ${B.sub}`.replace("Expects or","Expects")}),this.pond.on("removefile",()=>this.error=null))},destroy:function(){this.destroyEditor(),gt(this.$refs.input),this.pond=null},dispatchFormEvent:function(V,B={}){this.$el.closest("form")?.dispatchEvent(new CustomEvent(V,{composed:!0,cancelable:!0,detail:B}))},getUploadedFiles:async function(){let V=await s();this.fileKeyIndex=V??{},this.uploadedFileIndex=Object.entries(this.fileKeyIndex).filter(([B,W])=>W?.url).reduce((B,[W,X])=>(B[X.url]=W,B),{})},getFiles:async function(){await this.getUploadedFiles();let V=[];for(let B of Object.values(this.fileKeyIndex))B&&V.push({source:B.url,options:{type:"local",...!B.type||_&&(/^audio/.test(B.type)||/^image/.test(B.type)||/^video/.test(B.type))?{}:{file:{name:B.name,size:B.size,type:B.type}}}});return $?V:V.reverse()},insertDownloadLink:function(V){if(V.origin!==Ct.LOCAL)return;let B=this.getDownloadLink(V);B&&document.getElementById(`filepond--item-${V.id}`).querySelector(".filepond--file-info-main").prepend(B)},insertOpenLink:function(V){if(V.origin!==Ct.LOCAL)return;let B=this.getOpenLink(V);B&&document.getElementById(`filepond--item-${V.id}`).querySelector(".filepond--file-info-main").prepend(B)},getDownloadLink:function(V){let B=V.source;if(!B)return;let W=document.createElement("a");return W.className="filepond--download-icon",W.href=B,W.download=V.file.name,W},getOpenLink:function(V){let B=V.source;if(!B)return;let W=document.createElement("a");return W.className="filepond--open-icon",W.href=B,W.target="_blank",W},initEditor:function(){r||h&&(this.editor=new ya(this.$refs.editor,{aspectRatio:n/a,autoCropArea:1,center:!0,crop:V=>{this.$refs.xPositionInput.value=Math.round(V.detail.x),this.$refs.yPositionInput.value=Math.round(V.detail.y),this.$refs.heightInput.value=Math.round(V.detail.height),this.$refs.widthInput.value=Math.round(V.detail.width),this.$refs.rotationInput.value=V.detail.rotate},cropBoxResizable:!0,guides:!0,highlight:!0,responsive:!0,toggleDragModeOnDblclick:!0,viewMode:i,wheelZoomRatio:.02}))},closeEditor:function(){this.editingFile={},this.isEditorOpen=!1,this.destroyEditor()},fixImageDimensions:function(V,B){if(V.type!=="image/svg+xml")return B(V);let W=new FileReader;W.onload=X=>{let Z=new DOMParser().parseFromString(X.target.result,"image/svg+xml")?.querySelector("svg");if(!Z)return B(V);let Ve=["viewBox","ViewBox","viewbox"].find(Qt=>Z.hasAttribute(Qt));if(!Ve)return B(V);let Ge=Z.getAttribute(Ve).split(" ");return!Ge||Ge.length!==4?B(V):(Z.setAttribute("width",parseFloat(Ge[2])+"pt"),Z.setAttribute("height",parseFloat(Ge[3])+"pt"),B(new File([new Blob([new XMLSerializer().serializeToString(Z)],{type:"image/svg+xml"})],V.name,{type:"image/svg+xml",_relativePath:""})))},W.readAsText(V)},loadEditor:function(V){if(r||!h||!V)return;let B=V.type==="image/svg+xml";if(!E&&B){alert(y);return}T&&B&&!confirm(v)||this.fixImageDimensions(V,W=>{this.editingFile=W,this.initEditor();let X=new FileReader;X.onload=Z=>{this.isEditorOpen=!0,setTimeout(()=>this.editor.replace(Z.target.result),200)},X.readAsDataURL(V)})},getRoundedCanvas:function(V){let B=V.width,W=V.height,X=document.createElement("canvas");X.width=B,X.height=W;let Z=X.getContext("2d");return Z.imageSmoothingEnabled=!0,Z.drawImage(V,0,0,B,W),Z.globalCompositeOperation="destination-in",Z.beginPath(),Z.ellipse(B/2,W/2,B/2,W/2,0,0,2*Math.PI),Z.fill(),X},saveEditor:function(){if(r||!h)return;let V=this.editor.getCroppedCanvas({fillColor:t??"transparent",height:m,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",width:u});I&&(V=this.getRoundedCanvas(V)),V.toBlob(B=>{w&&this.pond.removeFile(this.pond.getFiles().find(W=>W.filename===this.editingFile.name)?.id,{revert:!0}),this.$nextTick(()=>{this.shouldUpdateState=!1;let W=this.editingFile.name.slice(0,this.editingFile.name.lastIndexOf(".")),X=this.editingFile.name.split(".").pop();X==="svg"&&(X="png");let Z=/-v(\d+)/;Z.test(W)?W=W.replace(Z,(Ve,Ge)=>`-v${Number(Ge)+1}`):W+="-v1",this.pond.addFile(new File([B],`${W}.${X}`,{type:this.editingFile.type==="image/svg+xml"||I?"image/png":this.editingFile.type,lastModified:new Date().getTime()})).then(()=>{this.closeEditor()}).catch(()=>{this.closeEditor()})})},I?"image/png":this.editingFile.type)},destroyEditor:function(){this.editor&&typeof this.editor.destroy=="function"&&this.editor.destroy(),this.editor=null}}}var Jl={ar:Sl,ca:Ll,ckb:Al,cs:Ml,da:Ol,de:Pl,en:Dl,es:Fl,fa:zl,fi:Cl,fr:Nl,hu:Bl,id:kl,it:Vl,km:Gl,nl:Ul,no:Wl,pl:Hl,pt_BR:wi,pt_PT:wi,ro:jl,ru:ql,sv:Yl,tr:$l,uk:Xl,vi:Ql,zh_CN:Zl,zh_TW:Kl};export{ff as default}; +`;n(X)},o.readAsText(e)}),Xu=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},Ku=()=>{let e={resize:c,filter:p},t=(d,m)=>(d.forEach(u=>{m=e[u.type](m,u.data)}),m),i=(d,m)=>{let u=d.transforms,g=null;if(u.forEach(f=>{f.type==="filter"&&(g=f)}),g){let f=null;u.forEach(h=>{h.type==="resize"&&(f=h)}),f&&(f.data.matrix=g.data,u=u.filter(h=>h.type!=="filter"))}m(t(u,d.imageData))};self.onmessage=d=>{i(d.data.message,m=>{self.postMessage({id:d.data.id,message:m},[m.data.buffer])})};let a=1,n=1,l=1;function o(d,m,u){let g=m[d]/255,f=m[d+1]/255,h=m[d+2]/255,I=m[d+3]/255,b=g*u[0]+f*u[1]+h*u[2]+I*u[3]+u[4],T=g*u[5]+f*u[6]+h*u[7]+I*u[8]+u[9],v=g*u[10]+f*u[11]+h*u[12]+I*u[13]+u[14],y=g*u[15]+f*u[16]+h*u[17]+I*u[18]+u[19],E=Math.max(0,b*y)+a*(1-y),_=Math.max(0,T*y)+n*(1-y),x=Math.max(0,v*y)+l*(1-y);m[d]=Math.max(0,Math.min(1,E))*255,m[d+1]=Math.max(0,Math.min(1,_))*255,m[d+2]=Math.max(0,Math.min(1,x))*255}let r=self.JSON.stringify([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);function s(d){return self.JSON.stringify(d||[])===r}function p(d,m){if(!m||s(m))return d;let u=d.data,g=u.length,f=m[0],h=m[1],I=m[2],b=m[3],T=m[4],v=m[5],y=m[6],E=m[7],_=m[8],x=m[9],R=m[10],z=m[11],P=m[12],A=m[13],B=m[14],w=m[15],O=m[16],S=m[17],L=m[18],D=m[19],F=0,G=0,C=0,q=0,X=0,K=0,oe=0,k=0,H=0,Y=0,re=0,ee=0;for(;F1&&g===!1)return p(d,I);f=d.width*w,h=d.height*w}let b=d.width,T=d.height,v=Math.round(f),y=Math.round(h),E=d.data,_=new Uint8ClampedArray(v*y*4),x=b/v,R=T/y,z=Math.ceil(x*.5),P=Math.ceil(R*.5);for(let A=0;A=-1&&re<=1&&(O=2*re*re*re-3*re*re+1,O>0)){Y=4*(H+X*b);let ee=E[Y+3];C+=O*ee,L+=O,ee<255&&(O=O*ee/250),D+=O*E[Y],F+=O*E[Y+1],G+=O*E[Y+2],S+=O}}}_[w]=D/S,_[w+1]=F/S,_[w+2]=G/S,_[w+3]=C/L,I&&o(w,_,I)}return{data:_,width:v,height:y}}},Qu=(e,t)=>{if(e.getUint32(t+4,!1)!==1165519206)return;t+=4;let i=e.getUint16(t+=6,!1)===18761;t+=e.getUint32(t+4,i);let a=e.getUint16(t,i);t+=2;for(let n=0;n{let t=new DataView(e);if(t.getUint16(0)!==65496)return null;let i=2,a,n,l=!1;for(;i=65504&&a<=65519||a===65534)||(l||(l=Qu(t,i,n)),i+n>t.byteLength)));)i+=n;return e.slice(0,i)},Ju=e=>new Promise(t=>{let i=new FileReader;i.onload=()=>t(Zu(i.result)||null),i.readAsArrayBuffer(e.slice(0,256*1024))}),eg=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,tg=(e,t)=>{let i=eg();if(i){let a=new i;return a.append(e),a.getBlob(t)}return new Blob([e],{type:t})},ig=()=>Math.random().toString(36).substr(2,9),ag=e=>{let t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),i=URL.createObjectURL(t),a=new Worker(i),n=[];return{transfer:()=>{},post:(l,o,r)=>{let s=ig();n[s]=o,a.onmessage=p=>{let c=n[p.data.id];c&&(c(p.data.message),delete n[p.data.id])},a.postMessage({id:s,message:l},r)},terminate:()=>{a.terminate(),URL.revokeObjectURL(i)}}},ng=e=>new Promise((t,i)=>{let a=new Image;a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),lg=e=>e.reduce((t,i)=>t.then(a=>i().then(Array.prototype.concat.bind(a))),Promise.resolve([])),og=(e,t)=>new Promise(i=>{let a={width:e.width,height:e.height},n=e.getContext("2d"),l=t.sort(Ro).map(o=>()=>new Promise(r=>{ug[o[0]](n,a,o[1],r)&&r()}));lg(l).then(()=>i(e))}),Lt=(e,t)=>{e.beginPath(),e.lineCap=t["stroke-linecap"],e.lineJoin=t["stroke-linejoin"],e.lineWidth=t["stroke-width"],t["stroke-dasharray"].length&&e.setLineDash(t["stroke-dasharray"].split(",")),e.fillStyle=t.fill,e.strokeStyle=t.stroke,e.globalAlpha=t.opacity||1},Mt=e=>{e.fill(),e.stroke(),e.globalAlpha=1},rg=(e,t,i)=>{let a=wt(i,t),n=ct(i,t);return Lt(e,n),e.rect(a.x,a.y,a.width,a.height),Mt(e,n),!0},sg=(e,t,i)=>{let a=wt(i,t),n=ct(i,t);Lt(e,n);let l=a.x,o=a.y,r=a.width,s=a.height,p=.5522848,c=r/2*p,d=s/2*p,m=l+r,u=o+s,g=l+r/2,f=o+s/2;return e.moveTo(l,f),e.bezierCurveTo(l,f-d,g-c,o,g,o),e.bezierCurveTo(g+c,o,m,f-d,m,f),e.bezierCurveTo(m,f+d,g+c,u,g,u),e.bezierCurveTo(g-c,u,l,f+d,l,f),Mt(e,n),!0},cg=(e,t,i,a)=>{let n=wt(i,t),l=ct(i,t);Lt(e,l);let o=new Image;new URL(i.src,window.location.href).origin!==window.location.origin&&(o.crossOrigin=""),o.onload=()=>{if(i.fit==="cover"){let s=n.width/n.height,p=s>1?o.width:o.height*s,c=s>1?o.width/s:o.height,d=o.width*.5-p*.5,m=o.height*.5-c*.5;e.drawImage(o,d,m,p,c,n.x,n.y,n.width,n.height)}else if(i.fit==="contain"){let s=Math.min(n.width/o.width,n.height/o.height),p=s*o.width,c=s*o.height,d=n.x+n.width*.5-p*.5,m=n.y+n.height*.5-c*.5;e.drawImage(o,0,0,o.width,o.height,d,m,p,c)}else e.drawImage(o,0,0,o.width,o.height,n.x,n.y,n.width,n.height);Mt(e,l),a()},o.src=i.src},dg=(e,t,i)=>{let a=wt(i,t),n=ct(i,t);Lt(e,n);let l=me(i.fontSize,t),o=i.fontFamily||"sans-serif",r=i.fontWeight||"normal",s=i.textAlign||"left";return e.font=`${r} ${l}px ${o}`,e.textAlign=s,e.fillText(i.text,a.x,a.y),Mt(e,n),!0},pg=(e,t,i)=>{let a=ct(i,t);Lt(e,a),e.beginPath();let n=i.points.map(o=>({x:me(o.x,t,1,"width"),y:me(o.y,t,1,"height")}));e.moveTo(n[0].x,n[0].y);let l=n.length;for(let o=1;o{let a=wt(i,t),n=ct(i,t);Lt(e,n),e.beginPath();let l={x:a.x,y:a.y},o={x:a.x+a.width,y:a.y+a.height};e.moveTo(l.x,l.y),e.lineTo(o.x,o.y);let r=yo({x:o.x-l.x,y:o.y-l.y}),s=.04*Math.min(t.width,t.height);if(i.lineDecoration.indexOf("arrow-begin")!==-1){let p=Ri(r,s),c=Si(l,p),d=qe(l,2,c),m=qe(l,-2,c);e.moveTo(d.x,d.y),e.lineTo(l.x,l.y),e.lineTo(m.x,m.y)}if(i.lineDecoration.indexOf("arrow-end")!==-1){let p=Ri(r,-s),c=Si(o,p),d=qe(o,2,c),m=qe(o,-2,c);e.moveTo(d.x,d.y),e.lineTo(o.x,o.y),e.lineTo(m.x,m.y)}return Mt(e,n),!0},ug={rect:rg,ellipse:sg,image:cg,text:dg,line:mg,path:pg},gg=e=>{let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e,0,0),t},fg=(e,t,i={})=>new Promise((a,n)=>{if(!e||!xu(e))return n({status:"not an image file",file:e});let{stripImageHead:l,beforeCreateBlob:o,afterCreateBlob:r,canvasMemoryLimit:s}=i,{crop:p,size:c,filter:d,markup:m,output:u}=t,g=t.image&&t.image.orientation?Math.max(1,Math.min(8,t.image.orientation)):null,f=u&&u.quality,h=f===null?null:f/100,I=u&&u.type||null,b=u&&u.background||null,T=[];c&&(typeof c.width=="number"||typeof c.height=="number")&&T.push({type:"resize",data:c}),d&&d.length===20&&T.push({type:"filter",data:d});let v=_=>{let x=r?r(_):_;Promise.resolve(x).then(a)},y=(_,x)=>{let R=gg(_),z=m.length?og(R,m):R;Promise.resolve(z).then(P=>{Pu(P,x,o).then(A=>{if(xo(P),l)return v(A);Ju(e).then(B=>{B!==null&&(A=new Blob([B,A.slice(20)],{type:A.type})),v(A)})}).catch(n)})};if(/svg/.test(e.type)&&I===null)return $u(e,p,m,{background:b}).then(_=>{a(tg(_,"image/svg+xml"))});let E=URL.createObjectURL(e);ng(E).then(_=>{URL.revokeObjectURL(E);let x=Mu(_,g,p,{canvasMemoryLimit:s,background:b}),R={quality:h,type:I||e.type};if(!T.length)return y(x,R);let z=ag(Ku);z.post({transforms:T,imageData:x},P=>{y(Xu(P),R),z.terminate()},[x.data.buffer])}).catch(n)}),hg=["x","y","left","top","right","bottom","width","height"],bg=e=>typeof e=="string"&&/%/.test(e)?parseFloat(e)/100:e,Eg=e=>{let[t,i]=e,a=i.points?{}:hg.reduce((n,l)=>(n[l]=bg(i[l]),n),{});return[t,{zIndex:0,...i,...a}]},Tg=e=>new Promise((t,i)=>{let a=new Image;a.src=URL.createObjectURL(e);let n=()=>{let o=a.naturalWidth,r=a.naturalHeight;o&&r&&(URL.revokeObjectURL(a.src),clearInterval(l),t({width:o,height:r}))};a.onerror=o=>{URL.revokeObjectURL(a.src),clearInterval(l),i(o)};let l=setInterval(n,1);n()});typeof window<"u"&&typeof window.document<"u"&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,i){let a=this;setTimeout(()=>{let n=a.toDataURL(t,i).split(",")[1],l=atob(n),o=l.length,r=new Uint8Array(o);for(;o--;)r[o]=l.charCodeAt(o);e(new Blob([r],{type:t||"image/png"}))})}}));var La=typeof window<"u"&&typeof window.document<"u",Ig=La&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,So=({addFilter:e,utils:t})=>{let{Type:i,forin:a,getFileFromBlob:n,isFile:l}=t,o=["crop","resize","filter","markup","output"],r=c=>(d,m,u)=>d(m,c?c(u):u),s=c=>c.aspectRatio===null&&c.rotation===0&&c.zoom===1&&c.center&&c.center.x===.5&&c.center.y===.5&&c.flip&&c.flip.horizontal===!1&&c.flip.vertical===!1;e("SHOULD_PREPARE_OUTPUT",(c,{query:d})=>new Promise(m=>{m(!d("IS_ASYNC"))}));let p=(c,d,m)=>new Promise(u=>{if(!c("GET_ALLOW_IMAGE_TRANSFORM")||m.archived||!l(d)||!bu(d))return u(!1);Tg(d).then(()=>{let g=c("GET_IMAGE_TRANSFORM_IMAGE_FILTER");if(g){let f=g(d);if(f==null)return handleRevert(!0);if(typeof f=="boolean")return u(f);if(typeof f.then=="function")return f.then(u)}u(!0)}).catch(g=>{u(!1)})});return e("DID_CREATE_ITEM",(c,{query:d,dispatch:m})=>{d("GET_ALLOW_IMAGE_TRANSFORM")&&c.extend("requestPrepare",()=>new Promise((u,g)=>{m("REQUEST_PREPARE_OUTPUT",{query:c.id,item:c,success:u,failure:g},!0)}))}),e("PREPARE_OUTPUT",(c,{query:d,item:m})=>new Promise(u=>{p(d,c,m).then(g=>{if(!g)return u(c);let f=[];d("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_ORIGINAL")&&f.push(()=>new Promise(x=>{x({name:d("GET_IMAGE_TRANSFORM_VARIANTS_ORIGINAL_NAME"),file:c})})),d("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_DEFAULT")&&f.push((x,R,z)=>new Promise(P=>{x(R,z).then(A=>P({name:d("GET_IMAGE_TRANSFORM_VARIANTS_DEFAULT_NAME"),file:A}))}));let h=d("GET_IMAGE_TRANSFORM_VARIANTS")||{};a(h,(x,R)=>{let z=r(R);f.push((P,A,B)=>new Promise(w=>{z(P,A,B).then(O=>w({name:x,file:O}))}))});let I=d("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY"),b=d("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY_MODE"),T=I===null?null:I/100,v=d("GET_IMAGE_TRANSFORM_OUTPUT_MIME_TYPE"),y=d("GET_IMAGE_TRANSFORM_CLIENT_TRANSFORMS")||o;m.setMetadata("output",{type:v,quality:T,client:y},!0);let E=(x,R)=>new Promise((z,P)=>{let A={...R};Object.keys(A).filter(C=>C!=="exif").forEach(C=>{y.indexOf(C)===-1&&delete A[C]});let{resize:B,exif:w,output:O,crop:S,filter:L,markup:D}=A,F={image:{orientation:w?w.orientation:null},output:O&&(O.type||typeof O.quality=="number"||O.background)?{type:O.type,quality:typeof O.quality=="number"?O.quality*100:null,background:O.background||d("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||null}:void 0,size:B&&(B.size.width||B.size.height)?{mode:B.mode,upscale:B.upscale,...B.size}:void 0,crop:S&&!s(S)?{...S}:void 0,markup:D&&D.length?D.map(Eg):[],filter:L};if(F.output){let C=O.type?O.type!==x.type:!1,q=/\/jpe?g$/.test(x.type),X=O.quality!==null?q&&b==="always":!1;if(!!!(F.size||F.crop||F.filter||C||X))return z(x)}let G={beforeCreateBlob:d("GET_IMAGE_TRANSFORM_BEFORE_CREATE_BLOB"),afterCreateBlob:d("GET_IMAGE_TRANSFORM_AFTER_CREATE_BLOB"),canvasMemoryLimit:d("GET_IMAGE_TRANSFORM_CANVAS_MEMORY_LIMIT"),stripImageHead:d("GET_IMAGE_TRANSFORM_OUTPUT_STRIP_IMAGE_HEAD")};fg(x,F,G).then(C=>{let q=n(C,Iu(x.name,vu(C.type)));z(q)}).catch(P)}),_=f.map(x=>x(E,c,m.getMetadata()));Promise.all(_).then(x=>{u(x.length===1&&x[0].name===null?x[0].file:x)})})})),{options:{allowImageTransform:[!0,i.BOOLEAN],imageTransformImageFilter:[null,i.FUNCTION],imageTransformOutputMimeType:[null,i.STRING],imageTransformOutputQuality:[null,i.INT],imageTransformOutputStripImageHead:[!0,i.BOOLEAN],imageTransformClientTransforms:[null,i.ARRAY],imageTransformOutputQualityMode:["always",i.STRING],imageTransformVariants:[null,i.OBJECT],imageTransformVariantsIncludeDefault:[!0,i.BOOLEAN],imageTransformVariantsDefaultName:[null,i.STRING],imageTransformVariantsIncludeOriginal:[!1,i.BOOLEAN],imageTransformVariantsOriginalName:["original_",i.STRING],imageTransformBeforeCreateBlob:[null,i.FUNCTION],imageTransformAfterCreateBlob:[null,i.FUNCTION],imageTransformCanvasMemoryLimit:[La&&Ig?4096*4096:null,i.INT],imageTransformCanvasBackgroundColor:[null,i.STRING]}}};La&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:So}));var _o=So;var Ma=e=>/^video/.test(e.type),Xt=e=>/^audio/.test(e.type),Aa=class{constructor(t,i){this.mediaEl=t,this.audioElems=i,this.onplayhead=!1,this.duration=0,this.timelineWidth=this.audioElems.timeline.offsetWidth-this.audioElems.playhead.offsetWidth,this.moveplayheadFn=this.moveplayhead.bind(this),this.registerListeners()}registerListeners(){this.mediaEl.addEventListener("timeupdate",this.timeUpdate.bind(this),!1),this.mediaEl.addEventListener("canplaythrough",()=>this.duration=this.mediaEl.duration,!1),this.audioElems.timeline.addEventListener("click",this.timelineClicked.bind(this),!1),this.audioElems.button.addEventListener("click",this.play.bind(this)),this.audioElems.playhead.addEventListener("mousedown",this.mouseDown.bind(this),!1),window.addEventListener("mouseup",this.mouseUp.bind(this),!1)}play(){this.mediaEl.paused?this.mediaEl.play():this.mediaEl.pause(),this.audioElems.button.classList.toggle("play"),this.audioElems.button.classList.toggle("pause")}timeUpdate(){let t=this.mediaEl.currentTime/this.duration*100;this.audioElems.playhead.style.marginLeft=t+"%",this.mediaEl.currentTime===this.duration&&(this.audioElems.button.classList.toggle("play"),this.audioElems.button.classList.toggle("pause"))}moveplayhead(t){let i=t.clientX-this.getPosition(this.audioElems.timeline);i>=0&&i<=this.timelineWidth&&(this.audioElems.playhead.style.marginLeft=i+"px"),i<0&&(this.audioElems.playhead.style.marginLeft="0px"),i>this.timelineWidth&&(this.audioElems.playhead.style.marginLeft=this.timelineWidth-4+"px")}timelineClicked(t){this.moveplayhead(t),this.mediaEl.currentTime=this.duration*this.clickPercent(t)}mouseDown(){this.onplayhead=!0,window.addEventListener("mousemove",this.moveplayheadFn,!0),this.mediaEl.removeEventListener("timeupdate",this.timeUpdate.bind(this),!1)}mouseUp(t){window.removeEventListener("mousemove",this.moveplayheadFn,!0),this.onplayhead==!0&&(this.moveplayhead(t),this.mediaEl.currentTime=this.duration*this.clickPercent(t),this.mediaEl.addEventListener("timeupdate",this.timeUpdate.bind(this),!1)),this.onplayhead=!1}clickPercent(t){return(t.clientX-this.getPosition(this.audioElems.timeline))/this.timelineWidth}getPosition(t){return t.getBoundingClientRect().left}},vg=e=>e.utils.createView({name:"media-preview",tag:"div",ignoreRect:!0,create:({root:t,props:i})=>{let{id:a}=i,n=t.query("GET_ITEM",{id:i.id}),l=Xt(n.file)?"audio":"video";if(t.ref.media=document.createElement(l),t.ref.media.setAttribute("controls",!0),t.element.appendChild(t.ref.media),Xt(n.file)){let o=document.createDocumentFragment();t.ref.audio=[],t.ref.audio.container=document.createElement("div"),t.ref.audio.button=document.createElement("span"),t.ref.audio.timeline=document.createElement("div"),t.ref.audio.playhead=document.createElement("div"),t.ref.audio.container.className="audioplayer",t.ref.audio.button.className="playpausebtn play",t.ref.audio.timeline.className="timeline",t.ref.audio.playhead.className="playhead",t.ref.audio.timeline.appendChild(t.ref.audio.playhead),t.ref.audio.container.appendChild(t.ref.audio.button),t.ref.audio.container.appendChild(t.ref.audio.timeline),o.appendChild(t.ref.audio.container),t.element.appendChild(o)}},write:e.utils.createRoute({DID_MEDIA_PREVIEW_LOAD:({root:t,props:i})=>{let{id:a}=i,n=t.query("GET_ITEM",{id:i.id});if(!n)return;let l=window.URL||window.webkitURL,o=new Blob([n.file],{type:n.file.type});t.ref.media.type=n.file.type,t.ref.media.src=n.file.mock&&n.file.url||l.createObjectURL(o),Xt(n.file)&&new Aa(t.ref.media,t.ref.audio),t.ref.media.addEventListener("loadeddata",()=>{let r=75;if(Ma(n.file)){let s=t.ref.media.offsetWidth,p=t.ref.media.videoWidth/s;r=t.ref.media.videoHeight/p}t.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:i.id,height:r})},!1)}})}),xg=e=>{let t=({root:a,props:n})=>{let{id:l}=n;a.query("GET_ITEM",l)&&a.dispatch("DID_MEDIA_PREVIEW_LOAD",{id:l})},i=({root:a,props:n})=>{let l=vg(e);a.ref.media=a.appendChildView(a.createChildView(l,{id:n.id}))};return e.utils.createView({name:"media-preview-wrapper",create:i,write:e.utils.createRoute({DID_MEDIA_PREVIEW_CONTAINER_CREATE:t})})},Pa=e=>{let{addFilter:t,utils:i}=e,{Type:a,createRoute:n}=i,l=xg(e);return t("CREATE_VIEW",o=>{let{is:r,view:s,query:p}=o;if(!r("file"))return;let c=({root:d,props:m})=>{let{id:u}=m,g=p("GET_ITEM",u),f=p("GET_ALLOW_VIDEO_PREVIEW"),h=p("GET_ALLOW_AUDIO_PREVIEW");!g||g.archived||(!Ma(g.file)||!f)&&(!Xt(g.file)||!h)||(d.ref.mediaPreview=s.appendChildView(s.createChildView(l,{id:u})),d.dispatch("DID_MEDIA_PREVIEW_CONTAINER_CREATE",{id:u}))};s.registerWriter(n({DID_LOAD_ITEM:c},({root:d,props:m})=>{let{id:u}=m,g=p("GET_ITEM",u),f=d.query("GET_ALLOW_VIDEO_PREVIEW"),h=d.query("GET_ALLOW_AUDIO_PREVIEW");!g||(!Ma(g.file)||!f)&&(!Xt(g.file)||!h)||d.rect.element.hidden}))}),{options:{allowVideoPreview:[!0,a.BOOLEAN],allowAudioPreview:[!0,a.BOOLEAN]}}},yg=typeof window<"u"&&typeof window.document<"u";yg&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Pa}));var wo={labelIdle:'\u134B\u12ED\u120E\u127D \u1235\u1260\u12CD \u12A5\u12DA\u1205 \u130B\u122D \u12ED\u120D\u1240\u1241\u1275 \u12C8\u12ED\u121D \u134B\u12ED\u1209\u1295 \u12ED\u121D\u1228\u1321 ',labelInvalidField:"\u1218\u1235\u12A9 \u120D\u12AD \u12EB\u120D\u1206\u1291 \u134B\u12ED\u120E\u127D\u1295 \u12ED\u12DF\u120D",labelFileWaitingForSize:"\u12E8\u134B\u12ED\u1209\u1295 \u1218\u1320\u1295 \u1260\u1218\u1320\u1263\u1260\u1245 \u120B\u12ED",labelFileSizeNotAvailable:"\u12E8\u134B\u12ED\u1209\u1295 \u1218\u1320\u1295 \u120A\u1308\u129D \u12A0\u120D\u127B\u1208\u121D",labelFileLoading:"\u1260\u121B\u1295\u1260\u1265 \u120B\u12ED",labelFileLoadError:"\u1260\u121B\u1295\u1260\u1265 \u120B\u12ED \u127D\u130D\u122D \u1270\u1348\u1325\u122F\u120D",labelFileProcessing:"\u134B\u12ED\u1209\u1295 \u1260\u1218\u132B\u1295 \u120B\u12ED",labelFileProcessingComplete:"\u134B\u12ED\u1209\u1295 \u1218\u132B\u1295 \u1270\u1320\u1293\u1245\u124B\u120D",labelFileProcessingAborted:"\u134B\u12ED\u1209\u1295 \u1218\u132B\u1295 \u1270\u124B\u122D\u1327\u120D",labelFileProcessingError:"\u134B\u12ED\u1209\u1295 \u1260\u1218\u132B\u1295 \u120B\u12ED \u127D\u130D\u122D \u1270\u1348\u1325\u122F\u120D",labelFileProcessingRevertError:"\u1348\u12ED\u1209\u1295 \u1260\u1218\u1240\u120D\u1260\u1235 \u120B\u12ED \u127D\u130D\u122D \u1270\u1348\u1325\u122F\u120D",labelFileRemoveError:"\u1260\u121B\u1325\u134B\u1275 \u120B\u12ED \u127D\u130D\u122D \u1270\u1348\u1325\u122F\u120D",labelTapToCancel:"\u1208\u121B\u124B\u1228\u1325 \u1290\u12AB \u12EB\u12F5\u122D\u1309",labelTapToRetry:"\u12F0\u130D\u121E \u1208\u1218\u121E\u12A8\u122D \u1290\u12AB \u12EB\u12F5\u122D\u1309",labelTapToUndo:"\u12C8\u12F0\u1290\u1260\u1228\u1260\u1275 \u1208\u1218\u1218\u1208\u1235 \u1290\u12AB \u12EB\u12F5\u122D\u1309",labelButtonRemoveItem:"\u120B\u1325\u134B",labelButtonAbortItemLoad:"\u120B\u124B\u122D\u1325",labelButtonRetryItemLoad:"\u12F0\u130D\u121C \u120D\u121E\u12AD\u122D",labelButtonAbortItemProcessing:"\u12ED\u1245\u122D",labelButtonUndoItemProcessing:"\u12C8\u12F0\u1290\u1260\u1228\u1260\u1275 \u120D\u1218\u120D\u1235",labelButtonRetryItemProcessing:"\u12F0\u130D\u121C \u120D\u121E\u12AD\u122D",labelButtonProcessItem:"\u120D\u132B\u1295",labelMaxFileSizeExceeded:"\u134B\u12ED\u1209 \u1270\u120D\u124B\u120D",labelMaxFileSize:"\u12E8\u134B\u12ED\u120D \u1218\u1320\u1295 \u12A8 {filesize} \u1218\u1265\u1208\u1325 \u12A0\u12ED\u1348\u1240\u12F5\u121D",labelMaxTotalFileSizeExceeded:"\u12E8\u121A\u1348\u1240\u12F0\u12CD\u1295 \u1320\u1245\u120B\u120B \u12E8\u134B\u12ED\u120D \u1218\u1320\u1295 \u12A0\u120D\u1348\u12CB\u120D",labelMaxTotalFileSize:"\u1320\u1245\u120B\u120B \u12E8\u134B\u12ED\u120D \u1218\u1320\u1295 \u12A8 {filesize} \u1218\u1265\u1208\u1325 \u12A0\u12ED\u1348\u1240\u12F5\u121D",labelFileTypeNotAllowed:"\u12E8\u1270\u1233\u1233\u1270 \u12E8\u134B\u12ED\u120D \u12A0\u12ED\u1290\u1275 \u1290\u12CD",fileValidateTypeLabelExpectedTypes:"\u12E8\u134B\u12ED\u120D \u12A0\u12ED\u1290\u1271 \u1218\u1206\u1295 \u12E8\u121A\u1308\u1263\u12CD {allButLastType} \u12A5\u1293 {lastType} \u1290\u12CD",imageValidateSizeLabelFormatError:"\u12E8\u121D\u1235\u120D \u12A0\u12ED\u1290\u1271 \u1208\u1218\u132B\u1295 \u12A0\u12ED\u1206\u1295\u121D",imageValidateSizeLabelImageSizeTooSmall:"\u121D\u1235\u1209 \u1260\u1323\u121D \u12A0\u1295\u1237\u120D",imageValidateSizeLabelImageSizeTooBig:"\u121D\u1235\u1209 \u1260\u1323\u121D \u1270\u120D\u124B\u120D",imageValidateSizeLabelExpectedMinSize:"\u12DD\u1245\u1270\u129B\u12CD \u12E8\u121D\u1235\u120D \u120D\u12AC\u1275 {minWidth} \xD7 {minHeight} \u1290\u12CD",imageValidateSizeLabelExpectedMaxSize:"\u12A8\u134D\u1270\u129B\u12CD \u12E8\u121D\u1235\u120D \u120D\u12AC\u1275 {maxWidth} \xD7 {maxHeight} \u1290\u12CD",imageValidateSizeLabelImageResolutionTooLow:"\u12E8\u121D\u1235\u1209 \u1325\u122B\u1275 \u1260\u1323\u121D \u12DD\u1245\u1270\u129B \u1290\u12CD",imageValidateSizeLabelImageResolutionTooHigh:"\u12E8\u121D\u1235\u1209 \u1325\u122B\u1275 \u1260\u1323\u121D \u12A8\u134D\u1270\u129B \u1290\u12CD",imageValidateSizeLabelExpectedMinResolution:"\u12DD\u1245\u1270\u129B\u12CD \u12E8\u121D\u1235\u120D \u1325\u122B\u1275 {minResolution} \u1290\u12CD",imageValidateSizeLabelExpectedMaxResolution:"\u12A8\u134D\u1270\u129B\u12CD \u12E8\u121D\u1235\u120D \u1325\u122B\u1275 {maxResolution} \u1290\u12CD"};var Lo={labelIdle:'\u0627\u0633\u062D\u0628 \u0648 \u0627\u062F\u0631\u062C \u0645\u0644\u0641\u0627\u062A\u0643 \u0623\u0648 \u062A\u0635\u0641\u062D ',labelInvalidField:"\u0627\u0644\u062D\u0642\u0644 \u064A\u062D\u062A\u0648\u064A \u0639\u0644\u0649 \u0645\u0644\u0641\u0627\u062A \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629",labelFileWaitingForSize:"\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u062D\u062C\u0645",labelFileSizeNotAvailable:"\u0627\u0644\u062D\u062C\u0645 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D",labelFileLoading:"\u0628\u0627\u0644\u0625\u0646\u062A\u0638\u0627\u0631",labelFileLoadError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u062D\u0645\u064A\u0644",labelFileProcessing:"\u064A\u062A\u0645 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingComplete:"\u062A\u0645 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingAborted:"\u062A\u0645 \u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingRevertError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u0631\u0627\u062C\u0639",labelFileRemoveError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062D\u0630\u0641",labelTapToCancel:"\u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0644\u063A\u0627\u0621",labelTapToRetry:"\u0627\u0646\u0642\u0631 \u0644\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",labelTapToUndo:"\u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u0631\u0627\u062C\u0639",labelButtonRemoveItem:"\u0645\u0633\u062D",labelButtonAbortItemLoad:"\u0625\u0644\u063A\u0627\u0621",labelButtonRetryItemLoad:"\u0625\u0639\u0627\u062F\u0629",labelButtonAbortItemProcessing:"\u0625\u0644\u063A\u0627\u0621",labelButtonUndoItemProcessing:"\u062A\u0631\u0627\u062C\u0639",labelButtonRetryItemProcessing:"\u0625\u0639\u0627\u062F\u0629",labelButtonProcessItem:"\u0631\u0641\u0639",labelMaxFileSizeExceeded:"\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u0627",labelMaxFileSize:"\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0627\u0644\u0623\u0642\u0635\u0649: {filesize}",labelMaxTotalFileSizeExceeded:"\u062A\u0645 \u062A\u062C\u0627\u0648\u0632 \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u062D\u062C\u0645 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A",labelMaxTotalFileSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641: {filesize}",labelFileTypeNotAllowed:"\u0645\u0644\u0641 \u0645\u0646 \u0646\u0648\u0639 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D",fileValidateTypeLabelExpectedTypes:"\u062A\u062A\u0648\u0642\u0639 {allButLastType} \u0645\u0646 {lastType}",imageValidateSizeLabelFormatError:"\u0646\u0648\u0639 \u0627\u0644\u0635\u0648\u0631\u0629 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",imageValidateSizeLabelImageSizeTooSmall:"\u0627\u0644\u0635\u0648\u0631\u0629 \u0635\u063A\u064A\u0631 \u062C\u062F\u0627",imageValidateSizeLabelImageSizeTooBig:"\u0627\u0644\u0635\u0648\u0631\u0629 \u0643\u0628\u064A\u0631\u0629 \u062C\u062F\u0627",imageValidateSizeLabelExpectedMinSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 \u0644\u0644\u0623\u0628\u0639\u0627\u062F \u0647\u0648: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0623\u0628\u0639\u0627\u062F \u0647\u0648: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0627\u0644\u062F\u0642\u0629 \u0636\u0639\u064A\u0641\u0629 \u062C\u062F\u0627",imageValidateSizeLabelImageResolutionTooHigh:"\u0627\u0644\u062F\u0642\u0629 \u0645\u0631\u062A\u0641\u0639\u0629 \u062C\u062F\u0627",imageValidateSizeLabelExpectedMinResolution:"\u0623\u0642\u0644 \u062F\u0642\u0629: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0623\u0642\u0635\u0649 \u062F\u0642\u0629: {maxResolution}"};var Mo={labelIdle:'Fayl\u0131n\u0131z\u0131 S\xFCr\xFC\u015Fd\xFCr\xFCn & Burax\u0131n ya da Se\xE7in ',labelInvalidField:"Sah\u0259d\u0259 etibars\u0131z fayllar var",labelFileWaitingForSize:"\xD6l\xE7\xFC hesablan\u0131r",labelFileSizeNotAvailable:"\xD6l\xE7\xFC m\xF6vcud deyil",labelFileLoading:"Y\xFCkl\u0259nir",labelFileLoadError:"Y\xFCkl\u0259m\u0259 \u0259snas\u0131nda x\u0259ta ba\u015F verdi",labelFileProcessing:"Y\xFCkl\u0259nir",labelFileProcessingComplete:"Y\xFCkl\u0259m\u0259 tamamland\u0131",labelFileProcessingAborted:"Y\xFCkl\u0259m\u0259 l\u0259\u011Fv edildi",labelFileProcessingError:"Y\xFCk\u0259y\u0259rk\u0259n x\u0259ta ba\u015F verdi",labelFileProcessingRevertError:"Geri \xE7\u0259k\u0259rk\u0259n x\u0259ta ba\u015F verdi",labelFileRemoveError:"\xC7\u0131xarark\u0259n x\u0259ta ba\u015F verdi",labelTapToCancel:"\u0130mtina etm\u0259k \xFC\xE7\xFCn klikl\u0259yin",labelTapToRetry:"T\u0259krar yoxlamaq \xFC\xE7\xFCn klikl\u0259yin",labelTapToUndo:"Geri almaq \xFC\xE7\xFCn klikl\u0259yin",labelButtonRemoveItem:"\xC7\u0131xar",labelButtonAbortItemLoad:"\u0130mtina Et",labelButtonRetryItemLoad:"T\u0259krar yoxla",labelButtonAbortItemProcessing:"\u0130mtina et",labelButtonUndoItemProcessing:"Geri Al",labelButtonRetryItemProcessing:"T\u0259krar yoxla",labelButtonProcessItem:"Y\xFCkl\u0259",labelMaxFileSizeExceeded:"Fayl \xE7ox b\xF6y\xFCkd\xFCr",labelMaxFileSize:"\u018Fn b\xF6y\xFCk fayl \xF6l\xE7\xFCs\xFC: {filesize}",labelMaxTotalFileSizeExceeded:"Maksimum \xF6l\xE7\xFC ke\xE7ildi",labelMaxTotalFileSize:"Maksimum fayl \xF6l\xE7\xFCs\xFC :{filesize}",labelFileTypeNotAllowed:"Etibars\u0131z fayl tipi",fileValidateTypeLabelExpectedTypes:"Bu {allButLastType} ya da bu fayl olmas\u0131 laz\u0131md\u0131r: {lastType}",imageValidateSizeLabelFormatError:"\u015E\u0259kil tipi d\u0259st\u0259kl\u0259nmir",imageValidateSizeLabelImageSizeTooSmall:"\u015E\u0259kil \xE7ox ki\xE7ik",imageValidateSizeLabelImageSizeTooBig:"\u015E\u0259kil \xE7ox b\xF6y\xFCk",imageValidateSizeLabelExpectedMinSize:"Minimum \xF6l\xE7\xFC {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimum \xF6l\xE7\xFC {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"G\xF6r\xFCnt\xFC imkan\u0131 \xE7ox a\u015Fa\u011F\u0131",imageValidateSizeLabelImageResolutionTooHigh:"G\xF6r\xFCnt\xFC imkan\u0131 \xE7ox y\xFCks\u0259k",imageValidateSizeLabelExpectedMinResolution:"Minimum g\xF6r\xFCnt\xFC imkan\u0131 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum g\xF6r\xFCnt\xFC imkan\u0131 {maxResolution}"};var Ao={labelIdle:'Arrossega i deixa anar els teus fitxers o Navega ',labelInvalidField:"El camp cont\xE9 fitxers inv\xE0lids",labelFileWaitingForSize:"Esperant mida",labelFileSizeNotAvailable:"Mida no disponible",labelFileLoading:"Carregant",labelFileLoadError:"Error durant la c\xE0rrega",labelFileProcessing:"Pujant",labelFileProcessingComplete:"Pujada completada",labelFileProcessingAborted:"Pujada cancel\xB7lada",labelFileProcessingError:"Error durant la pujada",labelFileProcessingRevertError:"Error durant la reversi\xF3",labelFileRemoveError:"Error durant l'eliminaci\xF3",labelTapToCancel:"toca per cancel\xB7lar",labelTapToRetry:"toca per reintentar",labelTapToUndo:"toca per desfer",labelButtonRemoveItem:"Eliminar",labelButtonAbortItemLoad:"Cancel\xB7lar",labelButtonRetryItemLoad:"Reintentar",labelButtonAbortItemProcessing:"Cancel\xB7lar",labelButtonUndoItemProcessing:"Desfer",labelButtonRetryItemProcessing:"Reintentar",labelButtonProcessItem:"Pujar",labelMaxFileSizeExceeded:"El fitxer \xE9s massa gran",labelMaxFileSize:"La mida m\xE0xima del fitxer \xE9s {filesize}",labelMaxTotalFileSizeExceeded:"Mida m\xE0xima total excedida",labelMaxTotalFileSize:"La mida m\xE0xima total del fitxer \xE9s {filesize}",labelFileTypeNotAllowed:"Fitxer de tipus inv\xE0lid",fileValidateTypeLabelExpectedTypes:"Espera {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipus d'imatge no suportada",imageValidateSizeLabelImageSizeTooSmall:"La imatge \xE9s massa petita",imageValidateSizeLabelImageSizeTooBig:"La imatge \xE9s massa gran",imageValidateSizeLabelExpectedMinSize:"La mida m\xEDnima \xE9s {minWidth} x {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La mida m\xE0xima \xE9s {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La resoluci\xF3 \xE9s massa baixa",imageValidateSizeLabelImageResolutionTooHigh:"La resoluci\xF3 \xE9s massa alta",imageValidateSizeLabelExpectedMinResolution:"La resoluci\xF3 m\xEDnima \xE9s {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La resoluci\xF3 m\xE0xima \xE9s {maxResolution}"};var Po={labelIdle:'\u067E\u06D5\u0695\u06AF\u06D5\u06A9\u0627\u0646 \u0641\u0695\u06CE \u0628\u062F\u06D5 \u0626\u06CE\u0631\u06D5 \u0628\u06C6 \u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u06CC\u0627\u0646 \u0647\u06D5\u06B5\u0628\u0698\u06CE\u0631\u06D5 ',labelInvalidField:"\u067E\u06D5\u0695\u06AF\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06CC \u062A\u06CE\u062F\u0627\u06CC\u06D5",labelFileWaitingForSize:"\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06CC\u06CC \u0642\u06D5\u0628\u0627\u0631\u06D5",labelFileSizeNotAvailable:"\u0642\u06D5\u0628\u0627\u0631\u06D5 \u0628\u06D5\u0631\u062F\u06D5\u0633\u062A \u0646\u06CC\u06D5",labelFileLoading:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileLoadError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5\u0645\u0627\u0648\u06D5\u06CC \u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileProcessing:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileProcessingComplete:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u062A\u06D5\u0648\u0627\u0648 \u0628\u0648\u0648",labelFileProcessingAborted:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u06CC\u06D5\u0648\u06D5",labelFileProcessingError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5\u06A9\u0627\u062A\u06CC \u0628\u0627\u0631\u06A9\u0631\u062F\u0646\u062F\u0627",labelFileProcessingRevertError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5 \u06A9\u0627\u062A\u06CC \u06AF\u06D5\u0695\u0627\u0646\u06D5\u0648\u06D5",labelFileRemoveError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5 \u06A9\u0627\u062A\u06CC \u0633\u0695\u06CC\u0646\u06D5\u0648\u06D5",labelTapToCancel:"\u0628\u06C6 \u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5 Tab \u062F\u0627\u0628\u06AF\u0631\u06D5",labelTapToRetry:"tap \u062F\u0627\u0628\u06AF\u0631\u06D5 \u0628\u06C6 \u062F\u0648\u0648\u0628\u0627\u0631\u06D5\u06A9\u0631\u062F\u0646\u06D5\u0648\u06D5",labelTapToUndo:"tap \u062F\u0627\u0628\u06AF\u0631\u06D5 \u0628\u06C6 \u06AF\u06D5\u0695\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRemoveItem:"\u0633\u0695\u06CC\u0646\u06D5\u0648\u06D5",labelButtonAbortItemLoad:"\u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRetryItemLoad:"\u0647\u06D5\u0648\u06B5\u062F\u0627\u0646\u06D5\u0648\u06D5",labelButtonAbortItemProcessing:"\u067E\u06D5\u0634\u06CC\u0645\u0627\u0646\u0628\u0648\u0648\u0646\u06D5\u0648\u06D5",labelButtonUndoItemProcessing:"\u06AF\u06D5\u0695\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRetryItemProcessing:"\u0647\u06D5\u0648\u06B5\u062F\u0627\u0646\u06D5\u0648\u06D5",labelButtonProcessItem:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelMaxFileSizeExceeded:"\u067E\u06D5\u0695\u06AF\u06D5 \u0632\u06C6\u0631 \u06AF\u06D5\u0648\u0631\u06D5\u06CC\u06D5",labelMaxFileSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {filesize}",labelMaxTotalFileSizeExceeded:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5\u06CC \u06A9\u06C6\u06CC \u06AF\u0634\u062A\u06CC \u062A\u06CE\u067E\u06D5\u0695\u06CE\u0646\u062F\u0631\u0627",labelMaxTotalFileSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5\u06CC \u06A9\u06C6\u06CC \u067E\u06D5\u0695\u06AF\u06D5 {filesize}",labelFileTypeNotAllowed:"\u062C\u06C6\u0631\u06CC \u067E\u06D5\u0695\u06AF\u06D5\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5",fileValidateTypeLabelExpectedTypes:"\u062C\u06AF\u06D5 \u0644\u06D5 {allButLastType} \u06CC\u0627\u0646 {lastType}",imageValidateSizeLabelFormatError:"\u062C\u06C6\u0631\u06CC \u0648\u06CE\u0646\u06D5 \u067E\u0627\u06B5\u067E\u0634\u062A\u06CC\u06CC \u0646\u06D5\u06A9\u0631\u0627\u0648\u06D5",imageValidateSizeLabelImageSizeTooSmall:"\u0648\u06CE\u0646\u06D5\u06A9\u06D5 \u0632\u06C6\u0631 \u0628\u0686\u0648\u0648\u06A9\u06D5",imageValidateSizeLabelImageSizeTooBig:"\u0648\u06CE\u0646\u06D5\u06A9\u06D5 \u0632\u06C6\u0631 \u06AF\u06D5\u0648\u0631\u06D5\u06CC\u06D5",imageValidateSizeLabelExpectedMinSize:"\u06A9\u06D5\u0645\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC\u06D5\u06A9\u06D5\u06CC \u0632\u06C6\u0631 \u06A9\u06D5\u0645\u06D5",imageValidateSizeLabelImageResolutionTooHigh:"\u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC\u06D5\u06A9\u06D5\u06CC \u0632\u06C6\u0631 \u0628\u06D5\u0631\u0632\u06D5",imageValidateSizeLabelExpectedMinResolution:"\u06A9\u06D5\u0645\u062A\u0631\u06CC\u0646 \u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0648\u0631\u062F\u0628\u06CC\u0646\u06CC {maxResolution}"};var zo={labelIdle:'P\u0159et\xE1hn\u011Bte soubor sem (drag&drop) nebo Vyhledat ',labelInvalidField:"Pole obsahuje chybn\xE9 soubory",labelFileWaitingForSize:"Zji\u0161\u0165uje se velikost",labelFileSizeNotAvailable:"Velikost nen\xED zn\xE1m\xE1",labelFileLoading:"P\u0159en\xE1\u0161\xED se",labelFileLoadError:"Chyba p\u0159i p\u0159enosu",labelFileProcessing:"Prob\xEDh\xE1 upload",labelFileProcessingComplete:"Upload dokon\u010Den",labelFileProcessingAborted:"Upload stornov\xE1n",labelFileProcessingError:"Chyba p\u0159i uploadu",labelFileProcessingRevertError:"Chyba p\u0159i obnov\u011B",labelFileRemoveError:"Chyba p\u0159i odstran\u011Bn\xED",labelTapToCancel:"klepn\u011Bte pro storno",labelTapToRetry:"klepn\u011Bte pro opakov\xE1n\xED",labelTapToUndo:"klepn\u011Bte pro vr\xE1cen\xED",labelButtonRemoveItem:"Odstranit",labelButtonAbortItemLoad:"Storno",labelButtonRetryItemLoad:"Opakovat",labelButtonAbortItemProcessing:"Zp\u011Bt",labelButtonUndoItemProcessing:"Vr\xE1tit",labelButtonRetryItemProcessing:"Opakovat",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Soubor je p\u0159\xEDli\u0161 velk\xFD",labelMaxFileSize:"Nejv\u011Bt\u0161\xED velikost souboru je {filesize}",labelMaxTotalFileSizeExceeded:"P\u0159ekro\u010Dena maxim\xE1ln\xED celkov\xE1 velikost souboru",labelMaxTotalFileSize:"Maxim\xE1ln\xED celkov\xE1 velikost souboru je {filesize}",labelFileTypeNotAllowed:"Soubor je nespr\xE1vn\xE9ho typu",fileValidateTypeLabelExpectedTypes:"O\u010Dek\xE1v\xE1 se {allButLastType} nebo {lastType}",imageValidateSizeLabelFormatError:"Obr\xE1zek tohoto typu nen\xED podporov\xE1n",imageValidateSizeLabelImageSizeTooSmall:"Obr\xE1zek je p\u0159\xEDli\u0161 mal\xFD",imageValidateSizeLabelImageSizeTooBig:"Obr\xE1zek je p\u0159\xEDli\u0161 velk\xFD",imageValidateSizeLabelExpectedMinSize:"Minim\xE1ln\xED rozm\u011Br je {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maxim\xE1ln\xED rozm\u011Br je {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozli\u0161en\xED je p\u0159\xEDli\u0161 mal\xE9",imageValidateSizeLabelImageResolutionTooHigh:"Rozli\u0161en\xED je p\u0159\xEDli\u0161 velk\xE9",imageValidateSizeLabelExpectedMinResolution:"Minim\xE1ln\xED rozli\u0161en\xED je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maxim\xE1ln\xED rozli\u0161en\xED je {maxResolution}"};var Oo={labelIdle:'Tr\xE6k & slip filer eller Gennemse ',labelInvalidField:"Felt indeholder ugyldige filer",labelFileWaitingForSize:"Venter p\xE5 st\xF8rrelse",labelFileSizeNotAvailable:"St\xF8rrelse ikke tilg\xE6ngelig",labelFileLoading:"Loader",labelFileLoadError:"Load fejlede",labelFileProcessing:"Uploader",labelFileProcessingComplete:"Upload f\xE6rdig",labelFileProcessingAborted:"Upload annulleret",labelFileProcessingError:"Upload fejlede",labelFileProcessingRevertError:"Fortryd fejlede",labelFileRemoveError:"Fjern fejlede",labelTapToCancel:"tryk for at annullere",labelTapToRetry:"tryk for at pr\xF8ve igen",labelTapToUndo:"tryk for at fortryde",labelButtonRemoveItem:"Fjern",labelButtonAbortItemLoad:"Annuller",labelButtonRetryItemLoad:"Fors\xF8g igen",labelButtonAbortItemProcessing:"Annuller",labelButtonUndoItemProcessing:"Fortryd",labelButtonRetryItemProcessing:"Pr\xF8v igen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Filen er for stor",labelMaxFileSize:"Maksimal filst\xF8rrelse er {filesize}",labelMaxTotalFileSizeExceeded:"Maksimal totalst\xF8rrelse overskredet",labelMaxTotalFileSize:"Maksimal total filst\xF8rrelse er {filesize}",labelFileTypeNotAllowed:"Ugyldig filtype",fileValidateTypeLabelExpectedTypes:"Forventer {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Ugyldigt format",imageValidateSizeLabelImageSizeTooSmall:"Billedet er for lille",imageValidateSizeLabelImageSizeTooBig:"Billedet er for stort",imageValidateSizeLabelExpectedMinSize:"Minimum st\xF8rrelse er {minBredde} \xD7 {minH\xF8jde}",imageValidateSizeLabelExpectedMaxSize:"Maksimal st\xF8rrelse er {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"For lav opl\xF8sning",imageValidateSizeLabelImageResolutionTooHigh:"For h\xF8j opl\xF8sning",imageValidateSizeLabelExpectedMinResolution:"Minimum opl\xF8sning er {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimal opl\xF8sning er {maxResolution}"};var Fo={labelIdle:'Dateien ablegen oder ausw\xE4hlen ',labelInvalidField:"Feld beinhaltet ung\xFCltige Dateien",labelFileWaitingForSize:"Dateigr\xF6\xDFe berechnen",labelFileSizeNotAvailable:"Dateigr\xF6\xDFe nicht verf\xFCgbar",labelFileLoading:"Laden",labelFileLoadError:"Fehler beim Laden",labelFileProcessing:"Upload l\xE4uft",labelFileProcessingComplete:"Upload abgeschlossen",labelFileProcessingAborted:"Upload abgebrochen",labelFileProcessingError:"Fehler beim Upload",labelFileProcessingRevertError:"Fehler beim Wiederherstellen",labelFileRemoveError:"Fehler beim L\xF6schen",labelTapToCancel:"abbrechen",labelTapToRetry:"erneut versuchen",labelTapToUndo:"r\xFCckg\xE4ngig",labelButtonRemoveItem:"Entfernen",labelButtonAbortItemLoad:"Verwerfen",labelButtonRetryItemLoad:"Erneut versuchen",labelButtonAbortItemProcessing:"Abbrechen",labelButtonUndoItemProcessing:"R\xFCckg\xE4ngig",labelButtonRetryItemProcessing:"Erneut versuchen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Datei ist zu gro\xDF",labelMaxFileSize:"Maximale Dateigr\xF6\xDFe: {filesize}",labelMaxTotalFileSizeExceeded:"Maximale gesamte Dateigr\xF6\xDFe \xFCberschritten",labelMaxTotalFileSize:"Maximale gesamte Dateigr\xF6\xDFe: {filesize}",labelFileTypeNotAllowed:"Dateityp ung\xFCltig",fileValidateTypeLabelExpectedTypes:"Erwartet {allButLastType} oder {lastType}",imageValidateSizeLabelFormatError:"Bildtyp nicht unterst\xFCtzt",imageValidateSizeLabelImageSizeTooSmall:"Bild ist zu klein",imageValidateSizeLabelImageSizeTooBig:"Bild ist zu gro\xDF",imageValidateSizeLabelExpectedMinSize:"Mindestgr\xF6\xDFe: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximale Gr\xF6\xDFe: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Aufl\xF6sung ist zu niedrig",imageValidateSizeLabelImageResolutionTooHigh:"Aufl\xF6sung ist zu hoch",imageValidateSizeLabelExpectedMinResolution:"Mindestaufl\xF6sung: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximale Aufl\xF6sung: {maxResolution}"};var Do={labelIdle:'\u03A3\u03CD\u03C1\u03B5\u03C4\u03B5 \u03C4\u03B1 \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03C3\u03B1\u03C2 \u03C3\u03C4\u03BF \u03C0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF \u03AE \u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 ',labelInvalidField:"\u03A4\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 \u03BC\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B1 \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1",labelFileWaitingForSize:"\u03A3\u03B5 \u03B1\u03BD\u03B1\u03BC\u03BF\u03BD\u03AE \u03B3\u03B9\u03B1 \u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2",labelFileSizeNotAvailable:"\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03BC\u03B7 \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03BF",labelFileLoading:"\u03A6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7 \u03C3\u03B5 \u03B5\u03BE\u03AD\u03BB\u03B9\u03BE\u03B7",labelFileLoadError:"\u03A3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7 \u03C6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7",labelFileProcessing:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1",labelFileProcessingComplete:"\u0397 \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03BF\u03BB\u03BF\u03BA\u03BB\u03B7\u03C1\u03CE\u03B8\u03B7\u03BA\u03B5",labelFileProcessingAborted:"\u0397 \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B1\u03BA\u03C5\u03C1\u03CE\u03B8\u03B7\u03BA\u03B5",labelFileProcessingError:"\u03A3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7\u03BD \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1",labelFileProcessingRevertError:"\u03A3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7\u03BD \u03B5\u03C0\u03B1\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC",labelFileRemoveError:"\u03A3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7\u03BD \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",labelTapToCancel:"\u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B3\u03B9\u03B1 \u03B1\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",labelTapToRetry:"\u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B3\u03B9\u03B1 \u03B5\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",labelTapToUndo:"\u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B3\u03B9\u03B1 \u03B1\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7",labelButtonRemoveItem:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7",labelButtonAbortItemLoad:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",labelButtonRetryItemLoad:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",labelButtonAbortItemProcessing:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",labelButtonUndoItemProcessing:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7",labelButtonRetryItemProcessing:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",labelButtonProcessItem:"\u039C\u03B5\u03C4\u03B1\u03C6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7",labelMaxFileSizeExceeded:"\u03A4\u03BF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF",labelMaxFileSize:"\u03A4\u03BF \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03B5\u03AF\u03BD\u03B1\u03B9 {filesize}",labelMaxTotalFileSizeExceeded:"\u03A5\u03C0\u03AD\u03C1\u03B2\u03B1\u03C3\u03B7 \u03C4\u03BF\u03C5 \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF\u03C5 \u03C3\u03C5\u03BD\u03BF\u03BB\u03B9\u03BA\u03BF\u03CD \u03BC\u03B5\u03B3\u03AD\u03B8\u03BF\u03C5\u03C2",labelMaxTotalFileSize:"\u03A4\u03BF \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF \u03C3\u03C5\u03BD\u03BF\u03BB\u03B9\u03BA\u03CC \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD \u03B5\u03AF\u03BD\u03B1\u03B9 {filesize}",labelFileTypeNotAllowed:"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03C4\u03CD\u03C0\u03BF\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5",fileValidateTypeLabelExpectedTypes:"\u03A4\u03B1 \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03AC \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 {allButLastType} \u03AE {lastType}",imageValidateSizeLabelFormatError:"\u039F \u03C4\u03CD\u03C0\u03BF\u03C2 \u03C4\u03B7\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03B4\u03B5\u03BD \u03C5\u03C0\u03BF\u03C3\u03C4\u03B7\u03C1\u03AF\u03B6\u03B5\u03C4\u03B1\u03B9",imageValidateSizeLabelImageSizeTooSmall:"\u0397 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03AE",imageValidateSizeLabelImageSizeTooBig:"\u0397 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03B7",imageValidateSizeLabelExpectedMinSize:"\u03A4\u03BF \u03B5\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03BF \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03CC \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u03A4\u03BF \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03CC \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0397 \u03B1\u03BD\u03AC\u03BB\u03C5\u03C3\u03B7 \u03C4\u03B7\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03C7\u03B1\u03BC\u03B7\u03BB\u03AE",imageValidateSizeLabelImageResolutionTooHigh:"\u0397 \u03B1\u03BD\u03AC\u03BB\u03C5\u03C3\u03B7 \u03C4\u03B7\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03C5\u03C8\u03B7\u03BB\u03AE",imageValidateSizeLabelExpectedMinResolution:"\u0397 \u03B5\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03B7 \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03AE \u03B1\u03BD\u03AC\u03BB\u03C5\u03C3\u03B7 \u03B5\u03AF\u03BD\u03B1\u03B9 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0397 \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03B7 \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03AE \u03B1\u03BD\u03AC\u03BB\u03C5\u03C3\u03B7 \u03B5\u03AF\u03BD\u03B1\u03B9 {maxResolution}"};var Co={labelIdle:'Drag & Drop your files or Browse ',labelInvalidField:"Field contains invalid files",labelFileWaitingForSize:"Waiting for size",labelFileSizeNotAvailable:"Size not available",labelFileLoading:"Loading",labelFileLoadError:"Error during load",labelFileProcessing:"Uploading",labelFileProcessingComplete:"Upload complete",labelFileProcessingAborted:"Upload cancelled",labelFileProcessingError:"Error during upload",labelFileProcessingRevertError:"Error during revert",labelFileRemoveError:"Error during remove",labelTapToCancel:"tap to cancel",labelTapToRetry:"tap to retry",labelTapToUndo:"tap to undo",labelButtonRemoveItem:"Remove",labelButtonAbortItemLoad:"Abort",labelButtonRetryItemLoad:"Retry",labelButtonAbortItemProcessing:"Cancel",labelButtonUndoItemProcessing:"Undo",labelButtonRetryItemProcessing:"Retry",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"File is too large",labelMaxFileSize:"Maximum file size is {filesize}",labelMaxTotalFileSizeExceeded:"Maximum total size exceeded",labelMaxTotalFileSize:"Maximum total file size is {filesize}",labelFileTypeNotAllowed:"File of invalid type",fileValidateTypeLabelExpectedTypes:"Expects {allButLastType} or {lastType}",imageValidateSizeLabelFormatError:"Image type not supported",imageValidateSizeLabelImageSizeTooSmall:"Image is too small",imageValidateSizeLabelImageSizeTooBig:"Image is too big",imageValidateSizeLabelExpectedMinSize:"Minimum size is {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum size is {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolution is too low",imageValidateSizeLabelImageResolutionTooHigh:"Resolution is too high",imageValidateSizeLabelExpectedMinResolution:"Minimum resolution is {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum resolution is {maxResolution}"};var Bo={labelIdle:'Arrastra y suelta tus archivos o Examina ',labelInvalidField:"El campo contiene archivos inv\xE1lidos",labelFileWaitingForSize:"Esperando tama\xF1o",labelFileSizeNotAvailable:"Tama\xF1o no disponible",labelFileLoading:"Cargando",labelFileLoadError:"Error durante la carga",labelFileProcessing:"Subiendo",labelFileProcessingComplete:"Subida completa",labelFileProcessingAborted:"Subida cancelada",labelFileProcessingError:"Error durante la subida",labelFileProcessingRevertError:"Error durante la reversi\xF3n",labelFileRemoveError:"Error durante la eliminaci\xF3n",labelTapToCancel:"toca para cancelar",labelTapToRetry:"tocar para reintentar",labelTapToUndo:"tocar para deshacer",labelButtonRemoveItem:"Eliminar",labelButtonAbortItemLoad:"Cancelar",labelButtonRetryItemLoad:"Reintentar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Deshacer",labelButtonRetryItemProcessing:"Reintentar",labelButtonProcessItem:"Subir",labelMaxFileSizeExceeded:"El archivo es demasiado grande",labelMaxFileSize:"El tama\xF1o m\xE1ximo del archivo es {filesize}",labelMaxTotalFileSizeExceeded:"Tama\xF1o total m\xE1ximo excedido",labelMaxTotalFileSize:"El tama\xF1o total m\xE1ximo del archivo es {filesize}",labelFileTypeNotAllowed:"Archivo de tipo inv\xE1lido",fileValidateTypeLabelExpectedTypes:"Espera {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagen no soportada",imageValidateSizeLabelImageSizeTooSmall:"La imagen es demasiado peque\xF1a",imageValidateSizeLabelImageSizeTooBig:"La imagen es demasiado grande",imageValidateSizeLabelExpectedMinSize:"El tama\xF1o m\xEDnimo es {minWidth} x {minHeight}",imageValidateSizeLabelExpectedMaxSize:"El tama\xF1o m\xE1ximo es {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La resoluci\xF3n es demasiado baja",imageValidateSizeLabelImageResolutionTooHigh:"La resoluci\xF3n es demasiado alta",imageValidateSizeLabelExpectedMinResolution:"La resoluci\xF3n m\xEDnima es {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La resoluci\xF3n m\xE1xima es {maxResolution}"};var No={labelIdle:'\u0641\u0627\u06CC\u0644 \u0631\u0627 \u0627\u06CC\u0646\u062C\u0627 \u0628\u06A9\u0634\u06CC\u062F \u0648 \u0631\u0647\u0627 \u06A9\u0646\u06CC\u062F\u060C \u06CC\u0627 \u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F ',labelInvalidField:"\u0641\u06CC\u0644\u062F \u062F\u0627\u0631\u0627\u06CC \u0641\u0627\u06CC\u0644 \u0647\u0627\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A",labelFileWaitingForSize:"Waiting for size",labelFileSizeNotAvailable:"\u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0645\u062C\u0627\u0632 \u0646\u06CC\u0633\u062A",labelFileLoading:"\u062F\u0631\u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileLoadError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u0627\u062C\u0631\u0627",labelFileProcessing:"\u062F\u0631\u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileProcessingComplete:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0627\u0645\u0644 \u0634\u062F",labelFileProcessingAborted:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0644\u063A\u0648 \u0634\u062F",labelFileProcessingError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileProcessingRevertError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u062D\u0630\u0641",labelFileRemoveError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u062D\u0630\u0641",labelTapToCancel:"\u0628\u0631\u0627\u06CC \u0644\u063A\u0648 \u0636\u0631\u0628\u0647 \u0628\u0632\u0646\u06CC\u062F",labelTapToRetry:"\u0628\u0631\u0627\u06CC \u062A\u06A9\u0631\u0627\u0631 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",labelTapToUndo:"\u0628\u0631\u0627\u06CC \u0628\u0631\u06AF\u0634\u062A \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",labelButtonRemoveItem:"\u062D\u0630\u0641",labelButtonAbortItemLoad:"\u0644\u063A\u0648",labelButtonRetryItemLoad:"\u062A\u06A9\u0631\u0627\u0631",labelButtonAbortItemProcessing:"\u0644\u063A\u0648",labelButtonUndoItemProcessing:"\u0628\u0631\u06AF\u0634\u062A",labelButtonRetryItemProcessing:"\u062A\u06A9\u0631\u0627\u0631",labelButtonProcessItem:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelMaxFileSizeExceeded:"\u0641\u0627\u06CC\u0644 \u0628\u0633\u06CC\u0627\u0631 \u062D\u062C\u06CC\u0645 \u0627\u0633\u062A",labelMaxFileSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0645\u062C\u0627\u0632 \u0641\u0627\u06CC\u0644 {filesize} \u0627\u0633\u062A",labelMaxTotalFileSizeExceeded:"\u0627\u0632 \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0628\u06CC\u0634\u062A\u0631 \u0634\u062F",labelMaxTotalFileSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 {filesize} \u0627\u0633\u062A",labelFileTypeNotAllowed:"\u0646\u0648\u0639 \u0641\u0627\u06CC\u0644 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A",fileValidateTypeLabelExpectedTypes:"\u062F\u0631 \u0627\u0646\u062A\u0638\u0627\u0631 {allButLastType} \u06CC\u0627 {lastType}",imageValidateSizeLabelFormatError:"\u0641\u0631\u0645\u062A \u062A\u0635\u0648\u06CC\u0631 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0646\u0645\u06CC \u0634\u0648\u062F",imageValidateSizeLabelImageSizeTooSmall:"\u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u06A9\u0648\u0686\u06A9 \u0627\u0633\u062A",imageValidateSizeLabelImageSizeTooBig:"\u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u0628\u0632\u0631\u06AF \u0627\u0633\u062A",imageValidateSizeLabelExpectedMinSize:"\u062D\u062F\u0627\u0642\u0644 \u0627\u0646\u062F\u0627\u0632\u0647 {minWidth} \xD7 {minHeight} \u0627\u0633\u062A",imageValidateSizeLabelExpectedMaxSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0627\u0646\u062F\u0627\u0632\u0647 {maxWidth} \xD7 {maxHeight} \u0627\u0633\u062A",imageValidateSizeLabelImageResolutionTooLow:"\u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u06A9\u0645 \u0627\u0633\u062A",imageValidateSizeLabelImageResolutionTooHigh:"\u0648\u0636\u0648\u0639 \u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u0632\u06CC\u0627\u062F \u0627\u0633\u062A",imageValidateSizeLabelExpectedMinResolution:"\u062D\u062F\u0627\u0642\u0644 \u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 {minResolution} \u0627\u0633\u062A",imageValidateSizeLabelExpectedMaxResolution:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 {maxResolution} \u0627\u0633\u062A"};var ko={labelIdle:'Ved\xE4 ja pudota tiedostoja tai Selaa ',labelInvalidField:"Kent\xE4ss\xE4 on virheellisi\xE4 tiedostoja",labelFileWaitingForSize:"Odotetaan kokoa",labelFileSizeNotAvailable:"Kokoa ei saatavilla",labelFileLoading:"Ladataan",labelFileLoadError:"Virhe latauksessa",labelFileProcessing:"L\xE4hetet\xE4\xE4n",labelFileProcessingComplete:"L\xE4hetys valmis",labelFileProcessingAborted:"L\xE4hetys peruttu",labelFileProcessingError:"Virhe l\xE4hetyksess\xE4",labelFileProcessingRevertError:"Virhe palautuksessa",labelFileRemoveError:"Virhe poistamisessa",labelTapToCancel:"peruuta napauttamalla",labelTapToRetry:"yrit\xE4 uudelleen napauttamalla",labelTapToUndo:"kumoa napauttamalla",labelButtonRemoveItem:"Poista",labelButtonAbortItemLoad:"Keskeyt\xE4",labelButtonRetryItemLoad:"Yrit\xE4 uudelleen",labelButtonAbortItemProcessing:"Peruuta",labelButtonUndoItemProcessing:"Kumoa",labelButtonRetryItemProcessing:"Yrit\xE4 uudelleen",labelButtonProcessItem:"L\xE4het\xE4",labelMaxFileSizeExceeded:"Tiedoston koko on liian suuri",labelMaxFileSize:"Tiedoston maksimikoko on {filesize}",labelMaxTotalFileSizeExceeded:"Tiedostojen yhdistetty maksimikoko ylitetty",labelMaxTotalFileSize:"Tiedostojen yhdistetty maksimikoko on {filesize}",labelFileTypeNotAllowed:"Tiedostotyyppi\xE4 ei sallita",fileValidateTypeLabelExpectedTypes:"Sallitaan {allButLastType} tai {lastType}",imageValidateSizeLabelFormatError:"Kuvatyyppi\xE4 ei tueta",imageValidateSizeLabelImageSizeTooSmall:"Kuva on liian pieni",imageValidateSizeLabelImageSizeTooBig:"Kuva on liian suuri",imageValidateSizeLabelExpectedMinSize:"Minimikoko on {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimikoko on {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resoluutio on liian pieni",imageValidateSizeLabelImageResolutionTooHigh:"Resoluutio on liian suuri",imageValidateSizeLabelExpectedMinResolution:"Minimiresoluutio on {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimiresoluutio on {maxResolution}"};var Vo={labelIdle:'Faites glisser vos fichiers ou Parcourir ',labelInvalidField:"Le champ contient des fichiers invalides",labelFileWaitingForSize:"En attente de taille",labelFileSizeNotAvailable:"Taille non disponible",labelFileLoading:"Chargement",labelFileLoadError:"Erreur durant le chargement",labelFileProcessing:"Traitement",labelFileProcessingComplete:"Traitement effectu\xE9",labelFileProcessingAborted:"Traitement interrompu",labelFileProcessingError:"Erreur durant le traitement",labelFileProcessingRevertError:"Erreur durant la restauration",labelFileRemoveError:"Erreur durant la suppression",labelTapToCancel:"appuyer pour annuler",labelTapToRetry:"appuyer pour r\xE9essayer",labelTapToUndo:"appuyer pour revenir en arri\xE8re",labelButtonRemoveItem:"Retirer",labelButtonAbortItemLoad:"Annuler",labelButtonRetryItemLoad:"Recommencer",labelButtonAbortItemProcessing:"Annuler",labelButtonUndoItemProcessing:"Revenir en arri\xE8re",labelButtonRetryItemProcessing:"Recommencer",labelButtonProcessItem:"Transf\xE9rer",labelMaxFileSizeExceeded:"Le fichier est trop volumineux",labelMaxFileSize:"La taille maximale de fichier est {filesize}",labelMaxTotalFileSizeExceeded:"Taille totale maximale d\xE9pass\xE9e",labelMaxTotalFileSize:"La taille totale maximale des fichiers est {filesize}",labelFileTypeNotAllowed:"Fichier non valide",fileValidateTypeLabelExpectedTypes:"Attendu {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Type d'image non pris en charge",imageValidateSizeLabelImageSizeTooSmall:"L'image est trop petite",imageValidateSizeLabelImageSizeTooBig:"L'image est trop grande",imageValidateSizeLabelExpectedMinSize:"La taille minimale est {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La taille maximale est {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La r\xE9solution est trop faible",imageValidateSizeLabelImageResolutionTooHigh:"La r\xE9solution est trop \xE9lev\xE9e",imageValidateSizeLabelExpectedMinResolution:"La r\xE9solution minimale est {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La r\xE9solution maximale est {maxResolution}"};var Go={labelIdle:'\u05D2\u05E8\u05D5\u05E8 \u05D5\u05E9\u05D7\u05E8\u05E8 \u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05DB\u05D0\u05DF \u05D0\u05D5 \u05DC\u05D7\u05E5 \u05DB\u05D0\u05DF \u05DC\u05D1\u05D7\u05D9\u05E8\u05D4 ',labelInvalidField:"\u05E7\u05D5\u05D1\u05E5 \u05DC\u05D0 \u05D7\u05D5\u05E7\u05D9",labelFileWaitingForSize:"\u05DE\u05D7\u05E9\u05D1 \u05D0\u05EA \u05D2\u05D5\u05D3\u05DC \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileSizeNotAvailable:"\u05DC\u05D0 \u05E0\u05D9\u05EA\u05DF \u05DC\u05E7\u05D1\u05D5\u05E2 \u05D0\u05EA \u05D2\u05D5\u05D3\u05DC \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileLoading:"\u05D8\u05D5\u05E2\u05DF...",labelFileLoadError:"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D0\u05E8\u05E2\u05D4 \u05D1\u05E2\u05EA \u05D8\u05E2\u05D9\u05E0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileProcessing:"\u05DE\u05E2\u05DC\u05D4 \u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileProcessingComplete:"\u05D4\u05E2\u05DC\u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D4\u05E1\u05EA\u05D9\u05D9\u05DE\u05D4",labelFileProcessingAborted:"\u05D4\u05E2\u05DC\u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D1\u05D5\u05D8\u05DC\u05D4",labelFileProcessingError:"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D0\u05E8\u05E2\u05D4 \u05D1\u05E2\u05EA \u05D4\u05E2\u05DC\u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileProcessingRevertError:"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D0\u05E8\u05E2\u05D4 \u05D1\u05E2\u05EA \u05E9\u05D7\u05D6\u05D5\u05E8 \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileRemoveError:"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D0\u05E8\u05E2\u05D4 \u05D1\u05E2\u05EA \u05D4\u05E1\u05E8\u05EA \u05D4\u05E7\u05D5\u05D1\u05E5",labelTapToCancel:"\u05D4\u05E7\u05DC\u05E7 \u05DC\u05D1\u05D9\u05D8\u05D5\u05DC",labelTapToRetry:"\u05D4\u05E7\u05DC\u05E7 \u05DC\u05E0\u05E1\u05D5\u05EA \u05E9\u05E0\u05D9\u05EA",labelTapToUndo:"\u05D4\u05E7\u05DC\u05E7 \u05DC\u05E9\u05D7\u05D6\u05E8",labelButtonRemoveItem:"\u05D4\u05E1\u05E8",labelButtonAbortItemLoad:"\u05D1\u05D8\u05DC",labelButtonRetryItemLoad:"\u05D8\u05E2\u05DF \u05E9\u05E0\u05D9\u05EA",labelButtonAbortItemProcessing:"\u05D1\u05D8\u05DC",labelButtonUndoItemProcessing:"\u05E9\u05D7\u05D6\u05E8",labelButtonRetryItemProcessing:"\u05E0\u05E1\u05D4 \u05E9\u05E0\u05D9\u05EA",labelButtonProcessItem:"\u05D4\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5",labelMaxFileSizeExceeded:"\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",labelMaxFileSize:"\u05D2\u05D5\u05D3\u05DC \u05D4\u05DE\u05D9\u05E8\u05D1\u05D9 \u05D4\u05DE\u05D5\u05EA\u05E8 \u05D4\u05D5\u05D0: {filesize}",labelMaxTotalFileSizeExceeded:"\u05D2\u05D5\u05D3\u05DC \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D7\u05D5\u05E8\u05D2 \u05DE\u05D4\u05DB\u05DE\u05D5\u05EA \u05D4\u05DE\u05D5\u05EA\u05E8\u05EA",labelMaxTotalFileSize:"\u05D4\u05D2\u05D5\u05D3\u05DC \u05D4\u05DE\u05D9\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E1\u05DA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD: {filesize}",labelFileTypeNotAllowed:"\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E1\u05D5\u05D2 \u05D6\u05D4 \u05D0\u05D9\u05E0\u05D5 \u05DE\u05D5\u05EA\u05E8",fileValidateTypeLabelExpectedTypes:"\u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D4\u05DE\u05D5\u05EA\u05E8\u05D9\u05DD \u05D4\u05DD {allButLastType} \u05D0\u05D5 {lastType}",imageValidateSizeLabelFormatError:"\u05EA\u05DE\u05D5\u05E0\u05D4 \u05D1\u05E4\u05D5\u05E8\u05DE\u05D8 \u05D6\u05D4 \u05D0\u05D9\u05E0\u05D4 \u05E0\u05EA\u05DE\u05DB\u05EA",imageValidateSizeLabelImageSizeTooSmall:"\u05EA\u05DE\u05D5\u05E0\u05D4 \u05D6\u05D5 \u05E7\u05D8\u05E0\u05D4 \u05DE\u05D3\u05D9",imageValidateSizeLabelImageSizeTooBig:"\u05EA\u05DE\u05D5\u05E0\u05D4 \u05D6\u05D5 \u05D2\u05D3\u05D5\u05DC\u05D4 \u05DE\u05D3\u05D9",imageValidateSizeLabelExpectedMinSize:"\u05D4\u05D2\u05D5\u05D3\u05DC \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05E4\u05D7\u05D5\u05EA: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u05D4\u05D2\u05D5\u05D3\u05DC \u05D4\u05DE\u05E8\u05D1\u05D9 \u05D4\u05DE\u05D5\u05EA\u05E8: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u05D4\u05E8\u05D6\u05D5\u05DC\u05D5\u05E6\u05D9\u05D4 \u05E9\u05DC \u05EA\u05DE\u05D5\u05E0\u05D4 \u05D6\u05D5 \u05E0\u05DE\u05D5\u05DB\u05D4 \u05DE\u05D3\u05D9",imageValidateSizeLabelImageResolutionTooHigh:"\u05D4\u05E8\u05D6\u05D5\u05DC\u05D5\u05E6\u05D9\u05D4 \u05E9\u05DC \u05EA\u05DE\u05D5\u05E0\u05D4 \u05D6\u05D5 \u05D2\u05D1\u05D5\u05D4\u05D4 \u05DE\u05D3\u05D9",imageValidateSizeLabelExpectedMinResolution:"\u05D4\u05E8\u05D6\u05D5\u05DC\u05D5\u05E6\u05D9\u05D4 \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05E4\u05D7\u05D5\u05EA: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u05D4\u05E8\u05D6\u05D5\u05DC\u05D5\u05E6\u05D9\u05D4 \u05D4\u05DE\u05D9\u05E8\u05D1\u05D9\u05EA \u05D4\u05DE\u05D5\u05EA\u05E8\u05EA \u05D4\u05D9\u05D0: {maxResolution}"};var Uo={labelIdle:'Ovdje "ispusti" datoteku ili Pretra\u017Ei ',labelInvalidField:"Polje sadr\u017Ei neispravne datoteke",labelFileWaitingForSize:"\u010Cekanje na veli\u010Dinu datoteke",labelFileSizeNotAvailable:"Veli\u010Dina datoteke nije dostupna",labelFileLoading:"U\u010Ditavanje",labelFileLoadError:"Gre\u0161ka tijekom u\u010Ditavanja",labelFileProcessing:"Prijenos",labelFileProcessingComplete:"Prijenos zavr\u0161en",labelFileProcessingAborted:"Prijenos otkazan",labelFileProcessingError:"Gre\u0161ka tijekom prijenosa",labelFileProcessingRevertError:"Gre\u0161ka tijekom vra\u0107anja",labelFileRemoveError:"Gre\u0161ka tijekom uklananja datoteke",labelTapToCancel:"Dodirni za prekid",labelTapToRetry:"Dodirni za ponovno",labelTapToUndo:"Dodirni za vra\u0107anje",labelButtonRemoveItem:"Ukloni",labelButtonAbortItemLoad:"Odbaci",labelButtonRetryItemLoad:"Ponovi",labelButtonAbortItemProcessing:"Prekini",labelButtonUndoItemProcessing:"Vrati",labelButtonRetryItemProcessing:"Ponovi",labelButtonProcessItem:"Prijenos",labelMaxFileSizeExceeded:"Datoteka je prevelika",labelMaxFileSize:"Maksimalna veli\u010Dina datoteke je {filesize}",labelMaxTotalFileSizeExceeded:"Maksimalna ukupna veli\u010Dina datoteke prekora\u010Dena",labelMaxTotalFileSize:"Maksimalna ukupna veli\u010Dina datoteke je {filesize}",labelFileTypeNotAllowed:"Tip datoteke nije podr\u017Ean",fileValidateTypeLabelExpectedTypes:"O\u010Dekivan {allButLastType} ili {lastType}",imageValidateSizeLabelFormatError:"Tip slike nije podr\u017Ean",imageValidateSizeLabelImageSizeTooSmall:"Slika je premala",imageValidateSizeLabelImageSizeTooBig:"Slika je prevelika",imageValidateSizeLabelExpectedMinSize:"Minimalna veli\u010Dina je {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimalna veli\u010Dina je {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezolucija je preniska",imageValidateSizeLabelImageResolutionTooHigh:"Rezolucija je previsoka",imageValidateSizeLabelExpectedMinResolution:"Minimalna rezolucija je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimalna rezolucija je {maxResolution}"};var Wo={labelIdle:'Mozgasd ide a f\xE1jlt a felt\xF6lt\xE9shez, vagy tall\xF3z\xE1s ',labelInvalidField:"A mez\u0151 \xE9rv\xE9nytelen f\xE1jlokat tartalmaz",labelFileWaitingForSize:"F\xE1ljm\xE9ret kisz\xE1mol\xE1sa",labelFileSizeNotAvailable:"A f\xE1jlm\xE9ret nem el\xE9rhet\u0151",labelFileLoading:"T\xF6lt\xE9s",labelFileLoadError:"Hiba a bet\xF6lt\xE9s sor\xE1n",labelFileProcessing:"Felt\xF6lt\xE9s",labelFileProcessingComplete:"Sikeres felt\xF6lt\xE9s",labelFileProcessingAborted:"A felt\xF6lt\xE9s megszak\xEDtva",labelFileProcessingError:"Hiba t\xF6rt\xE9nt a felt\xF6lt\xE9s sor\xE1n",labelFileProcessingRevertError:"Hiba a vissza\xE1ll\xEDt\xE1s sor\xE1n",labelFileRemoveError:"Hiba t\xF6rt\xE9nt az elt\xE1vol\xEDt\xE1s sor\xE1n",labelTapToCancel:"koppints a t\xF6rl\xE9shez",labelTapToRetry:"koppints az \xFAjrakezd\xE9shez",labelTapToUndo:"koppints a visszavon\xE1shoz",labelButtonRemoveItem:"Elt\xE1vol\xEDt\xE1s",labelButtonAbortItemLoad:"Megszak\xEDt\xE1s",labelButtonRetryItemLoad:"\xDAjrapr\xF3b\xE1lkoz\xE1s",labelButtonAbortItemProcessing:"Megszak\xEDt\xE1s",labelButtonUndoItemProcessing:"Visszavon\xE1s",labelButtonRetryItemProcessing:"\xDAjrapr\xF3b\xE1lkoz\xE1s",labelButtonProcessItem:"Felt\xF6lt\xE9s",labelMaxFileSizeExceeded:"A f\xE1jl t\xFAll\xE9pte a maxim\xE1lis m\xE9retet",labelMaxFileSize:"Maxim\xE1lis f\xE1jlm\xE9ret: {filesize}",labelMaxTotalFileSizeExceeded:"T\xFAll\xE9pte a maxim\xE1lis teljes m\xE9retet",labelMaxTotalFileSize:"A maxim\xE1is teljes f\xE1jlm\xE9ret: {filesize}",labelFileTypeNotAllowed:"\xC9rv\xE9nytelen t\xEDpus\xFA f\xE1jl",fileValidateTypeLabelExpectedTypes:"Enged\xE9lyezett t\xEDpusok {allButLastType} vagy {lastType}",imageValidateSizeLabelFormatError:"A k\xE9pt\xEDpus nem t\xE1mogatott",imageValidateSizeLabelImageSizeTooSmall:"A k\xE9p t\xFAl kicsi",imageValidateSizeLabelImageSizeTooBig:"A k\xE9p t\xFAl nagy",imageValidateSizeLabelExpectedMinSize:"Minimum m\xE9ret: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum m\xE9ret: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"A felbont\xE1s t\xFAl alacsony",imageValidateSizeLabelImageResolutionTooHigh:"A felbont\xE1s t\xFAl magas",imageValidateSizeLabelExpectedMinResolution:"Minim\xE1is felbont\xE1s: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maxim\xE1lis felbont\xE1s: {maxResolution}"};var Ho={labelIdle:'Seret & Jatuhkan berkas Anda atau Jelajahi',labelInvalidField:"Isian berisi berkas yang tidak valid",labelFileWaitingForSize:"Menunggu ukuran berkas",labelFileSizeNotAvailable:"Ukuran berkas tidak tersedia",labelFileLoading:"Memuat",labelFileLoadError:"Kesalahan saat memuat",labelFileProcessing:"Mengunggah",labelFileProcessingComplete:"Pengunggahan selesai",labelFileProcessingAborted:"Pengunggahan dibatalkan",labelFileProcessingError:"Kesalahan saat pengunggahan",labelFileProcessingRevertError:"Kesalahan saat pemulihan",labelFileRemoveError:"Kesalahan saat penghapusan",labelTapToCancel:"ketuk untuk membatalkan",labelTapToRetry:"ketuk untuk mencoba lagi",labelTapToUndo:"ketuk untuk mengurungkan",labelButtonRemoveItem:"Hapus",labelButtonAbortItemLoad:"Batalkan",labelButtonRetryItemLoad:"Coba Kembali",labelButtonAbortItemProcessing:"Batalkan",labelButtonUndoItemProcessing:"Urungkan",labelButtonRetryItemProcessing:"Coba Kembali",labelButtonProcessItem:"Unggah",labelMaxFileSizeExceeded:"Berkas terlalu besar",labelMaxFileSize:"Ukuran berkas maksimum adalah {filesize}",labelMaxTotalFileSizeExceeded:"Jumlah berkas maksimum terlampaui",labelMaxTotalFileSize:"Jumlah berkas maksimum adalah {filesize}",labelFileTypeNotAllowed:"Jenis berkas tidak valid",fileValidateTypeLabelExpectedTypes:"Mengharapkan {allButLastType} atau {lastType}",imageValidateSizeLabelFormatError:"Jenis citra tidak didukung",imageValidateSizeLabelImageSizeTooSmall:"Citra terlalu kecil",imageValidateSizeLabelImageSizeTooBig:"Citra terlalu besar",imageValidateSizeLabelExpectedMinSize:"Ukuran minimum adalah {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Ukuran maksimum adalah {minWidth} \xD7 {minHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolusi terlalu rendah",imageValidateSizeLabelImageResolutionTooHigh:"Resolusi terlalu tinggi",imageValidateSizeLabelExpectedMinResolution:"Resolusi minimum adalah {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolusi maksimum adalah {maxResolution}"};var jo={labelIdle:'Trascina e rilascia i tuoi file oppure Carica ',labelInvalidField:"Il campo contiene dei file non validi",labelFileWaitingForSize:"Aspettando le dimensioni",labelFileSizeNotAvailable:"Dimensioni non disponibili",labelFileLoading:"Caricamento",labelFileLoadError:"Errore durante il caricamento",labelFileProcessing:"Caricamento",labelFileProcessingComplete:"Caricamento completato",labelFileProcessingAborted:"Caricamento cancellato",labelFileProcessingError:"Errore durante il caricamento",labelFileProcessingRevertError:"Errore durante il ripristino",labelFileRemoveError:"Errore durante l'eliminazione",labelTapToCancel:"tocca per cancellare",labelTapToRetry:"tocca per riprovare",labelTapToUndo:"tocca per ripristinare",labelButtonRemoveItem:"Elimina",labelButtonAbortItemLoad:"Cancella",labelButtonRetryItemLoad:"Ritenta",labelButtonAbortItemProcessing:"Camcella",labelButtonUndoItemProcessing:"Indietro",labelButtonRetryItemProcessing:"Ritenta",labelButtonProcessItem:"Carica",labelMaxFileSizeExceeded:"Il peso del file \xE8 eccessivo",labelMaxFileSize:"Il peso massimo del file \xE8 {filesize}",labelMaxTotalFileSizeExceeded:"Dimensione totale massima superata",labelMaxTotalFileSize:"La dimensione massima totale del file \xE8 {filesize}",labelFileTypeNotAllowed:"File non supportato",fileValidateTypeLabelExpectedTypes:"Aspetta {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipo di immagine non compatibile",imageValidateSizeLabelImageSizeTooSmall:"L'immagine \xE8 troppo piccola",imageValidateSizeLabelImageSizeTooBig:"L'immagine \xE8 troppo grande",imageValidateSizeLabelExpectedMinSize:"La dimensione minima \xE8 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La dimensione massima \xE8 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La risoluzione \xE8 troppo bassa",imageValidateSizeLabelImageResolutionTooHigh:"La risoluzione \xE8 troppo alta",imageValidateSizeLabelExpectedMinResolution:"La risoluzione minima \xE8 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La risoluzione massima \xE8 {maxResolution}"};var Yo={labelIdle:'\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30E9\u30C3\u30B0&\u30C9\u30ED\u30C3\u30D7\u53C8\u306F\u30D5\u30A1\u30A4\u30EB\u9078\u629E',labelInvalidField:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059",labelFileWaitingForSize:"\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u3092\u5F85\u3063\u3066\u3044\u307E\u3059",labelFileSizeNotAvailable:"\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u307F\u3064\u304B\u308A\u307E\u305B\u3093",labelFileLoading:"\u8AAD\u8FBC\u4E2D...",labelFileLoadError:"\u8AAD\u8FBC\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F",labelFileProcessing:"\u8AAD\u8FBC\u4E2D...",labelFileProcessingComplete:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5B8C\u4E86",labelFileProcessingAborted:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u304C\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F",labelFileProcessingError:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F",labelFileProcessingRevertError:"\u30ED\u30FC\u30EB\u30D0\u30C3\u30AF\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F",labelFileRemoveError:"\u524A\u9664\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F",labelTapToCancel:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30AD\u30E3\u30F3\u30BB\u30EB",labelTapToRetry:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u4E0B\u3055\u3044",labelTapToUndo:"\u5143\u306B\u623B\u3059\u306B\u306F\u30BF\u30C3\u30D7\u3057\u307E\u3059",labelButtonRemoveItem:"\u524A\u9664",labelButtonAbortItemLoad:"\u4E2D\u65AD",labelButtonRetryItemLoad:"\u3082\u3046\u4E00\u5EA6\u5B9F\u884C",labelButtonAbortItemProcessing:"\u30AD\u30E3\u30F3\u30BB\u30EB",labelButtonUndoItemProcessing:"\u5143\u306B\u623B\u3059",labelButtonRetryItemProcessing:"\u3082\u3046\u4E00\u5EA6\u5B9F\u884C",labelButtonProcessItem:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",labelMaxFileSizeExceeded:"\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u5927\u304D\u3059\u304E\u307E\u3059",labelMaxFileSize:"\u6700\u5927\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u306F {filesize} \u3067\u3059",labelMaxTotalFileSizeExceeded:"\u6700\u5927\u5408\u8A08\u30B5\u30A4\u30BA\u3092\u8D85\u3048\u307E\u3057\u305F",labelMaxTotalFileSize:"\u6700\u5927\u5408\u8A08\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u306F {filesize} \u3067\u3059",labelFileTypeNotAllowed:"\u7121\u52B9\u306A\u30D5\u30A1\u30A4\u30EB\u3067\u3059",fileValidateTypeLabelExpectedTypes:"\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u308B\u30D5\u30A1\u30A4\u30EB\u306F {allButLastType} \u53C8\u306F {lastType} \u3067\u3059",imageValidateSizeLabelFormatError:"\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u306A\u3044\u753B\u50CF\u3067\u3059",imageValidateSizeLabelImageSizeTooSmall:"\u753B\u50CF\u304C\u5C0F\u3055\u3059\u304E\u307E\u3059",imageValidateSizeLabelImageSizeTooBig:"\u753B\u50CF\u304C\u5927\u304D\u3059\u304E\u307E\u3059",imageValidateSizeLabelExpectedMinSize:"\u753B\u50CF\u306E\u6700\u5C0F\u30B5\u30A4\u30BA\u306F{minWidth}\xD7{minHeight}\u3067\u3059",imageValidateSizeLabelExpectedMaxSize:"\u753B\u50CF\u306E\u6700\u5927\u30B5\u30A4\u30BA\u306F{maxWidth} \xD7 {maxHeight}\u3067\u3059",imageValidateSizeLabelImageResolutionTooLow:"\u753B\u50CF\u306E\u89E3\u50CF\u5EA6\u304C\u4F4E\u3059\u304E\u307E\u3059",imageValidateSizeLabelImageResolutionTooHigh:"\u753B\u50CF\u306E\u89E3\u50CF\u5EA6\u304C\u9AD8\u3059\u304E\u307E\u3059",imageValidateSizeLabelExpectedMinResolution:"\u753B\u50CF\u306E\u6700\u5C0F\u89E3\u50CF\u5EA6\u306F{minResolution}\u3067\u3059",imageValidateSizeLabelExpectedMaxResolution:"\u753B\u50CF\u306E\u6700\u5927\u89E3\u50CF\u5EA6\u306F{maxResolution}\u3067\u3059"};var qo={labelIdle:'\u1791\u17B6\u1789&\u178A\u17B6\u1780\u17CB\u17A0\u17D2\u179C\u17B6\u179B\u17CB\u17AF\u1780\u179F\u17B6\u179A\u179A\u1794\u179F\u17CB\u17A2\u17D2\u1793\u1780 \u17AC \u179F\u17D2\u179C\u17C2\u1784\u179A\u1780 ',labelInvalidField:"\u1785\u1793\u17D2\u179B\u17C4\u17C7\u1798\u17B6\u1793\u17AF\u1780\u179F\u17B6\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",labelFileWaitingForSize:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u1784\u17CB\u1785\u17B6\u17C6\u1791\u17C6\u17A0\u17C6",labelFileSizeNotAvailable:"\u1791\u17C6\u17A0\u17C6\u1798\u17B7\u1793\u17A2\u17B6\u1785\u1794\u17D2\u179A\u17BE\u1794\u17B6\u1793",labelFileLoading:"\u1780\u17C6\u1796\u17BB\u1784\u178A\u17C6\u178E\u17BE\u179A\u1780\u17B6\u179A",labelFileLoadError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178A\u17C6\u178E\u17BE\u179A\u1780\u17B6\u179A",labelFileProcessing:"\u1780\u17C6\u1796\u17BB\u1784\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelFileProcessingComplete:"\u1780\u17B6\u179A\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784\u1796\u17C1\u1789\u179B\u17C1\u1789",labelFileProcessingAborted:"\u1780\u17B6\u179A\u1794\u1784\u17D2\u17A0\u17C4\u17C7\u178F\u17D2\u179A\u17BC\u179C\u1794\u17B6\u1793\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelFileProcessingError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u1780\u17C6\u1796\u17BB\u1784\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelFileProcessingRevertError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178F\u17D2\u179A\u17A1\u1794\u17CB",labelFileRemoveError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178A\u1780\u1785\u17C1\u1789",labelTapToCancel:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelTapToRetry:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelTapToUndo:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1798\u17B7\u1793\u1792\u17D2\u179C\u17BE\u179C\u17B7\u1789",labelButtonRemoveItem:"\u1799\u1780\u1785\u17C1\u1789",labelButtonAbortItemLoad:"\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelButtonRetryItemLoad:"\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelButtonAbortItemProcessing:"\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelButtonUndoItemProcessing:"\u1798\u17B7\u1793\u1792\u17D2\u179C\u17BE\u179C\u17B7\u1789",labelButtonRetryItemProcessing:"\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelButtonProcessItem:"\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelMaxFileSizeExceeded:"\u17AF\u1780\u179F\u17B6\u179A\u1792\u17C6\u1796\u17C1\u1780",labelMaxFileSize:"\u1791\u17C6\u17A0\u17C6\u17AF\u1780\u179F\u17B6\u179A\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {filesize}",labelMaxTotalFileSizeExceeded:"\u179B\u17BE\u179F\u1791\u17C6\u17A0\u17C6\u179F\u179A\u17BB\u1794\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6",labelMaxTotalFileSize:"\u1791\u17C6\u17A0\u17C6\u17AF\u1780\u179F\u17B6\u179A\u179F\u179A\u17BB\u1794\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {filesize}",labelFileTypeNotAllowed:"\u1794\u17D2\u179A\u1797\u17C1\u1791\u17AF\u1780\u179F\u17B6\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",fileValidateTypeLabelExpectedTypes:"\u179A\u17C6\u1796\u17B9\u1784\u1790\u17B6 {allButLastType} \u17AC {lastType}",imageValidateSizeLabelFormatError:"\u1794\u17D2\u179A\u1797\u17C1\u1791\u179A\u17BC\u1794\u1797\u17B6\u1796\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",imageValidateSizeLabelImageSizeTooSmall:"\u179A\u17BC\u1794\u1797\u17B6\u1796\u178F\u17BC\u1785\u1796\u17C1\u1780",imageValidateSizeLabelImageSizeTooBig:"\u179A\u17BC\u1794\u1797\u17B6\u1796\u1792\u17C6\u1796\u17C1\u1780",imageValidateSizeLabelExpectedMinSize:"\u1791\u17C6\u17A0\u17C6\u17A2\u1794\u17D2\u1794\u1794\u179A\u1798\u17B6\u1782\u17BA {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u1791\u17C6\u17A0\u17C6\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u1791\u17B6\u1794\u1796\u17C1\u1780",imageValidateSizeLabelImageResolutionTooHigh:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u1781\u17D2\u1796\u179F\u17CB\u1796\u17C1\u1780",imageValidateSizeLabelExpectedMinResolution:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u17A2\u1794\u17D2\u1794\u1794\u179A\u1798\u17B6\u1782\u17BA {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {maxResolution}"};var $o={labelIdle:'\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8 \uD558\uAC70\uB098 \uCC3E\uC544\uBCF4\uAE30 ',labelInvalidField:"\uD544\uB4DC\uC5D0 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 \uD30C\uC77C\uC774 \uC788\uC2B5\uB2C8\uB2E4.",labelFileWaitingForSize:"\uC6A9\uB7C9 \uD655\uC778\uC911",labelFileSizeNotAvailable:"\uC0AC\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC6A9\uB7C9",labelFileLoading:"\uBD88\uB7EC\uC624\uB294 \uC911",labelFileLoadError:"\uD30C\uC77C \uBD88\uB7EC\uC624\uAE30 \uC2E4\uD328",labelFileProcessing:"\uC5C5\uB85C\uB4DC \uC911",labelFileProcessingComplete:"\uC5C5\uB85C\uB4DC \uC131\uACF5",labelFileProcessingAborted:"\uC5C5\uB85C\uB4DC \uCDE8\uC18C\uB428",labelFileProcessingError:"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328",labelFileProcessingRevertError:"\uB418\uB3CC\uB9AC\uAE30 \uC2E4\uD328",labelFileRemoveError:"\uC81C\uAC70 \uC2E4\uD328",labelTapToCancel:"\uD0ED\uD558\uC5EC \uCDE8\uC18C",labelTapToRetry:"\uD0ED\uD558\uC5EC \uC7AC\uC2DC\uC791",labelTapToUndo:"\uD0ED\uD558\uC5EC \uC2E4\uD589 \uCDE8\uC18C",labelButtonRemoveItem:"\uC81C\uAC70",labelButtonAbortItemLoad:"\uC911\uB2E8",labelButtonRetryItemLoad:"\uC7AC\uC2DC\uC791",labelButtonAbortItemProcessing:"\uCDE8\uC18C",labelButtonUndoItemProcessing:"\uC2E4\uD589 \uCDE8\uC18C",labelButtonRetryItemProcessing:"\uC7AC\uC2DC\uC791",labelButtonProcessItem:"\uC5C5\uB85C\uB4DC",labelMaxFileSizeExceeded:"\uD30C\uC77C\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4.",labelMaxFileSize:"\uCD5C\uB300 \uD30C\uC77C \uC6A9\uB7C9\uC740 {filesize} \uC785\uB2C8\uB2E4.",labelMaxTotalFileSizeExceeded:"\uCD5C\uB300 \uC804\uCCB4 \uD30C\uC77C \uC6A9\uB7C9 \uCD08\uACFC\uD558\uC600\uC2B5\uB2C8\uB2E4.",labelMaxTotalFileSize:"\uCD5C\uB300 \uC804\uCCB4 \uD30C\uC77C \uC6A9\uB7C9\uC740 {filesize} \uC785\uB2C8\uB2E4.",labelFileTypeNotAllowed:"\uC798\uBABB\uB41C \uD615\uC2DD\uC758 \uD30C\uC77C",fileValidateTypeLabelExpectedTypes:"{allButLastType} \uB610\uB294 {lastType}",imageValidateSizeLabelFormatError:"\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uC720\uD615",imageValidateSizeLabelImageSizeTooSmall:"\uC774\uBBF8\uC9C0\uAC00 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4.",imageValidateSizeLabelImageSizeTooBig:"\uC774\uBBF8\uC9C0\uAC00 \uB108\uBB34 \uD07D\uB2C8\uB2E4.",imageValidateSizeLabelExpectedMinSize:"\uC774\uBBF8\uC9C0 \uCD5C\uC18C \uD06C\uAE30\uB294 {minWidth} \xD7 {minHeight} \uC785\uB2C8\uB2E4",imageValidateSizeLabelExpectedMaxSize:"\uC774\uBBF8\uC9C0 \uCD5C\uB300 \uD06C\uAE30\uB294 {maxWidth} \xD7 {maxHeight} \uC785\uB2C8\uB2E4",imageValidateSizeLabelImageResolutionTooLow:"\uD574\uC0C1\uB3C4\uAC00 \uB108\uBB34 \uB0AE\uC2B5\uB2C8\uB2E4.",imageValidateSizeLabelImageResolutionTooHigh:"\uD574\uC0C1\uB3C4\uAC00 \uB108\uBB34 \uB192\uC2B5\uB2C8\uB2E4.",imageValidateSizeLabelExpectedMinResolution:"\uCD5C\uC18C \uD574\uC0C1\uB3C4\uB294 {minResolution} \uC785\uB2C8\uB2E4.",imageValidateSizeLabelExpectedMaxResolution:"\uCD5C\uB300 \uD574\uC0C1\uB3C4\uB294 {maxResolution} \uC785\uB2C8\uB2E4."};var Xo={labelIdle:'\u012Ed\u0117kite failus \u010Dia arba Ie\u0161kokite ',labelInvalidField:"Laukelis talpina netinkamus failus",labelFileWaitingForSize:"Laukiama dyd\u017Eio",labelFileSizeNotAvailable:"Dydis ne\u017Einomas",labelFileLoading:"Kraunama",labelFileLoadError:"Klaida \u012Fkeliant",labelFileProcessing:"\u012Ekeliama",labelFileProcessingComplete:"\u012Ek\u0117limas s\u0117kmingas",labelFileProcessingAborted:"\u012Ek\u0117limas at\u0161auktas",labelFileProcessingError:"\u012Ekeliant \u012Fvyko klaida",labelFileProcessingRevertError:"At\u0161aukiant \u012Fvyko klaida",labelFileRemoveError:"I\u0161trinant \u012Fvyko klaida",labelTapToCancel:"Palieskite nor\u0117dami at\u0161aukti",labelTapToRetry:"Palieskite nor\u0117dami pakartoti",labelTapToUndo:"Palieskite nor\u0117dami at\u0161aukti",labelButtonRemoveItem:"I\u0161trinti",labelButtonAbortItemLoad:"Sustabdyti",labelButtonRetryItemLoad:"Pakartoti",labelButtonAbortItemProcessing:"At\u0161aukti",labelButtonUndoItemProcessing:"At\u0161aukti",labelButtonRetryItemProcessing:"Pakartoti",labelButtonProcessItem:"\u012Ekelti",labelMaxFileSizeExceeded:"Failas per didelis",labelMaxFileSize:"Maksimalus failo dydis yra {filesize}",labelMaxTotalFileSizeExceeded:"Vir\u0161ijote maksimal\u0173 leistin\u0105 dyd\u012F",labelMaxTotalFileSize:"Maksimalus leistinas dydis yra {filesize}",labelFileTypeNotAllowed:"Netinkamas failas",fileValidateTypeLabelExpectedTypes:"Tikisi {allButLastType} arba {lastType}",imageValidateSizeLabelFormatError:"Nuotraukos formatas nepalaikomas",imageValidateSizeLabelImageSizeTooSmall:"Nuotrauka per ma\u017Ea",imageValidateSizeLabelImageSizeTooBig:"Nuotrauka per didel\u0117",imageValidateSizeLabelExpectedMinSize:"Minimalus dydis yra {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimalus dydis yra {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezoliucija per ma\u017Ea",imageValidateSizeLabelImageResolutionTooHigh:"Rezoliucija per didel\u0117",imageValidateSizeLabelExpectedMinResolution:"Minimali rezoliucija yra {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimali rezoliucija yra {maxResolution}"};var Ko={labelIdle:'Ievelciet savus failus vai p\u0101rl\u016Bkojiet \u0161eit ',labelInvalidField:"Lauks satur neder\u012Bgus failus",labelFileWaitingForSize:"Gaid\u0101m faila izm\u0113ru",labelFileSizeNotAvailable:"Izm\u0113rs nav pieejams",labelFileLoading:"Notiek iel\u0101de",labelFileLoadError:"Notika k\u013C\u016Bda iel\u0101des laik\u0101",labelFileProcessing:"Notiek aug\u0161upiel\u0101de",labelFileProcessingComplete:"Aug\u0161upiel\u0101de pabeigta",labelFileProcessingAborted:"Aug\u0161upiel\u0101de atcelta",labelFileProcessingError:"Notika k\u013C\u016Bda aug\u0161upiel\u0101des laik\u0101",labelFileProcessingRevertError:"Notika k\u013C\u016Bda atgrie\u0161anas laik\u0101",labelFileRemoveError:"Notika k\u013C\u016Bda dz\u0113\u0161anas laik\u0101",labelTapToCancel:"pieskarieties, lai atceltu",labelTapToRetry:"pieskarieties, lai m\u0113\u0123in\u0101tu v\u0113lreiz",labelTapToUndo:"pieskarieties, lai atsauktu",labelButtonRemoveItem:"Dz\u0113st",labelButtonAbortItemLoad:"P\u0101rtraukt",labelButtonRetryItemLoad:"M\u0113\u0123in\u0101t v\u0113lreiz",labelButtonAbortItemProcessing:"P\u0101rtraucam",labelButtonUndoItemProcessing:"Atsaucam",labelButtonRetryItemProcessing:"M\u0113\u0123in\u0101m v\u0113lreiz",labelButtonProcessItem:"Aug\u0161upiel\u0101d\u0113t",labelMaxFileSizeExceeded:"Fails ir p\u0101r\u0101k liels",labelMaxFileSize:"Maksim\u0101lais faila izm\u0113rs ir {filesize}",labelMaxTotalFileSizeExceeded:"P\u0101rsniegts maksim\u0101lais kop\u0113jais failu izm\u0113rs",labelMaxTotalFileSize:"Maksim\u0101lais kop\u0113jais failu izm\u0113rs ir {filesize}",labelFileTypeNotAllowed:"Neder\u012Bgs faila tips",fileValidateTypeLabelExpectedTypes:"Sagaid\u0101m {allButLastType} vai {lastType}",imageValidateSizeLabelFormatError:"Neatbilsto\u0161s att\u0113la tips",imageValidateSizeLabelImageSizeTooSmall:"Att\u0113ls ir p\u0101r\u0101k mazs",imageValidateSizeLabelImageSizeTooBig:"Att\u0113ls ir p\u0101r\u0101k liels",imageValidateSizeLabelExpectedMinSize:"Minim\u0101lais izm\u0113rs ir {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksim\u0101lais izm\u0113rs ir {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Iz\u0161\u0137irtsp\u0113ja ir p\u0101r\u0101k zema",imageValidateSizeLabelImageResolutionTooHigh:"Iz\u0161\u0137irtsp\u0113ja ir p\u0101r\u0101k augsta",imageValidateSizeLabelExpectedMinResolution:"Minim\u0101l\u0101 iz\u0161\u0137irtsp\u0113ja ir {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksim\u0101l\u0101 iz\u0161\u0137irtsp\u0113ja ir {maxResolution}"};var Qo={labelIdle:'Drag & Drop je bestanden of Bladeren ',labelInvalidField:"Veld bevat ongeldige bestanden",labelFileWaitingForSize:"Wachten op grootte",labelFileSizeNotAvailable:"Grootte niet beschikbaar",labelFileLoading:"Laden",labelFileLoadError:"Fout tijdens laden",labelFileProcessing:"Uploaden",labelFileProcessingComplete:"Upload afgerond",labelFileProcessingAborted:"Upload geannuleerd",labelFileProcessingError:"Fout tijdens upload",labelFileProcessingRevertError:"Fout bij herstellen",labelFileRemoveError:"Fout bij verwijderen",labelTapToCancel:"tik om te annuleren",labelTapToRetry:"tik om opnieuw te proberen",labelTapToUndo:"tik om ongedaan te maken",labelButtonRemoveItem:"Verwijderen",labelButtonAbortItemLoad:"Afbreken",labelButtonRetryItemLoad:"Opnieuw proberen",labelButtonAbortItemProcessing:"Annuleren",labelButtonUndoItemProcessing:"Ongedaan maken",labelButtonRetryItemProcessing:"Opnieuw proberen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Bestand is te groot",labelMaxFileSize:"Maximale bestandsgrootte is {filesize}",labelMaxTotalFileSizeExceeded:"Maximale totale grootte overschreden",labelMaxTotalFileSize:"Maximale totale bestandsgrootte is {filesize}",labelFileTypeNotAllowed:"Ongeldig bestandstype",fileValidateTypeLabelExpectedTypes:"Verwacht {allButLastType} of {lastType}",imageValidateSizeLabelFormatError:"Afbeeldingstype niet ondersteund",imageValidateSizeLabelImageSizeTooSmall:"Afbeelding is te klein",imageValidateSizeLabelImageSizeTooBig:"Afbeelding is te groot",imageValidateSizeLabelExpectedMinSize:"Minimale afmeting is {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximale afmeting is {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolutie is te laag",imageValidateSizeLabelImageResolutionTooHigh:"Resolution is too high",imageValidateSizeLabelExpectedMinResolution:"Minimale resolutie is {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximale resolutie is {maxResolution}"};var Zo={labelIdle:'Dra og slipp filene dine, eller Bla gjennom... ',labelInvalidField:"Feltet inneholder ugyldige filer",labelFileWaitingForSize:"Venter p\xE5 st\xF8rrelse",labelFileSizeNotAvailable:"St\xF8rrelse ikke tilgjengelig",labelFileLoading:"Laster",labelFileLoadError:"Feil under lasting",labelFileProcessing:"Laster opp",labelFileProcessingComplete:"Opplasting ferdig",labelFileProcessingAborted:"Opplasting avbrutt",labelFileProcessingError:"Feil under opplasting",labelFileProcessingRevertError:"Feil under reversering",labelFileRemoveError:"Feil under flytting",labelTapToCancel:"klikk for \xE5 avbryte",labelTapToRetry:"klikk for \xE5 pr\xF8ve p\xE5 nytt",labelTapToUndo:"klikk for \xE5 angre",labelButtonRemoveItem:"Fjern",labelButtonAbortItemLoad:"Avbryt",labelButtonRetryItemLoad:"Pr\xF8v p\xE5 nytt",labelButtonAbortItemProcessing:"Avbryt",labelButtonUndoItemProcessing:"Angre",labelButtonRetryItemProcessing:"Pr\xF8v p\xE5 nytt",labelButtonProcessItem:"Last opp",labelMaxFileSizeExceeded:"Filen er for stor",labelMaxFileSize:"Maksimal filst\xF8rrelse er {filesize}",labelMaxTotalFileSizeExceeded:"Maksimal total st\xF8rrelse oversteget",labelMaxTotalFileSize:"Maksimal total st\xF8rrelse er {filesize}",labelFileTypeNotAllowed:"Ugyldig filtype",fileValidateTypeLabelExpectedTypes:"Forventer {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Bildeformat ikke st\xF8ttet",imageValidateSizeLabelImageSizeTooSmall:"Bildet er for lite",imageValidateSizeLabelImageSizeTooBig:"Bildet er for stort",imageValidateSizeLabelExpectedMinSize:"Minimumsst\xF8rrelse er {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimumsst\xF8rrelse er {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Oppl\xF8sningen er for lav",imageValidateSizeLabelImageResolutionTooHigh:"Oppl\xF8sningen er for h\xF8y",imageValidateSizeLabelExpectedMinResolution:"Minimum oppl\xF8sning er {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimal oppl\xF8sning er {maxResolution}"};var Jo={labelIdle:'Przeci\u0105gnij i upu\u015B\u0107 lub wybierz pliki',labelInvalidField:"Nieprawid\u0142owe pliki",labelFileWaitingForSize:"Pobieranie rozmiaru",labelFileSizeNotAvailable:"Nieznany rozmiar",labelFileLoading:"Wczytywanie",labelFileLoadError:"B\u0142\u0105d wczytywania",labelFileProcessing:"Przesy\u0142anie",labelFileProcessingComplete:"Przes\u0142ano",labelFileProcessingAborted:"Przerwano",labelFileProcessingError:"Przesy\u0142anie nie powiod\u0142o si\u0119",labelFileProcessingRevertError:"Co\u015B posz\u0142o nie tak",labelFileRemoveError:"Nieudane usuni\u0119cie",labelTapToCancel:"Anuluj",labelTapToRetry:"Pon\xF3w",labelTapToUndo:"Cofnij",labelButtonRemoveItem:"Usu\u0144",labelButtonAbortItemLoad:"Przerwij",labelButtonRetryItemLoad:"Pon\xF3w",labelButtonAbortItemProcessing:"Anuluj",labelButtonUndoItemProcessing:"Cofnij",labelButtonRetryItemProcessing:"Pon\xF3w",labelButtonProcessItem:"Prze\u015Blij",labelMaxFileSizeExceeded:"Plik jest zbyt du\u017Cy",labelMaxFileSize:"Dopuszczalna wielko\u015B\u0107 pliku to {filesize}",labelMaxTotalFileSizeExceeded:"Przekroczono \u0142\u0105czny rozmiar plik\xF3w",labelMaxTotalFileSize:"\u0141\u0105czny rozmiar plik\xF3w nie mo\u017Ce przekroczy\u0107 {filesize}",labelFileTypeNotAllowed:"Niedozwolony rodzaj pliku",fileValidateTypeLabelExpectedTypes:"Oczekiwano {allButLastType} lub {lastType}",imageValidateSizeLabelFormatError:"Nieobs\u0142ugiwany format obrazu",imageValidateSizeLabelImageSizeTooSmall:"Obraz jest zbyt ma\u0142y",imageValidateSizeLabelImageSizeTooBig:"Obraz jest zbyt du\u017Cy",imageValidateSizeLabelExpectedMinSize:"Minimalne wymiary obrazu to {minWidth}\xD7{minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksymalna wymiary obrazu to {maxWidth}\xD7{maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozdzielczo\u015B\u0107 jest zbyt niska",imageValidateSizeLabelImageResolutionTooHigh:"Rozdzielczo\u015B\u0107 jest zbyt wysoka",imageValidateSizeLabelExpectedMinResolution:"Minimalna rozdzielczo\u015B\u0107 to {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksymalna rozdzielczo\u015B\u0107 to {maxResolution}"};var _i={labelIdle:'Arraste e solte os arquivos ou Clique aqui ',labelInvalidField:"Arquivos inv\xE1lidos",labelFileWaitingForSize:"Calculando o tamanho do arquivo",labelFileSizeNotAvailable:"Tamanho do arquivo indispon\xEDvel",labelFileLoading:"Carregando",labelFileLoadError:"Erro durante o carregamento",labelFileProcessing:"Enviando",labelFileProcessingComplete:"Envio finalizado",labelFileProcessingAborted:"Envio cancelado",labelFileProcessingError:"Erro durante o envio",labelFileProcessingRevertError:"Erro ao reverter o envio",labelFileRemoveError:"Erro ao remover o arquivo",labelTapToCancel:"clique para cancelar",labelTapToRetry:"clique para reenviar",labelTapToUndo:"clique para desfazer",labelButtonRemoveItem:"Remover",labelButtonAbortItemLoad:"Abortar",labelButtonRetryItemLoad:"Reenviar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Desfazer",labelButtonRetryItemProcessing:"Reenviar",labelButtonProcessItem:"Enviar",labelMaxFileSizeExceeded:"Arquivo \xE9 muito grande",labelMaxFileSize:"O tamanho m\xE1ximo permitido: {filesize}",labelMaxTotalFileSizeExceeded:"Tamanho total dos arquivos excedido",labelMaxTotalFileSize:"Tamanho total permitido: {filesize}",labelFileTypeNotAllowed:"Tipo de arquivo inv\xE1lido",fileValidateTypeLabelExpectedTypes:"Tipos de arquivo suportados s\xE3o {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagem inv\xE1lida",imageValidateSizeLabelImageSizeTooSmall:"Imagem muito pequena",imageValidateSizeLabelImageSizeTooBig:"Imagem muito grande",imageValidateSizeLabelExpectedMinSize:"Tamanho m\xEDnimo permitida: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Tamanho m\xE1ximo permitido: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolu\xE7\xE3o muito baixa",imageValidateSizeLabelImageResolutionTooHigh:"Resolu\xE7\xE3o muito alta",imageValidateSizeLabelExpectedMinResolution:"Resolu\xE7\xE3o m\xEDnima permitida: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolu\xE7\xE3o m\xE1xima permitida: {maxResolution}"};var er={labelIdle:'Trage \u0219i plaseaz\u0103 fi\u0219iere sau Caut\u0103-le ',labelInvalidField:"C\xE2mpul con\u021Bine fi\u0219iere care nu sunt valide",labelFileWaitingForSize:"\xCEn a\u0219teptarea dimensiunii",labelFileSizeNotAvailable:"Dimensiunea nu este diponibil\u0103",labelFileLoading:"Se \xEEncarc\u0103",labelFileLoadError:"Eroare la \xEEnc\u0103rcare",labelFileProcessing:"Se \xEEncarc\u0103",labelFileProcessingComplete:"\xCEnc\u0103rcare finalizat\u0103",labelFileProcessingAborted:"\xCEnc\u0103rcare anulat\u0103",labelFileProcessingError:"Eroare la \xEEnc\u0103rcare",labelFileProcessingRevertError:"Eroare la anulare",labelFileRemoveError:"Eroare la \u015Ftergere",labelTapToCancel:"apas\u0103 pentru a anula",labelTapToRetry:"apas\u0103 pentru a re\xEEncerca",labelTapToUndo:"apas\u0103 pentru a anula",labelButtonRemoveItem:"\u015Eterge",labelButtonAbortItemLoad:"Anuleaz\u0103",labelButtonRetryItemLoad:"Re\xEEncearc\u0103",labelButtonAbortItemProcessing:"Anuleaz\u0103",labelButtonUndoItemProcessing:"Anuleaz\u0103",labelButtonRetryItemProcessing:"Re\xEEncearc\u0103",labelButtonProcessItem:"\xCEncarc\u0103",labelMaxFileSizeExceeded:"Fi\u0219ierul este prea mare",labelMaxFileSize:"Dimensiunea maxim\u0103 a unui fi\u0219ier este de {filesize}",labelMaxTotalFileSizeExceeded:"Dimensiunea total\u0103 maxim\u0103 a fost dep\u0103\u0219it\u0103",labelMaxTotalFileSize:"Dimensiunea total\u0103 maxim\u0103 a fi\u0219ierelor este de {filesize}",labelFileTypeNotAllowed:"Tipul fi\u0219ierului nu este valid",fileValidateTypeLabelExpectedTypes:"Se a\u0219teapt\u0103 {allButLastType} sau {lastType}",imageValidateSizeLabelFormatError:"Formatul imaginii nu este acceptat",imageValidateSizeLabelImageSizeTooSmall:"Imaginea este prea mic\u0103",imageValidateSizeLabelImageSizeTooBig:"Imaginea este prea mare",imageValidateSizeLabelExpectedMinSize:"M\u0103rimea minim\u0103 este de {maxWidth} x {maxHeight}",imageValidateSizeLabelExpectedMaxSize:"M\u0103rimea maxim\u0103 este de {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezolu\u021Bia este prea mic\u0103",imageValidateSizeLabelImageResolutionTooHigh:"Rezolu\u021Bia este prea mare",imageValidateSizeLabelExpectedMinResolution:"Rezolu\u021Bia minim\u0103 este de {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Rezolu\u021Bia maxim\u0103 este de {maxResolution}"};var tr={labelIdle:'\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0438\u043B\u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 ',labelInvalidField:"\u041F\u043E\u043B\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0444\u0430\u0439\u043B\u044B",labelFileWaitingForSize:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0437\u043C\u0435\u0440",labelFileSizeNotAvailable:"\u0420\u0430\u0437\u043C\u0435\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F",labelFileLoading:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435",labelFileLoadError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0438",labelFileProcessing:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",labelFileProcessingComplete:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430",labelFileProcessingAborted:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u0430",labelFileProcessingError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0435",labelFileProcessingRevertError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0435",labelFileRemoveError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0438",labelTapToCancel:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B",labelTapToRetry:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelTapToUndo:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F",labelButtonRemoveItem:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",labelButtonAbortItemLoad:"\u041F\u0440\u0435\u043A\u0440\u0430\u0449\u0435\u043D\u043E",labelButtonRetryItemLoad:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelButtonAbortItemProcessing:"\u041E\u0442\u043C\u0435\u043D\u0430",labelButtonUndoItemProcessing:"\u041E\u0442\u043C\u0435\u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F",labelButtonRetryItemProcessing:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelButtonProcessItem:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",labelMaxFileSizeExceeded:"\u0424\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439",labelMaxFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: {filesize}",labelMaxTotalFileSizeExceeded:"\u041F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440",labelMaxTotalFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: {filesize}",labelFileTypeNotAllowed:"\u0424\u0430\u0439\u043B \u043D\u0435\u0432\u0435\u0440\u043D\u043E\u0433\u043E \u0442\u0438\u043F\u0430",fileValidateTypeLabelExpectedTypes:"\u041E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F {allButLastType} \u0438\u043B\u0438 {lastType}",imageValidateSizeLabelFormatError:"\u0422\u0438\u043F \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F",imageValidateSizeLabelImageSizeTooSmall:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435",imageValidateSizeLabelImageSizeTooBig:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435",imageValidateSizeLabelExpectedMinSize:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043D\u0438\u0437\u043A\u043E\u0435",imageValidateSizeLabelImageResolutionTooHigh:"\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0432\u044B\u0441\u043E\u043A\u043E\u0435",imageValidateSizeLabelExpectedMinResolution:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435: {maxResolution}"};var ir={labelIdle:'Natiahn\xFA\u0165 s\xFAbor (drag&drop) alebo Vyh\u013Eada\u0165 ',labelInvalidField:"Pole obsahuje chybn\xE9 s\xFAbory",labelFileWaitingForSize:"Zis\u0165uje sa ve\u013Ekos\u0165",labelFileSizeNotAvailable:"Nezn\xE1ma ve\u013Ekos\u0165",labelFileLoading:"Pren\xE1\u0161a sa",labelFileLoadError:"Chyba pri prenose",labelFileProcessing:"Prebieha upload",labelFileProcessingComplete:"Upload dokon\u010Den\xFD",labelFileProcessingAborted:"Upload stornovan\xFD",labelFileProcessingError:"Chyba pri uploade",labelFileProcessingRevertError:"Chyba pri obnove",labelFileRemoveError:"Chyba pri odstr\xE1nen\xED",labelTapToCancel:"Kliknite pre storno",labelTapToRetry:"Kliknite pre opakovanie",labelTapToUndo:"Kliknite pre vr\xE1tenie",labelButtonRemoveItem:"Odstr\xE1ni\u0165",labelButtonAbortItemLoad:"Storno",labelButtonRetryItemLoad:"Opakova\u0165",labelButtonAbortItemProcessing:"Sp\xE4\u0165",labelButtonUndoItemProcessing:"Vr\xE1ti\u0165",labelButtonRetryItemProcessing:"Opakova\u0165",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"S\xFAbor je pr\xEDli\u0161 ve\u013Ek\xFD",labelMaxFileSize:"Najv\xE4\u010D\u0161ia ve\u013Ekos\u0165 s\xFAboru je {filesize}",labelMaxTotalFileSizeExceeded:"Prekro\u010Den\xE1 maxim\xE1lna celkov\xE1 ve\u013Ekos\u0165 s\xFAboru",labelMaxTotalFileSize:"Maxim\xE1lna celkov\xE1 ve\u013Ekos\u0165 s\xFAboru je {filesize}",labelFileTypeNotAllowed:"S\xFAbor je nespr\xE1vneho typu",fileValidateTypeLabelExpectedTypes:"O\u010Dak\xE1va sa {allButLastType} alebo {lastType}",imageValidateSizeLabelFormatError:"Obr\xE1zok tohto typu nie je podporovan\xFD",imageValidateSizeLabelImageSizeTooSmall:"Obr\xE1zok je pr\xEDli\u0161 mal\xFD",imageValidateSizeLabelImageSizeTooBig:"Obr\xE1zok je pr\xEDli\u0161 ve\u013Ek\xFD",imageValidateSizeLabelExpectedMinSize:"Minim\xE1lny rozmer je {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maxim\xE1lny rozmer je {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozl\xED\u0161enie je pr\xEDli\u0161 mal\xE9",imageValidateSizeLabelImageResolutionTooHigh:"Rozli\u0161enie je pr\xEDli\u0161 ve\u013Ek\xE9",imageValidateSizeLabelExpectedMinResolution:"Minim\xE1lne rozl\xED\u0161enie je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maxim\xE1lne rozl\xED\u0161enie je {maxResolution}"};var ar={labelIdle:'Drag och sl\xE4pp dina filer eller Bl\xE4ddra ',labelInvalidField:"F\xE4ltet inneh\xE5ller felaktiga filer",labelFileWaitingForSize:"V\xE4ntar p\xE5 storlek",labelFileSizeNotAvailable:"Storleken finns inte tillg\xE4nglig",labelFileLoading:"Laddar",labelFileLoadError:"Fel under laddning",labelFileProcessing:"Laddar upp",labelFileProcessingComplete:"Uppladdning klar",labelFileProcessingAborted:"Uppladdning avbruten",labelFileProcessingError:"Fel under uppladdning",labelFileProcessingRevertError:"Fel under \xE5terst\xE4llning",labelFileRemoveError:"Fel under borttagning",labelTapToCancel:"tryck f\xF6r att avbryta",labelTapToRetry:"tryck f\xF6r att f\xF6rs\xF6ka igen",labelTapToUndo:"tryck f\xF6r att \xE5ngra",labelButtonRemoveItem:"Tabort",labelButtonAbortItemLoad:"Avbryt",labelButtonRetryItemLoad:"F\xF6rs\xF6k igen",labelButtonAbortItemProcessing:"Avbryt",labelButtonUndoItemProcessing:"\xC5ngra",labelButtonRetryItemProcessing:"F\xF6rs\xF6k igen",labelButtonProcessItem:"Ladda upp",labelMaxFileSizeExceeded:"Filen \xE4r f\xF6r stor",labelMaxFileSize:"St\xF6rsta till\xE5tna filstorlek \xE4r {filesize}",labelMaxTotalFileSizeExceeded:"Maximal uppladdningsstorlek uppn\xE5d",labelMaxTotalFileSize:"Maximal uppladdningsstorlek \xE4r {filesize}",labelFileTypeNotAllowed:"Felaktig filtyp",fileValidateTypeLabelExpectedTypes:"Godk\xE4nda filtyper {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Bildtypen saknar st\xF6d",imageValidateSizeLabelImageSizeTooSmall:"Bilden \xE4r f\xF6r liten",imageValidateSizeLabelImageSizeTooBig:"Bilden \xE4r f\xF6r stor",imageValidateSizeLabelExpectedMinSize:"Minimal storlek \xE4r {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximal storlek \xE4r {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Uppl\xF6sningen \xE4r f\xF6r l\xE5g",imageValidateSizeLabelImageResolutionTooHigh:"Uppl\xF6sningen \xE4r f\xF6r h\xF6g",imageValidateSizeLabelExpectedMinResolution:"Minsta till\xE5tna uppl\xF6sning \xE4r {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"H\xF6gsta till\xE5tna uppl\xF6sning \xE4r {maxResolution}"};var nr={labelIdle:'Dosyan\u0131z\u0131 S\xFCr\xFCkleyin & B\u0131rak\u0131n ya da Se\xE7in ',labelInvalidField:"Alan ge\xE7ersiz dosyalar i\xE7eriyor",labelFileWaitingForSize:"Boyut hesaplan\u0131yor",labelFileSizeNotAvailable:"Boyut mevcut de\u011Fil",labelFileLoading:"Y\xFCkleniyor",labelFileLoadError:"Y\xFCkleme s\u0131ras\u0131nda hata olu\u015Ftu",labelFileProcessing:"Y\xFCkleniyor",labelFileProcessingComplete:"Y\xFCkleme tamamland\u0131",labelFileProcessingAborted:"Y\xFCkleme iptal edildi",labelFileProcessingError:"Y\xFCklerken hata olu\u015Ftu",labelFileProcessingRevertError:"Geri \xE7ekerken hata olu\u015Ftu",labelFileRemoveError:"Kald\u0131r\u0131rken hata olu\u015Ftu",labelTapToCancel:"\u0130ptal etmek i\xE7in t\u0131klay\u0131n",labelTapToRetry:"Tekrar denemek i\xE7in t\u0131klay\u0131n",labelTapToUndo:"Geri almak i\xE7in t\u0131klay\u0131n",labelButtonRemoveItem:"Kald\u0131r",labelButtonAbortItemLoad:"\u0130ptal Et",labelButtonRetryItemLoad:"Tekrar dene",labelButtonAbortItemProcessing:"\u0130ptal et",labelButtonUndoItemProcessing:"Geri Al",labelButtonRetryItemProcessing:"Tekrar dene",labelButtonProcessItem:"Y\xFCkle",labelMaxFileSizeExceeded:"Dosya \xE7ok b\xFCy\xFCk",labelMaxFileSize:"En fazla dosya boyutu: {filesize}",labelMaxTotalFileSizeExceeded:"Maximum boyut a\u015F\u0131ld\u0131",labelMaxTotalFileSize:"Maximum dosya boyutu :{filesize}",labelFileTypeNotAllowed:"Ge\xE7ersiz dosya tipi",fileValidateTypeLabelExpectedTypes:"\u015Eu {allButLastType} ya da \u015Fu dosya olmas\u0131 gerekir: {lastType}",imageValidateSizeLabelFormatError:"Resim tipi desteklenmiyor",imageValidateSizeLabelImageSizeTooSmall:"Resim \xE7ok k\xFC\xE7\xFCk",imageValidateSizeLabelImageSizeTooBig:"Resim \xE7ok b\xFCy\xFCk",imageValidateSizeLabelExpectedMinSize:"Minimum boyut {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum boyut {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\xC7\xF6z\xFCn\xFCrl\xFCk \xE7ok d\xFC\u015F\xFCk",imageValidateSizeLabelImageResolutionTooHigh:"\xC7\xF6z\xFCn\xFCrl\xFCk \xE7ok y\xFCksek",imageValidateSizeLabelExpectedMinResolution:"Minimum \xE7\xF6z\xFCn\xFCrl\xFCk {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum \xE7\xF6z\xFCn\xFCrl\xFCk {maxResolution}"};var lr={labelIdle:'\u041F\u0435\u0440\u0435\u0442\u044F\u0433\u043D\u0456\u0442\u044C \u0444\u0430\u0439\u043B\u0438 \u0430\u0431\u043E \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044C ',labelInvalidField:"\u041F\u043E\u043B\u0435 \u043C\u0456\u0441\u0442\u0438\u0442\u044C \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u0456 \u0444\u0430\u0439\u043B\u0438",labelFileWaitingForSize:"\u0412\u043A\u0430\u0436\u0456\u0442\u044C \u0440\u043E\u0437\u043C\u0456\u0440",labelFileSizeNotAvailable:"\u0420\u043E\u0437\u043C\u0456\u0440 \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439",labelFileLoading:"\u041E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u044F",labelFileLoadError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u043E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u0456",labelFileProcessing:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F",labelFileProcessingComplete:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E",labelFileProcessingAborted:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u043E",labelFileProcessingError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u0456",labelFileProcessingRevertError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0432\u0456\u0434\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u0456",labelFileRemoveError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0432\u0438\u0434\u0430\u043B\u0435\u043D\u043D\u0456",labelTapToCancel:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelTapToRetry:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelTapToUndo:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0432\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u044E \u0434\u0456\u044E",labelButtonRemoveItem:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",labelButtonAbortItemLoad:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelButtonRetryItemLoad:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelButtonAbortItemProcessing:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelButtonUndoItemProcessing:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u044E \u0434\u0456\u044E",labelButtonRetryItemProcessing:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelButtonProcessItem:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F",labelMaxFileSizeExceeded:"\u0424\u0430\u0439\u043B \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0438\u0439",labelMaxFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440 \u0444\u0430\u0439\u043B\u0443: {filesize}",labelMaxTotalFileSizeExceeded:"\u041F\u0435\u0440\u0435\u0432\u0438\u0449\u0435\u043D\u043E \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440",labelMaxTotalFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {filesize}",labelFileTypeNotAllowed:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0444\u0430\u0439\u043B\u0443 \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454\u0442\u044C\u0441\u044F",fileValidateTypeLabelExpectedTypes:"\u041E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F {allButLastType} \u0430\u0431\u043E {lastType}",imageValidateSizeLabelFormatError:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454\u0442\u044C\u0441\u044F",imageValidateSizeLabelImageSizeTooSmall:"\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0435",imageValidateSizeLabelImageSizeTooBig:"\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435",imageValidateSizeLabelExpectedMinSize:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0420\u043E\u0437\u043C\u0456\u0440\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0456",imageValidateSizeLabelImageResolutionTooHigh:"\u0420\u043E\u0437\u043C\u0456\u0440\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0456",imageValidateSizeLabelExpectedMinResolution:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0456 \u0440\u043E\u0437\u043C\u0456\u0440\u0438: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0456 \u0440\u043E\u0437\u043C\u0456\u0440\u0438: {maxResolution}"};var or={labelIdle:'K\xE9o th\u1EA3 t\u1EC7p c\u1EE7a b\u1EA1n ho\u1EB7c T\xECm ki\u1EBFm ',labelInvalidField:"Tr\u01B0\u1EDDng ch\u1EE9a c\xE1c t\u1EC7p kh\xF4ng h\u1EE3p l\u1EC7",labelFileWaitingForSize:"\u0110ang ch\u1EDD k\xEDch th\u01B0\u1EDBc",labelFileSizeNotAvailable:"K\xEDch th\u01B0\u1EDBc kh\xF4ng c\xF3 s\u1EB5n",labelFileLoading:"\u0110ang t\u1EA3i",labelFileLoadError:"L\u1ED7i khi t\u1EA3i",labelFileProcessing:"\u0110ang t\u1EA3i l\xEAn",labelFileProcessingComplete:"T\u1EA3i l\xEAn th\xE0nh c\xF4ng",labelFileProcessingAborted:"\u0110\xE3 hu\u1EF7 t\u1EA3i l\xEAn",labelFileProcessingError:"L\u1ED7i khi t\u1EA3i l\xEAn",labelFileProcessingRevertError:"L\u1ED7i khi ho\xE0n nguy\xEAn",labelFileRemoveError:"L\u1ED7i khi x\xF3a",labelTapToCancel:"nh\u1EA5n \u0111\u1EC3 h\u1EE7y",labelTapToRetry:"nh\u1EA5n \u0111\u1EC3 th\u1EED l\u1EA1i",labelTapToUndo:"nh\u1EA5n \u0111\u1EC3 ho\xE0n t\xE1c",labelButtonRemoveItem:"Xo\xE1",labelButtonAbortItemLoad:"Hu\u1EF7 b\u1ECF",labelButtonRetryItemLoad:"Th\u1EED l\u1EA1i",labelButtonAbortItemProcessing:"H\u1EE7y b\u1ECF",labelButtonUndoItemProcessing:"Ho\xE0n t\xE1c",labelButtonRetryItemProcessing:"Th\u1EED l\u1EA1i",labelButtonProcessItem:"T\u1EA3i l\xEAn",labelMaxFileSizeExceeded:"T\u1EADp tin qu\xE1 l\u1EDBn",labelMaxFileSize:"K\xEDch th\u01B0\u1EDBc t\u1EC7p t\u1ED1i \u0111a l\xE0 {filesize}",labelMaxTotalFileSizeExceeded:"\u0110\xE3 v\u01B0\u1EE3t qu\xE1 t\u1ED5ng k\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a",labelMaxTotalFileSize:"T\u1ED5ng k\xEDch th\u01B0\u1EDBc t\u1EC7p t\u1ED1i \u0111a l\xE0 {filesize}",labelFileTypeNotAllowed:"T\u1EC7p thu\u1ED9c lo\u1EA1i kh\xF4ng h\u1EE3p l\u1EC7",fileValidateTypeLabelExpectedTypes:"Ki\u1EC3u t\u1EC7p h\u1EE3p l\u1EC7 l\xE0 {allButLastType} ho\u1EB7c {lastType}",imageValidateSizeLabelFormatError:"Lo\u1EA1i h\xECnh \u1EA3nh kh\xF4ng \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3",imageValidateSizeLabelImageSizeTooSmall:"H\xECnh \u1EA3nh qu\xE1 nh\u1ECF",imageValidateSizeLabelImageSizeTooBig:"H\xECnh \u1EA3nh qu\xE1 l\u1EDBn",imageValidateSizeLabelExpectedMinSize:"K\xEDch th\u01B0\u1EDBc t\u1ED1i thi\u1EC3u l\xE0 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"K\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a l\xE0 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0110\u1ED9 ph\xE2n gi\u1EA3i qu\xE1 th\u1EA5p",imageValidateSizeLabelImageResolutionTooHigh:"\u0110\u1ED9 ph\xE2n gi\u1EA3i qu\xE1 cao",imageValidateSizeLabelExpectedMinResolution:"\u0110\u1ED9 ph\xE2n gi\u1EA3i t\u1ED1i thi\u1EC3u l\xE0 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0110\u1ED9 ph\xE2n gi\u1EA3i t\u1ED1i \u0111a l\xE0 {maxResolution}"};var rr={labelIdle:'\u62D6\u653E\u6587\u4EF6\uFF0C\u6216\u8005 \u6D4F\u89C8 ',labelInvalidField:"\u5B57\u6BB5\u5305\u542B\u65E0\u6548\u6587\u4EF6",labelFileWaitingForSize:"\u8BA1\u7B97\u6587\u4EF6\u5927\u5C0F",labelFileSizeNotAvailable:"\u6587\u4EF6\u5927\u5C0F\u4E0D\u53EF\u7528",labelFileLoading:"\u52A0\u8F7D",labelFileLoadError:"\u52A0\u8F7D\u9519\u8BEF",labelFileProcessing:"\u4E0A\u4F20",labelFileProcessingComplete:"\u5DF2\u4E0A\u4F20",labelFileProcessingAborted:"\u4E0A\u4F20\u5DF2\u53D6\u6D88",labelFileProcessingError:"\u4E0A\u4F20\u51FA\u9519",labelFileProcessingRevertError:"\u8FD8\u539F\u51FA\u9519",labelFileRemoveError:"\u5220\u9664\u51FA\u9519",labelTapToCancel:"\u70B9\u51FB\u53D6\u6D88",labelTapToRetry:"\u70B9\u51FB\u91CD\u8BD5",labelTapToUndo:"\u70B9\u51FB\u64A4\u6D88",labelButtonRemoveItem:"\u5220\u9664",labelButtonAbortItemLoad:"\u4E2D\u6B62",labelButtonRetryItemLoad:"\u91CD\u8BD5",labelButtonAbortItemProcessing:"\u53D6\u6D88",labelButtonUndoItemProcessing:"\u64A4\u6D88",labelButtonRetryItemProcessing:"\u91CD\u8BD5",labelButtonProcessItem:"\u4E0A\u4F20",labelMaxFileSizeExceeded:"\u6587\u4EF6\u592A\u5927",labelMaxFileSize:"\u6700\u5927\u503C: {filesize}",labelMaxTotalFileSizeExceeded:"\u8D85\u8FC7\u6700\u5927\u6587\u4EF6\u5927\u5C0F",labelMaxTotalFileSize:"\u6700\u5927\u6587\u4EF6\u5927\u5C0F\uFF1A{filesize}",labelFileTypeNotAllowed:"\u6587\u4EF6\u7C7B\u578B\u65E0\u6548",fileValidateTypeLabelExpectedTypes:"\u5E94\u4E3A {allButLastType} \u6216 {lastType}",imageValidateSizeLabelFormatError:"\u4E0D\u652F\u6301\u56FE\u50CF\u7C7B\u578B",imageValidateSizeLabelImageSizeTooSmall:"\u56FE\u50CF\u592A\u5C0F",imageValidateSizeLabelImageSizeTooBig:"\u56FE\u50CF\u592A\u5927",imageValidateSizeLabelExpectedMinSize:"\u6700\u5C0F\u503C: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u6700\u5927\u503C: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u5206\u8FA8\u7387\u592A\u4F4E",imageValidateSizeLabelImageResolutionTooHigh:"\u5206\u8FA8\u7387\u592A\u9AD8",imageValidateSizeLabelExpectedMinResolution:"\u6700\u5C0F\u5206\u8FA8\u7387\uFF1A{minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u6700\u5927\u5206\u8FA8\u7387\uFF1A{maxResolution}"};var sr={labelIdle:'\u62D6\u653E\u6A94\u6848\uFF0C\u6216\u8005 \u700F\u89BD ',labelInvalidField:"\u4E0D\u652F\u63F4\u6B64\u6A94\u6848",labelFileWaitingForSize:"\u6B63\u5728\u8A08\u7B97\u6A94\u6848\u5927\u5C0F",labelFileSizeNotAvailable:"\u6A94\u6848\u5927\u5C0F\u4E0D\u7B26",labelFileLoading:"\u8B80\u53D6\u4E2D",labelFileLoadError:"\u8B80\u53D6\u932F\u8AA4",labelFileProcessing:"\u4E0A\u50B3",labelFileProcessingComplete:"\u5DF2\u4E0A\u50B3",labelFileProcessingAborted:"\u4E0A\u50B3\u5DF2\u53D6\u6D88",labelFileProcessingError:"\u4E0A\u50B3\u767C\u751F\u932F\u8AA4",labelFileProcessingRevertError:"\u9084\u539F\u932F\u8AA4",labelFileRemoveError:"\u522A\u9664\u932F\u8AA4",labelTapToCancel:"\u9EDE\u64CA\u53D6\u6D88",labelTapToRetry:"\u9EDE\u64CA\u91CD\u8A66",labelTapToUndo:"\u9EDE\u64CA\u9084\u539F",labelButtonRemoveItem:"\u522A\u9664",labelButtonAbortItemLoad:"\u505C\u6B62",labelButtonRetryItemLoad:"\u91CD\u8A66",labelButtonAbortItemProcessing:"\u53D6\u6D88",labelButtonUndoItemProcessing:"\u53D6\u6D88",labelButtonRetryItemProcessing:"\u91CD\u8A66",labelButtonProcessItem:"\u4E0A\u50B3",labelMaxFileSizeExceeded:"\u6A94\u6848\u904E\u5927",labelMaxFileSize:"\u6700\u5927\u503C\uFF1A{filesize}",labelMaxTotalFileSizeExceeded:"\u8D85\u904E\u6700\u5927\u53EF\u4E0A\u50B3\u5927\u5C0F",labelMaxTotalFileSize:"\u6700\u5927\u53EF\u4E0A\u50B3\u5927\u5C0F\uFF1A{filesize}",labelFileTypeNotAllowed:"\u4E0D\u652F\u63F4\u6B64\u985E\u578B\u6A94\u6848",fileValidateTypeLabelExpectedTypes:"\u61C9\u70BA {allButLastType} \u6216 {lastType}",imageValidateSizeLabelFormatError:"\u4E0D\u652F\u6301\u6B64\u985E\u5716\u7247\u985E\u578B",imageValidateSizeLabelImageSizeTooSmall:"\u5716\u7247\u904E\u5C0F",imageValidateSizeLabelImageSizeTooBig:"\u5716\u7247\u904E\u5927",imageValidateSizeLabelExpectedMinSize:"\u6700\u5C0F\u5C3A\u5BF8\uFF1A{minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u6700\u5927\u5C3A\u5BF8\uFF1A{maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u89E3\u6790\u5EA6\u904E\u4F4E",imageValidateSizeLabelImageResolutionTooHigh:"\u89E3\u6790\u5EA6\u904E\u9AD8",imageValidateSizeLabelExpectedMinResolution:"\u6700\u4F4E\u89E3\u6790\u5EA6\uFF1A{minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u6700\u9AD8\u89E3\u6790\u5EA6\uFF1A{maxResolution}"};ve(Wl);ve(jl);ve($l);ve(Kl);ve(eo);ve(mo);ve(go);ve(_o);ve(Pa);window.FilePond=la;function Rg({acceptedFileTypes:e,imageEditorEmptyFillColor:t,imageEditorMode:i,imageEditorViewportHeight:a,imageEditorViewportWidth:n,deleteUploadedFileUsing:l,isDeletable:o,isDisabled:r,getUploadedFilesUsing:s,imageCropAspectRatio:p,imagePreviewHeight:c,imageResizeMode:d,imageResizeTargetHeight:m,imageResizeTargetWidth:u,imageResizeUpscale:g,isAvatar:f,hasImageEditor:h,hasCircleCropper:I,canEditSvgs:b,isSvgEditingConfirmed:T,confirmSvgEditingMessage:v,disabledSvgEditingMessage:y,isDownloadable:E,isMultiple:_,isOpenable:x,isPreviewable:R,isReorderable:z,itemPanelAspectRatio:P,loadingIndicatorPosition:A,locale:B,maxFiles:w,maxSize:O,minSize:S,maxParallelUploads:L,mimeTypeMap:D,panelAspectRatio:F,panelLayout:G,placeholder:C,removeUploadedFileButtonPosition:q,removeUploadedFileUsing:X,reorderUploadedFilesUsing:K,shouldAppendFiles:oe,shouldOrientImageFromExif:k,shouldTransformImage:H,state:Y,uploadButtonPosition:re,uploadingMessage:ee,uploadProgressIndicatorPosition:dt,uploadUsing:dr}){return{fileKeyIndex:{},pond:null,shouldUpdateState:!0,state:Y,lastState:null,error:null,uploadedFileIndex:{},isEditorOpen:!1,editingFile:{},currentRatio:"",editor:{},init:async function(){Ft(cr[B]??cr.en),this.pond=gt(this.$refs.input,{acceptedFileTypes:e,allowImageExifOrientation:k,allowPaste:!1,allowRemove:o,allowReorder:z,allowImagePreview:R,allowVideoPreview:R,allowAudioPreview:R,allowImageTransform:H,credits:!1,files:await this.getFiles(),imageCropAspectRatio:p,imagePreviewHeight:c,imageResizeTargetHeight:m,imageResizeTargetWidth:u,imageResizeMode:d,imageResizeUpscale:g,imageTransformOutputStripImageHead:!1,itemInsertLocation:oe?"after":"before",...C&&{labelIdle:C},maxFiles:w,maxFileSize:O,minFileSize:S,...L&&{maxParallelUploads:L},styleButtonProcessItemPosition:re,styleButtonRemoveItemPosition:q,styleItemPanelAspectRatio:P,styleLoadIndicatorPosition:A,stylePanelAspectRatio:F,stylePanelLayout:G,styleProgressIndicatorPosition:dt,server:{load:async(N,W)=>{let Q=await(await fetch(N,{cache:"no-store"})).blob();W(Q)},process:(N,W,$,Q,Ge,Me)=>{this.shouldUpdateState=!1;let Kt=("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,Qt=>(Qt^crypto.getRandomValues(new Uint8Array(1))[0]&15>>Qt/4).toString(16));dr(Kt,W,Qt=>{this.shouldUpdateState=!0,Q(Qt)},Ge,Me)},remove:async(N,W)=>{let $=this.uploadedFileIndex[N]??null;$&&(await l($),W())},revert:async(N,W)=>{await X(N),W()}},allowImageEdit:h,imageEditEditor:{open:N=>this.loadEditor(N),onconfirm:()=>{},oncancel:()=>this.closeEditor(),onclose:()=>this.closeEditor()},fileValidateTypeDetectType:(N,W)=>new Promise(($,Q)=>{let Ge=N.name.split(".").pop().toLowerCase(),Me=D[Ge]||W||Gl.getType(Ge);Me?$(Me):Q()})}),this.$watch("state",async()=>{if(this.pond&&this.shouldUpdateState&&this.state!==void 0){if(this.state!==null&&Object.values(this.state).filter(N=>N.startsWith("livewire-file:")).length){this.lastState=null;return}JSON.stringify(this.state)!==this.lastState&&(this.lastState=JSON.stringify(this.state),this.pond.files=await this.getFiles())}}),this.pond.on("reorderfiles",async N=>{let W=N.map($=>$.source instanceof File?$.serverId:this.uploadedFileIndex[$.source]??null).filter($=>$);await K(oe?W:W.reverse())}),this.pond.on("initfile",async N=>{E&&(f||this.insertDownloadLink(N))}),this.pond.on("initfile",async N=>{x&&(f||this.insertOpenLink(N))}),this.pond.on("addfilestart",async N=>{N.status===Et.PROCESSING_QUEUED&&this.dispatchFormEvent("form-processing-started",{message:ee})});let V=async()=>{this.pond.getFiles().filter(N=>N.status===Et.PROCESSING||N.status===Et.PROCESSING_QUEUED).length||this.dispatchFormEvent("form-processing-finished")};this.pond.on("processfile",V),this.pond.on("processfileabort",V),this.pond.on("processfilerevert",V),G==="compact circle"&&(this.pond.on("error",N=>{this.error=`${N.main}: ${N.sub}`.replace("Expects or","Expects")}),this.pond.on("removefile",()=>this.error=null))},destroy:function(){this.destroyEditor(),ft(this.$refs.input),this.pond=null},dispatchFormEvent:function(V,N={}){this.$el.closest("form")?.dispatchEvent(new CustomEvent(V,{composed:!0,cancelable:!0,detail:N}))},getUploadedFiles:async function(){let V=await s();this.fileKeyIndex=V??{},this.uploadedFileIndex=Object.entries(this.fileKeyIndex).filter(([N,W])=>W?.url).reduce((N,[W,$])=>(N[$.url]=W,N),{})},getFiles:async function(){await this.getUploadedFiles();let V=[];for(let N of Object.values(this.fileKeyIndex))N&&V.push({source:N.url,options:{type:"local",...!N.type||R&&(/^audio/.test(N.type)||/^image/.test(N.type)||/^video/.test(N.type))?{}:{file:{name:N.name,size:N.size,type:N.type}}}});return oe?V:V.reverse()},insertDownloadLink:function(V){if(V.origin!==Ct.LOCAL)return;let N=this.getDownloadLink(V);N&&document.getElementById(`filepond--item-${V.id}`).querySelector(".filepond--file-info-main").prepend(N)},insertOpenLink:function(V){if(V.origin!==Ct.LOCAL)return;let N=this.getOpenLink(V);N&&document.getElementById(`filepond--item-${V.id}`).querySelector(".filepond--file-info-main").prepend(N)},getDownloadLink:function(V){let N=V.source;if(!N)return;let W=document.createElement("a");return W.className="filepond--download-icon",W.href=N,W.download=V.file.name,W},getOpenLink:function(V){let N=V.source;if(!N)return;let W=document.createElement("a");return W.className="filepond--open-icon",W.href=N,W.target="_blank",W},initEditor:function(){r||h&&(this.editor=new ya(this.$refs.editor,{aspectRatio:n/a,autoCropArea:1,center:!0,crop:V=>{this.$refs.xPositionInput.value=Math.round(V.detail.x),this.$refs.yPositionInput.value=Math.round(V.detail.y),this.$refs.heightInput.value=Math.round(V.detail.height),this.$refs.widthInput.value=Math.round(V.detail.width),this.$refs.rotationInput.value=V.detail.rotate},cropBoxResizable:!0,guides:!0,highlight:!0,responsive:!0,toggleDragModeOnDblclick:!0,viewMode:i,wheelZoomRatio:.02}))},closeEditor:function(){this.editingFile={},this.isEditorOpen=!1,this.destroyEditor()},fixImageDimensions:function(V,N){if(V.type!=="image/svg+xml")return N(V);let W=new FileReader;W.onload=$=>{let Q=new DOMParser().parseFromString($.target.result,"image/svg+xml")?.querySelector("svg");if(!Q)return N(V);let Ge=["viewBox","ViewBox","viewbox"].find(Kt=>Q.hasAttribute(Kt));if(!Ge)return N(V);let Me=Q.getAttribute(Ge).split(" ");return!Me||Me.length!==4?N(V):(Q.setAttribute("width",parseFloat(Me[2])+"pt"),Q.setAttribute("height",parseFloat(Me[3])+"pt"),N(new File([new Blob([new XMLSerializer().serializeToString(Q)],{type:"image/svg+xml"})],V.name,{type:"image/svg+xml",_relativePath:""})))},W.readAsText(V)},loadEditor:function(V){if(r||!h||!V)return;let N=V.type==="image/svg+xml";if(!b&&N){alert(y);return}T&&N&&!confirm(v)||this.fixImageDimensions(V,W=>{this.editingFile=W,this.initEditor();let $=new FileReader;$.onload=Q=>{this.isEditorOpen=!0,setTimeout(()=>this.editor.replace(Q.target.result),200)},$.readAsDataURL(V)})},getRoundedCanvas:function(V){let N=V.width,W=V.height,$=document.createElement("canvas");$.width=N,$.height=W;let Q=$.getContext("2d");return Q.imageSmoothingEnabled=!0,Q.drawImage(V,0,0,N,W),Q.globalCompositeOperation="destination-in",Q.beginPath(),Q.ellipse(N/2,W/2,N/2,W/2,0,0,2*Math.PI),Q.fill(),$},saveEditor:function(){if(r||!h)return;let V=this.editor.getCroppedCanvas({fillColor:t??"transparent",height:m,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",width:u});I&&(V=this.getRoundedCanvas(V)),V.toBlob(N=>{_&&this.pond.removeFile(this.pond.getFiles().find(W=>W.filename===this.editingFile.name)?.id,{revert:!0}),this.$nextTick(()=>{this.shouldUpdateState=!1;let W=this.editingFile.name.slice(0,this.editingFile.name.lastIndexOf(".")),$=this.editingFile.name.split(".").pop();$==="svg"&&($="png");let Q=/-v(\d+)/;Q.test(W)?W=W.replace(Q,(Ge,Me)=>`-v${Number(Me)+1}`):W+="-v1",this.pond.addFile(new File([N],`${W}.${$}`,{type:this.editingFile.type==="image/svg+xml"||I?"image/png":this.editingFile.type,lastModified:new Date().getTime()})).then(()=>{this.closeEditor()}).catch(()=>{this.closeEditor()})})},I?"image/png":this.editingFile.type)},destroyEditor:function(){this.editor&&typeof this.editor.destroy=="function"&&this.editor.destroy(),this.editor=null}}}var cr={am:wo,ar:Lo,az:Mo,ca:Ao,ckb:Po,cs:zo,da:Oo,de:Fo,el:Do,en:Co,es:Bo,fa:No,fi:ko,fr:Vo,he:Go,hr:Uo,hu:Wo,id:Ho,it:jo,ja:Yo,km:qo,ko:$o,lt:Xo,lv:Ko,nl:Qo,no:Zo,pl:Jo,pt_BR:_i,pt_PT:_i,ro:er,ru:tr,sk:ir,sv:ar,tr:nr,uk:lr,vi:or,zh_CN:rr,zh_TW:sr};export{Rg as default}; /*! Bundled license information: filepond/dist/filepond.esm.js: diff --git a/public/js/filament/forms/components/markdown-editor.js b/public/js/filament/forms/components/markdown-editor.js index c5861840b..14c4fc4fe 100644 --- a/public/js/filament/forms/components/markdown-editor.js +++ b/public/js/filament/forms/components/markdown-editor.js @@ -1,43 +1,43 @@ -var ss=Object.defineProperty;var Sd=Object.getOwnPropertyDescriptor;var Td=Object.getOwnPropertyNames;var Ld=Object.prototype.hasOwnProperty;var Cd=(o,p)=>()=>(o&&(p=o(o=0)),p);var Ke=(o,p)=>()=>(p||o((p={exports:{}}).exports,p),p.exports);var Ed=(o,p,v,C)=>{if(p&&typeof p=="object"||typeof p=="function")for(let b of Td(p))!Ld.call(o,b)&&b!==v&&ss(o,b,{get:()=>p[b],enumerable:!(C=Sd(p,b))||C.enumerable});return o};var zd=o=>Ed(ss({},"__esModule",{value:!0}),o);var We=Ke((Yo,Qo)=>{(function(o,p){typeof Yo=="object"&&typeof Qo<"u"?Qo.exports=p():typeof define=="function"&&define.amd?define(p):(o=o||self,o.CodeMirror=p())})(Yo,function(){"use strict";var o=navigator.userAgent,p=navigator.platform,v=/gecko\/\d/i.test(o),C=/MSIE \d/.test(o),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(o),S=/Edge\/(\d+)/.exec(o),s=C||b||S,h=s&&(C?document.documentMode||6:+(S||b)[1]),g=!S&&/WebKit\//.test(o),T=g&&/Qt\/\d+\.\d+/.test(o),x=!S&&/Chrome\/(\d+)/.exec(o),c=x&&+x[1],d=/Opera\//.test(o),w=/Apple Computer/.test(navigator.vendor),E=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(o),z=/PhantomJS/.test(o),y=w&&(/Mobile\/\w+/.test(o)||navigator.maxTouchPoints>2),R=/Android/.test(o),M=y||R||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(o),H=y||/Mac/.test(p),Z=/\bCrOS\b/.test(o),ee=/win/i.test(p),re=d&&o.match(/Version\/(\d*\.\d*)/);re&&(re=Number(re[1])),re&&re>=15&&(d=!1,g=!0);var N=H&&(T||d&&(re==null||re<12.11)),F=v||s&&h>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var n=e.className,r=D(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function V(e,t){return j(e).appendChild(t)}function _(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return l+(t-a);l+=u-a,l+=n-l%n,a=u+1}}var qe=function(){this.id=null,this.f=null,this.time=0,this.handler=Ee(this.onTimeout,this)};qe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},qe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var U=[""];function G(e){for(;U.length<=e;)U.push(ce(U)+" ");return U[e]}function ce(e){return e[e.length-1]}function Be(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ue.test(e))}function Me(e,t){return t?t.source.indexOf("\\w")>-1&&we(e)?!0:t.test(e):we(e)}function Le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var $=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function W(e){return e.charCodeAt(0)>=768&&$.test(e)}function se(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function nt(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;at||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}var dt=null;function Pt(e,t,n){var r;dt=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&n=="before"?r=i:dt=i),a.from==t&&(a.from!=a.to&&n!="before"?r=i:dt=i)}return r??dt}var It=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(m){return m<=247?e.charAt(m):1424<=m&&m<=1524?"R":1536<=m&&m<=1785?t.charAt(m-1536):1774<=m&&m<=2220?"r":8192<=m&&m<=8203?"w":m==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,u=/[1n]/;function f(m,A,P){this.level=m,this.from=A,this.to=P}return function(m,A){var P=A=="ltr"?"L":"R";if(m.length==0||A=="ltr"&&!r.test(m))return!1;for(var J=m.length,Y=[],ie=0;ie-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function it(e,t){var n=nr(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Wt(e){e.prototype.on=function(t,n){Fe(this,t,n)},e.prototype.off=function(t,n){_t(this,t,n)}}function kt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Hr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ct(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function dr(e){kt(e),Hr(e)}function yn(e){return e.target||e.srcElement}function Ut(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),H&&e.ctrlKey&&t==1&&(t=3),t}var eo=function(){if(s&&h<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),Br;function ei(e){if(Br==null){var t=_("span","\u200B");V(e,_("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Br=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&h<8))}var n=Br?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var xn;function pr(e){if(xn!=null)return xn;var t=V(e,document.createTextNode("A\u062EA")),n=X(t,0,1).getBoundingClientRect(),r=X(t,1,2).getBoundingClientRect();return j(e),!n||n.left==n.right?!1:xn=r.right-n.right<3}var Bt=` +var ss=Object.defineProperty;var Sd=Object.getOwnPropertyDescriptor;var Td=Object.getOwnPropertyNames;var Ld=Object.prototype.hasOwnProperty;var Cd=(o,p)=>()=>(o&&(p=o(o=0)),p);var Ke=(o,p)=>()=>(p||o((p={exports:{}}).exports,p),p.exports);var Ed=(o,p,v,C)=>{if(p&&typeof p=="object"||typeof p=="function")for(let b of Td(p))!Ld.call(o,b)&&b!==v&&ss(o,b,{get:()=>p[b],enumerable:!(C=Sd(p,b))||C.enumerable});return o};var zd=o=>Ed(ss({},"__esModule",{value:!0}),o);var We=Ke((Yo,Qo)=>{(function(o,p){typeof Yo=="object"&&typeof Qo<"u"?Qo.exports=p():typeof define=="function"&&define.amd?define(p):(o=o||self,o.CodeMirror=p())})(Yo,function(){"use strict";var o=navigator.userAgent,p=navigator.platform,v=/gecko\/\d/i.test(o),C=/MSIE \d/.test(o),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(o),S=/Edge\/(\d+)/.exec(o),s=C||b||S,h=s&&(C?document.documentMode||6:+(S||b)[1]),g=!S&&/WebKit\//.test(o),T=g&&/Qt\/\d+\.\d+/.test(o),y=!S&&/Chrome\/(\d+)/.exec(o),c=y&&+y[1],d=/Opera\//.test(o),k=/Apple Computer/.test(navigator.vendor),z=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(o),M=/PhantomJS/.test(o),w=k&&(/Mobile\/\w+/.test(o)||navigator.maxTouchPoints>2),W=/Android/.test(o),E=w||W||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(o),N=w||/Mac/.test(p),G=/\bCrOS\b/.test(o),J=/win/i.test(p),re=d&&o.match(/Version\/(\d*\.\d*)/);re&&(re=Number(re[1])),re&&re>=15&&(d=!1,g=!0);var q=N&&(T||d&&(re==null||re<12.11)),O=v||s&&h>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var n=e.className,r=D(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function R(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function V(e,t){return R(e).appendChild(t)}function x(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return l+(t-a);l+=u-a,l+=n-l%n,a=u+1}}var qe=function(){this.id=null,this.f=null,this.time=0,this.handler=Ee(this.onTimeout,this)};qe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},qe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var U=[""];function Z(e){for(;U.length<=e;)U.push(ce(U)+" ");return U[e]}function ce(e){return e[e.length-1]}function Be(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ue.test(e))}function Me(e,t){return t?t.source.indexOf("\\w")>-1&&we(e)?!0:t.test(e):we(e)}function Le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var $=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function B(e){return e.charCodeAt(0)>=768&&$.test(e)}function se(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function nt(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;at||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}var dt=null;function Pt(e,t,n){var r;dt=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&n=="before"?r=i:dt=i),a.from==t&&(a.from!=a.to&&n!="before"?r=i:dt=i)}return r??dt}var Ft=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(m){return m<=247?e.charAt(m):1424<=m&&m<=1524?"R":1536<=m&&m<=1785?t.charAt(m-1536):1774<=m&&m<=2220?"r":8192<=m&&m<=8203?"w":m==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,u=/[1n]/;function f(m,A,j){this.level=m,this.from=A,this.to=j}return function(m,A){var j=A=="ltr"?"L":"R";if(m.length==0||A=="ltr"&&!r.test(m))return!1;for(var ee=m.length,Y=[],ie=0;ie-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function it(e,t){var n=nr(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Wt(e){e.prototype.on=function(t,n){Ie(this,t,n)},e.prototype.off=function(t,n){_t(this,t,n)}}function kt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Hr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ct(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function dr(e){kt(e),Hr(e)}function yn(e){return e.target||e.srcElement}function Ut(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),N&&e.ctrlKey&&t==1&&(t=3),t}var eo=function(){if(s&&h<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}(),Br;function ei(e){if(Br==null){var t=x("span","\u200B");V(e,x("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Br=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&h<8))}var n=Br?x("span","\u200B"):x("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var xn;function pr(e){if(xn!=null)return xn;var t=V(e,document.createTextNode("A\u062EA")),n=X(t,0,1).getBoundingClientRect(),r=X(t,1,2).getBoundingClientRect();return R(e),!n||n.left==n.right?!1:xn=r.right-n.right<3}var Bt=` b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` -`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=a.indexOf("\r");l!=-1?(n.push(a.slice(0,l)),t+=l+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},hr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ti=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),$t=null;function to(e){if($t!=null)return $t;var t=V(e,_("span","x")),n=t.getBoundingClientRect(),r=X(t,0,1).getBoundingClientRect();return $t=Math.abs(n.left-r.left)>1}var Wr={},Kt={};function Gt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wr[e]=t}function Cr(e,t){Kt[e]=t}function Ur(e){if(typeof e=="string"&&Kt.hasOwnProperty(e))e=Kt[e];else if(e&&typeof e.name=="string"&&Kt.hasOwnProperty(e.name)){var t=Kt[e.name];typeof t=="string"&&(t={name:t}),e=oe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ur("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ur("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function $r(e,t){t=Ur(t);var n=Wr[t.name];if(!n)return $r(e,"text/plain");var r=n(e,t);if(gr.hasOwnProperty(t.name)){var i=gr[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var gr={};function Kr(e,t){var n=gr.hasOwnProperty(e)?gr[e]:gr[e]={};ge(t,n)}function Vt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function _n(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Gr(e,t,n){return e.startState?e.startState(t,n):!0}var at=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.post},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ae(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?ne(n,Ae(e,n).text.length):Sc(t,Ae(e,t.line).text.length)}function Sc(e,t){var n=e.ch;return n==null||n>t?ne(e.line,t):n<0?ne(e.line,0):e}function ca(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Jt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Jt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Jt.fromSaved=function(e,t,n){return t instanceof ri?new Jt(e,Vt(e.mode,t.state),n,t.lookAhead):new Jt(e,Vt(e.mode,t),n)},Jt.prototype.save=function(e){var t=e!==!1?Vt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ri(t,this.maxLookAhead):t};function fa(e,t,n,r){var i=[e.state.modeGen],a={};va(e,t.text,e.doc.mode,n,function(m,A){return i.push(m,A)},a,r);for(var l=n.state,u=function(m){n.baseTokens=i;var A=e.state.overlays[m],P=1,J=0;n.state=!0,va(e,t.text,A.mode,n,function(Y,ie){for(var ue=P;JY&&i.splice(P,1,Y,i[P+1],me),P+=2,J=Math.min(Y,me)}if(ie)if(A.opaque)i.splice(ue,P-ue,Y,"overlay "+ie),P=ue+2;else for(;uee.options.maxHighlightLength&&Vt(e.doc.mode,r.state),a=fa(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Jt(r,!0,t);var a=Tc(e,t,n),l=a>r.first&&Ae(r,a-1).stateAfter,u=l?Jt.fromSaved(r,l,a):new Jt(r,Gr(r.mode),a);return r.iter(a,t,function(f){ro(e,f.text,u);var m=u.line;f.stateAfter=m==t-1||m%5==0||m>=i.viewFrom&&mt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var ha=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function ga(e,t,n,r){var i=e.doc,a=i.mode,l;t=Re(i,t);var u=Ae(i,t.line),f=wn(e,t.line,n),m=new at(u.text,e.options.tabSize,f),A;for(r&&(A=[]);(r||m.pose.options.maxHighlightLength?(u=!1,l&&ro(e,t,r,A.pos),A.pos=t.length,P=null):P=ma(no(n,A,r.state,J),a),J){var Y=J[0].name;Y&&(P="m-"+(P?Y+" "+P:Y))}if(!u||m!=P){for(;fl;--u){if(u<=a.first)return a.first;var f=Ae(a,u-1),m=f.stateAfter;if(m&&(!n||u+(m instanceof ri?m.lookAhead:0)<=a.modeFrontier))return u;var A=Oe(f.text,null,e.options.tabSize);(i==null||r>A)&&(i=u-1,r=A)}return i}function Lc(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ae(e,r).stateAfter;if(i&&(!(i instanceof ri)||r+i.lookAhead=t:a.to>t);(r||(r=[])).push(new ni(l,a.from,f?null:a.to))}}return r}function Dc(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t);if(u||a.from==t&&l.type=="bookmark"&&(!n||a.marker.insertLeft)){var f=a.from==null||(l.inclusiveLeft?a.from<=t:a.from0&&u)for(var Ce=0;Ce0)){var A=[f,1],P=ye(m.from,u.from),J=ye(m.to,u.to);(P<0||!l.inclusiveLeft&&!P)&&A.push({from:m.from,to:u.from}),(J>0||!l.inclusiveRight&&!J)&&A.push({from:u.to,to:m.to}),i.splice.apply(i,A),f+=A.length-3}}return i}function xa(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||oo(r,a.marker)<0)&&(r=a.marker)}return r}function Sa(e,t,n,r,i){var a=Ae(e,t),l=or&&a.markedSpans;if(l)for(var u=0;u=0&&P<=0||A<=0&&P>=0)&&(A<=0&&(f.marker.inclusiveRight&&i.inclusiveLeft?ye(m.to,n)>=0:ye(m.to,n)>0)||A>=0&&(f.marker.inclusiveRight&&i.inclusiveLeft?ye(m.from,r)<=0:ye(m.from,r)<0)))return!0}}}function Zt(e){for(var t;t=wa(e);)e=t.find(-1,!0).line;return e}function Fc(e){for(var t;t=ai(e);)e=t.find(1,!0).line;return e}function Nc(e){for(var t,n;t=ai(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ao(e,t){var n=Ae(e,t),r=Zt(n);return n==r?t:k(r)}function Ta(e,t){if(t>e.lastLine())return t;var n=Ae(e,t),r;if(!mr(e,n))return t;for(;r=ai(n);)n=r.find(1,!0).line;return k(n)+1}function mr(e,t){var n=or&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Xr=function(e,t,n){this.text=e,_a(this,t),this.height=n?n(this):1};Xr.prototype.lineNo=function(){return k(this)},Wt(Xr);function Oc(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),xa(e),_a(e,n);var i=r?r(e):1;i!=e.height&&jt(e,i)}function Pc(e){e.parent=null,xa(e)}var jc={},Rc={};function La(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Rc:jc;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Ca(e,t){var n=K("span",null,null,g?"padding-right: .1px":null),r={pre:K("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Bc,pr(e.display.measure)&&(l=Pe(a,e.doc.direction))&&(r.addToken=Uc(r.addToken,l)),r.map=[];var u=t!=e.display.externalMeasured&&k(a);$c(a,r,da(e,a,u)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=xe(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=xe(a.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(ei(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(g){var f=r.content.lastChild;(/\bcm-tab\b/.test(f.className)||f.querySelector&&f.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return it(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=xe(r.pre.className,r.textClass||"")),r}function Hc(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Bc(e,t,n,r,i,a,l){if(t){var u=e.splitSpaces?Wc(t,e.trailingSpace):t,f=e.cm.state.specialChars,m=!1,A;if(!f.test(t))e.col+=t.length,A=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,A),s&&h<9&&(m=!0),e.pos+=t.length;else{A=document.createDocumentFragment();for(var P=0;;){f.lastIndex=P;var J=f.exec(t),Y=J?J.index-P:t.length-P;if(Y){var ie=document.createTextNode(u.slice(P,P+Y));s&&h<9?A.appendChild(_("span",[ie])):A.appendChild(ie),e.map.push(e.pos,e.pos+Y,ie),e.col+=Y,e.pos+=Y}if(!J)break;P+=Y+1;var ue=void 0;if(J[0]==" "){var me=e.cm.options.tabSize,ve=me-e.col%me;ue=A.appendChild(_("span",G(ve),"cm-tab")),ue.setAttribute("role","presentation"),ue.setAttribute("cm-text"," "),e.col+=ve}else J[0]=="\r"||J[0]==` -`?(ue=A.appendChild(_("span",J[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ue.setAttribute("cm-text",J[0]),e.col+=1):(ue=e.cm.options.specialCharPlaceholder(J[0]),ue.setAttribute("cm-text",J[0]),s&&h<9?A.appendChild(_("span",[ue])):A.appendChild(ue),e.col+=1);e.map.push(e.pos,e.pos+1,ue),e.pos++}}if(e.trailingSpace=u.charCodeAt(t.length-1)==32,n||r||i||m||a||l){var _e=n||"";r&&(_e+=r),i&&(_e+=i);var be=_("span",[A],_e,a);if(l)for(var Ce in l)l.hasOwnProperty(Ce)&&Ce!="style"&&Ce!="class"&&be.setAttribute(Ce,l[Ce]);return e.content.appendChild(be)}e.content.appendChild(A)}}function Wc(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;im&&P.from<=m));J++);if(P.to>=A)return e(n,r,i,a,l,u,f);e(n,r.slice(0,P.to-m),i,a,null,u,f),a=null,r=r.slice(P.to-m),m=P.to}}}function Ea(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function $c(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var l=1;lf||$e.collapsed&&Ie.to==f&&Ie.from==f)){if(Ie.to!=null&&Ie.to!=f&&Y>Ie.to&&(Y=Ie.to,ue=""),$e.className&&(ie+=" "+$e.className),$e.css&&(J=(J?J+";":"")+$e.css),$e.startStyle&&Ie.from==f&&(me+=" "+$e.startStyle),$e.endStyle&&Ie.to==Y&&(Ce||(Ce=[])).push($e.endStyle,Ie.to),$e.title&&((_e||(_e={})).title=$e.title),$e.attributes)for(var Ve in $e.attributes)(_e||(_e={}))[Ve]=$e.attributes[Ve];$e.collapsed&&(!ve||oo(ve.marker,$e)<0)&&(ve=Ie)}else Ie.from>f&&Y>Ie.from&&(Y=Ie.from)}if(Ce)for(var vt=0;vt=u)break;for(var Ot=Math.min(u,Y);;){if(A){var At=f+A.length;if(!ve){var ut=At>Ot?A.slice(0,Ot-f):A;t.addToken(t,ut,P?P+ie:ie,me,f+ut.length==Y?ue:"",J,_e)}if(At>=Ot){A=A.slice(Ot-f),f=Ot;break}f=At,me=""}A=i.slice(a,a=n[m++]),P=La(n[m++],t.cm.options)}}}function za(e,t,n){this.line=t,this.rest=Nc(t),this.size=this.rest?k(ce(this.rest))-n+1:1,this.node=this.text=null,this.hidden=mr(e,t)}function si(e,t,n){for(var r=[],i,a=t;a2&&a.push((f.bottom+m.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Na(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rf(e,t){t=Zt(t);var n=k(t),r=e.display.externalMeasured=new za(e.doc,t,n);r.lineN=n;var i=r.built=Ca(e,r);return r.text=i.pre,V(e.display.lineMeasure,i.pre),r}function Oa(e,t,n,r){return tr(e,Qr(e,t),n,r)}function po(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(a=f-u,i=a-1,t>=f&&(l="right")),i!=null){if(r=e[m+2],u==f&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;m&&e[m-2]==e[m-3]&&e[m-1].insertLeft;)r=e[(m-=3)+2],l="left";if(n=="right"&&i==f-u)for(;m=0&&(n=e[i]).left==n.right;i--);return n}function of(e,t,n,r){var i=ja(t.map,n,r),a=i.node,l=i.start,u=i.end,f=i.collapse,m;if(a.nodeType==3){for(var A=0;A<4;A++){for(;l&&W(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+u0&&(f=r="right");var P;e.options.lineWrapping&&(P=a.getClientRects()).length>1?m=P[r=="right"?P.length-1:0]:m=a.getBoundingClientRect()}if(s&&h<9&&!l&&(!m||!m.left&&!m.right)){var J=a.parentNode.getClientRects()[0];J?m={left:J.left,right:J.left+Jr(e.display),top:J.top,bottom:J.bottom}:m=Pa}for(var Y=m.top-t.rect.top,ie=m.bottom-t.rect.top,ue=(Y+ie)/2,me=t.view.measure.heights,ve=0;ve=r.text.length?(f=r.text.length,m="before"):f<=0&&(f=0,m="after"),!u)return l(m=="before"?f-1:f,m=="before");function A(ie,ue,me){var ve=u[ue],_e=ve.level==1;return l(me?ie-1:ie,_e!=me)}var P=Pt(u,f,m),J=dt,Y=A(f,P,m=="before");return J!=null&&(Y.other=A(f,J,m!="before")),Y}function $a(e,t){var n=0;t=Re(e.doc,t),e.options.lineWrapping||(n=Jr(e.display)*t.ch);var r=Ae(e.doc,t.line),i=ar(r)+ui(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function go(e,t,n,r,i){var a=ne(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function mo(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return go(r.first,0,null,-1,-1);var i=O(r,n),a=r.first+r.size-1;if(i>a)return go(r.first+r.size-1,Ae(r,a).text.length,null,1,1);t<0&&(t=0);for(var l=Ae(r,i);;){var u=lf(e,l,i,t,n),f=Ic(l,u.ch+(u.xRel>0||u.outside>0?1:0));if(!f)return u;var m=f.find(1);if(m.line==i)return m;l=Ae(r,i=m.line)}}function Ka(e,t,n,r){r-=ho(t);var i=t.text.length,a=De(function(l){return tr(e,n,l-1).bottom<=r},i,0);return i=De(function(l){return tr(e,n,l).top>r},a,i),{begin:a,end:i}}function Ga(e,t,n,r){n||(n=Qr(e,t));var i=ci(e,t,tr(e,n,r),"line").top;return Ka(e,t,n,i)}function vo(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function lf(e,t,n,r,i){i-=ar(t);var a=Qr(e,t),l=ho(t),u=0,f=t.text.length,m=!0,A=Pe(t,e.doc.direction);if(A){var P=(e.options.lineWrapping?uf:sf)(e,t,n,a,A,r,i);m=P.level!=1,u=m?P.from:P.to-1,f=m?P.to:P.from-1}var J=null,Y=null,ie=De(function(Ne){var Ie=tr(e,a,Ne);return Ie.top+=l,Ie.bottom+=l,vo(Ie,r,i,!1)?(Ie.top<=i&&Ie.left<=r&&(J=Ne,Y=Ie),!0):!1},u,f),ue,me,ve=!1;if(Y){var _e=r-Y.left=Ce.bottom?1:0}return ie=se(t.text,ie,1),go(n,ie,me,ve,r-ue)}function sf(e,t,n,r,i,a,l){var u=De(function(P){var J=i[P],Y=J.level!=1;return vo(Xt(e,ne(n,Y?J.to:J.from,Y?"before":"after"),"line",t,r),a,l,!0)},0,i.length-1),f=i[u];if(u>0){var m=f.level!=1,A=Xt(e,ne(n,m?f.from:f.to,m?"after":"before"),"line",t,r);vo(A,a,l,!0)&&A.top>l&&(f=i[u-1])}return f}function uf(e,t,n,r,i,a,l){var u=Ka(e,t,r,l),f=u.begin,m=u.end;/\s/.test(t.text.charAt(m-1))&&m--;for(var A=null,P=null,J=0;J=m||Y.to<=f)){var ie=Y.level!=1,ue=tr(e,r,ie?Math.min(m,Y.to)-1:Math.max(f,Y.from)).right,me=ueme)&&(A=Y,P=me)}}return A||(A=i[i.length-1]),A.fromm&&(A={from:A.from,to:m,level:A.level}),A}var zr;function Vr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(zr==null){zr=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)zr.appendChild(document.createTextNode("x")),zr.appendChild(_("br"));zr.appendChild(document.createTextNode("x"))}V(e.measure,zr);var n=zr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),j(e.measure),n||1}function Jr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),n=_("pre",[t],"CodeMirror-line-like");V(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function bo(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,l=0;a;a=a.nextSibling,++l){var u=e.display.gutterSpecs[l].className;n[u]=a.offsetLeft+a.clientLeft+i,r[u]=a.clientWidth}return{fixedPos:yo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function yo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Za(e){var t=Vr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Jr(e.display)-3);return function(i){if(mr(e.doc,i))return 0;var a=0;if(i.widgets)for(var l=0;l0&&(m=Ae(e.doc,f.line).text).length==f.ch){var A=Oe(m,m.length,e.options.tabSize)-m.length;f=ne(f.line,Math.max(0,Math.round((a-Fa(e.display).left)/Jr(e.display))-A))}return f}function Ar(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)or&&ao(e.doc,t)i.viewFrom?br(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)br(e);else if(t<=i.viewFrom){var a=di(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):br(e)}else if(n>=i.viewTo){var l=di(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):br(e)}else{var u=di(e,t,t,-1),f=di(e,n,n+r,1);u&&f?(i.view=i.view.slice(0,u.index).concat(si(e,u.lineN,f.lineN)).concat(i.view.slice(f.index)),i.viewTo+=r):br(e)}var m=i.externalMeasured;m&&(n=i.lineN&&t=r.viewTo)){var a=r.view[Ar(e,t)];if(a.node!=null){var l=a.changes||(a.changes=[]);Se(l,n)==-1&&l.push(n)}}}function br(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function di(e,t,n,r){var i=Ar(e,t),a,l=e.display.view;if(!or||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var u=e.display.viewFrom,f=0;f0){if(i==l.length-1)return null;a=u+l[i].size-t,i++}else a=u-t;t+=a,n+=a}for(;ao(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function cf(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=si(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=si(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Ar(e,n)))),r.viewTo=n}function Xa(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||f.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var u=n.appendChild(_("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));u.style.display="",u.style.left=r.other.left+"px",u.style.top=r.other.top+"px",u.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function pi(e,t){return e.top-t.top||e.left-t.left}function ff(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),l=Fa(e.display),u=l.left,f=Math.max(r.sizerWidth,Er(e)-r.sizer.offsetLeft)-l.right,m=i.direction=="ltr";function A(be,Ce,Ne,Ie){Ce<0&&(Ce=0),Ce=Math.round(Ce),Ie=Math.round(Ie),a.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+be+`px; +`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=a.indexOf("\r");l!=-1?(n.push(a.slice(0,l)),t+=l+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},hr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ti=function(){var e=x("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),$t=null;function to(e){if($t!=null)return $t;var t=V(e,x("span","x")),n=t.getBoundingClientRect(),r=X(t,0,1).getBoundingClientRect();return $t=Math.abs(n.left-r.left)>1}var Wr={},Kt={};function Gt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wr[e]=t}function Cr(e,t){Kt[e]=t}function Ur(e){if(typeof e=="string"&&Kt.hasOwnProperty(e))e=Kt[e];else if(e&&typeof e.name=="string"&&Kt.hasOwnProperty(e.name)){var t=Kt[e.name];typeof t=="string"&&(t={name:t}),e=oe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ur("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ur("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function $r(e,t){t=Ur(t);var n=Wr[t.name];if(!n)return $r(e,"text/plain");var r=n(e,t);if(gr.hasOwnProperty(t.name)){var i=gr[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var gr={};function Kr(e,t){var n=gr.hasOwnProperty(e)?gr[e]:gr[e]={};ge(t,n)}function Vt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function _n(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Gr(e,t,n){return e.startState?e.startState(t,n):!0}var at=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.post},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ae(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?ne(n,Ae(e,n).text.length):Sc(t,Ae(e,t.line).text.length)}function Sc(e,t){var n=e.ch;return n==null||n>t?ne(e.line,t):n<0?ne(e.line,0):e}function ca(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Jt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Jt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Jt.fromSaved=function(e,t,n){return t instanceof ri?new Jt(e,Vt(e.mode,t.state),n,t.lookAhead):new Jt(e,Vt(e.mode,t),n)},Jt.prototype.save=function(e){var t=e!==!1?Vt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ri(t,this.maxLookAhead):t};function fa(e,t,n,r){var i=[e.state.modeGen],a={};va(e,t.text,e.doc.mode,n,function(m,A){return i.push(m,A)},a,r);for(var l=n.state,u=function(m){n.baseTokens=i;var A=e.state.overlays[m],j=1,ee=0;n.state=!0,va(e,t.text,A.mode,n,function(Y,ie){for(var ue=j;eeY&&i.splice(j,1,Y,i[j+1],me),j+=2,ee=Math.min(Y,me)}if(ie)if(A.opaque)i.splice(ue,j-ue,Y,"overlay "+ie),j=ue+2;else for(;uee.options.maxHighlightLength&&Vt(e.doc.mode,r.state),a=fa(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Jt(r,!0,t);var a=Tc(e,t,n),l=a>r.first&&Ae(r,a-1).stateAfter,u=l?Jt.fromSaved(r,l,a):new Jt(r,Gr(r.mode),a);return r.iter(a,t,function(f){ro(e,f.text,u);var m=u.line;f.stateAfter=m==t-1||m%5==0||m>=i.viewFrom&&mt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var ha=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function ga(e,t,n,r){var i=e.doc,a=i.mode,l;t=Re(i,t);var u=Ae(i,t.line),f=wn(e,t.line,n),m=new at(u.text,e.options.tabSize,f),A;for(r&&(A=[]);(r||m.pose.options.maxHighlightLength?(u=!1,l&&ro(e,t,r,A.pos),A.pos=t.length,j=null):j=ma(no(n,A,r.state,ee),a),ee){var Y=ee[0].name;Y&&(j="m-"+(j?Y+" "+j:Y))}if(!u||m!=j){for(;fl;--u){if(u<=a.first)return a.first;var f=Ae(a,u-1),m=f.stateAfter;if(m&&(!n||u+(m instanceof ri?m.lookAhead:0)<=a.modeFrontier))return u;var A=Oe(f.text,null,e.options.tabSize);(i==null||r>A)&&(i=u-1,r=A)}return i}function Lc(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ae(e,r).stateAfter;if(i&&(!(i instanceof ri)||r+i.lookAhead=t:a.to>t);(r||(r=[])).push(new ni(l,a.from,f?null:a.to))}}return r}function Dc(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t);if(u||a.from==t&&l.type=="bookmark"&&(!n||a.marker.insertLeft)){var f=a.from==null||(l.inclusiveLeft?a.from<=t:a.from0&&u)for(var Ce=0;Ce0)){var A=[f,1],j=ye(m.from,u.from),ee=ye(m.to,u.to);(j<0||!l.inclusiveLeft&&!j)&&A.push({from:m.from,to:u.from}),(ee>0||!l.inclusiveRight&&!ee)&&A.push({from:u.to,to:m.to}),i.splice.apply(i,A),f+=A.length-3}}return i}function xa(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||oo(r,a.marker)<0)&&(r=a.marker)}return r}function Sa(e,t,n,r,i){var a=Ae(e,t),l=or&&a.markedSpans;if(l)for(var u=0;u=0&&j<=0||A<=0&&j>=0)&&(A<=0&&(f.marker.inclusiveRight&&i.inclusiveLeft?ye(m.to,n)>=0:ye(m.to,n)>0)||A>=0&&(f.marker.inclusiveRight&&i.inclusiveLeft?ye(m.from,r)<=0:ye(m.from,r)<0)))return!0}}}function Zt(e){for(var t;t=wa(e);)e=t.find(-1,!0).line;return e}function Ic(e){for(var t;t=ai(e);)e=t.find(1,!0).line;return e}function Nc(e){for(var t,n;t=ai(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ao(e,t){var n=Ae(e,t),r=Zt(n);return n==r?t:_(r)}function Ta(e,t){if(t>e.lastLine())return t;var n=Ae(e,t),r;if(!mr(e,n))return t;for(;r=ai(n);)n=r.find(1,!0).line;return _(n)+1}function mr(e,t){var n=or&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Xr=function(e,t,n){this.text=e,_a(this,t),this.height=n?n(this):1};Xr.prototype.lineNo=function(){return _(this)},Wt(Xr);function Oc(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),xa(e),_a(e,n);var i=r?r(e):1;i!=e.height&&jt(e,i)}function Pc(e){e.parent=null,xa(e)}var jc={},Rc={};function La(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Rc:jc;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Ca(e,t){var n=K("span",null,null,g?"padding-right: .1px":null),r={pre:K("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Bc,pr(e.display.measure)&&(l=Pe(a,e.doc.direction))&&(r.addToken=Uc(r.addToken,l)),r.map=[];var u=t!=e.display.externalMeasured&&_(a);$c(a,r,da(e,a,u)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=xe(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=xe(a.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(ei(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(g){var f=r.content.lastChild;(/\bcm-tab\b/.test(f.className)||f.querySelector&&f.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return it(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=xe(r.pre.className,r.textClass||"")),r}function Hc(e){var t=x("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Bc(e,t,n,r,i,a,l){if(t){var u=e.splitSpaces?Wc(t,e.trailingSpace):t,f=e.cm.state.specialChars,m=!1,A;if(!f.test(t))e.col+=t.length,A=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,A),s&&h<9&&(m=!0),e.pos+=t.length;else{A=document.createDocumentFragment();for(var j=0;;){f.lastIndex=j;var ee=f.exec(t),Y=ee?ee.index-j:t.length-j;if(Y){var ie=document.createTextNode(u.slice(j,j+Y));s&&h<9?A.appendChild(x("span",[ie])):A.appendChild(ie),e.map.push(e.pos,e.pos+Y,ie),e.col+=Y,e.pos+=Y}if(!ee)break;j+=Y+1;var ue=void 0;if(ee[0]==" "){var me=e.cm.options.tabSize,ve=me-e.col%me;ue=A.appendChild(x("span",Z(ve),"cm-tab")),ue.setAttribute("role","presentation"),ue.setAttribute("cm-text"," "),e.col+=ve}else ee[0]=="\r"||ee[0]==` +`?(ue=A.appendChild(x("span",ee[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ue.setAttribute("cm-text",ee[0]),e.col+=1):(ue=e.cm.options.specialCharPlaceholder(ee[0]),ue.setAttribute("cm-text",ee[0]),s&&h<9?A.appendChild(x("span",[ue])):A.appendChild(ue),e.col+=1);e.map.push(e.pos,e.pos+1,ue),e.pos++}}if(e.trailingSpace=u.charCodeAt(t.length-1)==32,n||r||i||m||a||l){var _e=n||"";r&&(_e+=r),i&&(_e+=i);var be=x("span",[A],_e,a);if(l)for(var Ce in l)l.hasOwnProperty(Ce)&&Ce!="style"&&Ce!="class"&&be.setAttribute(Ce,l[Ce]);return e.content.appendChild(be)}e.content.appendChild(A)}}function Wc(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;im&&j.from<=m));ee++);if(j.to>=A)return e(n,r,i,a,l,u,f);e(n,r.slice(0,j.to-m),i,a,null,u,f),a=null,r=r.slice(j.to-m),m=j.to}}}function Ea(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function $c(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var l=1;lf||$e.collapsed&&Fe.to==f&&Fe.from==f)){if(Fe.to!=null&&Fe.to!=f&&Y>Fe.to&&(Y=Fe.to,ue=""),$e.className&&(ie+=" "+$e.className),$e.css&&(ee=(ee?ee+";":"")+$e.css),$e.startStyle&&Fe.from==f&&(me+=" "+$e.startStyle),$e.endStyle&&Fe.to==Y&&(Ce||(Ce=[])).push($e.endStyle,Fe.to),$e.title&&((_e||(_e={})).title=$e.title),$e.attributes)for(var Ve in $e.attributes)(_e||(_e={}))[Ve]=$e.attributes[Ve];$e.collapsed&&(!ve||oo(ve.marker,$e)<0)&&(ve=Fe)}else Fe.from>f&&Y>Fe.from&&(Y=Fe.from)}if(Ce)for(var vt=0;vt=u)break;for(var Ot=Math.min(u,Y);;){if(A){var At=f+A.length;if(!ve){var ut=At>Ot?A.slice(0,Ot-f):A;t.addToken(t,ut,j?j+ie:ie,me,f+ut.length==Y?ue:"",ee,_e)}if(At>=Ot){A=A.slice(Ot-f),f=Ot;break}f=At,me=""}A=i.slice(a,a=n[m++]),j=La(n[m++],t.cm.options)}}}function za(e,t,n){this.line=t,this.rest=Nc(t),this.size=this.rest?_(ce(this.rest))-n+1:1,this.node=this.text=null,this.hidden=mr(e,t)}function si(e,t,n){for(var r=[],i,a=t;a2&&a.push((f.bottom+m.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Na(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rf(e,t){t=Zt(t);var n=_(t),r=e.display.externalMeasured=new za(e.doc,t,n);r.lineN=n;var i=r.built=Ca(e,r);return r.text=i.pre,V(e.display.lineMeasure,i.pre),r}function Oa(e,t,n,r){return tr(e,Qr(e,t),n,r)}function po(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(a=f-u,i=a-1,t>=f&&(l="right")),i!=null){if(r=e[m+2],u==f&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;m&&e[m-2]==e[m-3]&&e[m-1].insertLeft;)r=e[(m-=3)+2],l="left";if(n=="right"&&i==f-u)for(;m=0&&(n=e[i]).left==n.right;i--);return n}function of(e,t,n,r){var i=ja(t.map,n,r),a=i.node,l=i.start,u=i.end,f=i.collapse,m;if(a.nodeType==3){for(var A=0;A<4;A++){for(;l&&B(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+u0&&(f=r="right");var j;e.options.lineWrapping&&(j=a.getClientRects()).length>1?m=j[r=="right"?j.length-1:0]:m=a.getBoundingClientRect()}if(s&&h<9&&!l&&(!m||!m.left&&!m.right)){var ee=a.parentNode.getClientRects()[0];ee?m={left:ee.left,right:ee.left+Jr(e.display),top:ee.top,bottom:ee.bottom}:m=Pa}for(var Y=m.top-t.rect.top,ie=m.bottom-t.rect.top,ue=(Y+ie)/2,me=t.view.measure.heights,ve=0;ve=r.text.length?(f=r.text.length,m="before"):f<=0&&(f=0,m="after"),!u)return l(m=="before"?f-1:f,m=="before");function A(ie,ue,me){var ve=u[ue],_e=ve.level==1;return l(me?ie-1:ie,_e!=me)}var j=Pt(u,f,m),ee=dt,Y=A(f,j,m=="before");return ee!=null&&(Y.other=A(f,ee,m!="before")),Y}function $a(e,t){var n=0;t=Re(e.doc,t),e.options.lineWrapping||(n=Jr(e.display)*t.ch);var r=Ae(e.doc,t.line),i=ar(r)+ui(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function go(e,t,n,r,i){var a=ne(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function mo(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return go(r.first,0,null,-1,-1);var i=P(r,n),a=r.first+r.size-1;if(i>a)return go(r.first+r.size-1,Ae(r,a).text.length,null,1,1);t<0&&(t=0);for(var l=Ae(r,i);;){var u=lf(e,l,i,t,n),f=Fc(l,u.ch+(u.xRel>0||u.outside>0?1:0));if(!f)return u;var m=f.find(1);if(m.line==i)return m;l=Ae(r,i=m.line)}}function Ka(e,t,n,r){r-=ho(t);var i=t.text.length,a=De(function(l){return tr(e,n,l-1).bottom<=r},i,0);return i=De(function(l){return tr(e,n,l).top>r},a,i),{begin:a,end:i}}function Ga(e,t,n,r){n||(n=Qr(e,t));var i=ci(e,t,tr(e,n,r),"line").top;return Ka(e,t,n,i)}function vo(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function lf(e,t,n,r,i){i-=ar(t);var a=Qr(e,t),l=ho(t),u=0,f=t.text.length,m=!0,A=Pe(t,e.doc.direction);if(A){var j=(e.options.lineWrapping?uf:sf)(e,t,n,a,A,r,i);m=j.level!=1,u=m?j.from:j.to-1,f=m?j.to:j.from-1}var ee=null,Y=null,ie=De(function(Ne){var Fe=tr(e,a,Ne);return Fe.top+=l,Fe.bottom+=l,vo(Fe,r,i,!1)?(Fe.top<=i&&Fe.left<=r&&(ee=Ne,Y=Fe),!0):!1},u,f),ue,me,ve=!1;if(Y){var _e=r-Y.left=Ce.bottom?1:0}return ie=se(t.text,ie,1),go(n,ie,me,ve,r-ue)}function sf(e,t,n,r,i,a,l){var u=De(function(j){var ee=i[j],Y=ee.level!=1;return vo(Xt(e,ne(n,Y?ee.to:ee.from,Y?"before":"after"),"line",t,r),a,l,!0)},0,i.length-1),f=i[u];if(u>0){var m=f.level!=1,A=Xt(e,ne(n,m?f.from:f.to,m?"after":"before"),"line",t,r);vo(A,a,l,!0)&&A.top>l&&(f=i[u-1])}return f}function uf(e,t,n,r,i,a,l){var u=Ka(e,t,r,l),f=u.begin,m=u.end;/\s/.test(t.text.charAt(m-1))&&m--;for(var A=null,j=null,ee=0;ee=m||Y.to<=f)){var ie=Y.level!=1,ue=tr(e,r,ie?Math.min(m,Y.to)-1:Math.max(f,Y.from)).right,me=ueme)&&(A=Y,j=me)}}return A||(A=i[i.length-1]),A.fromm&&(A={from:A.from,to:m,level:A.level}),A}var zr;function Vr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(zr==null){zr=x("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)zr.appendChild(document.createTextNode("x")),zr.appendChild(x("br"));zr.appendChild(document.createTextNode("x"))}V(e.measure,zr);var n=zr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),R(e.measure),n||1}function Jr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=x("span","xxxxxxxxxx"),n=x("pre",[t],"CodeMirror-line-like");V(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function bo(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,l=0;a;a=a.nextSibling,++l){var u=e.display.gutterSpecs[l].className;n[u]=a.offsetLeft+a.clientLeft+i,r[u]=a.clientWidth}return{fixedPos:yo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function yo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Za(e){var t=Vr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Jr(e.display)-3);return function(i){if(mr(e.doc,i))return 0;var a=0;if(i.widgets)for(var l=0;l0&&(m=Ae(e.doc,f.line).text).length==f.ch){var A=Oe(m,m.length,e.options.tabSize)-m.length;f=ne(f.line,Math.max(0,Math.round((a-Ia(e.display).left)/Jr(e.display))-A))}return f}function Ar(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)or&&ao(e.doc,t)i.viewFrom?br(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)br(e);else if(t<=i.viewFrom){var a=di(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):br(e)}else if(n>=i.viewTo){var l=di(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):br(e)}else{var u=di(e,t,t,-1),f=di(e,n,n+r,1);u&&f?(i.view=i.view.slice(0,u.index).concat(si(e,u.lineN,f.lineN)).concat(i.view.slice(f.index)),i.viewTo+=r):br(e)}var m=i.externalMeasured;m&&(n=i.lineN&&t=r.viewTo)){var a=r.view[Ar(e,t)];if(a.node!=null){var l=a.changes||(a.changes=[]);Se(l,n)==-1&&l.push(n)}}}function br(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function di(e,t,n,r){var i=Ar(e,t),a,l=e.display.view;if(!or||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var u=e.display.viewFrom,f=0;f0){if(i==l.length-1)return null;a=u+l[i].size-t,i++}else a=u-t;t+=a,n+=a}for(;ao(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function cf(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=si(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=si(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Ar(e,n)))),r.viewTo=n}function Xa(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||f.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var u=n.appendChild(x("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));u.style.display="",u.style.left=r.other.left+"px",u.style.top=r.other.top+"px",u.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function pi(e,t){return e.top-t.top||e.left-t.left}function ff(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),l=Ia(e.display),u=l.left,f=Math.max(r.sizerWidth,Er(e)-r.sizer.offsetLeft)-l.right,m=i.direction=="ltr";function A(be,Ce,Ne,Fe){Ce<0&&(Ce=0),Ce=Math.round(Ce),Fe=Math.round(Fe),a.appendChild(x("div",null,"CodeMirror-selected","position: absolute; left: "+be+`px; top: `+Ce+"px; width: "+(Ne??f-be)+`px; - height: `+(Ie-Ce)+"px"))}function P(be,Ce,Ne){var Ie=Ae(i,be),$e=Ie.text.length,Ve,vt;function rt(ut,Dt){return fi(e,ne(be,ut),"div",Ie,Dt)}function Ot(ut,Dt,yt){var ft=Ga(e,Ie,null,ut),ct=Dt=="ltr"==(yt=="after")?"left":"right",lt=yt=="after"?ft.begin:ft.end-(/\s/.test(Ie.text.charAt(ft.end-1))?2:1);return rt(lt,ct)[ct]}var At=Pe(Ie,i.direction);return nt(At,Ce||0,Ne??$e,function(ut,Dt,yt,ft){var ct=yt=="ltr",lt=rt(ut,ct?"left":"right"),qt=rt(Dt-1,ct?"right":"left"),pn=Ce==null&&ut==0,Sr=Ne==null&&Dt==$e,St=ft==0,rr=!At||ft==At.length-1;if(qt.top-lt.top<=3){var bt=(m?pn:Sr)&&St,Zo=(m?Sr:pn)&&rr,cr=bt?u:(ct?lt:qt).left,Nr=Zo?f:(ct?qt:lt).right;A(cr,lt.top,Nr-cr,lt.bottom)}else{var Or,Lt,hn,Xo;ct?(Or=m&&pn&&St?u:lt.left,Lt=m?f:Ot(ut,yt,"before"),hn=m?u:Ot(Dt,yt,"after"),Xo=m&&Sr&&rr?f:qt.right):(Or=m?Ot(ut,yt,"before"):u,Lt=!m&&pn&&St?f:lt.right,hn=!m&&Sr&&rr?u:qt.left,Xo=m?Ot(Dt,yt,"after"):f),A(Or,lt.top,Lt-Or,lt.bottom),lt.bottom0?t.blinker=setInterval(function(){e.hasFocus()||en(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||So(e))}function wo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&en(e))},100)}function So(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,le(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),g&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ko(e))}function en(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,Q(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function hi(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,l=0;l.005||Y<-.005)&&(ie.display.sizerWidth){var ue=Math.ceil(A/Jr(e.display));ue>e.display.maxLineLength&&(e.display.maxLineLength=ue,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Va(e){if(e.widgets)for(var t=0;t=l&&(a=O(t,ar(Ae(t,f))-e.wrapper.clientHeight),l=f)}return{from:a,to:Math.max(l,a+1)}}function df(e,t){if(!ot(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!z){var l=_("div","\u200B",null,`position: absolute; + height: `+(Fe-Ce)+"px"))}function j(be,Ce,Ne){var Fe=Ae(i,be),$e=Fe.text.length,Ve,vt;function rt(ut,Dt){return fi(e,ne(be,ut),"div",Fe,Dt)}function Ot(ut,Dt,yt){var ft=Ga(e,Fe,null,ut),ct=Dt=="ltr"==(yt=="after")?"left":"right",lt=yt=="after"?ft.begin:ft.end-(/\s/.test(Fe.text.charAt(ft.end-1))?2:1);return rt(lt,ct)[ct]}var At=Pe(Fe,i.direction);return nt(At,Ce||0,Ne??$e,function(ut,Dt,yt,ft){var ct=yt=="ltr",lt=rt(ut,ct?"left":"right"),qt=rt(Dt-1,ct?"right":"left"),pn=Ce==null&&ut==0,Sr=Ne==null&&Dt==$e,St=ft==0,rr=!At||ft==At.length-1;if(qt.top-lt.top<=3){var bt=(m?pn:Sr)&&St,Zo=(m?Sr:pn)&&rr,cr=bt?u:(ct?lt:qt).left,Nr=Zo?f:(ct?qt:lt).right;A(cr,lt.top,Nr-cr,lt.bottom)}else{var Or,Lt,hn,Xo;ct?(Or=m&&pn&&St?u:lt.left,Lt=m?f:Ot(ut,yt,"before"),hn=m?u:Ot(Dt,yt,"after"),Xo=m&&Sr&&rr?f:qt.right):(Or=m?Ot(ut,yt,"before"):u,Lt=!m&&pn&&St?f:lt.right,hn=!m&&Sr&&rr?u:qt.left,Xo=m?Ot(Dt,yt,"after"):f),A(Or,lt.top,Lt-Or,lt.bottom),lt.bottom0?t.blinker=setInterval(function(){e.hasFocus()||en(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||So(e))}function wo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&en(e))},100)}function So(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,le(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),g&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ko(e))}function en(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,Q(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function hi(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,l=0;l.005||Y<-.005)&&(ie.display.sizerWidth){var ue=Math.ceil(A/Jr(e.display));ue>e.display.maxLineLength&&(e.display.maxLineLength=ue,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Va(e){if(e.widgets)for(var t=0;t=l&&(a=P(t,ar(Ae(t,f))-e.wrapper.clientHeight),l=f)}return{from:a,to:Math.max(l,a+1)}}function df(e,t){if(!ot(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!M){var l=x("div","\u200B",null,`position: absolute; top: `+(t.top-n.viewOffset-ui(e.display))+`px; height: `+(t.bottom-t.top+er(e)+n.barHeight)+`px; - left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function pf(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?ne(t.line,t.ch+1,"before"):t,t=t.ch?ne(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var l=!1,u=Xt(e,t),f=!n||n==t?u:Xt(e,n);i={left:Math.min(u.left,f.left),top:Math.min(u.top,f.top)-r,right:Math.max(u.left,f.left),bottom:Math.max(u.bottom,f.bottom)+r};var m=To(e,i),A=e.doc.scrollTop,P=e.doc.scrollLeft;if(m.scrollTop!=null&&(An(e,m.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(l=!0)),m.scrollLeft!=null&&(Dr(e,m.scrollLeft),Math.abs(e.doc.scrollLeft-P)>1&&(l=!0)),!l)break}return i}function hf(e,t){var n=To(e,t);n.scrollTop!=null&&An(e,n.scrollTop),n.scrollLeft!=null&&Dr(e,n.scrollLeft)}function To(e,t){var n=e.display,r=Vr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=fo(e),l={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+co(n),f=t.topu-r;if(t.topi+a){var A=Math.min(t.top,(m?u:t.bottom)-a);A!=i&&(l.scrollTop=A)}var P=e.options.fixedGutter?0:n.gutters.offsetWidth,J=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-P,Y=Er(e)-n.gutters.offsetWidth,ie=t.right-t.left>Y;return ie&&(t.right=t.left+Y),t.left<10?l.scrollLeft=0:t.leftY+J-3&&(l.scrollLeft=t.right+(ie?0:10)-Y),l}function Lo(e,t){t!=null&&(mi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function tn(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,n){(t!=null||n!=null)&&mi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function gf(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=$a(e,t.from),r=$a(e,t.to);Ja(e,n,r,t.margin)}}function Ja(e,t,n,r){var i=To(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(v||Eo(e,{top:t}),el(e,t,!0),v&&Eo(e),In(e,100))}function el(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ol(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Dn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+co(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var qr=function(e,t,n){this.cm=n;var r=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),Fe(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Fe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},qr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qr.prototype.zeroWidthHack=function(){var e=H&&!E?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new qe,this.disableVert=new qe},qr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),a=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},qr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qn=function(){};qn.prototype.update=function(){return{bottom:0,right:0}},qn.prototype.setScrollLeft=function(){},qn.prototype.setScrollTop=function(){},qn.prototype.clear=function(){};function rn(e,t){t||(t=Dn(e));var n=e.display.barWidth,r=e.display.barHeight;tl(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&hi(e),tl(e,Dn(e)),n=e.display.barWidth,r=e.display.barHeight}function tl(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var rl={native:qr,null:qn};function nl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Q(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new rl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Fe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Dr(e,t):An(e,t)},e),e.display.scrollbars.addClass&&le(e.display.wrapper,e.display.scrollbars.addClass)}var mf=0;function Ir(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++mf,markArrays:null},Kc(e.curOp)}function Fr(e){var t=e.curOp;t&&Zc(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new vi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function yf(e){e.updatedDisplay=e.mustUpdate&&Co(e.cm,e.update)}function xf(e){var t=e.cm,n=t.display;e.updatedDisplay&&hi(t),e.barMeasure=Dn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Oa(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+er(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Er(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function _f(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=wn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var l=a.styles,u=a.text.length>e.options.maxHighlightLength?Vt(t.mode,r.state):null,f=fa(e,a,r,!0);u&&(r.state=u),a.styles=f.styles;var m=a.styleClasses,A=f.classes;A?a.styleClasses=A:m&&(a.styleClasses=null);for(var P=!l||l.length!=a.styles.length||m!=A&&(!m||!A||m.bgClass!=A.bgClass||m.textClass!=A.textClass),J=0;!P&&Jn)return In(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Nt(e,function(){for(var a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Xa(e)==0)return!1;al(e)&&(br(e),t.dims=bo(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),or&&(a=ao(e.doc,a),l=Ta(e.doc,l));var u=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;cf(e,a,l),n.viewOffset=ar(Ae(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var f=Xa(e);if(!u&&f==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var m=Tf(e);return f>4&&(n.lineDiv.style.display="none"),Cf(e,n.updateLineNumbers,t.dims),f>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Lf(m),j(n.cursorDiv),j(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,In(e,400)),n.updateLineNumbers=null,!0}function il(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Er(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+co(e.display)-fo(e),n.top)}),t.visible=gi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=gi(e.display,e.doc,n));if(!Co(e,t))break;hi(e);var i=Dn(e);zn(e),rn(e,i),Mo(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Eo(e,t){var n=new vi(e,t);if(Co(e,n)){hi(e),il(e,n);var r=Dn(e);zn(e),rn(e,r),Mo(e,r),n.finish()}}function Cf(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,l=a.firstChild;function u(ie){var ue=ie.nextSibling;return g&&H&&e.display.currentWheelTarget==ie?ie.style.display="none":ie.parentNode.removeChild(ie),ue}for(var f=r.view,m=r.viewFrom,A=0;A-1&&(Y=!1),Ma(e,P,m,n)),Y&&(j(P.lineNumber),P.lineNumber.appendChild(document.createTextNode(he(e.options,m)))),l=P.node.nextSibling}m+=P.size}for(;l;)l=u(l)}function zo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ht(e,"gutterChanged",e)}function Mo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+er(e)+"px"}function ol(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=yo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",l=0;l=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),s&&h<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!g&&!(v&&M)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Ao(r.gutters,r.lineNumbers),ll(i),n.init(i)}var bi=0,sr=null;s?sr=-.53:v?sr=15:x?sr=-.7:w&&(sr=-1/3);function sl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function zf(e){var t=sl(e);return t.x*=sr,t.y*=sr,t}function ul(e,t){x&&c==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=sl(t),r=n.x,i=n.y,a=sr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,a=1);var l=e.display,u=l.scroller,f=u.scrollWidth>u.clientWidth,m=u.scrollHeight>u.clientHeight;if(r&&f||i&&m){if(i&&H&&g){e:for(var A=t.target,P=l.view;A!=u;A=A.parentNode)for(var J=0;J=0&&ye(e,r.to())<=0)return n}return-1};var Ye=function(e,t){this.anchor=e,this.head=t};Ye.prototype.from=function(){return Zr(this.anchor,this.head)},Ye.prototype.to=function(){return Et(this.anchor,this.head)},Ye.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(J,Y){return ye(J.from(),Y.from())}),n=Se(t,i);for(var a=1;a0:f>=0){var m=Zr(u.from(),l.from()),A=Et(u.to(),l.to()),P=u.empty()?l.from()==l.head:u.from()==u.head;a<=n&&--n,t.splice(--a,2,new Ye(P?A:m,P?m:A))}}return new Rt(t,n)}function yr(e,t){return new Rt([new Ye(e,t||e)],0)}function xr(e){return e.text?ne(e.from.line+e.text.length-1,ce(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function cl(e,t){if(ye(e,t.from)<0)return e;if(ye(e,t.to)<=0)return xr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=xr(t).ch-t.to.ch),ne(n,r)}function Do(e,t){for(var n=[],r=0;r1&&e.remove(u.line+1,ie-1),e.insert(u.line+1,ve)}ht(e,"change",e,t)}function _r(e,t,n){function r(i,a,l){if(i.linked)for(var u=0;u1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ce(e.done)}function ml(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,l,u;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Df(i,i.lastOp==r)))u=ce(l.changes),ye(t.from,t.to)==0&&ye(t.from,u.to)==0?u.to=xr(t):l.changes.push(Fo(e,t));else{var f=ce(i.done);for((!f||!f.ranges)&&xi(e.sel,i.done),l={changes:[Fo(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,u||it(e,"historyAdded")}function qf(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function If(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||qf(e,a,ce(i.done),t))?i.done[i.done.length-1]=t:xi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&gl(i.undone)}function xi(e,t){var n=ce(t);n&&n.ranges&&n.equals(e)||t.push(e)}function vl(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=l.markedSpans),++a})}function Ff(e){if(!e)return null;for(var t,n=0;n-1&&(ce(u)[P]=m[P],delete m[P])}}return r}function No(e,t,n,r){if(r){var i=e.anchor;if(n){var a=ye(t,i)<0;a!=ye(n,i)<0?(i=t,t=n):a!=ye(t,n)<0&&(t=n)}return new Ye(i,t)}else return new Ye(n||t,t)}function _i(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),wt(e,new Rt([No(e.sel.primary(),t,n,i)],0),r)}function yl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:u.to>t.ch))){if(i&&(it(f,"beforeCursorEnter"),f.explicitlyCleared))if(a.markedSpans){--l;continue}else break;if(!f.atomic)continue;if(n){var P=f.find(r<0?1:-1),J=void 0;if((r<0?A:m)&&(P=Tl(e,P,-r,P&&P.line==t.line?a:null)),P&&P.line==t.line&&(J=ye(P,n))&&(r<0?J<0:J>0))return on(e,P,t,r,i)}var Y=f.find(r<0?-1:1);return(r<0?m:A)&&(Y=Tl(e,Y,r,Y.line==t.line?a:null)),Y?on(e,Y,t,r,i):null}}return t}function wi(e,t,n,r,i){var a=r||1,l=on(e,t,n,a,i)||!i&&on(e,t,n,a,!0)||on(e,t,n,-a,i)||!i&&on(e,t,n,-a,!0);return l||(e.cantEdit=!0,ne(e.first,0))}function Tl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Re(e,ne(t.line-1)):null:n>0&&t.ch==(r||Ae(e,t.line)).text.length?t.line=0;--i)El(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else El(e,t)}}function El(e,t){if(!(t.text.length==1&&t.text[0]==""&&ye(t.from,t.to)==0)){var n=Do(e,t);ml(e,t,n,e.cm?e.cm.curOp.id:NaN),On(e,t,n,io(e,t));var r=[];_r(e,function(i,a){!a&&Se(r,i.history)==-1&&(Dl(i.history,t),r.push(i.history)),On(i,t,null,io(i,t))})}}function Si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,l=e.sel,u=t=="undo"?i.done:i.undone,f=t=="undo"?i.undone:i.done,m=0;m=0;--Y){var ie=J(Y);if(ie)return ie.v}}}}function zl(e,t){if(t!=0&&(e.first+=t,e.sel=new Rt(Be(e.sel.ranges,function(i){return new Ye(ne(i.anchor.line+t,i.anchor.ch),ne(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){zt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:ne(a,Ae(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ir(e,t.from,t.to),n||(n=Do(e,t)),e.cm?Pf(e.cm,t,r):Io(e,t,r),ki(e,n,ke),e.cantEdit&&wi(e,ne(e.firstLine(),0))&&(e.cantEdit=!1)}}function Pf(e,t,n){var r=e.doc,i=e.display,a=t.from,l=t.to,u=!1,f=a.line;e.options.lineWrapping||(f=k(Zt(Ae(r,a.line))),r.iter(f,l.line+1,function(Y){if(Y==i.maxLine)return u=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ht(e),Io(r,t,n,Za(e)),e.options.lineWrapping||(r.iter(f,a.line+t.text.length,function(Y){var ie=li(Y);ie>i.maxLineLength&&(i.maxLine=Y,i.maxLineLength=ie,i.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),Lc(r,a.line),In(e,400);var m=t.text.length-(l.line-a.line)-1;t.full?zt(e):a.line==l.line&&t.text.length==1&&!dl(e.doc,t)?vr(e,a.line,"text"):zt(e,a.line,l.line+1,m);var A=Ft(e,"changes"),P=Ft(e,"change");if(P||A){var J={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};P&&ht(e,"change",e,J),A&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(J)}e.display.selForContextMenu=null}function ln(e,t,n,r,i){var a;r||(r=n),ye(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t=="string"&&(t=e.splitLines(t)),an(e,{from:n,to:r,text:t,origin:i})}function Ml(e,t,n,r){n1||!(this.children[0]instanceof jn))){var u=[];this.collapse(u),this.children=[new jn(u)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,u=l;u10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=m,e.display.maxLineLength=A,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&zt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&wl(e.doc)),e&&ht(e,"markerCleared",e,this,r,i),t&&Fr(e),this.parent&&this.parent.clear()}},kr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=K("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Sa(e,t.line,t,n,a)||t.line!=n.line&&Sa(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ec()}a.addToHistory&&ml(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var u=t.line,f=e.cm,m;if(e.iter(u,n.line+1,function(P){f&&a.collapsed&&!f.options.lineWrapping&&Zt(P)==f.display.maxLine&&(m=!0),a.collapsed&&u!=t.line&&jt(P,0),Mc(P,new ni(a,u==t.line?t.ch:null,u==n.line?n.ch:null),e.cm&&e.cm.curOp),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(P){mr(e,P)&&jt(P,0)}),a.clearOnEnter&&Fe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Cc(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Il,a.atomic=!0),f){if(m&&(f.curOp.updateMaxLine=!0),a.collapsed)zt(f,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var A=t.line;A<=n.line;A++)vr(f,A,"text");a.atomic&&wl(f.doc),ht(f,"markerAdded",f,a)}return a}var Bn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;f--)an(this,r[f]);u?_l(this,u):this.cm&&tn(this.cm)}),undo:mt(function(){Si(this,"undo")}),redo:mt(function(){Si(this,"redo")}),undoSelection:mt(function(){Si(this,"undo",!0)}),redoSelection:mt(function(){Si(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Re(this,e),t=Re(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var l=a.markedSpans;if(l)for(var u=0;u=f.to||f.from==null&&i!=e.line||f.from!=null&&i==t.line&&f.from>=t.ch)&&(!n||n(f.marker))&&r.push(f.marker.parent||f.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n}),Re(this,ne(n,t))},indexFromPos:function(e){e=Re(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var A=e.dataTransfer.getData("Text");if(A){var P;if(t.state.draggingText&&!t.state.draggingText.copy&&(P=t.listSelections()),ki(t.doc,yr(n,n)),P)for(var J=0;J=0;u--)ln(e.doc,"",r[u].from,r[u].to,"+delete");tn(e)})}function Po(e,t,n){var r=se(e.text,t+n,n);return r<0||r>e.text.length?null:r}function jo(e,t,n){var r=Po(e,t.ch,n);return r==null?null:new ne(t.line,r,n<0?"after":"before")}function Ro(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=Pe(n,t.doc.direction);if(a){var l=i<0?ce(a):a[0],u=i<0==(l.level==1),f=u?"after":"before",m;if(l.level>0||t.doc.direction=="rtl"){var A=Qr(t,n);m=i<0?n.text.length-1:0;var P=tr(t,A,m).top;m=De(function(J){return tr(t,A,J).top==P},i<0==(l.level==1)?l.from:l.to-1,m),f=="before"&&(m=Po(n,m,1))}else m=i<0?l.to:l.from;return new ne(r,m,f)}}return new ne(r,i<0?n.text.length:0,i<0?"before":"after")}function Vf(e,t,n,r){var i=Pe(t,e.doc.direction);if(!i)return jo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=Pt(i,n.ch,n.sticky),l=i[a];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&J>=A.begin)){var Y=P?"before":"after";return new ne(n.line,J,Y)}}var ie=function(ve,_e,be){for(var Ce=function(Ve,vt){return vt?new ne(n.line,u(Ve,1),"before"):new ne(n.line,Ve,"after")};ve>=0&&ve0==(Ne.level!=1),$e=Ie?be.begin:u(be.end,-1);if(Ne.from<=$e&&$e0?A.end:u(A.begin,-1);return me!=null&&!(r>0&&me==t.text.length)&&(ue=ie(r>0?0:i.length-1,r,m(me)),ue)?ue:null}var $n={selectAll:Ll,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return cn(e,function(t){if(t.empty()){var n=Ae(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ne(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),ne(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ae(e.doc,i.line-1).text;l&&(i=new ne(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ne(i.line-1,l.length-1),i,"+transpose"))}}n.push(new Ye(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Nt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&ye(t,this.pos)==0&&n==this.button};var Gn,Zn;function od(e,t){var n=+new Date;return Zn&&Zn.compare(n,e,t)?(Gn=Zn=null,"triple"):Gn&&Gn.compare(n,e,t)?(Zn=new Bo(n,e,t),Gn=null,"double"):(Gn=new Bo(n,e,t),Zn=null,"single")}function Yl(e){var t=this,n=t.display;if(!(ot(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,lr(n,e)){g||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Wo(t,e)){var r=Mr(t,e),i=Ut(e),a=r?od(r,i):"single";pe(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ad(t,i,r,a,e))&&(i==1?r?sd(t,r,a,e):yn(e)==n.scroller&&kt(e):i==2?(r&&_i(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(F?t.display.input.onContextMenu(e):wo(t)))}}}function ad(e,t,n,r,i){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Kn(e,Hl(a,i),i,function(l){if(typeof l=="string"&&(l=$n[l]),!l)return!1;var u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u=l(e,n)!=Ze}finally{e.state.suppressEdits=!1}return u})}function ld(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var a=Z?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=H?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(H?n.altKey:n.ctrlKey)),i}function sd(e,t,n,r){s?setTimeout(Ee(Qa,e),0):e.curOp.focus=B(de(e));var i=ld(e,n,r),a=e.doc.sel,l;e.options.dragDrop&&eo&&!e.isReadOnly()&&n=="single"&&(l=a.contains(t))>-1&&(ye((l=a.ranges[l]).from(),t)<0||t.xRel>0)&&(ye(l.to(),t)>0||t.xRel<0)?ud(e,r,t,i):cd(e,r,t,i)}function ud(e,t,n,r){var i=e.display,a=!1,l=gt(e,function(m){g&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:wo(e)),_t(i.wrapper.ownerDocument,"mouseup",l),_t(i.wrapper.ownerDocument,"mousemove",u),_t(i.scroller,"dragstart",f),_t(i.scroller,"drop",l),a||(kt(m),r.addNew||_i(e.doc,n,null,null,r.extend),g&&!w||s&&h==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),u=function(m){a=a||Math.abs(t.clientX-m.clientX)+Math.abs(t.clientY-m.clientY)>=10},f=function(){return a=!0};g&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,Fe(i.wrapper.ownerDocument,"mouseup",l),Fe(i.wrapper.ownerDocument,"mousemove",u),Fe(i.scroller,"dragstart",f),Fe(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ql(e,t,n){if(n=="char")return new Ye(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Ye(ne(t.line,0),Re(e.doc,ne(t.line+1,0)));var r=n(e,t);return new Ye(r.from,r.to)}function cd(e,t,n,r){s&&wo(e);var i=e.display,a=e.doc;kt(t);var l,u,f=a.sel,m=f.ranges;if(r.addNew&&!r.extend?(u=a.sel.contains(n),u>-1?l=m[u]:l=new Ye(n,n)):(l=a.sel.primary(),u=a.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new Ye(n,n)),n=Mr(e,t,!0,!0),u=-1;else{var A=Ql(e,n,r.unit);r.extend?l=No(l,A.anchor,A.head,r.extend):l=A}r.addNew?u==-1?(u=m.length,wt(a,Yt(e,m.concat([l]),u),{scroll:!1,origin:"*mouse"})):m.length>1&&m[u].empty()&&r.unit=="char"&&!r.extend?(wt(a,Yt(e,m.slice(0,u).concat(m.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),f=a.sel):Oo(a,u,l,Je):(u=0,wt(a,new Rt([l],0),Je),f=a.sel);var P=n;function J(be){if(ye(P,be)!=0)if(P=be,r.unit=="rectangle"){for(var Ce=[],Ne=e.options.tabSize,Ie=Oe(Ae(a,n.line).text,n.ch,Ne),$e=Oe(Ae(a,be.line).text,be.ch,Ne),Ve=Math.min(Ie,$e),vt=Math.max(Ie,$e),rt=Math.min(n.line,be.line),Ot=Math.min(e.lastLine(),Math.max(n.line,be.line));rt<=Ot;rt++){var At=Ae(a,rt).text,ut=Ge(At,Ve,Ne);Ve==vt?Ce.push(new Ye(ne(rt,ut),ne(rt,ut))):At.length>ut&&Ce.push(new Ye(ne(rt,ut),ne(rt,Ge(At,vt,Ne))))}Ce.length||Ce.push(new Ye(n,n)),wt(a,Yt(e,f.ranges.slice(0,u).concat(Ce),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(be)}else{var Dt=l,yt=Ql(e,be,r.unit),ft=Dt.anchor,ct;ye(yt.anchor,ft)>0?(ct=yt.head,ft=Zr(Dt.from(),yt.anchor)):(ct=yt.anchor,ft=Et(Dt.to(),yt.head));var lt=f.ranges.slice(0);lt[u]=fd(e,new Ye(Re(a,ft),ct)),wt(a,Yt(e,lt,u),Je)}}var Y=i.wrapper.getBoundingClientRect(),ie=0;function ue(be){var Ce=++ie,Ne=Mr(e,be,!0,r.unit=="rectangle");if(Ne)if(ye(Ne,P)!=0){e.curOp.focus=B(de(e)),J(Ne);var Ie=gi(i,a);(Ne.line>=Ie.to||Ne.lineY.bottom?20:0;$e&&setTimeout(gt(e,function(){ie==Ce&&(i.scroller.scrollTop+=$e,ue(be))}),50)}}function me(be){e.state.selectingText=!1,ie=1/0,be&&(kt(be),i.input.focus()),_t(i.wrapper.ownerDocument,"mousemove",ve),_t(i.wrapper.ownerDocument,"mouseup",_e),a.history.lastSelOrigin=null}var ve=gt(e,function(be){be.buttons===0||!Ut(be)?me(be):ue(be)}),_e=gt(e,me);e.state.selectingText=_e,Fe(i.wrapper.ownerDocument,"mousemove",ve),Fe(i.wrapper.ownerDocument,"mouseup",_e)}function fd(e,t){var n=t.anchor,r=t.head,i=Ae(e.doc,n.line);if(ye(n,r)==0&&n.sticky==r.sticky)return t;var a=Pe(i);if(!a)return t;var l=Pt(a,n.ch,n.sticky),u=a[l];if(u.from!=n.ch&&u.to!=n.ch)return t;var f=l+(u.from==n.ch==(u.level!=1)?0:1);if(f==0||f==a.length)return t;var m;if(r.line!=n.line)m=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var A=Pt(a,r.ch,r.sticky),P=A-l||(r.ch-n.ch)*(u.level==1?-1:1);A==f-1||A==f?m=P<0:m=P>0}var J=a[f+(m?-1:0)],Y=m==(J.level==1),ie=Y?J.from:J.to,ue=Y?"after":"before";return n.ch==ie&&n.sticky==ue?t:new Ye(new ne(n.line,ie,ue),r)}function Vl(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&kt(t);var l=e.display,u=l.lineDiv.getBoundingClientRect();if(a>u.bottom||!Ft(e,n))return Ct(t);a-=u.top-l.viewOffset;for(var f=0;f=i){var A=O(e.doc,a),P=e.display.gutterSpecs[f];return it(e,n,e,A,P.className,t),Ct(t)}}}function Wo(e,t){return Vl(e,t,"gutterClick",!0)}function Jl(e,t){lr(e.display,t)||dd(e,t)||ot(e,t,"contextmenu")||F||e.display.input.onContextMenu(t)}function dd(e,t){return Ft(e,"gutterContextMenu")?Vl(e,t,"gutterContextMenu",!1):!1}function es(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),En(e)}var fn={toString:function(){return"CodeMirror.Init"}},ts={},Ei={};function pd(e){var t=e.optionHandlers;function n(r,i,a,l){e.defaults[r]=i,a&&(t[r]=l?function(u,f,m){m!=fn&&a(u,f,m)}:a)}e.defineOption=n,e.Init=fn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,qo(r)},!0),n("indentUnit",2,qo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Nn(r),En(r),zt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var a=[],l=r.doc.first;r.doc.iter(function(f){for(var m=0;;){var A=f.text.indexOf(i,m);if(A==-1)break;m=A+i.length,a.push(ne(l,A))}l++});for(var u=a.length-1;u>=0;u--)ln(r.doc,i,a[u],ne(a[u].line,a[u].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,a){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=fn&&r.refresh()}),n("specialCharPlaceholder",Hc,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",M?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!ee),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){es(r),Fn(r)},!0),n("keyMap","default",function(r,i,a){var l=Li(i),u=a!=fn&&Li(a);u&&u.detach&&u.detach(r,l),l.attach&&l.attach(r,u||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,gd,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Ao(i,r.options.lineNumbers),Fn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?yo(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return rn(r)},!0),n("scrollbarStyle","native",function(r){nl(r),rn(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Ao(r.options.gutters,i),Fn(r)},!0),n("firstLineNumber",1,Fn,!0),n("lineNumberFormatter",function(r){return r},Fn,!0),n("showCursorWhenSelecting",!1,zn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(en(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,hd),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,zn,!0),n("singleCursorHeightPerLine",!0,zn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Nn,!0),n("addModeClass",!1,Nn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Nn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function hd(e,t,n){var r=n&&n!=fn;if(!t!=!r){var i=e.display.dragFunctions,a=t?Fe:_t;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function gd(e){e.options.lineWrapping?(le(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Q(e.display.wrapper,"CodeMirror-wrap"),so(e)),xo(e),zt(e),En(e),setTimeout(function(){return rn(e)},100)}function tt(e,t){var n=this;if(!(this instanceof tt))return new tt(e,t);this.options=t=t?ge(t):{},ge(ts,t,!1);var r=t.value;typeof r=="string"?r=new Mt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new tt.inputStyles[t.inputStyle](this),a=this.display=new Ef(e,r,i,t);a.wrapper.CodeMirror=this,es(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new qe,keySeq:null,specialChars:null},t.autofocus&&!M&&a.input.focus(),s&&h<11&&setTimeout(function(){return n.display.input.reset(!0)},20),md(this),Gf(),Ir(this),this.curOp.forceUpdate=!0,pl(this,r),t.autofocus&&!M||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&So(n)},20):en(this);for(var l in Ei)Ei.hasOwnProperty(l)&&Ei[l](this,t[l],fn);al(this),t.finishInit&&t.finishInit(this);for(var u=0;u20*20}Fe(t.scroller,"touchstart",function(f){if(!ot(e,f)&&!a(f)&&!Wo(e,f)){t.input.ensurePolled(),clearTimeout(n);var m=+new Date;t.activeTouch={start:m,moved:!1,prev:m-r.end<=300?r:null},f.touches.length==1&&(t.activeTouch.left=f.touches[0].pageX,t.activeTouch.top=f.touches[0].pageY)}}),Fe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Fe(t.scroller,"touchend",function(f){var m=t.activeTouch;if(m&&!lr(t,f)&&m.left!=null&&!m.moved&&new Date-m.start<300){var A=e.coordsChar(t.activeTouch,"page"),P;!m.prev||l(m,m.prev)?P=new Ye(A,A):!m.prev.prev||l(m,m.prev.prev)?P=e.findWordAt(A):P=new Ye(ne(A.line,0),Re(e.doc,ne(A.line+1,0))),e.setSelection(P.anchor,P.head),e.focus(),kt(f)}i()}),Fe(t.scroller,"touchcancel",i),Fe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(An(e,t.scroller.scrollTop),Dr(e,t.scroller.scrollLeft,!0),it(e,"scroll",e))}),Fe(t.scroller,"mousewheel",function(f){return ul(e,f)}),Fe(t.scroller,"DOMMouseScroll",function(f){return ul(e,f)}),Fe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(f){ot(e,f)||dr(f)},over:function(f){ot(e,f)||(Kf(e,f),dr(f))},start:function(f){return $f(e,f)},drop:gt(e,Uf),leave:function(f){ot(e,f)||Ol(e)}};var u=t.input.getField();Fe(u,"keyup",function(f){return Zl.call(e,f)}),Fe(u,"keydown",gt(e,Gl)),Fe(u,"keypress",gt(e,Xl)),Fe(u,"focus",function(f){return So(e,f)}),Fe(u,"blur",function(f){return en(e,f)})}var Uo=[];tt.defineInitHook=function(e){return Uo.push(e)};function Xn(e,t,n,r){var i=e.doc,a;n==null&&(n="add"),n=="smart"&&(i.mode.indent?a=wn(e,t).state:n="prev");var l=e.options.tabSize,u=Ae(i,t),f=Oe(u.text,null,l);u.stateAfter&&(u.stateAfter=null);var m=u.text.match(/^\s*/)[0],A;if(!r&&!/\S/.test(u.text))A=0,n="not";else if(n=="smart"&&(A=i.mode.indent(a,u.text.slice(m.length),u.text),A==Ze||A>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?A=Oe(Ae(i,t-1).text,null,l):A=0:n=="add"?A=f+e.options.indentUnit:n=="subtract"?A=f-e.options.indentUnit:typeof n=="number"&&(A=f+n),A=Math.max(0,A);var P="",J=0;if(e.options.indentWithTabs)for(var Y=Math.floor(A/l);Y;--Y)J+=l,P+=" ";if(Jl,f=Bt(t),m=null;if(u&&r.ranges.length>1)if(Qt&&Qt.text.join(` -`)==t){if(r.ranges.length%Qt.text.length==0){m=[];for(var A=0;A=0;J--){var Y=r.ranges[J],ie=Y.from(),ue=Y.to();Y.empty()&&(n&&n>0?ie=ne(ie.line,ie.ch-n):e.state.overwrite&&!u?ue=ne(ue.line,Math.min(Ae(a,ue.line).text.length,ue.ch+ce(f).length)):u&&Qt&&Qt.lineWise&&Qt.text.join(` + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function pf(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?ne(t.line,t.ch+1,"before"):t,t=t.ch?ne(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var l=!1,u=Xt(e,t),f=!n||n==t?u:Xt(e,n);i={left:Math.min(u.left,f.left),top:Math.min(u.top,f.top)-r,right:Math.max(u.left,f.left),bottom:Math.max(u.bottom,f.bottom)+r};var m=To(e,i),A=e.doc.scrollTop,j=e.doc.scrollLeft;if(m.scrollTop!=null&&(An(e,m.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(l=!0)),m.scrollLeft!=null&&(Dr(e,m.scrollLeft),Math.abs(e.doc.scrollLeft-j)>1&&(l=!0)),!l)break}return i}function hf(e,t){var n=To(e,t);n.scrollTop!=null&&An(e,n.scrollTop),n.scrollLeft!=null&&Dr(e,n.scrollLeft)}function To(e,t){var n=e.display,r=Vr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=fo(e),l={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+co(n),f=t.topu-r;if(t.topi+a){var A=Math.min(t.top,(m?u:t.bottom)-a);A!=i&&(l.scrollTop=A)}var j=e.options.fixedGutter?0:n.gutters.offsetWidth,ee=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-j,Y=Er(e)-n.gutters.offsetWidth,ie=t.right-t.left>Y;return ie&&(t.right=t.left+Y),t.left<10?l.scrollLeft=0:t.leftY+ee-3&&(l.scrollLeft=t.right+(ie?0:10)-Y),l}function Lo(e,t){t!=null&&(mi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function tn(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,n){(t!=null||n!=null)&&mi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function gf(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=$a(e,t.from),r=$a(e,t.to);Ja(e,n,r,t.margin)}}function Ja(e,t,n,r){var i=To(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(v||Eo(e,{top:t}),el(e,t,!0),v&&Eo(e),Fn(e,100))}function el(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ol(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Dn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+co(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var qr=function(e,t,n){this.cm=n;var r=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),Ie(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ie(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},qr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qr.prototype.zeroWidthHack=function(){var e=N&&!z?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new qe,this.disableVert=new qe},qr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),a=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},qr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qn=function(){};qn.prototype.update=function(){return{bottom:0,right:0}},qn.prototype.setScrollLeft=function(){},qn.prototype.setScrollTop=function(){},qn.prototype.clear=function(){};function rn(e,t){t||(t=Dn(e));var n=e.display.barWidth,r=e.display.barHeight;tl(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&hi(e),tl(e,Dn(e)),n=e.display.barWidth,r=e.display.barHeight}function tl(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var rl={native:qr,null:qn};function nl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Q(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new rl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ie(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Dr(e,t):An(e,t)},e),e.display.scrollbars.addClass&&le(e.display.wrapper,e.display.scrollbars.addClass)}var mf=0;function Fr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++mf,markArrays:null},Kc(e.curOp)}function Ir(e){var t=e.curOp;t&&Zc(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new vi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function yf(e){e.updatedDisplay=e.mustUpdate&&Co(e.cm,e.update)}function xf(e){var t=e.cm,n=t.display;e.updatedDisplay&&hi(t),e.barMeasure=Dn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Oa(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+er(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Er(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function _f(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=wn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var l=a.styles,u=a.text.length>e.options.maxHighlightLength?Vt(t.mode,r.state):null,f=fa(e,a,r,!0);u&&(r.state=u),a.styles=f.styles;var m=a.styleClasses,A=f.classes;A?a.styleClasses=A:m&&(a.styleClasses=null);for(var j=!l||l.length!=a.styles.length||m!=A&&(!m||!A||m.bgClass!=A.bgClass||m.textClass!=A.textClass),ee=0;!j&&een)return Fn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Nt(e,function(){for(var a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Xa(e)==0)return!1;al(e)&&(br(e),t.dims=bo(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),or&&(a=ao(e.doc,a),l=Ta(e.doc,l));var u=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;cf(e,a,l),n.viewOffset=ar(Ae(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var f=Xa(e);if(!u&&f==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var m=Tf(e);return f>4&&(n.lineDiv.style.display="none"),Cf(e,n.updateLineNumbers,t.dims),f>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Lf(m),R(n.cursorDiv),R(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fn(e,400)),n.updateLineNumbers=null,!0}function il(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Er(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+co(e.display)-fo(e),n.top)}),t.visible=gi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=gi(e.display,e.doc,n));if(!Co(e,t))break;hi(e);var i=Dn(e);zn(e),rn(e,i),Mo(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Eo(e,t){var n=new vi(e,t);if(Co(e,n)){hi(e),il(e,n);var r=Dn(e);zn(e),rn(e,r),Mo(e,r),n.finish()}}function Cf(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,l=a.firstChild;function u(ie){var ue=ie.nextSibling;return g&&N&&e.display.currentWheelTarget==ie?ie.style.display="none":ie.parentNode.removeChild(ie),ue}for(var f=r.view,m=r.viewFrom,A=0;A-1&&(Y=!1),Ma(e,j,m,n)),Y&&(R(j.lineNumber),j.lineNumber.appendChild(document.createTextNode(he(e.options,m)))),l=j.node.nextSibling}m+=j.size}for(;l;)l=u(l)}function zo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ht(e,"gutterChanged",e)}function Mo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+er(e)+"px"}function ol(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=yo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",l=0;l=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),s&&h<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!g&&!(v&&E)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Ao(r.gutters,r.lineNumbers),ll(i),n.init(i)}var bi=0,sr=null;s?sr=-.53:v?sr=15:y?sr=-.7:k&&(sr=-1/3);function sl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function zf(e){var t=sl(e);return t.x*=sr,t.y*=sr,t}function ul(e,t){y&&c==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=sl(t),r=n.x,i=n.y,a=sr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,a=1);var l=e.display,u=l.scroller,f=u.scrollWidth>u.clientWidth,m=u.scrollHeight>u.clientHeight;if(r&&f||i&&m){if(i&&N&&g){e:for(var A=t.target,j=l.view;A!=u;A=A.parentNode)for(var ee=0;ee=0&&ye(e,r.to())<=0)return n}return-1};var Ye=function(e,t){this.anchor=e,this.head=t};Ye.prototype.from=function(){return Zr(this.anchor,this.head)},Ye.prototype.to=function(){return Et(this.anchor,this.head)},Ye.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(ee,Y){return ye(ee.from(),Y.from())}),n=Se(t,i);for(var a=1;a0:f>=0){var m=Zr(u.from(),l.from()),A=Et(u.to(),l.to()),j=u.empty()?l.from()==l.head:u.from()==u.head;a<=n&&--n,t.splice(--a,2,new Ye(j?A:m,j?m:A))}}return new Rt(t,n)}function yr(e,t){return new Rt([new Ye(e,t||e)],0)}function xr(e){return e.text?ne(e.from.line+e.text.length-1,ce(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function cl(e,t){if(ye(e,t.from)<0)return e;if(ye(e,t.to)<=0)return xr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=xr(t).ch-t.to.ch),ne(n,r)}function Do(e,t){for(var n=[],r=0;r1&&e.remove(u.line+1,ie-1),e.insert(u.line+1,ve)}ht(e,"change",e,t)}function _r(e,t,n){function r(i,a,l){if(i.linked)for(var u=0;u1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ce(e.done)}function ml(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,l,u;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Df(i,i.lastOp==r)))u=ce(l.changes),ye(t.from,t.to)==0&&ye(t.from,u.to)==0?u.to=xr(t):l.changes.push(Io(e,t));else{var f=ce(i.done);for((!f||!f.ranges)&&xi(e.sel,i.done),l={changes:[Io(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,u||it(e,"historyAdded")}function qf(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ff(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||qf(e,a,ce(i.done),t))?i.done[i.done.length-1]=t:xi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&gl(i.undone)}function xi(e,t){var n=ce(t);n&&n.ranges&&n.equals(e)||t.push(e)}function vl(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=l.markedSpans),++a})}function If(e){if(!e)return null;for(var t,n=0;n-1&&(ce(u)[j]=m[j],delete m[j])}}return r}function No(e,t,n,r){if(r){var i=e.anchor;if(n){var a=ye(t,i)<0;a!=ye(n,i)<0?(i=t,t=n):a!=ye(t,n)<0&&(t=n)}return new Ye(i,t)}else return new Ye(n||t,t)}function _i(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),wt(e,new Rt([No(e.sel.primary(),t,n,i)],0),r)}function yl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:u.to>t.ch))){if(i&&(it(f,"beforeCursorEnter"),f.explicitlyCleared))if(a.markedSpans){--l;continue}else break;if(!f.atomic)continue;if(n){var j=f.find(r<0?1:-1),ee=void 0;if((r<0?A:m)&&(j=Tl(e,j,-r,j&&j.line==t.line?a:null)),j&&j.line==t.line&&(ee=ye(j,n))&&(r<0?ee<0:ee>0))return on(e,j,t,r,i)}var Y=f.find(r<0?-1:1);return(r<0?m:A)&&(Y=Tl(e,Y,r,Y.line==t.line?a:null)),Y?on(e,Y,t,r,i):null}}return t}function wi(e,t,n,r,i){var a=r||1,l=on(e,t,n,a,i)||!i&&on(e,t,n,a,!0)||on(e,t,n,-a,i)||!i&&on(e,t,n,-a,!0);return l||(e.cantEdit=!0,ne(e.first,0))}function Tl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Re(e,ne(t.line-1)):null:n>0&&t.ch==(r||Ae(e,t.line)).text.length?t.line=0;--i)El(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else El(e,t)}}function El(e,t){if(!(t.text.length==1&&t.text[0]==""&&ye(t.from,t.to)==0)){var n=Do(e,t);ml(e,t,n,e.cm?e.cm.curOp.id:NaN),On(e,t,n,io(e,t));var r=[];_r(e,function(i,a){!a&&Se(r,i.history)==-1&&(Dl(i.history,t),r.push(i.history)),On(i,t,null,io(i,t))})}}function Si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,l=e.sel,u=t=="undo"?i.done:i.undone,f=t=="undo"?i.undone:i.done,m=0;m=0;--Y){var ie=ee(Y);if(ie)return ie.v}}}}function zl(e,t){if(t!=0&&(e.first+=t,e.sel=new Rt(Be(e.sel.ranges,function(i){return new Ye(ne(i.anchor.line+t,i.anchor.ch),ne(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){zt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:ne(a,Ae(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ir(e,t.from,t.to),n||(n=Do(e,t)),e.cm?Pf(e.cm,t,r):Fo(e,t,r),ki(e,n,ke),e.cantEdit&&wi(e,ne(e.firstLine(),0))&&(e.cantEdit=!1)}}function Pf(e,t,n){var r=e.doc,i=e.display,a=t.from,l=t.to,u=!1,f=a.line;e.options.lineWrapping||(f=_(Zt(Ae(r,a.line))),r.iter(f,l.line+1,function(Y){if(Y==i.maxLine)return u=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ht(e),Fo(r,t,n,Za(e)),e.options.lineWrapping||(r.iter(f,a.line+t.text.length,function(Y){var ie=li(Y);ie>i.maxLineLength&&(i.maxLine=Y,i.maxLineLength=ie,i.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),Lc(r,a.line),Fn(e,400);var m=t.text.length-(l.line-a.line)-1;t.full?zt(e):a.line==l.line&&t.text.length==1&&!dl(e.doc,t)?vr(e,a.line,"text"):zt(e,a.line,l.line+1,m);var A=It(e,"changes"),j=It(e,"change");if(j||A){var ee={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};j&&ht(e,"change",e,ee),A&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ee)}e.display.selForContextMenu=null}function ln(e,t,n,r,i){var a;r||(r=n),ye(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t=="string"&&(t=e.splitLines(t)),an(e,{from:n,to:r,text:t,origin:i})}function Ml(e,t,n,r){n1||!(this.children[0]instanceof jn))){var u=[];this.collapse(u),this.children=[new jn(u)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,u=l;u10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=m,e.display.maxLineLength=A,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&zt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&wl(e.doc)),e&&ht(e,"markerCleared",e,this,r,i),t&&Ir(e),this.parent&&this.parent.clear()}},kr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=K("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Sa(e,t.line,t,n,a)||t.line!=n.line&&Sa(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ec()}a.addToHistory&&ml(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var u=t.line,f=e.cm,m;if(e.iter(u,n.line+1,function(j){f&&a.collapsed&&!f.options.lineWrapping&&Zt(j)==f.display.maxLine&&(m=!0),a.collapsed&&u!=t.line&&jt(j,0),Mc(j,new ni(a,u==t.line?t.ch:null,u==n.line?n.ch:null),e.cm&&e.cm.curOp),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(j){mr(e,j)&&jt(j,0)}),a.clearOnEnter&&Ie(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Cc(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Fl,a.atomic=!0),f){if(m&&(f.curOp.updateMaxLine=!0),a.collapsed)zt(f,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var A=t.line;A<=n.line;A++)vr(f,A,"text");a.atomic&&wl(f.doc),ht(f,"markerAdded",f,a)}return a}var Bn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;f--)an(this,r[f]);u?_l(this,u):this.cm&&tn(this.cm)}),undo:mt(function(){Si(this,"undo")}),redo:mt(function(){Si(this,"redo")}),undoSelection:mt(function(){Si(this,"undo",!0)}),redoSelection:mt(function(){Si(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Re(this,e),t=Re(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var l=a.markedSpans;if(l)for(var u=0;u=f.to||f.from==null&&i!=e.line||f.from!=null&&i==t.line&&f.from>=t.ch)&&(!n||n(f.marker))&&r.push(f.marker.parent||f.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n}),Re(this,ne(n,t))},indexFromPos:function(e){e=Re(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var A=e.dataTransfer.getData("Text");if(A){var j;if(t.state.draggingText&&!t.state.draggingText.copy&&(j=t.listSelections()),ki(t.doc,yr(n,n)),j)for(var ee=0;ee=0;u--)ln(e.doc,"",r[u].from,r[u].to,"+delete");tn(e)})}function Po(e,t,n){var r=se(e.text,t+n,n);return r<0||r>e.text.length?null:r}function jo(e,t,n){var r=Po(e,t.ch,n);return r==null?null:new ne(t.line,r,n<0?"after":"before")}function Ro(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=Pe(n,t.doc.direction);if(a){var l=i<0?ce(a):a[0],u=i<0==(l.level==1),f=u?"after":"before",m;if(l.level>0||t.doc.direction=="rtl"){var A=Qr(t,n);m=i<0?n.text.length-1:0;var j=tr(t,A,m).top;m=De(function(ee){return tr(t,A,ee).top==j},i<0==(l.level==1)?l.from:l.to-1,m),f=="before"&&(m=Po(n,m,1))}else m=i<0?l.to:l.from;return new ne(r,m,f)}}return new ne(r,i<0?n.text.length:0,i<0?"before":"after")}function Vf(e,t,n,r){var i=Pe(t,e.doc.direction);if(!i)return jo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=Pt(i,n.ch,n.sticky),l=i[a];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&ee>=A.begin)){var Y=j?"before":"after";return new ne(n.line,ee,Y)}}var ie=function(ve,_e,be){for(var Ce=function(Ve,vt){return vt?new ne(n.line,u(Ve,1),"before"):new ne(n.line,Ve,"after")};ve>=0&&ve0==(Ne.level!=1),$e=Fe?be.begin:u(be.end,-1);if(Ne.from<=$e&&$e0?A.end:u(A.begin,-1);return me!=null&&!(r>0&&me==t.text.length)&&(ue=ie(r>0?0:i.length-1,r,m(me)),ue)?ue:null}var $n={selectAll:Ll,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return cn(e,function(t){if(t.empty()){var n=Ae(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ne(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),ne(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ae(e.doc,i.line-1).text;l&&(i=new ne(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ne(i.line-1,l.length-1),i,"+transpose"))}}n.push(new Ye(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Nt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&ye(t,this.pos)==0&&n==this.button};var Gn,Zn;function od(e,t){var n=+new Date;return Zn&&Zn.compare(n,e,t)?(Gn=Zn=null,"triple"):Gn&&Gn.compare(n,e,t)?(Zn=new Bo(n,e,t),Gn=null,"double"):(Gn=new Bo(n,e,t),Zn=null,"single")}function Yl(e){var t=this,n=t.display;if(!(ot(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,lr(n,e)){g||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Wo(t,e)){var r=Mr(t,e),i=Ut(e),a=r?od(r,i):"single";pe(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ad(t,i,r,a,e))&&(i==1?r?sd(t,r,a,e):yn(e)==n.scroller&&kt(e):i==2?(r&&_i(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(O?t.display.input.onContextMenu(e):wo(t)))}}}function ad(e,t,n,r,i){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Kn(e,Hl(a,i),i,function(l){if(typeof l=="string"&&(l=$n[l]),!l)return!1;var u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u=l(e,n)!=Ze}finally{e.state.suppressEdits=!1}return u})}function ld(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var a=G?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=N?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(N?n.altKey:n.ctrlKey)),i}function sd(e,t,n,r){s?setTimeout(Ee(Qa,e),0):e.curOp.focus=H(de(e));var i=ld(e,n,r),a=e.doc.sel,l;e.options.dragDrop&&eo&&!e.isReadOnly()&&n=="single"&&(l=a.contains(t))>-1&&(ye((l=a.ranges[l]).from(),t)<0||t.xRel>0)&&(ye(l.to(),t)>0||t.xRel<0)?ud(e,r,t,i):cd(e,r,t,i)}function ud(e,t,n,r){var i=e.display,a=!1,l=gt(e,function(m){g&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:wo(e)),_t(i.wrapper.ownerDocument,"mouseup",l),_t(i.wrapper.ownerDocument,"mousemove",u),_t(i.scroller,"dragstart",f),_t(i.scroller,"drop",l),a||(kt(m),r.addNew||_i(e.doc,n,null,null,r.extend),g&&!k||s&&h==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),u=function(m){a=a||Math.abs(t.clientX-m.clientX)+Math.abs(t.clientY-m.clientY)>=10},f=function(){return a=!0};g&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,Ie(i.wrapper.ownerDocument,"mouseup",l),Ie(i.wrapper.ownerDocument,"mousemove",u),Ie(i.scroller,"dragstart",f),Ie(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ql(e,t,n){if(n=="char")return new Ye(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Ye(ne(t.line,0),Re(e.doc,ne(t.line+1,0)));var r=n(e,t);return new Ye(r.from,r.to)}function cd(e,t,n,r){s&&wo(e);var i=e.display,a=e.doc;kt(t);var l,u,f=a.sel,m=f.ranges;if(r.addNew&&!r.extend?(u=a.sel.contains(n),u>-1?l=m[u]:l=new Ye(n,n)):(l=a.sel.primary(),u=a.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new Ye(n,n)),n=Mr(e,t,!0,!0),u=-1;else{var A=Ql(e,n,r.unit);r.extend?l=No(l,A.anchor,A.head,r.extend):l=A}r.addNew?u==-1?(u=m.length,wt(a,Yt(e,m.concat([l]),u),{scroll:!1,origin:"*mouse"})):m.length>1&&m[u].empty()&&r.unit=="char"&&!r.extend?(wt(a,Yt(e,m.slice(0,u).concat(m.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),f=a.sel):Oo(a,u,l,Je):(u=0,wt(a,new Rt([l],0),Je),f=a.sel);var j=n;function ee(be){if(ye(j,be)!=0)if(j=be,r.unit=="rectangle"){for(var Ce=[],Ne=e.options.tabSize,Fe=Oe(Ae(a,n.line).text,n.ch,Ne),$e=Oe(Ae(a,be.line).text,be.ch,Ne),Ve=Math.min(Fe,$e),vt=Math.max(Fe,$e),rt=Math.min(n.line,be.line),Ot=Math.min(e.lastLine(),Math.max(n.line,be.line));rt<=Ot;rt++){var At=Ae(a,rt).text,ut=Ge(At,Ve,Ne);Ve==vt?Ce.push(new Ye(ne(rt,ut),ne(rt,ut))):At.length>ut&&Ce.push(new Ye(ne(rt,ut),ne(rt,Ge(At,vt,Ne))))}Ce.length||Ce.push(new Ye(n,n)),wt(a,Yt(e,f.ranges.slice(0,u).concat(Ce),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(be)}else{var Dt=l,yt=Ql(e,be,r.unit),ft=Dt.anchor,ct;ye(yt.anchor,ft)>0?(ct=yt.head,ft=Zr(Dt.from(),yt.anchor)):(ct=yt.anchor,ft=Et(Dt.to(),yt.head));var lt=f.ranges.slice(0);lt[u]=fd(e,new Ye(Re(a,ft),ct)),wt(a,Yt(e,lt,u),Je)}}var Y=i.wrapper.getBoundingClientRect(),ie=0;function ue(be){var Ce=++ie,Ne=Mr(e,be,!0,r.unit=="rectangle");if(Ne)if(ye(Ne,j)!=0){e.curOp.focus=H(de(e)),ee(Ne);var Fe=gi(i,a);(Ne.line>=Fe.to||Ne.lineY.bottom?20:0;$e&&setTimeout(gt(e,function(){ie==Ce&&(i.scroller.scrollTop+=$e,ue(be))}),50)}}function me(be){e.state.selectingText=!1,ie=1/0,be&&(kt(be),i.input.focus()),_t(i.wrapper.ownerDocument,"mousemove",ve),_t(i.wrapper.ownerDocument,"mouseup",_e),a.history.lastSelOrigin=null}var ve=gt(e,function(be){be.buttons===0||!Ut(be)?me(be):ue(be)}),_e=gt(e,me);e.state.selectingText=_e,Ie(i.wrapper.ownerDocument,"mousemove",ve),Ie(i.wrapper.ownerDocument,"mouseup",_e)}function fd(e,t){var n=t.anchor,r=t.head,i=Ae(e.doc,n.line);if(ye(n,r)==0&&n.sticky==r.sticky)return t;var a=Pe(i);if(!a)return t;var l=Pt(a,n.ch,n.sticky),u=a[l];if(u.from!=n.ch&&u.to!=n.ch)return t;var f=l+(u.from==n.ch==(u.level!=1)?0:1);if(f==0||f==a.length)return t;var m;if(r.line!=n.line)m=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var A=Pt(a,r.ch,r.sticky),j=A-l||(r.ch-n.ch)*(u.level==1?-1:1);A==f-1||A==f?m=j<0:m=j>0}var ee=a[f+(m?-1:0)],Y=m==(ee.level==1),ie=Y?ee.from:ee.to,ue=Y?"after":"before";return n.ch==ie&&n.sticky==ue?t:new Ye(new ne(n.line,ie,ue),r)}function Vl(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&kt(t);var l=e.display,u=l.lineDiv.getBoundingClientRect();if(a>u.bottom||!It(e,n))return Ct(t);a-=u.top-l.viewOffset;for(var f=0;f=i){var A=P(e.doc,a),j=e.display.gutterSpecs[f];return it(e,n,e,A,j.className,t),Ct(t)}}}function Wo(e,t){return Vl(e,t,"gutterClick",!0)}function Jl(e,t){lr(e.display,t)||dd(e,t)||ot(e,t,"contextmenu")||O||e.display.input.onContextMenu(t)}function dd(e,t){return It(e,"gutterContextMenu")?Vl(e,t,"gutterContextMenu",!1):!1}function es(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),En(e)}var fn={toString:function(){return"CodeMirror.Init"}},ts={},Ei={};function pd(e){var t=e.optionHandlers;function n(r,i,a,l){e.defaults[r]=i,a&&(t[r]=l?function(u,f,m){m!=fn&&a(u,f,m)}:a)}e.defineOption=n,e.Init=fn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,qo(r)},!0),n("indentUnit",2,qo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Nn(r),En(r),zt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var a=[],l=r.doc.first;r.doc.iter(function(f){for(var m=0;;){var A=f.text.indexOf(i,m);if(A==-1)break;m=A+i.length,a.push(ne(l,A))}l++});for(var u=a.length-1;u>=0;u--)ln(r.doc,i,a[u],ne(a[u].line,a[u].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,a){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=fn&&r.refresh()}),n("specialCharPlaceholder",Hc,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",E?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!J),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){es(r),In(r)},!0),n("keyMap","default",function(r,i,a){var l=Li(i),u=a!=fn&&Li(a);u&&u.detach&&u.detach(r,l),l.attach&&l.attach(r,u||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,gd,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Ao(i,r.options.lineNumbers),In(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?yo(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return rn(r)},!0),n("scrollbarStyle","native",function(r){nl(r),rn(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Ao(r.options.gutters,i),In(r)},!0),n("firstLineNumber",1,In,!0),n("lineNumberFormatter",function(r){return r},In,!0),n("showCursorWhenSelecting",!1,zn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(en(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,hd),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,zn,!0),n("singleCursorHeightPerLine",!0,zn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Nn,!0),n("addModeClass",!1,Nn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Nn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function hd(e,t,n){var r=n&&n!=fn;if(!t!=!r){var i=e.display.dragFunctions,a=t?Ie:_t;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function gd(e){e.options.lineWrapping?(le(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Q(e.display.wrapper,"CodeMirror-wrap"),so(e)),xo(e),zt(e),En(e),setTimeout(function(){return rn(e)},100)}function tt(e,t){var n=this;if(!(this instanceof tt))return new tt(e,t);this.options=t=t?ge(t):{},ge(ts,t,!1);var r=t.value;typeof r=="string"?r=new Mt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new tt.inputStyles[t.inputStyle](this),a=this.display=new Ef(e,r,i,t);a.wrapper.CodeMirror=this,es(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new qe,keySeq:null,specialChars:null},t.autofocus&&!E&&a.input.focus(),s&&h<11&&setTimeout(function(){return n.display.input.reset(!0)},20),md(this),Gf(),Fr(this),this.curOp.forceUpdate=!0,pl(this,r),t.autofocus&&!E||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&So(n)},20):en(this);for(var l in Ei)Ei.hasOwnProperty(l)&&Ei[l](this,t[l],fn);al(this),t.finishInit&&t.finishInit(this);for(var u=0;u20*20}Ie(t.scroller,"touchstart",function(f){if(!ot(e,f)&&!a(f)&&!Wo(e,f)){t.input.ensurePolled(),clearTimeout(n);var m=+new Date;t.activeTouch={start:m,moved:!1,prev:m-r.end<=300?r:null},f.touches.length==1&&(t.activeTouch.left=f.touches[0].pageX,t.activeTouch.top=f.touches[0].pageY)}}),Ie(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ie(t.scroller,"touchend",function(f){var m=t.activeTouch;if(m&&!lr(t,f)&&m.left!=null&&!m.moved&&new Date-m.start<300){var A=e.coordsChar(t.activeTouch,"page"),j;!m.prev||l(m,m.prev)?j=new Ye(A,A):!m.prev.prev||l(m,m.prev.prev)?j=e.findWordAt(A):j=new Ye(ne(A.line,0),Re(e.doc,ne(A.line+1,0))),e.setSelection(j.anchor,j.head),e.focus(),kt(f)}i()}),Ie(t.scroller,"touchcancel",i),Ie(t.scroller,"scroll",function(){t.scroller.clientHeight&&(An(e,t.scroller.scrollTop),Dr(e,t.scroller.scrollLeft,!0),it(e,"scroll",e))}),Ie(t.scroller,"mousewheel",function(f){return ul(e,f)}),Ie(t.scroller,"DOMMouseScroll",function(f){return ul(e,f)}),Ie(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(f){ot(e,f)||dr(f)},over:function(f){ot(e,f)||(Kf(e,f),dr(f))},start:function(f){return $f(e,f)},drop:gt(e,Uf),leave:function(f){ot(e,f)||Ol(e)}};var u=t.input.getField();Ie(u,"keyup",function(f){return Zl.call(e,f)}),Ie(u,"keydown",gt(e,Gl)),Ie(u,"keypress",gt(e,Xl)),Ie(u,"focus",function(f){return So(e,f)}),Ie(u,"blur",function(f){return en(e,f)})}var Uo=[];tt.defineInitHook=function(e){return Uo.push(e)};function Xn(e,t,n,r){var i=e.doc,a;n==null&&(n="add"),n=="smart"&&(i.mode.indent?a=wn(e,t).state:n="prev");var l=e.options.tabSize,u=Ae(i,t),f=Oe(u.text,null,l);u.stateAfter&&(u.stateAfter=null);var m=u.text.match(/^\s*/)[0],A;if(!r&&!/\S/.test(u.text))A=0,n="not";else if(n=="smart"&&(A=i.mode.indent(a,u.text.slice(m.length),u.text),A==Ze||A>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?A=Oe(Ae(i,t-1).text,null,l):A=0:n=="add"?A=f+e.options.indentUnit:n=="subtract"?A=f-e.options.indentUnit:typeof n=="number"&&(A=f+n),A=Math.max(0,A);var j="",ee=0;if(e.options.indentWithTabs)for(var Y=Math.floor(A/l);Y;--Y)ee+=l,j+=" ";if(eel,f=Bt(t),m=null;if(u&&r.ranges.length>1)if(Qt&&Qt.text.join(` +`)==t){if(r.ranges.length%Qt.text.length==0){m=[];for(var A=0;A=0;ee--){var Y=r.ranges[ee],ie=Y.from(),ue=Y.to();Y.empty()&&(n&&n>0?ie=ne(ie.line,ie.ch-n):e.state.overwrite&&!u?ue=ne(ue.line,Math.min(Ae(a,ue.line).text.length,ue.ch+ce(f).length)):u&&Qt&&Qt.lineWise&&Qt.text.join(` `)==f.join(` -`)&&(ie=ue=ne(ie.line,0)));var me={from:ie,to:ue,text:m?m[J%m.length]:f,origin:i||(u?"paste":e.state.cutIncoming>l?"cut":"+input")};an(e.doc,me),ht(e,"inputRead",e,me)}t&&!u&&ns(e,t),tn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=P),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function rs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Nt(t,function(){return $o(t,n,0,null,"paste")}),!0}function ns(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),l=!1;if(a.electricChars){for(var u=0;u-1){l=Xn(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Xn(e,i.head.line,"smart"));l&&ht(e,"electricInput",e,i.head.line)}}}function is(e){for(var t=[],n=[],r=0;ra&&(Xn(this,u.head.line,r,!0),a=u.head.line,l==this.doc.sel.primIndex&&tn(this));else{var f=u.from(),m=u.to(),A=Math.max(a,f.line);a=Math.min(this.lastLine(),m.line-(m.ch?0:1))+1;for(var P=A;P0&&Oo(this.doc,l,new Ye(f,J[l].to()),ke)}}}),getTokenAt:function(r,i){return ga(this,r,i)},getLineTokens:function(r,i){return ga(this,ne(r),i,!0)},getTokenTypeAt:function(r){r=Re(this.doc,r);var i=da(this,Ae(this.doc,r.line)),a=0,l=(i.length-1)/2,u=r.ch,f;if(u==0)f=i[2];else for(;;){var m=a+l>>1;if((m?i[m*2-1]:0)>=u)l=m;else if(i[m*2+1]f&&(r=f,l=!0),u=Ae(this.doc,r)}else u=r;return ci(this,u,{top:0,left:0},i||"page",a||l).top+(l?this.doc.height-ar(u):0)},defaultTextHeight:function(){return Vr(this.display)},defaultCharWidth:function(){return Jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,a,l,u){var f=this.display;r=Xt(this,Re(this.doc,r));var m=r.bottom,A=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),f.sizer.appendChild(i),l=="over")m=r.top;else if(l=="above"||l=="near"){var P=Math.max(f.wrapper.clientHeight,this.doc.height),J=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>P)&&r.top>i.offsetHeight?m=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=P&&(m=r.bottom),A+i.offsetWidth>J&&(A=J-i.offsetWidth)}i.style.top=m+"px",i.style.left=i.style.right="",u=="right"?(A=f.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(u=="left"?A=0:u=="middle"&&(A=(f.sizer.clientWidth-i.offsetWidth)/2),i.style.left=A+"px"),a&&hf(this,{left:A,top:m,right:A+i.offsetWidth,bottom:m+i.offsetHeight})},triggerOnKeyDown:Tt(Gl),triggerOnKeyPress:Tt(Xl),triggerOnKeyUp:Zl,triggerOnMouseDown:Tt(Yl),execCommand:function(r){if($n.hasOwnProperty(r))return $n[r].call(null,this)},triggerElectric:Tt(function(r){ns(this,r)}),findPosH:function(r,i,a,l){var u=1;i<0&&(u=-1,i=-i);for(var f=Re(this.doc,r),m=0;m0&&A(a.charAt(l-1));)--l;for(;u.5||this.options.lineWrapping)&&xo(this),it(this,"refresh",this)}),swapDoc:Tt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),pl(this,r),En(this),this.display.input.reset(),Mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ht(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Wt(e),e.registerHelper=function(r,i,a){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=a},e.registerGlobalHelper=function(r,i,a,l){e.registerHelper(r,i,l),n[r]._global.push({pred:a,val:l})}}function Go(e,t,n,r,i){var a=t,l=n,u=Ae(e,t.line),f=i&&e.direction=="rtl"?-n:n;function m(){var _e=t.line+f;return _e=e.first+e.size?!1:(t=new ne(_e,t.ch,t.sticky),u=Ae(e,_e))}function A(_e){var be;if(r=="codepoint"){var Ce=u.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(Ce))be=null;else{var Ne=n>0?Ce>=55296&&Ce<56320:Ce>=56320&&Ce<57343;be=new ne(t.line,Math.max(0,Math.min(u.text.length,t.ch+n*(Ne?2:1))),-n)}}else i?be=Vf(e.cm,u,t,n):be=jo(u,t,n);if(be==null)if(!_e&&m())t=Ro(i,e.cm,u,t.line,f);else return!1;else t=be;return!0}if(r=="char"||r=="codepoint")A();else if(r=="column")A(!0);else if(r=="word"||r=="group")for(var P=null,J=r=="group",Y=e.cm&&e.cm.getHelper(t,"wordChars"),ie=!0;!(n<0&&!A(!ie));ie=!1){var ue=u.text.charAt(t.ch)||` -`,me=Me(ue,Y)?"w":J&&ue==` -`?"n":!J||/\s/.test(ue)?null:"p";if(J&&!ie&&!me&&(me="s"),P&&P!=me){n<0&&(n=1,A(),t.sticky="after");break}if(me&&(P=me),n>0&&!A(!ie))break}var ve=wi(e,t,a,l,!0);return Xe(a,ve)&&(ve.hitSide=!0),ve}function as(e,t,n,r){var i=e.doc,a=t.left,l;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,pe(e).innerHeight||i(e).documentElement.clientHeight),f=Math.max(u-.5*Vr(e.display),3);l=(n>0?t.bottom:t.top)+n*f}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var m;m=mo(e,a,l),!!m.outside;){if(n<0?l<=0:l>=i.height){m.hitSide=!0;break}l+=n*5}return m}var Qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new qe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qe.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Ko(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(u){for(var f=u.target;f;f=f.parentNode){if(f==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(f.className))break}return!1}Fe(i,"paste",function(u){!a(u)||ot(r,u)||rs(u,r)||h<=11&&setTimeout(gt(r,function(){return t.updateFromDOM()}),20)}),Fe(i,"compositionstart",function(u){t.composing={data:u.data,done:!1}}),Fe(i,"compositionupdate",function(u){t.composing||(t.composing={data:u.data,done:!1})}),Fe(i,"compositionend",function(u){t.composing&&(u.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Fe(i,"touchstart",function(){return n.forceCompositionEnd()}),Fe(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(u){if(!(!a(u)||ot(r,u))){if(r.somethingSelected())zi({lineWise:!1,text:r.getSelections()}),u.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var f=is(r);zi({lineWise:!0,text:f.text}),u.type=="cut"&&r.operation(function(){r.setSelections(f.ranges,0,ke),r.replaceSelection("",null,"cut")})}else return;if(u.clipboardData){u.clipboardData.clearData();var m=Qt.text.join(` -`);if(u.clipboardData.setData("Text",m),u.clipboardData.getData("Text")==m){u.preventDefault();return}}var A=os(),P=A.firstChild;Ko(P),r.display.lineSpace.insertBefore(A,r.display.lineSpace.firstChild),P.value=Qt.text.join(` -`);var J=B(ze(i));q(P),setTimeout(function(){r.display.lineSpace.removeChild(A),J.focus(),J==i&&n.showPrimarySelection()},50)}}Fe(i,"copy",l),Fe(i,"cut",l)},Qe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qe.prototype.prepareSelection=function(){var e=Ya(this.cm,!1);return e.focus=B(ze(this.div))==this.div,e},Qe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ls(t,r)||{node:u[0].measure.map[2],offset:0},m=i.linee.firstLine()&&(r=ne(r.line-1,Ae(e.doc,r.line-1).length)),i.ch==Ae(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var a,l,u;r.line==t.viewFrom||(a=Ar(e,r.line))==0?(l=k(t.view[0].line),u=t.view[0].node):(l=k(t.view[a].line),u=t.view[a-1].node.nextSibling);var f=Ar(e,i.line),m,A;if(f==t.view.length-1?(m=t.viewTo-1,A=t.lineDiv.lastChild):(m=k(t.view[f+1].line)-1,A=t.view[f+1].node.previousSibling),!u)return!1;for(var P=e.doc.splitLines(yd(e,u,A,l,m)),J=ir(e.doc,ne(l,0),ne(m,Ae(e.doc,m).text.length));P.length>1&&J.length>1;)if(ce(P)==ce(J))P.pop(),J.pop(),m--;else if(P[0]==J[0])P.shift(),J.shift(),l++;else break;for(var Y=0,ie=0,ue=P[0],me=J[0],ve=Math.min(ue.length,me.length);Yr.ch&&_e.charCodeAt(_e.length-ie-1)==be.charCodeAt(be.length-ie-1);)Y--,ie++;P[P.length-1]=_e.slice(0,_e.length-ie).replace(/^\u200b+/,""),P[0]=P[0].slice(Y).replace(/\u200b+$/,"");var Ne=ne(l,Y),Ie=ne(m,J.length?ce(J).length-ie:0);if(P.length>1||P[0]||ye(Ne,Ie))return ln(e.doc,P,Ne,Ie,"+input"),!0},Qe.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qe.prototype.reset=function(){this.forceCompositionEnd()},Qe.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qe.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Qe.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Nt(this.cm,function(){return zt(e.cm)})},Qe.prototype.setUneditable=function(e){e.contentEditable="false"},Qe.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||gt(this.cm,$o)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Qe.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Qe.prototype.onContextMenu=function(){},Qe.prototype.resetPosition=function(){},Qe.prototype.needsContentAttribute=!0;function ls(e,t){var n=po(e,t.line);if(!n||n.hidden)return null;var r=Ae(e.doc,t.line),i=Na(n,r,t.line),a=Pe(r,e.doc.direction),l="left";if(a){var u=Pt(a,t.ch);l=u%2?"right":"left"}var f=ja(i.map,t.ch,l);return f.offset=f.collapse=="right"?f.end:f.start,f}function bd(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function dn(e,t){return t&&(e.bad=!0),e}function yd(e,t,n,r,i){var a="",l=!1,u=e.doc.lineSeparator(),f=!1;function m(Y){return function(ie){return ie.id==Y}}function A(){l&&(a+=u,f&&(a+=u),l=f=!1)}function P(Y){Y&&(A(),a+=Y)}function J(Y){if(Y.nodeType==1){var ie=Y.getAttribute("cm-text");if(ie){P(ie);return}var ue=Y.getAttribute("cm-marker"),me;if(ue){var ve=e.findMarks(ne(r,0),ne(i+1,0),m(+ue));ve.length&&(me=ve[0].find(0))&&P(ir(e.doc,me.from,me.to).join(u));return}if(Y.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(Y.nodeName);if(!/^br$/i.test(Y.nodeName)&&Y.textContent.length==0)return;_e&&A();for(var be=0;be=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Fe(i,"paste",function(l){ot(r,l)||rs(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(l){if(!ot(r,l)){if(r.somethingSelected())zi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var u=is(r);zi({lineWise:!0,text:u.text}),l.type=="cut"?r.setSelections(u.ranges,null,ke):(n.prevInput="",i.value=u.text.join(` -`),q(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}Fe(i,"cut",a),Fe(i,"copy",a),Fe(e.scroller,"paste",function(l){if(!(lr(e,l)||ot(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var u=new Event("paste");u.clipboardData=l.clipboardData,i.dispatchEvent(u)}}),Fe(e.lineSpace,"selectstart",function(l){lr(e,l)||kt(l)}),Fe(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Fe(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},st.prototype.createField=function(e){this.wrapper=os(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ko(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},st.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},st.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ya(e);if(e.options.moveInputWithCursor){var i=Xt(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-a.left))}return r},st.prototype.showSelection=function(e){var t=this.cm,n=t.display;V(n.cursorDiv,e.cursors),V(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},st.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&q(this.textarea),s&&h>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&h>=9&&(this.hasSelection=null));this.resetting=!1}},st.prototype.getField=function(){return this.textarea},st.prototype.supportsTouch=function(){return!1},st.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!M||B(ze(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},st.prototype.blur=function(){this.textarea.blur()},st.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},st.prototype.receivedFocus=function(){this.slowPoll()},st.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},st.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},st.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||hr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&h>=9&&this.hasSelection===i||H&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf(` +`)&&(ie=ue=ne(ie.line,0)));var me={from:ie,to:ue,text:m?m[ee%m.length]:f,origin:i||(u?"paste":e.state.cutIncoming>l?"cut":"+input")};an(e.doc,me),ht(e,"inputRead",e,me)}t&&!u&&ns(e,t),tn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=j),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function rs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Nt(t,function(){return $o(t,n,0,null,"paste")}),!0}function ns(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),l=!1;if(a.electricChars){for(var u=0;u-1){l=Xn(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Xn(e,i.head.line,"smart"));l&&ht(e,"electricInput",e,i.head.line)}}}function is(e){for(var t=[],n=[],r=0;ra&&(Xn(this,u.head.line,r,!0),a=u.head.line,l==this.doc.sel.primIndex&&tn(this));else{var f=u.from(),m=u.to(),A=Math.max(a,f.line);a=Math.min(this.lastLine(),m.line-(m.ch?0:1))+1;for(var j=A;j0&&Oo(this.doc,l,new Ye(f,ee[l].to()),ke)}}}),getTokenAt:function(r,i){return ga(this,r,i)},getLineTokens:function(r,i){return ga(this,ne(r),i,!0)},getTokenTypeAt:function(r){r=Re(this.doc,r);var i=da(this,Ae(this.doc,r.line)),a=0,l=(i.length-1)/2,u=r.ch,f;if(u==0)f=i[2];else for(;;){var m=a+l>>1;if((m?i[m*2-1]:0)>=u)l=m;else if(i[m*2+1]f&&(r=f,l=!0),u=Ae(this.doc,r)}else u=r;return ci(this,u,{top:0,left:0},i||"page",a||l).top+(l?this.doc.height-ar(u):0)},defaultTextHeight:function(){return Vr(this.display)},defaultCharWidth:function(){return Jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,a,l,u){var f=this.display;r=Xt(this,Re(this.doc,r));var m=r.bottom,A=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),f.sizer.appendChild(i),l=="over")m=r.top;else if(l=="above"||l=="near"){var j=Math.max(f.wrapper.clientHeight,this.doc.height),ee=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>j)&&r.top>i.offsetHeight?m=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=j&&(m=r.bottom),A+i.offsetWidth>ee&&(A=ee-i.offsetWidth)}i.style.top=m+"px",i.style.left=i.style.right="",u=="right"?(A=f.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(u=="left"?A=0:u=="middle"&&(A=(f.sizer.clientWidth-i.offsetWidth)/2),i.style.left=A+"px"),a&&hf(this,{left:A,top:m,right:A+i.offsetWidth,bottom:m+i.offsetHeight})},triggerOnKeyDown:Tt(Gl),triggerOnKeyPress:Tt(Xl),triggerOnKeyUp:Zl,triggerOnMouseDown:Tt(Yl),execCommand:function(r){if($n.hasOwnProperty(r))return $n[r].call(null,this)},triggerElectric:Tt(function(r){ns(this,r)}),findPosH:function(r,i,a,l){var u=1;i<0&&(u=-1,i=-i);for(var f=Re(this.doc,r),m=0;m0&&A(a.charAt(l-1));)--l;for(;u.5||this.options.lineWrapping)&&xo(this),it(this,"refresh",this)}),swapDoc:Tt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),pl(this,r),En(this),this.display.input.reset(),Mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ht(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Wt(e),e.registerHelper=function(r,i,a){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=a},e.registerGlobalHelper=function(r,i,a,l){e.registerHelper(r,i,l),n[r]._global.push({pred:a,val:l})}}function Go(e,t,n,r,i){var a=t,l=n,u=Ae(e,t.line),f=i&&e.direction=="rtl"?-n:n;function m(){var _e=t.line+f;return _e=e.first+e.size?!1:(t=new ne(_e,t.ch,t.sticky),u=Ae(e,_e))}function A(_e){var be;if(r=="codepoint"){var Ce=u.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(Ce))be=null;else{var Ne=n>0?Ce>=55296&&Ce<56320:Ce>=56320&&Ce<57343;be=new ne(t.line,Math.max(0,Math.min(u.text.length,t.ch+n*(Ne?2:1))),-n)}}else i?be=Vf(e.cm,u,t,n):be=jo(u,t,n);if(be==null)if(!_e&&m())t=Ro(i,e.cm,u,t.line,f);else return!1;else t=be;return!0}if(r=="char"||r=="codepoint")A();else if(r=="column")A(!0);else if(r=="word"||r=="group")for(var j=null,ee=r=="group",Y=e.cm&&e.cm.getHelper(t,"wordChars"),ie=!0;!(n<0&&!A(!ie));ie=!1){var ue=u.text.charAt(t.ch)||` +`,me=Me(ue,Y)?"w":ee&&ue==` +`?"n":!ee||/\s/.test(ue)?null:"p";if(ee&&!ie&&!me&&(me="s"),j&&j!=me){n<0&&(n=1,A(),t.sticky="after");break}if(me&&(j=me),n>0&&!A(!ie))break}var ve=wi(e,t,a,l,!0);return Xe(a,ve)&&(ve.hitSide=!0),ve}function as(e,t,n,r){var i=e.doc,a=t.left,l;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,pe(e).innerHeight||i(e).documentElement.clientHeight),f=Math.max(u-.5*Vr(e.display),3);l=(n>0?t.bottom:t.top)+n*f}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var m;m=mo(e,a,l),!!m.outside;){if(n<0?l<=0:l>=i.height){m.hitSide=!0;break}l+=n*5}return m}var Qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new qe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qe.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Ko(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(u){for(var f=u.target;f;f=f.parentNode){if(f==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(f.className))break}return!1}Ie(i,"paste",function(u){!a(u)||ot(r,u)||rs(u,r)||h<=11&&setTimeout(gt(r,function(){return t.updateFromDOM()}),20)}),Ie(i,"compositionstart",function(u){t.composing={data:u.data,done:!1}}),Ie(i,"compositionupdate",function(u){t.composing||(t.composing={data:u.data,done:!1})}),Ie(i,"compositionend",function(u){t.composing&&(u.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ie(i,"touchstart",function(){return n.forceCompositionEnd()}),Ie(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(u){if(!(!a(u)||ot(r,u))){if(r.somethingSelected())zi({lineWise:!1,text:r.getSelections()}),u.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var f=is(r);zi({lineWise:!0,text:f.text}),u.type=="cut"&&r.operation(function(){r.setSelections(f.ranges,0,ke),r.replaceSelection("",null,"cut")})}else return;if(u.clipboardData){u.clipboardData.clearData();var m=Qt.text.join(` +`);if(u.clipboardData.setData("Text",m),u.clipboardData.getData("Text")==m){u.preventDefault();return}}var A=os(),j=A.firstChild;Ko(j),r.display.lineSpace.insertBefore(A,r.display.lineSpace.firstChild),j.value=Qt.text.join(` +`);var ee=H(ze(i));F(j),setTimeout(function(){r.display.lineSpace.removeChild(A),ee.focus(),ee==i&&n.showPrimarySelection()},50)}}Ie(i,"copy",l),Ie(i,"cut",l)},Qe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qe.prototype.prepareSelection=function(){var e=Ya(this.cm,!1);return e.focus=H(ze(this.div))==this.div,e},Qe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ls(t,r)||{node:u[0].measure.map[2],offset:0},m=i.linee.firstLine()&&(r=ne(r.line-1,Ae(e.doc,r.line-1).length)),i.ch==Ae(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var a,l,u;r.line==t.viewFrom||(a=Ar(e,r.line))==0?(l=_(t.view[0].line),u=t.view[0].node):(l=_(t.view[a].line),u=t.view[a-1].node.nextSibling);var f=Ar(e,i.line),m,A;if(f==t.view.length-1?(m=t.viewTo-1,A=t.lineDiv.lastChild):(m=_(t.view[f+1].line)-1,A=t.view[f+1].node.previousSibling),!u)return!1;for(var j=e.doc.splitLines(yd(e,u,A,l,m)),ee=ir(e.doc,ne(l,0),ne(m,Ae(e.doc,m).text.length));j.length>1&&ee.length>1;)if(ce(j)==ce(ee))j.pop(),ee.pop(),m--;else if(j[0]==ee[0])j.shift(),ee.shift(),l++;else break;for(var Y=0,ie=0,ue=j[0],me=ee[0],ve=Math.min(ue.length,me.length);Yr.ch&&_e.charCodeAt(_e.length-ie-1)==be.charCodeAt(be.length-ie-1);)Y--,ie++;j[j.length-1]=_e.slice(0,_e.length-ie).replace(/^\u200b+/,""),j[0]=j[0].slice(Y).replace(/\u200b+$/,"");var Ne=ne(l,Y),Fe=ne(m,ee.length?ce(ee).length-ie:0);if(j.length>1||j[0]||ye(Ne,Fe))return ln(e.doc,j,Ne,Fe,"+input"),!0},Qe.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qe.prototype.reset=function(){this.forceCompositionEnd()},Qe.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qe.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Qe.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Nt(this.cm,function(){return zt(e.cm)})},Qe.prototype.setUneditable=function(e){e.contentEditable="false"},Qe.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||gt(this.cm,$o)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Qe.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Qe.prototype.onContextMenu=function(){},Qe.prototype.resetPosition=function(){},Qe.prototype.needsContentAttribute=!0;function ls(e,t){var n=po(e,t.line);if(!n||n.hidden)return null;var r=Ae(e.doc,t.line),i=Na(n,r,t.line),a=Pe(r,e.doc.direction),l="left";if(a){var u=Pt(a,t.ch);l=u%2?"right":"left"}var f=ja(i.map,t.ch,l);return f.offset=f.collapse=="right"?f.end:f.start,f}function bd(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function dn(e,t){return t&&(e.bad=!0),e}function yd(e,t,n,r,i){var a="",l=!1,u=e.doc.lineSeparator(),f=!1;function m(Y){return function(ie){return ie.id==Y}}function A(){l&&(a+=u,f&&(a+=u),l=f=!1)}function j(Y){Y&&(A(),a+=Y)}function ee(Y){if(Y.nodeType==1){var ie=Y.getAttribute("cm-text");if(ie){j(ie);return}var ue=Y.getAttribute("cm-marker"),me;if(ue){var ve=e.findMarks(ne(r,0),ne(i+1,0),m(+ue));ve.length&&(me=ve[0].find(0))&&j(ir(e.doc,me.from,me.to).join(u));return}if(Y.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(Y.nodeName);if(!/^br$/i.test(Y.nodeName)&&Y.textContent.length==0)return;_e&&A();for(var be=0;be=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Ie(i,"paste",function(l){ot(r,l)||rs(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(l){if(!ot(r,l)){if(r.somethingSelected())zi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var u=is(r);zi({lineWise:!0,text:u.text}),l.type=="cut"?r.setSelections(u.ranges,null,ke):(n.prevInput="",i.value=u.text.join(` +`),F(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}Ie(i,"cut",a),Ie(i,"copy",a),Ie(e.scroller,"paste",function(l){if(!(lr(e,l)||ot(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var u=new Event("paste");u.clipboardData=l.clipboardData,i.dispatchEvent(u)}}),Ie(e.lineSpace,"selectstart",function(l){lr(e,l)||kt(l)}),Ie(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},st.prototype.createField=function(e){this.wrapper=os(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ko(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},st.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},st.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ya(e);if(e.options.moveInputWithCursor){var i=Xt(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-a.left))}return r},st.prototype.showSelection=function(e){var t=this.cm,n=t.display;V(n.cursorDiv,e.cursors),V(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},st.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&F(this.textarea),s&&h>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&h>=9&&(this.hasSelection=null));this.resetting=!1}},st.prototype.getField=function(){return this.textarea},st.prototype.supportsTouch=function(){return!1},st.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!E||H(ze(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},st.prototype.blur=function(){this.textarea.blur()},st.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},st.prototype.receivedFocus=function(){this.slowPoll()},st.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},st.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},st.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||hr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&h>=9&&this.hasSelection===i||N&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf(` `)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},st.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},st.prototype.onKeyPress=function(){s&&h>=9&&(this.hasSelection=null),this.fastPoll()},st.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Mr(n,e),l=r.scroller.scrollTop;if(!a||d)return;var u=n.options.resetSelectionOnContextMenu;u&&n.doc.sel.contains(a)==-1&>(n,wt)(n.doc,yr(a),ke);var f=i.style.cssText,m=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+`px; z-index: 1000; background: `+(s?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var P;g&&(P=i.ownerDocument.defaultView.scrollY),r.input.focus(),g&&i.ownerDocument.defaultView.scrollTo(null,P),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function J(){if(i.selectionStart!=null){var ue=n.somethingSelected(),me="\u200B"+(ue?i.value:"");i.value="\u21DA",i.value=me,t.prevInput=ue?"":"\u200B",i.selectionStart=1,i.selectionEnd=me.length,r.selForContextMenu=n.doc.sel}}function Y(){if(t.contextMenuPending==Y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=f,s&&h<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!s||s&&h<9)&&J();var ue=0,me=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?gt(n,Ll)(n):ue++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(s&&h>=9&&J(),F){dr(e);var ie=function(){_t(window,"mouseup",ie),setTimeout(Y,20)};Fe(window,"mouseup",ie)}else setTimeout(Y,50)},st.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},st.prototype.setUneditable=function(){},st.prototype.needsContentAttribute=!1;function _d(e,t){if(t=t?ge(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=B(ze(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(Fe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch{}}t.finishInit=function(f){f.save=r,f.getTextArea=function(){return e},f.toTextArea=function(){f.toTextArea=isNaN,r(),e.parentNode.removeChild(f.getWrapperElement()),e.style.display="",e.form&&(_t(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var u=tt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return u}function kd(e){e.off=_t,e.on=Fe,e.wheelEventPixels=zf,e.Doc=Mt,e.splitLines=Bt,e.countColumn=Oe,e.findColumn=Ge,e.isWordChar=we,e.Pass=Ze,e.signal=it,e.Line=Xr,e.changeEnd=xr,e.scrollbarModel=rl,e.Pos=ne,e.cmpPos=ye,e.modes=Wr,e.mimeModes=Kt,e.resolveMode=Ur,e.getMode=$r,e.modeExtensions=gr,e.extendMode=Kr,e.copyState=Vt,e.startState=Gr,e.innerMode=_n,e.commands=$n,e.keyMap=ur,e.keyName=Bl,e.isModifierKey=Rl,e.lookupKey=un,e.normalizeKeyMap=Qf,e.StringStream=at,e.SharedTextMarker=Bn,e.TextMarker=kr,e.LineWidget=Hn,e.e_preventDefault=kt,e.e_stopPropagation=Hr,e.e_stop=dr,e.addClass=le,e.contains=I,e.rmClass=Q,e.keyNames=wr}pd(tt),vd(tt);var wd="iter insert remove copy getEditor constructor".split(" ");for(var Ai in Mt.prototype)Mt.prototype.hasOwnProperty(Ai)&&Se(wd,Ai)<0&&(tt.prototype[Ai]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mt.prototype[Ai]));return Wt(Mt),tt.inputStyles={textarea:st,contenteditable:Qe},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),Gt.apply(this,arguments)},tt.defineMIME=Cr,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){Mt.prototype[e]=t},tt.fromTextArea=_d,kd(tt),tt.version="5.65.18",tt})});var Yn=Ke((us,cs)=>{(function(o){typeof us=="object"&&typeof cs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.overlayMode=function(p,v,C){return{startState:function(){return{base:o.startState(p),overlay:o.startState(v),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:o.copyState(p,b.base),overlay:o.copyState(v,b.overlay),basePos:b.basePos,baseCur:null,overlayPos:b.overlayPos,overlayCur:null}},token:function(b,S){return(b!=S.streamSeen||Math.min(S.basePos,S.overlayPos){(function(o){typeof fs=="object"&&typeof ds=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,v=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,C=/[*+-]\s/;o.commands.newlineAndIndentContinueMarkdownList=function(S){if(S.getOption("disableInput"))return o.Pass;for(var s=S.listSelections(),h=[],g=0;g\s*$/.test(E),M=!/>\s*$/.test(E);(R||M)&&S.replaceRange("",{line:T.line,ch:0},{line:T.line,ch:T.ch+1}),h[g]=` -`}else{var H=z[1],Z=z[5],ee=!(C.test(z[2])||z[2].indexOf(">")>=0),re=ee?parseInt(z[3],10)+1+z[4]:z[2].replace("x"," ");h[g]=` -`+H+re+Z,ee&&b(S,T)}}S.replaceSelections(h)};function b(S,s){var h=s.line,g=0,T=0,x=p.exec(S.getLine(h)),c=x[1];do{g+=1;var d=h+g,w=S.getLine(d),E=p.exec(w);if(E){var z=E[1],y=parseInt(x[3],10)+g-T,R=parseInt(E[3],10),M=R;if(c===z&&!isNaN(R))y===R&&(M=R+1),y>R&&(M=y+1),S.replaceRange(w.replace(p,z+M+E[4]+E[5]),{line:d,ch:0},{line:d,ch:w.length});else{if(c.length>z.length||c.length{(function(o){typeof hs=="object"&&typeof gs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){o.defineOption("placeholder","",function(h,g,T){var x=T&&T!=o.Init;if(g&&!x)h.on("blur",b),h.on("change",S),h.on("swapDoc",S),o.on(h.getInputField(),"compositionupdate",h.state.placeholderCompose=function(){C(h)}),S(h);else if(!g&&x){h.off("blur",b),h.off("change",S),h.off("swapDoc",S),o.off(h.getInputField(),"compositionupdate",h.state.placeholderCompose),p(h);var c=h.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}g&&!h.hasFocus()&&b(h)});function p(h){h.state.placeholder&&(h.state.placeholder.parentNode.removeChild(h.state.placeholder),h.state.placeholder=null)}function v(h){p(h);var g=h.state.placeholder=document.createElement("pre");g.style.cssText="height: 0; overflow: visible",g.style.direction=h.getOption("direction"),g.className="CodeMirror-placeholder CodeMirror-line-like";var T=h.getOption("placeholder");typeof T=="string"&&(T=document.createTextNode(T)),g.appendChild(T),h.display.lineSpace.insertBefore(g,h.display.lineSpace.firstChild)}function C(h){setTimeout(function(){var g=!1;if(h.lineCount()==1){var T=h.getInputField();g=T.nodeName=="TEXTAREA"?!h.getLine(0).length:!/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)}g?v(h):p(h)},20)}function b(h){s(h)&&v(h)}function S(h){var g=h.getWrapperElement(),T=s(h);g.className=g.className.replace(" CodeMirror-empty","")+(T?" CodeMirror-empty":""),T?v(h):p(h)}function s(h){return h.lineCount()===1&&h.getLine(0)===""}})});var ys=Ke((vs,bs)=>{(function(o){typeof vs=="object"&&typeof bs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineOption("styleSelectedText",!1,function(x,c,d){var w=d&&d!=o.Init;c&&!w?(x.state.markedSelection=[],x.state.markedSelectionStyle=typeof c=="string"?c:"CodeMirror-selectedtext",g(x),x.on("cursorActivity",p),x.on("change",v)):!c&&w&&(x.off("cursorActivity",p),x.off("change",v),h(x),x.state.markedSelection=x.state.markedSelectionStyle=null)});function p(x){x.state.markedSelection&&x.operation(function(){T(x)})}function v(x){x.state.markedSelection&&x.state.markedSelection.length&&x.operation(function(){h(x)})}var C=8,b=o.Pos,S=o.cmpPos;function s(x,c,d,w){if(S(c,d)!=0)for(var E=x.state.markedSelection,z=x.state.markedSelectionStyle,y=c.line;;){var R=y==c.line?c:b(y,0),M=y+C,H=M>=d.line,Z=H?d:b(M,0),ee=x.markText(R,Z,{className:z});if(w==null?E.push(ee):E.splice(w++,0,ee),H)break;y=M}}function h(x){for(var c=x.state.markedSelection,d=0;d1)return g(x);var c=x.getCursor("start"),d=x.getCursor("end"),w=x.state.markedSelection;if(!w.length)return s(x,c,d);var E=w[0].find(),z=w[w.length-1].find();if(!E||!z||d.line-c.line<=C||S(c,z.to)>=0||S(d,E.from)<=0)return g(x);for(;S(c,E.from)>0;)w.shift().clear(),E=w[0].find();for(S(c,E.from)<0&&(E.to.line-c.line0&&(d.line-z.from.line{(function(o){typeof xs=="object"&&typeof _s=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=o.Pos;function v(y){var R=y.flags;return R??(y.ignoreCase?"i":"")+(y.global?"g":"")+(y.multiline?"m":"")}function C(y,R){for(var M=v(y),H=M,Z=0;Zre);N++){var F=y.getLine(ee++);H=H==null?F:H+` -`+F}Z=Z*2,R.lastIndex=M.ch;var D=R.exec(H);if(D){var Q=H.slice(0,D.index).split(` -`),j=D[0].split(` -`),V=M.line+Q.length-1,_=Q[Q.length-1].length;return{from:p(V,_),to:p(V+j.length-1,j.length==1?_+j[0].length:j[j.length-1].length),match:D}}}}function h(y,R,M){for(var H,Z=0;Z<=y.length;){R.lastIndex=Z;var ee=R.exec(y);if(!ee)break;var re=ee.index+ee[0].length;if(re>y.length-M)break;(!H||re>H.index+H[0].length)&&(H=ee),Z=ee.index+1}return H}function g(y,R,M){R=C(R,"g");for(var H=M.line,Z=M.ch,ee=y.firstLine();H>=ee;H--,Z=-1){var re=y.getLine(H),N=h(re,R,Z<0?0:re.length-Z);if(N)return{from:p(H,N.index),to:p(H,N.index+N[0].length),match:N}}}function T(y,R,M){if(!b(R))return g(y,R,M);R=C(R,"gm");for(var H,Z=1,ee=y.getLine(M.line).length-M.ch,re=M.line,N=y.firstLine();re>=N;){for(var F=0;F=N;F++){var D=y.getLine(re--);H=H==null?D:D+` -`+H}Z*=2;var Q=h(H,R,ee);if(Q){var j=H.slice(0,Q.index).split(` + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var j;g&&(j=i.ownerDocument.defaultView.scrollY),r.input.focus(),g&&i.ownerDocument.defaultView.scrollTo(null,j),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function ee(){if(i.selectionStart!=null){var ue=n.somethingSelected(),me="\u200B"+(ue?i.value:"");i.value="\u21DA",i.value=me,t.prevInput=ue?"":"\u200B",i.selectionStart=1,i.selectionEnd=me.length,r.selForContextMenu=n.doc.sel}}function Y(){if(t.contextMenuPending==Y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=f,s&&h<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!s||s&&h<9)&&ee();var ue=0,me=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?gt(n,Ll)(n):ue++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(s&&h>=9&&ee(),O){dr(e);var ie=function(){_t(window,"mouseup",ie),setTimeout(Y,20)};Ie(window,"mouseup",ie)}else setTimeout(Y,50)},st.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},st.prototype.setUneditable=function(){},st.prototype.needsContentAttribute=!1;function _d(e,t){if(t=t?ge(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=H(ze(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(Ie(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch{}}t.finishInit=function(f){f.save=r,f.getTextArea=function(){return e},f.toTextArea=function(){f.toTextArea=isNaN,r(),e.parentNode.removeChild(f.getWrapperElement()),e.style.display="",e.form&&(_t(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var u=tt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return u}function kd(e){e.off=_t,e.on=Ie,e.wheelEventPixels=zf,e.Doc=Mt,e.splitLines=Bt,e.countColumn=Oe,e.findColumn=Ge,e.isWordChar=we,e.Pass=Ze,e.signal=it,e.Line=Xr,e.changeEnd=xr,e.scrollbarModel=rl,e.Pos=ne,e.cmpPos=ye,e.modes=Wr,e.mimeModes=Kt,e.resolveMode=Ur,e.getMode=$r,e.modeExtensions=gr,e.extendMode=Kr,e.copyState=Vt,e.startState=Gr,e.innerMode=_n,e.commands=$n,e.keyMap=ur,e.keyName=Bl,e.isModifierKey=Rl,e.lookupKey=un,e.normalizeKeyMap=Qf,e.StringStream=at,e.SharedTextMarker=Bn,e.TextMarker=kr,e.LineWidget=Hn,e.e_preventDefault=kt,e.e_stopPropagation=Hr,e.e_stop=dr,e.addClass=le,e.contains=I,e.rmClass=Q,e.keyNames=wr}pd(tt),vd(tt);var wd="iter insert remove copy getEditor constructor".split(" ");for(var Ai in Mt.prototype)Mt.prototype.hasOwnProperty(Ai)&&Se(wd,Ai)<0&&(tt.prototype[Ai]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mt.prototype[Ai]));return Wt(Mt),tt.inputStyles={textarea:st,contenteditable:Qe},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),Gt.apply(this,arguments)},tt.defineMIME=Cr,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){Mt.prototype[e]=t},tt.fromTextArea=_d,kd(tt),tt.version="5.65.18",tt})});var Yn=Ke((us,cs)=>{(function(o){typeof us=="object"&&typeof cs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.overlayMode=function(p,v,C){return{startState:function(){return{base:o.startState(p),overlay:o.startState(v),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:o.copyState(p,b.base),overlay:o.copyState(v,b.overlay),basePos:b.basePos,baseCur:null,overlayPos:b.overlayPos,overlayCur:null}},token:function(b,S){return(b!=S.streamSeen||Math.min(S.basePos,S.overlayPos){(function(o){typeof fs=="object"&&typeof ds=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,v=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,C=/[*+-]\s/;o.commands.newlineAndIndentContinueMarkdownList=function(S){if(S.getOption("disableInput"))return o.Pass;for(var s=S.listSelections(),h=[],g=0;g\s*$/.test(z),E=!/>\s*$/.test(z);(W||E)&&S.replaceRange("",{line:T.line,ch:0},{line:T.line,ch:T.ch+1}),h[g]=` +`}else{var N=M[1],G=M[5],J=!(C.test(M[2])||M[2].indexOf(">")>=0),re=J?parseInt(M[3],10)+1+M[4]:M[2].replace("x"," ");h[g]=` +`+N+re+G,J&&b(S,T)}}S.replaceSelections(h)};function b(S,s){var h=s.line,g=0,T=0,y=p.exec(S.getLine(h)),c=y[1];do{g+=1;var d=h+g,k=S.getLine(d),z=p.exec(k);if(z){var M=z[1],w=parseInt(y[3],10)+g-T,W=parseInt(z[3],10),E=W;if(c===M&&!isNaN(W))w===W&&(E=W+1),w>W&&(E=w+1),S.replaceRange(k.replace(p,M+E+z[4]+z[5]),{line:d,ch:0},{line:d,ch:k.length});else{if(c.length>M.length||c.length{(function(o){typeof hs=="object"&&typeof gs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){o.defineOption("placeholder","",function(h,g,T){var y=T&&T!=o.Init;if(g&&!y)h.on("blur",b),h.on("change",S),h.on("swapDoc",S),o.on(h.getInputField(),"compositionupdate",h.state.placeholderCompose=function(){C(h)}),S(h);else if(!g&&y){h.off("blur",b),h.off("change",S),h.off("swapDoc",S),o.off(h.getInputField(),"compositionupdate",h.state.placeholderCompose),p(h);var c=h.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}g&&!h.hasFocus()&&b(h)});function p(h){h.state.placeholder&&(h.state.placeholder.parentNode.removeChild(h.state.placeholder),h.state.placeholder=null)}function v(h){p(h);var g=h.state.placeholder=document.createElement("pre");g.style.cssText="height: 0; overflow: visible",g.style.direction=h.getOption("direction"),g.className="CodeMirror-placeholder CodeMirror-line-like";var T=h.getOption("placeholder");typeof T=="string"&&(T=document.createTextNode(T)),g.appendChild(T),h.display.lineSpace.insertBefore(g,h.display.lineSpace.firstChild)}function C(h){setTimeout(function(){var g=!1;if(h.lineCount()==1){var T=h.getInputField();g=T.nodeName=="TEXTAREA"?!h.getLine(0).length:!/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)}g?v(h):p(h)},20)}function b(h){s(h)&&v(h)}function S(h){var g=h.getWrapperElement(),T=s(h);g.className=g.className.replace(" CodeMirror-empty","")+(T?" CodeMirror-empty":""),T?v(h):p(h)}function s(h){return h.lineCount()===1&&h.getLine(0)===""}})});var ys=Ke((vs,bs)=>{(function(o){typeof vs=="object"&&typeof bs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineOption("styleSelectedText",!1,function(y,c,d){var k=d&&d!=o.Init;c&&!k?(y.state.markedSelection=[],y.state.markedSelectionStyle=typeof c=="string"?c:"CodeMirror-selectedtext",g(y),y.on("cursorActivity",p),y.on("change",v)):!c&&k&&(y.off("cursorActivity",p),y.off("change",v),h(y),y.state.markedSelection=y.state.markedSelectionStyle=null)});function p(y){y.state.markedSelection&&y.operation(function(){T(y)})}function v(y){y.state.markedSelection&&y.state.markedSelection.length&&y.operation(function(){h(y)})}var C=8,b=o.Pos,S=o.cmpPos;function s(y,c,d,k){if(S(c,d)!=0)for(var z=y.state.markedSelection,M=y.state.markedSelectionStyle,w=c.line;;){var W=w==c.line?c:b(w,0),E=w+C,N=E>=d.line,G=N?d:b(E,0),J=y.markText(W,G,{className:M});if(k==null?z.push(J):z.splice(k++,0,J),N)break;w=E}}function h(y){for(var c=y.state.markedSelection,d=0;d1)return g(y);var c=y.getCursor("start"),d=y.getCursor("end"),k=y.state.markedSelection;if(!k.length)return s(y,c,d);var z=k[0].find(),M=k[k.length-1].find();if(!z||!M||d.line-c.line<=C||S(c,M.to)>=0||S(d,z.from)<=0)return g(y);for(;S(c,z.from)>0;)k.shift().clear(),z=k[0].find();for(S(c,z.from)<0&&(z.to.line-c.line0&&(d.line-M.from.line{(function(o){typeof xs=="object"&&typeof _s=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=o.Pos;function v(w){var W=w.flags;return W??(w.ignoreCase?"i":"")+(w.global?"g":"")+(w.multiline?"m":"")}function C(w,W){for(var E=v(w),N=E,G=0;Gre);q++){var O=w.getLine(J++);N=N==null?O:N+` +`+O}G=G*2,W.lastIndex=E.ch;var D=W.exec(N);if(D){var Q=N.slice(0,D.index).split(` +`),R=D[0].split(` +`),V=E.line+Q.length-1,x=Q[Q.length-1].length;return{from:p(V,x),to:p(V+R.length-1,R.length==1?x+R[0].length:R[R.length-1].length),match:D}}}}function h(w,W,E){for(var N,G=0;G<=w.length;){W.lastIndex=G;var J=W.exec(w);if(!J)break;var re=J.index+J[0].length;if(re>w.length-E)break;(!N||re>N.index+N[0].length)&&(N=J),G=J.index+1}return N}function g(w,W,E){W=C(W,"g");for(var N=E.line,G=E.ch,J=w.firstLine();N>=J;N--,G=-1){var re=w.getLine(N),q=h(re,W,G<0?0:re.length-G);if(q)return{from:p(N,q.index),to:p(N,q.index+q[0].length),match:q}}}function T(w,W,E){if(!b(W))return g(w,W,E);W=C(W,"gm");for(var N,G=1,J=w.getLine(E.line).length-E.ch,re=E.line,q=w.firstLine();re>=q;){for(var O=0;O=q;O++){var D=w.getLine(re--);N=N==null?D:D+` +`+N}G*=2;var Q=h(N,W,J);if(Q){var R=N.slice(0,Q.index).split(` `),V=Q[0].split(` -`),_=re+j.length,K=j[j.length-1].length;return{from:p(_,K),to:p(_+V.length-1,V.length==1?K+V[0].length:V[V.length-1].length),match:Q}}}}var x,c;String.prototype.normalize?(x=function(y){return y.normalize("NFD").toLowerCase()},c=function(y){return y.normalize("NFD")}):(x=function(y){return y.toLowerCase()},c=function(y){return y});function d(y,R,M,H){if(y.length==R.length)return M;for(var Z=0,ee=M+Math.max(0,y.length-R.length);;){if(Z==ee)return Z;var re=Z+ee>>1,N=H(y.slice(0,re)).length;if(N==M)return re;N>M?ee=re:Z=re+1}}function w(y,R,M,H){if(!R.length)return null;var Z=H?x:c,ee=Z(R).split(/\r|\n\r?/);e:for(var re=M.line,N=M.ch,F=y.lastLine()+1-ee.length;re<=F;re++,N=0){var D=y.getLine(re).slice(N),Q=Z(D);if(ee.length==1){var j=Q.indexOf(ee[0]);if(j==-1)continue e;var M=d(D,Q,j,Z)+N;return{from:p(re,d(D,Q,j,Z)+N),to:p(re,d(D,Q,j+ee[0].length,Z)+N)}}else{var V=Q.length-ee[0].length;if(Q.slice(V)!=ee[0])continue e;for(var _=1;_=F;re--,N=-1){var D=y.getLine(re);N>-1&&(D=D.slice(0,N));var Q=Z(D);if(ee.length==1){var j=Q.lastIndexOf(ee[0]);if(j==-1)continue e;return{from:p(re,d(D,Q,j,Z)),to:p(re,d(D,Q,j+ee[0].length,Z))}}else{var V=ee[ee.length-1];if(Q.slice(0,V.length)!=V)continue e;for(var _=1,M=re-ee.length+1;_(this.doc.getLine(R.line)||"").length&&(R.ch=0,R.line++)),o.cmpPos(R,this.doc.clipPos(R))!=0))return this.atOccurrence=!1;var M=this.matches(y,R);if(this.afterEmptyMatch=M&&o.cmpPos(M.from,M.to)==0,M)return this.pos=M,this.atOccurrence=!0,this.pos.match||!0;var H=p(y?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:H,to:H},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(y,R){if(this.atOccurrence){var M=o.splitLines(y);this.doc.replaceRange(M,this.pos.from,this.pos.to,R),this.pos.to=p(this.pos.from.line+M.length-1,M[M.length-1].length+(M.length==1?this.pos.from.ch:0))}}},o.defineExtension("getSearchCursor",function(y,R,M){return new z(this.doc,y,R,M)}),o.defineDocExtension("getSearchCursor",function(y,R,M){return new z(this,y,R,M)}),o.defineExtension("selectMatches",function(y,R){for(var M=[],H=this.getSearchCursor(y,this.getCursor("from"),R);H.findNext()&&!(o.cmpPos(H.to(),this.getCursor("to"))>0);)M.push({anchor:H.from(),head:H.to()});M.length&&this.setSelections(M,0)})})});var Vo=Ke((ws,Ss)=>{(function(o){typeof ws=="object"&&typeof Ss=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(I,B,le,xe,q,L){this.indented=I,this.column=B,this.type=le,this.info=xe,this.align=q,this.prev=L}function v(I,B,le,xe){var q=I.indented;return I.context&&I.context.type=="statement"&&le!="statement"&&(q=I.context.indented),I.context=new p(q,B,le,xe,null,I.context)}function C(I){var B=I.context.type;return(B==")"||B=="]"||B=="}")&&(I.indented=I.context.indented),I.context=I.context.prev}function b(I,B,le){if(B.prevToken=="variable"||B.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(I.string.slice(0,le))||B.typeAtEndOfLine&&I.column()==I.indentation())return!0}function S(I){for(;;){if(!I||I.type=="top")return!0;if(I.type=="}"&&I.prev.info!="namespace")return!1;I=I.prev}}o.defineMode("clike",function(I,B){var le=I.indentUnit,xe=B.statementIndentUnit||le,q=B.dontAlignCalls,L=B.keywords||{},de=B.types||{},ze=B.builtin||{},pe=B.blockKeywords||{},Ee=B.defKeywords||{},ge=B.atoms||{},Oe=B.hooks||{},qe=B.multiLineStrings,Se=B.indentStatements!==!1,je=B.indentSwitch!==!1,Ze=B.namespaceSeparator,ke=B.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Je=B.numberStart||/[\d\.]/,He=B.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Ge=B.isOperatorChar||/[+\-*&%=<>!?|\/]/,U=B.isIdentifierChar||/[\w\$_\xa1-\uffff]/,G=B.isReservedIdentifier||!1,ce,Be;function te(we,Me){var Le=we.next();if(Oe[Le]){var $=Oe[Le](we,Me);if($!==!1)return $}if(Le=='"'||Le=="'")return Me.tokenize=fe(Le),Me.tokenize(we,Me);if(Je.test(Le)){if(we.backUp(1),we.match(He))return"number";we.next()}if(ke.test(Le))return ce=Le,null;if(Le=="/"){if(we.eat("*"))return Me.tokenize=oe,oe(we,Me);if(we.eat("/"))return we.skipToEnd(),"comment"}if(Ge.test(Le)){for(;!we.match(/^\/[\/*]/,!1)&&we.eat(Ge););return"operator"}if(we.eatWhile(U),Ze)for(;we.match(Ze);)we.eatWhile(U);var W=we.current();return h(L,W)?(h(pe,W)&&(ce="newstatement"),h(Ee,W)&&(Be=!0),"keyword"):h(de,W)?"type":h(ze,W)||G&&G(W)?(h(pe,W)&&(ce="newstatement"),"builtin"):h(ge,W)?"atom":"variable"}function fe(we){return function(Me,Le){for(var $=!1,W,se=!1;(W=Me.next())!=null;){if(W==we&&!$){se=!0;break}$=!$&&W=="\\"}return(se||!($||qe))&&(Le.tokenize=null),"string"}}function oe(we,Me){for(var Le=!1,$;$=we.next();){if($=="/"&&Le){Me.tokenize=null;break}Le=$=="*"}return"comment"}function Ue(we,Me){B.typeFirstDefinitions&&we.eol()&&S(Me.context)&&(Me.typeAtEndOfLine=b(we,Me,we.pos))}return{startState:function(we){return{tokenize:null,context:new p((we||0)-le,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(we,Me){var Le=Me.context;if(we.sol()&&(Le.align==null&&(Le.align=!1),Me.indented=we.indentation(),Me.startOfLine=!0),we.eatSpace())return Ue(we,Me),null;ce=Be=null;var $=(Me.tokenize||te)(we,Me);if($=="comment"||$=="meta")return $;if(Le.align==null&&(Le.align=!0),ce==";"||ce==":"||ce==","&&we.match(/^\s*(?:\/\/.*)?$/,!1))for(;Me.context.type=="statement";)C(Me);else if(ce=="{")v(Me,we.column(),"}");else if(ce=="[")v(Me,we.column(),"]");else if(ce=="(")v(Me,we.column(),")");else if(ce=="}"){for(;Le.type=="statement";)Le=C(Me);for(Le.type=="}"&&(Le=C(Me));Le.type=="statement";)Le=C(Me)}else ce==Le.type?C(Me):Se&&((Le.type=="}"||Le.type=="top")&&ce!=";"||Le.type=="statement"&&ce=="newstatement")&&v(Me,we.column(),"statement",we.current());if($=="variable"&&(Me.prevToken=="def"||B.typeFirstDefinitions&&b(we,Me,we.start)&&S(Me.context)&&we.match(/^\s*\(/,!1))&&($="def"),Oe.token){var W=Oe.token(we,Me,$);W!==void 0&&($=W)}return $=="def"&&B.styleDefs===!1&&($="variable"),Me.startOfLine=!1,Me.prevToken=Be?"def":$||ce,Ue(we,Me),$},indent:function(we,Me){if(we.tokenize!=te&&we.tokenize!=null||we.typeAtEndOfLine&&S(we.context))return o.Pass;var Le=we.context,$=Me&&Me.charAt(0),W=$==Le.type;if(Le.type=="statement"&&$=="}"&&(Le=Le.prev),B.dontIndentStatements)for(;Le.type=="statement"&&B.dontIndentStatements.test(Le.info);)Le=Le.prev;if(Oe.indent){var se=Oe.indent(we,Le,Me,le);if(typeof se=="number")return se}var De=Le.prev&&Le.prev.info=="switch";if(B.allmanIndentation&&/[{(]/.test($)){for(;Le.type!="top"&&Le.type!="}";)Le=Le.prev;return Le.indented}return Le.type=="statement"?Le.indented+($=="{"?0:xe):Le.align&&(!q||Le.type!=")")?Le.column+(W?0:1):Le.type==")"&&!W?Le.indented+xe:Le.indented+(W?0:le)+(!W&&De&&!/^(?:case|default)\b/.test(Me)?le:0)},electricInput:je?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function s(I){for(var B={},le=I.split(" "),xe=0;xe!?|\/#:@]/,hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},'"':function(I,B){return I.match('""')?(B.tokenize=j,B.tokenize(I,B)):!1},"'":function(I){return I.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(I.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(I,B){var le=B.context;return le.type=="}"&&le.align&&I.eat(">")?(B.context=new p(le.indented,le.column,le.type,le.info,null,le.prev),"operator"):!1},"/":function(I,B){return I.eat("*")?(B.tokenize=V(1),B.tokenize(I,B)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function _(I){return function(B,le){for(var xe=!1,q,L=!1;!B.eol();){if(!I&&!xe&&B.match('"')){L=!0;break}if(I&&B.match('"""')){L=!0;break}q=B.next(),!xe&&q=="$"&&B.match("{")&&B.skipTo("}"),xe=!xe&&q=="\\"&&!I}return(L||!I)&&(le.tokenize=null),"string"}}Q("text/x-kotlin",{name:"clike",keywords:s("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:s("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:s("catch class do else finally for if where try while enum"),defKeywords:s("class val var object interface fun"),atoms:s("true false null this"),hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},"*":function(I,B){return B.prevToken=="."?"variable":"operator"},'"':function(I,B){return B.tokenize=_(I.match('""')),B.tokenize(I,B)},"/":function(I,B){return I.eat("*")?(B.tokenize=V(1),B.tokenize(I,B)):!1},indent:function(I,B,le,xe){var q=le&&le.charAt(0);if((I.prevToken=="}"||I.prevToken==")")&&le=="")return I.indented;if(I.prevToken=="operator"&&le!="}"&&I.context.type!="}"||I.prevToken=="variable"&&q=="."||(I.prevToken=="}"||I.prevToken==")")&&q==".")return xe*2+B.indented;if(B.align&&B.type=="}")return B.indented+(I.context.type==(le||"").charAt(0)?0:xe)}},modeProps:{closeBrackets:{triples:'"'}}}),Q(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:s("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:s("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:s("for while do if else struct"),builtin:s("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:s("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":M},modeProps:{fold:["brace","include"]}}),Q("text/x-nesc",{name:"clike",keywords:s(g+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:E,blockKeywords:s(y),atoms:s("null true false"),hooks:{"#":M},modeProps:{fold:["brace","include"]}}),Q("text/x-objectivec",{name:"clike",keywords:s(g+" "+x),types:z,builtin:s(c),blockKeywords:s(y+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:s(R+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:s("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:Z,hooks:{"#":M,"*":H},modeProps:{fold:["brace","include"]}}),Q("text/x-objectivec++",{name:"clike",keywords:s(g+" "+x+" "+T),types:z,builtin:s(c),blockKeywords:s(y+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:s(R+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:s("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:Z,hooks:{"#":M,"*":H,u:re,U:re,L:re,R:re,0:ee,1:ee,2:ee,3:ee,4:ee,5:ee,6:ee,7:ee,8:ee,9:ee,token:function(I,B,le){if(le=="variable"&&I.peek()=="("&&(B.prevToken==";"||B.prevToken==null||B.prevToken=="}")&&N(I.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),Q("text/x-squirrel",{name:"clike",keywords:s("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:E,blockKeywords:s("case catch class else for foreach if switch try while"),defKeywords:s("function local class"),typeFirstDefinitions:!0,atoms:s("true false null"),hooks:{"#":M},modeProps:{fold:["brace","include"]}});var K=null;function X(I){return function(B,le){for(var xe=!1,q,L=!1;!B.eol();){if(!xe&&B.match('"')&&(I=="single"||B.match('""'))){L=!0;break}if(!xe&&B.match("``")){K=X(I),L=!0;break}q=B.next(),xe=I=="single"&&!xe&&q=="\\"}return L&&(le.tokenize=null),"string"}}Q("text/x-ceylon",{name:"clike",keywords:s("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(I){var B=I.charAt(0);return B===B.toUpperCase()&&B!==B.toLowerCase()},blockKeywords:s("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:s("class dynamic function interface module object package value"),builtin:s("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:s("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},'"':function(I,B){return B.tokenize=X(I.match('""')?"triple":"single"),B.tokenize(I,B)},"`":function(I,B){return!K||!I.match("`")?!1:(B.tokenize=K,K=null,B.tokenize(I,B))},"'":function(I){return I.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(I,B,le){if((le=="variable"||le=="type")&&B.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var Cs=Ke((Ts,Ls)=>{(function(o){typeof Ts=="object"&&typeof Ls=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("cmake",function(){var p=/({)?[a-zA-Z0-9_]+(})?/;function v(b,S){for(var s,h,g=!1;!b.eol()&&(s=b.next())!=S.pending;){if(s==="$"&&h!="\\"&&S.pending=='"'){g=!0;break}h=s}return g&&b.backUp(1),s==S.pending?S.continueString=!1:S.continueString=!0,"string"}function C(b,S){var s=b.next();return s==="$"?b.match(p)?"variable-2":"variable":S.continueString?(b.backUp(1),v(b,S)):b.match(/(\s+)?\w+\(/)||b.match(/(\s+)?\w+\ \(/)?(b.backUp(1),"def"):s=="#"?(b.skipToEnd(),"comment"):s=="'"||s=='"'?(S.pending=s,v(b,S)):s=="("||s==")"?"bracket":s.match(/[0-9]/)?"number":(b.eatWhile(/[\w-]/),null)}return{startState:function(){var b={};return b.inDefinition=!1,b.inInclude=!1,b.continueString=!1,b.pending=!1,b},token:function(b,S){return b.eatSpace()?null:C(b,S)}}}),o.defineMIME("text/x-cmake","cmake")})});var gn=Ke((Es,zs)=>{(function(o){typeof Es=="object"&&typeof zs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("css",function(F,D){var Q=D.inline;D.propertyKeywords||(D=o.resolveMode("text/css"));var j=F.indentUnit,V=D.tokenHooks,_=D.documentTypes||{},K=D.mediaTypes||{},X=D.mediaFeatures||{},I=D.mediaValueKeywords||{},B=D.propertyKeywords||{},le=D.nonStandardPropertyKeywords||{},xe=D.fontProperties||{},q=D.counterDescriptors||{},L=D.colorKeywords||{},de=D.valueKeywords||{},ze=D.allowNested,pe=D.lineComment,Ee=D.supportsAtComponent===!0,ge=F.highlightNonStandardPropertyKeywords!==!1,Oe,qe;function Se(te,fe){return Oe=fe,te}function je(te,fe){var oe=te.next();if(V[oe]){var Ue=V[oe](te,fe);if(Ue!==!1)return Ue}if(oe=="@")return te.eatWhile(/[\w\\\-]/),Se("def",te.current());if(oe=="="||(oe=="~"||oe=="|")&&te.eat("="))return Se(null,"compare");if(oe=='"'||oe=="'")return fe.tokenize=Ze(oe),fe.tokenize(te,fe);if(oe=="#")return te.eatWhile(/[\w\\\-]/),Se("atom","hash");if(oe=="!")return te.match(/^\s*\w*/),Se("keyword","important");if(/\d/.test(oe)||oe=="."&&te.eat(/\d/))return te.eatWhile(/[\w.%]/),Se("number","unit");if(oe==="-"){if(/[\d.]/.test(te.peek()))return te.eatWhile(/[\w.%]/),Se("number","unit");if(te.match(/^-[\w\\\-]*/))return te.eatWhile(/[\w\\\-]/),te.match(/^\s*:/,!1)?Se("variable-2","variable-definition"):Se("variable-2","variable");if(te.match(/^\w+-/))return Se("meta","meta")}else return/[,+>*\/]/.test(oe)?Se(null,"select-op"):oe=="."&&te.match(/^-?[_a-z][_a-z0-9-]*/i)?Se("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(oe)?Se(null,oe):te.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(te.current())&&(fe.tokenize=ke),Se("variable callee","variable")):/[\w\\\-]/.test(oe)?(te.eatWhile(/[\w\\\-]/),Se("property","word")):Se(null,null)}function Ze(te){return function(fe,oe){for(var Ue=!1,we;(we=fe.next())!=null;){if(we==te&&!Ue){te==")"&&fe.backUp(1);break}Ue=!Ue&&we=="\\"}return(we==te||!Ue&&te!=")")&&(oe.tokenize=null),Se("string","string")}}function ke(te,fe){return te.next(),te.match(/^\s*[\"\')]/,!1)?fe.tokenize=null:fe.tokenize=Ze(")"),Se(null,"(")}function Je(te,fe,oe){this.type=te,this.indent=fe,this.prev=oe}function He(te,fe,oe,Ue){return te.context=new Je(oe,fe.indentation()+(Ue===!1?0:j),te.context),oe}function Ge(te){return te.context.prev&&(te.context=te.context.prev),te.context.type}function U(te,fe,oe){return Be[oe.context.type](te,fe,oe)}function G(te,fe,oe,Ue){for(var we=Ue||1;we>0;we--)oe.context=oe.context.prev;return U(te,fe,oe)}function ce(te){var fe=te.current().toLowerCase();de.hasOwnProperty(fe)?qe="atom":L.hasOwnProperty(fe)?qe="keyword":qe="variable"}var Be={};return Be.top=function(te,fe,oe){if(te=="{")return He(oe,fe,"block");if(te=="}"&&oe.context.prev)return Ge(oe);if(Ee&&/@component/i.test(te))return He(oe,fe,"atComponentBlock");if(/^@(-moz-)?document$/i.test(te))return He(oe,fe,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(te))return He(oe,fe,"atBlock");if(/^@(font-face|counter-style)/i.test(te))return oe.stateArg=te,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(te))return"keyframes";if(te&&te.charAt(0)=="@")return He(oe,fe,"at");if(te=="hash")qe="builtin";else if(te=="word")qe="tag";else{if(te=="variable-definition")return"maybeprop";if(te=="interpolation")return He(oe,fe,"interpolation");if(te==":")return"pseudo";if(ze&&te=="(")return He(oe,fe,"parens")}return oe.context.type},Be.block=function(te,fe,oe){if(te=="word"){var Ue=fe.current().toLowerCase();return B.hasOwnProperty(Ue)?(qe="property","maybeprop"):le.hasOwnProperty(Ue)?(qe=ge?"string-2":"property","maybeprop"):ze?(qe=fe.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(qe+=" error","maybeprop")}else return te=="meta"?"block":!ze&&(te=="hash"||te=="qualifier")?(qe="error","block"):Be.top(te,fe,oe)},Be.maybeprop=function(te,fe,oe){return te==":"?He(oe,fe,"prop"):U(te,fe,oe)},Be.prop=function(te,fe,oe){if(te==";")return Ge(oe);if(te=="{"&&ze)return He(oe,fe,"propBlock");if(te=="}"||te=="{")return G(te,fe,oe);if(te=="(")return He(oe,fe,"parens");if(te=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(fe.current()))qe+=" error";else if(te=="word")ce(fe);else if(te=="interpolation")return He(oe,fe,"interpolation");return"prop"},Be.propBlock=function(te,fe,oe){return te=="}"?Ge(oe):te=="word"?(qe="property","maybeprop"):oe.context.type},Be.parens=function(te,fe,oe){return te=="{"||te=="}"?G(te,fe,oe):te==")"?Ge(oe):te=="("?He(oe,fe,"parens"):te=="interpolation"?He(oe,fe,"interpolation"):(te=="word"&&ce(fe),"parens")},Be.pseudo=function(te,fe,oe){return te=="meta"?"pseudo":te=="word"?(qe="variable-3",oe.context.type):U(te,fe,oe)},Be.documentTypes=function(te,fe,oe){return te=="word"&&_.hasOwnProperty(fe.current())?(qe="tag",oe.context.type):Be.atBlock(te,fe,oe)},Be.atBlock=function(te,fe,oe){if(te=="(")return He(oe,fe,"atBlock_parens");if(te=="}"||te==";")return G(te,fe,oe);if(te=="{")return Ge(oe)&&He(oe,fe,ze?"block":"top");if(te=="interpolation")return He(oe,fe,"interpolation");if(te=="word"){var Ue=fe.current().toLowerCase();Ue=="only"||Ue=="not"||Ue=="and"||Ue=="or"?qe="keyword":K.hasOwnProperty(Ue)?qe="attribute":X.hasOwnProperty(Ue)?qe="property":I.hasOwnProperty(Ue)?qe="keyword":B.hasOwnProperty(Ue)?qe="property":le.hasOwnProperty(Ue)?qe=ge?"string-2":"property":de.hasOwnProperty(Ue)?qe="atom":L.hasOwnProperty(Ue)?qe="keyword":qe="error"}return oe.context.type},Be.atComponentBlock=function(te,fe,oe){return te=="}"?G(te,fe,oe):te=="{"?Ge(oe)&&He(oe,fe,ze?"block":"top",!1):(te=="word"&&(qe="error"),oe.context.type)},Be.atBlock_parens=function(te,fe,oe){return te==")"?Ge(oe):te=="{"||te=="}"?G(te,fe,oe,2):Be.atBlock(te,fe,oe)},Be.restricted_atBlock_before=function(te,fe,oe){return te=="{"?He(oe,fe,"restricted_atBlock"):te=="word"&&oe.stateArg=="@counter-style"?(qe="variable","restricted_atBlock_before"):U(te,fe,oe)},Be.restricted_atBlock=function(te,fe,oe){return te=="}"?(oe.stateArg=null,Ge(oe)):te=="word"?(oe.stateArg=="@font-face"&&!xe.hasOwnProperty(fe.current().toLowerCase())||oe.stateArg=="@counter-style"&&!q.hasOwnProperty(fe.current().toLowerCase())?qe="error":qe="property","maybeprop"):"restricted_atBlock"},Be.keyframes=function(te,fe,oe){return te=="word"?(qe="variable","keyframes"):te=="{"?He(oe,fe,"top"):U(te,fe,oe)},Be.at=function(te,fe,oe){return te==";"?Ge(oe):te=="{"||te=="}"?G(te,fe,oe):(te=="word"?qe="tag":te=="hash"&&(qe="builtin"),"at")},Be.interpolation=function(te,fe,oe){return te=="}"?Ge(oe):te=="{"||te==";"?G(te,fe,oe):(te=="word"?qe="variable":te!="variable"&&te!="("&&te!=")"&&(qe="error"),"interpolation")},{startState:function(te){return{tokenize:null,state:Q?"block":"top",stateArg:null,context:new Je(Q?"block":"top",te||0,null)}},token:function(te,fe){if(!fe.tokenize&&te.eatSpace())return null;var oe=(fe.tokenize||je)(te,fe);return oe&&typeof oe=="object"&&(Oe=oe[1],oe=oe[0]),qe=oe,Oe!="comment"&&(fe.state=Be[fe.state](Oe,te,fe)),qe},indent:function(te,fe){var oe=te.context,Ue=fe&&fe.charAt(0),we=oe.indent;return oe.type=="prop"&&(Ue=="}"||Ue==")")&&(oe=oe.prev),oe.prev&&(Ue=="}"&&(oe.type=="block"||oe.type=="top"||oe.type=="interpolation"||oe.type=="restricted_atBlock")?(oe=oe.prev,we=oe.indent):(Ue==")"&&(oe.type=="parens"||oe.type=="atBlock_parens")||Ue=="{"&&(oe.type=="at"||oe.type=="atBlock"))&&(we=Math.max(0,oe.indent-j))),we},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:pe,fold:"brace"}});function p(F){for(var D={},Q=0;Q{(function(o){typeof Ms=="object"&&typeof As=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("diff",function(){var p={"+":"positive","-":"negative","@":"meta"};return{token:function(v){var C=v.string.search(/[\t ]+?$/);if(!v.sol()||C===0)return v.skipToEnd(),("error "+(p[v.string.charAt(0)]||"")).replace(/ $/,"");var b=p[v.peek()]||v.skipToEnd();return C===-1?v.skipToEnd():v.pos=C,b}}}),o.defineMIME("text/x-diff","diff")})});var mn=Ke((qs,Is)=>{(function(o){typeof qs=="object"&&typeof Is=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},v={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};o.defineMode("xml",function(C,b){var S=C.indentUnit,s={},h=b.htmlMode?p:v;for(var g in h)s[g]=h[g];for(var g in b)s[g]=b[g];var T,x;function c(_,K){function X(le){return K.tokenize=le,le(_,K)}var I=_.next();if(I=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?X(E("atom","]]>")):null:_.match("--")?X(E("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),X(z(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),K.tokenize=E("meta","?>"),"meta"):(T=_.eat("/")?"closeTag":"openTag",K.tokenize=d,"tag bracket");if(I=="&"){var B;return _.eat("#")?_.eat("x")?B=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):B=_.eatWhile(/[\d]/)&&_.eat(";"):B=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),B?"atom":"error"}else return _.eatWhile(/[^&<]/),null}c.isInText=!0;function d(_,K){var X=_.next();if(X==">"||X=="/"&&_.eat(">"))return K.tokenize=c,T=X==">"?"endTag":"selfcloseTag","tag bracket";if(X=="=")return T="equals",null;if(X=="<"){K.tokenize=c,K.state=Z,K.tagName=K.tagStart=null;var I=K.tokenize(_,K);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(X)?(K.tokenize=w(X),K.stringStartCol=_.column(),K.tokenize(_,K)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function w(_){var K=function(X,I){for(;!X.eol();)if(X.next()==_){I.tokenize=d;break}return"string"};return K.isInAttribute=!0,K}function E(_,K){return function(X,I){for(;!X.eol();){if(X.match(K)){I.tokenize=c;break}X.next()}return _}}function z(_){return function(K,X){for(var I;(I=K.next())!=null;){if(I=="<")return X.tokenize=z(_+1),X.tokenize(K,X);if(I==">")if(_==1){X.tokenize=c;break}else return X.tokenize=z(_-1),X.tokenize(K,X)}return"meta"}}function y(_){return _&&_.toLowerCase()}function R(_,K,X){this.prev=_.context,this.tagName=K||"",this.indent=_.indented,this.startOfLine=X,(s.doNotIndent.hasOwnProperty(K)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function M(_){_.context&&(_.context=_.context.prev)}function H(_,K){for(var X;;){if(!_.context||(X=_.context.tagName,!s.contextGrabbers.hasOwnProperty(y(X))||!s.contextGrabbers[y(X)].hasOwnProperty(y(K))))return;M(_)}}function Z(_,K,X){return _=="openTag"?(X.tagStart=K.column(),ee):_=="closeTag"?re:Z}function ee(_,K,X){return _=="word"?(X.tagName=K.current(),x="tag",D):s.allowMissingTagName&&_=="endTag"?(x="tag bracket",D(_,K,X)):(x="error",ee)}function re(_,K,X){if(_=="word"){var I=K.current();return X.context&&X.context.tagName!=I&&s.implicitlyClosed.hasOwnProperty(y(X.context.tagName))&&M(X),X.context&&X.context.tagName==I||s.matchClosing===!1?(x="tag",N):(x="tag error",F)}else return s.allowMissingTagName&&_=="endTag"?(x="tag bracket",N(_,K,X)):(x="error",F)}function N(_,K,X){return _!="endTag"?(x="error",N):(M(X),Z)}function F(_,K,X){return x="error",N(_,K,X)}function D(_,K,X){if(_=="word")return x="attribute",Q;if(_=="endTag"||_=="selfcloseTag"){var I=X.tagName,B=X.tagStart;return X.tagName=X.tagStart=null,_=="selfcloseTag"||s.autoSelfClosers.hasOwnProperty(y(I))?H(X,I):(H(X,I),X.context=new R(X,I,B==X.indented)),Z}return x="error",D}function Q(_,K,X){return _=="equals"?j:(s.allowMissing||(x="error"),D(_,K,X))}function j(_,K,X){return _=="string"?V:_=="word"&&s.allowUnquoted?(x="string",D):(x="error",D(_,K,X))}function V(_,K,X){return _=="string"?V:D(_,K,X)}return{startState:function(_){var K={tokenize:c,state:Z,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(K.baseIndent=_),K},token:function(_,K){if(!K.tagName&&_.sol()&&(K.indented=_.indentation()),_.eatSpace())return null;T=null;var X=K.tokenize(_,K);return(X||T)&&X!="comment"&&(x=null,K.state=K.state(T||X,_,K),x&&(X=x=="error"?X+" error":x)),X},indent:function(_,K,X){var I=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+S;if(I&&I.noIndent)return o.Pass;if(_.tokenize!=d&&_.tokenize!=c)return X?X.match(/^(\s*)/)[0].length:0;if(_.tagName)return s.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+S*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/$/,blockCommentStart:"",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(_){_.state==j&&(_.state=D)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var K=[],X=_.context;X;X=X.prev)K.push(X.tagName);return K.reverse()}}}),o.defineMIME("text/xml","xml"),o.defineMIME("application/xml","xml"),o.mimeModes.hasOwnProperty("text/html")||o.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var vn=Ke((Fs,Ns)=>{(function(o){typeof Fs=="object"&&typeof Ns=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("javascript",function(p,v){var C=p.indentUnit,b=v.statementIndent,S=v.jsonld,s=v.json||S,h=v.trackScope!==!1,g=v.typescript,T=v.wordCharacters||/[\w$\xa1-\uffff]/,x=function(){function k(pt){return{type:pt,style:"keyword"}}var O=k("keyword a"),ae=k("keyword b"),he=k("keyword c"),ne=k("keyword d"),ye=k("operator"),Xe={type:"atom",style:"atom"};return{if:k("if"),while:O,with:O,else:ae,do:ae,try:ae,finally:ae,return:ne,break:ne,continue:ne,new:k("new"),delete:he,void:he,throw:he,debugger:k("debugger"),var:k("var"),const:k("var"),let:k("var"),function:k("function"),catch:k("catch"),for:k("for"),switch:k("switch"),case:k("case"),default:k("default"),in:ye,typeof:ye,instanceof:ye,true:Xe,false:Xe,null:Xe,undefined:Xe,NaN:Xe,Infinity:Xe,this:k("this"),class:k("class"),super:k("atom"),yield:he,export:k("export"),import:k("import"),extends:he,await:he}}(),c=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function w(k){for(var O=!1,ae,he=!1;(ae=k.next())!=null;){if(!O){if(ae=="/"&&!he)return;ae=="["?he=!0:he&&ae=="]"&&(he=!1)}O=!O&&ae=="\\"}}var E,z;function y(k,O,ae){return E=k,z=ae,O}function R(k,O){var ae=k.next();if(ae=='"'||ae=="'")return O.tokenize=M(ae),O.tokenize(k,O);if(ae=="."&&k.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return y("number","number");if(ae=="."&&k.match(".."))return y("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ae))return y(ae);if(ae=="="&&k.eat(">"))return y("=>","operator");if(ae=="0"&&k.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return y("number","number");if(/\d/.test(ae))return k.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),y("number","number");if(ae=="/")return k.eat("*")?(O.tokenize=H,H(k,O)):k.eat("/")?(k.skipToEnd(),y("comment","comment")):jt(k,O,1)?(w(k),k.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),y("regexp","string-2")):(k.eat("="),y("operator","operator",k.current()));if(ae=="`")return O.tokenize=Z,Z(k,O);if(ae=="#"&&k.peek()=="!")return k.skipToEnd(),y("meta","meta");if(ae=="#"&&k.eatWhile(T))return y("variable","property");if(ae=="<"&&k.match("!--")||ae=="-"&&k.match("->")&&!/\S/.test(k.string.slice(0,k.start)))return k.skipToEnd(),y("comment","comment");if(c.test(ae))return(ae!=">"||!O.lexical||O.lexical.type!=">")&&(k.eat("=")?(ae=="!"||ae=="=")&&k.eat("="):/[<>*+\-|&?]/.test(ae)&&(k.eat(ae),ae==">"&&k.eat(ae))),ae=="?"&&k.eat(".")?y("."):y("operator","operator",k.current());if(T.test(ae)){k.eatWhile(T);var he=k.current();if(O.lastType!="."){if(x.propertyIsEnumerable(he)){var ne=x[he];return y(ne.type,ne.style,he)}if(he=="async"&&k.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return y("async","keyword",he)}return y("variable","variable",he)}}function M(k){return function(O,ae){var he=!1,ne;if(S&&O.peek()=="@"&&O.match(d))return ae.tokenize=R,y("jsonld-keyword","meta");for(;(ne=O.next())!=null&&!(ne==k&&!he);)he=!he&&ne=="\\";return he||(ae.tokenize=R),y("string","string")}}function H(k,O){for(var ae=!1,he;he=k.next();){if(he=="/"&&ae){O.tokenize=R;break}ae=he=="*"}return y("comment","comment")}function Z(k,O){for(var ae=!1,he;(he=k.next())!=null;){if(!ae&&(he=="`"||he=="$"&&k.eat("{"))){O.tokenize=R;break}ae=!ae&&he=="\\"}return y("quasi","string-2",k.current())}var ee="([{}])";function re(k,O){O.fatArrowAt&&(O.fatArrowAt=null);var ae=k.string.indexOf("=>",k.start);if(!(ae<0)){if(g){var he=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(k.string.slice(k.start,ae));he&&(ae=he.index)}for(var ne=0,ye=!1,Xe=ae-1;Xe>=0;--Xe){var pt=k.string.charAt(Xe),Et=ee.indexOf(pt);if(Et>=0&&Et<3){if(!ne){++Xe;break}if(--ne==0){pt=="("&&(ye=!0);break}}else if(Et>=3&&Et<6)++ne;else if(T.test(pt))ye=!0;else if(/["'\/`]/.test(pt))for(;;--Xe){if(Xe==0)return;var Zr=k.string.charAt(Xe-1);if(Zr==pt&&k.string.charAt(Xe-2)!="\\"){Xe--;break}}else if(ye&&!ne){++Xe;break}}ye&&!ne&&(O.fatArrowAt=Xe)}}var N={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function F(k,O,ae,he,ne,ye){this.indented=k,this.column=O,this.type=ae,this.prev=ne,this.info=ye,he!=null&&(this.align=he)}function D(k,O){if(!h)return!1;for(var ae=k.localVars;ae;ae=ae.next)if(ae.name==O)return!0;for(var he=k.context;he;he=he.prev)for(var ae=he.vars;ae;ae=ae.next)if(ae.name==O)return!0}function Q(k,O,ae,he,ne){var ye=k.cc;for(j.state=k,j.stream=ne,j.marked=null,j.cc=ye,j.style=O,k.lexical.hasOwnProperty("align")||(k.lexical.align=!0);;){var Xe=ye.length?ye.pop():s?Se:Oe;if(Xe(ae,he)){for(;ye.length&&ye[ye.length-1].lex;)ye.pop()();return j.marked?j.marked:ae=="variable"&&D(k,he)?"variable-2":O}}}var j={state:null,column:null,marked:null,cc:null};function V(){for(var k=arguments.length-1;k>=0;k--)j.cc.push(arguments[k])}function _(){return V.apply(null,arguments),!0}function K(k,O){for(var ae=O;ae;ae=ae.next)if(ae.name==k)return!0;return!1}function X(k){var O=j.state;if(j.marked="def",!!h){if(O.context){if(O.lexical.info=="var"&&O.context&&O.context.block){var ae=I(k,O.context);if(ae!=null){O.context=ae;return}}else if(!K(k,O.localVars)){O.localVars=new xe(k,O.localVars);return}}v.globalVars&&!K(k,O.globalVars)&&(O.globalVars=new xe(k,O.globalVars))}}function I(k,O){if(O)if(O.block){var ae=I(k,O.prev);return ae?ae==O.prev?O:new le(ae,O.vars,!0):null}else return K(k,O.vars)?O:new le(O.prev,new xe(k,O.vars),!1);else return null}function B(k){return k=="public"||k=="private"||k=="protected"||k=="abstract"||k=="readonly"}function le(k,O,ae){this.prev=k,this.vars=O,this.block=ae}function xe(k,O){this.name=k,this.next=O}var q=new xe("this",new xe("arguments",null));function L(){j.state.context=new le(j.state.context,j.state.localVars,!1),j.state.localVars=q}function de(){j.state.context=new le(j.state.context,j.state.localVars,!0),j.state.localVars=null}L.lex=de.lex=!0;function ze(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}ze.lex=!0;function pe(k,O){var ae=function(){var he=j.state,ne=he.indented;if(he.lexical.type=="stat")ne=he.lexical.indented;else for(var ye=he.lexical;ye&&ye.type==")"&&ye.align;ye=ye.prev)ne=ye.indented;he.lexical=new F(ne,j.stream.column(),k,null,he.lexical,O)};return ae.lex=!0,ae}function Ee(){var k=j.state;k.lexical.prev&&(k.lexical.type==")"&&(k.indented=k.lexical.indented),k.lexical=k.lexical.prev)}Ee.lex=!0;function ge(k){function O(ae){return ae==k?_():k==";"||ae=="}"||ae==")"||ae=="]"?V():_(O)}return O}function Oe(k,O){return k=="var"?_(pe("vardef",O),Hr,ge(";"),Ee):k=="keyword a"?_(pe("form"),Ze,Oe,Ee):k=="keyword b"?_(pe("form"),Oe,Ee):k=="keyword d"?j.stream.match(/^\s*$/,!1)?_():_(pe("stat"),Je,ge(";"),Ee):k=="debugger"?_(ge(";")):k=="{"?_(pe("}"),de,De,Ee,ze):k==";"?_():k=="if"?(j.state.lexical.info=="else"&&j.state.cc[j.state.cc.length-1]==Ee&&j.state.cc.pop()(),_(pe("form"),Ze,Oe,Ee,Br)):k=="function"?_(Bt):k=="for"?_(pe("form"),de,ei,Oe,ze,Ee):k=="class"||g&&O=="interface"?(j.marked="keyword",_(pe("form",k=="class"?k:O),Wr,Ee)):k=="variable"?g&&O=="declare"?(j.marked="keyword",_(Oe)):g&&(O=="module"||O=="enum"||O=="type")&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword",O=="enum"?_(Ae):O=="type"?_(ti,ge("operator"),Pe,ge(";")):_(pe("form"),Ct,ge("{"),pe("}"),De,Ee,Ee)):g&&O=="namespace"?(j.marked="keyword",_(pe("form"),Se,Oe,Ee)):g&&O=="abstract"?(j.marked="keyword",_(Oe)):_(pe("stat"),Ue):k=="switch"?_(pe("form"),Ze,ge("{"),pe("}","switch"),de,De,Ee,Ee,ze):k=="case"?_(Se,ge(":")):k=="default"?_(ge(":")):k=="catch"?_(pe("form"),L,qe,Oe,Ee,ze):k=="export"?_(pe("stat"),Ur,Ee):k=="import"?_(pe("stat"),gr,Ee):k=="async"?_(Oe):O=="@"?_(Se,Oe):V(pe("stat"),Se,ge(";"),Ee)}function qe(k){if(k=="(")return _($t,ge(")"))}function Se(k,O){return ke(k,O,!1)}function je(k,O){return ke(k,O,!0)}function Ze(k){return k!="("?V():_(pe(")"),Je,ge(")"),Ee)}function ke(k,O,ae){if(j.state.fatArrowAt==j.stream.start){var he=ae?Be:ce;if(k=="(")return _(L,pe(")"),W($t,")"),Ee,ge("=>"),he,ze);if(k=="variable")return V(L,Ct,ge("=>"),he,ze)}var ne=ae?Ge:He;return N.hasOwnProperty(k)?_(ne):k=="function"?_(Bt,ne):k=="class"||g&&O=="interface"?(j.marked="keyword",_(pe("form"),to,Ee)):k=="keyword c"||k=="async"?_(ae?je:Se):k=="("?_(pe(")"),Je,ge(")"),Ee,ne):k=="operator"||k=="spread"?_(ae?je:Se):k=="["?_(pe("]"),at,Ee,ne):k=="{"?se(Me,"}",null,ne):k=="quasi"?V(U,ne):k=="new"?_(te(ae)):_()}function Je(k){return k.match(/[;\}\)\],]/)?V():V(Se)}function He(k,O){return k==","?_(Je):Ge(k,O,!1)}function Ge(k,O,ae){var he=ae==!1?He:Ge,ne=ae==!1?Se:je;if(k=="=>")return _(L,ae?Be:ce,ze);if(k=="operator")return/\+\+|--/.test(O)||g&&O=="!"?_(he):g&&O=="<"&&j.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(pe(">"),W(Pe,">"),Ee,he):O=="?"?_(Se,ge(":"),ne):_(ne);if(k=="quasi")return V(U,he);if(k!=";"){if(k=="(")return se(je,")","call",he);if(k==".")return _(we,he);if(k=="[")return _(pe("]"),Je,ge("]"),Ee,he);if(g&&O=="as")return j.marked="keyword",_(Pe,he);if(k=="regexp")return j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),_(ne)}}function U(k,O){return k!="quasi"?V():O.slice(O.length-2)!="${"?_(U):_(Je,G)}function G(k){if(k=="}")return j.marked="string-2",j.state.tokenize=Z,_(U)}function ce(k){return re(j.stream,j.state),V(k=="{"?Oe:Se)}function Be(k){return re(j.stream,j.state),V(k=="{"?Oe:je)}function te(k){return function(O){return O=="."?_(k?oe:fe):O=="variable"&&g?_(Ft,k?Ge:He):V(k?je:Se)}}function fe(k,O){if(O=="target")return j.marked="keyword",_(He)}function oe(k,O){if(O=="target")return j.marked="keyword",_(Ge)}function Ue(k){return k==":"?_(Ee,Oe):V(He,ge(";"),Ee)}function we(k){if(k=="variable")return j.marked="property",_()}function Me(k,O){if(k=="async")return j.marked="property",_(Me);if(k=="variable"||j.style=="keyword"){if(j.marked="property",O=="get"||O=="set")return _(Le);var ae;return g&&j.state.fatArrowAt==j.stream.start&&(ae=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+ae[0].length),_($)}else{if(k=="number"||k=="string")return j.marked=S?"property":j.style+" property",_($);if(k=="jsonld-keyword")return _($);if(g&&B(O))return j.marked="keyword",_(Me);if(k=="[")return _(Se,nt,ge("]"),$);if(k=="spread")return _(je,$);if(O=="*")return j.marked="keyword",_(Me);if(k==":")return V($)}}function Le(k){return k!="variable"?V($):(j.marked="property",_(Bt))}function $(k){if(k==":")return _(je);if(k=="(")return V(Bt)}function W(k,O,ae){function he(ne,ye){if(ae?ae.indexOf(ne)>-1:ne==","){var Xe=j.state.lexical;return Xe.info=="call"&&(Xe.pos=(Xe.pos||0)+1),_(function(pt,Et){return pt==O||Et==O?V():V(k)},he)}return ne==O||ye==O?_():ae&&ae.indexOf(";")>-1?V(k):_(ge(O))}return function(ne,ye){return ne==O||ye==O?_():V(k,he)}}function se(k,O,ae){for(var he=3;he"),Pe);if(k=="quasi")return V(_t,Ht)}function xt(k){if(k=="=>")return _(Pe)}function Fe(k){return k.match(/[\}\)\]]/)?_():k==","||k==";"?_(Fe):V(nr,Fe)}function nr(k,O){if(k=="variable"||j.style=="keyword")return j.marked="property",_(nr);if(O=="?"||k=="number"||k=="string")return _(nr);if(k==":")return _(Pe);if(k=="[")return _(ge("variable"),dt,ge("]"),nr);if(k=="(")return V(hr,nr);if(!k.match(/[;\}\)\],]/))return _()}function _t(k,O){return k!="quasi"?V():O.slice(O.length-2)!="${"?_(_t):_(Pe,it)}function it(k){if(k=="}")return j.marked="string-2",j.state.tokenize=Z,_(_t)}function ot(k,O){return k=="variable"&&j.stream.match(/^\s*[?:]/,!1)||O=="?"?_(ot):k==":"?_(Pe):k=="spread"?_(ot):V(Pe)}function Ht(k,O){if(O=="<")return _(pe(">"),W(Pe,">"),Ee,Ht);if(O=="|"||k=="."||O=="&")return _(Pe);if(k=="[")return _(Pe,ge("]"),Ht);if(O=="extends"||O=="implements")return j.marked="keyword",_(Pe);if(O=="?")return _(Pe,ge(":"),Pe)}function Ft(k,O){if(O=="<")return _(pe(">"),W(Pe,">"),Ee,Ht)}function Wt(){return V(Pe,kt)}function kt(k,O){if(O=="=")return _(Pe)}function Hr(k,O){return O=="enum"?(j.marked="keyword",_(Ae)):V(Ct,nt,Ut,eo)}function Ct(k,O){if(g&&B(O))return j.marked="keyword",_(Ct);if(k=="variable")return X(O),_();if(k=="spread")return _(Ct);if(k=="[")return se(yn,"]");if(k=="{")return se(dr,"}")}function dr(k,O){return k=="variable"&&!j.stream.match(/^\s*:/,!1)?(X(O),_(Ut)):(k=="variable"&&(j.marked="property"),k=="spread"?_(Ct):k=="}"?V():k=="["?_(Se,ge("]"),ge(":"),dr):_(ge(":"),Ct,Ut))}function yn(){return V(Ct,Ut)}function Ut(k,O){if(O=="=")return _(je)}function eo(k){if(k==",")return _(Hr)}function Br(k,O){if(k=="keyword b"&&O=="else")return _(pe("form","else"),Oe,Ee)}function ei(k,O){if(O=="await")return _(ei);if(k=="(")return _(pe(")"),xn,Ee)}function xn(k){return k=="var"?_(Hr,pr):k=="variable"?_(pr):V(pr)}function pr(k,O){return k==")"?_():k==";"?_(pr):O=="in"||O=="of"?(j.marked="keyword",_(Se,pr)):V(Se,pr)}function Bt(k,O){if(O=="*")return j.marked="keyword",_(Bt);if(k=="variable")return X(O),_(Bt);if(k=="(")return _(L,pe(")"),W($t,")"),Ee,Pt,Oe,ze);if(g&&O=="<")return _(pe(">"),W(Wt,">"),Ee,Bt)}function hr(k,O){if(O=="*")return j.marked="keyword",_(hr);if(k=="variable")return X(O),_(hr);if(k=="(")return _(L,pe(")"),W($t,")"),Ee,Pt,ze);if(g&&O=="<")return _(pe(">"),W(Wt,">"),Ee,hr)}function ti(k,O){if(k=="keyword"||k=="variable")return j.marked="type",_(ti);if(O=="<")return _(pe(">"),W(Wt,">"),Ee)}function $t(k,O){return O=="@"&&_(Se,$t),k=="spread"?_($t):g&&B(O)?(j.marked="keyword",_($t)):g&&k=="this"?_(nt,Ut):V(Ct,nt,Ut)}function to(k,O){return k=="variable"?Wr(k,O):Kt(k,O)}function Wr(k,O){if(k=="variable")return X(O),_(Kt)}function Kt(k,O){if(O=="<")return _(pe(">"),W(Wt,">"),Ee,Kt);if(O=="extends"||O=="implements"||g&&k==",")return O=="implements"&&(j.marked="keyword"),_(g?Pe:Se,Kt);if(k=="{")return _(pe("}"),Gt,Ee)}function Gt(k,O){if(k=="async"||k=="variable"&&(O=="static"||O=="get"||O=="set"||g&&B(O))&&j.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return j.marked="keyword",_(Gt);if(k=="variable"||j.style=="keyword")return j.marked="property",_(Cr,Gt);if(k=="number"||k=="string")return _(Cr,Gt);if(k=="[")return _(Se,nt,ge("]"),Cr,Gt);if(O=="*")return j.marked="keyword",_(Gt);if(g&&k=="(")return V(hr,Gt);if(k==";"||k==",")return _(Gt);if(k=="}")return _();if(O=="@")return _(Se,Gt)}function Cr(k,O){if(O=="!"||O=="?")return _(Cr);if(k==":")return _(Pe,Ut);if(O=="=")return _(je);var ae=j.state.lexical.prev,he=ae&&ae.info=="interface";return V(he?hr:Bt)}function Ur(k,O){return O=="*"?(j.marked="keyword",_(Gr,ge(";"))):O=="default"?(j.marked="keyword",_(Se,ge(";"))):k=="{"?_(W($r,"}"),Gr,ge(";")):V(Oe)}function $r(k,O){if(O=="as")return j.marked="keyword",_(ge("variable"));if(k=="variable")return V(je,$r)}function gr(k){return k=="string"?_():k=="("?V(Se):k=="."?V(He):V(Kr,Vt,Gr)}function Kr(k,O){return k=="{"?se(Kr,"}"):(k=="variable"&&X(O),O=="*"&&(j.marked="keyword"),_(_n))}function Vt(k){if(k==",")return _(Kr,Vt)}function _n(k,O){if(O=="as")return j.marked="keyword",_(Kr)}function Gr(k,O){if(O=="from")return j.marked="keyword",_(Se)}function at(k){return k=="]"?_():V(W(je,"]"))}function Ae(){return V(pe("form"),Ct,ge("{"),pe("}"),W(ir,"}"),Ee,Ee)}function ir(){return V(Ct,Ut)}function kn(k,O){return k.lastType=="operator"||k.lastType==","||c.test(O.charAt(0))||/[,.]/.test(O.charAt(0))}function jt(k,O,ae){return O.tokenize==R&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(O.lastType)||O.lastType=="quasi"&&/\{\s*$/.test(k.string.slice(0,k.pos-(ae||0)))}return{startState:function(k){var O={tokenize:R,lastType:"sof",cc:[],lexical:new F((k||0)-C,0,"block",!1),localVars:v.localVars,context:v.localVars&&new le(null,null,!1),indented:k||0};return v.globalVars&&typeof v.globalVars=="object"&&(O.globalVars=v.globalVars),O},token:function(k,O){if(k.sol()&&(O.lexical.hasOwnProperty("align")||(O.lexical.align=!1),O.indented=k.indentation(),re(k,O)),O.tokenize!=H&&k.eatSpace())return null;var ae=O.tokenize(k,O);return E=="comment"?ae:(O.lastType=E=="operator"&&(z=="++"||z=="--")?"incdec":E,Q(O,ae,E,z,k))},indent:function(k,O){if(k.tokenize==H||k.tokenize==Z)return o.Pass;if(k.tokenize!=R)return 0;var ae=O&&O.charAt(0),he=k.lexical,ne;if(!/^\s*else\b/.test(O))for(var ye=k.cc.length-1;ye>=0;--ye){var Xe=k.cc[ye];if(Xe==Ee)he=he.prev;else if(Xe!=Br&&Xe!=ze)break}for(;(he.type=="stat"||he.type=="form")&&(ae=="}"||(ne=k.cc[k.cc.length-1])&&(ne==He||ne==Ge)&&!/^[,\.=+\-*:?[\(]/.test(O));)he=he.prev;b&&he.type==")"&&he.prev.type=="stat"&&(he=he.prev);var pt=he.type,Et=ae==pt;return pt=="vardef"?he.indented+(k.lastType=="operator"||k.lastType==","?he.info.length+1:0):pt=="form"&&ae=="{"?he.indented:pt=="form"?he.indented+C:pt=="stat"?he.indented+(kn(k,O)?b||C:0):he.info=="switch"&&!Et&&v.doubleIndentSwitch!=!1?he.indented+(/^(?:case|default)\b/.test(O)?C:2*C):he.align?he.column+(Et?0:1):he.indented+(Et?0:C)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:S,jsonMode:s,expressionAllowed:jt,skipExpression:function(k){Q(k,"atom","atom","true",new o.StringStream("",2,null))}}}),o.registerHelper("wordChars","javascript",/[\w$]/),o.defineMIME("text/javascript","javascript"),o.defineMIME("text/ecmascript","javascript"),o.defineMIME("application/javascript","javascript"),o.defineMIME("application/x-javascript","javascript"),o.defineMIME("application/ecmascript","javascript"),o.defineMIME("application/json",{name:"javascript",json:!0}),o.defineMIME("application/x-json",{name:"javascript",json:!0}),o.defineMIME("application/manifest+json",{name:"javascript",json:!0}),o.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),o.defineMIME("text/typescript",{name:"javascript",typescript:!0}),o.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Qn=Ke((Os,Ps)=>{(function(o){typeof Os=="object"&&typeof Ps=="object"?o(We(),mn(),vn(),gn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],o):o(CodeMirror)})(function(o){"use strict";var p={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function v(T,x,c){var d=T.current(),w=d.search(x);return w>-1?T.backUp(d.length-w):d.match(/<\/?$/)&&(T.backUp(d.length),T.match(x,!1)||T.match(d)),c}var C={};function b(T){var x=C[T];return x||(C[T]=new RegExp("\\s+"+T+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function S(T,x){var c=T.match(b(x));return c?/^\s*(.*?)\s*$/.exec(c[2])[1]:""}function s(T,x){return new RegExp((x?"^":"")+"","i")}function h(T,x){for(var c in T)for(var d=x[c]||(x[c]=[]),w=T[c],E=w.length-1;E>=0;E--)d.unshift(w[E])}function g(T,x){for(var c=0;c=0;z--)d.script.unshift(["type",E[z].matches,E[z].mode]);function y(R,M){var H=c.token(R,M.htmlState),Z=/\btag\b/.test(H),ee;if(Z&&!/[<>\s\/]/.test(R.current())&&(ee=M.htmlState.tagName&&M.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(ee))M.inTag=ee+" ";else if(M.inTag&&Z&&/>$/.test(R.current())){var re=/^([\S]+) (.*)/.exec(M.inTag);M.inTag=null;var N=R.current()==">"&&g(d[re[1]],re[2]),F=o.getMode(T,N),D=s(re[1],!0),Q=s(re[1],!1);M.token=function(j,V){return j.match(D,!1)?(V.token=y,V.localState=V.localMode=null,null):v(j,Q,V.localMode.token(j,V.localState))},M.localMode=F,M.localState=o.startState(F,c.indent(M.htmlState,"",""))}else M.inTag&&(M.inTag+=R.current(),R.eol()&&(M.inTag+=" "));return H}return{startState:function(){var R=o.startState(c);return{token:y,inTag:null,localMode:null,localState:null,htmlState:R}},copyState:function(R){var M;return R.localState&&(M=o.copyState(R.localMode,R.localState)),{token:R.token,inTag:R.inTag,localMode:R.localMode,localState:M,htmlState:o.copyState(c,R.htmlState)}},token:function(R,M){return M.token(R,M)},indent:function(R,M,H){return!R.localMode||/^\s*<\//.test(M)?c.indent(R.htmlState,M,H):R.localMode.indent?R.localMode.indent(R.localState,M,H):o.Pass},innerMode:function(R){return{state:R.localState||R.htmlState,mode:R.localMode||c}}}},"xml","javascript","css"),o.defineMIME("text/html","htmlmixed")})});var Hs=Ke((js,Rs)=>{(function(o){typeof js=="object"&&typeof Rs=="object"?o(We(),Qn(),Yn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("django:inner",function(){var p=["block","endblock","for","endfor","true","false","filter","endfilter","loop","none","self","super","if","elif","endif","as","else","import","with","endwith","without","context","ifequal","endifequal","ifnotequal","endifnotequal","extends","include","load","comment","endcomment","empty","url","static","trans","blocktrans","endblocktrans","now","regroup","lorem","ifchanged","endifchanged","firstof","debug","cycle","csrf_token","autoescape","endautoescape","spaceless","endspaceless","ssi","templatetag","verbatim","endverbatim","widthratio"],v=["add","addslashes","capfirst","center","cut","date","default","default_if_none","dictsort","dictsortreversed","divisibleby","escape","escapejs","filesizeformat","first","floatformat","force_escape","get_digit","iriencode","join","last","length","length_is","linebreaks","linebreaksbr","linenumbers","ljust","lower","make_list","phone2numeric","pluralize","pprint","random","removetags","rjust","safe","safeseq","slice","slugify","stringformat","striptags","time","timesince","timeuntil","title","truncatechars","truncatechars_html","truncatewords","truncatewords_html","unordered_list","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap","yesno"],C=["==","!=","<",">","<=",">="],b=["in","not","or","and"];p=new RegExp("^\\b("+p.join("|")+")\\b"),v=new RegExp("^\\b("+v.join("|")+")\\b"),C=new RegExp("^\\b("+C.join("|")+")\\b"),b=new RegExp("^\\b("+b.join("|")+")\\b");function S(c,d){if(c.match("{{"))return d.tokenize=h,"tag";if(c.match("{%"))return d.tokenize=g,"tag";if(c.match("{#"))return d.tokenize=T,"comment";for(;c.next()!=null&&!c.match(/\{[{%#]/,!1););return null}function s(c,d){return function(w,E){if(!E.escapeNext&&w.eat(c))E.tokenize=d;else{E.escapeNext&&(E.escapeNext=!1);var z=w.next();z=="\\"&&(E.escapeNext=!0)}return"string"}}function h(c,d){if(d.waitDot){if(d.waitDot=!1,c.peek()!=".")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("."))return d.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(d.waitPipe){if(d.waitPipe=!1,c.peek()!="|")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("|"))return d.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}return d.waitProperty&&(d.waitProperty=!1,c.match(/\b(\w+)\b/))?(d.waitDot=!0,d.waitPipe=!0,"property"):d.waitFilter&&(d.waitFilter=!1,c.match(v))?"variable-2":c.eatSpace()?(d.waitProperty=!1,"null"):c.match(/\b\d+(\.\d+)?\b/)?"number":c.match("'")?(d.tokenize=s("'",d.tokenize),"string"):c.match('"')?(d.tokenize=s('"',d.tokenize),"string"):c.match(/\b(\w+)\b/)&&!d.foundVariable?(d.waitDot=!0,d.waitPipe=!0,"variable"):c.match("}}")?(d.waitProperty=null,d.waitFilter=null,d.waitDot=null,d.waitPipe=null,d.tokenize=S,"tag"):(c.next(),"null")}function g(c,d){if(d.waitDot){if(d.waitDot=!1,c.peek()!=".")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("."))return d.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(d.waitPipe){if(d.waitPipe=!1,c.peek()!="|")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("|"))return d.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}if(d.waitProperty&&(d.waitProperty=!1,c.match(/\b(\w+)\b/)))return d.waitDot=!0,d.waitPipe=!0,"property";if(d.waitFilter&&(d.waitFilter=!1,c.match(v)))return"variable-2";if(c.eatSpace())return d.waitProperty=!1,"null";if(c.match(/\b\d+(\.\d+)?\b/))return"number";if(c.match("'"))return d.tokenize=s("'",d.tokenize),"string";if(c.match('"'))return d.tokenize=s('"',d.tokenize),"string";if(c.match(C))return"operator";if(c.match(b))return"keyword";var w=c.match(p);return w?(w[0]=="comment"&&(d.blockCommentTag=!0),"keyword"):c.match(/\b(\w+)\b/)?(d.waitDot=!0,d.waitPipe=!0,"variable"):c.match("%}")?(d.waitProperty=null,d.waitFilter=null,d.waitDot=null,d.waitPipe=null,d.blockCommentTag?(d.blockCommentTag=!1,d.tokenize=x):d.tokenize=S,"tag"):(c.next(),"null")}function T(c,d){return c.match(/^.*?#\}/)?d.tokenize=S:c.skipToEnd(),"comment"}function x(c,d){return c.match(/\{%\s*endcomment\s*%\}/,!1)?(d.tokenize=g,c.match("{%"),"tag"):(c.next(),"comment")}return{startState:function(){return{tokenize:S}},token:function(c,d){return d.tokenize(c,d)},blockCommentStart:"{% comment %}",blockCommentEnd:"{% endcomment %}"}}),o.defineMode("django",function(p){var v=o.getMode(p,"text/html"),C=o.getMode(p,"django:inner");return o.overlayMode(v,C)}),o.defineMIME("text/x-django","django")})});var Di=Ke((Bs,Ws)=>{(function(o){typeof Bs=="object"&&typeof Ws=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode=function(x,c){o.defineMode(x,function(d){return o.simpleMode(d,c)})},o.simpleMode=function(x,c){p(c,"start");var d={},w=c.meta||{},E=!1;for(var z in c)if(z!=w&&c.hasOwnProperty(z))for(var y=d[z]=[],R=c[z],M=0;M2&&H.token&&typeof H.token!="string"){for(var re=2;re-1)return o.Pass;var z=d.indent.length-1,y=x[d.state];e:for(;;){for(var R=0;R{(function(o){typeof Us=="object"&&typeof $s=="object"?o(We(),Di()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],o):o(CodeMirror)})(function(o){"use strict";var p="from",v=new RegExp("^(\\s*)\\b("+p+")\\b","i"),C=["run","cmd","entrypoint","shell"],b=new RegExp("^(\\s*)("+C.join("|")+")(\\s+\\[)","i"),S="expose",s=new RegExp("^(\\s*)("+S+")(\\s+)","i"),h=["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"],g=[p,S].concat(C).concat(h),T="("+g.join("|")+")",x=new RegExp("^(\\s*)"+T+"(\\s*)(#.*)?$","i"),c=new RegExp("^(\\s*)"+T+"(\\s+)","i");o.defineSimpleMode("dockerfile",{start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:v,token:[null,"keyword"],sol:!0,next:"from"},{regex:x,token:[null,"keyword",null,"error"],sol:!0},{regex:b,token:[null,"keyword",null],sol:!0,next:"array"},{regex:s,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:c,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],meta:{lineComment:"#"}}),o.defineMIME("text/x-dockerfile","dockerfile")})});var Xs=Ke((Gs,Zs)=>{(function(o){typeof Gs=="object"&&typeof Zs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var p=0;p-1&&C.substring(s+1,C.length);if(h)return o.findModeByExtension(h)},o.findModeByName=function(C){C=C.toLowerCase();for(var b=0;b{(function(o){typeof Ys=="object"&&typeof Qs=="object"?o(We(),mn(),Xs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("markdown",function(p,v){var C=o.getMode(p,"text/html"),b=C.name=="null";function S(q){if(o.findModeByName){var L=o.findModeByName(q);L&&(q=L.mime||L.mimes[0])}var de=o.getMode(p,q);return de.name=="null"?null:de}v.highlightFormatting===void 0&&(v.highlightFormatting=!1),v.maxBlockquoteDepth===void 0&&(v.maxBlockquoteDepth=0),v.taskLists===void 0&&(v.taskLists=!1),v.strikethrough===void 0&&(v.strikethrough=!1),v.emoji===void 0&&(v.emoji=!1),v.fencedCodeBlockHighlighting===void 0&&(v.fencedCodeBlockHighlighting=!0),v.fencedCodeBlockDefaultMode===void 0&&(v.fencedCodeBlockDefaultMode="text/plain"),v.xml===void 0&&(v.xml=!0),v.tokenTypeOverrides===void 0&&(v.tokenTypeOverrides={});var s={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var h in s)s.hasOwnProperty(h)&&v.tokenTypeOverrides[h]&&(s[h]=v.tokenTypeOverrides[h]);var g=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,x=/^\[(x| )\](?=\s)/i,c=v.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,w=/^[^#!\[\]*_\\<>` "'(~:]+/,E=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,z=/^\s*\[[^\]]+?\]:.*$/,y=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,R=" ";function M(q,L,de){return L.f=L.inline=de,de(q,L)}function H(q,L,de){return L.f=L.block=de,de(q,L)}function Z(q){return!q||!/\S/.test(q.string)}function ee(q){if(q.linkTitle=!1,q.linkHref=!1,q.linkText=!1,q.em=!1,q.strong=!1,q.strikethrough=!1,q.quote=0,q.indentedCode=!1,q.f==N){var L=b;if(!L){var de=o.innerMode(C,q.htmlState);L=de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText}L&&(q.f=j,q.block=re,q.htmlState=null)}return q.trailingSpace=0,q.trailingSpaceNewLine=!1,q.prevLine=q.thisLine,q.thisLine={stream:null},null}function re(q,L){var de=q.column()===L.indentation,ze=Z(L.prevLine.stream),pe=L.indentedCode,Ee=L.prevLine.hr,ge=L.list!==!1,Oe=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var qe=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,ge)){for(L.list=null;qe=4&&(pe||L.prevLine.fencedCodeEnd||L.prevLine.header||ze))return q.skipToEnd(),L.indentedCode=!0,s.code;if(q.eatSpace())return null;if(de&&L.indentation<=Oe&&(Ze=q.match(c))&&Ze[1].length<=6)return L.quote=0,L.header=Ze[1].length,L.thisLine.header=!0,v.highlightFormatting&&(L.formatting="header"),L.f=L.inline,D(L);if(L.indentation<=Oe&&q.eat(">"))return L.quote=de?1:L.quote+1,v.highlightFormatting&&(L.formatting="quote"),q.eatSpace(),D(L);if(!je&&!L.setext&&de&&L.indentation<=Oe&&(Ze=q.match(T))){var ke=Ze[1]?"ol":"ul";return L.indentation=qe+q.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,v.taskLists&&q.match(x,!1)&&(L.taskList=!0),L.f=L.inline,v.highlightFormatting&&(L.formatting=["list","list-"+ke]),D(L)}else{if(de&&L.indentation<=Oe&&(Ze=q.match(E,!0)))return L.quote=0,L.fencedEndRE=new RegExp(Ze[1]+"+ *$"),L.localMode=v.fencedCodeBlockHighlighting&&S(Ze[2]||v.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=o.startState(L.localMode)),L.f=L.block=F,v.highlightFormatting&&(L.formatting="code-block"),L.code=-1,D(L);if(L.setext||(!Se||!ge)&&!L.quote&&L.list===!1&&!L.code&&!je&&!z.test(q.string)&&(Ze=q.lookAhead(1))&&(Ze=Ze.match(d)))return L.setext?(L.header=L.setext,L.setext=0,q.skipToEnd(),v.highlightFormatting&&(L.formatting="header")):(L.header=Ze[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,D(L);if(je)return q.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,s.hr;if(q.peek()==="[")return M(q,L,I)}return M(q,L,L.inline)}function N(q,L){var de=C.token(q,L.htmlState);if(!b){var ze=o.innerMode(C,L.htmlState);(ze.mode.name=="xml"&&ze.state.tagStart===null&&!ze.state.context&&ze.state.tokenize.isInText||L.md_inside&&q.current().indexOf(">")>-1)&&(L.f=j,L.block=re,L.htmlState=null)}return de}function F(q,L){var de=L.listStack[L.listStack.length-1]||0,ze=L.indentation=q.quote?L.push(s.formatting+"-"+q.formatting[de]+"-"+q.quote):L.push("error"))}if(q.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(q.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(q.linkHref?L.push(s.linkHref,"url"):(q.strong&&L.push(s.strong),q.em&&L.push(s.em),q.strikethrough&&L.push(s.strikethrough),q.emoji&&L.push(s.emoji),q.linkText&&L.push(s.linkText),q.code&&L.push(s.code),q.image&&L.push(s.image),q.imageAltText&&L.push(s.imageAltText,"link"),q.imageMarker&&L.push(s.imageMarker)),q.header&&L.push(s.header,s.header+"-"+q.header),q.quote&&(L.push(s.quote),!v.maxBlockquoteDepth||v.maxBlockquoteDepth>=q.quote?L.push(s.quote+"-"+q.quote):L.push(s.quote+"-"+v.maxBlockquoteDepth)),q.list!==!1){var ze=(q.listStack.length-1)%3;ze?ze===1?L.push(s.list2):L.push(s.list3):L.push(s.list1)}return q.trailingSpaceNewLine?L.push("trailing-space-new-line"):q.trailingSpace&&L.push("trailing-space-"+(q.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function Q(q,L){if(q.match(w,!0))return D(L)}function j(q,L){var de=L.text(q,L);if(typeof de<"u")return de;if(L.list)return L.list=null,D(L);if(L.taskList){var ze=q.match(x,!0)[1]===" ";return ze?L.taskOpen=!0:L.taskClosed=!0,v.highlightFormatting&&(L.formatting="task"),L.taskList=!1,D(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&q.match(/^#+$/,!0))return v.highlightFormatting&&(L.formatting="header"),D(L);var pe=q.next();if(L.linkTitle){L.linkTitle=!1;var Ee=pe;pe==="("&&(Ee=")"),Ee=(Ee+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ge="^\\s*(?:[^"+Ee+"\\\\]+|\\\\\\\\|\\\\.)"+Ee;if(q.match(new RegExp(ge),!0))return s.linkHref}if(pe==="`"){var Oe=L.formatting;v.highlightFormatting&&(L.formatting="code"),q.eatWhile("`");var qe=q.current().length;if(L.code==0&&(!L.quote||qe==1))return L.code=qe,D(L);if(qe==L.code){var Se=D(L);return L.code=0,Se}else return L.formatting=Oe,D(L)}else if(L.code)return D(L);if(pe==="\\"&&(q.next(),v.highlightFormatting)){var je=D(L),Ze=s.formatting+"-escape";return je?je+" "+Ze:Ze}if(pe==="!"&&q.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,v.highlightFormatting&&(L.formatting="image"),D(L);if(pe==="["&&L.imageMarker&&q.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,v.highlightFormatting&&(L.formatting="image"),D(L);if(pe==="]"&&L.imageAltText){v.highlightFormatting&&(L.formatting="image");var je=D(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=_,je}if(pe==="["&&!L.image)return L.linkText&&q.match(/^.*?\]/)||(L.linkText=!0,v.highlightFormatting&&(L.formatting="link")),D(L);if(pe==="]"&&L.linkText){v.highlightFormatting&&(L.formatting="link");var je=D(L);return L.linkText=!1,L.inline=L.f=q.match(/\(.*?\)| ?\[.*?\]/,!1)?_:j,je}if(pe==="<"&&q.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=V,v.highlightFormatting&&(L.formatting="link");var je=D(L);return je?je+=" ":je="",je+s.linkInline}if(pe==="<"&&q.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=V,v.highlightFormatting&&(L.formatting="link");var je=D(L);return je?je+=" ":je="",je+s.linkEmail}if(v.xml&&pe==="<"&&q.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ke=q.string.indexOf(">",q.pos);if(ke!=-1){var Je=q.string.substring(q.start,ke);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Je)&&(L.md_inside=!0)}return q.backUp(1),L.htmlState=o.startState(C),H(q,L,N)}if(v.xml&&pe==="<"&&q.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(pe==="*"||pe==="_"){for(var He=1,Ge=q.pos==1?" ":q.string.charAt(q.pos-2);He<3&&q.eat(pe);)He++;var U=q.peek()||" ",G=!/\s/.test(U)&&(!y.test(U)||/\s/.test(Ge)||y.test(Ge)),ce=!/\s/.test(Ge)&&(!y.test(Ge)||/\s/.test(U)||y.test(U)),Be=null,te=null;if(He%2&&(!L.em&&G&&(pe==="*"||!ce||y.test(Ge))?Be=!0:L.em==pe&&ce&&(pe==="*"||!G||y.test(U))&&(Be=!1)),He>1&&(!L.strong&&G&&(pe==="*"||!ce||y.test(Ge))?te=!0:L.strong==pe&&ce&&(pe==="*"||!G||y.test(U))&&(te=!1)),te!=null||Be!=null){v.highlightFormatting&&(L.formatting=Be==null?"strong":te==null?"em":"strong em"),Be===!0&&(L.em=pe),te===!0&&(L.strong=pe);var Se=D(L);return Be===!1&&(L.em=!1),te===!1&&(L.strong=!1),Se}}else if(pe===" "&&(q.eat("*")||q.eat("_"))){if(q.peek()===" ")return D(L);q.backUp(1)}if(v.strikethrough){if(pe==="~"&&q.eatWhile(pe)){if(L.strikethrough){v.highlightFormatting&&(L.formatting="strikethrough");var Se=D(L);return L.strikethrough=!1,Se}else if(q.match(/^[^\s]/,!1))return L.strikethrough=!0,v.highlightFormatting&&(L.formatting="strikethrough"),D(L)}else if(pe===" "&&q.match("~~",!0)){if(q.peek()===" ")return D(L);q.backUp(2)}}if(v.emoji&&pe===":"&&q.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,v.highlightFormatting&&(L.formatting="emoji");var fe=D(L);return L.emoji=!1,fe}return pe===" "&&(q.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),D(L)}function V(q,L){var de=q.next();if(de===">"){L.f=L.inline=j,v.highlightFormatting&&(L.formatting="link");var ze=D(L);return ze?ze+=" ":ze="",ze+s.linkInline}return q.match(/^[^>]+/,!0),s.linkInline}function _(q,L){if(q.eatSpace())return null;var de=q.next();return de==="("||de==="["?(L.f=L.inline=X(de==="("?")":"]"),v.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,D(L)):"error"}var K={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function X(q){return function(L,de){var ze=L.next();if(ze===q){de.f=de.inline=j,v.highlightFormatting&&(de.formatting="link-string");var pe=D(de);return de.linkHref=!1,pe}return L.match(K[q]),de.linkHref=!0,D(de)}}function I(q,L){return q.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=B,q.next(),v.highlightFormatting&&(L.formatting="link"),L.linkText=!0,D(L)):M(q,L,j)}function B(q,L){if(q.match("]:",!0)){L.f=L.inline=le,v.highlightFormatting&&(L.formatting="link");var de=D(L);return L.linkText=!1,de}return q.match(/^([^\]\\]|\\.)+/,!0),s.linkText}function le(q,L){return q.eatSpace()?null:(q.match(/^[^\s]+/,!0),q.peek()===void 0?L.linkTitle=!0:q.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),L.f=L.inline=j,s.linkHref+" url")}var xe={startState:function(){return{f:re,prevLine:{stream:null},thisLine:{stream:null},block:re,htmlState:null,indentation:0,inline:j,text:Q,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(q){return{f:q.f,prevLine:q.prevLine,thisLine:q.thisLine,block:q.block,htmlState:q.htmlState&&o.copyState(C,q.htmlState),indentation:q.indentation,localMode:q.localMode,localState:q.localMode?o.copyState(q.localMode,q.localState):null,inline:q.inline,text:q.text,formatting:!1,linkText:q.linkText,linkTitle:q.linkTitle,linkHref:q.linkHref,code:q.code,em:q.em,strong:q.strong,strikethrough:q.strikethrough,emoji:q.emoji,header:q.header,setext:q.setext,hr:q.hr,taskList:q.taskList,list:q.list,listStack:q.listStack.slice(0),quote:q.quote,indentedCode:q.indentedCode,trailingSpace:q.trailingSpace,trailingSpaceNewLine:q.trailingSpaceNewLine,md_inside:q.md_inside,fencedEndRE:q.fencedEndRE}},token:function(q,L){if(L.formatting=!1,q!=L.thisLine.stream){if(L.header=0,L.hr=!1,q.match(/^\s*$/,!0))return ee(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:q},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=N)){var de=q.match(/^\s*/,!0)[0].replace(/\t/g,R).length;if(L.indentation=de,L.indentationDiff=null,de>0)return null}}return L.f(q,L)},innerMode:function(q){return q.block==N?{state:q.htmlState,mode:C}:q.localState?{state:q.localState,mode:q.localMode}:{state:q,mode:xe}},indent:function(q,L,de){return q.block==N&&C.indent?C.indent(q.htmlState,L,de):q.localState&&q.localMode.indent?q.localMode.indent(q.localState,L,de):o.Pass},blankLine:ee,getType:D,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return xe},"xml"),o.defineMIME("text/markdown","markdown"),o.defineMIME("text/x-markdown","markdown")})});var eu=Ke((Vs,Js)=>{(function(o){typeof Vs=="object"&&typeof Js=="object"?o(We(),Jo(),Yn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],o):o(CodeMirror)})(function(o){"use strict";var p=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;o.defineMode("gfm",function(v,C){var b=0;function S(T){return T.code=!1,null}var s={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(T){return{code:T.code,codeBlock:T.codeBlock,ateSpace:T.ateSpace}},token:function(T,x){if(x.combineTokens=null,x.codeBlock)return T.match(/^```+/)?(x.codeBlock=!1,null):(T.skipToEnd(),null);if(T.sol()&&(x.code=!1),T.sol()&&T.match(/^```+/))return T.skipToEnd(),x.codeBlock=!0,null;if(T.peek()==="`"){T.next();var c=T.pos;T.eatWhile("`");var d=1+T.pos-c;return x.code?d===b&&(x.code=!1):(b=d,x.code=!0),null}else if(x.code)return T.next(),null;if(T.eatSpace())return x.ateSpace=!0,null;if((T.sol()||x.ateSpace)&&(x.ateSpace=!1,C.gitHubSpice!==!1)){if(T.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return x.combineTokens=!0,"link";if(T.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return x.combineTokens=!0,"link"}return T.match(p)&&T.string.slice(T.start-2,T.start)!="]("&&(T.start==0||/\W/.test(T.string.charAt(T.start-1)))?(x.combineTokens=!0,"link"):(T.next(),null)},blankLine:S},h={taskLists:!0,strikethrough:!0,emoji:!0};for(var g in C)h[g]=C[g];return h.name="markdown",o.overlayMode(o.getMode(v,h),s)},"markdown"),o.defineMIME("text/x-gfm","gfm")})});var nu=Ke((tu,ru)=>{(function(o){typeof tu=="object"&&typeof ru=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("go",function(p){var v=p.indentUnit,C={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0,any:!0,comparable:!0},b={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},S=/[+\-*&^%:=<>!|\/]/,s;function h(w,E){var z=w.next();if(z=='"'||z=="'"||z=="`")return E.tokenize=g(z),E.tokenize(w,E);if(/[\d\.]/.test(z))return z=="."?w.match(/^[0-9_]+([eE][\-+]?[0-9_]+)?/):z=="0"?w.match(/^[xX][0-9a-fA-F_]+/)||w.match(/^[0-7_]+/):w.match(/^[0-9_]*\.?[0-9_]*([eE][\-+]?[0-9_]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(z))return s=z,null;if(z=="/"){if(w.eat("*"))return E.tokenize=T,T(w,E);if(w.eat("/"))return w.skipToEnd(),"comment"}if(S.test(z))return w.eatWhile(S),"operator";w.eatWhile(/[\w\$_\xa1-\uffff]/);var y=w.current();return C.propertyIsEnumerable(y)?((y=="case"||y=="default")&&(s="case"),"keyword"):b.propertyIsEnumerable(y)?"atom":"variable"}function g(w){return function(E,z){for(var y=!1,R,M=!1;(R=E.next())!=null;){if(R==w&&!y){M=!0;break}y=!y&&w!="`"&&R=="\\"}return(M||!(y||w=="`"))&&(z.tokenize=h),"string"}}function T(w,E){for(var z=!1,y;y=w.next();){if(y=="/"&&z){E.tokenize=h;break}z=y=="*"}return"comment"}function x(w,E,z,y,R){this.indented=w,this.column=E,this.type=z,this.align=y,this.prev=R}function c(w,E,z){return w.context=new x(w.indented,E,z,null,w.context)}function d(w){if(w.context.prev){var E=w.context.type;return(E==")"||E=="]"||E=="}")&&(w.indented=w.context.indented),w.context=w.context.prev}}return{startState:function(w){return{tokenize:null,context:new x((w||0)-v,0,"top",!1),indented:0,startOfLine:!0}},token:function(w,E){var z=E.context;if(w.sol()&&(z.align==null&&(z.align=!1),E.indented=w.indentation(),E.startOfLine=!0,z.type=="case"&&(z.type="}")),w.eatSpace())return null;s=null;var y=(E.tokenize||h)(w,E);return y=="comment"||(z.align==null&&(z.align=!0),s=="{"?c(E,w.column(),"}"):s=="["?c(E,w.column(),"]"):s=="("?c(E,w.column(),")"):s=="case"?z.type="case":(s=="}"&&z.type=="}"||s==z.type)&&d(E),E.startOfLine=!1),y},indent:function(w,E){if(w.tokenize!=h&&w.tokenize!=null)return o.Pass;var z=w.context,y=E&&E.charAt(0);if(z.type=="case"&&/^(?:case|default)\b/.test(E))return w.context.type="}",z.indented;var R=y==z.type;return z.align?z.column+(R?0:1):z.indented+(R?0:v)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),o.defineMIME("text/x-go","go")})});var au=Ke((iu,ou)=>{(function(o){typeof iu=="object"&&typeof ou=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("http",function(){function p(T,x){return T.skipToEnd(),x.cur=h,"error"}function v(T,x){return T.match(/^HTTP\/\d\.\d/)?(x.cur=C,"keyword"):T.match(/^[A-Z]+/)&&/[ \t]/.test(T.peek())?(x.cur=S,"keyword"):p(T,x)}function C(T,x){var c=T.match(/^\d+/);if(!c)return p(T,x);x.cur=b;var d=Number(c[0]);return d>=100&&d<200?"positive informational":d>=200&&d<300?"positive success":d>=300&&d<400?"positive redirect":d>=400&&d<500?"negative client-error":d>=500&&d<600?"negative server-error":"error"}function b(T,x){return T.skipToEnd(),x.cur=h,null}function S(T,x){return T.eatWhile(/\S/),x.cur=s,"string-2"}function s(T,x){return T.match(/^HTTP\/\d\.\d$/)?(x.cur=h,"keyword"):p(T,x)}function h(T){return T.sol()&&!T.eat(/[ \t]/)?T.match(/^.*?:/)?"atom":(T.skipToEnd(),"error"):(T.skipToEnd(),"string")}function g(T){return T.skipToEnd(),null}return{token:function(T,x){var c=x.cur;return c!=h&&c!=g&&T.eatSpace()?null:c(T,x)},blankLine:function(T){T.cur=g},startState:function(){return{cur:v}}}}),o.defineMIME("message/http","http")})});var uu=Ke((lu,su)=>{(function(o){typeof lu=="object"&&typeof su=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("jinja2",function(){var p=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","do","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","set","raw","endraw","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","call","endcall","macro","endmacro","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","without","context","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","pluralize","autoescape","endautoescape"],v=/^[+\-*&%=<>!?|~^]/,C=/^[:\[\(\{]/,b=["true","false"],S=/^(\d[+\-\*\/])?\d+(\.\d+)?/;p=new RegExp("(("+p.join(")|(")+"))\\b"),b=new RegExp("(("+b.join(")|(")+"))\\b");function s(h,g){var T=h.peek();if(g.incomment)return h.skipTo("#}")?(h.eatWhile(/\#|}/),g.incomment=!1):h.skipToEnd(),"comment";if(g.intag){if(g.operator){if(g.operator=!1,h.match(b))return"atom";if(h.match(S))return"number"}if(g.sign){if(g.sign=!1,h.match(b))return"atom";if(h.match(S))return"number"}if(g.instring)return T==g.instring&&(g.instring=!1),h.next(),"string";if(T=="'"||T=='"')return g.instring=T,h.next(),"string";if(g.inbraces>0&&T==")")h.next(),g.inbraces--;else if(T=="(")h.next(),g.inbraces++;else if(g.inbrackets>0&&T=="]")h.next(),g.inbrackets--;else if(T=="[")h.next(),g.inbrackets++;else{if(!g.lineTag&&(h.match(g.intag+"}")||h.eat("-")&&h.match(g.intag+"}")))return g.intag=!1,"tag";if(h.match(v))return g.operator=!0,"operator";if(h.match(C))g.sign=!0;else{if(h.column()==1&&g.lineTag&&h.match(p))return"keyword";if(h.eat(" ")||h.sol()){if(h.match(p))return"keyword";if(h.match(b))return"atom";if(h.match(S))return"number";h.sol()&&h.next()}else h.next()}}return"variable"}else if(h.eat("{")){if(h.eat("#"))return g.incomment=!0,h.skipTo("#}")?(h.eatWhile(/\#|}/),g.incomment=!1):h.skipToEnd(),"comment";if(T=h.eat(/\{|%/))return g.intag=T,g.inbraces=0,g.inbrackets=0,T=="{"&&(g.intag="}"),h.eat("-"),"tag"}else if(h.eat("#")){if(h.peek()=="#")return h.skipToEnd(),"comment";if(!h.eol())return g.intag=!0,g.lineTag=!0,g.inbraces=0,g.inbrackets=0,"tag"}h.next()}return{startState:function(){return{tokenize:s,inbrackets:0,inbraces:0}},token:function(h,g){var T=g.tokenize(h,g);return h.eol()&&g.lineTag&&!g.instring&&g.inbraces==0&&g.inbrackets==0&&(g.intag=!1,g.lineTag=!1),T},blockCommentStart:"{#",blockCommentEnd:"#}",lineComment:"##"}}),o.defineMIME("text/jinja2","jinja2")})});var du=Ke((cu,fu)=>{(function(o){typeof cu=="object"&&typeof fu=="object"?o(We(),mn(),vn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript"],o):o(CodeMirror)})(function(o){"use strict";function p(C,b,S,s){this.state=C,this.mode=b,this.depth=S,this.prev=s}function v(C){return new p(o.copyState(C.mode,C.state),C.mode,C.depth,C.prev&&v(C.prev))}o.defineMode("jsx",function(C,b){var S=o.getMode(C,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),s=o.getMode(C,b&&b.base||"javascript");function h(c){var d=c.tagName;c.tagName=null;var w=S.indent(c,"","");return c.tagName=d,w}function g(c,d){return d.context.mode==S?T(c,d,d.context):x(c,d,d.context)}function T(c,d,w){if(w.depth==2)return c.match(/^.*?\*\//)?w.depth=1:c.skipToEnd(),"comment";if(c.peek()=="{"){S.skipAttribute(w.state);var E=h(w.state),z=w.state.context;if(z&&c.match(/^[^>]*>\s*$/,!1)){for(;z.prev&&!z.startOfLine;)z=z.prev;z.startOfLine?E-=C.indentUnit:w.prev.state.lexical&&(E=w.prev.state.lexical.indented)}else w.depth==1&&(E+=C.indentUnit);return d.context=new p(o.startState(s,E),s,0,d.context),null}if(w.depth==1){if(c.peek()=="<")return S.skipAttribute(w.state),d.context=new p(o.startState(S,h(w.state)),S,0,d.context),null;if(c.match("//"))return c.skipToEnd(),"comment";if(c.match("/*"))return w.depth=2,g(c,d)}var y=S.token(c,w.state),R=c.current(),M;return/\btag\b/.test(y)?/>$/.test(R)?w.state.context?w.depth=0:d.context=d.context.prev:/^-1&&c.backUp(R.length-M),y}function x(c,d,w){if(c.peek()=="<"&&!c.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&s.expressionAllowed(c,w.state))return d.context=new p(o.startState(S,s.indent(w.state,"","")),S,0,d.context),s.skipExpression(w.state),null;var E=s.token(c,w.state);if(!E&&w.depth!=null){var z=c.current();z=="{"?w.depth++:z=="}"&&--w.depth==0&&(d.context=d.context.prev)}return E}return{startState:function(){return{context:new p(o.startState(s),s)}},copyState:function(c){return{context:v(c.context)}},token:g,indent:function(c,d,w){return c.context.mode.indent(c.context.state,d,w)},innerMode:function(c){return c.context}}},"xml","javascript"),o.defineMIME("text/jsx","jsx"),o.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})});var gu=Ke((pu,hu)=>{(function(o){typeof pu=="object"&&typeof hu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("nginx",function(p){function v(w){for(var E={},z=w.split(" "),y=0;y*\/]/.test(y)?g(null,"select-op"):/[;{}:\[\]]/.test(y)?g(null,y):(w.eatWhile(/[\w\\\-]/),g("variable","variable"))}function x(w,E){for(var z=!1,y;(y=w.next())!=null;){if(z&&y=="/"){E.tokenize=T;break}z=y=="*"}return g("comment","comment")}function c(w,E){for(var z=0,y;(y=w.next())!=null;){if(z>=2&&y==">"){E.tokenize=T;break}z=y=="-"?z+1:0}return g("comment","comment")}function d(w){return function(E,z){for(var y=!1,R;(R=E.next())!=null&&!(R==w&&!y);)y=!y&&R=="\\";return y||(z.tokenize=T),g("string","string")}}return{startState:function(w){return{tokenize:T,baseIndent:w||0,stack:[]}},token:function(w,E){if(w.eatSpace())return null;h=null;var z=E.tokenize(w,E),y=E.stack[E.stack.length-1];return h=="hash"&&y=="rule"?z="atom":z=="variable"&&(y=="rule"?z="number":(!y||y=="@media{")&&(z="tag")),y=="rule"&&/^[\{\};]$/.test(h)&&E.stack.pop(),h=="{"?y=="@media"?E.stack[E.stack.length-1]="@media{":E.stack.push("{"):h=="}"?E.stack.pop():h=="@media"?E.stack.push("@media"):y=="{"&&h!="comment"&&E.stack.push("rule"),z},indent:function(w,E){var z=w.stack.length;return/^\}/.test(E)&&(z-=w.stack[w.stack.length-1]=="rule"?2:1),w.baseIndent+z*s},electricChars:"}"}}),o.defineMIME("text/x-nginx-conf","nginx")})});var bu=Ke((mu,vu)=>{(function(o){typeof mu=="object"&&typeof vu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("pascal",function(){function p(T){for(var x={},c=T.split(" "),d=0;d!?|\/]/;function S(T,x){var c=T.next();if(c=="#"&&x.startOfLine)return T.skipToEnd(),"meta";if(c=='"'||c=="'")return x.tokenize=s(c),x.tokenize(T,x);if(c=="("&&T.eat("*"))return x.tokenize=h,h(T,x);if(c=="{")return x.tokenize=g,g(T,x);if(/[\[\]\(\),;\:\.]/.test(c))return null;if(/\d/.test(c))return T.eatWhile(/[\w\.]/),"number";if(c=="/"&&T.eat("/"))return T.skipToEnd(),"comment";if(b.test(c))return T.eatWhile(b),"operator";T.eatWhile(/[\w\$_]/);var d=T.current();return v.propertyIsEnumerable(d)?"keyword":C.propertyIsEnumerable(d)?"atom":"variable"}function s(T){return function(x,c){for(var d=!1,w,E=!1;(w=x.next())!=null;){if(w==T&&!d){E=!0;break}d=!d&&w=="\\"}return(E||!d)&&(c.tokenize=null),"string"}}function h(T,x){for(var c=!1,d;d=T.next();){if(d==")"&&c){x.tokenize=null;break}c=d=="*"}return"comment"}function g(T,x){for(var c;c=T.next();)if(c=="}"){x.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(T,x){if(T.eatSpace())return null;var c=(x.tokenize||S)(T,x);return c=="comment"||c=="meta",c},electricChars:"{}"}}),o.defineMIME("text/x-pascal","pascal")})});var _u=Ke((yu,xu)=>{(function(o){typeof yu=="object"&&typeof xu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("perl",function(){var S={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},s="string-2",h=/[goseximacplud]/;function g(c,d,w,E,z){return d.chain=null,d.style=null,d.tail=null,d.tokenize=function(y,R){for(var M=!1,H,Z=0;H=y.next();){if(H===w[Z]&&!M)return w[++Z]!==void 0?(R.chain=w[Z],R.style=E,R.tail=z):z&&y.eatWhile(z),R.tokenize=x,E;M=!M&&H=="\\"}return E},d.tokenize(c,d)}function T(c,d,w){return d.tokenize=function(E,z){return E.string==w&&(z.tokenize=x),E.skipToEnd(),"string"},d.tokenize(c,d)}function x(c,d){if(c.eatSpace())return null;if(d.chain)return g(c,d,d.chain,d.style,d.tail);if(c.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if(c.match(/^<<(?=[_a-zA-Z])/))return c.eatWhile(/\w/),T(c,d,c.current().substr(2));if(c.sol()&&c.match(/^\=item(?!\w)/))return T(c,d,"=cut");var w=c.next();if(w=='"'||w=="'"){if(v(c,3)=="<<"+w){var E=c.pos;c.eatWhile(/\w/);var z=c.current().substr(1);if(z&&c.eat(w))return T(c,d,z);c.pos=E}return g(c,d,[w],"string")}if(w=="q"){var y=p(c,-2);if(!(y&&/\w/.test(y))){if(y=p(c,0),y=="x"){if(y=p(c,1),y=="(")return b(c,2),g(c,d,[")"],s,h);if(y=="[")return b(c,2),g(c,d,["]"],s,h);if(y=="{")return b(c,2),g(c,d,["}"],s,h);if(y=="<")return b(c,2),g(c,d,[">"],s,h);if(/[\^'"!~\/]/.test(y))return b(c,1),g(c,d,[c.eat(y)],s,h)}else if(y=="q"){if(y=p(c,1),y=="(")return b(c,2),g(c,d,[")"],"string");if(y=="[")return b(c,2),g(c,d,["]"],"string");if(y=="{")return b(c,2),g(c,d,["}"],"string");if(y=="<")return b(c,2),g(c,d,[">"],"string");if(/[\^'"!~\/]/.test(y))return b(c,1),g(c,d,[c.eat(y)],"string")}else if(y=="w"){if(y=p(c,1),y=="(")return b(c,2),g(c,d,[")"],"bracket");if(y=="[")return b(c,2),g(c,d,["]"],"bracket");if(y=="{")return b(c,2),g(c,d,["}"],"bracket");if(y=="<")return b(c,2),g(c,d,[">"],"bracket");if(/[\^'"!~\/]/.test(y))return b(c,1),g(c,d,[c.eat(y)],"bracket")}else if(y=="r"){if(y=p(c,1),y=="(")return b(c,2),g(c,d,[")"],s,h);if(y=="[")return b(c,2),g(c,d,["]"],s,h);if(y=="{")return b(c,2),g(c,d,["}"],s,h);if(y=="<")return b(c,2),g(c,d,[">"],s,h);if(/[\^'"!~\/]/.test(y))return b(c,1),g(c,d,[c.eat(y)],s,h)}else if(/[\^'"!~\/(\[{<]/.test(y)){if(y=="(")return b(c,1),g(c,d,[")"],"string");if(y=="[")return b(c,1),g(c,d,["]"],"string");if(y=="{")return b(c,1),g(c,d,["}"],"string");if(y=="<")return b(c,1),g(c,d,[">"],"string");if(/[\^'"!~\/]/.test(y))return g(c,d,[c.eat(y)],"string")}}}if(w=="m"){var y=p(c,-2);if(!(y&&/\w/.test(y))&&(y=c.eat(/[(\[{<\^'"!~\/]/),y)){if(/[\^'"!~\/]/.test(y))return g(c,d,[y],s,h);if(y=="(")return g(c,d,[")"],s,h);if(y=="[")return g(c,d,["]"],s,h);if(y=="{")return g(c,d,["}"],s,h);if(y=="<")return g(c,d,[">"],s,h)}}if(w=="s"){var y=/[\/>\]})\w]/.test(p(c,-2));if(!y&&(y=c.eat(/[(\[{<\^'"!~\/]/),y))return y=="["?g(c,d,["]","]"],s,h):y=="{"?g(c,d,["}","}"],s,h):y=="<"?g(c,d,[">",">"],s,h):y=="("?g(c,d,[")",")"],s,h):g(c,d,[y,y],s,h)}if(w=="y"){var y=/[\/>\]})\w]/.test(p(c,-2));if(!y&&(y=c.eat(/[(\[{<\^'"!~\/]/),y))return y=="["?g(c,d,["]","]"],s,h):y=="{"?g(c,d,["}","}"],s,h):y=="<"?g(c,d,[">",">"],s,h):y=="("?g(c,d,[")",")"],s,h):g(c,d,[y,y],s,h)}if(w=="t"){var y=/[\/>\]})\w]/.test(p(c,-2));if(!y&&(y=c.eat("r"),y&&(y=c.eat(/[(\[{<\^'"!~\/]/),y)))return y=="["?g(c,d,["]","]"],s,h):y=="{"?g(c,d,["}","}"],s,h):y=="<"?g(c,d,[">",">"],s,h):y=="("?g(c,d,[")",")"],s,h):g(c,d,[y,y],s,h)}if(w=="`")return g(c,d,[w],"variable-2");if(w=="/")return/~\s*$/.test(v(c))?g(c,d,[w],s,h):"operator";if(w=="$"){var E=c.pos;if(c.eatWhile(/\d/)||c.eat("{")&&c.eatWhile(/\d/)&&c.eat("}"))return"variable-2";c.pos=E}if(/[$@%]/.test(w)){var E=c.pos;if(c.eat("^")&&c.eat(/[A-Z]/)||!/[@$%&]/.test(p(c,-2))&&c.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var y=c.current();if(S[y])return"variable-2"}c.pos=E}if(/[$@%&]/.test(w)&&(c.eatWhile(/[\w$]/)||c.eat("{")&&c.eatWhile(/[\w$]/)&&c.eat("}"))){var y=c.current();return S[y]?"variable-2":"variable"}if(w=="#"&&p(c,-2)!="$")return c.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(w)){var E=c.pos;if(c.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),S[c.current()])return"operator";c.pos=E}if(w=="_"&&c.pos==1){if(C(c,6)=="_END__")return g(c,d,["\0"],"comment");if(C(c,7)=="_DATA__")return g(c,d,["\0"],"variable-2");if(C(c,7)=="_C__")return g(c,d,["\0"],"string")}if(/\w/.test(w)){var E=c.pos;if(p(c,-2)=="{"&&(p(c,0)=="}"||c.eatWhile(/\w/)&&p(c,0)=="}"))return"string";c.pos=E}if(/[A-Z]/.test(w)){var R=p(c,-2),E=c.pos;if(c.eatWhile(/[A-Z_]/),/[\da-z]/.test(p(c,0)))c.pos=E;else{var y=S[c.current()];return y?(y[1]&&(y=y[0]),R!=":"?y==1?"keyword":y==2?"def":y==3?"atom":y==4?"operator":y==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(w)){var R=p(c,-2);c.eatWhile(/\w/);var y=S[c.current()];return y?(y[1]&&(y=y[0]),R!=":"?y==1?"keyword":y==2?"def":y==3?"atom":y==4?"operator":y==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:x,chain:null,style:null,tail:null}},token:function(c,d){return(d.tokenize||x)(c,d)},lineComment:"#"}}),o.registerHelper("wordChars","perl",/[\w$]/),o.defineMIME("text/x-perl","perl");function p(S,s){return S.string.charAt(S.pos+(s||0))}function v(S,s){if(s){var h=S.pos-s;return S.string.substr(h>=0?h:0,s)}else return S.string.substr(0,S.pos-1)}function C(S,s){var h=S.string.length,g=h-S.pos+1;return S.string.substr(S.pos,s&&s=(g=S.string.length-1)?S.pos=g:S.pos=h}})});var Su=Ke((ku,wu)=>{(function(o){typeof ku=="object"&&typeof wu=="object"?o(We(),Qn(),Vo()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],o):o(CodeMirror)})(function(o){"use strict";function p(T){for(var x={},c=T.split(" "),d=0;d\w/,!1)&&(x.tokenize=v([[["->",null]],[[/[\w]+/,"variable"]]],c,d)),"variable-2";for(var w=!1;!T.eol()&&(w||d===!1||!T.match("{$",!1)&&!T.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!w&&T.match(c)){x.tokenize=null,x.tokStack.pop(),x.tokStack.pop();break}w=T.next()=="\\"&&!w}return"string"}var S="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally readonly match",s="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";o.registerHelper("hintWords","php",[S,s,h].join(" ").split(" ")),o.registerHelper("wordChars","php",/[\w$]/);var g={name:"clike",helperType:"php",keywords:p(S),blockKeywords:p("catch do else elseif for foreach if switch try while finally"),defKeywords:p("class enum function interface namespace trait"),atoms:p(s),builtin:p(h),multiLineStrings:!0,hooks:{$:function(T){return T.eatWhile(/[\w\$_]/),"variable-2"},"<":function(T,x){var c;if(c=T.match(/^<<\s*/)){var d=T.eat(/['"]/);T.eatWhile(/[\w\.]/);var w=T.current().slice(c[0].length+(d?2:1));if(d&&T.eat(d),w)return(x.tokStack||(x.tokStack=[])).push(w,0),x.tokenize=C(w,d!="'"),"string"}return!1},"#":function(T){for(;!T.eol()&&!T.match("?>",!1);)T.next();return"comment"},"/":function(T){if(T.eat("/")){for(;!T.eol()&&!T.match("?>",!1);)T.next();return"comment"}return!1},'"':function(T,x){return(x.tokStack||(x.tokStack=[])).push('"',0),x.tokenize=C('"'),"string"},"{":function(T,x){return x.tokStack&&x.tokStack.length&&x.tokStack[x.tokStack.length-1]++,!1},"}":function(T,x){return x.tokStack&&x.tokStack.length>0&&!--x.tokStack[x.tokStack.length-1]&&(x.tokenize=C(x.tokStack[x.tokStack.length-2])),!1}}};o.defineMode("php",function(T,x){var c=o.getMode(T,x&&x.htmlMode||"text/html"),d=o.getMode(T,g);function w(E,z){var y=z.curMode==d;if(E.sol()&&z.pending&&z.pending!='"'&&z.pending!="'"&&(z.pending=null),y)return y&&z.php.tokenize==null&&E.match("?>")?(z.curMode=c,z.curState=z.html,z.php.context.prev||(z.php=null),"meta"):d.token(E,z.curState);if(E.match(/^<\?\w*/))return z.curMode=d,z.php||(z.php=o.startState(d,c.indent(z.html,"",""))),z.curState=z.php,"meta";if(z.pending=='"'||z.pending=="'"){for(;!E.eol()&&E.next()!=z.pending;);var R="string"}else if(z.pending&&E.pos/.test(M)?z.pending=Z[0]:z.pending={end:E.pos,style:R},E.backUp(M.length-H)),R}return{startState:function(){var E=o.startState(c),z=x.startOpen?o.startState(d):null;return{html:E,php:z,curMode:x.startOpen?d:c,curState:x.startOpen?z:E,pending:null}},copyState:function(E){var z=E.html,y=o.copyState(c,z),R=E.php,M=R&&o.copyState(d,R),H;return E.curMode==c?H=y:H=M,{html:y,php:M,curMode:E.curMode,curState:H,pending:E.pending}},token:w,indent:function(E,z,y){return E.curMode!=d&&/^\s*<\//.test(z)||E.curMode==d&&/^\?>/.test(z)?c.indent(E.html,z,y):E.curMode.indent(E.curState,z,y)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(E){return{state:E.curState,mode:E.curMode}}}},"htmlmixed","clike"),o.defineMIME("application/x-httpd-php","php"),o.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),o.defineMIME("text/x-php",g)})});var Cu=Ke((Tu,Lu)=>{(function(o){typeof Tu=="object"&&typeof Lu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(s){return new RegExp("^(("+s.join(")|(")+"))\\b","i")}var v=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","option","service","rpc","returns"],C=p(v);o.registerHelper("hintWords","protobuf",v);var b=new RegExp("^[_A-Za-z\xA1-\uFFFF][_A-Za-z0-9\xA1-\uFFFF]*");function S(s){return s.eatSpace()?null:s.match("//")?(s.skipToEnd(),"comment"):s.match(/^[0-9\.+-]/,!1)&&(s.match(/^[+-]?0x[0-9a-fA-F]+/)||s.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||s.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":s.match(/^"([^"]|(""))*"/)||s.match(/^'([^']|(''))*'/)?"string":s.match(C)?"keyword":s.match(b)?"variable":(s.next(),null)}o.defineMode("protobuf",function(){return{token:S,fold:"brace"}}),o.defineMIME("text/x-protobuf","protobuf")})});var Mu=Ke((Eu,zu)=>{(function(o){typeof Eu=="object"&&typeof zu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var v=p(["and","or","not","is"]),C=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],b=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];o.registerHelper("hintWords","python",C.concat(b).concat(["exec","print"]));function S(h){return h.scopes[h.scopes.length-1]}o.defineMode("python",function(h,g){for(var T="error",x=g.delimiters||g.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[g.singleOperators,g.doubleOperators,g.doubleDelimiters,g.tripleDelimiters,g.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],d=0;dB?D(X):le0&&j(K,X)&&(xe+=" "+T),xe}}return re(K,X)}function re(K,X,I){if(K.eatSpace())return null;if(!I&&K.match(/^#.*/))return"comment";if(K.match(/^[0-9\.]/,!1)){var B=!1;if(K.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(B=!0),K.match(/^[\d_]+\.\d*/)&&(B=!0),K.match(/^\.\d+/)&&(B=!0),B)return K.eat(/J/i),"number";var le=!1;if(K.match(/^0x[0-9a-f_]+/i)&&(le=!0),K.match(/^0b[01_]+/i)&&(le=!0),K.match(/^0o[0-7_]+/i)&&(le=!0),K.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(K.eat(/J/i),le=!0),K.match(/^0(?![\dx])/i)&&(le=!0),le)return K.eat(/L/i),"number"}if(K.match(M)){var xe=K.current().toLowerCase().indexOf("f")!==-1;return xe?(X.tokenize=N(K.current(),X.tokenize),X.tokenize(K,X)):(X.tokenize=F(K.current(),X.tokenize),X.tokenize(K,X))}for(var q=0;q=0;)K=K.substr(1);var I=K.length==1,B="string";function le(q){return function(L,de){var ze=re(L,de,!0);return ze=="punctuation"&&(L.current()=="{"?de.tokenize=le(q+1):L.current()=="}"&&(q>1?de.tokenize=le(q-1):de.tokenize=xe)),ze}}function xe(q,L){for(;!q.eol();)if(q.eatWhile(/[^'"\{\}\\]/),q.eat("\\")){if(q.next(),I&&q.eol())return B}else{if(q.match(K))return L.tokenize=X,B;if(q.match("{{"))return B;if(q.match("{",!1))return L.tokenize=le(0),q.current()?B:L.tokenize(q,L);if(q.match("}}"))return B;if(q.match("}"))return T;q.eat(/['"]/)}if(I){if(g.singleLineStringErrors)return T;L.tokenize=X}return B}return xe.isString=!0,xe}function F(K,X){for(;"rubf".indexOf(K.charAt(0).toLowerCase())>=0;)K=K.substr(1);var I=K.length==1,B="string";function le(xe,q){for(;!xe.eol();)if(xe.eatWhile(/[^'"\\]/),xe.eat("\\")){if(xe.next(),I&&xe.eol())return B}else{if(xe.match(K))return q.tokenize=X,B;xe.eat(/['"]/)}if(I){if(g.singleLineStringErrors)return T;q.tokenize=X}return B}return le.isString=!0,le}function D(K){for(;S(K).type!="py";)K.scopes.pop();K.scopes.push({offset:S(K).offset+h.indentUnit,type:"py",align:null})}function Q(K,X,I){var B=K.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:K.column()+1;X.scopes.push({offset:X.indent+w,type:I,align:B})}function j(K,X){for(var I=K.indentation();X.scopes.length>1&&S(X).offset>I;){if(S(X).type!="py")return!0;X.scopes.pop()}return S(X).offset!=I}function V(K,X){K.sol()&&(X.beginningOfLine=!0,X.dedent=!1);var I=X.tokenize(K,X),B=K.current();if(X.beginningOfLine&&B=="@")return K.match(R,!1)?"meta":y?"operator":T;if(/\S/.test(B)&&(X.beginningOfLine=!1),(I=="variable"||I=="builtin")&&X.lastToken=="meta"&&(I="meta"),(B=="pass"||B=="return")&&(X.dedent=!0),B=="lambda"&&(X.lambda=!0),B==":"&&!X.lambda&&S(X).type=="py"&&K.match(/^\s*(?:#|$)/,!1)&&D(X),B.length==1&&!/string|comment/.test(I)){var le="[({".indexOf(B);if(le!=-1&&Q(K,X,"])}".slice(le,le+1)),le="])}".indexOf(B),le!=-1)if(S(X).type==B)X.indent=X.scopes.pop().offset-w;else return T}return X.dedent&&K.eol()&&S(X).type=="py"&&X.scopes.length>1&&X.scopes.pop(),I}var _={startState:function(K){return{tokenize:ee,scopes:[{offset:K||0,type:"py",align:null}],indent:K||0,lastToken:null,lambda:!1,dedent:0}},token:function(K,X){var I=X.errorToken;I&&(X.errorToken=!1);var B=V(K,X);return B&&B!="comment"&&(X.lastToken=B=="keyword"||B=="punctuation"?K.current():B),B=="punctuation"&&(B=null),K.eol()&&X.lambda&&(X.lambda=!1),I?B+" "+T:B},indent:function(K,X){if(K.tokenize!=ee)return K.tokenize.isString?o.Pass:0;var I=S(K),B=I.type==X.charAt(0)||I.type=="py"&&!K.dedent&&/^(else:|elif |except |finally:)/.test(X);return I.align!=null?I.align-(B?1:0):I.offset-(B?w:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return _}),o.defineMIME("text/x-python","python");var s=function(h){return h.split(" ")};o.defineMIME("text/x-cython",{name:"python",extra_keywords:s("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var qu=Ke((Au,Du)=>{(function(o){typeof Au=="object"&&typeof Du=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(g){for(var T={},x=0,c=g.length;x]/)?(M.eat(/[\<\>]/),"atom"):M.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":M.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(M.eatWhile(/[\w$\xa1-\uffff]/),M.eat(/[\?\!\=]/),"atom"):"operator";if(Z=="@"&&M.match(/^@?[a-zA-Z_\xa1-\uffff]/))return M.eat("@"),M.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(Z=="$")return M.eat(/[a-zA-Z_]/)?M.eatWhile(/[\w]/):M.eat(/\d/)?M.eat(/\d/):M.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(Z))return M.eatWhile(/[\w\xa1-\uffff]/),M.eat(/[\?\!]/),M.eat(":")?"atom":"ident";if(Z=="|"&&(H.varList||H.lastTok=="{"||H.lastTok=="do"))return T="|",null;if(/[\(\)\[\]{}\\;]/.test(Z))return T=Z,null;if(Z=="-"&&M.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(Z)){var D=M.eatWhile(/[=+\-\/*:\.^%<>~|]/);return Z=="."&&!D&&(T="."),"operator"}else return null}}}function d(M){for(var H=M.pos,Z=0,ee,re=!1,N=!1;(ee=M.next())!=null;)if(N)N=!1;else{if("[{(".indexOf(ee)>-1)Z++;else if("]})".indexOf(ee)>-1){if(Z--,Z<0)break}else if(ee=="/"&&Z==0){re=!0;break}N=ee=="\\"}return M.backUp(M.pos-H),re}function w(M){return M||(M=1),function(H,Z){if(H.peek()=="}"){if(M==1)return Z.tokenize.pop(),Z.tokenize[Z.tokenize.length-1](H,Z);Z.tokenize[Z.tokenize.length-1]=w(M-1)}else H.peek()=="{"&&(Z.tokenize[Z.tokenize.length-1]=w(M+1));return c(H,Z)}}function E(){var M=!1;return function(H,Z){return M?(Z.tokenize.pop(),Z.tokenize[Z.tokenize.length-1](H,Z)):(M=!0,c(H,Z))}}function z(M,H,Z,ee){return function(re,N){var F=!1,D;for(N.context.type==="read-quoted-paused"&&(N.context=N.context.prev,re.eat("}"));(D=re.next())!=null;){if(D==M&&(ee||!F)){N.tokenize.pop();break}if(Z&&D=="#"&&!F){if(re.eat("{")){M=="}"&&(N.context={prev:N.context,type:"read-quoted-paused"}),N.tokenize.push(w());break}else if(/[@\$]/.test(re.peek())){N.tokenize.push(E());break}}F=!F&&D=="\\"}return H}}function y(M,H){return function(Z,ee){return H&&Z.eatSpace(),Z.match(M)?ee.tokenize.pop():Z.skipToEnd(),"string"}}function R(M,H){return M.sol()&&M.match("=end")&&M.eol()&&H.tokenize.pop(),M.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[c],indented:0,context:{type:"top",indented:-g.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(M,H){T=null,M.sol()&&(H.indented=M.indentation());var Z=H.tokenize[H.tokenize.length-1](M,H),ee,re=T;if(Z=="ident"){var N=M.current();Z=H.lastTok=="."?"property":C.propertyIsEnumerable(M.current())?"keyword":/^[A-Z]/.test(N)?"tag":H.lastTok=="def"||H.lastTok=="class"||H.varList?"def":"variable",Z=="keyword"&&(re=N,b.propertyIsEnumerable(N)?ee="indent":S.propertyIsEnumerable(N)?ee="dedent":((N=="if"||N=="unless")&&M.column()==M.indentation()||N=="do"&&H.context.indented{(function(o){typeof Iu=="object"&&typeof Fu=="object"?o(We(),Di()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),o.defineMIME("text/x-rustsrc","rust"),o.defineMIME("text/rust","rust")})});var ea=Ke((Ou,Pu)=>{(function(o){typeof Ou=="object"&&typeof Pu=="object"?o(We(),gn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../css/css"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("sass",function(p){var v=o.mimeModes["text/css"],C=v.propertyKeywords||{},b=v.colorKeywords||{},S=v.valueKeywords||{},s=v.fontProperties||{};function h(N){return new RegExp("^"+N.join("|"))}var g=["true","false","null","auto"],T=new RegExp("^"+g.join("|")),x=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],c=h(x),d=/^::?[a-zA-Z_][\w\-]*/,w;function E(N){return!N.peek()||N.match(/\s+$/,!1)}function z(N,F){var D=N.peek();return D===")"?(N.next(),F.tokenizer=ee,"operator"):D==="("?(N.next(),N.eatSpace(),"operator"):D==="'"||D==='"'?(F.tokenizer=R(N.next()),"string"):(F.tokenizer=R(")",!1),"string")}function y(N,F){return function(D,Q){return D.sol()&&D.indentation()<=N?(Q.tokenizer=ee,ee(D,Q)):(F&&D.skipTo("*/")?(D.next(),D.next(),Q.tokenizer=ee):D.skipToEnd(),"comment")}}function R(N,F){F==null&&(F=!0);function D(Q,j){var V=Q.next(),_=Q.peek(),K=Q.string.charAt(Q.pos-2),X=V!=="\\"&&_===N||V===N&&K!=="\\";return X?(V!==N&&F&&Q.next(),E(Q)&&(j.cursorHalf=0),j.tokenizer=ee,"string"):V==="#"&&_==="{"?(j.tokenizer=M(D),Q.next(),"operator"):"string"}return D}function M(N){return function(F,D){return F.peek()==="}"?(F.next(),D.tokenizer=N,"operator"):ee(F,D)}}function H(N){if(N.indentCount==0){N.indentCount++;var F=N.scopes[0].offset,D=F+p.indentUnit;N.scopes.unshift({offset:D})}}function Z(N){N.scopes.length!=1&&N.scopes.shift()}function ee(N,F){var D=N.peek();if(N.match("/*"))return F.tokenizer=y(N.indentation(),!0),F.tokenizer(N,F);if(N.match("//"))return F.tokenizer=y(N.indentation(),!1),F.tokenizer(N,F);if(N.match("#{"))return F.tokenizer=M(ee),"operator";if(D==='"'||D==="'")return N.next(),F.tokenizer=R(D),"string";if(F.cursorHalf){if(D==="#"&&(N.next(),N.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))||N.match(/^-?[0-9\.]+/))return E(N)&&(F.cursorHalf=0),"number";if(N.match(/^(px|em|in)\b/))return E(N)&&(F.cursorHalf=0),"unit";if(N.match(T))return E(N)&&(F.cursorHalf=0),"keyword";if(N.match(/^url/)&&N.peek()==="(")return F.tokenizer=z,E(N)&&(F.cursorHalf=0),"atom";if(D==="$")return N.next(),N.eatWhile(/[\w-]/),E(N)&&(F.cursorHalf=0),"variable-2";if(D==="!")return N.next(),F.cursorHalf=0,N.match(/^[\w]+/)?"keyword":"operator";if(N.match(c))return E(N)&&(F.cursorHalf=0),"operator";if(N.eatWhile(/[\w-]/))return E(N)&&(F.cursorHalf=0),w=N.current().toLowerCase(),S.hasOwnProperty(w)?"atom":b.hasOwnProperty(w)?"keyword":C.hasOwnProperty(w)?(F.prevProp=N.current().toLowerCase(),"property"):"tag";if(E(N))return F.cursorHalf=0,null}else{if(D==="-"&&N.match(/^-\w+-/))return"meta";if(D==="."){if(N.next(),N.match(/^[\w-]+/))return H(F),"qualifier";if(N.peek()==="#")return H(F),"tag"}if(D==="#"){if(N.next(),N.match(/^[\w-]+/))return H(F),"builtin";if(N.peek()==="#")return H(F),"tag"}if(D==="$")return N.next(),N.eatWhile(/[\w-]/),"variable-2";if(N.match(/^-?[0-9\.]+/))return"number";if(N.match(/^(px|em|in)\b/))return"unit";if(N.match(T))return"keyword";if(N.match(/^url/)&&N.peek()==="(")return F.tokenizer=z,"atom";if(D==="="&&N.match(/^=[\w-]+/))return H(F),"meta";if(D==="+"&&N.match(/^\+[\w-]+/))return"variable-3";if(D==="@"&&N.match("@extend")&&(N.match(/\s*[\w]/)||Z(F)),N.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return H(F),"def";if(D==="@")return N.next(),N.eatWhile(/[\w-]/),"def";if(N.eatWhile(/[\w-]/))if(N.match(/ *: *[\w-\+\$#!\("']/,!1)){w=N.current().toLowerCase();var Q=F.prevProp+"-"+w;return C.hasOwnProperty(Q)?"property":C.hasOwnProperty(w)?(F.prevProp=w,"property"):s.hasOwnProperty(w)?"property":"tag"}else return N.match(/ *:/,!1)?(H(F),F.cursorHalf=1,F.prevProp=N.current().toLowerCase(),"property"):(N.match(/ *,/,!1)||H(F),"tag");if(D===":")return N.match(d)?"variable-3":(N.next(),F.cursorHalf=1,"operator")}return N.match(c)?"operator":(N.next(),null)}function re(N,F){N.sol()&&(F.indentCount=0);var D=F.tokenizer(N,F),Q=N.current();if((Q==="@return"||Q==="}")&&Z(F),D!==null){for(var j=N.pos-Q.length,V=j+p.indentUnit*F.indentCount,_=[],K=0;K{(function(o){typeof ju=="object"&&typeof Ru=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("shell",function(){var p={};function v(d,w){for(var E=0;E1&&d.eat("$");var E=d.next();return/['"({]/.test(E)?(w.tokens[0]=h(E,E=="("?"quote":E=="{"?"def":"string"),c(d,w)):(/\d/.test(E)||d.eatWhile(/\w/),w.tokens.shift(),"def")};function x(d){return function(w,E){return w.sol()&&w.string==d&&E.tokens.shift(),w.skipToEnd(),"string-2"}}function c(d,w){return(w.tokens[0]||s)(d,w)}return{startState:function(){return{tokens:[]}},token:function(d,w){return c(d,w)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),o.defineMIME("text/x-sh","shell"),o.defineMIME("application/x-sh","shell")})});var Uu=Ke((Bu,Wu)=>{(function(o){typeof Bu=="object"&&typeof Wu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("sql",function(g,T){var x=T.client||{},c=T.atoms||{false:!0,true:!0,null:!0},d=T.builtin||s(h),w=T.keywords||s(S),E=T.operatorChars||/^[*+\-%<>!=&|~^\/]/,z=T.support||{},y=T.hooks||{},R=T.dateSQL||{date:!0,time:!0,timestamp:!0},M=T.backslashStringEscapes!==!1,H=T.brackets||/^[\{}\(\)\[\]]/,Z=T.punctuation||/^[;.,:]/;function ee(Q,j){var V=Q.next();if(y[V]){var _=y[V](Q,j);if(_!==!1)return _}if(z.hexNumber&&(V=="0"&&Q.match(/^[xX][0-9a-fA-F]+/)||(V=="x"||V=="X")&&Q.match(/^'[0-9a-fA-F]*'/)))return"number";if(z.binaryNumber&&((V=="b"||V=="B")&&Q.match(/^'[01]*'/)||V=="0"&&Q.match(/^b[01]+/)))return"number";if(V.charCodeAt(0)>47&&V.charCodeAt(0)<58)return Q.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),z.decimallessFloat&&Q.match(/^\.(?!\.)/),"number";if(V=="?"&&(Q.eatSpace()||Q.eol()||Q.eat(";")))return"variable-3";if(V=="'"||V=='"'&&z.doubleQuote)return j.tokenize=re(V),j.tokenize(Q,j);if((z.nCharCast&&(V=="n"||V=="N")||z.charsetCast&&V=="_"&&Q.match(/[a-z][a-z0-9]*/i))&&(Q.peek()=="'"||Q.peek()=='"'))return"keyword";if(z.escapeConstant&&(V=="e"||V=="E")&&(Q.peek()=="'"||Q.peek()=='"'&&z.doubleQuote))return j.tokenize=function(X,I){return(I.tokenize=re(X.next(),!0))(X,I)},"keyword";if(z.commentSlashSlash&&V=="/"&&Q.eat("/"))return Q.skipToEnd(),"comment";if(z.commentHash&&V=="#"||V=="-"&&Q.eat("-")&&(!z.commentSpaceRequired||Q.eat(" ")))return Q.skipToEnd(),"comment";if(V=="/"&&Q.eat("*"))return j.tokenize=N(1),j.tokenize(Q,j);if(V=="."){if(z.zerolessFloat&&Q.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(Q.match(/^\.+/))return null;if(Q.match(/^[\w\d_$#]+/))return"variable-2"}else{if(E.test(V))return Q.eatWhile(E),"operator";if(H.test(V))return"bracket";if(Z.test(V))return Q.eatWhile(Z),"punctuation";if(V=="{"&&(Q.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||Q.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";Q.eatWhile(/^[_\w\d]/);var K=Q.current().toLowerCase();return R.hasOwnProperty(K)&&(Q.match(/^( )+'[^']*'/)||Q.match(/^( )+"[^"]*"/))?"number":c.hasOwnProperty(K)?"atom":d.hasOwnProperty(K)?"type":w.hasOwnProperty(K)?"keyword":x.hasOwnProperty(K)?"builtin":null}}function re(Q,j){return function(V,_){for(var K=!1,X;(X=V.next())!=null;){if(X==Q&&!K){_.tokenize=ee;break}K=(M||j)&&!K&&X=="\\"}return"string"}}function N(Q){return function(j,V){var _=j.match(/^.*?(\/\*|\*\/)/);return _?_[1]=="/*"?V.tokenize=N(Q+1):Q>1?V.tokenize=N(Q-1):V.tokenize=ee:j.skipToEnd(),"comment"}}function F(Q,j,V){j.context={prev:j.context,indent:Q.indentation(),col:Q.column(),type:V}}function D(Q){Q.indent=Q.context.indent,Q.context=Q.context.prev}return{startState:function(){return{tokenize:ee,context:null}},token:function(Q,j){if(Q.sol()&&j.context&&j.context.align==null&&(j.context.align=!1),j.tokenize==ee&&Q.eatSpace())return null;var V=j.tokenize(Q,j);if(V=="comment")return V;j.context&&j.context.align==null&&(j.context.align=!0);var _=Q.current();return _=="("?F(Q,j,")"):_=="["?F(Q,j,"]"):j.context&&j.context.type==_&&D(j),V},indent:function(Q,j){var V=Q.context;if(!V)return o.Pass;var _=j.charAt(0)==V.type;return V.align?V.col+(_?0:1):V.indent+(_?0:g.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:z.commentSlashSlash?"//":z.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:T}});function p(g){for(var T;(T=g.next())!=null;)if(T=="`"&&!g.eat("`"))return"variable-2";return g.backUp(g.current().length-1),g.eatWhile(/\w/)?"variable-2":null}function v(g){for(var T;(T=g.next())!=null;)if(T=='"'&&!g.eat('"'))return"variable-2";return g.backUp(g.current().length-1),g.eatWhile(/\w/)?"variable-2":null}function C(g){return g.eat("@")&&(g.match("session."),g.match("local."),g.match("global.")),g.eat("'")?(g.match(/^.*'/),"variable-2"):g.eat('"')?(g.match(/^.*"/),"variable-2"):g.eat("`")?(g.match(/^.*`/),"variable-2"):g.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function b(g){return g.eat("N")?"atom":g.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var S="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function s(g){for(var T={},x=g.split(" "),c=0;c!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:s("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":C}}),o.defineMIME("text/x-mysql",{name:"sql",client:s("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:s(S+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":C,"`":p,"\\":b}}),o.defineMIME("text/x-mariadb",{name:"sql",client:s("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:s(S+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":C,"`":p,"\\":b}}),o.defineMIME("text/x-sqlite",{name:"sql",client:s("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:s(S+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:s("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:s("date time timestamp datetime"),support:s("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":C,":":C,"?":C,$:C,'"':v,"`":p}}),o.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:s("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:s("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:s("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:s("commentSlashSlash decimallessFloat"),hooks:{}}),o.defineMIME("text/x-plsql",{name:"sql",client:s("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:s("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:s("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:s("date time timestamp"),support:s("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),o.defineMIME("text/x-hive",{name:"sql",keywords:s("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:s("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:s("date timestamp"),support:s("doubleQuote binaryNumber hexNumber")}),o.defineMIME("text/x-pgsql",{name:"sql",client:s("source"),keywords:s(S+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:s("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:s("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),o.defineMIME("text/x-gql",{name:"sql",keywords:s("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:s("false true"),builtin:s("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),o.defineMIME("text/x-gpsql",{name:"sql",client:s("source"),keywords:s("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:s("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),o.defineMIME("text/x-sparksql",{name:"sql",keywords:s("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:s("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:s("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:s("date time timestamp"),support:s("doubleQuote zerolessFloat")}),o.defineMIME("text/x-esper",{name:"sql",client:s("source"),keywords:s("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:s("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:s("time"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber")}),o.defineMIME("text/x-trino",{name:"sql",keywords:s("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:s("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:s("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:s("date time timestamp zone"),support:s("decimallessFloat zerolessFloat hexNumber")})})});var ta=Ke(($u,Ku)=>{(function(o){typeof $u=="object"&&typeof Ku=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("stylus",function(M){for(var H=M.indentUnit,Z="",ee=y(p),re=/^(a|b|i|s|col|em)$/i,N=y(S),F=y(s),D=y(T),Q=y(g),j=y(v),V=z(v),_=y(b),K=y(C),X=y(h),I=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,B=z(x),le=y(c),xe=new RegExp(/^\-(moz|ms|o|webkit)-/i),q=y(d),L="",de={},ze,pe,Ee,ge;Z.length|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),W.context.line.firstWord=L?L[0].replace(/^\s*/,""):"",W.context.line.indent=$.indentation(),ze=$.peek(),$.match("//"))return $.skipToEnd(),["comment","comment"];if($.match("/*"))return W.tokenize=qe,qe($,W);if(ze=='"'||ze=="'")return $.next(),W.tokenize=Se(ze),W.tokenize($,W);if(ze=="@")return $.next(),$.eatWhile(/[\w\\-]/),["def",$.current()];if(ze=="#"){if($.next(),$.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if($.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return $.match(xe)?["meta","vendor-prefixes"]:$.match(/^-?[0-9]?\.?[0-9]/)?($.eatWhile(/[a-z%]/i),["number","unit"]):ze=="!"?($.next(),[$.match(/^(important|optional)/i)?"keyword":"operator","important"]):ze=="."&&$.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:$.match(V)?($.peek()=="("&&(W.tokenize=je),["property","word"]):$.match(/^[a-z][\w-]*\(/i)?($.backUp(1),["keyword","mixin"]):$.match(/^(\+|-)[a-z][\w-]*\(/i)?($.backUp(1),["keyword","block-mixin"]):$.string.match(/^\s*&/)&&$.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:$.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?($.backUp(1),["variable-3","reference"]):$.match(/^&{1}\s*$/)?["variable-3","reference"]:$.match(B)?["operator","operator"]:$.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?$.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!U($.current())?($.match("."),["variable-2","variable-name"]):["variable-2","word"]:$.match(I)?["operator",$.current()]:/[:;,{}\[\]\(\)]/.test(ze)?($.next(),[null,ze]):($.next(),[null,null])}function qe($,W){for(var se=!1,De;(De=$.next())!=null;){if(se&&De=="/"){W.tokenize=null;break}se=De=="*"}return["comment","comment"]}function Se($){return function(W,se){for(var De=!1,nt;(nt=W.next())!=null;){if(nt==$&&!De){$==")"&&W.backUp(1);break}De=!De&&nt=="\\"}return(nt==$||!De&&$!=")")&&(se.tokenize=null),["string","string"]}}function je($,W){return $.next(),$.match(/\s*[\"\')]/,!1)?W.tokenize=null:W.tokenize=Se(")"),[null,"("]}function Ze($,W,se,De){this.type=$,this.indent=W,this.prev=se,this.line=De||{firstWord:"",indent:0}}function ke($,W,se,De){return De=De>=0?De:H,$.context=new Ze(se,W.indentation()+De,$.context),se}function Je($,W){var se=$.context.indent-H;return W=W||!1,$.context=$.context.prev,W&&($.context.indent=se),$.context.type}function He($,W,se){return de[se.context.type]($,W,se)}function Ge($,W,se,De){for(var nt=De||1;nt>0;nt--)se.context=se.context.prev;return He($,W,se)}function U($){return $.toLowerCase()in ee}function G($){return $=$.toLowerCase(),$ in N||$ in X}function ce($){return $.toLowerCase()in le}function Be($){return $.toLowerCase().match(xe)}function te($){var W=$.toLowerCase(),se="variable-2";return U($)?se="tag":ce($)?se="block-keyword":G($)?se="property":W in D||W in q?se="atom":W=="return"||W in Q?se="keyword":$.match(/^[A-Z]/)&&(se="string"),se}function fe($,W){return Me(W)&&($=="{"||$=="]"||$=="hash"||$=="qualifier")||$=="block-mixin"}function oe($,W){return $=="{"&&W.match(/^\s*\$?[\w-]+/i,!1)}function Ue($,W){return $==":"&&W.match(/^[a-z-]+/,!1)}function we($){return $.sol()||$.string.match(new RegExp("^\\s*"+R($.current())))}function Me($){return $.eol()||$.match(/^\s*$/,!1)}function Le($){var W=/^\s*[-_]*[a-z0-9]+[\w-]*/i,se=typeof $=="string"?$.match(W):$.string.match(W);return se?se[0].replace(/^\s*/,""):""}return de.block=function($,W,se){if($=="comment"&&we(W)||$==","&&Me(W)||$=="mixin")return ke(se,W,"block",0);if(oe($,W))return ke(se,W,"interpolation");if(Me(W)&&$=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(W.string)&&!U(Le(W)))return ke(se,W,"block",0);if(fe($,W))return ke(se,W,"block");if($=="}"&&Me(W))return ke(se,W,"block",0);if($=="variable-name")return W.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||ce(Le(W))?ke(se,W,"variableName"):ke(se,W,"variableName",0);if($=="=")return!Me(W)&&!ce(Le(W))?ke(se,W,"block",0):ke(se,W,"block");if($=="*"&&(Me(W)||W.match(/\s*(,|\.|#|\[|:|{)/,!1)))return ge="tag",ke(se,W,"block");if(Ue($,W))return ke(se,W,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test($))return ke(se,W,Me(W)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test($))return ke(se,W,"keyframes");if(/@extends?/.test($))return ke(se,W,"extend",0);if($&&$.charAt(0)=="@")return W.indentation()>0&&G(W.current().slice(1))?(ge="variable-2","block"):/(@import|@require|@charset)/.test($)?ke(se,W,"block",0):ke(se,W,"block");if($=="reference"&&Me(W))return ke(se,W,"block");if($=="(")return ke(se,W,"parens");if($=="vendor-prefixes")return ke(se,W,"vendorPrefixes");if($=="word"){var De=W.current();if(ge=te(De),ge=="property")return we(W)?ke(se,W,"block",0):(ge="atom","block");if(ge=="tag"){if(/embed|menu|pre|progress|sub|table/.test(De)&&G(Le(W))||W.string.match(new RegExp("\\[\\s*"+De+"|"+De+"\\s*\\]")))return ge="atom","block";if(re.test(De)&&(we(W)&&W.string.match(/=/)||!we(W)&&!W.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!U(Le(W))))return ge="variable-2",ce(Le(W))?"block":ke(se,W,"block",0);if(Me(W))return ke(se,W,"block")}if(ge=="block-keyword")return ge="keyword",W.current(/(if|unless)/)&&!we(W)?"block":ke(se,W,"block");if(De=="return")return ke(se,W,"block",0);if(ge=="variable-2"&&W.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return ke(se,W,"block")}return se.context.type},de.parens=function($,W,se){if($=="(")return ke(se,W,"parens");if($==")")return se.context.prev.type=="parens"?Je(se):W.string.match(/^[a-z][\w-]*\(/i)&&Me(W)||ce(Le(W))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Le(W))||!W.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&U(Le(W))?ke(se,W,"block"):W.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||W.string.match(/^\s*(\(|\)|[0-9])/)||W.string.match(/^\s+[a-z][\w-]*\(/i)||W.string.match(/^\s+[\$-]?[a-z]/i)?ke(se,W,"block",0):Me(W)?ke(se,W,"block"):ke(se,W,"block",0);if($&&$.charAt(0)=="@"&&G(W.current().slice(1))&&(ge="variable-2"),$=="word"){var De=W.current();ge=te(De),ge=="tag"&&re.test(De)&&(ge="variable-2"),(ge=="property"||De=="to")&&(ge="atom")}return $=="variable-name"?ke(se,W,"variableName"):Ue($,W)?ke(se,W,"pseudo"):se.context.type},de.vendorPrefixes=function($,W,se){return $=="word"?(ge="property",ke(se,W,"block",0)):Je(se)},de.pseudo=function($,W,se){return G(Le(W.string))?Ge($,W,se):(W.match(/^[a-z-]+/),ge="variable-3",Me(W)?ke(se,W,"block"):Je(se))},de.atBlock=function($,W,se){if($=="(")return ke(se,W,"atBlock_parens");if(fe($,W))return ke(se,W,"block");if(oe($,W))return ke(se,W,"interpolation");if($=="word"){var De=W.current().toLowerCase();if(/^(only|not|and|or)$/.test(De)?ge="keyword":j.hasOwnProperty(De)?ge="tag":K.hasOwnProperty(De)?ge="attribute":_.hasOwnProperty(De)?ge="property":F.hasOwnProperty(De)?ge="string-2":ge=te(W.current()),ge=="tag"&&Me(W))return ke(se,W,"block")}return $=="operator"&&/^(not|and|or)$/.test(W.current())&&(ge="keyword"),se.context.type},de.atBlock_parens=function($,W,se){if($=="{"||$=="}")return se.context.type;if($==")")return Me(W)?ke(se,W,"block"):ke(se,W,"atBlock");if($=="word"){var De=W.current().toLowerCase();return ge=te(De),/^(max|min)/.test(De)&&(ge="property"),ge=="tag"&&(re.test(De)?ge="variable-2":ge="atom"),se.context.type}return de.atBlock($,W,se)},de.keyframes=function($,W,se){return W.indentation()=="0"&&($=="}"&&we(W)||$=="]"||$=="hash"||$=="qualifier"||U(W.current()))?Ge($,W,se):$=="{"?ke(se,W,"keyframes"):$=="}"?we(W)?Je(se,!0):ke(se,W,"keyframes"):$=="unit"&&/^[0-9]+\%$/.test(W.current())?ke(se,W,"keyframes"):$=="word"&&(ge=te(W.current()),ge=="block-keyword")?(ge="keyword",ke(se,W,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test($)?ke(se,W,Me(W)?"block":"atBlock"):$=="mixin"?ke(se,W,"block",0):se.context.type},de.interpolation=function($,W,se){return $=="{"&&Je(se)&&ke(se,W,"block"),$=="}"?W.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||W.string.match(/^\s*[a-z]/i)&&U(Le(W))?ke(se,W,"block"):!W.string.match(/^(\{|\s*\&)/)||W.match(/\s*[\w-]/,!1)?ke(se,W,"block",0):ke(se,W,"block"):$=="variable-name"?ke(se,W,"variableName",0):($=="word"&&(ge=te(W.current()),ge=="tag"&&(ge="atom")),se.context.type)},de.extend=function($,W,se){return $=="["||$=="="?"extend":$=="]"?Je(se):$=="word"?(ge=te(W.current()),"extend"):Je(se)},de.variableName=function($,W,se){return $=="string"||$=="["||$=="]"||W.current().match(/^(\.|\$)/)?(W.current().match(/^\.[\w-]+/i)&&(ge="variable-2"),"variableName"):Ge($,W,se)},{startState:function($){return{tokenize:null,state:"block",context:new Ze("block",$||0,null)}},token:function($,W){return!W.tokenize&&$.eatSpace()?null:(pe=(W.tokenize||Oe)($,W),pe&&typeof pe=="object"&&(Ee=pe[1],pe=pe[0]),ge=pe,W.state=de[W.state](Ee,$,W),ge)},indent:function($,W,se){var De=$.context,nt=W&&W.charAt(0),dt=De.indent,Pt=Le(W),It=se.match(/^\s*/)[0].replace(/\t/g,Z).length,Pe=$.context.prev?$.context.prev.line.firstWord:"",xt=$.context.prev?$.context.prev.line.indent:It;return De.prev&&(nt=="}"&&(De.type=="block"||De.type=="atBlock"||De.type=="keyframes")||nt==")"&&(De.type=="parens"||De.type=="atBlock_parens")||nt=="{"&&De.type=="at")?dt=De.indent-H:/(\})/.test(nt)||(/@|\$|\d/.test(nt)||/^\{/.test(W)||/^\s*\/(\/|\*)/.test(W)||/^\s*\/\*/.test(Pe)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(W)||/^(\+|-)?[a-z][\w-]*\(/i.test(W)||/^return/.test(W)||ce(Pt)?dt=It:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(nt)||U(Pt)?/\,\s*$/.test(Pe)?dt=xt:/^\s+/.test(se)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Pe)||U(Pe))?dt=It<=xt?xt:xt+H:dt=It:!/,\s*$/.test(se)&&(Be(Pt)||G(Pt))&&(ce(Pe)?dt=It<=xt?xt:xt+H:/^\{/.test(Pe)?dt=It<=xt?It:xt+H:Be(Pe)||G(Pe)?dt=It>=xt?xt:It:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(Pe)||/=\s*$/.test(Pe)||U(Pe)||/^\$[\w-\.\[\]\'\"]/.test(Pe)?dt=xt+H:dt=It)),dt},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"indent"}});var p=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],v=["domain","regexp","url-prefix","url"],C=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"],S=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],s=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],T=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],x=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],c=["for","if","else","unless","from","to"],d=["null","true","false","href","title","type","not-allowed","readonly","disabled"],w=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],E=p.concat(v,C,b,S,s,g,T,h,x,c,d,w);function z(M){return M=M.sort(function(H,Z){return Z>H}),new RegExp("^(("+M.join(")|(")+"))\\b")}function y(M){for(var H={},Z=0;Z{(function(o){typeof Gu=="object"&&typeof Zu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(N){for(var F={},D=0;D~^?!",h=":;,.(){}[]",g=/^\-?0b[01][01_]*/,T=/^\-?0o[0-7][0-7_]*/,x=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,c=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,d=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,w=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,E=/^\#[A-Za-z]+/,z=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function y(N,F,D){if(N.sol()&&(F.indented=N.indentation()),N.eatSpace())return null;var Q=N.peek();if(Q=="/"){if(N.match("//"))return N.skipToEnd(),"comment";if(N.match("/*"))return F.tokenize.push(H),H(N,F)}if(N.match(E))return"builtin";if(N.match(z))return"attribute";if(N.match(g)||N.match(T)||N.match(x)||N.match(c))return"number";if(N.match(w))return"property";if(s.indexOf(Q)>-1)return N.next(),"operator";if(h.indexOf(Q)>-1)return N.next(),N.match(".."),"punctuation";var j;if(j=N.match(/("""|"|')/)){var V=M.bind(null,j[0]);return F.tokenize.push(V),V(N,F)}if(N.match(d)){var _=N.current();return S.hasOwnProperty(_)?"variable-2":b.hasOwnProperty(_)?"atom":v.hasOwnProperty(_)?(C.hasOwnProperty(_)&&(F.prev="define"),"keyword"):D=="define"?"def":"variable"}return N.next(),null}function R(){var N=0;return function(F,D,Q){var j=y(F,D,Q);if(j=="punctuation"){if(F.current()=="(")++N;else if(F.current()==")"){if(N==0)return F.backUp(1),D.tokenize.pop(),D.tokenize[D.tokenize.length-1](F,D);--N}}return j}}function M(N,F,D){for(var Q=N.length==1,j,V=!1;j=F.peek();)if(V){if(F.next(),j=="(")return D.tokenize.push(R()),"string";V=!1}else{if(F.match(N))return D.tokenize.pop(),"string";F.next(),V=j=="\\"}return Q&&D.tokenize.pop(),"string"}function H(N,F){for(var D;D=N.next();)if(D==="/"&&N.eat("*"))F.tokenize.push(H);else if(D==="*"&&N.eat("/")){F.tokenize.pop();break}return"comment"}function Z(N,F,D){this.prev=N,this.align=F,this.indented=D}function ee(N,F){var D=F.match(/^\s*($|\/[\/\*])/,!1)?null:F.column()+1;N.context=new Z(N.context,D,N.indented)}function re(N){N.context&&(N.indented=N.context.indented,N.context=N.context.prev)}o.defineMode("swift",function(N){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(F,D){var Q=D.prev;D.prev=null;var j=D.tokenize[D.tokenize.length-1]||y,V=j(F,D,Q);if(!V||V=="comment"?D.prev=Q:D.prev||(D.prev=V),V=="punctuation"){var _=/[\(\[\{]|([\]\)\}])/.exec(F.current());_&&(_[1]?re:ee)(D,F)}return V},indent:function(F,D){var Q=F.context;if(!Q)return 0;var j=/^[\]\}\)]/.test(D);return Q.align!=null?Q.align-(j?1:0):Q.indented+(j?0:N.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace",closeBrackets:"()[]{}''\"\"``"}}),o.defineMIME("text/x-swift","swift")})});var Vu=Ke((Yu,Qu)=>{(function(o){typeof Yu=="object"&&typeof Qu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("coffeescript",function(p,v){var C="error";function b(F){return new RegExp("^(("+F.join(")|(")+"))\\b")}var S=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,s=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,h=/^[_A-Za-z$][_A-Za-z$0-9]*/,g=/^@[_A-Za-z$][_A-Za-z$0-9]*/,T=b(["and","or","not","is","isnt","in","instanceof","typeof"]),x=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],c=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],d=b(x.concat(c));x=b(x);var w=/^('{3}|\"{3}|['\"])/,E=/^(\/{3}|\/)/,z=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],y=b(z);function R(F,D){if(F.sol()){D.scope.align===null&&(D.scope.align=!1);var Q=D.scope.offset;if(F.eatSpace()){var j=F.indentation();return j>Q&&D.scope.type=="coffee"?"indent":j0&&ee(F,D)}if(F.eatSpace())return null;var V=F.peek();if(F.match("####"))return F.skipToEnd(),"comment";if(F.match("###"))return D.tokenize=H,D.tokenize(F,D);if(V==="#")return F.skipToEnd(),"comment";if(F.match(/^-?[0-9\.]/,!1)){var _=!1;if(F.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(_=!0),F.match(/^-?\d+\.\d*/)&&(_=!0),F.match(/^-?\.\d+/)&&(_=!0),_)return F.peek()=="."&&F.backUp(1),"number";var K=!1;if(F.match(/^-?0x[0-9a-f]+/i)&&(K=!0),F.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(K=!0),F.match(/^-?0(?![\dx])/i)&&(K=!0),K)return"number"}if(F.match(w))return D.tokenize=M(F.current(),!1,"string"),D.tokenize(F,D);if(F.match(E)){if(F.current()!="/"||F.match(/^.*\//,!1))return D.tokenize=M(F.current(),!0,"string-2"),D.tokenize(F,D);F.backUp(1)}return F.match(S)||F.match(T)?"operator":F.match(s)?"punctuation":F.match(y)?"atom":F.match(g)||D.prop&&F.match(h)?"property":F.match(d)?"keyword":F.match(h)?"variable":(F.next(),C)}function M(F,D,Q){return function(j,V){for(;!j.eol();)if(j.eatWhile(/[^'"\/\\]/),j.eat("\\")){if(j.next(),D&&j.eol())return Q}else{if(j.match(F))return V.tokenize=R,Q;j.eat(/['"\/]/)}return D&&(v.singleLineStringErrors?Q=C:V.tokenize=R),Q}}function H(F,D){for(;!F.eol();){if(F.eatWhile(/[^#]/),F.match("###")){D.tokenize=R;break}F.eatWhile("#")}return"comment"}function Z(F,D,Q){Q=Q||"coffee";for(var j=0,V=!1,_=null,K=D.scope;K;K=K.prev)if(K.type==="coffee"||K.type=="}"){j=K.offset+p.indentUnit;break}Q!=="coffee"?(V=null,_=F.column()+F.current().length):D.scope.align&&(D.scope.align=!1),D.scope={offset:j,type:Q,prev:D.scope,align:V,alignOffset:_}}function ee(F,D){if(D.scope.prev)if(D.scope.type==="coffee"){for(var Q=F.indentation(),j=!1,V=D.scope;V;V=V.prev)if(Q===V.offset){j=!0;break}if(!j)return!0;for(;D.scope.prev&&D.scope.offset!==Q;)D.scope=D.scope.prev;return!1}else return D.scope=D.scope.prev,!1}function re(F,D){var Q=D.tokenize(F,D),j=F.current();j==="return"&&(D.dedent=!0),((j==="->"||j==="=>")&&F.eol()||Q==="indent")&&Z(F,D);var V="[({".indexOf(j);if(V!==-1&&Z(F,D,"])}".slice(V,V+1)),x.exec(j)&&Z(F,D),j=="then"&&ee(F,D),Q==="dedent"&&ee(F,D))return C;if(V="])}".indexOf(j),V!==-1){for(;D.scope.type=="coffee"&&D.scope.prev;)D.scope=D.scope.prev;D.scope.type==j&&(D.scope=D.scope.prev)}return D.dedent&&F.eol()&&(D.scope.type=="coffee"&&D.scope.prev&&(D.scope=D.scope.prev),D.dedent=!1),Q}var N={startState:function(F){return{tokenize:R,scope:{offset:F||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(F,D){var Q=D.scope.align===null&&D.scope;Q&&F.sol()&&(Q.align=!1);var j=re(F,D);return j&&j!="comment"&&(Q&&(Q.align=!0),D.prop=j=="punctuation"&&F.current()=="."),j},indent:function(F,D){if(F.tokenize!=R)return 0;var Q=F.scope,j=D&&"])}".indexOf(D.charAt(0))>-1;if(j)for(;Q.type=="coffee"&&Q.prev;)Q=Q.prev;var V=j&&Q.type===D.charAt(0);return Q.align?Q.alignOffset-(V?1:0):(V?Q.prev:Q).offset},lineComment:"#",fold:"indent"};return N}),o.defineMIME("application/vnd.coffeescript","coffeescript"),o.defineMIME("text/x-coffeescript","coffeescript"),o.defineMIME("text/coffeescript","coffeescript")})});var tc=Ke((Ju,ec)=>{(function(o){typeof Ju=="object"&&typeof ec=="object"?o(We(),vn(),gn(),Qn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../javascript/javascript","../css/css","../htmlmixed/htmlmixed"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("pug",function(p){var v="keyword",C="meta",b="builtin",S="qualifier",s={"{":"}","(":")","[":"]"},h=o.getMode(p,"javascript");function g(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=o.startState(h),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}g.prototype.copy=function(){var U=new g;return U.javaScriptLine=this.javaScriptLine,U.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,U.javaScriptArguments=this.javaScriptArguments,U.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,U.isInterpolating=this.isInterpolating,U.interpolationNesting=this.interpolationNesting,U.jsState=o.copyState(h,this.jsState),U.innerMode=this.innerMode,this.innerMode&&this.innerState&&(U.innerState=o.copyState(this.innerMode,this.innerState)),U.restOfLine=this.restOfLine,U.isIncludeFiltered=this.isIncludeFiltered,U.isEach=this.isEach,U.lastTag=this.lastTag,U.scriptType=this.scriptType,U.isAttrs=this.isAttrs,U.attrsNest=this.attrsNest.slice(),U.inAttributeName=this.inAttributeName,U.attributeIsType=this.attributeIsType,U.attrValue=this.attrValue,U.indentOf=this.indentOf,U.indentToken=this.indentToken,U.innerModeForLine=this.innerModeForLine,U};function T(U,G){if(U.sol()&&(G.javaScriptLine=!1,G.javaScriptLineExcludesColon=!1),G.javaScriptLine){if(G.javaScriptLineExcludesColon&&U.peek()===":"){G.javaScriptLine=!1,G.javaScriptLineExcludesColon=!1;return}var ce=h.token(U,G.jsState);return U.eol()&&(G.javaScriptLine=!1),ce||!0}}function x(U,G){if(G.javaScriptArguments){if(G.javaScriptArgumentsDepth===0&&U.peek()!=="("){G.javaScriptArguments=!1;return}if(U.peek()==="("?G.javaScriptArgumentsDepth++:U.peek()===")"&&G.javaScriptArgumentsDepth--,G.javaScriptArgumentsDepth===0){G.javaScriptArguments=!1;return}var ce=h.token(U,G.jsState);return ce||!0}}function c(U){if(U.match(/^yield\b/))return"keyword"}function d(U){if(U.match(/^(?:doctype) *([^\n]+)?/))return C}function w(U,G){if(U.match("#{"))return G.isInterpolating=!0,G.interpolationNesting=0,"punctuation"}function E(U,G){if(G.isInterpolating){if(U.peek()==="}"){if(G.interpolationNesting--,G.interpolationNesting<0)return U.next(),G.isInterpolating=!1,"punctuation"}else U.peek()==="{"&&G.interpolationNesting++;return h.token(U,G.jsState)||!0}}function z(U,G){if(U.match(/^case\b/))return G.javaScriptLine=!0,v}function y(U,G){if(U.match(/^when\b/))return G.javaScriptLine=!0,G.javaScriptLineExcludesColon=!0,v}function R(U){if(U.match(/^default\b/))return v}function M(U,G){if(U.match(/^extends?\b/))return G.restOfLine="string",v}function H(U,G){if(U.match(/^append\b/))return G.restOfLine="variable",v}function Z(U,G){if(U.match(/^prepend\b/))return G.restOfLine="variable",v}function ee(U,G){if(U.match(/^block\b *(?:(prepend|append)\b)?/))return G.restOfLine="variable",v}function re(U,G){if(U.match(/^include\b/))return G.restOfLine="string",v}function N(U,G){if(U.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&U.match("include"))return G.isIncludeFiltered=!0,v}function F(U,G){if(G.isIncludeFiltered){var ce=B(U,G);return G.isIncludeFiltered=!1,G.restOfLine="string",ce}}function D(U,G){if(U.match(/^mixin\b/))return G.javaScriptLine=!0,v}function Q(U,G){if(U.match(/^\+([-\w]+)/))return U.match(/^\( *[-\w]+ *=/,!1)||(G.javaScriptArguments=!0,G.javaScriptArgumentsDepth=0),"variable";if(U.match("+#{",!1))return U.next(),G.mixinCallAfter=!0,w(U,G)}function j(U,G){if(G.mixinCallAfter)return G.mixinCallAfter=!1,U.match(/^\( *[-\w]+ *=/,!1)||(G.javaScriptArguments=!0,G.javaScriptArgumentsDepth=0),!0}function V(U,G){if(U.match(/^(if|unless|else if|else)\b/))return G.javaScriptLine=!0,v}function _(U,G){if(U.match(/^(- *)?(each|for)\b/))return G.isEach=!0,v}function K(U,G){if(G.isEach){if(U.match(/^ in\b/))return G.javaScriptLine=!0,G.isEach=!1,v;if(U.sol()||U.eol())G.isEach=!1;else if(U.next()){for(;!U.match(/^ in\b/,!1)&&U.next(););return"variable"}}}function X(U,G){if(U.match(/^while\b/))return G.javaScriptLine=!0,v}function I(U,G){var ce;if(ce=U.match(/^(\w(?:[-:\w]*\w)?)\/?/))return G.lastTag=ce[1].toLowerCase(),G.lastTag==="script"&&(G.scriptType="application/javascript"),"tag"}function B(U,G){if(U.match(/^:([\w\-]+)/)){var ce;return p&&p.innerModes&&(ce=p.innerModes(U.current().substring(1))),ce||(ce=U.current().substring(1)),typeof ce=="string"&&(ce=o.getMode(p,ce)),je(U,G,ce),"atom"}}function le(U,G){if(U.match(/^(!?=|-)/))return G.javaScriptLine=!0,"punctuation"}function xe(U){if(U.match(/^#([\w-]+)/))return b}function q(U){if(U.match(/^\.([\w-]+)/))return S}function L(U,G){if(U.peek()=="(")return U.next(),G.isAttrs=!0,G.attrsNest=[],G.inAttributeName=!0,G.attrValue="",G.attributeIsType=!1,"punctuation"}function de(U,G){if(G.isAttrs){if(s[U.peek()]&&G.attrsNest.push(s[U.peek()]),G.attrsNest[G.attrsNest.length-1]===U.peek())G.attrsNest.pop();else if(U.eat(")"))return G.isAttrs=!1,"punctuation";if(G.inAttributeName&&U.match(/^[^=,\)!]+/))return(U.peek()==="="||U.peek()==="!")&&(G.inAttributeName=!1,G.jsState=o.startState(h),G.lastTag==="script"&&U.current().trim().toLowerCase()==="type"?G.attributeIsType=!0:G.attributeIsType=!1),"attribute";var ce=h.token(U,G.jsState);if(G.attributeIsType&&ce==="string"&&(G.scriptType=U.current().toString()),G.attrsNest.length===0&&(ce==="string"||ce==="variable"||ce==="keyword"))try{return Function("","var x "+G.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),G.inAttributeName=!0,G.attrValue="",U.backUp(U.current().length),de(U,G)}catch{}return G.attrValue+=U.current(),ce||!0}}function ze(U,G){if(U.match(/^&attributes\b/))return G.javaScriptArguments=!0,G.javaScriptArgumentsDepth=0,"keyword"}function pe(U){if(U.sol()&&U.eatSpace())return"indent"}function Ee(U,G){if(U.match(/^ *\/\/(-)?([^\n]*)/))return G.indentOf=U.indentation(),G.indentToken="comment","comment"}function ge(U){if(U.match(/^: */))return"colon"}function Oe(U,G){if(U.match(/^(?:\| ?| )([^\n]+)/))return"string";if(U.match(/^(<[^\n]*)/,!1))return je(U,G,"htmlmixed"),G.innerModeForLine=!0,Ze(U,G,!0)}function qe(U,G){if(U.eat(".")){var ce=null;return G.lastTag==="script"&&G.scriptType.toLowerCase().indexOf("javascript")!=-1?ce=G.scriptType.toLowerCase().replace(/"|'/g,""):G.lastTag==="style"&&(ce="css"),je(U,G,ce),"dot"}}function Se(U){return U.next(),null}function je(U,G,ce){ce=o.mimeModes[ce]||ce,ce=p.innerModes&&p.innerModes(ce)||ce,ce=o.mimeModes[ce]||ce,ce=o.getMode(p,ce),G.indentOf=U.indentation(),ce&&ce.name!=="null"?G.innerMode=ce:G.indentToken="string"}function Ze(U,G,ce){if(U.indentation()>G.indentOf||G.innerModeForLine&&!U.sol()||ce)return G.innerMode?(G.innerState||(G.innerState=G.innerMode.startState?o.startState(G.innerMode,U.indentation()):{}),U.hideFirstChars(G.indentOf+2,function(){return G.innerMode.token(U,G.innerState)||!0})):(U.skipToEnd(),G.indentToken);U.sol()&&(G.indentOf=1/0,G.indentToken=null,G.innerMode=null,G.innerState=null)}function ke(U,G){if(U.sol()&&(G.restOfLine=""),G.restOfLine){U.skipToEnd();var ce=G.restOfLine;return G.restOfLine="",ce}}function Je(){return new g}function He(U){return U.copy()}function Ge(U,G){var ce=Ze(U,G)||ke(U,G)||E(U,G)||F(U,G)||K(U,G)||de(U,G)||T(U,G)||x(U,G)||j(U,G)||c(U)||d(U)||w(U,G)||z(U,G)||y(U,G)||R(U)||M(U,G)||H(U,G)||Z(U,G)||ee(U,G)||re(U,G)||N(U,G)||D(U,G)||Q(U,G)||V(U,G)||_(U,G)||X(U,G)||I(U,G)||B(U,G)||le(U,G)||xe(U)||q(U)||L(U,G)||ze(U,G)||pe(U)||Oe(U,G)||Ee(U,G)||ge(U)||qe(U,G)||Se(U);return ce===!0?null:ce}return{startState:Je,copyState:He,token:Ge}},"javascript","css","htmlmixed"),o.defineMIME("text/x-pug","pug"),o.defineMIME("text/x-jade","pug")})});var ic=Ke((rc,nc)=>{(function(o){typeof rc=="object"&&typeof nc=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.multiplexingMode=function(p){var v=Array.prototype.slice.call(arguments,1);function C(b,S,s,h){if(typeof S=="string"){var g=b.indexOf(S,s);return h&&g>-1?g+S.length:g}var T=S.exec(s?b.slice(s):b);return T?T.index+s+(h?T[0].length:0):-1}return{startState:function(){return{outer:o.startState(p),innerActive:null,inner:null,startingInner:!1}},copyState:function(b){return{outer:o.copyState(p,b.outer),innerActive:b.innerActive,inner:b.innerActive&&o.copyState(b.innerActive.mode,b.inner),startingInner:b.startingInner}},token:function(b,S){if(S.innerActive){var E=S.innerActive,h=b.string;if(!E.close&&b.sol())return S.innerActive=S.inner=null,this.token(b,S);var x=E.close&&!S.startingInner?C(h,E.close,b.pos,E.parseDelimiters):-1;if(x==b.pos&&!E.parseDelimiters)return b.match(E.close),S.innerActive=S.inner=null,E.delimStyle&&E.delimStyle+" "+E.delimStyle+"-close";x>-1&&(b.string=h.slice(0,x));var z=E.mode.token(b,S.inner);return x>-1?b.string=h:b.pos>b.start&&(S.startingInner=!1),x==b.pos&&E.parseDelimiters&&(S.innerActive=S.inner=null),E.innerStyle&&(z?z=z+" "+E.innerStyle:z=E.innerStyle),z}else{for(var s=1/0,h=b.string,g=0;g>1,q=N(w.slice(0,re)).length;if(q==E)return re;q>E?J=re:G=re+1}}function k(w,W,E,N){if(!W.length)return null;var G=N?y:c,J=G(W).split(/\r|\n\r?/);e:for(var re=E.line,q=E.ch,O=w.lastLine()+1-J.length;re<=O;re++,q=0){var D=w.getLine(re).slice(q),Q=G(D);if(J.length==1){var R=Q.indexOf(J[0]);if(R==-1)continue e;var E=d(D,Q,R,G)+q;return{from:p(re,d(D,Q,R,G)+q),to:p(re,d(D,Q,R+J[0].length,G)+q)}}else{var V=Q.length-J[0].length;if(Q.slice(V)!=J[0])continue e;for(var x=1;x=O;re--,q=-1){var D=w.getLine(re);q>-1&&(D=D.slice(0,q));var Q=G(D);if(J.length==1){var R=Q.lastIndexOf(J[0]);if(R==-1)continue e;return{from:p(re,d(D,Q,R,G)),to:p(re,d(D,Q,R+J[0].length,G))}}else{var V=J[J.length-1];if(Q.slice(0,V.length)!=V)continue e;for(var x=1,E=re-J.length+1;x(this.doc.getLine(W.line)||"").length&&(W.ch=0,W.line++)),o.cmpPos(W,this.doc.clipPos(W))!=0))return this.atOccurrence=!1;var E=this.matches(w,W);if(this.afterEmptyMatch=E&&o.cmpPos(E.from,E.to)==0,E)return this.pos=E,this.atOccurrence=!0,this.pos.match||!0;var N=p(w?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:N,to:N},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(w,W){if(this.atOccurrence){var E=o.splitLines(w);this.doc.replaceRange(E,this.pos.from,this.pos.to,W),this.pos.to=p(this.pos.from.line+E.length-1,E[E.length-1].length+(E.length==1?this.pos.from.ch:0))}}},o.defineExtension("getSearchCursor",function(w,W,E){return new M(this.doc,w,W,E)}),o.defineDocExtension("getSearchCursor",function(w,W,E){return new M(this,w,W,E)}),o.defineExtension("selectMatches",function(w,W){for(var E=[],N=this.getSearchCursor(w,this.getCursor("from"),W);N.findNext()&&!(o.cmpPos(N.to(),this.getCursor("to"))>0);)E.push({anchor:N.from(),head:N.to()});E.length&&this.setSelections(E,0)})})});var Vo=Ke((ws,Ss)=>{(function(o){typeof ws=="object"&&typeof Ss=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(I,H,le,xe,F,L){this.indented=I,this.column=H,this.type=le,this.info=xe,this.align=F,this.prev=L}function v(I,H,le,xe){var F=I.indented;return I.context&&I.context.type=="statement"&&le!="statement"&&(F=I.context.indented),I.context=new p(F,H,le,xe,null,I.context)}function C(I){var H=I.context.type;return(H==")"||H=="]"||H=="}")&&(I.indented=I.context.indented),I.context=I.context.prev}function b(I,H,le){if(H.prevToken=="variable"||H.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(I.string.slice(0,le))||H.typeAtEndOfLine&&I.column()==I.indentation())return!0}function S(I){for(;;){if(!I||I.type=="top")return!0;if(I.type=="}"&&I.prev.info!="namespace")return!1;I=I.prev}}o.defineMode("clike",function(I,H){var le=I.indentUnit,xe=H.statementIndentUnit||le,F=H.dontAlignCalls,L=H.keywords||{},de=H.types||{},ze=H.builtin||{},pe=H.blockKeywords||{},Ee=H.defKeywords||{},ge=H.atoms||{},Oe=H.hooks||{},qe=H.multiLineStrings,Se=H.indentStatements!==!1,je=H.indentSwitch!==!1,Ze=H.namespaceSeparator,ke=H.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Je=H.numberStart||/[\d\.]/,He=H.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Ge=H.isOperatorChar||/[+\-*&%=<>!?|\/]/,U=H.isIdentifierChar||/[\w\$_\xa1-\uffff]/,Z=H.isReservedIdentifier||!1,ce,Be;function te(we,Me){var Le=we.next();if(Oe[Le]){var $=Oe[Le](we,Me);if($!==!1)return $}if(Le=='"'||Le=="'")return Me.tokenize=fe(Le),Me.tokenize(we,Me);if(Je.test(Le)){if(we.backUp(1),we.match(He))return"number";we.next()}if(ke.test(Le))return ce=Le,null;if(Le=="/"){if(we.eat("*"))return Me.tokenize=oe,oe(we,Me);if(we.eat("/"))return we.skipToEnd(),"comment"}if(Ge.test(Le)){for(;!we.match(/^\/[\/*]/,!1)&&we.eat(Ge););return"operator"}if(we.eatWhile(U),Ze)for(;we.match(Ze);)we.eatWhile(U);var B=we.current();return h(L,B)?(h(pe,B)&&(ce="newstatement"),h(Ee,B)&&(Be=!0),"keyword"):h(de,B)?"type":h(ze,B)||Z&&Z(B)?(h(pe,B)&&(ce="newstatement"),"builtin"):h(ge,B)?"atom":"variable"}function fe(we){return function(Me,Le){for(var $=!1,B,se=!1;(B=Me.next())!=null;){if(B==we&&!$){se=!0;break}$=!$&&B=="\\"}return(se||!($||qe))&&(Le.tokenize=null),"string"}}function oe(we,Me){for(var Le=!1,$;$=we.next();){if($=="/"&&Le){Me.tokenize=null;break}Le=$=="*"}return"comment"}function Ue(we,Me){H.typeFirstDefinitions&&we.eol()&&S(Me.context)&&(Me.typeAtEndOfLine=b(we,Me,we.pos))}return{startState:function(we){return{tokenize:null,context:new p((we||0)-le,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(we,Me){var Le=Me.context;if(we.sol()&&(Le.align==null&&(Le.align=!1),Me.indented=we.indentation(),Me.startOfLine=!0),we.eatSpace())return Ue(we,Me),null;ce=Be=null;var $=(Me.tokenize||te)(we,Me);if($=="comment"||$=="meta")return $;if(Le.align==null&&(Le.align=!0),ce==";"||ce==":"||ce==","&&we.match(/^\s*(?:\/\/.*)?$/,!1))for(;Me.context.type=="statement";)C(Me);else if(ce=="{")v(Me,we.column(),"}");else if(ce=="[")v(Me,we.column(),"]");else if(ce=="(")v(Me,we.column(),")");else if(ce=="}"){for(;Le.type=="statement";)Le=C(Me);for(Le.type=="}"&&(Le=C(Me));Le.type=="statement";)Le=C(Me)}else ce==Le.type?C(Me):Se&&((Le.type=="}"||Le.type=="top")&&ce!=";"||Le.type=="statement"&&ce=="newstatement")&&v(Me,we.column(),"statement",we.current());if($=="variable"&&(Me.prevToken=="def"||H.typeFirstDefinitions&&b(we,Me,we.start)&&S(Me.context)&&we.match(/^\s*\(/,!1))&&($="def"),Oe.token){var B=Oe.token(we,Me,$);B!==void 0&&($=B)}return $=="def"&&H.styleDefs===!1&&($="variable"),Me.startOfLine=!1,Me.prevToken=Be?"def":$||ce,Ue(we,Me),$},indent:function(we,Me){if(we.tokenize!=te&&we.tokenize!=null||we.typeAtEndOfLine&&S(we.context))return o.Pass;var Le=we.context,$=Me&&Me.charAt(0),B=$==Le.type;if(Le.type=="statement"&&$=="}"&&(Le=Le.prev),H.dontIndentStatements)for(;Le.type=="statement"&&H.dontIndentStatements.test(Le.info);)Le=Le.prev;if(Oe.indent){var se=Oe.indent(we,Le,Me,le);if(typeof se=="number")return se}var De=Le.prev&&Le.prev.info=="switch";if(H.allmanIndentation&&/[{(]/.test($)){for(;Le.type!="top"&&Le.type!="}";)Le=Le.prev;return Le.indented}return Le.type=="statement"?Le.indented+($=="{"?0:xe):Le.align&&(!F||Le.type!=")")?Le.column+(B?0:1):Le.type==")"&&!B?Le.indented+xe:Le.indented+(B?0:le)+(!B&&De&&!/^(?:case|default)\b/.test(Me)?le:0)},electricInput:je?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function s(I){for(var H={},le=I.split(" "),xe=0;xe!?|\/#:@]/,hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},'"':function(I,H){return I.match('""')?(H.tokenize=R,H.tokenize(I,H)):!1},"'":function(I){return I.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(I.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(I,H){var le=H.context;return le.type=="}"&&le.align&&I.eat(">")?(H.context=new p(le.indented,le.column,le.type,le.info,null,le.prev),"operator"):!1},"/":function(I,H){return I.eat("*")?(H.tokenize=V(1),H.tokenize(I,H)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function x(I){return function(H,le){for(var xe=!1,F,L=!1;!H.eol();){if(!I&&!xe&&H.match('"')){L=!0;break}if(I&&H.match('"""')){L=!0;break}F=H.next(),!xe&&F=="$"&&H.match("{")&&H.skipTo("}"),xe=!xe&&F=="\\"&&!I}return(L||!I)&&(le.tokenize=null),"string"}}Q("text/x-kotlin",{name:"clike",keywords:s("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:s("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:s("catch class do else finally for if where try while enum"),defKeywords:s("class val var object interface fun"),atoms:s("true false null this"),hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},"*":function(I,H){return H.prevToken=="."?"variable":"operator"},'"':function(I,H){return H.tokenize=x(I.match('""')),H.tokenize(I,H)},"/":function(I,H){return I.eat("*")?(H.tokenize=V(1),H.tokenize(I,H)):!1},indent:function(I,H,le,xe){var F=le&&le.charAt(0);if((I.prevToken=="}"||I.prevToken==")")&&le=="")return I.indented;if(I.prevToken=="operator"&&le!="}"&&I.context.type!="}"||I.prevToken=="variable"&&F=="."||(I.prevToken=="}"||I.prevToken==")")&&F==".")return xe*2+H.indented;if(H.align&&H.type=="}")return H.indented+(I.context.type==(le||"").charAt(0)?0:xe)}},modeProps:{closeBrackets:{triples:'"'}}}),Q(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:s("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:s("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:s("for while do if else struct"),builtin:s("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:s("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":E},modeProps:{fold:["brace","include"]}}),Q("text/x-nesc",{name:"clike",keywords:s(g+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:z,blockKeywords:s(w),atoms:s("null true false"),hooks:{"#":E},modeProps:{fold:["brace","include"]}}),Q("text/x-objectivec",{name:"clike",keywords:s(g+" "+y),types:M,builtin:s(c),blockKeywords:s(w+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:s(W+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:s("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:G,hooks:{"#":E,"*":N},modeProps:{fold:["brace","include"]}}),Q("text/x-objectivec++",{name:"clike",keywords:s(g+" "+y+" "+T),types:M,builtin:s(c),blockKeywords:s(w+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:s(W+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:s("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:G,hooks:{"#":E,"*":N,u:re,U:re,L:re,R:re,0:J,1:J,2:J,3:J,4:J,5:J,6:J,7:J,8:J,9:J,token:function(I,H,le){if(le=="variable"&&I.peek()=="("&&(H.prevToken==";"||H.prevToken==null||H.prevToken=="}")&&q(I.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),Q("text/x-squirrel",{name:"clike",keywords:s("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:z,blockKeywords:s("case catch class else for foreach if switch try while"),defKeywords:s("function local class"),typeFirstDefinitions:!0,atoms:s("true false null"),hooks:{"#":E},modeProps:{fold:["brace","include"]}});var K=null;function X(I){return function(H,le){for(var xe=!1,F,L=!1;!H.eol();){if(!xe&&H.match('"')&&(I=="single"||H.match('""'))){L=!0;break}if(!xe&&H.match("``")){K=X(I),L=!0;break}F=H.next(),xe=I=="single"&&!xe&&F=="\\"}return L&&(le.tokenize=null),"string"}}Q("text/x-ceylon",{name:"clike",keywords:s("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(I){var H=I.charAt(0);return H===H.toUpperCase()&&H!==H.toLowerCase()},blockKeywords:s("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:s("class dynamic function interface module object package value"),builtin:s("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:s("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},'"':function(I,H){return H.tokenize=X(I.match('""')?"triple":"single"),H.tokenize(I,H)},"`":function(I,H){return!K||!I.match("`")?!1:(H.tokenize=K,K=null,H.tokenize(I,H))},"'":function(I){return I.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(I,H,le){if((le=="variable"||le=="type")&&H.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var Cs=Ke((Ts,Ls)=>{(function(o){typeof Ts=="object"&&typeof Ls=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("cmake",function(){var p=/({)?[a-zA-Z0-9_]+(})?/;function v(b,S){for(var s,h,g=!1;!b.eol()&&(s=b.next())!=S.pending;){if(s==="$"&&h!="\\"&&S.pending=='"'){g=!0;break}h=s}return g&&b.backUp(1),s==S.pending?S.continueString=!1:S.continueString=!0,"string"}function C(b,S){var s=b.next();return s==="$"?b.match(p)?"variable-2":"variable":S.continueString?(b.backUp(1),v(b,S)):b.match(/(\s+)?\w+\(/)||b.match(/(\s+)?\w+\ \(/)?(b.backUp(1),"def"):s=="#"?(b.skipToEnd(),"comment"):s=="'"||s=='"'?(S.pending=s,v(b,S)):s=="("||s==")"?"bracket":s.match(/[0-9]/)?"number":(b.eatWhile(/[\w-]/),null)}return{startState:function(){var b={};return b.inDefinition=!1,b.inInclude=!1,b.continueString=!1,b.pending=!1,b},token:function(b,S){return b.eatSpace()?null:C(b,S)}}}),o.defineMIME("text/x-cmake","cmake")})});var gn=Ke((Es,zs)=>{(function(o){typeof Es=="object"&&typeof zs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("css",function(O,D){var Q=D.inline;D.propertyKeywords||(D=o.resolveMode("text/css"));var R=O.indentUnit,V=D.tokenHooks,x=D.documentTypes||{},K=D.mediaTypes||{},X=D.mediaFeatures||{},I=D.mediaValueKeywords||{},H=D.propertyKeywords||{},le=D.nonStandardPropertyKeywords||{},xe=D.fontProperties||{},F=D.counterDescriptors||{},L=D.colorKeywords||{},de=D.valueKeywords||{},ze=D.allowNested,pe=D.lineComment,Ee=D.supportsAtComponent===!0,ge=O.highlightNonStandardPropertyKeywords!==!1,Oe,qe;function Se(te,fe){return Oe=fe,te}function je(te,fe){var oe=te.next();if(V[oe]){var Ue=V[oe](te,fe);if(Ue!==!1)return Ue}if(oe=="@")return te.eatWhile(/[\w\\\-]/),Se("def",te.current());if(oe=="="||(oe=="~"||oe=="|")&&te.eat("="))return Se(null,"compare");if(oe=='"'||oe=="'")return fe.tokenize=Ze(oe),fe.tokenize(te,fe);if(oe=="#")return te.eatWhile(/[\w\\\-]/),Se("atom","hash");if(oe=="!")return te.match(/^\s*\w*/),Se("keyword","important");if(/\d/.test(oe)||oe=="."&&te.eat(/\d/))return te.eatWhile(/[\w.%]/),Se("number","unit");if(oe==="-"){if(/[\d.]/.test(te.peek()))return te.eatWhile(/[\w.%]/),Se("number","unit");if(te.match(/^-[\w\\\-]*/))return te.eatWhile(/[\w\\\-]/),te.match(/^\s*:/,!1)?Se("variable-2","variable-definition"):Se("variable-2","variable");if(te.match(/^\w+-/))return Se("meta","meta")}else return/[,+>*\/]/.test(oe)?Se(null,"select-op"):oe=="."&&te.match(/^-?[_a-z][_a-z0-9-]*/i)?Se("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(oe)?Se(null,oe):te.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(te.current())&&(fe.tokenize=ke),Se("variable callee","variable")):/[\w\\\-]/.test(oe)?(te.eatWhile(/[\w\\\-]/),Se("property","word")):Se(null,null)}function Ze(te){return function(fe,oe){for(var Ue=!1,we;(we=fe.next())!=null;){if(we==te&&!Ue){te==")"&&fe.backUp(1);break}Ue=!Ue&&we=="\\"}return(we==te||!Ue&&te!=")")&&(oe.tokenize=null),Se("string","string")}}function ke(te,fe){return te.next(),te.match(/^\s*[\"\')]/,!1)?fe.tokenize=null:fe.tokenize=Ze(")"),Se(null,"(")}function Je(te,fe,oe){this.type=te,this.indent=fe,this.prev=oe}function He(te,fe,oe,Ue){return te.context=new Je(oe,fe.indentation()+(Ue===!1?0:R),te.context),oe}function Ge(te){return te.context.prev&&(te.context=te.context.prev),te.context.type}function U(te,fe,oe){return Be[oe.context.type](te,fe,oe)}function Z(te,fe,oe,Ue){for(var we=Ue||1;we>0;we--)oe.context=oe.context.prev;return U(te,fe,oe)}function ce(te){var fe=te.current().toLowerCase();de.hasOwnProperty(fe)?qe="atom":L.hasOwnProperty(fe)?qe="keyword":qe="variable"}var Be={};return Be.top=function(te,fe,oe){if(te=="{")return He(oe,fe,"block");if(te=="}"&&oe.context.prev)return Ge(oe);if(Ee&&/@component/i.test(te))return He(oe,fe,"atComponentBlock");if(/^@(-moz-)?document$/i.test(te))return He(oe,fe,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(te))return He(oe,fe,"atBlock");if(/^@(font-face|counter-style)/i.test(te))return oe.stateArg=te,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(te))return"keyframes";if(te&&te.charAt(0)=="@")return He(oe,fe,"at");if(te=="hash")qe="builtin";else if(te=="word")qe="tag";else{if(te=="variable-definition")return"maybeprop";if(te=="interpolation")return He(oe,fe,"interpolation");if(te==":")return"pseudo";if(ze&&te=="(")return He(oe,fe,"parens")}return oe.context.type},Be.block=function(te,fe,oe){if(te=="word"){var Ue=fe.current().toLowerCase();return H.hasOwnProperty(Ue)?(qe="property","maybeprop"):le.hasOwnProperty(Ue)?(qe=ge?"string-2":"property","maybeprop"):ze?(qe=fe.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(qe+=" error","maybeprop")}else return te=="meta"?"block":!ze&&(te=="hash"||te=="qualifier")?(qe="error","block"):Be.top(te,fe,oe)},Be.maybeprop=function(te,fe,oe){return te==":"?He(oe,fe,"prop"):U(te,fe,oe)},Be.prop=function(te,fe,oe){if(te==";")return Ge(oe);if(te=="{"&&ze)return He(oe,fe,"propBlock");if(te=="}"||te=="{")return Z(te,fe,oe);if(te=="(")return He(oe,fe,"parens");if(te=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(fe.current()))qe+=" error";else if(te=="word")ce(fe);else if(te=="interpolation")return He(oe,fe,"interpolation");return"prop"},Be.propBlock=function(te,fe,oe){return te=="}"?Ge(oe):te=="word"?(qe="property","maybeprop"):oe.context.type},Be.parens=function(te,fe,oe){return te=="{"||te=="}"?Z(te,fe,oe):te==")"?Ge(oe):te=="("?He(oe,fe,"parens"):te=="interpolation"?He(oe,fe,"interpolation"):(te=="word"&&ce(fe),"parens")},Be.pseudo=function(te,fe,oe){return te=="meta"?"pseudo":te=="word"?(qe="variable-3",oe.context.type):U(te,fe,oe)},Be.documentTypes=function(te,fe,oe){return te=="word"&&x.hasOwnProperty(fe.current())?(qe="tag",oe.context.type):Be.atBlock(te,fe,oe)},Be.atBlock=function(te,fe,oe){if(te=="(")return He(oe,fe,"atBlock_parens");if(te=="}"||te==";")return Z(te,fe,oe);if(te=="{")return Ge(oe)&&He(oe,fe,ze?"block":"top");if(te=="interpolation")return He(oe,fe,"interpolation");if(te=="word"){var Ue=fe.current().toLowerCase();Ue=="only"||Ue=="not"||Ue=="and"||Ue=="or"?qe="keyword":K.hasOwnProperty(Ue)?qe="attribute":X.hasOwnProperty(Ue)?qe="property":I.hasOwnProperty(Ue)?qe="keyword":H.hasOwnProperty(Ue)?qe="property":le.hasOwnProperty(Ue)?qe=ge?"string-2":"property":de.hasOwnProperty(Ue)?qe="atom":L.hasOwnProperty(Ue)?qe="keyword":qe="error"}return oe.context.type},Be.atComponentBlock=function(te,fe,oe){return te=="}"?Z(te,fe,oe):te=="{"?Ge(oe)&&He(oe,fe,ze?"block":"top",!1):(te=="word"&&(qe="error"),oe.context.type)},Be.atBlock_parens=function(te,fe,oe){return te==")"?Ge(oe):te=="{"||te=="}"?Z(te,fe,oe,2):Be.atBlock(te,fe,oe)},Be.restricted_atBlock_before=function(te,fe,oe){return te=="{"?He(oe,fe,"restricted_atBlock"):te=="word"&&oe.stateArg=="@counter-style"?(qe="variable","restricted_atBlock_before"):U(te,fe,oe)},Be.restricted_atBlock=function(te,fe,oe){return te=="}"?(oe.stateArg=null,Ge(oe)):te=="word"?(oe.stateArg=="@font-face"&&!xe.hasOwnProperty(fe.current().toLowerCase())||oe.stateArg=="@counter-style"&&!F.hasOwnProperty(fe.current().toLowerCase())?qe="error":qe="property","maybeprop"):"restricted_atBlock"},Be.keyframes=function(te,fe,oe){return te=="word"?(qe="variable","keyframes"):te=="{"?He(oe,fe,"top"):U(te,fe,oe)},Be.at=function(te,fe,oe){return te==";"?Ge(oe):te=="{"||te=="}"?Z(te,fe,oe):(te=="word"?qe="tag":te=="hash"&&(qe="builtin"),"at")},Be.interpolation=function(te,fe,oe){return te=="}"?Ge(oe):te=="{"||te==";"?Z(te,fe,oe):(te=="word"?qe="variable":te!="variable"&&te!="("&&te!=")"&&(qe="error"),"interpolation")},{startState:function(te){return{tokenize:null,state:Q?"block":"top",stateArg:null,context:new Je(Q?"block":"top",te||0,null)}},token:function(te,fe){if(!fe.tokenize&&te.eatSpace())return null;var oe=(fe.tokenize||je)(te,fe);return oe&&typeof oe=="object"&&(Oe=oe[1],oe=oe[0]),qe=oe,Oe!="comment"&&(fe.state=Be[fe.state](Oe,te,fe)),qe},indent:function(te,fe){var oe=te.context,Ue=fe&&fe.charAt(0),we=oe.indent;return oe.type=="prop"&&(Ue=="}"||Ue==")")&&(oe=oe.prev),oe.prev&&(Ue=="}"&&(oe.type=="block"||oe.type=="top"||oe.type=="interpolation"||oe.type=="restricted_atBlock")?(oe=oe.prev,we=oe.indent):(Ue==")"&&(oe.type=="parens"||oe.type=="atBlock_parens")||Ue=="{"&&(oe.type=="at"||oe.type=="atBlock"))&&(we=Math.max(0,oe.indent-R))),we},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:pe,fold:"brace"}});function p(O){for(var D={},Q=0;Q{(function(o){typeof Ms=="object"&&typeof As=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("diff",function(){var p={"+":"positive","-":"negative","@":"meta"};return{token:function(v){var C=v.string.search(/[\t ]+?$/);if(!v.sol()||C===0)return v.skipToEnd(),("error "+(p[v.string.charAt(0)]||"")).replace(/ $/,"");var b=p[v.peek()]||v.skipToEnd();return C===-1?v.skipToEnd():v.pos=C,b}}}),o.defineMIME("text/x-diff","diff")})});var mn=Ke((qs,Fs)=>{(function(o){typeof qs=="object"&&typeof Fs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},v={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};o.defineMode("xml",function(C,b){var S=C.indentUnit,s={},h=b.htmlMode?p:v;for(var g in h)s[g]=h[g];for(var g in b)s[g]=b[g];var T,y;function c(x,K){function X(le){return K.tokenize=le,le(x,K)}var I=x.next();if(I=="<")return x.eat("!")?x.eat("[")?x.match("CDATA[")?X(z("atom","]]>")):null:x.match("--")?X(z("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),X(M(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),K.tokenize=z("meta","?>"),"meta"):(T=x.eat("/")?"closeTag":"openTag",K.tokenize=d,"tag bracket");if(I=="&"){var H;return x.eat("#")?x.eat("x")?H=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):H=x.eatWhile(/[\d]/)&&x.eat(";"):H=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),H?"atom":"error"}else return x.eatWhile(/[^&<]/),null}c.isInText=!0;function d(x,K){var X=x.next();if(X==">"||X=="/"&&x.eat(">"))return K.tokenize=c,T=X==">"?"endTag":"selfcloseTag","tag bracket";if(X=="=")return T="equals",null;if(X=="<"){K.tokenize=c,K.state=G,K.tagName=K.tagStart=null;var I=K.tokenize(x,K);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(X)?(K.tokenize=k(X),K.stringStartCol=x.column(),K.tokenize(x,K)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function k(x){var K=function(X,I){for(;!X.eol();)if(X.next()==x){I.tokenize=d;break}return"string"};return K.isInAttribute=!0,K}function z(x,K){return function(X,I){for(;!X.eol();){if(X.match(K)){I.tokenize=c;break}X.next()}return x}}function M(x){return function(K,X){for(var I;(I=K.next())!=null;){if(I=="<")return X.tokenize=M(x+1),X.tokenize(K,X);if(I==">")if(x==1){X.tokenize=c;break}else return X.tokenize=M(x-1),X.tokenize(K,X)}return"meta"}}function w(x){return x&&x.toLowerCase()}function W(x,K,X){this.prev=x.context,this.tagName=K||"",this.indent=x.indented,this.startOfLine=X,(s.doNotIndent.hasOwnProperty(K)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function E(x){x.context&&(x.context=x.context.prev)}function N(x,K){for(var X;;){if(!x.context||(X=x.context.tagName,!s.contextGrabbers.hasOwnProperty(w(X))||!s.contextGrabbers[w(X)].hasOwnProperty(w(K))))return;E(x)}}function G(x,K,X){return x=="openTag"?(X.tagStart=K.column(),J):x=="closeTag"?re:G}function J(x,K,X){return x=="word"?(X.tagName=K.current(),y="tag",D):s.allowMissingTagName&&x=="endTag"?(y="tag bracket",D(x,K,X)):(y="error",J)}function re(x,K,X){if(x=="word"){var I=K.current();return X.context&&X.context.tagName!=I&&s.implicitlyClosed.hasOwnProperty(w(X.context.tagName))&&E(X),X.context&&X.context.tagName==I||s.matchClosing===!1?(y="tag",q):(y="tag error",O)}else return s.allowMissingTagName&&x=="endTag"?(y="tag bracket",q(x,K,X)):(y="error",O)}function q(x,K,X){return x!="endTag"?(y="error",q):(E(X),G)}function O(x,K,X){return y="error",q(x,K,X)}function D(x,K,X){if(x=="word")return y="attribute",Q;if(x=="endTag"||x=="selfcloseTag"){var I=X.tagName,H=X.tagStart;return X.tagName=X.tagStart=null,x=="selfcloseTag"||s.autoSelfClosers.hasOwnProperty(w(I))?N(X,I):(N(X,I),X.context=new W(X,I,H==X.indented)),G}return y="error",D}function Q(x,K,X){return x=="equals"?R:(s.allowMissing||(y="error"),D(x,K,X))}function R(x,K,X){return x=="string"?V:x=="word"&&s.allowUnquoted?(y="string",D):(y="error",D(x,K,X))}function V(x,K,X){return x=="string"?V:D(x,K,X)}return{startState:function(x){var K={tokenize:c,state:G,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(K.baseIndent=x),K},token:function(x,K){if(!K.tagName&&x.sol()&&(K.indented=x.indentation()),x.eatSpace())return null;T=null;var X=K.tokenize(x,K);return(X||T)&&X!="comment"&&(y=null,K.state=K.state(T||X,x,K),y&&(X=y=="error"?X+" error":y)),X},indent:function(x,K,X){var I=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+S;if(I&&I.noIndent)return o.Pass;if(x.tokenize!=d&&x.tokenize!=c)return X?X.match(/^(\s*)/)[0].length:0;if(x.tagName)return s.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+S*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/$/,blockCommentStart:"",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(x){x.state==R&&(x.state=D)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var K=[],X=x.context;X;X=X.prev)K.push(X.tagName);return K.reverse()}}}),o.defineMIME("text/xml","xml"),o.defineMIME("application/xml","xml"),o.mimeModes.hasOwnProperty("text/html")||o.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var vn=Ke((Is,Ns)=>{(function(o){typeof Is=="object"&&typeof Ns=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("javascript",function(p,v){var C=p.indentUnit,b=v.statementIndent,S=v.jsonld,s=v.json||S,h=v.trackScope!==!1,g=v.typescript,T=v.wordCharacters||/[\w$\xa1-\uffff]/,y=function(){function _(pt){return{type:pt,style:"keyword"}}var P=_("keyword a"),ae=_("keyword b"),he=_("keyword c"),ne=_("keyword d"),ye=_("operator"),Xe={type:"atom",style:"atom"};return{if:_("if"),while:P,with:P,else:ae,do:ae,try:ae,finally:ae,return:ne,break:ne,continue:ne,new:_("new"),delete:he,void:he,throw:he,debugger:_("debugger"),var:_("var"),const:_("var"),let:_("var"),function:_("function"),catch:_("catch"),for:_("for"),switch:_("switch"),case:_("case"),default:_("default"),in:ye,typeof:ye,instanceof:ye,true:Xe,false:Xe,null:Xe,undefined:Xe,NaN:Xe,Infinity:Xe,this:_("this"),class:_("class"),super:_("atom"),yield:he,export:_("export"),import:_("import"),extends:he,await:he}}(),c=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function k(_){for(var P=!1,ae,he=!1;(ae=_.next())!=null;){if(!P){if(ae=="/"&&!he)return;ae=="["?he=!0:he&&ae=="]"&&(he=!1)}P=!P&&ae=="\\"}}var z,M;function w(_,P,ae){return z=_,M=ae,P}function W(_,P){var ae=_.next();if(ae=='"'||ae=="'")return P.tokenize=E(ae),P.tokenize(_,P);if(ae=="."&&_.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if(ae=="."&&_.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ae))return w(ae);if(ae=="="&&_.eat(">"))return w("=>","operator");if(ae=="0"&&_.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(ae))return _.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if(ae=="/")return _.eat("*")?(P.tokenize=N,N(_,P)):_.eat("/")?(_.skipToEnd(),w("comment","comment")):jt(_,P,1)?(k(_),_.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(_.eat("="),w("operator","operator",_.current()));if(ae=="`")return P.tokenize=G,G(_,P);if(ae=="#"&&_.peek()=="!")return _.skipToEnd(),w("meta","meta");if(ae=="#"&&_.eatWhile(T))return w("variable","property");if(ae=="<"&&_.match("!--")||ae=="-"&&_.match("->")&&!/\S/.test(_.string.slice(0,_.start)))return _.skipToEnd(),w("comment","comment");if(c.test(ae))return(ae!=">"||!P.lexical||P.lexical.type!=">")&&(_.eat("=")?(ae=="!"||ae=="=")&&_.eat("="):/[<>*+\-|&?]/.test(ae)&&(_.eat(ae),ae==">"&&_.eat(ae))),ae=="?"&&_.eat(".")?w("."):w("operator","operator",_.current());if(T.test(ae)){_.eatWhile(T);var he=_.current();if(P.lastType!="."){if(y.propertyIsEnumerable(he)){var ne=y[he];return w(ne.type,ne.style,he)}if(he=="async"&&_.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",he)}return w("variable","variable",he)}}function E(_){return function(P,ae){var he=!1,ne;if(S&&P.peek()=="@"&&P.match(d))return ae.tokenize=W,w("jsonld-keyword","meta");for(;(ne=P.next())!=null&&!(ne==_&&!he);)he=!he&&ne=="\\";return he||(ae.tokenize=W),w("string","string")}}function N(_,P){for(var ae=!1,he;he=_.next();){if(he=="/"&&ae){P.tokenize=W;break}ae=he=="*"}return w("comment","comment")}function G(_,P){for(var ae=!1,he;(he=_.next())!=null;){if(!ae&&(he=="`"||he=="$"&&_.eat("{"))){P.tokenize=W;break}ae=!ae&&he=="\\"}return w("quasi","string-2",_.current())}var J="([{}])";function re(_,P){P.fatArrowAt&&(P.fatArrowAt=null);var ae=_.string.indexOf("=>",_.start);if(!(ae<0)){if(g){var he=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(_.string.slice(_.start,ae));he&&(ae=he.index)}for(var ne=0,ye=!1,Xe=ae-1;Xe>=0;--Xe){var pt=_.string.charAt(Xe),Et=J.indexOf(pt);if(Et>=0&&Et<3){if(!ne){++Xe;break}if(--ne==0){pt=="("&&(ye=!0);break}}else if(Et>=3&&Et<6)++ne;else if(T.test(pt))ye=!0;else if(/["'\/`]/.test(pt))for(;;--Xe){if(Xe==0)return;var Zr=_.string.charAt(Xe-1);if(Zr==pt&&_.string.charAt(Xe-2)!="\\"){Xe--;break}}else if(ye&&!ne){++Xe;break}}ye&&!ne&&(P.fatArrowAt=Xe)}}var q={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function O(_,P,ae,he,ne,ye){this.indented=_,this.column=P,this.type=ae,this.prev=ne,this.info=ye,he!=null&&(this.align=he)}function D(_,P){if(!h)return!1;for(var ae=_.localVars;ae;ae=ae.next)if(ae.name==P)return!0;for(var he=_.context;he;he=he.prev)for(var ae=he.vars;ae;ae=ae.next)if(ae.name==P)return!0}function Q(_,P,ae,he,ne){var ye=_.cc;for(R.state=_,R.stream=ne,R.marked=null,R.cc=ye,R.style=P,_.lexical.hasOwnProperty("align")||(_.lexical.align=!0);;){var Xe=ye.length?ye.pop():s?Se:Oe;if(Xe(ae,he)){for(;ye.length&&ye[ye.length-1].lex;)ye.pop()();return R.marked?R.marked:ae=="variable"&&D(_,he)?"variable-2":P}}}var R={state:null,column:null,marked:null,cc:null};function V(){for(var _=arguments.length-1;_>=0;_--)R.cc.push(arguments[_])}function x(){return V.apply(null,arguments),!0}function K(_,P){for(var ae=P;ae;ae=ae.next)if(ae.name==_)return!0;return!1}function X(_){var P=R.state;if(R.marked="def",!!h){if(P.context){if(P.lexical.info=="var"&&P.context&&P.context.block){var ae=I(_,P.context);if(ae!=null){P.context=ae;return}}else if(!K(_,P.localVars)){P.localVars=new xe(_,P.localVars);return}}v.globalVars&&!K(_,P.globalVars)&&(P.globalVars=new xe(_,P.globalVars))}}function I(_,P){if(P)if(P.block){var ae=I(_,P.prev);return ae?ae==P.prev?P:new le(ae,P.vars,!0):null}else return K(_,P.vars)?P:new le(P.prev,new xe(_,P.vars),!1);else return null}function H(_){return _=="public"||_=="private"||_=="protected"||_=="abstract"||_=="readonly"}function le(_,P,ae){this.prev=_,this.vars=P,this.block=ae}function xe(_,P){this.name=_,this.next=P}var F=new xe("this",new xe("arguments",null));function L(){R.state.context=new le(R.state.context,R.state.localVars,!1),R.state.localVars=F}function de(){R.state.context=new le(R.state.context,R.state.localVars,!0),R.state.localVars=null}L.lex=de.lex=!0;function ze(){R.state.localVars=R.state.context.vars,R.state.context=R.state.context.prev}ze.lex=!0;function pe(_,P){var ae=function(){var he=R.state,ne=he.indented;if(he.lexical.type=="stat")ne=he.lexical.indented;else for(var ye=he.lexical;ye&&ye.type==")"&&ye.align;ye=ye.prev)ne=ye.indented;he.lexical=new O(ne,R.stream.column(),_,null,he.lexical,P)};return ae.lex=!0,ae}function Ee(){var _=R.state;_.lexical.prev&&(_.lexical.type==")"&&(_.indented=_.lexical.indented),_.lexical=_.lexical.prev)}Ee.lex=!0;function ge(_){function P(ae){return ae==_?x():_==";"||ae=="}"||ae==")"||ae=="]"?V():x(P)}return P}function Oe(_,P){return _=="var"?x(pe("vardef",P),Hr,ge(";"),Ee):_=="keyword a"?x(pe("form"),Ze,Oe,Ee):_=="keyword b"?x(pe("form"),Oe,Ee):_=="keyword d"?R.stream.match(/^\s*$/,!1)?x():x(pe("stat"),Je,ge(";"),Ee):_=="debugger"?x(ge(";")):_=="{"?x(pe("}"),de,De,Ee,ze):_==";"?x():_=="if"?(R.state.lexical.info=="else"&&R.state.cc[R.state.cc.length-1]==Ee&&R.state.cc.pop()(),x(pe("form"),Ze,Oe,Ee,Br)):_=="function"?x(Bt):_=="for"?x(pe("form"),de,ei,Oe,ze,Ee):_=="class"||g&&P=="interface"?(R.marked="keyword",x(pe("form",_=="class"?_:P),Wr,Ee)):_=="variable"?g&&P=="declare"?(R.marked="keyword",x(Oe)):g&&(P=="module"||P=="enum"||P=="type")&&R.stream.match(/^\s*\w/,!1)?(R.marked="keyword",P=="enum"?x(Ae):P=="type"?x(ti,ge("operator"),Pe,ge(";")):x(pe("form"),Ct,ge("{"),pe("}"),De,Ee,Ee)):g&&P=="namespace"?(R.marked="keyword",x(pe("form"),Se,Oe,Ee)):g&&P=="abstract"?(R.marked="keyword",x(Oe)):x(pe("stat"),Ue):_=="switch"?x(pe("form"),Ze,ge("{"),pe("}","switch"),de,De,Ee,Ee,ze):_=="case"?x(Se,ge(":")):_=="default"?x(ge(":")):_=="catch"?x(pe("form"),L,qe,Oe,Ee,ze):_=="export"?x(pe("stat"),Ur,Ee):_=="import"?x(pe("stat"),gr,Ee):_=="async"?x(Oe):P=="@"?x(Se,Oe):V(pe("stat"),Se,ge(";"),Ee)}function qe(_){if(_=="(")return x($t,ge(")"))}function Se(_,P){return ke(_,P,!1)}function je(_,P){return ke(_,P,!0)}function Ze(_){return _!="("?V():x(pe(")"),Je,ge(")"),Ee)}function ke(_,P,ae){if(R.state.fatArrowAt==R.stream.start){var he=ae?Be:ce;if(_=="(")return x(L,pe(")"),B($t,")"),Ee,ge("=>"),he,ze);if(_=="variable")return V(L,Ct,ge("=>"),he,ze)}var ne=ae?Ge:He;return q.hasOwnProperty(_)?x(ne):_=="function"?x(Bt,ne):_=="class"||g&&P=="interface"?(R.marked="keyword",x(pe("form"),to,Ee)):_=="keyword c"||_=="async"?x(ae?je:Se):_=="("?x(pe(")"),Je,ge(")"),Ee,ne):_=="operator"||_=="spread"?x(ae?je:Se):_=="["?x(pe("]"),at,Ee,ne):_=="{"?se(Me,"}",null,ne):_=="quasi"?V(U,ne):_=="new"?x(te(ae)):x()}function Je(_){return _.match(/[;\}\)\],]/)?V():V(Se)}function He(_,P){return _==","?x(Je):Ge(_,P,!1)}function Ge(_,P,ae){var he=ae==!1?He:Ge,ne=ae==!1?Se:je;if(_=="=>")return x(L,ae?Be:ce,ze);if(_=="operator")return/\+\+|--/.test(P)||g&&P=="!"?x(he):g&&P=="<"&&R.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?x(pe(">"),B(Pe,">"),Ee,he):P=="?"?x(Se,ge(":"),ne):x(ne);if(_=="quasi")return V(U,he);if(_!=";"){if(_=="(")return se(je,")","call",he);if(_==".")return x(we,he);if(_=="[")return x(pe("]"),Je,ge("]"),Ee,he);if(g&&P=="as")return R.marked="keyword",x(Pe,he);if(_=="regexp")return R.state.lastType=R.marked="operator",R.stream.backUp(R.stream.pos-R.stream.start-1),x(ne)}}function U(_,P){return _!="quasi"?V():P.slice(P.length-2)!="${"?x(U):x(Je,Z)}function Z(_){if(_=="}")return R.marked="string-2",R.state.tokenize=G,x(U)}function ce(_){return re(R.stream,R.state),V(_=="{"?Oe:Se)}function Be(_){return re(R.stream,R.state),V(_=="{"?Oe:je)}function te(_){return function(P){return P=="."?x(_?oe:fe):P=="variable"&&g?x(It,_?Ge:He):V(_?je:Se)}}function fe(_,P){if(P=="target")return R.marked="keyword",x(He)}function oe(_,P){if(P=="target")return R.marked="keyword",x(Ge)}function Ue(_){return _==":"?x(Ee,Oe):V(He,ge(";"),Ee)}function we(_){if(_=="variable")return R.marked="property",x()}function Me(_,P){if(_=="async")return R.marked="property",x(Me);if(_=="variable"||R.style=="keyword"){if(R.marked="property",P=="get"||P=="set")return x(Le);var ae;return g&&R.state.fatArrowAt==R.stream.start&&(ae=R.stream.match(/^\s*:\s*/,!1))&&(R.state.fatArrowAt=R.stream.pos+ae[0].length),x($)}else{if(_=="number"||_=="string")return R.marked=S?"property":R.style+" property",x($);if(_=="jsonld-keyword")return x($);if(g&&H(P))return R.marked="keyword",x(Me);if(_=="[")return x(Se,nt,ge("]"),$);if(_=="spread")return x(je,$);if(P=="*")return R.marked="keyword",x(Me);if(_==":")return V($)}}function Le(_){return _!="variable"?V($):(R.marked="property",x(Bt))}function $(_){if(_==":")return x(je);if(_=="(")return V(Bt)}function B(_,P,ae){function he(ne,ye){if(ae?ae.indexOf(ne)>-1:ne==","){var Xe=R.state.lexical;return Xe.info=="call"&&(Xe.pos=(Xe.pos||0)+1),x(function(pt,Et){return pt==P||Et==P?V():V(_)},he)}return ne==P||ye==P?x():ae&&ae.indexOf(";")>-1?V(_):x(ge(P))}return function(ne,ye){return ne==P||ye==P?x():V(_,he)}}function se(_,P,ae){for(var he=3;he"),Pe);if(_=="quasi")return V(_t,Ht)}function xt(_){if(_=="=>")return x(Pe)}function Ie(_){return _.match(/[\}\)\]]/)?x():_==","||_==";"?x(Ie):V(nr,Ie)}function nr(_,P){if(_=="variable"||R.style=="keyword")return R.marked="property",x(nr);if(P=="?"||_=="number"||_=="string")return x(nr);if(_==":")return x(Pe);if(_=="[")return x(ge("variable"),dt,ge("]"),nr);if(_=="(")return V(hr,nr);if(!_.match(/[;\}\)\],]/))return x()}function _t(_,P){return _!="quasi"?V():P.slice(P.length-2)!="${"?x(_t):x(Pe,it)}function it(_){if(_=="}")return R.marked="string-2",R.state.tokenize=G,x(_t)}function ot(_,P){return _=="variable"&&R.stream.match(/^\s*[?:]/,!1)||P=="?"?x(ot):_==":"?x(Pe):_=="spread"?x(ot):V(Pe)}function Ht(_,P){if(P=="<")return x(pe(">"),B(Pe,">"),Ee,Ht);if(P=="|"||_=="."||P=="&")return x(Pe);if(_=="[")return x(Pe,ge("]"),Ht);if(P=="extends"||P=="implements")return R.marked="keyword",x(Pe);if(P=="?")return x(Pe,ge(":"),Pe)}function It(_,P){if(P=="<")return x(pe(">"),B(Pe,">"),Ee,Ht)}function Wt(){return V(Pe,kt)}function kt(_,P){if(P=="=")return x(Pe)}function Hr(_,P){return P=="enum"?(R.marked="keyword",x(Ae)):V(Ct,nt,Ut,eo)}function Ct(_,P){if(g&&H(P))return R.marked="keyword",x(Ct);if(_=="variable")return X(P),x();if(_=="spread")return x(Ct);if(_=="[")return se(yn,"]");if(_=="{")return se(dr,"}")}function dr(_,P){return _=="variable"&&!R.stream.match(/^\s*:/,!1)?(X(P),x(Ut)):(_=="variable"&&(R.marked="property"),_=="spread"?x(Ct):_=="}"?V():_=="["?x(Se,ge("]"),ge(":"),dr):x(ge(":"),Ct,Ut))}function yn(){return V(Ct,Ut)}function Ut(_,P){if(P=="=")return x(je)}function eo(_){if(_==",")return x(Hr)}function Br(_,P){if(_=="keyword b"&&P=="else")return x(pe("form","else"),Oe,Ee)}function ei(_,P){if(P=="await")return x(ei);if(_=="(")return x(pe(")"),xn,Ee)}function xn(_){return _=="var"?x(Hr,pr):_=="variable"?x(pr):V(pr)}function pr(_,P){return _==")"?x():_==";"?x(pr):P=="in"||P=="of"?(R.marked="keyword",x(Se,pr)):V(Se,pr)}function Bt(_,P){if(P=="*")return R.marked="keyword",x(Bt);if(_=="variable")return X(P),x(Bt);if(_=="(")return x(L,pe(")"),B($t,")"),Ee,Pt,Oe,ze);if(g&&P=="<")return x(pe(">"),B(Wt,">"),Ee,Bt)}function hr(_,P){if(P=="*")return R.marked="keyword",x(hr);if(_=="variable")return X(P),x(hr);if(_=="(")return x(L,pe(")"),B($t,")"),Ee,Pt,ze);if(g&&P=="<")return x(pe(">"),B(Wt,">"),Ee,hr)}function ti(_,P){if(_=="keyword"||_=="variable")return R.marked="type",x(ti);if(P=="<")return x(pe(">"),B(Wt,">"),Ee)}function $t(_,P){return P=="@"&&x(Se,$t),_=="spread"?x($t):g&&H(P)?(R.marked="keyword",x($t)):g&&_=="this"?x(nt,Ut):V(Ct,nt,Ut)}function to(_,P){return _=="variable"?Wr(_,P):Kt(_,P)}function Wr(_,P){if(_=="variable")return X(P),x(Kt)}function Kt(_,P){if(P=="<")return x(pe(">"),B(Wt,">"),Ee,Kt);if(P=="extends"||P=="implements"||g&&_==",")return P=="implements"&&(R.marked="keyword"),x(g?Pe:Se,Kt);if(_=="{")return x(pe("}"),Gt,Ee)}function Gt(_,P){if(_=="async"||_=="variable"&&(P=="static"||P=="get"||P=="set"||g&&H(P))&&R.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return R.marked="keyword",x(Gt);if(_=="variable"||R.style=="keyword")return R.marked="property",x(Cr,Gt);if(_=="number"||_=="string")return x(Cr,Gt);if(_=="[")return x(Se,nt,ge("]"),Cr,Gt);if(P=="*")return R.marked="keyword",x(Gt);if(g&&_=="(")return V(hr,Gt);if(_==";"||_==",")return x(Gt);if(_=="}")return x();if(P=="@")return x(Se,Gt)}function Cr(_,P){if(P=="!"||P=="?")return x(Cr);if(_==":")return x(Pe,Ut);if(P=="=")return x(je);var ae=R.state.lexical.prev,he=ae&&ae.info=="interface";return V(he?hr:Bt)}function Ur(_,P){return P=="*"?(R.marked="keyword",x(Gr,ge(";"))):P=="default"?(R.marked="keyword",x(Se,ge(";"))):_=="{"?x(B($r,"}"),Gr,ge(";")):V(Oe)}function $r(_,P){if(P=="as")return R.marked="keyword",x(ge("variable"));if(_=="variable")return V(je,$r)}function gr(_){return _=="string"?x():_=="("?V(Se):_=="."?V(He):V(Kr,Vt,Gr)}function Kr(_,P){return _=="{"?se(Kr,"}"):(_=="variable"&&X(P),P=="*"&&(R.marked="keyword"),x(_n))}function Vt(_){if(_==",")return x(Kr,Vt)}function _n(_,P){if(P=="as")return R.marked="keyword",x(Kr)}function Gr(_,P){if(P=="from")return R.marked="keyword",x(Se)}function at(_){return _=="]"?x():V(B(je,"]"))}function Ae(){return V(pe("form"),Ct,ge("{"),pe("}"),B(ir,"}"),Ee,Ee)}function ir(){return V(Ct,Ut)}function kn(_,P){return _.lastType=="operator"||_.lastType==","||c.test(P.charAt(0))||/[,.]/.test(P.charAt(0))}function jt(_,P,ae){return P.tokenize==W&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(P.lastType)||P.lastType=="quasi"&&/\{\s*$/.test(_.string.slice(0,_.pos-(ae||0)))}return{startState:function(_){var P={tokenize:W,lastType:"sof",cc:[],lexical:new O((_||0)-C,0,"block",!1),localVars:v.localVars,context:v.localVars&&new le(null,null,!1),indented:_||0};return v.globalVars&&typeof v.globalVars=="object"&&(P.globalVars=v.globalVars),P},token:function(_,P){if(_.sol()&&(P.lexical.hasOwnProperty("align")||(P.lexical.align=!1),P.indented=_.indentation(),re(_,P)),P.tokenize!=N&&_.eatSpace())return null;var ae=P.tokenize(_,P);return z=="comment"?ae:(P.lastType=z=="operator"&&(M=="++"||M=="--")?"incdec":z,Q(P,ae,z,M,_))},indent:function(_,P){if(_.tokenize==N||_.tokenize==G)return o.Pass;if(_.tokenize!=W)return 0;var ae=P&&P.charAt(0),he=_.lexical,ne;if(!/^\s*else\b/.test(P))for(var ye=_.cc.length-1;ye>=0;--ye){var Xe=_.cc[ye];if(Xe==Ee)he=he.prev;else if(Xe!=Br&&Xe!=ze)break}for(;(he.type=="stat"||he.type=="form")&&(ae=="}"||(ne=_.cc[_.cc.length-1])&&(ne==He||ne==Ge)&&!/^[,\.=+\-*:?[\(]/.test(P));)he=he.prev;b&&he.type==")"&&he.prev.type=="stat"&&(he=he.prev);var pt=he.type,Et=ae==pt;return pt=="vardef"?he.indented+(_.lastType=="operator"||_.lastType==","?he.info.length+1:0):pt=="form"&&ae=="{"?he.indented:pt=="form"?he.indented+C:pt=="stat"?he.indented+(kn(_,P)?b||C:0):he.info=="switch"&&!Et&&v.doubleIndentSwitch!=!1?he.indented+(/^(?:case|default)\b/.test(P)?C:2*C):he.align?he.column+(Et?0:1):he.indented+(Et?0:C)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:S,jsonMode:s,expressionAllowed:jt,skipExpression:function(_){Q(_,"atom","atom","true",new o.StringStream("",2,null))}}}),o.registerHelper("wordChars","javascript",/[\w$]/),o.defineMIME("text/javascript","javascript"),o.defineMIME("text/ecmascript","javascript"),o.defineMIME("application/javascript","javascript"),o.defineMIME("application/x-javascript","javascript"),o.defineMIME("application/ecmascript","javascript"),o.defineMIME("application/json",{name:"javascript",json:!0}),o.defineMIME("application/x-json",{name:"javascript",json:!0}),o.defineMIME("application/manifest+json",{name:"javascript",json:!0}),o.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),o.defineMIME("text/typescript",{name:"javascript",typescript:!0}),o.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Qn=Ke((Os,Ps)=>{(function(o){typeof Os=="object"&&typeof Ps=="object"?o(We(),mn(),vn(),gn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],o):o(CodeMirror)})(function(o){"use strict";var p={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function v(T,y,c){var d=T.current(),k=d.search(y);return k>-1?T.backUp(d.length-k):d.match(/<\/?$/)&&(T.backUp(d.length),T.match(y,!1)||T.match(d)),c}var C={};function b(T){var y=C[T];return y||(C[T]=new RegExp("\\s+"+T+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function S(T,y){var c=T.match(b(y));return c?/^\s*(.*?)\s*$/.exec(c[2])[1]:""}function s(T,y){return new RegExp((y?"^":"")+"","i")}function h(T,y){for(var c in T)for(var d=y[c]||(y[c]=[]),k=T[c],z=k.length-1;z>=0;z--)d.unshift(k[z])}function g(T,y){for(var c=0;c=0;M--)d.script.unshift(["type",z[M].matches,z[M].mode]);function w(W,E){var N=c.token(W,E.htmlState),G=/\btag\b/.test(N),J;if(G&&!/[<>\s\/]/.test(W.current())&&(J=E.htmlState.tagName&&E.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(J))E.inTag=J+" ";else if(E.inTag&&G&&/>$/.test(W.current())){var re=/^([\S]+) (.*)/.exec(E.inTag);E.inTag=null;var q=W.current()==">"&&g(d[re[1]],re[2]),O=o.getMode(T,q),D=s(re[1],!0),Q=s(re[1],!1);E.token=function(R,V){return R.match(D,!1)?(V.token=w,V.localState=V.localMode=null,null):v(R,Q,V.localMode.token(R,V.localState))},E.localMode=O,E.localState=o.startState(O,c.indent(E.htmlState,"",""))}else E.inTag&&(E.inTag+=W.current(),W.eol()&&(E.inTag+=" "));return N}return{startState:function(){var W=o.startState(c);return{token:w,inTag:null,localMode:null,localState:null,htmlState:W}},copyState:function(W){var E;return W.localState&&(E=o.copyState(W.localMode,W.localState)),{token:W.token,inTag:W.inTag,localMode:W.localMode,localState:E,htmlState:o.copyState(c,W.htmlState)}},token:function(W,E){return E.token(W,E)},indent:function(W,E,N){return!W.localMode||/^\s*<\//.test(E)?c.indent(W.htmlState,E,N):W.localMode.indent?W.localMode.indent(W.localState,E,N):o.Pass},innerMode:function(W){return{state:W.localState||W.htmlState,mode:W.localMode||c}}}},"xml","javascript","css"),o.defineMIME("text/html","htmlmixed")})});var Hs=Ke((js,Rs)=>{(function(o){typeof js=="object"&&typeof Rs=="object"?o(We(),Qn(),Yn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("django:inner",function(){var p=["block","endblock","for","endfor","true","false","filter","endfilter","loop","none","self","super","if","elif","endif","as","else","import","with","endwith","without","context","ifequal","endifequal","ifnotequal","endifnotequal","extends","include","load","comment","endcomment","empty","url","static","trans","blocktrans","endblocktrans","now","regroup","lorem","ifchanged","endifchanged","firstof","debug","cycle","csrf_token","autoescape","endautoescape","spaceless","endspaceless","ssi","templatetag","verbatim","endverbatim","widthratio"],v=["add","addslashes","capfirst","center","cut","date","default","default_if_none","dictsort","dictsortreversed","divisibleby","escape","escapejs","filesizeformat","first","floatformat","force_escape","get_digit","iriencode","join","last","length","length_is","linebreaks","linebreaksbr","linenumbers","ljust","lower","make_list","phone2numeric","pluralize","pprint","random","removetags","rjust","safe","safeseq","slice","slugify","stringformat","striptags","time","timesince","timeuntil","title","truncatechars","truncatechars_html","truncatewords","truncatewords_html","unordered_list","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap","yesno"],C=["==","!=","<",">","<=",">="],b=["in","not","or","and"];p=new RegExp("^\\b("+p.join("|")+")\\b"),v=new RegExp("^\\b("+v.join("|")+")\\b"),C=new RegExp("^\\b("+C.join("|")+")\\b"),b=new RegExp("^\\b("+b.join("|")+")\\b");function S(c,d){if(c.match("{{"))return d.tokenize=h,"tag";if(c.match("{%"))return d.tokenize=g,"tag";if(c.match("{#"))return d.tokenize=T,"comment";for(;c.next()!=null&&!c.match(/\{[{%#]/,!1););return null}function s(c,d){return function(k,z){if(!z.escapeNext&&k.eat(c))z.tokenize=d;else{z.escapeNext&&(z.escapeNext=!1);var M=k.next();M=="\\"&&(z.escapeNext=!0)}return"string"}}function h(c,d){if(d.waitDot){if(d.waitDot=!1,c.peek()!=".")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("."))return d.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(d.waitPipe){if(d.waitPipe=!1,c.peek()!="|")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("|"))return d.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}return d.waitProperty&&(d.waitProperty=!1,c.match(/\b(\w+)\b/))?(d.waitDot=!0,d.waitPipe=!0,"property"):d.waitFilter&&(d.waitFilter=!1,c.match(v))?"variable-2":c.eatSpace()?(d.waitProperty=!1,"null"):c.match(/\b\d+(\.\d+)?\b/)?"number":c.match("'")?(d.tokenize=s("'",d.tokenize),"string"):c.match('"')?(d.tokenize=s('"',d.tokenize),"string"):c.match(/\b(\w+)\b/)&&!d.foundVariable?(d.waitDot=!0,d.waitPipe=!0,"variable"):c.match("}}")?(d.waitProperty=null,d.waitFilter=null,d.waitDot=null,d.waitPipe=null,d.tokenize=S,"tag"):(c.next(),"null")}function g(c,d){if(d.waitDot){if(d.waitDot=!1,c.peek()!=".")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("."))return d.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(d.waitPipe){if(d.waitPipe=!1,c.peek()!="|")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("|"))return d.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}if(d.waitProperty&&(d.waitProperty=!1,c.match(/\b(\w+)\b/)))return d.waitDot=!0,d.waitPipe=!0,"property";if(d.waitFilter&&(d.waitFilter=!1,c.match(v)))return"variable-2";if(c.eatSpace())return d.waitProperty=!1,"null";if(c.match(/\b\d+(\.\d+)?\b/))return"number";if(c.match("'"))return d.tokenize=s("'",d.tokenize),"string";if(c.match('"'))return d.tokenize=s('"',d.tokenize),"string";if(c.match(C))return"operator";if(c.match(b))return"keyword";var k=c.match(p);return k?(k[0]=="comment"&&(d.blockCommentTag=!0),"keyword"):c.match(/\b(\w+)\b/)?(d.waitDot=!0,d.waitPipe=!0,"variable"):c.match("%}")?(d.waitProperty=null,d.waitFilter=null,d.waitDot=null,d.waitPipe=null,d.blockCommentTag?(d.blockCommentTag=!1,d.tokenize=y):d.tokenize=S,"tag"):(c.next(),"null")}function T(c,d){return c.match(/^.*?#\}/)?d.tokenize=S:c.skipToEnd(),"comment"}function y(c,d){return c.match(/\{%\s*endcomment\s*%\}/,!1)?(d.tokenize=g,c.match("{%"),"tag"):(c.next(),"comment")}return{startState:function(){return{tokenize:S}},token:function(c,d){return d.tokenize(c,d)},blockCommentStart:"{% comment %}",blockCommentEnd:"{% endcomment %}"}}),o.defineMode("django",function(p){var v=o.getMode(p,"text/html"),C=o.getMode(p,"django:inner");return o.overlayMode(v,C)}),o.defineMIME("text/x-django","django")})});var Di=Ke((Bs,Ws)=>{(function(o){typeof Bs=="object"&&typeof Ws=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode=function(y,c){o.defineMode(y,function(d){return o.simpleMode(d,c)})},o.simpleMode=function(y,c){p(c,"start");var d={},k=c.meta||{},z=!1;for(var M in c)if(M!=k&&c.hasOwnProperty(M))for(var w=d[M]=[],W=c[M],E=0;E2&&N.token&&typeof N.token!="string"){for(var re=2;re-1)return o.Pass;var M=d.indent.length-1,w=y[d.state];e:for(;;){for(var W=0;W{(function(o){typeof Us=="object"&&typeof $s=="object"?o(We(),Di()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],o):o(CodeMirror)})(function(o){"use strict";var p="from",v=new RegExp("^(\\s*)\\b("+p+")\\b","i"),C=["run","cmd","entrypoint","shell"],b=new RegExp("^(\\s*)("+C.join("|")+")(\\s+\\[)","i"),S="expose",s=new RegExp("^(\\s*)("+S+")(\\s+)","i"),h=["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"],g=[p,S].concat(C).concat(h),T="("+g.join("|")+")",y=new RegExp("^(\\s*)"+T+"(\\s*)(#.*)?$","i"),c=new RegExp("^(\\s*)"+T+"(\\s+)","i");o.defineSimpleMode("dockerfile",{start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:v,token:[null,"keyword"],sol:!0,next:"from"},{regex:y,token:[null,"keyword",null,"error"],sol:!0},{regex:b,token:[null,"keyword",null],sol:!0,next:"array"},{regex:s,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:c,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],meta:{lineComment:"#"}}),o.defineMIME("text/x-dockerfile","dockerfile")})});var Xs=Ke((Gs,Zs)=>{(function(o){typeof Gs=="object"&&typeof Zs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var p=0;p-1&&C.substring(s+1,C.length);if(h)return o.findModeByExtension(h)},o.findModeByName=function(C){C=C.toLowerCase();for(var b=0;b{(function(o){typeof Ys=="object"&&typeof Qs=="object"?o(We(),mn(),Xs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("markdown",function(p,v){var C=o.getMode(p,"text/html"),b=C.name=="null";function S(F){if(o.findModeByName){var L=o.findModeByName(F);L&&(F=L.mime||L.mimes[0])}var de=o.getMode(p,F);return de.name=="null"?null:de}v.highlightFormatting===void 0&&(v.highlightFormatting=!1),v.maxBlockquoteDepth===void 0&&(v.maxBlockquoteDepth=0),v.taskLists===void 0&&(v.taskLists=!1),v.strikethrough===void 0&&(v.strikethrough=!1),v.emoji===void 0&&(v.emoji=!1),v.fencedCodeBlockHighlighting===void 0&&(v.fencedCodeBlockHighlighting=!0),v.fencedCodeBlockDefaultMode===void 0&&(v.fencedCodeBlockDefaultMode="text/plain"),v.xml===void 0&&(v.xml=!0),v.tokenTypeOverrides===void 0&&(v.tokenTypeOverrides={});var s={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var h in s)s.hasOwnProperty(h)&&v.tokenTypeOverrides[h]&&(s[h]=v.tokenTypeOverrides[h]);var g=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,c=v.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,k=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,M=/^\s*\[[^\]]+?\]:.*$/,w=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,W=" ";function E(F,L,de){return L.f=L.inline=de,de(F,L)}function N(F,L,de){return L.f=L.block=de,de(F,L)}function G(F){return!F||!/\S/.test(F.string)}function J(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==q){var L=b;if(!L){var de=o.innerMode(C,F.htmlState);L=de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText}L&&(F.f=R,F.block=re,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function re(F,L){var de=F.column()===L.indentation,ze=G(L.prevLine.stream),pe=L.indentedCode,Ee=L.prevLine.hr,ge=L.list!==!1,Oe=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var qe=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,ge)){for(L.list=null;qe=4&&(pe||L.prevLine.fencedCodeEnd||L.prevLine.header||ze))return F.skipToEnd(),L.indentedCode=!0,s.code;if(F.eatSpace())return null;if(de&&L.indentation<=Oe&&(Ze=F.match(c))&&Ze[1].length<=6)return L.quote=0,L.header=Ze[1].length,L.thisLine.header=!0,v.highlightFormatting&&(L.formatting="header"),L.f=L.inline,D(L);if(L.indentation<=Oe&&F.eat(">"))return L.quote=de?1:L.quote+1,v.highlightFormatting&&(L.formatting="quote"),F.eatSpace(),D(L);if(!je&&!L.setext&&de&&L.indentation<=Oe&&(Ze=F.match(T))){var ke=Ze[1]?"ol":"ul";return L.indentation=qe+F.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,v.taskLists&&F.match(y,!1)&&(L.taskList=!0),L.f=L.inline,v.highlightFormatting&&(L.formatting=["list","list-"+ke]),D(L)}else{if(de&&L.indentation<=Oe&&(Ze=F.match(z,!0)))return L.quote=0,L.fencedEndRE=new RegExp(Ze[1]+"+ *$"),L.localMode=v.fencedCodeBlockHighlighting&&S(Ze[2]||v.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=o.startState(L.localMode)),L.f=L.block=O,v.highlightFormatting&&(L.formatting="code-block"),L.code=-1,D(L);if(L.setext||(!Se||!ge)&&!L.quote&&L.list===!1&&!L.code&&!je&&!M.test(F.string)&&(Ze=F.lookAhead(1))&&(Ze=Ze.match(d)))return L.setext?(L.header=L.setext,L.setext=0,F.skipToEnd(),v.highlightFormatting&&(L.formatting="header")):(L.header=Ze[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,D(L);if(je)return F.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,s.hr;if(F.peek()==="[")return E(F,L,I)}return E(F,L,L.inline)}function q(F,L){var de=C.token(F,L.htmlState);if(!b){var ze=o.innerMode(C,L.htmlState);(ze.mode.name=="xml"&&ze.state.tagStart===null&&!ze.state.context&&ze.state.tokenize.isInText||L.md_inside&&F.current().indexOf(">")>-1)&&(L.f=R,L.block=re,L.htmlState=null)}return de}function O(F,L){var de=L.listStack[L.listStack.length-1]||0,ze=L.indentation=F.quote?L.push(s.formatting+"-"+F.formatting[de]+"-"+F.quote):L.push("error"))}if(F.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(F.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(F.linkHref?L.push(s.linkHref,"url"):(F.strong&&L.push(s.strong),F.em&&L.push(s.em),F.strikethrough&&L.push(s.strikethrough),F.emoji&&L.push(s.emoji),F.linkText&&L.push(s.linkText),F.code&&L.push(s.code),F.image&&L.push(s.image),F.imageAltText&&L.push(s.imageAltText,"link"),F.imageMarker&&L.push(s.imageMarker)),F.header&&L.push(s.header,s.header+"-"+F.header),F.quote&&(L.push(s.quote),!v.maxBlockquoteDepth||v.maxBlockquoteDepth>=F.quote?L.push(s.quote+"-"+F.quote):L.push(s.quote+"-"+v.maxBlockquoteDepth)),F.list!==!1){var ze=(F.listStack.length-1)%3;ze?ze===1?L.push(s.list2):L.push(s.list3):L.push(s.list1)}return F.trailingSpaceNewLine?L.push("trailing-space-new-line"):F.trailingSpace&&L.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function Q(F,L){if(F.match(k,!0))return D(L)}function R(F,L){var de=L.text(F,L);if(typeof de<"u")return de;if(L.list)return L.list=null,D(L);if(L.taskList){var ze=F.match(y,!0)[1]===" ";return ze?L.taskOpen=!0:L.taskClosed=!0,v.highlightFormatting&&(L.formatting="task"),L.taskList=!1,D(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&F.match(/^#+$/,!0))return v.highlightFormatting&&(L.formatting="header"),D(L);var pe=F.next();if(L.linkTitle){L.linkTitle=!1;var Ee=pe;pe==="("&&(Ee=")"),Ee=(Ee+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ge="^\\s*(?:[^"+Ee+"\\\\]+|\\\\\\\\|\\\\.)"+Ee;if(F.match(new RegExp(ge),!0))return s.linkHref}if(pe==="`"){var Oe=L.formatting;v.highlightFormatting&&(L.formatting="code"),F.eatWhile("`");var qe=F.current().length;if(L.code==0&&(!L.quote||qe==1))return L.code=qe,D(L);if(qe==L.code){var Se=D(L);return L.code=0,Se}else return L.formatting=Oe,D(L)}else if(L.code)return D(L);if(pe==="\\"&&(F.next(),v.highlightFormatting)){var je=D(L),Ze=s.formatting+"-escape";return je?je+" "+Ze:Ze}if(pe==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,v.highlightFormatting&&(L.formatting="image"),D(L);if(pe==="["&&L.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,v.highlightFormatting&&(L.formatting="image"),D(L);if(pe==="]"&&L.imageAltText){v.highlightFormatting&&(L.formatting="image");var je=D(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=x,je}if(pe==="["&&!L.image)return L.linkText&&F.match(/^.*?\]/)||(L.linkText=!0,v.highlightFormatting&&(L.formatting="link")),D(L);if(pe==="]"&&L.linkText){v.highlightFormatting&&(L.formatting="link");var je=D(L);return L.linkText=!1,L.inline=L.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?x:R,je}if(pe==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=V,v.highlightFormatting&&(L.formatting="link");var je=D(L);return je?je+=" ":je="",je+s.linkInline}if(pe==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=V,v.highlightFormatting&&(L.formatting="link");var je=D(L);return je?je+=" ":je="",je+s.linkEmail}if(v.xml&&pe==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ke=F.string.indexOf(">",F.pos);if(ke!=-1){var Je=F.string.substring(F.start,ke);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Je)&&(L.md_inside=!0)}return F.backUp(1),L.htmlState=o.startState(C),N(F,L,q)}if(v.xml&&pe==="<"&&F.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(pe==="*"||pe==="_"){for(var He=1,Ge=F.pos==1?" ":F.string.charAt(F.pos-2);He<3&&F.eat(pe);)He++;var U=F.peek()||" ",Z=!/\s/.test(U)&&(!w.test(U)||/\s/.test(Ge)||w.test(Ge)),ce=!/\s/.test(Ge)&&(!w.test(Ge)||/\s/.test(U)||w.test(U)),Be=null,te=null;if(He%2&&(!L.em&&Z&&(pe==="*"||!ce||w.test(Ge))?Be=!0:L.em==pe&&ce&&(pe==="*"||!Z||w.test(U))&&(Be=!1)),He>1&&(!L.strong&&Z&&(pe==="*"||!ce||w.test(Ge))?te=!0:L.strong==pe&&ce&&(pe==="*"||!Z||w.test(U))&&(te=!1)),te!=null||Be!=null){v.highlightFormatting&&(L.formatting=Be==null?"strong":te==null?"em":"strong em"),Be===!0&&(L.em=pe),te===!0&&(L.strong=pe);var Se=D(L);return Be===!1&&(L.em=!1),te===!1&&(L.strong=!1),Se}}else if(pe===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return D(L);F.backUp(1)}if(v.strikethrough){if(pe==="~"&&F.eatWhile(pe)){if(L.strikethrough){v.highlightFormatting&&(L.formatting="strikethrough");var Se=D(L);return L.strikethrough=!1,Se}else if(F.match(/^[^\s]/,!1))return L.strikethrough=!0,v.highlightFormatting&&(L.formatting="strikethrough"),D(L)}else if(pe===" "&&F.match("~~",!0)){if(F.peek()===" ")return D(L);F.backUp(2)}}if(v.emoji&&pe===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,v.highlightFormatting&&(L.formatting="emoji");var fe=D(L);return L.emoji=!1,fe}return pe===" "&&(F.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),D(L)}function V(F,L){var de=F.next();if(de===">"){L.f=L.inline=R,v.highlightFormatting&&(L.formatting="link");var ze=D(L);return ze?ze+=" ":ze="",ze+s.linkInline}return F.match(/^[^>]+/,!0),s.linkInline}function x(F,L){if(F.eatSpace())return null;var de=F.next();return de==="("||de==="["?(L.f=L.inline=X(de==="("?")":"]"),v.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,D(L)):"error"}var K={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function X(F){return function(L,de){var ze=L.next();if(ze===F){de.f=de.inline=R,v.highlightFormatting&&(de.formatting="link-string");var pe=D(de);return de.linkHref=!1,pe}return L.match(K[F]),de.linkHref=!0,D(de)}}function I(F,L){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=H,F.next(),v.highlightFormatting&&(L.formatting="link"),L.linkText=!0,D(L)):E(F,L,R)}function H(F,L){if(F.match("]:",!0)){L.f=L.inline=le,v.highlightFormatting&&(L.formatting="link");var de=D(L);return L.linkText=!1,de}return F.match(/^([^\]\\]|\\.)+/,!0),s.linkText}function le(F,L){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?L.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),L.f=L.inline=R,s.linkHref+" url")}var xe={startState:function(){return{f:re,prevLine:{stream:null},thisLine:{stream:null},block:re,htmlState:null,indentation:0,inline:R,text:Q,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&o.copyState(C,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?o.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,L){if(L.formatting=!1,F!=L.thisLine.stream){if(L.header=0,L.hr=!1,F.match(/^\s*$/,!0))return J(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:F},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=q)){var de=F.match(/^\s*/,!0)[0].replace(/\t/g,W).length;if(L.indentation=de,L.indentationDiff=null,de>0)return null}}return L.f(F,L)},innerMode:function(F){return F.block==q?{state:F.htmlState,mode:C}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:xe}},indent:function(F,L,de){return F.block==q&&C.indent?C.indent(F.htmlState,L,de):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,L,de):o.Pass},blankLine:J,getType:D,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return xe},"xml"),o.defineMIME("text/markdown","markdown"),o.defineMIME("text/x-markdown","markdown")})});var eu=Ke((Vs,Js)=>{(function(o){typeof Vs=="object"&&typeof Js=="object"?o(We(),Jo(),Yn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],o):o(CodeMirror)})(function(o){"use strict";var p=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;o.defineMode("gfm",function(v,C){var b=0;function S(T){return T.code=!1,null}var s={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(T){return{code:T.code,codeBlock:T.codeBlock,ateSpace:T.ateSpace}},token:function(T,y){if(y.combineTokens=null,y.codeBlock)return T.match(/^```+/)?(y.codeBlock=!1,null):(T.skipToEnd(),null);if(T.sol()&&(y.code=!1),T.sol()&&T.match(/^```+/))return T.skipToEnd(),y.codeBlock=!0,null;if(T.peek()==="`"){T.next();var c=T.pos;T.eatWhile("`");var d=1+T.pos-c;return y.code?d===b&&(y.code=!1):(b=d,y.code=!0),null}else if(y.code)return T.next(),null;if(T.eatSpace())return y.ateSpace=!0,null;if((T.sol()||y.ateSpace)&&(y.ateSpace=!1,C.gitHubSpice!==!1)){if(T.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return y.combineTokens=!0,"link";if(T.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return y.combineTokens=!0,"link"}return T.match(p)&&T.string.slice(T.start-2,T.start)!="]("&&(T.start==0||/\W/.test(T.string.charAt(T.start-1)))?(y.combineTokens=!0,"link"):(T.next(),null)},blankLine:S},h={taskLists:!0,strikethrough:!0,emoji:!0};for(var g in C)h[g]=C[g];return h.name="markdown",o.overlayMode(o.getMode(v,h),s)},"markdown"),o.defineMIME("text/x-gfm","gfm")})});var nu=Ke((tu,ru)=>{(function(o){typeof tu=="object"&&typeof ru=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("go",function(p){var v=p.indentUnit,C={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0,any:!0,comparable:!0},b={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},S=/[+\-*&^%:=<>!|\/]/,s;function h(k,z){var M=k.next();if(M=='"'||M=="'"||M=="`")return z.tokenize=g(M),z.tokenize(k,z);if(/[\d\.]/.test(M))return M=="."?k.match(/^[0-9_]+([eE][\-+]?[0-9_]+)?/):M=="0"?k.match(/^[xX][0-9a-fA-F_]+/)||k.match(/^[0-7_]+/):k.match(/^[0-9_]*\.?[0-9_]*([eE][\-+]?[0-9_]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(M))return s=M,null;if(M=="/"){if(k.eat("*"))return z.tokenize=T,T(k,z);if(k.eat("/"))return k.skipToEnd(),"comment"}if(S.test(M))return k.eatWhile(S),"operator";k.eatWhile(/[\w\$_\xa1-\uffff]/);var w=k.current();return C.propertyIsEnumerable(w)?((w=="case"||w=="default")&&(s="case"),"keyword"):b.propertyIsEnumerable(w)?"atom":"variable"}function g(k){return function(z,M){for(var w=!1,W,E=!1;(W=z.next())!=null;){if(W==k&&!w){E=!0;break}w=!w&&k!="`"&&W=="\\"}return(E||!(w||k=="`"))&&(M.tokenize=h),"string"}}function T(k,z){for(var M=!1,w;w=k.next();){if(w=="/"&&M){z.tokenize=h;break}M=w=="*"}return"comment"}function y(k,z,M,w,W){this.indented=k,this.column=z,this.type=M,this.align=w,this.prev=W}function c(k,z,M){return k.context=new y(k.indented,z,M,null,k.context)}function d(k){if(k.context.prev){var z=k.context.type;return(z==")"||z=="]"||z=="}")&&(k.indented=k.context.indented),k.context=k.context.prev}}return{startState:function(k){return{tokenize:null,context:new y((k||0)-v,0,"top",!1),indented:0,startOfLine:!0}},token:function(k,z){var M=z.context;if(k.sol()&&(M.align==null&&(M.align=!1),z.indented=k.indentation(),z.startOfLine=!0,M.type=="case"&&(M.type="}")),k.eatSpace())return null;s=null;var w=(z.tokenize||h)(k,z);return w=="comment"||(M.align==null&&(M.align=!0),s=="{"?c(z,k.column(),"}"):s=="["?c(z,k.column(),"]"):s=="("?c(z,k.column(),")"):s=="case"?M.type="case":(s=="}"&&M.type=="}"||s==M.type)&&d(z),z.startOfLine=!1),w},indent:function(k,z){if(k.tokenize!=h&&k.tokenize!=null)return o.Pass;var M=k.context,w=z&&z.charAt(0);if(M.type=="case"&&/^(?:case|default)\b/.test(z))return k.context.type="}",M.indented;var W=w==M.type;return M.align?M.column+(W?0:1):M.indented+(W?0:v)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),o.defineMIME("text/x-go","go")})});var au=Ke((iu,ou)=>{(function(o){typeof iu=="object"&&typeof ou=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("http",function(){function p(T,y){return T.skipToEnd(),y.cur=h,"error"}function v(T,y){return T.match(/^HTTP\/\d\.\d/)?(y.cur=C,"keyword"):T.match(/^[A-Z]+/)&&/[ \t]/.test(T.peek())?(y.cur=S,"keyword"):p(T,y)}function C(T,y){var c=T.match(/^\d+/);if(!c)return p(T,y);y.cur=b;var d=Number(c[0]);return d>=100&&d<200?"positive informational":d>=200&&d<300?"positive success":d>=300&&d<400?"positive redirect":d>=400&&d<500?"negative client-error":d>=500&&d<600?"negative server-error":"error"}function b(T,y){return T.skipToEnd(),y.cur=h,null}function S(T,y){return T.eatWhile(/\S/),y.cur=s,"string-2"}function s(T,y){return T.match(/^HTTP\/\d\.\d$/)?(y.cur=h,"keyword"):p(T,y)}function h(T){return T.sol()&&!T.eat(/[ \t]/)?T.match(/^.*?:/)?"atom":(T.skipToEnd(),"error"):(T.skipToEnd(),"string")}function g(T){return T.skipToEnd(),null}return{token:function(T,y){var c=y.cur;return c!=h&&c!=g&&T.eatSpace()?null:c(T,y)},blankLine:function(T){T.cur=g},startState:function(){return{cur:v}}}}),o.defineMIME("message/http","http")})});var uu=Ke((lu,su)=>{(function(o){typeof lu=="object"&&typeof su=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("jinja2",function(){var p=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","do","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","set","raw","endraw","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","call","endcall","macro","endmacro","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","without","context","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","pluralize","autoescape","endautoescape"],v=/^[+\-*&%=<>!?|~^]/,C=/^[:\[\(\{]/,b=["true","false"],S=/^(\d[+\-\*\/])?\d+(\.\d+)?/;p=new RegExp("(("+p.join(")|(")+"))\\b"),b=new RegExp("(("+b.join(")|(")+"))\\b");function s(h,g){var T=h.peek();if(g.incomment)return h.skipTo("#}")?(h.eatWhile(/\#|}/),g.incomment=!1):h.skipToEnd(),"comment";if(g.intag){if(g.operator){if(g.operator=!1,h.match(b))return"atom";if(h.match(S))return"number"}if(g.sign){if(g.sign=!1,h.match(b))return"atom";if(h.match(S))return"number"}if(g.instring)return T==g.instring&&(g.instring=!1),h.next(),"string";if(T=="'"||T=='"')return g.instring=T,h.next(),"string";if(g.inbraces>0&&T==")")h.next(),g.inbraces--;else if(T=="(")h.next(),g.inbraces++;else if(g.inbrackets>0&&T=="]")h.next(),g.inbrackets--;else if(T=="[")h.next(),g.inbrackets++;else{if(!g.lineTag&&(h.match(g.intag+"}")||h.eat("-")&&h.match(g.intag+"}")))return g.intag=!1,"tag";if(h.match(v))return g.operator=!0,"operator";if(h.match(C))g.sign=!0;else{if(h.column()==1&&g.lineTag&&h.match(p))return"keyword";if(h.eat(" ")||h.sol()){if(h.match(p))return"keyword";if(h.match(b))return"atom";if(h.match(S))return"number";h.sol()&&h.next()}else h.next()}}return"variable"}else if(h.eat("{")){if(h.eat("#"))return g.incomment=!0,h.skipTo("#}")?(h.eatWhile(/\#|}/),g.incomment=!1):h.skipToEnd(),"comment";if(T=h.eat(/\{|%/))return g.intag=T,g.inbraces=0,g.inbrackets=0,T=="{"&&(g.intag="}"),h.eat("-"),"tag"}else if(h.eat("#")){if(h.peek()=="#")return h.skipToEnd(),"comment";if(!h.eol())return g.intag=!0,g.lineTag=!0,g.inbraces=0,g.inbrackets=0,"tag"}h.next()}return{startState:function(){return{tokenize:s,inbrackets:0,inbraces:0}},token:function(h,g){var T=g.tokenize(h,g);return h.eol()&&g.lineTag&&!g.instring&&g.inbraces==0&&g.inbrackets==0&&(g.intag=!1,g.lineTag=!1),T},blockCommentStart:"{#",blockCommentEnd:"#}",lineComment:"##"}}),o.defineMIME("text/jinja2","jinja2")})});var du=Ke((cu,fu)=>{(function(o){typeof cu=="object"&&typeof fu=="object"?o(We(),mn(),vn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript"],o):o(CodeMirror)})(function(o){"use strict";function p(C,b,S,s){this.state=C,this.mode=b,this.depth=S,this.prev=s}function v(C){return new p(o.copyState(C.mode,C.state),C.mode,C.depth,C.prev&&v(C.prev))}o.defineMode("jsx",function(C,b){var S=o.getMode(C,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),s=o.getMode(C,b&&b.base||"javascript");function h(c){var d=c.tagName;c.tagName=null;var k=S.indent(c,"","");return c.tagName=d,k}function g(c,d){return d.context.mode==S?T(c,d,d.context):y(c,d,d.context)}function T(c,d,k){if(k.depth==2)return c.match(/^.*?\*\//)?k.depth=1:c.skipToEnd(),"comment";if(c.peek()=="{"){S.skipAttribute(k.state);var z=h(k.state),M=k.state.context;if(M&&c.match(/^[^>]*>\s*$/,!1)){for(;M.prev&&!M.startOfLine;)M=M.prev;M.startOfLine?z-=C.indentUnit:k.prev.state.lexical&&(z=k.prev.state.lexical.indented)}else k.depth==1&&(z+=C.indentUnit);return d.context=new p(o.startState(s,z),s,0,d.context),null}if(k.depth==1){if(c.peek()=="<")return S.skipAttribute(k.state),d.context=new p(o.startState(S,h(k.state)),S,0,d.context),null;if(c.match("//"))return c.skipToEnd(),"comment";if(c.match("/*"))return k.depth=2,g(c,d)}var w=S.token(c,k.state),W=c.current(),E;return/\btag\b/.test(w)?/>$/.test(W)?k.state.context?k.depth=0:d.context=d.context.prev:/^-1&&c.backUp(W.length-E),w}function y(c,d,k){if(c.peek()=="<"&&!c.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&s.expressionAllowed(c,k.state))return d.context=new p(o.startState(S,s.indent(k.state,"","")),S,0,d.context),s.skipExpression(k.state),null;var z=s.token(c,k.state);if(!z&&k.depth!=null){var M=c.current();M=="{"?k.depth++:M=="}"&&--k.depth==0&&(d.context=d.context.prev)}return z}return{startState:function(){return{context:new p(o.startState(s),s)}},copyState:function(c){return{context:v(c.context)}},token:g,indent:function(c,d,k){return c.context.mode.indent(c.context.state,d,k)},innerMode:function(c){return c.context}}},"xml","javascript"),o.defineMIME("text/jsx","jsx"),o.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})});var gu=Ke((pu,hu)=>{(function(o){typeof pu=="object"&&typeof hu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("nginx",function(p){function v(k){for(var z={},M=k.split(" "),w=0;w*\/]/.test(w)?g(null,"select-op"):/[;{}:\[\]]/.test(w)?g(null,w):(k.eatWhile(/[\w\\\-]/),g("variable","variable"))}function y(k,z){for(var M=!1,w;(w=k.next())!=null;){if(M&&w=="/"){z.tokenize=T;break}M=w=="*"}return g("comment","comment")}function c(k,z){for(var M=0,w;(w=k.next())!=null;){if(M>=2&&w==">"){z.tokenize=T;break}M=w=="-"?M+1:0}return g("comment","comment")}function d(k){return function(z,M){for(var w=!1,W;(W=z.next())!=null&&!(W==k&&!w);)w=!w&&W=="\\";return w||(M.tokenize=T),g("string","string")}}return{startState:function(k){return{tokenize:T,baseIndent:k||0,stack:[]}},token:function(k,z){if(k.eatSpace())return null;h=null;var M=z.tokenize(k,z),w=z.stack[z.stack.length-1];return h=="hash"&&w=="rule"?M="atom":M=="variable"&&(w=="rule"?M="number":(!w||w=="@media{")&&(M="tag")),w=="rule"&&/^[\{\};]$/.test(h)&&z.stack.pop(),h=="{"?w=="@media"?z.stack[z.stack.length-1]="@media{":z.stack.push("{"):h=="}"?z.stack.pop():h=="@media"?z.stack.push("@media"):w=="{"&&h!="comment"&&z.stack.push("rule"),M},indent:function(k,z){var M=k.stack.length;return/^\}/.test(z)&&(M-=k.stack[k.stack.length-1]=="rule"?2:1),k.baseIndent+M*s},electricChars:"}"}}),o.defineMIME("text/x-nginx-conf","nginx")})});var bu=Ke((mu,vu)=>{(function(o){typeof mu=="object"&&typeof vu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("pascal",function(){function p(T){for(var y={},c=T.split(" "),d=0;d!?|\/]/;function S(T,y){var c=T.next();if(c=="#"&&y.startOfLine)return T.skipToEnd(),"meta";if(c=='"'||c=="'")return y.tokenize=s(c),y.tokenize(T,y);if(c=="("&&T.eat("*"))return y.tokenize=h,h(T,y);if(c=="{")return y.tokenize=g,g(T,y);if(/[\[\]\(\),;\:\.]/.test(c))return null;if(/\d/.test(c))return T.eatWhile(/[\w\.]/),"number";if(c=="/"&&T.eat("/"))return T.skipToEnd(),"comment";if(b.test(c))return T.eatWhile(b),"operator";T.eatWhile(/[\w\$_]/);var d=T.current();return v.propertyIsEnumerable(d)?"keyword":C.propertyIsEnumerable(d)?"atom":"variable"}function s(T){return function(y,c){for(var d=!1,k,z=!1;(k=y.next())!=null;){if(k==T&&!d){z=!0;break}d=!d&&k=="\\"}return(z||!d)&&(c.tokenize=null),"string"}}function h(T,y){for(var c=!1,d;d=T.next();){if(d==")"&&c){y.tokenize=null;break}c=d=="*"}return"comment"}function g(T,y){for(var c;c=T.next();)if(c=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(T,y){if(T.eatSpace())return null;var c=(y.tokenize||S)(T,y);return c=="comment"||c=="meta",c},electricChars:"{}"}}),o.defineMIME("text/x-pascal","pascal")})});var _u=Ke((yu,xu)=>{(function(o){typeof yu=="object"&&typeof xu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("perl",function(){var S={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},s="string-2",h=/[goseximacplud]/;function g(c,d,k,z,M){return d.chain=null,d.style=null,d.tail=null,d.tokenize=function(w,W){for(var E=!1,N,G=0;N=w.next();){if(N===k[G]&&!E)return k[++G]!==void 0?(W.chain=k[G],W.style=z,W.tail=M):M&&w.eatWhile(M),W.tokenize=y,z;E=!E&&N=="\\"}return z},d.tokenize(c,d)}function T(c,d,k){return d.tokenize=function(z,M){return z.string==k&&(M.tokenize=y),z.skipToEnd(),"string"},d.tokenize(c,d)}function y(c,d){if(c.eatSpace())return null;if(d.chain)return g(c,d,d.chain,d.style,d.tail);if(c.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if(c.match(/^<<(?=[_a-zA-Z])/))return c.eatWhile(/\w/),T(c,d,c.current().substr(2));if(c.sol()&&c.match(/^\=item(?!\w)/))return T(c,d,"=cut");var k=c.next();if(k=='"'||k=="'"){if(v(c,3)=="<<"+k){var z=c.pos;c.eatWhile(/\w/);var M=c.current().substr(1);if(M&&c.eat(k))return T(c,d,M);c.pos=z}return g(c,d,[k],"string")}if(k=="q"){var w=p(c,-2);if(!(w&&/\w/.test(w))){if(w=p(c,0),w=="x"){if(w=p(c,1),w=="(")return b(c,2),g(c,d,[")"],s,h);if(w=="[")return b(c,2),g(c,d,["]"],s,h);if(w=="{")return b(c,2),g(c,d,["}"],s,h);if(w=="<")return b(c,2),g(c,d,[">"],s,h);if(/[\^'"!~\/]/.test(w))return b(c,1),g(c,d,[c.eat(w)],s,h)}else if(w=="q"){if(w=p(c,1),w=="(")return b(c,2),g(c,d,[")"],"string");if(w=="[")return b(c,2),g(c,d,["]"],"string");if(w=="{")return b(c,2),g(c,d,["}"],"string");if(w=="<")return b(c,2),g(c,d,[">"],"string");if(/[\^'"!~\/]/.test(w))return b(c,1),g(c,d,[c.eat(w)],"string")}else if(w=="w"){if(w=p(c,1),w=="(")return b(c,2),g(c,d,[")"],"bracket");if(w=="[")return b(c,2),g(c,d,["]"],"bracket");if(w=="{")return b(c,2),g(c,d,["}"],"bracket");if(w=="<")return b(c,2),g(c,d,[">"],"bracket");if(/[\^'"!~\/]/.test(w))return b(c,1),g(c,d,[c.eat(w)],"bracket")}else if(w=="r"){if(w=p(c,1),w=="(")return b(c,2),g(c,d,[")"],s,h);if(w=="[")return b(c,2),g(c,d,["]"],s,h);if(w=="{")return b(c,2),g(c,d,["}"],s,h);if(w=="<")return b(c,2),g(c,d,[">"],s,h);if(/[\^'"!~\/]/.test(w))return b(c,1),g(c,d,[c.eat(w)],s,h)}else if(/[\^'"!~\/(\[{<]/.test(w)){if(w=="(")return b(c,1),g(c,d,[")"],"string");if(w=="[")return b(c,1),g(c,d,["]"],"string");if(w=="{")return b(c,1),g(c,d,["}"],"string");if(w=="<")return b(c,1),g(c,d,[">"],"string");if(/[\^'"!~\/]/.test(w))return g(c,d,[c.eat(w)],"string")}}}if(k=="m"){var w=p(c,-2);if(!(w&&/\w/.test(w))&&(w=c.eat(/[(\[{<\^'"!~\/]/),w)){if(/[\^'"!~\/]/.test(w))return g(c,d,[w],s,h);if(w=="(")return g(c,d,[")"],s,h);if(w=="[")return g(c,d,["]"],s,h);if(w=="{")return g(c,d,["}"],s,h);if(w=="<")return g(c,d,[">"],s,h)}}if(k=="s"){var w=/[\/>\]})\w]/.test(p(c,-2));if(!w&&(w=c.eat(/[(\[{<\^'"!~\/]/),w))return w=="["?g(c,d,["]","]"],s,h):w=="{"?g(c,d,["}","}"],s,h):w=="<"?g(c,d,[">",">"],s,h):w=="("?g(c,d,[")",")"],s,h):g(c,d,[w,w],s,h)}if(k=="y"){var w=/[\/>\]})\w]/.test(p(c,-2));if(!w&&(w=c.eat(/[(\[{<\^'"!~\/]/),w))return w=="["?g(c,d,["]","]"],s,h):w=="{"?g(c,d,["}","}"],s,h):w=="<"?g(c,d,[">",">"],s,h):w=="("?g(c,d,[")",")"],s,h):g(c,d,[w,w],s,h)}if(k=="t"){var w=/[\/>\]})\w]/.test(p(c,-2));if(!w&&(w=c.eat("r"),w&&(w=c.eat(/[(\[{<\^'"!~\/]/),w)))return w=="["?g(c,d,["]","]"],s,h):w=="{"?g(c,d,["}","}"],s,h):w=="<"?g(c,d,[">",">"],s,h):w=="("?g(c,d,[")",")"],s,h):g(c,d,[w,w],s,h)}if(k=="`")return g(c,d,[k],"variable-2");if(k=="/")return/~\s*$/.test(v(c))?g(c,d,[k],s,h):"operator";if(k=="$"){var z=c.pos;if(c.eatWhile(/\d/)||c.eat("{")&&c.eatWhile(/\d/)&&c.eat("}"))return"variable-2";c.pos=z}if(/[$@%]/.test(k)){var z=c.pos;if(c.eat("^")&&c.eat(/[A-Z]/)||!/[@$%&]/.test(p(c,-2))&&c.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var w=c.current();if(S[w])return"variable-2"}c.pos=z}if(/[$@%&]/.test(k)&&(c.eatWhile(/[\w$]/)||c.eat("{")&&c.eatWhile(/[\w$]/)&&c.eat("}"))){var w=c.current();return S[w]?"variable-2":"variable"}if(k=="#"&&p(c,-2)!="$")return c.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(k)){var z=c.pos;if(c.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),S[c.current()])return"operator";c.pos=z}if(k=="_"&&c.pos==1){if(C(c,6)=="_END__")return g(c,d,["\0"],"comment");if(C(c,7)=="_DATA__")return g(c,d,["\0"],"variable-2");if(C(c,7)=="_C__")return g(c,d,["\0"],"string")}if(/\w/.test(k)){var z=c.pos;if(p(c,-2)=="{"&&(p(c,0)=="}"||c.eatWhile(/\w/)&&p(c,0)=="}"))return"string";c.pos=z}if(/[A-Z]/.test(k)){var W=p(c,-2),z=c.pos;if(c.eatWhile(/[A-Z_]/),/[\da-z]/.test(p(c,0)))c.pos=z;else{var w=S[c.current()];return w?(w[1]&&(w=w[0]),W!=":"?w==1?"keyword":w==2?"def":w==3?"atom":w==4?"operator":w==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(k)){var W=p(c,-2);c.eatWhile(/\w/);var w=S[c.current()];return w?(w[1]&&(w=w[0]),W!=":"?w==1?"keyword":w==2?"def":w==3?"atom":w==4?"operator":w==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(c,d){return(d.tokenize||y)(c,d)},lineComment:"#"}}),o.registerHelper("wordChars","perl",/[\w$]/),o.defineMIME("text/x-perl","perl");function p(S,s){return S.string.charAt(S.pos+(s||0))}function v(S,s){if(s){var h=S.pos-s;return S.string.substr(h>=0?h:0,s)}else return S.string.substr(0,S.pos-1)}function C(S,s){var h=S.string.length,g=h-S.pos+1;return S.string.substr(S.pos,s&&s=(g=S.string.length-1)?S.pos=g:S.pos=h}})});var Su=Ke((ku,wu)=>{(function(o){typeof ku=="object"&&typeof wu=="object"?o(We(),Qn(),Vo()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],o):o(CodeMirror)})(function(o){"use strict";function p(T){for(var y={},c=T.split(" "),d=0;d\w/,!1)&&(y.tokenize=v([[["->",null]],[[/[\w]+/,"variable"]]],c,d)),"variable-2";for(var k=!1;!T.eol()&&(k||d===!1||!T.match("{$",!1)&&!T.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!k&&T.match(c)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}k=T.next()=="\\"&&!k}return"string"}var S="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally readonly match",s="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";o.registerHelper("hintWords","php",[S,s,h].join(" ").split(" ")),o.registerHelper("wordChars","php",/[\w$]/);var g={name:"clike",helperType:"php",keywords:p(S),blockKeywords:p("catch do else elseif for foreach if switch try while finally"),defKeywords:p("class enum function interface namespace trait"),atoms:p(s),builtin:p(h),multiLineStrings:!0,hooks:{$:function(T){return T.eatWhile(/[\w\$_]/),"variable-2"},"<":function(T,y){var c;if(c=T.match(/^<<\s*/)){var d=T.eat(/['"]/);T.eatWhile(/[\w\.]/);var k=T.current().slice(c[0].length+(d?2:1));if(d&&T.eat(d),k)return(y.tokStack||(y.tokStack=[])).push(k,0),y.tokenize=C(k,d!="'"),"string"}return!1},"#":function(T){for(;!T.eol()&&!T.match("?>",!1);)T.next();return"comment"},"/":function(T){if(T.eat("/")){for(;!T.eol()&&!T.match("?>",!1);)T.next();return"comment"}return!1},'"':function(T,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=C('"'),"string"},"{":function(T,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(T,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=C(y.tokStack[y.tokStack.length-2])),!1}}};o.defineMode("php",function(T,y){var c=o.getMode(T,y&&y.htmlMode||"text/html"),d=o.getMode(T,g);function k(z,M){var w=M.curMode==d;if(z.sol()&&M.pending&&M.pending!='"'&&M.pending!="'"&&(M.pending=null),w)return w&&M.php.tokenize==null&&z.match("?>")?(M.curMode=c,M.curState=M.html,M.php.context.prev||(M.php=null),"meta"):d.token(z,M.curState);if(z.match(/^<\?\w*/))return M.curMode=d,M.php||(M.php=o.startState(d,c.indent(M.html,"",""))),M.curState=M.php,"meta";if(M.pending=='"'||M.pending=="'"){for(;!z.eol()&&z.next()!=M.pending;);var W="string"}else if(M.pending&&z.pos/.test(E)?M.pending=G[0]:M.pending={end:z.pos,style:W},z.backUp(E.length-N)),W}return{startState:function(){var z=o.startState(c),M=y.startOpen?o.startState(d):null;return{html:z,php:M,curMode:y.startOpen?d:c,curState:y.startOpen?M:z,pending:null}},copyState:function(z){var M=z.html,w=o.copyState(c,M),W=z.php,E=W&&o.copyState(d,W),N;return z.curMode==c?N=w:N=E,{html:w,php:E,curMode:z.curMode,curState:N,pending:z.pending}},token:k,indent:function(z,M,w){return z.curMode!=d&&/^\s*<\//.test(M)||z.curMode==d&&/^\?>/.test(M)?c.indent(z.html,M,w):z.curMode.indent(z.curState,M,w)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(z){return{state:z.curState,mode:z.curMode}}}},"htmlmixed","clike"),o.defineMIME("application/x-httpd-php","php"),o.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),o.defineMIME("text/x-php",g)})});var Cu=Ke((Tu,Lu)=>{(function(o){typeof Tu=="object"&&typeof Lu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(s){return new RegExp("^(("+s.join(")|(")+"))\\b","i")}var v=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","option","service","rpc","returns"],C=p(v);o.registerHelper("hintWords","protobuf",v);var b=new RegExp("^[_A-Za-z\xA1-\uFFFF][_A-Za-z0-9\xA1-\uFFFF]*");function S(s){return s.eatSpace()?null:s.match("//")?(s.skipToEnd(),"comment"):s.match(/^[0-9\.+-]/,!1)&&(s.match(/^[+-]?0x[0-9a-fA-F]+/)||s.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||s.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":s.match(/^"([^"]|(""))*"/)||s.match(/^'([^']|(''))*'/)?"string":s.match(C)?"keyword":s.match(b)?"variable":(s.next(),null)}o.defineMode("protobuf",function(){return{token:S,fold:"brace"}}),o.defineMIME("text/x-protobuf","protobuf")})});var Mu=Ke((Eu,zu)=>{(function(o){typeof Eu=="object"&&typeof zu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var v=p(["and","or","not","is"]),C=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],b=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];o.registerHelper("hintWords","python",C.concat(b).concat(["exec","print"]));function S(h){return h.scopes[h.scopes.length-1]}o.defineMode("python",function(h,g){for(var T="error",y=g.delimiters||g.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[g.singleOperators,g.doubleOperators,g.doubleDelimiters,g.tripleDelimiters,g.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],d=0;dH?D(X):le0&&R(K,X)&&(xe+=" "+T),xe}}return re(K,X)}function re(K,X,I){if(K.eatSpace())return null;if(!I&&K.match(/^#.*/))return"comment";if(K.match(/^[0-9\.]/,!1)){var H=!1;if(K.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(H=!0),K.match(/^[\d_]+\.\d*/)&&(H=!0),K.match(/^\.\d+/)&&(H=!0),H)return K.eat(/J/i),"number";var le=!1;if(K.match(/^0x[0-9a-f_]+/i)&&(le=!0),K.match(/^0b[01_]+/i)&&(le=!0),K.match(/^0o[0-7_]+/i)&&(le=!0),K.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(K.eat(/J/i),le=!0),K.match(/^0(?![\dx])/i)&&(le=!0),le)return K.eat(/L/i),"number"}if(K.match(E)){var xe=K.current().toLowerCase().indexOf("f")!==-1;return xe?(X.tokenize=q(K.current(),X.tokenize),X.tokenize(K,X)):(X.tokenize=O(K.current(),X.tokenize),X.tokenize(K,X))}for(var F=0;F=0;)K=K.substr(1);var I=K.length==1,H="string";function le(F){return function(L,de){var ze=re(L,de,!0);return ze=="punctuation"&&(L.current()=="{"?de.tokenize=le(F+1):L.current()=="}"&&(F>1?de.tokenize=le(F-1):de.tokenize=xe)),ze}}function xe(F,L){for(;!F.eol();)if(F.eatWhile(/[^'"\{\}\\]/),F.eat("\\")){if(F.next(),I&&F.eol())return H}else{if(F.match(K))return L.tokenize=X,H;if(F.match("{{"))return H;if(F.match("{",!1))return L.tokenize=le(0),F.current()?H:L.tokenize(F,L);if(F.match("}}"))return H;if(F.match("}"))return T;F.eat(/['"]/)}if(I){if(g.singleLineStringErrors)return T;L.tokenize=X}return H}return xe.isString=!0,xe}function O(K,X){for(;"rubf".indexOf(K.charAt(0).toLowerCase())>=0;)K=K.substr(1);var I=K.length==1,H="string";function le(xe,F){for(;!xe.eol();)if(xe.eatWhile(/[^'"\\]/),xe.eat("\\")){if(xe.next(),I&&xe.eol())return H}else{if(xe.match(K))return F.tokenize=X,H;xe.eat(/['"]/)}if(I){if(g.singleLineStringErrors)return T;F.tokenize=X}return H}return le.isString=!0,le}function D(K){for(;S(K).type!="py";)K.scopes.pop();K.scopes.push({offset:S(K).offset+h.indentUnit,type:"py",align:null})}function Q(K,X,I){var H=K.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:K.column()+1;X.scopes.push({offset:X.indent+k,type:I,align:H})}function R(K,X){for(var I=K.indentation();X.scopes.length>1&&S(X).offset>I;){if(S(X).type!="py")return!0;X.scopes.pop()}return S(X).offset!=I}function V(K,X){K.sol()&&(X.beginningOfLine=!0,X.dedent=!1);var I=X.tokenize(K,X),H=K.current();if(X.beginningOfLine&&H=="@")return K.match(W,!1)?"meta":w?"operator":T;if(/\S/.test(H)&&(X.beginningOfLine=!1),(I=="variable"||I=="builtin")&&X.lastToken=="meta"&&(I="meta"),(H=="pass"||H=="return")&&(X.dedent=!0),H=="lambda"&&(X.lambda=!0),H==":"&&!X.lambda&&S(X).type=="py"&&K.match(/^\s*(?:#|$)/,!1)&&D(X),H.length==1&&!/string|comment/.test(I)){var le="[({".indexOf(H);if(le!=-1&&Q(K,X,"])}".slice(le,le+1)),le="])}".indexOf(H),le!=-1)if(S(X).type==H)X.indent=X.scopes.pop().offset-k;else return T}return X.dedent&&K.eol()&&S(X).type=="py"&&X.scopes.length>1&&X.scopes.pop(),I}var x={startState:function(K){return{tokenize:J,scopes:[{offset:K||0,type:"py",align:null}],indent:K||0,lastToken:null,lambda:!1,dedent:0}},token:function(K,X){var I=X.errorToken;I&&(X.errorToken=!1);var H=V(K,X);return H&&H!="comment"&&(X.lastToken=H=="keyword"||H=="punctuation"?K.current():H),H=="punctuation"&&(H=null),K.eol()&&X.lambda&&(X.lambda=!1),I?H+" "+T:H},indent:function(K,X){if(K.tokenize!=J)return K.tokenize.isString?o.Pass:0;var I=S(K),H=I.type==X.charAt(0)||I.type=="py"&&!K.dedent&&/^(else:|elif |except |finally:)/.test(X);return I.align!=null?I.align-(H?1:0):I.offset-(H?k:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return x}),o.defineMIME("text/x-python","python");var s=function(h){return h.split(" ")};o.defineMIME("text/x-cython",{name:"python",extra_keywords:s("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var qu=Ke((Au,Du)=>{(function(o){typeof Au=="object"&&typeof Du=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(g){for(var T={},y=0,c=g.length;y]/)?(E.eat(/[\<\>]/),"atom"):E.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":E.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(E.eatWhile(/[\w$\xa1-\uffff]/),E.eat(/[\?\!\=]/),"atom"):"operator";if(G=="@"&&E.match(/^@?[a-zA-Z_\xa1-\uffff]/))return E.eat("@"),E.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(G=="$")return E.eat(/[a-zA-Z_]/)?E.eatWhile(/[\w]/):E.eat(/\d/)?E.eat(/\d/):E.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(G))return E.eatWhile(/[\w\xa1-\uffff]/),E.eat(/[\?\!]/),E.eat(":")?"atom":"ident";if(G=="|"&&(N.varList||N.lastTok=="{"||N.lastTok=="do"))return T="|",null;if(/[\(\)\[\]{}\\;]/.test(G))return T=G,null;if(G=="-"&&E.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(G)){var D=E.eatWhile(/[=+\-\/*:\.^%<>~|]/);return G=="."&&!D&&(T="."),"operator"}else return null}}}function d(E){for(var N=E.pos,G=0,J,re=!1,q=!1;(J=E.next())!=null;)if(q)q=!1;else{if("[{(".indexOf(J)>-1)G++;else if("]})".indexOf(J)>-1){if(G--,G<0)break}else if(J=="/"&&G==0){re=!0;break}q=J=="\\"}return E.backUp(E.pos-N),re}function k(E){return E||(E=1),function(N,G){if(N.peek()=="}"){if(E==1)return G.tokenize.pop(),G.tokenize[G.tokenize.length-1](N,G);G.tokenize[G.tokenize.length-1]=k(E-1)}else N.peek()=="{"&&(G.tokenize[G.tokenize.length-1]=k(E+1));return c(N,G)}}function z(){var E=!1;return function(N,G){return E?(G.tokenize.pop(),G.tokenize[G.tokenize.length-1](N,G)):(E=!0,c(N,G))}}function M(E,N,G,J){return function(re,q){var O=!1,D;for(q.context.type==="read-quoted-paused"&&(q.context=q.context.prev,re.eat("}"));(D=re.next())!=null;){if(D==E&&(J||!O)){q.tokenize.pop();break}if(G&&D=="#"&&!O){if(re.eat("{")){E=="}"&&(q.context={prev:q.context,type:"read-quoted-paused"}),q.tokenize.push(k());break}else if(/[@\$]/.test(re.peek())){q.tokenize.push(z());break}}O=!O&&D=="\\"}return N}}function w(E,N){return function(G,J){return N&&G.eatSpace(),G.match(E)?J.tokenize.pop():G.skipToEnd(),"string"}}function W(E,N){return E.sol()&&E.match("=end")&&E.eol()&&N.tokenize.pop(),E.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[c],indented:0,context:{type:"top",indented:-g.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(E,N){T=null,E.sol()&&(N.indented=E.indentation());var G=N.tokenize[N.tokenize.length-1](E,N),J,re=T;if(G=="ident"){var q=E.current();G=N.lastTok=="."?"property":C.propertyIsEnumerable(E.current())?"keyword":/^[A-Z]/.test(q)?"tag":N.lastTok=="def"||N.lastTok=="class"||N.varList?"def":"variable",G=="keyword"&&(re=q,b.propertyIsEnumerable(q)?J="indent":S.propertyIsEnumerable(q)?J="dedent":((q=="if"||q=="unless")&&E.column()==E.indentation()||q=="do"&&N.context.indented{(function(o){typeof Fu=="object"&&typeof Iu=="object"?o(We(),Di()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),o.defineMIME("text/x-rustsrc","rust"),o.defineMIME("text/rust","rust")})});var ea=Ke((Ou,Pu)=>{(function(o){typeof Ou=="object"&&typeof Pu=="object"?o(We(),gn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../css/css"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("sass",function(p){var v=o.mimeModes["text/css"],C=v.propertyKeywords||{},b=v.colorKeywords||{},S=v.valueKeywords||{},s=v.fontProperties||{};function h(q){return new RegExp("^"+q.join("|"))}var g=["true","false","null","auto"],T=new RegExp("^"+g.join("|")),y=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],c=h(y),d=/^::?[a-zA-Z_][\w\-]*/,k;function z(q){return!q.peek()||q.match(/\s+$/,!1)}function M(q,O){var D=q.peek();return D===")"?(q.next(),O.tokenizer=J,"operator"):D==="("?(q.next(),q.eatSpace(),"operator"):D==="'"||D==='"'?(O.tokenizer=W(q.next()),"string"):(O.tokenizer=W(")",!1),"string")}function w(q,O){return function(D,Q){return D.sol()&&D.indentation()<=q?(Q.tokenizer=J,J(D,Q)):(O&&D.skipTo("*/")?(D.next(),D.next(),Q.tokenizer=J):D.skipToEnd(),"comment")}}function W(q,O){O==null&&(O=!0);function D(Q,R){var V=Q.next(),x=Q.peek(),K=Q.string.charAt(Q.pos-2),X=V!=="\\"&&x===q||V===q&&K!=="\\";return X?(V!==q&&O&&Q.next(),z(Q)&&(R.cursorHalf=0),R.tokenizer=J,"string"):V==="#"&&x==="{"?(R.tokenizer=E(D),Q.next(),"operator"):"string"}return D}function E(q){return function(O,D){return O.peek()==="}"?(O.next(),D.tokenizer=q,"operator"):J(O,D)}}function N(q){if(q.indentCount==0){q.indentCount++;var O=q.scopes[0].offset,D=O+p.indentUnit;q.scopes.unshift({offset:D})}}function G(q){q.scopes.length!=1&&q.scopes.shift()}function J(q,O){var D=q.peek();if(q.match("/*"))return O.tokenizer=w(q.indentation(),!0),O.tokenizer(q,O);if(q.match("//"))return O.tokenizer=w(q.indentation(),!1),O.tokenizer(q,O);if(q.match("#{"))return O.tokenizer=E(J),"operator";if(D==='"'||D==="'")return q.next(),O.tokenizer=W(D),"string";if(O.cursorHalf){if(D==="#"&&(q.next(),q.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))||q.match(/^-?[0-9\.]+/))return z(q)&&(O.cursorHalf=0),"number";if(q.match(/^(px|em|in)\b/))return z(q)&&(O.cursorHalf=0),"unit";if(q.match(T))return z(q)&&(O.cursorHalf=0),"keyword";if(q.match(/^url/)&&q.peek()==="(")return O.tokenizer=M,z(q)&&(O.cursorHalf=0),"atom";if(D==="$")return q.next(),q.eatWhile(/[\w-]/),z(q)&&(O.cursorHalf=0),"variable-2";if(D==="!")return q.next(),O.cursorHalf=0,q.match(/^[\w]+/)?"keyword":"operator";if(q.match(c))return z(q)&&(O.cursorHalf=0),"operator";if(q.eatWhile(/[\w-]/))return z(q)&&(O.cursorHalf=0),k=q.current().toLowerCase(),S.hasOwnProperty(k)?"atom":b.hasOwnProperty(k)?"keyword":C.hasOwnProperty(k)?(O.prevProp=q.current().toLowerCase(),"property"):"tag";if(z(q))return O.cursorHalf=0,null}else{if(D==="-"&&q.match(/^-\w+-/))return"meta";if(D==="."){if(q.next(),q.match(/^[\w-]+/))return N(O),"qualifier";if(q.peek()==="#")return N(O),"tag"}if(D==="#"){if(q.next(),q.match(/^[\w-]+/))return N(O),"builtin";if(q.peek()==="#")return N(O),"tag"}if(D==="$")return q.next(),q.eatWhile(/[\w-]/),"variable-2";if(q.match(/^-?[0-9\.]+/))return"number";if(q.match(/^(px|em|in)\b/))return"unit";if(q.match(T))return"keyword";if(q.match(/^url/)&&q.peek()==="(")return O.tokenizer=M,"atom";if(D==="="&&q.match(/^=[\w-]+/))return N(O),"meta";if(D==="+"&&q.match(/^\+[\w-]+/))return"variable-3";if(D==="@"&&q.match("@extend")&&(q.match(/\s*[\w]/)||G(O)),q.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return N(O),"def";if(D==="@")return q.next(),q.eatWhile(/[\w-]/),"def";if(q.eatWhile(/[\w-]/))if(q.match(/ *: *[\w-\+\$#!\("']/,!1)){k=q.current().toLowerCase();var Q=O.prevProp+"-"+k;return C.hasOwnProperty(Q)?"property":C.hasOwnProperty(k)?(O.prevProp=k,"property"):s.hasOwnProperty(k)?"property":"tag"}else return q.match(/ *:/,!1)?(N(O),O.cursorHalf=1,O.prevProp=q.current().toLowerCase(),"property"):(q.match(/ *,/,!1)||N(O),"tag");if(D===":")return q.match(d)?"variable-3":(q.next(),O.cursorHalf=1,"operator")}return q.match(c)?"operator":(q.next(),null)}function re(q,O){q.sol()&&(O.indentCount=0);var D=O.tokenizer(q,O),Q=q.current();if((Q==="@return"||Q==="}")&&G(O),D!==null){for(var R=q.pos-Q.length,V=R+p.indentUnit*O.indentCount,x=[],K=0;K{(function(o){typeof ju=="object"&&typeof Ru=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("shell",function(){var p={};function v(d,k){for(var z=0;z1&&d.eat("$");var z=d.next();return/['"({]/.test(z)?(k.tokens[0]=h(z,z=="("?"quote":z=="{"?"def":"string"),c(d,k)):(/\d/.test(z)||d.eatWhile(/\w/),k.tokens.shift(),"def")};function y(d){return function(k,z){return k.sol()&&k.string==d&&z.tokens.shift(),k.skipToEnd(),"string-2"}}function c(d,k){return(k.tokens[0]||s)(d,k)}return{startState:function(){return{tokens:[]}},token:function(d,k){return c(d,k)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),o.defineMIME("text/x-sh","shell"),o.defineMIME("application/x-sh","shell")})});var Uu=Ke((Bu,Wu)=>{(function(o){typeof Bu=="object"&&typeof Wu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("sql",function(g,T){var y=T.client||{},c=T.atoms||{false:!0,true:!0,null:!0},d=T.builtin||s(h),k=T.keywords||s(S),z=T.operatorChars||/^[*+\-%<>!=&|~^\/]/,M=T.support||{},w=T.hooks||{},W=T.dateSQL||{date:!0,time:!0,timestamp:!0},E=T.backslashStringEscapes!==!1,N=T.brackets||/^[\{}\(\)\[\]]/,G=T.punctuation||/^[;.,:]/;function J(Q,R){var V=Q.next();if(w[V]){var x=w[V](Q,R);if(x!==!1)return x}if(M.hexNumber&&(V=="0"&&Q.match(/^[xX][0-9a-fA-F]+/)||(V=="x"||V=="X")&&Q.match(/^'[0-9a-fA-F]*'/)))return"number";if(M.binaryNumber&&((V=="b"||V=="B")&&Q.match(/^'[01]*'/)||V=="0"&&Q.match(/^b[01]+/)))return"number";if(V.charCodeAt(0)>47&&V.charCodeAt(0)<58)return Q.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),M.decimallessFloat&&Q.match(/^\.(?!\.)/),"number";if(V=="?"&&(Q.eatSpace()||Q.eol()||Q.eat(";")))return"variable-3";if(V=="'"||V=='"'&&M.doubleQuote)return R.tokenize=re(V),R.tokenize(Q,R);if((M.nCharCast&&(V=="n"||V=="N")||M.charsetCast&&V=="_"&&Q.match(/[a-z][a-z0-9]*/i))&&(Q.peek()=="'"||Q.peek()=='"'))return"keyword";if(M.escapeConstant&&(V=="e"||V=="E")&&(Q.peek()=="'"||Q.peek()=='"'&&M.doubleQuote))return R.tokenize=function(X,I){return(I.tokenize=re(X.next(),!0))(X,I)},"keyword";if(M.commentSlashSlash&&V=="/"&&Q.eat("/"))return Q.skipToEnd(),"comment";if(M.commentHash&&V=="#"||V=="-"&&Q.eat("-")&&(!M.commentSpaceRequired||Q.eat(" ")))return Q.skipToEnd(),"comment";if(V=="/"&&Q.eat("*"))return R.tokenize=q(1),R.tokenize(Q,R);if(V=="."){if(M.zerolessFloat&&Q.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(Q.match(/^\.+/))return null;if(Q.match(/^[\w\d_$#]+/))return"variable-2"}else{if(z.test(V))return Q.eatWhile(z),"operator";if(N.test(V))return"bracket";if(G.test(V))return Q.eatWhile(G),"punctuation";if(V=="{"&&(Q.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||Q.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";Q.eatWhile(/^[_\w\d]/);var K=Q.current().toLowerCase();return W.hasOwnProperty(K)&&(Q.match(/^( )+'[^']*'/)||Q.match(/^( )+"[^"]*"/))?"number":c.hasOwnProperty(K)?"atom":d.hasOwnProperty(K)?"type":k.hasOwnProperty(K)?"keyword":y.hasOwnProperty(K)?"builtin":null}}function re(Q,R){return function(V,x){for(var K=!1,X;(X=V.next())!=null;){if(X==Q&&!K){x.tokenize=J;break}K=(E||R)&&!K&&X=="\\"}return"string"}}function q(Q){return function(R,V){var x=R.match(/^.*?(\/\*|\*\/)/);return x?x[1]=="/*"?V.tokenize=q(Q+1):Q>1?V.tokenize=q(Q-1):V.tokenize=J:R.skipToEnd(),"comment"}}function O(Q,R,V){R.context={prev:R.context,indent:Q.indentation(),col:Q.column(),type:V}}function D(Q){Q.indent=Q.context.indent,Q.context=Q.context.prev}return{startState:function(){return{tokenize:J,context:null}},token:function(Q,R){if(Q.sol()&&R.context&&R.context.align==null&&(R.context.align=!1),R.tokenize==J&&Q.eatSpace())return null;var V=R.tokenize(Q,R);if(V=="comment")return V;R.context&&R.context.align==null&&(R.context.align=!0);var x=Q.current();return x=="("?O(Q,R,")"):x=="["?O(Q,R,"]"):R.context&&R.context.type==x&&D(R),V},indent:function(Q,R){var V=Q.context;if(!V)return o.Pass;var x=R.charAt(0)==V.type;return V.align?V.col+(x?0:1):V.indent+(x?0:g.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:M.commentSlashSlash?"//":M.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:T}});function p(g){for(var T;(T=g.next())!=null;)if(T=="`"&&!g.eat("`"))return"variable-2";return g.backUp(g.current().length-1),g.eatWhile(/\w/)?"variable-2":null}function v(g){for(var T;(T=g.next())!=null;)if(T=='"'&&!g.eat('"'))return"variable-2";return g.backUp(g.current().length-1),g.eatWhile(/\w/)?"variable-2":null}function C(g){return g.eat("@")&&(g.match("session."),g.match("local."),g.match("global.")),g.eat("'")?(g.match(/^.*'/),"variable-2"):g.eat('"')?(g.match(/^.*"/),"variable-2"):g.eat("`")?(g.match(/^.*`/),"variable-2"):g.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function b(g){return g.eat("N")?"atom":g.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var S="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function s(g){for(var T={},y=g.split(" "),c=0;c!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:s("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":C}}),o.defineMIME("text/x-mysql",{name:"sql",client:s("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:s(S+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":C,"`":p,"\\":b}}),o.defineMIME("text/x-mariadb",{name:"sql",client:s("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:s(S+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":C,"`":p,"\\":b}}),o.defineMIME("text/x-sqlite",{name:"sql",client:s("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:s(S+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:s("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:s("date time timestamp datetime"),support:s("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":C,":":C,"?":C,$:C,'"':v,"`":p}}),o.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:s("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:s("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:s("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:s("commentSlashSlash decimallessFloat"),hooks:{}}),o.defineMIME("text/x-plsql",{name:"sql",client:s("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:s("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:s("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:s("date time timestamp"),support:s("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),o.defineMIME("text/x-hive",{name:"sql",keywords:s("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:s("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:s("date timestamp"),support:s("doubleQuote binaryNumber hexNumber")}),o.defineMIME("text/x-pgsql",{name:"sql",client:s("source"),keywords:s(S+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:s("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:s("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),o.defineMIME("text/x-gql",{name:"sql",keywords:s("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:s("false true"),builtin:s("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),o.defineMIME("text/x-gpsql",{name:"sql",client:s("source"),keywords:s("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:s("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),o.defineMIME("text/x-sparksql",{name:"sql",keywords:s("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:s("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:s("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:s("date time timestamp"),support:s("doubleQuote zerolessFloat")}),o.defineMIME("text/x-esper",{name:"sql",client:s("source"),keywords:s("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:s("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:s("time"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber")}),o.defineMIME("text/x-trino",{name:"sql",keywords:s("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:s("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:s("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:s("date time timestamp zone"),support:s("decimallessFloat zerolessFloat hexNumber")})})});var ta=Ke(($u,Ku)=>{(function(o){typeof $u=="object"&&typeof Ku=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("stylus",function(E){for(var N=E.indentUnit,G="",J=w(p),re=/^(a|b|i|s|col|em)$/i,q=w(S),O=w(s),D=w(T),Q=w(g),R=w(v),V=M(v),x=w(b),K=w(C),X=w(h),I=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,H=M(y),le=w(c),xe=new RegExp(/^\-(moz|ms|o|webkit)-/i),F=w(d),L="",de={},ze,pe,Ee,ge;G.length|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),B.context.line.firstWord=L?L[0].replace(/^\s*/,""):"",B.context.line.indent=$.indentation(),ze=$.peek(),$.match("//"))return $.skipToEnd(),["comment","comment"];if($.match("/*"))return B.tokenize=qe,qe($,B);if(ze=='"'||ze=="'")return $.next(),B.tokenize=Se(ze),B.tokenize($,B);if(ze=="@")return $.next(),$.eatWhile(/[\w\\-]/),["def",$.current()];if(ze=="#"){if($.next(),$.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if($.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return $.match(xe)?["meta","vendor-prefixes"]:$.match(/^-?[0-9]?\.?[0-9]/)?($.eatWhile(/[a-z%]/i),["number","unit"]):ze=="!"?($.next(),[$.match(/^(important|optional)/i)?"keyword":"operator","important"]):ze=="."&&$.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:$.match(V)?($.peek()=="("&&(B.tokenize=je),["property","word"]):$.match(/^[a-z][\w-]*\(/i)?($.backUp(1),["keyword","mixin"]):$.match(/^(\+|-)[a-z][\w-]*\(/i)?($.backUp(1),["keyword","block-mixin"]):$.string.match(/^\s*&/)&&$.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:$.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?($.backUp(1),["variable-3","reference"]):$.match(/^&{1}\s*$/)?["variable-3","reference"]:$.match(H)?["operator","operator"]:$.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?$.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!U($.current())?($.match("."),["variable-2","variable-name"]):["variable-2","word"]:$.match(I)?["operator",$.current()]:/[:;,{}\[\]\(\)]/.test(ze)?($.next(),[null,ze]):($.next(),[null,null])}function qe($,B){for(var se=!1,De;(De=$.next())!=null;){if(se&&De=="/"){B.tokenize=null;break}se=De=="*"}return["comment","comment"]}function Se($){return function(B,se){for(var De=!1,nt;(nt=B.next())!=null;){if(nt==$&&!De){$==")"&&B.backUp(1);break}De=!De&&nt=="\\"}return(nt==$||!De&&$!=")")&&(se.tokenize=null),["string","string"]}}function je($,B){return $.next(),$.match(/\s*[\"\')]/,!1)?B.tokenize=null:B.tokenize=Se(")"),[null,"("]}function Ze($,B,se,De){this.type=$,this.indent=B,this.prev=se,this.line=De||{firstWord:"",indent:0}}function ke($,B,se,De){return De=De>=0?De:N,$.context=new Ze(se,B.indentation()+De,$.context),se}function Je($,B){var se=$.context.indent-N;return B=B||!1,$.context=$.context.prev,B&&($.context.indent=se),$.context.type}function He($,B,se){return de[se.context.type]($,B,se)}function Ge($,B,se,De){for(var nt=De||1;nt>0;nt--)se.context=se.context.prev;return He($,B,se)}function U($){return $.toLowerCase()in J}function Z($){return $=$.toLowerCase(),$ in q||$ in X}function ce($){return $.toLowerCase()in le}function Be($){return $.toLowerCase().match(xe)}function te($){var B=$.toLowerCase(),se="variable-2";return U($)?se="tag":ce($)?se="block-keyword":Z($)?se="property":B in D||B in F?se="atom":B=="return"||B in Q?se="keyword":$.match(/^[A-Z]/)&&(se="string"),se}function fe($,B){return Me(B)&&($=="{"||$=="]"||$=="hash"||$=="qualifier")||$=="block-mixin"}function oe($,B){return $=="{"&&B.match(/^\s*\$?[\w-]+/i,!1)}function Ue($,B){return $==":"&&B.match(/^[a-z-]+/,!1)}function we($){return $.sol()||$.string.match(new RegExp("^\\s*"+W($.current())))}function Me($){return $.eol()||$.match(/^\s*$/,!1)}function Le($){var B=/^\s*[-_]*[a-z0-9]+[\w-]*/i,se=typeof $=="string"?$.match(B):$.string.match(B);return se?se[0].replace(/^\s*/,""):""}return de.block=function($,B,se){if($=="comment"&&we(B)||$==","&&Me(B)||$=="mixin")return ke(se,B,"block",0);if(oe($,B))return ke(se,B,"interpolation");if(Me(B)&&$=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(B.string)&&!U(Le(B)))return ke(se,B,"block",0);if(fe($,B))return ke(se,B,"block");if($=="}"&&Me(B))return ke(se,B,"block",0);if($=="variable-name")return B.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||ce(Le(B))?ke(se,B,"variableName"):ke(se,B,"variableName",0);if($=="=")return!Me(B)&&!ce(Le(B))?ke(se,B,"block",0):ke(se,B,"block");if($=="*"&&(Me(B)||B.match(/\s*(,|\.|#|\[|:|{)/,!1)))return ge="tag",ke(se,B,"block");if(Ue($,B))return ke(se,B,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test($))return ke(se,B,Me(B)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test($))return ke(se,B,"keyframes");if(/@extends?/.test($))return ke(se,B,"extend",0);if($&&$.charAt(0)=="@")return B.indentation()>0&&Z(B.current().slice(1))?(ge="variable-2","block"):/(@import|@require|@charset)/.test($)?ke(se,B,"block",0):ke(se,B,"block");if($=="reference"&&Me(B))return ke(se,B,"block");if($=="(")return ke(se,B,"parens");if($=="vendor-prefixes")return ke(se,B,"vendorPrefixes");if($=="word"){var De=B.current();if(ge=te(De),ge=="property")return we(B)?ke(se,B,"block",0):(ge="atom","block");if(ge=="tag"){if(/embed|menu|pre|progress|sub|table/.test(De)&&Z(Le(B))||B.string.match(new RegExp("\\[\\s*"+De+"|"+De+"\\s*\\]")))return ge="atom","block";if(re.test(De)&&(we(B)&&B.string.match(/=/)||!we(B)&&!B.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!U(Le(B))))return ge="variable-2",ce(Le(B))?"block":ke(se,B,"block",0);if(Me(B))return ke(se,B,"block")}if(ge=="block-keyword")return ge="keyword",B.current(/(if|unless)/)&&!we(B)?"block":ke(se,B,"block");if(De=="return")return ke(se,B,"block",0);if(ge=="variable-2"&&B.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return ke(se,B,"block")}return se.context.type},de.parens=function($,B,se){if($=="(")return ke(se,B,"parens");if($==")")return se.context.prev.type=="parens"?Je(se):B.string.match(/^[a-z][\w-]*\(/i)&&Me(B)||ce(Le(B))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Le(B))||!B.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&U(Le(B))?ke(se,B,"block"):B.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||B.string.match(/^\s*(\(|\)|[0-9])/)||B.string.match(/^\s+[a-z][\w-]*\(/i)||B.string.match(/^\s+[\$-]?[a-z]/i)?ke(se,B,"block",0):Me(B)?ke(se,B,"block"):ke(se,B,"block",0);if($&&$.charAt(0)=="@"&&Z(B.current().slice(1))&&(ge="variable-2"),$=="word"){var De=B.current();ge=te(De),ge=="tag"&&re.test(De)&&(ge="variable-2"),(ge=="property"||De=="to")&&(ge="atom")}return $=="variable-name"?ke(se,B,"variableName"):Ue($,B)?ke(se,B,"pseudo"):se.context.type},de.vendorPrefixes=function($,B,se){return $=="word"?(ge="property",ke(se,B,"block",0)):Je(se)},de.pseudo=function($,B,se){return Z(Le(B.string))?Ge($,B,se):(B.match(/^[a-z-]+/),ge="variable-3",Me(B)?ke(se,B,"block"):Je(se))},de.atBlock=function($,B,se){if($=="(")return ke(se,B,"atBlock_parens");if(fe($,B))return ke(se,B,"block");if(oe($,B))return ke(se,B,"interpolation");if($=="word"){var De=B.current().toLowerCase();if(/^(only|not|and|or)$/.test(De)?ge="keyword":R.hasOwnProperty(De)?ge="tag":K.hasOwnProperty(De)?ge="attribute":x.hasOwnProperty(De)?ge="property":O.hasOwnProperty(De)?ge="string-2":ge=te(B.current()),ge=="tag"&&Me(B))return ke(se,B,"block")}return $=="operator"&&/^(not|and|or)$/.test(B.current())&&(ge="keyword"),se.context.type},de.atBlock_parens=function($,B,se){if($=="{"||$=="}")return se.context.type;if($==")")return Me(B)?ke(se,B,"block"):ke(se,B,"atBlock");if($=="word"){var De=B.current().toLowerCase();return ge=te(De),/^(max|min)/.test(De)&&(ge="property"),ge=="tag"&&(re.test(De)?ge="variable-2":ge="atom"),se.context.type}return de.atBlock($,B,se)},de.keyframes=function($,B,se){return B.indentation()=="0"&&($=="}"&&we(B)||$=="]"||$=="hash"||$=="qualifier"||U(B.current()))?Ge($,B,se):$=="{"?ke(se,B,"keyframes"):$=="}"?we(B)?Je(se,!0):ke(se,B,"keyframes"):$=="unit"&&/^[0-9]+\%$/.test(B.current())?ke(se,B,"keyframes"):$=="word"&&(ge=te(B.current()),ge=="block-keyword")?(ge="keyword",ke(se,B,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test($)?ke(se,B,Me(B)?"block":"atBlock"):$=="mixin"?ke(se,B,"block",0):se.context.type},de.interpolation=function($,B,se){return $=="{"&&Je(se)&&ke(se,B,"block"),$=="}"?B.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||B.string.match(/^\s*[a-z]/i)&&U(Le(B))?ke(se,B,"block"):!B.string.match(/^(\{|\s*\&)/)||B.match(/\s*[\w-]/,!1)?ke(se,B,"block",0):ke(se,B,"block"):$=="variable-name"?ke(se,B,"variableName",0):($=="word"&&(ge=te(B.current()),ge=="tag"&&(ge="atom")),se.context.type)},de.extend=function($,B,se){return $=="["||$=="="?"extend":$=="]"?Je(se):$=="word"?(ge=te(B.current()),"extend"):Je(se)},de.variableName=function($,B,se){return $=="string"||$=="["||$=="]"||B.current().match(/^(\.|\$)/)?(B.current().match(/^\.[\w-]+/i)&&(ge="variable-2"),"variableName"):Ge($,B,se)},{startState:function($){return{tokenize:null,state:"block",context:new Ze("block",$||0,null)}},token:function($,B){return!B.tokenize&&$.eatSpace()?null:(pe=(B.tokenize||Oe)($,B),pe&&typeof pe=="object"&&(Ee=pe[1],pe=pe[0]),ge=pe,B.state=de[B.state](Ee,$,B),ge)},indent:function($,B,se){var De=$.context,nt=B&&B.charAt(0),dt=De.indent,Pt=Le(B),Ft=se.match(/^\s*/)[0].replace(/\t/g,G).length,Pe=$.context.prev?$.context.prev.line.firstWord:"",xt=$.context.prev?$.context.prev.line.indent:Ft;return De.prev&&(nt=="}"&&(De.type=="block"||De.type=="atBlock"||De.type=="keyframes")||nt==")"&&(De.type=="parens"||De.type=="atBlock_parens")||nt=="{"&&De.type=="at")?dt=De.indent-N:/(\})/.test(nt)||(/@|\$|\d/.test(nt)||/^\{/.test(B)||/^\s*\/(\/|\*)/.test(B)||/^\s*\/\*/.test(Pe)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(B)||/^(\+|-)?[a-z][\w-]*\(/i.test(B)||/^return/.test(B)||ce(Pt)?dt=Ft:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(nt)||U(Pt)?/\,\s*$/.test(Pe)?dt=xt:/^\s+/.test(se)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Pe)||U(Pe))?dt=Ft<=xt?xt:xt+N:dt=Ft:!/,\s*$/.test(se)&&(Be(Pt)||Z(Pt))&&(ce(Pe)?dt=Ft<=xt?xt:xt+N:/^\{/.test(Pe)?dt=Ft<=xt?Ft:xt+N:Be(Pe)||Z(Pe)?dt=Ft>=xt?xt:Ft:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(Pe)||/=\s*$/.test(Pe)||U(Pe)||/^\$[\w-\.\[\]\'\"]/.test(Pe)?dt=xt+N:dt=Ft)),dt},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"indent"}});var p=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],v=["domain","regexp","url-prefix","url"],C=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"],S=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],s=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],T=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],y=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],c=["for","if","else","unless","from","to"],d=["null","true","false","href","title","type","not-allowed","readonly","disabled"],k=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],z=p.concat(v,C,b,S,s,g,T,h,y,c,d,k);function M(E){return E=E.sort(function(N,G){return G>N}),new RegExp("^(("+E.join(")|(")+"))\\b")}function w(E){for(var N={},G=0;G{(function(o){typeof Gu=="object"&&typeof Zu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(q){for(var O={},D=0;D~^?!",h=":;,.(){}[]",g=/^\-?0b[01][01_]*/,T=/^\-?0o[0-7][0-7_]*/,y=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,c=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,d=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,k=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,z=/^\#[A-Za-z]+/,M=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function w(q,O,D){if(q.sol()&&(O.indented=q.indentation()),q.eatSpace())return null;var Q=q.peek();if(Q=="/"){if(q.match("//"))return q.skipToEnd(),"comment";if(q.match("/*"))return O.tokenize.push(N),N(q,O)}if(q.match(z))return"builtin";if(q.match(M))return"attribute";if(q.match(g)||q.match(T)||q.match(y)||q.match(c))return"number";if(q.match(k))return"property";if(s.indexOf(Q)>-1)return q.next(),"operator";if(h.indexOf(Q)>-1)return q.next(),q.match(".."),"punctuation";var R;if(R=q.match(/("""|"|')/)){var V=E.bind(null,R[0]);return O.tokenize.push(V),V(q,O)}if(q.match(d)){var x=q.current();return S.hasOwnProperty(x)?"variable-2":b.hasOwnProperty(x)?"atom":v.hasOwnProperty(x)?(C.hasOwnProperty(x)&&(O.prev="define"),"keyword"):D=="define"?"def":"variable"}return q.next(),null}function W(){var q=0;return function(O,D,Q){var R=w(O,D,Q);if(R=="punctuation"){if(O.current()=="(")++q;else if(O.current()==")"){if(q==0)return O.backUp(1),D.tokenize.pop(),D.tokenize[D.tokenize.length-1](O,D);--q}}return R}}function E(q,O,D){for(var Q=q.length==1,R,V=!1;R=O.peek();)if(V){if(O.next(),R=="(")return D.tokenize.push(W()),"string";V=!1}else{if(O.match(q))return D.tokenize.pop(),"string";O.next(),V=R=="\\"}return Q&&D.tokenize.pop(),"string"}function N(q,O){for(var D;D=q.next();)if(D==="/"&&q.eat("*"))O.tokenize.push(N);else if(D==="*"&&q.eat("/")){O.tokenize.pop();break}return"comment"}function G(q,O,D){this.prev=q,this.align=O,this.indented=D}function J(q,O){var D=O.match(/^\s*($|\/[\/\*])/,!1)?null:O.column()+1;q.context=new G(q.context,D,q.indented)}function re(q){q.context&&(q.indented=q.context.indented,q.context=q.context.prev)}o.defineMode("swift",function(q){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(O,D){var Q=D.prev;D.prev=null;var R=D.tokenize[D.tokenize.length-1]||w,V=R(O,D,Q);if(!V||V=="comment"?D.prev=Q:D.prev||(D.prev=V),V=="punctuation"){var x=/[\(\[\{]|([\]\)\}])/.exec(O.current());x&&(x[1]?re:J)(D,O)}return V},indent:function(O,D){var Q=O.context;if(!Q)return 0;var R=/^[\]\}\)]/.test(D);return Q.align!=null?Q.align-(R?1:0):Q.indented+(R?0:q.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace",closeBrackets:"()[]{}''\"\"``"}}),o.defineMIME("text/x-swift","swift")})});var Vu=Ke((Yu,Qu)=>{(function(o){typeof Yu=="object"&&typeof Qu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("coffeescript",function(p,v){var C="error";function b(O){return new RegExp("^(("+O.join(")|(")+"))\\b")}var S=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,s=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,h=/^[_A-Za-z$][_A-Za-z$0-9]*/,g=/^@[_A-Za-z$][_A-Za-z$0-9]*/,T=b(["and","or","not","is","isnt","in","instanceof","typeof"]),y=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],c=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],d=b(y.concat(c));y=b(y);var k=/^('{3}|\"{3}|['\"])/,z=/^(\/{3}|\/)/,M=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],w=b(M);function W(O,D){if(O.sol()){D.scope.align===null&&(D.scope.align=!1);var Q=D.scope.offset;if(O.eatSpace()){var R=O.indentation();return R>Q&&D.scope.type=="coffee"?"indent":R0&&J(O,D)}if(O.eatSpace())return null;var V=O.peek();if(O.match("####"))return O.skipToEnd(),"comment";if(O.match("###"))return D.tokenize=N,D.tokenize(O,D);if(V==="#")return O.skipToEnd(),"comment";if(O.match(/^-?[0-9\.]/,!1)){var x=!1;if(O.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(x=!0),O.match(/^-?\d+\.\d*/)&&(x=!0),O.match(/^-?\.\d+/)&&(x=!0),x)return O.peek()=="."&&O.backUp(1),"number";var K=!1;if(O.match(/^-?0x[0-9a-f]+/i)&&(K=!0),O.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(K=!0),O.match(/^-?0(?![\dx])/i)&&(K=!0),K)return"number"}if(O.match(k))return D.tokenize=E(O.current(),!1,"string"),D.tokenize(O,D);if(O.match(z)){if(O.current()!="/"||O.match(/^.*\//,!1))return D.tokenize=E(O.current(),!0,"string-2"),D.tokenize(O,D);O.backUp(1)}return O.match(S)||O.match(T)?"operator":O.match(s)?"punctuation":O.match(w)?"atom":O.match(g)||D.prop&&O.match(h)?"property":O.match(d)?"keyword":O.match(h)?"variable":(O.next(),C)}function E(O,D,Q){return function(R,V){for(;!R.eol();)if(R.eatWhile(/[^'"\/\\]/),R.eat("\\")){if(R.next(),D&&R.eol())return Q}else{if(R.match(O))return V.tokenize=W,Q;R.eat(/['"\/]/)}return D&&(v.singleLineStringErrors?Q=C:V.tokenize=W),Q}}function N(O,D){for(;!O.eol();){if(O.eatWhile(/[^#]/),O.match("###")){D.tokenize=W;break}O.eatWhile("#")}return"comment"}function G(O,D,Q){Q=Q||"coffee";for(var R=0,V=!1,x=null,K=D.scope;K;K=K.prev)if(K.type==="coffee"||K.type=="}"){R=K.offset+p.indentUnit;break}Q!=="coffee"?(V=null,x=O.column()+O.current().length):D.scope.align&&(D.scope.align=!1),D.scope={offset:R,type:Q,prev:D.scope,align:V,alignOffset:x}}function J(O,D){if(D.scope.prev)if(D.scope.type==="coffee"){for(var Q=O.indentation(),R=!1,V=D.scope;V;V=V.prev)if(Q===V.offset){R=!0;break}if(!R)return!0;for(;D.scope.prev&&D.scope.offset!==Q;)D.scope=D.scope.prev;return!1}else return D.scope=D.scope.prev,!1}function re(O,D){var Q=D.tokenize(O,D),R=O.current();R==="return"&&(D.dedent=!0),((R==="->"||R==="=>")&&O.eol()||Q==="indent")&&G(O,D);var V="[({".indexOf(R);if(V!==-1&&G(O,D,"])}".slice(V,V+1)),y.exec(R)&&G(O,D),R=="then"&&J(O,D),Q==="dedent"&&J(O,D))return C;if(V="])}".indexOf(R),V!==-1){for(;D.scope.type=="coffee"&&D.scope.prev;)D.scope=D.scope.prev;D.scope.type==R&&(D.scope=D.scope.prev)}return D.dedent&&O.eol()&&(D.scope.type=="coffee"&&D.scope.prev&&(D.scope=D.scope.prev),D.dedent=!1),Q}var q={startState:function(O){return{tokenize:W,scope:{offset:O||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(O,D){var Q=D.scope.align===null&&D.scope;Q&&O.sol()&&(Q.align=!1);var R=re(O,D);return R&&R!="comment"&&(Q&&(Q.align=!0),D.prop=R=="punctuation"&&O.current()=="."),R},indent:function(O,D){if(O.tokenize!=W)return 0;var Q=O.scope,R=D&&"])}".indexOf(D.charAt(0))>-1;if(R)for(;Q.type=="coffee"&&Q.prev;)Q=Q.prev;var V=R&&Q.type===D.charAt(0);return Q.align?Q.alignOffset-(V?1:0):(V?Q.prev:Q).offset},lineComment:"#",fold:"indent"};return q}),o.defineMIME("application/vnd.coffeescript","coffeescript"),o.defineMIME("text/x-coffeescript","coffeescript"),o.defineMIME("text/coffeescript","coffeescript")})});var tc=Ke((Ju,ec)=>{(function(o){typeof Ju=="object"&&typeof ec=="object"?o(We(),vn(),gn(),Qn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../javascript/javascript","../css/css","../htmlmixed/htmlmixed"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("pug",function(p){var v="keyword",C="meta",b="builtin",S="qualifier",s={"{":"}","(":")","[":"]"},h=o.getMode(p,"javascript");function g(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=o.startState(h),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}g.prototype.copy=function(){var U=new g;return U.javaScriptLine=this.javaScriptLine,U.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,U.javaScriptArguments=this.javaScriptArguments,U.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,U.isInterpolating=this.isInterpolating,U.interpolationNesting=this.interpolationNesting,U.jsState=o.copyState(h,this.jsState),U.innerMode=this.innerMode,this.innerMode&&this.innerState&&(U.innerState=o.copyState(this.innerMode,this.innerState)),U.restOfLine=this.restOfLine,U.isIncludeFiltered=this.isIncludeFiltered,U.isEach=this.isEach,U.lastTag=this.lastTag,U.scriptType=this.scriptType,U.isAttrs=this.isAttrs,U.attrsNest=this.attrsNest.slice(),U.inAttributeName=this.inAttributeName,U.attributeIsType=this.attributeIsType,U.attrValue=this.attrValue,U.indentOf=this.indentOf,U.indentToken=this.indentToken,U.innerModeForLine=this.innerModeForLine,U};function T(U,Z){if(U.sol()&&(Z.javaScriptLine=!1,Z.javaScriptLineExcludesColon=!1),Z.javaScriptLine){if(Z.javaScriptLineExcludesColon&&U.peek()===":"){Z.javaScriptLine=!1,Z.javaScriptLineExcludesColon=!1;return}var ce=h.token(U,Z.jsState);return U.eol()&&(Z.javaScriptLine=!1),ce||!0}}function y(U,Z){if(Z.javaScriptArguments){if(Z.javaScriptArgumentsDepth===0&&U.peek()!=="("){Z.javaScriptArguments=!1;return}if(U.peek()==="("?Z.javaScriptArgumentsDepth++:U.peek()===")"&&Z.javaScriptArgumentsDepth--,Z.javaScriptArgumentsDepth===0){Z.javaScriptArguments=!1;return}var ce=h.token(U,Z.jsState);return ce||!0}}function c(U){if(U.match(/^yield\b/))return"keyword"}function d(U){if(U.match(/^(?:doctype) *([^\n]+)?/))return C}function k(U,Z){if(U.match("#{"))return Z.isInterpolating=!0,Z.interpolationNesting=0,"punctuation"}function z(U,Z){if(Z.isInterpolating){if(U.peek()==="}"){if(Z.interpolationNesting--,Z.interpolationNesting<0)return U.next(),Z.isInterpolating=!1,"punctuation"}else U.peek()==="{"&&Z.interpolationNesting++;return h.token(U,Z.jsState)||!0}}function M(U,Z){if(U.match(/^case\b/))return Z.javaScriptLine=!0,v}function w(U,Z){if(U.match(/^when\b/))return Z.javaScriptLine=!0,Z.javaScriptLineExcludesColon=!0,v}function W(U){if(U.match(/^default\b/))return v}function E(U,Z){if(U.match(/^extends?\b/))return Z.restOfLine="string",v}function N(U,Z){if(U.match(/^append\b/))return Z.restOfLine="variable",v}function G(U,Z){if(U.match(/^prepend\b/))return Z.restOfLine="variable",v}function J(U,Z){if(U.match(/^block\b *(?:(prepend|append)\b)?/))return Z.restOfLine="variable",v}function re(U,Z){if(U.match(/^include\b/))return Z.restOfLine="string",v}function q(U,Z){if(U.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&U.match("include"))return Z.isIncludeFiltered=!0,v}function O(U,Z){if(Z.isIncludeFiltered){var ce=H(U,Z);return Z.isIncludeFiltered=!1,Z.restOfLine="string",ce}}function D(U,Z){if(U.match(/^mixin\b/))return Z.javaScriptLine=!0,v}function Q(U,Z){if(U.match(/^\+([-\w]+)/))return U.match(/^\( *[-\w]+ *=/,!1)||(Z.javaScriptArguments=!0,Z.javaScriptArgumentsDepth=0),"variable";if(U.match("+#{",!1))return U.next(),Z.mixinCallAfter=!0,k(U,Z)}function R(U,Z){if(Z.mixinCallAfter)return Z.mixinCallAfter=!1,U.match(/^\( *[-\w]+ *=/,!1)||(Z.javaScriptArguments=!0,Z.javaScriptArgumentsDepth=0),!0}function V(U,Z){if(U.match(/^(if|unless|else if|else)\b/))return Z.javaScriptLine=!0,v}function x(U,Z){if(U.match(/^(- *)?(each|for)\b/))return Z.isEach=!0,v}function K(U,Z){if(Z.isEach){if(U.match(/^ in\b/))return Z.javaScriptLine=!0,Z.isEach=!1,v;if(U.sol()||U.eol())Z.isEach=!1;else if(U.next()){for(;!U.match(/^ in\b/,!1)&&U.next(););return"variable"}}}function X(U,Z){if(U.match(/^while\b/))return Z.javaScriptLine=!0,v}function I(U,Z){var ce;if(ce=U.match(/^(\w(?:[-:\w]*\w)?)\/?/))return Z.lastTag=ce[1].toLowerCase(),Z.lastTag==="script"&&(Z.scriptType="application/javascript"),"tag"}function H(U,Z){if(U.match(/^:([\w\-]+)/)){var ce;return p&&p.innerModes&&(ce=p.innerModes(U.current().substring(1))),ce||(ce=U.current().substring(1)),typeof ce=="string"&&(ce=o.getMode(p,ce)),je(U,Z,ce),"atom"}}function le(U,Z){if(U.match(/^(!?=|-)/))return Z.javaScriptLine=!0,"punctuation"}function xe(U){if(U.match(/^#([\w-]+)/))return b}function F(U){if(U.match(/^\.([\w-]+)/))return S}function L(U,Z){if(U.peek()=="(")return U.next(),Z.isAttrs=!0,Z.attrsNest=[],Z.inAttributeName=!0,Z.attrValue="",Z.attributeIsType=!1,"punctuation"}function de(U,Z){if(Z.isAttrs){if(s[U.peek()]&&Z.attrsNest.push(s[U.peek()]),Z.attrsNest[Z.attrsNest.length-1]===U.peek())Z.attrsNest.pop();else if(U.eat(")"))return Z.isAttrs=!1,"punctuation";if(Z.inAttributeName&&U.match(/^[^=,\)!]+/))return(U.peek()==="="||U.peek()==="!")&&(Z.inAttributeName=!1,Z.jsState=o.startState(h),Z.lastTag==="script"&&U.current().trim().toLowerCase()==="type"?Z.attributeIsType=!0:Z.attributeIsType=!1),"attribute";var ce=h.token(U,Z.jsState);if(Z.attributeIsType&&ce==="string"&&(Z.scriptType=U.current().toString()),Z.attrsNest.length===0&&(ce==="string"||ce==="variable"||ce==="keyword"))try{return Function("","var x "+Z.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),Z.inAttributeName=!0,Z.attrValue="",U.backUp(U.current().length),de(U,Z)}catch{}return Z.attrValue+=U.current(),ce||!0}}function ze(U,Z){if(U.match(/^&attributes\b/))return Z.javaScriptArguments=!0,Z.javaScriptArgumentsDepth=0,"keyword"}function pe(U){if(U.sol()&&U.eatSpace())return"indent"}function Ee(U,Z){if(U.match(/^ *\/\/(-)?([^\n]*)/))return Z.indentOf=U.indentation(),Z.indentToken="comment","comment"}function ge(U){if(U.match(/^: */))return"colon"}function Oe(U,Z){if(U.match(/^(?:\| ?| )([^\n]+)/))return"string";if(U.match(/^(<[^\n]*)/,!1))return je(U,Z,"htmlmixed"),Z.innerModeForLine=!0,Ze(U,Z,!0)}function qe(U,Z){if(U.eat(".")){var ce=null;return Z.lastTag==="script"&&Z.scriptType.toLowerCase().indexOf("javascript")!=-1?ce=Z.scriptType.toLowerCase().replace(/"|'/g,""):Z.lastTag==="style"&&(ce="css"),je(U,Z,ce),"dot"}}function Se(U){return U.next(),null}function je(U,Z,ce){ce=o.mimeModes[ce]||ce,ce=p.innerModes&&p.innerModes(ce)||ce,ce=o.mimeModes[ce]||ce,ce=o.getMode(p,ce),Z.indentOf=U.indentation(),ce&&ce.name!=="null"?Z.innerMode=ce:Z.indentToken="string"}function Ze(U,Z,ce){if(U.indentation()>Z.indentOf||Z.innerModeForLine&&!U.sol()||ce)return Z.innerMode?(Z.innerState||(Z.innerState=Z.innerMode.startState?o.startState(Z.innerMode,U.indentation()):{}),U.hideFirstChars(Z.indentOf+2,function(){return Z.innerMode.token(U,Z.innerState)||!0})):(U.skipToEnd(),Z.indentToken);U.sol()&&(Z.indentOf=1/0,Z.indentToken=null,Z.innerMode=null,Z.innerState=null)}function ke(U,Z){if(U.sol()&&(Z.restOfLine=""),Z.restOfLine){U.skipToEnd();var ce=Z.restOfLine;return Z.restOfLine="",ce}}function Je(){return new g}function He(U){return U.copy()}function Ge(U,Z){var ce=Ze(U,Z)||ke(U,Z)||z(U,Z)||O(U,Z)||K(U,Z)||de(U,Z)||T(U,Z)||y(U,Z)||R(U,Z)||c(U)||d(U)||k(U,Z)||M(U,Z)||w(U,Z)||W(U)||E(U,Z)||N(U,Z)||G(U,Z)||J(U,Z)||re(U,Z)||q(U,Z)||D(U,Z)||Q(U,Z)||V(U,Z)||x(U,Z)||X(U,Z)||I(U,Z)||H(U,Z)||le(U,Z)||xe(U)||F(U)||L(U,Z)||ze(U,Z)||pe(U)||Oe(U,Z)||Ee(U,Z)||ge(U)||qe(U,Z)||Se(U);return ce===!0?null:ce}return{startState:Je,copyState:He,token:Ge}},"javascript","css","htmlmixed"),o.defineMIME("text/x-pug","pug"),o.defineMIME("text/x-jade","pug")})});var ic=Ke((rc,nc)=>{(function(o){typeof rc=="object"&&typeof nc=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.multiplexingMode=function(p){var v=Array.prototype.slice.call(arguments,1);function C(b,S,s,h){if(typeof S=="string"){var g=b.indexOf(S,s);return h&&g>-1?g+S.length:g}var T=S.exec(s?b.slice(s):b);return T?T.index+s+(h?T[0].length:0):-1}return{startState:function(){return{outer:o.startState(p),innerActive:null,inner:null,startingInner:!1}},copyState:function(b){return{outer:o.copyState(p,b.outer),innerActive:b.innerActive,inner:b.innerActive&&o.copyState(b.innerActive.mode,b.inner),startingInner:b.startingInner}},token:function(b,S){if(S.innerActive){var z=S.innerActive,h=b.string;if(!z.close&&b.sol())return S.innerActive=S.inner=null,this.token(b,S);var y=z.close&&!S.startingInner?C(h,z.close,b.pos,z.parseDelimiters):-1;if(y==b.pos&&!z.parseDelimiters)return b.match(z.close),S.innerActive=S.inner=null,z.delimStyle&&z.delimStyle+" "+z.delimStyle+"-close";y>-1&&(b.string=h.slice(0,y));var M=z.mode.token(b,S.inner);return y>-1?b.string=h:b.pos>b.start&&(S.startingInner=!1),y==b.pos&&z.parseDelimiters&&(S.innerActive=S.inner=null),z.innerStyle&&(M?M=M+" "+z.innerStyle:M=z.innerStyle),M}else{for(var s=1/0,h=b.string,g=0;g{(function(o){typeof oc=="object"&&typeof ac=="object"?o(We(),Di(),ic()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),o.defineMode("handlebars",function(p,v){var C=o.getMode(p,"handlebars-tags");return!v||!v.base?C:o.multiplexingMode(o.getMode(p,v.base),{open:"{{",close:/\}\}\}?/,mode:C,parseDelimiters:!0})}),o.defineMIME("text/x-handlebars-template","handlebars")})});var cc=Ke((sc,uc)=>{(function(o){"use strict";typeof sc=="object"&&typeof uc=="object"?o(We(),Yn(),mn(),vn(),Vu(),gn(),ea(),ta(),tc(),lc()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],o):o(CodeMirror)})(function(o){var p={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};o.defineMode("vue-template",function(v,C){var b={token:function(S){if(S.match(/^\{\{.*?\}\}/))return"meta mustache";for(;S.next()&&!S.match("{{",!1););return null}};return o.overlayMode(o.getMode(v,C.backdrop||"text/html"),b)}),o.defineMode("vue",function(v){return o.getMode(v,{name:"htmlmixed",tags:p})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),o.defineMIME("script/x-vue","vue"),o.defineMIME("text/x-vue","vue")})});var pc=Ke((fc,dc)=>{(function(o){typeof fc=="object"&&typeof dc=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("yaml",function(){var p=["true","false","on","off","yes","no"],v=new RegExp("\\b(("+p.join(")|(")+"))$","i");return{token:function(C,b){var S=C.peek(),s=b.escaped;if(b.escaped=!1,S=="#"&&(C.pos==0||/\s/.test(C.string.charAt(C.pos-1))))return C.skipToEnd(),"comment";if(C.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(b.literal&&C.indentation()>b.keyCol)return C.skipToEnd(),"string";if(b.literal&&(b.literal=!1),C.sol()){if(b.keyCol=0,b.pair=!1,b.pairStart=!1,C.match("---")||C.match("..."))return"def";if(C.match(/\s*-\s+/))return"meta"}if(C.match(/^(\{|\}|\[|\])/))return S=="{"?b.inlinePairs++:S=="}"?b.inlinePairs--:S=="["?b.inlineList++:b.inlineList--,"meta";if(b.inlineList>0&&!s&&S==",")return C.next(),"meta";if(b.inlinePairs>0&&!s&&S==",")return b.keyCol=0,b.pair=!1,b.pairStart=!1,C.next(),"meta";if(b.pairStart){if(C.match(/^\s*(\||\>)\s*/))return b.literal=!0,"meta";if(C.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(b.inlinePairs==0&&C.match(/^\s*-?[0-9\.\,]+\s?$/)||b.inlinePairs>0&&C.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(C.match(v))return"keyword"}return!b.pair&&C.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(b.pair=!0,b.keyCol=C.indentation(),"atom"):b.pair&&C.match(/^:\s*/)?(b.pairStart=!0,"meta"):(b.pairStart=!1,b.escaped=S=="\\",C.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),o.defineMIME("text/x-yaml","yaml"),o.defineMIME("text/yaml","yaml")})});var $d={};function qd(o){for(var p;(p=Md.exec(o))!==null;){var v=p[0];if(v.indexOf("target=")===-1){var C=v.replace(/>$/,' target="_blank">');o=o.replace(v,C)}}return o}function Id(o){for(var p=new DOMParser,v=p.parseFromString(o,"text/html"),C=v.getElementsByTagName("li"),b=0;b0){for(var d=document.createElement("i"),w=0;w{(function(o){typeof oc=="object"&&typeof ac=="object"?o(We(),Di(),ic()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),o.defineMode("handlebars",function(p,v){var C=o.getMode(p,"handlebars-tags");return!v||!v.base?C:o.multiplexingMode(o.getMode(p,v.base),{open:"{{",close:/\}\}\}?/,mode:C,parseDelimiters:!0})}),o.defineMIME("text/x-handlebars-template","handlebars")})});var cc=Ke((sc,uc)=>{(function(o){"use strict";typeof sc=="object"&&typeof uc=="object"?o(We(),Yn(),mn(),vn(),Vu(),gn(),ea(),ta(),tc(),lc()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],o):o(CodeMirror)})(function(o){var p={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};o.defineMode("vue-template",function(v,C){var b={token:function(S){if(S.match(/^\{\{.*?\}\}/))return"meta mustache";for(;S.next()&&!S.match("{{",!1););return null}};return o.overlayMode(o.getMode(v,C.backdrop||"text/html"),b)}),o.defineMode("vue",function(v){return o.getMode(v,{name:"htmlmixed",tags:p})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),o.defineMIME("script/x-vue","vue"),o.defineMIME("text/x-vue","vue")})});var pc=Ke((fc,dc)=>{(function(o){typeof fc=="object"&&typeof dc=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("yaml",function(){var p=["true","false","on","off","yes","no"],v=new RegExp("\\b(("+p.join(")|(")+"))$","i");return{token:function(C,b){var S=C.peek(),s=b.escaped;if(b.escaped=!1,S=="#"&&(C.pos==0||/\s/.test(C.string.charAt(C.pos-1))))return C.skipToEnd(),"comment";if(C.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(b.literal&&C.indentation()>b.keyCol)return C.skipToEnd(),"string";if(b.literal&&(b.literal=!1),C.sol()){if(b.keyCol=0,b.pair=!1,b.pairStart=!1,C.match("---")||C.match("..."))return"def";if(C.match(/\s*-\s+/))return"meta"}if(C.match(/^(\{|\}|\[|\])/))return S=="{"?b.inlinePairs++:S=="}"?b.inlinePairs--:S=="["?b.inlineList++:b.inlineList--,"meta";if(b.inlineList>0&&!s&&S==",")return C.next(),"meta";if(b.inlinePairs>0&&!s&&S==",")return b.keyCol=0,b.pair=!1,b.pairStart=!1,C.next(),"meta";if(b.pairStart){if(C.match(/^\s*(\||\>)\s*/))return b.literal=!0,"meta";if(C.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(b.inlinePairs==0&&C.match(/^\s*-?[0-9\.\,]+\s?$/)||b.inlinePairs>0&&C.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(C.match(v))return"keyword"}return!b.pair&&C.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(b.pair=!0,b.keyCol=C.indentation(),"atom"):b.pair&&C.match(/^:\s*/)?(b.pairStart=!0,"meta"):(b.pairStart=!1,b.escaped=S=="\\",C.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),o.defineMIME("text/x-yaml","yaml"),o.defineMIME("text/yaml","yaml")})});var $d={};function qd(o){for(var p;(p=Md.exec(o))!==null;){var v=p[0];if(v.indexOf("target=")===-1){var C=v.replace(/>$/,' target="_blank">');o=o.replace(v,C)}}return o}function Fd(o){for(var p=new DOMParser,v=p.parseFromString(o,"text/html"),C=v.getElementsByTagName("li"),b=0;b0){for(var d=document.createElement("i"),k=0;k=0&&(x=s.getLineHandle(d),!v(x));d--);var R=s.getTokenAt({line:d,ch:1}),M=C(R).fencedChars,H,Z,ee,re;v(s.getLineHandle(h.line))?(H="",Z=h.line):v(s.getLineHandle(h.line-1))?(H="",Z=h.line-1):(H=M+` -`,Z=h.line),v(s.getLineHandle(g.line))?(ee="",re=g.line,g.ch===0&&(re+=1)):g.ch!==0&&v(s.getLineHandle(g.line+1))?(ee="",re=g.line+1):(ee=M+` -`,re=g.line+1),g.ch===0&&(re-=1),s.operation(function(){s.replaceRange(ee,{line:re,ch:0},{line:re+(ee?0:1),ch:0}),s.replaceRange(H,{line:Z,ch:0},{line:Z+(H?0:1),ch:0})}),s.setSelection({line:Z+(H?1:0),ch:0},{line:re+(H?1:-1),ch:0}),s.focus()}else{var N=h.line;if(v(s.getLineHandle(h.line))&&(b(s,h.line+1)==="fenced"?(d=h.line,N=h.line+1):(w=h.line,N=h.line-1)),d===void 0)for(d=N;d>=0&&(x=s.getLineHandle(d),!v(x));d--);if(w===void 0)for(E=s.lineCount(),w=N;w=0;d--)if(x=s.getLineHandle(d),!x.text.match(/^\s*$/)&&b(s,d,x)!=="indented"){d+=1;break}for(E=s.lineCount(),w=h.line;w\s+/,"unordered-list":C,"ordered-list":C},T=function(E,z){var y={quote:">","unordered-list":v,"ordered-list":"%%i."};return y[E].replace("%%i",z)},x=function(E,z){var y={quote:">","unordered-list":"\\"+v,"ordered-list":"\\d+."},R=new RegExp(y[E]);return z&&R.test(z)},c=function(E,z,y){var R=C.exec(z),M=T(E,d);return R!==null?(x(E,R[2])&&(M=""),z=R[1]+M+R[3]+z.replace(b,"").replace(g[E],"$1")):y==!1&&(z=M+" "+z),z},d=1,w=s.line;w<=h.line;w++)(function(E){var z=o.getLine(E);S[p]?z=z.replace(g[p],"$1"):(p=="unordered-list"&&(z=c("ordered-list",z,!0)),z=c(p,z,!1),d+=1),o.replaceRange(z,{line:E,ch:0},{line:E,ch:99999999999999})})(w);o.focus()}}function xc(o,p,v,C){if(!(!o.codemirror||o.isPreviewActive())){var b=o.codemirror,S=Tr(b),s=S[p];if(!s){Rr(b,s,v,C);return}var h=b.getCursor("start"),g=b.getCursor("end"),T=b.getLine(h.line),x=T.slice(0,h.ch),c=T.slice(h.ch);p=="link"?x=x.replace(/(.*)[^!]\[/,"$1"):p=="image"&&(x=x.replace(/(.*)!\[$/,"$1")),c=c.replace(/]\(.*?\)/,""),b.replaceRange(x+c,{line:h.line,ch:0},{line:h.line,ch:99999999999999}),h.ch-=v[0].length,h!==g&&(g.ch-=v[0].length),b.setSelection(h,g),b.focus()}}function sa(o,p,v,C){if(!(!o.codemirror||o.isPreviewActive())){C=typeof C>"u"?v:C;var b=o.codemirror,S=Tr(b),s,h=v,g=C,T=b.getCursor("start"),x=b.getCursor("end");S[p]?(s=b.getLine(T.line),h=s.slice(0,T.ch),g=s.slice(T.ch),p=="bold"?(h=h.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),g=g.replace(/(\*\*|__)/,"")):p=="italic"?(h=h.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),g=g.replace(/(\*|_)/,"")):p=="strikethrough"&&(h=h.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),g=g.replace(/(\*\*|~~)/,"")),b.replaceRange(h+g,{line:T.line,ch:0},{line:T.line,ch:99999999999999}),p=="bold"||p=="strikethrough"?(T.ch-=2,T!==x&&(x.ch-=2)):p=="italic"&&(T.ch-=1,T!==x&&(x.ch-=1))):(s=b.getSelection(),p=="bold"?(s=s.split("**").join(""),s=s.split("__").join("")):p=="italic"?(s=s.split("*").join(""),s=s.split("_").join("")):p=="strikethrough"&&(s=s.split("~~").join("")),b.replaceSelection(h+s+g),T.ch+=v.length,x.ch=T.ch+s.length),b.setSelection(T,x),b.focus()}}function Pd(o){if(!o.getWrapperElement().lastChild.classList.contains("editor-preview-active"))for(var p=o.getCursor("start"),v=o.getCursor("end"),C,b=p.line;b<=v.line;b++)C=o.getLine(b),C=C.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),o.replaceRange(C,{line:b,ch:0},{line:b,ch:99999999999999})}function Ii(o,p){if(Math.abs(o)<1024)return""+o+p[0];var v=0;do o/=1024,++v;while(Math.abs(o)>=1024&&v=19968?C+=v[b].length:C+=1;return C}function Te(o){o=o||{},o.parent=this;var p=!0;if(o.autoDownloadFontAwesome===!1&&(p=!1),o.autoDownloadFontAwesome!==!0)for(var v=document.styleSheets,C=0;C-1&&(p=!1);if(p){var b=document.createElement("link");b.rel="stylesheet",b.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(b)}if(o.element)this.element=o.element;else if(o.element===null){console.log("EasyMDE: Error. No element was found.");return}if(o.toolbar===void 0){o.toolbar=[];for(var S in Pr)Object.prototype.hasOwnProperty.call(Pr,S)&&(S.indexOf("separator-")!=-1&&o.toolbar.push("|"),(Pr[S].default===!0||o.showIcons&&o.showIcons.constructor===Array&&o.showIcons.indexOf(S)!=-1)&&o.toolbar.push(S))}if(Object.prototype.hasOwnProperty.call(o,"previewClass")||(o.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(o,"status")||(o.status=["autosave","lines","words","cursor"],o.uploadImage&&o.status.unshift("upload-image")),o.previewRender||(o.previewRender=function(h){return this.parent.markdown(h)}),o.parsingConfig=fr({highlightFormatting:!0},o.parsingConfig||{}),o.insertTexts=fr({},jd,o.insertTexts||{}),o.promptTexts=fr({},Rd,o.promptTexts||{}),o.blockStyles=fr({},Bd,o.blockStyles||{}),o.autosave!=null&&(o.autosave.timeFormat=fr({},Hd,o.autosave.timeFormat||{})),o.iconClassMap=fr({},et,o.iconClassMap||{}),o.shortcuts=fr({},Ad,o.shortcuts||{}),o.maxHeight=o.maxHeight||void 0,o.direction=o.direction||"ltr",typeof o.maxHeight<"u"?o.minHeight=o.maxHeight:o.minHeight=o.minHeight||"300px",o.errorCallback=o.errorCallback||function(h){alert(h)},o.uploadImage=o.uploadImage||!1,o.imageMaxSize=o.imageMaxSize||2097152,o.imageAccept=o.imageAccept||"image/png, image/jpeg, image/gif, image/avif",o.imageTexts=fr({},Wd,o.imageTexts||{}),o.errorMessages=fr({},Ud,o.errorMessages||{}),o.imagePathAbsolute=o.imagePathAbsolute||!1,o.imageCSRFName=o.imageCSRFName||"csrfmiddlewaretoken",o.imageCSRFHeader=o.imageCSRFHeader||!1,o.autosave!=null&&o.autosave.unique_id!=null&&o.autosave.unique_id!=""&&(o.autosave.uniqueId=o.autosave.unique_id),o.overlayMode&&o.overlayMode.combine===void 0&&(o.overlayMode.combine=!0),this.options=o,this.render(),o.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(o.initialValue),o.uploadImage){var s=this;this.codemirror.on("dragenter",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbOnDragEnter),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragend",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbInit),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragleave",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbInit),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragover",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbOnDragEnter),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("drop",function(h,g){g.stopPropagation(),g.preventDefault(),o.imageUploadFunction?s.uploadImagesUsingCustomFunction(o.imageUploadFunction,g.dataTransfer.files):s.uploadImages(g.dataTransfer.files)}),this.codemirror.on("paste",function(h,g){o.imageUploadFunction?s.uploadImagesUsingCustomFunction(o.imageUploadFunction,g.clipboardData.files):s.uploadImages(g.clipboardData.files)})}}function kc(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch{return!1}else return!1;return!0}var mc,Md,Vn,Ad,Dd,ra,hc,et,Pr,jd,Rd,Hd,Bd,Wd,Ud,wc=Cd(()=>{mc=/Mac/.test(navigator.platform),Md=new RegExp(/()+?/g),Vn={toggleBold:Fi,toggleItalic:Ni,drawLink:Gi,toggleHeadingSmaller:Jn,toggleHeadingBigger:Ri,drawImage:Zi,toggleBlockquote:ji,toggleOrderedList:$i,toggleUnorderedList:Ui,toggleCodeBlock:Pi,togglePreview:Ji,toggleStrikethrough:Oi,toggleHeading1:Hi,toggleHeading2:Bi,toggleHeading3:Wi,toggleHeading4:na,toggleHeading5:ia,toggleHeading6:oa,cleanBlock:Ki,drawTable:Xi,drawHorizontalRule:Yi,undo:Qi,redo:Vi,toggleSideBySide:bn,toggleFullScreen:jr},Ad={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",toggleHeading1:"Ctrl+Alt+1",toggleHeading2:"Ctrl+Alt+2",toggleHeading3:"Ctrl+Alt+3",toggleHeading4:"Ctrl+Alt+4",toggleHeading5:"Ctrl+Alt+5",toggleHeading6:"Ctrl+Alt+6",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Dd=function(o){for(var p in Vn)if(Vn[p]===o)return p;return null},ra=function(){var o=!1;return function(p){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(p)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(p.substr(0,4)))&&(o=!0)}(navigator.userAgent||navigator.vendor||window.opera),o};hc="";et={bold:"fa fa-bold",italic:"fa fa-italic",strikethrough:"fa fa-strikethrough",heading:"fa fa-header fa-heading","heading-smaller":"fa fa-header fa-heading header-smaller","heading-bigger":"fa fa-header fa-heading header-bigger","heading-1":"fa fa-header fa-heading header-1","heading-2":"fa fa-header fa-heading header-2","heading-3":"fa fa-header fa-heading header-3",code:"fa fa-code",quote:"fa fa-quote-left","ordered-list":"fa fa-list-ol","unordered-list":"fa fa-list-ul","clean-block":"fa fa-eraser",link:"fa fa-link",image:"fa fa-image","upload-image":"fa fa-image",table:"fa fa-table","horizontal-rule":"fa fa-minus",preview:"fa fa-eye","side-by-side":"fa fa-columns",fullscreen:"fa fa-arrows-alt",guide:"fa fa-question-circle",undo:"fa fa-undo",redo:"fa fa-repeat fa-redo"},Pr={bold:{name:"bold",action:Fi,className:et.bold,title:"Bold",default:!0},italic:{name:"italic",action:Ni,className:et.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:Oi,className:et.strikethrough,title:"Strikethrough"},heading:{name:"heading",action:Jn,className:et.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:Jn,className:et["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:Ri,className:et["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:Hi,className:et["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:Bi,className:et["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:Wi,className:et["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:Pi,className:et.code,title:"Code"},quote:{name:"quote",action:ji,className:et.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:Ui,className:et["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:$i,className:et["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:Ki,className:et["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:Gi,className:et.link,title:"Create Link",default:!0},image:{name:"image",action:Zi,className:et.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:aa,className:et["upload-image"],title:"Import an image"},table:{name:"table",action:Xi,className:et.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:Yi,className:et["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:Ji,className:et.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:bn,className:et["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:jr,className:et.fullscreen,noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:et.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:Qi,className:et.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:Vi,className:et.redo,noDisable:!0,title:"Redo"}},jd={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["",` +`+H;F&&xe++,F&&I.ch===0&&(de=H+` +`,xe--),Rr(K,!1,[L,de]),K.setSelection({line:le,ch:0},{line:xe,ch:0})}var s=o.codemirror,h=s.getCursor("start"),g=s.getCursor("end"),T=s.getTokenAt({line:h.line,ch:h.ch||1}),y=s.getLineHandle(h.line),c=b(s,h.line,y,T),d,k,z;if(c==="single"){var M=y.text.slice(0,h.ch).replace("`",""),w=y.text.slice(h.ch).replace("`","");s.replaceRange(M+w,{line:h.line,ch:0},{line:h.line,ch:99999999999999}),h.ch--,h!==g&&g.ch--,s.setSelection(h,g),s.focus()}else if(c==="fenced")if(h.line!==g.line||h.ch!==g.ch){for(d=h.line;d>=0&&(y=s.getLineHandle(d),!v(y));d--);var W=s.getTokenAt({line:d,ch:1}),E=C(W).fencedChars,N,G,J,re;v(s.getLineHandle(h.line))?(N="",G=h.line):v(s.getLineHandle(h.line-1))?(N="",G=h.line-1):(N=E+` +`,G=h.line),v(s.getLineHandle(g.line))?(J="",re=g.line,g.ch===0&&(re+=1)):g.ch!==0&&v(s.getLineHandle(g.line+1))?(J="",re=g.line+1):(J=E+` +`,re=g.line+1),g.ch===0&&(re-=1),s.operation(function(){s.replaceRange(J,{line:re,ch:0},{line:re+(J?0:1),ch:0}),s.replaceRange(N,{line:G,ch:0},{line:G+(N?0:1),ch:0})}),s.setSelection({line:G+(N?1:0),ch:0},{line:re+(N?1:-1),ch:0}),s.focus()}else{var q=h.line;if(v(s.getLineHandle(h.line))&&(b(s,h.line+1)==="fenced"?(d=h.line,q=h.line+1):(k=h.line,q=h.line-1)),d===void 0)for(d=q;d>=0&&(y=s.getLineHandle(d),!v(y));d--);if(k===void 0)for(z=s.lineCount(),k=q;k=0;d--)if(y=s.getLineHandle(d),!y.text.match(/^\s*$/)&&b(s,d,y)!=="indented"){d+=1;break}for(z=s.lineCount(),k=h.line;k\s+/,"unordered-list":C,"ordered-list":C},T=function(z,M){var w={quote:">","unordered-list":v,"ordered-list":"%%i."};return w[z].replace("%%i",M)},y=function(z,M){var w={quote:">","unordered-list":"\\"+v,"ordered-list":"\\d+."},W=new RegExp(w[z]);return M&&W.test(M)},c=function(z,M,w){var W=C.exec(M),E=T(z,d);return W!==null?(y(z,W[2])&&(E=""),M=W[1]+E+W[3]+M.replace(b,"").replace(g[z],"$1")):w==!1&&(M=E+" "+M),M},d=1,k=s.line;k<=h.line;k++)(function(z){var M=o.getLine(z);S[p]?M=M.replace(g[p],"$1"):(p=="unordered-list"&&(M=c("ordered-list",M,!0)),M=c(p,M,!1),d+=1),o.replaceRange(M,{line:z,ch:0},{line:z,ch:99999999999999})})(k);o.focus()}}function xc(o,p,v,C){if(!(!o.codemirror||o.isPreviewActive())){var b=o.codemirror,S=Tr(b),s=S[p];if(!s){Rr(b,s,v,C);return}var h=b.getCursor("start"),g=b.getCursor("end"),T=b.getLine(h.line),y=T.slice(0,h.ch),c=T.slice(h.ch);p=="link"?y=y.replace(/(.*)[^!]\[/,"$1"):p=="image"&&(y=y.replace(/(.*)!\[$/,"$1")),c=c.replace(/]\(.*?\)/,""),b.replaceRange(y+c,{line:h.line,ch:0},{line:h.line,ch:99999999999999}),h.ch-=v[0].length,h!==g&&(g.ch-=v[0].length),b.setSelection(h,g),b.focus()}}function sa(o,p,v,C){if(!(!o.codemirror||o.isPreviewActive())){C=typeof C>"u"?v:C;var b=o.codemirror,S=Tr(b),s,h=v,g=C,T=b.getCursor("start"),y=b.getCursor("end");S[p]?(s=b.getLine(T.line),h=s.slice(0,T.ch),g=s.slice(T.ch),p=="bold"?(h=h.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),g=g.replace(/(\*\*|__)/,"")):p=="italic"?(h=h.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),g=g.replace(/(\*|_)/,"")):p=="strikethrough"&&(h=h.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),g=g.replace(/(\*\*|~~)/,"")),b.replaceRange(h+g,{line:T.line,ch:0},{line:T.line,ch:99999999999999}),p=="bold"||p=="strikethrough"?(T.ch-=2,T!==y&&(y.ch-=2)):p=="italic"&&(T.ch-=1,T!==y&&(y.ch-=1))):(s=b.getSelection(),p=="bold"?(s=s.split("**").join(""),s=s.split("__").join("")):p=="italic"?(s=s.split("*").join(""),s=s.split("_").join("")):p=="strikethrough"&&(s=s.split("~~").join("")),b.replaceSelection(h+s+g),T.ch+=v.length,y.ch=T.ch+s.length),b.setSelection(T,y),b.focus()}}function Pd(o){if(!o.getWrapperElement().lastChild.classList.contains("editor-preview-active"))for(var p=o.getCursor("start"),v=o.getCursor("end"),C,b=p.line;b<=v.line;b++)C=o.getLine(b),C=C.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),o.replaceRange(C,{line:b,ch:0},{line:b,ch:99999999999999})}function Fi(o,p){if(Math.abs(o)<1024)return""+o+p[0];var v=0;do o/=1024,++v;while(Math.abs(o)>=1024&&v=19968?C+=v[b].length:C+=1;return C}function Te(o){o=o||{},o.parent=this;var p=!0;if(o.autoDownloadFontAwesome===!1&&(p=!1),o.autoDownloadFontAwesome!==!0)for(var v=document.styleSheets,C=0;C-1&&(p=!1);if(p){var b=document.createElement("link");b.rel="stylesheet",b.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(b)}if(o.element)this.element=o.element;else if(o.element===null){console.log("EasyMDE: Error. No element was found.");return}if(o.toolbar===void 0){o.toolbar=[];for(var S in Pr)Object.prototype.hasOwnProperty.call(Pr,S)&&(S.indexOf("separator-")!=-1&&o.toolbar.push("|"),(Pr[S].default===!0||o.showIcons&&o.showIcons.constructor===Array&&o.showIcons.indexOf(S)!=-1)&&o.toolbar.push(S))}if(Object.prototype.hasOwnProperty.call(o,"previewClass")||(o.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(o,"status")||(o.status=["autosave","lines","words","cursor"],o.uploadImage&&o.status.unshift("upload-image")),o.previewRender||(o.previewRender=function(h){return this.parent.markdown(h)}),o.parsingConfig=fr({highlightFormatting:!0},o.parsingConfig||{}),o.insertTexts=fr({},jd,o.insertTexts||{}),o.promptTexts=fr({},Rd,o.promptTexts||{}),o.blockStyles=fr({},Bd,o.blockStyles||{}),o.autosave!=null&&(o.autosave.timeFormat=fr({},Hd,o.autosave.timeFormat||{})),o.iconClassMap=fr({},et,o.iconClassMap||{}),o.shortcuts=fr({},Ad,o.shortcuts||{}),o.maxHeight=o.maxHeight||void 0,o.direction=o.direction||"ltr",typeof o.maxHeight<"u"?o.minHeight=o.maxHeight:o.minHeight=o.minHeight||"300px",o.errorCallback=o.errorCallback||function(h){alert(h)},o.uploadImage=o.uploadImage||!1,o.imageMaxSize=o.imageMaxSize||2097152,o.imageAccept=o.imageAccept||"image/png, image/jpeg, image/gif, image/avif",o.imageTexts=fr({},Wd,o.imageTexts||{}),o.errorMessages=fr({},Ud,o.errorMessages||{}),o.imagePathAbsolute=o.imagePathAbsolute||!1,o.imageCSRFName=o.imageCSRFName||"csrfmiddlewaretoken",o.imageCSRFHeader=o.imageCSRFHeader||!1,o.autosave!=null&&o.autosave.unique_id!=null&&o.autosave.unique_id!=""&&(o.autosave.uniqueId=o.autosave.unique_id),o.overlayMode&&o.overlayMode.combine===void 0&&(o.overlayMode.combine=!0),this.options=o,this.render(),o.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(o.initialValue),o.uploadImage){var s=this;this.codemirror.on("dragenter",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbOnDragEnter),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragend",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbInit),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragleave",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbInit),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragover",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbOnDragEnter),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("drop",function(h,g){g.stopPropagation(),g.preventDefault(),o.imageUploadFunction?s.uploadImagesUsingCustomFunction(o.imageUploadFunction,g.dataTransfer.files):s.uploadImages(g.dataTransfer.files)}),this.codemirror.on("paste",function(h,g){o.imageUploadFunction?s.uploadImagesUsingCustomFunction(o.imageUploadFunction,g.clipboardData.files):s.uploadImages(g.clipboardData.files)})}}function kc(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch{return!1}else return!1;return!0}var mc,Md,Vn,Ad,Dd,ra,hc,et,Pr,jd,Rd,Hd,Bd,Wd,Ud,wc=Cd(()=>{mc=/Mac/.test(navigator.platform),Md=new RegExp(/()+?/g),Vn={toggleBold:Ii,toggleItalic:Ni,drawLink:Gi,toggleHeadingSmaller:Jn,toggleHeadingBigger:Ri,drawImage:Zi,toggleBlockquote:ji,toggleOrderedList:$i,toggleUnorderedList:Ui,toggleCodeBlock:Pi,togglePreview:Ji,toggleStrikethrough:Oi,toggleHeading1:Hi,toggleHeading2:Bi,toggleHeading3:Wi,toggleHeading4:na,toggleHeading5:ia,toggleHeading6:oa,cleanBlock:Ki,drawTable:Xi,drawHorizontalRule:Yi,undo:Qi,redo:Vi,toggleSideBySide:bn,toggleFullScreen:jr},Ad={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",toggleHeading1:"Ctrl+Alt+1",toggleHeading2:"Ctrl+Alt+2",toggleHeading3:"Ctrl+Alt+3",toggleHeading4:"Ctrl+Alt+4",toggleHeading5:"Ctrl+Alt+5",toggleHeading6:"Ctrl+Alt+6",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Dd=function(o){for(var p in Vn)if(Vn[p]===o)return p;return null},ra=function(){var o=!1;return function(p){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(p)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(p.substr(0,4)))&&(o=!0)}(navigator.userAgent||navigator.vendor||window.opera),o};hc="";et={bold:"fa fa-bold",italic:"fa fa-italic",strikethrough:"fa fa-strikethrough",heading:"fa fa-header fa-heading","heading-smaller":"fa fa-header fa-heading header-smaller","heading-bigger":"fa fa-header fa-heading header-bigger","heading-1":"fa fa-header fa-heading header-1","heading-2":"fa fa-header fa-heading header-2","heading-3":"fa fa-header fa-heading header-3",code:"fa fa-code",quote:"fa fa-quote-left","ordered-list":"fa fa-list-ol","unordered-list":"fa fa-list-ul","clean-block":"fa fa-eraser",link:"fa fa-link",image:"fa fa-image","upload-image":"fa fa-image",table:"fa fa-table","horizontal-rule":"fa fa-minus",preview:"fa fa-eye","side-by-side":"fa fa-columns",fullscreen:"fa fa-arrows-alt",guide:"fa fa-question-circle",undo:"fa fa-undo",redo:"fa fa-repeat fa-redo"},Pr={bold:{name:"bold",action:Ii,className:et.bold,title:"Bold",default:!0},italic:{name:"italic",action:Ni,className:et.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:Oi,className:et.strikethrough,title:"Strikethrough"},heading:{name:"heading",action:Jn,className:et.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:Jn,className:et["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:Ri,className:et["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:Hi,className:et["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:Bi,className:et["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:Wi,className:et["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:Pi,className:et.code,title:"Code"},quote:{name:"quote",action:ji,className:et.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:Ui,className:et["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:$i,className:et["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:Ki,className:et["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:Gi,className:et.link,title:"Create Link",default:!0},image:{name:"image",action:Zi,className:et.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:aa,className:et["upload-image"],title:"Import an image"},table:{name:"table",action:Xi,className:et.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:Yi,className:et["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:Ji,className:et.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:bn,className:et["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:jr,className:et.fullscreen,noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:et.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:Qi,className:et.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:Vi,className:et.redo,noDisable:!0,title:"Redo"}},jd={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["",` | Column 1 | Column 2 | Column 3 | | -------- | -------- | -------- | @@ -48,4 +48,4 @@ b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e. ----- `]},Rd={link:"URL for the link:",image:"URL of the image:"},Hd={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},Bd={bold:"**",code:"```",italic:"*"},Wd={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},Ud={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#). -Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};Te.prototype.uploadImages=function(o,p,v){if(o.length!==0){for(var C=[],b=0;b=2){var H=M[1];if(p.imagesPreviewHandler){var Z=p.imagesPreviewHandler(M[1]);typeof Z=="string"&&(H=Z)}if(window.EMDEimagesCache[H])w(R,window.EMDEimagesCache[H]);else{var ee=document.createElement("img");ee.onload=function(){window.EMDEimagesCache[H]={naturalWidth:ee.naturalWidth,naturalHeight:ee.naturalHeight,url:H},w(R,window.EMDEimagesCache[H])},ee.src=H}}}})}this.codemirror.on("update",function(){E()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(p.autofocus===!0||o.autofocus)&&this.codemirror.focus();var z=this.codemirror;setTimeout(function(){z.refresh()}.bind(z),0)};Te.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};Te.prototype.autosave=function(){if(kc()){var o=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(o.element.form!=null&&o.element.form!=null&&o.element.form.addEventListener("submit",function(){clearTimeout(o.autosaveTimeoutId),o.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+o.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var p=o.value();p!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,p):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var v=document.getElementById("autosaved");if(v!=null&&v!=null&&v!=""){var C=new Date,b=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(C),S=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;v.innerHTML=S+b}}else console.log("EasyMDE: localStorage not available, cannot autosave")};Te.prototype.clearAutosavedValue=function(){if(kc()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")};Te.prototype.openBrowseFileWindow=function(o,p){var v=this,C=this.gui.toolbar.getElementsByClassName("imageInput")[0];C.click();function b(S){v.options.imageUploadFunction?v.uploadImagesUsingCustomFunction(v.options.imageUploadFunction,S.target.files):v.uploadImages(S.target.files,o,p),C.removeEventListener("change",b)}C.addEventListener("change",b)};Te.prototype.uploadImage=function(o,p,v){var C=this;p=p||function(T){yc(C,T)};function b(g){C.updateStatusBar("upload-image",g),setTimeout(function(){C.updateStatusBar("upload-image",C.options.imageTexts.sbInit)},1e4),v&&typeof v=="function"&&v(g),C.options.errorCallback(g)}function S(g){var T=C.options.imageTexts.sizeUnits.split(",");return g.replace("#image_name#",o.name).replace("#image_size#",Ii(o.size,T)).replace("#image_max_size#",Ii(C.options.imageMaxSize,T))}if(o.size>this.options.imageMaxSize){b(S(this.options.errorMessages.fileTooLarge));return}var s=new FormData;s.append("image",o),C.options.imageCSRFToken&&!C.options.imageCSRFHeader&&s.append(C.options.imageCSRFName,C.options.imageCSRFToken);var h=new XMLHttpRequest;h.upload.onprogress=function(g){if(g.lengthComputable){var T=""+Math.round(g.loaded*100/g.total);C.updateStatusBar("upload-image",C.options.imageTexts.sbProgress.replace("#file_name#",o.name).replace("#progress#",T))}},h.open("POST",this.options.imageUploadEndpoint),C.options.imageCSRFToken&&C.options.imageCSRFHeader&&h.setRequestHeader(C.options.imageCSRFName,C.options.imageCSRFToken),h.onload=function(){try{var g=JSON.parse(this.responseText)}catch{console.error("EasyMDE: The server did not return a valid json."),b(S(C.options.errorMessages.importError));return}this.status===200&&g&&!g.error&&g.data&&g.data.filePath?p((C.options.imagePathAbsolute?"":window.location.origin+"/")+g.data.filePath):g.error&&g.error in C.options.errorMessages?b(S(C.options.errorMessages[g.error])):g.error?b(S(g.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),b(S(C.options.errorMessages.importError)))},h.onerror=function(g){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+g.target.status+" ("+g.target.statusText+")"),b(C.options.errorMessages.importError)},h.send(s)};Te.prototype.uploadImageUsingCustomFunction=function(o,p){var v=this;function C(s){yc(v,s)}function b(s){var h=S(s);v.updateStatusBar("upload-image",h),setTimeout(function(){v.updateStatusBar("upload-image",v.options.imageTexts.sbInit)},1e4),v.options.errorCallback(h)}function S(s){var h=v.options.imageTexts.sizeUnits.split(",");return s.replace("#image_name#",p.name).replace("#image_size#",Ii(p.size,h)).replace("#image_max_size#",Ii(v.options.imageMaxSize,h))}o.apply(this,[p,C,b])};Te.prototype.setPreviewMaxHeight=function(){var o=this.codemirror,p=o.getWrapperElement(),v=p.nextSibling,C=parseInt(window.getComputedStyle(p).paddingTop),b=parseInt(window.getComputedStyle(p).borderTopWidth),S=parseInt(this.options.maxHeight),s=S+C*2+b*2,h=s.toString()+"px";v.style.height=h};Te.prototype.createSideBySide=function(){var o=this.codemirror,p=o.getWrapperElement(),v=p.nextSibling;if(!v||!v.classList.contains("editor-preview-side")){if(v=document.createElement("div"),v.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var C=0;C{try{let E=w[w.length-1];if(E.origin==="+input"){let z="(https://)",y=E.text[E.text.length-1];if(y.endsWith(z)&&y!=="[]"+z){let R=E.from,M=E.to,Z=E.text.length>1?0:R.ch;setTimeout(()=>{d.setSelection({line:M.line,ch:Z+y.lastIndexOf("(")+1},{line:M.line,ch:Z+y.lastIndexOf(")")})},25)}}}catch{}}),this.editor.codemirror.on("change",Alpine.debounce(()=>{this.editor&&(this.state=this.editor.value(),p&&this.$wire.call("$refresh"))},C??300)),v&&this.editor.codemirror.on("blur",()=>this.$wire.call("$refresh")),this.$watch("state",()=>{this.editor&&(this.editor.codemirror.hasFocus()||Alpine.raw(this.editor).value(this.state??""))}),h&&h(this)},destroy:function(){this.editor.cleanup(),this.editor=null},getToolbar:function(){let d=[];return x.includes("bold")&&d.push({name:"bold",action:EasyMDE.toggleBold,title:T.toolbar_buttons?.bold}),x.includes("italic")&&d.push({name:"italic",action:EasyMDE.toggleItalic,title:T.toolbar_buttons?.italic}),x.includes("strike")&&d.push({name:"strikethrough",action:EasyMDE.toggleStrikethrough,title:T.toolbar_buttons?.strike}),x.includes("link")&&d.push({name:"link",action:EasyMDE.drawLink,title:T.toolbar_buttons?.link}),["bold","italic","strike","link"].some(w=>x.includes(w))&&["heading"].some(w=>x.includes(w))&&d.push("|"),x.includes("heading")&&d.push({name:"heading",action:EasyMDE.toggleHeadingSmaller,title:T.toolbar_buttons?.heading}),["heading"].some(w=>x.includes(w))&&["blockquote","codeBlock","bulletList","orderedList"].some(w=>x.includes(w))&&d.push("|"),x.includes("blockquote")&&d.push({name:"quote",action:EasyMDE.toggleBlockquote,title:T.toolbar_buttons?.blockquote}),x.includes("codeBlock")&&d.push({name:"code",action:EasyMDE.toggleCodeBlock,title:T.toolbar_buttons?.code_block}),x.includes("bulletList")&&d.push({name:"unordered-list",action:EasyMDE.toggleUnorderedList,title:T.toolbar_buttons?.bullet_list}),x.includes("orderedList")&&d.push({name:"ordered-list",action:EasyMDE.toggleOrderedList,title:T.toolbar_buttons?.ordered_list}),["blockquote","codeBlock","bulletList","orderedList"].some(w=>x.includes(w))&&["table","attachFiles"].some(w=>x.includes(w))&&d.push("|"),x.includes("table")&&d.push({name:"table",action:EasyMDE.drawTable,title:T.toolbar_buttons?.table}),x.includes("attachFiles")&&d.push({name:"upload-image",action:EasyMDE.drawUploadedImage,title:T.toolbar_buttons?.attach_files}),["table","attachFiles"].some(w=>x.includes(w))&&["undo","redo"].some(w=>x.includes(w))&&d.push("|"),x.includes("undo")&&d.push({name:"undo",action:EasyMDE.undo,title:T.toolbar_buttons?.undo}),x.includes("redo")&&d.push({name:"redo",action:EasyMDE.redo,title:T.toolbar_buttons?.redo}),d}}}export{Kd as default}; +Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};Te.prototype.uploadImages=function(o,p,v){if(o.length!==0){for(var C=[],b=0;b=0;re--){let q=G[re];if(q&&q.tagName==="INPUT"&&!q.closest(".editor-toolbar")){q.focus();break}}}}for(var s in p.shortcuts)p.shortcuts[s]!==null&&Vn[s]!==null&&function(E){C[vc(p.shortcuts[E])]=function(){var N=Vn[E];typeof N=="function"?N(v):typeof N=="string"&&window.open(N,"_blank")}}(s);C.Enter="newlineAndIndentContinueMarkdownList",C.Tab=E=>{let N=E.getSelection();N&&N.length>0?E.execCommand("indentMore"):b(E)},C["Shift-Tab"]=E=>{let N=E.getSelection();N&&N.length>0?E.execCommand("indentLess"):S(E)},C.Esc=function(E){E.getOption("fullScreen")&&jr(v)},this.documentOnKeyDown=function(E){E=E||window.event,E.keyCode==27&&v.codemirror.getOption("fullScreen")&&jr(v)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var h,g;p.overlayMode?(CodeMirror.defineMode("overlay-mode",function(E){return CodeMirror.overlayMode(CodeMirror.getMode(E,p.spellChecker!==!1?"spell-checker":"gfm"),p.overlayMode.mode,p.overlayMode.combine)}),h="overlay-mode",g=p.parsingConfig,g.gitHubSpice=!1):(h=p.parsingConfig,h.name="gfm",h.gitHubSpice=!1),p.spellChecker!==!1&&(h="spell-checker",g=p.parsingConfig,g.name="gfm",g.gitHubSpice=!1,typeof p.spellChecker=="function"?p.spellChecker({codeMirrorInstance:CodeMirror}):CodeMirrorSpellChecker({codeMirrorInstance:CodeMirror}));function T(E,N,G){return{addNew:!1}}if(CodeMirror.getMode("php").mime="text/x-php",this.codemirror=CodeMirror.fromTextArea(o,{mode:h,backdrop:g,theme:p.theme!=null?p.theme:"easymde",tabSize:p.tabSize!=null?p.tabSize:2,indentUnit:p.tabSize!=null?p.tabSize:2,indentWithTabs:p.indentWithTabs!==!1,lineNumbers:p.lineNumbers===!0,autofocus:p.autofocus===!0,extraKeys:C,direction:p.direction,lineWrapping:p.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:p.placeholder||o.getAttribute("placeholder")||"",styleSelectedText:p.styleSelectedText!=null?p.styleSelectedText:!ra(),scrollbarStyle:p.scrollbarStyle!=null?p.scrollbarStyle:"native",configureMouse:T,inputStyle:p.inputStyle!=null?p.inputStyle:ra()?"contenteditable":"textarea",spellcheck:p.nativeSpellcheck!=null?p.nativeSpellcheck:!0,autoRefresh:p.autoRefresh!=null?p.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=p.minHeight,typeof p.maxHeight<"u"&&(this.codemirror.getScrollerElement().style.height=p.maxHeight),p.forceSync===!0){var y=this.codemirror;y.on("change",function(){y.save()})}this.gui={};var c=document.createElement("div");c.classList.add("EasyMDEContainer"),c.setAttribute("role","application");var d=this.codemirror.getWrapperElement();d.parentNode.insertBefore(c,d),c.appendChild(d),p.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),p.status!==!1&&(this.gui.statusbar=this.createStatusbar()),p.autosave!=null&&p.autosave.enabled===!0&&(this.autosave(),this.codemirror.on("change",function(){clearTimeout(v._autosave_timeout),v._autosave_timeout=setTimeout(function(){v.autosave()},v.options.autosave.submit_delay||v.options.autosave.delay||1e3)}));function k(E,N){var G,J=window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","");return E=2){var J=G[1];if(p.imagesPreviewHandler){var re=p.imagesPreviewHandler(G[1]);typeof re=="string"&&(J=re)}if(window.EMDEimagesCache[J])M(N,window.EMDEimagesCache[J]);else{var q=document.createElement("img");q.onload=function(){window.EMDEimagesCache[J]={naturalWidth:q.naturalWidth,naturalHeight:q.naturalHeight,url:J},M(N,window.EMDEimagesCache[J])},q.src=J}}}})}this.codemirror.on("update",function(){w()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(p.autofocus===!0||o.autofocus)&&this.codemirror.focus();var W=this.codemirror;setTimeout(function(){W.refresh()}.bind(W),0)};Te.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};Te.prototype.autosave=function(){if(kc()){var o=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(o.element.form!=null&&o.element.form!=null&&o.element.form.addEventListener("submit",function(){clearTimeout(o.autosaveTimeoutId),o.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+o.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var p=o.value();p!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,p):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var v=document.getElementById("autosaved");if(v!=null&&v!=null&&v!=""){var C=new Date,b=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(C),S=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;v.innerHTML=S+b}}else console.log("EasyMDE: localStorage not available, cannot autosave")};Te.prototype.clearAutosavedValue=function(){if(kc()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")};Te.prototype.openBrowseFileWindow=function(o,p){var v=this,C=this.gui.toolbar.getElementsByClassName("imageInput")[0];C.click();function b(S){v.options.imageUploadFunction?v.uploadImagesUsingCustomFunction(v.options.imageUploadFunction,S.target.files):v.uploadImages(S.target.files,o,p),C.removeEventListener("change",b)}C.addEventListener("change",b)};Te.prototype.uploadImage=function(o,p,v){var C=this;p=p||function(T){yc(C,T)};function b(g){C.updateStatusBar("upload-image",g),setTimeout(function(){C.updateStatusBar("upload-image",C.options.imageTexts.sbInit)},1e4),v&&typeof v=="function"&&v(g),C.options.errorCallback(g)}function S(g){var T=C.options.imageTexts.sizeUnits.split(",");return g.replace("#image_name#",o.name).replace("#image_size#",Fi(o.size,T)).replace("#image_max_size#",Fi(C.options.imageMaxSize,T))}if(o.size>this.options.imageMaxSize){b(S(this.options.errorMessages.fileTooLarge));return}var s=new FormData;s.append("image",o),C.options.imageCSRFToken&&!C.options.imageCSRFHeader&&s.append(C.options.imageCSRFName,C.options.imageCSRFToken);var h=new XMLHttpRequest;h.upload.onprogress=function(g){if(g.lengthComputable){var T=""+Math.round(g.loaded*100/g.total);C.updateStatusBar("upload-image",C.options.imageTexts.sbProgress.replace("#file_name#",o.name).replace("#progress#",T))}},h.open("POST",this.options.imageUploadEndpoint),C.options.imageCSRFToken&&C.options.imageCSRFHeader&&h.setRequestHeader(C.options.imageCSRFName,C.options.imageCSRFToken),h.onload=function(){try{var g=JSON.parse(this.responseText)}catch{console.error("EasyMDE: The server did not return a valid json."),b(S(C.options.errorMessages.importError));return}this.status===200&&g&&!g.error&&g.data&&g.data.filePath?p((C.options.imagePathAbsolute?"":window.location.origin+"/")+g.data.filePath):g.error&&g.error in C.options.errorMessages?b(S(C.options.errorMessages[g.error])):g.error?b(S(g.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),b(S(C.options.errorMessages.importError)))},h.onerror=function(g){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+g.target.status+" ("+g.target.statusText+")"),b(C.options.errorMessages.importError)},h.send(s)};Te.prototype.uploadImageUsingCustomFunction=function(o,p){var v=this;function C(s){yc(v,s)}function b(s){var h=S(s);v.updateStatusBar("upload-image",h),setTimeout(function(){v.updateStatusBar("upload-image",v.options.imageTexts.sbInit)},1e4),v.options.errorCallback(h)}function S(s){var h=v.options.imageTexts.sizeUnits.split(",");return s.replace("#image_name#",p.name).replace("#image_size#",Fi(p.size,h)).replace("#image_max_size#",Fi(v.options.imageMaxSize,h))}o.apply(this,[p,C,b])};Te.prototype.setPreviewMaxHeight=function(){var o=this.codemirror,p=o.getWrapperElement(),v=p.nextSibling,C=parseInt(window.getComputedStyle(p).paddingTop),b=parseInt(window.getComputedStyle(p).borderTopWidth),S=parseInt(this.options.maxHeight),s=S+C*2+b*2,h=s.toString()+"px";v.style.height=h};Te.prototype.createSideBySide=function(){var o=this.codemirror,p=o.getWrapperElement(),v=p.nextSibling;if(!v||!v.classList.contains("editor-preview-side")){if(v=document.createElement("div"),v.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var C=0;C{try{let z=k[k.length-1];if(z.origin==="+input"){let M="(https://)",w=z.text[z.text.length-1];if(w.endsWith(M)&&w!=="[]"+M){let W=z.from,E=z.to,G=z.text.length>1?0:W.ch;setTimeout(()=>{d.setSelection({line:E.line,ch:G+w.lastIndexOf("(")+1},{line:E.line,ch:G+w.lastIndexOf(")")})},25)}}}catch{}}),this.editor.codemirror.on("change",Alpine.debounce(()=>{this.editor&&(this.state=this.editor.value(),p&&this.$wire.call("$refresh"))},C??300)),v&&this.editor.codemirror.on("blur",()=>this.$wire.call("$refresh")),this.$watch("state",()=>{this.editor&&(this.editor.codemirror.hasFocus()||Alpine.raw(this.editor).value(this.state??""))}),h&&h(this)},destroy:function(){this.editor.cleanup(),this.editor=null},getToolbar:function(){let d=[];return y.includes("bold")&&d.push({name:"bold",action:EasyMDE.toggleBold,title:T.toolbar_buttons?.bold}),y.includes("italic")&&d.push({name:"italic",action:EasyMDE.toggleItalic,title:T.toolbar_buttons?.italic}),y.includes("strike")&&d.push({name:"strikethrough",action:EasyMDE.toggleStrikethrough,title:T.toolbar_buttons?.strike}),y.includes("link")&&d.push({name:"link",action:EasyMDE.drawLink,title:T.toolbar_buttons?.link}),["bold","italic","strike","link"].some(k=>y.includes(k))&&["heading"].some(k=>y.includes(k))&&d.push("|"),y.includes("heading")&&d.push({name:"heading",action:EasyMDE.toggleHeadingSmaller,title:T.toolbar_buttons?.heading}),["heading"].some(k=>y.includes(k))&&["blockquote","codeBlock","bulletList","orderedList"].some(k=>y.includes(k))&&d.push("|"),y.includes("blockquote")&&d.push({name:"quote",action:EasyMDE.toggleBlockquote,title:T.toolbar_buttons?.blockquote}),y.includes("codeBlock")&&d.push({name:"code",action:EasyMDE.toggleCodeBlock,title:T.toolbar_buttons?.code_block}),y.includes("bulletList")&&d.push({name:"unordered-list",action:EasyMDE.toggleUnorderedList,title:T.toolbar_buttons?.bullet_list}),y.includes("orderedList")&&d.push({name:"ordered-list",action:EasyMDE.toggleOrderedList,title:T.toolbar_buttons?.ordered_list}),["blockquote","codeBlock","bulletList","orderedList"].some(k=>y.includes(k))&&["table","attachFiles"].some(k=>y.includes(k))&&d.push("|"),y.includes("table")&&d.push({name:"table",action:EasyMDE.drawTable,title:T.toolbar_buttons?.table}),y.includes("attachFiles")&&d.push({name:"upload-image",action:EasyMDE.drawUploadedImage,title:T.toolbar_buttons?.attach_files}),["table","attachFiles"].some(k=>y.includes(k))&&["undo","redo"].some(k=>y.includes(k))&&d.push("|"),y.includes("undo")&&d.push({name:"undo",action:EasyMDE.undo,title:T.toolbar_buttons?.undo}),y.includes("redo")&&d.push({name:"redo",action:EasyMDE.redo,title:T.toolbar_buttons?.redo}),d}}}export{Kd as default}; diff --git a/public/js/filament/forms/components/rich-editor.js b/public/js/filament/forms/components/rich-editor.js index 121e40e52..01ad26f2c 100644 --- a/public/js/filament/forms/components/rich-editor.js +++ b/public/js/filament/forms/components/rich-editor.js @@ -1,5 +1,5 @@ -var po="2.1.12",wt="[data-trix-attachment]",mi={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},W={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===W[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===W[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},Gi=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},$i=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),Sn=$i&&parseInt($i[1]),xe={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:Sn&&Sn>12,samsungAndroid:Sn&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(i=>i in InputEvent.prototype)},Lr={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},m={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",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\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},fo=[m.bytes,m.KB,m.MB,m.GB,m.TB,m.PB],Dr={prefix:"IEC",precision:2,formatter(i){switch(i){case 0:return"0 ".concat(m.bytes);case 1:return"1 ".concat(m.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);let e=Math.floor(Math.log(i)/Math.log(t)),n=(i/Math.pow(t,e)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(n," ").concat(fo[e])}}},ln="\uFEFF",bt="\xA0",Nr=function(i){for(let t in i){let e=i[t];this[t]=e}return this},pi=document.documentElement,bo=pi.matches,S=function(i){let{onElement:t,matchingSelector:e,withCallback:n,inPhase:r,preventDefault:o,times:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=t||pi,c=e,u=r==="capturing",d=function(C){s!=null&&--s==0&&d.destroy();let T=vt(C.target,{matchingSelector:c});T!=null&&(n?.call(T,C,T),o&&C.preventDefault())};return d.destroy=()=>l.removeEventListener(i,d,u),l.addEventListener(i,d,u),d},he=function(i){let{onElement:t,bubbles:e,cancelable:n,attributes:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t??pi;e=e!==!1,n=n!==!1;let s=document.createEvent("Events");return s.initEvent(i,e,n),r!=null&&Nr.call(s,r),o.dispatchEvent(s)},Ir=function(i,t){if(i?.nodeType===1)return bo.call(i,t)},vt=function(i){let{matchingSelector:t,untilNode:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.parentNode;if(i!=null){if(t==null)return i;if(i.closest&&e==null)return i.closest(t);for(;i&&i!==e;){if(Ir(i,t))return i;i=i.parentNode}}},fi=i=>document.activeElement!==i&&Tt(i,document.activeElement),Tt=function(i,t){if(i&&t)for(;t;){if(t===i)return!0;t=t.parentNode}},kn=function(i){var t;if((t=i)===null||t===void 0||!t.parentNode)return;let e=0;for(i=i.previousSibling;i;)e++,i=i.previousSibling;return e},At=i=>{var t;return i==null||(t=i.parentNode)===null||t===void 0?void 0:t.removeChild(i)},je=function(i){let{onlyNodesOfType:t,usingFilter:e,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(i,r,e??null,n===!0)},j=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},p=function(i){let t,e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof i=="object"?(n=i,i=n.tagName):n={attributes:n};let r=document.createElement(i);if(n.editable!=null&&(n.attributes==null&&(n.attributes={}),n.attributes.contenteditable=n.editable),n.attributes)for(t in n.attributes)e=n.attributes[t],r.setAttribute(t,e);if(n.style)for(t in n.style)e=n.style[t],r.style[t]=e;if(n.data)for(t in n.data)e=n.data[t],r.dataset[t]=e;return n.className&&n.className.split(" ").forEach(o=>{r.classList.add(o)}),n.textContent&&(r.textContent=n.textContent),n.childNodes&&[].concat(n.childNodes).forEach(o=>{r.appendChild(o)}),r},ie,de=function(){if(ie!=null)return ie;ie=[];for(let i in W){let t=W[i];t.tagName&&ie.push(t.tagName)}return ie},Rn=i=>qt(i?.firstChild),Yi=function(i){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?qt(i):qt(i)||!qt(i.firstChild)&&function(e){return de().includes(j(e))&&!de().includes(j(e.firstChild))}(i)},qt=i=>vo(i)&&i?.data==="block",vo=i=>i?.nodeType===Node.COMMENT_NODE,Ht=function(i){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i)return ge(i)?i.data===ln?!t||i.parentNode.dataset.trixCursorTarget===t:void 0:Ht(i.firstChild)},Lt=i=>Ir(i,wt),Or=i=>ge(i)&&i?.data==="",ge=i=>i?.nodeType===Node.TEXT_NODE,bi={level2Enabled:!0,getLevel(){return this.level2Enabled&&xe.supportsInputEvents?2:0},pickFiles(i){let t=p("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",()=>{i(t.files),At(t)}),At(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}},Me={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:` -`},It={bold:{tagName:"strong",inheritable:!0,parser(i){let t=window.getComputedStyle(i);return t.fontWeight==="bold"||t.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:i=>window.getComputedStyle(i).fontStyle==="italic"},href:{groupTagName:"a",parser(i){let t="a:not(".concat(wt,")"),e=i.closest(t);if(e)return e.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},Fr={getDefaultHTML:()=>`
+var po="2.1.12",Rt="[data-trix-attachment]",mi={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},W={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===W[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===W[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},Gi=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},$i=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),Sn=$i&&parseInt($i[1]),xe={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:Sn&&Sn>12,samsungAndroid:Sn&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(i=>i in InputEvent.prototype)},Lr={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},m={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",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\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},fo=[m.bytes,m.KB,m.MB,m.GB,m.TB,m.PB],Dr={prefix:"IEC",precision:2,formatter(i){switch(i){case 0:return"0 ".concat(m.bytes);case 1:return"1 ".concat(m.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);let e=Math.floor(Math.log(i)/Math.log(t)),n=(i/Math.pow(t,e)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(n," ").concat(fo[e])}}},ln="\uFEFF",ft="\xA0",Nr=function(i){for(let t in i){let e=i[t];this[t]=e}return this},pi=document.documentElement,bo=pi.matches,S=function(i){let{onElement:t,matchingSelector:e,withCallback:n,inPhase:r,preventDefault:o,times:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=t||pi,c=e,u=r==="capturing",d=function(C){s!=null&&--s==0&&d.destroy();let T=vt(C.target,{matchingSelector:c});T!=null&&(n?.call(T,C,T),o&&C.preventDefault())};return d.destroy=()=>l.removeEventListener(i,d,u),l.addEventListener(i,d,u),d},he=function(i){let{onElement:t,bubbles:e,cancelable:n,attributes:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t??pi;e=e!==!1,n=n!==!1;let s=document.createEvent("Events");return s.initEvent(i,e,n),r!=null&&Nr.call(s,r),o.dispatchEvent(s)},Ir=function(i,t){if(i?.nodeType===1)return bo.call(i,t)},vt=function(i){let{matchingSelector:t,untilNode:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.parentNode;if(i!=null){if(t==null)return i;if(i.closest&&e==null)return i.closest(t);for(;i&&i!==e;){if(Ir(i,t))return i;i=i.parentNode}}},fi=i=>document.activeElement!==i&&kt(i,document.activeElement),kt=function(i,t){if(i&&t)for(;t;){if(t===i)return!0;t=t.parentNode}},kn=function(i){var t;if((t=i)===null||t===void 0||!t.parentNode)return;let e=0;for(i=i.previousSibling;i;)e++,i=i.previousSibling;return e},At=i=>{var t;return i==null||(t=i.parentNode)===null||t===void 0?void 0:t.removeChild(i)},je=function(i){let{onlyNodesOfType:t,usingFilter:e,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(i,r,e??null,n===!0)},j=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},p=function(i){let t,e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof i=="object"?(n=i,i=n.tagName):n={attributes:n};let r=document.createElement(i);if(n.editable!=null&&(n.attributes==null&&(n.attributes={}),n.attributes.contenteditable=n.editable),n.attributes)for(t in n.attributes)e=n.attributes[t],r.setAttribute(t,e);if(n.style)for(t in n.style)e=n.style[t],r.style[t]=e;if(n.data)for(t in n.data)e=n.data[t],r.dataset[t]=e;return n.className&&n.className.split(" ").forEach(o=>{r.classList.add(o)}),n.textContent&&(r.textContent=n.textContent),n.childNodes&&[].concat(n.childNodes).forEach(o=>{r.appendChild(o)}),r},ie,de=function(){if(ie!=null)return ie;ie=[];for(let i in W){let t=W[i];t.tagName&&ie.push(t.tagName)}return ie},Rn=i=>Vt(i?.firstChild),Yi=function(i){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?Vt(i):Vt(i)||!Vt(i.firstChild)&&function(e){return de().includes(j(e))&&!de().includes(j(e.firstChild))}(i)},Vt=i=>vo(i)&&i?.data==="block",vo=i=>i?.nodeType===Node.COMMENT_NODE,zt=function(i){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i)return ge(i)?i.data===ln?!t||i.parentNode.dataset.trixCursorTarget===t:void 0:zt(i.firstChild)},Tt=i=>Ir(i,Rt),Or=i=>ge(i)&&i?.data==="",ge=i=>i?.nodeType===Node.TEXT_NODE,bi={level2Enabled:!0,getLevel(){return this.level2Enabled&&xe.supportsInputEvents?2:0},pickFiles(i){let t=p("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",()=>{i(t.files),At(t)}),At(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}},Me={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:` +`},Dt={bold:{tagName:"strong",inheritable:!0,parser(i){let t=window.getComputedStyle(i);return t.fontWeight==="bold"||t.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:i=>window.getComputedStyle(i).fontStyle==="italic"},href:{groupTagName:"a",parser(i){let t="a:not(".concat(Rt,")"),e=i.closest(t);if(e)return e.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},Fr={getDefaultHTML:()=>`
@@ -39,40 +39,40 @@ var po="2.1.12",wt="[data-trix-attachment]",mi={preview:{presentation:"gallery",
- `)},Yn={interval:5e3},Ce=Object.freeze({__proto__:null,attachments:mi,blockAttributes:W,browser:xe,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"},dompurify:Lr,fileSize:Dr,input:bi,keyNames:{8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},lang:m,parser:Me,textAttributes:It,toolbar:Fr,undo:Yn}),R=class{static proxyMethod(t){let{name:e,toMethod:n,toProperty:r,optional:o}=Ao(t);this.prototype[e]=function(){let s,l;var c,u;return n?l=o?(c=this[n])===null||c===void 0?void 0:c.call(this):this[n]():r&&(l=this[r]),o?(s=(u=l)===null||u===void 0?void 0:u[e],s?Xi.call(s,l,arguments):void 0):(s=l[e],Xi.call(s,l,arguments))}}},Ao=function(i){let t=i.match(yo);if(!t)throw new Error("can't parse @proxyMethod expression: ".concat(i));let e={name:t[4]};return t[2]!=null?e.toMethod=t[1]:e.toProperty=t[1],t[3]!=null&&(e.optional=!0),e},{apply:Xi}=Function.prototype,yo=new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$"),Tn,wn,Ln,Ot=class extends R{static box(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t instanceof this?t:this.fromUCS2String(t?.toString())}static fromUCS2String(t){return new this(t,Xn(t))}static fromCodepoints(t){return new this(Zn(t),t)}constructor(t,e){super(...arguments),this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}offsetToUCS2Offset(t){return Zn(this.codepoints.slice(0,Math.max(0,t))).length}offsetFromUCS2Offset(t){return Xn(this.ucs2String.slice(0,Math.max(0,t))).length}slice(){return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))}charAt(t){return this.slice(t,t+1)}isEqualTo(t){return this.constructor.box(t).ucs2String===this.ucs2String}toJSON(){return this.ucs2String}getCacheKey(){return this.ucs2String}toString(){return this.ucs2String}},xo=((Tn=Array.from)===null||Tn===void 0?void 0:Tn.call(Array,"\u{1F47C}").length)===1,Co=((wn=" ".codePointAt)===null||wn===void 0?void 0:wn.call(" ",0))!=null,Eo=((Ln=String.fromCodePoint)===null||Ln===void 0?void 0:Ln.call(String,32,128124))===" \u{1F47C}",Xn,Zn;Xn=xo&&Co?i=>Array.from(i).map(t=>t.codePointAt(0)):function(i){let t=[],e=0,{length:n}=i;for(;eString.fromCodePoint(...Array.from(i||[])):function(i){return(()=>{let t=[];return Array.from(i).forEach(e=>{let n="";e>65535&&(e-=65536,n+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t.push(n+String.fromCharCode(e))}),t})().join("")};var So=0,dt=class extends R{static fromJSONString(t){return this.fromJSON(JSON.parse(t))}constructor(){super(...arguments),this.id=++So}hasSameConstructorAs(t){return this.constructor===t?.constructor}isEqualTo(t){return this===t}inspect(){let t=[],e=this.contentsForInspection()||{};for(let n in e){let r=e[n];t.push("".concat(n,"=").concat(r))}return"#<".concat(this.constructor.name,":").concat(this.id).concat(t.length?" ".concat(t.join(", ")):"",">")}contentsForInspection(){}toJSONString(){return JSON.stringify(this)}toUTF16String(){return Ot.box(this)}getCacheKey(){return this.id.toString()}},Ft=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;for(let e=0;e1?e-1:0),r=1;r(Dn||(Dn=wo().concat(To())),Dn),L=i=>W[i],To=()=>(Nn||(Nn=Object.keys(W)),Nn),ti=i=>It[i],wo=()=>(In||(In=Object.keys(It)),In),Pr=function(i,t){Lo(i).textContent=t.replace(/%t/g,i)},Lo=function(i){let t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-tag-name",i.toLowerCase());let e=Do();return e&&t.setAttribute("nonce",e),document.head.insertBefore(t,document.head.firstChild),t},Do=function(){let i=Zi("trix-csp-nonce")||Zi("csp-nonce");if(i){let{nonce:t,content:e}=i;return t==""?e:t}},Zi=i=>document.head.querySelector("meta[name=".concat(i,"]")),Qi={"application/x-trix-feature-detection":"test"},Mr=function(i){let t=i.getData("text/plain"),e=i.getData("text/html");if(!t||!e)return t?.length;{let{body:n}=new DOMParser().parseFromString(e,"text/html");if(n.textContent===t)return!n.querySelector("*")}},Br=/Mac|^iP/.test(navigator.platform)?i=>i.metaKey:i=>i.ctrlKey,Ai=i=>setTimeout(i,1),_r=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};for(let e in i){let n=i[e];t[e]=n}return t},Xt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Object.keys(i).length!==Object.keys(t).length)return!1;for(let e in i)if(i[e]!==t[e])return!1;return!0},y=function(i){if(i!=null)return Array.isArray(i)||(i=[i,i]),[tr(i[0]),tr(i[1]!=null?i[1]:i[0])]},ht=function(i){if(i==null)return;let[t,e]=y(i);return ei(t,e)},We=function(i,t){if(i==null||t==null)return;let[e,n]=y(i),[r,o]=y(t);return ei(e,r)&&ei(n,o)},tr=function(i){return typeof i=="number"?i:_r(i)},ei=function(i,t){return typeof i=="number"?i===t:Xt(i,t)},Ue=class extends R{constructor(){super(...arguments),this.update=this.update.bind(this),this.selectionManagers=[]}start(){this.started||(this.started=!0,document.addEventListener("selectionchange",this.update,!0))}stop(){if(this.started)return this.started=!1,document.removeEventListener("selectionchange",this.update,!0)}registerSelectionManager(t){if(!this.selectionManagers.includes(t))return this.selectionManagers.push(t),this.start()}unregisterSelectionManager(t){if(this.selectionManagers=this.selectionManagers.filter(e=>e!==t),this.selectionManagers.length===0)return this.stop()}notifySelectionManagersOfSelectionChange(){return this.selectionManagers.map(t=>t.selectionDidChange())}update(){this.notifySelectionManagersOfSelectionChange()}reset(){this.update()}},Pt=new Ue,jr=function(){let i=window.getSelection();if(i.rangeCount>0)return i},me=function(){var i;let t=(i=jr())===null||i===void 0?void 0:i.getRangeAt(0);if(t&&!No(t))return t},Wr=function(i){let t=window.getSelection();return t.removeAllRanges(),t.addRange(i),Pt.update()},No=i=>er(i.startContainer)||er(i.endContainer),er=i=>!Object.getPrototypeOf(i),ue=i=>i.replace(new RegExp("".concat(ln),"g"),"").replace(new RegExp("".concat(bt),"g")," "),yi=new RegExp("[^\\S".concat(bt,"]")),xi=i=>i.replace(new RegExp("".concat(yi.source),"g")," ").replace(/\ {2,}/g," "),nr=function(i,t){if(i.isEqualTo(t))return["",""];let e=On(i,t),{length:n}=e.utf16String,r;if(n){let{offset:o}=e,s=i.codepoints.slice(0,o).concat(i.codepoints.slice(o+n));r=On(t,Ot.fromCodepoints(s))}else r=On(t,i);return[e.utf16String.toString(),r.utf16String.toString()]},On=function(i,t){let e=0,n=i.length,r=t.length;for(;ee+1&&i.charAt(n-1).isEqualTo(t.charAt(r-1));)n--,r--;return{utf16String:i.slice(e,n),offset:e}},U=class extends dt{static fromCommonAttributesOfObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!t.length)return new this;let e=re(t[0]),n=e.getKeys();return t.slice(1).forEach(r=>{n=e.getKeysCommonToHash(re(r)),e=e.slice(n)}),e}static box(t){return re(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(...arguments),this.values=Be(t)}add(t,e){return this.merge(Io(t,e))}remove(t){return new U(Be(this.values,t))}get(t){return this.values[t]}has(t){return t in this.values}merge(t){return new U(Oo(this.values,Fo(t)))}slice(t){let e={};return Array.from(t).forEach(n=>{this.has(n)&&(e[n]=this.values[n])}),new U(e)}getKeys(){return Object.keys(this.values)}getKeysCommonToHash(t){return t=re(t),this.getKeys().filter(e=>this.values[e]===t.values[e])}isEqualTo(t){return Ft(this.toArray(),re(t).toArray())}isEmpty(){return this.getKeys().length===0}toArray(){if(!this.array){let t=[];for(let e in this.values){let n=this.values[e];t.push(t.push(e,n))}this.array=t.slice(0)}return this.array}toObject(){return Be(this.values)}toJSON(){return this.toObject()}contentsForInspection(){return{values:JSON.stringify(this.values)}}},Io=function(i,t){let e={};return e[i]=t,e},Oo=function(i,t){let e=Be(i);for(let n in t){let r=t[n];e[n]=r}return e},Be=function(i,t){let e={};return Object.keys(i).sort().forEach(n=>{n!==t&&(e[n]=i[n])}),e},re=function(i){return i instanceof U?i:new U(i)},Fo=function(i){return i instanceof U?i.values:i},fe=class{static groupObjects(){let t,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:n,asTree:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r&&n==null&&(n=0);let o=[];return Array.from(e).forEach(s=>{var l;if(t){var c,u,d;if((c=s.canBeGrouped)!==null&&c!==void 0&&c.call(s,n)&&(u=(d=t[t.length-1]).canBeGroupedWith)!==null&&u!==void 0&&u.call(d,s,n))return void t.push(s);o.push(new this(t,{depth:n,asTree:r})),t=null}(l=s.canBeGrouped)!==null&&l!==void 0&&l.call(s,n)?t=[s]:o.push(s)}),t&&o.push(new this(t,{depth:n,asTree:r})),o}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:e,asTree:n}=arguments.length>1?arguments[1]:void 0;this.objects=t,n&&(this.depth=e,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}getObjects(){return this.objects}getDepth(){return this.depth}getCacheKey(){let t=["objectGroup"];return Array.from(this.getObjects()).forEach(e=>{t.push(e.getCacheKey())}),t.join("/")}},ni=class extends R{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects={},Array.from(t).forEach(e=>{let n=JSON.stringify(e);this.objects[n]==null&&(this.objects[n]=e)})}find(t){let e=JSON.stringify(t);return this.objects[e]}},ii=class{constructor(t){this.reset(t)}add(t){let e=ir(t);this.elements[e]=t}remove(t){let e=ir(t),n=this.elements[e];if(n)return delete this.elements[e],n}reset(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return this.elements={},Array.from(t).forEach(e=>{this.add(e)}),t}},ir=i=>i.dataset.trixStoreKey,Jt=class extends R{isPerforming(){return this.performing===!0}hasPerformed(){return this.performed===!0}hasSucceeded(){return this.performed&&this.succeeded}hasFailed(){return this.performed&&!this.succeeded}getPromise(){return this.promise||(this.promise=new Promise((t,e)=>(this.performing=!0,this.perform((n,r)=>{this.succeeded=n,this.performing=!1,this.performed=!0,this.succeeded?t(r):e(r)})))),this.promise}perform(t){return t(!1)}release(){var t,e;(t=this.promise)===null||t===void 0||(e=t.cancel)===null||e===void 0||e.call(t),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null}};Jt.proxyMethod("getPromise().then"),Jt.proxyMethod("getPromise().catch");var gt=class extends R{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.object=t,this.options=e,this.childViews=[],this.rootView=this}getNodes(){return this.nodes||(this.nodes=this.createNodes()),this.nodes.map(t=>t.cloneNode(!0))}invalidate(){var t;return this.nodes=null,this.childViews=[],(t=this.parentView)===null||t===void 0?void 0:t.invalidate()}invalidateViewForObject(t){var e;return(e=this.findViewForObject(t))===null||e===void 0?void 0:e.invalidate()}findOrCreateCachedChildView(t,e,n){let r=this.getCachedViewForObject(e);return r?this.recordChildView(r):(r=this.createChildView(...arguments),this.cacheViewForObject(r,e)),r}createChildView(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e instanceof fe&&(n.viewClass=t,t=ri);let r=new t(e,n);return this.recordChildView(r)}recordChildView(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t}getAllChildViews(){let t=[];return this.childViews.forEach(e=>{t.push(e),t=t.concat(e.getAllChildViews())}),t}findElement(){return this.findElementForObject(this.object)}findElementForObject(t){let e=t?.id;if(e)return this.rootView.element.querySelector("[data-trix-id='".concat(e,"']"))}findViewForObject(t){for(let e of this.getAllChildViews())if(e.object===t)return e}getViewCache(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?(this.viewCache||(this.viewCache={}),this.viewCache):void 0}isViewCachingEnabled(){return this.shouldCacheViews!==!1}enableViewCaching(){this.shouldCacheViews=!0}disableViewCaching(){this.shouldCacheViews=!1}getCachedViewForObject(t){var e;return(e=this.getViewCache())===null||e===void 0?void 0:e[t.getCacheKey()]}cacheViewForObject(t,e){let n=this.getViewCache();n&&(n[e.getCacheKey()]=t)}garbageCollectCachedViews(){let t=this.getViewCache();if(t){let e=this.getAllChildViews().concat(this).map(n=>n.object.getCacheKey());for(let n in t)e.includes(n)||delete t[n]}}},ri=class extends gt{constructor(){super(...arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}getChildViews(){return this.childViews.length||Array.from(this.objectGroup.getObjects()).forEach(t=>{this.findOrCreateCachedChildView(this.viewClass,t,this.options)}),this.childViews}createNodes(){let t=this.createContainerElement();return this.getChildViews().forEach(e=>{Array.from(e.getNodes()).forEach(n=>{t.appendChild(n)})}),[t]}createContainerElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.objectGroup.getDepth();return this.getChildViews()[0].createContainerElement(t)}};var{entries:Ur,setPrototypeOf:rr,isFrozen:Po,getPrototypeOf:Mo,getOwnPropertyDescriptor:Bo}=Object,{freeze:V,seal:Y,create:Vr}=Object,{apply:oi,construct:si}=typeof Reflect<"u"&&Reflect;V||(V=function(i){return i}),Y||(Y=function(i){return i}),oi||(oi=function(i,t,e){return i.apply(t,e)}),si||(si=function(i,t){return new i(...t)});var Ne=G(Array.prototype.forEach),or=G(Array.prototype.pop),oe=G(Array.prototype.push),_e=G(String.prototype.toLowerCase),Fn=G(String.prototype.toString),sr=G(String.prototype.match),se=G(String.prototype.replace),_o=G(String.prototype.indexOf),jo=G(String.prototype.trim),X=G(Object.prototype.hasOwnProperty),_=G(RegExp.prototype.test),ae=(ar=TypeError,function(){for(var i=arguments.length,t=new Array(i),e=0;e1?e-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:_e;rr&&rr(i,null);let n=t.length;for(;n--;){let r=t[n];if(typeof r=="string"){let o=e(r);o!==r&&(Po(t)||(t[n]=o),r=o)}i[r]=!0}return i}function Wo(i){for(let t=0;t/gm),Ho=Y(/\$\{[\w\W]*}/gm),Jo=Y(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ko=Y(/^aria-[\-\w]+$/),zr=Y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Go=Y(/^(?:\w+script|data):/i),$o=Y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qr=Y(/^html$/i),Yo=Y(/^[a-z][.\w]*(-[.\w]+)+$/i),dr=Object.freeze({__proto__:null,ARIA_ATTR:Ko,ATTR_WHITESPACE:$o,CUSTOM_ELEMENT:Yo,DATA_ATTR:Jo,DOCTYPE_NAME:qr,ERB_EXPR:qo,IS_ALLOWED_URI:zr,IS_SCRIPT_OR_DATA:Go,MUSTACHE_EXPR:zo,TMPLIT_EXPR:Ho}),Xo=1,Zo=3,Qo=7,ts=8,es=9,ns=function(){return typeof window>"u"?null:window},Ve=function i(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ns(),e=a=>i(a);if(e.version="3.2.3",e.removed=[],!t||!t.document||t.document.nodeType!==es)return e.isSupported=!1,e;let{document:n}=t,r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:c,Element:u,NodeFilter:d,NamedNodeMap:C=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:T,DOMParser:H,trustedTypes:tt}=t,M=u.prototype,pt=le(M,"cloneNode"),Ct=le(M,"remove"),Zt=le(M,"nextSibling"),Qt=le(M,"childNodes"),F=le(M,"parentNode");if(typeof l=="function"){let a=n.createElement("template");a.content&&a.content.ownerDocument&&(n=a.content.ownerDocument)}let k,ot="",{implementation:Et,createNodeIterator:eo,createDocumentFragment:no,getElementsByTagName:io}=n,{importNode:ro}=r,J={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};e.isSupported=typeof Ur=="function"&&typeof F=="function"&&Et&&Et.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:un,ERB_EXPR:hn,TMPLIT_EXPR:dn,DATA_ATTR:oo,ARIA_ATTR:so,IS_SCRIPT_OR_DATA:ao,ATTR_WHITESPACE:Ei,CUSTOM_ELEMENT:lo}=dr,{IS_ALLOWED_URI:Si}=dr,N=null,ki=b({},[...lr,...Pn,...Mn,...Bn,...cr]),O=null,Ri=b({},[...ur,..._n,...hr,...Ie]),w=Object.seal(Vr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,gn=null,Ti=!0,mn=!0,wi=!1,Li=!0,Bt=!1,pn=!0,St=!1,fn=!1,bn=!1,_t=!1,Ee=!1,Se=!1,Di=!0,Ni=!1,vn=!0,ee=!1,jt={},Wt=null,Ii=b({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Oi=null,Fi=b({},["audio","video","img","source","image","track"]),An=null,Pi=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ke="http://www.w3.org/1998/Math/MathML",Re="http://www.w3.org/2000/svg",st="http://www.w3.org/1999/xhtml",Ut=st,yn=!1,xn=null,co=b({},[ke,Re,st],Fn),Te=b({},["mi","mo","mn","ms","mtext"]),we=b({},["annotation-xml"]),uo=b({},["title","style","font","a","script"]),ne=null,ho=["application/xhtml+xml","text/html"],I=null,Vt=null,go=n.createElement("form"),Mi=function(a){return a instanceof RegExp||a instanceof Function},Cn=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Vt||Vt!==a){if(a&&typeof a=="object"||(a={}),a=Rt(a),ne=ho.indexOf(a.PARSER_MEDIA_TYPE)===-1?"text/html":a.PARSER_MEDIA_TYPE,I=ne==="application/xhtml+xml"?Fn:_e,N=X(a,"ALLOWED_TAGS")?b({},a.ALLOWED_TAGS,I):ki,O=X(a,"ALLOWED_ATTR")?b({},a.ALLOWED_ATTR,I):Ri,xn=X(a,"ALLOWED_NAMESPACES")?b({},a.ALLOWED_NAMESPACES,Fn):co,An=X(a,"ADD_URI_SAFE_ATTR")?b(Rt(Pi),a.ADD_URI_SAFE_ATTR,I):Pi,Oi=X(a,"ADD_DATA_URI_TAGS")?b(Rt(Fi),a.ADD_DATA_URI_TAGS,I):Fi,Wt=X(a,"FORBID_CONTENTS")?b({},a.FORBID_CONTENTS,I):Ii,te=X(a,"FORBID_TAGS")?b({},a.FORBID_TAGS,I):{},gn=X(a,"FORBID_ATTR")?b({},a.FORBID_ATTR,I):{},jt=!!X(a,"USE_PROFILES")&&a.USE_PROFILES,Ti=a.ALLOW_ARIA_ATTR!==!1,mn=a.ALLOW_DATA_ATTR!==!1,wi=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Li=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Bt=a.SAFE_FOR_TEMPLATES||!1,pn=a.SAFE_FOR_XML!==!1,St=a.WHOLE_DOCUMENT||!1,_t=a.RETURN_DOM||!1,Ee=a.RETURN_DOM_FRAGMENT||!1,Se=a.RETURN_TRUSTED_TYPE||!1,bn=a.FORCE_BODY||!1,Di=a.SANITIZE_DOM!==!1,Ni=a.SANITIZE_NAMED_PROPS||!1,vn=a.KEEP_CONTENT!==!1,ee=a.IN_PLACE||!1,Si=a.ALLOWED_URI_REGEXP||zr,Ut=a.NAMESPACE||st,Te=a.MATHML_TEXT_INTEGRATION_POINTS||Te,we=a.HTML_INTEGRATION_POINTS||we,w=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Mi(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(w.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Mi(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(w.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(w.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Bt&&(mn=!1),Ee&&(_t=!0),jt&&(N=b({},cr),O=[],jt.html===!0&&(b(N,lr),b(O,ur)),jt.svg===!0&&(b(N,Pn),b(O,_n),b(O,Ie)),jt.svgFilters===!0&&(b(N,Mn),b(O,_n),b(O,Ie)),jt.mathMl===!0&&(b(N,Bn),b(O,hr),b(O,Ie))),a.ADD_TAGS&&(N===ki&&(N=Rt(N)),b(N,a.ADD_TAGS,I)),a.ADD_ATTR&&(O===Ri&&(O=Rt(O)),b(O,a.ADD_ATTR,I)),a.ADD_URI_SAFE_ATTR&&b(An,a.ADD_URI_SAFE_ATTR,I),a.FORBID_CONTENTS&&(Wt===Ii&&(Wt=Rt(Wt)),b(Wt,a.FORBID_CONTENTS,I)),vn&&(N["#text"]=!0),St&&b(N,["html","head","body"]),N.table&&(b(N,["tbody"]),delete te.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw ae('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ae('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=a.TRUSTED_TYPES_POLICY,ot=k.createHTML("")}else k===void 0&&(k=function(g,h){if(typeof g!="object"||typeof g.createPolicy!="function")return null;let v=null,A="data-tt-policy-suffix";h&&h.hasAttribute(A)&&(v=h.getAttribute(A));let f="dompurify"+(v?"#"+v:"");try{return g.createPolicy(f,{createHTML:D=>D,createScriptURL:D=>D})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}}(tt,o)),k!==null&&typeof ot=="string"&&(ot=k.createHTML(""));V&&V(a),Vt=a}},Bi=b({},[...Pn,...Mn,...Uo]),_i=b({},[...Bn,...Vo]),et=function(a){oe(e.removed,{element:a});try{F(a).removeChild(a)}catch{Ct(a)}},Le=function(a,g){try{oe(e.removed,{attribute:g.getAttributeNode(a),from:g})}catch{oe(e.removed,{attribute:null,from:g})}if(g.removeAttribute(a),a==="is")if(_t||Ee)try{et(g)}catch{}else try{g.setAttribute(a,"")}catch{}},ji=function(a){let g=null,h=null;if(bn)a=""+a;else{let f=sr(a,/^[\r\n\t ]+/);h=f&&f[0]}ne==="application/xhtml+xml"&&Ut===st&&(a=''+a+"");let v=k?k.createHTML(a):a;if(Ut===st)try{g=new H().parseFromString(v,ne)}catch{}if(!g||!g.documentElement){g=Et.createDocument(Ut,"template",null);try{g.documentElement.innerHTML=yn?ot:v}catch{}}let A=g.body||g.documentElement;return a&&h&&A.insertBefore(n.createTextNode(h),A.childNodes[0]||null),Ut===st?io.call(g,St?"html":"body")[0]:St?g.documentElement:A},Wi=function(a){return eo.call(a.ownerDocument||a,a,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},En=function(a){return a instanceof T&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof C)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Ui=function(a){return typeof c=="function"&&a instanceof c};function at(a,g,h){Ne(a,v=>{v.call(e,g,h,Vt)})}let Vi=function(a){let g=null;if(at(J.beforeSanitizeElements,a,null),En(a))return et(a),!0;let h=I(a.nodeName);if(at(J.uponSanitizeElement,a,{tagName:h,allowedTags:N}),a.hasChildNodes()&&!Ui(a.firstElementChild)&&_(/<[/\w]/g,a.innerHTML)&&_(/<[/\w]/g,a.textContent)||a.nodeType===Qo||pn&&a.nodeType===ts&&_(/<[/\w]/g,a.data))return et(a),!0;if(!N[h]||te[h]){if(!te[h]&&qi(h)&&(w.tagNameCheck instanceof RegExp&&_(w.tagNameCheck,h)||w.tagNameCheck instanceof Function&&w.tagNameCheck(h)))return!1;if(vn&&!Wt[h]){let v=F(a)||a.parentNode,A=Qt(a)||a.childNodes;if(A&&v)for(let f=A.length-1;f>=0;--f){let D=pt(A[f],!0);D.__removalCount=(a.__removalCount||0)+1,v.insertBefore(D,Zt(a))}}return et(a),!0}return a instanceof u&&!function(v){let A=F(v);A&&A.tagName||(A={namespaceURI:Ut,tagName:"template"});let f=_e(v.tagName),D=_e(A.tagName);return!!xn[v.namespaceURI]&&(v.namespaceURI===Re?A.namespaceURI===st?f==="svg":A.namespaceURI===ke?f==="svg"&&(D==="annotation-xml"||Te[D]):!!Bi[f]:v.namespaceURI===ke?A.namespaceURI===st?f==="math":A.namespaceURI===Re?f==="math"&&we[D]:!!_i[f]:v.namespaceURI===st?!(A.namespaceURI===Re&&!we[D])&&!(A.namespaceURI===ke&&!Te[D])&&!_i[f]&&(uo[f]||!Bi[f]):!(ne!=="application/xhtml+xml"||!xn[v.namespaceURI]))}(a)?(et(a),!0):h!=="noscript"&&h!=="noembed"&&h!=="noframes"||!_(/<\/no(script|embed|frames)/i,a.innerHTML)?(Bt&&a.nodeType===Zo&&(g=a.textContent,Ne([un,hn,dn],v=>{g=se(g,v," ")}),a.textContent!==g&&(oe(e.removed,{element:a.cloneNode()}),a.textContent=g)),at(J.afterSanitizeElements,a,null),!1):(et(a),!0)},zi=function(a,g,h){if(Di&&(g==="id"||g==="name")&&(h in n||h in go))return!1;if(!(mn&&!gn[g]&&_(oo,g))){if(!(Ti&&_(so,g))){if(!O[g]||gn[g]){if(!(qi(a)&&(w.tagNameCheck instanceof RegExp&&_(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a))&&(w.attributeNameCheck instanceof RegExp&&_(w.attributeNameCheck,g)||w.attributeNameCheck instanceof Function&&w.attributeNameCheck(g))||g==="is"&&w.allowCustomizedBuiltInElements&&(w.tagNameCheck instanceof RegExp&&_(w.tagNameCheck,h)||w.tagNameCheck instanceof Function&&w.tagNameCheck(h))))return!1}else if(!An[g]){if(!_(Si,se(h,Ei,""))){if((g!=="src"&&g!=="xlink:href"&&g!=="href"||a==="script"||_o(h,"data:")!==0||!Oi[a])&&!(wi&&!_(ao,se(h,Ei,"")))){if(h)return!1}}}}}return!0},qi=function(a){return a!=="annotation-xml"&&sr(a,lo)},Hi=function(a){at(J.beforeSanitizeAttributes,a,null);let{attributes:g}=a;if(!g||En(a))return;let h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O,forceKeepAttr:void 0},v=g.length;for(;v--;){let A=g[v],{name:f,namespaceURI:D,value:lt}=A,nt=I(f),B=f==="value"?lt:jo(lt);if(h.attrName=nt,h.attrValue=B,h.keepAttr=!0,h.forceKeepAttr=void 0,at(J.uponSanitizeAttribute,a,h),B=h.attrValue,!Ni||nt!=="id"&&nt!=="name"||(Le(f,a),B="user-content-"+B),pn&&_(/((--!?|])>)|<\/(style|title)/i,B)){Le(f,a);continue}if(h.forceKeepAttr||(Le(f,a),!h.keepAttr))continue;if(!Li&&_(/\/>/i,B)){Le(f,a);continue}Bt&&Ne([un,hn,dn],Ki=>{B=se(B,Ki," ")});let Ji=I(a.nodeName);if(zi(Ji,nt,B)){if(k&&typeof tt=="object"&&typeof tt.getAttributeType=="function"&&!D)switch(tt.getAttributeType(Ji,nt)){case"TrustedHTML":B=k.createHTML(B);break;case"TrustedScriptURL":B=k.createScriptURL(B)}try{D?a.setAttributeNS(D,f,B):a.setAttribute(f,B),En(a)?et(a):or(e.removed)}catch{}}}at(J.afterSanitizeAttributes,a,null)},mo=function a(g){let h=null,v=Wi(g);for(at(J.beforeSanitizeShadowDOM,g,null);h=v.nextNode();)at(J.uponSanitizeShadowNode,h,null),Vi(h),Hi(h),h.content instanceof s&&a(h.content);at(J.afterSanitizeShadowDOM,g,null)};return e.sanitize=function(a){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,v=null,A=null,f=null;if(yn=!a,yn&&(a=""),typeof a!="string"&&!Ui(a)){if(typeof a.toString!="function")throw ae("toString is not a function");if(typeof(a=a.toString())!="string")throw ae("dirty is not a string, aborting")}if(!e.isSupported)return a;if(fn||Cn(g),e.removed=[],typeof a=="string"&&(ee=!1),ee){if(a.nodeName){let nt=I(a.nodeName);if(!N[nt]||te[nt])throw ae("root node is forbidden and cannot be sanitized in-place")}}else if(a instanceof c)h=ji(""),v=h.ownerDocument.importNode(a,!0),v.nodeType===Xo&&v.nodeName==="BODY"||v.nodeName==="HTML"?h=v:h.appendChild(v);else{if(!_t&&!Bt&&!St&&a.indexOf("<")===-1)return k&&Se?k.createHTML(a):a;if(h=ji(a),!h)return _t?null:Se?ot:""}h&&bn&&et(h.firstChild);let D=Wi(ee?a:h);for(;A=D.nextNode();)Vi(A),Hi(A),A.content instanceof s&&mo(A.content);if(ee)return a;if(_t){if(Ee)for(f=no.call(h.ownerDocument);h.firstChild;)f.appendChild(h.firstChild);else f=h;return(O.shadowroot||O.shadowrootmode)&&(f=ro.call(r,f,!0)),f}let lt=St?h.outerHTML:h.innerHTML;return St&&N["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&_(qr,h.ownerDocument.doctype.name)&&(lt=" -`+lt),Bt&&Ne([un,hn,dn],nt=>{lt=se(lt,nt," ")}),k&&Se?k.createHTML(lt):lt},e.setConfig=function(){Cn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),fn=!0},e.clearConfig=function(){Vt=null,fn=!1},e.isValidAttribute=function(a,g,h){Vt||Cn({});let v=I(a),A=I(g);return zi(v,A,h)},e.addHook=function(a,g){typeof g=="function"&&oe(J[a],g)},e.removeHook=function(a){return or(J[a])},e.removeHooks=function(a){J[a]=[]},e.removeAllHooks=function(){J={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},e}();Ve.addHook("uponSanitizeAttribute",function(i,t){/^data-trix-/.test(t.attrName)&&(t.forceKeepAttr=!0)});var is="style href src width height language class".split(" "),rs="javascript:".split(" "),os="script iframe form noscript".split(" "),Kt=class extends R{static setHTML(t,e){let n=new this(e).sanitize(),r=n.getHTML?n.getHTML():n.outerHTML;t.innerHTML=r}static sanitize(t,e){let n=new this(t,e);return n.sanitize(),n}constructor(t){let{allowedAttributes:e,forbiddenProtocols:n,forbiddenElements:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.allowedAttributes=e||is,this.forbiddenProtocols=n||rs,this.forbiddenElements=r||os,this.body=ss(t)}sanitize(){return this.sanitizeElements(),this.normalizeListElementNesting(),Ve.setConfig(Lr),this.body=Ve.sanitize(this.body),this.body}getHTML(){return this.body.innerHTML}getBody(){return this.body}sanitizeElements(){let t=je(this.body),e=[];for(;t.nextNode();){let n=t.currentNode;switch(n.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(n)?e.push(n):this.sanitizeElement(n);break;case Node.COMMENT_NODE:e.push(n)}}return e.forEach(n=>At(n)),this.body}sanitizeElement(t){return t.hasAttribute("href")&&this.forbiddenProtocols.includes(t.protocol)&&t.removeAttribute("href"),Array.from(t.attributes).forEach(e=>{let{name:n}=e;this.allowedAttributes.includes(n)||n.indexOf("data-trix")===0||t.removeAttribute(n)}),t}normalizeListElementNesting(){return Array.from(this.body.querySelectorAll("ul,ol")).forEach(t=>{let e=t.previousElementSibling;e&&j(e)==="li"&&e.appendChild(t)}),this.body}elementIsRemovable(t){if(t?.nodeType===Node.ELEMENT_NODE)return this.elementIsForbidden(t)||this.elementIsntSerializable(t)}elementIsForbidden(t){return this.forbiddenElements.includes(j(t))}elementIsntSerializable(t){return t.getAttribute("data-trix-serialize")==="false"&&!Lt(t)}},ss=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";i=i.replace(/<\/html[^>]*>[^]*$/i,"");let t=document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=i,Array.from(t.head.querySelectorAll("style")).forEach(e=>{t.body.appendChild(e)}),t.body},{css:ft}=Ce,be=class extends gt{constructor(){super(...arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}createContentNodes(){return[]}createNodes(){let t,e=t=p({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),n=this.getHref();return n&&(t=p({tagName:"a",editable:!1,attributes:{href:n,tabindex:-1}}),e.appendChild(t)),this.attachment.hasContent()?Kt.setHTML(t,this.attachment.getContent()):this.createContentNodes().forEach(r=>{t.appendChild(r)}),t.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=p({tagName:"progress",attributes:{class:ft.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),e.appendChild(this.progressElement)),[gr("left"),e,gr("right")]}createCaptionElement(){let t=p({tagName:"figcaption",className:ft.attachmentCaption}),e=this.attachmentPiece.getCaption();if(e)t.classList.add("".concat(ft.attachmentCaption,"--edited")),t.textContent=e;else{let n,r,o=this.getCaptionConfig();if(o.name&&(n=this.attachment.getFilename()),o.size&&(r=this.attachment.getFormattedFilesize()),n){let s=p({tagName:"span",className:ft.attachmentName,textContent:n});t.appendChild(s)}if(r){n&&t.appendChild(document.createTextNode(" "));let s=p({tagName:"span",className:ft.attachmentSize,textContent:r});t.appendChild(s)}}return t}getClassName(){let t=[ft.attachment,"".concat(ft.attachment,"--").concat(this.attachment.getType())],e=this.attachment.getExtension();return e&&t.push("".concat(ft.attachment,"--").concat(e)),t.join(" ")}getData(){let t={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},{attributes:e}=this.attachmentPiece;return e.isEmpty()||(t.trixAttributes=JSON.stringify(e)),this.attachment.isPending()&&(t.trixSerialize=!1),t}getHref(){if(!as(this.attachment.getContent(),"a"))return this.attachment.getHref()}getCaptionConfig(){var t;let e=this.attachment.getType(),n=_r((t=mi[e])===null||t===void 0?void 0:t.caption);return e==="file"&&(n.name=!0),n}findProgressElement(){var t;return(t=this.findElement())===null||t===void 0?void 0:t.querySelector("progress")}attachmentDidChangeUploadProgress(){let t=this.attachment.getUploadProgress(),e=this.findProgressElement();e&&(e.value=t)}},gr=i=>p({tagName:"span",textContent:ln,data:{trixCursorTarget:i,trixSerialize:!1}}),as=function(i,t){let e=p("div");return Kt.setHTML(e,i||""),e.querySelector(t)},ze=class extends be{constructor(){super(...arguments),this.attachment.previewDelegate=this}createContentNodes(){return this.image=p({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]}createCaptionElement(){let t=super.createCaptionElement(...arguments);return t.textContent||t.setAttribute("data-trix-placeholder",m.captionPlaceholder),t}refresh(t){var e;if(t||(t=(e=this.findElement())===null||e===void 0?void 0:e.querySelector("img")),t)return this.updateAttributesForImage(t)}updateAttributesForImage(t){let e=this.attachment.getURL(),n=this.attachment.getPreviewURL();if(t.src=n||e,n===e)t.removeAttribute("data-trix-serialized-attributes");else{let l=JSON.stringify({src:e});t.setAttribute("data-trix-serialized-attributes",l)}let r=this.attachment.getWidth(),o=this.attachment.getHeight();r!=null&&(t.width=r),o!=null&&(t.height=o);let s=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/");t.dataset.trixStoreKey=s}attachmentDidChangeAttributes(){return this.refresh(this.image),this.refresh()}},qe=class extends gt{constructor(){super(...arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),this.textConfig=this.options.textConfig,this.context=this.options.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}createNodes(){let t=this.attachment?this.createAttachmentNodes():this.createStringNodes(),e=this.createElement();if(e){let n=function(r){for(;(o=r)!==null&&o!==void 0&&o.firstElementChild;){var o;r=r.firstElementChild}return r}(e);Array.from(t).forEach(r=>{n.appendChild(r)}),t=[e]}return t}createAttachmentNodes(){let t=this.attachment.isPreviewable()?ze:be;return this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()}createStringNodes(){var t;if((t=this.textConfig)!==null&&t!==void 0&&t.plaintext)return[document.createTextNode(this.string)];{let e=[],n=this.string.split(` -`);for(let r=0;r0){let s=p("br");e.push(s)}if(o.length){let s=document.createTextNode(this.preserveSpaces(o));e.push(s)}}return e}}createElement(){let t,e,n,r={};for(e in this.attributes){n=this.attributes[e];let s=ti(e);if(s){if(s.tagName){var o;let l=p(s.tagName);o?(o.appendChild(l),o=l):t=o=l}if(s.styleProperty&&(r[s.styleProperty]=n),s.style)for(e in s.style)n=s.style[e],r[e]=n}}if(Object.keys(r).length)for(e in t||(t=p("span")),r)n=r[e],t.style[e]=n;return t}createContainerElement(){for(let t in this.attributes){let e=this.attributes[t],n=ti(t);if(n&&n.groupTagName){let r={};return r[t]=e,p(n.groupTagName,r)}}}preserveSpaces(t){return this.context.isLast&&(t=t.replace(/\ $/,bt)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 ".concat(bt," $2")).replace(/\ {2}/g,"".concat(bt," ")).replace(/\ {2}/g," ".concat(bt)),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,bt)),t}},He=class extends gt{constructor(){super(...arguments),this.text=this.object,this.textConfig=this.options.textConfig}createNodes(){let t=[],e=fe.groupObjects(this.getPieces()),n=e.length-1;for(let o=0;o!t.hasAttribute("blockBreak"))}},ls=i=>/\s$/.test(i?.toString()),{css:mr}=Ce,Je=class extends gt{constructor(){super(...arguments),this.block=this.object,this.attributes=this.block.getAttributes()}createNodes(){let t=[document.createComment("block")];if(this.block.isEmpty())t.push(p("br"));else{var e;let n=(e=L(this.block.getLastAttribute()))===null||e===void 0?void 0:e.text,r=this.findOrCreateCachedChildView(He,this.block.text,{textConfig:n});t.push(...Array.from(r.getNodes()||[])),this.shouldAddExtraNewlineElement()&&t.push(p("br"))}if(this.attributes.length)return t;{let n,{tagName:r}=W.default;this.block.isRTL()&&(n={dir:"rtl"});let o=p({tagName:r,attributes:n});return t.forEach(s=>o.appendChild(s)),[o]}}createContainerElement(t){let e={},n,r=this.attributes[t],{tagName:o,htmlAttributes:s=[]}=L(r);if(t===0&&this.block.isRTL()&&Object.assign(e,{dir:"rtl"}),r==="attachmentGallery"){let l=this.block.getBlockBreakPosition();n="".concat(mr.attachmentGallery," ").concat(mr.attachmentGallery,"--").concat(l)}return Object.entries(this.block.htmlAttributes).forEach(l=>{let[c,u]=l;s.includes(c)&&(e[c]=u)}),p({tagName:o,className:n,attributes:e})}shouldAddExtraNewlineElement(){return/\n\n$/.test(this.block.toString())}},Gt=class extends gt{static render(t){let e=p("div"),n=new this(t,{element:e});return n.render(),n.sync(),e}constructor(){super(...arguments),this.element=this.options.element,this.elementStore=new ii,this.setDocument(this.object)}setDocument(t){t.isEqualTo(this.document)||(this.document=this.object=t)}render(){if(this.childViews=[],this.shadowElement=p("div"),!this.document.isEmpty()){let t=fe.groupObjects(this.document.getBlocks(),{asTree:!0});Array.from(t).forEach(e=>{let n=this.findOrCreateCachedChildView(Je,e);Array.from(n.getNodes()).map(r=>this.shadowElement.appendChild(r))})}}isSynced(){return cs(this.shadowElement,this.element)}sync(){let t=this.createDocumentFragmentForSync();for(;this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()}didSync(){return this.elementStore.reset(pr(this.element)),Ai(()=>this.garbageCollectCachedViews())}createDocumentFragmentForSync(){let t=document.createDocumentFragment();return Array.from(this.shadowElement.childNodes).forEach(e=>{t.appendChild(e.cloneNode(!0))}),Array.from(pr(t)).forEach(e=>{let n=this.elementStore.remove(e);n&&e.parentNode.replaceChild(n,e)}),t}},pr=i=>i.querySelectorAll("[data-trix-store-key]"),cs=(i,t)=>fr(i.innerHTML)===fr(t.innerHTML),fr=i=>i.replace(/ /g," ");function Oe(i){var t,e;function n(o,s){try{var l=i[o](s),c=l.value,u=c instanceof us;Promise.resolve(u?c.v:c).then(function(d){if(u){var C=o==="return"?"return":"next";if(!c.k||d.done)return n(C,d);d=i[C](d).value}r(l.done?"return":"normal",d)},function(d){n("throw",d)})}catch(d){r("throw",d)}}function r(o,s){switch(o){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?n(t.key,t.arg):e=null}this._invoke=function(o,s){return new Promise(function(l,c){var u={key:o,arg:s,resolve:l,reject:c,next:null};e?e=e.next=u:(t=e=u,n(o,s))})},typeof i.return!="function"&&(this.return=void 0)}function us(i,t){this.v=i,this.k=t}function q(i,t,e){return(t=hs(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function hs(i){var t=function(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return typeof t=="symbol"?t:String(t)}Oe.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Oe.prototype.next=function(i){return this._invoke("next",i)},Oe.prototype.throw=function(i){return this._invoke("throw",i)},Oe.prototype.return=function(i){return this._invoke("return",i)};function x(i,t){return ds(i,Hr(i,t,"get"))}function Ci(i,t,e){return gs(i,Hr(i,t,"set"),e),e}function Hr(i,t,e){if(!t.has(i))throw new TypeError("attempted to "+e+" private field on non-instance");return t.get(i)}function ds(i,t){return t.get?t.get.call(i):t.value}function gs(i,t,e){if(t.set)t.set.call(i,e);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=e}}function Fe(i,t,e){if(!t.has(i))throw new TypeError("attempted to get private field on non-instance");return e}function Jr(i,t){if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pe(i,t,e){Jr(i,t),t.set(i,e)}var mt=class extends dt{static registerType(t,e){e.type=t,this.types[t]=e}static fromJSON(t){let e=this.types[t.type];if(e)return e.fromJSON(t)}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.attributes=U.box(e)}copyWithAttributes(t){return new this.constructor(this.getValue(),t)}copyWithAdditionalAttributes(t){return this.copyWithAttributes(this.attributes.merge(t))}copyWithoutAttribute(t){return this.copyWithAttributes(this.attributes.remove(t))}copy(){return this.copyWithAttributes(this.attributes)}getAttribute(t){return this.attributes.get(t)}getAttributesHash(){return this.attributes}getAttributes(){return this.attributes.toObject()}hasAttribute(t){return this.attributes.has(t)}hasSameStringValueAsPiece(t){return t&&this.toString()===t.toString()}hasSameAttributesAsPiece(t){return t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))}isBlockBreak(){return!1}isEqualTo(t){return super.isEqualTo(...arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)}isEmpty(){return this.length===0}isSerializable(){return!0}toJSON(){return{type:this.constructor.type,attributes:this.getAttributes()}}contentsForInspection(){return{type:this.constructor.type,attributes:this.attributes.inspect()}}canBeGrouped(){return this.hasAttribute("href")}canBeGroupedWith(t){return this.getAttribute("href")===t.getAttribute("href")}getLength(){return this.length}canBeConsolidatedWith(t){return!1}};q(mt,"types",{});var Ke=class extends Jt{constructor(t){super(...arguments),this.url=t}perform(t){let e=new Image;e.onload=()=>(e.width=this.width=e.naturalWidth,e.height=this.height=e.naturalHeight,t(!0,e)),e.onerror=()=>t(!1),e.src=this.url}},yt=class extends dt{static attachmentForFile(t){let e=new this(this.attributesForFile(t));return e.setFile(t),e}static attributesForFile(t){return new U({filename:t.name,filesize:t.size,contentType:t.type})}static fromJSON(t){return new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t),this.releaseFile=this.releaseFile.bind(this),this.attributes=U.box(t),this.didChangeAttributes()}getAttribute(t){return this.attributes.get(t)}hasAttribute(t){return this.attributes.has(t)}getAttributes(){return this.attributes.toObject()}setAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=this.attributes.merge(t);var n,r,o,s;if(!this.attributes.isEqualTo(e))return this.attributes=e,this.didChangeAttributes(),(n=this.previewDelegate)===null||n===void 0||(r=n.attachmentDidChangeAttributes)===null||r===void 0||r.call(n,this),(o=this.delegate)===null||o===void 0||(s=o.attachmentDidChangeAttributes)===null||s===void 0?void 0:s.call(o,this)}didChangeAttributes(){if(this.isPreviewable())return this.preloadURL()}isPending(){return this.file!=null&&!(this.getURL()||this.getHref())}isPreviewable(){return this.attributes.has("previewable")?this.attributes.get("previewable"):yt.previewablePattern.test(this.getContentType())}getType(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"}getURL(){return this.attributes.get("url")}getHref(){return this.attributes.get("href")}getFilename(){return this.attributes.get("filename")||""}getFilesize(){return this.attributes.get("filesize")}getFormattedFilesize(){let t=this.attributes.get("filesize");return typeof t=="number"?Dr.formatter(t):""}getExtension(){var t;return(t=this.getFilename().match(/\.(\w+)$/))===null||t===void 0?void 0:t[1].toLowerCase()}getContentType(){return this.attributes.get("contentType")}hasContent(){return this.attributes.has("content")}getContent(){return this.attributes.get("content")}getWidth(){return this.attributes.get("width")}getHeight(){return this.attributes.get("height")}getFile(){return this.file}setFile(t){if(this.file=t,this.isPreviewable())return this.preloadFile()}releaseFile(){this.releasePreloadedFile(),this.file=null}getUploadProgress(){return this.uploadProgress!=null?this.uploadProgress:0}setUploadProgress(t){var e,n;if(this.uploadProgress!==t)return this.uploadProgress=t,(e=this.uploadProgressDelegate)===null||e===void 0||(n=e.attachmentDidChangeUploadProgress)===null||n===void 0?void 0:n.call(e,this)}toJSON(){return this.getAttributes()}getCacheKey(){return[super.getCacheKey(...arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")}getPreviewURL(){return this.previewURL||this.preloadingURL}setPreviewURL(t){var e,n,r,o;if(t!==this.getPreviewURL())return this.previewURL=t,(e=this.previewDelegate)===null||e===void 0||(n=e.attachmentDidChangeAttributes)===null||n===void 0||n.call(e,this),(r=this.delegate)===null||r===void 0||(o=r.attachmentDidChangePreviewURL)===null||o===void 0?void 0:o.call(r,this)}preloadURL(){return this.preload(this.getURL(),this.releaseFile)}preloadFile(){if(this.file)return this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)}releasePreloadedFile(){this.fileObjectURL&&(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null)}preload(t,e){if(t&&t!==this.getPreviewURL())return this.preloadingURL=t,new Ke(t).then(n=>{let{width:r,height:o}=n;return this.getWidth()&&this.getHeight()||this.setAttributes({width:r,height:o}),this.preloadingURL=null,this.setPreviewURL(t),e?.()}).catch(()=>(this.preloadingURL=null,e?.()))}};q(yt,"previewablePattern",/^image(\/(gif|png|webp|jpe?g)|$)/);var xt=class extends mt{static fromJSON(t){return new this(yt.fromJSON(t.attachment),t.attributes)}constructor(t){super(...arguments),this.attachment=t,this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}ensureAttachmentExclusivelyHasAttribute(t){this.hasAttribute(t)&&(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice([t])),this.attributes=this.attributes.remove(t))}removeProhibitedAttributes(){let t=this.attributes.slice(xt.permittedAttributes);t.isEqualTo(this.attributes)||(this.attributes=t)}getValue(){return this.attachment}isSerializable(){return!this.attachment.isPending()}getCaption(){return this.attributes.get("caption")||""}isEqualTo(t){var e;return super.isEqualTo(t)&&this.attachment.id===(t==null||(e=t.attachment)===null||e===void 0?void 0:e.id)}toString(){return"\uFFFC"}toJSON(){let t=super.toJSON(...arguments);return t.attachment=this.attachment,t}getCacheKey(){return[super.getCacheKey(...arguments),this.attachment.getCacheKey()].join("/")}toConsole(){return JSON.stringify(this.toString())}};q(xt,"permittedAttributes",["caption","presentation"]),mt.registerType("attachment",xt);var ve=class extends mt{static fromJSON(t){return new this(t.string,t.attributes)}constructor(t){super(...arguments),this.string=(e=>e.replace(/\r\n?/g,` + `)},Yn={interval:5e3},Ce=Object.freeze({__proto__:null,attachments:mi,blockAttributes:W,browser:xe,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"},dompurify:Lr,fileSize:Dr,input:bi,keyNames:{8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},lang:m,parser:Me,textAttributes:Dt,toolbar:Fr,undo:Yn}),R=class{static proxyMethod(t){let{name:e,toMethod:n,toProperty:r,optional:o}=Ao(t);this.prototype[e]=function(){let s,l;var c,u;return n?l=o?(c=this[n])===null||c===void 0?void 0:c.call(this):this[n]():r&&(l=this[r]),o?(s=(u=l)===null||u===void 0?void 0:u[e],s?Xi.call(s,l,arguments):void 0):(s=l[e],Xi.call(s,l,arguments))}}},Ao=function(i){let t=i.match(yo);if(!t)throw new Error("can't parse @proxyMethod expression: ".concat(i));let e={name:t[4]};return t[2]!=null?e.toMethod=t[1]:e.toProperty=t[1],t[3]!=null&&(e.optional=!0),e},{apply:Xi}=Function.prototype,yo=new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$"),Tn,wn,Ln,Nt=class extends R{static box(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t instanceof this?t:this.fromUCS2String(t?.toString())}static fromUCS2String(t){return new this(t,Xn(t))}static fromCodepoints(t){return new this(Zn(t),t)}constructor(t,e){super(...arguments),this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}offsetToUCS2Offset(t){return Zn(this.codepoints.slice(0,Math.max(0,t))).length}offsetFromUCS2Offset(t){return Xn(this.ucs2String.slice(0,Math.max(0,t))).length}slice(){return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))}charAt(t){return this.slice(t,t+1)}isEqualTo(t){return this.constructor.box(t).ucs2String===this.ucs2String}toJSON(){return this.ucs2String}getCacheKey(){return this.ucs2String}toString(){return this.ucs2String}},xo=((Tn=Array.from)===null||Tn===void 0?void 0:Tn.call(Array,"\u{1F47C}").length)===1,Co=((wn=" ".codePointAt)===null||wn===void 0?void 0:wn.call(" ",0))!=null,Eo=((Ln=String.fromCodePoint)===null||Ln===void 0?void 0:Ln.call(String,32,128124))===" \u{1F47C}",Xn,Zn;Xn=xo&&Co?i=>Array.from(i).map(t=>t.codePointAt(0)):function(i){let t=[],e=0,{length:n}=i;for(;eString.fromCodePoint(...Array.from(i||[])):function(i){return(()=>{let t=[];return Array.from(i).forEach(e=>{let n="";e>65535&&(e-=65536,n+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t.push(n+String.fromCharCode(e))}),t})().join("")};var So=0,ht=class extends R{static fromJSONString(t){return this.fromJSON(JSON.parse(t))}constructor(){super(...arguments),this.id=++So}hasSameConstructorAs(t){return this.constructor===t?.constructor}isEqualTo(t){return this===t}inspect(){let t=[],e=this.contentsForInspection()||{};for(let n in e){let r=e[n];t.push("".concat(n,"=").concat(r))}return"#<".concat(this.constructor.name,":").concat(this.id).concat(t.length?" ".concat(t.join(", ")):"",">")}contentsForInspection(){}toJSONString(){return JSON.stringify(this)}toUTF16String(){return Nt.box(this)}getCacheKey(){return this.id.toString()}},It=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;for(let e=0;e1?e-1:0),r=1;r(Dn||(Dn=wo().concat(To())),Dn),L=i=>W[i],To=()=>(Nn||(Nn=Object.keys(W)),Nn),ti=i=>Dt[i],wo=()=>(In||(In=Object.keys(Dt)),In),Pr=function(i,t){Lo(i).textContent=t.replace(/%t/g,i)},Lo=function(i){let t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-tag-name",i.toLowerCase());let e=Do();return e&&t.setAttribute("nonce",e),document.head.insertBefore(t,document.head.firstChild),t},Do=function(){let i=Zi("trix-csp-nonce")||Zi("csp-nonce");if(i){let{nonce:t,content:e}=i;return t==""?e:t}},Zi=i=>document.head.querySelector("meta[name=".concat(i,"]")),Qi={"application/x-trix-feature-detection":"test"},Mr=function(i){let t=i.getData("text/plain"),e=i.getData("text/html");if(!t||!e)return t?.length;{let{body:n}=new DOMParser().parseFromString(e,"text/html");if(n.textContent===t)return!n.querySelector("*")}},Br=/Mac|^iP/.test(navigator.platform)?i=>i.metaKey:i=>i.ctrlKey,Ai=i=>setTimeout(i,1),_r=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};for(let e in i){let n=i[e];t[e]=n}return t},Xt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Object.keys(i).length!==Object.keys(t).length)return!1;for(let e in i)if(i[e]!==t[e])return!1;return!0},y=function(i){if(i!=null)return Array.isArray(i)||(i=[i,i]),[tr(i[0]),tr(i[1]!=null?i[1]:i[0])]},ut=function(i){if(i==null)return;let[t,e]=y(i);return ei(t,e)},We=function(i,t){if(i==null||t==null)return;let[e,n]=y(i),[r,o]=y(t);return ei(e,r)&&ei(n,o)},tr=function(i){return typeof i=="number"?i:_r(i)},ei=function(i,t){return typeof i=="number"?i===t:Xt(i,t)},Ue=class extends R{constructor(){super(...arguments),this.update=this.update.bind(this),this.selectionManagers=[]}start(){this.started||(this.started=!0,document.addEventListener("selectionchange",this.update,!0))}stop(){if(this.started)return this.started=!1,document.removeEventListener("selectionchange",this.update,!0)}registerSelectionManager(t){if(!this.selectionManagers.includes(t))return this.selectionManagers.push(t),this.start()}unregisterSelectionManager(t){if(this.selectionManagers=this.selectionManagers.filter(e=>e!==t),this.selectionManagers.length===0)return this.stop()}notifySelectionManagersOfSelectionChange(){return this.selectionManagers.map(t=>t.selectionDidChange())}update(){this.notifySelectionManagersOfSelectionChange()}reset(){this.update()}},Ot=new Ue,jr=function(){let i=window.getSelection();if(i.rangeCount>0)return i},me=function(){var i;let t=(i=jr())===null||i===void 0?void 0:i.getRangeAt(0);if(t&&!No(t))return t},Wr=function(i){let t=window.getSelection();return t.removeAllRanges(),t.addRange(i),Ot.update()},No=i=>er(i.startContainer)||er(i.endContainer),er=i=>!Object.getPrototypeOf(i),ue=i=>i.replace(new RegExp("".concat(ln),"g"),"").replace(new RegExp("".concat(ft),"g")," "),yi=new RegExp("[^\\S".concat(ft,"]")),xi=i=>i.replace(new RegExp("".concat(yi.source),"g")," ").replace(/\ {2,}/g," "),nr=function(i,t){if(i.isEqualTo(t))return["",""];let e=On(i,t),{length:n}=e.utf16String,r;if(n){let{offset:o}=e,s=i.codepoints.slice(0,o).concat(i.codepoints.slice(o+n));r=On(t,Nt.fromCodepoints(s))}else r=On(t,i);return[e.utf16String.toString(),r.utf16String.toString()]},On=function(i,t){let e=0,n=i.length,r=t.length;for(;ee+1&&i.charAt(n-1).isEqualTo(t.charAt(r-1));)n--,r--;return{utf16String:i.slice(e,n),offset:e}},X=class i extends ht{static fromCommonAttributesOfObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!t.length)return new this;let e=re(t[0]),n=e.getKeys();return t.slice(1).forEach(r=>{n=e.getKeysCommonToHash(re(r)),e=e.slice(n)}),e}static box(t){return re(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(...arguments),this.values=Be(t)}add(t,e){return this.merge(Io(t,e))}remove(t){return new i(Be(this.values,t))}get(t){return this.values[t]}has(t){return t in this.values}merge(t){return new i(Oo(this.values,Fo(t)))}slice(t){let e={};return Array.from(t).forEach(n=>{this.has(n)&&(e[n]=this.values[n])}),new i(e)}getKeys(){return Object.keys(this.values)}getKeysCommonToHash(t){return t=re(t),this.getKeys().filter(e=>this.values[e]===t.values[e])}isEqualTo(t){return It(this.toArray(),re(t).toArray())}isEmpty(){return this.getKeys().length===0}toArray(){if(!this.array){let t=[];for(let e in this.values){let n=this.values[e];t.push(t.push(e,n))}this.array=t.slice(0)}return this.array}toObject(){return Be(this.values)}toJSON(){return this.toObject()}contentsForInspection(){return{values:JSON.stringify(this.values)}}},Io=function(i,t){let e={};return e[i]=t,e},Oo=function(i,t){let e=Be(i);for(let n in t){let r=t[n];e[n]=r}return e},Be=function(i,t){let e={};return Object.keys(i).sort().forEach(n=>{n!==t&&(e[n]=i[n])}),e},re=function(i){return i instanceof X?i:new X(i)},Fo=function(i){return i instanceof X?i.values:i},fe=class{static groupObjects(){let t,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:n,asTree:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r&&n==null&&(n=0);let o=[];return Array.from(e).forEach(s=>{var l;if(t){var c,u,d;if((c=s.canBeGrouped)!==null&&c!==void 0&&c.call(s,n)&&(u=(d=t[t.length-1]).canBeGroupedWith)!==null&&u!==void 0&&u.call(d,s,n))return void t.push(s);o.push(new this(t,{depth:n,asTree:r})),t=null}(l=s.canBeGrouped)!==null&&l!==void 0&&l.call(s,n)?t=[s]:o.push(s)}),t&&o.push(new this(t,{depth:n,asTree:r})),o}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:e,asTree:n}=arguments.length>1?arguments[1]:void 0;this.objects=t,n&&(this.depth=e,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}getObjects(){return this.objects}getDepth(){return this.depth}getCacheKey(){let t=["objectGroup"];return Array.from(this.getObjects()).forEach(e=>{t.push(e.getCacheKey())}),t.join("/")}},ni=class extends R{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects={},Array.from(t).forEach(e=>{let n=JSON.stringify(e);this.objects[n]==null&&(this.objects[n]=e)})}find(t){let e=JSON.stringify(t);return this.objects[e]}},ii=class{constructor(t){this.reset(t)}add(t){let e=ir(t);this.elements[e]=t}remove(t){let e=ir(t),n=this.elements[e];if(n)return delete this.elements[e],n}reset(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return this.elements={},Array.from(t).forEach(e=>{this.add(e)}),t}},ir=i=>i.dataset.trixStoreKey,Ht=class extends R{isPerforming(){return this.performing===!0}hasPerformed(){return this.performed===!0}hasSucceeded(){return this.performed&&this.succeeded}hasFailed(){return this.performed&&!this.succeeded}getPromise(){return this.promise||(this.promise=new Promise((t,e)=>(this.performing=!0,this.perform((n,r)=>{this.succeeded=n,this.performing=!1,this.performed=!0,this.succeeded?t(r):e(r)})))),this.promise}perform(t){return t(!1)}release(){var t,e;(t=this.promise)===null||t===void 0||(e=t.cancel)===null||e===void 0||e.call(t),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null}};Ht.proxyMethod("getPromise().then"),Ht.proxyMethod("getPromise().catch");var dt=class extends R{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.object=t,this.options=e,this.childViews=[],this.rootView=this}getNodes(){return this.nodes||(this.nodes=this.createNodes()),this.nodes.map(t=>t.cloneNode(!0))}invalidate(){var t;return this.nodes=null,this.childViews=[],(t=this.parentView)===null||t===void 0?void 0:t.invalidate()}invalidateViewForObject(t){var e;return(e=this.findViewForObject(t))===null||e===void 0?void 0:e.invalidate()}findOrCreateCachedChildView(t,e,n){let r=this.getCachedViewForObject(e);return r?this.recordChildView(r):(r=this.createChildView(...arguments),this.cacheViewForObject(r,e)),r}createChildView(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e instanceof fe&&(n.viewClass=t,t=ri);let r=new t(e,n);return this.recordChildView(r)}recordChildView(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t}getAllChildViews(){let t=[];return this.childViews.forEach(e=>{t.push(e),t=t.concat(e.getAllChildViews())}),t}findElement(){return this.findElementForObject(this.object)}findElementForObject(t){let e=t?.id;if(e)return this.rootView.element.querySelector("[data-trix-id='".concat(e,"']"))}findViewForObject(t){for(let e of this.getAllChildViews())if(e.object===t)return e}getViewCache(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?(this.viewCache||(this.viewCache={}),this.viewCache):void 0}isViewCachingEnabled(){return this.shouldCacheViews!==!1}enableViewCaching(){this.shouldCacheViews=!0}disableViewCaching(){this.shouldCacheViews=!1}getCachedViewForObject(t){var e;return(e=this.getViewCache())===null||e===void 0?void 0:e[t.getCacheKey()]}cacheViewForObject(t,e){let n=this.getViewCache();n&&(n[e.getCacheKey()]=t)}garbageCollectCachedViews(){let t=this.getViewCache();if(t){let e=this.getAllChildViews().concat(this).map(n=>n.object.getCacheKey());for(let n in t)e.includes(n)||delete t[n]}}},ri=class extends dt{constructor(){super(...arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}getChildViews(){return this.childViews.length||Array.from(this.objectGroup.getObjects()).forEach(t=>{this.findOrCreateCachedChildView(this.viewClass,t,this.options)}),this.childViews}createNodes(){let t=this.createContainerElement();return this.getChildViews().forEach(e=>{Array.from(e.getNodes()).forEach(n=>{t.appendChild(n)})}),[t]}createContainerElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.objectGroup.getDepth();return this.getChildViews()[0].createContainerElement(t)}};var{entries:Ur,setPrototypeOf:rr,isFrozen:Po,getPrototypeOf:Mo,getOwnPropertyDescriptor:Bo}=Object,{freeze:U,seal:G,create:Vr}=Object,{apply:oi,construct:si}=typeof Reflect<"u"&&Reflect;U||(U=function(i){return i}),G||(G=function(i){return i}),oi||(oi=function(i,t,e){return i.apply(t,e)}),si||(si=function(i,t){return new i(...t)});var Ne=K(Array.prototype.forEach),or=K(Array.prototype.pop),oe=K(Array.prototype.push),_e=K(String.prototype.toLowerCase),Fn=K(String.prototype.toString),sr=K(String.prototype.match),se=K(String.prototype.replace),_o=K(String.prototype.indexOf),jo=K(String.prototype.trim),$=K(Object.prototype.hasOwnProperty),_=K(RegExp.prototype.test),ae=(ar=TypeError,function(){for(var i=arguments.length,t=new Array(i),e=0;e1?e-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:_e;rr&&rr(i,null);let n=t.length;for(;n--;){let r=t[n];if(typeof r=="string"){let o=e(r);o!==r&&(Po(t)||(t[n]=o),r=o)}i[r]=!0}return i}function Wo(i){for(let t=0;t/gm),qo=G(/\$\{[\w\W]*}/gm),Jo=G(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ko=G(/^aria-[\-\w]+$/),zr=G(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Go=G(/^(?:\w+script|data):/i),$o=G(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hr=G(/^html$/i),Yo=G(/^[a-z][.\w]*(-[.\w]+)+$/i),dr=Object.freeze({__proto__:null,ARIA_ATTR:Ko,ATTR_WHITESPACE:$o,CUSTOM_ELEMENT:Yo,DATA_ATTR:Jo,DOCTYPE_NAME:Hr,ERB_EXPR:Ho,IS_ALLOWED_URI:zr,IS_SCRIPT_OR_DATA:Go,MUSTACHE_EXPR:zo,TMPLIT_EXPR:qo}),Xo=1,Zo=3,Qo=7,ts=8,es=9,ns=function(){return typeof window>"u"?null:window},Ve=function i(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ns(),e=a=>i(a);if(e.version="3.2.3",e.removed=[],!t||!t.document||t.document.nodeType!==es)return e.isSupported=!1,e;let{document:n}=t,r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:c,Element:u,NodeFilter:d,NamedNodeMap:C=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:T,DOMParser:H,trustedTypes:Q}=t,M=u.prototype,mt=le(M,"cloneNode"),yt=le(M,"remove"),Zt=le(M,"nextSibling"),Qt=le(M,"childNodes"),F=le(M,"parentNode");if(typeof l=="function"){let a=n.createElement("template");a.content&&a.content.ownerDocument&&(n=a.content.ownerDocument)}let k,rt="",{implementation:xt,createNodeIterator:eo,createDocumentFragment:no,getElementsByTagName:io}=n,{importNode:ro}=r,q={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};e.isSupported=typeof Ur=="function"&&typeof F=="function"&&xt&&xt.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:un,ERB_EXPR:hn,TMPLIT_EXPR:dn,DATA_ATTR:oo,ARIA_ATTR:so,IS_SCRIPT_OR_DATA:ao,ATTR_WHITESPACE:Ei,CUSTOM_ELEMENT:lo}=dr,{IS_ALLOWED_URI:Si}=dr,N=null,ki=b({},[...lr,...Pn,...Mn,...Bn,...cr]),O=null,Ri=b({},[...ur,..._n,...hr,...Ie]),w=Object.seal(Vr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,gn=null,Ti=!0,mn=!0,wi=!1,Li=!0,Pt=!1,pn=!0,Ct=!1,fn=!1,bn=!1,Mt=!1,Ee=!1,Se=!1,Di=!0,Ni=!1,vn=!0,ee=!1,Bt={},_t=null,Ii=b({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Oi=null,Fi=b({},["audio","video","img","source","image","track"]),An=null,Pi=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ke="http://www.w3.org/1998/Math/MathML",Re="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml",jt=ot,yn=!1,xn=null,co=b({},[ke,Re,ot],Fn),Te=b({},["mi","mo","mn","ms","mtext"]),we=b({},["annotation-xml"]),uo=b({},["title","style","font","a","script"]),ne=null,ho=["application/xhtml+xml","text/html"],I=null,Wt=null,go=n.createElement("form"),Mi=function(a){return a instanceof RegExp||a instanceof Function},Cn=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Wt||Wt!==a){if(a&&typeof a=="object"||(a={}),a=St(a),ne=ho.indexOf(a.PARSER_MEDIA_TYPE)===-1?"text/html":a.PARSER_MEDIA_TYPE,I=ne==="application/xhtml+xml"?Fn:_e,N=$(a,"ALLOWED_TAGS")?b({},a.ALLOWED_TAGS,I):ki,O=$(a,"ALLOWED_ATTR")?b({},a.ALLOWED_ATTR,I):Ri,xn=$(a,"ALLOWED_NAMESPACES")?b({},a.ALLOWED_NAMESPACES,Fn):co,An=$(a,"ADD_URI_SAFE_ATTR")?b(St(Pi),a.ADD_URI_SAFE_ATTR,I):Pi,Oi=$(a,"ADD_DATA_URI_TAGS")?b(St(Fi),a.ADD_DATA_URI_TAGS,I):Fi,_t=$(a,"FORBID_CONTENTS")?b({},a.FORBID_CONTENTS,I):Ii,te=$(a,"FORBID_TAGS")?b({},a.FORBID_TAGS,I):{},gn=$(a,"FORBID_ATTR")?b({},a.FORBID_ATTR,I):{},Bt=!!$(a,"USE_PROFILES")&&a.USE_PROFILES,Ti=a.ALLOW_ARIA_ATTR!==!1,mn=a.ALLOW_DATA_ATTR!==!1,wi=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Li=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Pt=a.SAFE_FOR_TEMPLATES||!1,pn=a.SAFE_FOR_XML!==!1,Ct=a.WHOLE_DOCUMENT||!1,Mt=a.RETURN_DOM||!1,Ee=a.RETURN_DOM_FRAGMENT||!1,Se=a.RETURN_TRUSTED_TYPE||!1,bn=a.FORCE_BODY||!1,Di=a.SANITIZE_DOM!==!1,Ni=a.SANITIZE_NAMED_PROPS||!1,vn=a.KEEP_CONTENT!==!1,ee=a.IN_PLACE||!1,Si=a.ALLOWED_URI_REGEXP||zr,jt=a.NAMESPACE||ot,Te=a.MATHML_TEXT_INTEGRATION_POINTS||Te,we=a.HTML_INTEGRATION_POINTS||we,w=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Mi(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(w.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Mi(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(w.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(w.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pt&&(mn=!1),Ee&&(Mt=!0),Bt&&(N=b({},cr),O=[],Bt.html===!0&&(b(N,lr),b(O,ur)),Bt.svg===!0&&(b(N,Pn),b(O,_n),b(O,Ie)),Bt.svgFilters===!0&&(b(N,Mn),b(O,_n),b(O,Ie)),Bt.mathMl===!0&&(b(N,Bn),b(O,hr),b(O,Ie))),a.ADD_TAGS&&(N===ki&&(N=St(N)),b(N,a.ADD_TAGS,I)),a.ADD_ATTR&&(O===Ri&&(O=St(O)),b(O,a.ADD_ATTR,I)),a.ADD_URI_SAFE_ATTR&&b(An,a.ADD_URI_SAFE_ATTR,I),a.FORBID_CONTENTS&&(_t===Ii&&(_t=St(_t)),b(_t,a.FORBID_CONTENTS,I)),vn&&(N["#text"]=!0),Ct&&b(N,["html","head","body"]),N.table&&(b(N,["tbody"]),delete te.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw ae('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ae('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=a.TRUSTED_TYPES_POLICY,rt=k.createHTML("")}else k===void 0&&(k=function(g,h){if(typeof g!="object"||typeof g.createPolicy!="function")return null;let v=null,A="data-tt-policy-suffix";h&&h.hasAttribute(A)&&(v=h.getAttribute(A));let f="dompurify"+(v?"#"+v:"");try{return g.createPolicy(f,{createHTML:D=>D,createScriptURL:D=>D})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}}(Q,o)),k!==null&&typeof rt=="string"&&(rt=k.createHTML(""));U&&U(a),Wt=a}},Bi=b({},[...Pn,...Mn,...Uo]),_i=b({},[...Bn,...Vo]),tt=function(a){oe(e.removed,{element:a});try{F(a).removeChild(a)}catch{yt(a)}},Le=function(a,g){try{oe(e.removed,{attribute:g.getAttributeNode(a),from:g})}catch{oe(e.removed,{attribute:null,from:g})}if(g.removeAttribute(a),a==="is")if(Mt||Ee)try{tt(g)}catch{}else try{g.setAttribute(a,"")}catch{}},ji=function(a){let g=null,h=null;if(bn)a=""+a;else{let f=sr(a,/^[\r\n\t ]+/);h=f&&f[0]}ne==="application/xhtml+xml"&&jt===ot&&(a=''+a+"");let v=k?k.createHTML(a):a;if(jt===ot)try{g=new H().parseFromString(v,ne)}catch{}if(!g||!g.documentElement){g=xt.createDocument(jt,"template",null);try{g.documentElement.innerHTML=yn?rt:v}catch{}}let A=g.body||g.documentElement;return a&&h&&A.insertBefore(n.createTextNode(h),A.childNodes[0]||null),jt===ot?io.call(g,Ct?"html":"body")[0]:Ct?g.documentElement:A},Wi=function(a){return eo.call(a.ownerDocument||a,a,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},En=function(a){return a instanceof T&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof C)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Ui=function(a){return typeof c=="function"&&a instanceof c};function st(a,g,h){Ne(a,v=>{v.call(e,g,h,Wt)})}let Vi=function(a){let g=null;if(st(q.beforeSanitizeElements,a,null),En(a))return tt(a),!0;let h=I(a.nodeName);if(st(q.uponSanitizeElement,a,{tagName:h,allowedTags:N}),a.hasChildNodes()&&!Ui(a.firstElementChild)&&_(/<[/\w]/g,a.innerHTML)&&_(/<[/\w]/g,a.textContent)||a.nodeType===Qo||pn&&a.nodeType===ts&&_(/<[/\w]/g,a.data))return tt(a),!0;if(!N[h]||te[h]){if(!te[h]&&Hi(h)&&(w.tagNameCheck instanceof RegExp&&_(w.tagNameCheck,h)||w.tagNameCheck instanceof Function&&w.tagNameCheck(h)))return!1;if(vn&&!_t[h]){let v=F(a)||a.parentNode,A=Qt(a)||a.childNodes;if(A&&v)for(let f=A.length-1;f>=0;--f){let D=mt(A[f],!0);D.__removalCount=(a.__removalCount||0)+1,v.insertBefore(D,Zt(a))}}return tt(a),!0}return a instanceof u&&!function(v){let A=F(v);A&&A.tagName||(A={namespaceURI:jt,tagName:"template"});let f=_e(v.tagName),D=_e(A.tagName);return!!xn[v.namespaceURI]&&(v.namespaceURI===Re?A.namespaceURI===ot?f==="svg":A.namespaceURI===ke?f==="svg"&&(D==="annotation-xml"||Te[D]):!!Bi[f]:v.namespaceURI===ke?A.namespaceURI===ot?f==="math":A.namespaceURI===Re?f==="math"&&we[D]:!!_i[f]:v.namespaceURI===ot?!(A.namespaceURI===Re&&!we[D])&&!(A.namespaceURI===ke&&!Te[D])&&!_i[f]&&(uo[f]||!Bi[f]):!(ne!=="application/xhtml+xml"||!xn[v.namespaceURI]))}(a)?(tt(a),!0):h!=="noscript"&&h!=="noembed"&&h!=="noframes"||!_(/<\/no(script|embed|frames)/i,a.innerHTML)?(Pt&&a.nodeType===Zo&&(g=a.textContent,Ne([un,hn,dn],v=>{g=se(g,v," ")}),a.textContent!==g&&(oe(e.removed,{element:a.cloneNode()}),a.textContent=g)),st(q.afterSanitizeElements,a,null),!1):(tt(a),!0)},zi=function(a,g,h){if(Di&&(g==="id"||g==="name")&&(h in n||h in go))return!1;if(!(mn&&!gn[g]&&_(oo,g))){if(!(Ti&&_(so,g))){if(!O[g]||gn[g]){if(!(Hi(a)&&(w.tagNameCheck instanceof RegExp&&_(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a))&&(w.attributeNameCheck instanceof RegExp&&_(w.attributeNameCheck,g)||w.attributeNameCheck instanceof Function&&w.attributeNameCheck(g))||g==="is"&&w.allowCustomizedBuiltInElements&&(w.tagNameCheck instanceof RegExp&&_(w.tagNameCheck,h)||w.tagNameCheck instanceof Function&&w.tagNameCheck(h))))return!1}else if(!An[g]){if(!_(Si,se(h,Ei,""))){if((g!=="src"&&g!=="xlink:href"&&g!=="href"||a==="script"||_o(h,"data:")!==0||!Oi[a])&&!(wi&&!_(ao,se(h,Ei,"")))){if(h)return!1}}}}}return!0},Hi=function(a){return a!=="annotation-xml"&&sr(a,lo)},qi=function(a){st(q.beforeSanitizeAttributes,a,null);let{attributes:g}=a;if(!g||En(a))return;let h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O,forceKeepAttr:void 0},v=g.length;for(;v--;){let A=g[v],{name:f,namespaceURI:D,value:at}=A,et=I(f),B=f==="value"?at:jo(at);if(h.attrName=et,h.attrValue=B,h.keepAttr=!0,h.forceKeepAttr=void 0,st(q.uponSanitizeAttribute,a,h),B=h.attrValue,!Ni||et!=="id"&&et!=="name"||(Le(f,a),B="user-content-"+B),pn&&_(/((--!?|])>)|<\/(style|title)/i,B)){Le(f,a);continue}if(h.forceKeepAttr||(Le(f,a),!h.keepAttr))continue;if(!Li&&_(/\/>/i,B)){Le(f,a);continue}Pt&&Ne([un,hn,dn],Ki=>{B=se(B,Ki," ")});let Ji=I(a.nodeName);if(zi(Ji,et,B)){if(k&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!D)switch(Q.getAttributeType(Ji,et)){case"TrustedHTML":B=k.createHTML(B);break;case"TrustedScriptURL":B=k.createScriptURL(B)}try{D?a.setAttributeNS(D,f,B):a.setAttribute(f,B),En(a)?tt(a):or(e.removed)}catch{}}}st(q.afterSanitizeAttributes,a,null)},mo=function a(g){let h=null,v=Wi(g);for(st(q.beforeSanitizeShadowDOM,g,null);h=v.nextNode();)st(q.uponSanitizeShadowNode,h,null),Vi(h),qi(h),h.content instanceof s&&a(h.content);st(q.afterSanitizeShadowDOM,g,null)};return e.sanitize=function(a){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,v=null,A=null,f=null;if(yn=!a,yn&&(a=""),typeof a!="string"&&!Ui(a)){if(typeof a.toString!="function")throw ae("toString is not a function");if(typeof(a=a.toString())!="string")throw ae("dirty is not a string, aborting")}if(!e.isSupported)return a;if(fn||Cn(g),e.removed=[],typeof a=="string"&&(ee=!1),ee){if(a.nodeName){let et=I(a.nodeName);if(!N[et]||te[et])throw ae("root node is forbidden and cannot be sanitized in-place")}}else if(a instanceof c)h=ji(""),v=h.ownerDocument.importNode(a,!0),v.nodeType===Xo&&v.nodeName==="BODY"||v.nodeName==="HTML"?h=v:h.appendChild(v);else{if(!Mt&&!Pt&&!Ct&&a.indexOf("<")===-1)return k&&Se?k.createHTML(a):a;if(h=ji(a),!h)return Mt?null:Se?rt:""}h&&bn&&tt(h.firstChild);let D=Wi(ee?a:h);for(;A=D.nextNode();)Vi(A),qi(A),A.content instanceof s&&mo(A.content);if(ee)return a;if(Mt){if(Ee)for(f=no.call(h.ownerDocument);h.firstChild;)f.appendChild(h.firstChild);else f=h;return(O.shadowroot||O.shadowrootmode)&&(f=ro.call(r,f,!0)),f}let at=Ct?h.outerHTML:h.innerHTML;return Ct&&N["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&_(Hr,h.ownerDocument.doctype.name)&&(at=" +`+at),Pt&&Ne([un,hn,dn],et=>{at=se(at,et," ")}),k&&Se?k.createHTML(at):at},e.setConfig=function(){Cn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),fn=!0},e.clearConfig=function(){Wt=null,fn=!1},e.isValidAttribute=function(a,g,h){Wt||Cn({});let v=I(a),A=I(g);return zi(v,A,h)},e.addHook=function(a,g){typeof g=="function"&&oe(q[a],g)},e.removeHook=function(a){return or(q[a])},e.removeHooks=function(a){q[a]=[]},e.removeAllHooks=function(){q={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},e}();Ve.addHook("uponSanitizeAttribute",function(i,t){/^data-trix-/.test(t.attrName)&&(t.forceKeepAttr=!0)});var is="style href src width height language class".split(" "),rs="javascript:".split(" "),os="script iframe form noscript".split(" "),qt=class extends R{static setHTML(t,e){let n=new this(e).sanitize(),r=n.getHTML?n.getHTML():n.outerHTML;t.innerHTML=r}static sanitize(t,e){let n=new this(t,e);return n.sanitize(),n}constructor(t){let{allowedAttributes:e,forbiddenProtocols:n,forbiddenElements:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.allowedAttributes=e||is,this.forbiddenProtocols=n||rs,this.forbiddenElements=r||os,this.body=ss(t)}sanitize(){return this.sanitizeElements(),this.normalizeListElementNesting(),Ve.setConfig(Lr),this.body=Ve.sanitize(this.body),this.body}getHTML(){return this.body.innerHTML}getBody(){return this.body}sanitizeElements(){let t=je(this.body),e=[];for(;t.nextNode();){let n=t.currentNode;switch(n.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(n)?e.push(n):this.sanitizeElement(n);break;case Node.COMMENT_NODE:e.push(n)}}return e.forEach(n=>At(n)),this.body}sanitizeElement(t){return t.hasAttribute("href")&&this.forbiddenProtocols.includes(t.protocol)&&t.removeAttribute("href"),Array.from(t.attributes).forEach(e=>{let{name:n}=e;this.allowedAttributes.includes(n)||n.indexOf("data-trix")===0||t.removeAttribute(n)}),t}normalizeListElementNesting(){return Array.from(this.body.querySelectorAll("ul,ol")).forEach(t=>{let e=t.previousElementSibling;e&&j(e)==="li"&&e.appendChild(t)}),this.body}elementIsRemovable(t){if(t?.nodeType===Node.ELEMENT_NODE)return this.elementIsForbidden(t)||this.elementIsntSerializable(t)}elementIsForbidden(t){return this.forbiddenElements.includes(j(t))}elementIsntSerializable(t){return t.getAttribute("data-trix-serialize")==="false"&&!Tt(t)}},ss=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";i=i.replace(/<\/html[^>]*>[^]*$/i,"");let t=document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=i,Array.from(t.head.querySelectorAll("style")).forEach(e=>{t.body.appendChild(e)}),t.body},{css:pt}=Ce,be=class extends dt{constructor(){super(...arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}createContentNodes(){return[]}createNodes(){let t,e=t=p({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),n=this.getHref();return n&&(t=p({tagName:"a",editable:!1,attributes:{href:n,tabindex:-1}}),e.appendChild(t)),this.attachment.hasContent()?qt.setHTML(t,this.attachment.getContent()):this.createContentNodes().forEach(r=>{t.appendChild(r)}),t.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=p({tagName:"progress",attributes:{class:pt.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),e.appendChild(this.progressElement)),[gr("left"),e,gr("right")]}createCaptionElement(){let t=p({tagName:"figcaption",className:pt.attachmentCaption}),e=this.attachmentPiece.getCaption();if(e)t.classList.add("".concat(pt.attachmentCaption,"--edited")),t.textContent=e;else{let n,r,o=this.getCaptionConfig();if(o.name&&(n=this.attachment.getFilename()),o.size&&(r=this.attachment.getFormattedFilesize()),n){let s=p({tagName:"span",className:pt.attachmentName,textContent:n});t.appendChild(s)}if(r){n&&t.appendChild(document.createTextNode(" "));let s=p({tagName:"span",className:pt.attachmentSize,textContent:r});t.appendChild(s)}}return t}getClassName(){let t=[pt.attachment,"".concat(pt.attachment,"--").concat(this.attachment.getType())],e=this.attachment.getExtension();return e&&t.push("".concat(pt.attachment,"--").concat(e)),t.join(" ")}getData(){let t={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},{attributes:e}=this.attachmentPiece;return e.isEmpty()||(t.trixAttributes=JSON.stringify(e)),this.attachment.isPending()&&(t.trixSerialize=!1),t}getHref(){if(!as(this.attachment.getContent(),"a"))return this.attachment.getHref()}getCaptionConfig(){var t;let e=this.attachment.getType(),n=_r((t=mi[e])===null||t===void 0?void 0:t.caption);return e==="file"&&(n.name=!0),n}findProgressElement(){var t;return(t=this.findElement())===null||t===void 0?void 0:t.querySelector("progress")}attachmentDidChangeUploadProgress(){let t=this.attachment.getUploadProgress(),e=this.findProgressElement();e&&(e.value=t)}},gr=i=>p({tagName:"span",textContent:ln,data:{trixCursorTarget:i,trixSerialize:!1}}),as=function(i,t){let e=p("div");return qt.setHTML(e,i||""),e.querySelector(t)},ze=class extends be{constructor(){super(...arguments),this.attachment.previewDelegate=this}createContentNodes(){return this.image=p({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]}createCaptionElement(){let t=super.createCaptionElement(...arguments);return t.textContent||t.setAttribute("data-trix-placeholder",m.captionPlaceholder),t}refresh(t){var e;if(t||(t=(e=this.findElement())===null||e===void 0?void 0:e.querySelector("img")),t)return this.updateAttributesForImage(t)}updateAttributesForImage(t){let e=this.attachment.getURL(),n=this.attachment.getPreviewURL();if(t.src=n||e,n===e)t.removeAttribute("data-trix-serialized-attributes");else{let l=JSON.stringify({src:e});t.setAttribute("data-trix-serialized-attributes",l)}let r=this.attachment.getWidth(),o=this.attachment.getHeight();r!=null&&(t.width=r),o!=null&&(t.height=o);let s=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/");t.dataset.trixStoreKey=s}attachmentDidChangeAttributes(){return this.refresh(this.image),this.refresh()}},He=class extends dt{constructor(){super(...arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),this.textConfig=this.options.textConfig,this.context=this.options.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}createNodes(){let t=this.attachment?this.createAttachmentNodes():this.createStringNodes(),e=this.createElement();if(e){let n=function(r){for(;(o=r)!==null&&o!==void 0&&o.firstElementChild;){var o;r=r.firstElementChild}return r}(e);Array.from(t).forEach(r=>{n.appendChild(r)}),t=[e]}return t}createAttachmentNodes(){let t=this.attachment.isPreviewable()?ze:be;return this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()}createStringNodes(){var t;if((t=this.textConfig)!==null&&t!==void 0&&t.plaintext)return[document.createTextNode(this.string)];{let e=[],n=this.string.split(` +`);for(let r=0;r0){let s=p("br");e.push(s)}if(o.length){let s=document.createTextNode(this.preserveSpaces(o));e.push(s)}}return e}}createElement(){let t,e,n,r={};for(e in this.attributes){n=this.attributes[e];let s=ti(e);if(s){if(s.tagName){var o;let l=p(s.tagName);o?(o.appendChild(l),o=l):t=o=l}if(s.styleProperty&&(r[s.styleProperty]=n),s.style)for(e in s.style)n=s.style[e],r[e]=n}}if(Object.keys(r).length)for(e in t||(t=p("span")),r)n=r[e],t.style[e]=n;return t}createContainerElement(){for(let t in this.attributes){let e=this.attributes[t],n=ti(t);if(n&&n.groupTagName){let r={};return r[t]=e,p(n.groupTagName,r)}}}preserveSpaces(t){return this.context.isLast&&(t=t.replace(/\ $/,ft)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 ".concat(ft," $2")).replace(/\ {2}/g,"".concat(ft," ")).replace(/\ {2}/g," ".concat(ft)),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,ft)),t}},qe=class extends dt{constructor(){super(...arguments),this.text=this.object,this.textConfig=this.options.textConfig}createNodes(){let t=[],e=fe.groupObjects(this.getPieces()),n=e.length-1;for(let o=0;o!t.hasAttribute("blockBreak"))}},ls=i=>/\s$/.test(i?.toString()),{css:mr}=Ce,Je=class extends dt{constructor(){super(...arguments),this.block=this.object,this.attributes=this.block.getAttributes()}createNodes(){let t=[document.createComment("block")];if(this.block.isEmpty())t.push(p("br"));else{var e;let n=(e=L(this.block.getLastAttribute()))===null||e===void 0?void 0:e.text,r=this.findOrCreateCachedChildView(qe,this.block.text,{textConfig:n});t.push(...Array.from(r.getNodes()||[])),this.shouldAddExtraNewlineElement()&&t.push(p("br"))}if(this.attributes.length)return t;{let n,{tagName:r}=W.default;this.block.isRTL()&&(n={dir:"rtl"});let o=p({tagName:r,attributes:n});return t.forEach(s=>o.appendChild(s)),[o]}}createContainerElement(t){let e={},n,r=this.attributes[t],{tagName:o,htmlAttributes:s=[]}=L(r);if(t===0&&this.block.isRTL()&&Object.assign(e,{dir:"rtl"}),r==="attachmentGallery"){let l=this.block.getBlockBreakPosition();n="".concat(mr.attachmentGallery," ").concat(mr.attachmentGallery,"--").concat(l)}return Object.entries(this.block.htmlAttributes).forEach(l=>{let[c,u]=l;s.includes(c)&&(e[c]=u)}),p({tagName:o,className:n,attributes:e})}shouldAddExtraNewlineElement(){return/\n\n$/.test(this.block.toString())}},Jt=class extends dt{static render(t){let e=p("div"),n=new this(t,{element:e});return n.render(),n.sync(),e}constructor(){super(...arguments),this.element=this.options.element,this.elementStore=new ii,this.setDocument(this.object)}setDocument(t){t.isEqualTo(this.document)||(this.document=this.object=t)}render(){if(this.childViews=[],this.shadowElement=p("div"),!this.document.isEmpty()){let t=fe.groupObjects(this.document.getBlocks(),{asTree:!0});Array.from(t).forEach(e=>{let n=this.findOrCreateCachedChildView(Je,e);Array.from(n.getNodes()).map(r=>this.shadowElement.appendChild(r))})}}isSynced(){return cs(this.shadowElement,this.element)}sync(){let t=this.createDocumentFragmentForSync();for(;this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()}didSync(){return this.elementStore.reset(pr(this.element)),Ai(()=>this.garbageCollectCachedViews())}createDocumentFragmentForSync(){let t=document.createDocumentFragment();return Array.from(this.shadowElement.childNodes).forEach(e=>{t.appendChild(e.cloneNode(!0))}),Array.from(pr(t)).forEach(e=>{let n=this.elementStore.remove(e);n&&e.parentNode.replaceChild(n,e)}),t}},pr=i=>i.querySelectorAll("[data-trix-store-key]"),cs=(i,t)=>fr(i.innerHTML)===fr(t.innerHTML),fr=i=>i.replace(/ /g," ");function Oe(i){var t,e;function n(o,s){try{var l=i[o](s),c=l.value,u=c instanceof us;Promise.resolve(u?c.v:c).then(function(d){if(u){var C=o==="return"?"return":"next";if(!c.k||d.done)return n(C,d);d=i[C](d).value}r(l.done?"return":"normal",d)},function(d){n("throw",d)})}catch(d){r("throw",d)}}function r(o,s){switch(o){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?n(t.key,t.arg):e=null}this._invoke=function(o,s){return new Promise(function(l,c){var u={key:o,arg:s,resolve:l,reject:c,next:null};e?e=e.next=u:(t=e=u,n(o,s))})},typeof i.return!="function"&&(this.return=void 0)}function us(i,t){this.v=i,this.k=t}function z(i,t,e){return(t=hs(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function hs(i){var t=function(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return typeof t=="symbol"?t:String(t)}Oe.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Oe.prototype.next=function(i){return this._invoke("next",i)},Oe.prototype.throw=function(i){return this._invoke("throw",i)},Oe.prototype.return=function(i){return this._invoke("return",i)};function x(i,t){return ds(i,qr(i,t,"get"))}function Ci(i,t,e){return gs(i,qr(i,t,"set"),e),e}function qr(i,t,e){if(!t.has(i))throw new TypeError("attempted to "+e+" private field on non-instance");return t.get(i)}function ds(i,t){return t.get?t.get.call(i):t.value}function gs(i,t,e){if(t.set)t.set.call(i,e);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=e}}function Fe(i,t,e){if(!t.has(i))throw new TypeError("attempted to get private field on non-instance");return e}function Jr(i,t){if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pe(i,t,e){Jr(i,t),t.set(i,e)}var gt=class extends ht{static registerType(t,e){e.type=t,this.types[t]=e}static fromJSON(t){let e=this.types[t.type];if(e)return e.fromJSON(t)}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.attributes=X.box(e)}copyWithAttributes(t){return new this.constructor(this.getValue(),t)}copyWithAdditionalAttributes(t){return this.copyWithAttributes(this.attributes.merge(t))}copyWithoutAttribute(t){return this.copyWithAttributes(this.attributes.remove(t))}copy(){return this.copyWithAttributes(this.attributes)}getAttribute(t){return this.attributes.get(t)}getAttributesHash(){return this.attributes}getAttributes(){return this.attributes.toObject()}hasAttribute(t){return this.attributes.has(t)}hasSameStringValueAsPiece(t){return t&&this.toString()===t.toString()}hasSameAttributesAsPiece(t){return t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))}isBlockBreak(){return!1}isEqualTo(t){return super.isEqualTo(...arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)}isEmpty(){return this.length===0}isSerializable(){return!0}toJSON(){return{type:this.constructor.type,attributes:this.getAttributes()}}contentsForInspection(){return{type:this.constructor.type,attributes:this.attributes.inspect()}}canBeGrouped(){return this.hasAttribute("href")}canBeGroupedWith(t){return this.getAttribute("href")===t.getAttribute("href")}getLength(){return this.length}canBeConsolidatedWith(t){return!1}};z(gt,"types",{});var Ke=class extends Ht{constructor(t){super(...arguments),this.url=t}perform(t){let e=new Image;e.onload=()=>(e.width=this.width=e.naturalWidth,e.height=this.height=e.naturalHeight,t(!0,e)),e.onerror=()=>t(!1),e.src=this.url}},Kt=class i extends ht{static attachmentForFile(t){let e=new this(this.attributesForFile(t));return e.setFile(t),e}static attributesForFile(t){return new X({filename:t.name,filesize:t.size,contentType:t.type})}static fromJSON(t){return new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t),this.releaseFile=this.releaseFile.bind(this),this.attributes=X.box(t),this.didChangeAttributes()}getAttribute(t){return this.attributes.get(t)}hasAttribute(t){return this.attributes.has(t)}getAttributes(){return this.attributes.toObject()}setAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=this.attributes.merge(t);var n,r,o,s;if(!this.attributes.isEqualTo(e))return this.attributes=e,this.didChangeAttributes(),(n=this.previewDelegate)===null||n===void 0||(r=n.attachmentDidChangeAttributes)===null||r===void 0||r.call(n,this),(o=this.delegate)===null||o===void 0||(s=o.attachmentDidChangeAttributes)===null||s===void 0?void 0:s.call(o,this)}didChangeAttributes(){if(this.isPreviewable())return this.preloadURL()}isPending(){return this.file!=null&&!(this.getURL()||this.getHref())}isPreviewable(){return this.attributes.has("previewable")?this.attributes.get("previewable"):i.previewablePattern.test(this.getContentType())}getType(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"}getURL(){return this.attributes.get("url")}getHref(){return this.attributes.get("href")}getFilename(){return this.attributes.get("filename")||""}getFilesize(){return this.attributes.get("filesize")}getFormattedFilesize(){let t=this.attributes.get("filesize");return typeof t=="number"?Dr.formatter(t):""}getExtension(){var t;return(t=this.getFilename().match(/\.(\w+)$/))===null||t===void 0?void 0:t[1].toLowerCase()}getContentType(){return this.attributes.get("contentType")}hasContent(){return this.attributes.has("content")}getContent(){return this.attributes.get("content")}getWidth(){return this.attributes.get("width")}getHeight(){return this.attributes.get("height")}getFile(){return this.file}setFile(t){if(this.file=t,this.isPreviewable())return this.preloadFile()}releaseFile(){this.releasePreloadedFile(),this.file=null}getUploadProgress(){return this.uploadProgress!=null?this.uploadProgress:0}setUploadProgress(t){var e,n;if(this.uploadProgress!==t)return this.uploadProgress=t,(e=this.uploadProgressDelegate)===null||e===void 0||(n=e.attachmentDidChangeUploadProgress)===null||n===void 0?void 0:n.call(e,this)}toJSON(){return this.getAttributes()}getCacheKey(){return[super.getCacheKey(...arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")}getPreviewURL(){return this.previewURL||this.preloadingURL}setPreviewURL(t){var e,n,r,o;if(t!==this.getPreviewURL())return this.previewURL=t,(e=this.previewDelegate)===null||e===void 0||(n=e.attachmentDidChangeAttributes)===null||n===void 0||n.call(e,this),(r=this.delegate)===null||r===void 0||(o=r.attachmentDidChangePreviewURL)===null||o===void 0?void 0:o.call(r,this)}preloadURL(){return this.preload(this.getURL(),this.releaseFile)}preloadFile(){if(this.file)return this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)}releasePreloadedFile(){this.fileObjectURL&&(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null)}preload(t,e){if(t&&t!==this.getPreviewURL())return this.preloadingURL=t,new Ke(t).then(n=>{let{width:r,height:o}=n;return this.getWidth()&&this.getHeight()||this.setAttributes({width:r,height:o}),this.preloadingURL=null,this.setPreviewURL(t),e?.()}).catch(()=>(this.preloadingURL=null,e?.()))}};z(Kt,"previewablePattern",/^image(\/(gif|png|webp|jpe?g)|$)/);var Gt=class i extends gt{static fromJSON(t){return new this(Kt.fromJSON(t.attachment),t.attributes)}constructor(t){super(...arguments),this.attachment=t,this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}ensureAttachmentExclusivelyHasAttribute(t){this.hasAttribute(t)&&(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice([t])),this.attributes=this.attributes.remove(t))}removeProhibitedAttributes(){let t=this.attributes.slice(i.permittedAttributes);t.isEqualTo(this.attributes)||(this.attributes=t)}getValue(){return this.attachment}isSerializable(){return!this.attachment.isPending()}getCaption(){return this.attributes.get("caption")||""}isEqualTo(t){var e;return super.isEqualTo(t)&&this.attachment.id===(t==null||(e=t.attachment)===null||e===void 0?void 0:e.id)}toString(){return"\uFFFC"}toJSON(){let t=super.toJSON(...arguments);return t.attachment=this.attachment,t}getCacheKey(){return[super.getCacheKey(...arguments),this.attachment.getCacheKey()].join("/")}toConsole(){return JSON.stringify(this.toString())}};z(Gt,"permittedAttributes",["caption","presentation"]),gt.registerType("attachment",Gt);var ve=class extends gt{static fromJSON(t){return new this(t.string,t.attributes)}constructor(t){super(...arguments),this.string=(e=>e.replace(/\r\n?/g,` `))(t),this.length=this.string.length}getValue(){return this.string}toString(){return this.string.toString()}isBlockBreak(){return this.toString()===` -`&&this.getAttribute("blockBreak")===!0}toJSON(){let t=super.toJSON(...arguments);return t.string=this.string,t}canBeConsolidatedWith(t){return t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)}consolidateWith(t){return new this.constructor(this.toString()+t.toString(),this.attributes)}splitAtOffset(t){let e,n;return t===0?(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]}toConsole(){let{string:t}=this;return t.length>15&&(t=t.slice(0,14)+"\u2026"),JSON.stringify(t.toString())}};mt.registerType("string",ve);var $t=class extends dt{static box(t){return t instanceof this?t:new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects=t.slice(0),this.length=this.objects.length}indexOf(t){return this.objects.indexOf(t)}splice(){for(var t=arguments.length,e=new Array(t),n=0;nt(e,n))}insertObjectAtIndex(t,e){return this.splice(e,0,t)}insertSplittableListAtIndex(t,e){return this.splice(e,0,...t.objects)}insertSplittableListAtPosition(t,e){let[n,r]=this.splitObjectAtPosition(e);return new this.constructor(n).insertSplittableListAtIndex(t,r)}editObjectAtIndex(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)}replaceObjectAtIndex(t,e){return this.splice(e,1,t)}removeObjectAtIndex(t){return this.splice(t,1)}getObjectAtIndex(t){return this.objects[t]}getSplittableListInRange(t){let[e,n,r]=this.splitObjectsAtRange(t);return new this.constructor(e.slice(n,r+1))}selectSplittableList(t){let e=this.objects.filter(n=>t(n));return new this.constructor(e)}removeObjectsInRange(t){let[e,n,r]=this.splitObjectsAtRange(t);return new this.constructor(e).splice(n,r-n+1)}transformObjectsInRange(t,e){let[n,r,o]=this.splitObjectsAtRange(t),s=n.map((l,c)=>r<=c&&c<=o?e(l):l);return new this.constructor(s)}splitObjectsAtRange(t){let e,[n,r,o]=this.splitObjectAtPosition(ps(t));return[n,e]=new this.constructor(n).splitObjectAtPosition(fs(t)+o),[n,r,e-1]}getObjectAtPosition(t){let{index:e}=this.findIndexAndOffsetAtPosition(t);return this.objects[e]}splitObjectAtPosition(t){let e,n,{index:r,offset:o}=this.findIndexAndOffsetAtPosition(t),s=this.objects.slice(0);if(r!=null)if(o===0)e=r,n=0;else{let l=this.getObjectAtIndex(r),[c,u]=l.splitAtOffset(o);s.splice(r,1,c,u),e=r+1,n=c.getLength()-o}else e=s.length,n=0;return[s,e,n]}consolidate(){let t=[],e=this.objects[0];return this.objects.slice(1).forEach(n=>{var r,o;(r=(o=e).canBeConsolidatedWith)!==null&&r!==void 0&&r.call(o,n)?e=e.consolidateWith(n):(t.push(e),e=n)}),e&&t.push(e),new this.constructor(t)}consolidateFromIndexToIndex(t,e){let n=this.objects.slice(0).slice(t,e+1),r=new this.constructor(n).consolidate().toArray();return this.splice(t,n.length,...r)}findIndexAndOffsetAtPosition(t){let e,n=0;for(e=0;ethis.endPosition+=t.getLength())),this.endPosition}toString(){return this.objects.join("")}toArray(){return this.objects.slice(0)}toJSON(){return this.toArray()}isEqualTo(t){return super.isEqualTo(...arguments)||ms(this.objects,t?.objects)}contentsForInspection(){return{objects:"[".concat(this.objects.map(t=>t.inspect()).join(", "),"]")}}},ms=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;let e=!0;for(let n=0;ni[0],fs=i=>i[1],K=class extends dt{static textForAttachmentWithAttributes(t,e){return new this([new xt(t,e)])}static textForStringWithAttributes(t,e){return new this([new ve(t,e)])}static fromJSON(t){return new this(Array.from(t).map(e=>mt.fromJSON(e)))}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments);let e=t.filter(n=>!n.isEmpty());this.pieceList=new $t(e)}copy(){return this.copyWithPieceList(this.pieceList)}copyWithPieceList(t){return new this.constructor(t.consolidate().toArray())}copyUsingObjectMap(t){let e=this.getPieces().map(n=>t.find(n)||n);return new this.constructor(e)}appendText(t){return this.insertTextAtPosition(t,this.getLength())}insertTextAtPosition(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))}removeTextAtRange(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))}replaceTextAtRange(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])}moveTextFromRangeToPosition(t,e){if(t[0]<=e&&e<=t[1])return;let n=this.getTextAtRange(t),r=n.getLength();return t[0]n.copyWithAdditionalAttributes(t)))}removeAttributeAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,n=>n.copyWithoutAttribute(t)))}setAttributesAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,n=>n.copyWithAttributes(t)))}getAttributesAtPosition(t){var e;return((e=this.pieceList.getObjectAtPosition(t))===null||e===void 0?void 0:e.getAttributes())||{}}getCommonAttributes(){let t=Array.from(this.pieceList.toArray()).map(e=>e.getAttributes());return U.fromCommonAttributesOfObjects(t).toObject()}getCommonAttributesAtRange(t){return this.getTextAtRange(t).getCommonAttributes()||{}}getExpandedRangeForAttributeAtOffset(t,e){let n,r=n=e,o=this.getLength();for(;r>0&&this.getCommonAttributesAtRange([r-1,n])[t];)r--;for(;n!!t.attachment)}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getAttachmentAndPositionById(t){let e=0;for(let r of this.pieceList.toArray()){var n;if(((n=r.attachment)===null||n===void 0?void 0:n.id)===t)return{attachment:r.attachment,position:e};e+=r.length}return{attachment:null,position:null}}getAttachmentById(t){let{attachment:e}=this.getAttachmentAndPositionById(t);return e}getRangeOfAttachment(t){let e=this.getAttachmentAndPositionById(t.id),n=e.position;if(t=e.attachment)return[n,n+1]}updateAttributesForAttachment(t,e){let n=this.getRangeOfAttachment(e);return n?this.addAttributesAtRange(t,n):this}getLength(){return this.pieceList.getEndPosition()}isEmpty(){return this.getLength()===0}isEqualTo(t){var e;return super.isEqualTo(t)||(t==null||(e=t.pieceList)===null||e===void 0?void 0:e.isEqualTo(this.pieceList))}isBlockBreak(){return this.getLength()===1&&this.pieceList.getObjectAtIndex(0).isBlockBreak()}eachPiece(t){return this.pieceList.eachObject(t)}getPieces(){return this.pieceList.toArray()}getPieceAtPosition(t){return this.pieceList.getObjectAtPosition(t)}contentsForInspection(){return{pieceList:this.pieceList.inspect()}}toSerializableText(){let t=this.pieceList.selectSplittableList(e=>e.isSerializable());return this.copyWithPieceList(t)}toString(){return this.pieceList.toString()}toJSON(){return this.pieceList.toJSON()}toConsole(){return JSON.stringify(this.pieceList.toArray().map(t=>JSON.parse(t.toConsole())))}getDirection(){return Ro(this.toString())}isRTL(){return this.getDirection()==="rtl"}},$=class extends dt{static fromJSON(t){return new this(K.fromJSON(t.text),t.attributes,t.htmlAttributes)}constructor(t,e,n){super(...arguments),this.text=bs(t||new K),this.attributes=e||[],this.htmlAttributes=n||{}}isEmpty(){return this.text.isBlockBreak()}isEqualTo(t){return!!super.isEqualTo(t)||this.text.isEqualTo(t?.text)&&Ft(this.attributes,t?.attributes)&&Xt(this.htmlAttributes,t?.htmlAttributes)}copyWithText(t){return new $(t,this.attributes,this.htmlAttributes)}copyWithoutText(){return this.copyWithText(null)}copyWithAttributes(t){return new $(this.text,t,this.htmlAttributes)}copyWithoutAttributes(){return this.copyWithAttributes(null)}copyUsingObjectMap(t){let e=t.find(this.text);return e?this.copyWithText(e):this.copyWithText(this.text.copyUsingObjectMap(t))}addAttribute(t){let e=this.attributes.concat(br(t));return this.copyWithAttributes(e)}addHTMLAttribute(t,e){let n=Object.assign({},this.htmlAttributes,{[t]:e});return new $(this.text,this.attributes,n)}removeAttribute(t){let{listAttribute:e}=L(t),n=Ar(Ar(this.attributes,t),e);return this.copyWithAttributes(n)}removeLastAttribute(){return this.removeAttribute(this.getLastAttribute())}getLastAttribute(){return vr(this.attributes)}getAttributes(){return this.attributes.slice(0)}getAttributeLevel(){return this.attributes.length}getAttributeAtLevel(t){return this.attributes[t-1]}hasAttribute(t){return this.attributes.includes(t)}hasAttributes(){return this.getAttributeLevel()>0}getLastNestableAttribute(){return vr(this.getNestableAttributes())}getNestableAttributes(){return this.attributes.filter(t=>L(t).nestable)}getNestingLevel(){return this.getNestableAttributes().length}decreaseNestingLevel(){let t=this.getLastNestableAttribute();return t?this.removeAttribute(t):this}increaseNestingLevel(){let t=this.getLastNestableAttribute();if(t){let e=this.attributes.lastIndexOf(t),n=vi(this.attributes,e+1,0,...br(t));return this.copyWithAttributes(n)}return this}getListItemAttributes(){return this.attributes.filter(t=>L(t).listAttribute)}isListItem(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.listAttribute}isTerminalBlock(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.terminal}breaksOnReturn(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.breakOnReturn}findLineBreakInDirectionFromPosition(t,e){let n=this.toString(),r;switch(t){case"forward":r=n.indexOf(` +`&&this.getAttribute("blockBreak")===!0}toJSON(){let t=super.toJSON(...arguments);return t.string=this.string,t}canBeConsolidatedWith(t){return t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)}consolidateWith(t){return new this.constructor(this.toString()+t.toString(),this.attributes)}splitAtOffset(t){let e,n;return t===0?(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]}toConsole(){let{string:t}=this;return t.length>15&&(t=t.slice(0,14)+"\u2026"),JSON.stringify(t.toString())}};gt.registerType("string",ve);var $t=class extends ht{static box(t){return t instanceof this?t:new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects=t.slice(0),this.length=this.objects.length}indexOf(t){return this.objects.indexOf(t)}splice(){for(var t=arguments.length,e=new Array(t),n=0;nt(e,n))}insertObjectAtIndex(t,e){return this.splice(e,0,t)}insertSplittableListAtIndex(t,e){return this.splice(e,0,...t.objects)}insertSplittableListAtPosition(t,e){let[n,r]=this.splitObjectAtPosition(e);return new this.constructor(n).insertSplittableListAtIndex(t,r)}editObjectAtIndex(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)}replaceObjectAtIndex(t,e){return this.splice(e,1,t)}removeObjectAtIndex(t){return this.splice(t,1)}getObjectAtIndex(t){return this.objects[t]}getSplittableListInRange(t){let[e,n,r]=this.splitObjectsAtRange(t);return new this.constructor(e.slice(n,r+1))}selectSplittableList(t){let e=this.objects.filter(n=>t(n));return new this.constructor(e)}removeObjectsInRange(t){let[e,n,r]=this.splitObjectsAtRange(t);return new this.constructor(e).splice(n,r-n+1)}transformObjectsInRange(t,e){let[n,r,o]=this.splitObjectsAtRange(t),s=n.map((l,c)=>r<=c&&c<=o?e(l):l);return new this.constructor(s)}splitObjectsAtRange(t){let e,[n,r,o]=this.splitObjectAtPosition(ps(t));return[n,e]=new this.constructor(n).splitObjectAtPosition(fs(t)+o),[n,r,e-1]}getObjectAtPosition(t){let{index:e}=this.findIndexAndOffsetAtPosition(t);return this.objects[e]}splitObjectAtPosition(t){let e,n,{index:r,offset:o}=this.findIndexAndOffsetAtPosition(t),s=this.objects.slice(0);if(r!=null)if(o===0)e=r,n=0;else{let l=this.getObjectAtIndex(r),[c,u]=l.splitAtOffset(o);s.splice(r,1,c,u),e=r+1,n=c.getLength()-o}else e=s.length,n=0;return[s,e,n]}consolidate(){let t=[],e=this.objects[0];return this.objects.slice(1).forEach(n=>{var r,o;(r=(o=e).canBeConsolidatedWith)!==null&&r!==void 0&&r.call(o,n)?e=e.consolidateWith(n):(t.push(e),e=n)}),e&&t.push(e),new this.constructor(t)}consolidateFromIndexToIndex(t,e){let n=this.objects.slice(0).slice(t,e+1),r=new this.constructor(n).consolidate().toArray();return this.splice(t,n.length,...r)}findIndexAndOffsetAtPosition(t){let e,n=0;for(e=0;ethis.endPosition+=t.getLength())),this.endPosition}toString(){return this.objects.join("")}toArray(){return this.objects.slice(0)}toJSON(){return this.toArray()}isEqualTo(t){return super.isEqualTo(...arguments)||ms(this.objects,t?.objects)}contentsForInspection(){return{objects:"[".concat(this.objects.map(t=>t.inspect()).join(", "),"]")}}},ms=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;let e=!0;for(let n=0;ni[0],fs=i=>i[1],J=class extends ht{static textForAttachmentWithAttributes(t,e){return new this([new Gt(t,e)])}static textForStringWithAttributes(t,e){return new this([new ve(t,e)])}static fromJSON(t){return new this(Array.from(t).map(e=>gt.fromJSON(e)))}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments);let e=t.filter(n=>!n.isEmpty());this.pieceList=new $t(e)}copy(){return this.copyWithPieceList(this.pieceList)}copyWithPieceList(t){return new this.constructor(t.consolidate().toArray())}copyUsingObjectMap(t){let e=this.getPieces().map(n=>t.find(n)||n);return new this.constructor(e)}appendText(t){return this.insertTextAtPosition(t,this.getLength())}insertTextAtPosition(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))}removeTextAtRange(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))}replaceTextAtRange(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])}moveTextFromRangeToPosition(t,e){if(t[0]<=e&&e<=t[1])return;let n=this.getTextAtRange(t),r=n.getLength();return t[0]n.copyWithAdditionalAttributes(t)))}removeAttributeAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,n=>n.copyWithoutAttribute(t)))}setAttributesAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,n=>n.copyWithAttributes(t)))}getAttributesAtPosition(t){var e;return((e=this.pieceList.getObjectAtPosition(t))===null||e===void 0?void 0:e.getAttributes())||{}}getCommonAttributes(){let t=Array.from(this.pieceList.toArray()).map(e=>e.getAttributes());return X.fromCommonAttributesOfObjects(t).toObject()}getCommonAttributesAtRange(t){return this.getTextAtRange(t).getCommonAttributes()||{}}getExpandedRangeForAttributeAtOffset(t,e){let n,r=n=e,o=this.getLength();for(;r>0&&this.getCommonAttributesAtRange([r-1,n])[t];)r--;for(;n!!t.attachment)}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getAttachmentAndPositionById(t){let e=0;for(let r of this.pieceList.toArray()){var n;if(((n=r.attachment)===null||n===void 0?void 0:n.id)===t)return{attachment:r.attachment,position:e};e+=r.length}return{attachment:null,position:null}}getAttachmentById(t){let{attachment:e}=this.getAttachmentAndPositionById(t);return e}getRangeOfAttachment(t){let e=this.getAttachmentAndPositionById(t.id),n=e.position;if(t=e.attachment)return[n,n+1]}updateAttributesForAttachment(t,e){let n=this.getRangeOfAttachment(e);return n?this.addAttributesAtRange(t,n):this}getLength(){return this.pieceList.getEndPosition()}isEmpty(){return this.getLength()===0}isEqualTo(t){var e;return super.isEqualTo(t)||(t==null||(e=t.pieceList)===null||e===void 0?void 0:e.isEqualTo(this.pieceList))}isBlockBreak(){return this.getLength()===1&&this.pieceList.getObjectAtIndex(0).isBlockBreak()}eachPiece(t){return this.pieceList.eachObject(t)}getPieces(){return this.pieceList.toArray()}getPieceAtPosition(t){return this.pieceList.getObjectAtPosition(t)}contentsForInspection(){return{pieceList:this.pieceList.inspect()}}toSerializableText(){let t=this.pieceList.selectSplittableList(e=>e.isSerializable());return this.copyWithPieceList(t)}toString(){return this.pieceList.toString()}toJSON(){return this.pieceList.toJSON()}toConsole(){return JSON.stringify(this.pieceList.toArray().map(t=>JSON.parse(t.toConsole())))}getDirection(){return Ro(this.toString())}isRTL(){return this.getDirection()==="rtl"}},bt=class i extends ht{static fromJSON(t){return new this(J.fromJSON(t.text),t.attributes,t.htmlAttributes)}constructor(t,e,n){super(...arguments),this.text=bs(t||new J),this.attributes=e||[],this.htmlAttributes=n||{}}isEmpty(){return this.text.isBlockBreak()}isEqualTo(t){return!!super.isEqualTo(t)||this.text.isEqualTo(t?.text)&&It(this.attributes,t?.attributes)&&Xt(this.htmlAttributes,t?.htmlAttributes)}copyWithText(t){return new i(t,this.attributes,this.htmlAttributes)}copyWithoutText(){return this.copyWithText(null)}copyWithAttributes(t){return new i(this.text,t,this.htmlAttributes)}copyWithoutAttributes(){return this.copyWithAttributes(null)}copyUsingObjectMap(t){let e=t.find(this.text);return e?this.copyWithText(e):this.copyWithText(this.text.copyUsingObjectMap(t))}addAttribute(t){let e=this.attributes.concat(br(t));return this.copyWithAttributes(e)}addHTMLAttribute(t,e){let n=Object.assign({},this.htmlAttributes,{[t]:e});return new i(this.text,this.attributes,n)}removeAttribute(t){let{listAttribute:e}=L(t),n=Ar(Ar(this.attributes,t),e);return this.copyWithAttributes(n)}removeLastAttribute(){return this.removeAttribute(this.getLastAttribute())}getLastAttribute(){return vr(this.attributes)}getAttributes(){return this.attributes.slice(0)}getAttributeLevel(){return this.attributes.length}getAttributeAtLevel(t){return this.attributes[t-1]}hasAttribute(t){return this.attributes.includes(t)}hasAttributes(){return this.getAttributeLevel()>0}getLastNestableAttribute(){return vr(this.getNestableAttributes())}getNestableAttributes(){return this.attributes.filter(t=>L(t).nestable)}getNestingLevel(){return this.getNestableAttributes().length}decreaseNestingLevel(){let t=this.getLastNestableAttribute();return t?this.removeAttribute(t):this}increaseNestingLevel(){let t=this.getLastNestableAttribute();if(t){let e=this.attributes.lastIndexOf(t),n=vi(this.attributes,e+1,0,...br(t));return this.copyWithAttributes(n)}return this}getListItemAttributes(){return this.attributes.filter(t=>L(t).listAttribute)}isListItem(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.listAttribute}isTerminalBlock(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.terminal}breaksOnReturn(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.breakOnReturn}findLineBreakInDirectionFromPosition(t,e){let n=this.toString(),r;switch(t){case"forward":r=n.indexOf(` `,e);break;case"backward":r=n.slice(0,e).lastIndexOf(` -`)}if(r!==-1)return r}contentsForInspection(){return{text:this.text.inspect(),attributes:this.attributes}}toString(){return this.text.toString()}toJSON(){return{text:this.text,attributes:this.attributes,htmlAttributes:this.htmlAttributes}}getDirection(){return this.text.getDirection()}isRTL(){return this.text.isRTL()}getLength(){return this.text.getLength()}canBeConsolidatedWith(t){return!this.hasAttributes()&&!t.hasAttributes()&&this.getDirection()===t.getDirection()}consolidateWith(t){let e=K.textForStringWithAttributes(` -`),n=this.getTextWithoutBlockBreak().appendText(e);return this.copyWithText(n.appendText(t.text))}splitAtOffset(t){let e,n;return t===0?(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]}getBlockBreakPosition(){return this.text.getLength()-1}getTextWithoutBlockBreak(){return Kr(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()}canBeGrouped(t){return this.attributes[t]}canBeGroupedWith(t,e){let n=t.getAttributes(),r=n[e],o=this.attributes[e];return o===r&&!(L(o).group===!1&&!(()=>{if(!De){De=[];for(let s in W){let{listAttribute:l}=W[s];l!=null&&De.push(l)}}return De})().includes(n[e+1]))&&(this.getDirection()===t.getDirection()||t.isEmpty())}},bs=function(i){return i=vs(i),i=ys(i)},vs=function(i){let t=!1,e=i.getPieces(),n=e.slice(0,e.length-1),r=e[e.length-1];return r?(n=n.map(o=>o.isBlockBreak()?(t=!0,xs(o)):o),t?new K([...n,r]):i):i},As=K.textForStringWithAttributes(` -`,{blockBreak:!0}),ys=function(i){return Kr(i)?i:i.appendText(As)},Kr=function(i){let t=i.getLength();return t===0?!1:i.getTextAtRange([t-1,t]).isBlockBreak()},xs=i=>i.copyWithoutAttribute("blockBreak"),br=function(i){let{listAttribute:t}=L(i);return t?[t,i]:[i]},vr=i=>i.slice(-1)[0],Ar=function(i,t){let e=i.lastIndexOf(t);return e===-1?i:vi(i,e,1)},z=class extends dt{static fromJSON(t){return new this(Array.from(t).map(e=>$.fromJSON(e)))}static fromString(t,e){let n=K.textForStringWithAttributes(t,e);return new this([new $(n)])}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),t.length===0&&(t=[new $]),this.blockList=$t.box(t)}isEmpty(){let t=this.getBlockAtIndex(0);return this.blockList.length===1&&t.isEmpty()&&!t.hasAttributes()}copy(){let t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray();return new this.constructor(t)}copyUsingObjectsFromDocument(t){let e=new ni(t.getObjects());return this.copyUsingObjectMap(e)}copyUsingObjectMap(t){let e=this.getBlocks().map(n=>t.find(n)||n.copyUsingObjectMap(t));return new this.constructor(e)}copyWithBaseBlockAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=this.getBlocks().map(n=>{let r=t.concat(n.getAttributes());return n.copyWithAttributes(r)});return new this.constructor(e)}replaceBlock(t,e){let n=this.blockList.indexOf(t);return n===-1?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))}insertDocumentAtRange(t,e){let{blockList:n}=t;e=y(e);let[r]=e,{index:o,offset:s}=this.locationFromPosition(r),l=this,c=this.getBlockAtPosition(r);return ht(e)&&c.isEmpty()&&!c.hasAttributes()?l=new this.constructor(l.blockList.removeObjectAtIndex(o)):c.getBlockBreakPosition()===s&&r++,l=l.removeTextAtRange(e),new this.constructor(l.blockList.insertSplittableListAtPosition(n,r))}mergeDocumentAtRange(t,e){let n,r;e=y(e);let[o]=e,s=this.locationFromPosition(o),l=this.getBlockAtIndex(s.index).getAttributes(),c=t.getBaseBlockAttributes(),u=l.slice(-c.length);if(Ft(c,u)){let T=l.slice(0,-c.length);n=t.copyWithBaseBlockAttributes(T)}else n=t.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(l);let d=n.getBlockCount(),C=n.getBlockAtIndex(0);if(Ft(l,C.getAttributes())){let T=C.getTextWithoutBlockBreak();if(r=this.insertTextAtRange(T,e),d>1){n=new this.constructor(n.getBlocks().slice(1));let H=o+T.getLength();r=r.insertDocumentAtRange(n,H)}}else r=this.insertDocumentAtRange(n,e);return r}insertTextAtRange(t,e){e=y(e);let[n]=e,{index:r,offset:o}=this.locationFromPosition(n),s=this.removeTextAtRange(e);return new this.constructor(s.blockList.editObjectAtIndex(r,l=>l.copyWithText(l.text.insertTextAtPosition(t,o))))}removeTextAtRange(t){let e;t=y(t);let[n,r]=t;if(ht(t))return this;let[o,s]=Array.from(this.locationRangeFromRange(t)),l=o.index,c=o.offset,u=this.getBlockAtIndex(l),d=s.index,C=s.offset,T=this.getBlockAtIndex(d);if(r-n==1&&u.getBlockBreakPosition()===c&&T.getBlockBreakPosition()!==C&&T.text.getStringAtPosition(C)===` -`)e=this.blockList.editObjectAtIndex(d,H=>H.copyWithText(H.text.removeTextAtRange([C,C+1])));else{let H,tt=u.text.getTextAtRange([0,c]),M=T.text.getTextAtRange([C,T.getLength()]),pt=tt.appendText(M);H=l!==d&&c===0&&u.getAttributeLevel()>=T.getAttributeLevel()?T.copyWithText(pt):u.copyWithText(pt);let Ct=d+1-l;e=this.blockList.splice(l,Ct,H)}return new this.constructor(e)}moveTextFromRangeToPosition(t,e){let n;t=y(t);let[r,o]=t;if(r<=e&&e<=o)return this;let s=this.getDocumentAtRange(t),l=this.removeTextAtRange(t),c=rr=r.editObjectAtIndex(l,function(){return L(t)?o.addAttribute(t,e):s[0]===s[1]?o:o.copyWithText(o.text.addAttributeAtRange(t,e,s))})),new this.constructor(r)}addAttribute(t,e){let{blockList:n}=this;return this.eachBlock((r,o)=>n=n.editObjectAtIndex(o,()=>r.addAttribute(t,e))),new this.constructor(n)}removeAttributeAtRange(t,e){let{blockList:n}=this;return this.eachBlockAtRange(e,function(r,o,s){L(t)?n=n.editObjectAtIndex(s,()=>r.removeAttribute(t)):o[0]!==o[1]&&(n=n.editObjectAtIndex(s,()=>r.copyWithText(r.text.removeAttributeAtRange(t,o))))}),new this.constructor(n)}updateAttributesForAttachment(t,e){let n=this.getRangeOfAttachment(e),[r]=Array.from(n),{index:o}=this.locationFromPosition(r),s=this.getTextAtIndex(o);return new this.constructor(this.blockList.editObjectAtIndex(o,l=>l.copyWithText(s.updateAttributesForAttachment(t,e))))}removeAttributeForAttachment(t,e){let n=this.getRangeOfAttachment(e);return this.removeAttributeAtRange(t,n)}setHTMLAttributeAtPosition(t,e,n){let r=this.getBlockAtPosition(t),o=r.addHTMLAttribute(e,n);return this.replaceBlock(r,o)}insertBlockBreakAtRange(t){let e;t=y(t);let[n]=t,{offset:r}=this.locationFromPosition(n),o=this.removeTextAtRange(t);return r===0&&(e=[new $]),new this.constructor(o.blockList.insertSplittableListAtPosition(new $t(e),n))}applyBlockAttributeAtRange(t,e,n){let r=this.expandRangeToLineBreaksAndSplitBlocks(n),o=r.document;n=r.range;let s=L(t);if(s.listAttribute){o=o.removeLastListAttributeAtRange(n,{exceptAttributeName:t});let l=o.convertLineBreaksToBlockBreaksInRange(n);o=l.document,n=l.range}else o=s.exclusive?o.removeBlockAttributesAtRange(n):s.terminal?o.removeLastTerminalAttributeAtRange(n):o.consolidateBlocksAtRange(n);return o.addAttributeAtRange(t,e,n)}removeLastListAttributeAtRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{blockList:n}=this;return this.eachBlockAtRange(t,function(r,o,s){let l=r.getLastAttribute();l&&L(l).listAttribute&&l!==e.exceptAttributeName&&(n=n.editObjectAtIndex(s,()=>r.removeAttribute(l)))}),new this.constructor(n)}removeLastTerminalAttributeAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(n,r,o){let s=n.getLastAttribute();s&&L(s).terminal&&(e=e.editObjectAtIndex(o,()=>n.removeAttribute(s)))}),new this.constructor(e)}removeBlockAttributesAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(n,r,o){n.hasAttributes()&&(e=e.editObjectAtIndex(o,()=>n.copyWithoutAttributes()))}),new this.constructor(e)}expandRangeToLineBreaksAndSplitBlocks(t){let e;t=y(t);let[n,r]=t,o=this.locationFromPosition(n),s=this.locationFromPosition(r),l=this,c=l.getBlockAtIndex(o.index);if(o.offset=c.findLineBreakInDirectionFromPosition("backward",o.offset),o.offset!=null&&(e=l.positionFromLocation(o),l=l.insertBlockBreakAtRange([e,e+1]),s.index+=1,s.offset-=l.getBlockAtIndex(o.index).getLength(),o.index+=1),o.offset=0,s.offset===0&&s.index>o.index)s.index-=1,s.offset=l.getBlockAtIndex(s.index).getBlockBreakPosition();else{let u=l.getBlockAtIndex(s.index);u.text.getStringAtRange([s.offset-1,s.offset])===` -`?s.offset-=1:s.offset=u.findLineBreakInDirectionFromPosition("forward",s.offset),s.offset!==u.getBlockBreakPosition()&&(e=l.positionFromLocation(s),l=l.insertBlockBreakAtRange([e,e+1]))}return n=l.positionFromLocation(o),r=l.positionFromLocation(s),{document:l,range:t=y([n,r])}}convertLineBreaksToBlockBreaksInRange(t){t=y(t);let[e]=t,n=this.getStringAtRange(t).slice(0,-1),r=this;return n.replace(/.*?\n/g,function(o){e+=o.length,r=r.insertBlockBreakAtRange([e-1,e])}),{document:r,range:t}}consolidateBlocksAtRange(t){t=y(t);let[e,n]=t,r=this.locationFromPosition(e).index,o=this.locationFromPosition(n).index;return new this.constructor(this.blockList.consolidateFromIndexToIndex(r,o))}getDocumentAtRange(t){t=y(t);let e=this.blockList.getSplittableListInRange(t).toArray();return new this.constructor(e)}getStringAtRange(t){let e,n=t=y(t);return n[n.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)}getBlockAtIndex(t){return this.blockList.getObjectAtIndex(t)}getBlockAtPosition(t){let{index:e}=this.locationFromPosition(t);return this.getBlockAtIndex(e)}getTextAtIndex(t){var e;return(e=this.getBlockAtIndex(t))===null||e===void 0?void 0:e.text}getTextAtPosition(t){let{index:e}=this.locationFromPosition(t);return this.getTextAtIndex(e)}getPieceAtPosition(t){let{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getPieceAtPosition(n)}getCharacterAtPosition(t){let{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getStringAtRange([n,n+1])}getLength(){return this.blockList.getEndPosition()}getBlocks(){return this.blockList.toArray()}getBlockCount(){return this.blockList.length}getEditCount(){return this.editCount}eachBlock(t){return this.blockList.eachObject(t)}eachBlockAtRange(t,e){let n,r;t=y(t);let[o,s]=t,l=this.locationFromPosition(o),c=this.locationFromPosition(s);if(l.index===c.index)return n=this.getBlockAtIndex(l.index),r=[l.offset,c.offset],e(n,r,l.index);for(let u=l.index;u<=c.index;u++)if(n=this.getBlockAtIndex(u),n){switch(u){case l.index:r=[l.offset,n.text.getLength()];break;case c.index:r=[0,c.offset];break;default:r=[0,n.text.getLength()]}e(n,r,u)}}getCommonAttributesAtRange(t){t=y(t);let[e]=t;if(ht(t))return this.getCommonAttributesAtPosition(e);{let n=[],r=[];return this.eachBlockAtRange(t,function(o,s){if(s[0]!==s[1])return n.push(o.text.getCommonAttributesAtRange(s)),r.push(yr(o))}),U.fromCommonAttributesOfObjects(n).merge(U.fromCommonAttributesOfObjects(r)).toObject()}}getCommonAttributesAtPosition(t){let e,n,{index:r,offset:o}=this.locationFromPosition(t),s=this.getBlockAtIndex(r);if(!s)return{};let l=yr(s),c=s.text.getAttributesAtPosition(o),u=s.text.getAttributesAtPosition(o-1),d=Object.keys(It).filter(C=>It[C].inheritable);for(e in u)n=u[e],(n===c[e]||d.includes(e))&&(l[e]=n);return l}getRangeOfCommonAttributeAtPosition(t,e){let{index:n,offset:r}=this.locationFromPosition(e),o=this.getTextAtIndex(n),[s,l]=Array.from(o.getExpandedRangeForAttributeAtOffset(t,r)),c=this.positionFromLocation({index:n,offset:s}),u=this.positionFromLocation({index:n,offset:l});return y([c,u])}getBaseBlockAttributes(){let t=this.getBlockAtIndex(0).getAttributes();for(let e=1;e{let o=[];for(let s=0;s{let{text:n}=e;return t=t.concat(n.getAttachmentPieces())}),t}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getRangeOfAttachment(t){let e=0,n=this.blockList.toArray();for(let r=0;r{let o=r.getLength();r.hasAttribute(t)&&n.push([e,e+o]),e+=o}),n}findRangesForTextAttribute(t){let{withValue:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=0,r=[],o=[];return this.getPieces().forEach(s=>{let l=s.getLength();(function(c){return e?c.getAttribute(t)===e:c.hasAttribute(t)})(s)&&(r[1]===n?r[1]=n+l:o.push(r=[n,n+l])),n+=l}),o}locationFromPosition(t){let e=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t));if(e.index!=null)return e;{let n=this.getBlocks();return{index:n.length-1,offset:n[n.length-1].getLength()}}}positionFromLocation(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)}locationRangeFromPosition(t){return y(this.locationFromPosition(t))}locationRangeFromRange(t){if(!(t=y(t)))return;let[e,n]=Array.from(t),r=this.locationFromPosition(e),o=this.locationFromPosition(n);return y([r,o])}rangeFromLocationRange(t){let e;t=y(t);let n=this.positionFromLocation(t[0]);return ht(t)||(e=this.positionFromLocation(t[1])),y([n,e])}isEqualTo(t){return this.blockList.isEqualTo(t?.blockList)}getTexts(){return this.getBlocks().map(t=>t.text)}getPieces(){let t=[];return Array.from(this.getTexts()).forEach(e=>{t.push(...Array.from(e.getPieces()||[]))}),t}getObjects(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())}toSerializableDocument(){let t=[];return this.blockList.eachObject(e=>t.push(e.copyWithText(e.text.toSerializableText()))),new this.constructor(t)}toString(){return this.blockList.toString()}toJSON(){return this.blockList.toJSON()}toConsole(){return JSON.stringify(this.blockList.toArray().map(t=>JSON.parse(t.text.toConsole())))}},yr=function(i){let t={},e=i.getLastAttribute();return e&&(t[e]=!0),t},jn=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{string:i=ue(i),attributes:t,type:"string"}},xr=(i,t)=>{try{return JSON.parse(i.getAttribute("data-trix-".concat(t)))}catch{return{}}},Mt=class extends R{static parse(t,e){let n=new this(t,e);return n.parse(),n}constructor(t){let{referenceElement:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.html=t,this.referenceElement=e,this.blocks=[],this.blockElements=[],this.processedElements=[]}getDocument(){return z.fromJSON(this.blocks)}parse(){try{this.createHiddenContainer(),Kt.setHTML(this.containerElement,this.html);let t=je(this.containerElement,{usingFilter:Es});for(;t.nextNode();)this.processNode(t.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}}createHiddenContainer(){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=p({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))}removeHiddenContainer(){return At(this.containerElement)}processNode(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)}}appendBlockForTextNode(t){let e=t.parentNode;if(e===this.currentBlockElement&&this.isBlockElement(t.previousSibling))return this.appendStringWithAttributes(` -`);if(e===this.containerElement||this.isBlockElement(e)){var n;let r=this.getBlockAttributes(e),o=this.getBlockHTMLAttributes(e);Ft(r,(n=this.currentBlock)===null||n===void 0?void 0:n.attributes)||(this.currentBlock=this.appendBlockForAttributesWithElement(r,e,o),this.currentBlockElement=e)}}appendBlockForElement(t){let e=this.isBlockElement(t),n=Tt(this.currentBlockElement,t);if(e&&!this.isBlockElement(t.firstChild)){if(!this.isInsignificantTextNode(t.firstChild)||!this.isBlockElement(t.firstElementChild)){let r=this.getBlockAttributes(t),o=this.getBlockHTMLAttributes(t);if(t.firstChild){if(n&&Ft(r,this.currentBlock.attributes))return this.appendStringWithAttributes(` -`);this.currentBlock=this.appendBlockForAttributesWithElement(r,t,o),this.currentBlockElement=t}}}else if(this.currentBlockElement&&!n&&!e){let r=this.findParentBlockElement(t);if(r)return this.appendBlockForElement(r);this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null}}findParentBlockElement(t){let{parentElement:e}=t;for(;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&this.blockElements.includes(e))return e;e=e.parentElement}return null}processTextNode(t){let e=t.data;var n;return Cr(t.parentNode)||(e=xi(e),Gr((n=t.previousSibling)===null||n===void 0?void 0:n.textContent)&&(e=Ss(e))),this.appendStringWithAttributes(e,this.getTextAttributes(t.parentNode))}processElement(t){let e;if(Lt(t)){if(e=xr(t,"attachment"),Object.keys(e).length){let n=this.getTextAttributes(t);this.appendAttachmentWithAttributes(e,n),t.innerHTML=""}return this.processedElements.push(t)}switch(j(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes(` -`,this.getTextAttributes(t)),this.processedElements.push(t);case"img":e={url:t.getAttribute("src"),contentType:"image"};let n=(r=>{let o=r.getAttribute("width"),s=r.getAttribute("height"),l={};return o&&(l.width=parseInt(o,10)),s&&(l.height=parseInt(s,10)),l})(t);for(let r in n){let o=n[r];e[r]=o}return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Me.tableRowSeparator);break;case"td":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Me.tableCellSeparator)}}appendBlockForAttributesWithElement(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.blockElements.push(e);let r=function(){return{text:[],attributes:arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},htmlAttributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}}}(t,n);return this.blocks.push(r),r}appendEmptyBlock(){return this.appendBlockForAttributesWithElement([],null)}appendStringWithAttributes(t,e){return this.appendPiece(jn(t,e))}appendAttachmentWithAttributes(t,e){return this.appendPiece(function(n){return{attachment:n,attributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},type:"attachment"}}(t,e))}appendPiece(t){return this.blocks.length===0&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)}appendStringToTextAtIndex(t,e){let{text:n}=this.blocks[e],r=n[n.length-1];if(r?.type!=="string")return n.push(jn(t));r.string+=t}prependStringToTextAtIndex(t,e){let{text:n}=this.blocks[e],r=n[0];if(r?.type!=="string")return n.unshift(jn(t));r.string=t+r.string}getTextAttributes(t){let e,n={};for(let r in It){let o=It[r];if(o.tagName&&vt(t,{matchingSelector:o.tagName,untilNode:this.containerElement}))n[r]=!0;else if(o.parser){if(e=o.parser(t),e){let s=!1;for(let l of this.findBlockElementAncestors(t))if(o.parser(l)===e){s=!0;break}s||(n[r]=e)}}else o.styleProperty&&(e=t.style[o.styleProperty],e&&(n[r]=e))}if(Lt(t)){let r=xr(t,"attributes");for(let o in r)e=r[o],n[o]=e}return n}getBlockAttributes(t){let e=[];for(;t&&t!==this.containerElement;){for(let r in W){let o=W[r];var n;o.parse!==!1&&j(t)===o.tagName&&((n=o.test)!==null&&n!==void 0&&n.call(o,t)||!o.test)&&(e.push(r),o.listAttribute&&e.push(o.listAttribute))}t=t.parentNode}return e.reverse()}getBlockHTMLAttributes(t){let e={},n=Object.values(W).find(r=>r.tagName===j(t));return(n?.htmlAttributes||[]).forEach(r=>{t.hasAttribute(r)&&(e[r]=t.getAttribute(r))}),e}findBlockElementAncestors(t){let e=[];for(;t&&t!==this.containerElement;){let n=j(t);de().includes(n)&&e.push(t),t=t.parentNode}return e}isBlockElement(t){if(t?.nodeType===Node.ELEMENT_NODE&&!Lt(t)&&!vt(t,{matchingSelector:"td",untilNode:this.containerElement}))return de().includes(j(t))||window.getComputedStyle(t).display==="block"}isInsignificantTextNode(t){if(t?.nodeType!==Node.TEXT_NODE||!ks(t.data))return;let{parentNode:e,previousSibling:n,nextSibling:r}=t;return Cs(e.previousSibling)&&!this.isBlockElement(e.previousSibling)||Cr(e)?void 0:!n||this.isBlockElement(n)||!r||this.isBlockElement(r)}isExtraBR(t){return j(t)==="br"&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t}needsTableSeparator(t){if(Me.removeBlankTableCells){var e;let n=(e=t.previousSibling)===null||e===void 0?void 0:e.textContent;return n&&/\S/.test(n)}return t.previousSibling}translateBlockElementMarginsToNewlines(){let t=this.getMarginOfDefaultBlockElement();for(let e=0;e2*t.top&&this.prependStringToTextAtIndex(` +`)}if(r!==-1)return r}contentsForInspection(){return{text:this.text.inspect(),attributes:this.attributes}}toString(){return this.text.toString()}toJSON(){return{text:this.text,attributes:this.attributes,htmlAttributes:this.htmlAttributes}}getDirection(){return this.text.getDirection()}isRTL(){return this.text.isRTL()}getLength(){return this.text.getLength()}canBeConsolidatedWith(t){return!this.hasAttributes()&&!t.hasAttributes()&&this.getDirection()===t.getDirection()}consolidateWith(t){let e=J.textForStringWithAttributes(` +`),n=this.getTextWithoutBlockBreak().appendText(e);return this.copyWithText(n.appendText(t.text))}splitAtOffset(t){let e,n;return t===0?(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]}getBlockBreakPosition(){return this.text.getLength()-1}getTextWithoutBlockBreak(){return Kr(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()}canBeGrouped(t){return this.attributes[t]}canBeGroupedWith(t,e){let n=t.getAttributes(),r=n[e],o=this.attributes[e];return o===r&&!(L(o).group===!1&&!(()=>{if(!De){De=[];for(let s in W){let{listAttribute:l}=W[s];l!=null&&De.push(l)}}return De})().includes(n[e+1]))&&(this.getDirection()===t.getDirection()||t.isEmpty())}},bs=function(i){return i=vs(i),i=ys(i)},vs=function(i){let t=!1,e=i.getPieces(),n=e.slice(0,e.length-1),r=e[e.length-1];return r?(n=n.map(o=>o.isBlockBreak()?(t=!0,xs(o)):o),t?new J([...n,r]):i):i},As=J.textForStringWithAttributes(` +`,{blockBreak:!0}),ys=function(i){return Kr(i)?i:i.appendText(As)},Kr=function(i){let t=i.getLength();return t===0?!1:i.getTextAtRange([t-1,t]).isBlockBreak()},xs=i=>i.copyWithoutAttribute("blockBreak"),br=function(i){let{listAttribute:t}=L(i);return t?[t,i]:[i]},vr=i=>i.slice(-1)[0],Ar=function(i,t){let e=i.lastIndexOf(t);return e===-1?i:vi(i,e,1)},V=class extends ht{static fromJSON(t){return new this(Array.from(t).map(e=>bt.fromJSON(e)))}static fromString(t,e){let n=J.textForStringWithAttributes(t,e);return new this([new bt(n)])}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),t.length===0&&(t=[new bt]),this.blockList=$t.box(t)}isEmpty(){let t=this.getBlockAtIndex(0);return this.blockList.length===1&&t.isEmpty()&&!t.hasAttributes()}copy(){let t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray();return new this.constructor(t)}copyUsingObjectsFromDocument(t){let e=new ni(t.getObjects());return this.copyUsingObjectMap(e)}copyUsingObjectMap(t){let e=this.getBlocks().map(n=>t.find(n)||n.copyUsingObjectMap(t));return new this.constructor(e)}copyWithBaseBlockAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=this.getBlocks().map(n=>{let r=t.concat(n.getAttributes());return n.copyWithAttributes(r)});return new this.constructor(e)}replaceBlock(t,e){let n=this.blockList.indexOf(t);return n===-1?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))}insertDocumentAtRange(t,e){let{blockList:n}=t;e=y(e);let[r]=e,{index:o,offset:s}=this.locationFromPosition(r),l=this,c=this.getBlockAtPosition(r);return ut(e)&&c.isEmpty()&&!c.hasAttributes()?l=new this.constructor(l.blockList.removeObjectAtIndex(o)):c.getBlockBreakPosition()===s&&r++,l=l.removeTextAtRange(e),new this.constructor(l.blockList.insertSplittableListAtPosition(n,r))}mergeDocumentAtRange(t,e){let n,r;e=y(e);let[o]=e,s=this.locationFromPosition(o),l=this.getBlockAtIndex(s.index).getAttributes(),c=t.getBaseBlockAttributes(),u=l.slice(-c.length);if(It(c,u)){let T=l.slice(0,-c.length);n=t.copyWithBaseBlockAttributes(T)}else n=t.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(l);let d=n.getBlockCount(),C=n.getBlockAtIndex(0);if(It(l,C.getAttributes())){let T=C.getTextWithoutBlockBreak();if(r=this.insertTextAtRange(T,e),d>1){n=new this.constructor(n.getBlocks().slice(1));let H=o+T.getLength();r=r.insertDocumentAtRange(n,H)}}else r=this.insertDocumentAtRange(n,e);return r}insertTextAtRange(t,e){e=y(e);let[n]=e,{index:r,offset:o}=this.locationFromPosition(n),s=this.removeTextAtRange(e);return new this.constructor(s.blockList.editObjectAtIndex(r,l=>l.copyWithText(l.text.insertTextAtPosition(t,o))))}removeTextAtRange(t){let e;t=y(t);let[n,r]=t;if(ut(t))return this;let[o,s]=Array.from(this.locationRangeFromRange(t)),l=o.index,c=o.offset,u=this.getBlockAtIndex(l),d=s.index,C=s.offset,T=this.getBlockAtIndex(d);if(r-n==1&&u.getBlockBreakPosition()===c&&T.getBlockBreakPosition()!==C&&T.text.getStringAtPosition(C)===` +`)e=this.blockList.editObjectAtIndex(d,H=>H.copyWithText(H.text.removeTextAtRange([C,C+1])));else{let H,Q=u.text.getTextAtRange([0,c]),M=T.text.getTextAtRange([C,T.getLength()]),mt=Q.appendText(M);H=l!==d&&c===0&&u.getAttributeLevel()>=T.getAttributeLevel()?T.copyWithText(mt):u.copyWithText(mt);let yt=d+1-l;e=this.blockList.splice(l,yt,H)}return new this.constructor(e)}moveTextFromRangeToPosition(t,e){let n;t=y(t);let[r,o]=t;if(r<=e&&e<=o)return this;let s=this.getDocumentAtRange(t),l=this.removeTextAtRange(t),c=rr=r.editObjectAtIndex(l,function(){return L(t)?o.addAttribute(t,e):s[0]===s[1]?o:o.copyWithText(o.text.addAttributeAtRange(t,e,s))})),new this.constructor(r)}addAttribute(t,e){let{blockList:n}=this;return this.eachBlock((r,o)=>n=n.editObjectAtIndex(o,()=>r.addAttribute(t,e))),new this.constructor(n)}removeAttributeAtRange(t,e){let{blockList:n}=this;return this.eachBlockAtRange(e,function(r,o,s){L(t)?n=n.editObjectAtIndex(s,()=>r.removeAttribute(t)):o[0]!==o[1]&&(n=n.editObjectAtIndex(s,()=>r.copyWithText(r.text.removeAttributeAtRange(t,o))))}),new this.constructor(n)}updateAttributesForAttachment(t,e){let n=this.getRangeOfAttachment(e),[r]=Array.from(n),{index:o}=this.locationFromPosition(r),s=this.getTextAtIndex(o);return new this.constructor(this.blockList.editObjectAtIndex(o,l=>l.copyWithText(s.updateAttributesForAttachment(t,e))))}removeAttributeForAttachment(t,e){let n=this.getRangeOfAttachment(e);return this.removeAttributeAtRange(t,n)}setHTMLAttributeAtPosition(t,e,n){let r=this.getBlockAtPosition(t),o=r.addHTMLAttribute(e,n);return this.replaceBlock(r,o)}insertBlockBreakAtRange(t){let e;t=y(t);let[n]=t,{offset:r}=this.locationFromPosition(n),o=this.removeTextAtRange(t);return r===0&&(e=[new bt]),new this.constructor(o.blockList.insertSplittableListAtPosition(new $t(e),n))}applyBlockAttributeAtRange(t,e,n){let r=this.expandRangeToLineBreaksAndSplitBlocks(n),o=r.document;n=r.range;let s=L(t);if(s.listAttribute){o=o.removeLastListAttributeAtRange(n,{exceptAttributeName:t});let l=o.convertLineBreaksToBlockBreaksInRange(n);o=l.document,n=l.range}else o=s.exclusive?o.removeBlockAttributesAtRange(n):s.terminal?o.removeLastTerminalAttributeAtRange(n):o.consolidateBlocksAtRange(n);return o.addAttributeAtRange(t,e,n)}removeLastListAttributeAtRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{blockList:n}=this;return this.eachBlockAtRange(t,function(r,o,s){let l=r.getLastAttribute();l&&L(l).listAttribute&&l!==e.exceptAttributeName&&(n=n.editObjectAtIndex(s,()=>r.removeAttribute(l)))}),new this.constructor(n)}removeLastTerminalAttributeAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(n,r,o){let s=n.getLastAttribute();s&&L(s).terminal&&(e=e.editObjectAtIndex(o,()=>n.removeAttribute(s)))}),new this.constructor(e)}removeBlockAttributesAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(n,r,o){n.hasAttributes()&&(e=e.editObjectAtIndex(o,()=>n.copyWithoutAttributes()))}),new this.constructor(e)}expandRangeToLineBreaksAndSplitBlocks(t){let e;t=y(t);let[n,r]=t,o=this.locationFromPosition(n),s=this.locationFromPosition(r),l=this,c=l.getBlockAtIndex(o.index);if(o.offset=c.findLineBreakInDirectionFromPosition("backward",o.offset),o.offset!=null&&(e=l.positionFromLocation(o),l=l.insertBlockBreakAtRange([e,e+1]),s.index+=1,s.offset-=l.getBlockAtIndex(o.index).getLength(),o.index+=1),o.offset=0,s.offset===0&&s.index>o.index)s.index-=1,s.offset=l.getBlockAtIndex(s.index).getBlockBreakPosition();else{let u=l.getBlockAtIndex(s.index);u.text.getStringAtRange([s.offset-1,s.offset])===` +`?s.offset-=1:s.offset=u.findLineBreakInDirectionFromPosition("forward",s.offset),s.offset!==u.getBlockBreakPosition()&&(e=l.positionFromLocation(s),l=l.insertBlockBreakAtRange([e,e+1]))}return n=l.positionFromLocation(o),r=l.positionFromLocation(s),{document:l,range:t=y([n,r])}}convertLineBreaksToBlockBreaksInRange(t){t=y(t);let[e]=t,n=this.getStringAtRange(t).slice(0,-1),r=this;return n.replace(/.*?\n/g,function(o){e+=o.length,r=r.insertBlockBreakAtRange([e-1,e])}),{document:r,range:t}}consolidateBlocksAtRange(t){t=y(t);let[e,n]=t,r=this.locationFromPosition(e).index,o=this.locationFromPosition(n).index;return new this.constructor(this.blockList.consolidateFromIndexToIndex(r,o))}getDocumentAtRange(t){t=y(t);let e=this.blockList.getSplittableListInRange(t).toArray();return new this.constructor(e)}getStringAtRange(t){let e,n=t=y(t);return n[n.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)}getBlockAtIndex(t){return this.blockList.getObjectAtIndex(t)}getBlockAtPosition(t){let{index:e}=this.locationFromPosition(t);return this.getBlockAtIndex(e)}getTextAtIndex(t){var e;return(e=this.getBlockAtIndex(t))===null||e===void 0?void 0:e.text}getTextAtPosition(t){let{index:e}=this.locationFromPosition(t);return this.getTextAtIndex(e)}getPieceAtPosition(t){let{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getPieceAtPosition(n)}getCharacterAtPosition(t){let{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getStringAtRange([n,n+1])}getLength(){return this.blockList.getEndPosition()}getBlocks(){return this.blockList.toArray()}getBlockCount(){return this.blockList.length}getEditCount(){return this.editCount}eachBlock(t){return this.blockList.eachObject(t)}eachBlockAtRange(t,e){let n,r;t=y(t);let[o,s]=t,l=this.locationFromPosition(o),c=this.locationFromPosition(s);if(l.index===c.index)return n=this.getBlockAtIndex(l.index),r=[l.offset,c.offset],e(n,r,l.index);for(let u=l.index;u<=c.index;u++)if(n=this.getBlockAtIndex(u),n){switch(u){case l.index:r=[l.offset,n.text.getLength()];break;case c.index:r=[0,c.offset];break;default:r=[0,n.text.getLength()]}e(n,r,u)}}getCommonAttributesAtRange(t){t=y(t);let[e]=t;if(ut(t))return this.getCommonAttributesAtPosition(e);{let n=[],r=[];return this.eachBlockAtRange(t,function(o,s){if(s[0]!==s[1])return n.push(o.text.getCommonAttributesAtRange(s)),r.push(yr(o))}),X.fromCommonAttributesOfObjects(n).merge(X.fromCommonAttributesOfObjects(r)).toObject()}}getCommonAttributesAtPosition(t){let e,n,{index:r,offset:o}=this.locationFromPosition(t),s=this.getBlockAtIndex(r);if(!s)return{};let l=yr(s),c=s.text.getAttributesAtPosition(o),u=s.text.getAttributesAtPosition(o-1),d=Object.keys(Dt).filter(C=>Dt[C].inheritable);for(e in u)n=u[e],(n===c[e]||d.includes(e))&&(l[e]=n);return l}getRangeOfCommonAttributeAtPosition(t,e){let{index:n,offset:r}=this.locationFromPosition(e),o=this.getTextAtIndex(n),[s,l]=Array.from(o.getExpandedRangeForAttributeAtOffset(t,r)),c=this.positionFromLocation({index:n,offset:s}),u=this.positionFromLocation({index:n,offset:l});return y([c,u])}getBaseBlockAttributes(){let t=this.getBlockAtIndex(0).getAttributes();for(let e=1;e{let o=[];for(let s=0;s{let{text:n}=e;return t=t.concat(n.getAttachmentPieces())}),t}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getRangeOfAttachment(t){let e=0,n=this.blockList.toArray();for(let r=0;r{let o=r.getLength();r.hasAttribute(t)&&n.push([e,e+o]),e+=o}),n}findRangesForTextAttribute(t){let{withValue:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=0,r=[],o=[];return this.getPieces().forEach(s=>{let l=s.getLength();(function(c){return e?c.getAttribute(t)===e:c.hasAttribute(t)})(s)&&(r[1]===n?r[1]=n+l:o.push(r=[n,n+l])),n+=l}),o}locationFromPosition(t){let e=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t));if(e.index!=null)return e;{let n=this.getBlocks();return{index:n.length-1,offset:n[n.length-1].getLength()}}}positionFromLocation(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)}locationRangeFromPosition(t){return y(this.locationFromPosition(t))}locationRangeFromRange(t){if(!(t=y(t)))return;let[e,n]=Array.from(t),r=this.locationFromPosition(e),o=this.locationFromPosition(n);return y([r,o])}rangeFromLocationRange(t){let e;t=y(t);let n=this.positionFromLocation(t[0]);return ut(t)||(e=this.positionFromLocation(t[1])),y([n,e])}isEqualTo(t){return this.blockList.isEqualTo(t?.blockList)}getTexts(){return this.getBlocks().map(t=>t.text)}getPieces(){let t=[];return Array.from(this.getTexts()).forEach(e=>{t.push(...Array.from(e.getPieces()||[]))}),t}getObjects(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())}toSerializableDocument(){let t=[];return this.blockList.eachObject(e=>t.push(e.copyWithText(e.text.toSerializableText()))),new this.constructor(t)}toString(){return this.blockList.toString()}toJSON(){return this.blockList.toJSON()}toConsole(){return JSON.stringify(this.blockList.toArray().map(t=>JSON.parse(t.text.toConsole())))}},yr=function(i){let t={},e=i.getLastAttribute();return e&&(t[e]=!0),t},jn=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{string:i=ue(i),attributes:t,type:"string"}},xr=(i,t)=>{try{return JSON.parse(i.getAttribute("data-trix-".concat(t)))}catch{return{}}},Ft=class extends R{static parse(t,e){let n=new this(t,e);return n.parse(),n}constructor(t){let{referenceElement:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.html=t,this.referenceElement=e,this.blocks=[],this.blockElements=[],this.processedElements=[]}getDocument(){return V.fromJSON(this.blocks)}parse(){try{this.createHiddenContainer(),qt.setHTML(this.containerElement,this.html);let t=je(this.containerElement,{usingFilter:Es});for(;t.nextNode();)this.processNode(t.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}}createHiddenContainer(){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=p({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))}removeHiddenContainer(){return At(this.containerElement)}processNode(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)}}appendBlockForTextNode(t){let e=t.parentNode;if(e===this.currentBlockElement&&this.isBlockElement(t.previousSibling))return this.appendStringWithAttributes(` +`);if(e===this.containerElement||this.isBlockElement(e)){var n;let r=this.getBlockAttributes(e),o=this.getBlockHTMLAttributes(e);It(r,(n=this.currentBlock)===null||n===void 0?void 0:n.attributes)||(this.currentBlock=this.appendBlockForAttributesWithElement(r,e,o),this.currentBlockElement=e)}}appendBlockForElement(t){let e=this.isBlockElement(t),n=kt(this.currentBlockElement,t);if(e&&!this.isBlockElement(t.firstChild)){if(!this.isInsignificantTextNode(t.firstChild)||!this.isBlockElement(t.firstElementChild)){let r=this.getBlockAttributes(t),o=this.getBlockHTMLAttributes(t);if(t.firstChild){if(n&&It(r,this.currentBlock.attributes))return this.appendStringWithAttributes(` +`);this.currentBlock=this.appendBlockForAttributesWithElement(r,t,o),this.currentBlockElement=t}}}else if(this.currentBlockElement&&!n&&!e){let r=this.findParentBlockElement(t);if(r)return this.appendBlockForElement(r);this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null}}findParentBlockElement(t){let{parentElement:e}=t;for(;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&this.blockElements.includes(e))return e;e=e.parentElement}return null}processTextNode(t){let e=t.data;var n;return Cr(t.parentNode)||(e=xi(e),Gr((n=t.previousSibling)===null||n===void 0?void 0:n.textContent)&&(e=Ss(e))),this.appendStringWithAttributes(e,this.getTextAttributes(t.parentNode))}processElement(t){let e;if(Tt(t)){if(e=xr(t,"attachment"),Object.keys(e).length){let n=this.getTextAttributes(t);this.appendAttachmentWithAttributes(e,n),t.innerHTML=""}return this.processedElements.push(t)}switch(j(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes(` +`,this.getTextAttributes(t)),this.processedElements.push(t);case"img":e={url:t.getAttribute("src"),contentType:"image"};let n=(r=>{let o=r.getAttribute("width"),s=r.getAttribute("height"),l={};return o&&(l.width=parseInt(o,10)),s&&(l.height=parseInt(s,10)),l})(t);for(let r in n){let o=n[r];e[r]=o}return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Me.tableRowSeparator);break;case"td":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Me.tableCellSeparator)}}appendBlockForAttributesWithElement(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.blockElements.push(e);let r=function(){return{text:[],attributes:arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},htmlAttributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}}}(t,n);return this.blocks.push(r),r}appendEmptyBlock(){return this.appendBlockForAttributesWithElement([],null)}appendStringWithAttributes(t,e){return this.appendPiece(jn(t,e))}appendAttachmentWithAttributes(t,e){return this.appendPiece(function(n){return{attachment:n,attributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},type:"attachment"}}(t,e))}appendPiece(t){return this.blocks.length===0&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)}appendStringToTextAtIndex(t,e){let{text:n}=this.blocks[e],r=n[n.length-1];if(r?.type!=="string")return n.push(jn(t));r.string+=t}prependStringToTextAtIndex(t,e){let{text:n}=this.blocks[e],r=n[0];if(r?.type!=="string")return n.unshift(jn(t));r.string=t+r.string}getTextAttributes(t){let e,n={};for(let r in Dt){let o=Dt[r];if(o.tagName&&vt(t,{matchingSelector:o.tagName,untilNode:this.containerElement}))n[r]=!0;else if(o.parser){if(e=o.parser(t),e){let s=!1;for(let l of this.findBlockElementAncestors(t))if(o.parser(l)===e){s=!0;break}s||(n[r]=e)}}else o.styleProperty&&(e=t.style[o.styleProperty],e&&(n[r]=e))}if(Tt(t)){let r=xr(t,"attributes");for(let o in r)e=r[o],n[o]=e}return n}getBlockAttributes(t){let e=[];for(;t&&t!==this.containerElement;){for(let r in W){let o=W[r];var n;o.parse!==!1&&j(t)===o.tagName&&((n=o.test)!==null&&n!==void 0&&n.call(o,t)||!o.test)&&(e.push(r),o.listAttribute&&e.push(o.listAttribute))}t=t.parentNode}return e.reverse()}getBlockHTMLAttributes(t){let e={},n=Object.values(W).find(r=>r.tagName===j(t));return(n?.htmlAttributes||[]).forEach(r=>{t.hasAttribute(r)&&(e[r]=t.getAttribute(r))}),e}findBlockElementAncestors(t){let e=[];for(;t&&t!==this.containerElement;){let n=j(t);de().includes(n)&&e.push(t),t=t.parentNode}return e}isBlockElement(t){if(t?.nodeType===Node.ELEMENT_NODE&&!Tt(t)&&!vt(t,{matchingSelector:"td",untilNode:this.containerElement}))return de().includes(j(t))||window.getComputedStyle(t).display==="block"}isInsignificantTextNode(t){if(t?.nodeType!==Node.TEXT_NODE||!ks(t.data))return;let{parentNode:e,previousSibling:n,nextSibling:r}=t;return Cs(e.previousSibling)&&!this.isBlockElement(e.previousSibling)||Cr(e)?void 0:!n||this.isBlockElement(n)||!r||this.isBlockElement(r)}isExtraBR(t){return j(t)==="br"&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t}needsTableSeparator(t){if(Me.removeBlankTableCells){var e;let n=(e=t.previousSibling)===null||e===void 0?void 0:e.textContent;return n&&/\S/.test(n)}return t.previousSibling}translateBlockElementMarginsToNewlines(){let t=this.getMarginOfDefaultBlockElement();for(let e=0;e2*t.top&&this.prependStringToTextAtIndex(` `,e),n.bottom>2*t.bottom&&this.appendStringToTextAtIndex(` -`,e))}}getMarginOfBlockElementAtIndex(t){let e=this.blockElements[t];if(e&&e.textContent&&!de().includes(j(e))&&!this.processedElements.includes(e))return Er(e)}getMarginOfDefaultBlockElement(){let t=p(W.default.tagName);return this.containerElement.appendChild(t),Er(t)}},Cr=function(i){let{whiteSpace:t}=window.getComputedStyle(i);return["pre","pre-wrap","pre-line"].includes(t)},Cs=i=>i&&!Gr(i.textContent),Er=function(i){let t=window.getComputedStyle(i);if(t.display==="block")return{top:parseInt(t.marginTop),bottom:parseInt(t.marginBottom)}},Es=function(i){return j(i)==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Ss=i=>i.replace(new RegExp("^".concat(yi.source,"+")),""),ks=i=>new RegExp("^".concat(yi.source,"*$")).test(i),Gr=i=>/\s$/.test(i),Rs=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],ai="data-trix-serialized-attributes",Ts="[".concat(ai,"]"),ws=new RegExp("","g"),Ls={"application/json":function(i){let t;if(i instanceof z)t=i;else{if(!(i instanceof HTMLElement))throw new Error("unserializable object");t=Mt.parse(i.innerHTML).getDocument()}return t.toSerializableDocument().toJSONString()},"text/html":function(i){let t;if(i instanceof z)t=Gt.render(i);else{if(!(i instanceof HTMLElement))throw new Error("unserializable object");t=i.cloneNode(!0)}return Array.from(t.querySelectorAll("[data-trix-serialize=false]")).forEach(e=>{At(e)}),Rs.forEach(e=>{Array.from(t.querySelectorAll("[".concat(e,"]"))).forEach(n=>{n.removeAttribute(e)})}),Array.from(t.querySelectorAll(Ts)).forEach(e=>{try{let n=JSON.parse(e.getAttribute(ai));e.removeAttribute(ai);for(let r in n){let o=n[r];e.setAttribute(r,o)}}catch{}}),t.innerHTML.replace(ws,"")}},Ds=Object.freeze({__proto__:null}),E=class extends R{constructor(t,e){super(...arguments),this.attachmentManager=t,this.attachment=e,this.id=this.attachment.id,this.file=this.attachment.file}remove(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)}};E.proxyMethod("attachment.getAttribute"),E.proxyMethod("attachment.hasAttribute"),E.proxyMethod("attachment.setAttribute"),E.proxyMethod("attachment.getAttributes"),E.proxyMethod("attachment.setAttributes"),E.proxyMethod("attachment.isPending"),E.proxyMethod("attachment.isPreviewable"),E.proxyMethod("attachment.getURL"),E.proxyMethod("attachment.getHref"),E.proxyMethod("attachment.getFilename"),E.proxyMethod("attachment.getFilesize"),E.proxyMethod("attachment.getFormattedFilesize"),E.proxyMethod("attachment.getExtension"),E.proxyMethod("attachment.getContentType"),E.proxyMethod("attachment.getFile"),E.proxyMethod("attachment.setFile"),E.proxyMethod("attachment.releaseFile"),E.proxyMethod("attachment.getUploadProgress"),E.proxyMethod("attachment.setUploadProgress");var Ge=class extends R{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.managedAttachments={},Array.from(t).forEach(e=>{this.manageAttachment(e)})}getAttachments(){let t=[];for(let e in this.managedAttachments){let n=this.managedAttachments[e];t.push(n)}return t}manageAttachment(t){return this.managedAttachments[t.id]||(this.managedAttachments[t.id]=new E(this,t)),this.managedAttachments[t.id]}attachmentIsManaged(t){return t.id in this.managedAttachments}requestRemovalOfAttachment(t){var e,n;if(this.attachmentIsManaged(t))return(e=this.delegate)===null||e===void 0||(n=e.attachmentManagerDidRequestRemovalOfAttachment)===null||n===void 0?void 0:n.call(e,t)}unmanageAttachment(t){let e=this.managedAttachments[t.id];return delete this.managedAttachments[t.id],e}},$e=class{constructor(t){this.composition=t,this.document=this.composition.document;let 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)}shouldInsertBlockBreak(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset!==0:this.breaksOnReturn&&this.nextCharacter!==` +`,e))}}getMarginOfBlockElementAtIndex(t){let e=this.blockElements[t];if(e&&e.textContent&&!de().includes(j(e))&&!this.processedElements.includes(e))return Er(e)}getMarginOfDefaultBlockElement(){let t=p(W.default.tagName);return this.containerElement.appendChild(t),Er(t)}},Cr=function(i){let{whiteSpace:t}=window.getComputedStyle(i);return["pre","pre-wrap","pre-line"].includes(t)},Cs=i=>i&&!Gr(i.textContent),Er=function(i){let t=window.getComputedStyle(i);if(t.display==="block")return{top:parseInt(t.marginTop),bottom:parseInt(t.marginBottom)}},Es=function(i){return j(i)==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Ss=i=>i.replace(new RegExp("^".concat(yi.source,"+")),""),ks=i=>new RegExp("^".concat(yi.source,"*$")).test(i),Gr=i=>/\s$/.test(i),Rs=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],ai="data-trix-serialized-attributes",Ts="[".concat(ai,"]"),ws=new RegExp("","g"),Ls={"application/json":function(i){let t;if(i instanceof V)t=i;else{if(!(i instanceof HTMLElement))throw new Error("unserializable object");t=Ft.parse(i.innerHTML).getDocument()}return t.toSerializableDocument().toJSONString()},"text/html":function(i){let t;if(i instanceof V)t=Jt.render(i);else{if(!(i instanceof HTMLElement))throw new Error("unserializable object");t=i.cloneNode(!0)}return Array.from(t.querySelectorAll("[data-trix-serialize=false]")).forEach(e=>{At(e)}),Rs.forEach(e=>{Array.from(t.querySelectorAll("[".concat(e,"]"))).forEach(n=>{n.removeAttribute(e)})}),Array.from(t.querySelectorAll(Ts)).forEach(e=>{try{let n=JSON.parse(e.getAttribute(ai));e.removeAttribute(ai);for(let r in n){let o=n[r];e.setAttribute(r,o)}}catch{}}),t.innerHTML.replace(ws,"")}},Ds=Object.freeze({__proto__:null}),E=class extends R{constructor(t,e){super(...arguments),this.attachmentManager=t,this.attachment=e,this.id=this.attachment.id,this.file=this.attachment.file}remove(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)}};E.proxyMethod("attachment.getAttribute"),E.proxyMethod("attachment.hasAttribute"),E.proxyMethod("attachment.setAttribute"),E.proxyMethod("attachment.getAttributes"),E.proxyMethod("attachment.setAttributes"),E.proxyMethod("attachment.isPending"),E.proxyMethod("attachment.isPreviewable"),E.proxyMethod("attachment.getURL"),E.proxyMethod("attachment.getHref"),E.proxyMethod("attachment.getFilename"),E.proxyMethod("attachment.getFilesize"),E.proxyMethod("attachment.getFormattedFilesize"),E.proxyMethod("attachment.getExtension"),E.proxyMethod("attachment.getContentType"),E.proxyMethod("attachment.getFile"),E.proxyMethod("attachment.setFile"),E.proxyMethod("attachment.releaseFile"),E.proxyMethod("attachment.getUploadProgress"),E.proxyMethod("attachment.setUploadProgress");var Ge=class extends R{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.managedAttachments={},Array.from(t).forEach(e=>{this.manageAttachment(e)})}getAttachments(){let t=[];for(let e in this.managedAttachments){let n=this.managedAttachments[e];t.push(n)}return t}manageAttachment(t){return this.managedAttachments[t.id]||(this.managedAttachments[t.id]=new E(this,t)),this.managedAttachments[t.id]}attachmentIsManaged(t){return t.id in this.managedAttachments}requestRemovalOfAttachment(t){var e,n;if(this.attachmentIsManaged(t))return(e=this.delegate)===null||e===void 0||(n=e.attachmentManagerDidRequestRemovalOfAttachment)===null||n===void 0?void 0:n.call(e,t)}unmanageAttachment(t){let e=this.managedAttachments[t.id];return delete this.managedAttachments[t.id],e}},$e=class{constructor(t){this.composition=t,this.document=this.composition.document;let 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)}shouldInsertBlockBreak(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset!==0:this.breaksOnReturn&&this.nextCharacter!==` `}shouldBreakFormattedBlock(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&this.nextCharacter===` `||this.previousCharacter===` -`)}shouldDecreaseListLevel(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()}shouldPrependListItem(){return this.block.isListItem()&&this.startLocation.offset===0&&!this.block.isEmpty()}shouldRemoveLastBlockAttribute(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()}},rt=class extends R{constructor(){super(...arguments),this.document=new z,this.attachments=[],this.currentAttributes={},this.revision=0}setDocument(t){var e,n;if(!t.isEqualTo(this.document))return this.document=t,this.refreshAttachments(),this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidChangeDocument)===null||n===void 0?void 0:n.call(e,t)}getSnapshot(){return{document:this.document,selectedRange:this.getSelectedRange()}}loadSnapshot(t){var e,n,r,o;let{document:s,selectedRange:l}=t;return(e=this.delegate)===null||e===void 0||(n=e.compositionWillLoadSnapshot)===null||n===void 0||n.call(e),this.setDocument(s??new z),this.setSelection(l??[0,0]),(r=this.delegate)===null||r===void 0||(o=r.compositionDidLoadSnapshot)===null||o===void 0?void 0:o.call(r)}insertText(t){let{updatePosition:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{updatePosition:!0},n=this.getSelectedRange();this.setDocument(this.document.insertTextAtRange(t,n));let r=n[0],o=r+t.getLength();return e&&this.setSelection(o),this.notifyDelegateOfInsertionAtRange([r,o])}insertBlock(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new $,e=new z([t]);return this.insertDocument(e)}insertDocument(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new z,e=this.getSelectedRange();this.setDocument(this.document.insertDocumentAtRange(t,e));let n=e[0],r=n+t.getLength();return this.setSelection(r),this.notifyDelegateOfInsertionAtRange([n,r])}insertString(t,e){let n=this.getCurrentTextAttributes(),r=K.textForStringWithAttributes(t,n);return this.insertText(r,e)}insertBlockBreak(){let t=this.getSelectedRange();this.setDocument(this.document.insertBlockBreakAtRange(t));let e=t[0],n=e+1;return this.setSelection(n),this.notifyDelegateOfInsertionAtRange([e,n])}insertLineBreak(){let t=new $e(this);if(t.shouldDecreaseListLevel())return this.decreaseListLevel(),this.setSelection(t.startPosition);if(t.shouldPrependListItem()){let e=new z([t.block.copyWithoutText()]);return this.insertDocument(e)}return t.shouldInsertBlockBreak()?this.insertBlockBreak():t.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():t.shouldBreakFormattedBlock()?this.breakFormattedBlock(t):this.insertString(` -`)}insertHTML(t){let e=Mt.parse(t).getDocument(),n=this.getSelectedRange();this.setDocument(this.document.mergeDocumentAtRange(e,n));let r=n[0],o=r+e.getLength()-1;return this.setSelection(o),this.notifyDelegateOfInsertionAtRange([r,o])}replaceHTML(t){let e=Mt.parse(t).getDocument().copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),r=this.document.rangeFromLocationRange(n);return this.setDocument(e),this.setSelection(r)}insertFile(t){return this.insertFiles([t])}insertFiles(t){let e=[];return Array.from(t).forEach(n=>{var r;if((r=this.delegate)!==null&&r!==void 0&&r.compositionShouldAcceptFile(n)){let o=yt.attachmentForFile(n);e.push(o)}}),this.insertAttachments(e)}insertAttachment(t){return this.insertAttachments([t])}insertAttachments(t){let e=new K;return Array.from(t).forEach(n=>{var r;let o=n.getType(),s=(r=mi[o])===null||r===void 0?void 0:r.presentation,l=this.getCurrentTextAttributes();s&&(l.presentation=s);let c=K.textForAttachmentWithAttributes(n,l);e=e.appendText(c)}),this.insertText(e)}shouldManageDeletingInDirection(t){let e=this.getLocationRange();if(ht(e)){if(t==="backward"&&e[0].offset===0||this.shouldManageMovingCursorInDirection(t))return!0}else if(e[0].index!==e[1].index)return!0;return!1}deleteInDirection(t){let e,n,r,{length:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getLocationRange(),l=this.getSelectedRange(),c=ht(l);if(c?n=t==="backward"&&s[0].offset===0:r=s[0].index!==s[1].index,n&&this.canDecreaseBlockAttributeLevel()){let u=this.getBlock();if(u.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(l[0]),u.isEmpty())return!1}return c&&(l=this.getExpandedRangeInDirection(t,{length:o}),t==="backward"&&(e=this.getAttachmentAtRange(l))),e?(this.editAttachment(e),!1):(this.setDocument(this.document.removeTextAtRange(l)),this.setSelection(l[0]),!n&&!r&&void 0)}moveTextFromRange(t){let[e]=Array.from(this.getSelectedRange());return this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)}removeAttachment(t){let e=this.document.getRangeOfAttachment(t);if(e)return this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])}removeLastBlockAttribute(){let[t,e]=Array.from(this.getSelectedRange()),n=this.document.getBlockAtPosition(e);return this.removeCurrentAttribute(n.getLastAttribute()),this.setSelection(t)}insertPlaceholder(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")}selectPlaceholder(){if(this.placeholderPosition!=null)return this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+1]),this.getSelectedRange()}forgetPlaceholder(){this.placeholderPosition=null}hasCurrentAttribute(t){let e=this.currentAttributes[t];return e!=null&&e!==!1}toggleCurrentAttribute(t){let e=!this.currentAttributes[t];return e?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)}canSetCurrentAttribute(t){return L(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)}canSetCurrentTextAttribute(t){let e=this.getSelectedDocument();if(e){for(let n of Array.from(e.getAttachments()))if(!n.hasContent())return!1;return!0}}canSetCurrentBlockAttribute(t){let e=this.getBlock();if(e)return!e.isTerminalBlock()}setCurrentAttribute(t,e){return L(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())}setHTMLAtributeAtPosition(t,e,n){var r;let o=this.document.getBlockAtPosition(t),s=(r=L(o.getLastAttribute()))===null||r===void 0?void 0:r.htmlAttributes;if(o&&s!=null&&s.includes(e)){let l=this.document.setHTMLAttributeAtPosition(t,e,n);this.setDocument(l)}}setTextAttribute(t,e){let n=this.getSelectedRange();if(!n)return;let[r,o]=Array.from(n);if(r!==o)return this.setDocument(this.document.addAttributeAtRange(t,e,n));if(t==="href"){let s=K.textForStringWithAttributes(e,{href:e});return this.insertText(s)}}setBlockAttribute(t,e){let n=this.getSelectedRange();if(this.canSetCurrentAttribute(t))return this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)}removeCurrentAttribute(t){return L(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())}removeTextAttribute(t){let e=this.getSelectedRange();if(e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}removeBlockAttribute(t){let e=this.getSelectedRange();if(e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}canDecreaseNestingLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getNestingLevel())>0}canIncreaseNestingLevel(){var t;let e=this.getBlock();if(e){if((t=L(e.getLastNestableAttribute()))===null||t===void 0||!t.listAttribute)return e.getNestingLevel()>0;{let n=this.getPreviousBlock();if(n)return function(){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Ft((arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).slice(0,r.length),r)}(n.getListItemAttributes(),e.getListItemAttributes())}}}decreaseNestingLevel(){let t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))}increaseNestingLevel(){let t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))}canDecreaseBlockAttributeLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getAttributeLevel())>0}decreaseBlockAttributeLevel(){var t;let e=(t=this.getBlock())===null||t===void 0?void 0:t.getLastAttribute();if(e)return this.removeCurrentAttribute(e)}decreaseListLevel(){let[t]=Array.from(this.getSelectedRange()),{index:e}=this.document.locationFromPosition(t),n=e,r=this.getBlock().getAttributeLevel(),o=this.document.getBlockAtIndex(n+1);for(;o&&o.isListItem()&&!(o.getAttributeLevel()<=r);)n++,o=this.document.getBlockAtIndex(n+1);t=this.document.positionFromLocation({index:e,offset:0});let s=this.document.positionFromLocation({index:n,offset:0});return this.setDocument(this.document.removeLastListAttributeAtRange([t,s]))}updateCurrentAttributes(){let t=this.getSelectedRange({ignoreLock:!0});if(t){let e=this.document.getCommonAttributesAtRange(t);if(Array.from(Qn()).forEach(n=>{e[n]||this.canSetCurrentAttribute(n)||(e[n]=!1)}),!Xt(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}}getCurrentAttributes(){return Nr.call({},this.currentAttributes)}getCurrentTextAttributes(){let t={};for(let e in this.currentAttributes){let n=this.currentAttributes[e];n!==!1&&ti(e)&&(t[e]=n)}return t}freezeSelection(){return this.setCurrentAttribute("frozen",!0)}thawSelection(){return this.removeCurrentAttribute("frozen")}hasFrozenSelection(){return this.hasCurrentAttribute("frozen")}setSelection(t){var e;let n=this.document.locationRangeFromRange(t);return(e=this.delegate)===null||e===void 0?void 0:e.compositionDidRequestChangingSelectionToLocationRange(n)}getSelectedRange(){let t=this.getLocationRange();if(t)return this.document.rangeFromLocationRange(t)}setSelectedRange(t){let e=this.document.locationRangeFromRange(t);return this.getSelectionManager().setLocationRange(e)}getPosition(){let t=this.getLocationRange();if(t)return this.document.positionFromLocation(t[0])}getLocationRange(t){return this.targetLocationRange?this.targetLocationRange:this.getSelectionManager().getLocationRange(t)||y({index:0,offset:0})}withTargetLocationRange(t,e){let n;this.targetLocationRange=t;try{n=e()}finally{this.targetLocationRange=null}return n}withTargetRange(t,e){let n=this.document.locationRangeFromRange(t);return this.withTargetLocationRange(n,e)}withTargetDOMRange(t,e){let n=this.createLocationRangeFromDOMRange(t,{strict:!1});return this.withTargetLocationRange(n,e)}getExpandedRangeInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[n,r]=Array.from(this.getSelectedRange());return t==="backward"?e?n-=e:n=this.translateUTF16PositionFromOffset(n,-1):e?r+=e:r=this.translateUTF16PositionFromOffset(r,1),y([n,r])}shouldManageMovingCursorInDirection(t){if(this.editingAttachment)return!0;let e=this.getExpandedRangeInDirection(t);return this.getAttachmentAtRange(e)!=null}moveCursorInDirection(t){let e,n;if(this.editingAttachment)n=this.document.getRangeOfAttachment(this.editingAttachment);else{let r=this.getSelectedRange();n=this.getExpandedRangeInDirection(t),e=!We(r,n)}if(t==="backward"?this.setSelectedRange(n[0]):this.setSelectedRange(n[1]),e){let r=this.getAttachmentAtRange(n);if(r)return this.editAttachment(r)}}expandSelectionInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getExpandedRangeInDirection(t,{length:e});return this.setSelectedRange(n)}expandSelectionForEditing(){if(this.hasCurrentAttribute("href"))return this.expandSelectionAroundCommonAttribute("href")}expandSelectionAroundCommonAttribute(t){let e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e);return this.setSelectedRange(n)}selectionContainsAttachments(){var t;return((t=this.getSelectedAttachments())===null||t===void 0?void 0:t.length)>0}selectionIsInCursorTarget(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())}positionIsCursorTarget(t){let e=this.document.locationFromPosition(t);if(e)return this.locationIsCursorTarget(e)}positionIsBlockBreak(t){var e;return(e=this.document.getPieceAtPosition(t))===null||e===void 0?void 0:e.isBlockBreak()}getSelectedDocument(){let t=this.getSelectedRange();if(t)return this.document.getDocumentAtRange(t)}getSelectedAttachments(){var t;return(t=this.getSelectedDocument())===null||t===void 0?void 0:t.getAttachments()}getAttachments(){return this.attachments.slice(0)}refreshAttachments(){let t=this.document.getAttachments(),{added:e,removed:n}=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=[],l=[],c=new Set;r.forEach(d=>{c.add(d)});let u=new Set;return o.forEach(d=>{u.add(d),c.has(d)||s.push(d)}),r.forEach(d=>{u.has(d)||l.push(d)}),{added:s,removed:l}}(this.attachments,t);return this.attachments=t,Array.from(n).forEach(r=>{var o,s;r.delegate=null,(o=this.delegate)===null||o===void 0||(s=o.compositionDidRemoveAttachment)===null||s===void 0||s.call(o,r)}),(()=>{let r=[];return Array.from(e).forEach(o=>{var s,l;o.delegate=this,r.push((s=this.delegate)===null||s===void 0||(l=s.compositionDidAddAttachment)===null||l===void 0?void 0:l.call(s,o))}),r})()}attachmentDidChangeAttributes(t){var e,n;return this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidEditAttachment)===null||n===void 0?void 0:n.call(e,t)}attachmentDidChangePreviewURL(t){var e,n;return this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidChangeAttachmentPreviewURL)===null||n===void 0?void 0:n.call(e,t)}editAttachment(t,e){var n,r;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,(n=this.delegate)===null||n===void 0||(r=n.compositionDidStartEditingAttachment)===null||r===void 0?void 0:r.call(n,this.editingAttachment,e)}stopEditingAttachment(){var t,e;this.editingAttachment&&((t=this.delegate)===null||t===void 0||(e=t.compositionDidStopEditingAttachment)===null||e===void 0||e.call(t,this.editingAttachment),this.editingAttachment=null)}updateAttributesForAttachment(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))}removeAttributeForAttachment(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))}breakFormattedBlock(t){let{document:e}=t,{block:n}=t,r=t.startPosition,o=[r-1,r];n.getBlockBreakPosition()===t.startLocation.offset?(n.breaksOnReturn()&&t.nextCharacter===` +`)}shouldDecreaseListLevel(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()}shouldPrependListItem(){return this.block.isListItem()&&this.startLocation.offset===0&&!this.block.isEmpty()}shouldRemoveLastBlockAttribute(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()}},it=class extends R{constructor(){super(...arguments),this.document=new V,this.attachments=[],this.currentAttributes={},this.revision=0}setDocument(t){var e,n;if(!t.isEqualTo(this.document))return this.document=t,this.refreshAttachments(),this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidChangeDocument)===null||n===void 0?void 0:n.call(e,t)}getSnapshot(){return{document:this.document,selectedRange:this.getSelectedRange()}}loadSnapshot(t){var e,n,r,o;let{document:s,selectedRange:l}=t;return(e=this.delegate)===null||e===void 0||(n=e.compositionWillLoadSnapshot)===null||n===void 0||n.call(e),this.setDocument(s??new V),this.setSelection(l??[0,0]),(r=this.delegate)===null||r===void 0||(o=r.compositionDidLoadSnapshot)===null||o===void 0?void 0:o.call(r)}insertText(t){let{updatePosition:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{updatePosition:!0},n=this.getSelectedRange();this.setDocument(this.document.insertTextAtRange(t,n));let r=n[0],o=r+t.getLength();return e&&this.setSelection(o),this.notifyDelegateOfInsertionAtRange([r,o])}insertBlock(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new bt,e=new V([t]);return this.insertDocument(e)}insertDocument(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new V,e=this.getSelectedRange();this.setDocument(this.document.insertDocumentAtRange(t,e));let n=e[0],r=n+t.getLength();return this.setSelection(r),this.notifyDelegateOfInsertionAtRange([n,r])}insertString(t,e){let n=this.getCurrentTextAttributes(),r=J.textForStringWithAttributes(t,n);return this.insertText(r,e)}insertBlockBreak(){let t=this.getSelectedRange();this.setDocument(this.document.insertBlockBreakAtRange(t));let e=t[0],n=e+1;return this.setSelection(n),this.notifyDelegateOfInsertionAtRange([e,n])}insertLineBreak(){let t=new $e(this);if(t.shouldDecreaseListLevel())return this.decreaseListLevel(),this.setSelection(t.startPosition);if(t.shouldPrependListItem()){let e=new V([t.block.copyWithoutText()]);return this.insertDocument(e)}return t.shouldInsertBlockBreak()?this.insertBlockBreak():t.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():t.shouldBreakFormattedBlock()?this.breakFormattedBlock(t):this.insertString(` +`)}insertHTML(t){let e=Ft.parse(t).getDocument(),n=this.getSelectedRange();this.setDocument(this.document.mergeDocumentAtRange(e,n));let r=n[0],o=r+e.getLength()-1;return this.setSelection(o),this.notifyDelegateOfInsertionAtRange([r,o])}replaceHTML(t){let e=Ft.parse(t).getDocument().copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),r=this.document.rangeFromLocationRange(n);return this.setDocument(e),this.setSelection(r)}insertFile(t){return this.insertFiles([t])}insertFiles(t){let e=[];return Array.from(t).forEach(n=>{var r;if((r=this.delegate)!==null&&r!==void 0&&r.compositionShouldAcceptFile(n)){let o=Kt.attachmentForFile(n);e.push(o)}}),this.insertAttachments(e)}insertAttachment(t){return this.insertAttachments([t])}insertAttachments(t){let e=new J;return Array.from(t).forEach(n=>{var r;let o=n.getType(),s=(r=mi[o])===null||r===void 0?void 0:r.presentation,l=this.getCurrentTextAttributes();s&&(l.presentation=s);let c=J.textForAttachmentWithAttributes(n,l);e=e.appendText(c)}),this.insertText(e)}shouldManageDeletingInDirection(t){let e=this.getLocationRange();if(ut(e)){if(t==="backward"&&e[0].offset===0||this.shouldManageMovingCursorInDirection(t))return!0}else if(e[0].index!==e[1].index)return!0;return!1}deleteInDirection(t){let e,n,r,{length:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getLocationRange(),l=this.getSelectedRange(),c=ut(l);if(c?n=t==="backward"&&s[0].offset===0:r=s[0].index!==s[1].index,n&&this.canDecreaseBlockAttributeLevel()){let u=this.getBlock();if(u.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(l[0]),u.isEmpty())return!1}return c&&(l=this.getExpandedRangeInDirection(t,{length:o}),t==="backward"&&(e=this.getAttachmentAtRange(l))),e?(this.editAttachment(e),!1):(this.setDocument(this.document.removeTextAtRange(l)),this.setSelection(l[0]),!n&&!r&&void 0)}moveTextFromRange(t){let[e]=Array.from(this.getSelectedRange());return this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)}removeAttachment(t){let e=this.document.getRangeOfAttachment(t);if(e)return this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])}removeLastBlockAttribute(){let[t,e]=Array.from(this.getSelectedRange()),n=this.document.getBlockAtPosition(e);return this.removeCurrentAttribute(n.getLastAttribute()),this.setSelection(t)}insertPlaceholder(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")}selectPlaceholder(){if(this.placeholderPosition!=null)return this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+1]),this.getSelectedRange()}forgetPlaceholder(){this.placeholderPosition=null}hasCurrentAttribute(t){let e=this.currentAttributes[t];return e!=null&&e!==!1}toggleCurrentAttribute(t){let e=!this.currentAttributes[t];return e?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)}canSetCurrentAttribute(t){return L(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)}canSetCurrentTextAttribute(t){let e=this.getSelectedDocument();if(e){for(let n of Array.from(e.getAttachments()))if(!n.hasContent())return!1;return!0}}canSetCurrentBlockAttribute(t){let e=this.getBlock();if(e)return!e.isTerminalBlock()}setCurrentAttribute(t,e){return L(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())}setHTMLAtributeAtPosition(t,e,n){var r;let o=this.document.getBlockAtPosition(t),s=(r=L(o.getLastAttribute()))===null||r===void 0?void 0:r.htmlAttributes;if(o&&s!=null&&s.includes(e)){let l=this.document.setHTMLAttributeAtPosition(t,e,n);this.setDocument(l)}}setTextAttribute(t,e){let n=this.getSelectedRange();if(!n)return;let[r,o]=Array.from(n);if(r!==o)return this.setDocument(this.document.addAttributeAtRange(t,e,n));if(t==="href"){let s=J.textForStringWithAttributes(e,{href:e});return this.insertText(s)}}setBlockAttribute(t,e){let n=this.getSelectedRange();if(this.canSetCurrentAttribute(t))return this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)}removeCurrentAttribute(t){return L(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())}removeTextAttribute(t){let e=this.getSelectedRange();if(e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}removeBlockAttribute(t){let e=this.getSelectedRange();if(e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}canDecreaseNestingLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getNestingLevel())>0}canIncreaseNestingLevel(){var t;let e=this.getBlock();if(e){if((t=L(e.getLastNestableAttribute()))===null||t===void 0||!t.listAttribute)return e.getNestingLevel()>0;{let n=this.getPreviousBlock();if(n)return function(){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return It((arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).slice(0,r.length),r)}(n.getListItemAttributes(),e.getListItemAttributes())}}}decreaseNestingLevel(){let t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))}increaseNestingLevel(){let t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))}canDecreaseBlockAttributeLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getAttributeLevel())>0}decreaseBlockAttributeLevel(){var t;let e=(t=this.getBlock())===null||t===void 0?void 0:t.getLastAttribute();if(e)return this.removeCurrentAttribute(e)}decreaseListLevel(){let[t]=Array.from(this.getSelectedRange()),{index:e}=this.document.locationFromPosition(t),n=e,r=this.getBlock().getAttributeLevel(),o=this.document.getBlockAtIndex(n+1);for(;o&&o.isListItem()&&!(o.getAttributeLevel()<=r);)n++,o=this.document.getBlockAtIndex(n+1);t=this.document.positionFromLocation({index:e,offset:0});let s=this.document.positionFromLocation({index:n,offset:0});return this.setDocument(this.document.removeLastListAttributeAtRange([t,s]))}updateCurrentAttributes(){let t=this.getSelectedRange({ignoreLock:!0});if(t){let e=this.document.getCommonAttributesAtRange(t);if(Array.from(Qn()).forEach(n=>{e[n]||this.canSetCurrentAttribute(n)||(e[n]=!1)}),!Xt(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}}getCurrentAttributes(){return Nr.call({},this.currentAttributes)}getCurrentTextAttributes(){let t={};for(let e in this.currentAttributes){let n=this.currentAttributes[e];n!==!1&&ti(e)&&(t[e]=n)}return t}freezeSelection(){return this.setCurrentAttribute("frozen",!0)}thawSelection(){return this.removeCurrentAttribute("frozen")}hasFrozenSelection(){return this.hasCurrentAttribute("frozen")}setSelection(t){var e;let n=this.document.locationRangeFromRange(t);return(e=this.delegate)===null||e===void 0?void 0:e.compositionDidRequestChangingSelectionToLocationRange(n)}getSelectedRange(){let t=this.getLocationRange();if(t)return this.document.rangeFromLocationRange(t)}setSelectedRange(t){let e=this.document.locationRangeFromRange(t);return this.getSelectionManager().setLocationRange(e)}getPosition(){let t=this.getLocationRange();if(t)return this.document.positionFromLocation(t[0])}getLocationRange(t){return this.targetLocationRange?this.targetLocationRange:this.getSelectionManager().getLocationRange(t)||y({index:0,offset:0})}withTargetLocationRange(t,e){let n;this.targetLocationRange=t;try{n=e()}finally{this.targetLocationRange=null}return n}withTargetRange(t,e){let n=this.document.locationRangeFromRange(t);return this.withTargetLocationRange(n,e)}withTargetDOMRange(t,e){let n=this.createLocationRangeFromDOMRange(t,{strict:!1});return this.withTargetLocationRange(n,e)}getExpandedRangeInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[n,r]=Array.from(this.getSelectedRange());return t==="backward"?e?n-=e:n=this.translateUTF16PositionFromOffset(n,-1):e?r+=e:r=this.translateUTF16PositionFromOffset(r,1),y([n,r])}shouldManageMovingCursorInDirection(t){if(this.editingAttachment)return!0;let e=this.getExpandedRangeInDirection(t);return this.getAttachmentAtRange(e)!=null}moveCursorInDirection(t){let e,n;if(this.editingAttachment)n=this.document.getRangeOfAttachment(this.editingAttachment);else{let r=this.getSelectedRange();n=this.getExpandedRangeInDirection(t),e=!We(r,n)}if(t==="backward"?this.setSelectedRange(n[0]):this.setSelectedRange(n[1]),e){let r=this.getAttachmentAtRange(n);if(r)return this.editAttachment(r)}}expandSelectionInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getExpandedRangeInDirection(t,{length:e});return this.setSelectedRange(n)}expandSelectionForEditing(){if(this.hasCurrentAttribute("href"))return this.expandSelectionAroundCommonAttribute("href")}expandSelectionAroundCommonAttribute(t){let e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e);return this.setSelectedRange(n)}selectionContainsAttachments(){var t;return((t=this.getSelectedAttachments())===null||t===void 0?void 0:t.length)>0}selectionIsInCursorTarget(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())}positionIsCursorTarget(t){let e=this.document.locationFromPosition(t);if(e)return this.locationIsCursorTarget(e)}positionIsBlockBreak(t){var e;return(e=this.document.getPieceAtPosition(t))===null||e===void 0?void 0:e.isBlockBreak()}getSelectedDocument(){let t=this.getSelectedRange();if(t)return this.document.getDocumentAtRange(t)}getSelectedAttachments(){var t;return(t=this.getSelectedDocument())===null||t===void 0?void 0:t.getAttachments()}getAttachments(){return this.attachments.slice(0)}refreshAttachments(){let t=this.document.getAttachments(),{added:e,removed:n}=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=[],l=[],c=new Set;r.forEach(d=>{c.add(d)});let u=new Set;return o.forEach(d=>{u.add(d),c.has(d)||s.push(d)}),r.forEach(d=>{u.has(d)||l.push(d)}),{added:s,removed:l}}(this.attachments,t);return this.attachments=t,Array.from(n).forEach(r=>{var o,s;r.delegate=null,(o=this.delegate)===null||o===void 0||(s=o.compositionDidRemoveAttachment)===null||s===void 0||s.call(o,r)}),(()=>{let r=[];return Array.from(e).forEach(o=>{var s,l;o.delegate=this,r.push((s=this.delegate)===null||s===void 0||(l=s.compositionDidAddAttachment)===null||l===void 0?void 0:l.call(s,o))}),r})()}attachmentDidChangeAttributes(t){var e,n;return this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidEditAttachment)===null||n===void 0?void 0:n.call(e,t)}attachmentDidChangePreviewURL(t){var e,n;return this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidChangeAttachmentPreviewURL)===null||n===void 0?void 0:n.call(e,t)}editAttachment(t,e){var n,r;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,(n=this.delegate)===null||n===void 0||(r=n.compositionDidStartEditingAttachment)===null||r===void 0?void 0:r.call(n,this.editingAttachment,e)}stopEditingAttachment(){var t,e;this.editingAttachment&&((t=this.delegate)===null||t===void 0||(e=t.compositionDidStopEditingAttachment)===null||e===void 0||e.call(t,this.editingAttachment),this.editingAttachment=null)}updateAttributesForAttachment(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))}removeAttributeForAttachment(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))}breakFormattedBlock(t){let{document:e}=t,{block:n}=t,r=t.startPosition,o=[r-1,r];n.getBlockBreakPosition()===t.startLocation.offset?(n.breaksOnReturn()&&t.nextCharacter===` `?r+=1:e=e.removeTextAtRange(o),o=[r,r]):t.nextCharacter===` `?t.previousCharacter===` -`?o=[r-1,r+1]:(o=[r,r+1],r+=1):t.startLocation.offset-1!=0&&(r+=1);let s=new z([n.removeLastAttribute().copyWithoutText()]);return this.setDocument(e.insertDocumentAtRange(s,o)),this.setSelection(r)}getPreviousBlock(){let t=this.getLocationRange();if(t){let{index:e}=t[0];if(e>0)return this.document.getBlockAtIndex(e-1)}}getBlock(){let t=this.getLocationRange();if(t)return this.document.getBlockAtIndex(t[0].index)}getAttachmentAtRange(t){let e=this.document.getDocumentAtRange(t);if(e.toString()==="".concat("\uFFFC",` -`))return e.getAttachments()[0]}notifyDelegateOfCurrentAttributesChange(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.compositionDidChangeCurrentAttributes)===null||e===void 0?void 0:e.call(t,this.currentAttributes)}notifyDelegateOfInsertionAtRange(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionDidPerformInsertionAtRange)===null||n===void 0?void 0:n.call(e,t)}translateUTF16PositionFromOffset(t,e){let n=this.document.toUTF16String(),r=n.offsetFromUCS2Offset(t);return n.offsetToUCS2Offset(r+e)}};rt.proxyMethod("getSelectionManager().getPointRange"),rt.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),rt.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),rt.proxyMethod("getSelectionManager().locationIsCursorTarget"),rt.proxyMethod("getSelectionManager().selectionIsExpanded"),rt.proxyMethod("delegate?.getSelectionManager");var Ae=class extends R{constructor(t){super(...arguments),this.composition=t,this.undoEntries=[],this.redoEntries=[]}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.undoEntries.slice(-1)[0];if(!n||!Ns(r,t,e)){let o=this.createEntry({description:t,context:e});this.undoEntries.push(o),this.redoEntries=[]}}undo(){let t=this.undoEntries.pop();if(t){let e=this.createEntry(t);return this.redoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}redo(){let t=this.redoEntries.pop();if(t){let e=this.createEntry(t);return this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}canUndo(){return this.undoEntries.length>0}canRedo(){return this.redoEntries.length>0}createEntry(){let{description:t,context:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{description:t?.toString(),context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}}},Ns=(i,t,e)=>i?.description===t?.toString()&&i?.context===JSON.stringify(e),Wn="attachmentGallery",Ye=class{constructor(t){this.document=t.document,this.selectedRange=t.selectedRange}perform(){return this.removeBlockAttribute(),this.applyBlockAttribute()}getSnapshot(){return{document:this.document,selectedRange:this.selectedRange}}removeBlockAttribute(){return this.findRangesOfBlocks().map(t=>this.document=this.document.removeAttributeAtRange(Wn,t))}applyBlockAttribute(){let t=0;this.findRangesOfPieces().forEach(e=>{e[1]-e[0]>1&&(e[0]+=t,e[1]+=t,this.document.getCharacterAtPosition(e[1])!==` +`?o=[r-1,r+1]:(o=[r,r+1],r+=1):t.startLocation.offset-1!=0&&(r+=1);let s=new V([n.removeLastAttribute().copyWithoutText()]);return this.setDocument(e.insertDocumentAtRange(s,o)),this.setSelection(r)}getPreviousBlock(){let t=this.getLocationRange();if(t){let{index:e}=t[0];if(e>0)return this.document.getBlockAtIndex(e-1)}}getBlock(){let t=this.getLocationRange();if(t)return this.document.getBlockAtIndex(t[0].index)}getAttachmentAtRange(t){let e=this.document.getDocumentAtRange(t);if(e.toString()==="".concat("\uFFFC",` +`))return e.getAttachments()[0]}notifyDelegateOfCurrentAttributesChange(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.compositionDidChangeCurrentAttributes)===null||e===void 0?void 0:e.call(t,this.currentAttributes)}notifyDelegateOfInsertionAtRange(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionDidPerformInsertionAtRange)===null||n===void 0?void 0:n.call(e,t)}translateUTF16PositionFromOffset(t,e){let n=this.document.toUTF16String(),r=n.offsetFromUCS2Offset(t);return n.offsetToUCS2Offset(r+e)}};it.proxyMethod("getSelectionManager().getPointRange"),it.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),it.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),it.proxyMethod("getSelectionManager().locationIsCursorTarget"),it.proxyMethod("getSelectionManager().selectionIsExpanded"),it.proxyMethod("delegate?.getSelectionManager");var Ae=class extends R{constructor(t){super(...arguments),this.composition=t,this.undoEntries=[],this.redoEntries=[]}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.undoEntries.slice(-1)[0];if(!n||!Ns(r,t,e)){let o=this.createEntry({description:t,context:e});this.undoEntries.push(o),this.redoEntries=[]}}undo(){let t=this.undoEntries.pop();if(t){let e=this.createEntry(t);return this.redoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}redo(){let t=this.redoEntries.pop();if(t){let e=this.createEntry(t);return this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}canUndo(){return this.undoEntries.length>0}canRedo(){return this.redoEntries.length>0}createEntry(){let{description:t,context:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{description:t?.toString(),context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}}},Ns=(i,t,e)=>i?.description===t?.toString()&&i?.context===JSON.stringify(e),Wn="attachmentGallery",Ye=class{constructor(t){this.document=t.document,this.selectedRange=t.selectedRange}perform(){return this.removeBlockAttribute(),this.applyBlockAttribute()}getSnapshot(){return{document:this.document,selectedRange:this.selectedRange}}removeBlockAttribute(){return this.findRangesOfBlocks().map(t=>this.document=this.document.removeAttributeAtRange(Wn,t))}applyBlockAttribute(){let t=0;this.findRangesOfPieces().forEach(e=>{e[1]-e[0]>1&&(e[0]+=t,e[1]+=t,this.document.getCharacterAtPosition(e[1])!==` `&&(this.document=this.document.insertBlockBreakAtRange(e[1]),e[1]0&&arguments[0]!==void 0?arguments[0]:"",e=Mt.parse(t,{referenceElement:this.element}).getDocument();return this.loadDocument(e)}loadJSON(t){let{document:e,selectedRange:n}=t;return e=z.fromJSON(e),this.loadSnapshot({document:e,selectedRange:n})}loadSnapshot(t){return this.undoManager=new Ae(this.composition),this.composition.loadSnapshot(t)}getDocument(){return this.composition.document}getSelectedDocument(){return this.composition.getSelectedDocument()}getSnapshot(){return this.composition.getSnapshot()}toJSON(){return this.getSnapshot()}deleteInDirection(t){return this.composition.deleteInDirection(t)}insertAttachment(t){return this.composition.insertAttachment(t)}insertAttachments(t){return this.composition.insertAttachments(t)}insertDocument(t){return this.composition.insertDocument(t)}insertFile(t){return this.composition.insertFile(t)}insertFiles(t){return this.composition.insertFiles(t)}insertHTML(t){return this.composition.insertHTML(t)}insertString(t){return this.composition.insertString(t)}insertText(t){return this.composition.insertText(t)}insertLineBreak(){return this.composition.insertLineBreak()}getSelectedRange(){return this.composition.getSelectedRange()}getPosition(){return this.composition.getPosition()}getClientRectAtPosition(t){let e=this.getDocument().locationRangeFromRange([t,t+1]);return this.selectionManager.getClientRectAtLocationRange(e)}expandSelectionInDirection(t){return this.composition.expandSelectionInDirection(t)}moveCursorInDirection(t){return this.composition.moveCursorInDirection(t)}setSelectedRange(t){return this.composition.setSelectedRange(t)}activateAttribute(t){let e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this.composition.setCurrentAttribute(t,e)}attributeIsActive(t){return this.composition.hasCurrentAttribute(t)}canActivateAttribute(t){return this.composition.canSetCurrentAttribute(t)}deactivateAttribute(t){return this.composition.removeCurrentAttribute(t)}setHTMLAtributeAtPosition(t,e,n){this.composition.setHTMLAtributeAtPosition(t,e,n)}canDecreaseNestingLevel(){return this.composition.canDecreaseNestingLevel()}canIncreaseNestingLevel(){return this.composition.canIncreaseNestingLevel()}decreaseNestingLevel(){if(this.canDecreaseNestingLevel())return this.composition.decreaseNestingLevel()}increaseNestingLevel(){if(this.canIncreaseNestingLevel())return this.composition.increaseNestingLevel()}canRedo(){return this.undoManager.canRedo()}canUndo(){return this.undoManager.canUndo()}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.undoManager.recordUndoEntry(t,{context:e,consolidatable:n})}redo(){if(this.canRedo())return this.undoManager.redo()}undo(){if(this.canUndo())return this.undoManager.undo()}},Ze=class{constructor(t){this.element=t}findLocationFromContainerAndOffset(t,e){let{strict:n}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{strict:!0},r=0,o=!1,s={index:0,offset:0},l=this.findAttachmentElementParentForNode(t);l&&(t=l.parentNode,e=kn(l));let c=je(this.element,{usingFilter:Yr});for(;c.nextNode();){let u=c.currentNode;if(u===t&&ge(t)){Ht(u)||(s.offset+=e);break}if(u.parentNode===t){if(r++===e)break}else if(!Tt(t,u)&&r>0)break;Yi(u,{strict:n})?(o&&s.index++,s.offset=0,o=!0):s.offset+=Un(u)}return s}findContainerAndOffsetFromLocation(t){let e,n;if(t.index===0&&t.offset===0){for(e=this.element,n=0;e.firstChild;)if(e=e.firstChild,Rn(e)){n=1;break}return[e,n]}let[r,o]=this.findNodeAndOffsetFromLocation(t);if(r){if(ge(r))Un(r)===0?(e=r.parentNode.parentNode,n=kn(r.parentNode),Ht(r,{name:"right"})&&n++):(e=r,n=t.offset-o);else{if(e=r.parentNode,!Yi(r.previousSibling)&&!Rn(e))for(;r===e.lastChild&&(r=e,e=e.parentNode,!Rn(e)););n=kn(r),t.offset!==0&&n++}return[e,n]}}findNodeAndOffsetFromLocation(t){let e,n,r=0;for(let o of this.getSignificantNodesForIndex(t.index)){let s=Un(o);if(t.offset<=r+s)if(ge(o)){if(e=o,n=r,t.offset===n&&Ht(e))break}else e||(e=o,n=r);if(r+=s,r>t.offset)break}return[e,n]}findAttachmentElementParentForNode(t){for(;t&&t!==this.element;){if(Lt(t))return t;t=t.parentNode}}getSignificantNodesForIndex(t){let e=[],n=je(this.element,{usingFilter:Os}),r=!1;for(;n.nextNode();){let s=n.currentNode;var o;if(qt(s)){if(o!=null?o++:o=0,o===t)r=!0;else if(r)break}else r&&e.push(s)}return e}},Un=function(i){return i.nodeType===Node.TEXT_NODE?Ht(i)?0:i.textContent.length:j(i)==="br"||Lt(i)?1:0},Os=function(i){return Fs(i)===NodeFilter.FILTER_ACCEPT?Yr(i):NodeFilter.FILTER_REJECT},Fs=function(i){return Or(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Yr=function(i){return Lt(i.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Qe=class{createDOMRangeFromPoint(t){let e,{x:n,y:r}=t;if(document.caretPositionFromPoint){let{offsetNode:o,offset:s}=document.caretPositionFromPoint(n,r);return e=document.createRange(),e.setStart(o,s),e}if(document.caretRangeFromPoint)return document.caretRangeFromPoint(n,r);if(document.body.createTextRange){let o=me();try{let s=document.body.createTextRange();s.moveToPoint(n,r),s.select()}catch{}return e=me(),Wr(o),e}}getClientRectsForDOMRange(t){let e=Array.from(t.getClientRects());return[e[0],e[e.length-1]]}},ut=class extends R{constructor(t){super(...arguments),this.didMouseDown=this.didMouseDown.bind(this),this.selectionDidChange=this.selectionDidChange.bind(this),this.element=t,this.locationMapper=new Ze(this.element),this.pointMapper=new Qe,this.lockCount=0,S("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}getLocationRange(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.strict===!1?this.createLocationRangeFromDOMRange(me()):t.ignoreLock?this.currentLocationRange:this.lockedLocationRange?this.lockedLocationRange:this.currentLocationRange}setLocationRange(t){if(this.lockedLocationRange)return;t=y(t);let e=this.createDOMRangeFromLocationRange(t);e&&(Wr(e),this.updateCurrentLocationRange(t))}setLocationRangeFromPointRange(t){t=y(t);let e=this.getLocationAtPoint(t[0]),n=this.getLocationAtPoint(t[1]);this.setLocationRange([e,n])}getClientRectAtLocationRange(t){let e=this.createDOMRangeFromLocationRange(t);if(e)return this.getClientRectsForDOMRange(e)[1]}locationIsCursorTarget(t){let e=Array.from(this.findNodeAndOffsetFromLocation(t))[0];return Ht(e)}lock(){this.lockCount++==0&&(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange())}unlock(){if(--this.lockCount==0){let{lockedLocationRange:t}=this;if(this.lockedLocationRange=null,t!=null)return this.setLocationRange(t)}}clearSelection(){var t;return(t=jr())===null||t===void 0?void 0:t.removeAllRanges()}selectionIsCollapsed(){var t;return((t=me())===null||t===void 0?void 0:t.collapsed)===!0}selectionIsExpanded(){return!this.selectionIsCollapsed()}createLocationRangeFromDOMRange(t,e){if(t==null||!this.domRangeWithinElement(t))return;let n=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e);if(!n)return;let r=t.collapsed?void 0:this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e);return y([n,r])}didMouseDown(){return this.pauseTemporarily()}pauseTemporarily(){let t;this.paused=!0;let e=()=>{if(this.paused=!1,clearTimeout(n),Array.from(t).forEach(r=>{r.destroy()}),Tt(document,this.element))return this.selectionDidChange()},n=setTimeout(e,200);t=["mousemove","keydown"].map(r=>S(r,{onElement:document,withCallback:e}))}selectionDidChange(){if(!this.paused&&!fi(this.element))return this.updateCurrentLocationRange()}updateCurrentLocationRange(t){var e,n;if((t??(t=this.createLocationRangeFromDOMRange(me())))&&!We(t,this.currentLocationRange))return this.currentLocationRange=t,(e=this.delegate)===null||e===void 0||(n=e.locationRangeDidChange)===null||n===void 0?void 0:n.call(e,this.currentLocationRange.slice(0))}createDOMRangeFromLocationRange(t){let e=this.findContainerAndOffsetFromLocation(t[0]),n=ht(t)?e:this.findContainerAndOffsetFromLocation(t[1])||e;if(e!=null&&n!=null){let r=document.createRange();return r.setStart(...Array.from(e||[])),r.setEnd(...Array.from(n||[])),r}}getLocationAtPoint(t){let e=this.createDOMRangeFromPoint(t);var n;if(e)return(n=this.createLocationRangeFromDOMRange(e))===null||n===void 0?void 0:n[0]}domRangeWithinElement(t){return t.collapsed?Tt(this.element,t.startContainer):Tt(this.element,t.startContainer)&&Tt(this.element,t.endContainer)}};ut.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),ut.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),ut.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),ut.proxyMethod("pointMapper.createDOMRangeFromPoint"),ut.proxyMethod("pointMapper.getClientRectsForDOMRange");var Xr=Object.freeze({__proto__:null,Attachment:yt,AttachmentManager:Ge,AttachmentPiece:xt,Block:$,Composition:rt,Document:z,Editor:Xe,HTMLParser:Mt,HTMLSanitizer:Kt,LineBreakInsertion:$e,LocationMapper:Ze,ManagedAttachment:E,Piece:mt,PointMapper:Qe,SelectionManager:ut,SplittableList:$t,StringPiece:ve,Text:K,UndoManager:Ae}),Ps=Object.freeze({__proto__:null,ObjectView:gt,AttachmentView:be,BlockView:Je,DocumentView:Gt,PieceView:qe,PreviewableAttachmentView:ze,TextView:He}),{lang:Vn,css:kt,keyNames:Ms}=Ce,zn=function(i){return function(){let t=i.apply(this,arguments);t.do(),this.undos||(this.undos=[]),this.undos.push(t.undo)}},tn=class extends R{constructor(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(...arguments),q(this,"makeElementMutable",zn(()=>({do:()=>{this.element.dataset.trixMutable=!0},undo:()=>delete this.element.dataset.trixMutable}))),q(this,"addToolbar",zn(()=>{let o=p({tagName:"div",className:kt.attachmentToolbar,data:{trixMutable:!0},childNodes:p({tagName:"div",className:"trix-button-row",childNodes:p({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:p({tagName:"button",className:"trix-button trix-button--remove",textContent:Vn.remove,attributes:{title:Vn.remove},data:{trixAction:"remove"}})})})});return this.attachment.isPreviewable()&&o.appendChild(p({tagName:"div",className:kt.attachmentMetadataContainer,childNodes:p({tagName:"span",className:kt.attachmentMetadata,childNodes:[p({tagName:"span",className:kt.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),p({tagName:"span",className:kt.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),S("click",{onElement:o,withCallback:this.didClickToolbar}),S("click",{onElement:o,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),he("trix-attachment-before-toolbar",{onElement:this.element,attributes:{toolbar:o,attachment:this.attachment}}),{do:()=>this.element.appendChild(o),undo:()=>At(o)}})),q(this,"installCaptionEditor",zn(()=>{let o=p({tagName:"textarea",className:kt.attachmentCaptionEditor,attributes:{placeholder:Vn.captionPlaceholder},data:{trixMutable:!0}});o.value=this.attachmentPiece.getCaption();let s=o.cloneNode();s.classList.add("trix-autoresize-clone"),s.tabIndex=-1;let l=function(){s.value=o.value,o.style.height=s.scrollHeight+"px"};S("input",{onElement:o,withCallback:l}),S("input",{onElement:o,withCallback:this.didInputCaption}),S("keydown",{onElement:o,withCallback:this.didKeyDownCaption}),S("change",{onElement:o,withCallback:this.didChangeCaption}),S("blur",{onElement:o,withCallback:this.didBlurCaption});let c=this.element.querySelector("figcaption"),u=c.cloneNode();return{do:()=>{if(c.style.display="none",u.appendChild(o),u.appendChild(s),u.classList.add("".concat(kt.attachmentCaption,"--editing")),c.parentElement.insertBefore(u,c),l(),this.options.editCaption)return Ai(()=>o.focus())},undo(){At(u),c.style.display=null}}})),this.didClickToolbar=this.didClickToolbar.bind(this),this.didClickActionButton=this.didClickActionButton.bind(this),this.didKeyDownCaption=this.didKeyDownCaption.bind(this),this.didInputCaption=this.didInputCaption.bind(this),this.didChangeCaption=this.didChangeCaption.bind(this),this.didBlurCaption=this.didBlurCaption.bind(this),this.attachmentPiece=t,this.element=e,this.container=n,this.options=r,this.attachment=this.attachmentPiece.attachment,j(this.element)==="a"&&(this.element=this.element.firstChild),this.install()}install(){this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()&&this.installCaptionEditor()}uninstall(){var t;let e=this.undos.pop();for(this.savePendingCaption();e;)e(),e=this.undos.pop();(t=this.delegate)===null||t===void 0||t.didUninstallAttachmentEditor(this)}savePendingCaption(){if(this.pendingCaption!=null){let o=this.pendingCaption;var t,e,n,r;this.pendingCaption=null,o?(t=this.delegate)===null||t===void 0||(e=t.attachmentEditorDidRequestUpdatingAttributesForAttachment)===null||e===void 0||e.call(t,{caption:o},this.attachment):(n=this.delegate)===null||n===void 0||(r=n.attachmentEditorDidRequestRemovingAttributeForAttachment)===null||r===void 0||r.call(n,"caption",this.attachment)}}didClickToolbar(t){return t.preventDefault(),t.stopPropagation()}didClickActionButton(t){var e;if(t.target.getAttribute("data-trix-action")==="remove")return(e=this.delegate)===null||e===void 0?void 0:e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)}didKeyDownCaption(t){var e,n;if(Ms[t.keyCode]==="return")return t.preventDefault(),this.savePendingCaption(),(e=this.delegate)===null||e===void 0||(n=e.attachmentEditorDidRequestDeselectingAttachment)===null||n===void 0?void 0:n.call(e,this.attachment)}didInputCaption(t){this.pendingCaption=t.target.value.replace(/\s/g," ").trim()}didChangeCaption(t){return this.savePendingCaption()}didBlurCaption(t){return this.savePendingCaption()}},en=class extends R{constructor(t,e){super(...arguments),this.didFocus=this.didFocus.bind(this),this.didBlur=this.didBlur.bind(this),this.didClickAttachment=this.didClickAttachment.bind(this),this.element=t,this.composition=e,this.documentView=new Gt(this.composition.document,{element:this.element}),S("focus",{onElement:this.element,withCallback:this.didFocus}),S("blur",{onElement:this.element,withCallback:this.didBlur}),S("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),S("mousedown",{onElement:this.element,matchingSelector:wt,withCallback:this.didClickAttachment}),S("click",{onElement:this.element,matchingSelector:"a".concat(wt),preventDefault:!0})}didFocus(t){var e;let n=()=>{var r,o;if(!this.focused)return this.focused=!0,(r=this.delegate)===null||r===void 0||(o=r.compositionControllerDidFocus)===null||o===void 0?void 0:o.call(r)};return((e=this.blurPromise)===null||e===void 0?void 0:e.then(n))||n()}didBlur(t){this.blurPromise=new Promise(e=>Ai(()=>{var n,r;return fi(this.element)||(this.focused=null,(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidBlur)===null||r===void 0||r.call(n)),this.blurPromise=null,e()}))}didClickAttachment(t,e){var n,r;let o=this.findAttachmentForElement(e),s=!!vt(t.target,{matchingSelector:"figcaption"});return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidSelectAttachment)===null||r===void 0?void 0:r.call(n,o,{editCaption:s})}getSerializableElement(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element}render(){var t,e,n,r,o,s;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()&&((n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillSyncDocumentView)===null||r===void 0||r.call(n),this.documentView.sync(),(o=this.delegate)===null||o===void 0||(s=o.compositionControllerDidSyncDocumentView)===null||s===void 0||s.call(o)),(t=this.delegate)===null||t===void 0||(e=t.compositionControllerDidRender)===null||e===void 0?void 0:e.call(t)}rerenderViewForObject(t){return this.invalidateViewForObject(t),this.render()}invalidateViewForObject(t){return this.documentView.invalidateViewForObject(t)}isViewCachingEnabled(){return this.documentView.isViewCachingEnabled()}enableViewCaching(){return this.documentView.enableViewCaching()}disableViewCaching(){return this.documentView.disableViewCaching()}refreshViewCache(){return this.documentView.garbageCollectCachedViews()}isEditingAttachment(){return!!this.attachmentEditor}installAttachmentEditorForAttachment(t,e){var n;if(((n=this.attachmentEditor)===null||n===void 0?void 0:n.attachment)===t)return;let r=this.documentView.findElementForObject(t);if(!r)return;this.uninstallAttachmentEditor();let o=this.composition.document.getAttachmentPieceForAttachment(t);this.attachmentEditor=new tn(o,r,this.element,e),this.attachmentEditor.delegate=this}uninstallAttachmentEditor(){var t;return(t=this.attachmentEditor)===null||t===void 0?void 0:t.uninstall()}didUninstallAttachmentEditor(){return this.attachmentEditor=null,this.render()}attachmentEditorDidRequestUpdatingAttributesForAttachment(t,e){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillUpdateAttachment)===null||r===void 0||r.call(n,e),this.composition.updateAttributesForAttachment(t,e)}attachmentEditorDidRequestRemovingAttributeForAttachment(t,e){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillUpdateAttachment)===null||r===void 0||r.call(n,e),this.composition.removeAttributeForAttachment(t,e)}attachmentEditorDidRequestRemovalOfAttachment(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionControllerDidRequestRemovalOfAttachment)===null||n===void 0?void 0:n.call(e,t)}attachmentEditorDidRequestDeselectingAttachment(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionControllerDidRequestDeselectingAttachment)===null||n===void 0?void 0:n.call(e,t)}canSyncDocumentView(){return!this.isEditingAttachment()}findAttachmentForElement(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))}},nn=class extends R{},Zr="data-trix-mutable",Bs="[".concat(Zr,"]"),_s={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},rn=class extends R{constructor(t){super(t),this.didMutate=this.didMutate.bind(this),this.element=t,this.observer=new window.MutationObserver(this.didMutate),this.start()}start(){return this.reset(),this.observer.observe(this.element,_s)}stop(){return this.observer.disconnect()}didMutate(t){var e,n;if(this.mutations.push(...Array.from(this.findSignificantMutations(t)||[])),this.mutations.length)return(e=this.delegate)===null||e===void 0||(n=e.elementDidMutate)===null||n===void 0||n.call(e,this.getMutationSummary()),this.reset()}reset(){this.mutations=[]}findSignificantMutations(t){return t.filter(e=>this.mutationIsSignificant(e))}mutationIsSignificant(t){if(this.nodeIsMutable(t.target))return!1;for(let e of Array.from(this.nodesModifiedByMutation(t)))if(this.nodeIsSignificant(e))return!0;return!1}nodeIsSignificant(t){return t!==this.element&&!this.nodeIsMutable(t)&&!Or(t)}nodeIsMutable(t){return vt(t,{matchingSelector:Bs})}nodesModifiedByMutation(t){let e=[];switch(t.type){case"attributes":t.attributeName!==Zr&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push(...Array.from(t.addedNodes||[])),e.push(...Array.from(t.removedNodes||[]))}return e}getMutationSummary(){return this.getTextMutationSummary()}getTextMutationSummary(){let{additions:t,deletions:e}=this.getTextChangesFromCharacterData(),n=this.getTextChangesFromChildList();Array.from(n.additions).forEach(l=>{Array.from(t).includes(l)||t.push(l)}),e.push(...Array.from(n.deletions||[]));let r={},o=t.join("");o&&(r.textAdded=o);let s=e.join("");return s&&(r.textDeleted=s),r}getMutationsByType(t){return Array.from(this.mutations).filter(e=>e.type===t)}getTextChangesFromChildList(){let t,e,n=[],r=[];Array.from(this.getMutationsByType("childList")).forEach(l=>{n.push(...Array.from(l.addedNodes||[])),r.push(...Array.from(l.removedNodes||[]))}),n.length===0&&r.length===1&&qt(r[0])?(t=[],e=[` -`]):(t=li(n),e=li(r));let o=t.filter((l,c)=>l!==e[c]).map(ue),s=e.filter((l,c)=>l!==t[c]).map(ue);return{additions:o,deletions:s}}getTextChangesFromCharacterData(){let t,e,n=this.getMutationsByType("characterData");if(n.length){let r=n[0],o=n[n.length-1],s=function(l,c){let u,d;return l=Ot.box(l),(c=Ot.box(c)).length0&&arguments[0]!==void 0?arguments[0]:[],t=[];for(let e of Array.from(i))switch(e.nodeType){case Node.TEXT_NODE:t.push(e.data);break;case Node.ELEMENT_NODE:j(e)==="br"?t.push(` -`):t.push(...Array.from(li(e.childNodes)||[]))}return t},on=class extends Jt{constructor(t){super(...arguments),this.file=t}perform(t){let e=new FileReader;return e.onerror=()=>t(!1),e.onload=()=>{e.onerror=null;try{e.abort()}catch{}return t(!0,this.file)},e.readAsArrayBuffer(this.file)}},ci=class{constructor(t){this.element=t}shouldIgnore(t){return!!xe.samsungAndroid&&(this.previousEvent=this.event,this.event=t,this.checkSamsungKeyboardBuggyModeStart(),this.checkSamsungKeyboardBuggyModeEnd(),this.buggyMode)}checkSamsungKeyboardBuggyModeStart(){this.insertingLongTextAfterUnidentifiedChar()&&js(this.element.innerText,this.event.data)&&(this.buggyMode=!0,this.event.preventDefault())}checkSamsungKeyboardBuggyModeEnd(){this.buggyMode&&this.event.inputType!=="insertText"&&(this.buggyMode=!1)}insertingLongTextAfterUnidentifiedChar(){var t;return this.isBeforeInputInsertText()&&this.previousEventWasUnidentifiedKeydown()&&((t=this.event.data)===null||t===void 0?void 0:t.length)>50}isBeforeInputInsertText(){return this.event.type==="beforeinput"&&this.event.inputType==="insertText"}previousEventWasUnidentifiedKeydown(){var t,e;return((t=this.previousEvent)===null||t===void 0?void 0:t.type)==="keydown"&&((e=this.previousEvent)===null||e===void 0?void 0:e.key)==="Unidentified"}},js=(i,t)=>Sr(i)===Sr(t),Ws=new RegExp("(".concat("\uFFFC","|").concat(ln,"|").concat(bt,"|\\s)+"),"g"),Sr=i=>i.replace(Ws," ").trim(),Yt=class extends R{constructor(t){super(...arguments),this.element=t,this.mutationObserver=new rn(this.element),this.mutationObserver.delegate=this,this.flakyKeyboardDetector=new ci(this.element);for(let e in this.constructor.events)S(e,{onElement:this.element,withCallback:this.handlerFor(e)})}elementDidMutate(t){}editorWillSyncDocumentView(){return this.mutationObserver.stop()}editorDidSyncDocumentView(){return this.mutationObserver.start()}requestRender(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidRequestRender)===null||e===void 0?void 0:e.call(t)}requestReparse(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidRequestReparse)===null||e===void 0||e.call(t),this.requestRender()}attachFiles(t){let e=Array.from(t).map(n=>new on(n));return Promise.all(e).then(n=>{this.handleInput(function(){var r,o;return(r=this.delegate)===null||r===void 0||r.inputControllerWillAttachFiles(),(o=this.responder)===null||o===void 0||o.insertFiles(n),this.requestRender()})})}handlerFor(t){return e=>{e.defaultPrevented||this.handleInput(()=>{if(!fi(this.element)){if(this.flakyKeyboardDetector.shouldIgnore(e))return;this.eventName=t,this.constructor.events[t].call(this,e)}})}}handleInput(t){try{var e;(e=this.delegate)===null||e===void 0||e.inputControllerWillHandleInput(),t.call(this)}finally{var n;(n=this.delegate)===null||n===void 0||n.inputControllerDidHandleInput()}}createLinkHTML(t,e){let n=document.createElement("a");return n.href=t,n.textContent=e||t,n.outerHTML}},qn;q(Yt,"events",{});var{browser:Us,keyNames:Qr}=Ce,Vs=0,Z=class extends Yt{constructor(){super(...arguments),this.resetInputSummary()}setInputSummary(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.inputSummary.eventName=this.eventName;for(let e in t){let n=t[e];this.inputSummary[e]=n}return this.inputSummary}resetInputSummary(){this.inputSummary={}}reset(){return this.resetInputSummary(),Pt.reset()}elementDidMutate(t){var e,n;return this.isComposing()?(e=this.delegate)===null||e===void 0||(n=e.inputControllerDidAllowUnhandledInput)===null||n===void 0?void 0:n.call(e):this.handleInput(function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()})}mutationIsExpected(t){let{textAdded:e,textDeleted:n}=t;if(this.inputSummary.preferDocument)return!0;let r=e!=null?e===this.inputSummary.textAdded:!this.inputSummary.textAdded,o=n!=null?this.inputSummary.didDelete:!this.inputSummary.didDelete,s=[` +`&&(this.document=this.document.insertBlockBreakAtRange(e[0]),e[0]0&&arguments[0]!==void 0?arguments[0]:"",e=Ft.parse(t,{referenceElement:this.element}).getDocument();return this.loadDocument(e)}loadJSON(t){let{document:e,selectedRange:n}=t;return e=V.fromJSON(e),this.loadSnapshot({document:e,selectedRange:n})}loadSnapshot(t){return this.undoManager=new Ae(this.composition),this.composition.loadSnapshot(t)}getDocument(){return this.composition.document}getSelectedDocument(){return this.composition.getSelectedDocument()}getSnapshot(){return this.composition.getSnapshot()}toJSON(){return this.getSnapshot()}deleteInDirection(t){return this.composition.deleteInDirection(t)}insertAttachment(t){return this.composition.insertAttachment(t)}insertAttachments(t){return this.composition.insertAttachments(t)}insertDocument(t){return this.composition.insertDocument(t)}insertFile(t){return this.composition.insertFile(t)}insertFiles(t){return this.composition.insertFiles(t)}insertHTML(t){return this.composition.insertHTML(t)}insertString(t){return this.composition.insertString(t)}insertText(t){return this.composition.insertText(t)}insertLineBreak(){return this.composition.insertLineBreak()}getSelectedRange(){return this.composition.getSelectedRange()}getPosition(){return this.composition.getPosition()}getClientRectAtPosition(t){let e=this.getDocument().locationRangeFromRange([t,t+1]);return this.selectionManager.getClientRectAtLocationRange(e)}expandSelectionInDirection(t){return this.composition.expandSelectionInDirection(t)}moveCursorInDirection(t){return this.composition.moveCursorInDirection(t)}setSelectedRange(t){return this.composition.setSelectedRange(t)}activateAttribute(t){let e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this.composition.setCurrentAttribute(t,e)}attributeIsActive(t){return this.composition.hasCurrentAttribute(t)}canActivateAttribute(t){return this.composition.canSetCurrentAttribute(t)}deactivateAttribute(t){return this.composition.removeCurrentAttribute(t)}setHTMLAtributeAtPosition(t,e,n){this.composition.setHTMLAtributeAtPosition(t,e,n)}canDecreaseNestingLevel(){return this.composition.canDecreaseNestingLevel()}canIncreaseNestingLevel(){return this.composition.canIncreaseNestingLevel()}decreaseNestingLevel(){if(this.canDecreaseNestingLevel())return this.composition.decreaseNestingLevel()}increaseNestingLevel(){if(this.canIncreaseNestingLevel())return this.composition.increaseNestingLevel()}canRedo(){return this.undoManager.canRedo()}canUndo(){return this.undoManager.canUndo()}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.undoManager.recordUndoEntry(t,{context:e,consolidatable:n})}redo(){if(this.canRedo())return this.undoManager.redo()}undo(){if(this.canUndo())return this.undoManager.undo()}},Ze=class{constructor(t){this.element=t}findLocationFromContainerAndOffset(t,e){let{strict:n}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{strict:!0},r=0,o=!1,s={index:0,offset:0},l=this.findAttachmentElementParentForNode(t);l&&(t=l.parentNode,e=kn(l));let c=je(this.element,{usingFilter:Yr});for(;c.nextNode();){let u=c.currentNode;if(u===t&&ge(t)){zt(u)||(s.offset+=e);break}if(u.parentNode===t){if(r++===e)break}else if(!kt(t,u)&&r>0)break;Yi(u,{strict:n})?(o&&s.index++,s.offset=0,o=!0):s.offset+=Un(u)}return s}findContainerAndOffsetFromLocation(t){let e,n;if(t.index===0&&t.offset===0){for(e=this.element,n=0;e.firstChild;)if(e=e.firstChild,Rn(e)){n=1;break}return[e,n]}let[r,o]=this.findNodeAndOffsetFromLocation(t);if(r){if(ge(r))Un(r)===0?(e=r.parentNode.parentNode,n=kn(r.parentNode),zt(r,{name:"right"})&&n++):(e=r,n=t.offset-o);else{if(e=r.parentNode,!Yi(r.previousSibling)&&!Rn(e))for(;r===e.lastChild&&(r=e,e=e.parentNode,!Rn(e)););n=kn(r),t.offset!==0&&n++}return[e,n]}}findNodeAndOffsetFromLocation(t){let e,n,r=0;for(let o of this.getSignificantNodesForIndex(t.index)){let s=Un(o);if(t.offset<=r+s)if(ge(o)){if(e=o,n=r,t.offset===n&&zt(e))break}else e||(e=o,n=r);if(r+=s,r>t.offset)break}return[e,n]}findAttachmentElementParentForNode(t){for(;t&&t!==this.element;){if(Tt(t))return t;t=t.parentNode}}getSignificantNodesForIndex(t){let e=[],n=je(this.element,{usingFilter:Os}),r=!1;for(;n.nextNode();){let s=n.currentNode;var o;if(Vt(s)){if(o!=null?o++:o=0,o===t)r=!0;else if(r)break}else r&&e.push(s)}return e}},Un=function(i){return i.nodeType===Node.TEXT_NODE?zt(i)?0:i.textContent.length:j(i)==="br"||Tt(i)?1:0},Os=function(i){return Fs(i)===NodeFilter.FILTER_ACCEPT?Yr(i):NodeFilter.FILTER_REJECT},Fs=function(i){return Or(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Yr=function(i){return Tt(i.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Qe=class{createDOMRangeFromPoint(t){let e,{x:n,y:r}=t;if(document.caretPositionFromPoint){let{offsetNode:o,offset:s}=document.caretPositionFromPoint(n,r);return e=document.createRange(),e.setStart(o,s),e}if(document.caretRangeFromPoint)return document.caretRangeFromPoint(n,r);if(document.body.createTextRange){let o=me();try{let s=document.body.createTextRange();s.moveToPoint(n,r),s.select()}catch{}return e=me(),Wr(o),e}}getClientRectsForDOMRange(t){let e=Array.from(t.getClientRects());return[e[0],e[e.length-1]]}},ct=class extends R{constructor(t){super(...arguments),this.didMouseDown=this.didMouseDown.bind(this),this.selectionDidChange=this.selectionDidChange.bind(this),this.element=t,this.locationMapper=new Ze(this.element),this.pointMapper=new Qe,this.lockCount=0,S("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}getLocationRange(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.strict===!1?this.createLocationRangeFromDOMRange(me()):t.ignoreLock?this.currentLocationRange:this.lockedLocationRange?this.lockedLocationRange:this.currentLocationRange}setLocationRange(t){if(this.lockedLocationRange)return;t=y(t);let e=this.createDOMRangeFromLocationRange(t);e&&(Wr(e),this.updateCurrentLocationRange(t))}setLocationRangeFromPointRange(t){t=y(t);let e=this.getLocationAtPoint(t[0]),n=this.getLocationAtPoint(t[1]);this.setLocationRange([e,n])}getClientRectAtLocationRange(t){let e=this.createDOMRangeFromLocationRange(t);if(e)return this.getClientRectsForDOMRange(e)[1]}locationIsCursorTarget(t){let e=Array.from(this.findNodeAndOffsetFromLocation(t))[0];return zt(e)}lock(){this.lockCount++==0&&(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange())}unlock(){if(--this.lockCount==0){let{lockedLocationRange:t}=this;if(this.lockedLocationRange=null,t!=null)return this.setLocationRange(t)}}clearSelection(){var t;return(t=jr())===null||t===void 0?void 0:t.removeAllRanges()}selectionIsCollapsed(){var t;return((t=me())===null||t===void 0?void 0:t.collapsed)===!0}selectionIsExpanded(){return!this.selectionIsCollapsed()}createLocationRangeFromDOMRange(t,e){if(t==null||!this.domRangeWithinElement(t))return;let n=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e);if(!n)return;let r=t.collapsed?void 0:this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e);return y([n,r])}didMouseDown(){return this.pauseTemporarily()}pauseTemporarily(){let t;this.paused=!0;let e=()=>{if(this.paused=!1,clearTimeout(n),Array.from(t).forEach(r=>{r.destroy()}),kt(document,this.element))return this.selectionDidChange()},n=setTimeout(e,200);t=["mousemove","keydown"].map(r=>S(r,{onElement:document,withCallback:e}))}selectionDidChange(){if(!this.paused&&!fi(this.element))return this.updateCurrentLocationRange()}updateCurrentLocationRange(t){var e,n;if((t??(t=this.createLocationRangeFromDOMRange(me())))&&!We(t,this.currentLocationRange))return this.currentLocationRange=t,(e=this.delegate)===null||e===void 0||(n=e.locationRangeDidChange)===null||n===void 0?void 0:n.call(e,this.currentLocationRange.slice(0))}createDOMRangeFromLocationRange(t){let e=this.findContainerAndOffsetFromLocation(t[0]),n=ut(t)?e:this.findContainerAndOffsetFromLocation(t[1])||e;if(e!=null&&n!=null){let r=document.createRange();return r.setStart(...Array.from(e||[])),r.setEnd(...Array.from(n||[])),r}}getLocationAtPoint(t){let e=this.createDOMRangeFromPoint(t);var n;if(e)return(n=this.createLocationRangeFromDOMRange(e))===null||n===void 0?void 0:n[0]}domRangeWithinElement(t){return t.collapsed?kt(this.element,t.startContainer):kt(this.element,t.startContainer)&&kt(this.element,t.endContainer)}};ct.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),ct.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),ct.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),ct.proxyMethod("pointMapper.createDOMRangeFromPoint"),ct.proxyMethod("pointMapper.getClientRectsForDOMRange");var Xr=Object.freeze({__proto__:null,Attachment:Kt,AttachmentManager:Ge,AttachmentPiece:Gt,Block:bt,Composition:it,Document:V,Editor:Xe,HTMLParser:Ft,HTMLSanitizer:qt,LineBreakInsertion:$e,LocationMapper:Ze,ManagedAttachment:E,Piece:gt,PointMapper:Qe,SelectionManager:ct,SplittableList:$t,StringPiece:ve,Text:J,UndoManager:Ae}),Ps=Object.freeze({__proto__:null,ObjectView:dt,AttachmentView:be,BlockView:Je,DocumentView:Jt,PieceView:He,PreviewableAttachmentView:ze,TextView:qe}),{lang:Vn,css:Et,keyNames:Ms}=Ce,zn=function(i){return function(){let t=i.apply(this,arguments);t.do(),this.undos||(this.undos=[]),this.undos.push(t.undo)}},tn=class extends R{constructor(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(...arguments),z(this,"makeElementMutable",zn(()=>({do:()=>{this.element.dataset.trixMutable=!0},undo:()=>delete this.element.dataset.trixMutable}))),z(this,"addToolbar",zn(()=>{let o=p({tagName:"div",className:Et.attachmentToolbar,data:{trixMutable:!0},childNodes:p({tagName:"div",className:"trix-button-row",childNodes:p({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:p({tagName:"button",className:"trix-button trix-button--remove",textContent:Vn.remove,attributes:{title:Vn.remove},data:{trixAction:"remove"}})})})});return this.attachment.isPreviewable()&&o.appendChild(p({tagName:"div",className:Et.attachmentMetadataContainer,childNodes:p({tagName:"span",className:Et.attachmentMetadata,childNodes:[p({tagName:"span",className:Et.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),p({tagName:"span",className:Et.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),S("click",{onElement:o,withCallback:this.didClickToolbar}),S("click",{onElement:o,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),he("trix-attachment-before-toolbar",{onElement:this.element,attributes:{toolbar:o,attachment:this.attachment}}),{do:()=>this.element.appendChild(o),undo:()=>At(o)}})),z(this,"installCaptionEditor",zn(()=>{let o=p({tagName:"textarea",className:Et.attachmentCaptionEditor,attributes:{placeholder:Vn.captionPlaceholder},data:{trixMutable:!0}});o.value=this.attachmentPiece.getCaption();let s=o.cloneNode();s.classList.add("trix-autoresize-clone"),s.tabIndex=-1;let l=function(){s.value=o.value,o.style.height=s.scrollHeight+"px"};S("input",{onElement:o,withCallback:l}),S("input",{onElement:o,withCallback:this.didInputCaption}),S("keydown",{onElement:o,withCallback:this.didKeyDownCaption}),S("change",{onElement:o,withCallback:this.didChangeCaption}),S("blur",{onElement:o,withCallback:this.didBlurCaption});let c=this.element.querySelector("figcaption"),u=c.cloneNode();return{do:()=>{if(c.style.display="none",u.appendChild(o),u.appendChild(s),u.classList.add("".concat(Et.attachmentCaption,"--editing")),c.parentElement.insertBefore(u,c),l(),this.options.editCaption)return Ai(()=>o.focus())},undo(){At(u),c.style.display=null}}})),this.didClickToolbar=this.didClickToolbar.bind(this),this.didClickActionButton=this.didClickActionButton.bind(this),this.didKeyDownCaption=this.didKeyDownCaption.bind(this),this.didInputCaption=this.didInputCaption.bind(this),this.didChangeCaption=this.didChangeCaption.bind(this),this.didBlurCaption=this.didBlurCaption.bind(this),this.attachmentPiece=t,this.element=e,this.container=n,this.options=r,this.attachment=this.attachmentPiece.attachment,j(this.element)==="a"&&(this.element=this.element.firstChild),this.install()}install(){this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()&&this.installCaptionEditor()}uninstall(){var t;let e=this.undos.pop();for(this.savePendingCaption();e;)e(),e=this.undos.pop();(t=this.delegate)===null||t===void 0||t.didUninstallAttachmentEditor(this)}savePendingCaption(){if(this.pendingCaption!=null){let o=this.pendingCaption;var t,e,n,r;this.pendingCaption=null,o?(t=this.delegate)===null||t===void 0||(e=t.attachmentEditorDidRequestUpdatingAttributesForAttachment)===null||e===void 0||e.call(t,{caption:o},this.attachment):(n=this.delegate)===null||n===void 0||(r=n.attachmentEditorDidRequestRemovingAttributeForAttachment)===null||r===void 0||r.call(n,"caption",this.attachment)}}didClickToolbar(t){return t.preventDefault(),t.stopPropagation()}didClickActionButton(t){var e;if(t.target.getAttribute("data-trix-action")==="remove")return(e=this.delegate)===null||e===void 0?void 0:e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)}didKeyDownCaption(t){var e,n;if(Ms[t.keyCode]==="return")return t.preventDefault(),this.savePendingCaption(),(e=this.delegate)===null||e===void 0||(n=e.attachmentEditorDidRequestDeselectingAttachment)===null||n===void 0?void 0:n.call(e,this.attachment)}didInputCaption(t){this.pendingCaption=t.target.value.replace(/\s/g," ").trim()}didChangeCaption(t){return this.savePendingCaption()}didBlurCaption(t){return this.savePendingCaption()}},en=class extends R{constructor(t,e){super(...arguments),this.didFocus=this.didFocus.bind(this),this.didBlur=this.didBlur.bind(this),this.didClickAttachment=this.didClickAttachment.bind(this),this.element=t,this.composition=e,this.documentView=new Jt(this.composition.document,{element:this.element}),S("focus",{onElement:this.element,withCallback:this.didFocus}),S("blur",{onElement:this.element,withCallback:this.didBlur}),S("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),S("mousedown",{onElement:this.element,matchingSelector:Rt,withCallback:this.didClickAttachment}),S("click",{onElement:this.element,matchingSelector:"a".concat(Rt),preventDefault:!0})}didFocus(t){var e;let n=()=>{var r,o;if(!this.focused)return this.focused=!0,(r=this.delegate)===null||r===void 0||(o=r.compositionControllerDidFocus)===null||o===void 0?void 0:o.call(r)};return((e=this.blurPromise)===null||e===void 0?void 0:e.then(n))||n()}didBlur(t){this.blurPromise=new Promise(e=>Ai(()=>{var n,r;return fi(this.element)||(this.focused=null,(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidBlur)===null||r===void 0||r.call(n)),this.blurPromise=null,e()}))}didClickAttachment(t,e){var n,r;let o=this.findAttachmentForElement(e),s=!!vt(t.target,{matchingSelector:"figcaption"});return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidSelectAttachment)===null||r===void 0?void 0:r.call(n,o,{editCaption:s})}getSerializableElement(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element}render(){var t,e,n,r,o,s;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()&&((n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillSyncDocumentView)===null||r===void 0||r.call(n),this.documentView.sync(),(o=this.delegate)===null||o===void 0||(s=o.compositionControllerDidSyncDocumentView)===null||s===void 0||s.call(o)),(t=this.delegate)===null||t===void 0||(e=t.compositionControllerDidRender)===null||e===void 0?void 0:e.call(t)}rerenderViewForObject(t){return this.invalidateViewForObject(t),this.render()}invalidateViewForObject(t){return this.documentView.invalidateViewForObject(t)}isViewCachingEnabled(){return this.documentView.isViewCachingEnabled()}enableViewCaching(){return this.documentView.enableViewCaching()}disableViewCaching(){return this.documentView.disableViewCaching()}refreshViewCache(){return this.documentView.garbageCollectCachedViews()}isEditingAttachment(){return!!this.attachmentEditor}installAttachmentEditorForAttachment(t,e){var n;if(((n=this.attachmentEditor)===null||n===void 0?void 0:n.attachment)===t)return;let r=this.documentView.findElementForObject(t);if(!r)return;this.uninstallAttachmentEditor();let o=this.composition.document.getAttachmentPieceForAttachment(t);this.attachmentEditor=new tn(o,r,this.element,e),this.attachmentEditor.delegate=this}uninstallAttachmentEditor(){var t;return(t=this.attachmentEditor)===null||t===void 0?void 0:t.uninstall()}didUninstallAttachmentEditor(){return this.attachmentEditor=null,this.render()}attachmentEditorDidRequestUpdatingAttributesForAttachment(t,e){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillUpdateAttachment)===null||r===void 0||r.call(n,e),this.composition.updateAttributesForAttachment(t,e)}attachmentEditorDidRequestRemovingAttributeForAttachment(t,e){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillUpdateAttachment)===null||r===void 0||r.call(n,e),this.composition.removeAttributeForAttachment(t,e)}attachmentEditorDidRequestRemovalOfAttachment(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionControllerDidRequestRemovalOfAttachment)===null||n===void 0?void 0:n.call(e,t)}attachmentEditorDidRequestDeselectingAttachment(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionControllerDidRequestDeselectingAttachment)===null||n===void 0?void 0:n.call(e,t)}canSyncDocumentView(){return!this.isEditingAttachment()}findAttachmentForElement(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))}},nn=class extends R{},Zr="data-trix-mutable",Bs="[".concat(Zr,"]"),_s={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},rn=class extends R{constructor(t){super(t),this.didMutate=this.didMutate.bind(this),this.element=t,this.observer=new window.MutationObserver(this.didMutate),this.start()}start(){return this.reset(),this.observer.observe(this.element,_s)}stop(){return this.observer.disconnect()}didMutate(t){var e,n;if(this.mutations.push(...Array.from(this.findSignificantMutations(t)||[])),this.mutations.length)return(e=this.delegate)===null||e===void 0||(n=e.elementDidMutate)===null||n===void 0||n.call(e,this.getMutationSummary()),this.reset()}reset(){this.mutations=[]}findSignificantMutations(t){return t.filter(e=>this.mutationIsSignificant(e))}mutationIsSignificant(t){if(this.nodeIsMutable(t.target))return!1;for(let e of Array.from(this.nodesModifiedByMutation(t)))if(this.nodeIsSignificant(e))return!0;return!1}nodeIsSignificant(t){return t!==this.element&&!this.nodeIsMutable(t)&&!Or(t)}nodeIsMutable(t){return vt(t,{matchingSelector:Bs})}nodesModifiedByMutation(t){let e=[];switch(t.type){case"attributes":t.attributeName!==Zr&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push(...Array.from(t.addedNodes||[])),e.push(...Array.from(t.removedNodes||[]))}return e}getMutationSummary(){return this.getTextMutationSummary()}getTextMutationSummary(){let{additions:t,deletions:e}=this.getTextChangesFromCharacterData(),n=this.getTextChangesFromChildList();Array.from(n.additions).forEach(l=>{Array.from(t).includes(l)||t.push(l)}),e.push(...Array.from(n.deletions||[]));let r={},o=t.join("");o&&(r.textAdded=o);let s=e.join("");return s&&(r.textDeleted=s),r}getMutationsByType(t){return Array.from(this.mutations).filter(e=>e.type===t)}getTextChangesFromChildList(){let t,e,n=[],r=[];Array.from(this.getMutationsByType("childList")).forEach(l=>{n.push(...Array.from(l.addedNodes||[])),r.push(...Array.from(l.removedNodes||[]))}),n.length===0&&r.length===1&&Vt(r[0])?(t=[],e=[` +`]):(t=li(n),e=li(r));let o=t.filter((l,c)=>l!==e[c]).map(ue),s=e.filter((l,c)=>l!==t[c]).map(ue);return{additions:o,deletions:s}}getTextChangesFromCharacterData(){let t,e,n=this.getMutationsByType("characterData");if(n.length){let r=n[0],o=n[n.length-1],s=function(l,c){let u,d;return l=Nt.box(l),(c=Nt.box(c)).length0&&arguments[0]!==void 0?arguments[0]:[],t=[];for(let e of Array.from(i))switch(e.nodeType){case Node.TEXT_NODE:t.push(e.data);break;case Node.ELEMENT_NODE:j(e)==="br"?t.push(` +`):t.push(...Array.from(li(e.childNodes)||[]))}return t},on=class extends Ht{constructor(t){super(...arguments),this.file=t}perform(t){let e=new FileReader;return e.onerror=()=>t(!1),e.onload=()=>{e.onerror=null;try{e.abort()}catch{}return t(!0,this.file)},e.readAsArrayBuffer(this.file)}},ci=class{constructor(t){this.element=t}shouldIgnore(t){return!!xe.samsungAndroid&&(this.previousEvent=this.event,this.event=t,this.checkSamsungKeyboardBuggyModeStart(),this.checkSamsungKeyboardBuggyModeEnd(),this.buggyMode)}checkSamsungKeyboardBuggyModeStart(){this.insertingLongTextAfterUnidentifiedChar()&&js(this.element.innerText,this.event.data)&&(this.buggyMode=!0,this.event.preventDefault())}checkSamsungKeyboardBuggyModeEnd(){this.buggyMode&&this.event.inputType!=="insertText"&&(this.buggyMode=!1)}insertingLongTextAfterUnidentifiedChar(){var t;return this.isBeforeInputInsertText()&&this.previousEventWasUnidentifiedKeydown()&&((t=this.event.data)===null||t===void 0?void 0:t.length)>50}isBeforeInputInsertText(){return this.event.type==="beforeinput"&&this.event.inputType==="insertText"}previousEventWasUnidentifiedKeydown(){var t,e;return((t=this.previousEvent)===null||t===void 0?void 0:t.type)==="keydown"&&((e=this.previousEvent)===null||e===void 0?void 0:e.key)==="Unidentified"}},js=(i,t)=>Sr(i)===Sr(t),Ws=new RegExp("(".concat("\uFFFC","|").concat(ln,"|").concat(ft,"|\\s)+"),"g"),Sr=i=>i.replace(Ws," ").trim(),Yt=class extends R{constructor(t){super(...arguments),this.element=t,this.mutationObserver=new rn(this.element),this.mutationObserver.delegate=this,this.flakyKeyboardDetector=new ci(this.element);for(let e in this.constructor.events)S(e,{onElement:this.element,withCallback:this.handlerFor(e)})}elementDidMutate(t){}editorWillSyncDocumentView(){return this.mutationObserver.stop()}editorDidSyncDocumentView(){return this.mutationObserver.start()}requestRender(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidRequestRender)===null||e===void 0?void 0:e.call(t)}requestReparse(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidRequestReparse)===null||e===void 0||e.call(t),this.requestRender()}attachFiles(t){let e=Array.from(t).map(n=>new on(n));return Promise.all(e).then(n=>{this.handleInput(function(){var r,o;return(r=this.delegate)===null||r===void 0||r.inputControllerWillAttachFiles(),(o=this.responder)===null||o===void 0||o.insertFiles(n),this.requestRender()})})}handlerFor(t){return e=>{e.defaultPrevented||this.handleInput(()=>{if(!fi(this.element)){if(this.flakyKeyboardDetector.shouldIgnore(e))return;this.eventName=t,this.constructor.events[t].call(this,e)}})}}handleInput(t){try{var e;(e=this.delegate)===null||e===void 0||e.inputControllerWillHandleInput(),t.call(this)}finally{var n;(n=this.delegate)===null||n===void 0||n.inputControllerDidHandleInput()}}createLinkHTML(t,e){let n=document.createElement("a");return n.href=t,n.textContent=e||t,n.outerHTML}},Hn;z(Yt,"events",{});var{browser:Us,keyNames:Qr}=Ce,Vs=0,Y=class extends Yt{constructor(){super(...arguments),this.resetInputSummary()}setInputSummary(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.inputSummary.eventName=this.eventName;for(let e in t){let n=t[e];this.inputSummary[e]=n}return this.inputSummary}resetInputSummary(){this.inputSummary={}}reset(){return this.resetInputSummary(),Ot.reset()}elementDidMutate(t){var e,n;return this.isComposing()?(e=this.delegate)===null||e===void 0||(n=e.inputControllerDidAllowUnhandledInput)===null||n===void 0?void 0:n.call(e):this.handleInput(function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()})}mutationIsExpected(t){let{textAdded:e,textDeleted:n}=t;if(this.inputSummary.preferDocument)return!0;let r=e!=null?e===this.inputSummary.textAdded:!this.inputSummary.textAdded,o=n!=null?this.inputSummary.didDelete:!this.inputSummary.didDelete,s=[` `,` `].includes(e)&&!r,l=n===` -`&&!o;if(s&&!l||l&&!s){let u=this.getSelectedRange();if(u){var c;let d=s?e.replace(/\n$/,"").length||-1:e?.length||1;if((c=this.responder)!==null&&c!==void 0&&c.positionIsBlockBreak(u[1]+d))return!0}}return r&&o}mutationIsSignificant(t){var e;let n=Object.keys(t).length>0,r=((e=this.compositionInput)===null||e===void 0?void 0:e.getEndData())==="";return n||!r}getCompositionInput(){if(this.isComposing())return this.compositionInput;this.compositionInput=new it(this)}isComposing(){return this.compositionInput&&!this.compositionInput.isEnded()}deleteInDirection(t,e){var n;return((n=this.responder)===null||n===void 0?void 0:n.deleteInDirection(t))!==!1?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0}serializeSelectionToDataTransfer(t){var e;if(!function(r){if(r==null||!r.setData)return!1;for(let o in Qi){let s=Qi[o];try{if(r.setData(o,s),!r.getData(o)===s)return!1}catch{return!1}}return!0}(t))return;let n=(e=this.responder)===null||e===void 0?void 0:e.getSelectedDocument().toSerializableDocument();return t.setData("application/x-trix-document",JSON.stringify(n)),t.setData("text/html",Gt.render(n).innerHTML),t.setData("text/plain",n.toString().replace(/\n$/,"")),!0}canAcceptDataTransfer(t){let e={};return Array.from(t?.types||[]).forEach(n=>{e[n]=!0}),e.Files||e["application/x-trix-document"]||e["text/html"]||e["text/plain"]}getPastedHTMLUsingHiddenElement(t){let e=this.getSelectedRange(),n={position:"absolute",left:"".concat(window.pageXOffset,"px"),top:"".concat(window.pageYOffset,"px"),opacity:0},r=p({style:n,tagName:"div",editable:!0});return document.body.appendChild(r),r.focus(),requestAnimationFrame(()=>{let o=r.innerHTML;return At(r),this.setSelectedRange(e),t(o)})}};q(Z,"events",{keydown(i){this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0;let t=Qr[i.keyCode];if(t){var e;let r=this.keys;["ctrl","alt","shift","meta"].forEach(o=>{var s;i["".concat(o,"Key")]&&(o==="ctrl"&&(o="control"),r=(s=r)===null||s===void 0?void 0:s[o])}),((e=r)===null||e===void 0?void 0:e[t])!=null&&(this.setInputSummary({keyName:t}),Pt.reset(),r[t].call(this,i))}if(Br(i)){let r=String.fromCharCode(i.keyCode).toLowerCase();if(r){var n;let o=["alt","shift"].map(s=>{if(i["".concat(s,"Key")])return s}).filter(s=>s);o.push(r),(n=this.delegate)!==null&&n!==void 0&&n.inputControllerDidReceiveKeyboardCommand(o)&&i.preventDefault()}}},keypress(i){if(this.inputSummary.eventName!=null||i.metaKey||i.ctrlKey&&!i.altKey)return;let t=Hs(i);var e,n;return t?((e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.insertString(t),this.setInputSummary({textAdded:t,didDelete:this.selectionIsExpanded()})):void 0},textInput(i){let{data:t}=i,{textAdded:e}=this.inputSummary;if(e&&e!==t&&e.toUpperCase()===t){var n;let r=this.getSelectedRange();return this.setSelectedRange([r[0],r[1]+e.length]),(n=this.responder)===null||n===void 0||n.insertString(t),this.setInputSummary({textAdded:t}),this.setSelectedRange(r)}},dragenter(i){i.preventDefault()},dragstart(i){var t,e;return this.serializeSelectionToDataTransfer(i.dataTransfer),this.draggedRange=this.getSelectedRange(),(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidStartDrag)===null||e===void 0?void 0:e.call(t)},dragover(i){if(this.draggedRange||this.canAcceptDataTransfer(i.dataTransfer)){i.preventDefault();let n={x:i.clientX,y:i.clientY};var t,e;if(!Xt(n,this.draggingPoint))return this.draggingPoint=n,(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidReceiveDragOverPoint)===null||e===void 0?void 0:e.call(t,this.draggingPoint)}},dragend(i){var t,e;(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidCancelDrag)===null||e===void 0||e.call(t),this.draggedRange=null,this.draggingPoint=null},drop(i){var t,e;i.preventDefault();let n=(t=i.dataTransfer)===null||t===void 0?void 0:t.files,r=i.dataTransfer.getData("application/x-trix-document"),o={x:i.clientX,y:i.clientY};if((e=this.responder)===null||e===void 0||e.setLocationRangeFromPointRange(o),n!=null&&n.length)this.attachFiles(n);else if(this.draggedRange){var s,l;(s=this.delegate)===null||s===void 0||s.inputControllerWillMoveText(),(l=this.responder)===null||l===void 0||l.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()}else if(r){var c;let u=z.fromJSONString(r);(c=this.responder)===null||c===void 0||c.insertDocument(u),this.requestRender()}this.draggedRange=null,this.draggingPoint=null},cut(i){var t,e;if((t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&(this.serializeSelectionToDataTransfer(i.clipboardData)&&i.preventDefault(),(e=this.delegate)===null||e===void 0||e.inputControllerWillCutText(),this.deleteInDirection("backward"),i.defaultPrevented))return this.requestRender()},copy(i){var t;(t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&this.serializeSelectionToDataTransfer(i.clipboardData)&&i.preventDefault()},paste(i){let t=i.clipboardData||i.testClipboardData,e={clipboard:t};if(!t||Js(i))return void this.getPastedHTMLUsingHiddenElement(F=>{var k,ot,Et;return e.type="text/html",e.html=F,(k=this.delegate)===null||k===void 0||k.inputControllerWillPaste(e),(ot=this.responder)===null||ot===void 0||ot.insertHTML(e.html),this.requestRender(),(Et=this.delegate)===null||Et===void 0?void 0:Et.inputControllerDidPaste(e)});let n=t.getData("URL"),r=t.getData("text/html"),o=t.getData("public.url-name");if(n){var s,l,c;let F;e.type="text/html",F=o?xi(o).trim():n,e.html=this.createLinkHTML(n,F),(s=this.delegate)===null||s===void 0||s.inputControllerWillPaste(e),this.setInputSummary({textAdded:F,didDelete:this.selectionIsExpanded()}),(l=this.responder)===null||l===void 0||l.insertHTML(e.html),this.requestRender(),(c=this.delegate)===null||c===void 0||c.inputControllerDidPaste(e)}else if(Mr(t)){var u,d,C;e.type="text/plain",e.string=t.getData("text/plain"),(u=this.delegate)===null||u===void 0||u.inputControllerWillPaste(e),this.setInputSummary({textAdded:e.string,didDelete:this.selectionIsExpanded()}),(d=this.responder)===null||d===void 0||d.insertString(e.string),this.requestRender(),(C=this.delegate)===null||C===void 0||C.inputControllerDidPaste(e)}else if(r){var T,H,tt;e.type="text/html",e.html=r,(T=this.delegate)===null||T===void 0||T.inputControllerWillPaste(e),(H=this.responder)===null||H===void 0||H.insertHTML(e.html),this.requestRender(),(tt=this.delegate)===null||tt===void 0||tt.inputControllerDidPaste(e)}else if(Array.from(t.types).includes("Files")){var M,pt;let F=(M=t.items)===null||M===void 0||(M=M[0])===null||M===void 0||(pt=M.getAsFile)===null||pt===void 0?void 0:pt.call(M);if(F){var Ct,Zt,Qt;let k=zs(F);!F.name&&k&&(F.name="pasted-file-".concat(++Vs,".").concat(k)),e.type="File",e.file=F,(Ct=this.delegate)===null||Ct===void 0||Ct.inputControllerWillAttachFiles(),(Zt=this.responder)===null||Zt===void 0||Zt.insertFile(e.file),this.requestRender(),(Qt=this.delegate)===null||Qt===void 0||Qt.inputControllerDidPaste(e)}}i.preventDefault()},compositionstart(i){return this.getCompositionInput().start(i.data)},compositionupdate(i){return this.getCompositionInput().update(i.data)},compositionend(i){return this.getCompositionInput().end(i.data)},beforeinput(i){this.inputSummary.didInput=!0},input(i){return this.inputSummary.didInput=!0,i.stopPropagation()}}),q(Z,"keys",{backspace(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",i)},delete(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",i)},return(i){var t,e;return this.setInputSummary({preferDocument:!0}),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0?void 0:e.insertLineBreak()},tab(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.canIncreaseNestingLevel()&&((e=this.responder)===null||e===void 0||e.increaseNestingLevel(),this.requestRender(),i.preventDefault())},left(i){var t;if(this.selectionIsInCursorTarget())return i.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},right(i){var t;if(this.selectionIsInCursorTarget())return i.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},control:{d(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",i)},h(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",i)},o(i){var t,e;return i.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.insertString(` +`&&!o;if(s&&!l||l&&!s){let u=this.getSelectedRange();if(u){var c;let d=s?e.replace(/\n$/,"").length||-1:e?.length||1;if((c=this.responder)!==null&&c!==void 0&&c.positionIsBlockBreak(u[1]+d))return!0}}return r&&o}mutationIsSignificant(t){var e;let n=Object.keys(t).length>0,r=((e=this.compositionInput)===null||e===void 0?void 0:e.getEndData())==="";return n||!r}getCompositionInput(){if(this.isComposing())return this.compositionInput;this.compositionInput=new nt(this)}isComposing(){return this.compositionInput&&!this.compositionInput.isEnded()}deleteInDirection(t,e){var n;return((n=this.responder)===null||n===void 0?void 0:n.deleteInDirection(t))!==!1?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0}serializeSelectionToDataTransfer(t){var e;if(!function(r){if(r==null||!r.setData)return!1;for(let o in Qi){let s=Qi[o];try{if(r.setData(o,s),!r.getData(o)===s)return!1}catch{return!1}}return!0}(t))return;let n=(e=this.responder)===null||e===void 0?void 0:e.getSelectedDocument().toSerializableDocument();return t.setData("application/x-trix-document",JSON.stringify(n)),t.setData("text/html",Jt.render(n).innerHTML),t.setData("text/plain",n.toString().replace(/\n$/,"")),!0}canAcceptDataTransfer(t){let e={};return Array.from(t?.types||[]).forEach(n=>{e[n]=!0}),e.Files||e["application/x-trix-document"]||e["text/html"]||e["text/plain"]}getPastedHTMLUsingHiddenElement(t){let e=this.getSelectedRange(),n={position:"absolute",left:"".concat(window.pageXOffset,"px"),top:"".concat(window.pageYOffset,"px"),opacity:0},r=p({style:n,tagName:"div",editable:!0});return document.body.appendChild(r),r.focus(),requestAnimationFrame(()=>{let o=r.innerHTML;return At(r),this.setSelectedRange(e),t(o)})}};z(Y,"events",{keydown(i){this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0;let t=Qr[i.keyCode];if(t){var e;let r=this.keys;["ctrl","alt","shift","meta"].forEach(o=>{var s;i["".concat(o,"Key")]&&(o==="ctrl"&&(o="control"),r=(s=r)===null||s===void 0?void 0:s[o])}),((e=r)===null||e===void 0?void 0:e[t])!=null&&(this.setInputSummary({keyName:t}),Ot.reset(),r[t].call(this,i))}if(Br(i)){let r=String.fromCharCode(i.keyCode).toLowerCase();if(r){var n;let o=["alt","shift"].map(s=>{if(i["".concat(s,"Key")])return s}).filter(s=>s);o.push(r),(n=this.delegate)!==null&&n!==void 0&&n.inputControllerDidReceiveKeyboardCommand(o)&&i.preventDefault()}}},keypress(i){if(this.inputSummary.eventName!=null||i.metaKey||i.ctrlKey&&!i.altKey)return;let t=qs(i);var e,n;return t?((e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.insertString(t),this.setInputSummary({textAdded:t,didDelete:this.selectionIsExpanded()})):void 0},textInput(i){let{data:t}=i,{textAdded:e}=this.inputSummary;if(e&&e!==t&&e.toUpperCase()===t){var n;let r=this.getSelectedRange();return this.setSelectedRange([r[0],r[1]+e.length]),(n=this.responder)===null||n===void 0||n.insertString(t),this.setInputSummary({textAdded:t}),this.setSelectedRange(r)}},dragenter(i){i.preventDefault()},dragstart(i){var t,e;return this.serializeSelectionToDataTransfer(i.dataTransfer),this.draggedRange=this.getSelectedRange(),(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidStartDrag)===null||e===void 0?void 0:e.call(t)},dragover(i){if(this.draggedRange||this.canAcceptDataTransfer(i.dataTransfer)){i.preventDefault();let n={x:i.clientX,y:i.clientY};var t,e;if(!Xt(n,this.draggingPoint))return this.draggingPoint=n,(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidReceiveDragOverPoint)===null||e===void 0?void 0:e.call(t,this.draggingPoint)}},dragend(i){var t,e;(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidCancelDrag)===null||e===void 0||e.call(t),this.draggedRange=null,this.draggingPoint=null},drop(i){var t,e;i.preventDefault();let n=(t=i.dataTransfer)===null||t===void 0?void 0:t.files,r=i.dataTransfer.getData("application/x-trix-document"),o={x:i.clientX,y:i.clientY};if((e=this.responder)===null||e===void 0||e.setLocationRangeFromPointRange(o),n!=null&&n.length)this.attachFiles(n);else if(this.draggedRange){var s,l;(s=this.delegate)===null||s===void 0||s.inputControllerWillMoveText(),(l=this.responder)===null||l===void 0||l.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()}else if(r){var c;let u=V.fromJSONString(r);(c=this.responder)===null||c===void 0||c.insertDocument(u),this.requestRender()}this.draggedRange=null,this.draggingPoint=null},cut(i){var t,e;if((t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&(this.serializeSelectionToDataTransfer(i.clipboardData)&&i.preventDefault(),(e=this.delegate)===null||e===void 0||e.inputControllerWillCutText(),this.deleteInDirection("backward"),i.defaultPrevented))return this.requestRender()},copy(i){var t;(t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&this.serializeSelectionToDataTransfer(i.clipboardData)&&i.preventDefault()},paste(i){let t=i.clipboardData||i.testClipboardData,e={clipboard:t};if(!t||Js(i))return void this.getPastedHTMLUsingHiddenElement(F=>{var k,rt,xt;return e.type="text/html",e.html=F,(k=this.delegate)===null||k===void 0||k.inputControllerWillPaste(e),(rt=this.responder)===null||rt===void 0||rt.insertHTML(e.html),this.requestRender(),(xt=this.delegate)===null||xt===void 0?void 0:xt.inputControllerDidPaste(e)});let n=t.getData("URL"),r=t.getData("text/html"),o=t.getData("public.url-name");if(n){var s,l,c;let F;e.type="text/html",F=o?xi(o).trim():n,e.html=this.createLinkHTML(n,F),(s=this.delegate)===null||s===void 0||s.inputControllerWillPaste(e),this.setInputSummary({textAdded:F,didDelete:this.selectionIsExpanded()}),(l=this.responder)===null||l===void 0||l.insertHTML(e.html),this.requestRender(),(c=this.delegate)===null||c===void 0||c.inputControllerDidPaste(e)}else if(Mr(t)){var u,d,C;e.type="text/plain",e.string=t.getData("text/plain"),(u=this.delegate)===null||u===void 0||u.inputControllerWillPaste(e),this.setInputSummary({textAdded:e.string,didDelete:this.selectionIsExpanded()}),(d=this.responder)===null||d===void 0||d.insertString(e.string),this.requestRender(),(C=this.delegate)===null||C===void 0||C.inputControllerDidPaste(e)}else if(r){var T,H,Q;e.type="text/html",e.html=r,(T=this.delegate)===null||T===void 0||T.inputControllerWillPaste(e),(H=this.responder)===null||H===void 0||H.insertHTML(e.html),this.requestRender(),(Q=this.delegate)===null||Q===void 0||Q.inputControllerDidPaste(e)}else if(Array.from(t.types).includes("Files")){var M,mt;let F=(M=t.items)===null||M===void 0||(M=M[0])===null||M===void 0||(mt=M.getAsFile)===null||mt===void 0?void 0:mt.call(M);if(F){var yt,Zt,Qt;let k=zs(F);!F.name&&k&&(F.name="pasted-file-".concat(++Vs,".").concat(k)),e.type="File",e.file=F,(yt=this.delegate)===null||yt===void 0||yt.inputControllerWillAttachFiles(),(Zt=this.responder)===null||Zt===void 0||Zt.insertFile(e.file),this.requestRender(),(Qt=this.delegate)===null||Qt===void 0||Qt.inputControllerDidPaste(e)}}i.preventDefault()},compositionstart(i){return this.getCompositionInput().start(i.data)},compositionupdate(i){return this.getCompositionInput().update(i.data)},compositionend(i){return this.getCompositionInput().end(i.data)},beforeinput(i){this.inputSummary.didInput=!0},input(i){return this.inputSummary.didInput=!0,i.stopPropagation()}}),z(Y,"keys",{backspace(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",i)},delete(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",i)},return(i){var t,e;return this.setInputSummary({preferDocument:!0}),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0?void 0:e.insertLineBreak()},tab(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.canIncreaseNestingLevel()&&((e=this.responder)===null||e===void 0||e.increaseNestingLevel(),this.requestRender(),i.preventDefault())},left(i){var t;if(this.selectionIsInCursorTarget())return i.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},right(i){var t;if(this.selectionIsInCursorTarget())return i.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},control:{d(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",i)},h(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",i)},o(i){var t,e;return i.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.insertString(` `,{updatePosition:!1}),this.requestRender()}},shift:{return(i){var t,e;(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.insertString(` -`),this.requestRender(),i.preventDefault()},tab(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.canDecreaseNestingLevel()&&((e=this.responder)===null||e===void 0||e.decreaseNestingLevel(),this.requestRender(),i.preventDefault())},left(i){if(this.selectionIsInCursorTarget())return i.preventDefault(),this.expandSelectionInDirection("backward")},right(i){if(this.selectionIsInCursorTarget())return i.preventDefault(),this.expandSelectionInDirection("forward")}},alt:{backspace(i){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}},meta:{backspace(i){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}}}),Z.proxyMethod("responder?.getSelectedRange"),Z.proxyMethod("responder?.setSelectedRange"),Z.proxyMethod("responder?.expandSelectionInDirection"),Z.proxyMethod("responder?.selectionIsInCursorTarget"),Z.proxyMethod("responder?.selectionIsExpanded");var zs=i=>{var t;return(t=i.type)===null||t===void 0||(t=t.match(/\/(\w+)$/))===null||t===void 0?void 0:t[1]},qs=!((qn=" ".codePointAt)===null||qn===void 0||!qn.call(" ",0)),Hs=function(i){if(i.key&&qs&&i.key.codePointAt(0)===i.keyCode)return i.key;{let t;if(i.which===null?t=i.keyCode:i.which!==0&&i.charCode!==0&&(t=i.charCode),t!=null&&Qr[t]!=="escape")return Ot.fromCodepoints([t]).toString()}},Js=function(i){let t=i.clipboardData;if(t){if(t.types.includes("text/html")){for(let e of t.types){let n=/^CorePasteboardFlavorType/.test(e),r=/^dyn\./.test(e)&&t.getData(e);if(n||r)return!0}return!1}{let e=t.types.includes("com.apple.webarchive"),n=t.types.includes("com.apple.flat-rtfd");return e||n}}},it=class extends R{constructor(t){super(...arguments),this.inputController=t,this.responder=this.inputController.responder,this.delegate=this.inputController.delegate,this.inputSummary=this.inputController.inputSummary,this.data={}}start(t){if(this.data.start=t,this.isSignificant()){var e,n;this.inputSummary.eventName==="keypress"&&this.inputSummary.textAdded&&((n=this.responder)===null||n===void 0||n.deleteInDirection("left")),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange()}}update(t){if(this.data.update=t,this.isSignificant()){let e=this.selectPlaceholder();e&&(this.forgetPlaceholder(),this.range=e)}}end(t){return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.setSelectedRange(this.range),(r=this.responder)===null||r===void 0||r.insertString(this.data.end),(o=this.responder)===null||o===void 0?void 0:o.setSelectedRange(this.range[0]+this.data.end.length)):this.data.start!=null||this.data.update!=null?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset();var e,n,r,o}getEndData(){return this.data.end}isEnded(){return this.getEndData()!=null}isSignificant(){return!Us.composesExistingText||this.inputSummary.didInput}canApplyToDocument(){var t,e;return((t=this.data.start)===null||t===void 0?void 0:t.length)===0&&((e=this.data.end)===null||e===void 0?void 0:e.length)>0&&this.range}};it.proxyMethod("inputController.setInputSummary"),it.proxyMethod("inputController.requestRender"),it.proxyMethod("inputController.requestReparse"),it.proxyMethod("responder?.selectionIsExpanded"),it.proxyMethod("responder?.insertPlaceholder"),it.proxyMethod("responder?.selectPlaceholder"),it.proxyMethod("responder?.forgetPlaceholder");var Dt=class extends Yt{constructor(){super(...arguments),this.render=this.render.bind(this)}elementDidMutate(){return this.scheduledRender?this.composing?(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidAllowUnhandledInput)===null||e===void 0?void 0:e.call(t):void 0:this.reparse();var t,e}scheduleRender(){return this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)}render(){var t,e;cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||(e=this.delegate)===null||e===void 0||e.render(),(t=this.afterRender)===null||t===void 0||t.call(this),this.afterRender=null}reparse(){var t;return(t=this.delegate)===null||t===void 0?void 0:t.reparse()}insertString(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.insertString(e,n)})}toggleAttributeIfSupported(t){var e;if(Qn().includes(t))return(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var n;return(n=this.responder)===null||n===void 0?void 0:n.toggleCurrentAttribute(t)})}activateAttributeIfSupported(t,e){var n;if(Qn().includes(t))return(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.setCurrentAttribute(t,e)})}deleteInDirection(t){let{recordUndoEntry:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{recordUndoEntry:!0};var n;e&&((n=this.delegate)===null||n===void 0||n.inputControllerWillPerformTyping());let r=()=>{var s;return(s=this.responder)===null||s===void 0?void 0:s.deleteInDirection(t)},o=this.getTargetDOMRange({minLength:this.composing?1:2});return o?this.withTargetDOMRange(o,r):r()}withTargetDOMRange(t,e){var n;return typeof t=="function"&&(e=t,t=this.getTargetDOMRange()),t?(n=this.responder)===null||n===void 0?void 0:n.withTargetDOMRange(t,e.bind(this)):(Pt.reset(),e.call(this))}getTargetDOMRange(){var t,e;let{minLength:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{minLength:0},r=(t=(e=this.event).getTargetRanges)===null||t===void 0?void 0:t.call(e);if(r&&r.length){let o=Ks(r[0]);if(n===0||o.toString().length>=n)return o}}withEvent(t,e){let n;this.event=t;try{n=e.call(this)}finally{this.event=null}return n}};q(Dt,"events",{keydown(i){if(Br(i)){var t;let e=Ys(i);(t=this.delegate)!==null&&t!==void 0&&t.inputControllerDidReceiveKeyboardCommand(e)&&i.preventDefault()}else{let e=i.key;i.altKey&&(e+="+Alt"),i.shiftKey&&(e+="+Shift");let n=this.constructor.keys[e];if(n)return this.withEvent(i,n)}},paste(i){var t;let e,n=(t=i.clipboardData)===null||t===void 0?void 0:t.getData("URL");return to(i)?(i.preventDefault(),this.attachFiles(i.clipboardData.files)):$s(i)?(i.preventDefault(),e={type:"text/plain",string:i.clipboardData.getData("text/plain")},(r=this.delegate)===null||r===void 0||r.inputControllerWillPaste(e),(o=this.responder)===null||o===void 0||o.insertString(e.string),this.render(),(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(e)):n?(i.preventDefault(),e={type:"text/html",html:this.createLinkHTML(n)},(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(e),(c=this.responder)===null||c===void 0||c.insertHTML(e.html),this.render(),(u=this.delegate)===null||u===void 0?void 0:u.inputControllerDidPaste(e)):void 0;var r,o,s,l,c,u},beforeinput(i){let t=this.constructor.inputTypes[i.inputType],e=(n=i,!(!/iPhone|iPad/.test(navigator.userAgent)||n.inputType&&n.inputType!=="insertParagraph"));var n;t&&(this.withEvent(i,t),e||this.scheduleRender()),e&&this.render()},input(i){Pt.reset()},dragstart(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.selectionContainsAttachments()&&(i.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange(),point:Jn(i)})},dragenter(i){Hn(i)&&i.preventDefault()},dragover(i){if(this.dragging){i.preventDefault();let e=Jn(i);var t;if(!Xt(e,this.dragging.point))return this.dragging.point=e,(t=this.responder)===null||t===void 0?void 0:t.setLocationRangeFromPointRange(e)}else Hn(i)&&i.preventDefault()},drop(i){var t,e;if(this.dragging)return i.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),(e=this.responder)===null||e===void 0||e.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender();if(Hn(i)){var n;i.preventDefault();let r=Jn(i);return(n=this.responder)===null||n===void 0||n.setLocationRangeFromPointRange(r),this.attachFiles(i.dataTransfer.files)}},dragend(){var i;this.dragging&&((i=this.responder)===null||i===void 0||i.setSelectedRange(this.dragging.range),this.dragging=null)},compositionend(i){this.composing&&(this.composing=!1,xe.recentAndroid||this.scheduleRender())}}),q(Dt,"keys",{ArrowLeft(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageMovingCursorInDirection("backward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},ArrowRight(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageMovingCursorInDirection("forward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},Backspace(){var i,t,e;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageDeletingInDirection("backward"))return this.event.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.deleteInDirection("backward"),this.render()},Tab(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.canIncreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.increaseNestingLevel(),this.render()},"Tab+Shift"(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.canDecreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.decreaseNestingLevel(),this.render()}}),q(Dt,"inputTypes",{deleteByComposition(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut(){return this.deleteInDirection("backward")},deleteByDrag(){return this.event.preventDefault(),this.withTargetDOMRange(function(){var i;this.deleteByDragRange=(i=this.responder)===null||i===void 0?void 0:i.getSelectedRange()})},deleteCompositionText(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent(){return this.deleteInDirection("backward")},deleteContentBackward(){return this.deleteInDirection("backward")},deleteContentForward(){return this.deleteInDirection("forward")},deleteEntireSoftLine(){return this.deleteInDirection("forward")},deleteHardLineBackward(){return this.deleteInDirection("backward")},deleteHardLineForward(){return this.deleteInDirection("forward")},deleteSoftLineBackward(){return this.deleteInDirection("backward")},deleteSoftLineForward(){return this.deleteInDirection("forward")},deleteWordBackward(){return this.deleteInDirection("backward")},deleteWordForward(){return this.deleteInDirection("forward")},formatBackColor(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold(){return this.toggleAttributeIfSupported("bold")},formatFontColor(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canIncreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.increaseNestingLevel()})},formatItalic(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canDecreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.decreaseNestingLevel()})},formatRemove(){this.withTargetDOMRange(function(){for(let e in(i=this.responder)===null||i===void 0?void 0:i.getCurrentAttributes()){var i,t;(t=this.responder)===null||t===void 0||t.removeCurrentAttribute(e)}})},formatSetBlockTextDirection(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough(){return this.toggleAttributeIfSupported("strike")},formatSubscript(){return this.toggleAttributeIfSupported("sub")},formatSuperscript(){return this.toggleAttributeIfSupported("sup")},formatUnderline(){return this.toggleAttributeIfSupported("underline")},historyRedo(){var i;return(i=this.delegate)===null||i===void 0?void 0:i.inputControllerWillPerformRedo()},historyUndo(){var i;return(i=this.delegate)===null||i===void 0?void 0:i.inputControllerWillPerformUndo()},insertCompositionText(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop(){let i=this.deleteByDragRange;var t;if(i)return this.deleteByDragRange=null,(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),this.withTargetDOMRange(function(){var e;return(e=this.responder)===null||e===void 0?void 0:e.moveTextFromRange(i)})},insertFromPaste(){let{dataTransfer:i}=this.event,t={dataTransfer:i},e=i.getData("URL"),n=i.getData("text/html");if(e){var r;let c;this.event.preventDefault(),t.type="text/html";let u=i.getData("public.url-name");c=u?xi(u).trim():e,t.html=this.createLinkHTML(e,c),(r=this.delegate)===null||r===void 0||r.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var d;return(d=this.responder)===null||d===void 0?void 0:d.insertHTML(t.html)}),this.afterRender=()=>{var d;return(d=this.delegate)===null||d===void 0?void 0:d.inputControllerDidPaste(t)}}else if(Mr(i)){var o;t.type="text/plain",t.string=i.getData("text/plain"),(o=this.delegate)===null||o===void 0||o.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertString(t.string)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}else if(Gs(this.event)){var s;t.type="File",t.file=i.files[0],(s=this.delegate)===null||s===void 0||s.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertFile(t.file)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}else if(n){var l;this.event.preventDefault(),t.type="text/html",t.html=n,(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertHTML(t.html)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}},insertFromYank(){return this.insertString(this.event.data)},insertLineBreak(){return this.insertString(` -`)},insertLink(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList(){return this.toggleAttributeIfSupported("number")},insertParagraph(){var i;return(i=this.delegate)===null||i===void 0||i.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.insertLineBreak()})},insertReplacementText(){let i=this.event.dataTransfer.getData("text/plain"),t=this.event.getTargetRanges()[0];this.withTargetDOMRange(t,()=>{this.insertString(i,{updatePosition:!1})})},insertText(){var i;return this.insertString(this.event.data||((i=this.event.dataTransfer)===null||i===void 0?void 0:i.getData("text/plain")))},insertTranspose(){return this.insertString(this.event.data)},insertUnorderedList(){return this.toggleAttributeIfSupported("bullet")}});var Ks=function(i){let t=document.createRange();return t.setStart(i.startContainer,i.startOffset),t.setEnd(i.endContainer,i.endOffset),t},Hn=i=>{var t;return Array.from(((t=i.dataTransfer)===null||t===void 0?void 0:t.types)||[]).includes("Files")},Gs=i=>{var t;return((t=i.dataTransfer.files)===null||t===void 0?void 0:t[0])&&!to(i)&&!(e=>{let{dataTransfer:n}=e;return n.types.includes("Files")&&n.types.includes("text/html")&&n.getData("text/html").includes("urn:schemas-microsoft-com:office:office")})(i)},to=function(i){let t=i.clipboardData;if(t)return Array.from(t.types).filter(e=>e.match(/file/i)).length===t.types.length&&t.files.length>=1},$s=function(i){let t=i.clipboardData;if(t)return t.types.includes("text/plain")&&t.types.length===1},Ys=function(i){let t=[];return i.altKey&&t.push("alt"),i.shiftKey&&t.push("shift"),t.push(i.key),t},Jn=i=>({x:i.clientX,y:i.clientY}),ui="[data-trix-attribute]",hi="[data-trix-action]",Xs="".concat(ui,", ").concat(hi),cn="[data-trix-dialog]",Zs="".concat(cn,"[data-trix-active]"),Qs="".concat(cn," [data-trix-method]"),kr="".concat(cn," [data-trix-input]"),Rr=(i,t)=>(t||(t=zt(i)),i.querySelector("[data-trix-input][name='".concat(t,"']"))),Tr=i=>i.getAttribute("data-trix-action"),zt=i=>i.getAttribute("data-trix-attribute")||i.getAttribute("data-trix-dialog-attribute"),sn=class extends R{constructor(t){super(t),this.didClickActionButton=this.didClickActionButton.bind(this),this.didClickAttributeButton=this.didClickAttributeButton.bind(this),this.didClickDialogButton=this.didClickDialogButton.bind(this),this.didKeyDownDialogInput=this.didKeyDownDialogInput.bind(this),this.element=t,this.attributes={},this.actions={},this.resetDialogInputs(),S("mousedown",{onElement:this.element,matchingSelector:hi,withCallback:this.didClickActionButton}),S("mousedown",{onElement:this.element,matchingSelector:ui,withCallback:this.didClickAttributeButton}),S("click",{onElement:this.element,matchingSelector:Xs,preventDefault:!0}),S("click",{onElement:this.element,matchingSelector:Qs,withCallback:this.didClickDialogButton}),S("keydown",{onElement:this.element,matchingSelector:kr,withCallback:this.didKeyDownDialogInput})}didClickActionButton(t,e){var n;(n=this.delegate)===null||n===void 0||n.toolbarDidClickButton(),t.preventDefault();let r=Tr(e);return this.getDialog(r)?this.toggleDialog(r):(o=this.delegate)===null||o===void 0?void 0:o.toolbarDidInvokeAction(r,e);var o}didClickAttributeButton(t,e){var n;(n=this.delegate)===null||n===void 0||n.toolbarDidClickButton(),t.preventDefault();let r=zt(e);var o;return this.getDialog(r)?this.toggleDialog(r):(o=this.delegate)===null||o===void 0||o.toolbarDidToggleAttribute(r),this.refreshAttributeButtons()}didClickDialogButton(t,e){let n=vt(e,{matchingSelector:cn});return this[e.getAttribute("data-trix-method")].call(this,n)}didKeyDownDialogInput(t,e){if(t.keyCode===13){t.preventDefault();let n=e.getAttribute("name"),r=this.getDialog(n);this.setAttribute(r)}if(t.keyCode===27)return t.preventDefault(),this.hideDialog()}updateActions(t){return this.actions=t,this.refreshActionButtons()}refreshActionButtons(){return this.eachActionButton((t,e)=>{t.disabled=this.actions[e]===!1})}eachActionButton(t){return Array.from(this.element.querySelectorAll(hi)).map(e=>t(e,Tr(e)))}updateAttributes(t){return this.attributes=t,this.refreshAttributeButtons()}refreshAttributeButtons(){return this.eachAttributeButton((t,e)=>(t.disabled=this.attributes[e]===!1,this.attributes[e]||this.dialogIsVisible(e)?(t.setAttribute("data-trix-active",""),t.classList.add("trix-active")):(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"))))}eachAttributeButton(t){return Array.from(this.element.querySelectorAll(ui)).map(e=>t(e,zt(e)))}applyKeyboardCommand(t){let e=JSON.stringify(t.sort());for(let n of Array.from(this.element.querySelectorAll("[data-trix-key]"))){let r=n.getAttribute("data-trix-key").split("+");if(JSON.stringify(r.sort())===e)return he("mousedown",{onElement:n}),!0}return!1}dialogIsVisible(t){let e=this.getDialog(t);if(e)return e.hasAttribute("data-trix-active")}toggleDialog(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)}showDialog(t){var e,n;this.hideDialog(),(e=this.delegate)===null||e===void 0||e.toolbarWillShowDialog();let r=this.getDialog(t);r.setAttribute("data-trix-active",""),r.classList.add("trix-active"),Array.from(r.querySelectorAll("input[disabled]")).forEach(s=>{s.removeAttribute("disabled")});let o=zt(r);if(o){let s=Rr(r,t);s&&(s.value=this.attributes[o]||"",s.select())}return(n=this.delegate)===null||n===void 0?void 0:n.toolbarDidShowDialog(t)}setAttribute(t){var e;let n=zt(t),r=Rr(t,n);return!r.willValidate||(r.setCustomValidity(""),r.checkValidity()&&this.isSafeAttribute(r))?((e=this.delegate)===null||e===void 0||e.toolbarDidUpdateAttribute(n,r.value),this.hideDialog()):(r.setCustomValidity("Invalid value"),r.setAttribute("data-trix-validate",""),r.classList.add("trix-validate"),r.focus())}isSafeAttribute(t){return!t.hasAttribute("data-trix-validate-href")||Ve.isValidAttribute("a","href",t.value)}removeAttribute(t){var e;let n=zt(t);return(e=this.delegate)===null||e===void 0||e.toolbarDidRemoveAttribute(n),this.hideDialog()}hideDialog(){let t=this.element.querySelector(Zs);var e;if(t)return t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),(e=this.delegate)===null||e===void 0?void 0:e.toolbarDidHideDialog((n=>n.getAttribute("data-trix-dialog"))(t))}resetDialogInputs(){Array.from(this.element.querySelectorAll(kr)).forEach(t=>{t.setAttribute("disabled","disabled"),t.removeAttribute("data-trix-validate"),t.classList.remove("trix-validate")})}getDialog(t){return this.element.querySelector("[data-trix-dialog=".concat(t,"]"))}},Nt=class extends nn{constructor(t){let{editorElement:e,document:n,html:r}=t;super(...arguments),this.editorElement=e,this.selectionManager=new ut(this.editorElement),this.selectionManager.delegate=this,this.composition=new rt,this.composition.delegate=this,this.attachmentManager=new Ge(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=bi.getLevel()===2?new Dt(this.editorElement):new Z(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new en(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new sn(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new Xe(this.composition,this.selectionManager,this.editorElement),n?this.editor.loadDocument(n):this.editor.loadHTML(r)}registerSelectionManager(){return Pt.registerSelectionManager(this.selectionManager)}unregisterSelectionManager(){return Pt.unregisterSelectionManager(this.selectionManager)}render(){return this.compositionController.render()}reparse(){return this.composition.replaceHTML(this.editorElement.innerHTML)}compositionDidChangeDocument(t){if(this.notifyEditorElement("document-change"),!this.handlingInput)return this.render()}compositionDidChangeCurrentAttributes(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})}compositionDidPerformInsertionAtRange(t){this.pasting&&(this.pastedRange=t)}compositionShouldAcceptFile(t){return this.notifyEditorElement("file-accept",{file:t})}compositionDidAddAttachment(t){let e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-add",{attachment:e})}compositionDidEditAttachment(t){this.compositionController.rerenderViewForObject(t);let e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")}compositionDidChangeAttachmentPreviewURL(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")}compositionDidRemoveAttachment(t){let e=this.attachmentManager.unmanageAttachment(t);return this.notifyEditorElement("attachment-remove",{attachment:e})}compositionDidStartEditingAttachment(t,e){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,e),this.selectionManager.setLocationRange(this.attachmentLocationRange)}compositionDidStopEditingAttachment(t){this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null}compositionDidRequestChangingSelectionToLocationRange(t){if(!this.loadingSnapshot||this.isFocused())return this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()}compositionWillLoadSnapshot(){this.loadingSnapshot=!0}compositionDidLoadSnapshot(){this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1}getSelectionManager(){return this.selectionManager}attachmentManagerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}compositionControllerWillSyncDocumentView(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()}compositionControllerDidSyncDocumentView(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")}compositionControllerDidRender(){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}compositionControllerDidFocus(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")}compositionControllerDidBlur(){return this.notifyEditorElement("blur")}compositionControllerDidSelectAttachment(t,e){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,e)}compositionControllerDidRequestDeselectingAttachment(t){let e=this.attachmentLocationRange||this.composition.document.getLocationRangeOfAttachment(t);return this.selectionManager.setLocationRange(e[1])}compositionControllerWillUpdateAttachment(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})}compositionControllerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}inputControllerWillHandleInput(){this.handlingInput=!0,this.requestedRender=!1}inputControllerDidRequestRender(){this.requestedRender=!0}inputControllerDidHandleInput(){if(this.handlingInput=!1,this.requestedRender)return this.requestedRender=!1,this.render()}inputControllerDidAllowUnhandledInput(){return this.notifyEditorElement("change")}inputControllerDidRequestReparse(){return this.reparse()}inputControllerWillPerformTyping(){return this.recordTypingUndoEntry()}inputControllerWillPerformFormatting(t){return this.recordFormattingUndoEntry(t)}inputControllerWillCutText(){return this.editor.recordUndoEntry("Cut")}inputControllerWillPaste(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})}inputControllerDidPaste(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})}inputControllerWillMoveText(){return this.editor.recordUndoEntry("Move")}inputControllerWillAttachFiles(){return this.editor.recordUndoEntry("Drop Files")}inputControllerWillPerformUndo(){return this.editor.undo()}inputControllerWillPerformRedo(){return this.editor.redo()}inputControllerDidReceiveKeyboardCommand(t){return this.toolbarController.applyKeyboardCommand(t)}inputControllerDidStartDrag(){this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()}inputControllerDidReceiveDragOverPoint(t){return this.selectionManager.setLocationRangeFromPointRange(t)}inputControllerDidCancelDrag(){this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null}locationRangeDidChange(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!We(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")}toolbarDidClickButton(){if(!this.getLocationRange())return this.setLocationRange({index:0,offset:0})}toolbarDidInvokeAction(t,e){return this.invokeAction(t,e)}toolbarDidToggleAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidUpdateAttribute(t,e){if(this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,e),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidRemoveAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarWillShowDialog(t){return this.composition.expandSelectionForEditing(),this.freezeSelection()}toolbarDidShowDialog(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})}toolbarDidHideDialog(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})}freezeSelection(){if(!this.selectionFrozen)return this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render()}thawSelection(){if(this.selectionFrozen)return this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()}canInvokeAction(t){return!!this.actionIsExternal(t)||!((e=this.actions[t])===null||e===void 0||(e=e.test)===null||e===void 0||!e.call(this));var e}invokeAction(t,e){return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t,invokingElement:e}):(n=this.actions[t])===null||n===void 0||(n=n.perform)===null||n===void 0?void 0:n.call(this);var n}actionIsExternal(t){return/^x-./.test(t)}getCurrentActions(){let t={};for(let e in this.actions)t[e]=this.canInvokeAction(e);return t}updateCurrentActions(){let t=this.getCurrentActions();if(!Xt(t,this.currentActions))return this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions})}runEditorFilters(){let t=this.composition.getSnapshot();if(Array.from(this.editor.filters).forEach(r=>{let{document:o,selectedRange:s}=t;t=r.call(this.editor,t)||{},t.document||(t.document=o),t.selectedRange||(t.selectedRange=s)}),e=t,n=this.composition.getSnapshot(),!We(e.selectedRange,n.selectedRange)||!e.document.isEqualTo(n.document))return this.composition.loadSnapshot(t);var e,n}updateInputElement(){let t=function(e,n){let r=Ls[n];if(r)return r(e);throw new Error("unknown content type: ".concat(n))}(this.compositionController.getSerializableElement(),"text/html");return this.editorElement.setFormValue(t)}notifyEditorElement(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)}removeAttachment(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()}recordFormattingUndoEntry(t){let e=L(t),n=this.selectionManager.getLocationRange();if(e||!ht(n))return this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})}recordTypingUndoEntry(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})}getUndoContext(){for(var t=arguments.length,e=new Array(t),n=0;n0?Math.floor(new Date().getTime()/Yn.interval):0}isFocused(){var t;return this.editorElement===((t=this.editorElement.ownerDocument)===null||t===void 0?void 0:t.activeElement)}isFocusedInvisibly(){return this.isFocused()&&!this.getLocationRange()}get actions(){return this.constructor.actions}};q(Nt,"actions",{undo:{test(){return this.editor.canUndo()},perform(){return this.editor.undo()}},redo:{test(){return this.editor.canRedo()},perform(){return this.editor.redo()}},link:{test(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test(){return this.editor.canIncreaseNestingLevel()},perform(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test(){return this.editor.canDecreaseNestingLevel()},perform(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:()=>!0,perform(){return bi.pickFiles(this.editor.insertFiles)}}}),Nt.proxyMethod("getSelectionManager().setLocationRange"),Nt.proxyMethod("getSelectionManager().getLocationRange");var ta=Object.freeze({__proto__:null,AttachmentEditorController:tn,CompositionController:en,Controller:nn,EditorController:Nt,InputController:Yt,Level0InputController:Z,Level2InputController:Dt,ToolbarController:sn}),ea=Object.freeze({__proto__:null,MutationObserver:rn,SelectionChangeObserver:Ue}),na=Object.freeze({__proto__:null,FileVerificationOperation:on,ImagePreloadOperation:Ke});Pr("trix-toolbar",`%t { +`),this.requestRender(),i.preventDefault()},tab(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.canDecreaseNestingLevel()&&((e=this.responder)===null||e===void 0||e.decreaseNestingLevel(),this.requestRender(),i.preventDefault())},left(i){if(this.selectionIsInCursorTarget())return i.preventDefault(),this.expandSelectionInDirection("backward")},right(i){if(this.selectionIsInCursorTarget())return i.preventDefault(),this.expandSelectionInDirection("forward")}},alt:{backspace(i){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}},meta:{backspace(i){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}}}),Y.proxyMethod("responder?.getSelectedRange"),Y.proxyMethod("responder?.setSelectedRange"),Y.proxyMethod("responder?.expandSelectionInDirection"),Y.proxyMethod("responder?.selectionIsInCursorTarget"),Y.proxyMethod("responder?.selectionIsExpanded");var zs=i=>{var t;return(t=i.type)===null||t===void 0||(t=t.match(/\/(\w+)$/))===null||t===void 0?void 0:t[1]},Hs=!((Hn=" ".codePointAt)===null||Hn===void 0||!Hn.call(" ",0)),qs=function(i){if(i.key&&Hs&&i.key.codePointAt(0)===i.keyCode)return i.key;{let t;if(i.which===null?t=i.keyCode:i.which!==0&&i.charCode!==0&&(t=i.charCode),t!=null&&Qr[t]!=="escape")return Nt.fromCodepoints([t]).toString()}},Js=function(i){let t=i.clipboardData;if(t){if(t.types.includes("text/html")){for(let e of t.types){let n=/^CorePasteboardFlavorType/.test(e),r=/^dyn\./.test(e)&&t.getData(e);if(n||r)return!0}return!1}{let e=t.types.includes("com.apple.webarchive"),n=t.types.includes("com.apple.flat-rtfd");return e||n}}},nt=class extends R{constructor(t){super(...arguments),this.inputController=t,this.responder=this.inputController.responder,this.delegate=this.inputController.delegate,this.inputSummary=this.inputController.inputSummary,this.data={}}start(t){if(this.data.start=t,this.isSignificant()){var e,n;this.inputSummary.eventName==="keypress"&&this.inputSummary.textAdded&&((n=this.responder)===null||n===void 0||n.deleteInDirection("left")),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange()}}update(t){if(this.data.update=t,this.isSignificant()){let e=this.selectPlaceholder();e&&(this.forgetPlaceholder(),this.range=e)}}end(t){return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.setSelectedRange(this.range),(r=this.responder)===null||r===void 0||r.insertString(this.data.end),(o=this.responder)===null||o===void 0?void 0:o.setSelectedRange(this.range[0]+this.data.end.length)):this.data.start!=null||this.data.update!=null?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset();var e,n,r,o}getEndData(){return this.data.end}isEnded(){return this.getEndData()!=null}isSignificant(){return!Us.composesExistingText||this.inputSummary.didInput}canApplyToDocument(){var t,e;return((t=this.data.start)===null||t===void 0?void 0:t.length)===0&&((e=this.data.end)===null||e===void 0?void 0:e.length)>0&&this.range}};nt.proxyMethod("inputController.setInputSummary"),nt.proxyMethod("inputController.requestRender"),nt.proxyMethod("inputController.requestReparse"),nt.proxyMethod("responder?.selectionIsExpanded"),nt.proxyMethod("responder?.insertPlaceholder"),nt.proxyMethod("responder?.selectPlaceholder"),nt.proxyMethod("responder?.forgetPlaceholder");var wt=class extends Yt{constructor(){super(...arguments),this.render=this.render.bind(this)}elementDidMutate(){return this.scheduledRender?this.composing?(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidAllowUnhandledInput)===null||e===void 0?void 0:e.call(t):void 0:this.reparse();var t,e}scheduleRender(){return this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)}render(){var t,e;cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||(e=this.delegate)===null||e===void 0||e.render(),(t=this.afterRender)===null||t===void 0||t.call(this),this.afterRender=null}reparse(){var t;return(t=this.delegate)===null||t===void 0?void 0:t.reparse()}insertString(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.insertString(e,n)})}toggleAttributeIfSupported(t){var e;if(Qn().includes(t))return(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var n;return(n=this.responder)===null||n===void 0?void 0:n.toggleCurrentAttribute(t)})}activateAttributeIfSupported(t,e){var n;if(Qn().includes(t))return(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.setCurrentAttribute(t,e)})}deleteInDirection(t){let{recordUndoEntry:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{recordUndoEntry:!0};var n;e&&((n=this.delegate)===null||n===void 0||n.inputControllerWillPerformTyping());let r=()=>{var s;return(s=this.responder)===null||s===void 0?void 0:s.deleteInDirection(t)},o=this.getTargetDOMRange({minLength:this.composing?1:2});return o?this.withTargetDOMRange(o,r):r()}withTargetDOMRange(t,e){var n;return typeof t=="function"&&(e=t,t=this.getTargetDOMRange()),t?(n=this.responder)===null||n===void 0?void 0:n.withTargetDOMRange(t,e.bind(this)):(Ot.reset(),e.call(this))}getTargetDOMRange(){var t,e;let{minLength:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{minLength:0},r=(t=(e=this.event).getTargetRanges)===null||t===void 0?void 0:t.call(e);if(r&&r.length){let o=Ks(r[0]);if(n===0||o.toString().length>=n)return o}}withEvent(t,e){let n;this.event=t;try{n=e.call(this)}finally{this.event=null}return n}};z(wt,"events",{keydown(i){if(Br(i)){var t;let e=Ys(i);(t=this.delegate)!==null&&t!==void 0&&t.inputControllerDidReceiveKeyboardCommand(e)&&i.preventDefault()}else{let e=i.key;i.altKey&&(e+="+Alt"),i.shiftKey&&(e+="+Shift");let n=this.constructor.keys[e];if(n)return this.withEvent(i,n)}},paste(i){var t;let e,n=(t=i.clipboardData)===null||t===void 0?void 0:t.getData("URL");return to(i)?(i.preventDefault(),this.attachFiles(i.clipboardData.files)):$s(i)?(i.preventDefault(),e={type:"text/plain",string:i.clipboardData.getData("text/plain")},(r=this.delegate)===null||r===void 0||r.inputControllerWillPaste(e),(o=this.responder)===null||o===void 0||o.insertString(e.string),this.render(),(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(e)):n?(i.preventDefault(),e={type:"text/html",html:this.createLinkHTML(n)},(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(e),(c=this.responder)===null||c===void 0||c.insertHTML(e.html),this.render(),(u=this.delegate)===null||u===void 0?void 0:u.inputControllerDidPaste(e)):void 0;var r,o,s,l,c,u},beforeinput(i){let t=this.constructor.inputTypes[i.inputType],e=(n=i,!(!/iPhone|iPad/.test(navigator.userAgent)||n.inputType&&n.inputType!=="insertParagraph"));var n;t&&(this.withEvent(i,t),e||this.scheduleRender()),e&&this.render()},input(i){Ot.reset()},dragstart(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.selectionContainsAttachments()&&(i.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange(),point:Jn(i)})},dragenter(i){qn(i)&&i.preventDefault()},dragover(i){if(this.dragging){i.preventDefault();let e=Jn(i);var t;if(!Xt(e,this.dragging.point))return this.dragging.point=e,(t=this.responder)===null||t===void 0?void 0:t.setLocationRangeFromPointRange(e)}else qn(i)&&i.preventDefault()},drop(i){var t,e;if(this.dragging)return i.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),(e=this.responder)===null||e===void 0||e.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender();if(qn(i)){var n;i.preventDefault();let r=Jn(i);return(n=this.responder)===null||n===void 0||n.setLocationRangeFromPointRange(r),this.attachFiles(i.dataTransfer.files)}},dragend(){var i;this.dragging&&((i=this.responder)===null||i===void 0||i.setSelectedRange(this.dragging.range),this.dragging=null)},compositionend(i){this.composing&&(this.composing=!1,xe.recentAndroid||this.scheduleRender())}}),z(wt,"keys",{ArrowLeft(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageMovingCursorInDirection("backward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},ArrowRight(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageMovingCursorInDirection("forward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},Backspace(){var i,t,e;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageDeletingInDirection("backward"))return this.event.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.deleteInDirection("backward"),this.render()},Tab(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.canIncreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.increaseNestingLevel(),this.render()},"Tab+Shift"(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.canDecreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.decreaseNestingLevel(),this.render()}}),z(wt,"inputTypes",{deleteByComposition(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut(){return this.deleteInDirection("backward")},deleteByDrag(){return this.event.preventDefault(),this.withTargetDOMRange(function(){var i;this.deleteByDragRange=(i=this.responder)===null||i===void 0?void 0:i.getSelectedRange()})},deleteCompositionText(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent(){return this.deleteInDirection("backward")},deleteContentBackward(){return this.deleteInDirection("backward")},deleteContentForward(){return this.deleteInDirection("forward")},deleteEntireSoftLine(){return this.deleteInDirection("forward")},deleteHardLineBackward(){return this.deleteInDirection("backward")},deleteHardLineForward(){return this.deleteInDirection("forward")},deleteSoftLineBackward(){return this.deleteInDirection("backward")},deleteSoftLineForward(){return this.deleteInDirection("forward")},deleteWordBackward(){return this.deleteInDirection("backward")},deleteWordForward(){return this.deleteInDirection("forward")},formatBackColor(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold(){return this.toggleAttributeIfSupported("bold")},formatFontColor(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canIncreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.increaseNestingLevel()})},formatItalic(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canDecreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.decreaseNestingLevel()})},formatRemove(){this.withTargetDOMRange(function(){for(let e in(i=this.responder)===null||i===void 0?void 0:i.getCurrentAttributes()){var i,t;(t=this.responder)===null||t===void 0||t.removeCurrentAttribute(e)}})},formatSetBlockTextDirection(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough(){return this.toggleAttributeIfSupported("strike")},formatSubscript(){return this.toggleAttributeIfSupported("sub")},formatSuperscript(){return this.toggleAttributeIfSupported("sup")},formatUnderline(){return this.toggleAttributeIfSupported("underline")},historyRedo(){var i;return(i=this.delegate)===null||i===void 0?void 0:i.inputControllerWillPerformRedo()},historyUndo(){var i;return(i=this.delegate)===null||i===void 0?void 0:i.inputControllerWillPerformUndo()},insertCompositionText(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop(){let i=this.deleteByDragRange;var t;if(i)return this.deleteByDragRange=null,(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),this.withTargetDOMRange(function(){var e;return(e=this.responder)===null||e===void 0?void 0:e.moveTextFromRange(i)})},insertFromPaste(){let{dataTransfer:i}=this.event,t={dataTransfer:i},e=i.getData("URL"),n=i.getData("text/html");if(e){var r;let c;this.event.preventDefault(),t.type="text/html";let u=i.getData("public.url-name");c=u?xi(u).trim():e,t.html=this.createLinkHTML(e,c),(r=this.delegate)===null||r===void 0||r.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var d;return(d=this.responder)===null||d===void 0?void 0:d.insertHTML(t.html)}),this.afterRender=()=>{var d;return(d=this.delegate)===null||d===void 0?void 0:d.inputControllerDidPaste(t)}}else if(Mr(i)){var o;t.type="text/plain",t.string=i.getData("text/plain"),(o=this.delegate)===null||o===void 0||o.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertString(t.string)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}else if(Gs(this.event)){var s;t.type="File",t.file=i.files[0],(s=this.delegate)===null||s===void 0||s.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertFile(t.file)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}else if(n){var l;this.event.preventDefault(),t.type="text/html",t.html=n,(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertHTML(t.html)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}},insertFromYank(){return this.insertString(this.event.data)},insertLineBreak(){return this.insertString(` +`)},insertLink(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList(){return this.toggleAttributeIfSupported("number")},insertParagraph(){var i;return(i=this.delegate)===null||i===void 0||i.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.insertLineBreak()})},insertReplacementText(){let i=this.event.dataTransfer.getData("text/plain"),t=this.event.getTargetRanges()[0];this.withTargetDOMRange(t,()=>{this.insertString(i,{updatePosition:!1})})},insertText(){var i;return this.insertString(this.event.data||((i=this.event.dataTransfer)===null||i===void 0?void 0:i.getData("text/plain")))},insertTranspose(){return this.insertString(this.event.data)},insertUnorderedList(){return this.toggleAttributeIfSupported("bullet")}});var Ks=function(i){let t=document.createRange();return t.setStart(i.startContainer,i.startOffset),t.setEnd(i.endContainer,i.endOffset),t},qn=i=>{var t;return Array.from(((t=i.dataTransfer)===null||t===void 0?void 0:t.types)||[]).includes("Files")},Gs=i=>{var t;return((t=i.dataTransfer.files)===null||t===void 0?void 0:t[0])&&!to(i)&&!(e=>{let{dataTransfer:n}=e;return n.types.includes("Files")&&n.types.includes("text/html")&&n.getData("text/html").includes("urn:schemas-microsoft-com:office:office")})(i)},to=function(i){let t=i.clipboardData;if(t)return Array.from(t.types).filter(e=>e.match(/file/i)).length===t.types.length&&t.files.length>=1},$s=function(i){let t=i.clipboardData;if(t)return t.types.includes("text/plain")&&t.types.length===1},Ys=function(i){let t=[];return i.altKey&&t.push("alt"),i.shiftKey&&t.push("shift"),t.push(i.key),t},Jn=i=>({x:i.clientX,y:i.clientY}),ui="[data-trix-attribute]",hi="[data-trix-action]",Xs="".concat(ui,", ").concat(hi),cn="[data-trix-dialog]",Zs="".concat(cn,"[data-trix-active]"),Qs="".concat(cn," [data-trix-method]"),kr="".concat(cn," [data-trix-input]"),Rr=(i,t)=>(t||(t=Ut(i)),i.querySelector("[data-trix-input][name='".concat(t,"']"))),Tr=i=>i.getAttribute("data-trix-action"),Ut=i=>i.getAttribute("data-trix-attribute")||i.getAttribute("data-trix-dialog-attribute"),sn=class extends R{constructor(t){super(t),this.didClickActionButton=this.didClickActionButton.bind(this),this.didClickAttributeButton=this.didClickAttributeButton.bind(this),this.didClickDialogButton=this.didClickDialogButton.bind(this),this.didKeyDownDialogInput=this.didKeyDownDialogInput.bind(this),this.element=t,this.attributes={},this.actions={},this.resetDialogInputs(),S("mousedown",{onElement:this.element,matchingSelector:hi,withCallback:this.didClickActionButton}),S("mousedown",{onElement:this.element,matchingSelector:ui,withCallback:this.didClickAttributeButton}),S("click",{onElement:this.element,matchingSelector:Xs,preventDefault:!0}),S("click",{onElement:this.element,matchingSelector:Qs,withCallback:this.didClickDialogButton}),S("keydown",{onElement:this.element,matchingSelector:kr,withCallback:this.didKeyDownDialogInput})}didClickActionButton(t,e){var n;(n=this.delegate)===null||n===void 0||n.toolbarDidClickButton(),t.preventDefault();let r=Tr(e);return this.getDialog(r)?this.toggleDialog(r):(o=this.delegate)===null||o===void 0?void 0:o.toolbarDidInvokeAction(r,e);var o}didClickAttributeButton(t,e){var n;(n=this.delegate)===null||n===void 0||n.toolbarDidClickButton(),t.preventDefault();let r=Ut(e);var o;return this.getDialog(r)?this.toggleDialog(r):(o=this.delegate)===null||o===void 0||o.toolbarDidToggleAttribute(r),this.refreshAttributeButtons()}didClickDialogButton(t,e){let n=vt(e,{matchingSelector:cn});return this[e.getAttribute("data-trix-method")].call(this,n)}didKeyDownDialogInput(t,e){if(t.keyCode===13){t.preventDefault();let n=e.getAttribute("name"),r=this.getDialog(n);this.setAttribute(r)}if(t.keyCode===27)return t.preventDefault(),this.hideDialog()}updateActions(t){return this.actions=t,this.refreshActionButtons()}refreshActionButtons(){return this.eachActionButton((t,e)=>{t.disabled=this.actions[e]===!1})}eachActionButton(t){return Array.from(this.element.querySelectorAll(hi)).map(e=>t(e,Tr(e)))}updateAttributes(t){return this.attributes=t,this.refreshAttributeButtons()}refreshAttributeButtons(){return this.eachAttributeButton((t,e)=>(t.disabled=this.attributes[e]===!1,this.attributes[e]||this.dialogIsVisible(e)?(t.setAttribute("data-trix-active",""),t.classList.add("trix-active")):(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"))))}eachAttributeButton(t){return Array.from(this.element.querySelectorAll(ui)).map(e=>t(e,Ut(e)))}applyKeyboardCommand(t){let e=JSON.stringify(t.sort());for(let n of Array.from(this.element.querySelectorAll("[data-trix-key]"))){let r=n.getAttribute("data-trix-key").split("+");if(JSON.stringify(r.sort())===e)return he("mousedown",{onElement:n}),!0}return!1}dialogIsVisible(t){let e=this.getDialog(t);if(e)return e.hasAttribute("data-trix-active")}toggleDialog(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)}showDialog(t){var e,n;this.hideDialog(),(e=this.delegate)===null||e===void 0||e.toolbarWillShowDialog();let r=this.getDialog(t);r.setAttribute("data-trix-active",""),r.classList.add("trix-active"),Array.from(r.querySelectorAll("input[disabled]")).forEach(s=>{s.removeAttribute("disabled")});let o=Ut(r);if(o){let s=Rr(r,t);s&&(s.value=this.attributes[o]||"",s.select())}return(n=this.delegate)===null||n===void 0?void 0:n.toolbarDidShowDialog(t)}setAttribute(t){var e;let n=Ut(t),r=Rr(t,n);return!r.willValidate||(r.setCustomValidity(""),r.checkValidity()&&this.isSafeAttribute(r))?((e=this.delegate)===null||e===void 0||e.toolbarDidUpdateAttribute(n,r.value),this.hideDialog()):(r.setCustomValidity("Invalid value"),r.setAttribute("data-trix-validate",""),r.classList.add("trix-validate"),r.focus())}isSafeAttribute(t){return!t.hasAttribute("data-trix-validate-href")||Ve.isValidAttribute("a","href",t.value)}removeAttribute(t){var e;let n=Ut(t);return(e=this.delegate)===null||e===void 0||e.toolbarDidRemoveAttribute(n),this.hideDialog()}hideDialog(){let t=this.element.querySelector(Zs);var e;if(t)return t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),(e=this.delegate)===null||e===void 0?void 0:e.toolbarDidHideDialog((n=>n.getAttribute("data-trix-dialog"))(t))}resetDialogInputs(){Array.from(this.element.querySelectorAll(kr)).forEach(t=>{t.setAttribute("disabled","disabled"),t.removeAttribute("data-trix-validate"),t.classList.remove("trix-validate")})}getDialog(t){return this.element.querySelector("[data-trix-dialog=".concat(t,"]"))}},Lt=class extends nn{constructor(t){let{editorElement:e,document:n,html:r}=t;super(...arguments),this.editorElement=e,this.selectionManager=new ct(this.editorElement),this.selectionManager.delegate=this,this.composition=new it,this.composition.delegate=this,this.attachmentManager=new Ge(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=bi.getLevel()===2?new wt(this.editorElement):new Y(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new en(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new sn(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new Xe(this.composition,this.selectionManager,this.editorElement),n?this.editor.loadDocument(n):this.editor.loadHTML(r)}registerSelectionManager(){return Ot.registerSelectionManager(this.selectionManager)}unregisterSelectionManager(){return Ot.unregisterSelectionManager(this.selectionManager)}render(){return this.compositionController.render()}reparse(){return this.composition.replaceHTML(this.editorElement.innerHTML)}compositionDidChangeDocument(t){if(this.notifyEditorElement("document-change"),!this.handlingInput)return this.render()}compositionDidChangeCurrentAttributes(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})}compositionDidPerformInsertionAtRange(t){this.pasting&&(this.pastedRange=t)}compositionShouldAcceptFile(t){return this.notifyEditorElement("file-accept",{file:t})}compositionDidAddAttachment(t){let e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-add",{attachment:e})}compositionDidEditAttachment(t){this.compositionController.rerenderViewForObject(t);let e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")}compositionDidChangeAttachmentPreviewURL(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")}compositionDidRemoveAttachment(t){let e=this.attachmentManager.unmanageAttachment(t);return this.notifyEditorElement("attachment-remove",{attachment:e})}compositionDidStartEditingAttachment(t,e){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,e),this.selectionManager.setLocationRange(this.attachmentLocationRange)}compositionDidStopEditingAttachment(t){this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null}compositionDidRequestChangingSelectionToLocationRange(t){if(!this.loadingSnapshot||this.isFocused())return this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()}compositionWillLoadSnapshot(){this.loadingSnapshot=!0}compositionDidLoadSnapshot(){this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1}getSelectionManager(){return this.selectionManager}attachmentManagerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}compositionControllerWillSyncDocumentView(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()}compositionControllerDidSyncDocumentView(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")}compositionControllerDidRender(){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}compositionControllerDidFocus(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")}compositionControllerDidBlur(){return this.notifyEditorElement("blur")}compositionControllerDidSelectAttachment(t,e){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,e)}compositionControllerDidRequestDeselectingAttachment(t){let e=this.attachmentLocationRange||this.composition.document.getLocationRangeOfAttachment(t);return this.selectionManager.setLocationRange(e[1])}compositionControllerWillUpdateAttachment(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})}compositionControllerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}inputControllerWillHandleInput(){this.handlingInput=!0,this.requestedRender=!1}inputControllerDidRequestRender(){this.requestedRender=!0}inputControllerDidHandleInput(){if(this.handlingInput=!1,this.requestedRender)return this.requestedRender=!1,this.render()}inputControllerDidAllowUnhandledInput(){return this.notifyEditorElement("change")}inputControllerDidRequestReparse(){return this.reparse()}inputControllerWillPerformTyping(){return this.recordTypingUndoEntry()}inputControllerWillPerformFormatting(t){return this.recordFormattingUndoEntry(t)}inputControllerWillCutText(){return this.editor.recordUndoEntry("Cut")}inputControllerWillPaste(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})}inputControllerDidPaste(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})}inputControllerWillMoveText(){return this.editor.recordUndoEntry("Move")}inputControllerWillAttachFiles(){return this.editor.recordUndoEntry("Drop Files")}inputControllerWillPerformUndo(){return this.editor.undo()}inputControllerWillPerformRedo(){return this.editor.redo()}inputControllerDidReceiveKeyboardCommand(t){return this.toolbarController.applyKeyboardCommand(t)}inputControllerDidStartDrag(){this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()}inputControllerDidReceiveDragOverPoint(t){return this.selectionManager.setLocationRangeFromPointRange(t)}inputControllerDidCancelDrag(){this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null}locationRangeDidChange(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!We(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")}toolbarDidClickButton(){if(!this.getLocationRange())return this.setLocationRange({index:0,offset:0})}toolbarDidInvokeAction(t,e){return this.invokeAction(t,e)}toolbarDidToggleAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidUpdateAttribute(t,e){if(this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,e),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidRemoveAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarWillShowDialog(t){return this.composition.expandSelectionForEditing(),this.freezeSelection()}toolbarDidShowDialog(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})}toolbarDidHideDialog(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})}freezeSelection(){if(!this.selectionFrozen)return this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render()}thawSelection(){if(this.selectionFrozen)return this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()}canInvokeAction(t){return!!this.actionIsExternal(t)||!((e=this.actions[t])===null||e===void 0||(e=e.test)===null||e===void 0||!e.call(this));var e}invokeAction(t,e){return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t,invokingElement:e}):(n=this.actions[t])===null||n===void 0||(n=n.perform)===null||n===void 0?void 0:n.call(this);var n}actionIsExternal(t){return/^x-./.test(t)}getCurrentActions(){let t={};for(let e in this.actions)t[e]=this.canInvokeAction(e);return t}updateCurrentActions(){let t=this.getCurrentActions();if(!Xt(t,this.currentActions))return this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions})}runEditorFilters(){let t=this.composition.getSnapshot();if(Array.from(this.editor.filters).forEach(r=>{let{document:o,selectedRange:s}=t;t=r.call(this.editor,t)||{},t.document||(t.document=o),t.selectedRange||(t.selectedRange=s)}),e=t,n=this.composition.getSnapshot(),!We(e.selectedRange,n.selectedRange)||!e.document.isEqualTo(n.document))return this.composition.loadSnapshot(t);var e,n}updateInputElement(){let t=function(e,n){let r=Ls[n];if(r)return r(e);throw new Error("unknown content type: ".concat(n))}(this.compositionController.getSerializableElement(),"text/html");return this.editorElement.setFormValue(t)}notifyEditorElement(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)}removeAttachment(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()}recordFormattingUndoEntry(t){let e=L(t),n=this.selectionManager.getLocationRange();if(e||!ut(n))return this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})}recordTypingUndoEntry(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})}getUndoContext(){for(var t=arguments.length,e=new Array(t),n=0;n0?Math.floor(new Date().getTime()/Yn.interval):0}isFocused(){var t;return this.editorElement===((t=this.editorElement.ownerDocument)===null||t===void 0?void 0:t.activeElement)}isFocusedInvisibly(){return this.isFocused()&&!this.getLocationRange()}get actions(){return this.constructor.actions}};z(Lt,"actions",{undo:{test(){return this.editor.canUndo()},perform(){return this.editor.undo()}},redo:{test(){return this.editor.canRedo()},perform(){return this.editor.redo()}},link:{test(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test(){return this.editor.canIncreaseNestingLevel()},perform(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test(){return this.editor.canDecreaseNestingLevel()},perform(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:()=>!0,perform(){return bi.pickFiles(this.editor.insertFiles)}}}),Lt.proxyMethod("getSelectionManager().setLocationRange"),Lt.proxyMethod("getSelectionManager().getLocationRange");var ta=Object.freeze({__proto__:null,AttachmentEditorController:tn,CompositionController:en,Controller:nn,EditorController:Lt,InputController:Yt,Level0InputController:Y,Level2InputController:wt,ToolbarController:sn}),ea=Object.freeze({__proto__:null,MutationObserver:rn,SelectionChangeObserver:Ue}),na=Object.freeze({__proto__:null,FileVerificationOperation:on,ImagePreloadOperation:Ke});Pr("trix-toolbar",`%t { display: block; } @@ -111,17 +111,17 @@ var po="2.1.12",wt="[data-trix-attachment]",mi={preview:{presentation:"gallery", height: auto; } -%t `.concat(wt,` figcaption textarea { +%t `.concat(Rt,` figcaption textarea { resize: none; } -%t `).concat(wt,` figcaption textarea.trix-autoresize-clone { +%t `).concat(Rt,` figcaption textarea.trix-autoresize-clone { position: absolute; left: -9999px; max-height: 0px; } -%t `).concat(wt,` figcaption[data-trix-placeholder]:empty::before { +%t `).concat(Rt,` figcaption[data-trix-placeholder]:empty::before { content: attr(data-trix-placeholder); color: graytext; } @@ -142,7 +142,7 @@ var po="2.1.12",wt="[data-trix-attachment]",mi={preview:{presentation:"gallery", %t [data-trix-cursor-target=right] { vertical-align: bottom !important; margin-right: -1px !important; -}`));var ct=new WeakMap,ce=new WeakSet,di=class{constructor(t){var e,n;Jr(e=this,n=ce),n.add(e),pe(this,ct,{writable:!0,value:void 0}),this.element=t,Ci(this,ct,t.attachInternals())}connectedCallback(){Fe(this,ce,Pe).call(this)}disconnectedCallback(){}get labels(){return x(this,ct).labels}get disabled(){var t;return(t=this.element.inputElement)===null||t===void 0?void 0:t.disabled}set disabled(t){this.element.toggleAttribute("disabled",t)}get required(){return this.element.hasAttribute("required")}set required(t){this.element.toggleAttribute("required",t),Fe(this,ce,Pe).call(this)}get validity(){return x(this,ct).validity}get validationMessage(){return x(this,ct).validationMessage}get willValidate(){return x(this,ct).willValidate}setFormValue(t){Fe(this,ce,Pe).call(this)}checkValidity(){return x(this,ct).checkValidity()}reportValidity(){return x(this,ct).reportValidity()}setCustomValidity(t){Fe(this,ce,Pe).call(this,t)}};function Pe(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",{required:t,value:e}=this.element,n=t&&!e,r=!!i,o=p("input",{required:t}),s=i||o.validationMessage;x(this,ct).setValidity({valueMissing:n,customError:r},s)}var Kn=new WeakMap,Gn=new WeakMap,$n=new WeakMap,gi=class{constructor(t){pe(this,Kn,{writable:!0,value:void 0}),pe(this,Gn,{writable:!0,value:e=>{e.defaultPrevented||e.target===this.element.form&&this.element.reset()}}),pe(this,$n,{writable:!0,value:e=>{if(e.defaultPrevented||this.element.contains(e.target))return;let n=vt(e.target,{matchingSelector:"label"});n&&Array.from(this.labels).includes(n)&&this.element.focus()}}),this.element=t}connectedCallback(){Ci(this,Kn,function(t){if(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby"))return;let e=function(){let n=Array.from(t.labels).map(o=>{if(!o.contains(t))return o.textContent}).filter(o=>o),r=n.join(" ");return r?t.setAttribute("aria-label",r):t.removeAttribute("aria-label")};return e(),S("focus",{onElement:t,withCallback:e})}(this.element)),window.addEventListener("reset",x(this,Gn),!1),window.addEventListener("click",x(this,$n),!1)}disconnectedCallback(){var t;(t=x(this,Kn))===null||t===void 0||t.destroy(),window.removeEventListener("reset",x(this,Gn),!1),window.removeEventListener("click",x(this,$n),!1)}get labels(){let t=[];this.element.id&&this.element.ownerDocument&&t.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));let e=vt(this.element,{matchingSelector:"label"});return e&&[this.element,null].includes(e.control)&&t.push(e),t}get disabled(){return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."),!1}set disabled(t){console.warn("This browser does not support the [disabled] attribute for trix-editor elements.")}get required(){return console.warn("This browser does not support the [required] attribute for trix-editor elements."),!1}set required(t){console.warn("This browser does not support the [required] attribute for trix-editor elements.")}get validity(){return console.warn("This browser does not support the validity property for trix-editor elements."),null}get validationMessage(){return console.warn("This browser does not support the validationMessage property for trix-editor elements."),""}get willValidate(){return console.warn("This browser does not support the willValidate property for trix-editor elements."),!1}setFormValue(t){}checkValidity(){return console.warn("This browser does not support checkValidity() for trix-editor elements."),!0}reportValidity(){return console.warn("This browser does not support reportValidity() for trix-editor elements."),!0}setCustomValidity(t){console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements.")}},P=new WeakMap,ye=class extends HTMLElement{constructor(){super(),pe(this,P,{writable:!0,value:void 0}),Ci(this,P,this.constructor.formAssociated?new di(this):new gi(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++ia),this.trixId)}get labels(){return x(this,P).labels}get disabled(){return x(this,P).disabled}set disabled(t){x(this,P).disabled=t}get required(){return x(this,P).required}set required(t){x(this,P).required=t}get validity(){return x(this,P).validity}get validationMessage(){return x(this,P).validationMessage}get willValidate(){return x(this,P).willValidate}get type(){return this.localName}get toolbarElement(){var t;if(this.hasAttribute("toolbar"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("toolbar"));if(this.parentNode){let e="trix-toolbar-".concat(this.trixId);this.setAttribute("toolbar",e);let n=p("trix-toolbar",{id:e});return this.parentNode.insertBefore(n,this),n}}get form(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.form}get inputElement(){var t;if(this.hasAttribute("input"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("input"));if(this.parentNode){let e="trix-input-".concat(this.trixId);this.setAttribute("input",e);let n=p("input",{type:"hidden",id:e});return this.parentNode.insertBefore(n,this.nextElementSibling),n}}get editor(){var t;return(t=this.editorController)===null||t===void 0?void 0:t.editor}get name(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.name}get value(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.value}set value(t){var e;this.defaultValue=t,(e=this.editor)===null||e===void 0||e.loadHTML(this.defaultValue)}notify(t,e){if(this.editorController)return he("trix-".concat(t),{onElement:this,attributes:e})}setFormValue(t){this.inputElement&&(this.inputElement.value=t,x(this,P).setFormValue(t))}connectedCallback(){this.hasAttribute("data-trix-internal")||(ra(this),function(t){t.hasAttribute("role")||t.setAttribute("role","textbox")}(this),this.editorController||(he("trix-before-initialize",{onElement:this}),this.editorController=new Nt({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(()=>he("trix-initialize",{onElement:this}))),this.editorController.registerSelectionManager(),x(this,P).connectedCallback(),function(t){!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t&&t.focus()}(this))}disconnectedCallback(){var t;(t=this.editorController)===null||t===void 0||t.unregisterSelectionManager(),x(this,P).disconnectedCallback()}checkValidity(){return x(this,P).checkValidity()}reportValidity(){return x(this,P).reportValidity()}setCustomValidity(t){x(this,P).setCustomValidity(t)}formDisabledCallback(t){this.inputElement&&(this.inputElement.disabled=t),this.toggleAttribute("contenteditable",!t)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}};q(ye,"formAssociated","ElementInternals"in window);var Q={VERSION:po,config:Ce,core:Ds,models:Xr,views:Ps,controllers:ta,observers:ea,operations:na,elements:Object.freeze({__proto__:null,TrixEditorElement:ye,TrixToolbarElement:an}),filters:Object.freeze({__proto__:null,Filter:Ye,attachmentGalleryFilter:$r})};Object.assign(Q,Xr),window.Trix=Q,setTimeout(function(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",an),customElements.get("trix-editor")||customElements.define("trix-editor",ye)},0);Q.config.blockAttributes.default.tagName="p";Q.config.blockAttributes.default.breakOnReturn=!0;Q.config.blockAttributes.heading={tagName:"h2",terminal:!0,breakOnReturn:!0,group:!1};Q.config.blockAttributes.subHeading={tagName:"h3",terminal:!0,breakOnReturn:!0,group:!1};Q.config.textAttributes.underline={style:{textDecoration:"underline"},inheritable:!0,parser:i=>window.getComputedStyle(i).textDecoration.includes("underline")};Q.Block.prototype.breaksOnReturn=function(){let i=this.getLastAttribute();return Q.config.blockAttributes[i||"default"]?.breakOnReturn??!1};Q.LineBreakInsertion.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset>0:this.shouldBreakFormattedBlock()?!1:this.breaksOnReturn};function la({state:i}){return{state:i,init:function(){this.$refs.trixValue.value=this.state,this.$refs.trix.editor?.loadHTML(this.state??""),this.$watch("state",()=>{document.activeElement!==this.$refs.trix&&(this.$refs.trixValue.value=this.state,this.$refs.trix.editor?.loadHTML(this.state??""))})}}}export{la as default}; +}`));var lt=new WeakMap,ce=new WeakSet,di=class{constructor(t){var e,n;Jr(e=this,n=ce),n.add(e),pe(this,lt,{writable:!0,value:void 0}),this.element=t,Ci(this,lt,t.attachInternals())}connectedCallback(){Fe(this,ce,Pe).call(this)}disconnectedCallback(){}get labels(){return x(this,lt).labels}get disabled(){var t;return(t=this.element.inputElement)===null||t===void 0?void 0:t.disabled}set disabled(t){this.element.toggleAttribute("disabled",t)}get required(){return this.element.hasAttribute("required")}set required(t){this.element.toggleAttribute("required",t),Fe(this,ce,Pe).call(this)}get validity(){return x(this,lt).validity}get validationMessage(){return x(this,lt).validationMessage}get willValidate(){return x(this,lt).willValidate}setFormValue(t){Fe(this,ce,Pe).call(this)}checkValidity(){return x(this,lt).checkValidity()}reportValidity(){return x(this,lt).reportValidity()}setCustomValidity(t){Fe(this,ce,Pe).call(this,t)}};function Pe(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",{required:t,value:e}=this.element,n=t&&!e,r=!!i,o=p("input",{required:t}),s=i||o.validationMessage;x(this,lt).setValidity({valueMissing:n,customError:r},s)}var Kn=new WeakMap,Gn=new WeakMap,$n=new WeakMap,gi=class{constructor(t){pe(this,Kn,{writable:!0,value:void 0}),pe(this,Gn,{writable:!0,value:e=>{e.defaultPrevented||e.target===this.element.form&&this.element.reset()}}),pe(this,$n,{writable:!0,value:e=>{if(e.defaultPrevented||this.element.contains(e.target))return;let n=vt(e.target,{matchingSelector:"label"});n&&Array.from(this.labels).includes(n)&&this.element.focus()}}),this.element=t}connectedCallback(){Ci(this,Kn,function(t){if(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby"))return;let e=function(){let n=Array.from(t.labels).map(o=>{if(!o.contains(t))return o.textContent}).filter(o=>o),r=n.join(" ");return r?t.setAttribute("aria-label",r):t.removeAttribute("aria-label")};return e(),S("focus",{onElement:t,withCallback:e})}(this.element)),window.addEventListener("reset",x(this,Gn),!1),window.addEventListener("click",x(this,$n),!1)}disconnectedCallback(){var t;(t=x(this,Kn))===null||t===void 0||t.destroy(),window.removeEventListener("reset",x(this,Gn),!1),window.removeEventListener("click",x(this,$n),!1)}get labels(){let t=[];this.element.id&&this.element.ownerDocument&&t.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));let e=vt(this.element,{matchingSelector:"label"});return e&&[this.element,null].includes(e.control)&&t.push(e),t}get disabled(){return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."),!1}set disabled(t){console.warn("This browser does not support the [disabled] attribute for trix-editor elements.")}get required(){return console.warn("This browser does not support the [required] attribute for trix-editor elements."),!1}set required(t){console.warn("This browser does not support the [required] attribute for trix-editor elements.")}get validity(){return console.warn("This browser does not support the validity property for trix-editor elements."),null}get validationMessage(){return console.warn("This browser does not support the validationMessage property for trix-editor elements."),""}get willValidate(){return console.warn("This browser does not support the willValidate property for trix-editor elements."),!1}setFormValue(t){}checkValidity(){return console.warn("This browser does not support checkValidity() for trix-editor elements."),!0}reportValidity(){return console.warn("This browser does not support reportValidity() for trix-editor elements."),!0}setCustomValidity(t){console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements.")}},P=new WeakMap,ye=class extends HTMLElement{constructor(){super(),pe(this,P,{writable:!0,value:void 0}),Ci(this,P,this.constructor.formAssociated?new di(this):new gi(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++ia),this.trixId)}get labels(){return x(this,P).labels}get disabled(){return x(this,P).disabled}set disabled(t){x(this,P).disabled=t}get required(){return x(this,P).required}set required(t){x(this,P).required=t}get validity(){return x(this,P).validity}get validationMessage(){return x(this,P).validationMessage}get willValidate(){return x(this,P).willValidate}get type(){return this.localName}get toolbarElement(){var t;if(this.hasAttribute("toolbar"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("toolbar"));if(this.parentNode){let e="trix-toolbar-".concat(this.trixId);this.setAttribute("toolbar",e);let n=p("trix-toolbar",{id:e});return this.parentNode.insertBefore(n,this),n}}get form(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.form}get inputElement(){var t;if(this.hasAttribute("input"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("input"));if(this.parentNode){let e="trix-input-".concat(this.trixId);this.setAttribute("input",e);let n=p("input",{type:"hidden",id:e});return this.parentNode.insertBefore(n,this.nextElementSibling),n}}get editor(){var t;return(t=this.editorController)===null||t===void 0?void 0:t.editor}get name(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.name}get value(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.value}set value(t){var e;this.defaultValue=t,(e=this.editor)===null||e===void 0||e.loadHTML(this.defaultValue)}notify(t,e){if(this.editorController)return he("trix-".concat(t),{onElement:this,attributes:e})}setFormValue(t){this.inputElement&&(this.inputElement.value=t,x(this,P).setFormValue(t))}connectedCallback(){this.hasAttribute("data-trix-internal")||(ra(this),function(t){t.hasAttribute("role")||t.setAttribute("role","textbox")}(this),this.editorController||(he("trix-before-initialize",{onElement:this}),this.editorController=new Lt({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(()=>he("trix-initialize",{onElement:this}))),this.editorController.registerSelectionManager(),x(this,P).connectedCallback(),function(t){!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t&&t.focus()}(this))}disconnectedCallback(){var t;(t=this.editorController)===null||t===void 0||t.unregisterSelectionManager(),x(this,P).disconnectedCallback()}checkValidity(){return x(this,P).checkValidity()}reportValidity(){return x(this,P).reportValidity()}setCustomValidity(t){x(this,P).setCustomValidity(t)}formDisabledCallback(t){this.inputElement&&(this.inputElement.disabled=t),this.toggleAttribute("contenteditable",!t)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}};z(ye,"formAssociated","ElementInternals"in window);var Z={VERSION:po,config:Ce,core:Ds,models:Xr,views:Ps,controllers:ta,observers:ea,operations:na,elements:Object.freeze({__proto__:null,TrixEditorElement:ye,TrixToolbarElement:an}),filters:Object.freeze({__proto__:null,Filter:Ye,attachmentGalleryFilter:$r})};Object.assign(Z,Xr),window.Trix=Z,setTimeout(function(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",an),customElements.get("trix-editor")||customElements.define("trix-editor",ye)},0);Z.config.blockAttributes.default.tagName="p";Z.config.blockAttributes.default.breakOnReturn=!0;Z.config.blockAttributes.heading={tagName:"h2",terminal:!0,breakOnReturn:!0,group:!1};Z.config.blockAttributes.subHeading={tagName:"h3",terminal:!0,breakOnReturn:!0,group:!1};Z.config.textAttributes.underline={style:{textDecoration:"underline"},inheritable:!0,parser:i=>window.getComputedStyle(i).textDecoration.includes("underline")};Z.Block.prototype.breaksOnReturn=function(){let i=this.getLastAttribute();return Z.config.blockAttributes[i||"default"]?.breakOnReturn??!1};Z.LineBreakInsertion.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset>0:this.shouldBreakFormattedBlock()?!1:this.breaksOnReturn};function la({state:i}){return{state:i,init:function(){this.$refs.trixValue.value=this.state,this.$refs.trix.editor?.loadHTML(this.state??""),this.$watch("state",()=>{document.activeElement!==this.$refs.trix&&(this.$refs.trixValue.value=this.state,this.$refs.trix.editor?.loadHTML(this.state??""))})}}}export{la as default}; /*! Bundled license information: trix/dist/trix.esm.min.js: diff --git a/public/js/filament/forms/components/select.js b/public/js/filament/forms/components/select.js index 7b3c78f09..fdea5da1c 100644 --- a/public/js/filament/forms/components/select.js +++ b/public/js/filament/forms/components/select.js @@ -1,4 +1,4 @@ -var lt=Object.create;var Ge=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var ht=Object.getPrototypeOf,dt=Object.prototype.hasOwnProperty;var ft=(se,ie)=>()=>(ie||se((ie={exports:{}}).exports,ie),ie.exports);var pt=(se,ie,X,me)=>{if(ie&&typeof ie=="object"||typeof ie=="function")for(let j of ut(ie))!dt.call(se,j)&&j!==X&&Ge(se,j,{get:()=>ie[j],enumerable:!(me=ct(ie,j))||me.enumerable});return se};var mt=(se,ie,X)=>(X=se!=null?lt(ht(se)):{},pt(ie||!se||!se.__esModule?Ge(X,"default",{value:se,enumerable:!0}):X,se));var $e=ft((Ae,Ye)=>{(function(ie,X){typeof Ae=="object"&&typeof Ye=="object"?Ye.exports=X():typeof define=="function"&&define.amd?define([],X):typeof Ae=="object"?Ae.Choices=X():ie.Choices=X()})(window,function(){return function(){"use strict";var se={282:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.clearChoices=i.activateChoices=i.filterChoices=i.addChoice=void 0;var _=b(883),h=function(c){var l=c.value,O=c.label,L=c.id,y=c.groupId,D=c.disabled,k=c.elementId,Q=c.customProperties,Z=c.placeholder,ne=c.keyCode;return{type:_.ACTION_TYPES.ADD_CHOICE,value:l,label:O,id:L,groupId:y,disabled:D,elementId:k,customProperties:Q,placeholder:Z,keyCode:ne}};i.addChoice=h;var d=function(c){return{type:_.ACTION_TYPES.FILTER_CHOICES,results:c}};i.filterChoices=d;var a=function(c){return c===void 0&&(c=!0),{type:_.ACTION_TYPES.ACTIVATE_CHOICES,active:c}};i.activateChoices=a;var r=function(){return{type:_.ACTION_TYPES.CLEAR_CHOICES}};i.clearChoices=r},783:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.addGroup=void 0;var _=b(883),h=function(d){var a=d.value,r=d.id,c=d.active,l=d.disabled;return{type:_.ACTION_TYPES.ADD_GROUP,value:a,id:r,active:c,disabled:l}};i.addGroup=h},464:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.highlightItem=i.removeItem=i.addItem=void 0;var _=b(883),h=function(r){var c=r.value,l=r.label,O=r.id,L=r.choiceId,y=r.groupId,D=r.customProperties,k=r.placeholder,Q=r.keyCode;return{type:_.ACTION_TYPES.ADD_ITEM,value:c,label:l,id:O,choiceId:L,groupId:y,customProperties:D,placeholder:k,keyCode:Q}};i.addItem=h;var d=function(r,c){return{type:_.ACTION_TYPES.REMOVE_ITEM,id:r,choiceId:c}};i.removeItem=d;var a=function(r,c){return{type:_.ACTION_TYPES.HIGHLIGHT_ITEM,id:r,highlighted:c}};i.highlightItem=a},137:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.setIsLoading=i.resetTo=i.clearAll=void 0;var _=b(883),h=function(){return{type:_.ACTION_TYPES.CLEAR_ALL}};i.clearAll=h;var d=function(r){return{type:_.ACTION_TYPES.RESET_TO,state:r}};i.resetTo=d;var a=function(r){return{type:_.ACTION_TYPES.SET_IS_LOADING,isLoading:r}};i.setIsLoading=a},373:function(j,i,b){var _=this&&this.__spreadArray||function(g,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,v;n=0?this._store.getGroupById(v):null;return this._store.dispatch((0,l.highlightItem)(n,!0)),t&&this.passedElement.triggerEvent(y.EVENTS.highlightItem,{id:n,value:M,label:f,groupValue:u&&u.value?u.value:null}),this},g.prototype.unhighlightItem=function(e){if(!e||!e.id)return this;var t=e.id,n=e.groupId,s=n===void 0?-1:n,v=e.value,P=v===void 0?"":v,M=e.label,K=M===void 0?"":M,f=s>=0?this._store.getGroupById(s):null;return this._store.dispatch((0,l.highlightItem)(t,!1)),this.passedElement.triggerEvent(y.EVENTS.highlightItem,{id:t,value:P,label:K,groupValue:f&&f.value?f.value:null}),this},g.prototype.highlightAll=function(){var e=this;return this._store.items.forEach(function(t){return e.highlightItem(t)}),this},g.prototype.unhighlightAll=function(){var e=this;return this._store.items.forEach(function(t){return e.unhighlightItem(t)}),this},g.prototype.removeActiveItemsByValue=function(e){var t=this;return this._store.activeItems.filter(function(n){return n.value===e}).forEach(function(n){return t._removeItem(n)}),this},g.prototype.removeActiveItems=function(e){var t=this;return this._store.activeItems.filter(function(n){var s=n.id;return s!==e}).forEach(function(n){return t._removeItem(n)}),this},g.prototype.removeHighlightedItems=function(e){var t=this;return e===void 0&&(e=!1),this._store.highlightedActiveItems.forEach(function(n){t._removeItem(n),e&&t._triggerChange(n.value)}),this},g.prototype.showDropdown=function(e){var t=this;return this.dropdown.isActive?this:(requestAnimationFrame(function(){t.dropdown.show(),t.containerOuter.open(t.dropdown.distanceFromTopWindow),!e&&t._canSearch&&t.input.focus(),t.passedElement.triggerEvent(y.EVENTS.showDropdown,{})}),this)},g.prototype.hideDropdown=function(e){var t=this;return this.dropdown.isActive?(requestAnimationFrame(function(){t.dropdown.hide(),t.containerOuter.close(),!e&&t._canSearch&&(t.input.removeActiveDescendant(),t.input.blur()),t.passedElement.triggerEvent(y.EVENTS.hideDropdown,{})}),this):this},g.prototype.getValue=function(e){e===void 0&&(e=!1);var t=this._store.activeItems.reduce(function(n,s){var v=e?s.value:s;return n.push(v),n},[]);return this._isSelectOneElement?t[0]:t},g.prototype.setValue=function(e){var t=this;return this.initialised?(e.forEach(function(n){return t._setChoiceOrItem(n)}),this):this},g.prototype.setChoiceByValue=function(e){var t=this;if(!this.initialised||this._isTextElement)return this;var n=Array.isArray(e)?e:[e];return n.forEach(function(s){return t._findAndSelectChoiceByValue(s)}),this},g.prototype.setChoices=function(e,t,n,s){var v=this;if(e===void 0&&(e=[]),t===void 0&&(t="value"),n===void 0&&(n="label"),s===void 0&&(s=!1),!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if(typeof t!="string"||!t)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(s&&this.clearChoices(),typeof e=="function"){var P=e(this);if(typeof Promise=="function"&&P instanceof Promise)return new Promise(function(M){return requestAnimationFrame(M)}).then(function(){return v._handleLoadingState(!0)}).then(function(){return P}).then(function(M){return v.setChoices(M,t,n,s)}).catch(function(M){v.config.silent||console.error(M)}).then(function(){return v._handleLoadingState(!1)}).then(function(){return v});if(!Array.isArray(P))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof P));return this.setChoices(P,t,n,!1)}if(!Array.isArray(e))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._startLoading(),e.forEach(function(M){if(M.choices)v._addGroup({id:M.id?parseInt("".concat(M.id),10):null,group:M,valueKey:t,labelKey:n});else{var K=M;v._addChoice({value:K[t],label:K[n],isSelected:!!K.selected,isDisabled:!!K.disabled,placeholder:!!K.placeholder,customProperties:K.customProperties})}}),this._stopLoading(),this},g.prototype.clearChoices=function(){return this._store.dispatch((0,r.clearChoices)()),this},g.prototype.clearStore=function(){return this._store.dispatch((0,O.clearAll)()),this},g.prototype.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0))),this},g.prototype._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,t=this._isSelectElement,n=this._currentState.items!==this._prevState.items;e&&(t&&this._renderChoices(),n&&this._renderItems(),this._prevState=this._currentState)}},g.prototype._renderChoices=function(){var e=this,t=this._store,n=t.activeGroups,s=t.activeChoices,v=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(function(){return e.choiceList.scrollToTop()}),n.length>=1&&!this._isSearching){var P=s.filter(function(C){return C.placeholder===!0&&C.groupId===-1});P.length>=1&&(v=this._createChoicesFragment(P,v)),v=this._createGroupsFragment(n,s,v)}else s.length>=1&&(v=this._createChoicesFragment(s,v));if(v.childNodes&&v.childNodes.length>0){var M=this._store.activeItems,K=this._canAddItem(M,this.input.value);if(K.response)this.choiceList.append(v),this._highlightChoice();else{var f=this._getTemplate("notice",K.notice);this.choiceList.append(f)}}else{var u=void 0,f=void 0;this._isSearching?(f=typeof this.config.noResultsText=="function"?this.config.noResultsText():this.config.noResultsText,u=this._getTemplate("notice",f,"no-results")):(f=typeof this.config.noChoicesText=="function"?this.config.noChoicesText():this.config.noChoicesText,u=this._getTemplate("notice",f,"no-choices")),this.choiceList.append(u)}},g.prototype._renderItems=function(){var e=this._store.activeItems||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},g.prototype._createGroupsFragment=function(e,t,n){var s=this;n===void 0&&(n=document.createDocumentFragment());var v=function(P){return t.filter(function(M){return s._isSelectOneElement?M.groupId===P.id:M.groupId===P.id&&(s.config.renderSelectedChoices==="always"||!M.selected)})};return this.config.shouldSort&&e.sort(this.config.sorter),e.forEach(function(P){var M=v(P);if(M.length>=1){var K=s._getTemplate("choiceGroup",P);n.appendChild(K),s._createChoicesFragment(M,n,!0)}}),n},g.prototype._createChoicesFragment=function(e,t,n){var s=this;t===void 0&&(t=document.createDocumentFragment()),n===void 0&&(n=!1);var v=this.config,P=v.renderSelectedChoices,M=v.searchResultLimit,K=v.renderChoiceLimit,f=this._isSearching?k.sortByScore:this.config.sorter,u=function(z){var ee=P==="auto"?s._isSelectOneElement||!z.selected:!0;if(ee){var ae=s._getTemplate("choice",z,s.config.itemSelectText);t.appendChild(ae)}},C=e;P==="auto"&&!this._isSelectOneElement&&(C=e.filter(function(z){return!z.selected}));var Y=C.reduce(function(z,ee){return ee.placeholder?z.placeholderChoices.push(ee):z.normalChoices.push(ee),z},{placeholderChoices:[],normalChoices:[]}),V=Y.placeholderChoices,U=Y.normalChoices;(this.config.shouldSort||this._isSearching)&&U.sort(f);var $=C.length,W=this._isSelectOneElement?_(_([],V,!0),U,!0):U;this._isSearching?$=M:K&&K>0&&!n&&($=K);for(var J=0;J<$;J+=1)W[J]&&u(W[J]);return t},g.prototype._createItemsFragment=function(e,t){var n=this;t===void 0&&(t=document.createDocumentFragment());var s=this.config,v=s.shouldSortItems,P=s.sorter,M=s.removeItemButton;v&&!this._isSelectOneElement&&e.sort(P),this._isTextElement?this.passedElement.value=e.map(function(f){var u=f.value;return u}).join(this.config.delimiter):this.passedElement.options=e;var K=function(f){var u=n._getTemplate("item",f,M);t.appendChild(u)};return e.forEach(K),t},g.prototype._triggerChange=function(e){e!=null&&this.passedElement.triggerEvent(y.EVENTS.change,{value:e})},g.prototype._selectPlaceholderChoice=function(e){this._addItem({value:e.value,label:e.label,choiceId:e.id,groupId:e.groupId,placeholder:e.placeholder}),this._triggerChange(e.value)},g.prototype._handleButtonAction=function(e,t){if(!(!e||!t||!this.config.removeItems||!this.config.removeItemButton)){var n=t.parentNode&&t.parentNode.dataset.id,s=n&&e.find(function(v){return v.id===parseInt(n,10)});s&&(this._removeItem(s),this._triggerChange(s.value),this._isSelectOneElement&&this._store.placeholderChoice&&this._selectPlaceholderChoice(this._store.placeholderChoice))}},g.prototype._handleItemAction=function(e,t,n){var s=this;if(n===void 0&&(n=!1),!(!e||!t||!this.config.removeItems||this._isSelectOneElement)){var v=t.dataset.id;e.forEach(function(P){P.id===parseInt("".concat(v),10)&&!P.highlighted?s.highlightItem(P):!n&&P.highlighted&&s.unhighlightItem(P)}),this.input.focus()}},g.prototype._handleChoiceAction=function(e,t){if(!(!e||!t)){var n=t.dataset.id,s=n&&this._store.getChoiceById(n);if(s){var v=e[0]&&e[0].keyCode?e[0].keyCode:void 0,P=this.dropdown.isActive;if(s.keyCode=v,this.passedElement.triggerEvent(y.EVENTS.choice,{choice:s}),!s.selected&&!s.disabled){var M=this._canAddItem(e,s.value);M.response&&(this._addItem({value:s.value,label:s.label,choiceId:s.id,groupId:s.groupId,customProperties:s.customProperties,placeholder:s.placeholder,keyCode:s.keyCode}),this._triggerChange(s.value))}this.clearInput(),P&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},g.prototype._handleBackspace=function(e){if(!(!this.config.removeItems||!e)){var t=e[e.length-1],n=e.some(function(s){return s.highlighted});this.config.editItems&&!n&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(n||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}},g.prototype._startLoading=function(){this._store.dispatch((0,O.setIsLoading)(!0))},g.prototype._stopLoading=function(){this._store.dispatch((0,O.setIsLoading)(!1))},g.prototype._handleLoadingState=function(e){e===void 0&&(e=!0);var t=this.itemList.getChild(".".concat(this.config.classNames.placeholder));e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText),t&&this.itemList.append(t)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t&&(t.innerHTML=this._placeholderValue||""):this.input.placeholder=this._placeholderValue||"")},g.prototype._handleSearch=function(e){if(this.input.isFocussed){var t=this._store.choices,n=this.config,s=n.searchFloor,v=n.searchChoices,P=t.some(function(K){return!K.active});if(e!==null&&typeof e<"u"&&e.length>=s){var M=v?this._searchChoices(e):0;this.passedElement.triggerEvent(y.EVENTS.search,{value:e,resultCount:M})}else P&&(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0)))}},g.prototype._canAddItem=function(e,t){var n=!0,s=typeof this.config.addItemText=="function"?this.config.addItemText(t):this.config.addItemText;if(!this._isSelectOneElement){var v=(0,k.existsInArray)(e,t);this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(n=!1,s=typeof this.config.maxItemText=="function"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&v&&n&&(n=!1,s=typeof this.config.uniqueItemText=="function"?this.config.uniqueItemText(t):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&n&&typeof this.config.addItemFilter=="function"&&!this.config.addItemFilter(t)&&(n=!1,s=typeof this.config.customAddItemText=="function"?this.config.customAddItemText(t):this.config.customAddItemText)}return{response:n,notice:s}},g.prototype._searchChoices=function(e){var t=typeof e=="string"?e.trim():e,n=typeof this._currentValue=="string"?this._currentValue.trim():this._currentValue;if(t.length<1&&t==="".concat(n," "))return 0;var s=this._store.searchableChoices,v=t,P=Object.assign(this.config.fuseOptions,{keys:_([],this.config.searchFields,!0),includeMatches:!0}),M=new a.default(s,P),K=M.search(v);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch((0,r.filterChoices)(K)),K.length},g.prototype._addEventListeners=function(){var e=document.documentElement;e.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},g.prototype._removeEventListeners=function(){var e=document.documentElement;e.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},g.prototype._onKeyDown=function(e){var t=e.keyCode,n=this._store.activeItems,s=this.input.isFocussed,v=this.dropdown.isActive,P=this.itemList.hasChildren(),M=String.fromCharCode(t),K=/[^\x00-\x1F]/.test(M),f=y.KEY_CODES.BACK_KEY,u=y.KEY_CODES.DELETE_KEY,C=y.KEY_CODES.ENTER_KEY,Y=y.KEY_CODES.A_KEY,V=y.KEY_CODES.ESC_KEY,U=y.KEY_CODES.UP_KEY,$=y.KEY_CODES.DOWN_KEY,W=y.KEY_CODES.PAGE_UP_KEY,J=y.KEY_CODES.PAGE_DOWN_KEY;switch(!this._isTextElement&&!v&&K&&(this.showDropdown(),this.input.isFocussed||(this.input.value+=e.key.toLowerCase())),t){case Y:return this._onSelectKey(e,P);case C:return this._onEnterKey(e,n,v);case V:return this._onEscapeKey(v);case U:case W:case $:case J:return this._onDirectionKey(e,v);case u:case f:return this._onDeleteKey(e,n,s);default:}},g.prototype._onKeyUp=function(e){var t=e.target,n=e.keyCode,s=this.input.value,v=this._store.activeItems,P=this._canAddItem(v,s),M=y.KEY_CODES.BACK_KEY,K=y.KEY_CODES.DELETE_KEY;if(this._isTextElement){var f=P.notice&&s;if(f){var u=this._getTemplate("notice",P.notice);this.dropdown.element.innerHTML=u.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0)}else{var C=n===M||n===K,Y=C&&t&&!t.value,V=!this._isTextElement&&this._isSearching,U=this._canSearch&&P.response;Y&&V?(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0))):U&&this._handleSearch(this.input.rawValue)}this._canSearch=this.config.searchEnabled},g.prototype._onSelectKey=function(e,t){var n=e.ctrlKey,s=e.metaKey,v=n||s;if(v&&t){this._canSearch=!1;var P=this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement;P&&this.highlightAll()}},g.prototype._onEnterKey=function(e,t,n){var s=e.target,v=y.KEY_CODES.ENTER_KEY,P=s&&s.hasAttribute("data-button");if(this._isTextElement&&s&&s.value){var M=this.input.value,K=this._canAddItem(t,M);K.response&&(this.hideDropdown(!0),this._addItem({value:M}),this._triggerChange(M),this.clearInput())}if(P&&(this._handleButtonAction(t,s),e.preventDefault()),n){var f=this.dropdown.getChild(".".concat(this.config.classNames.highlightedState));f&&(t[0]&&(t[0].keyCode=v),this._handleChoiceAction(t,f)),e.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),e.preventDefault())},g.prototype._onEscapeKey=function(e){e&&(this.hideDropdown(!0),this.containerOuter.focus())},g.prototype._onDirectionKey=function(e,t){var n=e.keyCode,s=e.metaKey,v=y.KEY_CODES.DOWN_KEY,P=y.KEY_CODES.PAGE_UP_KEY,M=y.KEY_CODES.PAGE_DOWN_KEY;if(t||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var K=n===v||n===M?1:-1,f=s||n===M||n===P,u="[data-choice-selectable]",C=void 0;if(f)K>0?C=this.dropdown.element.querySelector("".concat(u,":last-of-type")):C=this.dropdown.element.querySelector(u);else{var Y=this.dropdown.element.querySelector(".".concat(this.config.classNames.highlightedState));Y?C=(0,k.getAdjacentEl)(Y,u,K):C=this.dropdown.element.querySelector(u)}C&&((0,k.isScrolledIntoView)(C,this.choiceList.element,K)||this.choiceList.scrollToChildElement(C,K),this._highlightChoice(C)),e.preventDefault()}},g.prototype._onDeleteKey=function(e,t,n){var s=e.target;!this._isSelectOneElement&&!s.value&&n&&(this._handleBackspace(t),e.preventDefault())},g.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},g.prototype._onTouchEnd=function(e){var t=(e||e.touches[0]).target,n=this._wasTap&&this.containerOuter.element.contains(t);if(n){var s=t===this.containerOuter.element||t===this.containerInner.element;s&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()}this._wasTap=!0},g.prototype._onMouseDown=function(e){var t=e.target;if(t instanceof HTMLElement){if(E&&this.choiceList.element.contains(t)){var n=this.choiceList.element.firstElementChild,s=this._direction==="ltr"?e.offsetX>=n.offsetWidth:e.offsetX0;s&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0)}},g.prototype._onFocus=function(e){var t,n=this,s=e.target,v=s&&this.containerOuter.element.contains(s);if(v){var P=(t={},t[y.TEXT_TYPE]=function(){s===n.input.element&&n.containerOuter.addFocusState()},t[y.SELECT_ONE_TYPE]=function(){n.containerOuter.addFocusState(),s===n.input.element&&n.showDropdown(!0)},t[y.SELECT_MULTIPLE_TYPE]=function(){s===n.input.element&&(n.showDropdown(!0),n.containerOuter.addFocusState())},t);P[this.passedElement.element.type]()}},g.prototype._onBlur=function(e){var t,n=this,s=e.target,v=s&&this.containerOuter.element.contains(s);if(v&&!this._isScrollingOnIe){var P=this._store.activeItems,M=P.some(function(f){return f.highlighted}),K=(t={},t[y.TEXT_TYPE]=function(){s===n.input.element&&(n.containerOuter.removeFocusState(),M&&n.unhighlightAll(),n.hideDropdown(!0))},t[y.SELECT_ONE_TYPE]=function(){n.containerOuter.removeFocusState(),(s===n.input.element||s===n.containerOuter.element&&!n._canSearch)&&n.hideDropdown(!0)},t[y.SELECT_MULTIPLE_TYPE]=function(){s===n.input.element&&(n.containerOuter.removeFocusState(),n.hideDropdown(!0),M&&n.unhighlightAll())},t);K[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},g.prototype._onFormReset=function(){this._store.dispatch((0,O.resetTo)(this._initialState))},g.prototype._highlightChoice=function(e){var t=this;e===void 0&&(e=null);var n=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(n.length){var s=e,v=Array.from(this.dropdown.element.querySelectorAll(".".concat(this.config.classNames.highlightedState)));v.forEach(function(P){P.classList.remove(t.config.classNames.highlightedState),P.setAttribute("aria-selected","false")}),s?this._highlightPosition=n.indexOf(s):(n.length>this._highlightPosition?s=n[this._highlightPosition]:s=n[n.length-1],s||(s=n[0])),s.classList.add(this.config.classNames.highlightedState),s.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(y.EVENTS.highlightChoice,{el:s}),this.dropdown.isActive&&(this.input.setActiveDescendant(s.id),this.containerOuter.setActiveDescendant(s.id))}},g.prototype._addItem=function(e){var t=e.value,n=e.label,s=n===void 0?null:n,v=e.choiceId,P=v===void 0?-1:v,M=e.groupId,K=M===void 0?-1:M,f=e.customProperties,u=f===void 0?{}:f,C=e.placeholder,Y=C===void 0?!1:C,V=e.keyCode,U=V===void 0?-1:V,$=typeof t=="string"?t.trim():t,W=this._store.items,J=s||$,z=P||-1,ee=K>=0?this._store.getGroupById(K):null,ae=W?W.length+1:1;this.config.prependValue&&($=this.config.prependValue+$.toString()),this.config.appendValue&&($+=this.config.appendValue.toString()),this._store.dispatch((0,l.addItem)({value:$,label:J,id:ae,choiceId:z,groupId:K,customProperties:u,placeholder:Y,keyCode:U})),this._isSelectOneElement&&this.removeActiveItems(ae),this.passedElement.triggerEvent(y.EVENTS.addItem,{id:ae,value:$,label:J,customProperties:u,groupValue:ee&&ee.value?ee.value:null,keyCode:U})},g.prototype._removeItem=function(e){var t=e.id,n=e.value,s=e.label,v=e.customProperties,P=e.choiceId,M=e.groupId,K=M&&M>=0?this._store.getGroupById(M):null;!t||!P||(this._store.dispatch((0,l.removeItem)(t,P)),this.passedElement.triggerEvent(y.EVENTS.removeItem,{id:t,value:n,label:s,customProperties:v,groupValue:K&&K.value?K.value:null}))},g.prototype._addChoice=function(e){var t=e.value,n=e.label,s=n===void 0?null:n,v=e.isSelected,P=v===void 0?!1:v,M=e.isDisabled,K=M===void 0?!1:M,f=e.groupId,u=f===void 0?-1:f,C=e.customProperties,Y=C===void 0?{}:C,V=e.placeholder,U=V===void 0?!1:V,$=e.keyCode,W=$===void 0?-1:$;if(!(typeof t>"u"||t===null)){var J=this._store.choices,z=s||t,ee=J?J.length+1:1,ae="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(ee);this._store.dispatch((0,r.addChoice)({id:ee,groupId:u,elementId:ae,value:t,label:z,disabled:K,customProperties:Y,placeholder:U,keyCode:W})),P&&this._addItem({value:t,label:z,choiceId:ee,customProperties:Y,placeholder:U,keyCode:W})}},g.prototype._addGroup=function(e){var t=this,n=e.group,s=e.id,v=e.valueKey,P=v===void 0?"value":v,M=e.labelKey,K=M===void 0?"label":M,f=(0,k.isType)("Object",n)?n.choices:Array.from(n.getElementsByTagName("OPTION")),u=s||Math.floor(new Date().valueOf()*Math.random()),C=n.disabled?n.disabled:!1;if(f){this._store.dispatch((0,c.addGroup)({value:n.label,id:u,active:!0,disabled:C}));var Y=function(V){var U=V.disabled||V.parentNode&&V.parentNode.disabled;t._addChoice({value:V[P],label:(0,k.isType)("Object",V)?V[K]:V.innerHTML,isSelected:V.selected,isDisabled:U,groupId:u,customProperties:V.customProperties,placeholder:V.placeholder})};f.forEach(Y)}else this._store.dispatch((0,c.addGroup)({value:n.label,id:n.id,active:!1,disabled:n.disabled}))},g.prototype._getTemplate=function(e){for(var t,n=[],s=1;s0?this.element.scrollTop+y-O:a.offsetTop;requestAnimationFrame(function(){c._animateScroll(D,r)})}},d.prototype._scrollDown=function(a,r,c){var l=(c-a)/r,O=l>1?l:1;this.element.scrollTop=a+O},d.prototype._scrollUp=function(a,r,c){var l=(a-c)/r,O=l>1?l:1;this.element.scrollTop=a-O},d.prototype._animateScroll=function(a,r){var c=this,l=_.SCROLLING_SPEED,O=this.element.scrollTop,L=!1;r>0?(this._scrollDown(O,l,a),Oa&&(L=!0)),L&&requestAnimationFrame(function(){c._animateScroll(a,r)})},d}();i.default=h},730:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0});var _=b(799),h=function(){function d(a){var r=a.element,c=a.classNames;if(this.element=r,this.classNames=c,!(r instanceof HTMLInputElement)&&!(r instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}return Object.defineProperty(d.prototype,"isActive",{get:function(){return this.element.dataset.choice==="active"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"value",{get:function(){return this.element.value},set:function(a){this.element.value=a},enumerable:!1,configurable:!0}),d.prototype.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var a=this.element.getAttribute("style");a&&this.element.setAttribute("data-choice-orig-style",a),this.element.setAttribute("data-choice","active")},d.prototype.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var a=this.element.getAttribute("data-choice-orig-style");a?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",a)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},d.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},d.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},d.prototype.triggerEvent=function(a,r){(0,_.dispatchEvent)(this.element,a,r)},d}();i.default=h},541:function(j,i,b){var _=this&&this.__extends||function(){var r=function(c,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,L){O.__proto__=L}||function(O,L){for(var y in L)Object.prototype.hasOwnProperty.call(L,y)&&(O[y]=L[y])},r(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(c,l);function O(){this.constructor=c}c.prototype=l===null?Object.create(l):(O.prototype=l.prototype,new O)}}(),h=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var d=h(b(730)),a=function(r){_(c,r);function c(l){var O=l.element,L=l.classNames,y=l.delimiter,D=r.call(this,{element:O,classNames:L})||this;return D.delimiter=y,D}return Object.defineProperty(c.prototype,"value",{get:function(){return this.element.value},set:function(l){this.element.setAttribute("value",l),this.element.value=l},enumerable:!1,configurable:!0}),c}(d.default);i.default=a},982:function(j,i,b){var _=this&&this.__extends||function(){var r=function(c,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,L){O.__proto__=L}||function(O,L){for(var y in L)Object.prototype.hasOwnProperty.call(L,y)&&(O[y]=L[y])},r(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(c,l);function O(){this.constructor=c}c.prototype=l===null?Object.create(l):(O.prototype=l.prototype,new O)}}(),h=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var d=h(b(730)),a=function(r){_(c,r);function c(l){var O=l.element,L=l.classNames,y=l.template,D=r.call(this,{element:O,classNames:L})||this;return D.template=y,D}return Object.defineProperty(c.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"optionGroups",{get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"options",{get:function(){return Array.from(this.element.options)},set:function(l){var O=this,L=document.createDocumentFragment(),y=function(D){var k=O.template(D);L.appendChild(k)};l.forEach(function(D){return y(D)}),this.appendDocFragment(L)},enumerable:!1,configurable:!0}),c.prototype.appendDocFragment=function(l){this.element.innerHTML="",this.element.appendChild(l)},c}(d.default);i.default=a},883:function(j,i){Object.defineProperty(i,"__esModule",{value:!0}),i.SCROLLING_SPEED=i.SELECT_MULTIPLE_TYPE=i.SELECT_ONE_TYPE=i.TEXT_TYPE=i.KEY_CODES=i.ACTION_TYPES=i.EVENTS=void 0,i.EVENTS={showDropdown:"showDropdown",hideDropdown:"hideDropdown",change:"change",choice:"choice",search:"search",addItem:"addItem",removeItem:"removeItem",highlightItem:"highlightItem",highlightChoice:"highlightChoice",unhighlightItem:"unhighlightItem"},i.ACTION_TYPES={ADD_CHOICE:"ADD_CHOICE",FILTER_CHOICES:"FILTER_CHOICES",ACTIVATE_CHOICES:"ACTIVATE_CHOICES",CLEAR_CHOICES:"CLEAR_CHOICES",ADD_GROUP:"ADD_GROUP",ADD_ITEM:"ADD_ITEM",REMOVE_ITEM:"REMOVE_ITEM",HIGHLIGHT_ITEM:"HIGHLIGHT_ITEM",CLEAR_ALL:"CLEAR_ALL",RESET_TO:"RESET_TO",SET_IS_LOADING:"SET_IS_LOADING"},i.KEY_CODES={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},i.TEXT_TYPE="text",i.SELECT_ONE_TYPE="select-one",i.SELECT_MULTIPLE_TYPE="select-multiple",i.SCROLLING_SPEED=4},789:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CONFIG=i.DEFAULT_CLASSNAMES=void 0;var _=b(799);i.DEFAULT_CLASSNAMES={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"},i.DEFAULT_CONFIG={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,allowHTML:!0,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:_.sortByAlpha,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(h){return'Press Enter to add "'.concat((0,_.sanitise)(h),'"')},maxItemText:function(h){return"Only ".concat(h," values can be added")},valueComparer:function(h,d){return h===d},fuseOptions:{includeScore:!0},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:i.DEFAULT_CLASSNAMES}},18:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},978:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},948:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},359:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},285:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},533:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},187:function(j,i,b){var _=this&&this.__createBinding||(Object.create?function(d,a,r,c){c===void 0&&(c=r);var l=Object.getOwnPropertyDescriptor(a,r);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(d,c,l)}:function(d,a,r,c){c===void 0&&(c=r),d[c]=a[r]}),h=this&&this.__exportStar||function(d,a){for(var r in d)r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&_(a,d,r)};Object.defineProperty(i,"__esModule",{value:!0}),h(b(18),i),h(b(978),i),h(b(948),i),h(b(359),i),h(b(285),i),h(b(533),i),h(b(287),i),h(b(132),i),h(b(837),i),h(b(598),i),h(b(369),i),h(b(37),i),h(b(47),i),h(b(923),i),h(b(876),i)},287:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},132:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},837:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},598:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},37:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},369:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},47:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},923:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},876:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},799:function(j,i){Object.defineProperty(i,"__esModule",{value:!0}),i.parseCustomProperties=i.diff=i.cloneObject=i.existsInArray=i.dispatchEvent=i.sortByScore=i.sortByAlpha=i.strToEl=i.sanitise=i.isScrolledIntoView=i.getAdjacentEl=i.wrap=i.isType=i.getType=i.generateId=i.generateChars=i.getRandomNumber=void 0;var b=function(E,w){return Math.floor(Math.random()*(w-E)+E)};i.getRandomNumber=b;var _=function(E){return Array.from({length:E},function(){return(0,i.getRandomNumber)(0,36).toString(36)}).join("")};i.generateChars=_;var h=function(E,w){var N=E.id||E.name&&"".concat(E.name,"-").concat((0,i.generateChars)(2))||(0,i.generateChars)(4);return N=N.replace(/(:|\.|\[|\]|,)/g,""),N="".concat(w,"-").concat(N),N};i.generateId=h;var d=function(E){return Object.prototype.toString.call(E).slice(8,-1)};i.getType=d;var a=function(E,w){return w!=null&&(0,i.getType)(w)===E};i.isType=a;var r=function(E,w){return w===void 0&&(w=document.createElement("div")),E.parentNode&&(E.nextSibling?E.parentNode.insertBefore(w,E.nextSibling):E.parentNode.appendChild(w)),w.appendChild(E)};i.wrap=r;var c=function(E,w,N){N===void 0&&(N=1);for(var g="".concat(N>0?"next":"previous","ElementSibling"),e=E[g];e;){if(e.matches(w))return e;e=e[g]}return e};i.getAdjacentEl=c;var l=function(E,w,N){if(N===void 0&&(N=1),!E)return!1;var g;return N>0?g=w.scrollTop+w.offsetHeight>=E.offsetTop+E.offsetHeight:g=E.offsetTop>=w.scrollTop,g};i.isScrolledIntoView=l;var O=function(E){return typeof E!="string"?E:E.replace(/&/g,"&").replace(/>/g,">").replace(/-1?h.map(function(y){var D=y;return D.id===parseInt("".concat(c.choiceId),10)&&(D.selected=!0),D}):h}case"REMOVE_ITEM":{var l=d;return l.choiceId&&l.choiceId>-1?h.map(function(y){var D=y;return D.id===parseInt("".concat(l.choiceId),10)&&(D.selected=!1),D}):h}case"FILTER_CHOICES":{var O=d;return h.map(function(y){var D=y;return D.active=O.results.some(function(k){var Q=k.item,Z=k.score;return Q.id===D.id?(D.score=Z,!0):!1}),D})}case"ACTIVATE_CHOICES":{var L=d;return h.map(function(y){var D=y;return D.active=L.active,D})}case"CLEAR_CHOICES":return i.defaultState;default:return h}}i.default=_},871:function(j,i){var b=this&&this.__spreadArray||function(h,d,a){if(a||arguments.length===2)for(var r=0,c=d.length,l;r0?"treeitem":"option"),Object.assign(t.dataset,{choice:"",id:Q,value:Z,selectText:d}),N?(t.classList.add(D),t.dataset.choiceDisabled="",t.setAttribute("aria-disabled","true")):(t.classList.add(L),t.dataset.choiceSelectable=""),t},input:function(_,h){var d=_.classNames,a=d.input,r=d.inputCloned,c=Object.assign(document.createElement("input"),{type:"search",name:"search_terms",className:"".concat(a," ").concat(r),autocomplete:"off",autocapitalize:"off",spellcheck:!1});return c.setAttribute("role","textbox"),c.setAttribute("aria-autocomplete","list"),c.setAttribute("aria-label",h),c},dropdown:function(_){var h=_.classNames,d=h.list,a=h.listDropdown,r=document.createElement("div");return r.classList.add(d,a),r.setAttribute("aria-expanded","false"),r},notice:function(_,h,d){var a,r=_.allowHTML,c=_.classNames,l=c.item,O=c.itemChoice,L=c.noResults,y=c.noChoices;d===void 0&&(d="");var D=[l,O];return d==="no-choices"?D.push(y):d==="no-results"&&D.push(L),Object.assign(document.createElement("div"),(a={},a[r?"innerHTML":"innerText"]=h,a.className=D.join(" "),a))},option:function(_){var h=_.label,d=_.value,a=_.customProperties,r=_.active,c=_.disabled,l=new Option(h,d,!1,r);return a&&(l.dataset.customProperties="".concat(a)),l.disabled=!!c,l}};i.default=b},996:function(j){var i=function(w){return b(w)&&!_(w)};function b(E){return!!E&&typeof E=="object"}function _(E){var w=Object.prototype.toString.call(E);return w==="[object RegExp]"||w==="[object Date]"||a(E)}var h=typeof Symbol=="function"&&Symbol.for,d=h?Symbol.for("react.element"):60103;function a(E){return E.$$typeof===d}function r(E){return Array.isArray(E)?[]:{}}function c(E,w){return w.clone!==!1&&w.isMergeableObject(E)?Z(r(E),E,w):E}function l(E,w,N){return E.concat(w).map(function(g){return c(g,N)})}function O(E,w){if(!w.customMerge)return Z;var N=w.customMerge(E);return typeof N=="function"?N:Z}function L(E){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(E).filter(function(w){return E.propertyIsEnumerable(w)}):[]}function y(E){return Object.keys(E).concat(L(E))}function D(E,w){try{return w in E}catch{return!1}}function k(E,w){return D(E,w)&&!(Object.hasOwnProperty.call(E,w)&&Object.propertyIsEnumerable.call(E,w))}function Q(E,w,N){var g={};return N.isMergeableObject(E)&&y(E).forEach(function(e){g[e]=c(E[e],N)}),y(w).forEach(function(e){k(E,e)||(D(E,e)&&N.isMergeableObject(w[e])?g[e]=O(e,N)(E[e],w[e],N):g[e]=c(w[e],N))}),g}function Z(E,w,N){N=N||{},N.arrayMerge=N.arrayMerge||l,N.isMergeableObject=N.isMergeableObject||i,N.cloneUnlessOtherwiseSpecified=c;var g=Array.isArray(w),e=Array.isArray(E),t=g===e;return t?g?N.arrayMerge(E,w,N):Q(E,w,N):c(w,N)}Z.all=function(w,N){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(g,e){return Z(g,e,N)},{})};var ne=Z;j.exports=ne},221:function(j,i,b){b.r(i),b.d(i,{default:function(){return Se}});function _(p){return Array.isArray?Array.isArray(p):k(p)==="[object Array]"}let h=1/0;function d(p){if(typeof p=="string")return p;let o=p+"";return o=="0"&&1/p==-h?"-0":o}function a(p){return p==null?"":d(p)}function r(p){return typeof p=="string"}function c(p){return typeof p=="number"}function l(p){return p===!0||p===!1||L(p)&&k(p)=="[object Boolean]"}function O(p){return typeof p=="object"}function L(p){return O(p)&&p!==null}function y(p){return p!=null}function D(p){return!p.trim().length}function k(p){return p==null?p===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(p)}let Q="Extended search is not available",Z="Incorrect 'index' type",ne=p=>`Invalid value for key ${p}`,E=p=>`Pattern length exceeds max of ${p}.`,w=p=>`Missing ${p} property in key`,N=p=>`Property 'weight' in key '${p}' must be a positive integer`,g=Object.prototype.hasOwnProperty;class e{constructor(o){this._keys=[],this._keyMap={};let m=0;o.forEach(S=>{let I=t(S);m+=I.weight,this._keys.push(I),this._keyMap[I.id]=I,m+=I.weight}),this._keys.forEach(S=>{S.weight/=m})}get(o){return this._keyMap[o]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function t(p){let o=null,m=null,S=null,I=1,T=null;if(r(p)||_(p))S=p,o=n(p),m=s(p);else{if(!g.call(p,"name"))throw new Error(w("name"));let A=p.name;if(S=A,g.call(p,"weight")&&(I=p.weight,I<=0))throw new Error(N(A));o=n(A),m=s(A),T=p.getFn}return{path:o,id:m,weight:I,src:S,getFn:T}}function n(p){return _(p)?p:p.split(".")}function s(p){return _(p)?p.join("."):p}function v(p,o){let m=[],S=!1,I=(T,A,R)=>{if(y(T))if(!A[R])m.push(T);else{let F=A[R],H=T[F];if(!y(H))return;if(R===A.length-1&&(r(H)||c(H)||l(H)))m.push(a(H));else if(_(H)){S=!0;for(let B=0,x=H.length;Bp.score===o.score?p.idx{this._keysMap[m.id]=S})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,r(this.docs[0])?this.docs.forEach((o,m)=>{this._addString(o,m)}):this.docs.forEach((o,m)=>{this._addObject(o,m)}),this.norm.clear())}add(o){let m=this.size();r(o)?this._addString(o,m):this._addObject(o,m)}removeAt(o){this.records.splice(o,1);for(let m=o,S=this.size();m{let A=I.getFn?I.getFn(o):this.getFn(o,I.path);if(y(A)){if(_(A)){let R=[],F=[{nestedArrIndex:-1,value:A}];for(;F.length;){let{nestedArrIndex:H,value:B}=F.pop();if(y(B))if(r(B)&&!D(B)){let x={v:B,i:H,n:this.norm.get(B)};R.push(x)}else _(B)&&B.forEach((x,G)=>{F.push({nestedArrIndex:G,value:x})})}S.$[T]=R}else if(r(A)&&!D(A)){let R={v:A,n:this.norm.get(A)};S.$[T]=R}}}),this.records.push(S)}toJSON(){return{keys:this.keys,records:this.records}}}function U(p,o,{getFn:m=u.getFn,fieldNormWeight:S=u.fieldNormWeight}={}){let I=new V({getFn:m,fieldNormWeight:S});return I.setKeys(p.map(t)),I.setSources(o),I.create(),I}function $(p,{getFn:o=u.getFn,fieldNormWeight:m=u.fieldNormWeight}={}){let{keys:S,records:I}=p,T=new V({getFn:o,fieldNormWeight:m});return T.setKeys(S),T.setIndexRecords(I),T}function W(p,{errors:o=0,currentLocation:m=0,expectedLocation:S=0,distance:I=u.distance,ignoreLocation:T=u.ignoreLocation}={}){let A=o/p.length;if(T)return A;let R=Math.abs(S-m);return I?A+R/I:R?1:A}function J(p=[],o=u.minMatchCharLength){let m=[],S=-1,I=-1,T=0;for(let A=p.length;T=o&&m.push([S,I]),S=-1)}return p[T-1]&&T-S>=o&&m.push([S,T-1]),m}let z=32;function ee(p,o,m,{location:S=u.location,distance:I=u.distance,threshold:T=u.threshold,findAllMatches:A=u.findAllMatches,minMatchCharLength:R=u.minMatchCharLength,includeMatches:F=u.includeMatches,ignoreLocation:H=u.ignoreLocation}={}){if(o.length>z)throw new Error(E(z));let B=o.length,x=p.length,G=Math.max(0,Math.min(S,x)),q=T,re=G,ue=R>1||F,Ee=ue?Array(x):[],ve;for(;(ve=p.indexOf(o,re))>-1;){let he=W(o,{currentLocation:ve,expectedLocation:G,distance:I,ignoreLocation:H});if(q=Math.min(he,q),re=ve+B,ue){let ge=0;for(;ge=Ue;fe-=1){let Le=fe-1,We=m[p.charAt(Le)];if(ue&&(Ee[Le]=+!!We),Oe[fe]=(Oe[fe+1]<<1|1)&We,he&&(Oe[fe]|=(Ie[fe+1]|Ie[fe])<<1|1|Ie[fe+1]),Oe[fe]&at&&(be=W(o,{errors:he,currentLocation:Le,expectedLocation:G,distance:I,ignoreLocation:H}),be<=q)){if(q=be,re=Le,re<=G)break;Ue=Math.max(1,2*G-re)}}if(W(o,{errors:he+1,currentLocation:G,expectedLocation:G,distance:I,ignoreLocation:H})>q)break;Ie=Oe}let Ke={isMatch:re>=0,score:Math.max(.001,be)};if(ue){let he=J(Ee,R);he.length?F&&(Ke.indices=he):Ke.isMatch=!1}return Ke}function ae(p){let o={};for(let m=0,S=p.length;m{this.chunks.push({pattern:G,alphabet:ae(G),startIndex:q})},x=this.pattern.length;if(x>z){let G=0,q=x%z,re=x-q;for(;G{let{isMatch:ve,score:Ie,indices:be}=ee(o,re,ue,{location:I+Ee,distance:T,threshold:A,findAllMatches:R,minMatchCharLength:F,includeMatches:S,ignoreLocation:H});ve&&(G=!0),x+=Ie,ve&&be&&(B=[...B,...be])});let q={isMatch:G,score:G?x/this.chunks.length:1};return G&&S&&(q.indices=B),q}}class le{constructor(o){this.pattern=o}static isMultiMatch(o){return _e(o,this.multiRegex)}static isSingleMatch(o){return _e(o,this.singleRegex)}search(){}}function _e(p,o){let m=p.match(o);return m?m[1]:null}class te extends le{constructor(o){super(o)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(o){let m=o===this.pattern;return{isMatch:m,score:m?0:1,indices:[0,this.pattern.length-1]}}}class de extends le{constructor(o){super(o)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(o){let S=o.indexOf(this.pattern)===-1;return{isMatch:S,score:S?0:1,indices:[0,o.length-1]}}}class pe extends le{constructor(o){super(o)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(o){let m=o.startsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,this.pattern.length-1]}}}class oe extends le{constructor(o){super(o)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(o){let m=!o.startsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,o.length-1]}}}class Te extends le{constructor(o){super(o)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(o){let m=o.endsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[o.length-this.pattern.length,o.length-1]}}}class Pe extends le{constructor(o){super(o)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(o){let m=!o.endsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,o.length-1]}}}class He extends le{constructor(o,{location:m=u.location,threshold:S=u.threshold,distance:I=u.distance,includeMatches:T=u.includeMatches,findAllMatches:A=u.findAllMatches,minMatchCharLength:R=u.minMatchCharLength,isCaseSensitive:F=u.isCaseSensitive,ignoreLocation:H=u.ignoreLocation}={}){super(o),this._bitapSearch=new ce(o,{location:m,threshold:S,distance:I,includeMatches:T,findAllMatches:A,minMatchCharLength:R,isCaseSensitive:F,ignoreLocation:H})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(o){return this._bitapSearch.searchIn(o)}}class Be extends le{constructor(o){super(o)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(o){let m=0,S,I=[],T=this.pattern.length;for(;(S=o.indexOf(this.pattern,m))>-1;)m=S+T,I.push([S,m-1]);let A=!!I.length;return{isMatch:A,score:A?0:1,indices:I}}}let Me=[te,Be,pe,oe,Pe,Te,de,He],Ve=Me.length,Xe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Je="|";function Qe(p,o={}){return p.split(Je).map(m=>{let S=m.trim().split(Xe).filter(T=>T&&!!T.trim()),I=[];for(let T=0,A=S.length;T!!(p[Ce.AND]||p[Ce.OR]),tt=p=>!!p[je.PATH],it=p=>!_(p)&&O(p)&&!Re(p),ke=p=>({[Ce.AND]:Object.keys(p).map(o=>({[o]:p[o]}))});function xe(p,o,{auto:m=!0}={}){let S=I=>{let T=Object.keys(I),A=tt(I);if(!A&&T.length>1&&!Re(I))return S(ke(I));if(it(I)){let F=A?I[je.PATH]:T[0],H=A?I[je.PATTERN]:I[F];if(!r(H))throw new Error(ne(F));let B={keyId:s(F),pattern:H};return m&&(B.searcher=Ne(H,o)),B}let R={children:[],operator:T[0]};return T.forEach(F=>{let H=I[F];_(H)&&H.forEach(B=>{R.children.push(S(B))})}),R};return Re(p)||(p=ke(p)),S(p)}function nt(p,{ignoreFieldNorm:o=u.ignoreFieldNorm}){p.forEach(m=>{let S=1;m.matches.forEach(({key:I,norm:T,score:A})=>{let R=I?I.weight:null;S*=Math.pow(A===0&&R?Number.EPSILON:A,(R||1)*(o?1:T))}),m.score=S})}function rt(p,o){let m=p.matches;o.matches=[],y(m)&&m.forEach(S=>{if(!y(S.indices)||!S.indices.length)return;let{indices:I,value:T}=S,A={indices:I,value:T};S.key&&(A.key=S.key.src),S.idx>-1&&(A.refIndex=S.idx),o.matches.push(A)})}function st(p,o){o.score=p.score}function ot(p,o,{includeMatches:m=u.includeMatches,includeScore:S=u.includeScore}={}){let I=[];return m&&I.push(rt),S&&I.push(st),p.map(T=>{let{idx:A}=T,R={item:o[A],refIndex:A};return I.length&&I.forEach(F=>{F(T,R)}),R})}class Se{constructor(o,m={},S){this.options={...u,...m},this.options.useExtendedSearch,this._keyStore=new e(this.options.keys),this.setCollection(o,S)}setCollection(o,m){if(this._docs=o,m&&!(m instanceof V))throw new Error(Z);this._myIndex=m||U(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(o){y(o)&&(this._docs.push(o),this._myIndex.add(o))}remove(o=()=>!1){let m=[];for(let S=0,I=this._docs.length;S-1&&(F=F.slice(0,m)),ot(F,this._docs,{includeMatches:S,includeScore:I})}_searchStringList(o){let m=Ne(o,this.options),{records:S}=this._myIndex,I=[];return S.forEach(({v:T,i:A,n:R})=>{if(!y(T))return;let{isMatch:F,score:H,indices:B}=m.searchIn(T);F&&I.push({item:T,idx:A,matches:[{score:H,value:T,norm:R,indices:B}]})}),I}_searchLogical(o){let m=xe(o,this.options),S=(R,F,H)=>{if(!R.children){let{keyId:x,searcher:G}=R,q=this._findMatches({key:this._keyStore.get(x),value:this._myIndex.getValueForItemAtKeyId(F,x),searcher:G});return q&&q.length?[{idx:H,item:F,matches:q}]:[]}let B=[];for(let x=0,G=R.children.length;x{if(y(R)){let H=S(m,R,F);H.length&&(T[F]||(T[F]={idx:F,item:R,matches:[]},A.push(T[F])),H.forEach(({matches:B})=>{T[F].matches.push(...B)}))}}),A}_searchObjectList(o){let m=Ne(o,this.options),{keys:S,records:I}=this._myIndex,T=[];return I.forEach(({$:A,i:R})=>{if(!y(A))return;let F=[];S.forEach((H,B)=>{F.push(...this._findMatches({key:H,value:A[B],searcher:m}))}),F.length&&T.push({idx:R,item:A,matches:F})}),T}_findMatches({key:o,value:m,searcher:S}){if(!y(m))return[];let I=[];if(_(m))m.forEach(({v:T,i:A,n:R})=>{if(!y(T))return;let{isMatch:F,score:H,indices:B}=S.searchIn(T);F&&I.push({score:H,key:o,value:T,idx:A,norm:R,indices:B})});else{let{v:T,n:A}=m,{isMatch:R,score:F,indices:H}=S.searchIn(T);R&&I.push({score:F,key:o,value:T,norm:A,indices:H})}return I}}Se.version="6.6.2",Se.createIndex=U,Se.parseIndex=$,Se.config=u,Se.parseQuery=xe,et(qe)},791:function(j,i,b){b.r(i),b.d(i,{__DO_NOT_USE__ActionTypes:function(){return y},applyMiddleware:function(){return M},bindActionCreators:function(){return v},combineReducers:function(){return n},compose:function(){return P},createStore:function(){return w},legacy_createStore:function(){return N}});function _(f){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},_(f)}function h(f,u){if(_(f)!=="object"||f===null)return f;var C=f[Symbol.toPrimitive];if(C!==void 0){var Y=C.call(f,u||"default");if(_(Y)!=="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(f)}function d(f){var u=h(f,"string");return _(u)==="symbol"?u:String(u)}function a(f,u,C){return u=d(u),u in f?Object.defineProperty(f,u,{value:C,enumerable:!0,configurable:!0,writable:!0}):f[u]=C,f}function r(f,u){var C=Object.keys(f);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(f);u&&(Y=Y.filter(function(V){return Object.getOwnPropertyDescriptor(f,V).enumerable})),C.push.apply(C,Y)}return C}function c(f){for(var u=1;u"u"&&(C=u,u=void 0),typeof C<"u"){if(typeof C!="function")throw new Error(l(1));return C(w)(f,u)}if(typeof f!="function")throw new Error(l(2));var V=f,U=u,$=[],W=$,J=!1;function z(){W===$&&(W=$.slice())}function ee(){if(J)throw new Error(l(3));return U}function ae(te){if(typeof te!="function")throw new Error(l(4));if(J)throw new Error(l(5));var de=!0;return z(),W.push(te),function(){if(de){if(J)throw new Error(l(6));de=!1,z();var oe=W.indexOf(te);W.splice(oe,1),$=null}}}function ce(te){if(!D(te))throw new Error(l(7));if(typeof te.type>"u")throw new Error(l(8));if(J)throw new Error(l(9));try{J=!0,U=V(U,te)}finally{J=!1}for(var de=$=W,pe=0;pe0)return"Unexpected "+($.length>1?"keys":"key")+" "+('"'+$.join('", "')+'" found in '+U+". ")+"Expected to find one of the known reducer keys instead: "+('"'+V.join('", "')+'". Unexpected keys will be ignored.')}function t(f){Object.keys(f).forEach(function(u){var C=f[u],Y=C(void 0,{type:y.INIT});if(typeof Y>"u")throw new Error(l(12));if(typeof C(void 0,{type:y.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(l(13))})}function n(f){for(var u=Object.keys(f),C={},Y=0;Y"u"){var Te=ee&&ee.type;throw new Error(l(14))}le[te]=oe,ce=ce||oe!==pe}return ce=ce||U.length!==Object.keys(z).length,ce?le:z}}function s(f,u){return function(){return u(f.apply(this,arguments))}}function v(f,u){if(typeof f=="function")return s(f,u);if(typeof f!="object"||f===null)throw new Error(l(16));var C={};for(var Y in f){var V=f[Y];typeof V=="function"&&(C[Y]=s(V,u))}return C}function P(){for(var f=arguments.length,u=new Array(f),C=0;Cwindow.pluralize(O,e,{count:e}),noChoicesText:E,noResultsText:L,placeholderValue:k,position:Q??"auto",removeItemButton:se,renderChoiceLimit:D,searchEnabled:h,searchFields:w??["label"],searchPlaceholderValue:E,searchResultLimit:D,shouldSort:!1,searchFloor:a?0:1}),await this.refreshChoices({withInitialOptions:!0}),[null,void 0,""].includes(this.state)||this.select.setChoiceByValue(this.formatState(this.state)),this.refreshPlaceholder(),b&&this.select.showDropdown(),this.$refs.input.addEventListener("change",()=>{this.refreshPlaceholder(),!this.isStateBeingUpdated&&(this.isStateBeingUpdated=!0,this.state=this.select.getValue(!0)??null,this.$nextTick(()=>this.isStateBeingUpdated=!1))}),d&&this.$refs.input.addEventListener("showDropdown",async()=>{this.select.clearChoices(),await this.select.setChoices([{label:c,value:"",disabled:!0}]),await this.refreshChoices()}),a&&(this.$refs.input.addEventListener("search",async e=>{let t=e.detail.value?.trim();this.isSearching=!0,this.select.clearChoices(),await this.select.setChoices([{label:[null,void 0,""].includes(t)?c:ne,value:"",disabled:!0}])}),this.$refs.input.addEventListener("search",Alpine.debounce(async e=>{await this.refreshChoices({search:e.detail.value?.trim()}),this.isSearching=!1},Z))),_||window.addEventListener("filament-forms::select.refreshSelectedOptionLabel",async e=>{e.detail.livewireId===r&&e.detail.statePath===g&&await this.refreshChoices({withInitialOptions:!1})}),this.$watch("state",async()=>{this.select&&(this.refreshPlaceholder(),!this.isStateBeingUpdated&&await this.refreshChoices({withInitialOptions:!d}))})},destroy:function(){this.select.destroy(),this.select=null},refreshChoices:async function(e={}){let t=await this.getChoices(e);this.select&&(this.select.clearStore(),this.refreshPlaceholder(),this.setChoices(t),[null,void 0,""].includes(this.state)||this.select.setChoiceByValue(this.formatState(this.state)))},setChoices:function(e){this.select.setChoices(e,"value","label",!0)},getChoices:async function(e={}){let t=await this.getExistingOptions(e);return t.concat(await this.getMissingOptions(t))},getExistingOptions:async function({search:e,withInitialOptions:t}){if(t)return y;let n=[];return e!==""&&e!==null&&e!==void 0?n=await i(e):n=await j(),n.map(s=>s.choices?(s.choices=s.choices.map(v=>(v.selected=Array.isArray(this.state)?this.state.includes(v.value):this.state===v.value,v)),s):(s.selected=Array.isArray(this.state)?this.state.includes(s.value):this.state===s.value,s))},refreshPlaceholder:function(){_||(this.select._renderItems(),[null,void 0,""].includes(this.state)&&(this.$el.querySelector(".choices__list--single").innerHTML=`
${k??""}
`))},formatState:function(e){return _?(e??[]).map(t=>t?.toString()):e?.toString()},getMissingOptions:async function(e){let t=this.formatState(this.state);if([null,void 0,"",[],{}].includes(t))return{};let n=new Set;return e.forEach(s=>{if(s.choices){s.choices.forEach(v=>n.add(v.value));return}n.add(s.value)}),_?t.every(s=>n.has(s))?{}:(await me()).filter(s=>!n.has(s.value)).map(s=>(s.selected=!0,s)):n.has(t)?n:[{label:await X(),value:t,selected:!0}]}}}export{vt as default}; +var lt=Object.create;var Ge=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var ht=Object.getPrototypeOf,dt=Object.prototype.hasOwnProperty;var ft=(se,ie)=>()=>(ie||se((ie={exports:{}}).exports,ie),ie.exports);var pt=(se,ie,X,me)=>{if(ie&&typeof ie=="object"||typeof ie=="function")for(let j of ut(ie))!dt.call(se,j)&&j!==X&&Ge(se,j,{get:()=>ie[j],enumerable:!(me=ct(ie,j))||me.enumerable});return se};var mt=(se,ie,X)=>(X=se!=null?lt(ht(se)):{},pt(ie||!se||!se.__esModule?Ge(X,"default",{value:se,enumerable:!0}):X,se));var $e=ft((Ae,Ye)=>{(function(ie,X){typeof Ae=="object"&&typeof Ye=="object"?Ye.exports=X():typeof define=="function"&&define.amd?define([],X):typeof Ae=="object"?Ae.Choices=X():ie.Choices=X()})(window,function(){return function(){"use strict";var se={282:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.clearChoices=i.activateChoices=i.filterChoices=i.addChoice=void 0;var _=b(883),h=function(c){var l=c.value,O=c.label,L=c.id,y=c.groupId,D=c.disabled,k=c.elementId,Q=c.customProperties,Z=c.placeholder,ne=c.keyCode;return{type:_.ACTION_TYPES.ADD_CHOICE,value:l,label:O,id:L,groupId:y,disabled:D,elementId:k,customProperties:Q,placeholder:Z,keyCode:ne}};i.addChoice=h;var d=function(c){return{type:_.ACTION_TYPES.FILTER_CHOICES,results:c}};i.filterChoices=d;var a=function(c){return c===void 0&&(c=!0),{type:_.ACTION_TYPES.ACTIVATE_CHOICES,active:c}};i.activateChoices=a;var r=function(){return{type:_.ACTION_TYPES.CLEAR_CHOICES}};i.clearChoices=r},783:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.addGroup=void 0;var _=b(883),h=function(d){var a=d.value,r=d.id,c=d.active,l=d.disabled;return{type:_.ACTION_TYPES.ADD_GROUP,value:a,id:r,active:c,disabled:l}};i.addGroup=h},464:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.highlightItem=i.removeItem=i.addItem=void 0;var _=b(883),h=function(r){var c=r.value,l=r.label,O=r.id,L=r.choiceId,y=r.groupId,D=r.customProperties,k=r.placeholder,Q=r.keyCode;return{type:_.ACTION_TYPES.ADD_ITEM,value:c,label:l,id:O,choiceId:L,groupId:y,customProperties:D,placeholder:k,keyCode:Q}};i.addItem=h;var d=function(r,c){return{type:_.ACTION_TYPES.REMOVE_ITEM,id:r,choiceId:c}};i.removeItem=d;var a=function(r,c){return{type:_.ACTION_TYPES.HIGHLIGHT_ITEM,id:r,highlighted:c}};i.highlightItem=a},137:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.setIsLoading=i.resetTo=i.clearAll=void 0;var _=b(883),h=function(){return{type:_.ACTION_TYPES.CLEAR_ALL}};i.clearAll=h;var d=function(r){return{type:_.ACTION_TYPES.RESET_TO,state:r}};i.resetTo=d;var a=function(r){return{type:_.ACTION_TYPES.SET_IS_LOADING,isLoading:r}};i.setIsLoading=a},373:function(j,i,b){var _=this&&this.__spreadArray||function(g,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,v;n=0?this._store.getGroupById(v):null;return this._store.dispatch((0,l.highlightItem)(n,!0)),t&&this.passedElement.triggerEvent(y.EVENTS.highlightItem,{id:n,value:M,label:f,groupValue:u&&u.value?u.value:null}),this},g.prototype.unhighlightItem=function(e){if(!e||!e.id)return this;var t=e.id,n=e.groupId,s=n===void 0?-1:n,v=e.value,P=v===void 0?"":v,M=e.label,K=M===void 0?"":M,f=s>=0?this._store.getGroupById(s):null;return this._store.dispatch((0,l.highlightItem)(t,!1)),this.passedElement.triggerEvent(y.EVENTS.highlightItem,{id:t,value:P,label:K,groupValue:f&&f.value?f.value:null}),this},g.prototype.highlightAll=function(){var e=this;return this._store.items.forEach(function(t){return e.highlightItem(t)}),this},g.prototype.unhighlightAll=function(){var e=this;return this._store.items.forEach(function(t){return e.unhighlightItem(t)}),this},g.prototype.removeActiveItemsByValue=function(e){var t=this;return this._store.activeItems.filter(function(n){return n.value===e}).forEach(function(n){return t._removeItem(n)}),this},g.prototype.removeActiveItems=function(e){var t=this;return this._store.activeItems.filter(function(n){var s=n.id;return s!==e}).forEach(function(n){return t._removeItem(n)}),this},g.prototype.removeHighlightedItems=function(e){var t=this;return e===void 0&&(e=!1),this._store.highlightedActiveItems.forEach(function(n){t._removeItem(n),e&&t._triggerChange(n.value)}),this},g.prototype.showDropdown=function(e){var t=this;return this.dropdown.isActive?this:(requestAnimationFrame(function(){t.dropdown.show(),t.containerOuter.open(t.dropdown.distanceFromTopWindow),!e&&t._canSearch&&t.input.focus(),t.passedElement.triggerEvent(y.EVENTS.showDropdown,{})}),this)},g.prototype.hideDropdown=function(e){var t=this;return this.dropdown.isActive?(requestAnimationFrame(function(){t.dropdown.hide(),t.containerOuter.close(),!e&&t._canSearch&&(t.input.removeActiveDescendant(),t.input.blur()),t.passedElement.triggerEvent(y.EVENTS.hideDropdown,{})}),this):this},g.prototype.getValue=function(e){e===void 0&&(e=!1);var t=this._store.activeItems.reduce(function(n,s){var v=e?s.value:s;return n.push(v),n},[]);return this._isSelectOneElement?t[0]:t},g.prototype.setValue=function(e){var t=this;return this.initialised?(e.forEach(function(n){return t._setChoiceOrItem(n)}),this):this},g.prototype.setChoiceByValue=function(e){var t=this;if(!this.initialised||this._isTextElement)return this;var n=Array.isArray(e)?e:[e];return n.forEach(function(s){return t._findAndSelectChoiceByValue(s)}),this},g.prototype.setChoices=function(e,t,n,s){var v=this;if(e===void 0&&(e=[]),t===void 0&&(t="value"),n===void 0&&(n="label"),s===void 0&&(s=!1),!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if(typeof t!="string"||!t)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(s&&this.clearChoices(),typeof e=="function"){var P=e(this);if(typeof Promise=="function"&&P instanceof Promise)return new Promise(function(M){return requestAnimationFrame(M)}).then(function(){return v._handleLoadingState(!0)}).then(function(){return P}).then(function(M){return v.setChoices(M,t,n,s)}).catch(function(M){v.config.silent||console.error(M)}).then(function(){return v._handleLoadingState(!1)}).then(function(){return v});if(!Array.isArray(P))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof P));return this.setChoices(P,t,n,!1)}if(!Array.isArray(e))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._startLoading(),e.forEach(function(M){if(M.choices)v._addGroup({id:M.id?parseInt("".concat(M.id),10):null,group:M,valueKey:t,labelKey:n});else{var K=M;v._addChoice({value:K[t],label:K[n],isSelected:!!K.selected,isDisabled:!!K.disabled,placeholder:!!K.placeholder,customProperties:K.customProperties})}}),this._stopLoading(),this},g.prototype.clearChoices=function(){return this._store.dispatch((0,r.clearChoices)()),this},g.prototype.clearStore=function(){return this._store.dispatch((0,O.clearAll)()),this},g.prototype.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0))),this},g.prototype._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,t=this._isSelectElement,n=this._currentState.items!==this._prevState.items;e&&(t&&this._renderChoices(),n&&this._renderItems(),this._prevState=this._currentState)}},g.prototype._renderChoices=function(){var e=this,t=this._store,n=t.activeGroups,s=t.activeChoices,v=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(function(){return e.choiceList.scrollToTop()}),n.length>=1&&!this._isSearching){var P=s.filter(function(C){return C.placeholder===!0&&C.groupId===-1});P.length>=1&&(v=this._createChoicesFragment(P,v)),v=this._createGroupsFragment(n,s,v)}else s.length>=1&&(v=this._createChoicesFragment(s,v));if(v.childNodes&&v.childNodes.length>0){var M=this._store.activeItems,K=this._canAddItem(M,this.input.value);if(K.response)this.choiceList.append(v),this._highlightChoice();else{var f=this._getTemplate("notice",K.notice);this.choiceList.append(f)}}else{var u=void 0,f=void 0;this._isSearching?(f=typeof this.config.noResultsText=="function"?this.config.noResultsText():this.config.noResultsText,u=this._getTemplate("notice",f,"no-results")):(f=typeof this.config.noChoicesText=="function"?this.config.noChoicesText():this.config.noChoicesText,u=this._getTemplate("notice",f,"no-choices")),this.choiceList.append(u)}},g.prototype._renderItems=function(){var e=this._store.activeItems||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},g.prototype._createGroupsFragment=function(e,t,n){var s=this;n===void 0&&(n=document.createDocumentFragment());var v=function(P){return t.filter(function(M){return s._isSelectOneElement?M.groupId===P.id:M.groupId===P.id&&(s.config.renderSelectedChoices==="always"||!M.selected)})};return this.config.shouldSort&&e.sort(this.config.sorter),e.forEach(function(P){var M=v(P);if(M.length>=1){var K=s._getTemplate("choiceGroup",P);n.appendChild(K),s._createChoicesFragment(M,n,!0)}}),n},g.prototype._createChoicesFragment=function(e,t,n){var s=this;t===void 0&&(t=document.createDocumentFragment()),n===void 0&&(n=!1);var v=this.config,P=v.renderSelectedChoices,M=v.searchResultLimit,K=v.renderChoiceLimit,f=this._isSearching?k.sortByScore:this.config.sorter,u=function(z){var ee=P==="auto"?s._isSelectOneElement||!z.selected:!0;if(ee){var ae=s._getTemplate("choice",z,s.config.itemSelectText);t.appendChild(ae)}},C=e;P==="auto"&&!this._isSelectOneElement&&(C=e.filter(function(z){return!z.selected}));var Y=C.reduce(function(z,ee){return ee.placeholder?z.placeholderChoices.push(ee):z.normalChoices.push(ee),z},{placeholderChoices:[],normalChoices:[]}),V=Y.placeholderChoices,U=Y.normalChoices;(this.config.shouldSort||this._isSearching)&&U.sort(f);var $=C.length,W=this._isSelectOneElement?_(_([],V,!0),U,!0):U;this._isSearching?$=M:K&&K>0&&!n&&($=K);for(var J=0;J<$;J+=1)W[J]&&u(W[J]);return t},g.prototype._createItemsFragment=function(e,t){var n=this;t===void 0&&(t=document.createDocumentFragment());var s=this.config,v=s.shouldSortItems,P=s.sorter,M=s.removeItemButton;v&&!this._isSelectOneElement&&e.sort(P),this._isTextElement?this.passedElement.value=e.map(function(f){var u=f.value;return u}).join(this.config.delimiter):this.passedElement.options=e;var K=function(f){var u=n._getTemplate("item",f,M);t.appendChild(u)};return e.forEach(K),t},g.prototype._triggerChange=function(e){e!=null&&this.passedElement.triggerEvent(y.EVENTS.change,{value:e})},g.prototype._selectPlaceholderChoice=function(e){this._addItem({value:e.value,label:e.label,choiceId:e.id,groupId:e.groupId,placeholder:e.placeholder}),this._triggerChange(e.value)},g.prototype._handleButtonAction=function(e,t){if(!(!e||!t||!this.config.removeItems||!this.config.removeItemButton)){var n=t.parentNode&&t.parentNode.dataset.id,s=n&&e.find(function(v){return v.id===parseInt(n,10)});s&&(this._removeItem(s),this._triggerChange(s.value),this._isSelectOneElement&&this._store.placeholderChoice&&this._selectPlaceholderChoice(this._store.placeholderChoice))}},g.prototype._handleItemAction=function(e,t,n){var s=this;if(n===void 0&&(n=!1),!(!e||!t||!this.config.removeItems||this._isSelectOneElement)){var v=t.dataset.id;e.forEach(function(P){P.id===parseInt("".concat(v),10)&&!P.highlighted?s.highlightItem(P):!n&&P.highlighted&&s.unhighlightItem(P)}),this.input.focus()}},g.prototype._handleChoiceAction=function(e,t){if(!(!e||!t)){var n=t.dataset.id,s=n&&this._store.getChoiceById(n);if(s){var v=e[0]&&e[0].keyCode?e[0].keyCode:void 0,P=this.dropdown.isActive;if(s.keyCode=v,this.passedElement.triggerEvent(y.EVENTS.choice,{choice:s}),!s.selected&&!s.disabled){var M=this._canAddItem(e,s.value);M.response&&(this._addItem({value:s.value,label:s.label,choiceId:s.id,groupId:s.groupId,customProperties:s.customProperties,placeholder:s.placeholder,keyCode:s.keyCode}),this._triggerChange(s.value))}this.clearInput(),P&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},g.prototype._handleBackspace=function(e){if(!(!this.config.removeItems||!e)){var t=e[e.length-1],n=e.some(function(s){return s.highlighted});this.config.editItems&&!n&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(n||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}},g.prototype._startLoading=function(){this._store.dispatch((0,O.setIsLoading)(!0))},g.prototype._stopLoading=function(){this._store.dispatch((0,O.setIsLoading)(!1))},g.prototype._handleLoadingState=function(e){e===void 0&&(e=!0);var t=this.itemList.getChild(".".concat(this.config.classNames.placeholder));e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText),t&&this.itemList.append(t)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t&&(t.innerHTML=this._placeholderValue||""):this.input.placeholder=this._placeholderValue||"")},g.prototype._handleSearch=function(e){if(this.input.isFocussed){var t=this._store.choices,n=this.config,s=n.searchFloor,v=n.searchChoices,P=t.some(function(K){return!K.active});if(e!==null&&typeof e<"u"&&e.length>=s){var M=v?this._searchChoices(e):0;this.passedElement.triggerEvent(y.EVENTS.search,{value:e,resultCount:M})}else P&&(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0)))}},g.prototype._canAddItem=function(e,t){var n=!0,s=typeof this.config.addItemText=="function"?this.config.addItemText(t):this.config.addItemText;if(!this._isSelectOneElement){var v=(0,k.existsInArray)(e,t);this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(n=!1,s=typeof this.config.maxItemText=="function"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&v&&n&&(n=!1,s=typeof this.config.uniqueItemText=="function"?this.config.uniqueItemText(t):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&n&&typeof this.config.addItemFilter=="function"&&!this.config.addItemFilter(t)&&(n=!1,s=typeof this.config.customAddItemText=="function"?this.config.customAddItemText(t):this.config.customAddItemText)}return{response:n,notice:s}},g.prototype._searchChoices=function(e){var t=typeof e=="string"?e.trim():e,n=typeof this._currentValue=="string"?this._currentValue.trim():this._currentValue;if(t.length<1&&t==="".concat(n," "))return 0;var s=this._store.searchableChoices,v=t,P=Object.assign(this.config.fuseOptions,{keys:_([],this.config.searchFields,!0),includeMatches:!0}),M=new a.default(s,P),K=M.search(v);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch((0,r.filterChoices)(K)),K.length},g.prototype._addEventListeners=function(){var e=document.documentElement;e.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},g.prototype._removeEventListeners=function(){var e=document.documentElement;e.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},g.prototype._onKeyDown=function(e){var t=e.keyCode,n=this._store.activeItems,s=this.input.isFocussed,v=this.dropdown.isActive,P=this.itemList.hasChildren(),M=String.fromCharCode(t),K=/[^\x00-\x1F]/.test(M),f=y.KEY_CODES.BACK_KEY,u=y.KEY_CODES.DELETE_KEY,C=y.KEY_CODES.ENTER_KEY,Y=y.KEY_CODES.A_KEY,V=y.KEY_CODES.ESC_KEY,U=y.KEY_CODES.UP_KEY,$=y.KEY_CODES.DOWN_KEY,W=y.KEY_CODES.PAGE_UP_KEY,J=y.KEY_CODES.PAGE_DOWN_KEY;switch(!this._isTextElement&&!v&&K&&(this.showDropdown(),this.input.isFocussed||(this.input.value+=e.key.toLowerCase())),t){case Y:return this._onSelectKey(e,P);case C:return this._onEnterKey(e,n,v);case V:return this._onEscapeKey(v);case U:case W:case $:case J:return this._onDirectionKey(e,v);case u:case f:return this._onDeleteKey(e,n,s);default:}},g.prototype._onKeyUp=function(e){var t=e.target,n=e.keyCode,s=this.input.value,v=this._store.activeItems,P=this._canAddItem(v,s),M=y.KEY_CODES.BACK_KEY,K=y.KEY_CODES.DELETE_KEY;if(this._isTextElement){var f=P.notice&&s;if(f){var u=this._getTemplate("notice",P.notice);this.dropdown.element.innerHTML=u.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0)}else{var C=n===M||n===K,Y=C&&t&&!t.value,V=!this._isTextElement&&this._isSearching,U=this._canSearch&&P.response;Y&&V?(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0))):U&&this._handleSearch(this.input.rawValue)}this._canSearch=this.config.searchEnabled},g.prototype._onSelectKey=function(e,t){var n=e.ctrlKey,s=e.metaKey,v=n||s;if(v&&t){this._canSearch=!1;var P=this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement;P&&this.highlightAll()}},g.prototype._onEnterKey=function(e,t,n){var s=e.target,v=y.KEY_CODES.ENTER_KEY,P=s&&s.hasAttribute("data-button");if(this._isTextElement&&s&&s.value){var M=this.input.value,K=this._canAddItem(t,M);K.response&&(this.hideDropdown(!0),this._addItem({value:M}),this._triggerChange(M),this.clearInput())}if(P&&(this._handleButtonAction(t,s),e.preventDefault()),n){var f=this.dropdown.getChild(".".concat(this.config.classNames.highlightedState));f&&(t[0]&&(t[0].keyCode=v),this._handleChoiceAction(t,f)),e.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),e.preventDefault())},g.prototype._onEscapeKey=function(e){e&&(this.hideDropdown(!0),this.containerOuter.focus())},g.prototype._onDirectionKey=function(e,t){var n=e.keyCode,s=e.metaKey,v=y.KEY_CODES.DOWN_KEY,P=y.KEY_CODES.PAGE_UP_KEY,M=y.KEY_CODES.PAGE_DOWN_KEY;if(t||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var K=n===v||n===M?1:-1,f=s||n===M||n===P,u="[data-choice-selectable]",C=void 0;if(f)K>0?C=this.dropdown.element.querySelector("".concat(u,":last-of-type")):C=this.dropdown.element.querySelector(u);else{var Y=this.dropdown.element.querySelector(".".concat(this.config.classNames.highlightedState));Y?C=(0,k.getAdjacentEl)(Y,u,K):C=this.dropdown.element.querySelector(u)}C&&((0,k.isScrolledIntoView)(C,this.choiceList.element,K)||this.choiceList.scrollToChildElement(C,K),this._highlightChoice(C)),e.preventDefault()}},g.prototype._onDeleteKey=function(e,t,n){var s=e.target;!this._isSelectOneElement&&!s.value&&n&&(this._handleBackspace(t),e.preventDefault())},g.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},g.prototype._onTouchEnd=function(e){var t=(e||e.touches[0]).target,n=this._wasTap&&this.containerOuter.element.contains(t);if(n){var s=t===this.containerOuter.element||t===this.containerInner.element;s&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()}this._wasTap=!0},g.prototype._onMouseDown=function(e){var t=e.target;if(t instanceof HTMLElement){if(E&&this.choiceList.element.contains(t)){var n=this.choiceList.element.firstElementChild,s=this._direction==="ltr"?e.offsetX>=n.offsetWidth:e.offsetX0;s&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0)}},g.prototype._onFocus=function(e){var t,n=this,s=e.target,v=s&&this.containerOuter.element.contains(s);if(v){var P=(t={},t[y.TEXT_TYPE]=function(){s===n.input.element&&n.containerOuter.addFocusState()},t[y.SELECT_ONE_TYPE]=function(){n.containerOuter.addFocusState(),s===n.input.element&&n.showDropdown(!0)},t[y.SELECT_MULTIPLE_TYPE]=function(){s===n.input.element&&(n.showDropdown(!0),n.containerOuter.addFocusState())},t);P[this.passedElement.element.type]()}},g.prototype._onBlur=function(e){var t,n=this,s=e.target,v=s&&this.containerOuter.element.contains(s);if(v&&!this._isScrollingOnIe){var P=this._store.activeItems,M=P.some(function(f){return f.highlighted}),K=(t={},t[y.TEXT_TYPE]=function(){s===n.input.element&&(n.containerOuter.removeFocusState(),M&&n.unhighlightAll(),n.hideDropdown(!0))},t[y.SELECT_ONE_TYPE]=function(){n.containerOuter.removeFocusState(),(s===n.input.element||s===n.containerOuter.element&&!n._canSearch)&&n.hideDropdown(!0)},t[y.SELECT_MULTIPLE_TYPE]=function(){s===n.input.element&&(n.containerOuter.removeFocusState(),n.hideDropdown(!0),M&&n.unhighlightAll())},t);K[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},g.prototype._onFormReset=function(){this._store.dispatch((0,O.resetTo)(this._initialState))},g.prototype._highlightChoice=function(e){var t=this;e===void 0&&(e=null);var n=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(n.length){var s=e,v=Array.from(this.dropdown.element.querySelectorAll(".".concat(this.config.classNames.highlightedState)));v.forEach(function(P){P.classList.remove(t.config.classNames.highlightedState),P.setAttribute("aria-selected","false")}),s?this._highlightPosition=n.indexOf(s):(n.length>this._highlightPosition?s=n[this._highlightPosition]:s=n[n.length-1],s||(s=n[0])),s.classList.add(this.config.classNames.highlightedState),s.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(y.EVENTS.highlightChoice,{el:s}),this.dropdown.isActive&&(this.input.setActiveDescendant(s.id),this.containerOuter.setActiveDescendant(s.id))}},g.prototype._addItem=function(e){var t=e.value,n=e.label,s=n===void 0?null:n,v=e.choiceId,P=v===void 0?-1:v,M=e.groupId,K=M===void 0?-1:M,f=e.customProperties,u=f===void 0?{}:f,C=e.placeholder,Y=C===void 0?!1:C,V=e.keyCode,U=V===void 0?-1:V,$=typeof t=="string"?t.trim():t,W=this._store.items,J=s||$,z=P||-1,ee=K>=0?this._store.getGroupById(K):null,ae=W?W.length+1:1;this.config.prependValue&&($=this.config.prependValue+$.toString()),this.config.appendValue&&($+=this.config.appendValue.toString()),this._store.dispatch((0,l.addItem)({value:$,label:J,id:ae,choiceId:z,groupId:K,customProperties:u,placeholder:Y,keyCode:U})),this._isSelectOneElement&&this.removeActiveItems(ae),this.passedElement.triggerEvent(y.EVENTS.addItem,{id:ae,value:$,label:J,customProperties:u,groupValue:ee&&ee.value?ee.value:null,keyCode:U})},g.prototype._removeItem=function(e){var t=e.id,n=e.value,s=e.label,v=e.customProperties,P=e.choiceId,M=e.groupId,K=M&&M>=0?this._store.getGroupById(M):null;!t||!P||(this._store.dispatch((0,l.removeItem)(t,P)),this.passedElement.triggerEvent(y.EVENTS.removeItem,{id:t,value:n,label:s,customProperties:v,groupValue:K&&K.value?K.value:null}))},g.prototype._addChoice=function(e){var t=e.value,n=e.label,s=n===void 0?null:n,v=e.isSelected,P=v===void 0?!1:v,M=e.isDisabled,K=M===void 0?!1:M,f=e.groupId,u=f===void 0?-1:f,C=e.customProperties,Y=C===void 0?{}:C,V=e.placeholder,U=V===void 0?!1:V,$=e.keyCode,W=$===void 0?-1:$;if(!(typeof t>"u"||t===null)){var J=this._store.choices,z=s||t,ee=J?J.length+1:1,ae="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(ee);this._store.dispatch((0,r.addChoice)({id:ee,groupId:u,elementId:ae,value:t,label:z,disabled:K,customProperties:Y,placeholder:U,keyCode:W})),P&&this._addItem({value:t,label:z,choiceId:ee,customProperties:Y,placeholder:U,keyCode:W})}},g.prototype._addGroup=function(e){var t=this,n=e.group,s=e.id,v=e.valueKey,P=v===void 0?"value":v,M=e.labelKey,K=M===void 0?"label":M,f=(0,k.isType)("Object",n)?n.choices:Array.from(n.getElementsByTagName("OPTION")),u=s||Math.floor(new Date().valueOf()*Math.random()),C=n.disabled?n.disabled:!1;if(f){this._store.dispatch((0,c.addGroup)({value:n.label,id:u,active:!0,disabled:C}));var Y=function(V){var U=V.disabled||V.parentNode&&V.parentNode.disabled;t._addChoice({value:V[P],label:(0,k.isType)("Object",V)?V[K]:V.innerHTML,isSelected:V.selected,isDisabled:U,groupId:u,customProperties:V.customProperties,placeholder:V.placeholder})};f.forEach(Y)}else this._store.dispatch((0,c.addGroup)({value:n.label,id:n.id,active:!1,disabled:n.disabled}))},g.prototype._getTemplate=function(e){for(var t,n=[],s=1;s0?this.element.scrollTop+y-O:a.offsetTop;requestAnimationFrame(function(){c._animateScroll(D,r)})}},d.prototype._scrollDown=function(a,r,c){var l=(c-a)/r,O=l>1?l:1;this.element.scrollTop=a+O},d.prototype._scrollUp=function(a,r,c){var l=(a-c)/r,O=l>1?l:1;this.element.scrollTop=a-O},d.prototype._animateScroll=function(a,r){var c=this,l=_.SCROLLING_SPEED,O=this.element.scrollTop,L=!1;r>0?(this._scrollDown(O,l,a),Oa&&(L=!0)),L&&requestAnimationFrame(function(){c._animateScroll(a,r)})},d}();i.default=h},730:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0});var _=b(799),h=function(){function d(a){var r=a.element,c=a.classNames;if(this.element=r,this.classNames=c,!(r instanceof HTMLInputElement)&&!(r instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}return Object.defineProperty(d.prototype,"isActive",{get:function(){return this.element.dataset.choice==="active"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"value",{get:function(){return this.element.value},set:function(a){this.element.value=a},enumerable:!1,configurable:!0}),d.prototype.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var a=this.element.getAttribute("style");a&&this.element.setAttribute("data-choice-orig-style",a),this.element.setAttribute("data-choice","active")},d.prototype.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var a=this.element.getAttribute("data-choice-orig-style");a?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",a)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},d.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},d.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},d.prototype.triggerEvent=function(a,r){(0,_.dispatchEvent)(this.element,a,r)},d}();i.default=h},541:function(j,i,b){var _=this&&this.__extends||function(){var r=function(c,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,L){O.__proto__=L}||function(O,L){for(var y in L)Object.prototype.hasOwnProperty.call(L,y)&&(O[y]=L[y])},r(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(c,l);function O(){this.constructor=c}c.prototype=l===null?Object.create(l):(O.prototype=l.prototype,new O)}}(),h=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var d=h(b(730)),a=function(r){_(c,r);function c(l){var O=l.element,L=l.classNames,y=l.delimiter,D=r.call(this,{element:O,classNames:L})||this;return D.delimiter=y,D}return Object.defineProperty(c.prototype,"value",{get:function(){return this.element.value},set:function(l){this.element.setAttribute("value",l),this.element.value=l},enumerable:!1,configurable:!0}),c}(d.default);i.default=a},982:function(j,i,b){var _=this&&this.__extends||function(){var r=function(c,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,L){O.__proto__=L}||function(O,L){for(var y in L)Object.prototype.hasOwnProperty.call(L,y)&&(O[y]=L[y])},r(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(c,l);function O(){this.constructor=c}c.prototype=l===null?Object.create(l):(O.prototype=l.prototype,new O)}}(),h=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var d=h(b(730)),a=function(r){_(c,r);function c(l){var O=l.element,L=l.classNames,y=l.template,D=r.call(this,{element:O,classNames:L})||this;return D.template=y,D}return Object.defineProperty(c.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"optionGroups",{get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"options",{get:function(){return Array.from(this.element.options)},set:function(l){var O=this,L=document.createDocumentFragment(),y=function(D){var k=O.template(D);L.appendChild(k)};l.forEach(function(D){return y(D)}),this.appendDocFragment(L)},enumerable:!1,configurable:!0}),c.prototype.appendDocFragment=function(l){this.element.innerHTML="",this.element.appendChild(l)},c}(d.default);i.default=a},883:function(j,i){Object.defineProperty(i,"__esModule",{value:!0}),i.SCROLLING_SPEED=i.SELECT_MULTIPLE_TYPE=i.SELECT_ONE_TYPE=i.TEXT_TYPE=i.KEY_CODES=i.ACTION_TYPES=i.EVENTS=void 0,i.EVENTS={showDropdown:"showDropdown",hideDropdown:"hideDropdown",change:"change",choice:"choice",search:"search",addItem:"addItem",removeItem:"removeItem",highlightItem:"highlightItem",highlightChoice:"highlightChoice",unhighlightItem:"unhighlightItem"},i.ACTION_TYPES={ADD_CHOICE:"ADD_CHOICE",FILTER_CHOICES:"FILTER_CHOICES",ACTIVATE_CHOICES:"ACTIVATE_CHOICES",CLEAR_CHOICES:"CLEAR_CHOICES",ADD_GROUP:"ADD_GROUP",ADD_ITEM:"ADD_ITEM",REMOVE_ITEM:"REMOVE_ITEM",HIGHLIGHT_ITEM:"HIGHLIGHT_ITEM",CLEAR_ALL:"CLEAR_ALL",RESET_TO:"RESET_TO",SET_IS_LOADING:"SET_IS_LOADING"},i.KEY_CODES={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},i.TEXT_TYPE="text",i.SELECT_ONE_TYPE="select-one",i.SELECT_MULTIPLE_TYPE="select-multiple",i.SCROLLING_SPEED=4},789:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CONFIG=i.DEFAULT_CLASSNAMES=void 0;var _=b(799);i.DEFAULT_CLASSNAMES={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"},i.DEFAULT_CONFIG={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,allowHTML:!0,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:_.sortByAlpha,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(h){return'Press Enter to add "'.concat((0,_.sanitise)(h),'"')},maxItemText:function(h){return"Only ".concat(h," values can be added")},valueComparer:function(h,d){return h===d},fuseOptions:{includeScore:!0},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:i.DEFAULT_CLASSNAMES}},18:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},978:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},948:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},359:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},285:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},533:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},187:function(j,i,b){var _=this&&this.__createBinding||(Object.create?function(d,a,r,c){c===void 0&&(c=r);var l=Object.getOwnPropertyDescriptor(a,r);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(d,c,l)}:function(d,a,r,c){c===void 0&&(c=r),d[c]=a[r]}),h=this&&this.__exportStar||function(d,a){for(var r in d)r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&_(a,d,r)};Object.defineProperty(i,"__esModule",{value:!0}),h(b(18),i),h(b(978),i),h(b(948),i),h(b(359),i),h(b(285),i),h(b(533),i),h(b(287),i),h(b(132),i),h(b(837),i),h(b(598),i),h(b(369),i),h(b(37),i),h(b(47),i),h(b(923),i),h(b(876),i)},287:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},132:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},837:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},598:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},37:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},369:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},47:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},923:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},876:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},799:function(j,i){Object.defineProperty(i,"__esModule",{value:!0}),i.parseCustomProperties=i.diff=i.cloneObject=i.existsInArray=i.dispatchEvent=i.sortByScore=i.sortByAlpha=i.strToEl=i.sanitise=i.isScrolledIntoView=i.getAdjacentEl=i.wrap=i.isType=i.getType=i.generateId=i.generateChars=i.getRandomNumber=void 0;var b=function(E,w){return Math.floor(Math.random()*(w-E)+E)};i.getRandomNumber=b;var _=function(E){return Array.from({length:E},function(){return(0,i.getRandomNumber)(0,36).toString(36)}).join("")};i.generateChars=_;var h=function(E,w){var N=E.id||E.name&&"".concat(E.name,"-").concat((0,i.generateChars)(2))||(0,i.generateChars)(4);return N=N.replace(/(:|\.|\[|\]|,)/g,""),N="".concat(w,"-").concat(N),N};i.generateId=h;var d=function(E){return Object.prototype.toString.call(E).slice(8,-1)};i.getType=d;var a=function(E,w){return w!=null&&(0,i.getType)(w)===E};i.isType=a;var r=function(E,w){return w===void 0&&(w=document.createElement("div")),E.parentNode&&(E.nextSibling?E.parentNode.insertBefore(w,E.nextSibling):E.parentNode.appendChild(w)),w.appendChild(E)};i.wrap=r;var c=function(E,w,N){N===void 0&&(N=1);for(var g="".concat(N>0?"next":"previous","ElementSibling"),e=E[g];e;){if(e.matches(w))return e;e=e[g]}return e};i.getAdjacentEl=c;var l=function(E,w,N){if(N===void 0&&(N=1),!E)return!1;var g;return N>0?g=w.scrollTop+w.offsetHeight>=E.offsetTop+E.offsetHeight:g=E.offsetTop>=w.scrollTop,g};i.isScrolledIntoView=l;var O=function(E){return typeof E!="string"?E:E.replace(/&/g,"&").replace(/>/g,">").replace(/-1?h.map(function(y){var D=y;return D.id===parseInt("".concat(c.choiceId),10)&&(D.selected=!0),D}):h}case"REMOVE_ITEM":{var l=d;return l.choiceId&&l.choiceId>-1?h.map(function(y){var D=y;return D.id===parseInt("".concat(l.choiceId),10)&&(D.selected=!1),D}):h}case"FILTER_CHOICES":{var O=d;return h.map(function(y){var D=y;return D.active=O.results.some(function(k){var Q=k.item,Z=k.score;return Q.id===D.id?(D.score=Z,!0):!1}),D})}case"ACTIVATE_CHOICES":{var L=d;return h.map(function(y){var D=y;return D.active=L.active,D})}case"CLEAR_CHOICES":return i.defaultState;default:return h}}i.default=_},871:function(j,i){var b=this&&this.__spreadArray||function(h,d,a){if(a||arguments.length===2)for(var r=0,c=d.length,l;r0?"treeitem":"option"),Object.assign(t.dataset,{choice:"",id:Q,value:Z,selectText:d}),N?(t.classList.add(D),t.dataset.choiceDisabled="",t.setAttribute("aria-disabled","true")):(t.classList.add(L),t.dataset.choiceSelectable=""),t},input:function(_,h){var d=_.classNames,a=d.input,r=d.inputCloned,c=Object.assign(document.createElement("input"),{type:"search",name:"search_terms",className:"".concat(a," ").concat(r),autocomplete:"off",autocapitalize:"off",spellcheck:!1});return c.setAttribute("role","textbox"),c.setAttribute("aria-autocomplete","list"),c.setAttribute("aria-label",h),c},dropdown:function(_){var h=_.classNames,d=h.list,a=h.listDropdown,r=document.createElement("div");return r.classList.add(d,a),r.setAttribute("aria-expanded","false"),r},notice:function(_,h,d){var a,r=_.allowHTML,c=_.classNames,l=c.item,O=c.itemChoice,L=c.noResults,y=c.noChoices;d===void 0&&(d="");var D=[l,O];return d==="no-choices"?D.push(y):d==="no-results"&&D.push(L),Object.assign(document.createElement("div"),(a={},a[r?"innerHTML":"innerText"]=h,a.className=D.join(" "),a))},option:function(_){var h=_.label,d=_.value,a=_.customProperties,r=_.active,c=_.disabled,l=new Option(h,d,!1,r);return a&&(l.dataset.customProperties="".concat(a)),l.disabled=!!c,l}};i.default=b},996:function(j){var i=function(w){return b(w)&&!_(w)};function b(E){return!!E&&typeof E=="object"}function _(E){var w=Object.prototype.toString.call(E);return w==="[object RegExp]"||w==="[object Date]"||a(E)}var h=typeof Symbol=="function"&&Symbol.for,d=h?Symbol.for("react.element"):60103;function a(E){return E.$$typeof===d}function r(E){return Array.isArray(E)?[]:{}}function c(E,w){return w.clone!==!1&&w.isMergeableObject(E)?Z(r(E),E,w):E}function l(E,w,N){return E.concat(w).map(function(g){return c(g,N)})}function O(E,w){if(!w.customMerge)return Z;var N=w.customMerge(E);return typeof N=="function"?N:Z}function L(E){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(E).filter(function(w){return E.propertyIsEnumerable(w)}):[]}function y(E){return Object.keys(E).concat(L(E))}function D(E,w){try{return w in E}catch{return!1}}function k(E,w){return D(E,w)&&!(Object.hasOwnProperty.call(E,w)&&Object.propertyIsEnumerable.call(E,w))}function Q(E,w,N){var g={};return N.isMergeableObject(E)&&y(E).forEach(function(e){g[e]=c(E[e],N)}),y(w).forEach(function(e){k(E,e)||(D(E,e)&&N.isMergeableObject(w[e])?g[e]=O(e,N)(E[e],w[e],N):g[e]=c(w[e],N))}),g}function Z(E,w,N){N=N||{},N.arrayMerge=N.arrayMerge||l,N.isMergeableObject=N.isMergeableObject||i,N.cloneUnlessOtherwiseSpecified=c;var g=Array.isArray(w),e=Array.isArray(E),t=g===e;return t?g?N.arrayMerge(E,w,N):Q(E,w,N):c(w,N)}Z.all=function(w,N){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(g,e){return Z(g,e,N)},{})};var ne=Z;j.exports=ne},221:function(j,i,b){b.r(i),b.d(i,{default:function(){return Se}});function _(p){return Array.isArray?Array.isArray(p):k(p)==="[object Array]"}let h=1/0;function d(p){if(typeof p=="string")return p;let o=p+"";return o=="0"&&1/p==-h?"-0":o}function a(p){return p==null?"":d(p)}function r(p){return typeof p=="string"}function c(p){return typeof p=="number"}function l(p){return p===!0||p===!1||L(p)&&k(p)=="[object Boolean]"}function O(p){return typeof p=="object"}function L(p){return O(p)&&p!==null}function y(p){return p!=null}function D(p){return!p.trim().length}function k(p){return p==null?p===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(p)}let Q="Extended search is not available",Z="Incorrect 'index' type",ne=p=>`Invalid value for key ${p}`,E=p=>`Pattern length exceeds max of ${p}.`,w=p=>`Missing ${p} property in key`,N=p=>`Property 'weight' in key '${p}' must be a positive integer`,g=Object.prototype.hasOwnProperty;class e{constructor(o){this._keys=[],this._keyMap={};let m=0;o.forEach(S=>{let I=t(S);m+=I.weight,this._keys.push(I),this._keyMap[I.id]=I,m+=I.weight}),this._keys.forEach(S=>{S.weight/=m})}get(o){return this._keyMap[o]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function t(p){let o=null,m=null,S=null,I=1,T=null;if(r(p)||_(p))S=p,o=n(p),m=s(p);else{if(!g.call(p,"name"))throw new Error(w("name"));let A=p.name;if(S=A,g.call(p,"weight")&&(I=p.weight,I<=0))throw new Error(N(A));o=n(A),m=s(A),T=p.getFn}return{path:o,id:m,weight:I,src:S,getFn:T}}function n(p){return _(p)?p:p.split(".")}function s(p){return _(p)?p.join("."):p}function v(p,o){let m=[],S=!1,I=(T,A,R)=>{if(y(T))if(!A[R])m.push(T);else{let F=A[R],H=T[F];if(!y(H))return;if(R===A.length-1&&(r(H)||c(H)||l(H)))m.push(a(H));else if(_(H)){S=!0;for(let B=0,x=H.length;Bp.score===o.score?p.idx{this._keysMap[m.id]=S})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,r(this.docs[0])?this.docs.forEach((o,m)=>{this._addString(o,m)}):this.docs.forEach((o,m)=>{this._addObject(o,m)}),this.norm.clear())}add(o){let m=this.size();r(o)?this._addString(o,m):this._addObject(o,m)}removeAt(o){this.records.splice(o,1);for(let m=o,S=this.size();m{let A=I.getFn?I.getFn(o):this.getFn(o,I.path);if(y(A)){if(_(A)){let R=[],F=[{nestedArrIndex:-1,value:A}];for(;F.length;){let{nestedArrIndex:H,value:B}=F.pop();if(y(B))if(r(B)&&!D(B)){let x={v:B,i:H,n:this.norm.get(B)};R.push(x)}else _(B)&&B.forEach((x,G)=>{F.push({nestedArrIndex:G,value:x})})}S.$[T]=R}else if(r(A)&&!D(A)){let R={v:A,n:this.norm.get(A)};S.$[T]=R}}}),this.records.push(S)}toJSON(){return{keys:this.keys,records:this.records}}}function U(p,o,{getFn:m=u.getFn,fieldNormWeight:S=u.fieldNormWeight}={}){let I=new V({getFn:m,fieldNormWeight:S});return I.setKeys(p.map(t)),I.setSources(o),I.create(),I}function $(p,{getFn:o=u.getFn,fieldNormWeight:m=u.fieldNormWeight}={}){let{keys:S,records:I}=p,T=new V({getFn:o,fieldNormWeight:m});return T.setKeys(S),T.setIndexRecords(I),T}function W(p,{errors:o=0,currentLocation:m=0,expectedLocation:S=0,distance:I=u.distance,ignoreLocation:T=u.ignoreLocation}={}){let A=o/p.length;if(T)return A;let R=Math.abs(S-m);return I?A+R/I:R?1:A}function J(p=[],o=u.minMatchCharLength){let m=[],S=-1,I=-1,T=0;for(let A=p.length;T=o&&m.push([S,I]),S=-1)}return p[T-1]&&T-S>=o&&m.push([S,T-1]),m}let z=32;function ee(p,o,m,{location:S=u.location,distance:I=u.distance,threshold:T=u.threshold,findAllMatches:A=u.findAllMatches,minMatchCharLength:R=u.minMatchCharLength,includeMatches:F=u.includeMatches,ignoreLocation:H=u.ignoreLocation}={}){if(o.length>z)throw new Error(E(z));let B=o.length,x=p.length,G=Math.max(0,Math.min(S,x)),q=T,re=G,ue=R>1||F,Ee=ue?Array(x):[],ve;for(;(ve=p.indexOf(o,re))>-1;){let he=W(o,{currentLocation:ve,expectedLocation:G,distance:I,ignoreLocation:H});if(q=Math.min(he,q),re=ve+B,ue){let ge=0;for(;ge=Ue;fe-=1){let Le=fe-1,We=m[p.charAt(Le)];if(ue&&(Ee[Le]=+!!We),Oe[fe]=(Oe[fe+1]<<1|1)&We,he&&(Oe[fe]|=(Ie[fe+1]|Ie[fe])<<1|1|Ie[fe+1]),Oe[fe]&at&&(be=W(o,{errors:he,currentLocation:Le,expectedLocation:G,distance:I,ignoreLocation:H}),be<=q)){if(q=be,re=Le,re<=G)break;Ue=Math.max(1,2*G-re)}}if(W(o,{errors:he+1,currentLocation:G,expectedLocation:G,distance:I,ignoreLocation:H})>q)break;Ie=Oe}let Ke={isMatch:re>=0,score:Math.max(.001,be)};if(ue){let he=J(Ee,R);he.length?F&&(Ke.indices=he):Ke.isMatch=!1}return Ke}function ae(p){let o={};for(let m=0,S=p.length;m{this.chunks.push({pattern:G,alphabet:ae(G),startIndex:q})},x=this.pattern.length;if(x>z){let G=0,q=x%z,re=x-q;for(;G{let{isMatch:ve,score:Ie,indices:be}=ee(o,re,ue,{location:I+Ee,distance:T,threshold:A,findAllMatches:R,minMatchCharLength:F,includeMatches:S,ignoreLocation:H});ve&&(G=!0),x+=Ie,ve&&be&&(B=[...B,...be])});let q={isMatch:G,score:G?x/this.chunks.length:1};return G&&S&&(q.indices=B),q}}class le{constructor(o){this.pattern=o}static isMultiMatch(o){return _e(o,this.multiRegex)}static isSingleMatch(o){return _e(o,this.singleRegex)}search(){}}function _e(p,o){let m=p.match(o);return m?m[1]:null}class te extends le{constructor(o){super(o)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(o){let m=o===this.pattern;return{isMatch:m,score:m?0:1,indices:[0,this.pattern.length-1]}}}class de extends le{constructor(o){super(o)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(o){let S=o.indexOf(this.pattern)===-1;return{isMatch:S,score:S?0:1,indices:[0,o.length-1]}}}class pe extends le{constructor(o){super(o)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(o){let m=o.startsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,this.pattern.length-1]}}}class oe extends le{constructor(o){super(o)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(o){let m=!o.startsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,o.length-1]}}}class Te extends le{constructor(o){super(o)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(o){let m=o.endsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[o.length-this.pattern.length,o.length-1]}}}class Pe extends le{constructor(o){super(o)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(o){let m=!o.endsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,o.length-1]}}}class He extends le{constructor(o,{location:m=u.location,threshold:S=u.threshold,distance:I=u.distance,includeMatches:T=u.includeMatches,findAllMatches:A=u.findAllMatches,minMatchCharLength:R=u.minMatchCharLength,isCaseSensitive:F=u.isCaseSensitive,ignoreLocation:H=u.ignoreLocation}={}){super(o),this._bitapSearch=new ce(o,{location:m,threshold:S,distance:I,includeMatches:T,findAllMatches:A,minMatchCharLength:R,isCaseSensitive:F,ignoreLocation:H})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(o){return this._bitapSearch.searchIn(o)}}class Be extends le{constructor(o){super(o)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(o){let m=0,S,I=[],T=this.pattern.length;for(;(S=o.indexOf(this.pattern,m))>-1;)m=S+T,I.push([S,m-1]);let A=!!I.length;return{isMatch:A,score:A?0:1,indices:I}}}let Me=[te,Be,pe,oe,Pe,Te,de,He],Ve=Me.length,Xe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Je="|";function Qe(p,o={}){return p.split(Je).map(m=>{let S=m.trim().split(Xe).filter(T=>T&&!!T.trim()),I=[];for(let T=0,A=S.length;T!!(p[Ce.AND]||p[Ce.OR]),tt=p=>!!p[je.PATH],it=p=>!_(p)&&O(p)&&!Re(p),ke=p=>({[Ce.AND]:Object.keys(p).map(o=>({[o]:p[o]}))});function xe(p,o,{auto:m=!0}={}){let S=I=>{let T=Object.keys(I),A=tt(I);if(!A&&T.length>1&&!Re(I))return S(ke(I));if(it(I)){let F=A?I[je.PATH]:T[0],H=A?I[je.PATTERN]:I[F];if(!r(H))throw new Error(ne(F));let B={keyId:s(F),pattern:H};return m&&(B.searcher=Ne(H,o)),B}let R={children:[],operator:T[0]};return T.forEach(F=>{let H=I[F];_(H)&&H.forEach(B=>{R.children.push(S(B))})}),R};return Re(p)||(p=ke(p)),S(p)}function nt(p,{ignoreFieldNorm:o=u.ignoreFieldNorm}){p.forEach(m=>{let S=1;m.matches.forEach(({key:I,norm:T,score:A})=>{let R=I?I.weight:null;S*=Math.pow(A===0&&R?Number.EPSILON:A,(R||1)*(o?1:T))}),m.score=S})}function rt(p,o){let m=p.matches;o.matches=[],y(m)&&m.forEach(S=>{if(!y(S.indices)||!S.indices.length)return;let{indices:I,value:T}=S,A={indices:I,value:T};S.key&&(A.key=S.key.src),S.idx>-1&&(A.refIndex=S.idx),o.matches.push(A)})}function st(p,o){o.score=p.score}function ot(p,o,{includeMatches:m=u.includeMatches,includeScore:S=u.includeScore}={}){let I=[];return m&&I.push(rt),S&&I.push(st),p.map(T=>{let{idx:A}=T,R={item:o[A],refIndex:A};return I.length&&I.forEach(F=>{F(T,R)}),R})}class Se{constructor(o,m={},S){this.options={...u,...m},this.options.useExtendedSearch,this._keyStore=new e(this.options.keys),this.setCollection(o,S)}setCollection(o,m){if(this._docs=o,m&&!(m instanceof V))throw new Error(Z);this._myIndex=m||U(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(o){y(o)&&(this._docs.push(o),this._myIndex.add(o))}remove(o=()=>!1){let m=[];for(let S=0,I=this._docs.length;S-1&&(F=F.slice(0,m)),ot(F,this._docs,{includeMatches:S,includeScore:I})}_searchStringList(o){let m=Ne(o,this.options),{records:S}=this._myIndex,I=[];return S.forEach(({v:T,i:A,n:R})=>{if(!y(T))return;let{isMatch:F,score:H,indices:B}=m.searchIn(T);F&&I.push({item:T,idx:A,matches:[{score:H,value:T,norm:R,indices:B}]})}),I}_searchLogical(o){let m=xe(o,this.options),S=(R,F,H)=>{if(!R.children){let{keyId:x,searcher:G}=R,q=this._findMatches({key:this._keyStore.get(x),value:this._myIndex.getValueForItemAtKeyId(F,x),searcher:G});return q&&q.length?[{idx:H,item:F,matches:q}]:[]}let B=[];for(let x=0,G=R.children.length;x{if(y(R)){let H=S(m,R,F);H.length&&(T[F]||(T[F]={idx:F,item:R,matches:[]},A.push(T[F])),H.forEach(({matches:B})=>{T[F].matches.push(...B)}))}}),A}_searchObjectList(o){let m=Ne(o,this.options),{keys:S,records:I}=this._myIndex,T=[];return I.forEach(({$:A,i:R})=>{if(!y(A))return;let F=[];S.forEach((H,B)=>{F.push(...this._findMatches({key:H,value:A[B],searcher:m}))}),F.length&&T.push({idx:R,item:A,matches:F})}),T}_findMatches({key:o,value:m,searcher:S}){if(!y(m))return[];let I=[];if(_(m))m.forEach(({v:T,i:A,n:R})=>{if(!y(T))return;let{isMatch:F,score:H,indices:B}=S.searchIn(T);F&&I.push({score:H,key:o,value:T,idx:A,norm:R,indices:B})});else{let{v:T,n:A}=m,{isMatch:R,score:F,indices:H}=S.searchIn(T);R&&I.push({score:F,key:o,value:T,norm:A,indices:H})}return I}}Se.version="6.6.2",Se.createIndex=U,Se.parseIndex=$,Se.config=u,Se.parseQuery=xe,et(qe)},791:function(j,i,b){b.r(i),b.d(i,{__DO_NOT_USE__ActionTypes:function(){return y},applyMiddleware:function(){return M},bindActionCreators:function(){return v},combineReducers:function(){return n},compose:function(){return P},createStore:function(){return w},legacy_createStore:function(){return N}});function _(f){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},_(f)}function h(f,u){if(_(f)!=="object"||f===null)return f;var C=f[Symbol.toPrimitive];if(C!==void 0){var Y=C.call(f,u||"default");if(_(Y)!=="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(f)}function d(f){var u=h(f,"string");return _(u)==="symbol"?u:String(u)}function a(f,u,C){return u=d(u),u in f?Object.defineProperty(f,u,{value:C,enumerable:!0,configurable:!0,writable:!0}):f[u]=C,f}function r(f,u){var C=Object.keys(f);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(f);u&&(Y=Y.filter(function(V){return Object.getOwnPropertyDescriptor(f,V).enumerable})),C.push.apply(C,Y)}return C}function c(f){for(var u=1;u"u"&&(C=u,u=void 0),typeof C<"u"){if(typeof C!="function")throw new Error(l(1));return C(w)(f,u)}if(typeof f!="function")throw new Error(l(2));var V=f,U=u,$=[],W=$,J=!1;function z(){W===$&&(W=$.slice())}function ee(){if(J)throw new Error(l(3));return U}function ae(te){if(typeof te!="function")throw new Error(l(4));if(J)throw new Error(l(5));var de=!0;return z(),W.push(te),function(){if(de){if(J)throw new Error(l(6));de=!1,z();var oe=W.indexOf(te);W.splice(oe,1),$=null}}}function ce(te){if(!D(te))throw new Error(l(7));if(typeof te.type>"u")throw new Error(l(8));if(J)throw new Error(l(9));try{J=!0,U=V(U,te)}finally{J=!1}for(var de=$=W,pe=0;pe0)return"Unexpected "+($.length>1?"keys":"key")+" "+('"'+$.join('", "')+'" found in '+U+". ")+"Expected to find one of the known reducer keys instead: "+('"'+V.join('", "')+'". Unexpected keys will be ignored.')}function t(f){Object.keys(f).forEach(function(u){var C=f[u],Y=C(void 0,{type:y.INIT});if(typeof Y>"u")throw new Error(l(12));if(typeof C(void 0,{type:y.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(l(13))})}function n(f){for(var u=Object.keys(f),C={},Y=0;Y"u"){var Te=ee&&ee.type;throw new Error(l(14))}le[te]=oe,ce=ce||oe!==pe}return ce=ce||U.length!==Object.keys(z).length,ce?le:z}}function s(f,u){return function(){return u(f.apply(this,arguments))}}function v(f,u){if(typeof f=="function")return s(f,u);if(typeof f!="object"||f===null)throw new Error(l(16));var C={};for(var Y in f){var V=f[Y];typeof V=="function"&&(C[Y]=s(V,u))}return C}function P(){for(var f=arguments.length,u=new Array(f),C=0;Cwindow.pluralize(O,e,{count:e}),noChoicesText:E,noResultsText:L,placeholderValue:k,position:Q??"auto",removeItemButton:se,renderChoiceLimit:D,searchEnabled:h,searchFields:w??["label"],searchPlaceholderValue:E,searchResultLimit:D,shouldSort:!1,searchFloor:a?0:1}),await this.refreshChoices({withInitialOptions:!0}),[null,void 0,""].includes(this.state)||this.select.setChoiceByValue(this.formatState(this.state)),this.refreshPlaceholder(),b&&this.select.showDropdown(),this.$refs.input.addEventListener("change",()=>{this.refreshPlaceholder(),!this.isStateBeingUpdated&&(this.isStateBeingUpdated=!0,this.state=this.select.getValue(!0)??null,this.$nextTick(()=>this.isStateBeingUpdated=!1))}),d&&this.$refs.input.addEventListener("showDropdown",async()=>{this.select.clearChoices(),await this.select.setChoices([{label:c,value:"",disabled:!0}]),await this.refreshChoices()}),a&&(this.$refs.input.addEventListener("search",async e=>{let t=e.detail.value?.trim();this.isSearching=!0,this.select.clearChoices(),await this.select.setChoices([{label:[null,void 0,""].includes(t)?c:ne,value:"",disabled:!0}])}),this.$refs.input.addEventListener("search",Alpine.debounce(async e=>{await this.refreshChoices({search:e.detail.value?.trim()}),this.isSearching=!1},Z))),_||window.addEventListener("filament-forms::select.refreshSelectedOptionLabel",async e=>{e.detail.livewireId===r&&e.detail.statePath===g&&await this.refreshChoices({withInitialOptions:!1})}),this.$watch("state",async()=>{this.select&&(this.refreshPlaceholder(),!this.isStateBeingUpdated&&await this.refreshChoices({withInitialOptions:!d}))})},destroy:function(){this.select.destroy(),this.select=null},refreshChoices:async function(e={}){let t=await this.getChoices(e);this.select&&(this.select.clearStore(),this.refreshPlaceholder(),this.setChoices(t),[null,void 0,""].includes(this.state)||this.select.setChoiceByValue(this.formatState(this.state)))},setChoices:function(e){this.select.setChoices(e,"value","label",!0)},getChoices:async function(e={}){let t=await this.getExistingOptions(e);return t.concat(await this.getMissingOptions(t))},getExistingOptions:async function({search:e,withInitialOptions:t}){if(t)return y;let n=[];return e!==""&&e!==null&&e!==void 0?n=await i(e):n=await j(),n.map(s=>s.choices?(s.choices=s.choices.map(v=>(v.selected=Array.isArray(this.state)?this.state.includes(v.value):this.state===v.value,v)),s):(s.selected=Array.isArray(this.state)?this.state.includes(s.value):this.state===s.value,s))},refreshPlaceholder:function(){_||(this.select._renderItems(),[null,void 0,""].includes(this.state)&&(this.$el.querySelector(".choices__list--single").innerHTML=`
${k??""}
`))},formatState:function(e){return _?(e??[]).map(t=>t?.toString()):e?.toString()},getMissingOptions:async function(e){let t=this.formatState(this.state);if([null,void 0,"",[],{}].includes(t))return{};let n=new Set;return e.forEach(s=>{if(s.choices){s.choices.forEach(v=>n.add(v.value));return}n.add(s.value)}),_?t.every(s=>n.has(s))?{}:(await me()).filter(s=>!n.has(s.value)).map(s=>(s.selected=!0,s)):n.has(t)?n:[{label:await X(),value:t,selected:!0}]}}}export{vt as default}; /*! Bundled license information: choices.js/public/assets/scripts/choices.js: diff --git a/public/js/filament/forms/components/tags-input.js b/public/js/filament/forms/components/tags-input.js index c19c04a13..6a2aa3009 100644 --- a/public/js/filament/forms/components/tags-input.js +++ b/public/js/filament/forms/components/tags-input.js @@ -1 +1 @@ -function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{["x-on:blur"]:"createTag()",["x-model"]:"newTag",["x-on:keydown"](t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},["x-on:paste"](){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default}; +function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default}; diff --git a/public/js/filament/notifications/notifications.js b/public/js/filament/notifications/notifications.js index 94fdcade2..7ce306318 100644 --- a/public/js/filament/notifications/notifications.js +++ b/public/js/filament/notifications/notifications.js @@ -1 +1 @@ -(()=>{var O=Object.create;var N=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var d=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var j=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y(t))!W.call(i,n)&&n!==e&&N(i,n,{get:()=>t[n],enumerable:!(s=V(t,n))||s.enumerable});return i};var J=(i,t,e)=>(e=i!=null?O(H(i)):{},j(t||!i||!i.__esModule?N(e,"default",{value:i,enumerable:!0}):e,i));var S=d((ut,_)=>{var v,g=typeof global<"u"&&(global.crypto||global.msCrypto);g&&g.getRandomValues&&(y=new Uint8Array(16),v=function(){return g.getRandomValues(y),y});var y;v||(T=new Array(16),v=function(){for(var i=0,t;i<16;i++)i&3||(t=Math.random()*4294967296),T[i]=t>>>((i&3)<<3)&255;return T});var T;_.exports=v});var C=d((ct,U)=>{var P=[];for(f=0;f<256;++f)P[f]=(f+256).toString(16).substr(1);var f;function K(i,t){var e=t||0,s=P;return s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]}U.exports=K});var R=d((lt,b)=>{var Q=S(),X=C(),a=Q(),Z=[a[0]|1,a[1],a[2],a[3],a[4],a[5]],F=(a[6]<<8|a[7])&16383,D=0,A=0;function tt(i,t,e){var s=t&&e||0,n=t||[];i=i||{};var r=i.clockseq!==void 0?i.clockseq:F,o=i.msecs!==void 0?i.msecs:new Date().getTime(),h=i.nsecs!==void 0?i.nsecs:A+1,l=o-D+(h-A)/1e4;if(l<0&&i.clockseq===void 0&&(r=r+1&16383),(l<0||o>D)&&i.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");D=o,A=h,F=r,o+=122192928e5;var c=((o&268435455)*1e4+h)%4294967296;n[s++]=c>>>24&255,n[s++]=c>>>16&255,n[s++]=c>>>8&255,n[s++]=c&255;var u=o/4294967296*1e4&268435455;n[s++]=u>>>8&255,n[s++]=u&255,n[s++]=u>>>24&15|16,n[s++]=u>>>16&255,n[s++]=r>>>8|128,n[s++]=r&255;for(var $=i.node||Z,m=0;m<6;++m)n[s+m]=$[m];return t||X(n)}b.exports=tt});var I=d((dt,G)=>{var it=S(),et=C();function st(i,t,e){var s=t&&e||0;typeof i=="string"&&(t=i=="binary"?new Array(16):null,i=null),i=i||{};var n=i.random||(i.rng||it)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t)for(var r=0;r<16;++r)t[s+r]=n[r];return t||et(n)}G.exports=st});var z=d((ft,M)=>{var nt=R(),L=I(),E=L;E.v1=nt;E.v4=L;M.exports=E});function k(i,t=()=>{}){let e=!1;return function(){e?t.apply(this,arguments):(e=!0,i.apply(this,arguments))}}var q=i=>{i.data("notificationComponent",({notification:t})=>({isShown:!1,computedStyle:null,transitionDuration:null,transitionEasing:null,init:function(){this.computedStyle=window.getComputedStyle(this.$el),this.transitionDuration=parseFloat(this.computedStyle.transitionDuration)*1e3,this.transitionEasing=this.computedStyle.transitionTimingFunction,this.configureTransitions(),this.configureAnimations(),t.duration&&t.duration!=="persistent"&&setTimeout(()=>{if(!this.$el.matches(":hover")){this.close();return}this.$el.addEventListener("mouseleave",()=>this.close())},t.duration),this.isShown=!0},configureTransitions:function(){let e=this.computedStyle.display,s=()=>{i.mutateDom(()=>{this.$el.style.setProperty("display",e),this.$el.style.setProperty("visibility","visible")}),this.$el._x_isShown=!0},n=()=>{i.mutateDom(()=>{this.$el._x_isShown?this.$el.style.setProperty("visibility","hidden"):this.$el.style.setProperty("display","none")})},r=k(o=>o?s():n(),o=>{this.$el._x_toggleAndCascadeWithTransitions(this.$el,o,s,n)});i.effect(()=>r(this.isShown))},configureAnimations:function(){let e;Livewire.hook("commit",({component:s,commit:n,succeed:r,fail:o,respond:h})=>{s.snapshot.data.isFilamentNotificationsComponent&&requestAnimationFrame(()=>{let l=()=>this.$el.getBoundingClientRect().top,c=l();h(()=>{e=()=>{this.isShown&&this.$el.animate([{transform:`translateY(${c-l()}px)`},{transform:"translateY(0px)"}],{duration:this.transitionDuration,easing:this.transitionEasing})},this.$el.getAnimations().forEach(u=>u.finish())}),r(({snapshot:u,effect:$})=>{e()})})})},close:function(){this.isShown=!1,setTimeout(()=>window.dispatchEvent(new CustomEvent("notificationClosed",{detail:{id:t.id}})),this.transitionDuration)},markAsRead:function(){window.dispatchEvent(new CustomEvent("markedNotificationAsRead",{detail:{id:t.id}}))},markAsUnread:function(){window.dispatchEvent(new CustomEvent("markedNotificationAsUnread",{detail:{id:t.id}}))}}))};var B=J(z(),1),p=class{constructor(){return this.id((0,B.v4)()),this}id(t){return this.id=t,this}title(t){return this.title=t,this}body(t){return this.body=t,this}actions(t){return this.actions=t,this}status(t){return this.status=t,this}color(t){return this.color=t,this}icon(t){return this.icon=t,this}iconColor(t){return this.iconColor=t,this}duration(t){return this.duration=t,this}seconds(t){return this.duration(t*1e3),this}persistent(){return this.duration("persistent"),this}danger(){return this.status("danger"),this}info(){return this.status("info"),this}success(){return this.status("success"),this}warning(){return this.status("warning"),this}view(t){return this.view=t,this}viewData(t){return this.viewData=t,this}send(){return window.dispatchEvent(new CustomEvent("notificationSent",{detail:{notification:this}})),this}},w=class{constructor(t){return this.name(t),this}name(t){return this.name=t,this}color(t){return this.color=t,this}dispatch(t,e){return this.event(t),this.eventData(e),this}dispatchSelf(t,e){return this.dispatch(t,e),this.dispatchDirection="self",this}dispatchTo(t,e,s){return this.dispatch(e,s),this.dispatchDirection="to",this.dispatchToComponent=t,this}emit(t,e){return this.dispatch(t,e),this}emitSelf(t,e){return this.dispatchSelf(t,e),this}emitTo(t,e,s){return this.dispatchTo(t,e,s),this}dispatchDirection(t){return this.dispatchDirection=t,this}dispatchToComponent(t){return this.dispatchToComponent=t,this}event(t){return this.event=t,this}eventData(t){return this.eventData=t,this}extraAttributes(t){return this.extraAttributes=t,this}icon(t){return this.icon=t,this}iconPosition(t){return this.iconPosition=t,this}outlined(t=!0){return this.isOutlined=t,this}disabled(t=!0){return this.isDisabled=t,this}label(t){return this.label=t,this}close(t=!0){return this.shouldClose=t,this}openUrlInNewTab(t=!0){return this.shouldOpenUrlInNewTab=t,this}size(t){return this.size=t,this}url(t){return this.url=t,this}view(t){return this.view=t,this}button(){return this.view("filament-actions::button-action"),this}grouped(){return this.view("filament-actions::grouped-action"),this}link(){return this.view("filament-actions::link-action"),this}},x=class{constructor(t){return this.actions(t),this}actions(t){return this.actions=t.map(e=>e.grouped()),this}color(t){return this.color=t,this}icon(t){return this.icon=t,this}iconPosition(t){return this.iconPosition=t,this}label(t){return this.label=t,this}tooltip(t){return this.tooltip=t,this}};window.FilamentNotificationAction=w;window.FilamentNotificationActionGroup=x;window.FilamentNotification=p;document.addEventListener("alpine:init",()=>{window.Alpine.plugin(q)});})(); +(()=>{var O=Object.create;var N=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var d=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var j=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y(t))!W.call(i,n)&&n!==e&&N(i,n,{get:()=>t[n],enumerable:!(s=V(t,n))||s.enumerable});return i};var J=(i,t,e)=>(e=i!=null?O(H(i)):{},j(t||!i||!i.__esModule?N(e,"default",{value:i,enumerable:!0}):e,i));var S=d((ut,_)=>{var v,g=typeof global<"u"&&(global.crypto||global.msCrypto);g&&g.getRandomValues&&(y=new Uint8Array(16),v=function(){return g.getRandomValues(y),y});var y;v||(T=new Array(16),v=function(){for(var i=0,t;i<16;i++)(i&3)===0&&(t=Math.random()*4294967296),T[i]=t>>>((i&3)<<3)&255;return T});var T;_.exports=v});var C=d((ct,U)=>{var P=[];for(f=0;f<256;++f)P[f]=(f+256).toString(16).substr(1);var f;function K(i,t){var e=t||0,s=P;return s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]}U.exports=K});var R=d((lt,b)=>{var Q=S(),X=C(),a=Q(),Z=[a[0]|1,a[1],a[2],a[3],a[4],a[5]],F=(a[6]<<8|a[7])&16383,D=0,A=0;function tt(i,t,e){var s=t&&e||0,n=t||[];i=i||{};var r=i.clockseq!==void 0?i.clockseq:F,o=i.msecs!==void 0?i.msecs:new Date().getTime(),h=i.nsecs!==void 0?i.nsecs:A+1,l=o-D+(h-A)/1e4;if(l<0&&i.clockseq===void 0&&(r=r+1&16383),(l<0||o>D)&&i.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");D=o,A=h,F=r,o+=122192928e5;var c=((o&268435455)*1e4+h)%4294967296;n[s++]=c>>>24&255,n[s++]=c>>>16&255,n[s++]=c>>>8&255,n[s++]=c&255;var u=o/4294967296*1e4&268435455;n[s++]=u>>>8&255,n[s++]=u&255,n[s++]=u>>>24&15|16,n[s++]=u>>>16&255,n[s++]=r>>>8|128,n[s++]=r&255;for(var $=i.node||Z,m=0;m<6;++m)n[s+m]=$[m];return t||X(n)}b.exports=tt});var I=d((dt,G)=>{var it=S(),et=C();function st(i,t,e){var s=t&&e||0;typeof i=="string"&&(t=i=="binary"?new Array(16):null,i=null),i=i||{};var n=i.random||(i.rng||it)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t)for(var r=0;r<16;++r)t[s+r]=n[r];return t||et(n)}G.exports=st});var z=d((ft,M)=>{var nt=R(),L=I(),E=L;E.v1=nt;E.v4=L;M.exports=E});function k(i,t=()=>{}){let e=!1;return function(){e?t.apply(this,arguments):(e=!0,i.apply(this,arguments))}}var q=i=>{i.data("notificationComponent",({notification:t})=>({isShown:!1,computedStyle:null,transitionDuration:null,transitionEasing:null,init:function(){this.computedStyle=window.getComputedStyle(this.$el),this.transitionDuration=parseFloat(this.computedStyle.transitionDuration)*1e3,this.transitionEasing=this.computedStyle.transitionTimingFunction,this.configureTransitions(),this.configureAnimations(),t.duration&&t.duration!=="persistent"&&setTimeout(()=>{if(!this.$el.matches(":hover")){this.close();return}this.$el.addEventListener("mouseleave",()=>this.close())},t.duration),this.isShown=!0},configureTransitions:function(){let e=this.computedStyle.display,s=()=>{i.mutateDom(()=>{this.$el.style.setProperty("display",e),this.$el.style.setProperty("visibility","visible")}),this.$el._x_isShown=!0},n=()=>{i.mutateDom(()=>{this.$el._x_isShown?this.$el.style.setProperty("visibility","hidden"):this.$el.style.setProperty("display","none")})},r=k(o=>o?s():n(),o=>{this.$el._x_toggleAndCascadeWithTransitions(this.$el,o,s,n)});i.effect(()=>r(this.isShown))},configureAnimations:function(){let e;Livewire.hook("commit",({component:s,commit:n,succeed:r,fail:o,respond:h})=>{s.snapshot.data.isFilamentNotificationsComponent&&requestAnimationFrame(()=>{let l=()=>this.$el.getBoundingClientRect().top,c=l();h(()=>{e=()=>{this.isShown&&this.$el.animate([{transform:`translateY(${c-l()}px)`},{transform:"translateY(0px)"}],{duration:this.transitionDuration,easing:this.transitionEasing})},this.$el.getAnimations().forEach(u=>u.finish())}),r(({snapshot:u,effect:$})=>{e()})})})},close:function(){this.isShown=!1,setTimeout(()=>window.dispatchEvent(new CustomEvent("notificationClosed",{detail:{id:t.id}})),this.transitionDuration)},markAsRead:function(){window.dispatchEvent(new CustomEvent("markedNotificationAsRead",{detail:{id:t.id}}))},markAsUnread:function(){window.dispatchEvent(new CustomEvent("markedNotificationAsUnread",{detail:{id:t.id}}))}}))};var B=J(z(),1),p=class{constructor(){return this.id((0,B.v4)()),this}id(t){return this.id=t,this}title(t){return this.title=t,this}body(t){return this.body=t,this}actions(t){return this.actions=t,this}status(t){return this.status=t,this}color(t){return this.color=t,this}icon(t){return this.icon=t,this}iconColor(t){return this.iconColor=t,this}duration(t){return this.duration=t,this}seconds(t){return this.duration(t*1e3),this}persistent(){return this.duration("persistent"),this}danger(){return this.status("danger"),this}info(){return this.status("info"),this}success(){return this.status("success"),this}warning(){return this.status("warning"),this}view(t){return this.view=t,this}viewData(t){return this.viewData=t,this}send(){return window.dispatchEvent(new CustomEvent("notificationSent",{detail:{notification:this}})),this}},w=class{constructor(t){return this.name(t),this}name(t){return this.name=t,this}color(t){return this.color=t,this}dispatch(t,e){return this.event(t),this.eventData(e),this}dispatchSelf(t,e){return this.dispatch(t,e),this.dispatchDirection="self",this}dispatchTo(t,e,s){return this.dispatch(e,s),this.dispatchDirection="to",this.dispatchToComponent=t,this}emit(t,e){return this.dispatch(t,e),this}emitSelf(t,e){return this.dispatchSelf(t,e),this}emitTo(t,e,s){return this.dispatchTo(t,e,s),this}dispatchDirection(t){return this.dispatchDirection=t,this}dispatchToComponent(t){return this.dispatchToComponent=t,this}event(t){return this.event=t,this}eventData(t){return this.eventData=t,this}extraAttributes(t){return this.extraAttributes=t,this}icon(t){return this.icon=t,this}iconPosition(t){return this.iconPosition=t,this}outlined(t=!0){return this.isOutlined=t,this}disabled(t=!0){return this.isDisabled=t,this}label(t){return this.label=t,this}close(t=!0){return this.shouldClose=t,this}openUrlInNewTab(t=!0){return this.shouldOpenUrlInNewTab=t,this}size(t){return this.size=t,this}url(t){return this.url=t,this}view(t){return this.view=t,this}button(){return this.view("filament-actions::button-action"),this}grouped(){return this.view("filament-actions::grouped-action"),this}link(){return this.view("filament-actions::link-action"),this}},x=class{constructor(t){return this.actions(t),this}actions(t){return this.actions=t.map(e=>e.grouped()),this}color(t){return this.color=t,this}icon(t){return this.icon=t,this}iconPosition(t){return this.iconPosition=t,this}label(t){return this.label=t,this}tooltip(t){return this.tooltip=t,this}};window.FilamentNotificationAction=w;window.FilamentNotificationActionGroup=x;window.FilamentNotification=p;document.addEventListener("alpine:init",()=>{window.Alpine.plugin(q)});})(); diff --git a/public/js/filament/support/support.js b/public/js/filament/support/support.js index 3279e3870..9b2b2dce6 100644 --- a/public/js/filament/support/support.js +++ b/public/js/filament/support/support.js @@ -1,28 +1,28 @@ -(()=>{var zo=Object.create;var Ti=Object.defineProperty;var Yo=Object.getOwnPropertyDescriptor;var Xo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty;var Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ko=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xo(t))!Go.call(e,i)&&i!==r&&Ti(e,i,{get:()=>t[i],enumerable:!(n=Yo(t,i))||n.enumerable});return e};var Jo=(e,t,r)=>(r=e!=null?zo(qo(e)):{},Ko(t||!e||!e.__esModule?Ti(r,"default",{value:e,enumerable:!0}):r,e));var uo=Kr(()=>{});var po=Kr(()=>{});var ho=Kr((Bs,yr)=>{(function(){"use strict";var e="input is invalid type",t="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_MD5_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",o=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?n=global:i&&(n=self);var a=!n.JS_MD5_NO_COMMON_JS&&typeof yr=="object"&&yr.exports,d=typeof define=="function"&&define.amd,f=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),w=[128,32768,8388608,-2147483648],m=[0,8,16,24],E=["hex","array","digest","buffer","arrayBuffer","base64"],O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),S=[],R;if(f){var I=new ArrayBuffer(68);R=new Uint8Array(I),S=new Uint32Array(I)}var $=Array.isArray;(n.JS_MD5_NO_NODE_JS||!$)&&($=function(l){return Object.prototype.toString.call(l)==="[object Array]"});var A=ArrayBuffer.isView;f&&(n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!A)&&(A=function(l){return typeof l=="object"&&l.buffer&&l.buffer.constructor===ArrayBuffer});var k=function(l){var h=typeof l;if(h==="string")return[l,!0];if(h!=="object"||l===null)throw new Error(e);if(f&&l.constructor===ArrayBuffer)return[new Uint8Array(l),!1];if(!$(l)&&!A(l))throw new Error(e);return[l,!1]},Y=function(l){return function(h){return new X(!0).update(h)[l]()}},ne=function(){var l=Y("hex");o&&(l=J(l)),l.create=function(){return new X},l.update=function(p){return l.create().update(p)};for(var h=0;h>>6,ze[P++]=128|p&63):p<55296||p>=57344?(ze[P++]=224|p>>>12,ze[P++]=128|p>>>6&63,ze[P++]=128|p&63):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),ze[P++]=240|p>>>18,ze[P++]=128|p>>>12&63,ze[P++]=128|p>>>6&63,ze[P++]=128|p&63);else for(P=this.start;j>>2]|=p<>>2]|=(192|p>>>6)<>>2]|=(128|p&63)<=57344?(Q[P>>>2]|=(224|p>>>12)<>>2]|=(128|p>>>6&63)<>>2]|=(128|p&63)<>>2]|=(240|p>>>18)<>>2]|=(128|p>>>12&63)<>>2]|=(128|p>>>6&63)<>>2]|=(128|p&63)<>>2]|=l[j]<=64?(this.start=P-64,this.hash(),this.hashed=!0):this.start=P}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},X.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var l=this.blocks,h=this.lastByteIndex;l[h>>>2]|=w[h&3],h>=56&&(this.hashed||this.hash(),l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),l[14]=this.bytes<<3,l[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},X.prototype.hash=function(){var l,h,v,p,j,P,M=this.blocks;this.first?(l=M[0]-680876937,l=(l<<7|l>>>25)-271733879<<0,p=(-1732584194^l&2004318071)+M[1]-117830708,p=(p<<12|p>>>20)+l<<0,v=(-271733879^p&(l^-271733879))+M[2]-1126478375,v=(v<<17|v>>>15)+p<<0,h=(l^v&(p^l))+M[3]-1316259209,h=(h<<22|h>>>10)+v<<0):(l=this.h0,h=this.h1,v=this.h2,p=this.h3,l+=(p^h&(v^p))+M[0]-680876936,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+M[1]-389564586,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+M[2]+606105819,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+M[3]-1044525330,h=(h<<22|h>>>10)+v<<0),l+=(p^h&(v^p))+M[4]-176418897,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+M[5]+1200080426,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+M[6]-1473231341,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+M[7]-45705983,h=(h<<22|h>>>10)+v<<0,l+=(p^h&(v^p))+M[8]+1770035416,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+M[9]-1958414417,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+M[10]-42063,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+M[11]-1990404162,h=(h<<22|h>>>10)+v<<0,l+=(p^h&(v^p))+M[12]+1804603682,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+M[13]-40341101,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+M[14]-1502002290,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+M[15]+1236535329,h=(h<<22|h>>>10)+v<<0,l+=(v^p&(h^v))+M[1]-165796510,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+M[6]-1069501632,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+M[11]+643717713,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+M[0]-373897302,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+M[5]-701558691,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+M[10]+38016083,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+M[15]-660478335,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+M[4]-405537848,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+M[9]+568446438,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+M[14]-1019803690,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+M[3]-187363961,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+M[8]+1163531501,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+M[13]-1444681467,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+M[2]-51403784,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+M[7]+1735328473,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+M[12]-1926607734,h=(h<<20|h>>>12)+v<<0,j=h^v,l+=(j^p)+M[5]-378558,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+M[8]-2022574463,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+M[11]+1839030562,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+M[14]-35309556,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+M[1]-1530992060,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+M[4]+1272893353,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+M[7]-155497632,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+M[10]-1094730640,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+M[13]+681279174,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+M[0]-358537222,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+M[3]-722521979,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+M[6]+76029189,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+M[9]-640364487,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+M[12]-421815835,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+M[15]+530742520,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+M[2]-995338651,h=(h<<23|h>>>9)+v<<0,l+=(v^(h|~p))+M[0]-198630844,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+M[7]+1126891415,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+M[14]-1416354905,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+M[5]-57434055,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+M[12]+1700485571,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+M[3]-1894986606,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+M[10]-1051523,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+M[1]-2054922799,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+M[8]+1873313359,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+M[15]-30611744,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+M[6]-1560198380,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+M[13]+1309151649,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+M[4]-145523070,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+M[11]-1120210379,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+M[2]+718787259,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+M[9]-343485551,h=(h<<21|h>>>11)+v<<0,this.first?(this.h0=l+1732584193<<0,this.h1=h-271733879<<0,this.h2=v-1732584194<<0,this.h3=p+271733878<<0,this.first=!1):(this.h0=this.h0+l<<0,this.h1=this.h1+h<<0,this.h2=this.h2+v<<0,this.h3=this.h3+p<<0)},X.prototype.hex=function(){this.finalize();var l=this.h0,h=this.h1,v=this.h2,p=this.h3;return u[l>>>4&15]+u[l&15]+u[l>>>12&15]+u[l>>>8&15]+u[l>>>20&15]+u[l>>>16&15]+u[l>>>28&15]+u[l>>>24&15]+u[h>>>4&15]+u[h&15]+u[h>>>12&15]+u[h>>>8&15]+u[h>>>20&15]+u[h>>>16&15]+u[h>>>28&15]+u[h>>>24&15]+u[v>>>4&15]+u[v&15]+u[v>>>12&15]+u[v>>>8&15]+u[v>>>20&15]+u[v>>>16&15]+u[v>>>28&15]+u[v>>>24&15]+u[p>>>4&15]+u[p&15]+u[p>>>12&15]+u[p>>>8&15]+u[p>>>20&15]+u[p>>>16&15]+u[p>>>28&15]+u[p>>>24&15]},X.prototype.toString=X.prototype.hex,X.prototype.digest=function(){this.finalize();var l=this.h0,h=this.h1,v=this.h2,p=this.h3;return[l&255,l>>>8&255,l>>>16&255,l>>>24&255,h&255,h>>>8&255,h>>>16&255,h>>>24&255,v&255,v>>>8&255,v>>>16&255,v>>>24&255,p&255,p>>>8&255,p>>>16&255,p>>>24&255]},X.prototype.array=X.prototype.digest,X.prototype.arrayBuffer=function(){this.finalize();var l=new ArrayBuffer(16),h=new Uint32Array(l);return h[0]=this.h0,h[1]=this.h1,h[2]=this.h2,h[3]=this.h3,l},X.prototype.buffer=X.prototype.arrayBuffer,X.prototype.base64=function(){for(var l,h,v,p="",j=this.array(),P=0;P<15;)l=j[P++],h=j[P++],v=j[P++],p+=O[l>>>2]+O[(l<<4|h>>>4)&63]+O[(h<<2|v>>>6)&63]+O[v&63];return l=j[P],p+=O[l>>>2]+O[l<<4&63]+"==",p};function Z(l,h){var v,p=k(l);if(l=p[0],p[1]){var j=[],P=l.length,M=0,Q;for(v=0;v>>6,j[M++]=128|Q&63):Q<55296||Q>=57344?(j[M++]=224|Q>>>12,j[M++]=128|Q>>>6&63,j[M++]=128|Q&63):(Q=65536+((Q&1023)<<10|l.charCodeAt(++v)&1023),j[M++]=240|Q>>>18,j[M++]=128|Q>>>12&63,j[M++]=128|Q>>>6&63,j[M++]=128|Q&63);l=j}l.length>64&&(l=new X(!0).update(l).array());var ze=[],Mt=[];for(v=0;v<64;++v){var Ut=l[v]||0;ze[v]=92^Ut,Mt[v]=54^Ut}X.call(this,h),this.update(Mt),this.oKeyPad=ze,this.inner=!0,this.sharedMemory=h}Z.prototype=new X,Z.prototype.finalize=function(){if(X.prototype.finalize.call(this),this.inner){this.inner=!1;var l=this.array();X.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(l),X.prototype.finalize.call(this)}};var me=ne();me.md5=me,me.md5.hmac=de(),a?yr.exports=me:(n.md5=me,d&&define(function(){return me}))})()});var Hi=["top","right","bottom","left"],Pi=["start","end"],Ri=Hi.reduce((e,t)=>e.concat(t,t+"-"+Pi[0],t+"-"+Pi[1]),[]),Et=Math.min,tt=Math.max,hr=Math.round,pr=Math.floor,nn=e=>({x:e,y:e}),Zo={left:"right",right:"left",bottom:"top",top:"bottom"},Qo={start:"end",end:"start"};function Jr(e,t,r){return tt(e,Et(t,r))}function jt(e,t){return typeof e=="function"?e(t):e}function pt(e){return e.split("-")[0]}function xt(e){return e.split("-")[1]}function $i(e){return e==="x"?"y":"x"}function Zr(e){return e==="y"?"height":"width"}function Pn(e){return["top","bottom"].includes(pt(e))?"y":"x"}function Qr(e){return $i(Pn(e))}function Wi(e,t,r){r===void 0&&(r=!1);let n=xt(e),i=Qr(e),o=Zr(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=mr(a)),[a,mr(a)]}function ea(e){let t=mr(e);return[vr(e),t,vr(t)]}function vr(e){return e.replace(/start|end/g,t=>Qo[t])}function ta(e,t,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}function na(e,t,r,n){let i=xt(e),o=ta(pt(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(vr)))),o}function mr(e){return e.replace(/left|right|bottom|top/g,t=>Zo[t])}function ra(e){return{top:0,right:0,bottom:0,left:0,...e}}function ei(e){return typeof e!="number"?ra(e):{top:e,right:e,bottom:e,left:e}}function Cn(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Mi(e,t,r){let{reference:n,floating:i}=e,o=Pn(t),a=Qr(t),d=Zr(a),f=pt(t),u=o==="y",w=n.x+n.width/2-i.width/2,m=n.y+n.height/2-i.height/2,E=n[d]/2-i[d]/2,O;switch(f){case"top":O={x:w,y:n.y-i.height};break;case"bottom":O={x:w,y:n.y+n.height};break;case"right":O={x:n.x+n.width,y:m};break;case"left":O={x:n.x-i.width,y:m};break;default:O={x:n.x,y:n.y}}switch(xt(t)){case"start":O[a]-=E*(r&&u?-1:1);break;case"end":O[a]+=E*(r&&u?-1:1);break}return O}var ia=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,d=o.filter(Boolean),f=await(a.isRTL==null?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:w,y:m}=Mi(u,n,f),E=n,O={},S=0;for(let R=0;R({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:d,middlewareData:f}=t,{element:u,padding:w=0}=jt(e,t)||{};if(u==null)return{};let m=ei(w),E={x:r,y:n},O=Qr(i),S=Zr(O),R=await a.getDimensions(u),I=O==="y",$=I?"top":"left",A=I?"bottom":"right",k=I?"clientHeight":"clientWidth",Y=o.reference[S]+o.reference[O]-E[O]-o.floating[S],ne=E[O]-o.reference[O],J=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u)),V=J?J[k]:0;(!V||!await(a.isElement==null?void 0:a.isElement(J)))&&(V=d.floating[k]||o.floating[S]);let de=Y/2-ne/2,X=V/2-R[S]/2-1,Z=Et(m[$],X),me=Et(m[A],X),l=Z,h=V-R[S]-me,v=V/2-R[S]/2+de,p=Jr(l,v,h),j=!f.arrow&&xt(i)!=null&&v!==p&&o.reference[S]/2-(vxt(i)===e),...r.filter(i=>xt(i)!==e)]:r.filter(i=>pt(i)===i)).filter(i=>e?xt(i)===e||(t?vr(i)!==i:!1):!0)}var sa=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:a,placement:d,platform:f,elements:u}=t,{crossAxis:w=!1,alignment:m,allowedPlacements:E=Ri,autoAlignment:O=!0,...S}=jt(e,t),R=m!==void 0||E===Ri?aa(m||null,O,E):E,I=await _n(t,S),$=((r=a.autoPlacement)==null?void 0:r.index)||0,A=R[$];if(A==null)return{};let k=Wi(A,o,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(d!==A)return{reset:{placement:R[0]}};let Y=[I[pt(A)],I[k[0]],I[k[1]]],ne=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:A,overflows:Y}],J=R[$+1];if(J)return{data:{index:$+1,overflows:ne},reset:{placement:J}};let V=ne.map(Z=>{let me=xt(Z.placement);return[Z.placement,me&&w?Z.overflows.slice(0,2).reduce((l,h)=>l+h,0):Z.overflows[0],Z.overflows]}).sort((Z,me)=>Z[1]-me[1]),X=((i=V.filter(Z=>Z[2].slice(0,xt(Z[0])?2:3).every(me=>me<=0))[0])==null?void 0:i[0])||V[0][0];return X!==d?{data:{index:$+1,overflows:ne},reset:{placement:X}}:{}}}},la=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:i,middlewareData:o,rects:a,initialPlacement:d,platform:f,elements:u}=t,{mainAxis:w=!0,crossAxis:m=!0,fallbackPlacements:E,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:R=!0,...I}=jt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let $=pt(i),A=pt(d)===d,k=await(f.isRTL==null?void 0:f.isRTL(u.floating)),Y=E||(A||!R?[mr(d)]:ea(d));!E&&S!=="none"&&Y.push(...na(d,R,S,k));let ne=[d,...Y],J=await _n(t,I),V=[],de=((n=o.flip)==null?void 0:n.overflows)||[];if(w&&V.push(J[$]),m){let l=Wi(i,a,k);V.push(J[l[0]],J[l[1]])}if(de=[...de,{placement:i,overflows:V}],!V.every(l=>l<=0)){var X,Z;let l=(((X=o.flip)==null?void 0:X.index)||0)+1,h=ne[l];if(h)return{data:{index:l,overflows:de},reset:{placement:h}};let v=(Z=de.filter(p=>p.overflows[0]<=0).sort((p,j)=>p.overflows[1]-j.overflows[1])[0])==null?void 0:Z.placement;if(!v)switch(O){case"bestFit":{var me;let p=(me=de.map(j=>[j.placement,j.overflows.filter(P=>P>0).reduce((P,M)=>P+M,0)]).sort((j,P)=>j[1]-P[1])[0])==null?void 0:me[0];p&&(v=p);break}case"initialPlacement":v=d;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function Ii(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fi(e){return Hi.some(t=>e[t]>=0)}var ca=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=jt(e,t);switch(n){case"referenceHidden":{let o=await _n(t,{...i,elementContext:"reference"}),a=Ii(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Fi(a)}}}case"escaped":{let o=await _n(t,{...i,altBoundary:!0}),a=Ii(o,r.floating);return{data:{escapedOffsets:a,escaped:Fi(a)}}}default:return{}}}}};function Ui(e){let t=Et(...e.map(o=>o.left)),r=Et(...e.map(o=>o.top)),n=tt(...e.map(o=>o.right)),i=tt(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function fa(e){let t=e.slice().sort((i,o)=>i.y-o.y),r=[],n=null;for(let i=0;in.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>Cn(Ui(i)))}var ua=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:i,platform:o,strategy:a}=t,{padding:d=2,x:f,y:u}=jt(e,t),w=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),m=fa(w),E=Cn(Ui(w)),O=ei(d);function S(){if(m.length===2&&m[0].left>m[1].right&&f!=null&&u!=null)return m.find(I=>f>I.left-O.left&&fI.top-O.top&&u=2){if(Pn(r)==="y"){let Z=m[0],me=m[m.length-1],l=pt(r)==="top",h=Z.top,v=me.bottom,p=l?Z.left:me.left,j=l?Z.right:me.right,P=j-p,M=v-h;return{top:h,bottom:v,left:p,right:j,width:P,height:M,x:p,y:h}}let I=pt(r)==="left",$=tt(...m.map(Z=>Z.right)),A=Et(...m.map(Z=>Z.left)),k=m.filter(Z=>I?Z.left===A:Z.right===$),Y=k[0].top,ne=k[k.length-1].bottom,J=A,V=$,de=V-J,X=ne-Y;return{top:Y,bottom:ne,left:J,right:V,width:de,height:X,x:J,y:Y}}return E}let R=await o.getElementRects({reference:{getBoundingClientRect:S},floating:n.floating,strategy:a});return i.reference.x!==R.reference.x||i.reference.y!==R.reference.y||i.reference.width!==R.reference.width||i.reference.height!==R.reference.height?{reset:{rects:R}}:{}}}};async function da(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=pt(r),d=xt(r),f=Pn(r)==="y",u=["left","top"].includes(a)?-1:1,w=o&&f?-1:1,m=jt(t,e),{mainAxis:E,crossAxis:O,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return d&&typeof S=="number"&&(O=d==="end"?S*-1:S),f?{x:O*w,y:E*u}:{x:E*u,y:O*w}}var Vi=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:d}=t,f=await da(t,e);return a===((r=d.offset)==null?void 0:r.placement)&&(n=d.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:a}}}}},pa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:d={fn:I=>{let{x:$,y:A}=I;return{x:$,y:A}}},...f}=jt(e,t),u={x:r,y:n},w=await _n(t,f),m=Pn(pt(i)),E=$i(m),O=u[E],S=u[m];if(o){let I=E==="y"?"top":"left",$=E==="y"?"bottom":"right",A=O+w[I],k=O-w[$];O=Jr(A,O,k)}if(a){let I=m==="y"?"top":"left",$=m==="y"?"bottom":"right",A=S+w[I],k=S-w[$];S=Jr(A,S,k)}let R=d.fn({...t,[E]:O,[m]:S});return{...R,data:{x:R.x-r,y:R.y-n}}}}},ha=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:r,rects:n,platform:i,elements:o}=t,{apply:a=()=>{},...d}=jt(e,t),f=await _n(t,d),u=pt(r),w=xt(r),m=Pn(r)==="y",{width:E,height:O}=n.floating,S,R;u==="top"||u==="bottom"?(S=u,R=w===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(R=u,S=w==="end"?"top":"bottom");let I=O-f[S],$=E-f[R],A=!t.middlewareData.shift,k=I,Y=$;if(m){let J=E-f.left-f.right;Y=w||A?Et($,J):J}else{let J=O-f.top-f.bottom;k=w||A?Et(I,J):J}if(A&&!w){let J=tt(f.left,0),V=tt(f.right,0),de=tt(f.top,0),X=tt(f.bottom,0);m?Y=E-2*(J!==0||V!==0?J+V:tt(f.left,f.right)):k=O-2*(de!==0||X!==0?de+X:tt(f.top,f.bottom))}await a({...t,availableWidth:Y,availableHeight:k});let ne=await i.getDimensions(o.floating);return E!==ne.width||O!==ne.height?{reset:{rects:!0}}:{}}}};function rn(e){return zi(e)?(e.nodeName||"").toLowerCase():"#document"}function ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bt(e){var t;return(t=(zi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zi(e){return e instanceof Node||e instanceof ct(e).Node}function kt(e){return e instanceof Element||e instanceof ct(e).Element}function Tt(e){return e instanceof HTMLElement||e instanceof ct(e).HTMLElement}function Li(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ct(e).ShadowRoot}function zn(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function va(e){return["table","td","th"].includes(rn(e))}function ti(e){let t=ni(),r=ht(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ma(e){let t=Tn(e);for(;Tt(t)&&!gr(t);){if(ti(t))return t;t=Tn(t)}return null}function ni(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(e){return["html","body","#document"].includes(rn(e))}function ht(e){return ct(e).getComputedStyle(e)}function br(e){return kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Tn(e){if(rn(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Li(e)&&e.host||Bt(e);return Li(t)?t.host:t}function Yi(e){let t=Tn(e);return gr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(t)&&zn(t)?t:Yi(t)}function Vn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Yi(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=ct(i);return o?t.concat(a,a.visualViewport||[],zn(i)?i:[],a.frameElement&&r?Vn(a.frameElement):[]):t.concat(i,Vn(i,[],r))}function Xi(e){let t=ht(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Tt(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,d=hr(r)!==o||hr(n)!==a;return d&&(r=o,n=a),{width:r,height:n,$:d}}function ri(e){return kt(e)?e:e.contextElement}function Dn(e){let t=ri(e);if(!Tt(t))return nn(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Xi(t),a=(o?hr(r.width):r.width)/n,d=(o?hr(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!d||!Number.isFinite(d))&&(d=1),{x:a,y:d}}var ga=nn(0);function qi(e){let t=ct(e);return!ni()||!t.visualViewport?ga:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ba(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ct(e)?!1:t}function vn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=ri(e),a=nn(1);t&&(n?kt(n)&&(a=Dn(n)):a=Dn(e));let d=ba(o,r,n)?qi(o):nn(0),f=(i.left+d.x)/a.x,u=(i.top+d.y)/a.y,w=i.width/a.x,m=i.height/a.y;if(o){let E=ct(o),O=n&&kt(n)?ct(n):n,S=E,R=S.frameElement;for(;R&&n&&O!==S;){let I=Dn(R),$=R.getBoundingClientRect(),A=ht(R),k=$.left+(R.clientLeft+parseFloat(A.paddingLeft))*I.x,Y=$.top+(R.clientTop+parseFloat(A.paddingTop))*I.y;f*=I.x,u*=I.y,w*=I.x,m*=I.y,f+=k,u+=Y,S=ct(R),R=S.frameElement}}return Cn({width:w,height:m,x:f,y:u})}var ya=[":popover-open",":modal"];function Gi(e){return ya.some(t=>{try{return e.matches(t)}catch{return!1}})}function wa(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=Bt(n),d=t?Gi(t.floating):!1;if(n===a||d&&o)return r;let f={scrollLeft:0,scrollTop:0},u=nn(1),w=nn(0),m=Tt(n);if((m||!m&&!o)&&((rn(n)!=="body"||zn(a))&&(f=br(n)),Tt(n))){let E=vn(n);u=Dn(n),w.x=E.x+n.clientLeft,w.y=E.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+w.x,y:r.y*u.y-f.scrollTop*u.y+w.y}}function xa(e){return Array.from(e.getClientRects())}function Ki(e){return vn(Bt(e)).left+br(e).scrollLeft}function Ea(e){let t=Bt(e),r=br(e),n=e.ownerDocument.body,i=tt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=tt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+Ki(e),d=-r.scrollTop;return ht(n).direction==="rtl"&&(a+=tt(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:d}}function Oa(e,t){let r=ct(e),n=Bt(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,d=0,f=0;if(i){o=i.width,a=i.height;let u=ni();(!u||u&&t==="fixed")&&(d=i.offsetLeft,f=i.offsetTop)}return{width:o,height:a,x:d,y:f}}function Sa(e,t){let r=vn(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Tt(e)?Dn(e):nn(1),a=e.clientWidth*o.x,d=e.clientHeight*o.y,f=i*o.x,u=n*o.y;return{width:a,height:d,x:f,y:u}}function Ni(e,t,r){let n;if(t==="viewport")n=Oa(e,r);else if(t==="document")n=Ea(Bt(e));else if(kt(t))n=Sa(t,r);else{let i=qi(e);n={...t,x:t.x-i.x,y:t.y-i.y}}return Cn(n)}function Ji(e,t){let r=Tn(e);return r===t||!kt(r)||gr(r)?!1:ht(r).position==="fixed"||Ji(r,t)}function Aa(e,t){let r=t.get(e);if(r)return r;let n=Vn(e,[],!1).filter(d=>kt(d)&&rn(d)!=="body"),i=null,o=ht(e).position==="fixed",a=o?Tn(e):e;for(;kt(a)&&!gr(a);){let d=ht(a),f=ti(a);!f&&d.position==="fixed"&&(i=null),(o?!f&&!i:!f&&d.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||zn(a)&&!f&&Ji(e,a))?n=n.filter(w=>w!==a):i=d,a=Tn(a)}return t.set(e,n),n}function Da(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?Aa(t,this._c):[].concat(r),n],d=a[0],f=a.reduce((u,w)=>{let m=Ni(t,w,i);return u.top=tt(m.top,u.top),u.right=Et(m.right,u.right),u.bottom=Et(m.bottom,u.bottom),u.left=tt(m.left,u.left),u},Ni(t,d,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Ca(e){let{width:t,height:r}=Xi(e);return{width:t,height:r}}function _a(e,t,r){let n=Tt(t),i=Bt(t),o=r==="fixed",a=vn(e,!0,o,t),d={scrollLeft:0,scrollTop:0},f=nn(0);if(n||!n&&!o)if((rn(t)!=="body"||zn(i))&&(d=br(t)),n){let m=vn(t,!0,o,t);f.x=m.x+t.clientLeft,f.y=m.y+t.clientTop}else i&&(f.x=Ki(i));let u=a.left+d.scrollLeft-f.x,w=a.top+d.scrollTop-f.y;return{x:u,y:w,width:a.width,height:a.height}}function ki(e,t){return!Tt(e)||ht(e).position==="fixed"?null:t?t(e):e.offsetParent}function Zi(e,t){let r=ct(e);if(!Tt(e)||Gi(e))return r;let n=ki(e,t);for(;n&&va(n)&&ht(n).position==="static";)n=ki(n,t);return n&&(rn(n)==="html"||rn(n)==="body"&&ht(n).position==="static"&&!ti(n))?r:n||ma(e)||r}var Ta=async function(e){let t=this.getOffsetParent||Zi,r=this.getDimensions;return{reference:_a(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await r(e.floating)}}};function Pa(e){return ht(e).direction==="rtl"}var Ra={convertOffsetParentRelativeRectToViewportRelativeRect:wa,getDocumentElement:Bt,getClippingRect:Da,getOffsetParent:Zi,getElementRects:Ta,getClientRects:xa,getDimensions:Ca,getScale:Dn,isElement:kt,isRTL:Pa};function Ma(e,t){let r=null,n,i=Bt(e);function o(){var d;clearTimeout(n),(d=r)==null||d.disconnect(),r=null}function a(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),o();let{left:u,top:w,width:m,height:E}=e.getBoundingClientRect();if(d||t(),!m||!E)return;let O=pr(w),S=pr(i.clientWidth-(u+m)),R=pr(i.clientHeight-(w+E)),I=pr(u),A={rootMargin:-O+"px "+-S+"px "+-R+"px "+-I+"px",threshold:tt(0,Et(1,f))||1},k=!0;function Y(ne){let J=ne[0].intersectionRatio;if(J!==f){if(!k)return a();J?a(!1,J):n=setTimeout(()=>{a(!1,1e-7)},100)}k=!1}try{r=new IntersectionObserver(Y,{...A,root:i.ownerDocument})}catch{r=new IntersectionObserver(Y,A)}r.observe(e)}return a(!0),o}function ji(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,u=ri(e),w=i||o?[...u?Vn(u):[],...Vn(t)]:[];w.forEach($=>{i&&$.addEventListener("scroll",r,{passive:!0}),o&&$.addEventListener("resize",r)});let m=u&&d?Ma(u,r):null,E=-1,O=null;a&&(O=new ResizeObserver($=>{let[A]=$;A&&A.target===u&&O&&(O.unobserve(t),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var k;(k=O)==null||k.observe(t)})),r()}),u&&!f&&O.observe(u),O.observe(t));let S,R=f?vn(e):null;f&&I();function I(){let $=vn(e);R&&($.x!==R.x||$.y!==R.y||$.width!==R.width||$.height!==R.height)&&r(),R=$,S=requestAnimationFrame(I)}return r(),()=>{var $;w.forEach(A=>{i&&A.removeEventListener("scroll",r),o&&A.removeEventListener("resize",r)}),m?.(),($=O)==null||$.disconnect(),O=null,f&&cancelAnimationFrame(S)}}var ii=sa,Qi=pa,eo=la,to=ha,no=ca,ro=oa,io=ua,Bi=(e,t,r)=>{let n=new Map,i={platform:Ra,...r},o={...i.platform,_c:n};return ia(e,t,{...i,platform:o})},Ia=e=>{let t={placement:"bottom",strategy:"absolute",middleware:[]},r=Object.keys(e),n=i=>e[i];return r.includes("offset")&&t.middleware.push(Vi(n("offset"))),r.includes("teleport")&&(t.strategy="fixed"),r.includes("placement")&&(t.placement=n("placement")),r.includes("autoPlacement")&&!r.includes("flip")&&t.middleware.push(ii(n("autoPlacement"))),r.includes("flip")&&t.middleware.push(eo(n("flip"))),r.includes("shift")&&t.middleware.push(Qi(n("shift"))),r.includes("inline")&&t.middleware.push(io(n("inline"))),r.includes("arrow")&&t.middleware.push(ro(n("arrow"))),r.includes("hide")&&t.middleware.push(no(n("hide"))),r.includes("size")&&t.middleware.push(to(n("size"))),t},Fa=(e,t)=>{let r={component:{trap:!1},float:{placement:"bottom",strategy:"absolute",middleware:[]}},n=i=>e[e.indexOf(i)+1];if(e.includes("trap")&&(r.component.trap=!0),e.includes("teleport")&&(r.float.strategy="fixed"),e.includes("offset")&&r.float.middleware.push(Vi(t.offset||10)),e.includes("placement")&&(r.float.placement=n("placement")),e.includes("autoPlacement")&&!e.includes("flip")&&r.float.middleware.push(ii(t.autoPlacement)),e.includes("flip")&&r.float.middleware.push(eo(t.flip)),e.includes("shift")&&r.float.middleware.push(Qi(t.shift)),e.includes("inline")&&r.float.middleware.push(io(t.inline)),e.includes("arrow")&&r.float.middleware.push(ro(t.arrow)),e.includes("hide")&&r.float.middleware.push(no(t.hide)),e.includes("size")){let i=t.size?.availableWidth??null,o=t.size?.availableHeight??null;i&&delete t.size.availableWidth,o&&delete t.size.availableHeight,r.float.middleware.push(to({...t.size,apply({availableWidth:a,availableHeight:d,elements:f}){Object.assign(f.floating.style,{maxWidth:`${i??a}px`,maxHeight:`${o??d}px`})}}))}return r},La=e=>{var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),r="";e||(e=Math.floor(Math.random()*t.length));for(var n=0;n{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}function ka(e){let t={dismissable:!0,trap:!1};function r(n,i=null){if(n){if(n.hasAttribute("aria-expanded")||n.setAttribute("aria-expanded",!1),i.hasAttribute("id"))n.setAttribute("aria-controls",i.getAttribute("id"));else{let o=`panel-${La(8)}`;n.setAttribute("aria-controls",o),i.setAttribute("id",o)}i.setAttribute("aria-modal",!0),i.setAttribute("role","dialog")}}e.magic("float",n=>(i={},o={})=>{let a={...t,...o},d=Object.keys(i).length>0?Ia(i):{middleware:[ii()]},f=n,u=n.parentElement.closest("[x-data]"),w=u.querySelector('[x-ref="panel"]');r(f,w);function m(){return w.style.display=="block"}function E(){w.style.display="none",f.setAttribute("aria-expanded","false"),a.trap&&w.setAttribute("x-trap","false"),ji(n,w,R)}function O(){w.style.display="block",f.setAttribute("aria-expanded","true"),a.trap&&w.setAttribute("x-trap","true"),R()}function S(){m()?E():O()}async function R(){return await Bi(n,w,d).then(({middlewareData:I,placement:$,x:A,y:k})=>{if(I.arrow){let Y=I.arrow?.x,ne=I.arrow?.y,J=d.middleware.filter(de=>de.name=="arrow")[0].options.element,V={top:"bottom",right:"left",bottom:"top",left:"right"}[$.split("-")[0]];Object.assign(J.style,{left:Y!=null?`${Y}px`:"",top:ne!=null?`${ne}px`:"",right:"",bottom:"",[V]:"-4px"})}if(I.hide){let{referenceHidden:Y}=I.hide;Object.assign(w.style,{visibility:Y?"hidden":"visible"})}Object.assign(w.style,{left:`${A}px`,top:`${k}px`})})}a.dismissable&&(window.addEventListener("click",I=>{!u.contains(I.target)&&m()&&S()}),window.addEventListener("keydown",I=>{I.key==="Escape"&&m()&&S()},!0)),S()}),e.directive("float",(n,{modifiers:i,expression:o},{evaluate:a,effect:d})=>{let f=o?a(o):{},u=i.length>0?Fa(i,f):{},w=null;u.float.strategy=="fixed"&&(n.style.position="fixed");let m=V=>n.parentElement&&!n.parentElement.closest("[x-data]").contains(V.target)?n.close():null,E=V=>V.key==="Escape"?n.close():null,O=n.getAttribute("x-ref"),S=n.parentElement.closest("[x-data]"),R=S.querySelectorAll(`[\\@click^="$refs.${O}"]`),I=S.querySelectorAll(`[x-on\\:click^="$refs.${O}"]`);n.style.setProperty("display","none"),r([...R,...I][0],n),n._x_isShown=!1,n.trigger=null,n._x_doHide||(n._x_doHide=()=>{n.style.setProperty("display","none",i.includes("important")?"important":void 0)}),n._x_doShow||(n._x_doShow=()=>{n.style.setProperty("display","block",i.includes("important")?"important":void 0)});let $=()=>{n._x_doHide(),n._x_isShown=!1},A=()=>{n._x_doShow(),n._x_isShown=!0},k=()=>setTimeout(A),Y=Na(V=>V?A():$(),V=>{typeof n._x_toggleAndCascadeWithTransitions=="function"?n._x_toggleAndCascadeWithTransitions(n,V,A,$):V?k():$()}),ne,J=!0;d(()=>a(V=>{!J&&V===ne||(i.includes("immediate")&&(V?k():$()),Y(V),ne=V,J=!1)})),n.open=async function(V){n.trigger=V.currentTarget?V.currentTarget:V,Y(!0),n.trigger.setAttribute("aria-expanded","true"),u.component.trap&&n.setAttribute("x-trap","true"),w=ji(n.trigger,n,()=>{Bi(n.trigger,n,u.float).then(({middlewareData:de,placement:X,x:Z,y:me})=>{if(de.arrow){let l=de.arrow?.x,h=de.arrow?.y,v=u.float.middleware.filter(j=>j.name=="arrow")[0].options.element,p={top:"bottom",right:"left",bottom:"top",left:"right"}[X.split("-")[0]];Object.assign(v.style,{left:l!=null?`${l}px`:"",top:h!=null?`${h}px`:"",right:"",bottom:"",[p]:"-4px"})}if(de.hide){let{referenceHidden:l}=de.hide;Object.assign(n.style,{visibility:l?"hidden":"visible"})}Object.assign(n.style,{left:`${Z}px`,top:`${me}px`})})}),window.addEventListener("click",m),window.addEventListener("keydown",E,!0)},n.close=function(){if(!n._x_isShown)return!1;Y(!1),n.trigger.setAttribute("aria-expanded","false"),u.component.trap&&n.setAttribute("x-trap","false"),w(),window.removeEventListener("click",m),window.removeEventListener("keydown",E,!1)},n.toggle=function(V){n._x_isShown?n.close():n.open(V)}})}var oo=ka;function ja(e){e.store("lazyLoadedAssets",{loaded:new Set,check(a){return Array.isArray(a)?a.every(d=>this.loaded.has(d)):this.loaded.has(a)},markLoaded(a){Array.isArray(a)?a.forEach(d=>this.loaded.add(d)):this.loaded.add(a)}});let t=a=>new CustomEvent(a,{bubbles:!0,composed:!0,cancelable:!0}),r=(a,d={},f,u)=>{let w=document.createElement(a);return Object.entries(d).forEach(([m,E])=>w[m]=E),f&&(u?f.insertBefore(w,u):f.appendChild(w)),w},n=(a,d,f={},u=null,w=null)=>{let m=a==="link"?`link[href="${d}"]`:`script[src="${d}"]`;if(document.querySelector(m)||e.store("lazyLoadedAssets").check(d))return Promise.resolve();let E=a==="link"?{...f,href:d}:{...f,src:d},O=r(a,E,u,w);return new Promise((S,R)=>{O.onload=()=>{e.store("lazyLoadedAssets").markLoaded(d),S()},O.onerror=()=>{R(new Error(`Failed to load ${a}: ${d}`))}})},i=async(a,d,f=null,u=null)=>{let w={type:"text/css",rel:"stylesheet"};d&&(w.media=d);let m=document.head,E=null;if(f&&u){let O=document.querySelector(`link[href*="${u}"]`);O?(m=O.parentElement,E=f==="before"?O:O.nextSibling):(console.warn(`Target (${u}) not found for ${a}. Appending to head.`),m=document.head,E=null)}await n("link",a,w,m,E)},o=async(a,d,f=null,u=null,w=null)=>{let m=document.head,E=null;if(f&&u){let S=document.querySelector(`script[src*="${u}"]`);S?(m=S.parentElement,E=f==="before"?S:S.nextSibling):(console.warn(`Target (${u}) not found for ${a}. Falling back to head or body.`),m=document.head,E=null)}else(d.has("body-start")||d.has("body-end"))&&(m=document.body,d.has("body-start")&&(E=document.body.firstChild));let O={};w&&(O.type="module"),await n("script",a,O,m,E)};e.directive("load-css",(a,{expression:d},{evaluate:f})=>{let u=f(d),w=a.media,m=a.getAttribute("data-dispatch"),E=a.getAttribute("data-css-before")?"before":a.getAttribute("data-css-after")?"after":null,O=a.getAttribute("data-css-before")||a.getAttribute("data-css-after")||null;Promise.all(u.map(S=>i(S,w,E,O))).then(()=>{m&&window.dispatchEvent(t(`${m}-css`))}).catch(console.error)}),e.directive("load-js",(a,{expression:d,modifiers:f},{evaluate:u})=>{let w=u(d),m=new Set(f),E=a.getAttribute("data-js-before")?"before":a.getAttribute("data-js-after")?"after":null,O=a.getAttribute("data-js-before")||a.getAttribute("data-js-after")||null,S=a.getAttribute("data-js-as-module")||a.getAttribute("data-as-module")||!1,R=a.getAttribute("data-dispatch");Promise.all(w.map(I=>o(I,m,E,O,S))).then(()=>{R&&window.dispatchEvent(t(`${R}-js`))}).catch(console.error)})}var ao=ja;function Ba(){return!0}function Ha({component:e,argument:t}){return new Promise(r=>{if(t)window.addEventListener(t,()=>r(),{once:!0});else{let n=i=>{i.detail.id===e.id&&(window.removeEventListener("async-alpine:load",n),r())};window.addEventListener("async-alpine:load",n)}})}function $a(){return new Promise(e=>{"requestIdleCallback"in window?window.requestIdleCallback(e):setTimeout(e,200)})}function Wa({argument:e}){return new Promise(t=>{if(!e)return console.log("Async Alpine: media strategy requires a media query. Treating as 'eager'"),t();let r=window.matchMedia(`(${e})`);r.matches?t():r.addEventListener("change",t,{once:!0})})}function Ua({component:e,argument:t}){return new Promise(r=>{let n=t||"0px 0px 0px 0px",i=new IntersectionObserver(o=>{o[0].isIntersecting&&(i.disconnect(),r())},{rootMargin:n});i.observe(e.el)})}var so={eager:Ba,event:Ha,idle:$a,media:Wa,visible:Ua};async function Va(e){let t=za(e.strategy);await oi(e,t)}async function oi(e,t){if(t.type==="expression"){if(t.operator==="&&")return Promise.all(t.parameters.map(r=>oi(e,r)));if(t.operator==="||")return Promise.any(t.parameters.map(r=>oi(e,r)))}return so[t.method]?so[t.method]({component:e,argument:t.argument}):!1}function za(e){let t=Ya(e),r=co(t);return r.type==="method"?{type:"expression",operator:"&&",parameters:[r]}:r}function Ya(e){let t=/\s*([()])\s*|\s*(\|\||&&|\|)\s*|\s*((?:[^()&|]+\([^()]+\))|[^()&|]+)\s*/g,r=[],n;for(;(n=t.exec(e))!==null;){let[i,o,a,d]=n;if(o!==void 0)r.push({type:"parenthesis",value:o});else if(a!==void 0)r.push({type:"operator",value:a==="|"?"&&":a});else{let f={type:"method",method:d.trim()};d.includes("(")&&(f.method=d.substring(0,d.indexOf("(")).trim(),f.argument=d.substring(d.indexOf("(")+1,d.indexOf(")"))),d.method==="immediate"&&(d.method="eager"),r.push(f)}}return r}function co(e){let t=lo(e);for(;e.length>0&&(e[0].value==="&&"||e[0].value==="|"||e[0].value==="||");){let r=e.shift().value,n=lo(e);t.type==="expression"&&t.operator===r?t.parameters.push(n):t={type:"expression",operator:r,parameters:[t,n]}}return t}function lo(e){if(e[0].value==="("){e.shift();let t=co(e);return e[0].value===")"&&e.shift(),t}else return e.shift()}function fo(e){let t="load",r=e.prefixed("load-src"),n=e.prefixed("ignore"),i={defaultStrategy:"eager",keepRelativeURLs:!1},o=!1,a={},d=0;function f(){return d++}e.asyncOptions=A=>{i={...i,...A}},e.asyncData=(A,k=!1)=>{a[A]={loaded:!1,download:k}},e.asyncUrl=(A,k)=>{!A||!k||a[A]||(a[A]={loaded:!1,download:()=>import($(k))})},e.asyncAlias=A=>{o=A};let u=A=>{e.skipDuringClone(()=>{A._x_async||(A._x_async="init",A._x_ignore=!0,A.setAttribute(n,""))})()},w=async A=>{e.skipDuringClone(async()=>{if(A._x_async!=="init")return;A._x_async="await";let{name:k,strategy:Y}=m(A);await Va({name:k,strategy:Y,el:A,id:A.id||f()}),A.isConnected&&(await E(k),A.isConnected&&(S(A),A._x_async="loaded"))})()};w.inline=u,e.directive(t,w).before("ignore");function m(A){let k=I(A.getAttribute(e.prefixed("data"))),Y=A.getAttribute(e.prefixed(t))||i.defaultStrategy,ne=A.getAttribute(r);return ne&&e.asyncUrl(k,ne),{name:k,strategy:Y}}async function E(A){if(A.startsWith("_x_async_")||(R(A),!a[A]||a[A].loaded))return;let k=await O(A);e.data(A,k),a[A].loaded=!0}async function O(A){if(!a[A])return;let k=await a[A].download(A);return typeof k=="function"?k:k[A]||k.default||Object.values(k)[0]||!1}function S(A){e.destroyTree(A),A._x_ignore=!1,A.removeAttribute(n),!A.closest(`[${n}]`)&&e.initTree(A)}function R(A){if(!(!o||a[A])){if(typeof o=="function"){e.asyncData(A,o);return}e.asyncUrl(A,o.replaceAll("[name]",A))}}function I(A){return(A||"").split(/[({]/g)[0]||`_x_async_${f()}`}function $(A){return i.keepRelativeURLs||new RegExp("^(?:[a-z+]+:)?//","i").test(A)?A:new URL(A,document.baseURI).href}}var Uo=Jo(ho(),1);function vo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function Ga(e,t){if(e==null)return{};var r=qa(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ka="1.15.6";function Ht(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Wt=Ht(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),er=Ht(/Edge/i),mo=Ht(/firefox/i),Gn=Ht(/safari/i)&&!Ht(/chrome/i)&&!Ht(/android/i),yi=Ht(/iP(ad|od|hone)/i),So=Ht(/chrome/i)&&Ht(/android/i),Ao={capture:!1,passive:!1};function Oe(e,t,r){e.addEventListener(t,r,!Wt&&Ao)}function Ee(e,t,r){e.removeEventListener(t,r,!Wt&&Ao)}function Tr(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Do(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function St(e,t,r,n){if(e){r=r||document;do{if(t!=null&&(t[0]===">"?e.parentNode===r&&Tr(e,t):Tr(e,t))||n&&e===r)return e;if(e===r)break}while(e=Do(e))}return null}var go=/\s+/g;function ft(e,t,r){if(e&&t)if(e.classList)e.classList[r?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(go," ").replace(" "+t+" "," ");e.className=(n+(r?" "+t:"")).replace(go," ")}}function ae(e,t,r){var n=e&&e.style;if(n){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),t===void 0?r:r[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=r+(typeof r=="string"?"":"px")}}function Ln(e,t){var r="";if(typeof e=="string")r=e;else do{var n=ae(e,"transform");n&&n!=="none"&&(r=n+" "+r)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(r)}function Co(e,t,r){if(e){var n=e.getElementsByTagName(t),i=0,o=n.length;if(r)for(;i=o:a=i<=o,!a)return n;if(n===Pt())break;n=sn(n,!1)}return!1}function Nn(e,t,r,n){for(var i=0,o=0,a=e.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=Ga(n,is);tr.pluginEvent.bind(se)(t,r,Rt({dragEl:N,parentEl:Ve,ghostEl:ue,rootEl:ke,nextEl:bn,lastDownEl:Ar,cloneEl:We,cloneHidden:an,dragStarted:Yn,putSortable:Ze,activeSortable:se.active,originalEvent:i,oldIndex:Fn,oldDraggableIndex:Jn,newIndex:ut,newDraggableIndex:on,hideGhostForTarget:Lo,unhideGhostForTarget:No,cloneNowHidden:function(){an=!0},cloneNowShown:function(){an=!1},dispatchSortableEvent:function(d){it({sortable:r,name:d,originalEvent:i})}},o))};function it(e){rs(Rt({putSortable:Ze,cloneEl:We,targetEl:N,rootEl:ke,oldIndex:Fn,oldDraggableIndex:Jn,newIndex:ut,newDraggableIndex:on},e))}var N,Ve,ue,ke,bn,Ar,We,an,Fn,ut,Jn,on,wr,Ze,In=!1,Pr=!1,Rr=[],mn,Ot,li,ci,wo,xo,Yn,Mn,Zn,Qn=!1,xr=!1,Dr,nt,fi=[],vi=!1,Mr=[],Fr=typeof document<"u",Er=yi,Eo=er||Wt?"cssFloat":"float",os=Fr&&!So&&!yi&&"draggable"in document.createElement("div"),Mo=function(){if(Fr){if(Wt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Io=function(t,r){var n=ae(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Nn(t,0,r),a=Nn(t,1,r),d=o&&ae(o),f=a&&ae(a),u=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+qe(o).width,w=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+qe(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&d.float&&d.float!=="none"){var m=d.float==="left"?"left":"right";return a&&(f.clear==="both"||f.clear===m)?"vertical":"horizontal"}return o&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||u>=i&&n[Eo]==="none"||a&&n[Eo]==="none"&&u+w>i)?"vertical":"horizontal"},as=function(t,r,n){var i=n?t.left:t.top,o=n?t.right:t.bottom,a=n?t.width:t.height,d=n?r.left:r.top,f=n?r.right:r.bottom,u=n?r.width:r.height;return i===d||o===f||i+a/2===d+u/2},ss=function(t,r){var n;return Rr.some(function(i){var o=i[st].options.emptyInsertThreshold;if(!(!o||wi(i))){var a=qe(i),d=t>=a.left-o&&t<=a.right+o,f=r>=a.top-o&&r<=a.bottom+o;if(d&&f)return n=i}}),n},Fo=function(t){function r(o,a){return function(d,f,u,w){var m=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(o==null&&(a||m))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return r(o(d,f,u,w),a)(d,f,u,w);var E=(a?d:f).options.group.name;return o===!0||typeof o=="string"&&o===E||o.join&&o.indexOf(E)>-1}}var n={},i=t.group;(!i||Sr(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=r(i.pull,!0),n.checkPut=r(i.put),n.revertClone=i.revertClone,t.group=n},Lo=function(){!Mo&&ue&&ae(ue,"display","none")},No=function(){!Mo&&ue&&ae(ue,"display","")};Fr&&!So&&document.addEventListener("click",function(e){if(Pr)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Pr=!1,!1},!0);var gn=function(t){if(N){t=t.touches?t.touches[0]:t;var r=ss(t.clientX,t.clientY);if(r){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=r,n.preventDefault=void 0,n.stopPropagation=void 0,r[st]._onDragOver(n)}}},ls=function(t){N&&N.parentNode[st]._isOutsideThisEl(t.target)};function se(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=$t({},t),e[st]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Io(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,d){a.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:se.supportPointer!==!1&&"PointerEvent"in window&&(!Gn||yi),emptyInsertThreshold:5};tr.initializePlugins(this,e,r);for(var n in r)!(n in t)&&(t[n]=r[n]);Fo(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:os,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Oe(e,"pointerdown",this._onTapStart):(Oe(e,"mousedown",this._onTapStart),Oe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Oe(e,"dragover",this),Oe(e,"dragenter",this)),Rr.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),$t(this,es())}se.prototype={constructor:se,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Mn=null)},_getDirection:function(t,r){return typeof this.options.direction=="function"?this.options.direction.call(this,t,r,N):this.options.direction},_onTapStart:function(t){if(t.cancelable){var r=this,n=this.el,i=this.options,o=i.preventOnFilter,a=t.type,d=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,f=(d||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||f,w=i.filter;if(ms(n),!N&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Gn&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=St(f,i.draggable,n,!1),!(f&&f.animated)&&Ar!==f)){if(Fn=vt(f),Jn=vt(f,i.draggable),typeof w=="function"){if(w.call(this,t,f,this)){it({sortable:r,rootEl:u,name:"filter",targetEl:f,toEl:n,fromEl:n}),at("filter",r,{evt:t}),o&&t.preventDefault();return}}else if(w&&(w=w.split(",").some(function(m){if(m=St(u,m.trim(),n,!1),m)return it({sortable:r,rootEl:m,name:"filter",targetEl:f,fromEl:n,toEl:n}),at("filter",r,{evt:t}),!0}),w)){o&&t.preventDefault();return}i.handle&&!St(u,i.handle,n,!1)||this._prepareDragStart(t,d,f)}}},_prepareDragStart:function(t,r,n){var i=this,o=i.el,a=i.options,d=o.ownerDocument,f;if(n&&!N&&n.parentNode===o){var u=qe(n);if(ke=o,N=n,Ve=N.parentNode,bn=N.nextSibling,Ar=n,wr=a.group,se.dragged=N,mn={target:N,clientX:(r||t).clientX,clientY:(r||t).clientY},wo=mn.clientX-u.left,xo=mn.clientY-u.top,this._lastX=(r||t).clientX,this._lastY=(r||t).clientY,N.style["will-change"]="all",f=function(){if(at("delayEnded",i,{evt:t}),se.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!mo&&i.nativeDraggable&&(N.draggable=!0),i._triggerDragStart(t,r),it({sortable:i,name:"choose",originalEvent:t}),ft(N,a.chosenClass,!0)},a.ignore.split(",").forEach(function(w){Co(N,w.trim(),ui)}),Oe(d,"dragover",gn),Oe(d,"mousemove",gn),Oe(d,"touchmove",gn),a.supportPointer?(Oe(d,"pointerup",i._onDrop),!this.nativeDraggable&&Oe(d,"pointercancel",i._onDrop)):(Oe(d,"mouseup",i._onDrop),Oe(d,"touchend",i._onDrop),Oe(d,"touchcancel",i._onDrop)),mo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,N.draggable=!0),at("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(er||Wt))){if(se.eventCanceled){this._onDrop();return}a.supportPointer?(Oe(d,"pointerup",i._disableDelayedDrag),Oe(d,"pointercancel",i._disableDelayedDrag)):(Oe(d,"mouseup",i._disableDelayedDrag),Oe(d,"touchend",i._disableDelayedDrag),Oe(d,"touchcancel",i._disableDelayedDrag)),Oe(d,"mousemove",i._delayedDragTouchMoveHandler),Oe(d,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Oe(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,a.delay)}else f()}},_delayedDragTouchMoveHandler:function(t){var r=t.touches?t.touches[0]:t;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){N&&ui(N),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ee(t,"mouseup",this._disableDelayedDrag),Ee(t,"touchend",this._disableDelayedDrag),Ee(t,"touchcancel",this._disableDelayedDrag),Ee(t,"pointerup",this._disableDelayedDrag),Ee(t,"pointercancel",this._disableDelayedDrag),Ee(t,"mousemove",this._delayedDragTouchMoveHandler),Ee(t,"touchmove",this._delayedDragTouchMoveHandler),Ee(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,r){r=r||t.pointerType=="touch"&&t,!this.nativeDraggable||r?this.options.supportPointer?Oe(document,"pointermove",this._onTouchMove):r?Oe(document,"touchmove",this._onTouchMove):Oe(document,"mousemove",this._onTouchMove):(Oe(N,"dragend",this),Oe(ke,"dragstart",this._onDragStart));try{document.selection?Cr(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,r){if(In=!1,ke&&N){at("dragStarted",this,{evt:r}),this.nativeDraggable&&Oe(document,"dragover",ls);var n=this.options;!t&&ft(N,n.dragClass,!1),ft(N,n.ghostClass,!0),se.active=this,t&&this._appendGhost(),it({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(Ot){this._lastX=Ot.clientX,this._lastY=Ot.clientY,Lo();for(var t=document.elementFromPoint(Ot.clientX,Ot.clientY),r=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ot.clientX,Ot.clientY),t!==r);)r=t;if(N.parentNode[st]._isOutsideThisEl(t),r)do{if(r[st]){var n=void 0;if(n=r[st]._onDragOver({clientX:Ot.clientX,clientY:Ot.clientY,target:t,rootEl:r}),n&&!this.options.dragoverBubble)break}t=r}while(r=Do(r));No()}},_onTouchMove:function(t){if(mn){var r=this.options,n=r.fallbackTolerance,i=r.fallbackOffset,o=t.touches?t.touches[0]:t,a=ue&&Ln(ue,!0),d=ue&&a&&a.a,f=ue&&a&&a.d,u=Er&&nt&&yo(nt),w=(o.clientX-mn.clientX+i.x)/(d||1)+(u?u[0]-fi[0]:0)/(d||1),m=(o.clientY-mn.clientY+i.y)/(f||1)+(u?u[1]-fi[1]:0)/(f||1);if(!se.active&&!In){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(it({rootEl:Ve,name:"add",toEl:Ve,fromEl:ke,originalEvent:t}),it({sortable:this,name:"remove",toEl:Ve,originalEvent:t}),it({rootEl:Ve,name:"sort",toEl:Ve,fromEl:ke,originalEvent:t}),it({sortable:this,name:"sort",toEl:Ve,originalEvent:t})),Ze&&Ze.save()):ut!==Fn&&ut>=0&&(it({sortable:this,name:"update",toEl:Ve,originalEvent:t}),it({sortable:this,name:"sort",toEl:Ve,originalEvent:t})),se.active&&((ut==null||ut===-1)&&(ut=Fn,on=Jn),it({sortable:this,name:"end",toEl:Ve,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){at("nulling",this),ke=N=Ve=ue=bn=We=Ar=an=mn=Ot=Yn=ut=on=Fn=Jn=Mn=Zn=Ze=wr=se.dragged=se.ghost=se.clone=se.active=null,Mr.forEach(function(t){t.checked=!0}),Mr.length=li=ci=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":N&&(this._onDragOver(t),cs(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],r,n=this.el.children,i=0,o=n.length,a=this.options;ii.right+o||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>i.bottom+o||e.clientX>n.right&&e.clientY>n.top}function ps(e,t,r,n,i,o,a,d){var f=n?e.clientY:e.clientX,u=n?r.height:r.width,w=n?r.top:r.left,m=n?r.bottom:r.right,E=!1;if(!a){if(d&&Drw+u*o/2:fm-Dr)return-Zn}else if(f>w+u*(1-i)/2&&fm-u*o/2)?f>w+u/2?1:-1:0}function hs(e){return vt(N){e.directive("sortable",t=>{let r=parseInt(t.dataset?.sortableAnimationDuration);r!==0&&!r&&(r=300),t.sortable=Oi.create(t,{group:t.getAttribute("x-sortable-group"),draggable:"[x-sortable-item]",handle:"[x-sortable-handle]",dataIdAttr:"x-sortable-item",animation:r,ghostClass:"fi-sortable-ghost"})})};var bs=Object.create,Di=Object.defineProperty,ys=Object.getPrototypeOf,ws=Object.prototype.hasOwnProperty,xs=Object.getOwnPropertyNames,Es=Object.getOwnPropertyDescriptor,Os=e=>Di(e,"__esModule",{value:!0}),Bo=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),Ss=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of xs(t))!ws.call(e,n)&&n!=="default"&&Di(e,n,{get:()=>t[n],enumerable:!(r=Es(t,n))||r.enumerable});return e},Ho=e=>Ss(Os(Di(e!=null?bs(ys(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),As=Bo(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(c){var s=c.getBoundingClientRect();return{width:s.width,height:s.height,top:s.top,right:s.right,bottom:s.bottom,left:s.left,x:s.left,y:s.top}}function r(c){if(c==null)return window;if(c.toString()!=="[object Window]"){var s=c.ownerDocument;return s&&s.defaultView||window}return c}function n(c){var s=r(c),b=s.pageXOffset,_=s.pageYOffset;return{scrollLeft:b,scrollTop:_}}function i(c){var s=r(c).Element;return c instanceof s||c instanceof Element}function o(c){var s=r(c).HTMLElement;return c instanceof s||c instanceof HTMLElement}function a(c){if(typeof ShadowRoot>"u")return!1;var s=r(c).ShadowRoot;return c instanceof s||c instanceof ShadowRoot}function d(c){return{scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}}function f(c){return c===r(c)||!o(c)?n(c):d(c)}function u(c){return c?(c.nodeName||"").toLowerCase():null}function w(c){return((i(c)?c.ownerDocument:c.document)||window.document).documentElement}function m(c){return t(w(c)).left+n(c).scrollLeft}function E(c){return r(c).getComputedStyle(c)}function O(c){var s=E(c),b=s.overflow,_=s.overflowX,T=s.overflowY;return/auto|scroll|overlay|hidden/.test(b+T+_)}function S(c,s,b){b===void 0&&(b=!1);var _=w(s),T=t(c),L=o(s),U={scrollLeft:0,scrollTop:0},H={x:0,y:0};return(L||!L&&!b)&&((u(s)!=="body"||O(_))&&(U=f(s)),o(s)?(H=t(s),H.x+=s.clientLeft,H.y+=s.clientTop):_&&(H.x=m(_))),{x:T.left+U.scrollLeft-H.x,y:T.top+U.scrollTop-H.y,width:T.width,height:T.height}}function R(c){var s=t(c),b=c.offsetWidth,_=c.offsetHeight;return Math.abs(s.width-b)<=1&&(b=s.width),Math.abs(s.height-_)<=1&&(_=s.height),{x:c.offsetLeft,y:c.offsetTop,width:b,height:_}}function I(c){return u(c)==="html"?c:c.assignedSlot||c.parentNode||(a(c)?c.host:null)||w(c)}function $(c){return["html","body","#document"].indexOf(u(c))>=0?c.ownerDocument.body:o(c)&&O(c)?c:$(I(c))}function A(c,s){var b;s===void 0&&(s=[]);var _=$(c),T=_===((b=c.ownerDocument)==null?void 0:b.body),L=r(_),U=T?[L].concat(L.visualViewport||[],O(_)?_:[]):_,H=s.concat(U);return T?H:H.concat(A(I(U)))}function k(c){return["table","td","th"].indexOf(u(c))>=0}function Y(c){return!o(c)||E(c).position==="fixed"?null:c.offsetParent}function ne(c){var s=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,b=navigator.userAgent.indexOf("Trident")!==-1;if(b&&o(c)){var _=E(c);if(_.position==="fixed")return null}for(var T=I(c);o(T)&&["html","body"].indexOf(u(T))<0;){var L=E(T);if(L.transform!=="none"||L.perspective!=="none"||L.contain==="paint"||["transform","perspective"].indexOf(L.willChange)!==-1||s&&L.willChange==="filter"||s&&L.filter&&L.filter!=="none")return T;T=T.parentNode}return null}function J(c){for(var s=r(c),b=Y(c);b&&k(b)&&E(b).position==="static";)b=Y(b);return b&&(u(b)==="html"||u(b)==="body"&&E(b).position==="static")?s:b||ne(c)||s}var V="top",de="bottom",X="right",Z="left",me="auto",l=[V,de,X,Z],h="start",v="end",p="clippingParents",j="viewport",P="popper",M="reference",Q=l.reduce(function(c,s){return c.concat([s+"-"+h,s+"-"+v])},[]),ze=[].concat(l,[me]).reduce(function(c,s){return c.concat([s,s+"-"+h,s+"-"+v])},[]),Mt="beforeRead",Ut="read",Lr="afterRead",Nr="beforeMain",kr="main",Vt="afterMain",nr="beforeWrite",jr="write",rr="afterWrite",It=[Mt,Ut,Lr,Nr,kr,Vt,nr,jr,rr];function Br(c){var s=new Map,b=new Set,_=[];c.forEach(function(L){s.set(L.name,L)});function T(L){b.add(L.name);var U=[].concat(L.requires||[],L.requiresIfExists||[]);U.forEach(function(H){if(!b.has(H)){var G=s.get(H);G&&T(G)}}),_.push(L)}return c.forEach(function(L){b.has(L.name)||T(L)}),_}function mt(c){var s=Br(c);return It.reduce(function(b,_){return b.concat(s.filter(function(T){return T.phase===_}))},[])}function zt(c){var s;return function(){return s||(s=new Promise(function(b){Promise.resolve().then(function(){s=void 0,b(c())})})),s}}function At(c){for(var s=arguments.length,b=new Array(s>1?s-1:0),_=1;_=0,_=b&&o(c)?J(c):c;return i(_)?s.filter(function(T){return i(T)&&kn(T,_)&&u(T)!=="body"}):[]}function wn(c,s,b){var _=s==="clippingParents"?yn(c):[].concat(s),T=[].concat(_,[b]),L=T[0],U=T.reduce(function(H,G){var oe=sr(c,G);return H.top=gt(oe.top,H.top),H.right=ln(oe.right,H.right),H.bottom=ln(oe.bottom,H.bottom),H.left=gt(oe.left,H.left),H},sr(c,L));return U.width=U.right-U.left,U.height=U.bottom-U.top,U.x=U.left,U.y=U.top,U}function cn(c){return c.split("-")[1]}function dt(c){return["top","bottom"].indexOf(c)>=0?"x":"y"}function lr(c){var s=c.reference,b=c.element,_=c.placement,T=_?ot(_):null,L=_?cn(_):null,U=s.x+s.width/2-b.width/2,H=s.y+s.height/2-b.height/2,G;switch(T){case V:G={x:U,y:s.y-b.height};break;case de:G={x:U,y:s.y+s.height};break;case X:G={x:s.x+s.width,y:H};break;case Z:G={x:s.x-b.width,y:H};break;default:G={x:s.x,y:s.y}}var oe=T?dt(T):null;if(oe!=null){var z=oe==="y"?"height":"width";switch(L){case h:G[oe]=G[oe]-(s[z]/2-b[z]/2);break;case v:G[oe]=G[oe]+(s[z]/2-b[z]/2);break}}return G}function cr(){return{top:0,right:0,bottom:0,left:0}}function fr(c){return Object.assign({},cr(),c)}function ur(c,s){return s.reduce(function(b,_){return b[_]=c,b},{})}function qt(c,s){s===void 0&&(s={});var b=s,_=b.placement,T=_===void 0?c.placement:_,L=b.boundary,U=L===void 0?p:L,H=b.rootBoundary,G=H===void 0?j:H,oe=b.elementContext,z=oe===void 0?P:oe,Ce=b.altBoundary,Le=Ce===void 0?!1:Ce,De=b.padding,xe=De===void 0?0:De,Re=fr(typeof xe!="number"?xe:ur(xe,l)),Se=z===P?M:P,Be=c.elements.reference,Me=c.rects.popper,He=c.elements[Le?Se:z],ce=wn(i(He)?He:He.contextElement||w(c.elements.popper),U,G),Pe=t(Be),_e=lr({reference:Pe,element:Me,strategy:"absolute",placement:T}),Ne=Xt(Object.assign({},Me,_e)),Fe=z===P?Ne:Pe,Ye={top:ce.top-Fe.top+Re.top,bottom:Fe.bottom-ce.bottom+Re.bottom,left:ce.left-Fe.left+Re.left,right:Fe.right-ce.right+Re.right},$e=c.modifiersData.offset;if(z===P&&$e){var Ue=$e[T];Object.keys(Ye).forEach(function(wt){var et=[X,de].indexOf(wt)>=0?1:-1,Lt=[V,de].indexOf(wt)>=0?"y":"x";Ye[wt]+=Ue[Lt]*et})}return Ye}var dr="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Vr="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",xn={placement:"bottom",modifiers:[],strategy:"absolute"};function fn(){for(var c=arguments.length,s=new Array(c),b=0;b100){console.error(Vr);break}if(z.reset===!0){z.reset=!1,Pe=-1;continue}var _e=z.orderedModifiers[Pe],Ne=_e.fn,Fe=_e.options,Ye=Fe===void 0?{}:Fe,$e=_e.name;typeof Ne=="function"&&(z=Ne({state:z,options:Ye,name:$e,instance:De})||z)}}},update:zt(function(){return new Promise(function(Se){De.forceUpdate(),Se(z)})}),destroy:function(){Re(),Le=!0}};if(!fn(H,G))return console.error(dr),De;De.setOptions(oe).then(function(Se){!Le&&oe.onFirstUpdate&&oe.onFirstUpdate(Se)});function xe(){z.orderedModifiers.forEach(function(Se){var Be=Se.name,Me=Se.options,He=Me===void 0?{}:Me,ce=Se.effect;if(typeof ce=="function"){var Pe=ce({state:z,name:Be,instance:De,options:He}),_e=function(){};Ce.push(Pe||_e)}})}function Re(){Ce.forEach(function(Se){return Se()}),Ce=[]}return De}}var On={passive:!0};function zr(c){var s=c.state,b=c.instance,_=c.options,T=_.scroll,L=T===void 0?!0:T,U=_.resize,H=U===void 0?!0:U,G=r(s.elements.popper),oe=[].concat(s.scrollParents.reference,s.scrollParents.popper);return L&&oe.forEach(function(z){z.addEventListener("scroll",b.update,On)}),H&&G.addEventListener("resize",b.update,On),function(){L&&oe.forEach(function(z){z.removeEventListener("scroll",b.update,On)}),H&&G.removeEventListener("resize",b.update,On)}}var jn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zr,data:{}};function Yr(c){var s=c.state,b=c.name;s.modifiersData[b]=lr({reference:s.rects.reference,element:s.rects.popper,strategy:"absolute",placement:s.placement})}var Bn={name:"popperOffsets",enabled:!0,phase:"read",fn:Yr,data:{}},Xr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qr(c){var s=c.x,b=c.y,_=window,T=_.devicePixelRatio||1;return{x:Yt(Yt(s*T)/T)||0,y:Yt(Yt(b*T)/T)||0}}function Hn(c){var s,b=c.popper,_=c.popperRect,T=c.placement,L=c.offsets,U=c.position,H=c.gpuAcceleration,G=c.adaptive,oe=c.roundOffsets,z=oe===!0?qr(L):typeof oe=="function"?oe(L):L,Ce=z.x,Le=Ce===void 0?0:Ce,De=z.y,xe=De===void 0?0:De,Re=L.hasOwnProperty("x"),Se=L.hasOwnProperty("y"),Be=Z,Me=V,He=window;if(G){var ce=J(b),Pe="clientHeight",_e="clientWidth";ce===r(b)&&(ce=w(b),E(ce).position!=="static"&&(Pe="scrollHeight",_e="scrollWidth")),ce=ce,T===V&&(Me=de,xe-=ce[Pe]-_.height,xe*=H?1:-1),T===Z&&(Be=X,Le-=ce[_e]-_.width,Le*=H?1:-1)}var Ne=Object.assign({position:U},G&&Xr);if(H){var Fe;return Object.assign({},Ne,(Fe={},Fe[Me]=Se?"0":"",Fe[Be]=Re?"0":"",Fe.transform=(He.devicePixelRatio||1)<2?"translate("+Le+"px, "+xe+"px)":"translate3d("+Le+"px, "+xe+"px, 0)",Fe))}return Object.assign({},Ne,(s={},s[Me]=Se?xe+"px":"",s[Be]=Re?Le+"px":"",s.transform="",s))}function g(c){var s=c.state,b=c.options,_=b.gpuAcceleration,T=_===void 0?!0:_,L=b.adaptive,U=L===void 0?!0:L,H=b.roundOffsets,G=H===void 0?!0:H,oe=E(s.elements.popper).transitionProperty||"";U&&["transform","top","right","bottom","left"].some(function(Ce){return oe.indexOf(Ce)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` +(()=>{var Vo=Object.create;var Pi=Object.defineProperty;var Yo=Object.getOwnPropertyDescriptor;var Xo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty;var Jr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ko=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Xo(e))!Go.call(t,i)&&i!==r&&Pi(t,i,{get:()=>e[i],enumerable:!(n=Yo(e,i))||n.enumerable});return t};var Jo=(t,e,r)=>(r=t!=null?Vo(qo(t)):{},Ko(e||!t||!t.__esModule?Pi(r,"default",{value:t,enumerable:!0}):r,t));var po=Jr(()=>{});var ho=Jr(()=>{});var vo=Jr((js,yr)=>{(function(){"use strict";var t="input is invalid type",e="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_MD5_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",o=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?n=global:i&&(n=self);var a=!n.JS_MD5_NO_COMMON_JS&&typeof yr=="object"&&yr.exports,d=typeof define=="function"&&define.amd,f=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),w=[128,32768,8388608,-2147483648],m=[0,8,16,24],E=["hex","array","digest","buffer","arrayBuffer","base64"],O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),S=[],M;if(f){var I=new ArrayBuffer(68);M=new Uint8Array(I),S=new Uint32Array(I)}var $=Array.isArray;(n.JS_MD5_NO_NODE_JS||!$)&&($=function(l){return Object.prototype.toString.call(l)==="[object Array]"});var A=ArrayBuffer.isView;f&&(n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!A)&&(A=function(l){return typeof l=="object"&&l.buffer&&l.buffer.constructor===ArrayBuffer});var k=function(l){var h=typeof l;if(h==="string")return[l,!0];if(h!=="object"||l===null)throw new Error(t);if(f&&l.constructor===ArrayBuffer)return[new Uint8Array(l),!1];if(!$(l)&&!A(l))throw new Error(t);return[l,!1]},Y=function(l){return function(h){return new X(!0).update(h)[l]()}},nt=function(){var l=Y("hex");o&&(l=J(l)),l.create=function(){return new X},l.update=function(p){return l.create().update(p)};for(var h=0;h>>6,Vt[P++]=128|p&63):p<55296||p>=57344?(Vt[P++]=224|p>>>12,Vt[P++]=128|p>>>6&63,Vt[P++]=128|p&63):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),Vt[P++]=240|p>>>18,Vt[P++]=128|p>>>12&63,Vt[P++]=128|p>>>6&63,Vt[P++]=128|p&63);else for(P=this.start;j>>2]|=p<>>2]|=(192|p>>>6)<>>2]|=(128|p&63)<=57344?(Q[P>>>2]|=(224|p>>>12)<>>2]|=(128|p>>>6&63)<>>2]|=(128|p&63)<>>2]|=(240|p>>>18)<>>2]|=(128|p>>>12&63)<>>2]|=(128|p>>>6&63)<>>2]|=(128|p&63)<>>2]|=l[j]<=64?(this.start=P-64,this.hash(),this.hashed=!0):this.start=P}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},X.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var l=this.blocks,h=this.lastByteIndex;l[h>>>2]|=w[h&3],h>=56&&(this.hashed||this.hash(),l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),l[14]=this.bytes<<3,l[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},X.prototype.hash=function(){var l,h,v,p,j,P,R=this.blocks;this.first?(l=R[0]-680876937,l=(l<<7|l>>>25)-271733879<<0,p=(-1732584194^l&2004318071)+R[1]-117830708,p=(p<<12|p>>>20)+l<<0,v=(-271733879^p&(l^-271733879))+R[2]-1126478375,v=(v<<17|v>>>15)+p<<0,h=(l^v&(p^l))+R[3]-1316259209,h=(h<<22|h>>>10)+v<<0):(l=this.h0,h=this.h1,v=this.h2,p=this.h3,l+=(p^h&(v^p))+R[0]-680876936,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+R[1]-389564586,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+R[2]+606105819,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+R[3]-1044525330,h=(h<<22|h>>>10)+v<<0),l+=(p^h&(v^p))+R[4]-176418897,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+R[5]+1200080426,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+R[6]-1473231341,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+R[7]-45705983,h=(h<<22|h>>>10)+v<<0,l+=(p^h&(v^p))+R[8]+1770035416,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+R[9]-1958414417,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+R[10]-42063,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+R[11]-1990404162,h=(h<<22|h>>>10)+v<<0,l+=(p^h&(v^p))+R[12]+1804603682,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+R[13]-40341101,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+R[14]-1502002290,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+R[15]+1236535329,h=(h<<22|h>>>10)+v<<0,l+=(v^p&(h^v))+R[1]-165796510,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+R[6]-1069501632,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+R[11]+643717713,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+R[0]-373897302,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+R[5]-701558691,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+R[10]+38016083,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+R[15]-660478335,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+R[4]-405537848,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+R[9]+568446438,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+R[14]-1019803690,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+R[3]-187363961,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+R[8]+1163531501,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+R[13]-1444681467,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+R[2]-51403784,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+R[7]+1735328473,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+R[12]-1926607734,h=(h<<20|h>>>12)+v<<0,j=h^v,l+=(j^p)+R[5]-378558,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+R[8]-2022574463,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+R[11]+1839030562,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+R[14]-35309556,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+R[1]-1530992060,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+R[4]+1272893353,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+R[7]-155497632,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+R[10]-1094730640,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+R[13]+681279174,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+R[0]-358537222,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+R[3]-722521979,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+R[6]+76029189,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+R[9]-640364487,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+R[12]-421815835,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+R[15]+530742520,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+R[2]-995338651,h=(h<<23|h>>>9)+v<<0,l+=(v^(h|~p))+R[0]-198630844,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+R[7]+1126891415,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+R[14]-1416354905,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+R[5]-57434055,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+R[12]+1700485571,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+R[3]-1894986606,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+R[10]-1051523,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+R[1]-2054922799,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+R[8]+1873313359,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+R[15]-30611744,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+R[6]-1560198380,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+R[13]+1309151649,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+R[4]-145523070,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+R[11]-1120210379,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+R[2]+718787259,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+R[9]-343485551,h=(h<<21|h>>>11)+v<<0,this.first?(this.h0=l+1732584193<<0,this.h1=h-271733879<<0,this.h2=v-1732584194<<0,this.h3=p+271733878<<0,this.first=!1):(this.h0=this.h0+l<<0,this.h1=this.h1+h<<0,this.h2=this.h2+v<<0,this.h3=this.h3+p<<0)},X.prototype.hex=function(){this.finalize();var l=this.h0,h=this.h1,v=this.h2,p=this.h3;return u[l>>>4&15]+u[l&15]+u[l>>>12&15]+u[l>>>8&15]+u[l>>>20&15]+u[l>>>16&15]+u[l>>>28&15]+u[l>>>24&15]+u[h>>>4&15]+u[h&15]+u[h>>>12&15]+u[h>>>8&15]+u[h>>>20&15]+u[h>>>16&15]+u[h>>>28&15]+u[h>>>24&15]+u[v>>>4&15]+u[v&15]+u[v>>>12&15]+u[v>>>8&15]+u[v>>>20&15]+u[v>>>16&15]+u[v>>>28&15]+u[v>>>24&15]+u[p>>>4&15]+u[p&15]+u[p>>>12&15]+u[p>>>8&15]+u[p>>>20&15]+u[p>>>16&15]+u[p>>>28&15]+u[p>>>24&15]},X.prototype.toString=X.prototype.hex,X.prototype.digest=function(){this.finalize();var l=this.h0,h=this.h1,v=this.h2,p=this.h3;return[l&255,l>>>8&255,l>>>16&255,l>>>24&255,h&255,h>>>8&255,h>>>16&255,h>>>24&255,v&255,v>>>8&255,v>>>16&255,v>>>24&255,p&255,p>>>8&255,p>>>16&255,p>>>24&255]},X.prototype.array=X.prototype.digest,X.prototype.arrayBuffer=function(){this.finalize();var l=new ArrayBuffer(16),h=new Uint32Array(l);return h[0]=this.h0,h[1]=this.h1,h[2]=this.h2,h[3]=this.h3,l},X.prototype.buffer=X.prototype.arrayBuffer,X.prototype.base64=function(){for(var l,h,v,p="",j=this.array(),P=0;P<15;)l=j[P++],h=j[P++],v=j[P++],p+=O[l>>>2]+O[(l<<4|h>>>4)&63]+O[(h<<2|v>>>6)&63]+O[v&63];return l=j[P],p+=O[l>>>2]+O[l<<4&63]+"==",p};function Z(l,h){var v,p=k(l);if(l=p[0],p[1]){var j=[],P=l.length,R=0,Q;for(v=0;v>>6,j[R++]=128|Q&63):Q<55296||Q>=57344?(j[R++]=224|Q>>>12,j[R++]=128|Q>>>6&63,j[R++]=128|Q&63):(Q=65536+((Q&1023)<<10|l.charCodeAt(++v)&1023),j[R++]=240|Q>>>18,j[R++]=128|Q>>>12&63,j[R++]=128|Q>>>6&63,j[R++]=128|Q&63);l=j}l.length>64&&(l=new X(!0).update(l).array());var Vt=[],Re=[];for(v=0;v<64;++v){var ze=l[v]||0;Vt[v]=92^ze,Re[v]=54^ze}X.call(this,h),this.update(Re),this.oKeyPad=Vt,this.inner=!0,this.sharedMemory=h}Z.prototype=new X,Z.prototype.finalize=function(){if(X.prototype.finalize.call(this),this.inner){this.inner=!1;var l=this.array();X.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(l),X.prototype.finalize.call(this)}};var mt=nt();mt.md5=mt,mt.md5.hmac=dt(),a?yr.exports=mt:(n.md5=mt,d&&define(function(){return mt}))})()});var $i=["top","right","bottom","left"],Mi=["start","end"],Ri=$i.reduce((t,e)=>t.concat(e,e+"-"+Mi[0],e+"-"+Mi[1]),[]),Ee=Math.min,ee=Math.max,hr=Math.round,pr=Math.floor,nn=t=>({x:t,y:t}),Zo={left:"right",right:"left",bottom:"top",top:"bottom"},Qo={start:"end",end:"start"};function Zr(t,e,r){return ee(t,Ee(e,r))}function je(t,e){return typeof t=="function"?t(e):t}function pe(t){return t.split("-")[0]}function xe(t){return t.split("-")[1]}function Wi(t){return t==="x"?"y":"x"}function Qr(t){return t==="y"?"height":"width"}function Pn(t){return["top","bottom"].includes(pe(t))?"y":"x"}function ti(t){return Wi(Pn(t))}function zi(t,e,r){r===void 0&&(r=!1);let n=xe(t),i=ti(t),o=Qr(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=mr(a)),[a,mr(a)]}function ta(t){let e=mr(t);return[vr(t),e,vr(e)]}function vr(t){return t.replace(/start|end/g,e=>Qo[e])}function ea(t,e,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?o:a;default:return[]}}function na(t,e,r,n){let i=xe(t),o=ea(pe(t),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),e&&(o=o.concat(o.map(vr)))),o}function mr(t){return t.replace(/left|right|bottom|top/g,e=>Zo[e])}function ra(t){return{top:0,right:0,bottom:0,left:0,...t}}function ei(t){return typeof t!="number"?ra(t):{top:t,right:t,bottom:t,left:t}}function Cn(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Ii(t,e,r){let{reference:n,floating:i}=t,o=Pn(e),a=ti(e),d=Qr(a),f=pe(e),u=o==="y",w=n.x+n.width/2-i.width/2,m=n.y+n.height/2-i.height/2,E=n[d]/2-i[d]/2,O;switch(f){case"top":O={x:w,y:n.y-i.height};break;case"bottom":O={x:w,y:n.y+n.height};break;case"right":O={x:n.x+n.width,y:m};break;case"left":O={x:n.x-i.width,y:m};break;default:O={x:n.x,y:n.y}}switch(xe(e)){case"start":O[a]-=E*(r&&u?-1:1);break;case"end":O[a]+=E*(r&&u?-1:1);break}return O}var ia=async(t,e,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,d=o.filter(Boolean),f=await(a.isRTL==null?void 0:a.isRTL(e)),u=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:w,y:m}=Ii(u,n,f),E=n,O={},S=0;for(let M=0;M({name:"arrow",options:t,async fn(e){let{x:r,y:n,placement:i,rects:o,platform:a,elements:d,middlewareData:f}=e,{element:u,padding:w=0}=je(t,e)||{};if(u==null)return{};let m=ei(w),E={x:r,y:n},O=ti(i),S=Qr(O),M=await a.getDimensions(u),I=O==="y",$=I?"top":"left",A=I?"bottom":"right",k=I?"clientHeight":"clientWidth",Y=o.reference[S]+o.reference[O]-E[O]-o.floating[S],nt=E[O]-o.reference[O],J=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u)),U=J?J[k]:0;(!U||!await(a.isElement==null?void 0:a.isElement(J)))&&(U=d.floating[k]||o.floating[S]);let dt=Y/2-nt/2,X=U/2-M[S]/2-1,Z=Ee(m[$],X),mt=Ee(m[A],X),l=Z,h=U-M[S]-mt,v=U/2-M[S]/2+dt,p=Zr(l,v,h),j=!f.arrow&&xe(i)!=null&&v!==p&&o.reference[S]/2-(vxe(i)===t),...r.filter(i=>xe(i)!==t)]:r.filter(i=>pe(i)===i)).filter(i=>t?xe(i)===t||(e?vr(i)!==i:!1):!0)}var sa=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,i;let{rects:o,middlewareData:a,placement:d,platform:f,elements:u}=e,{crossAxis:w=!1,alignment:m,allowedPlacements:E=Ri,autoAlignment:O=!0,...S}=je(t,e),M=m!==void 0||E===Ri?aa(m||null,O,E):E,I=await _n(e,S),$=((r=a.autoPlacement)==null?void 0:r.index)||0,A=M[$];if(A==null)return{};let k=zi(A,o,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(d!==A)return{reset:{placement:M[0]}};let Y=[I[pe(A)],I[k[0]],I[k[1]]],nt=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:A,overflows:Y}],J=M[$+1];if(J)return{data:{index:$+1,overflows:nt},reset:{placement:J}};let U=nt.map(Z=>{let mt=xe(Z.placement);return[Z.placement,mt&&w?Z.overflows.slice(0,2).reduce((l,h)=>l+h,0):Z.overflows[0],Z.overflows]}).sort((Z,mt)=>Z[1]-mt[1]),X=((i=U.filter(Z=>Z[2].slice(0,xe(Z[0])?2:3).every(mt=>mt<=0))[0])==null?void 0:i[0])||U[0][0];return X!==d?{data:{index:$+1,overflows:nt},reset:{placement:X}}:{}}}},la=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;let{placement:i,middlewareData:o,rects:a,initialPlacement:d,platform:f,elements:u}=e,{mainAxis:w=!0,crossAxis:m=!0,fallbackPlacements:E,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:M=!0,...I}=je(t,e);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let $=pe(i),A=pe(d)===d,k=await(f.isRTL==null?void 0:f.isRTL(u.floating)),Y=E||(A||!M?[mr(d)]:ta(d));!E&&S!=="none"&&Y.push(...na(d,M,S,k));let nt=[d,...Y],J=await _n(e,I),U=[],dt=((n=o.flip)==null?void 0:n.overflows)||[];if(w&&U.push(J[$]),m){let l=zi(i,a,k);U.push(J[l[0]],J[l[1]])}if(dt=[...dt,{placement:i,overflows:U}],!U.every(l=>l<=0)){var X,Z;let l=(((X=o.flip)==null?void 0:X.index)||0)+1,h=nt[l];if(h)return{data:{index:l,overflows:dt},reset:{placement:h}};let v=(Z=dt.filter(p=>p.overflows[0]<=0).sort((p,j)=>p.overflows[1]-j.overflows[1])[0])==null?void 0:Z.placement;if(!v)switch(O){case"bestFit":{var mt;let p=(mt=dt.map(j=>[j.placement,j.overflows.filter(P=>P>0).reduce((P,R)=>P+R,0)]).sort((j,P)=>j[1]-P[1])[0])==null?void 0:mt[0];p&&(v=p);break}case"initialPlacement":v=d;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function Fi(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Li(t){return $i.some(e=>t[e]>=0)}var ca=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:r}=e,{strategy:n="referenceHidden",...i}=je(t,e);switch(n){case"referenceHidden":{let o=await _n(e,{...i,elementContext:"reference"}),a=Fi(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Li(a)}}}case"escaped":{let o=await _n(e,{...i,altBoundary:!0}),a=Fi(o,r.floating);return{data:{escapedOffsets:a,escaped:Li(a)}}}default:return{}}}}};function Ui(t){let e=Ee(...t.map(o=>o.left)),r=Ee(...t.map(o=>o.top)),n=ee(...t.map(o=>o.right)),i=ee(...t.map(o=>o.bottom));return{x:e,y:r,width:n-e,height:i-r}}function fa(t){let e=t.slice().sort((i,o)=>i.y-o.y),r=[],n=null;for(let i=0;in.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>Cn(Ui(i)))}var ua=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){let{placement:r,elements:n,rects:i,platform:o,strategy:a}=e,{padding:d=2,x:f,y:u}=je(t,e),w=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),m=fa(w),E=Cn(Ui(w)),O=ei(d);function S(){if(m.length===2&&m[0].left>m[1].right&&f!=null&&u!=null)return m.find(I=>f>I.left-O.left&&fI.top-O.top&&u=2){if(Pn(r)==="y"){let Z=m[0],mt=m[m.length-1],l=pe(r)==="top",h=Z.top,v=mt.bottom,p=l?Z.left:mt.left,j=l?Z.right:mt.right,P=j-p,R=v-h;return{top:h,bottom:v,left:p,right:j,width:P,height:R,x:p,y:h}}let I=pe(r)==="left",$=ee(...m.map(Z=>Z.right)),A=Ee(...m.map(Z=>Z.left)),k=m.filter(Z=>I?Z.left===A:Z.right===$),Y=k[0].top,nt=k[k.length-1].bottom,J=A,U=$,dt=U-J,X=nt-Y;return{top:Y,bottom:nt,left:J,right:U,width:dt,height:X,x:J,y:Y}}return E}let M=await o.getElementRects({reference:{getBoundingClientRect:S},floating:n.floating,strategy:a});return i.reference.x!==M.reference.x||i.reference.y!==M.reference.y||i.reference.width!==M.reference.width||i.reference.height!==M.reference.height?{reset:{rects:M}}:{}}}};async function da(t,e){let{placement:r,platform:n,elements:i}=t,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=pe(r),d=xe(r),f=Pn(r)==="y",u=["left","top"].includes(a)?-1:1,w=o&&f?-1:1,m=je(e,t),{mainAxis:E,crossAxis:O,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return d&&typeof S=="number"&&(O=d==="end"?S*-1:S),f?{x:O*w,y:E*u}:{x:E*u,y:O*w}}var Vi=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;let{x:i,y:o,placement:a,middlewareData:d}=e,f=await da(e,t);return a===((r=d.offset)==null?void 0:r.placement)&&(n=d.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:a}}}}},pa=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:d={fn:I=>{let{x:$,y:A}=I;return{x:$,y:A}}},...f}=je(t,e),u={x:r,y:n},w=await _n(e,f),m=Pn(pe(i)),E=Wi(m),O=u[E],S=u[m];if(o){let I=E==="y"?"top":"left",$=E==="y"?"bottom":"right",A=O+w[I],k=O-w[$];O=Zr(A,O,k)}if(a){let I=m==="y"?"top":"left",$=m==="y"?"bottom":"right",A=S+w[I],k=S-w[$];S=Zr(A,S,k)}let M=d.fn({...e,[E]:O,[m]:S});return{...M,data:{x:M.x-r,y:M.y-n}}}}},ha=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){let{placement:r,rects:n,platform:i,elements:o}=e,{apply:a=()=>{},...d}=je(t,e),f=await _n(e,d),u=pe(r),w=xe(r),m=Pn(r)==="y",{width:E,height:O}=n.floating,S,M;u==="top"||u==="bottom"?(S=u,M=w===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(M=u,S=w==="end"?"top":"bottom");let I=O-f[S],$=E-f[M],A=!e.middlewareData.shift,k=I,Y=$;if(m){let J=E-f.left-f.right;Y=w||A?Ee($,J):J}else{let J=O-f.top-f.bottom;k=w||A?Ee(I,J):J}if(A&&!w){let J=ee(f.left,0),U=ee(f.right,0),dt=ee(f.top,0),X=ee(f.bottom,0);m?Y=E-2*(J!==0||U!==0?J+U:ee(f.left,f.right)):k=O-2*(dt!==0||X!==0?dt+X:ee(f.top,f.bottom))}await a({...e,availableWidth:Y,availableHeight:k});let nt=await i.getDimensions(o.floating);return E!==nt.width||O!==nt.height?{reset:{rects:!0}}:{}}}};function rn(t){return Yi(t)?(t.nodeName||"").toLowerCase():"#document"}function ce(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Be(t){var e;return(e=(Yi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yi(t){return t instanceof Node||t instanceof ce(t).Node}function ke(t){return t instanceof Element||t instanceof ce(t).Element}function Te(t){return t instanceof HTMLElement||t instanceof ce(t).HTMLElement}function Ni(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ce(t).ShadowRoot}function Vn(t){let{overflow:e,overflowX:r,overflowY:n,display:i}=he(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function va(t){return["table","td","th"].includes(rn(t))}function ni(t){let e=ri(),r=he(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ma(t){let e=Tn(t);for(;Te(e)&&!gr(e);){if(ni(e))return e;e=Tn(e)}return null}function ri(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(t){return["html","body","#document"].includes(rn(t))}function he(t){return ce(t).getComputedStyle(t)}function br(t){return ke(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Tn(t){if(rn(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ni(t)&&t.host||Be(t);return Ni(e)?e.host:e}function Xi(t){let e=Tn(t);return gr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Te(e)&&Vn(e)?e:Xi(e)}function Un(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let i=Xi(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),a=ce(i);return o?e.concat(a,a.visualViewport||[],Vn(i)?i:[],a.frameElement&&r?Un(a.frameElement):[]):e.concat(i,Un(i,[],r))}function qi(t){let e=he(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Te(t),o=i?t.offsetWidth:r,a=i?t.offsetHeight:n,d=hr(r)!==o||hr(n)!==a;return d&&(r=o,n=a),{width:r,height:n,$:d}}function ii(t){return ke(t)?t:t.contextElement}function Dn(t){let e=ii(t);if(!Te(e))return nn(1);let r=e.getBoundingClientRect(),{width:n,height:i,$:o}=qi(e),a=(o?hr(r.width):r.width)/n,d=(o?hr(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!d||!Number.isFinite(d))&&(d=1),{x:a,y:d}}var ga=nn(0);function Gi(t){let e=ce(t);return!ri()||!e.visualViewport?ga:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ba(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==ce(t)?!1:e}function vn(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),o=ii(t),a=nn(1);e&&(n?ke(n)&&(a=Dn(n)):a=Dn(t));let d=ba(o,r,n)?Gi(o):nn(0),f=(i.left+d.x)/a.x,u=(i.top+d.y)/a.y,w=i.width/a.x,m=i.height/a.y;if(o){let E=ce(o),O=n&&ke(n)?ce(n):n,S=E,M=S.frameElement;for(;M&&n&&O!==S;){let I=Dn(M),$=M.getBoundingClientRect(),A=he(M),k=$.left+(M.clientLeft+parseFloat(A.paddingLeft))*I.x,Y=$.top+(M.clientTop+parseFloat(A.paddingTop))*I.y;f*=I.x,u*=I.y,w*=I.x,m*=I.y,f+=k,u+=Y,S=ce(M),M=S.frameElement}}return Cn({width:w,height:m,x:f,y:u})}var ya=[":popover-open",":modal"];function Ki(t){return ya.some(e=>{try{return t.matches(e)}catch{return!1}})}function wa(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t,o=i==="fixed",a=Be(n),d=e?Ki(e.floating):!1;if(n===a||d&&o)return r;let f={scrollLeft:0,scrollTop:0},u=nn(1),w=nn(0),m=Te(n);if((m||!m&&!o)&&((rn(n)!=="body"||Vn(a))&&(f=br(n)),Te(n))){let E=vn(n);u=Dn(n),w.x=E.x+n.clientLeft,w.y=E.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+w.x,y:r.y*u.y-f.scrollTop*u.y+w.y}}function xa(t){return Array.from(t.getClientRects())}function Ji(t){return vn(Be(t)).left+br(t).scrollLeft}function Ea(t){let e=Be(t),r=br(t),n=t.ownerDocument.body,i=ee(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=ee(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+Ji(t),d=-r.scrollTop;return he(n).direction==="rtl"&&(a+=ee(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:d}}function Oa(t,e){let r=ce(t),n=Be(t),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,d=0,f=0;if(i){o=i.width,a=i.height;let u=ri();(!u||u&&e==="fixed")&&(d=i.offsetLeft,f=i.offsetTop)}return{width:o,height:a,x:d,y:f}}function Sa(t,e){let r=vn(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Te(t)?Dn(t):nn(1),a=t.clientWidth*o.x,d=t.clientHeight*o.y,f=i*o.x,u=n*o.y;return{width:a,height:d,x:f,y:u}}function ki(t,e,r){let n;if(e==="viewport")n=Oa(t,r);else if(e==="document")n=Ea(Be(t));else if(ke(e))n=Sa(e,r);else{let i=Gi(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Cn(n)}function Zi(t,e){let r=Tn(t);return r===e||!ke(r)||gr(r)?!1:he(r).position==="fixed"||Zi(r,e)}function Aa(t,e){let r=e.get(t);if(r)return r;let n=Un(t,[],!1).filter(d=>ke(d)&&rn(d)!=="body"),i=null,o=he(t).position==="fixed",a=o?Tn(t):t;for(;ke(a)&&!gr(a);){let d=he(a),f=ni(a);!f&&d.position==="fixed"&&(i=null),(o?!f&&!i:!f&&d.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Vn(a)&&!f&&Zi(t,a))?n=n.filter(w=>w!==a):i=d,a=Tn(a)}return e.set(t,n),n}function Da(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t,a=[...r==="clippingAncestors"?Aa(e,this._c):[].concat(r),n],d=a[0],f=a.reduce((u,w)=>{let m=ki(e,w,i);return u.top=ee(m.top,u.top),u.right=Ee(m.right,u.right),u.bottom=Ee(m.bottom,u.bottom),u.left=ee(m.left,u.left),u},ki(e,d,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Ca(t){let{width:e,height:r}=qi(t);return{width:e,height:r}}function _a(t,e,r){let n=Te(e),i=Be(e),o=r==="fixed",a=vn(t,!0,o,e),d={scrollLeft:0,scrollTop:0},f=nn(0);if(n||!n&&!o)if((rn(e)!=="body"||Vn(i))&&(d=br(e)),n){let m=vn(e,!0,o,e);f.x=m.x+e.clientLeft,f.y=m.y+e.clientTop}else i&&(f.x=Ji(i));let u=a.left+d.scrollLeft-f.x,w=a.top+d.scrollTop-f.y;return{x:u,y:w,width:a.width,height:a.height}}function ji(t,e){return!Te(t)||he(t).position==="fixed"?null:e?e(t):t.offsetParent}function Qi(t,e){let r=ce(t);if(!Te(t)||Ki(t))return r;let n=ji(t,e);for(;n&&va(n)&&he(n).position==="static";)n=ji(n,e);return n&&(rn(n)==="html"||rn(n)==="body"&&he(n).position==="static"&&!ni(n))?r:n||ma(t)||r}var Ta=async function(t){let e=this.getOffsetParent||Qi,r=this.getDimensions;return{reference:_a(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await r(t.floating)}}};function Pa(t){return he(t).direction==="rtl"}var Ma={convertOffsetParentRelativeRectToViewportRelativeRect:wa,getDocumentElement:Be,getClippingRect:Da,getOffsetParent:Qi,getElementRects:Ta,getClientRects:xa,getDimensions:Ca,getScale:Dn,isElement:ke,isRTL:Pa};function Ra(t,e){let r=null,n,i=Be(t);function o(){var d;clearTimeout(n),(d=r)==null||d.disconnect(),r=null}function a(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),o();let{left:u,top:w,width:m,height:E}=t.getBoundingClientRect();if(d||e(),!m||!E)return;let O=pr(w),S=pr(i.clientWidth-(u+m)),M=pr(i.clientHeight-(w+E)),I=pr(u),A={rootMargin:-O+"px "+-S+"px "+-M+"px "+-I+"px",threshold:ee(0,Ee(1,f))||1},k=!0;function Y(nt){let J=nt[0].intersectionRatio;if(J!==f){if(!k)return a();J?a(!1,J):n=setTimeout(()=>{a(!1,1e-7)},100)}k=!1}try{r=new IntersectionObserver(Y,{...A,root:i.ownerDocument})}catch{r=new IntersectionObserver(Y,A)}r.observe(t)}return a(!0),o}function Bi(t,e,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,u=ii(t),w=i||o?[...u?Un(u):[],...Un(e)]:[];w.forEach($=>{i&&$.addEventListener("scroll",r,{passive:!0}),o&&$.addEventListener("resize",r)});let m=u&&d?Ra(u,r):null,E=-1,O=null;a&&(O=new ResizeObserver($=>{let[A]=$;A&&A.target===u&&O&&(O.unobserve(e),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var k;(k=O)==null||k.observe(e)})),r()}),u&&!f&&O.observe(u),O.observe(e));let S,M=f?vn(t):null;f&&I();function I(){let $=vn(t);M&&($.x!==M.x||$.y!==M.y||$.width!==M.width||$.height!==M.height)&&r(),M=$,S=requestAnimationFrame(I)}return r(),()=>{var $;w.forEach(A=>{i&&A.removeEventListener("scroll",r),o&&A.removeEventListener("resize",r)}),m?.(),($=O)==null||$.disconnect(),O=null,f&&cancelAnimationFrame(S)}}var oi=sa,to=pa,eo=la,no=ha,ro=ca,io=oa,oo=ua,Hi=(t,e,r)=>{let n=new Map,i={platform:Ma,...r},o={...i.platform,_c:n};return ia(t,e,{...i,platform:o})},Ia=t=>{let e={placement:"bottom",strategy:"absolute",middleware:[]},r=Object.keys(t),n=i=>t[i];return r.includes("offset")&&e.middleware.push(Vi(n("offset"))),r.includes("teleport")&&(e.strategy="fixed"),r.includes("placement")&&(e.placement=n("placement")),r.includes("autoPlacement")&&!r.includes("flip")&&e.middleware.push(oi(n("autoPlacement"))),r.includes("flip")&&e.middleware.push(eo(n("flip"))),r.includes("shift")&&e.middleware.push(to(n("shift"))),r.includes("inline")&&e.middleware.push(oo(n("inline"))),r.includes("arrow")&&e.middleware.push(io(n("arrow"))),r.includes("hide")&&e.middleware.push(ro(n("hide"))),r.includes("size")&&e.middleware.push(no(n("size"))),e},Fa=(t,e)=>{let r={component:{trap:!1},float:{placement:"bottom",strategy:"absolute",middleware:[]}},n=i=>t[t.indexOf(i)+1];if(t.includes("trap")&&(r.component.trap=!0),t.includes("teleport")&&(r.float.strategy="fixed"),t.includes("offset")&&r.float.middleware.push(Vi(e.offset||10)),t.includes("placement")&&(r.float.placement=n("placement")),t.includes("autoPlacement")&&!t.includes("flip")&&r.float.middleware.push(oi(e.autoPlacement)),t.includes("flip")&&r.float.middleware.push(eo(e.flip)),t.includes("shift")&&r.float.middleware.push(to(e.shift)),t.includes("inline")&&r.float.middleware.push(oo(e.inline)),t.includes("arrow")&&r.float.middleware.push(io(e.arrow)),t.includes("hide")&&r.float.middleware.push(ro(e.hide)),t.includes("size")){let i=e.size?.availableWidth??null,o=e.size?.availableHeight??null;i&&delete e.size.availableWidth,o&&delete e.size.availableHeight,r.float.middleware.push(no({...e.size,apply({availableWidth:a,availableHeight:d,elements:f}){Object.assign(f.floating.style,{maxWidth:`${i??a}px`,maxHeight:`${o??d}px`})}}))}return r},La=t=>{var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),r="";t||(t=Math.floor(Math.random()*e.length));for(var n=0;n{}){let r=!1;return function(){r?e.apply(this,arguments):(r=!0,t.apply(this,arguments))}}function ka(t){let e={dismissable:!0,trap:!1};function r(n,i=null){if(n){if(n.hasAttribute("aria-expanded")||n.setAttribute("aria-expanded",!1),i.hasAttribute("id"))n.setAttribute("aria-controls",i.getAttribute("id"));else{let o=`panel-${La(8)}`;n.setAttribute("aria-controls",o),i.setAttribute("id",o)}i.setAttribute("aria-modal",!0),i.setAttribute("role","dialog")}}t.magic("float",n=>(i={},o={})=>{let a={...e,...o},d=Object.keys(i).length>0?Ia(i):{middleware:[oi()]},f=n,u=n.parentElement.closest("[x-data]"),w=u.querySelector('[x-ref="panel"]');r(f,w);function m(){return w.style.display=="block"}function E(){w.style.display="none",f.setAttribute("aria-expanded","false"),a.trap&&w.setAttribute("x-trap","false"),Bi(n,w,M)}function O(){w.style.display="block",f.setAttribute("aria-expanded","true"),a.trap&&w.setAttribute("x-trap","true"),M()}function S(){m()?E():O()}async function M(){return await Hi(n,w,d).then(({middlewareData:I,placement:$,x:A,y:k})=>{if(I.arrow){let Y=I.arrow?.x,nt=I.arrow?.y,J=d.middleware.filter(dt=>dt.name=="arrow")[0].options.element,U={top:"bottom",right:"left",bottom:"top",left:"right"}[$.split("-")[0]];Object.assign(J.style,{left:Y!=null?`${Y}px`:"",top:nt!=null?`${nt}px`:"",right:"",bottom:"",[U]:"-4px"})}if(I.hide){let{referenceHidden:Y}=I.hide;Object.assign(w.style,{visibility:Y?"hidden":"visible"})}Object.assign(w.style,{left:`${A}px`,top:`${k}px`})})}a.dismissable&&(window.addEventListener("click",I=>{!u.contains(I.target)&&m()&&S()}),window.addEventListener("keydown",I=>{I.key==="Escape"&&m()&&S()},!0)),S()}),t.directive("float",(n,{modifiers:i,expression:o},{evaluate:a,effect:d})=>{let f=o?a(o):{},u=i.length>0?Fa(i,f):{},w=null;u.float.strategy=="fixed"&&(n.style.position="fixed");let m=U=>n.parentElement&&!n.parentElement.closest("[x-data]").contains(U.target)?n.close():null,E=U=>U.key==="Escape"?n.close():null,O=n.getAttribute("x-ref"),S=n.parentElement.closest("[x-data]"),M=S.querySelectorAll(`[\\@click^="$refs.${O}"]`),I=S.querySelectorAll(`[x-on\\:click^="$refs.${O}"]`);n.style.setProperty("display","none"),r([...M,...I][0],n),n._x_isShown=!1,n.trigger=null,n._x_doHide||(n._x_doHide=()=>{n.style.setProperty("display","none",i.includes("important")?"important":void 0)}),n._x_doShow||(n._x_doShow=()=>{n.style.setProperty("display","block",i.includes("important")?"important":void 0)});let $=()=>{n._x_doHide(),n._x_isShown=!1},A=()=>{n._x_doShow(),n._x_isShown=!0},k=()=>setTimeout(A),Y=Na(U=>U?A():$(),U=>{typeof n._x_toggleAndCascadeWithTransitions=="function"?n._x_toggleAndCascadeWithTransitions(n,U,A,$):U?k():$()}),nt,J=!0;d(()=>a(U=>{!J&&U===nt||(i.includes("immediate")&&(U?k():$()),Y(U),nt=U,J=!1)})),n.open=async function(U){n.trigger=U.currentTarget?U.currentTarget:U,Y(!0),n.trigger.setAttribute("aria-expanded","true"),u.component.trap&&n.setAttribute("x-trap","true"),w=Bi(n.trigger,n,()=>{Hi(n.trigger,n,u.float).then(({middlewareData:dt,placement:X,x:Z,y:mt})=>{if(dt.arrow){let l=dt.arrow?.x,h=dt.arrow?.y,v=u.float.middleware.filter(j=>j.name=="arrow")[0].options.element,p={top:"bottom",right:"left",bottom:"top",left:"right"}[X.split("-")[0]];Object.assign(v.style,{left:l!=null?`${l}px`:"",top:h!=null?`${h}px`:"",right:"",bottom:"",[p]:"-4px"})}if(dt.hide){let{referenceHidden:l}=dt.hide;Object.assign(n.style,{visibility:l?"hidden":"visible"})}Object.assign(n.style,{left:`${Z}px`,top:`${mt}px`})})}),window.addEventListener("click",m),window.addEventListener("keydown",E,!0)},n.close=function(){if(!n._x_isShown)return!1;Y(!1),n.trigger.setAttribute("aria-expanded","false"),u.component.trap&&n.setAttribute("x-trap","false"),w(),window.removeEventListener("click",m),window.removeEventListener("keydown",E,!1)},n.toggle=function(U){n._x_isShown?n.close():n.open(U)}})}var ao=ka;function ja(t){t.store("lazyLoadedAssets",{loaded:new Set,check(a){return Array.isArray(a)?a.every(d=>this.loaded.has(d)):this.loaded.has(a)},markLoaded(a){Array.isArray(a)?a.forEach(d=>this.loaded.add(d)):this.loaded.add(a)}});let e=a=>new CustomEvent(a,{bubbles:!0,composed:!0,cancelable:!0}),r=(a,d={},f,u)=>{let w=document.createElement(a);return Object.entries(d).forEach(([m,E])=>w[m]=E),f&&(u?f.insertBefore(w,u):f.appendChild(w)),w},n=(a,d,f={},u=null,w=null)=>{let m=a==="link"?`link[href="${d}"]`:`script[src="${d}"]`;if(document.querySelector(m)||t.store("lazyLoadedAssets").check(d))return Promise.resolve();let E=a==="link"?{...f,href:d}:{...f,src:d},O=r(a,E,u,w);return new Promise((S,M)=>{O.onload=()=>{t.store("lazyLoadedAssets").markLoaded(d),S()},O.onerror=()=>{M(new Error(`Failed to load ${a}: ${d}`))}})},i=async(a,d,f=null,u=null)=>{let w={type:"text/css",rel:"stylesheet"};d&&(w.media=d);let m=document.head,E=null;if(f&&u){let O=document.querySelector(`link[href*="${u}"]`);O?(m=O.parentElement,E=f==="before"?O:O.nextSibling):(console.warn(`Target (${u}) not found for ${a}. Appending to head.`),m=document.head,E=null)}await n("link",a,w,m,E)},o=async(a,d,f=null,u=null,w=null)=>{let m=document.head,E=null;if(f&&u){let S=document.querySelector(`script[src*="${u}"]`);S?(m=S.parentElement,E=f==="before"?S:S.nextSibling):(console.warn(`Target (${u}) not found for ${a}. Falling back to head or body.`),m=document.head,E=null)}else(d.has("body-start")||d.has("body-end"))&&(m=document.body,d.has("body-start")&&(E=document.body.firstChild));let O={};w&&(O.type="module"),await n("script",a,O,m,E)};t.directive("load-css",(a,{expression:d},{evaluate:f})=>{let u=f(d),w=a.media,m=a.getAttribute("data-dispatch"),E=a.getAttribute("data-css-before")?"before":a.getAttribute("data-css-after")?"after":null,O=a.getAttribute("data-css-before")||a.getAttribute("data-css-after")||null;Promise.all(u.map(S=>i(S,w,E,O))).then(()=>{m&&window.dispatchEvent(e(`${m}-css`))}).catch(console.error)}),t.directive("load-js",(a,{expression:d,modifiers:f},{evaluate:u})=>{let w=u(d),m=new Set(f),E=a.getAttribute("data-js-before")?"before":a.getAttribute("data-js-after")?"after":null,O=a.getAttribute("data-js-before")||a.getAttribute("data-js-after")||null,S=a.getAttribute("data-js-as-module")||a.getAttribute("data-as-module")||!1,M=a.getAttribute("data-dispatch");Promise.all(w.map(I=>o(I,m,E,O,S))).then(()=>{M&&window.dispatchEvent(e(`${M}-js`))}).catch(console.error)})}var so=ja;function Ba(){return!0}function Ha({component:t,argument:e}){return new Promise(r=>{if(e)window.addEventListener(e,()=>r(),{once:!0});else{let n=i=>{i.detail.id===t.id&&(window.removeEventListener("async-alpine:load",n),r())};window.addEventListener("async-alpine:load",n)}})}function $a(){return new Promise(t=>{"requestIdleCallback"in window?window.requestIdleCallback(t):setTimeout(t,200)})}function Wa({argument:t}){return new Promise(e=>{if(!t)return console.log("Async Alpine: media strategy requires a media query. Treating as 'eager'"),e();let r=window.matchMedia(`(${t})`);r.matches?e():r.addEventListener("change",e,{once:!0})})}function za({component:t,argument:e}){return new Promise(r=>{let n=e||"0px 0px 0px 0px",i=new IntersectionObserver(o=>{o[0].isIntersecting&&(i.disconnect(),r())},{rootMargin:n});i.observe(t.el)})}var lo={eager:Ba,event:Ha,idle:$a,media:Wa,visible:za};async function Ua(t){let e=Va(t.strategy);await ai(t,e)}async function ai(t,e){if(e.type==="expression"){if(e.operator==="&&")return Promise.all(e.parameters.map(r=>ai(t,r)));if(e.operator==="||")return Promise.any(e.parameters.map(r=>ai(t,r)))}return lo[e.method]?lo[e.method]({component:t,argument:e.argument}):!1}function Va(t){let e=Ya(t),r=fo(e);return r.type==="method"?{type:"expression",operator:"&&",parameters:[r]}:r}function Ya(t){let e=/\s*([()])\s*|\s*(\|\||&&|\|)\s*|\s*((?:[^()&|]+\([^()]+\))|[^()&|]+)\s*/g,r=[],n;for(;(n=e.exec(t))!==null;){let[i,o,a,d]=n;if(o!==void 0)r.push({type:"parenthesis",value:o});else if(a!==void 0)r.push({type:"operator",value:a==="|"?"&&":a});else{let f={type:"method",method:d.trim()};d.includes("(")&&(f.method=d.substring(0,d.indexOf("(")).trim(),f.argument=d.substring(d.indexOf("(")+1,d.indexOf(")"))),d.method==="immediate"&&(d.method="eager"),r.push(f)}}return r}function fo(t){let e=co(t);for(;t.length>0&&(t[0].value==="&&"||t[0].value==="|"||t[0].value==="||");){let r=t.shift().value,n=co(t);e.type==="expression"&&e.operator===r?e.parameters.push(n):e={type:"expression",operator:r,parameters:[e,n]}}return e}function co(t){if(t[0].value==="("){t.shift();let e=fo(t);return t[0].value===")"&&t.shift(),e}else return t.shift()}function uo(t){let e="load",r=t.prefixed("load-src"),n=t.prefixed("ignore"),i={defaultStrategy:"eager",keepRelativeURLs:!1},o=!1,a={},d=0;function f(){return d++}t.asyncOptions=A=>{i={...i,...A}},t.asyncData=(A,k=!1)=>{a[A]={loaded:!1,download:k}},t.asyncUrl=(A,k)=>{!A||!k||a[A]||(a[A]={loaded:!1,download:()=>import($(k))})},t.asyncAlias=A=>{o=A};let u=A=>{t.skipDuringClone(()=>{A._x_async||(A._x_async="init",A._x_ignore=!0,A.setAttribute(n,""))})()},w=async A=>{t.skipDuringClone(async()=>{if(A._x_async!=="init")return;A._x_async="await";let{name:k,strategy:Y}=m(A);await Ua({name:k,strategy:Y,el:A,id:A.id||f()}),A.isConnected&&(await E(k),A.isConnected&&(S(A),A._x_async="loaded"))})()};w.inline=u,t.directive(e,w).before("ignore");function m(A){let k=I(A.getAttribute(t.prefixed("data"))),Y=A.getAttribute(t.prefixed(e))||i.defaultStrategy,nt=A.getAttribute(r);return nt&&t.asyncUrl(k,nt),{name:k,strategy:Y}}async function E(A){if(A.startsWith("_x_async_")||(M(A),!a[A]||a[A].loaded))return;let k=await O(A);t.data(A,k),a[A].loaded=!0}async function O(A){if(!a[A])return;let k=await a[A].download(A);return typeof k=="function"?k:k[A]||k.default||Object.values(k)[0]||!1}function S(A){t.destroyTree(A),A._x_ignore=!1,A.removeAttribute(n),!A.closest(`[${n}]`)&&t.initTree(A)}function M(A){if(!(!o||a[A])){if(typeof o=="function"){t.asyncData(A,o);return}t.asyncUrl(A,o.replaceAll("[name]",A))}}function I(A){return(A||"").split(/[({]/g)[0]||`_x_async_${f()}`}function $(A){return i.keepRelativeURLs||new RegExp("^(?:[a-z+]+:)?//","i").test(A)?A:new URL(A,document.baseURI).href}}var Uo=Jo(vo(),1);function mo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Me(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function Ga(t,e){if(t==null)return{};var r=qa(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Ka="1.15.6";function He(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var We=He(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),tr=He(/Edge/i),go=He(/firefox/i),Gn=He(/safari/i)&&!He(/chrome/i)&&!He(/android/i),wi=He(/iP(ad|od|hone)/i),Ao=He(/chrome/i)&&He(/android/i),Do={capture:!1,passive:!1};function Ot(t,e,r){t.addEventListener(e,r,!We&&Do)}function Et(t,e,r){t.removeEventListener(e,r,!We&&Do)}function Tr(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function Co(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Se(t,e,r,n){if(t){r=r||document;do{if(e!=null&&(e[0]===">"?t.parentNode===r&&Tr(t,e):Tr(t,e))||n&&t===r)return t;if(t===r)break}while(t=Co(t))}return null}var bo=/\s+/g;function fe(t,e,r){if(t&&e)if(t.classList)t.classList[r?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(bo," ").replace(" "+e+" "," ");t.className=(n+(r?" "+e:"")).replace(bo," ")}}function at(t,e,r){var n=t&&t.style;if(n){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(r=t.currentStyle),e===void 0?r:r[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=r+(typeof r=="string"?"":"px")}}function Ln(t,e){var r="";if(typeof t=="string")r=t;else do{var n=at(t,"transform");n&&n!=="none"&&(r=n+" "+r)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(r)}function _o(t,e,r){if(t){var n=t.getElementsByTagName(e),i=0,o=n.length;if(r)for(;i=o:a=i<=o,!a)return n;if(n===Pe())break;n=sn(n,!1)}return!1}function Nn(t,e,r,n){for(var i=0,o=0,a=t.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=Ga(n,is);er.pluginEvent.bind(st)(e,r,Me({dragEl:N,parentEl:Ut,ghostEl:ut,rootEl:kt,nextEl:bn,lastDownEl:Ar,cloneEl:Wt,cloneHidden:an,dragStarted:Yn,putSortable:Zt,activeSortable:st.active,originalEvent:i,oldIndex:Fn,oldDraggableIndex:Jn,newIndex:ue,newDraggableIndex:on,hideGhostForTarget:No,unhideGhostForTarget:ko,cloneNowHidden:function(){an=!0},cloneNowShown:function(){an=!1},dispatchSortableEvent:function(d){ie({sortable:r,name:d,originalEvent:i})}},o))};function ie(t){rs(Me({putSortable:Zt,cloneEl:Wt,targetEl:N,rootEl:kt,oldIndex:Fn,oldDraggableIndex:Jn,newIndex:ue,newDraggableIndex:on},t))}var N,Ut,ut,kt,bn,Ar,Wt,an,Fn,ue,Jn,on,wr,Zt,In=!1,Pr=!1,Mr=[],mn,Oe,ci,fi,xo,Eo,Yn,Rn,Zn,Qn=!1,xr=!1,Dr,ne,ui=[],mi=!1,Rr=[],Fr=typeof document<"u",Er=wi,Oo=tr||We?"cssFloat":"float",os=Fr&&!Ao&&!wi&&"draggable"in document.createElement("div"),Io=function(){if(Fr){if(We)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Fo=function(e,r){var n=at(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Nn(e,0,r),a=Nn(e,1,r),d=o&&at(o),f=a&&at(a),u=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+qt(o).width,w=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+qt(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&d.float&&d.float!=="none"){var m=d.float==="left"?"left":"right";return a&&(f.clear==="both"||f.clear===m)?"vertical":"horizontal"}return o&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||u>=i&&n[Oo]==="none"||a&&n[Oo]==="none"&&u+w>i)?"vertical":"horizontal"},as=function(e,r,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,d=n?r.left:r.top,f=n?r.right:r.bottom,u=n?r.width:r.height;return i===d||o===f||i+a/2===d+u/2},ss=function(e,r){var n;return Mr.some(function(i){var o=i[se].options.emptyInsertThreshold;if(!(!o||xi(i))){var a=qt(i),d=e>=a.left-o&&e<=a.right+o,f=r>=a.top-o&&r<=a.bottom+o;if(d&&f)return n=i}}),n},Lo=function(e){function r(o,a){return function(d,f,u,w){var m=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(o==null&&(a||m))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return r(o(d,f,u,w),a)(d,f,u,w);var E=(a?d:f).options.group.name;return o===!0||typeof o=="string"&&o===E||o.join&&o.indexOf(E)>-1}}var n={},i=e.group;(!i||Sr(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=r(i.pull,!0),n.checkPut=r(i.put),n.revertClone=i.revertClone,e.group=n},No=function(){!Io&&ut&&at(ut,"display","none")},ko=function(){!Io&&ut&&at(ut,"display","")};Fr&&!Ao&&document.addEventListener("click",function(t){if(Pr)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Pr=!1,!1},!0);var gn=function(e){if(N){e=e.touches?e.touches[0]:e;var r=ss(e.clientX,e.clientY);if(r){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=r,n.preventDefault=void 0,n.stopPropagation=void 0,r[se]._onDragOver(n)}}},ls=function(e){N&&N.parentNode[se]._isOutsideThisEl(e.target)};function st(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=$e({},e),t[se]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fo(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,d){a.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:st.supportPointer!==!1&&"PointerEvent"in window&&(!Gn||wi),emptyInsertThreshold:5};er.initializePlugins(this,t,r);for(var n in r)!(n in e)&&(e[n]=r[n]);Lo(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:os,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ot(t,"pointerdown",this._onTapStart):(Ot(t,"mousedown",this._onTapStart),Ot(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ot(t,"dragover",this),Ot(t,"dragenter",this)),Mr.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),$e(this,ts())}st.prototype={constructor:st,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Rn=null)},_getDirection:function(e,r){return typeof this.options.direction=="function"?this.options.direction.call(this,e,r,N):this.options.direction},_onTapStart:function(e){if(e.cancelable){var r=this,n=this.el,i=this.options,o=i.preventOnFilter,a=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,w=i.filter;if(ms(n),!N&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Gn&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Se(f,i.draggable,n,!1),!(f&&f.animated)&&Ar!==f)){if(Fn=ve(f),Jn=ve(f,i.draggable),typeof w=="function"){if(w.call(this,e,f,this)){ie({sortable:r,rootEl:u,name:"filter",targetEl:f,toEl:n,fromEl:n}),ae("filter",r,{evt:e}),o&&e.preventDefault();return}}else if(w&&(w=w.split(",").some(function(m){if(m=Se(u,m.trim(),n,!1),m)return ie({sortable:r,rootEl:m,name:"filter",targetEl:f,fromEl:n,toEl:n}),ae("filter",r,{evt:e}),!0}),w)){o&&e.preventDefault();return}i.handle&&!Se(u,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,r,n){var i=this,o=i.el,a=i.options,d=o.ownerDocument,f;if(n&&!N&&n.parentNode===o){var u=qt(n);if(kt=o,N=n,Ut=N.parentNode,bn=N.nextSibling,Ar=n,wr=a.group,st.dragged=N,mn={target:N,clientX:(r||e).clientX,clientY:(r||e).clientY},xo=mn.clientX-u.left,Eo=mn.clientY-u.top,this._lastX=(r||e).clientX,this._lastY=(r||e).clientY,N.style["will-change"]="all",f=function(){if(ae("delayEnded",i,{evt:e}),st.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!go&&i.nativeDraggable&&(N.draggable=!0),i._triggerDragStart(e,r),ie({sortable:i,name:"choose",originalEvent:e}),fe(N,a.chosenClass,!0)},a.ignore.split(",").forEach(function(w){_o(N,w.trim(),di)}),Ot(d,"dragover",gn),Ot(d,"mousemove",gn),Ot(d,"touchmove",gn),a.supportPointer?(Ot(d,"pointerup",i._onDrop),!this.nativeDraggable&&Ot(d,"pointercancel",i._onDrop)):(Ot(d,"mouseup",i._onDrop),Ot(d,"touchend",i._onDrop),Ot(d,"touchcancel",i._onDrop)),go&&this.nativeDraggable&&(this.options.touchStartThreshold=4,N.draggable=!0),ae("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(tr||We))){if(st.eventCanceled){this._onDrop();return}a.supportPointer?(Ot(d,"pointerup",i._disableDelayedDrag),Ot(d,"pointercancel",i._disableDelayedDrag)):(Ot(d,"mouseup",i._disableDelayedDrag),Ot(d,"touchend",i._disableDelayedDrag),Ot(d,"touchcancel",i._disableDelayedDrag)),Ot(d,"mousemove",i._delayedDragTouchMoveHandler),Ot(d,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Ot(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,a.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var r=e.touches?e.touches[0]:e;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){N&&di(N),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Et(e,"mouseup",this._disableDelayedDrag),Et(e,"touchend",this._disableDelayedDrag),Et(e,"touchcancel",this._disableDelayedDrag),Et(e,"pointerup",this._disableDelayedDrag),Et(e,"pointercancel",this._disableDelayedDrag),Et(e,"mousemove",this._delayedDragTouchMoveHandler),Et(e,"touchmove",this._delayedDragTouchMoveHandler),Et(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,r){r=r||e.pointerType=="touch"&&e,!this.nativeDraggable||r?this.options.supportPointer?Ot(document,"pointermove",this._onTouchMove):r?Ot(document,"touchmove",this._onTouchMove):Ot(document,"mousemove",this._onTouchMove):(Ot(N,"dragend",this),Ot(kt,"dragstart",this._onDragStart));try{document.selection?Cr(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,r){if(In=!1,kt&&N){ae("dragStarted",this,{evt:r}),this.nativeDraggable&&Ot(document,"dragover",ls);var n=this.options;!e&&fe(N,n.dragClass,!1),fe(N,n.ghostClass,!0),st.active=this,e&&this._appendGhost(),ie({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(Oe){this._lastX=Oe.clientX,this._lastY=Oe.clientY,No();for(var e=document.elementFromPoint(Oe.clientX,Oe.clientY),r=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Oe.clientX,Oe.clientY),e!==r);)r=e;if(N.parentNode[se]._isOutsideThisEl(e),r)do{if(r[se]){var n=void 0;if(n=r[se]._onDragOver({clientX:Oe.clientX,clientY:Oe.clientY,target:e,rootEl:r}),n&&!this.options.dragoverBubble)break}e=r}while(r=Co(r));ko()}},_onTouchMove:function(e){if(mn){var r=this.options,n=r.fallbackTolerance,i=r.fallbackOffset,o=e.touches?e.touches[0]:e,a=ut&&Ln(ut,!0),d=ut&&a&&a.a,f=ut&&a&&a.d,u=Er&&ne&&wo(ne),w=(o.clientX-mn.clientX+i.x)/(d||1)+(u?u[0]-ui[0]:0)/(d||1),m=(o.clientY-mn.clientY+i.y)/(f||1)+(u?u[1]-ui[1]:0)/(f||1);if(!st.active&&!In){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(ie({rootEl:Ut,name:"add",toEl:Ut,fromEl:kt,originalEvent:e}),ie({sortable:this,name:"remove",toEl:Ut,originalEvent:e}),ie({rootEl:Ut,name:"sort",toEl:Ut,fromEl:kt,originalEvent:e}),ie({sortable:this,name:"sort",toEl:Ut,originalEvent:e})),Zt&&Zt.save()):ue!==Fn&&ue>=0&&(ie({sortable:this,name:"update",toEl:Ut,originalEvent:e}),ie({sortable:this,name:"sort",toEl:Ut,originalEvent:e})),st.active&&((ue==null||ue===-1)&&(ue=Fn,on=Jn),ie({sortable:this,name:"end",toEl:Ut,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){ae("nulling",this),kt=N=Ut=ut=bn=Wt=Ar=an=mn=Oe=Yn=ue=on=Fn=Jn=Rn=Zn=Zt=wr=st.dragged=st.ghost=st.clone=st.active=null,Rr.forEach(function(e){e.checked=!0}),Rr.length=ci=fi=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":N&&(this._onDragOver(e),cs(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],r,n=this.el.children,i=0,o=n.length,a=this.options;ii.right+o||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>i.bottom+o||t.clientX>n.right&&t.clientY>n.top}function ps(t,e,r,n,i,o,a,d){var f=n?t.clientY:t.clientX,u=n?r.height:r.width,w=n?r.top:r.left,m=n?r.bottom:r.right,E=!1;if(!a){if(d&&Drw+u*o/2:fm-Dr)return-Zn}else if(f>w+u*(1-i)/2&&fm-u*o/2)?f>w+u/2?1:-1:0}function hs(t){return ve(N){t.directive("sortable",e=>{let r=parseInt(e.dataset?.sortableAnimationDuration);r!==0&&!r&&(r=300),e.sortable=Si.create(e,{group:e.getAttribute("x-sortable-group"),draggable:"[x-sortable-item]",handle:"[x-sortable-handle]",dataIdAttr:"x-sortable-item",animation:r,ghostClass:"fi-sortable-ghost"})})};var bs=Object.create,Ci=Object.defineProperty,ys=Object.getPrototypeOf,ws=Object.prototype.hasOwnProperty,xs=Object.getOwnPropertyNames,Es=Object.getOwnPropertyDescriptor,Os=t=>Ci(t,"__esModule",{value:!0}),Ho=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports),Ss=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of xs(e))!ws.call(t,n)&&n!=="default"&&Ci(t,n,{get:()=>e[n],enumerable:!(r=Es(e,n))||r.enumerable});return t},$o=t=>Ss(Os(Ci(t!=null?bs(ys(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),As=Ho(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});function e(c){var s=c.getBoundingClientRect();return{width:s.width,height:s.height,top:s.top,right:s.right,bottom:s.bottom,left:s.left,x:s.left,y:s.top}}function r(c){if(c==null)return window;if(c.toString()!=="[object Window]"){var s=c.ownerDocument;return s&&s.defaultView||window}return c}function n(c){var s=r(c),b=s.pageXOffset,_=s.pageYOffset;return{scrollLeft:b,scrollTop:_}}function i(c){var s=r(c).Element;return c instanceof s||c instanceof Element}function o(c){var s=r(c).HTMLElement;return c instanceof s||c instanceof HTMLElement}function a(c){if(typeof ShadowRoot>"u")return!1;var s=r(c).ShadowRoot;return c instanceof s||c instanceof ShadowRoot}function d(c){return{scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}}function f(c){return c===r(c)||!o(c)?n(c):d(c)}function u(c){return c?(c.nodeName||"").toLowerCase():null}function w(c){return((i(c)?c.ownerDocument:c.document)||window.document).documentElement}function m(c){return e(w(c)).left+n(c).scrollLeft}function E(c){return r(c).getComputedStyle(c)}function O(c){var s=E(c),b=s.overflow,_=s.overflowX,T=s.overflowY;return/auto|scroll|overlay|hidden/.test(b+T+_)}function S(c,s,b){b===void 0&&(b=!1);var _=w(s),T=e(c),L=o(s),z={scrollLeft:0,scrollTop:0},H={x:0,y:0};return(L||!L&&!b)&&((u(s)!=="body"||O(_))&&(z=f(s)),o(s)?(H=e(s),H.x+=s.clientLeft,H.y+=s.clientTop):_&&(H.x=m(_))),{x:T.left+z.scrollLeft-H.x,y:T.top+z.scrollTop-H.y,width:T.width,height:T.height}}function M(c){var s=e(c),b=c.offsetWidth,_=c.offsetHeight;return Math.abs(s.width-b)<=1&&(b=s.width),Math.abs(s.height-_)<=1&&(_=s.height),{x:c.offsetLeft,y:c.offsetTop,width:b,height:_}}function I(c){return u(c)==="html"?c:c.assignedSlot||c.parentNode||(a(c)?c.host:null)||w(c)}function $(c){return["html","body","#document"].indexOf(u(c))>=0?c.ownerDocument.body:o(c)&&O(c)?c:$(I(c))}function A(c,s){var b;s===void 0&&(s=[]);var _=$(c),T=_===((b=c.ownerDocument)==null?void 0:b.body),L=r(_),z=T?[L].concat(L.visualViewport||[],O(_)?_:[]):_,H=s.concat(z);return T?H:H.concat(A(I(z)))}function k(c){return["table","td","th"].indexOf(u(c))>=0}function Y(c){return!o(c)||E(c).position==="fixed"?null:c.offsetParent}function nt(c){var s=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,b=navigator.userAgent.indexOf("Trident")!==-1;if(b&&o(c)){var _=E(c);if(_.position==="fixed")return null}for(var T=I(c);o(T)&&["html","body"].indexOf(u(T))<0;){var L=E(T);if(L.transform!=="none"||L.perspective!=="none"||L.contain==="paint"||["transform","perspective"].indexOf(L.willChange)!==-1||s&&L.willChange==="filter"||s&&L.filter&&L.filter!=="none")return T;T=T.parentNode}return null}function J(c){for(var s=r(c),b=Y(c);b&&k(b)&&E(b).position==="static";)b=Y(b);return b&&(u(b)==="html"||u(b)==="body"&&E(b).position==="static")?s:b||nt(c)||s}var U="top",dt="bottom",X="right",Z="left",mt="auto",l=[U,dt,X,Z],h="start",v="end",p="clippingParents",j="viewport",P="popper",R="reference",Q=l.reduce(function(c,s){return c.concat([s+"-"+h,s+"-"+v])},[]),Vt=[].concat(l,[mt]).reduce(function(c,s){return c.concat([s,s+"-"+h,s+"-"+v])},[]),Re="beforeRead",ze="read",Nr="afterRead",kr="beforeMain",jr="main",Ue="afterMain",nr="beforeWrite",Br="write",rr="afterWrite",Ie=[Re,ze,Nr,kr,jr,Ue,nr,Br,rr];function Hr(c){var s=new Map,b=new Set,_=[];c.forEach(function(L){s.set(L.name,L)});function T(L){b.add(L.name);var z=[].concat(L.requires||[],L.requiresIfExists||[]);z.forEach(function(H){if(!b.has(H)){var G=s.get(H);G&&T(G)}}),_.push(L)}return c.forEach(function(L){b.has(L.name)||T(L)}),_}function me(c){var s=Hr(c);return Ie.reduce(function(b,_){return b.concat(s.filter(function(T){return T.phase===_}))},[])}function Ve(c){var s;return function(){return s||(s=new Promise(function(b){Promise.resolve().then(function(){s=void 0,b(c())})})),s}}function Ae(c){for(var s=arguments.length,b=new Array(s>1?s-1:0),_=1;_=0,_=b&&o(c)?J(c):c;return i(_)?s.filter(function(T){return i(T)&&kn(T,_)&&u(T)!=="body"}):[]}function wn(c,s,b){var _=s==="clippingParents"?yn(c):[].concat(s),T=[].concat(_,[b]),L=T[0],z=T.reduce(function(H,G){var ot=sr(c,G);return H.top=ge(ot.top,H.top),H.right=ln(ot.right,H.right),H.bottom=ln(ot.bottom,H.bottom),H.left=ge(ot.left,H.left),H},sr(c,L));return z.width=z.right-z.left,z.height=z.bottom-z.top,z.x=z.left,z.y=z.top,z}function cn(c){return c.split("-")[1]}function de(c){return["top","bottom"].indexOf(c)>=0?"x":"y"}function lr(c){var s=c.reference,b=c.element,_=c.placement,T=_?oe(_):null,L=_?cn(_):null,z=s.x+s.width/2-b.width/2,H=s.y+s.height/2-b.height/2,G;switch(T){case U:G={x:z,y:s.y-b.height};break;case dt:G={x:z,y:s.y+s.height};break;case X:G={x:s.x+s.width,y:H};break;case Z:G={x:s.x-b.width,y:H};break;default:G={x:s.x,y:s.y}}var ot=T?de(T):null;if(ot!=null){var V=ot==="y"?"height":"width";switch(L){case h:G[ot]=G[ot]-(s[V]/2-b[V]/2);break;case v:G[ot]=G[ot]+(s[V]/2-b[V]/2);break}}return G}function cr(){return{top:0,right:0,bottom:0,left:0}}function fr(c){return Object.assign({},cr(),c)}function ur(c,s){return s.reduce(function(b,_){return b[_]=c,b},{})}function qe(c,s){s===void 0&&(s={});var b=s,_=b.placement,T=_===void 0?c.placement:_,L=b.boundary,z=L===void 0?p:L,H=b.rootBoundary,G=H===void 0?j:H,ot=b.elementContext,V=ot===void 0?P:ot,Ct=b.altBoundary,Lt=Ct===void 0?!1:Ct,Dt=b.padding,xt=Dt===void 0?0:Dt,Mt=fr(typeof xt!="number"?xt:ur(xt,l)),St=V===P?R:P,Bt=c.elements.reference,Rt=c.rects.popper,Ht=c.elements[Lt?St:V],ct=wn(i(Ht)?Ht:Ht.contextElement||w(c.elements.popper),z,G),Pt=e(Bt),_t=lr({reference:Pt,element:Rt,strategy:"absolute",placement:T}),Nt=Xe(Object.assign({},Rt,_t)),Ft=V===P?Nt:Pt,Yt={top:ct.top-Ft.top+Mt.top,bottom:Ft.bottom-ct.bottom+Mt.bottom,left:ct.left-Ft.left+Mt.left,right:Ft.right-ct.right+Mt.right},$t=c.modifiersData.offset;if(V===P&&$t){var zt=$t[T];Object.keys(Yt).forEach(function(we){var te=[X,dt].indexOf(we)>=0?1:-1,Le=[U,dt].indexOf(we)>=0?"y":"x";Yt[we]+=zt[Le]*te})}return Yt}var dr="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Vr="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",xn={placement:"bottom",modifiers:[],strategy:"absolute"};function fn(){for(var c=arguments.length,s=new Array(c),b=0;b100){console.error(Vr);break}if(V.reset===!0){V.reset=!1,Pt=-1;continue}var _t=V.orderedModifiers[Pt],Nt=_t.fn,Ft=_t.options,Yt=Ft===void 0?{}:Ft,$t=_t.name;typeof Nt=="function"&&(V=Nt({state:V,options:Yt,name:$t,instance:Dt})||V)}}},update:Ve(function(){return new Promise(function(St){Dt.forceUpdate(),St(V)})}),destroy:function(){Mt(),Lt=!0}};if(!fn(H,G))return console.error(dr),Dt;Dt.setOptions(ot).then(function(St){!Lt&&ot.onFirstUpdate&&ot.onFirstUpdate(St)});function xt(){V.orderedModifiers.forEach(function(St){var Bt=St.name,Rt=St.options,Ht=Rt===void 0?{}:Rt,ct=St.effect;if(typeof ct=="function"){var Pt=ct({state:V,name:Bt,instance:Dt,options:Ht}),_t=function(){};Ct.push(Pt||_t)}})}function Mt(){Ct.forEach(function(St){return St()}),Ct=[]}return Dt}}var On={passive:!0};function Yr(c){var s=c.state,b=c.instance,_=c.options,T=_.scroll,L=T===void 0?!0:T,z=_.resize,H=z===void 0?!0:z,G=r(s.elements.popper),ot=[].concat(s.scrollParents.reference,s.scrollParents.popper);return L&&ot.forEach(function(V){V.addEventListener("scroll",b.update,On)}),H&&G.addEventListener("resize",b.update,On),function(){L&&ot.forEach(function(V){V.removeEventListener("scroll",b.update,On)}),H&&G.removeEventListener("resize",b.update,On)}}var jn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yr,data:{}};function Xr(c){var s=c.state,b=c.name;s.modifiersData[b]=lr({reference:s.rects.reference,element:s.rects.popper,strategy:"absolute",placement:s.placement})}var Bn={name:"popperOffsets",enabled:!0,phase:"read",fn:Xr,data:{}},qr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gr(c){var s=c.x,b=c.y,_=window,T=_.devicePixelRatio||1;return{x:Ye(Ye(s*T)/T)||0,y:Ye(Ye(b*T)/T)||0}}function Hn(c){var s,b=c.popper,_=c.popperRect,T=c.placement,L=c.offsets,z=c.position,H=c.gpuAcceleration,G=c.adaptive,ot=c.roundOffsets,V=ot===!0?Gr(L):typeof ot=="function"?ot(L):L,Ct=V.x,Lt=Ct===void 0?0:Ct,Dt=V.y,xt=Dt===void 0?0:Dt,Mt=L.hasOwnProperty("x"),St=L.hasOwnProperty("y"),Bt=Z,Rt=U,Ht=window;if(G){var ct=J(b),Pt="clientHeight",_t="clientWidth";ct===r(b)&&(ct=w(b),E(ct).position!=="static"&&(Pt="scrollHeight",_t="scrollWidth")),ct=ct,T===U&&(Rt=dt,xt-=ct[Pt]-_.height,xt*=H?1:-1),T===Z&&(Bt=X,Lt-=ct[_t]-_.width,Lt*=H?1:-1)}var Nt=Object.assign({position:z},G&&qr);if(H){var Ft;return Object.assign({},Nt,(Ft={},Ft[Rt]=St?"0":"",Ft[Bt]=Mt?"0":"",Ft.transform=(Ht.devicePixelRatio||1)<2?"translate("+Lt+"px, "+xt+"px)":"translate3d("+Lt+"px, "+xt+"px, 0)",Ft))}return Object.assign({},Nt,(s={},s[Rt]=St?xt+"px":"",s[Bt]=Mt?Lt+"px":"",s.transform="",s))}function g(c){var s=c.state,b=c.options,_=b.gpuAcceleration,T=_===void 0?!0:_,L=b.adaptive,z=L===void 0?!0:L,H=b.roundOffsets,G=H===void 0?!0:H,ot=E(s.elements.popper).transitionProperty||"";z&&["transform","top","right","bottom","left"].some(function(Ct){return ot.indexOf(Ct)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",` -`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var z={placement:ot(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:T};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Hn(Object.assign({},z,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:U,roundOffsets:G})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Hn(Object.assign({},z,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:G})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})}var y={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g,data:{}};function D(c){var s=c.state;Object.keys(s.elements).forEach(function(b){var _=s.styles[b]||{},T=s.attributes[b]||{},L=s.elements[b];!o(L)||!u(L)||(Object.assign(L.style,_),Object.keys(T).forEach(function(U){var H=T[U];H===!1?L.removeAttribute(U):L.setAttribute(U,H===!0?"":H)}))})}function F(c){var s=c.state,b={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,b.popper),s.styles=b,s.elements.arrow&&Object.assign(s.elements.arrow.style,b.arrow),function(){Object.keys(s.elements).forEach(function(_){var T=s.elements[_],L=s.attributes[_]||{},U=Object.keys(s.styles.hasOwnProperty(_)?s.styles[_]:b[_]),H=U.reduce(function(G,oe){return G[oe]="",G},{});!o(T)||!u(T)||(Object.assign(T.style,H),Object.keys(L).forEach(function(G){T.removeAttribute(G)}))})}}var q={name:"applyStyles",enabled:!0,phase:"write",fn:D,effect:F,requires:["computeStyles"]};function W(c,s,b){var _=ot(c),T=[Z,V].indexOf(_)>=0?-1:1,L=typeof b=="function"?b(Object.assign({},s,{placement:c})):b,U=L[0],H=L[1];return U=U||0,H=(H||0)*T,[Z,X].indexOf(_)>=0?{x:H,y:U}:{x:U,y:H}}function B(c){var s=c.state,b=c.options,_=c.name,T=b.offset,L=T===void 0?[0,0]:T,U=ze.reduce(function(z,Ce){return z[Ce]=W(Ce,s.rects,L),z},{}),H=U[s.placement],G=H.x,oe=H.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=G,s.modifiersData.popperOffsets.y+=oe),s.modifiersData[_]=U}var be={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:B},le={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(c){return c.replace(/left|right|bottom|top/g,function(s){return le[s]})}var ye={start:"end",end:"start"};function Te(c){return c.replace(/start|end/g,function(s){return ye[s]})}function je(c,s){s===void 0&&(s={});var b=s,_=b.placement,T=b.boundary,L=b.rootBoundary,U=b.padding,H=b.flipVariations,G=b.allowedAutoPlacements,oe=G===void 0?ze:G,z=cn(_),Ce=z?H?Q:Q.filter(function(xe){return cn(xe)===z}):l,Le=Ce.filter(function(xe){return oe.indexOf(xe)>=0});Le.length===0&&(Le=Ce,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var De=Le.reduce(function(xe,Re){return xe[Re]=qt(c,{placement:Re,boundary:T,rootBoundary:L,padding:U})[ot(Re)],xe},{});return Object.keys(De).sort(function(xe,Re){return De[xe]-De[Re]})}function Ae(c){if(ot(c)===me)return[];var s=pe(c);return[Te(c),s,Te(s)]}function Ie(c){var s=c.state,b=c.options,_=c.name;if(!s.modifiersData[_]._skip){for(var T=b.mainAxis,L=T===void 0?!0:T,U=b.altAxis,H=U===void 0?!0:U,G=b.fallbackPlacements,oe=b.padding,z=b.boundary,Ce=b.rootBoundary,Le=b.altBoundary,De=b.flipVariations,xe=De===void 0?!0:De,Re=b.allowedAutoPlacements,Se=s.options.placement,Be=ot(Se),Me=Be===Se,He=G||(Me||!xe?[pe(Se)]:Ae(Se)),ce=[Se].concat(He).reduce(function(te,ge){return te.concat(ot(ge)===me?je(s,{placement:ge,boundary:z,rootBoundary:Ce,padding:oe,flipVariations:xe,allowedAutoPlacements:Re}):ge)},[]),Pe=s.rects.reference,_e=s.rects.popper,Ne=new Map,Fe=!0,Ye=ce[0],$e=0;$e=0,dn=Lt?"width":"height",Zt=qt(s,{placement:Ue,boundary:z,rootBoundary:Ce,altBoundary:Le,padding:oe}),Nt=Lt?et?X:Z:et?de:V;Pe[dn]>_e[dn]&&(Nt=pe(Nt));var $n=pe(Nt),Qt=[];if(L&&Qt.push(Zt[wt]<=0),H&&Qt.push(Zt[Nt]<=0,Zt[$n]<=0),Qt.every(function(te){return te})){Ye=Ue,Fe=!1;break}Ne.set(Ue,Qt)}if(Fe)for(var Sn=xe?3:1,Wn=function(ge){var we=ce.find(function(Ke){var Je=Ne.get(Ke);if(Je)return Je.slice(0,ge).every(function(Ct){return Ct})});if(we)return Ye=we,"break"},C=Sn;C>0;C--){var K=Wn(C);if(K==="break")break}s.placement!==Ye&&(s.modifiersData[_]._skip=!0,s.placement=Ye,s.reset=!0)}}var re={name:"flip",enabled:!0,phase:"main",fn:Ie,requiresIfExists:["offset"],data:{_skip:!1}};function he(c){return c==="x"?"y":"x"}function ve(c,s,b){return gt(c,ln(s,b))}function ee(c){var s=c.state,b=c.options,_=c.name,T=b.mainAxis,L=T===void 0?!0:T,U=b.altAxis,H=U===void 0?!1:U,G=b.boundary,oe=b.rootBoundary,z=b.altBoundary,Ce=b.padding,Le=b.tether,De=Le===void 0?!0:Le,xe=b.tetherOffset,Re=xe===void 0?0:xe,Se=qt(s,{boundary:G,rootBoundary:oe,padding:Ce,altBoundary:z}),Be=ot(s.placement),Me=cn(s.placement),He=!Me,ce=dt(Be),Pe=he(ce),_e=s.modifiersData.popperOffsets,Ne=s.rects.reference,Fe=s.rects.popper,Ye=typeof Re=="function"?Re(Object.assign({},s.rects,{placement:s.placement})):Re,$e={x:0,y:0};if(_e){if(L||H){var Ue=ce==="y"?V:Z,wt=ce==="y"?de:X,et=ce==="y"?"height":"width",Lt=_e[ce],dn=_e[ce]+Se[Ue],Zt=_e[ce]-Se[wt],Nt=De?-Fe[et]/2:0,$n=Me===h?Ne[et]:Fe[et],Qt=Me===h?-Fe[et]:-Ne[et],Sn=s.elements.arrow,Wn=De&&Sn?R(Sn):{width:0,height:0},C=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:cr(),K=C[Ue],te=C[wt],ge=ve(0,Ne[et],Wn[et]),we=He?Ne[et]/2-Nt-ge-K-Ye:$n-ge-K-Ye,Ke=He?-Ne[et]/2+Nt+ge+te+Ye:Qt+ge+te+Ye,Je=s.elements.arrow&&J(s.elements.arrow),Ct=Je?ce==="y"?Je.clientTop||0:Je.clientLeft||0:0,Un=s.modifiersData.offset?s.modifiersData.offset[s.placement][ce]:0,_t=_e[ce]+we-Un-Ct,An=_e[ce]+Ke-Un;if(L){var pn=ve(De?ln(dn,_t):dn,Lt,De?gt(Zt,An):Zt);_e[ce]=pn,$e[ce]=pn-Lt}if(H){var en=ce==="x"?V:Z,Gr=ce==="x"?de:X,tn=_e[Pe],hn=tn+Se[en],Ci=tn-Se[Gr],_i=ve(De?ln(hn,_t):hn,tn,De?gt(Ci,An):Ci);_e[Pe]=_i,$e[Pe]=_i-tn}}s.modifiersData[_]=$e}}var ie={name:"preventOverflow",enabled:!0,phase:"main",fn:ee,requiresIfExists:["offset"]},x=function(s,b){return s=typeof s=="function"?s(Object.assign({},b.rects,{placement:b.placement})):s,fr(typeof s!="number"?s:ur(s,l))};function Ge(c){var s,b=c.state,_=c.name,T=c.options,L=b.elements.arrow,U=b.modifiersData.popperOffsets,H=ot(b.placement),G=dt(H),oe=[Z,X].indexOf(H)>=0,z=oe?"height":"width";if(!(!L||!U)){var Ce=x(T.padding,b),Le=R(L),De=G==="y"?V:Z,xe=G==="y"?de:X,Re=b.rects.reference[z]+b.rects.reference[G]-U[G]-b.rects.popper[z],Se=U[G]-b.rects.reference[G],Be=J(L),Me=Be?G==="y"?Be.clientHeight||0:Be.clientWidth||0:0,He=Re/2-Se/2,ce=Ce[De],Pe=Me-Le[z]-Ce[xe],_e=Me/2-Le[z]/2+He,Ne=ve(ce,_e,Pe),Fe=G;b.modifiersData[_]=(s={},s[Fe]=Ne,s.centerOffset=Ne-_e,s)}}function fe(c){var s=c.state,b=c.options,_=b.element,T=_===void 0?"[data-popper-arrow]":_;if(T!=null&&!(typeof T=="string"&&(T=s.elements.popper.querySelector(T),!T))){if(o(T)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" ")),!kn(s.elements.popper,T)){console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}s.elements.arrow=T}}var Ft={name:"arrow",enabled:!0,phase:"main",fn:Ge,effect:fe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function bt(c,s,b){return b===void 0&&(b={x:0,y:0}),{top:c.top-s.height-b.y,right:c.right-s.width+b.x,bottom:c.bottom-s.height+b.y,left:c.left-s.width-b.x}}function Gt(c){return[V,X,de,Z].some(function(s){return c[s]>=0})}function Kt(c){var s=c.state,b=c.name,_=s.rects.reference,T=s.rects.popper,L=s.modifiersData.preventOverflow,U=qt(s,{elementContext:"reference"}),H=qt(s,{altBoundary:!0}),G=bt(U,_),oe=bt(H,T,L),z=Gt(G),Ce=Gt(oe);s.modifiersData[b]={referenceClippingOffsets:G,popperEscapeOffsets:oe,isReferenceHidden:z,hasPopperEscaped:Ce},s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-reference-hidden":z,"data-popper-escaped":Ce})}var Jt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kt},rt=[jn,Bn,y,q],lt=En({defaultModifiers:rt}),yt=[jn,Bn,y,q,be,re,ie,Ft,Jt],un=En({defaultModifiers:yt});e.applyStyles=q,e.arrow=Ft,e.computeStyles=y,e.createPopper=un,e.createPopperLite=lt,e.defaultModifiers=yt,e.detectOverflow=qt,e.eventListeners=jn,e.flip=re,e.hide=Jt,e.offset=be,e.popperGenerator=En,e.popperOffsets=Bn,e.preventOverflow=ie}),$o=Bo(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=As(),r='',n="tippy-box",i="tippy-content",o="tippy-backdrop",a="tippy-arrow",d="tippy-svg-arrow",f={passive:!0,capture:!0};function u(g,y){return{}.hasOwnProperty.call(g,y)}function w(g,y,D){if(Array.isArray(g)){var F=g[y];return F??(Array.isArray(D)?D[y]:D)}return g}function m(g,y){var D={}.toString.call(g);return D.indexOf("[object")===0&&D.indexOf(y+"]")>-1}function E(g,y){return typeof g=="function"?g.apply(void 0,y):g}function O(g,y){if(y===0)return g;var D;return function(F){clearTimeout(D),D=setTimeout(function(){g(F)},y)}}function S(g,y){var D=Object.assign({},g);return y.forEach(function(F){delete D[F]}),D}function R(g){return g.split(/\s+/).filter(Boolean)}function I(g){return[].concat(g)}function $(g,y){g.indexOf(y)===-1&&g.push(y)}function A(g){return g.filter(function(y,D){return g.indexOf(y)===D})}function k(g){return g.split("-")[0]}function Y(g){return[].slice.call(g)}function ne(g){return Object.keys(g).reduce(function(y,D){return g[D]!==void 0&&(y[D]=g[D]),y},{})}function J(){return document.createElement("div")}function V(g){return["Element","Fragment"].some(function(y){return m(g,y)})}function de(g){return m(g,"NodeList")}function X(g){return m(g,"MouseEvent")}function Z(g){return!!(g&&g._tippy&&g._tippy.reference===g)}function me(g){return V(g)?[g]:de(g)?Y(g):Array.isArray(g)?g:Y(document.querySelectorAll(g))}function l(g,y){g.forEach(function(D){D&&(D.style.transitionDuration=y+"ms")})}function h(g,y){g.forEach(function(D){D&&D.setAttribute("data-state",y)})}function v(g){var y,D=I(g),F=D[0];return!(F==null||(y=F.ownerDocument)==null)&&y.body?F.ownerDocument:document}function p(g,y){var D=y.clientX,F=y.clientY;return g.every(function(q){var W=q.popperRect,B=q.popperState,be=q.props,le=be.interactiveBorder,pe=k(B.placement),ye=B.modifiersData.offset;if(!ye)return!0;var Te=pe==="bottom"?ye.top.y:0,je=pe==="top"?ye.bottom.y:0,Ae=pe==="right"?ye.left.x:0,Ie=pe==="left"?ye.right.x:0,re=W.top-F+Te>le,he=F-W.bottom-je>le,ve=W.left-D+Ae>le,ee=D-W.right-Ie>le;return re||he||ve||ee})}function j(g,y,D){var F=y+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(q){g[F](q,D)})}var P={isTouch:!1},M=0;function Q(){P.isTouch||(P.isTouch=!0,window.performance&&document.addEventListener("mousemove",ze))}function ze(){var g=performance.now();g-M<20&&(P.isTouch=!1,document.removeEventListener("mousemove",ze)),M=g}function Mt(){var g=document.activeElement;if(Z(g)){var y=g._tippy;g.blur&&!y.state.isVisible&&g.blur()}}function Ut(){document.addEventListener("touchstart",Q,f),window.addEventListener("blur",Mt)}var Lr=typeof window<"u"&&typeof document<"u",Nr=Lr?navigator.userAgent:"",kr=/MSIE |Trident\//.test(Nr);function Vt(g){var y=g==="destroy"?"n already-":" ";return[g+"() was called on a"+y+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function nr(g){var y=/[ \t]{2,}/g,D=/^[ \t]*/gm;return g.replace(y," ").replace(D,"").trim()}function jr(g){return nr(` +`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var V={placement:oe(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:T};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Hn(Object.assign({},V,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:z,roundOffsets:G})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Hn(Object.assign({},V,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:G})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})}var y={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g,data:{}};function D(c){var s=c.state;Object.keys(s.elements).forEach(function(b){var _=s.styles[b]||{},T=s.attributes[b]||{},L=s.elements[b];!o(L)||!u(L)||(Object.assign(L.style,_),Object.keys(T).forEach(function(z){var H=T[z];H===!1?L.removeAttribute(z):L.setAttribute(z,H===!0?"":H)}))})}function F(c){var s=c.state,b={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,b.popper),s.styles=b,s.elements.arrow&&Object.assign(s.elements.arrow.style,b.arrow),function(){Object.keys(s.elements).forEach(function(_){var T=s.elements[_],L=s.attributes[_]||{},z=Object.keys(s.styles.hasOwnProperty(_)?s.styles[_]:b[_]),H=z.reduce(function(G,ot){return G[ot]="",G},{});!o(T)||!u(T)||(Object.assign(T.style,H),Object.keys(L).forEach(function(G){T.removeAttribute(G)}))})}}var q={name:"applyStyles",enabled:!0,phase:"write",fn:D,effect:F,requires:["computeStyles"]};function W(c,s,b){var _=oe(c),T=[Z,U].indexOf(_)>=0?-1:1,L=typeof b=="function"?b(Object.assign({},s,{placement:c})):b,z=L[0],H=L[1];return z=z||0,H=(H||0)*T,[Z,X].indexOf(_)>=0?{x:H,y:z}:{x:z,y:H}}function B(c){var s=c.state,b=c.options,_=c.name,T=b.offset,L=T===void 0?[0,0]:T,z=Vt.reduce(function(V,Ct){return V[Ct]=W(Ct,s.rects,L),V},{}),H=z[s.placement],G=H.x,ot=H.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=G,s.modifiersData.popperOffsets.y+=ot),s.modifiersData[_]=z}var bt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:B},lt={left:"right",right:"left",bottom:"top",top:"bottom"};function pt(c){return c.replace(/left|right|bottom|top/g,function(s){return lt[s]})}var yt={start:"end",end:"start"};function Tt(c){return c.replace(/start|end/g,function(s){return yt[s]})}function jt(c,s){s===void 0&&(s={});var b=s,_=b.placement,T=b.boundary,L=b.rootBoundary,z=b.padding,H=b.flipVariations,G=b.allowedAutoPlacements,ot=G===void 0?Vt:G,V=cn(_),Ct=V?H?Q:Q.filter(function(xt){return cn(xt)===V}):l,Lt=Ct.filter(function(xt){return ot.indexOf(xt)>=0});Lt.length===0&&(Lt=Ct,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var Dt=Lt.reduce(function(xt,Mt){return xt[Mt]=qe(c,{placement:Mt,boundary:T,rootBoundary:L,padding:z})[oe(Mt)],xt},{});return Object.keys(Dt).sort(function(xt,Mt){return Dt[xt]-Dt[Mt]})}function At(c){if(oe(c)===mt)return[];var s=pt(c);return[Tt(c),s,Tt(s)]}function It(c){var s=c.state,b=c.options,_=c.name;if(!s.modifiersData[_]._skip){for(var T=b.mainAxis,L=T===void 0?!0:T,z=b.altAxis,H=z===void 0?!0:z,G=b.fallbackPlacements,ot=b.padding,V=b.boundary,Ct=b.rootBoundary,Lt=b.altBoundary,Dt=b.flipVariations,xt=Dt===void 0?!0:Dt,Mt=b.allowedAutoPlacements,St=s.options.placement,Bt=oe(St),Rt=Bt===St,Ht=G||(Rt||!xt?[pt(St)]:At(St)),ct=[St].concat(Ht).reduce(function(et,gt){return et.concat(oe(gt)===mt?jt(s,{placement:gt,boundary:V,rootBoundary:Ct,padding:ot,flipVariations:xt,allowedAutoPlacements:Mt}):gt)},[]),Pt=s.rects.reference,_t=s.rects.popper,Nt=new Map,Ft=!0,Yt=ct[0],$t=0;$t=0,dn=Le?"width":"height",Ze=qe(s,{placement:zt,boundary:V,rootBoundary:Ct,altBoundary:Lt,padding:ot}),Ne=Le?te?X:Z:te?dt:U;Pt[dn]>_t[dn]&&(Ne=pt(Ne));var $n=pt(Ne),Qe=[];if(L&&Qe.push(Ze[we]<=0),H&&Qe.push(Ze[Ne]<=0,Ze[$n]<=0),Qe.every(function(et){return et})){Yt=zt,Ft=!1;break}Nt.set(zt,Qe)}if(Ft)for(var Sn=xt?3:1,Wn=function(gt){var wt=ct.find(function(Kt){var Jt=Nt.get(Kt);if(Jt)return Jt.slice(0,gt).every(function(Ce){return Ce})});if(wt)return Yt=wt,"break"},C=Sn;C>0;C--){var K=Wn(C);if(K==="break")break}s.placement!==Yt&&(s.modifiersData[_]._skip=!0,s.placement=Yt,s.reset=!0)}}var rt={name:"flip",enabled:!0,phase:"main",fn:It,requiresIfExists:["offset"],data:{_skip:!1}};function ht(c){return c==="x"?"y":"x"}function vt(c,s,b){return ge(c,ln(s,b))}function tt(c){var s=c.state,b=c.options,_=c.name,T=b.mainAxis,L=T===void 0?!0:T,z=b.altAxis,H=z===void 0?!1:z,G=b.boundary,ot=b.rootBoundary,V=b.altBoundary,Ct=b.padding,Lt=b.tether,Dt=Lt===void 0?!0:Lt,xt=b.tetherOffset,Mt=xt===void 0?0:xt,St=qe(s,{boundary:G,rootBoundary:ot,padding:Ct,altBoundary:V}),Bt=oe(s.placement),Rt=cn(s.placement),Ht=!Rt,ct=de(Bt),Pt=ht(ct),_t=s.modifiersData.popperOffsets,Nt=s.rects.reference,Ft=s.rects.popper,Yt=typeof Mt=="function"?Mt(Object.assign({},s.rects,{placement:s.placement})):Mt,$t={x:0,y:0};if(_t){if(L||H){var zt=ct==="y"?U:Z,we=ct==="y"?dt:X,te=ct==="y"?"height":"width",Le=_t[ct],dn=_t[ct]+St[zt],Ze=_t[ct]-St[we],Ne=Dt?-Ft[te]/2:0,$n=Rt===h?Nt[te]:Ft[te],Qe=Rt===h?-Ft[te]:-Nt[te],Sn=s.elements.arrow,Wn=Dt&&Sn?M(Sn):{width:0,height:0},C=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:cr(),K=C[zt],et=C[we],gt=vt(0,Nt[te],Wn[te]),wt=Ht?Nt[te]/2-Ne-gt-K-Yt:$n-gt-K-Yt,Kt=Ht?-Nt[te]/2+Ne+gt+et+Yt:Qe+gt+et+Yt,Jt=s.elements.arrow&&J(s.elements.arrow),Ce=Jt?ct==="y"?Jt.clientTop||0:Jt.clientLeft||0:0,zn=s.modifiersData.offset?s.modifiersData.offset[s.placement][ct]:0,_e=_t[ct]+wt-zn-Ce,An=_t[ct]+Kt-zn;if(L){var pn=vt(Dt?ln(dn,_e):dn,Le,Dt?ge(Ze,An):Ze);_t[ct]=pn,$t[ct]=pn-Le}if(H){var tn=ct==="x"?U:Z,Kr=ct==="x"?dt:X,en=_t[Pt],hn=en+St[tn],_i=en-St[Kr],Ti=vt(Dt?ln(hn,_e):hn,en,Dt?ge(_i,An):_i);_t[Pt]=Ti,$t[Pt]=Ti-en}}s.modifiersData[_]=$t}}var it={name:"preventOverflow",enabled:!0,phase:"main",fn:tt,requiresIfExists:["offset"]},x=function(s,b){return s=typeof s=="function"?s(Object.assign({},b.rects,{placement:b.placement})):s,fr(typeof s!="number"?s:ur(s,l))};function Gt(c){var s,b=c.state,_=c.name,T=c.options,L=b.elements.arrow,z=b.modifiersData.popperOffsets,H=oe(b.placement),G=de(H),ot=[Z,X].indexOf(H)>=0,V=ot?"height":"width";if(!(!L||!z)){var Ct=x(T.padding,b),Lt=M(L),Dt=G==="y"?U:Z,xt=G==="y"?dt:X,Mt=b.rects.reference[V]+b.rects.reference[G]-z[G]-b.rects.popper[V],St=z[G]-b.rects.reference[G],Bt=J(L),Rt=Bt?G==="y"?Bt.clientHeight||0:Bt.clientWidth||0:0,Ht=Mt/2-St/2,ct=Ct[Dt],Pt=Rt-Lt[V]-Ct[xt],_t=Rt/2-Lt[V]/2+Ht,Nt=vt(ct,_t,Pt),Ft=G;b.modifiersData[_]=(s={},s[Ft]=Nt,s.centerOffset=Nt-_t,s)}}function ft(c){var s=c.state,b=c.options,_=b.element,T=_===void 0?"[data-popper-arrow]":_;if(T!=null&&!(typeof T=="string"&&(T=s.elements.popper.querySelector(T),!T))){if(o(T)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" ")),!kn(s.elements.popper,T)){console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}s.elements.arrow=T}}var Fe={name:"arrow",enabled:!0,phase:"main",fn:Gt,effect:ft,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function be(c,s,b){return b===void 0&&(b={x:0,y:0}),{top:c.top-s.height-b.y,right:c.right-s.width+b.x,bottom:c.bottom-s.height+b.y,left:c.left-s.width-b.x}}function Ge(c){return[U,X,dt,Z].some(function(s){return c[s]>=0})}function Ke(c){var s=c.state,b=c.name,_=s.rects.reference,T=s.rects.popper,L=s.modifiersData.preventOverflow,z=qe(s,{elementContext:"reference"}),H=qe(s,{altBoundary:!0}),G=be(z,_),ot=be(H,T,L),V=Ge(G),Ct=Ge(ot);s.modifiersData[b]={referenceClippingOffsets:G,popperEscapeOffsets:ot,isReferenceHidden:V,hasPopperEscaped:Ct},s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-reference-hidden":V,"data-popper-escaped":Ct})}var Je={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ke},re=[jn,Bn,y,q],le=En({defaultModifiers:re}),ye=[jn,Bn,y,q,bt,rt,it,Fe,Je],un=En({defaultModifiers:ye});t.applyStyles=q,t.arrow=Fe,t.computeStyles=y,t.createPopper=un,t.createPopperLite=le,t.defaultModifiers=ye,t.detectOverflow=qe,t.eventListeners=jn,t.flip=rt,t.hide=Je,t.offset=bt,t.popperGenerator=En,t.popperOffsets=Bn,t.preventOverflow=it}),Wo=Ho(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=As(),r='',n="tippy-box",i="tippy-content",o="tippy-backdrop",a="tippy-arrow",d="tippy-svg-arrow",f={passive:!0,capture:!0};function u(g,y){return{}.hasOwnProperty.call(g,y)}function w(g,y,D){if(Array.isArray(g)){var F=g[y];return F??(Array.isArray(D)?D[y]:D)}return g}function m(g,y){var D={}.toString.call(g);return D.indexOf("[object")===0&&D.indexOf(y+"]")>-1}function E(g,y){return typeof g=="function"?g.apply(void 0,y):g}function O(g,y){if(y===0)return g;var D;return function(F){clearTimeout(D),D=setTimeout(function(){g(F)},y)}}function S(g,y){var D=Object.assign({},g);return y.forEach(function(F){delete D[F]}),D}function M(g){return g.split(/\s+/).filter(Boolean)}function I(g){return[].concat(g)}function $(g,y){g.indexOf(y)===-1&&g.push(y)}function A(g){return g.filter(function(y,D){return g.indexOf(y)===D})}function k(g){return g.split("-")[0]}function Y(g){return[].slice.call(g)}function nt(g){return Object.keys(g).reduce(function(y,D){return g[D]!==void 0&&(y[D]=g[D]),y},{})}function J(){return document.createElement("div")}function U(g){return["Element","Fragment"].some(function(y){return m(g,y)})}function dt(g){return m(g,"NodeList")}function X(g){return m(g,"MouseEvent")}function Z(g){return!!(g&&g._tippy&&g._tippy.reference===g)}function mt(g){return U(g)?[g]:dt(g)?Y(g):Array.isArray(g)?g:Y(document.querySelectorAll(g))}function l(g,y){g.forEach(function(D){D&&(D.style.transitionDuration=y+"ms")})}function h(g,y){g.forEach(function(D){D&&D.setAttribute("data-state",y)})}function v(g){var y,D=I(g),F=D[0];return!(F==null||(y=F.ownerDocument)==null)&&y.body?F.ownerDocument:document}function p(g,y){var D=y.clientX,F=y.clientY;return g.every(function(q){var W=q.popperRect,B=q.popperState,bt=q.props,lt=bt.interactiveBorder,pt=k(B.placement),yt=B.modifiersData.offset;if(!yt)return!0;var Tt=pt==="bottom"?yt.top.y:0,jt=pt==="top"?yt.bottom.y:0,At=pt==="right"?yt.left.x:0,It=pt==="left"?yt.right.x:0,rt=W.top-F+Tt>lt,ht=F-W.bottom-jt>lt,vt=W.left-D+At>lt,tt=D-W.right-It>lt;return rt||ht||vt||tt})}function j(g,y,D){var F=y+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(q){g[F](q,D)})}var P={isTouch:!1},R=0;function Q(){P.isTouch||(P.isTouch=!0,window.performance&&document.addEventListener("mousemove",Vt))}function Vt(){var g=performance.now();g-R<20&&(P.isTouch=!1,document.removeEventListener("mousemove",Vt)),R=g}function Re(){var g=document.activeElement;if(Z(g)){var y=g._tippy;g.blur&&!y.state.isVisible&&g.blur()}}function ze(){document.addEventListener("touchstart",Q,f),window.addEventListener("blur",Re)}var Nr=typeof window<"u"&&typeof document<"u",kr=Nr?navigator.userAgent:"",jr=/MSIE |Trident\//.test(kr);function Ue(g){var y=g==="destroy"?"n already-":" ";return[g+"() was called on a"+y+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function nr(g){var y=/[ \t]{2,}/g,D=/^[ \t]*/gm;return g.replace(y," ").replace(D,"").trim()}function Br(g){return nr(` %ctippy.js %c`+nr(g)+` %c\u{1F477}\u200D This is a development-only message. It will be removed in production. - `)}function rr(g){return[jr(g),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var It;Br();function Br(){It=new Set}function mt(g,y){if(g&&!It.has(y)){var D;It.add(y),(D=console).warn.apply(D,rr(y))}}function zt(g,y){if(g&&!It.has(y)){var D;It.add(y),(D=console).error.apply(D,rr(y))}}function At(g){var y=!g,D=Object.prototype.toString.call(g)==="[object Object]"&&!g.addEventListener;zt(y,["tippy() was passed","`"+String(g)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),zt(D,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Dt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Hr={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Qe=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Dt,{},Hr),$r=Object.keys(Qe),Wr=function(y){gt(y,[]);var D=Object.keys(y);D.forEach(function(F){Qe[F]=y[F]})};function ot(g){var y=g.plugins||[],D=y.reduce(function(F,q){var W=q.name,B=q.defaultValue;return W&&(F[W]=g[W]!==void 0?g[W]:B),F},{});return Object.assign({},g,{},D)}function Ur(g,y){var D=y?Object.keys(ot(Object.assign({},Qe,{plugins:y}))):$r,F=D.reduce(function(q,W){var B=(g.getAttribute("data-tippy-"+W)||"").trim();if(!B)return q;if(W==="content")q[W]=B;else try{q[W]=JSON.parse(B)}catch{q[W]=B}return q},{});return F}function ir(g,y){var D=Object.assign({},y,{content:E(y.content,[g])},y.ignoreAttributes?{}:Ur(g,y.plugins));return D.aria=Object.assign({},Qe.aria,{},D.aria),D.aria={expanded:D.aria.expanded==="auto"?y.interactive:D.aria.expanded,content:D.aria.content==="auto"?y.interactive?null:"describedby":D.aria.content},D}function gt(g,y){g===void 0&&(g={}),y===void 0&&(y=[]);var D=Object.keys(g);D.forEach(function(F){var q=S(Qe,Object.keys(Dt)),W=!u(q,F);W&&(W=y.filter(function(B){return B.name===F}).length===0),mt(W,["`"+F+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",` + `)}function rr(g){return[Br(g),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Ie;Hr();function Hr(){Ie=new Set}function me(g,y){if(g&&!Ie.has(y)){var D;Ie.add(y),(D=console).warn.apply(D,rr(y))}}function Ve(g,y){if(g&&!Ie.has(y)){var D;Ie.add(y),(D=console).error.apply(D,rr(y))}}function Ae(g){var y=!g,D=Object.prototype.toString.call(g)==="[object Object]"&&!g.addEventListener;Ve(y,["tippy() was passed","`"+String(g)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Ve(D,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var De={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},$r={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Qt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},De,{},$r),Wr=Object.keys(Qt),zr=function(y){ge(y,[]);var D=Object.keys(y);D.forEach(function(F){Qt[F]=y[F]})};function oe(g){var y=g.plugins||[],D=y.reduce(function(F,q){var W=q.name,B=q.defaultValue;return W&&(F[W]=g[W]!==void 0?g[W]:B),F},{});return Object.assign({},g,{},D)}function Ur(g,y){var D=y?Object.keys(oe(Object.assign({},Qt,{plugins:y}))):Wr,F=D.reduce(function(q,W){var B=(g.getAttribute("data-tippy-"+W)||"").trim();if(!B)return q;if(W==="content")q[W]=B;else try{q[W]=JSON.parse(B)}catch{q[W]=B}return q},{});return F}function ir(g,y){var D=Object.assign({},y,{content:E(y.content,[g])},y.ignoreAttributes?{}:Ur(g,y.plugins));return D.aria=Object.assign({},Qt.aria,{},D.aria),D.aria={expanded:D.aria.expanded==="auto"?y.interactive:D.aria.expanded,content:D.aria.content==="auto"?y.interactive?null:"describedby":D.aria.content},D}function ge(g,y){g===void 0&&(g={}),y===void 0&&(y=[]);var D=Object.keys(g);D.forEach(function(F){var q=S(Qt,Object.keys(De)),W=!u(q,F);W&&(W=y.filter(function(B){return B.name===F}).length===0),me(W,["`"+F+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",` `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/ -`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var ln=function(){return"innerHTML"};function Yt(g,y){g[ln()]=y}function or(g){var y=J();return g===!0?y.className=a:(y.className=d,V(g)?y.appendChild(g):Yt(y,g)),y}function kn(g,y){V(y.content)?(Yt(g,""),g.appendChild(y.content)):typeof y.content!="function"&&(y.allowHTML?Yt(g,y.content):g.textContent=y.content)}function Xt(g){var y=g.firstElementChild,D=Y(y.children);return{box:y,content:D.find(function(F){return F.classList.contains(i)}),arrow:D.find(function(F){return F.classList.contains(a)||F.classList.contains(d)}),backdrop:D.find(function(F){return F.classList.contains(o)})}}function ar(g){var y=J(),D=J();D.className=n,D.setAttribute("data-state","hidden"),D.setAttribute("tabindex","-1");var F=J();F.className=i,F.setAttribute("data-state","hidden"),kn(F,g.props),y.appendChild(D),D.appendChild(F),q(g.props,g.props);function q(W,B){var be=Xt(y),le=be.box,pe=be.content,ye=be.arrow;B.theme?le.setAttribute("data-theme",B.theme):le.removeAttribute("data-theme"),typeof B.animation=="string"?le.setAttribute("data-animation",B.animation):le.removeAttribute("data-animation"),B.inertia?le.setAttribute("data-inertia",""):le.removeAttribute("data-inertia"),le.style.maxWidth=typeof B.maxWidth=="number"?B.maxWidth+"px":B.maxWidth,B.role?le.setAttribute("role",B.role):le.removeAttribute("role"),(W.content!==B.content||W.allowHTML!==B.allowHTML)&&kn(pe,g.props),B.arrow?ye?W.arrow!==B.arrow&&(le.removeChild(ye),le.appendChild(or(B.arrow))):le.appendChild(or(B.arrow)):ye&&le.removeChild(ye)}return{popper:y,onUpdate:q}}ar.$$tippy=!0;var sr=1,yn=[],wn=[];function cn(g,y){var D=ir(g,Object.assign({},Qe,{},ot(ne(y)))),F,q,W,B=!1,be=!1,le=!1,pe=!1,ye,Te,je,Ae=[],Ie=O(Me,D.interactiveDebounce),re,he=sr++,ve=null,ee=A(D.plugins),ie={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:he,reference:g,popper:J(),popperInstance:ve,props:D,state:ie,plugins:ee,clearDelayTimeouts:Lt,setProps:dn,setContent:Zt,show:Nt,hide:$n,hideWithInteractivity:Qt,enable:wt,disable:et,unmount:Sn,destroy:Wn};if(!D.render)return zt(!0,"render() function has not been supplied."),x;var Ge=D.render(x),fe=Ge.popper,Ft=Ge.onUpdate;fe.setAttribute("data-tippy-root",""),fe.id="tippy-"+x.id,x.popper=fe,g._tippy=x,fe._tippy=x;var bt=ee.map(function(C){return C.fn(x)}),Gt=g.hasAttribute("aria-expanded");return Re(),T(),s(),b("onCreate",[x]),D.showOnCreate&&$e(),fe.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),fe.addEventListener("mouseleave",function(C){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(yt().addEventListener("mousemove",Ie),Ie(C))}),x;function Kt(){var C=x.props.touch;return Array.isArray(C)?C:[C,0]}function Jt(){return Kt()[0]==="hold"}function rt(){var C;return!!((C=x.props.render)!=null&&C.$$tippy)}function lt(){return re||g}function yt(){var C=lt().parentNode;return C?v(C):document}function un(){return Xt(fe)}function c(C){return x.state.isMounted&&!x.state.isVisible||P.isTouch||ye&&ye.type==="focus"?0:w(x.props.delay,C?0:1,Qe.delay)}function s(){fe.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",fe.style.zIndex=""+x.props.zIndex}function b(C,K,te){if(te===void 0&&(te=!0),bt.forEach(function(we){we[C]&&we[C].apply(void 0,K)}),te){var ge;(ge=x.props)[C].apply(ge,K)}}function _(){var C=x.props.aria;if(C.content){var K="aria-"+C.content,te=fe.id,ge=I(x.props.triggerTarget||g);ge.forEach(function(we){var Ke=we.getAttribute(K);if(x.state.isVisible)we.setAttribute(K,Ke?Ke+" "+te:te);else{var Je=Ke&&Ke.replace(te,"").trim();Je?we.setAttribute(K,Je):we.removeAttribute(K)}})}}function T(){if(!(Gt||!x.props.aria.expanded)){var C=I(x.props.triggerTarget||g);C.forEach(function(K){x.props.interactive?K.setAttribute("aria-expanded",x.state.isVisible&&K===lt()?"true":"false"):K.removeAttribute("aria-expanded")})}}function L(){yt().removeEventListener("mousemove",Ie),yn=yn.filter(function(C){return C!==Ie})}function U(C){if(!(P.isTouch&&(le||C.type==="mousedown"))&&!(x.props.interactive&&fe.contains(C.target))){if(lt().contains(C.target)){if(P.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else b("onClickOutside",[x,C]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),be=!0,setTimeout(function(){be=!1}),x.state.isMounted||z())}}function H(){le=!0}function G(){le=!1}function oe(){var C=yt();C.addEventListener("mousedown",U,!0),C.addEventListener("touchend",U,f),C.addEventListener("touchstart",G,f),C.addEventListener("touchmove",H,f)}function z(){var C=yt();C.removeEventListener("mousedown",U,!0),C.removeEventListener("touchend",U,f),C.removeEventListener("touchstart",G,f),C.removeEventListener("touchmove",H,f)}function Ce(C,K){De(C,function(){!x.state.isVisible&&fe.parentNode&&fe.parentNode.contains(fe)&&K()})}function Le(C,K){De(C,K)}function De(C,K){var te=un().box;function ge(we){we.target===te&&(j(te,"remove",ge),K())}if(C===0)return K();j(te,"remove",Te),j(te,"add",ge),Te=ge}function xe(C,K,te){te===void 0&&(te=!1);var ge=I(x.props.triggerTarget||g);ge.forEach(function(we){we.addEventListener(C,K,te),Ae.push({node:we,eventType:C,handler:K,options:te})})}function Re(){Jt()&&(xe("touchstart",Be,{passive:!0}),xe("touchend",He,{passive:!0})),R(x.props.trigger).forEach(function(C){if(C!=="manual")switch(xe(C,Be),C){case"mouseenter":xe("mouseleave",He);break;case"focus":xe(kr?"focusout":"blur",ce);break;case"focusin":xe("focusout",ce);break}})}function Se(){Ae.forEach(function(C){var K=C.node,te=C.eventType,ge=C.handler,we=C.options;K.removeEventListener(te,ge,we)}),Ae=[]}function Be(C){var K,te=!1;if(!(!x.state.isEnabled||Pe(C)||be)){var ge=((K=ye)==null?void 0:K.type)==="focus";ye=C,re=C.currentTarget,T(),!x.state.isVisible&&X(C)&&yn.forEach(function(we){return we(C)}),C.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||B)&&x.props.hideOnClick!==!1&&x.state.isVisible?te=!0:$e(C),C.type==="click"&&(B=!te),te&&!ge&&Ue(C)}}function Me(C){var K=C.target,te=lt().contains(K)||fe.contains(K);if(!(C.type==="mousemove"&&te)){var ge=Ye().concat(fe).map(function(we){var Ke,Je=we._tippy,Ct=(Ke=Je.popperInstance)==null?void 0:Ke.state;return Ct?{popperRect:we.getBoundingClientRect(),popperState:Ct,props:D}:null}).filter(Boolean);p(ge,C)&&(L(),Ue(C))}}function He(C){var K=Pe(C)||x.props.trigger.indexOf("click")>=0&&B;if(!K){if(x.props.interactive){x.hideWithInteractivity(C);return}Ue(C)}}function ce(C){x.props.trigger.indexOf("focusin")<0&&C.target!==lt()||x.props.interactive&&C.relatedTarget&&fe.contains(C.relatedTarget)||Ue(C)}function Pe(C){return P.isTouch?Jt()!==C.type.indexOf("touch")>=0:!1}function _e(){Ne();var C=x.props,K=C.popperOptions,te=C.placement,ge=C.offset,we=C.getReferenceClientRect,Ke=C.moveTransition,Je=rt()?Xt(fe).arrow:null,Ct=we?{getBoundingClientRect:we,contextElement:we.contextElement||lt()}:g,Un={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(pn){var en=pn.state;if(rt()){var Gr=un(),tn=Gr.box;["placement","reference-hidden","escaped"].forEach(function(hn){hn==="placement"?tn.setAttribute("data-placement",en.placement):en.attributes.popper["data-popper-"+hn]?tn.setAttribute("data-"+hn,""):tn.removeAttribute("data-"+hn)}),en.attributes.popper={}}}},_t=[{name:"offset",options:{offset:ge}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ke}},Un];rt()&&Je&&_t.push({name:"arrow",options:{element:Je,padding:3}}),_t.push.apply(_t,K?.modifiers||[]),x.popperInstance=t.createPopper(Ct,fe,Object.assign({},K,{placement:te,onFirstUpdate:je,modifiers:_t}))}function Ne(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function Fe(){var C=x.props.appendTo,K,te=lt();x.props.interactive&&C===Qe.appendTo||C==="parent"?K=te.parentNode:K=E(C,[te]),K.contains(fe)||K.appendChild(fe),_e(),mt(x.props.interactive&&C===Qe.appendTo&&te.nextElementSibling!==fe,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",` +`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var ln=function(){return"innerHTML"};function Ye(g,y){g[ln()]=y}function or(g){var y=J();return g===!0?y.className=a:(y.className=d,U(g)?y.appendChild(g):Ye(y,g)),y}function kn(g,y){U(y.content)?(Ye(g,""),g.appendChild(y.content)):typeof y.content!="function"&&(y.allowHTML?Ye(g,y.content):g.textContent=y.content)}function Xe(g){var y=g.firstElementChild,D=Y(y.children);return{box:y,content:D.find(function(F){return F.classList.contains(i)}),arrow:D.find(function(F){return F.classList.contains(a)||F.classList.contains(d)}),backdrop:D.find(function(F){return F.classList.contains(o)})}}function ar(g){var y=J(),D=J();D.className=n,D.setAttribute("data-state","hidden"),D.setAttribute("tabindex","-1");var F=J();F.className=i,F.setAttribute("data-state","hidden"),kn(F,g.props),y.appendChild(D),D.appendChild(F),q(g.props,g.props);function q(W,B){var bt=Xe(y),lt=bt.box,pt=bt.content,yt=bt.arrow;B.theme?lt.setAttribute("data-theme",B.theme):lt.removeAttribute("data-theme"),typeof B.animation=="string"?lt.setAttribute("data-animation",B.animation):lt.removeAttribute("data-animation"),B.inertia?lt.setAttribute("data-inertia",""):lt.removeAttribute("data-inertia"),lt.style.maxWidth=typeof B.maxWidth=="number"?B.maxWidth+"px":B.maxWidth,B.role?lt.setAttribute("role",B.role):lt.removeAttribute("role"),(W.content!==B.content||W.allowHTML!==B.allowHTML)&&kn(pt,g.props),B.arrow?yt?W.arrow!==B.arrow&&(lt.removeChild(yt),lt.appendChild(or(B.arrow))):lt.appendChild(or(B.arrow)):yt&<.removeChild(yt)}return{popper:y,onUpdate:q}}ar.$$tippy=!0;var sr=1,yn=[],wn=[];function cn(g,y){var D=ir(g,Object.assign({},Qt,{},oe(nt(y)))),F,q,W,B=!1,bt=!1,lt=!1,pt=!1,yt,Tt,jt,At=[],It=O(Rt,D.interactiveDebounce),rt,ht=sr++,vt=null,tt=A(D.plugins),it={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:ht,reference:g,popper:J(),popperInstance:vt,props:D,state:it,plugins:tt,clearDelayTimeouts:Le,setProps:dn,setContent:Ze,show:Ne,hide:$n,hideWithInteractivity:Qe,enable:we,disable:te,unmount:Sn,destroy:Wn};if(!D.render)return Ve(!0,"render() function has not been supplied."),x;var Gt=D.render(x),ft=Gt.popper,Fe=Gt.onUpdate;ft.setAttribute("data-tippy-root",""),ft.id="tippy-"+x.id,x.popper=ft,g._tippy=x,ft._tippy=x;var be=tt.map(function(C){return C.fn(x)}),Ge=g.hasAttribute("aria-expanded");return Mt(),T(),s(),b("onCreate",[x]),D.showOnCreate&&$t(),ft.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),ft.addEventListener("mouseleave",function(C){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(ye().addEventListener("mousemove",It),It(C))}),x;function Ke(){var C=x.props.touch;return Array.isArray(C)?C:[C,0]}function Je(){return Ke()[0]==="hold"}function re(){var C;return!!((C=x.props.render)!=null&&C.$$tippy)}function le(){return rt||g}function ye(){var C=le().parentNode;return C?v(C):document}function un(){return Xe(ft)}function c(C){return x.state.isMounted&&!x.state.isVisible||P.isTouch||yt&&yt.type==="focus"?0:w(x.props.delay,C?0:1,Qt.delay)}function s(){ft.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",ft.style.zIndex=""+x.props.zIndex}function b(C,K,et){if(et===void 0&&(et=!0),be.forEach(function(wt){wt[C]&&wt[C].apply(void 0,K)}),et){var gt;(gt=x.props)[C].apply(gt,K)}}function _(){var C=x.props.aria;if(C.content){var K="aria-"+C.content,et=ft.id,gt=I(x.props.triggerTarget||g);gt.forEach(function(wt){var Kt=wt.getAttribute(K);if(x.state.isVisible)wt.setAttribute(K,Kt?Kt+" "+et:et);else{var Jt=Kt&&Kt.replace(et,"").trim();Jt?wt.setAttribute(K,Jt):wt.removeAttribute(K)}})}}function T(){if(!(Ge||!x.props.aria.expanded)){var C=I(x.props.triggerTarget||g);C.forEach(function(K){x.props.interactive?K.setAttribute("aria-expanded",x.state.isVisible&&K===le()?"true":"false"):K.removeAttribute("aria-expanded")})}}function L(){ye().removeEventListener("mousemove",It),yn=yn.filter(function(C){return C!==It})}function z(C){if(!(P.isTouch&&(lt||C.type==="mousedown"))&&!(x.props.interactive&&ft.contains(C.target))){if(le().contains(C.target)){if(P.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else b("onClickOutside",[x,C]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),bt=!0,setTimeout(function(){bt=!1}),x.state.isMounted||V())}}function H(){lt=!0}function G(){lt=!1}function ot(){var C=ye();C.addEventListener("mousedown",z,!0),C.addEventListener("touchend",z,f),C.addEventListener("touchstart",G,f),C.addEventListener("touchmove",H,f)}function V(){var C=ye();C.removeEventListener("mousedown",z,!0),C.removeEventListener("touchend",z,f),C.removeEventListener("touchstart",G,f),C.removeEventListener("touchmove",H,f)}function Ct(C,K){Dt(C,function(){!x.state.isVisible&&ft.parentNode&&ft.parentNode.contains(ft)&&K()})}function Lt(C,K){Dt(C,K)}function Dt(C,K){var et=un().box;function gt(wt){wt.target===et&&(j(et,"remove",gt),K())}if(C===0)return K();j(et,"remove",Tt),j(et,"add",gt),Tt=gt}function xt(C,K,et){et===void 0&&(et=!1);var gt=I(x.props.triggerTarget||g);gt.forEach(function(wt){wt.addEventListener(C,K,et),At.push({node:wt,eventType:C,handler:K,options:et})})}function Mt(){Je()&&(xt("touchstart",Bt,{passive:!0}),xt("touchend",Ht,{passive:!0})),M(x.props.trigger).forEach(function(C){if(C!=="manual")switch(xt(C,Bt),C){case"mouseenter":xt("mouseleave",Ht);break;case"focus":xt(jr?"focusout":"blur",ct);break;case"focusin":xt("focusout",ct);break}})}function St(){At.forEach(function(C){var K=C.node,et=C.eventType,gt=C.handler,wt=C.options;K.removeEventListener(et,gt,wt)}),At=[]}function Bt(C){var K,et=!1;if(!(!x.state.isEnabled||Pt(C)||bt)){var gt=((K=yt)==null?void 0:K.type)==="focus";yt=C,rt=C.currentTarget,T(),!x.state.isVisible&&X(C)&&yn.forEach(function(wt){return wt(C)}),C.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||B)&&x.props.hideOnClick!==!1&&x.state.isVisible?et=!0:$t(C),C.type==="click"&&(B=!et),et&&!gt&&zt(C)}}function Rt(C){var K=C.target,et=le().contains(K)||ft.contains(K);if(!(C.type==="mousemove"&&et)){var gt=Yt().concat(ft).map(function(wt){var Kt,Jt=wt._tippy,Ce=(Kt=Jt.popperInstance)==null?void 0:Kt.state;return Ce?{popperRect:wt.getBoundingClientRect(),popperState:Ce,props:D}:null}).filter(Boolean);p(gt,C)&&(L(),zt(C))}}function Ht(C){var K=Pt(C)||x.props.trigger.indexOf("click")>=0&&B;if(!K){if(x.props.interactive){x.hideWithInteractivity(C);return}zt(C)}}function ct(C){x.props.trigger.indexOf("focusin")<0&&C.target!==le()||x.props.interactive&&C.relatedTarget&&ft.contains(C.relatedTarget)||zt(C)}function Pt(C){return P.isTouch?Je()!==C.type.indexOf("touch")>=0:!1}function _t(){Nt();var C=x.props,K=C.popperOptions,et=C.placement,gt=C.offset,wt=C.getReferenceClientRect,Kt=C.moveTransition,Jt=re()?Xe(ft).arrow:null,Ce=wt?{getBoundingClientRect:wt,contextElement:wt.contextElement||le()}:g,zn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(pn){var tn=pn.state;if(re()){var Kr=un(),en=Kr.box;["placement","reference-hidden","escaped"].forEach(function(hn){hn==="placement"?en.setAttribute("data-placement",tn.placement):tn.attributes.popper["data-popper-"+hn]?en.setAttribute("data-"+hn,""):en.removeAttribute("data-"+hn)}),tn.attributes.popper={}}}},_e=[{name:"offset",options:{offset:gt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Kt}},zn];re()&&Jt&&_e.push({name:"arrow",options:{element:Jt,padding:3}}),_e.push.apply(_e,K?.modifiers||[]),x.popperInstance=e.createPopper(Ce,ft,Object.assign({},K,{placement:et,onFirstUpdate:jt,modifiers:_e}))}function Nt(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function Ft(){var C=x.props.appendTo,K,et=le();x.props.interactive&&C===Qt.appendTo||C==="parent"?K=et.parentNode:K=E(C,[et]),K.contains(ft)||K.appendChild(ft),_t(),me(x.props.interactive&&C===Qt.appendTo&&et.nextElementSibling!==ft,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",` `,"Using a wrapper
or tag around the reference element","solves this by creating a new parentNode context.",` `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",` -`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ye(){return Y(fe.querySelectorAll("[data-tippy-root]"))}function $e(C){x.clearDelayTimeouts(),C&&b("onTrigger",[x,C]),oe();var K=c(!0),te=Kt(),ge=te[0],we=te[1];P.isTouch&&ge==="hold"&&we&&(K=we),K?F=setTimeout(function(){x.show()},K):x.show()}function Ue(C){if(x.clearDelayTimeouts(),b("onUntrigger",[x,C]),!x.state.isVisible){z();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(C.type)>=0&&B)){var K=c(!1);K?q=setTimeout(function(){x.state.isVisible&&x.hide()},K):W=requestAnimationFrame(function(){x.hide()})}}function wt(){x.state.isEnabled=!0}function et(){x.hide(),x.state.isEnabled=!1}function Lt(){clearTimeout(F),clearTimeout(q),cancelAnimationFrame(W)}function dn(C){if(mt(x.state.isDestroyed,Vt("setProps")),!x.state.isDestroyed){b("onBeforeUpdate",[x,C]),Se();var K=x.props,te=ir(g,Object.assign({},x.props,{},C,{ignoreAttributes:!0}));x.props=te,Re(),K.interactiveDebounce!==te.interactiveDebounce&&(L(),Ie=O(Me,te.interactiveDebounce)),K.triggerTarget&&!te.triggerTarget?I(K.triggerTarget).forEach(function(ge){ge.removeAttribute("aria-expanded")}):te.triggerTarget&&g.removeAttribute("aria-expanded"),T(),s(),Ft&&Ft(K,te),x.popperInstance&&(_e(),Ye().forEach(function(ge){requestAnimationFrame(ge._tippy.popperInstance.forceUpdate)})),b("onAfterUpdate",[x,C])}}function Zt(C){x.setProps({content:C})}function Nt(){mt(x.state.isDestroyed,Vt("show"));var C=x.state.isVisible,K=x.state.isDestroyed,te=!x.state.isEnabled,ge=P.isTouch&&!x.props.touch,we=w(x.props.duration,0,Qe.duration);if(!(C||K||te||ge)&&!lt().hasAttribute("disabled")&&(b("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,rt()&&(fe.style.visibility="visible"),s(),oe(),x.state.isMounted||(fe.style.transition="none"),rt()){var Ke=un(),Je=Ke.box,Ct=Ke.content;l([Je,Ct],0)}je=function(){var _t;if(!(!x.state.isVisible||pe)){if(pe=!0,fe.offsetHeight,fe.style.transition=x.props.moveTransition,rt()&&x.props.animation){var An=un(),pn=An.box,en=An.content;l([pn,en],we),h([pn,en],"visible")}_(),T(),$(wn,x),(_t=x.popperInstance)==null||_t.forceUpdate(),x.state.isMounted=!0,b("onMount",[x]),x.props.animation&&rt()&&Le(we,function(){x.state.isShown=!0,b("onShown",[x])})}},Fe()}}function $n(){mt(x.state.isDestroyed,Vt("hide"));var C=!x.state.isVisible,K=x.state.isDestroyed,te=!x.state.isEnabled,ge=w(x.props.duration,1,Qe.duration);if(!(C||K||te)&&(b("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,pe=!1,B=!1,rt()&&(fe.style.visibility="hidden"),L(),z(),s(),rt()){var we=un(),Ke=we.box,Je=we.content;x.props.animation&&(l([Ke,Je],ge),h([Ke,Je],"hidden"))}_(),T(),x.props.animation?rt()&&Ce(ge,x.unmount):x.unmount()}}function Qt(C){mt(x.state.isDestroyed,Vt("hideWithInteractivity")),yt().addEventListener("mousemove",Ie),$(yn,Ie),Ie(C)}function Sn(){mt(x.state.isDestroyed,Vt("unmount")),x.state.isVisible&&x.hide(),x.state.isMounted&&(Ne(),Ye().forEach(function(C){C._tippy.unmount()}),fe.parentNode&&fe.parentNode.removeChild(fe),wn=wn.filter(function(C){return C!==x}),x.state.isMounted=!1,b("onHidden",[x]))}function Wn(){mt(x.state.isDestroyed,Vt("destroy")),!x.state.isDestroyed&&(x.clearDelayTimeouts(),x.unmount(),Se(),delete g._tippy,x.state.isDestroyed=!0,b("onDestroy",[x]))}}function dt(g,y){y===void 0&&(y={});var D=Qe.plugins.concat(y.plugins||[]);At(g),gt(y,D),Ut();var F=Object.assign({},y,{plugins:D}),q=me(g),W=V(F.content),B=q.length>1;mt(W&&B,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",` +`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Yt(){return Y(ft.querySelectorAll("[data-tippy-root]"))}function $t(C){x.clearDelayTimeouts(),C&&b("onTrigger",[x,C]),ot();var K=c(!0),et=Ke(),gt=et[0],wt=et[1];P.isTouch&>==="hold"&&wt&&(K=wt),K?F=setTimeout(function(){x.show()},K):x.show()}function zt(C){if(x.clearDelayTimeouts(),b("onUntrigger",[x,C]),!x.state.isVisible){V();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(C.type)>=0&&B)){var K=c(!1);K?q=setTimeout(function(){x.state.isVisible&&x.hide()},K):W=requestAnimationFrame(function(){x.hide()})}}function we(){x.state.isEnabled=!0}function te(){x.hide(),x.state.isEnabled=!1}function Le(){clearTimeout(F),clearTimeout(q),cancelAnimationFrame(W)}function dn(C){if(me(x.state.isDestroyed,Ue("setProps")),!x.state.isDestroyed){b("onBeforeUpdate",[x,C]),St();var K=x.props,et=ir(g,Object.assign({},x.props,{},C,{ignoreAttributes:!0}));x.props=et,Mt(),K.interactiveDebounce!==et.interactiveDebounce&&(L(),It=O(Rt,et.interactiveDebounce)),K.triggerTarget&&!et.triggerTarget?I(K.triggerTarget).forEach(function(gt){gt.removeAttribute("aria-expanded")}):et.triggerTarget&&g.removeAttribute("aria-expanded"),T(),s(),Fe&&Fe(K,et),x.popperInstance&&(_t(),Yt().forEach(function(gt){requestAnimationFrame(gt._tippy.popperInstance.forceUpdate)})),b("onAfterUpdate",[x,C])}}function Ze(C){x.setProps({content:C})}function Ne(){me(x.state.isDestroyed,Ue("show"));var C=x.state.isVisible,K=x.state.isDestroyed,et=!x.state.isEnabled,gt=P.isTouch&&!x.props.touch,wt=w(x.props.duration,0,Qt.duration);if(!(C||K||et||gt)&&!le().hasAttribute("disabled")&&(b("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,re()&&(ft.style.visibility="visible"),s(),ot(),x.state.isMounted||(ft.style.transition="none"),re()){var Kt=un(),Jt=Kt.box,Ce=Kt.content;l([Jt,Ce],0)}jt=function(){var _e;if(!(!x.state.isVisible||pt)){if(pt=!0,ft.offsetHeight,ft.style.transition=x.props.moveTransition,re()&&x.props.animation){var An=un(),pn=An.box,tn=An.content;l([pn,tn],wt),h([pn,tn],"visible")}_(),T(),$(wn,x),(_e=x.popperInstance)==null||_e.forceUpdate(),x.state.isMounted=!0,b("onMount",[x]),x.props.animation&&re()&&Lt(wt,function(){x.state.isShown=!0,b("onShown",[x])})}},Ft()}}function $n(){me(x.state.isDestroyed,Ue("hide"));var C=!x.state.isVisible,K=x.state.isDestroyed,et=!x.state.isEnabled,gt=w(x.props.duration,1,Qt.duration);if(!(C||K||et)&&(b("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,pt=!1,B=!1,re()&&(ft.style.visibility="hidden"),L(),V(),s(),re()){var wt=un(),Kt=wt.box,Jt=wt.content;x.props.animation&&(l([Kt,Jt],gt),h([Kt,Jt],"hidden"))}_(),T(),x.props.animation?re()&&Ct(gt,x.unmount):x.unmount()}}function Qe(C){me(x.state.isDestroyed,Ue("hideWithInteractivity")),ye().addEventListener("mousemove",It),$(yn,It),It(C)}function Sn(){me(x.state.isDestroyed,Ue("unmount")),x.state.isVisible&&x.hide(),x.state.isMounted&&(Nt(),Yt().forEach(function(C){C._tippy.unmount()}),ft.parentNode&&ft.parentNode.removeChild(ft),wn=wn.filter(function(C){return C!==x}),x.state.isMounted=!1,b("onHidden",[x]))}function Wn(){me(x.state.isDestroyed,Ue("destroy")),!x.state.isDestroyed&&(x.clearDelayTimeouts(),x.unmount(),St(),delete g._tippy,x.state.isDestroyed=!0,b("onDestroy",[x]))}}function de(g,y){y===void 0&&(y={});var D=Qt.plugins.concat(y.plugins||[]);Ae(g),ge(y,D),ze();var F=Object.assign({},y,{plugins:D}),q=mt(g),W=U(F.content),B=q.length>1;me(W&&B,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",` `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",` `,`1) content: element.innerHTML -`,"2) content: () => element.cloneNode(true)"].join(" "));var be=q.reduce(function(le,pe){var ye=pe&&cn(pe,F);return ye&&le.push(ye),le},[]);return V(g)?be[0]:be}dt.defaultProps=Qe,dt.setDefaultProps=Wr,dt.currentInput=P;var lr=function(y){var D=y===void 0?{}:y,F=D.exclude,q=D.duration;wn.forEach(function(W){var B=!1;if(F&&(B=Z(F)?W.reference===F:W.popper===F.popper),!B){var be=W.props.duration;W.setProps({duration:q}),W.hide(),W.state.isDestroyed||W.setProps({duration:be})}})},cr=Object.assign({},t.applyStyles,{effect:function(y){var D=y.state,F={popper:{position:D.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(D.elements.popper.style,F.popper),D.styles=F,D.elements.arrow&&Object.assign(D.elements.arrow.style,F.arrow)}}),fr=function(y,D){var F;D===void 0&&(D={}),zt(!Array.isArray(y),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(y)].join(" "));var q=y,W=[],B,be=D.overrides,le=[],pe=!1;function ye(){W=q.map(function(ee){return ee.reference})}function Te(ee){q.forEach(function(ie){ee?ie.enable():ie.disable()})}function je(ee){return q.map(function(ie){var x=ie.setProps;return ie.setProps=function(Ge){x(Ge),ie.reference===B&&ee.setProps(Ge)},function(){ie.setProps=x}})}function Ae(ee,ie){var x=W.indexOf(ie);if(ie!==B){B=ie;var Ge=(be||[]).concat("content").reduce(function(fe,Ft){return fe[Ft]=q[x].props[Ft],fe},{});ee.setProps(Object.assign({},Ge,{getReferenceClientRect:typeof Ge.getReferenceClientRect=="function"?Ge.getReferenceClientRect:function(){return ie.getBoundingClientRect()}}))}}Te(!1),ye();var Ie={fn:function(){return{onDestroy:function(){Te(!0)},onHidden:function(){B=null},onClickOutside:function(x){x.props.showOnCreate&&!pe&&(pe=!0,B=null)},onShow:function(x){x.props.showOnCreate&&!pe&&(pe=!0,Ae(x,W[0]))},onTrigger:function(x,Ge){Ae(x,Ge.currentTarget)}}}},re=dt(J(),Object.assign({},S(D,["overrides"]),{plugins:[Ie].concat(D.plugins||[]),triggerTarget:W,popperOptions:Object.assign({},D.popperOptions,{modifiers:[].concat(((F=D.popperOptions)==null?void 0:F.modifiers)||[],[cr])})})),he=re.show;re.show=function(ee){if(he(),!B&&ee==null)return Ae(re,W[0]);if(!(B&&ee==null)){if(typeof ee=="number")return W[ee]&&Ae(re,W[ee]);if(q.includes(ee)){var ie=ee.reference;return Ae(re,ie)}if(W.includes(ee))return Ae(re,ee)}},re.showNext=function(){var ee=W[0];if(!B)return re.show(0);var ie=W.indexOf(B);re.show(W[ie+1]||ee)},re.showPrevious=function(){var ee=W[W.length-1];if(!B)return re.show(ee);var ie=W.indexOf(B),x=W[ie-1]||ee;re.show(x)};var ve=re.setProps;return re.setProps=function(ee){be=ee.overrides||be,ve(ee)},re.setInstances=function(ee){Te(!0),le.forEach(function(ie){return ie()}),q=ee,Te(!1),ye(),je(re),re.setProps({triggerTarget:W})},le=je(re),re},ur={mouseover:"mouseenter",focusin:"focus",click:"click"};function qt(g,y){zt(!(y&&y.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var D=[],F=[],q=!1,W=y.target,B=S(y,["target"]),be=Object.assign({},B,{trigger:"manual",touch:!1}),le=Object.assign({},B,{showOnCreate:!0}),pe=dt(g,be),ye=I(pe);function Te(he){if(!(!he.target||q)){var ve=he.target.closest(W);if(ve){var ee=ve.getAttribute("data-tippy-trigger")||y.trigger||Qe.trigger;if(!ve._tippy&&!(he.type==="touchstart"&&typeof le.touch=="boolean")&&!(he.type!=="touchstart"&&ee.indexOf(ur[he.type])<0)){var ie=dt(ve,le);ie&&(F=F.concat(ie))}}}}function je(he,ve,ee,ie){ie===void 0&&(ie=!1),he.addEventListener(ve,ee,ie),D.push({node:he,eventType:ve,handler:ee,options:ie})}function Ae(he){var ve=he.reference;je(ve,"touchstart",Te,f),je(ve,"mouseover",Te),je(ve,"focusin",Te),je(ve,"click",Te)}function Ie(){D.forEach(function(he){var ve=he.node,ee=he.eventType,ie=he.handler,x=he.options;ve.removeEventListener(ee,ie,x)}),D=[]}function re(he){var ve=he.destroy,ee=he.enable,ie=he.disable;he.destroy=function(x){x===void 0&&(x=!0),x&&F.forEach(function(Ge){Ge.destroy()}),F=[],Ie(),ve()},he.enable=function(){ee(),F.forEach(function(x){return x.enable()}),q=!1},he.disable=function(){ie(),F.forEach(function(x){return x.disable()}),q=!0},Ae(he)}return ye.forEach(re),pe}var dr={name:"animateFill",defaultValue:!1,fn:function(y){var D;if(!((D=y.props.render)!=null&&D.$$tippy))return zt(y.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var F=Xt(y.popper),q=F.box,W=F.content,B=y.props.animateFill?Vr():null;return{onCreate:function(){B&&(q.insertBefore(B,q.firstElementChild),q.setAttribute("data-animatefill",""),q.style.overflow="hidden",y.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(B){var le=q.style.transitionDuration,pe=Number(le.replace("ms",""));W.style.transitionDelay=Math.round(pe/10)+"ms",B.style.transitionDuration=le,h([B],"visible")}},onShow:function(){B&&(B.style.transitionDuration="0ms")},onHide:function(){B&&h([B],"hidden")}}}};function Vr(){var g=J();return g.className=o,h([g],"hidden"),g}var xn={clientX:0,clientY:0},fn=[];function En(g){var y=g.clientX,D=g.clientY;xn={clientX:y,clientY:D}}function On(g){g.addEventListener("mousemove",En)}function zr(g){g.removeEventListener("mousemove",En)}var jn={name:"followCursor",defaultValue:!1,fn:function(y){var D=y.reference,F=v(y.props.triggerTarget||D),q=!1,W=!1,B=!0,be=y.props;function le(){return y.props.followCursor==="initial"&&y.state.isVisible}function pe(){F.addEventListener("mousemove",je)}function ye(){F.removeEventListener("mousemove",je)}function Te(){q=!0,y.setProps({getReferenceClientRect:null}),q=!1}function je(re){var he=re.target?D.contains(re.target):!0,ve=y.props.followCursor,ee=re.clientX,ie=re.clientY,x=D.getBoundingClientRect(),Ge=ee-x.left,fe=ie-x.top;(he||!y.props.interactive)&&y.setProps({getReferenceClientRect:function(){var bt=D.getBoundingClientRect(),Gt=ee,Kt=ie;ve==="initial"&&(Gt=bt.left+Ge,Kt=bt.top+fe);var Jt=ve==="horizontal"?bt.top:Kt,rt=ve==="vertical"?bt.right:Gt,lt=ve==="horizontal"?bt.bottom:Kt,yt=ve==="vertical"?bt.left:Gt;return{width:rt-yt,height:lt-Jt,top:Jt,right:rt,bottom:lt,left:yt}}})}function Ae(){y.props.followCursor&&(fn.push({instance:y,doc:F}),On(F))}function Ie(){fn=fn.filter(function(re){return re.instance!==y}),fn.filter(function(re){return re.doc===F}).length===0&&zr(F)}return{onCreate:Ae,onDestroy:Ie,onBeforeUpdate:function(){be=y.props},onAfterUpdate:function(he,ve){var ee=ve.followCursor;q||ee!==void 0&&be.followCursor!==ee&&(Ie(),ee?(Ae(),y.state.isMounted&&!W&&!le()&&pe()):(ye(),Te()))},onMount:function(){y.props.followCursor&&!W&&(B&&(je(xn),B=!1),le()||pe())},onTrigger:function(he,ve){X(ve)&&(xn={clientX:ve.clientX,clientY:ve.clientY}),W=ve.type==="focus"},onHidden:function(){y.props.followCursor&&(Te(),ye(),B=!0)}}}};function Yr(g,y){var D;return{popperOptions:Object.assign({},g.popperOptions,{modifiers:[].concat((((D=g.popperOptions)==null?void 0:D.modifiers)||[]).filter(function(F){var q=F.name;return q!==y.name}),[y])})}}var Bn={name:"inlinePositioning",defaultValue:!1,fn:function(y){var D=y.reference;function F(){return!!y.props.inlinePositioning}var q,W=-1,B=!1,be={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(je){var Ae=je.state;F()&&(q!==Ae.placement&&y.setProps({getReferenceClientRect:function(){return le(Ae.placement)}}),q=Ae.placement)}};function le(Te){return Xr(k(Te),D.getBoundingClientRect(),Y(D.getClientRects()),W)}function pe(Te){B=!0,y.setProps(Te),B=!1}function ye(){B||pe(Yr(y.props,be))}return{onCreate:ye,onAfterUpdate:ye,onTrigger:function(je,Ae){if(X(Ae)){var Ie=Y(y.reference.getClientRects()),re=Ie.find(function(he){return he.left-2<=Ae.clientX&&he.right+2>=Ae.clientX&&he.top-2<=Ae.clientY&&he.bottom+2>=Ae.clientY});W=Ie.indexOf(re)}},onUntrigger:function(){W=-1}}}};function Xr(g,y,D,F){if(D.length<2||g===null)return y;if(D.length===2&&F>=0&&D[0].left>D[1].right)return D[F]||y;switch(g){case"top":case"bottom":{var q=D[0],W=D[D.length-1],B=g==="top",be=q.top,le=W.bottom,pe=B?q.left:W.left,ye=B?q.right:W.right,Te=ye-pe,je=le-be;return{top:be,bottom:le,left:pe,right:ye,width:Te,height:je}}case"left":case"right":{var Ae=Math.min.apply(Math,D.map(function(fe){return fe.left})),Ie=Math.max.apply(Math,D.map(function(fe){return fe.right})),re=D.filter(function(fe){return g==="left"?fe.left===Ae:fe.right===Ie}),he=re[0].top,ve=re[re.length-1].bottom,ee=Ae,ie=Ie,x=ie-ee,Ge=ve-he;return{top:he,bottom:ve,left:ee,right:ie,width:x,height:Ge}}default:return y}}var qr={name:"sticky",defaultValue:!1,fn:function(y){var D=y.reference,F=y.popper;function q(){return y.popperInstance?y.popperInstance.state.elements.reference:D}function W(pe){return y.props.sticky===!0||y.props.sticky===pe}var B=null,be=null;function le(){var pe=W("reference")?q().getBoundingClientRect():null,ye=W("popper")?F.getBoundingClientRect():null;(pe&&Hn(B,pe)||ye&&Hn(be,ye))&&y.popperInstance&&y.popperInstance.update(),B=pe,be=ye,y.state.isMounted&&requestAnimationFrame(le)}return{onMount:function(){y.props.sticky&&le()}}}};function Hn(g,y){return g&&y?g.top!==y.top||g.right!==y.right||g.bottom!==y.bottom||g.left!==y.left:!0}dt.setDefaultProps({render:ar}),e.animateFill=dr,e.createSingleton=fr,e.default=dt,e.delegate=qt,e.followCursor=jn,e.hideAll=lr,e.inlinePositioning=Bn,e.roundArrow=r,e.sticky=qr}),Si=Ho($o()),Ds=Ho($o()),Cs=e=>{let t={plugins:[]},r=i=>e[e.indexOf(i)+1];if(e.includes("animation")&&(t.animation=r("animation")),e.includes("duration")&&(t.duration=parseInt(r("duration"))),e.includes("delay")){let i=r("delay");t.delay=i.includes("-")?i.split("-").map(o=>parseInt(o)):parseInt(i)}if(e.includes("cursor")){t.plugins.push(Ds.followCursor);let i=r("cursor");["x","initial"].includes(i)?t.followCursor=i==="x"?"horizontal":"initial":t.followCursor=!0}e.includes("on")&&(t.trigger=r("on")),e.includes("arrowless")&&(t.arrow=!1),e.includes("html")&&(t.allowHTML=!0),e.includes("interactive")&&(t.interactive=!0),e.includes("border")&&t.interactive&&(t.interactiveBorder=parseInt(r("border"))),e.includes("debounce")&&t.interactive&&(t.interactiveDebounce=parseInt(r("debounce"))),e.includes("max-width")&&(t.maxWidth=parseInt(r("max-width"))),e.includes("theme")&&(t.theme=r("theme")),e.includes("placement")&&(t.placement=r("placement"));let n={};return e.includes("no-flip")&&(n.modifiers||(n.modifiers=[]),n.modifiers.push({name:"flip",enabled:!1})),t.popperOptions=n,t};function Ai(e){e.magic("tooltip",t=>(r,n={})=>{let i=n.timeout;delete n.timeout;let o=(0,Si.default)(t,{content:r,trigger:"manual",...n});o.show(),setTimeout(()=>{o.hide(),setTimeout(()=>o.destroy(),n.duration||300)},i||2e3)}),e.directive("tooltip",(t,{modifiers:r,expression:n},{evaluateLater:i,effect:o,cleanup:a})=>{let d=r.length>0?Cs(r):{};t.__x_tippy||(t.__x_tippy=(0,Si.default)(t,d)),a(()=>{t.__x_tippy&&(t.__x_tippy.destroy(),delete t.__x_tippy)});let f=()=>t.__x_tippy.enable(),u=()=>t.__x_tippy.disable(),w=m=>{m?(f(),t.__x_tippy.setContent(m)):u()};if(r.includes("raw"))w(n);else{let m=i(n);o(()=>{m(E=>{typeof E=="object"?(t.__x_tippy.setProps(E),f()):w(E)})})}})}Ai.defaultProps=e=>(Si.default.setDefaultProps(e),Ai);var _s=Ai,Wo=_s;var Vo=()=>{document.querySelectorAll("[ax-load][x-ignore]").forEach(e=>{e.removeAttribute("x-ignore"),e.setAttribute("x-load",e.getAttribute("ax-load")),e.setAttribute("x-load-src",e.getAttribute("ax-load-src"))}),document.querySelectorAll("[ax-load]").forEach(e=>{e.setAttribute("x-load",e.getAttribute("ax-load")),e.setAttribute("x-load-src",e.getAttribute("ax-load-src"))})};Vo();var Ts=new MutationObserver(Vo);Ts.observe(document.body,{childList:!0,subtree:!0});document.addEventListener("alpine:init",()=>{window.Alpine.plugin(oo),window.Alpine.plugin(ao),window.Alpine.plugin(fo),window.Alpine.plugin(jo),window.Alpine.plugin(Wo)});var Ps=function(e,t,r){function n(w,m){for(let E of w){let O=i(E,m);if(O!==null)return O}}function i(w,m){let E=w.match(/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s);if(E===null||E.length!==3)return null;let O=E[1],S=E[2];if(O.includes(",")){let[R,I]=O.split(",",2);if(I==="*"&&m>=R)return S;if(R==="*"&&m<=I)return S;if(m>=R&&m<=I)return S}return O==m?S:null}function o(w){return w.toString().charAt(0).toUpperCase()+w.toString().slice(1)}function a(w,m){if(m.length===0)return w;let E={};for(let[O,S]of Object.entries(m))E[":"+o(O??"")]=o(S??""),E[":"+O.toUpperCase()]=S.toString().toUpperCase(),E[":"+O]=S;return Object.entries(E).forEach(([O,S])=>{w=w.replaceAll(O,S)}),w}function d(w){return w.map(m=>m.replace(/^[\{\[]([^\[\]\{\}]*)[\}\]]/,""))}let f=e.split("|"),u=n(f,t);return u!=null?a(u.trim(),r):(f=d(f),a(f.length>1&&t>1?f[1]:f[0],r))};window.jsMd5=Uo.md5;window.pluralize=Ps;})(); +`,"2) content: () => element.cloneNode(true)"].join(" "));var bt=q.reduce(function(lt,pt){var yt=pt&&cn(pt,F);return yt&<.push(yt),lt},[]);return U(g)?bt[0]:bt}de.defaultProps=Qt,de.setDefaultProps=zr,de.currentInput=P;var lr=function(y){var D=y===void 0?{}:y,F=D.exclude,q=D.duration;wn.forEach(function(W){var B=!1;if(F&&(B=Z(F)?W.reference===F:W.popper===F.popper),!B){var bt=W.props.duration;W.setProps({duration:q}),W.hide(),W.state.isDestroyed||W.setProps({duration:bt})}})},cr=Object.assign({},e.applyStyles,{effect:function(y){var D=y.state,F={popper:{position:D.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(D.elements.popper.style,F.popper),D.styles=F,D.elements.arrow&&Object.assign(D.elements.arrow.style,F.arrow)}}),fr=function(y,D){var F;D===void 0&&(D={}),Ve(!Array.isArray(y),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(y)].join(" "));var q=y,W=[],B,bt=D.overrides,lt=[],pt=!1;function yt(){W=q.map(function(tt){return tt.reference})}function Tt(tt){q.forEach(function(it){tt?it.enable():it.disable()})}function jt(tt){return q.map(function(it){var x=it.setProps;return it.setProps=function(Gt){x(Gt),it.reference===B&&tt.setProps(Gt)},function(){it.setProps=x}})}function At(tt,it){var x=W.indexOf(it);if(it!==B){B=it;var Gt=(bt||[]).concat("content").reduce(function(ft,Fe){return ft[Fe]=q[x].props[Fe],ft},{});tt.setProps(Object.assign({},Gt,{getReferenceClientRect:typeof Gt.getReferenceClientRect=="function"?Gt.getReferenceClientRect:function(){return it.getBoundingClientRect()}}))}}Tt(!1),yt();var It={fn:function(){return{onDestroy:function(){Tt(!0)},onHidden:function(){B=null},onClickOutside:function(x){x.props.showOnCreate&&!pt&&(pt=!0,B=null)},onShow:function(x){x.props.showOnCreate&&!pt&&(pt=!0,At(x,W[0]))},onTrigger:function(x,Gt){At(x,Gt.currentTarget)}}}},rt=de(J(),Object.assign({},S(D,["overrides"]),{plugins:[It].concat(D.plugins||[]),triggerTarget:W,popperOptions:Object.assign({},D.popperOptions,{modifiers:[].concat(((F=D.popperOptions)==null?void 0:F.modifiers)||[],[cr])})})),ht=rt.show;rt.show=function(tt){if(ht(),!B&&tt==null)return At(rt,W[0]);if(!(B&&tt==null)){if(typeof tt=="number")return W[tt]&&At(rt,W[tt]);if(q.includes(tt)){var it=tt.reference;return At(rt,it)}if(W.includes(tt))return At(rt,tt)}},rt.showNext=function(){var tt=W[0];if(!B)return rt.show(0);var it=W.indexOf(B);rt.show(W[it+1]||tt)},rt.showPrevious=function(){var tt=W[W.length-1];if(!B)return rt.show(tt);var it=W.indexOf(B),x=W[it-1]||tt;rt.show(x)};var vt=rt.setProps;return rt.setProps=function(tt){bt=tt.overrides||bt,vt(tt)},rt.setInstances=function(tt){Tt(!0),lt.forEach(function(it){return it()}),q=tt,Tt(!1),yt(),jt(rt),rt.setProps({triggerTarget:W})},lt=jt(rt),rt},ur={mouseover:"mouseenter",focusin:"focus",click:"click"};function qe(g,y){Ve(!(y&&y.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var D=[],F=[],q=!1,W=y.target,B=S(y,["target"]),bt=Object.assign({},B,{trigger:"manual",touch:!1}),lt=Object.assign({},B,{showOnCreate:!0}),pt=de(g,bt),yt=I(pt);function Tt(ht){if(!(!ht.target||q)){var vt=ht.target.closest(W);if(vt){var tt=vt.getAttribute("data-tippy-trigger")||y.trigger||Qt.trigger;if(!vt._tippy&&!(ht.type==="touchstart"&&typeof lt.touch=="boolean")&&!(ht.type!=="touchstart"&&tt.indexOf(ur[ht.type])<0)){var it=de(vt,lt);it&&(F=F.concat(it))}}}}function jt(ht,vt,tt,it){it===void 0&&(it=!1),ht.addEventListener(vt,tt,it),D.push({node:ht,eventType:vt,handler:tt,options:it})}function At(ht){var vt=ht.reference;jt(vt,"touchstart",Tt,f),jt(vt,"mouseover",Tt),jt(vt,"focusin",Tt),jt(vt,"click",Tt)}function It(){D.forEach(function(ht){var vt=ht.node,tt=ht.eventType,it=ht.handler,x=ht.options;vt.removeEventListener(tt,it,x)}),D=[]}function rt(ht){var vt=ht.destroy,tt=ht.enable,it=ht.disable;ht.destroy=function(x){x===void 0&&(x=!0),x&&F.forEach(function(Gt){Gt.destroy()}),F=[],It(),vt()},ht.enable=function(){tt(),F.forEach(function(x){return x.enable()}),q=!1},ht.disable=function(){it(),F.forEach(function(x){return x.disable()}),q=!0},At(ht)}return yt.forEach(rt),pt}var dr={name:"animateFill",defaultValue:!1,fn:function(y){var D;if(!((D=y.props.render)!=null&&D.$$tippy))return Ve(y.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var F=Xe(y.popper),q=F.box,W=F.content,B=y.props.animateFill?Vr():null;return{onCreate:function(){B&&(q.insertBefore(B,q.firstElementChild),q.setAttribute("data-animatefill",""),q.style.overflow="hidden",y.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(B){var lt=q.style.transitionDuration,pt=Number(lt.replace("ms",""));W.style.transitionDelay=Math.round(pt/10)+"ms",B.style.transitionDuration=lt,h([B],"visible")}},onShow:function(){B&&(B.style.transitionDuration="0ms")},onHide:function(){B&&h([B],"hidden")}}}};function Vr(){var g=J();return g.className=o,h([g],"hidden"),g}var xn={clientX:0,clientY:0},fn=[];function En(g){var y=g.clientX,D=g.clientY;xn={clientX:y,clientY:D}}function On(g){g.addEventListener("mousemove",En)}function Yr(g){g.removeEventListener("mousemove",En)}var jn={name:"followCursor",defaultValue:!1,fn:function(y){var D=y.reference,F=v(y.props.triggerTarget||D),q=!1,W=!1,B=!0,bt=y.props;function lt(){return y.props.followCursor==="initial"&&y.state.isVisible}function pt(){F.addEventListener("mousemove",jt)}function yt(){F.removeEventListener("mousemove",jt)}function Tt(){q=!0,y.setProps({getReferenceClientRect:null}),q=!1}function jt(rt){var ht=rt.target?D.contains(rt.target):!0,vt=y.props.followCursor,tt=rt.clientX,it=rt.clientY,x=D.getBoundingClientRect(),Gt=tt-x.left,ft=it-x.top;(ht||!y.props.interactive)&&y.setProps({getReferenceClientRect:function(){var be=D.getBoundingClientRect(),Ge=tt,Ke=it;vt==="initial"&&(Ge=be.left+Gt,Ke=be.top+ft);var Je=vt==="horizontal"?be.top:Ke,re=vt==="vertical"?be.right:Ge,le=vt==="horizontal"?be.bottom:Ke,ye=vt==="vertical"?be.left:Ge;return{width:re-ye,height:le-Je,top:Je,right:re,bottom:le,left:ye}}})}function At(){y.props.followCursor&&(fn.push({instance:y,doc:F}),On(F))}function It(){fn=fn.filter(function(rt){return rt.instance!==y}),fn.filter(function(rt){return rt.doc===F}).length===0&&Yr(F)}return{onCreate:At,onDestroy:It,onBeforeUpdate:function(){bt=y.props},onAfterUpdate:function(ht,vt){var tt=vt.followCursor;q||tt!==void 0&&bt.followCursor!==tt&&(It(),tt?(At(),y.state.isMounted&&!W&&!lt()&&pt()):(yt(),Tt()))},onMount:function(){y.props.followCursor&&!W&&(B&&(jt(xn),B=!1),lt()||pt())},onTrigger:function(ht,vt){X(vt)&&(xn={clientX:vt.clientX,clientY:vt.clientY}),W=vt.type==="focus"},onHidden:function(){y.props.followCursor&&(Tt(),yt(),B=!0)}}}};function Xr(g,y){var D;return{popperOptions:Object.assign({},g.popperOptions,{modifiers:[].concat((((D=g.popperOptions)==null?void 0:D.modifiers)||[]).filter(function(F){var q=F.name;return q!==y.name}),[y])})}}var Bn={name:"inlinePositioning",defaultValue:!1,fn:function(y){var D=y.reference;function F(){return!!y.props.inlinePositioning}var q,W=-1,B=!1,bt={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(jt){var At=jt.state;F()&&(q!==At.placement&&y.setProps({getReferenceClientRect:function(){return lt(At.placement)}}),q=At.placement)}};function lt(Tt){return qr(k(Tt),D.getBoundingClientRect(),Y(D.getClientRects()),W)}function pt(Tt){B=!0,y.setProps(Tt),B=!1}function yt(){B||pt(Xr(y.props,bt))}return{onCreate:yt,onAfterUpdate:yt,onTrigger:function(jt,At){if(X(At)){var It=Y(y.reference.getClientRects()),rt=It.find(function(ht){return ht.left-2<=At.clientX&&ht.right+2>=At.clientX&&ht.top-2<=At.clientY&&ht.bottom+2>=At.clientY});W=It.indexOf(rt)}},onUntrigger:function(){W=-1}}}};function qr(g,y,D,F){if(D.length<2||g===null)return y;if(D.length===2&&F>=0&&D[0].left>D[1].right)return D[F]||y;switch(g){case"top":case"bottom":{var q=D[0],W=D[D.length-1],B=g==="top",bt=q.top,lt=W.bottom,pt=B?q.left:W.left,yt=B?q.right:W.right,Tt=yt-pt,jt=lt-bt;return{top:bt,bottom:lt,left:pt,right:yt,width:Tt,height:jt}}case"left":case"right":{var At=Math.min.apply(Math,D.map(function(ft){return ft.left})),It=Math.max.apply(Math,D.map(function(ft){return ft.right})),rt=D.filter(function(ft){return g==="left"?ft.left===At:ft.right===It}),ht=rt[0].top,vt=rt[rt.length-1].bottom,tt=At,it=It,x=it-tt,Gt=vt-ht;return{top:ht,bottom:vt,left:tt,right:it,width:x,height:Gt}}default:return y}}var Gr={name:"sticky",defaultValue:!1,fn:function(y){var D=y.reference,F=y.popper;function q(){return y.popperInstance?y.popperInstance.state.elements.reference:D}function W(pt){return y.props.sticky===!0||y.props.sticky===pt}var B=null,bt=null;function lt(){var pt=W("reference")?q().getBoundingClientRect():null,yt=W("popper")?F.getBoundingClientRect():null;(pt&&Hn(B,pt)||yt&&Hn(bt,yt))&&y.popperInstance&&y.popperInstance.update(),B=pt,bt=yt,y.state.isMounted&&requestAnimationFrame(lt)}return{onMount:function(){y.props.sticky&<()}}}};function Hn(g,y){return g&&y?g.top!==y.top||g.right!==y.right||g.bottom!==y.bottom||g.left!==y.left:!0}de.setDefaultProps({render:ar}),t.animateFill=dr,t.createSingleton=fr,t.default=de,t.delegate=qe,t.followCursor=jn,t.hideAll=lr,t.inlinePositioning=Bn,t.roundArrow=r,t.sticky=Gr}),Ai=$o(Wo()),Ds=$o(Wo()),Cs=t=>{let e={plugins:[]},r=i=>t[t.indexOf(i)+1];if(t.includes("animation")&&(e.animation=r("animation")),t.includes("duration")&&(e.duration=parseInt(r("duration"))),t.includes("delay")){let i=r("delay");e.delay=i.includes("-")?i.split("-").map(o=>parseInt(o)):parseInt(i)}if(t.includes("cursor")){e.plugins.push(Ds.followCursor);let i=r("cursor");["x","initial"].includes(i)?e.followCursor=i==="x"?"horizontal":"initial":e.followCursor=!0}t.includes("on")&&(e.trigger=r("on")),t.includes("arrowless")&&(e.arrow=!1),t.includes("html")&&(e.allowHTML=!0),t.includes("interactive")&&(e.interactive=!0),t.includes("border")&&e.interactive&&(e.interactiveBorder=parseInt(r("border"))),t.includes("debounce")&&e.interactive&&(e.interactiveDebounce=parseInt(r("debounce"))),t.includes("max-width")&&(e.maxWidth=parseInt(r("max-width"))),t.includes("theme")&&(e.theme=r("theme")),t.includes("placement")&&(e.placement=r("placement"));let n={};return t.includes("no-flip")&&(n.modifiers||(n.modifiers=[]),n.modifiers.push({name:"flip",enabled:!1})),e.popperOptions=n,e};function Di(t){t.magic("tooltip",e=>(r,n={})=>{let i=n.timeout;delete n.timeout;let o=(0,Ai.default)(e,{content:r,trigger:"manual",...n});o.show(),setTimeout(()=>{o.hide(),setTimeout(()=>o.destroy(),n.duration||300)},i||2e3)}),t.directive("tooltip",(e,{modifiers:r,expression:n},{evaluateLater:i,effect:o,cleanup:a})=>{let d=r.length>0?Cs(r):{};e.__x_tippy||(e.__x_tippy=(0,Ai.default)(e,d)),a(()=>{e.__x_tippy&&(e.__x_tippy.destroy(),delete e.__x_tippy)});let f=()=>e.__x_tippy.enable(),u=()=>e.__x_tippy.disable(),w=m=>{m?(f(),e.__x_tippy.setContent(m)):u()};if(r.includes("raw"))w(n);else{let m=i(n);o(()=>{m(E=>{typeof E=="object"?(e.__x_tippy.setProps(E),f()):w(E)})})}})}Di.defaultProps=t=>(Ai.default.setDefaultProps(t),Di);var _s=Di,zo=_s;var Lr=()=>{document.querySelectorAll("[ax-load][x-ignore]").forEach(t=>{t.removeAttribute("x-ignore"),t.setAttribute("x-load",t.getAttribute("ax-load")),t.setAttribute("x-load-src",t.getAttribute("ax-load-src"))}),document.querySelectorAll("[ax-load]").forEach(t=>{t.setAttribute("x-load",t.getAttribute("ax-load")),t.setAttribute("x-load-src",t.getAttribute("ax-load-src"))})};document.body?(Lr(),new MutationObserver(Lr).observe(document.body,{childList:!0,subtree:!0})):document.addEventListener("DOMContentLoaded",()=>{Lr(),new MutationObserver(Lr).observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("alpine:init",()=>{window.Alpine.plugin(ao),window.Alpine.plugin(so),window.Alpine.plugin(uo),window.Alpine.plugin(Bo),window.Alpine.plugin(zo)});var Ts=function(t,e,r){function n(w,m){for(let E of w){let O=i(E,m);if(O!==null)return O}}function i(w,m){let E=w.match(/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s);if(E===null||E.length!==3)return null;let O=E[1],S=E[2];if(O.includes(",")){let[M,I]=O.split(",",2);if(I==="*"&&m>=M)return S;if(M==="*"&&m<=I)return S;if(m>=M&&m<=I)return S}return O==m?S:null}function o(w){return w.toString().charAt(0).toUpperCase()+w.toString().slice(1)}function a(w,m){if(m.length===0)return w;let E={};for(let[O,S]of Object.entries(m))E[":"+o(O??"")]=o(S??""),E[":"+O.toUpperCase()]=S.toString().toUpperCase(),E[":"+O]=S;return Object.entries(E).forEach(([O,S])=>{w=w.replaceAll(O,S)}),w}function d(w){return w.map(m=>m.replace(/^[\{\[]([^\[\]\{\}]*)[\}\]]/,""))}let f=t.split("|"),u=n(f,e);return u!=null?a(u.trim(),r):(f=d(f),a(f.length>1&&e>1?f[1]:f[0],r))};window.jsMd5=Uo.md5;window.pluralize=Ts;})(); /*! Bundled license information: js-md5/src/md5.js: diff --git a/public/js/filament/widgets/components/chart.js b/public/js/filament/widgets/components/chart.js index 81e60c8b0..4d062d1fd 100644 --- a/public/js/filament/widgets/components/chart.js +++ b/public/js/filament/widgets/components/chart.js @@ -1,6 +1,6 @@ -function At(){}var Do=function(){let s=0;return function(){return s++}}();function N(s){return s===null||typeof s>"u"}function $(s){if(Array.isArray&&Array.isArray(s))return!0;let t=Object.prototype.toString.call(s);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function A(s){return s!==null&&Object.prototype.toString.call(s)==="[object Object]"}var K=s=>(typeof s=="number"||s instanceof Number)&&isFinite(+s);function mt(s,t){return K(s)?s:t}function C(s,t){return typeof s>"u"?t:s}var Eo=(s,t)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100:s/t,En=(s,t)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100*t:+s;function j(s,t,e){if(s&&typeof s.call=="function")return s.apply(e,t)}function H(s,t,e,i){let n,r,o;if($(s))if(r=s.length,i)for(n=r-1;n>=0;n--)t.call(e,s[n],n);else for(n=0;ns,x:s=>s.x,y:s=>s.y};function Bt(s,t){return(mo[t]||(mo[t]=Cc(t)))(s)}function Cc(s){let t=Ic(s);return e=>{for(let i of t){if(i==="")break;e=e&&e[i]}return e}}function Ic(s){let t=s.split("."),e=[],i="";for(let n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Oi(s){return s.charAt(0).toUpperCase()+s.slice(1)}var ft=s=>typeof s<"u",Ht=s=>typeof s=="function",Cn=(s,t)=>{if(s.size!==t.size)return!1;for(let e of s)if(!t.has(e))return!1;return!0};function Io(s){return s.type==="mouseup"||s.type==="click"||s.type==="contextmenu"}var Y=Math.PI,B=2*Y,Fc=B+Y,Mi=Number.POSITIVE_INFINITY,Ac=Y/180,Z=Y/2,ys=Y/4,go=Y*2/3,gt=Math.log10,vt=Math.sign;function In(s){let t=Math.round(s);s=Re(s,t,s/1e3)?t:s;let e=Math.pow(10,Math.floor(gt(s))),i=s/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Fo(s){let t=[],e=Math.sqrt(s),i;for(i=1;in-r).pop(),t}function pe(s){return!isNaN(parseFloat(s))&&isFinite(s)}function Re(s,t,e){return Math.abs(s-t)=s}function Fn(s,t,e){let i,n,r;for(i=0,n=s.length;il&&c=Math.min(t,e)-i&&s<=Math.max(t,e)+i}function Ei(s,t,e){e=e||(o=>s[o]1;)r=n+i>>1,e(r)?n=r:i=r;return{lo:n,hi:i}}var Ft=(s,t,e,i)=>Ei(s,e,i?n=>s[n][t]<=e:n=>s[n][t]Ei(s,e,i=>s[i][t]>=e);function Ro(s,t,e){let i=0,n=s.length;for(;ii&&s[n-1]>e;)n--;return i>0||n{let i="_onData"+Oi(e),n=s[e];Object.defineProperty(s,e,{configurable:!0,enumerable:!1,value(...r){let o=n.apply(this,r);return s._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...r)}),o}})})}function Pn(s,t){let e=s._chartjs;if(!e)return;let i=e.listeners,n=i.indexOf(t);n!==-1&&i.splice(n,1),!(i.length>0)&&(No.forEach(r=>{delete s[r]}),delete s._chartjs)}function Rn(s){let t=new Set,e,i;for(e=0,i=s.length;e"u"?function(s){return s()}:window.requestAnimationFrame}();function Wn(s,t,e){let i=e||(o=>Array.prototype.slice.call(o)),n=!1,r=[];return function(...o){r=i(o),n||(n=!0,Nn.call(window,()=>{n=!1,s.apply(t,r)}))}}function zo(s,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(s,t,i)):s.apply(this,i),t}}var Ci=s=>s==="start"?"left":s==="end"?"right":"center",ot=(s,t,e)=>s==="start"?t:s==="end"?e:(t+e)/2,Vo=(s,t,e,i)=>s===(i?"left":"right")?e:s==="center"?(t+e)/2:t;function zn(s,t,e){let i=t.length,n=0,r=i;if(s._sorted){let{iScale:o,_parsed:a}=s,l=o.axis,{min:c,max:h,minDefined:u,maxDefined:d}=o.getUserBounds();u&&(n=it(Math.min(Ft(a,o.axis,c).lo,e?i:Ft(t,l,o.getPixelForValue(c)).lo),0,i-1)),d?r=it(Math.max(Ft(a,o.axis,h,!0).hi+1,e?0:Ft(t,l,o.getPixelForValue(h),!0).hi+1),n,i)-n:r=i-n}return{start:n,count:r}}function Vn(s){let{xScale:t,yScale:e,_scaleRanges:i}=s,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return s._scaleRanges=n,!0;let r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,n),r}var bi=s=>s===0||s===1,po=(s,t,e)=>-(Math.pow(2,10*(s-=1))*Math.sin((s-t)*B/e)),yo=(s,t,e)=>Math.pow(2,-10*s)*Math.sin((s-t)*B/e)+1,Ce={linear:s=>s,easeInQuad:s=>s*s,easeOutQuad:s=>-s*(s-2),easeInOutQuad:s=>(s/=.5)<1?.5*s*s:-.5*(--s*(s-2)-1),easeInCubic:s=>s*s*s,easeOutCubic:s=>(s-=1)*s*s+1,easeInOutCubic:s=>(s/=.5)<1?.5*s*s*s:.5*((s-=2)*s*s+2),easeInQuart:s=>s*s*s*s,easeOutQuart:s=>-((s-=1)*s*s*s-1),easeInOutQuart:s=>(s/=.5)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2),easeInQuint:s=>s*s*s*s*s,easeOutQuint:s=>(s-=1)*s*s*s*s+1,easeInOutQuint:s=>(s/=.5)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2),easeInSine:s=>-Math.cos(s*Z)+1,easeOutSine:s=>Math.sin(s*Z),easeInOutSine:s=>-.5*(Math.cos(Y*s)-1),easeInExpo:s=>s===0?0:Math.pow(2,10*(s-1)),easeOutExpo:s=>s===1?1:-Math.pow(2,-10*s)+1,easeInOutExpo:s=>bi(s)?s:s<.5?.5*Math.pow(2,10*(s*2-1)):.5*(-Math.pow(2,-10*(s*2-1))+2),easeInCirc:s=>s>=1?s:-(Math.sqrt(1-s*s)-1),easeOutCirc:s=>Math.sqrt(1-(s-=1)*s),easeInOutCirc:s=>(s/=.5)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1),easeInElastic:s=>bi(s)?s:po(s,.075,.3),easeOutElastic:s=>bi(s)?s:yo(s,.075,.3),easeInOutElastic(s){return bi(s)?s:s<.5?.5*po(s*2,.1125,.45):.5+.5*yo(s*2-1,.1125,.45)},easeInBack(s){return s*s*((1.70158+1)*s-1.70158)},easeOutBack(s){return(s-=1)*s*((1.70158+1)*s+1.70158)+1},easeInOutBack(s){let t=1.70158;return(s/=.5)<1?.5*(s*s*(((t*=1.525)+1)*s-t)):.5*((s-=2)*s*(((t*=1.525)+1)*s+t)+2)},easeInBounce:s=>1-Ce.easeOutBounce(1-s),easeOutBounce(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},easeInOutBounce:s=>s<.5?Ce.easeInBounce(s*2)*.5:Ce.easeOutBounce(s*2-1)*.5+.5};function Ss(s){return s+.5|0}var Kt=(s,t,e)=>Math.max(Math.min(s,e),t);function bs(s){return Kt(Ss(s*2.55),0,255)}function Jt(s){return Kt(Ss(s*255),0,255)}function Vt(s){return Kt(Ss(s/2.55)/100,0,1)}function bo(s){return Kt(Ss(s*100),0,100)}var _t={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},On=[..."0123456789ABCDEF"],Pc=s=>On[s&15],Rc=s=>On[(s&240)>>4]+On[s&15],xi=s=>(s&240)>>4===(s&15),Nc=s=>xi(s.r)&&xi(s.g)&&xi(s.b)&&xi(s.a);function Wc(s){var t=s.length,e;return s[0]==="#"&&(t===4||t===5?e={r:255&_t[s[1]]*17,g:255&_t[s[2]]*17,b:255&_t[s[3]]*17,a:t===5?_t[s[4]]*17:255}:(t===7||t===9)&&(e={r:_t[s[1]]<<4|_t[s[2]],g:_t[s[3]]<<4|_t[s[4]],b:_t[s[5]]<<4|_t[s[6]],a:t===9?_t[s[7]]<<4|_t[s[8]]:255})),e}var zc=(s,t)=>s<255?t(s):"";function Vc(s){var t=Nc(s)?Pc:Rc;return s?"#"+t(s.r)+t(s.g)+t(s.b)+zc(s.a,t):void 0}var Hc=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ho(s,t,e){let i=t*Math.min(e,1-e),n=(r,o=(r+s/30)%12)=>e-i*Math.max(Math.min(o-3,9-o,1),-1);return[n(0),n(8),n(4)]}function Bc(s,t,e){let i=(n,r=(n+s/60)%6)=>e-e*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function $c(s,t,e){let i=Ho(s,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)i[n]*=1-t-e,i[n]+=t;return i}function jc(s,t,e,i,n){return s===n?(t-e)/i+(t.5?h/(2-r-o):h/(r+o),l=jc(e,i,n,h,r),l=l*60+.5),[l|0,c||0,a]}function Bn(s,t,e,i){return(Array.isArray(t)?s(t[0],t[1],t[2]):s(t,e,i)).map(Jt)}function $n(s,t,e){return Bn(Ho,s,t,e)}function Uc(s,t,e){return Bn($c,s,t,e)}function Yc(s,t,e){return Bn(Bc,s,t,e)}function Bo(s){return(s%360+360)%360}function Zc(s){let t=Hc.exec(s),e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?bs(+t[5]):Jt(+t[5]));let n=Bo(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=Uc(n,r,o):t[1]==="hsv"?i=Yc(n,r,o):i=$n(n,r,o),{r:i[0],g:i[1],b:i[2],a:e}}function qc(s,t){var e=Hn(s);e[0]=Bo(e[0]+t),e=$n(e),s.r=e[0],s.g=e[1],s.b=e[2]}function Gc(s){if(!s)return;let t=Hn(s),e=t[0],i=bo(t[1]),n=bo(t[2]);return s.a<255?`hsla(${e}, ${i}%, ${n}%, ${Vt(s.a)})`:`hsl(${e}, ${i}%, ${n}%)`}var xo={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},_o={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Xc(){let s={},t=Object.keys(_o),e=Object.keys(xo),i,n,r,o,a;for(i=0;i>16&255,r>>8&255,r&255]}return s}var _i;function Kc(s){_i||(_i=Xc(),_i.transparent=[0,0,0,0]);let t=_i[s.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var Jc=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Qc(s){let t=Jc.exec(s),e=255,i,n,r;if(t){if(t[7]!==i){let o=+t[7];e=t[8]?bs(o):Kt(o*255,0,255)}return i=+t[1],n=+t[3],r=+t[5],i=255&(t[2]?bs(i):Kt(i,0,255)),n=255&(t[4]?bs(n):Kt(n,0,255)),r=255&(t[6]?bs(r):Kt(r,0,255)),{r:i,g:n,b:r,a:e}}}function th(s){return s&&(s.a<255?`rgba(${s.r}, ${s.g}, ${s.b}, ${Vt(s.a)})`:`rgb(${s.r}, ${s.g}, ${s.b})`)}var kn=s=>s<=.0031308?s*12.92:Math.pow(s,1/2.4)*1.055-.055,Ee=s=>s<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4);function eh(s,t,e){let i=Ee(Vt(s.r)),n=Ee(Vt(s.g)),r=Ee(Vt(s.b));return{r:Jt(kn(i+e*(Ee(Vt(t.r))-i))),g:Jt(kn(n+e*(Ee(Vt(t.g))-n))),b:Jt(kn(r+e*(Ee(Vt(t.b))-r))),a:s.a+e*(t.a-s.a)}}function wi(s,t,e){if(s){let i=Hn(s);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=$n(i),s.r=i[0],s.g=i[1],s.b=i[2]}}function $o(s,t){return s&&Object.assign(t||{},s)}function wo(s){var t={r:0,g:0,b:0,a:255};return Array.isArray(s)?s.length>=3&&(t={r:s[0],g:s[1],b:s[2],a:255},s.length>3&&(t.a=Jt(s[3]))):(t=$o(s,{r:0,g:0,b:0,a:1}),t.a=Jt(t.a)),t}function sh(s){return s.charAt(0)==="r"?Qc(s):Zc(s)}var Fe=class{constructor(t){if(t instanceof Fe)return t;let e=typeof t,i;e==="object"?i=wo(t):e==="string"&&(i=Wc(t)||Kc(t)||sh(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=$o(this._rgb);return t&&(t.a=Vt(t.a)),t}set rgb(t){this._rgb=wo(t)}rgbString(){return this._valid?th(this._rgb):void 0}hexString(){return this._valid?Vc(this._rgb):void 0}hslString(){return this._valid?Gc(this._rgb):void 0}mix(t,e){if(t){let i=this.rgb,n=t.rgb,r,o=e===r?.5:e,a=2*o-1,l=i.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,i.r=255&c*i.r+r*n.r+.5,i.g=255&c*i.g+r*n.g+.5,i.b=255&c*i.b+r*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=eh(this._rgb,t._rgb,e)),this}clone(){return new Fe(this.rgb)}alpha(t){return this._rgb.a=Jt(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=Ss(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return wi(this._rgb,2,t),this}darken(t){return wi(this._rgb,2,-t),this}saturate(t){return wi(this._rgb,1,t),this}desaturate(t){return wi(this._rgb,1,-t),this}rotate(t){return qc(this._rgb,t),this}};function jo(s){return new Fe(s)}function Uo(s){if(s&&typeof s=="object"){let t=s.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function jn(s){return Uo(s)?s:jo(s)}function Mn(s){return Uo(s)?s:jo(s).saturate(.5).darken(.1).hexString()}var Qt=Object.create(null),Ii=Object.create(null);function xs(s,t){if(!t)return s;let e=t.split(".");for(let i=0,n=e.length;ie.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,i)=>Mn(i.backgroundColor),this.hoverBorderColor=(e,i)=>Mn(i.borderColor),this.hoverColor=(e,i)=>Mn(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return vn(this,t,e)}get(t){return xs(this,t)}describe(t,e){return vn(Ii,t,e)}override(t,e){return vn(Qt,t,e)}route(t,e,i,n){let r=xs(this,t),o=xs(this,i),a="_"+e;Object.defineProperties(r,{[a]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[a],c=o[n];return A(l)?Object.assign({},c,l):C(l,c)},set(l){this[a]=l}}})}},L=new Dn({_scriptable:s=>!s.startsWith("on"),_indexable:s=>s!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ih(s){return!s||N(s.size)||N(s.family)?null:(s.style?s.style+" ":"")+(s.weight?s.weight+" ":"")+s.size+"px "+s.family}function _s(s,t,e,i,n){let r=t[n];return r||(r=t[n]=s.measureText(n).width,e.push(n)),r>i&&(i=r),i}function Yo(s,t,e,i){i=i||{};let n=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(n=i.data={},r=i.garbageCollect=[],i.font=t),s.save(),s.font=t;let o=0,a=e.length,l,c,h,u,d;for(l=0;le.length){for(l=0;l0&&s.stroke()}}function Ae(s,t,e){return e=e||.5,!t||s&&s.x>t.left-e&&s.xt.top-e&&s.y0&&r.strokeColor!=="",l,c;for(s.save(),s.font=n.string,nh(s,r),l=0;l+s||0;function Ai(s,t){let e={},i=A(t),n=i?Object.keys(t):t,r=A(s)?i?o=>C(s[o],s[t[o]]):o=>s[o]:()=>s;for(let o of n)e[o]=ch(r(o));return e}function Zn(s){return Ai(s,{top:"y",right:"x",bottom:"y",left:"x"})}function se(s){return Ai(s,["topLeft","topRight","bottomLeft","bottomRight"])}function at(s){let t=Zn(s);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function st(s,t){s=s||{},t=t||L.font;let e=C(s.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=C(s.style,t.style);i&&!(""+i).match(ah)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");let n={family:C(s.family,t.family),lineHeight:lh(C(s.lineHeight,t.lineHeight),e),size:e,style:i,weight:C(s.weight,t.weight),string:""};return n.string=ih(n),n}function ze(s,t,e,i){let n=!0,r,o,a;for(r=0,o=s.length;re&&a===0?0:a+l;return{min:o(i,-Math.abs(r)),max:o(n,r)}}function $t(s,t){return Object.assign(Object.create(s),t)}function Li(s,t=[""],e=s,i,n=()=>s[0]){ft(i)||(i=Jo("_fallback",s));let r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:s,_rootScopes:e,_fallback:i,_getTarget:n,override:o=>Li([o,...s],t,e,i)};return new Proxy(r,{deleteProperty(o,a){return delete o[a],delete o._keys,delete s[0][a],!0},get(o,a){return Xo(o,a,()=>yh(a,t,s,o))},getOwnPropertyDescriptor(o,a){return Reflect.getOwnPropertyDescriptor(o._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(s[0])},has(o,a){return ko(o).includes(a)},ownKeys(o){return ko(o)},set(o,a,l){let c=o._storage||(o._storage=n());return o[a]=c[a]=l,delete o._keys,!0}})}function ge(s,t,e,i){let n={_cacheable:!1,_proxy:s,_context:t,_subProxy:e,_stack:new Set,_descriptors:qn(s,i),setContext:r=>ge(s,r,e,i),override:r=>ge(s.override(r),t,e,i)};return new Proxy(n,{deleteProperty(r,o){return delete r[o],delete s[o],!0},get(r,o,a){return Xo(r,o,()=>uh(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(s,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(s,o)},getPrototypeOf(){return Reflect.getPrototypeOf(s)},has(r,o){return Reflect.has(s,o)},ownKeys(){return Reflect.ownKeys(s)},set(r,o,a){return s[o]=a,delete r[o],!0}})}function qn(s,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=s;return{allKeys:n,scriptable:e,indexable:i,isScriptable:Ht(e)?e:()=>e,isIndexable:Ht(i)?i:()=>i}}var hh=(s,t)=>s?s+Oi(t):t,Gn=(s,t)=>A(t)&&s!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Xo(s,t,e){if(Object.prototype.hasOwnProperty.call(s,t))return s[t];let i=e();return s[t]=i,i}function uh(s,t,e){let{_proxy:i,_context:n,_subProxy:r,_descriptors:o}=s,a=i[t];return Ht(a)&&o.isScriptable(t)&&(a=dh(t,a,s,e)),$(a)&&a.length&&(a=fh(t,a,s,o.isIndexable)),Gn(t,a)&&(a=ge(a,n,r&&r[t],o)),a}function dh(s,t,e,i){let{_proxy:n,_context:r,_subProxy:o,_stack:a}=e;if(a.has(s))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+s);return a.add(s),t=t(r,o||i),a.delete(s),Gn(s,t)&&(t=Xn(n._scopes,n,s,t)),t}function fh(s,t,e,i){let{_proxy:n,_context:r,_subProxy:o,_descriptors:a}=e;if(ft(r.index)&&i(s))t=t[r.index%t.length];else if(A(t[0])){let l=t,c=n._scopes.filter(h=>h!==l);t=[];for(let h of l){let u=Xn(c,n,s,h);t.push(ge(u,r,o&&o[s],a))}}return t}function Ko(s,t,e){return Ht(s)?s(t,e):s}var mh=(s,t)=>s===!0?t:typeof s=="string"?Bt(t,s):void 0;function gh(s,t,e,i,n){for(let r of t){let o=mh(e,r);if(o){s.add(o);let a=Ko(o._fallback,e,n);if(ft(a)&&a!==e&&a!==i)return a}else if(o===!1&&ft(i)&&e!==i)return null}return!1}function Xn(s,t,e,i){let n=t._rootScopes,r=Ko(t._fallback,e,i),o=[...s,...n],a=new Set;a.add(i);let l=So(a,o,e,r||e,i);return l===null||ft(r)&&r!==e&&(l=So(a,o,r,l,i),l===null)?!1:Li(Array.from(a),[""],n,r,()=>ph(t,e,i))}function So(s,t,e,i,n){for(;e;)e=gh(s,t,e,i,n);return e}function ph(s,t,e){let i=s._getTarget();t in i||(i[t]={});let n=i[t];return $(n)&&A(e)?e:n}function yh(s,t,e,i){let n;for(let r of t)if(n=Jo(hh(r,s),e),ft(n))return Gn(s,n)?Xn(e,i,s,n):n}function Jo(s,t){for(let e of t){if(!e)continue;let i=e[s];if(ft(i))return i}}function ko(s){let t=s._keys;return t||(t=s._keys=bh(s._scopes)),t}function bh(s){let t=new Set;for(let e of s)for(let i of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(i);return Array.from(t)}function Kn(s,t,e,i){let{iScale:n}=s,{key:r="r"}=this._parsing,o=new Array(i),a,l,c,h;for(a=0,l=i;ats==="x"?"y":"x";function _h(s,t,e,i){let n=s.skip?t:s,r=t,o=e.skip?t:e,a=vi(r,n),l=vi(o,r),c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let u=i*c,d=i*h;return{previous:{x:r.x-u*(o.x-n.x),y:r.y-u*(o.y-n.y)},next:{x:r.x+d*(o.x-n.x),y:r.y+d*(o.y-n.y)}}}function wh(s,t,e){let i=s.length,n,r,o,a,l,c=Le(s,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")kh(s,n);else{let c=i?s[s.length-1]:s[0];for(r=0,o=s.length;rwindow.getComputedStyle(s,null);function vh(s,t){return Ri(s).getPropertyValue(t)}var Th=["top","right","bottom","left"];function me(s,t,e){let i={};e=e?"-"+e:"";for(let n=0;n<4;n++){let r=Th[n];i[r]=parseFloat(s[t+"-"+r+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var Oh=(s,t,e)=>(s>0||t>0)&&(!e||!e.shadowRoot);function Dh(s,t){let e=s.touches,i=e&&e.length?e[0]:s,{offsetX:n,offsetY:r}=i,o=!1,a,l;if(Oh(n,r,s.target))a=n,l=r;else{let c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ie(s,t){if("native"in s)return s;let{canvas:e,currentDevicePixelRatio:i}=t,n=Ri(e),r=n.boxSizing==="border-box",o=me(n,"padding"),a=me(n,"border","width"),{x:l,y:c,box:h}=Dh(s,e),u=o.left+(h&&a.left),d=o.top+(h&&a.top),{width:f,height:m}=t;return r&&(f-=o.width+a.width,m-=o.height+a.height),{x:Math.round((l-u)/f*e.width/i),y:Math.round((c-d)/m*e.height/i)}}function Eh(s,t,e){let i,n;if(t===void 0||e===void 0){let r=Pi(s);if(!r)t=s.clientWidth,e=s.clientHeight;else{let o=r.getBoundingClientRect(),a=Ri(r),l=me(a,"border","width"),c=me(a,"padding");t=o.width-c.width-l.width,e=o.height-c.height-l.height,i=Ti(a.maxWidth,r,"clientWidth"),n=Ti(a.maxHeight,r,"clientHeight")}}return{width:t,height:e,maxWidth:i||Mi,maxHeight:n||Mi}}var Tn=s=>Math.round(s*10)/10;function ea(s,t,e,i){let n=Ri(s),r=me(n,"margin"),o=Ti(n.maxWidth,s,"clientWidth")||Mi,a=Ti(n.maxHeight,s,"clientHeight")||Mi,l=Eh(s,t,e),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let u=me(n,"border","width"),d=me(n,"padding");c-=d.width+u.width,h-=d.height+u.height}return c=Math.max(0,c-r.width),h=Math.max(0,i?Math.floor(c/i):h-r.height),c=Tn(Math.min(c,o,l.maxWidth)),h=Tn(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Tn(c/2)),{width:c,height:h}}function Qn(s,t,e){let i=t||1,n=Math.floor(s.height*i),r=Math.floor(s.width*i);s.height=n/i,s.width=r/i;let o=s.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${s.height}px`,o.style.width=`${s.width}px`),s.currentDevicePixelRatio!==i||o.height!==n||o.width!==r?(s.currentDevicePixelRatio=i,o.height=n,o.width=r,s.ctx.setTransform(i,0,0,i,0,0),!0):!1}var sa=function(){let s=!1;try{let t={get passive(){return s=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return s}();function tr(s,t){let e=vh(s,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Xt(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:s.y+e*(t.y-s.y)}}function ia(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:i==="middle"?e<.5?s.y:t.y:i==="after"?e<1?s.y:t.y:e>0?t.y:s.y}}function na(s,t,e,i){let n={x:s.cp2x,y:s.cp2y},r={x:t.cp1x,y:t.cp1y},o=Xt(s,n,e),a=Xt(n,r,e),l=Xt(r,t,e),c=Xt(o,a,e),h=Xt(a,l,e);return Xt(c,h,e)}var Mo=new Map;function Ch(s,t){t=t||{};let e=s+JSON.stringify(t),i=Mo.get(e);return i||(i=new Intl.NumberFormat(s,t),Mo.set(e,i)),i}function Ve(s,t,e){return Ch(t,e).format(s)}var Ih=function(s,t){return{x(e){return s+s+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Fh=function(){return{x(s){return s},setWidth(s){},textAlign(s){return s},xPlus(s,t){return s+t},leftForLtr(s,t){return s}}};function ye(s,t,e){return s?Ih(t,e):Fh()}function er(s,t){let e,i;(t==="ltr"||t==="rtl")&&(e=s.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),s.prevTextDirection=i)}function sr(s,t){t!==void 0&&(delete s.prevTextDirection,s.canvas.style.setProperty("direction",t[0],t[1]))}function ra(s){return s==="angle"?{between:Ne,compare:Lc,normalize:ht}:{between:Lt,compare:(t,e)=>t-e,normalize:t=>t}}function vo({start:s,end:t,count:e,loop:i,style:n}){return{start:s%e,end:t%e,loop:i&&(t-s+1)%e===0,style:n}}function Ah(s,t,e){let{property:i,start:n,end:r}=e,{between:o,normalize:a}=ra(i),l=t.length,{start:c,end:h,loop:u}=s,d,f;if(u){for(c+=l,h+=l,d=0,f=l;dl(n,_,y)&&a(n,_)!==0,x=()=>a(r,y)===0||l(r,_,y),S=()=>g||w(),k=()=>!g||x();for(let O=h,T=h;O<=u;++O)b=t[O%o],!b.skip&&(y=c(b[i]),y!==_&&(g=l(y,n,r),p===null&&S()&&(p=a(y,n)===0?O:T),p!==null&&k()&&(m.push(vo({start:p,end:O,loop:d,count:o,style:f})),p=null),T=O,_=y));return p!==null&&m.push(vo({start:p,end:u,loop:d,count:o,style:f})),m}function nr(s,t){let e=[],i=s.segments;for(let n=0;nn&&s[r%t].skip;)r--;return r%=t,{start:n,end:r}}function Ph(s,t,e,i){let n=s.length,r=[],o=t,a=s[t],l;for(l=t+1;l<=e;++l){let c=s[l%n];c.skip||c.stop?a.skip||(i=!1,r.push({start:t%n,end:(l-1)%n,loop:i}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&r.push({start:t%n,end:o%n,loop:i}),r}function oa(s,t){let e=s.points,i=s.options.spanGaps,n=e.length;if(!n)return[];let r=!!s._loop,{start:o,end:a}=Lh(e,n,r,i);if(i===!0)return To(s,[{start:o,end:a,loop:r}],e,t);let l=aa({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Nn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;let r=i.items,o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},jt=new mr,aa="transparent",Wh={boolean(s,t,e){return e>.5?t:s},color(s,t,e){let i=jn(s||aa),n=i.valid&&jn(t||aa);return n&&n.valid?n.mix(i,e).hexString():t},number(s,t,e){return s+(t-s)*e}},gr=class{constructor(t,e,i,n){let r=e[i];n=ze([t.to,n,r,t.from]);let o=ze([t.from,r,n]);this._active=!0,this._fn=t.fn||Wh[t.type||typeof o],this._easing=Ce[t.easing]||Ce.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=ze([t.to,e,n,t.from]),this._from=ze([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,a=this._to,l;if(this._active=r!==a&&(o||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(r,a,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let n=0;ns!=="onProgress"&&s!=="onComplete"&&s!=="fn"});L.set("animations",{colors:{type:"color",properties:Vh},numbers:{type:"number",properties:zh}});L.describe("animations",{_fallback:"animation"});L.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:s=>s|0}}}});var ji=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;let e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{let n=t[i];if(!A(n))return;let r={};for(let o of Hh)r[o]=n[o];($(n.properties)&&n.properties||[i]).forEach(o=>{(o===i||!e.has(o))&&e.set(o,r)})})}_animateOptions(t,e){let i=e.options,n=$h(t,i);if(!n)return[];let r=this._createAnimations(n,i);return i.$shared&&Bh(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,e){let i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}let h=e[c],u=r[c],d=i.get(c);if(u)if(d&&u.active()){u.update(d,h,a);continue}else u.cancel();if(!d||!d.duration){t[c]=h;continue}r[c]=u=new gr(d,t,c,h),n.push(u)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let i=this._createAnimations(t,e);if(i.length)return jt.add(this._chart,i),!0}};function Bh(s,t){let e=[],i=Object.keys(t);for(let n=0;n0||!e&&r<0)return n.index}return null}function da(s,t){let{chart:e,_cachedMeta:i}=s,n=e._stacks||(e._stacks={}),{iScale:r,vScale:o,index:a}=i,l=r.axis,c=o.axis,h=Zh(r,o,i),u=t.length,d;for(let f=0;fe[i].axis===t).shift()}function Xh(s,t){return $t(s,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Kh(s,t,e){return $t(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function vs(s,t){let e=s.controller.index,i=s.vScale&&s.vScale.axis;if(i){t=t||s._parsed;for(let n of t){let r=n._stacks;if(!r||r[i]===void 0||r[i][e]===void 0)return;delete r[i][e]}}}var or=s=>s==="reset"||s==="none",fa=(s,t)=>t?s:Object.assign({},s),Jh=(s,t,e)=>s&&!t.hidden&&t._stacked&&{keys:Ja(e,!0),values:null},pt=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ha(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&vs(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(u,d,f,m)=>u==="x"?d:u==="r"?m:f,r=e.xAxisID=C(i.xAxisID,rr(t,"x")),o=e.yAxisID=C(i.yAxisID,rr(t,"y")),a=e.rAxisID=C(i.rAxisID,rr(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,r,o,a),h=e.vAxisID=n(l,o,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Pn(this._data,this),t._stacked&&vs(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(A(e))this._data=Yh(e);else if(i!==e){if(i){Pn(i,this);let n=this._cachedMeta;vs(n),n._parsed=[]}e&&Object.isExtensible(e)&&Wo(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,i=this.getDataset(),n=!1;this._dataCheck();let r=e._stacked;e._stacked=ha(e.vScale,e),e.stack!==i.stack&&(n=!0,vs(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&da(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,a=r.axis,l=t===0&&e===n.length?!0:i._sorted,c=t>0&&i._parsed[t-1],h,u,d;if(this._parsing===!1)i._parsed=n,i._sorted=!0,d=n;else{$(n[t])?d=this.parseArrayData(i,n,t,e):A(n[t])?d=this.parseObjectData(i,n,t,e):d=this.parsePrimitiveData(i,n,t,e);let f=()=>u[a]===null||c&&u[a]g||u=0;--d)if(!m()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,i=[],n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n),g=c.resolveNamedOptions(d,f,m,u);return g.$shared&&(g.$shared=l,r[o]=Object.freeze(fa(g,l))),g}_resolveAnimations(t,e,i){let n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,a=r[o];if(a)return a;let l;if(n.options.animation!==!1){let h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(d,this.getContext(t,i,e))}let c=new ji(n,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||or(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(e,r)||r!==n;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:o}}updateElement(t,e,i,n){or(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!or(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;let r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];let n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(c.length+=e,a=c.length-1;a>=o;a--)c[a]=c[a-e]};for(l(r),a=t;an-r))}return s._cache.$bar}function tu(s){let t=s.iScale,e=Qh(t,s.type),i=t._length,n,r,o,a,l=()=>{o===32767||o===-32768||(ft(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(n=0,r=e.length;n0?n[s-1]:null,a=sMath.abs(a)&&(l=a,c=o),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:r,min:o,max:a}}function Qa(s,t,e,i){return $(s)?iu(s,t,e,i):t[e.axis]=e.parse(s,i),t}function ma(s,t,e,i){let n=s.iScale,r=s.vScale,o=n.getLabels(),a=n===r,l=[],c,h,u,d;for(c=e,h=e+i;c=e?1:-1)}function ru(s){let t,e,i,n,r;return s.horizontal?(t=s.base>s.x,e="left",i="right"):(t=s.basel.controller.options.grouped),r=i.options.stacked,o=[],a=l=>{let c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(N(h)||isNaN(h))return!0};for(let l of n)if(!(e!==void 0&&a(l))&&((r===!1||o.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){let n=this._getStacks(t,i),r=e!==void 0?n.indexOf(e):-1;return r===-1?n.length-1:r}_getRuler(){let t=this.options,e=this._cachedMeta,i=e.iScale,n=[],r,o;for(r=0,o=e.data.length;r=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),a=n.getLabelForValue(r.y),l=r._custom;return{label:e.label,value:"("+o+", "+a+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){let r=n==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=o.axis,u=a.axis;for(let d=e;dNe(_,a,l,!0)?1:Math.max(w,w*e,x,x*e),m=(_,w,x)=>Ne(_,a,l,!0)?-1:Math.min(w,w*e,x,x*e),g=f(0,c,u),p=f(Z,h,d),y=m(Y,c,u),b=m(Y+Z,h,d);i=(g-y)/2,n=(p-b)/2,r=-(g+y)/2,o=-(p+b)/2}return{ratioX:i,ratioY:n,offsetX:r,offsetY:o}}var oe=class extends pt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let i=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=i;else{let r=l=>+i[l];if(A(i[t])){let{key:l="value"}=this._parsing;r=c=>+Bt(i[c],l)}let o,a;for(o=t,a=t+e;o0&&!isNaN(t)?B*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Ve(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0,i=this.chart,n,r,o,a,l;if(!t){for(n=0,r=i.data.datasets.length;ns!=="spacing",_indexable:s=>s!=="spacing"};oe.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(s){let t=s.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=s.legend.options;return t.labels.map((i,n)=>{let o=s.getDatasetMeta(0).controller.getStyle(n);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!s.getDataVisibility(n),index:n}})}return[]}},onClick(s,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(s){let t=s.label,e=": "+s.formattedValue;return $(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};var Ue=class extends pt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled,{start:a,count:l}=zn(e,n,o);this._drawStart=a,this._drawCount=l,Vn(e)&&(a=0,l=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:c},t),this.updateElements(n,a,l,t)}updateElements(t,e,i,n){let r=n==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,n),d=o.axis,f=a.axis,{spanGaps:m,segment:g}=this.options,p=pe(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||n==="none",b=e>0&&this.getParsed(e-1);for(let _=e;_0&&Math.abs(x[d]-b[d])>p,g&&(S.parsed=x,S.raw=c.data[_]),u&&(S.options=h||this.resolveDataElementOptions(_,w.active?"active":n)),y||this.updateElement(w,_,S,n),b=x}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;let r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};Ue.id="line";Ue.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Ue.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var Ye=class extends pt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Ve(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}parseObjectData(t,e,i,n){return Kn.bind(this)(t,e,i,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,n)=>{let r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(re.max&&(e.max=r))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,n){let r=n==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,d=c.getIndexAngle(0)-.5*Y,f=d,m,g=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?wt(this.resolveDataElementOptions(t,e).angle||i):0}};Ye.id="polarArea";Ye.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Ye.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(s){let t=s.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=s.legend.options;return t.labels.map((i,n)=>{let o=s.getDatasetMeta(0).controller.getStyle(n);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!s.getDataVisibility(n),index:n}})}return[]}},onClick(s,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(s){return s.chart.data.labels[s.dataIndex]+": "+s.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};var Fs=class extends oe{};Fs.id="pie";Fs.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var Ze=class extends pt{getLabelAndValue(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return Kn.bind(this)(t,e,i,n)}update(t){let e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,t!=="resize"){let o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);let a={_loop:!0,_fullLoop:r.length===n.length,options:o};this.updateElement(i,void 0,a,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){let r=this._cachedMeta.rScale,o=n==="reset";for(let a=e;a{n[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),n}};yt.defaults={};yt.defaultRoutes=void 0;var tl={values(s){return $(s)?s:""+s},numeric(s,t,e){if(s===0)return"0";let i=this.chart.options.locale,n,r=s;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),r=hu(s,e)}let o=gt(Math.abs(r)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ve(s,i,l)},logarithmic(s,t,e){if(s===0)return"0";let i=s/Math.pow(10,Math.floor(gt(s)));return i===1||i===2||i===5?tl.numeric.call(this,s,t,e):""}};function hu(s,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&s!==Math.floor(s)&&(e=s-Math.floor(s)),e}var Xi={formatters:tl};L.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(s,t)=>t.lineWidth,tickColor:(s,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Xi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});L.route("scale.ticks","color","","color");L.route("scale.grid","color","","borderColor");L.route("scale.grid","borderColor","","borderColor");L.route("scale.title","color","","color");L.describe("scale",{_fallback:!1,_scriptable:s=>!s.startsWith("before")&&!s.startsWith("after")&&s!=="callback"&&s!=="parser",_indexable:s=>s!=="borderDash"&&s!=="tickBorderDash"});L.describe("scales",{_fallback:"scale"});L.describe("scale.ticks",{_scriptable:s=>s!=="backdropPadding"&&s!=="callback",_indexable:s=>s!=="backdropPadding"});function uu(s,t){let e=s.options.ticks,i=e.maxTicksLimit||du(s),n=e.major.enabled?mu(t):[],r=n.length,o=n[0],a=n[r-1],l=[];if(r>i)return gu(t,l,n,r/i),l;let c=fu(n,t,i);if(r>0){let h,u,d=r>1?Math.round((a-o)/(r-1)):null;for(Ni(t,l,c,N(d)?0:o-d,o),h=0,u=r-1;hn)return l}return Math.max(n,1)}function mu(s){let t=[],e,i;for(e=0,i=s.length;es==="left"?"right":s==="right"?"left":s,ya=(s,t,e)=>t==="top"||t==="left"?s[t]+e:s[t]-e;function ba(s,t){let e=[],i=s.length/t,n=s.length,r=0;for(;ro+a)))return l}function xu(s,t){H(s,e=>{let i=e.gc,n=i.length/2,r;if(n>t){for(r=0;ri?i:e,i=n&&e>i?e:i,{min:mt(e,mt(i,e)),max:mt(i,mt(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){j(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:n,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Go(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a=r||i<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),u=h.widest.width,d=h.highest.height,f=it(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),u+6>a&&(a=f/(i-(t.offset?.5:1)),l=this.maxHeight-Ts(t.grid)-e.padding-xa(t.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),o=Di(Math.min(Math.asin(it((h.highest.height+6)/a,-1,1)),Math.asin(it(l/c,-1,1))-Math.asin(it(d/c,-1,1)))),o=Math.max(n,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){j(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){j(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){let l=xa(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ts(r)+l):(t.height=this.maxHeight,t.width=Ts(r)+l),i.display&&this.ticks.length){let{first:c,last:h,widest:u,highest:d}=this._getLabelSizes(),f=i.padding*2,m=wt(this.labelRotation),g=Math.cos(m),p=Math.sin(m);if(a){let y=i.mirror?0:p*u.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+y+f)}else{let y=i.mirror?0:g*u.width+p*d.height;t.width=Math.min(this.maxWidth,t.width+y+f)}this._calculatePadding(c,h,p,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){let{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),d=0,f=0;l?c?(d=n*t.width,f=i*e.height):(d=i*t.height,f=n*e.width):r==="start"?f=e.width:r==="end"?d=t.width:r!=="inner"&&(d=t.width/2,f=e.width/2),this.paddingLeft=Math.max((d-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-u+o)*this.width/(this.width-u),0)}else{let h=e.height/2,u=t.height/2;r==="start"?(h=0,u=t.height):r==="end"&&(h=e.height,u=0),this.paddingTop=h+o,this.paddingBottom=u+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){j(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e({width:r[k]||0,height:o[k]||0});return{first:S(0),last:S(e-1),widest:S(w),highest:S(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Lo(this._alignToPixels?te(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&ta*n?a/i:l/n:l*n0}_computeGridLineItems(t){let e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,a=r.offset,l=this.isHorizontal(),h=this.ticks.length+(a?1:0),u=Ts(r),d=[],f=r.setContext(this.getContext()),m=f.drawBorder?f.borderWidth:0,g=m/2,p=function(E){return te(i,E,m)},y,b,_,w,x,S,k,O,T,F,W,R;if(o==="top")y=p(this.bottom),S=this.bottom-u,O=y-g,F=p(t.top)+g,R=t.bottom;else if(o==="bottom")y=p(this.top),F=t.top,R=p(t.bottom)-g,S=y+g,O=this.top+u;else if(o==="left")y=p(this.right),x=this.right-u,k=y-g,T=p(t.left)+g,W=t.right;else if(o==="right")y=p(this.left),T=t.left,W=p(t.right)-g,x=y+g,k=this.left+u;else if(e==="x"){if(o==="center")y=p((t.top+t.bottom)/2+.5);else if(A(o)){let E=Object.keys(o)[0],et=o[E];y=p(this.chart.scales[E].getPixelForValue(et))}F=t.top,R=t.bottom,S=y+g,O=S+u}else if(e==="y"){if(o==="center")y=p((t.left+t.right)/2);else if(A(o)){let E=Object.keys(o)[0],et=o[E];y=p(this.chart.scales[E].getPixelForValue(et))}x=y-g,k=x-u,T=t.left,W=t.right}let tt=C(n.ticks.maxTicksLimit,h),ct=Math.max(1,Math.ceil(h/tt));for(b=0;br.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){let e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),r,o,a=(l,c,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.draw(n)}}]:[{z:i,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[],r,o;for(r=0,o=e.length;r{let i=e.split("."),n=i.pop(),r=[s].concat(i).join("."),o=t[e].split("."),a=o.pop(),l=o.join(".");L.route(r,n,l,a)})}function Tu(s){return"id"in s&&"defaults"in s}var pr=class{constructor(){this.controllers=new Be(pt,"datasets",!0),this.elements=new Be(yt,"elements"),this.plugins=new Be(Object,"plugins"),this.scales=new Be(Yt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(n=>{let r=i||this._getRegistryForType(n);i||r.isForType(n)||r===this.plugins&&n.id?this._exec(t,r,n):H(n,o=>{let a=i||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,e,i){let n=Oi(t);j(i["before"+n],[],i),e[t](i),j(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let w=e;w0&&Math.abs(S[f]-_[f])>y,p&&(k.parsed=S,k.raw=c.data[w]),d&&(k.options=u||this.resolveDataElementOptions(w,x.active?"active":n)),b||this.updateElement(x,w,k,n),_=S}this.updateSharedOptions(u,n,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}let i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;let r=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,r,o)/2}};qe.id="scatter";qe.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};qe.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(s){return"("+s.label+", "+s.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Ou=Object.freeze({__proto__:null,BarController:$e,BubbleController:je,DoughnutController:oe,LineController:Ue,PolarAreaController:Ye,PieController:Fs,RadarController:Ze,ScatterController:qe});function be(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var As=class{constructor(t){this.options=t||{}}init(t){}formats(){return be()}parse(t,e){return be()}format(t,e){return be()}add(t,e,i){return be()}diff(t,e,i){return be()}startOf(t,e,i){return be()}endOf(t,e){return be()}};As.override=function(s){Object.assign(As.prototype,s)};var Or={_date:As};function Du(s,t,e,i){let{controller:n,data:r,_sorted:o}=s,a=n._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&r.length){let l=a._reversePixels?Po:Ft;if(i){if(n._sharedOptions){let c=r[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){let u=l(r,t,e-h),d=l(r,t,e+h);return{lo:u.lo,hi:d.hi}}}}else return l(r,t,e)}return{lo:0,hi:r.length-1}}function Vs(s,t,e,i,n){let r=s.getSortedVisibleDatasetMetas(),o=e[t];for(let a=0,l=r.length;a{l[o](t[e],n)&&(r.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),i&&!a?[]:r}var Fu={evaluateInteractionItems:Vs,modes:{index(s,t,e,i){let n=ie(t,s),r=e.axis||"x",o=e.includeInvisible||!1,a=e.intersect?lr(s,n,r,i,o):cr(s,n,r,!1,i,o),l=[];return a.length?(s.getSortedVisibleDatasetMetas().forEach(c=>{let h=a[0].index,u=c.data[h];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:h})}),l):[]},dataset(s,t,e,i){let n=ie(t,s),r=e.axis||"xy",o=e.includeInvisible||!1,a=e.intersect?lr(s,n,r,i,o):cr(s,n,r,!1,i,o);if(a.length>0){let l=a[0].datasetIndex,c=s.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function wa(s,t){return s.filter(e=>el.indexOf(e.pos)===-1&&e.box.axis===t)}function Ds(s,t){return s.sort((e,i)=>{let n=t?i:e,r=t?e:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function Au(s){let t=[],e,i,n,r,o,a;for(e=0,i=(s||[]).length;ec.box.fullSize),!0),i=Ds(Os(t,"left"),!0),n=Ds(Os(t,"right")),r=Ds(Os(t,"top"),!0),o=Ds(Os(t,"bottom")),a=wa(t,"x"),l=wa(t,"y");return{fullSize:e,leftAndTop:i.concat(r),rightAndBottom:n.concat(l).concat(o).concat(a),chartArea:Os(t,"chartArea"),vertical:i.concat(n).concat(l),horizontal:r.concat(o).concat(a)}}function Sa(s,t,e,i){return Math.max(s[e],t[e])+Math.max(s[i],t[i])}function sl(s,t){s.top=Math.max(s.top,t.top),s.left=Math.max(s.left,t.left),s.bottom=Math.max(s.bottom,t.bottom),s.right=Math.max(s.right,t.right)}function Nu(s,t,e,i){let{pos:n,box:r}=e,o=s.maxPadding;if(!A(n)){e.size&&(s[n]-=e.size);let u=i[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?r.height:r.width),e.size=u.size/u.count,s[n]+=e.size}r.getPadding&&sl(o,r.getPadding());let a=Math.max(0,t.outerWidth-Sa(o,s,"left","right")),l=Math.max(0,t.outerHeight-Sa(o,s,"top","bottom")),c=a!==s.w,h=l!==s.h;return s.w=a,s.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Wu(s){let t=s.maxPadding;function e(i){let n=Math.max(t[i]-s[i],0);return s[i]+=n,n}s.y+=e("top"),s.x+=e("left"),e("right"),e("bottom")}function zu(s,t){let e=t.maxPadding;function i(n){let r={left:0,top:0,right:0,bottom:0};return n.forEach(o=>{r[o]=Math.max(t[o],e[o])}),r}return i(s?["left","right"]:["top","bottom"])}function Cs(s,t,e,i){let n=[],r,o,a,l,c,h;for(r=0,o=s.length,c=0;r{typeof g.beforeLayout=="function"&&g.beforeLayout()});let h=l.reduce((g,p)=>p.box.options&&p.box.options.display===!1?g:g+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/h,hBoxMaxHeight:o/2}),d=Object.assign({},n);sl(d,at(i));let f=Object.assign({maxPadding:d,w:r,h:o,x:n.left,y:n.top},n),m=Pu(l.concat(c),u);Cs(a.fullSize,f,u,m),Cs(l,f,u,m),Cs(c,f,u,m)&&Cs(l,f,u,m),Wu(f),ka(a.leftAndTop,f,u,m),f.x+=f.w,f.y+=f.h,ka(a.rightAndBottom,f,u,m),s.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},H(a.chartArea,g=>{let p=g.box;Object.assign(p,s.chartArea),p.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},Ui=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}},yr=class extends Ui{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},$i="$chartjs",Vu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ma=s=>s===null||s==="";function Hu(s,t){let e=s.style,i=s.getAttribute("height"),n=s.getAttribute("width");if(s[$i]={initial:{height:i,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ma(n)){let r=tr(s,"width");r!==void 0&&(s.width=r)}if(Ma(i))if(s.style.height==="")s.height=s.width/(t||2);else{let r=tr(s,"height");r!==void 0&&(s.height=r)}return s}var il=sa?{passive:!0}:!1;function Bu(s,t,e){s.addEventListener(t,e,il)}function $u(s,t,e){s.canvas.removeEventListener(t,e,il)}function ju(s,t){let e=Vu[s.type]||s.type,{x:i,y:n}=ie(s,t);return{type:e,chart:t,native:s,x:i!==void 0?i:null,y:n!==void 0?n:null}}function Yi(s,t){for(let e of s)if(e===t||e.contains(t))return!0}function Uu(s,t,e){let i=s.canvas,n=new MutationObserver(r=>{let o=!1;for(let a of r)o=o||Yi(a.addedNodes,i),o=o&&!Yi(a.removedNodes,i);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Yu(s,t,e){let i=s.canvas,n=new MutationObserver(r=>{let o=!1;for(let a of r)o=o||Yi(a.removedNodes,i),o=o&&!Yi(a.addedNodes,i);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}var Ls=new Map,va=0;function nl(){let s=window.devicePixelRatio;s!==va&&(va=s,Ls.forEach((t,e)=>{e.currentDevicePixelRatio!==s&&t()}))}function Zu(s,t){Ls.size||window.addEventListener("resize",nl),Ls.set(s,t)}function qu(s){Ls.delete(s),Ls.size||window.removeEventListener("resize",nl)}function Gu(s,t,e){let i=s.canvas,n=i&&Pi(i);if(!n)return;let r=Wn((a,l)=>{let c=n.clientWidth;e(a,l),c{let l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||r(c,h)});return o.observe(n),Zu(s,r),o}function hr(s,t,e){e&&e.disconnect(),t==="resize"&&qu(s)}function Xu(s,t,e){let i=s.canvas,n=Wn(r=>{s.ctx!==null&&e(ju(r,s))},s,r=>{let o=r[0];return[o,o.offsetX,o.offsetY]});return Bu(i,t,n),n}var br=class extends Ui{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Hu(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[$i])return!1;let i=e[$i].initial;["height","width"].forEach(r=>{let o=i[r];N(o)?e.removeAttribute(r):e.setAttribute(r,o)});let n=i.style||{};return Object.keys(n).forEach(r=>{e.style[r]=n[r]}),e.width=e.width,delete e[$i],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),o={attach:Uu,detach:Yu,resize:Gu}[e]||Xu;n[e]=o(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:hr,detach:hr,resize:hr}[e]||$u)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ea(t,e,i,n)}isAttached(t){let e=Pi(t);return!!(e&&e.isConnected)}};function Ku(s){return!Jn()||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas?yr:br}var xr=class{constructor(){this._init=[]}notify(t,e,i,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let r=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(r,t,e,i);return e==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,n){n=n||{};for(let r of t){let o=r.plugin,a=o[i],l=[e,n,r.options];if(j(a,l,o)===!1&&n.cancelable)return!1}return!0}invalidate(){N(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let i=t&&t.config,n=C(i.options&&i.options.plugins,{}),r=Ju(i);return n===!1&&!e?[]:td(t,r,n,e)}_notifyStateChanges(t){let e=this._oldCache||[],i=this._cache,n=(r,o)=>r.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}};function Ju(s){let t={},e=[],i=Object.keys(Rt.plugins.items);for(let r=0;r{let l=i[a];if(!A(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let c=wr(a,l),h=id(c,n),u=e.scales||{};r[c]=r[c]||a,o[a]=Pe(Object.create(null),[{axis:c},l,u[c],u[h]])}),s.data.datasets.forEach(a=>{let l=a.type||s.type,c=a.indexAxis||_r(l,t),u=(Qt[l]||{}).scales||{};Object.keys(u).forEach(d=>{let f=sd(d,c),m=a[f+"AxisID"]||r[f]||f;o[m]=o[m]||Object.create(null),Pe(o[m],[{axis:f},i[m],u[d]])})}),Object.keys(o).forEach(a=>{let l=o[a];Pe(l,[L.scales[l.type],L.scale])}),o}function rl(s){let t=s.options||(s.options={});t.plugins=C(t.plugins,{}),t.scales=rd(s,t)}function ol(s){return s=s||{},s.datasets=s.datasets||[],s.labels=s.labels||[],s}function od(s){return s=s||{},s.data=ol(s.data),rl(s),s}var Ta=new Map,al=new Set;function zi(s,t){let e=Ta.get(s);return e||(e=t(),Ta.set(s,e),al.add(e)),e}var Es=(s,t,e)=>{let i=Bt(t,e);i!==void 0&&s.add(i)},Sr=class{constructor(t){this._config=od(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ol(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),rl(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return zi(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return zi(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return zi(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return zi(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,n=i.get(t);return(!n||e)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){let{options:n,type:r}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;let l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(u=>Es(l,t,u))),h.forEach(u=>Es(l,n,u)),h.forEach(u=>Es(l,Qt[r]||{},u)),h.forEach(u=>Es(l,L,u)),h.forEach(u=>Es(l,Ii,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),al.has(e)&&o.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,Qt[e]||{},L.datasets[e]||{},{type:e},L,Ii]}resolveNamedOptions(t,e,i,n=[""]){let r={$shared:!0},{resolver:o,subPrefixes:a}=Oa(this._resolverCache,t,n),l=o;if(ld(o,e)){r.$shared=!1,i=Ht(i)?i():i;let c=this.createResolver(t,i,a);l=ge(o,i,c)}for(let c of e)r[c]=l[c];return r}createResolver(t,e,i=[""],n){let{resolver:r}=Oa(this._resolverCache,t,i);return A(e)?ge(r,e,void 0,n):r}};function Oa(s,t,e){let i=s.get(t);i||(i=new Map,s.set(t,i));let n=e.join(),r=i.get(n);return r||(r={resolver:Li(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(n,r)),r}var ad=s=>A(s)&&Object.getOwnPropertyNames(s).reduce((t,e)=>t||Ht(s[e]),!1);function ld(s,t){let{isScriptable:e,isIndexable:i}=qn(s);for(let n of t){let r=e(n),o=i(n),a=(o||r)&&s[n];if(r&&(Ht(a)||ad(a))||o&&$(a))return!0}return!1}var cd="3.9.1",hd=["top","bottom","left","right","chartArea"];function Da(s,t){return s==="top"||s==="bottom"||hd.indexOf(s)===-1&&t==="x"}function Ea(s,t){return function(e,i){return e[s]===i[s]?e[t]-i[t]:e[s]-i[s]}}function Ca(s){let t=s.chart,e=t.options.animation;t.notifyPlugins("afterRender"),j(e&&e.onComplete,[s],t)}function ud(s){let t=s.chart,e=t.options.animation;j(e&&e.onProgress,[s],t)}function ll(s){return Jn()&&typeof s=="string"?s=document.getElementById(s):s&&s.length&&(s=s[0]),s&&s.canvas&&(s=s.canvas),s}var Zi={},cl=s=>{let t=ll(s);return Object.values(Zi).filter(e=>e.canvas===t).pop()};function dd(s,t,e){let i=Object.keys(s);for(let n of i){let r=+n;if(r>=t){let o=s[n];delete s[n],(e>0||r>t)&&(s[r+e]=o)}}}function fd(s,t,e,i){return!e||s.type==="mouseout"?null:i?t:s}var xe=class{constructor(t,e){let i=this.config=new Sr(e),n=ll(t),r=cl(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");let o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Ku(n)),this.platform.updateConfig(i);let a=this.platform.acquireContext(n,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Do(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new xr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=zo(u=>this.update(u),o.resizeDelay||0),this._dataChanges=[],Zi[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}jt.listen(this,"complete",Ca),jt.listen(this,"progress",ud),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return N(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Un(this.canvas,this.ctx),this}stop(){return jt.stop(this),this}resize(t,e){jt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Qn(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),j(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};H(e,(i,n)=>{i.id=n})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{}),r=[];e&&(r=r.concat(Object.keys(e).map(o=>{let a=e[o],l=wr(o,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),H(r,o=>{let a=o.options,l=a.id,c=wr(l,a),h=C(a.type,o.dtype);(a.position===void 0||Da(a.position,c)!==Da(o.dposition))&&(a.position=o.dposition),n[l]=!0;let u=null;if(l in i&&i[l].type===h)u=i[l];else{let d=Rt.getScale(h);u=new d({id:l,type:h,ctx:this.ctx,chart:this}),i[u.id]=u}u.init(a,t)}),H(n,(o,a)=>{o||delete i[a]}),H(i,o=>{lt.configure(this,o,o.options),lt.addBox(this,o)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((n,r)=>n.index-r.index),i>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((i,n)=>{e.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ea("z","_idx"));let{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){H(this.scales,t=>{lt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Cn(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:i,start:n,count:r}of e){let o=i==="_removeElements"?-r:r;dd(t,n,o)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),n=i(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;lt.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],H(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,r)=>{n._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(n&&ks(e,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&Ms(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Ae(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){let r=Fu.modes[e];return typeof r=="function"?r(this,t,i,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,n=i.filter(r=>r&&r._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=$t(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){let i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);ft(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),jt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,r,o),t[r]=o},n=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};H(this.options.events,r=>i(r,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,i=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)},o,a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){H(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},H(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let n=i?"set":"remove",r,o,a,l;for(e==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a{let a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!ws(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){let n=this.options.hover,r=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),o=r(e,t),a=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;let r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){let{_active:n=[],options:r}=this,o=e,a=this._getActiveElements(t,n,i,o),l=Io(t),c=fd(t,this._lastEvent,i,l);i&&(this._lastEvent=null,j(r.onHover,[t,a,this],this),l&&j(r.onClick,[t,a,this],this));let h=!ws(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,i,n){if(t.type==="mouseout")return[];if(!i)return e;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}},Ia=()=>H(xe.instances,s=>s._plugins.invalidate()),ne=!0;Object.defineProperties(xe,{defaults:{enumerable:ne,value:L},instances:{enumerable:ne,value:Zi},overrides:{enumerable:ne,value:Qt},registry:{enumerable:ne,value:Rt},version:{enumerable:ne,value:cd},getChart:{enumerable:ne,value:cl},register:{enumerable:ne,value:(...s)=>{Rt.add(...s),Ia()}},unregister:{enumerable:ne,value:(...s)=>{Rt.remove(...s),Ia()}}});function hl(s,t,e){let{startAngle:i,pixelMargin:n,x:r,y:o,outerRadius:a,innerRadius:l}=t,c=n/a;s.beginPath(),s.arc(r,o,a,i-c,e+c),l>n?(c=n/l,s.arc(r,o,l,e+c,i-c,!0)):s.arc(r,o,n,e+Z,i-Z),s.closePath(),s.clip()}function md(s){return Ai(s,["outerStart","outerEnd","innerStart","innerEnd"])}function gd(s,t,e,i){let n=md(s.options.borderRadius),r=(e-t)/2,o=Math.min(r,i*t/2),a=l=>{let c=(e-Math.min(r,l))*i/2;return it(l,0,Math.min(r,c))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:it(n.innerStart,0,o),innerEnd:it(n.innerEnd,0,o)}}function He(s,t,e,i){return{x:e+s*Math.cos(t),y:i+s*Math.sin(t)}}function kr(s,t,e,i,n,r){let{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,u=Math.max(t.outerRadius+i+e-c,0),d=h>0?h+i+e+c:0,f=0,m=n-l;if(i){let E=h>0?h-i:0,et=u>0?u-i:0,Q=(E+et)/2,fe=Q!==0?m*Q/(Q+i):m;f=(m-fe)/2}let g=Math.max(.001,m*u-e/Y)/u,p=(m-g)/2,y=l+p+f,b=n-p-f,{outerStart:_,outerEnd:w,innerStart:x,innerEnd:S}=gd(t,d,u,b-y),k=u-_,O=u-w,T=y+_/k,F=b-w/O,W=d+x,R=d+S,tt=y+x/W,ct=b-S/R;if(s.beginPath(),r){if(s.arc(o,a,u,T,F),w>0){let Q=He(O,F,o,a);s.arc(Q.x,Q.y,w,F,b+Z)}let E=He(R,b,o,a);if(s.lineTo(E.x,E.y),S>0){let Q=He(R,ct,o,a);s.arc(Q.x,Q.y,S,b+Z,ct+Math.PI)}if(s.arc(o,a,d,b-S/d,y+x/d,!0),x>0){let Q=He(W,tt,o,a);s.arc(Q.x,Q.y,x,tt+Math.PI,y-Z)}let et=He(k,y,o,a);if(s.lineTo(et.x,et.y),_>0){let Q=He(k,T,o,a);s.arc(Q.x,Q.y,_,y-Z,T)}}else{s.moveTo(o,a);let E=Math.cos(T)*u+o,et=Math.sin(T)*u+a;s.lineTo(E,et);let Q=Math.cos(F)*u+o,fe=Math.sin(F)*u+a;s.lineTo(Q,fe)}s.closePath()}function pd(s,t,e,i,n){let{fullCircles:r,startAngle:o,circumference:a}=t,l=t.endAngle;if(r){kr(s,t,e,i,o+B,n);for(let c=0;c=B||Ne(r,a,l),g=Lt(o,c+d,h+d);return m&&g}getCenterPoint(t){let{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,h=(n+r)/2,u=(o+a+c+l)/2;return{x:e+Math.cos(h)*u,y:i+Math.sin(h)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>B?Math.floor(i/B):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(n){a=n/2;let c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*a,Math.sin(c)*a),this.circumference>=Y&&(a=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;let l=pd(t,this,a,r,o);bd(t,this,a,r,l,o),t.restore()}};Ge.id="arc";Ge.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};Ge.defaultRoutes={backgroundColor:"backgroundColor"};function ul(s,t,e=t){s.lineCap=C(e.borderCapStyle,t.borderCapStyle),s.setLineDash(C(e.borderDash,t.borderDash)),s.lineDashOffset=C(e.borderDashOffset,t.borderDashOffset),s.lineJoin=C(e.borderJoinStyle,t.borderJoinStyle),s.lineWidth=C(e.borderWidth,t.borderWidth),s.strokeStyle=C(e.borderColor,t.borderColor)}function xd(s,t,e){s.lineTo(e.x,e.y)}function _d(s){return s.stepped?Zo:s.tension||s.cubicInterpolationMode==="monotone"?qo:xd}function dl(s,t,e={}){let i=s.length,{start:n=0,end:r=i-1}=e,{start:o,end:a}=t,l=Math.max(n,o),c=Math.min(r,a),h=na&&r>a;return{count:i,start:l,loop:t.loop,ilen:c(o+(c?a-w:w))%r,_=()=>{g!==p&&(s.lineTo(h,p),s.lineTo(h,g),s.lineTo(h,y))};for(l&&(f=n[b(0)],s.moveTo(f.x,f.y)),d=0;d<=a;++d){if(f=n[b(d)],f.skip)continue;let w=f.x,x=f.y,S=w|0;S===m?(xp&&(p=x),h=(u*h+w)/++u):(_(),s.lineTo(w,x),m=S,u=0,g=p=x),y=x}_()}function Mr(s){let t=s.options,e=t.borderDash&&t.borderDash.length;return!s._decimated&&!s._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Sd:wd}function kd(s){return s.stepped?ia:s.tension||s.cubicInterpolationMode==="monotone"?na:Xt}function Md(s,t,e,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,i)&&n.closePath()),ul(s,t.options),s.stroke(n)}function vd(s,t,e,i){let{segments:n,options:r}=t,o=Mr(t);for(let a of n)ul(s,r,a.style),s.beginPath(),o(s,t,a,{start:e,end:e+i-1})&&s.closePath(),s.stroke()}var Td=typeof Path2D=="function";function Od(s,t,e,i){Td&&!t.options.segment?Md(s,t,e,i):vd(s,t,e,i)}var Nt=class extends yt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){let n=i.spanGaps?this._loop:this._fullLoop;ta(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=oa(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){let i=this.options,n=t[e],r=this.points,o=nr(this,{property:e,start:n,end:n});if(!o.length)return;let a=[],l=kd(i),c,h;for(c=0,h=o.length;cs!=="borderDash"&&s!=="fill"};function Fa(s,t,e,i){let n=s.options,{[e]:r}=s.getProps([e],i);return Math.abs(t-r)=e)return s.slice(t,t+e);let o=[],a=(e-2)/(r-2),l=0,c=t+e-1,h=t,u,d,f,m,g;for(o[l++]=s[h],u=0;uf&&(f=m,d=s[b],g=b);o[l++]=d,h=g}return o[l++]=s[c],o}function Pd(s,t,e,i){let n=0,r=0,o,a,l,c,h,u,d,f,m,g,p=[],y=t+e-1,b=s[t].x,w=s[y].x-b;for(o=t;og&&(g=c,d=o),n=(r*n+a.x)/++r;else{let S=o-1;if(!N(u)&&!N(d)){let k=Math.min(u,d),O=Math.max(u,d);k!==f&&k!==S&&p.push({...s[k],x:n}),O!==f&&O!==S&&p.push({...s[O],x:n})}o>0&&S!==f&&p.push(s[S]),p.push(a),h=x,r=0,m=g=c,u=d=f=o}}return p}function ml(s){if(s._decimated){let t=s._data;delete s._decimated,delete s._data,Object.defineProperty(s,"data",{value:t})}}function Aa(s){s.data.datasets.forEach(t=>{ml(t)})}function Rd(s,t){let e=t.length,i=0,n,{iScale:r}=s,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=it(Ft(t,r.axis,o).lo,0,e-1)),c?n=it(Ft(t,r.axis,a).hi+1,i,e)-i:n=e-i,{start:i,count:n}}var Nd={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(s,t,e)=>{if(!e.enabled){Aa(s);return}let i=s.width;s.data.datasets.forEach((n,r)=>{let{_data:o,indexAxis:a}=n,l=s.getDatasetMeta(r),c=o||n.data;if(ze([a,s.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=s.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||s.options.parsing)return;let{start:u,count:d}=Rd(l,c),f=e.threshold||4*i;if(d<=f){ml(n);return}N(o)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(e.algorithm){case"lttb":m=Ld(c,u,d,i,e);break;case"min-max":m=Pd(c,u,d,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=m})},destroy(s){Aa(s)}};function Wd(s,t,e){let i=s.segments,n=s.points,r=t.points,o=[];for(let a of i){let{start:l,end:c}=a;c=Dr(l,c,n);let h=vr(e,n[l],n[c],a.loop);if(!t.segments){o.push({source:a,target:h,start:n[l],end:n[c]});continue}let u=nr(t,h);for(let d of u){let f=vr(e,r[d.start],r[d.end],d.loop),m=ir(a,n,f);for(let g of m)o.push({source:g,target:d,start:{[e]:La(h,f,"start",Math.max)},end:{[e]:La(h,f,"end",Math.min)}})}}return o}function vr(s,t,e,i){if(i)return;let n=t[s],r=e[s];return s==="angle"&&(n=ht(n),r=ht(r)),{property:s,start:n,end:r}}function zd(s,t){let{x:e=null,y:i=null}=s||{},n=t.points,r=[];return t.segments.forEach(({start:o,end:a})=>{a=Dr(o,a,n);let l=n[o],c=n[a];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):e!==null&&(r.push({x:e,y:l.y}),r.push({x:e,y:c.y}))}),r}function Dr(s,t,e){for(;t>s;t--){let i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function La(s,t,e,i){return s&&t?i(s[e],t[e]):s?s[e]:t?t[e]:0}function gl(s,t){let e=[],i=!1;return $(s)?(i=!0,e=s):e=zd(s,t),e.length?new Nt({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Pa(s){return s&&s.fill!==!1}function Vd(s,t,e){let n=s[t].fill,r=[t],o;if(!e)return n;for(;n!==!1&&r.indexOf(n)===-1;){if(!K(n))return n;if(o=s[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function Hd(s,t,e){let i=Ud(s);if(A(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return K(n)&&Math.floor(n)===n?Bd(i[0],t,n,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Bd(s,t,e,i){return(s==="-"||s==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function $d(s,t){let e=null;return s==="start"?e=t.bottom:s==="end"?e=t.top:A(s)?e=t.getPixelForValue(s.value):t.getBasePixel&&(e=t.getBasePixel()),e}function jd(s,t,e){let i;return s==="start"?i=e:s==="end"?i=t.options.reverse?t.min:t.max:A(s)?i=s.value:i=t.getBaseValue(),i}function Ud(s){let t=s.options,e=t.fill,i=C(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Yd(s){let{scale:t,index:e,line:i}=s,n=[],r=i.segments,o=i.points,a=Zd(t,e);a.push(gl({x:null,y:t.bottom},i));for(let l=0;l=0;--o){let a=n[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&fr(s.ctx,a,r))}},beforeDatasetsDraw(s,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let i=s.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){let r=i[n].$filler;Pa(r)&&fr(s.ctx,r,s.chartArea)}},beforeDatasetDraw(s,t,e){let i=t.meta.$filler;!Pa(i)||e.drawTime!=="beforeDatasetDraw"||fr(s.ctx,i,s.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},za=(s,t)=>{let{boxHeight:e=t,boxWidth:i=t}=s;return s.usePointStyle&&(e=Math.min(e,t),i=s.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},rf=(s,t)=>s!==null&&t!==null&&s.datasetIndex===t.datasetIndex&&s.index===t.index,Gi=class extends yt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=j(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,n)=>t.sort(i,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let i=t.labels,n=st(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=za(i,r),c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(o,r,a,l)+10):(h=this.maxHeight,c=this._fitCols(o,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){let{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a,u=t;r.textAlign="left",r.textBaseline="middle";let d=-1,f=-h;return this.legendItems.forEach((m,g)=>{let p=i+e/2+r.measureText(m.text).width;(g===0||c[c.length-1]+p+2*a>o)&&(u+=h,c[c.length-(g>0?0:1)]=0,f+=h,d++),l[g]={left:0,top:f,row:d,width:p,height:n},c[c.length-1]+=p+a}),u}_fitCols(t,e,i,n){let{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=o-t,u=a,d=0,f=0,m=0,g=0;return this.legendItems.forEach((p,y)=>{let b=i+e/2+r.measureText(p.text).width;y>0&&f+n+2*a>h&&(u+=d+a,c.push({width:d,height:f}),m+=d+a,g++,d=f=0),l[y]={left:m,top:f,col:g,width:b,height:n},d=Math.max(d,b),f+=n+a}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=ye(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=ot(i,this.left+n,this.right-this.lineWidths[a]);for(let c of e)a!==c.row&&(a=c.row,l=ot(i,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+n}else{let a=0,l=ot(i,this.top+t+n,this.bottom-this.columnSizes[a].height);for(let c of e)c.col!==a&&(a=c.col,l=ot(i,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;ks(t,this),this._draw(),Ms(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,a=L.color,l=ye(t.rtl,this.left,this.width),c=st(o.font),{color:h,padding:u}=o,d=c.size,f=d/2,m;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:g,boxHeight:p,itemHeight:y}=za(o,d),b=function(k,O,T){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;n.save();let F=C(T.lineWidth,1);if(n.fillStyle=C(T.fillStyle,a),n.lineCap=C(T.lineCap,"butt"),n.lineDashOffset=C(T.lineDashOffset,0),n.lineJoin=C(T.lineJoin,"miter"),n.lineWidth=F,n.strokeStyle=C(T.strokeStyle,a),n.setLineDash(C(T.lineDash,[])),o.usePointStyle){let W={radius:p*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:F},R=l.xPlus(k,g/2),tt=O+f;Yn(n,W,R,tt,o.pointStyleWidth&&g)}else{let W=O+Math.max((d-p)/2,0),R=l.leftForLtr(k,g),tt=se(T.borderRadius);n.beginPath(),Object.values(tt).some(ct=>ct!==0)?We(n,{x:R,y:W,w:g,h:p,radius:tt}):n.rect(R,W,g,p),n.fill(),F!==0&&n.stroke()}n.restore()},_=function(k,O,T){ee(n,T.text,k,O+y/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?m={x:ot(r,this.left+u,this.right-i[0]),y:this.top+u+x,line:0}:m={x:this.left+u,y:ot(r,this.top+x+u,this.bottom-e[0].height),line:0},er(this.ctx,t.textDirection);let S=y+u;this.legendItems.forEach((k,O)=>{n.strokeStyle=k.fontColor||h,n.fillStyle=k.fontColor||h;let T=n.measureText(k.text).width,F=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),W=g+f+T,R=m.x,tt=m.y;l.setWidth(this.width),w?O>0&&R+W+u>this.right&&(tt=m.y+=S,m.line++,R=m.x=ot(r,this.left+u,this.right-i[m.line])):O>0&&tt+S>this.bottom&&(R=m.x=R+e[m.line].width+u,m.line++,tt=m.y=ot(r,this.top+x+u,this.bottom-e[m.line].height));let ct=l.x(R);b(ct,tt,k),R=Vo(F,R+g+f,w?R+W:this.right,t.rtl),_(l.x(R),tt,k),w?m.x+=W+u:m.y+=S}),sr(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,i=st(e.font),n=at(e.padding);if(!e.display)return;let r=ye(t.rtl,this.left,this.width),o=this.ctx,a=e.position,l=i.size/2,c=n.top+l,h,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,u=ot(t.align,u,this.right-d);else{let m=this.columnSizes.reduce((g,p)=>Math.max(g,p.height),0);h=c+ot(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}let f=ot(a,u,u+d);o.textAlign=r.textAlign(Ci(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ee(o,e.text,f,h,i)}_computeTitleHeight(){let t=this.options.title,e=st(t.font),i=at(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(Lt(t,this.left,this.right)&&Lt(e,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;is.chart.options.color,boxWidth:40,padding:10,generateLabels(s){let t=s.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:n,color:r}}=s.legend.options;return s._getSortedDatasetMetas().map(o=>{let a=o.controller.getStyle(e?0:void 0),l=at(a.borderWidth);return{text:t[o.index].label,fillStyle:a.backgroundColor,fontColor:r,hidden:!o.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:a.borderColor,pointStyle:i||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:0,datasetIndex:o.index}},this)}},title:{color:s=>s.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:s=>!s.startsWith("on"),labels:{_scriptable:s=>!["generateLabels","filter","sort"].includes(s)}}},Ps=class extends yt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let n=$(i.text)?i.text.length:1;this._padding=at(i.padding);let r=n*st(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:i,bottom:n,right:r,options:o}=this,a=o.align,l=0,c,h,u;return this.isHorizontal()?(h=ot(a,i,r),u=e+t,c=r-i):(o.position==="left"?(h=i+t,u=ot(a,n,e),l=Y*-.5):(h=r-t,u=ot(a,e,n),l=Y*.5),c=n-e),{titleX:h,titleY:u,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let i=st(e.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);ee(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:Ci(e.align),textBaseline:"middle",translation:[o,a]})}};function lf(s,t){let e=new Ps({ctx:s.ctx,options:t,chart:s});lt.configure(s,e,t),lt.addBox(s,e),s.titleBlock=e}var cf={id:"title",_element:Ps,start(s,t,e){lf(s,e)},stop(s){let t=s.titleBlock;lt.removeBox(s,t),delete s.titleBlock},beforeUpdate(s,t,e){let i=s.titleBlock;lt.configure(s,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Vi=new WeakMap,hf={id:"subtitle",start(s,t,e){let i=new Ps({ctx:s.ctx,options:e,chart:s});lt.configure(s,i,e),lt.addBox(s,i),Vi.set(s,i)},stop(s){lt.removeBox(s,Vi.get(s)),Vi.delete(s)},beforeUpdate(s,t,e){let i=Vi.get(s);lt.configure(s,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Is={average(s){if(!s.length)return!1;let t,e,i=0,n=0,r=0;for(t=0,e=s.length;t-1?s.split(` -`):s}function uf(s,t){let{element:e,datasetIndex:i,index:n}=t,r=s.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(n);return{chart:s,label:o,parsed:r.getParsed(n),raw:s.data.datasets[i].data[n],formattedValue:a,dataset:r.getDataset(),dataIndex:n,datasetIndex:i,element:e}}function Va(s,t){let e=s.chart.ctx,{body:i,footer:n,title:r}=s,{boxWidth:o,boxHeight:a}=t,l=st(t.bodyFont),c=st(t.titleFont),h=st(t.footerFont),u=r.length,d=n.length,f=i.length,m=at(t.padding),g=m.height,p=0,y=i.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(y+=s.beforeBody.length+s.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),y){let w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*w+(y-f)*l.lineHeight+(y-1)*t.bodySpacing}d&&(g+=t.footerMarginTop+d*h.lineHeight+(d-1)*t.footerSpacing);let b=0,_=function(w){p=Math.max(p,e.measureText(w).width+b)};return e.save(),e.font=c.string,H(s.title,_),e.font=l.string,H(s.beforeBody.concat(s.afterBody),_),b=t.displayColors?o+2+t.boxPadding:0,H(i,w=>{H(w.before,_),H(w.lines,_),H(w.after,_)}),b=0,e.font=h.string,H(s.footer,_),e.restore(),p+=m.width,{width:p,height:g}}function df(s,t){let{y:e,height:i}=t;return es.height-i/2?"bottom":"center"}function ff(s,t,e,i){let{x:n,width:r}=i,o=e.caretSize+e.caretPadding;if(s==="left"&&n+r+o>t.width||s==="right"&&n-r-o<0)return!0}function mf(s,t,e,i){let{x:n,width:r}=e,{width:o,chartArea:{left:a,right:l}}=s,c="center";return i==="center"?c=n<=(a+l)/2?"left":"right":n<=r/2?c="left":n>=o-r/2&&(c="right"),ff(c,s,t,e)&&(c="center"),c}function Ha(s,t,e){let i=e.yAlign||t.yAlign||df(s,e);return{xAlign:e.xAlign||t.xAlign||mf(s,t,e,i),yAlign:i}}function gf(s,t){let{x:e,width:i}=s;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function pf(s,t,e){let{y:i,height:n}=s;return t==="top"?i+=e:t==="bottom"?i-=n+e:i-=n/2,i}function Ba(s,t,e,i){let{caretSize:n,caretPadding:r,cornerRadius:o}=s,{xAlign:a,yAlign:l}=e,c=n+r,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=se(o),m=gf(t,a),g=pf(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(h,d)+n:a==="right"&&(m+=Math.max(u,f)+n),{x:it(m,0,i.width-t.width),y:it(g,0,i.height-t.height)}}function Hi(s,t,e){let i=at(e.padding);return t==="center"?s.x+s.width/2:t==="right"?s.x+s.width-i.right:s.x+i.left}function $a(s){return Pt([],Ut(s))}function yf(s,t,e){return $t(s,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ja(s,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?s.override(e):s}var Rs=class extends yt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new ji(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=yf(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]),a=[];return a=Pt(a,Ut(n)),a=Pt(a,Ut(r)),a=Pt(a,Ut(o)),a}getBeforeBody(t,e){return $a(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){let{callbacks:i}=e,n=[];return H(t,r=>{let o={before:[],lines:[],after:[]},a=ja(i,r);Pt(o.before,Ut(a.beforeLabel.call(this,r))),Pt(o.lines,a.label.call(this,r)),Pt(o.after,Ut(a.afterLabel.call(this,r))),n.push(o)}),n}getAfterBody(t,e){return $a(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){let{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]),a=[];return a=Pt(a,Ut(n)),a=Pt(a,Ut(r)),a=Pt(a,Ut(o)),a}_createItems(t){let e=this._active,i=this.chart.data,n=[],r=[],o=[],a=[],l,c;for(l=0,c=e.length;lt.filter(h,u,d,i))),t.itemSort&&(a=a.sort((h,u)=>t.itemSort(h,u,i))),H(a,h=>{let u=ja(t.callbacks,h);n.push(u.labelColor.call(this,h)),r.push(u.labelPointStyle.call(this,h)),o.push(u.labelTextColor.call(this,h))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(t,e){let i=this.options.setContext(this.getContext()),n=this._active,r,o=[];if(!n.length)this.opacity!==0&&(r={opacity:0});else{let a=Is[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);let l=this._size=Va(this,i),c=Object.assign({},a,l),h=Ha(this.chart,i,c),u=Ba(i,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,r={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){let r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){let{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=se(a),{x:d,y:f}=t,{width:m,height:g}=e,p,y,b,_,w,x;return r==="center"?(w=f+g/2,n==="left"?(p=d,y=p-o,_=w+o,x=w-o):(p=d+m,y=p+o,_=w-o,x=w+o),b=p):(n==="left"?y=d+Math.max(l,h)+o:n==="right"?y=d+m-Math.max(c,u)-o:y=this.caretX,r==="top"?(_=f,w=_-o,p=y-o,b=y+o):(_=f+g,w=_+o,p=y+o,b=y-o),x=_),{x1:p,x2:y,x3:b,y1:_,y2:w,y3:x}}drawTitle(t,e,i){let n=this.title,r=n.length,o,a,l;if(r){let c=ye(i.rtl,this.x,this.width);for(t.x=Hi(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",o=st(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,l=0;l_!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,We(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),We(t,{x:y,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(y,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=i,u=st(i.bodyFont),d=u.lineHeight,f=0,m=ye(i.rtl,this.x,this.width),g=function(O){e.fillText(O,m.x(t.x+f),t.y+d/2),t.y+=d+r},p=m.textAlign(o),y,b,_,w,x,S,k;for(e.textAlign=o,e.textBaseline="middle",e.font=u.string,t.x=Hi(this,p,i),e.fillStyle=i.bodyColor,H(this.beforeBody,g),f=a&&p!=="right"?o==="center"?c/2+h:c+2+h:0,w=0,S=n.length;w0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){let o=Is[t.position].call(this,this._active,this._eventPosition);if(!o)return;let a=this._size=Va(this,t),l=Object.assign({},o,this._size),c=Ha(e,t,l),h=Ba(t,l,c,e);(n._to!==h.x||r._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;let o=at(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),er(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),sr(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,n=t.map(({datasetIndex:a,index:l})=>{let c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!ws(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,r=this._active||[],o=this._getActiveElements(t,r,e,i),a=this._positionChanged(o,t),l=e||!ws(o,r)||a;return l&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){let r=this.options;if(t.type==="mouseout")return[];if(!n)return e;let o=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(t,e){let{caretX:i,caretY:n,options:r}=this,o=Is[r.position].call(this,t,e);return o!==!1&&(i!==o.x||n!==o.y)}};Rs.positioners=Is;var bf={id:"tooltip",_element:Rs,positioners:Is,afterInit(s,t,e){e&&(s.tooltip=new Rs({chart:s,options:e}))},beforeUpdate(s,t,e){s.tooltip&&s.tooltip.initialize(e)},reset(s,t,e){s.tooltip&&s.tooltip.initialize(e)},afterDraw(s){let t=s.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(s.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(s.ctx),s.notifyPlugins("afterTooltipDraw",e)}},afterEvent(s,t){if(s.tooltip){let e=t.replay;s.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(s,t)=>t.bodyFont.size,boxWidth:(s,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:At,title(s){if(s.length>0){let t=s[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndexs!=="filter"&&s!=="itemSort"&&s!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},xf=Object.freeze({__proto__:null,Decimation:Nd,Filler:nf,Legend:af,SubTitle:hf,Title:cf,Tooltip:bf}),_f=(s,t,e,i)=>(typeof t=="string"?(e=s.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function wf(s,t,e,i){let n=s.indexOf(t);if(n===-1)return _f(s,t,e,i);let r=s.lastIndexOf(t);return n!==r?e:n}var Sf=(s,t)=>s===null?null:it(Math.round(s),0,t),Je=class extends Yt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let i=this.getLabels();for(let{index:n,label:r}of e)i[n]===r&&i.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(N(t))return null;let i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:wf(i,t,C(e,t),this._addedLabels),Sf(e,i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){let t=this.min,e=this.max,i=this.options.offset,n=[],r=this.getLabels();r=t===0&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=e;o++)n.push({value:o});return n}getLabelForValue(t){let e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};Je.id="category";Je.defaults={ticks:{callback:Je.prototype.getLabelForValue}};function kf(s,t){let e=[],{bounds:n,step:r,min:o,max:a,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:d}=s,f=r||1,m=h-1,{min:g,max:p}=t,y=!N(o),b=!N(a),_=!N(c),w=(p-g)/(u+1),x=In((p-g)/m/f)*f,S,k,O,T;if(x<1e-14&&!y&&!b)return[{value:g},{value:p}];T=Math.ceil(p/x)-Math.floor(g/x),T>m&&(x=In(T*x/m/f)*f),N(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),n==="ticks"?(k=Math.floor(g/x)*x,O=Math.ceil(p/x)*x):(k=g,O=p),y&&b&&r&&Ao((a-o)/r,x/1e3)?(T=Math.round(Math.min((a-o)/x,h)),x=(a-o)/T,k=o,O=a):_?(k=y?o:k,O=b?a:O,T=c-1,x=(O-k)/T):(T=(O-k)/x,Re(T,Math.round(T),x/1e3)?T=Math.round(T):T=Math.ceil(T));let F=Math.max(An(x),An(k));S=Math.pow(10,N(l)?F:l),k=Math.round(k*S)/S,O=Math.round(O*S)/S;let W=0;for(y&&(d&&k!==o?(e.push({value:o}),kn=e?n:l,a=l=>r=i?r:l;if(t){let l=vt(n),c=vt(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(n===r){let l=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(r*.05)),a(r+l),t||o(n-l)}this.min=n,this.max=r}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,o=kf(n,r);return t.bounds==="ticks"&&Fn(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){let t=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Ve(t,this.chart.options.locale,this.options.ticks.format)}},Ns=class extends Qe{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=K(t)?t:0,this.max=K(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,i=wt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};Ns.id="linear";Ns.defaults={ticks:{callback:Xi.formatters.numeric}};function Ya(s){return s/Math.pow(10,Math.floor(gt(s)))===1}function Mf(s,t){let e=Math.floor(gt(t.max)),i=Math.ceil(t.max/Math.pow(10,e)),n=[],r=mt(s.min,Math.pow(10,Math.floor(gt(t.min)))),o=Math.floor(gt(r)),a=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do n.push({value:r,major:Ya(r)}),++a,a===10&&(a=1,++o,l=o>=0?1:l),r=Math.round(a*Math.pow(10,o)*l)/l;while(o0?i:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=K(t)?Math.max(0,t):null,this.max=K(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,n=this.max,r=l=>i=t?i:l,o=l=>n=e?n:l,a=(l,c)=>Math.pow(10,Math.floor(gt(l))+c);i===n&&(i<=0?(r(1),o(10)):(r(a(i,-1)),o(a(n,1)))),i<=0&&r(a(n,-1)),n<=0&&o(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&r(a(i,-1)),this.min=i,this.max=n}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},i=Mf(e,this);return t.bounds==="ticks"&&Fn(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Ve(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=gt(t),this._valueRange=gt(this.max)-gt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(gt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};Ws.id="logarithmic";Ws.defaults={ticks:{callback:Xi.formatters.logarithmic,major:{enabled:!0}}};function Tr(s){let t=s.ticks;if(t.display&&s.display){let e=at(t.backdropPadding);return C(t.font&&t.font.size,L.font.size)+e.height}return 0}function vf(s,t,e){return e=$(e)?e:[e],{w:Yo(s,t.string,e),h:e.length*t.lineHeight}}function Za(s,t,e,i,n){return s===i||s===n?{start:t-e/2,end:t+e/2}:sn?{start:t-e,end:t}:{start:t,end:t+e}}function Tf(s){let t={l:s.left+s._padding.left,r:s.right-s._padding.right,t:s.top+s._padding.top,b:s.bottom-s._padding.bottom},e=Object.assign({},t),i=[],n=[],r=s._pointLabels.length,o=s.options.pointLabels,a=o.centerPointLabels?Y/r:0;for(let l=0;lt.r&&(a=(i.end-t.r)/r,s.r=Math.max(s.r,t.r+a)),n.startt.b&&(l=(n.end-t.b)/o,s.b=Math.max(s.b,t.b+l))}function Df(s,t,e){let i=[],n=s._pointLabels.length,r=s.options,o=Tr(r)/2,a=s.drawingArea,l=r.pointLabels.centerPointLabels?Y/n:0;for(let c=0;c270||e<90)&&(s-=t),s}function Ff(s,t){let{ctx:e,options:{pointLabels:i}}=s;for(let n=t-1;n>=0;n--){let r=i.setContext(s.getPointLabelContext(n)),o=st(r.font),{x:a,y:l,textAlign:c,left:h,top:u,right:d,bottom:f}=s._pointLabelItems[n],{backdropColor:m}=r;if(!N(m)){let g=se(r.borderRadius),p=at(r.backdropPadding);e.fillStyle=m;let y=h-p.left,b=u-p.top,_=d-h+p.width,w=f-u+p.height;Object.values(g).some(x=>x!==0)?(e.beginPath(),We(e,{x:y,y:b,w:_,h:w,radius:g}),e.fill()):e.fillRect(y,b,_,w)}ee(e,s._pointLabels[n],a,l+o.lineHeight/2,o,{color:r.color,textAlign:c,textBaseline:"middle"})}}function pl(s,t,e,i){let{ctx:n}=s;if(e)n.arc(s.xCenter,s.yCenter,t,0,B);else{let r=s.getPointPosition(0,t);n.moveTo(r.x,r.y);for(let o=1;o{let n=j(this.options.pointLabels.callback,[e,i],this);return n||n===0?n:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){let t=this.options;t.display&&t.pointLabels.display?Tf(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){let e=B/(this._pointLabels.length||1),i=this.options.startAngle||0;return ht(t*e+wt(i))}getDistanceFromCenterForValue(t){if(N(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(N(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t{if(h!==0){a=this.getDistanceFromCenterForValue(c.value);let u=n.setContext(this.getContext(h-1));Af(this,u,a,r)}}),i.display){for(t.save(),o=r-1;o>=0;o--){let c=i.setContext(this.getPointLabelContext(o)),{color:h,lineWidth:u}=c;!u||!h||(t.lineWidth=u,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;let n=this.getIndexAngle(0),r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!e.reverse)return;let c=i.setContext(this.getContext(l)),h=st(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;let u=at(c.backdropPadding);t.fillRect(-o/2-u.left,-r-h.size/2-u.top,o+u.width,h.size+u.height)}ee(t,a.label,0,-r,h,{color:c.color})}),t.restore()}drawTitle(){}};_e.id="radialLinear";_e.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Xi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(s){return s},padding:5,centerPointLabels:!1}};_e.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};_e.descriptors={angleLines:{_fallback:"grid"}};var Ki={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ut=Object.keys(Ki);function Pf(s,t){return s-t}function qa(s,t){if(N(t))return null;let e=s._adapter,{parser:i,round:n,isoWeekday:r}=s._parseOpts,o=t;return typeof i=="function"&&(o=i(o)),K(o)||(o=typeof i=="string"?e.parse(o,i):e.parse(o)),o===null?null:(n&&(o=n==="week"&&(pe(r)||r===!0)?e.startOf(o,"isoWeek",r):e.startOf(o,n)),+o)}function Ga(s,t,e,i){let n=ut.length;for(let r=ut.indexOf(s);r=ut.indexOf(e);r--){let o=ut[r];if(Ki[o].common&&s._adapter.diff(n,i,o)>=t-1)return o}return ut[e?ut.indexOf(e):0]}function Nf(s){for(let t=ut.indexOf(s)+1,e=ut.length;t=t?e[i]:e[n];s[r]=!0}}function Wf(s,t,e,i){let n=s._adapter,r=+n.startOf(t[0].value,i),o=t[t.length-1].value,a,l;for(a=r;a<=o;a=+n.add(a,1,i))l=e[a],l>=0&&(t[l].major=!0);return t}function Ka(s,t,e){let i=[],n={},r=t.length,o,a;for(o=0;o+t.value))}initOffsets(t){let e=0,i=0,n,r;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?i=r:i=(r-this.getDecimalForValue(t[t.length-2]))/2);let o=t.length<3?.5:.25;e=it(e,0,o),i=it(i,0,o),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){let t=this._adapter,e=this.min,i=this.max,n=this.options,r=n.time,o=r.unit||Ga(r.minUnit,e,i,this._getLabelCapacity(e)),a=C(r.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=pe(l)||l===!0,h={},u=e,d,f;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);let m=n.ticks.source==="data"&&this.getDataTimestamps();for(d=u,f=0;dg-p).map(g=>+g)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){let r=this.options,o=r.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&o[a],h=l&&o[l],u=i[e],d=l&&h&&u&&u.major,f=this._adapter.format(t,n||(d?h:c)),m=r.ticks.callback;return m?j(m,[f,e,i],this):f}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,i=n.length;e=s[i].pos&&t<=s[n].pos&&({lo:i,hi:n}=Ft(s,"pos",t)),{pos:r,time:a}=s[i],{pos:o,time:l}=s[n]):(t>=s[i].time&&t<=s[n].time&&({lo:i,hi:n}=Ft(s,"time",t)),{time:r,pos:a}=s[i],{time:o,pos:l}=s[n]);let c=o-r;return c?a+(l-a)*(t-r)/c:a}var zs=class extends we{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Bi(e,this.min),this._tableRange=Bi(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:i}=this,n=[],r=[],o,a,l,c,h;for(o=0,a=t.length;o=e&&c<=i&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=n.length;o=0?m:1e3+m,(d-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}};var bl={};function jf(s,t={}){let e=JSON.stringify([s,t]),i=bl[e];return i||(i=new Intl.ListFormat(s,t),bl[e]=i),i}var Fr={};function Ar(s,t={}){let e=JSON.stringify([s,t]),i=Fr[e];return i||(i=new Intl.DateTimeFormat(s,t),Fr[e]=i),i}var Lr={};function Uf(s,t={}){let e=JSON.stringify([s,t]),i=Lr[e];return i||(i=new Intl.NumberFormat(s,t),Lr[e]=i),i}var Pr={};function Yf(s,t={}){let{base:e,...i}=t,n=JSON.stringify([s,i]),r=Pr[n];return r||(r=new Intl.RelativeTimeFormat(s,t),Pr[n]=r),r}var oi=null;function Zf(){return oi||(oi=new Intl.DateTimeFormat().resolvedOptions().locale,oi)}var xl={};function qf(s){let t=xl[s];if(!t){let e=new Intl.Locale(s);t="getWeekInfo"in e?e.getWeekInfo():e.weekInfo,xl[s]=t}return t}function Gf(s){let t=s.indexOf("-x-");t!==-1&&(s=s.substring(0,t));let e=s.indexOf("-u-");if(e===-1)return[s];{let i,n;try{i=Ar(s).resolvedOptions(),n=s}catch{let l=s.substring(0,e);i=Ar(l).resolvedOptions(),n=l}let{numberingSystem:r,calendar:o}=i;return[n,r,o]}}function Xf(s,t,e){return(e||t)&&(s.includes("-u-")||(s+="-u"),e&&(s+=`-ca-${e}`),t&&(s+=`-nu-${t}`)),s}function Kf(s){let t=[];for(let e=1;e<=12;e++){let i=v.utc(2009,e,1);t.push(s(i))}return t}function Jf(s){let t=[];for(let e=1;e<=7;e++){let i=v.utc(2016,11,13+e);t.push(s(i))}return t}function on(s,t,e,i){let n=s.listingMode();return n==="error"?null:n==="en"?e(t):i(t)}function Qf(s){return s.numberingSystem&&s.numberingSystem!=="latn"?!1:s.numberingSystem==="latn"||!s.locale||s.locale.startsWith("en")||new Intl.DateTimeFormat(s.intl).resolvedOptions().numberingSystem==="latn"}var Rr=class{constructor(t,e,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;let{padTo:n,floor:r,...o}=i;if(!e||Object.keys(o).length>0){let a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=Uf(t,a)}}format(t){if(this.inf){let e=this.floor?Math.floor(t):t;return this.inf.format(e)}else{let e=this.floor?Math.floor(t):ss(t,3);return q(e,this.padTo)}}},Nr=class{constructor(t,e,i){this.opts=i,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){let o=-1*(t.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&nt.create(a).valid?(n=a,this.dt=t):(n="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,n=t.zone.name):(n="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);let r={...this.opts};r.timeZone=r.timeZone||n,this.dtf=Ar(e,r)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(e=>{if(e.type==="timeZoneName"){let i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:i}}else return e}):t}resolvedOptions(){return this.dtf.resolvedOptions()}},Wr=class{constructor(t,e,i){this.opts={style:"long",...i},!e&&an()&&(this.rtf=Yf(t,i))}format(t,e){return this.rtf?this.rtf.format(t,e):_l(e,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}},tm={firstDay:1,minimalDays:4,weekend:[6,7]},P=class{static fromOpts(t){return P.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,i,n,r=!1){let o=t||z.defaultLocale,a=o||(r?"en-US":Zf()),l=e||z.defaultNumberingSystem,c=i||z.defaultOutputCalendar,h=ai(n)||z.defaultWeekSettings;return new P(a,l,c,h,o)}static resetCache(){oi=null,Fr={},Lr={},Pr={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:i,weekSettings:n}={}){return P.create(t,e,i,n)}constructor(t,e,i,n,r){let[o,a,l]=Gf(t);this.locale=o,this.numberingSystem=e||a||null,this.outputCalendar=i||l||null,this.weekSettings=n,this.intl=Xf(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Qf(this)),this.fastNumbersCached}listingMode(){let t=this.isEnglish(),e=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&e?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:P.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,ai(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return on(this,t,zr,()=>{let i=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=Kf(r=>this.extract(r,i,"month"))),this.monthsCache[n][t]})}weekdays(t,e=!1){return on(this,t,Vr,()=>{let i=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=Jf(r=>this.extract(r,i,"weekday"))),this.weekdaysCache[n][t]})}meridiems(){return on(this,void 0,()=>Hr,()=>{if(!this.meridiemCache){let t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[v.utc(2016,11,13,9),v.utc(2016,11,13,19)].map(e=>this.extract(e,t,"dayperiod"))}return this.meridiemCache})}eras(t){return on(this,t,Br,()=>{let e={era:t};return this.eraCache[t]||(this.eraCache[t]=[v.utc(-40,1,1),v.utc(2017,1,1)].map(i=>this.extract(i,e,"era"))),this.eraCache[t]})}extract(t,e,i){let n=this.dtFormatter(t,e),r=n.formatToParts(),o=r.find(a=>a.type.toLowerCase()===i);return o?o.value:null}numberFormatter(t={}){return new Rr(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new Nr(t,this.intl,e)}relFormatter(t={}){return new Wr(this.intl,this.isEnglish(),t)}listFormatter(t={}){return jf(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ln()?qf(this.locale):tm}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}};var jr=null,G=class extends dt{static get utcInstance(){return jr===null&&(jr=new G(0)),jr}static instance(t){return t===0?G.utcInstance:new G(t)}static parseSpecifier(t){if(t){let e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new G(Se(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${le(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${le(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return le(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}};var is=class extends dt{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Et(s,t){let e;if(D(s)||s===null)return t;if(s instanceof dt)return s;if(wl(s)){let i=s.toLowerCase();return i==="default"?t:i==="local"||i==="system"?zt.instance:i==="utc"||i==="gmt"?G.utcInstance:G.parseSpecifier(i)||nt.create(s)}else return Ct(s)?G.instance(s):typeof s=="object"&&"offset"in s&&typeof s.offset=="function"?s:new is(s)}var Ur={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Sl={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},em=Ur.hanidec.replace(/[\[|\]]/g,"").split("");function kl(s){let t=parseInt(s,10);if(isNaN(t)){t="";for(let e=0;e=r&&i<=o&&(t+=i-r)}}return parseInt(t,10)}else return t}var ns={};function Ml(){ns={}}function St({numberingSystem:s},t=""){let e=s||"latn";return ns[e]||(ns[e]={}),ns[e][t]||(ns[e][t]=new RegExp(`${Ur[e]}${t}`)),ns[e][t]}var vl=()=>Date.now(),Tl="system",Ol=null,Dl=null,El=null,Cl=60,Il,Fl=null,z=class{static get now(){return vl}static set now(t){vl=t}static set defaultZone(t){Tl=t}static get defaultZone(){return Et(Tl,zt.instance)}static get defaultLocale(){return Ol}static set defaultLocale(t){Ol=t}static get defaultNumberingSystem(){return Dl}static set defaultNumberingSystem(t){Dl=t}static get defaultOutputCalendar(){return El}static set defaultOutputCalendar(t){El=t}static get defaultWeekSettings(){return Fl}static set defaultWeekSettings(t){Fl=ai(t)}static get twoDigitCutoffYear(){return Cl}static set twoDigitCutoffYear(t){Cl=t%100}static get throwOnInvalid(){return Il}static set throwOnInvalid(t){Il=t}static resetCaches(){P.resetCache(),nt.resetCache(),v.resetCache(),Ml()}};var rt=class{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var Al=[0,31,59,90,120,151,181,212,243,273,304,334],Ll=[0,31,60,91,121,152,182,213,244,274,305,335];function kt(s,t){return new rt("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${s}, which is invalid`)}function cn(s,t,e){let i=new Date(Date.UTC(s,t-1,e));s<100&&s>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);let n=i.getUTCDay();return n===0?7:n}function Pl(s,t,e){return e+(Me(s)?Ll:Al)[t-1]}function Rl(s,t){let e=Me(s)?Ll:Al,i=e.findIndex(r=>rke(i,t,e)?(c=i+1,l=1):c=i,{weekYear:c,weekNumber:l,weekday:a,...hi(s)}}function Yr(s,t=4,e=1){let{weekYear:i,weekNumber:n,weekday:r}=s,o=hn(cn(i,1,t),e),a=ce(i),l=n*7+r-o-7+t,c;l<1?(c=i-1,l+=ce(c)):l>a?(c=i+1,l-=ce(i)):c=i;let{month:h,day:u}=Rl(c,l);return{year:c,month:h,day:u,...hi(s)}}function un(s){let{year:t,month:e,day:i}=s,n=Pl(t,e,i);return{year:t,ordinal:n,...hi(s)}}function Zr(s){let{year:t,ordinal:e}=s,{month:i,day:n}=Rl(t,e);return{year:t,month:i,day:n,...hi(s)}}function qr(s,t){if(!D(s.localWeekday)||!D(s.localWeekNumber)||!D(s.localWeekYear)){if(!D(s.weekday)||!D(s.weekNumber)||!D(s.weekYear))throw new Tt("Cannot mix locale-based week fields with ISO-based week fields");return D(s.localWeekday)||(s.weekday=s.localWeekday),D(s.localWeekNumber)||(s.weekNumber=s.localWeekNumber),D(s.localWeekYear)||(s.weekYear=s.localWeekYear),delete s.localWeekday,delete s.localWeekNumber,delete s.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Nl(s,t=4,e=1){let i=ci(s.weekYear),n=xt(s.weekNumber,1,ke(s.weekYear,t,e)),r=xt(s.weekday,1,7);return i?n?r?!1:kt("weekday",s.weekday):kt("week",s.weekNumber):kt("weekYear",s.weekYear)}function Wl(s){let t=ci(s.year),e=xt(s.ordinal,1,ce(s.year));return t?e?!1:kt("ordinal",s.ordinal):kt("year",s.year)}function Gr(s){let t=ci(s.year),e=xt(s.month,1,12),i=xt(s.day,1,rs(s.year,s.month));return t?e?i?!1:kt("day",s.day):kt("month",s.month):kt("year",s.year)}function Xr(s){let{hour:t,minute:e,second:i,millisecond:n}=s,r=xt(t,0,23)||t===24&&e===0&&i===0&&n===0,o=xt(e,0,59),a=xt(i,0,59),l=xt(n,0,999);return r?o?a?l?!1:kt("millisecond",n):kt("second",i):kt("minute",e):kt("hour",t)}function D(s){return typeof s>"u"}function Ct(s){return typeof s=="number"}function ci(s){return typeof s=="number"&&s%1===0}function wl(s){return typeof s=="string"}function Vl(s){return Object.prototype.toString.call(s)==="[object Date]"}function an(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ln(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Hl(s){return Array.isArray(s)?s:[s]}function Kr(s,t,e){if(s.length!==0)return s.reduce((i,n)=>{let r=[t(n),n];return i&&e(i[0],r[0])===i[0]?i:r},null)[1]}function Bl(s,t){return t.reduce((e,i)=>(e[i]=s[i],e),{})}function he(s,t){return Object.prototype.hasOwnProperty.call(s,t)}function ai(s){if(s==null)return null;if(typeof s!="object")throw new J("Week settings must be an object");if(!xt(s.firstDay,1,7)||!xt(s.minimalDays,1,7)||!Array.isArray(s.weekend)||s.weekend.some(t=>!xt(t,1,7)))throw new J("Invalid week settings");return{firstDay:s.firstDay,minimalDays:s.minimalDays,weekend:Array.from(s.weekend)}}function xt(s,t,e){return ci(s)&&s>=t&&s<=e}function sm(s,t){return s-t*Math.floor(s/t)}function q(s,t=2){let e=s<0,i;return e?i="-"+(""+-s).padStart(t,"0"):i=(""+s).padStart(t,"0"),i}function qt(s){if(!(D(s)||s===null||s===""))return parseInt(s,10)}function ue(s){if(!(D(s)||s===null||s===""))return parseFloat(s)}function ui(s){if(!(D(s)||s===null||s==="")){let t=parseFloat("0."+s)*1e3;return Math.floor(t)}}function ss(s,t,e=!1){let i=10**t;return(e?Math.trunc:Math.round)(s*i)/i}function Me(s){return s%4===0&&(s%100!==0||s%400===0)}function ce(s){return Me(s)?366:365}function rs(s,t){let e=sm(t-1,12)+1,i=s+(t-e)/12;return e===2?Me(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][e-1]}function es(s){let t=Date.UTC(s.year,s.month-1,s.day,s.hour,s.minute,s.second,s.millisecond);return s.year<100&&s.year>=0&&(t=new Date(t),t.setUTCFullYear(s.year,s.month-1,s.day)),+t}function zl(s,t,e){return-hn(cn(s,1,t),e)+t-1}function ke(s,t=4,e=1){let i=zl(s,t,e),n=zl(s+1,t,e);return(ce(s)-i+n)/7}function di(s){return s>99?s:s>z.twoDigitCutoffYear?1900+s:2e3+s}function sn(s,t,e,i=null){let n=new Date(s),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(r.timeZone=i);let o={timeZoneName:t,...r},a=new Intl.DateTimeFormat(e,o).formatToParts(n).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function Se(s,t){let e=parseInt(s,10);Number.isNaN(e)&&(e=0);let i=parseInt(t,10)||0,n=e<0||Object.is(e,-0)?-i:i;return e*60+n}function Jr(s){let t=Number(s);if(typeof s=="boolean"||s===""||Number.isNaN(t))throw new J(`Invalid unit value ${s}`);return t}function os(s,t){let e={};for(let i in s)if(he(s,i)){let n=s[i];if(n==null)continue;e[t(i)]=Jr(n)}return e}function le(s,t){let e=Math.trunc(Math.abs(s/60)),i=Math.trunc(Math.abs(s%60)),n=s>=0?"+":"-";switch(t){case"short":return`${n}${q(e,2)}:${q(i,2)}`;case"narrow":return`${n}${e}${i>0?`:${i}`:""}`;case"techie":return`${n}${q(e,2)}${q(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function hi(s){return Bl(s,["hour","minute","second","millisecond"])}var im=["January","February","March","April","May","June","July","August","September","October","November","December"],Qr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],nm=["J","F","M","A","M","J","J","A","S","O","N","D"];function zr(s){switch(s){case"narrow":return[...nm];case"short":return[...Qr];case"long":return[...im];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var to=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],eo=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rm=["M","T","W","T","F","S","S"];function Vr(s){switch(s){case"narrow":return[...rm];case"short":return[...eo];case"long":return[...to];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Hr=["AM","PM"],om=["Before Christ","Anno Domini"],am=["BC","AD"],lm=["B","A"];function Br(s){switch(s){case"narrow":return[...lm];case"short":return[...am];case"long":return[...om];default:return null}}function $l(s){return Hr[s.hour<12?0:1]}function jl(s,t){return Vr(t)[s.weekday-1]}function Ul(s,t){return zr(t)[s.month-1]}function Yl(s,t){return Br(t)[s.year<0?0:1]}function _l(s,t,e="always",i=!1){let n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=["hours","minutes","seconds"].indexOf(s)===-1;if(e==="auto"&&r){let u=s==="days";switch(t){case 1:return u?"tomorrow":`next ${n[s][0]}`;case-1:return u?"yesterday":`last ${n[s][0]}`;case 0:return u?"today":`this ${n[s][0]}`;default:}}let o=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=n[s],h=i?l?c[1]:c[2]||c[1]:l?n[s][0]:s;return o?`${a} ${h} ago`:`in ${a} ${h}`}function Zl(s,t){let e="";for(let i of s)i.literal?e+=i.val:e+=t(i.val);return e}var cm={D:ae,DD:Hs,DDD:Bs,DDDD:$s,t:js,tt:Us,ttt:Ys,tttt:Zs,T:qs,TT:Gs,TTT:Xs,TTTT:Ks,f:Js,ff:ti,fff:si,ffff:ni,F:Qs,FF:ei,FFF:ii,FFFF:ri},X=class{static create(t,e={}){return new X(t,e)}static parseFormat(t){let e=null,i="",n=!1,r=[];for(let o=0;o0&&r.push({literal:n||/^\s+$/.test(i),val:i}),e=null,i="",n=!n):n||a===e?i+=a:(i.length>0&&r.push({literal:/^\s+$/.test(i),val:i}),i=a,e=a)}return i.length>0&&r.push({literal:n||/^\s+$/.test(i),val:i}),r}static macroTokenToFormatOpts(t){return cm[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return q(t,e);let i={...this.opts};return e>0&&(i.padTo=e),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,e){let i=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(f,m)=>this.loc.extract(t,f,m),o=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>i?$l(t):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,m)=>i?Ul(t,f):r(m?{month:f}:{month:f,day:"numeric"},"month"),c=(f,m)=>i?jl(t,f):r(m?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),h=f=>{let m=X.macroTokenToFormatOpts(f);return m?this.formatWithSystemDefault(t,m):f},u=f=>i?Yl(t,f):r({era:f},"era"),d=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return n?r({day:"numeric"},"day"):this.num(t.day);case"dd":return n?r({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return n?r({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?r({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return n?r({month:"numeric"},"month"):this.num(t.month);case"MM":return n?r({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return n?r({year:"numeric"},"year"):this.num(t.year);case"yy":return n?r({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?r({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?r({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(f)}};return Zl(X.parseFormat(e),d)}formatDurationFromString(t,e){let i=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=l=>c=>{let h=i(c);return h?this.num(l.get(h),c.length):c},r=X.parseFormat(e),o=r.reduce((l,{literal:c,val:h})=>c?l:l.concat(h),[]),a=t.shiftTo(...o.map(i).filter(l=>l));return Zl(r,n(a))}};var Gl=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ls(...s){let t=s.reduce((e,i)=>e+i.source,"");return RegExp(`^${t}$`)}function cs(...s){return t=>s.reduce(([e,i,n],r)=>{let[o,a,l]=r(t,n);return[{...e,...o},a||i,l]},[{},null,1]).slice(0,2)}function hs(s,...t){if(s==null)return[null,null];for(let[e,i]of t){let n=e.exec(s);if(n)return i(n)}return[null,null]}function Xl(...s){return(t,e)=>{let i={},n;for(n=0;nf!==void 0&&(m||f&&h)?-f:f;return[{years:d(ue(e)),months:d(ue(i)),weeks:d(ue(n)),days:d(ue(r)),hours:d(ue(o)),minutes:d(ue(a)),seconds:d(ue(l),l==="-0"),milliseconds:d(ui(c),u)}]}var Sm={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function no(s,t,e,i,n,r,o){let a={year:t.length===2?di(qt(t)):qt(t),month:Qr.indexOf(e)+1,day:qt(i),hour:qt(n),minute:qt(r)};return o&&(a.second=qt(o)),s&&(a.weekday=s.length>3?to.indexOf(s)+1:eo.indexOf(s)+1),a}var km=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Mm(s){let[,t,e,i,n,r,o,a,l,c,h,u]=s,d=no(t,n,i,e,r,o,a),f;return l?f=Sm[l]:c?f=0:f=Se(h,u),[d,new G(f)]}function vm(s){return s.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var Tm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Om=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Dm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ql(s){let[,t,e,i,n,r,o,a]=s;return[no(t,n,i,e,r,o,a),G.utcInstance]}function Em(s){let[,t,e,i,n,r,o,a]=s;return[no(t,a,e,i,n,r,o),G.utcInstance]}var Cm=ls(um,io),Im=ls(dm,io),Fm=ls(fm,io),Am=ls(Jl),tc=cs(bm,us,fi,mi),Lm=cs(mm,us,fi,mi),Pm=cs(gm,us,fi,mi),Rm=cs(us,fi,mi);function ec(s){return hs(s,[Cm,tc],[Im,Lm],[Fm,Pm],[Am,Rm])}function sc(s){return hs(vm(s),[km,Mm])}function ic(s){return hs(s,[Tm,ql],[Om,ql],[Dm,Em])}function nc(s){return hs(s,[_m,wm])}var Nm=cs(us);function rc(s){return hs(s,[xm,Nm])}var Wm=ls(pm,ym),zm=ls(Ql),Vm=cs(us,fi,mi);function oc(s){return hs(s,[Wm,tc],[zm,Vm])}var ac="Invalid Duration",cc={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Hm={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...cc},Mt=146097/400,ds=146097/4800,Bm={years:{quarters:4,months:12,weeks:Mt/7,days:Mt,hours:Mt*24,minutes:Mt*24*60,seconds:Mt*24*60*60,milliseconds:Mt*24*60*60*1e3},quarters:{months:3,weeks:Mt/28,days:Mt/4,hours:Mt*24/4,minutes:Mt*24*60/4,seconds:Mt*24*60*60/4,milliseconds:Mt*24*60*60*1e3/4},months:{weeks:ds/7,days:ds,hours:ds*24,minutes:ds*24*60,seconds:ds*24*60*60,milliseconds:ds*24*60*60*1e3},...cc},ve=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],$m=ve.slice(0).reverse();function de(s,t,e=!1){let i={values:e?t.values:{...s.values,...t.values||{}},loc:s.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||s.conversionAccuracy,matrix:t.matrix||s.matrix};return new I(i)}function hc(s,t){let e=t.milliseconds??0;for(let i of $m.slice(1))t[i]&&(e+=t[i]*s[i].milliseconds);return e}function lc(s,t){let e=hc(s,t)<0?-1:1;ve.reduceRight((i,n)=>{if(D(t[n]))return i;if(i){let r=t[i]*e,o=s[n][i],a=Math.floor(r/o);t[n]+=a*e,t[i]-=a*o*e}return n},null),ve.reduce((i,n)=>{if(D(t[n]))return i;if(i){let r=t[i]%1;t[i]-=r,t[n]+=r*s[i][n]}return n},null)}function jm(s){let t={};for(let[e,i]of Object.entries(s))i!==0&&(t[e]=i);return t}var I=class{constructor(t){let e=t.conversionAccuracy==="longterm"||!1,i=e?Bm:Hm;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||P.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,e){return I.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(t==null||typeof t!="object")throw new J(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new I({values:os(t,I.normalizeUnit),loc:P.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Ct(t))return I.fromMillis(t);if(I.isDuration(t))return t;if(typeof t=="object")return I.fromObject(t);throw new J(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){let[i]=nc(t);return i?I.fromObject(i,e):I.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){let[i]=rc(t);return i?I.fromObject(i,e):I.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new J("need to specify a reason the Duration is invalid");let i=t instanceof rt?t:new rt(t,e);if(z.throwOnInvalid)throw new tn(i);return new I({invalid:i})}static normalizeUnit(t){let e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!e)throw new ts(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){let i={...e,floor:e.round!==!1&&e.floor!==!1};return this.isValid?X.create(this.loc,i).formatDurationFromString(this,t):ac}toHuman(t={}){if(!this.isValid)return ac;let e=ve.map(i=>{let n=this.values[i];return D(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:i.slice(0,-1)}).format(n)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=ss(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;let e=this.toMillis();return e<0||e>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},v.fromMillis(e,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hc(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let e=I.fromDurationLike(t),i={};for(let n of ve)(he(e.values,n)||he(this.values,n))&&(i[n]=e.get(n)+this.get(n));return de(this,{values:i},!0)}minus(t){if(!this.isValid)return this;let e=I.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;let e={};for(let i of Object.keys(this.values))e[i]=Jr(t(this.values[i],i));return de(this,{values:e},!0)}get(t){return this[I.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let e={...this.values,...os(t,I.normalizeUnit)};return de(this,{values:e})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:i,matrix:n}={}){let o={loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:n,conversionAccuracy:i};return de(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;let t=this.toObject();return lc(this.matrix,t),de(this,{values:t},!0)}rescale(){if(!this.isValid)return this;let t=jm(this.normalize().shiftToAll().toObject());return de(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>I.normalizeUnit(o));let e={},i={},n=this.toObject(),r;for(let o of ve)if(t.indexOf(o)>=0){r=o;let a=0;for(let c in i)a+=this.matrix[c][o]*i[c],i[c]=0;Ct(n[o])&&(a+=n[o]);let l=Math.trunc(a);e[o]=l,i[o]=(a*1e3-l*1e3)/1e3}else Ct(n[o])&&(i[o]=n[o]);for(let o in i)i[o]!==0&&(e[r]+=o===r?i[o]:i[o]/this.matrix[r][o]);return lc(this.matrix,e),de(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let t={};for(let e of Object.keys(this.values))t[e]=this.values[e]===0?0:-this.values[e];return de(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function e(i,n){return i===void 0||i===0?n===void 0||n===0:i===n}for(let i of ve)if(!e(this.values[i],t.values[i]))return!1;return!0}};var fs="Invalid Interval";function Um(s,t){return!s||!s.isValid?U.invalid("missing or invalid start"):!t||!t.isValid?U.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:e}={}){return this.isValid?U.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];let e=t.map(ms).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),i=[],{s:n}=this,r=0;for(;n+this.e?this.e:o;i.push(U.fromDateTimes(n,a)),n=a,r+=1}return i}splitBy(t){let e=I.fromDurationLike(t);if(!this.isValid||!e.isValid||e.as("milliseconds")===0)return[];let{s:i}=this,n=1,r,o=[];for(;il*n));r=+a>+this.e?this.e:a,o.push(U.fromDateTimes(i,r)),i=r,n+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;let e=this.s>t.s?this.s:t.s,i=this.e=i?null:U.fromDateTimes(e,i)}union(t){if(!this.isValid)return this;let e=this.st.e?this.e:t.e;return U.fromDateTimes(e,i)}static merge(t){let[e,i]=t.sort((n,r)=>n.s-r.s).reduce(([n,r],o)=>r?r.overlaps(o)||r.abutsStart(o)?[n,r.union(o)]:[n.concat([r]),o]:[n,o],[[],null]);return i&&e.push(i),e}static xor(t){let e=null,i=0,n=[],r=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...r),a=o.sort((l,c)=>l.time-c.time);for(let l of a)i+=l.type==="s"?1:-1,i===1?e=l.time:(e&&+e!=+l.time&&n.push(U.fromDateTimes(e,l.time)),e=null);return U.merge(n)}difference(...t){return U.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:fs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=ae,e={}){return this.isValid?X.create(this.s.loc.clone(e),t).formatInterval(this):fs}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:fs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:fs}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:fs}toFormat(t,{separator:e=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:fs}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):I.invalid(this.invalidReason)}mapEndpoints(t){return U.fromDateTimes(t(this.s),t(this.e))}};var Gt=class{static hasDST(t=z.defaultZone){let e=v.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return nt.isValidZone(t)}static normalizeZone(t){return Et(t,z.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||P.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||P.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||P.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||P.create(e,i,r)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||P.create(e,i,r)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||P.create(e,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||P.create(e,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return P.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return P.create(e,null,"gregory").eras(t)}static features(){return{relative:an(),localeWeek:ln()}}};function uc(s,t){let e=n=>n.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=e(t)-e(s);return Math.floor(I.fromMillis(i).as("days"))}function Ym(s,t,e){let i=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let h=uc(l,c);return(h-h%7)/7}],["days",uc]],n={},r=s,o,a;for(let[l,c]of i)e.indexOf(l)>=0&&(o=l,n[l]=c(s,t),a=r.plus(n),a>t?(n[l]--,s=r.plus(n),s>t&&(a=s,n[l]--,s=r.plus(n))):s=a);return[s,n,a,o]}function dc(s,t,e,i){let[n,r,o,a]=Ym(s,t,e),l=t-n,c=e.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);c.length===0&&(o0?I.fromMillis(l,i).shiftTo(...c).plus(h):h}var Zm="missing Intl.DateTimeFormat.formatToParts support";function V(s,t=e=>e){return{regex:s,deser:([e])=>t(kl(e))}}var qm=String.fromCharCode(160),gc=`[ ${qm}]`,pc=new RegExp(gc,"g");function Gm(s){return s.replace(/\./g,"\\.?").replace(pc,gc)}function fc(s){return s.replace(/\./g,"").replace(pc," ").toLowerCase()}function It(s,t){return s===null?null:{regex:RegExp(s.map(Gm).join("|")),deser:([e])=>s.findIndex(i=>fc(e)===fc(i))+t}}function mc(s,t){return{regex:s,deser:([,e,i])=>Se(e,i),groups:t}}function dn(s){return{regex:s,deser:([t])=>t}}function Xm(s){return s.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Km(s,t){let e=St(t),i=St(t,"{2}"),n=St(t,"{3}"),r=St(t,"{4}"),o=St(t,"{6}"),a=St(t,"{1,2}"),l=St(t,"{1,3}"),c=St(t,"{1,6}"),h=St(t,"{1,9}"),u=St(t,"{2,4}"),d=St(t,"{4,6}"),f=p=>({regex:RegExp(Xm(p.val)),deser:([y])=>y,literal:!0}),g=(p=>{if(s.literal)return f(p);switch(p.val){case"G":return It(t.eras("short"),0);case"GG":return It(t.eras("long"),0);case"y":return V(c);case"yy":return V(u,di);case"yyyy":return V(r);case"yyyyy":return V(d);case"yyyyyy":return V(o);case"M":return V(a);case"MM":return V(i);case"MMM":return It(t.months("short",!0),1);case"MMMM":return It(t.months("long",!0),1);case"L":return V(a);case"LL":return V(i);case"LLL":return It(t.months("short",!1),1);case"LLLL":return It(t.months("long",!1),1);case"d":return V(a);case"dd":return V(i);case"o":return V(l);case"ooo":return V(n);case"HH":return V(i);case"H":return V(a);case"hh":return V(i);case"h":return V(a);case"mm":return V(i);case"m":return V(a);case"q":return V(a);case"qq":return V(i);case"s":return V(a);case"ss":return V(i);case"S":return V(l);case"SSS":return V(n);case"u":return dn(h);case"uu":return dn(a);case"uuu":return V(e);case"a":return It(t.meridiems(),0);case"kkkk":return V(r);case"kk":return V(u,di);case"W":return V(a);case"WW":return V(i);case"E":case"c":return V(e);case"EEE":return It(t.weekdays("short",!1),1);case"EEEE":return It(t.weekdays("long",!1),1);case"ccc":return It(t.weekdays("short",!0),1);case"cccc":return It(t.weekdays("long",!0),1);case"Z":case"ZZ":return mc(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return mc(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return dn(/[a-z_+-/]{1,256}?/i);case" ":return dn(/[^\S\n\r]/);default:return f(p)}})(s)||{invalidReason:Zm};return g.token=s,g}var Jm={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Qm(s,t,e){let{type:i,value:n}=s;if(i==="literal"){let l=/^\s+$/.test(n);return{literal:!l,val:l?" ":n}}let r=t[i],o=i;i==="hour"&&(t.hour12!=null?o=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?o="hour12":o="hour24":o=e.hour12?"hour12":"hour24");let a=Jm[o];if(typeof a=="object"&&(a=a[r]),a)return{literal:!1,val:a}}function tg(s){return[`^${s.map(e=>e.regex).reduce((e,i)=>`${e}(${i.source})`,"")}$`,s]}function eg(s,t,e){let i=s.match(t);if(i){let n={},r=1;for(let o in e)if(he(e,o)){let a=e[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(n[a.token.val[0]]=a.deser(i.slice(r,r+l))),r+=l}return[i,n]}else return[i,{}]}function sg(s){let t=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},e=null,i;return D(s.z)||(e=nt.create(s.z)),D(s.Z)||(e||(e=new G(s.Z)),i=s.Z),D(s.q)||(s.M=(s.q-1)*3+1),D(s.h)||(s.h<12&&s.a===1?s.h+=12:s.h===12&&s.a===0&&(s.h=0)),s.G===0&&s.y&&(s.y=-s.y),D(s.u)||(s.S=ui(s.u)),[Object.keys(s).reduce((r,o)=>{let a=t(o);return a&&(r[a]=s[o]),r},{}),e,i]}var ro=null;function ig(){return ro||(ro=v.fromMillis(1555555555555)),ro}function ng(s,t){if(s.literal)return s;let e=X.macroTokenToFormatOpts(s.val),i=lo(e,t);return i==null||i.includes(void 0)?s:i}function oo(s,t){return Array.prototype.concat(...s.map(e=>ng(e,t)))}var gi=class{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=oo(X.parseFormat(e),t),this.units=this.tokens.map(i=>Km(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){let[i,n]=tg(this.units);this.regex=RegExp(i,"i"),this.handlers=n}}explainFromTokens(t){if(this.isValid){let[e,i]=eg(t,this.regex,this.handlers),[n,r,o]=i?sg(i):[null,null,void 0];if(he(i,"a")&&he(i,"H"))throw new Tt("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:i,result:n,zone:r,specificOffset:o}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function ao(s,t,e){return new gi(s,e).explainFromTokens(t)}function yc(s,t,e){let{result:i,zone:n,specificOffset:r,invalidReason:o}=ao(s,t,e);return[i,n,r,o]}function lo(s,t){if(!s)return null;let i=X.create(t,s).dtFormatter(ig()),n=i.formatToParts(),r=i.resolvedOptions();return n.map(o=>Qm(o,s,r))}var co="Invalid DateTime",bc=864e13;function pi(s){return new rt("unsupported zone",`the zone "${s.name}" is not supported`)}function ho(s){return s.weekData===null&&(s.weekData=li(s.c)),s.weekData}function uo(s){return s.localWeekData===null&&(s.localWeekData=li(s.c,s.loc.getMinDaysInFirstWeek(),s.loc.getStartOfWeek())),s.localWeekData}function Te(s,t){let e={ts:s.ts,zone:s.zone,c:s.c,o:s.o,loc:s.loc,invalid:s.invalid};return new v({...e,...t,old:e})}function vc(s,t,e){let i=s-t*60*1e3,n=e.offset(i);if(t===n)return[i,t];i-=(n-t)*60*1e3;let r=e.offset(i);return n===r?[i,n]:[s-Math.min(n,r)*60*1e3,Math.max(n,r)]}function fn(s,t){s+=t*60*1e3;let e=new Date(s);return{year:e.getUTCFullYear(),month:e.getUTCMonth()+1,day:e.getUTCDate(),hour:e.getUTCHours(),minute:e.getUTCMinutes(),second:e.getUTCSeconds(),millisecond:e.getUTCMilliseconds()}}function gn(s,t,e){return vc(es(s),t,e)}function xc(s,t){let e=s.o,i=s.c.year+Math.trunc(t.years),n=s.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,r={...s.c,year:i,month:n,day:Math.min(s.c.day,rs(i,n))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=I.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=es(r),[l,c]=vc(a,e,s.zone);return o!==0&&(l+=o,c=s.zone.offset(l)),{ts:l,o:c}}function gs(s,t,e,i,n,r){let{setZone:o,zone:a}=e;if(s&&Object.keys(s).length!==0||t){let l=t||a,c=v.fromObject(s,{...e,zone:l,specificOffset:r});return o?c:c.setZone(a)}else return v.invalid(new rt("unparsable",`the input "${n}" can't be parsed as ${i}`))}function mn(s,t,e=!0){return s.isValid?X.create(P.create("en-US"),{allowZ:e,forceSimple:!0}).formatDateTimeFromString(s,t):null}function fo(s,t){let e=s.c.year>9999||s.c.year<0,i="";return e&&s.c.year>=0&&(i+="+"),i+=q(s.c.year,e?6:4),t?(i+="-",i+=q(s.c.month),i+="-",i+=q(s.c.day)):(i+=q(s.c.month),i+=q(s.c.day)),i}function _c(s,t,e,i,n,r){let o=q(s.c.hour);return t?(o+=":",o+=q(s.c.minute),(s.c.millisecond!==0||s.c.second!==0||!e)&&(o+=":")):o+=q(s.c.minute),(s.c.millisecond!==0||s.c.second!==0||!e)&&(o+=q(s.c.second),(s.c.millisecond!==0||!i)&&(o+=".",o+=q(s.c.millisecond,3))),n&&(s.isOffsetFixed&&s.offset===0&&!r?o+="Z":s.o<0?(o+="-",o+=q(Math.trunc(-s.o/60)),o+=":",o+=q(Math.trunc(-s.o%60))):(o+="+",o+=q(Math.trunc(s.o/60)),o+=":",o+=q(Math.trunc(s.o%60)))),r&&(o+="["+s.zone.ianaName+"]"),o}var Tc={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rg={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},og={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Oc=["year","month","day","hour","minute","second","millisecond"],ag=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lg=["year","ordinal","hour","minute","second","millisecond"];function cg(s){let t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[s.toLowerCase()];if(!t)throw new ts(s);return t}function wc(s){switch(s.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return cg(s)}}function hg(s){return yn[s]||(pn===void 0&&(pn=z.now()),yn[s]=s.offset(pn)),yn[s]}function Sc(s,t){let e=Et(t.zone,z.defaultZone);if(!e.isValid)return v.invalid(pi(e));let i=P.fromObject(t),n,r;if(D(s.year))n=z.now();else{for(let l of Oc)D(s[l])&&(s[l]=Tc[l]);let o=Gr(s)||Xr(s);if(o)return v.invalid(o);let a=hg(e);[n,r]=gn(s,a,e)}return new v({ts:n,zone:e,loc:i,o:r})}function kc(s,t,e){let i=D(e.round)?!0:e.round,n=(o,a)=>(o=ss(o,i||e.calendary?0:2,!0),t.loc.clone(e).relFormatter(e).format(o,a)),r=o=>e.calendary?t.hasSame(s,o)?0:t.startOf(o).diff(s.startOf(o),o).get(o):t.diff(s,o).get(o);if(e.unit)return n(r(e.unit),e.unit);for(let o of e.units){let a=r(o);if(Math.abs(a)>=1)return n(a,o)}return n(s>t?-0:0,e.units[e.units.length-1])}function Mc(s){let t={},e;return s.length>0&&typeof s[s.length-1]=="object"?(t=s[s.length-1],e=Array.from(s).slice(0,s.length-1)):e=Array.from(s),[t,e]}var pn,yn={},v=class{constructor(t){let e=t.zone||z.defaultZone,i=t.invalid||(Number.isNaN(t.ts)?new rt("invalid input"):null)||(e.isValid?null:pi(e));this.ts=D(t.ts)?z.now():t.ts;let n=null,r=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,r]=[t.old.c,t.old.o];else{let a=Ct(t.o)&&!t.old?t.o:e.offset(this.ts);n=fn(this.ts,a),i=Number.isNaN(n.year)?new rt("invalid input"):null,n=i?null:n,r=i?null:a}this._zone=e,this.loc=t.loc||P.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=n,this.o=r,this.isLuxonDateTime=!0}static now(){return new v({})}static local(){let[t,e]=Mc(arguments),[i,n,r,o,a,l,c]=e;return Sc({year:i,month:n,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static utc(){let[t,e]=Mc(arguments),[i,n,r,o,a,l,c]=e;return t.zone=G.utcInstance,Sc({year:i,month:n,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,e={}){let i=Vl(t)?t.valueOf():NaN;if(Number.isNaN(i))return v.invalid("invalid input");let n=Et(e.zone,z.defaultZone);return n.isValid?new v({ts:i,zone:n,loc:P.fromObject(e)}):v.invalid(pi(n))}static fromMillis(t,e={}){if(Ct(t))return t<-bc||t>bc?v.invalid("Timestamp out of range"):new v({ts:t,zone:Et(e.zone,z.defaultZone),loc:P.fromObject(e)});throw new J(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Ct(t))return new v({ts:t*1e3,zone:Et(e.zone,z.defaultZone),loc:P.fromObject(e)});throw new J("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};let i=Et(e.zone,z.defaultZone);if(!i.isValid)return v.invalid(pi(i));let n=P.fromObject(e),r=os(t,wc),{minDaysInFirstWeek:o,startOfWeek:a}=qr(r,n),l=z.now(),c=D(e.specificOffset)?i.offset(l):e.specificOffset,h=!D(r.ordinal),u=!D(r.year),d=!D(r.month)||!D(r.day),f=u||d,m=r.weekYear||r.weekNumber;if((f||h)&&m)throw new Tt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&h)throw new Tt("Can't mix ordinal dates with month/day");let g=m||r.weekday&&!f,p,y,b=fn(l,c);g?(p=ag,y=rg,b=li(b,o,a)):h?(p=lg,y=og,b=un(b)):(p=Oc,y=Tc);let _=!1;for(let F of p){let W=r[F];D(W)?_?r[F]=y[F]:r[F]=b[F]:_=!0}let w=g?Nl(r,o,a):h?Wl(r):Gr(r),x=w||Xr(r);if(x)return v.invalid(x);let S=g?Yr(r,o,a):h?Zr(r):r,[k,O]=gn(S,c,i),T=new v({ts:k,zone:i,o:O,loc:n});return r.weekday&&f&&t.weekday!==T.weekday?v.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${T.toISO()}`):T.isValid?T:v.invalid(T.invalid)}static fromISO(t,e={}){let[i,n]=ec(t);return gs(i,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){let[i,n]=sc(t);return gs(i,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){let[i,n]=ic(t);return gs(i,n,e,"HTTP",e)}static fromFormat(t,e,i={}){if(D(t)||D(e))throw new J("fromFormat requires an input string and a format");let{locale:n=null,numberingSystem:r=null}=i,o=P.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),[a,l,c,h]=yc(o,t,e);return h?v.invalid(h):gs(a,l,i,`format ${e}`,t,c)}static fromString(t,e,i={}){return v.fromFormat(t,e,i)}static fromSQL(t,e={}){let[i,n]=oc(t);return gs(i,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new J("need to specify a reason the DateTime is invalid");let i=t instanceof rt?t:new rt(t,e);if(z.throwOnInvalid)throw new Ji(i);return new v({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){let i=lo(t,P.fromObject(e));return i?i.map(n=>n?n.val:null).join(""):null}static expandFormat(t,e={}){return oo(X.parseFormat(t),P.fromObject(e)).map(n=>n.val).join("")}static resetCache(){pn=void 0,yn={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ho(this).weekYear:NaN}get weekNumber(){return this.isValid?ho(this).weekNumber:NaN}get weekday(){return this.isValid?ho(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?uo(this).weekday:NaN}get localWeekNumber(){return this.isValid?uo(this).weekNumber:NaN}get localWeekYear(){return this.isValid?uo(this).weekYear:NaN}get ordinal(){return this.isValid?un(this.c).ordinal:NaN}get monthShort(){return this.isValid?Gt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Gt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Gt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Gt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let t=864e5,e=6e4,i=es(this.c),n=this.zone.offset(i-t),r=this.zone.offset(i+t),o=this.zone.offset(i-n*e),a=this.zone.offset(i-r*e);if(o===a)return[this];let l=i-o*e,c=i-a*e,h=fn(l,o),u=fn(c,a);return h.hour===u.hour&&h.minute===u.minute&&h.second===u.second&&h.millisecond===u.millisecond?[Te(this,{ts:l}),Te(this,{ts:c})]:[this]}get isInLeapYear(){return Me(this.year)}get daysInMonth(){return rs(this.year,this.month)}get daysInYear(){return this.isValid?ce(this.year):NaN}get weeksInWeekYear(){return this.isValid?ke(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ke(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){let{locale:e,numberingSystem:i,calendar:n}=X.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:i,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(G.instance(t),e)}toLocal(){return this.setZone(z.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:i=!1}={}){if(t=Et(t,z.defaultZone),t.equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||i){let r=t.offset(this.ts),o=this.toObject();[n]=gn(o,r,t)}return Te(this,{ts:n,zone:t})}else return v.invalid(pi(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:i}={}){let n=this.loc.clone({locale:t,numberingSystem:e,outputCalendar:i});return Te(this,{loc:n})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;let e=os(t,wc),{minDaysInFirstWeek:i,startOfWeek:n}=qr(e,this.loc),r=!D(e.weekYear)||!D(e.weekNumber)||!D(e.weekday),o=!D(e.ordinal),a=!D(e.year),l=!D(e.month)||!D(e.day),c=a||l,h=e.weekYear||e.weekNumber;if((c||o)&&h)throw new Tt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new Tt("Can't mix ordinal dates with month/day");let u;r?u=Yr({...li(this.c,i,n),...e},i,n):D(e.ordinal)?(u={...this.toObject(),...e},D(e.day)&&(u.day=Math.min(rs(u.year,u.month),u.day))):u=Zr({...un(this.c),...e});let[d,f]=gn(u,this.o,this.zone);return Te(this,{ts:d,o:f})}plus(t){if(!this.isValid)return this;let e=I.fromDurationLike(t);return Te(this,xc(this,e))}minus(t){if(!this.isValid)return this;let e=I.fromDurationLike(t).negate();return Te(this,xc(this,e))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;let i={},n=I.normalizeUnit(t);switch(n){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break;case"milliseconds":break}if(n==="weeks")if(e){let r=this.loc.getStartOfWeek(),{weekday:o}=this;othis.valueOf(),a=o?this:t,l=o?t:this,c=dc(a,l,r,n);return o?c.negate():c}diffNow(t="milliseconds",e={}){return this.diff(v.now(),t,e)}until(t){return this.isValid?U.fromDateTimes(this,t):this}hasSame(t,e,i){if(!this.isValid)return!1;let n=t.valueOf(),r=this.setZone(t.zone,{keepLocalTime:!0});return r.startOf(e,i)<=n&&n<=r.endOf(e,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;let e=t.base||v.fromObject({},{zone:this.zone}),i=t.padding?thise.valueOf(),Math.min)}static max(...t){if(!t.every(v.isDateTime))throw new J("max requires all arguments be DateTimes");return Kr(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(t,e,i={}){let{locale:n=null,numberingSystem:r=null}=i,o=P.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return ao(o,t,e)}static fromStringExplain(t,e,i={}){return v.fromFormatExplain(t,e,i)}static buildFormatParser(t,e={}){let{locale:i=null,numberingSystem:n=null}=e,r=P.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0});return new gi(r,t)}static fromFormatParser(t,e,i={}){if(D(t)||D(e))throw new J("fromFormatParser requires an input string and a format parser");let{locale:n=null,numberingSystem:r=null}=i,o=P.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});if(!o.equals(e.locale))throw new J(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${e.locale}`);let{result:a,zone:l,specificOffset:c,invalidReason:h}=e.explainFromTokens(t);return h?v.invalid(h):gs(a,l,i,`format ${e.format}`,t,c)}static get DATE_SHORT(){return ae}static get DATE_MED(){return Hs}static get DATE_MED_WITH_WEEKDAY(){return Er}static get DATE_FULL(){return Bs}static get DATE_HUGE(){return $s}static get TIME_SIMPLE(){return js}static get TIME_WITH_SECONDS(){return Us}static get TIME_WITH_SHORT_OFFSET(){return Ys}static get TIME_WITH_LONG_OFFSET(){return Zs}static get TIME_24_SIMPLE(){return qs}static get TIME_24_WITH_SECONDS(){return Gs}static get TIME_24_WITH_SHORT_OFFSET(){return Xs}static get TIME_24_WITH_LONG_OFFSET(){return Ks}static get DATETIME_SHORT(){return Js}static get DATETIME_SHORT_WITH_SECONDS(){return Qs}static get DATETIME_MED(){return ti}static get DATETIME_MED_WITH_SECONDS(){return ei}static get DATETIME_MED_WITH_WEEKDAY(){return Cr}static get DATETIME_FULL(){return si}static get DATETIME_FULL_WITH_SECONDS(){return ii}static get DATETIME_HUGE(){return ni}static get DATETIME_HUGE_WITH_SECONDS(){return ri}};function ms(s){if(v.isDateTime(s))return s;if(s&&s.valueOf&&Ct(s.valueOf()))return v.fromJSDate(s);if(s&&typeof s=="object")return v.fromObject(s);throw new J(`Unknown datetime argument: ${s}, of type ${typeof s}`)}var ug={datetime:v.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:v.TIME_WITH_SECONDS,minute:v.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};Or._date.override({_id:"luxon",_create:function(s){return v.fromMillis(s,this.options)},init(s){this.options.locale||(this.options.locale=s.locale)},formats:function(){return ug},parse:function(s,t){let e=this.options,i=typeof s;return s===null||i==="undefined"?null:(i==="number"?s=this._create(s):i==="string"?typeof t=="string"?s=v.fromFormat(s,t,e):s=v.fromISO(s,e):s instanceof Date?s=v.fromJSDate(s,e):i==="object"&&!(s instanceof v)&&(s=v.fromObject(s,e)),s.isValid?s.valueOf():null)},format:function(s,t){let e=this._create(s);return typeof t=="string"?e.toFormat(t):e.toLocaleString(t)},add:function(s,t,e){let i={};return i[e]=t,this._create(s).plus(i).valueOf()},diff:function(s,t,e){return this._create(s).diff(this._create(t)).as(e).valueOf()},startOf:function(s,t,e){if(t==="isoWeek"){e=Math.trunc(Math.min(Math.max(0,e),6));let i=this._create(s);return i.minus({days:(i.weekday-e+7)%7}).startOf("day").valueOf()}return t?this._create(s).startOf(t).valueOf():s},endOf:function(s,t){return this._create(s).endOf(t).valueOf()}});function bn({cachedData:s,options:t,type:e}){return{init:function(){this.initChart(),this.$wire.$on("updateChartData",({data:i})=>{bn=this.getChart(),bn.data=i,bn.update("resize")}),Alpine.effect(()=>{Alpine.store("theme"),this.$nextTick(()=>{this.getChart()&&(this.getChart().destroy(),this.initChart())})}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Alpine.store("theme")==="system"&&this.$nextTick(()=>{this.getChart().destroy(),this.initChart()})})},initChart:function(i=null){var o,a,l,c,h,u,d,f,m;if(!this.$refs.canvas||!this.$refs.backgroundColorElement||!this.$refs.borderColorElement||!this.$refs.textColorElement||!this.$refs.gridColorElement)return;Wt.defaults.animation.duration=0,Wt.defaults.backgroundColor=getComputedStyle(this.$refs.backgroundColorElement).color;let n=getComputedStyle(this.$refs.borderColorElement).color;Wt.defaults.borderColor=n,Wt.defaults.color=getComputedStyle(this.$refs.textColorElement).color,Wt.defaults.font.family=getComputedStyle(this.$el).fontFamily,Wt.defaults.plugins.legend.labels.boxWidth=12,Wt.defaults.plugins.legend.position="bottom";let r=getComputedStyle(this.$refs.gridColorElement).color;return t??(t={}),t.borderWidth??(t.borderWidth=2),t.pointBackgroundColor??(t.pointBackgroundColor=n),t.pointHitRadius??(t.pointHitRadius=4),t.pointRadius??(t.pointRadius=2),t.scales??(t.scales={}),(o=t.scales).x??(o.x={}),(a=t.scales.x).grid??(a.grid={}),(l=t.scales.x.grid).color??(l.color=r),(c=t.scales.x.grid).display??(c.display=!1),(h=t.scales.x.grid).drawBorder??(h.drawBorder=!1),(u=t.scales).y??(u.y={}),(d=t.scales.y).grid??(d.grid={}),(f=t.scales.y.grid).color??(f.color=r),(m=t.scales.y.grid).drawBorder??(m.drawBorder=!1),new Wt(this.$refs.canvas,{type:e,data:i??s,options:t,plugins:window.filamentChartJsPlugins??[]})},getChart:function(){return this.$refs.canvas?Wt.getChart(this.$refs.canvas):null}}}export{bn as default}; +function Ft(){}var Do=function(){let i=0;return function(){return i++}}();function P(i){return i===null||typeof i>"u"}function B(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function F(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}var q=i=>(typeof i=="number"||i instanceof Number)&&isFinite(+i);function ft(i,t){return q(i)?i:t}function E(i,t){return typeof i>"u"?t:i}var Eo=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:i/t,En=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function $(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function V(i,t,e,s){let n,r,o;if(B(i))if(r=i.length,s)for(n=r-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function Vt(i,t){return(mo[t]||(mo[t]=Ic(t)))(i)}function Ic(i){let t=Cc(i);return e=>{for(let s of t){if(s==="")break;e=e&&e[s]}return e}}function Cc(i){let t=i.split("."),e=[],s="";for(let n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function vs(i){return i.charAt(0).toUpperCase()+i.slice(1)}var dt=i=>typeof i<"u",zt=i=>typeof i=="function",In=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};function Co(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var j=Math.PI,H=2*j,Fc=H+j,ks=Number.POSITIVE_INFINITY,Ac=j/180,U=j/2,pi=j/4,go=j*2/3,mt=Math.log10,Mt=Math.sign;function Cn(i){let t=Math.round(i);i=Pe(i,t,i/1e3)?t:i;let e=Math.pow(10,Math.floor(mt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function Fo(i){let t=[],e=Math.sqrt(i),s;for(s=1;sn-r).pop(),t}function ge(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Pe(i,t,e){return Math.abs(i-t)=i}function Fn(i,t,e){let s,n,r;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Ds(i,t,e){e=e||(o=>i[o]1;)r=n+s>>1,e(r)?n=r:s=r;return{lo:n,hi:s}}var Ct=(i,t,e,s)=>Ds(i,e,s?n=>i[n][t]<=e:n=>i[n][t]Ds(i,e,s=>i[s][t]>=e);function No(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{let s="_onData"+vs(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...r){let o=n.apply(this,r);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...r)}),o}})})}function Pn(i,t){let e=i._chartjs;if(!e)return;let s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Ro.forEach(r=>{delete i[r]}),delete i._chartjs)}function Nn(i){let t=new Set,e,s;for(e=0,s=i.length;e"u"?function(i){return i()}:window.requestAnimationFrame}();function Wn(i,t,e){let s=e||(o=>Array.prototype.slice.call(o)),n=!1,r=[];return function(...o){r=s(o),n||(n=!0,Rn.call(window,()=>{n=!1,i.apply(t,r)}))}}function zo(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}var Es=i=>i==="start"?"left":i==="end"?"right":"center",nt=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Vo=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function zn(i,t,e){let s=t.length,n=0,r=s;if(i._sorted){let{iScale:o,_parsed:a}=i,l=o.axis,{min:c,max:h,minDefined:u,maxDefined:d}=o.getUserBounds();u&&(n=tt(Math.min(Ct(a,o.axis,c).lo,e?s:Ct(t,l,o.getPixelForValue(c)).lo),0,s-1)),d?r=tt(Math.max(Ct(a,o.axis,h,!0).hi+1,e?0:Ct(t,l,o.getPixelForValue(h),!0).hi+1),n,s)-n:r=s-n}return{start:n,count:r}}function Vn(i){let{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;let r=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),r}var ys=i=>i===0||i===1,po=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*H/e)),yo=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*H/e)+1,Ie={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*U)+1,easeOutSine:i=>Math.sin(i*U),easeInOutSine:i=>-.5*(Math.cos(j*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ys(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ys(i)?i:po(i,.075,.3),easeOutElastic:i=>ys(i)?i:yo(i,.075,.3),easeInOutElastic(i){return ys(i)?i:i<.5?.5*po(i*2,.1125,.45):.5+.5*yo(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ie.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ie.easeInBounce(i*2)*.5:Ie.easeOutBounce(i*2-1)*.5+.5};function wi(i){return i+.5|0}var Gt=(i,t,e)=>Math.max(Math.min(i,e),t);function yi(i){return Gt(wi(i*2.55),0,255)}function Xt(i){return Gt(wi(i*255),0,255)}function Wt(i){return Gt(wi(i/2.55)/100,0,1)}function bo(i){return Gt(wi(i*100),0,100)}var xt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},vn=[..."0123456789ABCDEF"],Pc=i=>vn[i&15],Nc=i=>vn[(i&240)>>4]+vn[i&15],bs=i=>(i&240)>>4===(i&15),Rc=i=>bs(i.r)&&bs(i.g)&&bs(i.b)&&bs(i.a);function Wc(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&xt[i[1]]*17,g:255&xt[i[2]]*17,b:255&xt[i[3]]*17,a:t===5?xt[i[4]]*17:255}:(t===7||t===9)&&(e={r:xt[i[1]]<<4|xt[i[2]],g:xt[i[3]]<<4|xt[i[4]],b:xt[i[5]]<<4|xt[i[6]],a:t===9?xt[i[7]]<<4|xt[i[8]]:255})),e}var zc=(i,t)=>i<255?t(i):"";function Vc(i){var t=Rc(i)?Pc:Nc;return i?"#"+t(i.r)+t(i.g)+t(i.b)+zc(i.a,t):void 0}var Hc=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ho(i,t,e){let s=t*Math.min(e,1-e),n=(r,o=(r+i/30)%12)=>e-s*Math.max(Math.min(o-3,9-o,1),-1);return[n(0),n(8),n(4)]}function Bc(i,t,e){let s=(n,r=(n+i/60)%6)=>e-e*t*Math.max(Math.min(r,4-r,1),0);return[s(5),s(3),s(1)]}function $c(i,t,e){let s=Ho(i,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function jc(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-r-o):h/(r+o),l=jc(e,s,n,h,r),l=l*60+.5),[l|0,c||0,a]}function Bn(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(Xt)}function $n(i,t,e){return Bn(Ho,i,t,e)}function Uc(i,t,e){return Bn($c,i,t,e)}function Yc(i,t,e){return Bn(Bc,i,t,e)}function Bo(i){return(i%360+360)%360}function Zc(i){let t=Hc.exec(i),e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?yi(+t[5]):Xt(+t[5]));let n=Bo(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?s=Uc(n,r,o):t[1]==="hsv"?s=Yc(n,r,o):s=$n(n,r,o),{r:s[0],g:s[1],b:s[2],a:e}}function qc(i,t){var e=Hn(i);e[0]=Bo(e[0]+t),e=$n(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Gc(i){if(!i)return;let t=Hn(i),e=t[0],s=bo(t[1]),n=bo(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${Wt(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}var xo={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},_o={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Xc(){let i={},t=Object.keys(_o),e=Object.keys(xo),s,n,r,o,a;for(s=0;s>16&255,r>>8&255,r&255]}return i}var xs;function Kc(i){xs||(xs=Xc(),xs.transparent=[0,0,0,0]);let t=xs[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var Jc=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Qc(i){let t=Jc.exec(i),e=255,s,n,r;if(t){if(t[7]!==s){let o=+t[7];e=t[8]?yi(o):Gt(o*255,0,255)}return s=+t[1],n=+t[3],r=+t[5],s=255&(t[2]?yi(s):Gt(s,0,255)),n=255&(t[4]?yi(n):Gt(n,0,255)),r=255&(t[6]?yi(r):Gt(r,0,255)),{r:s,g:n,b:r,a:e}}}function th(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${Wt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var Sn=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Ee=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function eh(i,t,e){let s=Ee(Wt(i.r)),n=Ee(Wt(i.g)),r=Ee(Wt(i.b));return{r:Xt(Sn(s+e*(Ee(Wt(t.r))-s))),g:Xt(Sn(n+e*(Ee(Wt(t.g))-n))),b:Xt(Sn(r+e*(Ee(Wt(t.b))-r))),a:i.a+e*(t.a-i.a)}}function _s(i,t,e){if(i){let s=Hn(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=$n(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function $o(i,t){return i&&Object.assign(t||{},i)}function wo(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Xt(i[3]))):(t=$o(i,{r:0,g:0,b:0,a:1}),t.a=Xt(t.a)),t}function ih(i){return i.charAt(0)==="r"?Qc(i):Zc(i)}var On=class i{constructor(t){if(t instanceof i)return t;let e=typeof t,s;e==="object"?s=wo(t):e==="string"&&(s=Wc(t)||Kc(t)||ih(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=$o(this._rgb);return t&&(t.a=Wt(t.a)),t}set rgb(t){this._rgb=wo(t)}rgbString(){return this._valid?th(this._rgb):void 0}hexString(){return this._valid?Vc(this._rgb):void 0}hslString(){return this._valid?Gc(this._rgb):void 0}mix(t,e){if(t){let s=this.rgb,n=t.rgb,r,o=e===r?.5:e,a=2*o-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,s.r=255&c*s.r+r*n.r+.5,s.g=255&c*s.g+r*n.g+.5,s.b=255&c*s.b+r*n.b+.5,s.a=o*s.a+(1-o)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=eh(this._rgb,t._rgb,e)),this}clone(){return new i(this.rgb)}alpha(t){return this._rgb.a=Xt(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=wi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return _s(this._rgb,2,t),this}darken(t){return _s(this._rgb,2,-t),this}saturate(t){return _s(this._rgb,1,t),this}desaturate(t){return _s(this._rgb,1,-t),this}rotate(t){return qc(this._rgb,t),this}};function jo(i){return new On(i)}function Uo(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function jn(i){return Uo(i)?i:jo(i)}function kn(i){return Uo(i)?i:jo(i).saturate(.5).darken(.1).hexString()}var Kt=Object.create(null),Is=Object.create(null);function bi(i,t){if(!t)return i;let e=t.split(".");for(let s=0,n=e.length;se.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,s)=>kn(s.backgroundColor),this.hoverBorderColor=(e,s)=>kn(s.borderColor),this.hoverColor=(e,s)=>kn(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Mn(this,t,e)}get(t){return bi(this,t)}describe(t,e){return Mn(Is,t,e)}override(t,e){return Mn(Kt,t,e)}route(t,e,s,n){let r=bi(this,t),o=bi(this,s),a="_"+e;Object.defineProperties(r,{[a]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[a],c=o[n];return F(l)?Object.assign({},c,l):E(l,c)},set(l){this[a]=l}}})}},A=new Dn({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function sh(i){return!i||P(i.size)||P(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function xi(i,t,e,s,n){let r=t[n];return r||(r=t[n]=i.measureText(n).width,e.push(n)),r>s&&(s=r),s}function Yo(i,t,e,s){s=s||{};let n=s.data=s.data||{},r=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},r=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let o=0,a=e.length,l,c,h,u,d;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function Fe(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&r.strokeColor!=="",l,c;for(i.save(),i.font=n.string,nh(i,r),l=0;l+i||0;function Fs(i,t){let e={},s=F(t),n=s?Object.keys(t):t,r=F(i)?s?o=>E(i[o],i[t[o]]):o=>i[o]:()=>i;for(let o of n)e[o]=ch(r(o));return e}function Zn(i){return Fs(i,{top:"y",right:"x",bottom:"y",left:"x"})}function te(i){return Fs(i,["topLeft","topRight","bottomLeft","bottomRight"])}function rt(i){let t=Zn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Q(i,t){i=i||{},t=t||A.font;let e=E(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=E(i.style,t.style);s&&!(""+s).match(ah)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");let n={family:E(i.family,t.family),lineHeight:lh(E(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:E(i.weight,t.weight),string:""};return n.string=sh(n),n}function We(i,t,e,s){let n=!0,r,o,a;for(r=0,o=i.length;re&&a===0?0:a+l;return{min:o(s,-Math.abs(r)),max:o(n,r)}}function Ht(i,t){return Object.assign(Object.create(i),t)}function As(i,t=[""],e=i,s,n=()=>i[0]){dt(s)||(s=Jo("_fallback",i));let r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:s,_getTarget:n,override:o=>As([o,...i],t,e,s)};return new Proxy(r,{deleteProperty(o,a){return delete o[a],delete o._keys,delete i[0][a],!0},get(o,a){return Xo(o,a,()=>yh(a,t,i,o))},getOwnPropertyDescriptor(o,a){return Reflect.getOwnPropertyDescriptor(o._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(o,a){return ko(o).includes(a)},ownKeys(o){return ko(o)},set(o,a,l){let c=o._storage||(o._storage=n());return o[a]=c[a]=l,delete o._keys,!0}})}function me(i,t,e,s){let n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:qn(i,s),setContext:r=>me(i,r,e,s),override:r=>me(i.override(r),t,e,s)};return new Proxy(n,{deleteProperty(r,o){return delete r[o],delete i[o],!0},get(r,o,a){return Xo(r,o,()=>uh(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(i,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,o)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(r,o){return Reflect.has(i,o)},ownKeys(){return Reflect.ownKeys(i)},set(r,o,a){return i[o]=a,delete r[o],!0}})}function qn(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:zt(e)?e:()=>e,isIndexable:zt(s)?s:()=>s}}var hh=(i,t)=>i?i+vs(t):t,Gn=(i,t)=>F(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Xo(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];let s=e();return i[t]=s,s}function uh(i,t,e){let{_proxy:s,_context:n,_subProxy:r,_descriptors:o}=i,a=s[t];return zt(a)&&o.isScriptable(t)&&(a=dh(t,a,i,e)),B(a)&&a.length&&(a=fh(t,a,i,o.isIndexable)),Gn(t,a)&&(a=me(a,n,r&&r[t],o)),a}function dh(i,t,e,s){let{_proxy:n,_context:r,_subProxy:o,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);return a.add(i),t=t(r,o||s),a.delete(i),Gn(i,t)&&(t=Xn(n._scopes,n,i,t)),t}function fh(i,t,e,s){let{_proxy:n,_context:r,_subProxy:o,_descriptors:a}=e;if(dt(r.index)&&s(i))t=t[r.index%t.length];else if(F(t[0])){let l=t,c=n._scopes.filter(h=>h!==l);t=[];for(let h of l){let u=Xn(c,n,i,h);t.push(me(u,r,o&&o[i],a))}}return t}function Ko(i,t,e){return zt(i)?i(t,e):i}var mh=(i,t)=>i===!0?t:typeof i=="string"?Vt(t,i):void 0;function gh(i,t,e,s,n){for(let r of t){let o=mh(e,r);if(o){i.add(o);let a=Ko(o._fallback,e,n);if(dt(a)&&a!==e&&a!==s)return a}else if(o===!1&&dt(s)&&e!==s)return null}return!1}function Xn(i,t,e,s){let n=t._rootScopes,r=Ko(t._fallback,e,s),o=[...i,...n],a=new Set;a.add(s);let l=So(a,o,e,r||e,s);return l===null||dt(r)&&r!==e&&(l=So(a,o,r,l,s),l===null)?!1:As(Array.from(a),[""],n,r,()=>ph(t,e,s))}function So(i,t,e,s,n){for(;e;)e=gh(i,t,e,s,n);return e}function ph(i,t,e){let s=i._getTarget();t in s||(s[t]={});let n=s[t];return B(n)&&F(e)?e:n}function yh(i,t,e,s){let n;for(let r of t)if(n=Jo(hh(r,i),e),dt(n))return Gn(i,n)?Xn(e,s,i,n):n}function Jo(i,t){for(let e of t){if(!e)continue;let s=e[i];if(dt(s))return s}}function ko(i){let t=i._keys;return t||(t=i._keys=bh(i._scopes)),t}function bh(i){let t=new Set;for(let e of i)for(let s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function Kn(i,t,e,s){let{iScale:n}=i,{key:r="r"}=this._parsing,o=new Array(s),a,l,c,h;for(a=0,l=s;ati==="x"?"y":"x";function _h(i,t,e,s){let n=i.skip?t:i,r=t,o=e.skip?t:e,a=Ms(r,n),l=Ms(o,r),c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let u=s*c,d=s*h;return{previous:{x:r.x-u*(o.x-n.x),y:r.y-u*(o.y-n.y)},next:{x:r.x+d*(o.x-n.x),y:r.y+d*(o.y-n.y)}}}function wh(i,t,e){let s=i.length,n,r,o,a,l,c=Ae(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")kh(i,n);else{let c=s?i[i.length-1]:i[0];for(r=0,o=i.length;rwindow.getComputedStyle(i,null);function Th(i,t){return Ps(i).getPropertyValue(t)}var vh=["top","right","bottom","left"];function fe(i,t,e){let s={};e=e?"-"+e:"";for(let n=0;n<4;n++){let r=vh[n];s[r]=parseFloat(i[t+"-"+r+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var Oh=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Dh(i,t){let e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:r}=s,o=!1,a,l;if(Oh(n,r,i.target))a=n,l=r;else{let c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ee(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:s}=t,n=Ps(e),r=n.boxSizing==="border-box",o=fe(n,"padding"),a=fe(n,"border","width"),{x:l,y:c,box:h}=Dh(i,e),u=o.left+(h&&a.left),d=o.top+(h&&a.top),{width:f,height:m}=t;return r&&(f-=o.width+a.width,m-=o.height+a.height),{x:Math.round((l-u)/f*e.width/s),y:Math.round((c-d)/m*e.height/s)}}function Eh(i,t,e){let s,n;if(t===void 0||e===void 0){let r=Ls(i);if(!r)t=i.clientWidth,e=i.clientHeight;else{let o=r.getBoundingClientRect(),a=Ps(r),l=fe(a,"border","width"),c=fe(a,"padding");t=o.width-c.width-l.width,e=o.height-c.height-l.height,s=Ts(a.maxWidth,r,"clientWidth"),n=Ts(a.maxHeight,r,"clientHeight")}}return{width:t,height:e,maxWidth:s||ks,maxHeight:n||ks}}var Tn=i=>Math.round(i*10)/10;function ea(i,t,e,s){let n=Ps(i),r=fe(n,"margin"),o=Ts(n.maxWidth,i,"clientWidth")||ks,a=Ts(n.maxHeight,i,"clientHeight")||ks,l=Eh(i,t,e),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let u=fe(n,"border","width"),d=fe(n,"padding");c-=d.width+u.width,h-=d.height+u.height}return c=Math.max(0,c-r.width),h=Math.max(0,s?Math.floor(c/s):h-r.height),c=Tn(Math.min(c,o,l.maxWidth)),h=Tn(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Tn(c/2)),{width:c,height:h}}function Qn(i,t,e){let s=t||1,n=Math.floor(i.height*s),r=Math.floor(i.width*s);i.height=n/s,i.width=r/s;let o=i.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${i.height}px`,o.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||o.height!==n||o.width!==r?(i.currentDevicePixelRatio=s,o.height=n,o.width=r,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}var ia=function(){let i=!1;try{let t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function tr(i,t){let e=Th(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function qt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function sa(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function na(i,t,e,s){let n={x:i.cp2x,y:i.cp2y},r={x:t.cp1x,y:t.cp1y},o=qt(i,n,e),a=qt(n,r,e),l=qt(r,t,e),c=qt(o,a,e),h=qt(a,l,e);return qt(c,h,e)}var Mo=new Map;function Ih(i,t){t=t||{};let e=i+JSON.stringify(t),s=Mo.get(e);return s||(s=new Intl.NumberFormat(i,t),Mo.set(e,s)),s}function ze(i,t,e){return Ih(t,e).format(i)}var Ch=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Fh=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function pe(i,t,e){return i?Ch(t,e):Fh()}function er(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function ir(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function ra(i){return i==="angle"?{between:Ne,compare:Lc,normalize:ct}:{between:At,compare:(t,e)=>t-e,normalize:t=>t}}function To({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Ah(i,t,e){let{property:s,start:n,end:r}=e,{between:o,normalize:a}=ra(s),l=t.length,{start:c,end:h,loop:u}=i,d,f;if(u){for(c+=l,h+=l,d=0,f=l;dl(n,_,y)&&a(n,_)!==0,x=()=>a(r,y)===0||l(r,_,y),S=()=>g||w(),k=()=>!g||x();for(let v=h,T=h;v<=u;++v)b=t[v%o],!b.skip&&(y=c(b[s]),y!==_&&(g=l(y,n,r),p===null&&S()&&(p=a(y,n)===0?v:T),p!==null&&k()&&(m.push(To({start:p,end:v,loop:d,count:o,style:f})),p=null),T=v,_=y));return p!==null&&m.push(To({start:p,end:u,loop:d,count:o,style:f})),m}function nr(i,t){let e=[],s=i.segments;for(let n=0;nn&&i[r%t].skip;)r--;return r%=t,{start:n,end:r}}function Ph(i,t,e,s){let n=i.length,r=[],o=t,a=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%n];c.skip||c.stop?a.skip||(s=!1,r.push({start:t%n,end:(l-1)%n,loop:s}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&r.push({start:t%n,end:o%n,loop:s}),r}function oa(i,t){let e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];let r=!!i._loop,{start:o,end:a}=Lh(e,n,r,s);if(s===!0)return vo(i,[{start:o,end:a,loop:r}],e,t);let l=aa({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(s-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Rn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let r=s.items,o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),r.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=r.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let s=e.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},Bt=new mr,aa="transparent",Wh={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let s=jn(i||aa),n=s.valid&&jn(t||aa);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}},gr=class{constructor(t,e,s,n){let r=e[s];n=We([t.to,n,r,t.from]);let o=We([t.from,r,n]);this._active=!0,this._fn=t.fn||Wh[t.type||typeof o],this._easing=Ie[t.easing]||Ie.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);let n=this._target[this._prop],r=s-this._start,o=this._duration-r;this._start=s,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=We([t.to,e,n,t.from]),this._from=We([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,s=this._duration,n=this._prop,r=this._from,o=this._loop,a=this._to,l;if(this._active=r!==a&&(o||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(r,a,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){let e=t?"res":"rej",s=this._promises||[];for(let n=0;ni!=="onProgress"&&i!=="onComplete"&&i!=="fn"});A.set("animations",{colors:{type:"color",properties:Vh},numbers:{type:"number",properties:zh}});A.describe("animations",{_fallback:"animation"});A.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}});var $s=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!F(t))return;let e=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let n=t[s];if(!F(n))return;let r={};for(let o of Hh)r[o]=n[o];(B(n.properties)&&n.properties||[s]).forEach(o=>{(o===s||!e.has(o))&&e.set(o,r)})})}_animateOptions(t,e){let s=e.options,n=$h(t,s);if(!n)return[];let r=this._createAnimations(n,s);return s.$shared&&Bh(t.options.$animations,s).then(()=>{t.options=s},()=>{}),r}_createAnimations(t,e){let s=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}let h=e[c],u=r[c],d=s.get(c);if(u)if(d&&u.active()){u.update(d,h,a);continue}else u.cancel();if(!d||!d.duration){t[c]=h;continue}r[c]=u=new gr(d,t,c,h),n.push(u)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let s=this._createAnimations(t,e);if(s.length)return Bt.add(this._chart,s),!0}};function Bh(i,t){let e=[],s=Object.keys(t);for(let n=0;n0||!e&&r<0)return n.index}return null}function da(i,t){let{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:r,vScale:o,index:a}=s,l=r.axis,c=o.axis,h=Zh(r,o,s),u=t.length,d;for(let f=0;fe[s].axis===t).shift()}function Xh(i,t){return Ht(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Kh(i,t,e){return Ht(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Mi(i,t){let e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(let n of t){let r=n._stacks;if(!r||r[s]===void 0||r[s][e]===void 0)return;delete r[s][e]}}}var or=i=>i==="reset"||i==="none",fa=(i,t)=>t?i:Object.assign({},i),Jh=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Ja(e,!0),values:null},gt=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ha(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Mi(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(u,d,f,m)=>u==="x"?d:u==="r"?m:f,r=e.xAxisID=E(s.xAxisID,rr(t,"x")),o=e.yAxisID=E(s.yAxisID,rr(t,"y")),a=e.rAxisID=E(s.rAxisID,rr(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,r,o,a),h=e.vAxisID=n(l,o,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Pn(this._data,this),t._stacked&&Mi(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(F(e))this._data=Yh(e);else if(s!==e){if(s){Pn(s,this);let n=this._cachedMeta;Mi(n),n._parsed=[]}e&&Object.isExtensible(e)&&Wo(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,s=this.getDataset(),n=!1;this._dataCheck();let r=e._stacked;e._stacked=ha(e.vScale,e),e.stack!==s.stack&&(n=!0,Mi(e),e.stack=s.stack),this._resyncElements(t),(n||r!==e._stacked)&&da(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:s,_data:n}=this,{iScale:r,_stacked:o}=s,a=r.axis,l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,u,d;if(this._parsing===!1)s._parsed=n,s._sorted=!0,d=n;else{B(n[t])?d=this.parseArrayData(s,n,t,e):F(n[t])?d=this.parseObjectData(s,n,t,e):d=this.parsePrimitiveData(s,n,t,e);let f=()=>u[a]===null||c&&u[a]g||u=0;--d)if(!m()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,s=[],n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(s,n),g=c.resolveNamedOptions(d,f,m,u);return g.$shared&&(g.$shared=l,r[o]=Object.freeze(fa(g,l))),g}_resolveAnimations(t,e,s){let n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,a=r[o];if(a)return a;let l;if(n.options.animation!==!1){let h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(d,this.getContext(t,s,e))}let c=new $s(n,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||or(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,r=this.getSharedOptions(s),o=this.includeOptions(e,r)||r!==n;return this.updateSharedOptions(r,e,s),{sharedOptions:r,includeOptions:o}}updateElement(t,e,s,n){or(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!or(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;let r=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,s=this._cachedMeta.data;for(let[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];let n=s.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(c.length+=e,a=c.length-1;a>=o;a--)c[a]=c[a-e]};for(l(r),a=t;an-r))}return i._cache.$bar}function tu(i){let t=i.iScale,e=Qh(t,i.type),s=t._length,n,r,o,a,l=()=>{o===32767||o===-32768||(dt(a)&&(s=Math.min(s,Math.abs(o-a)||s)),a=o)};for(n=0,r=e.length;n0?n[i-1]:null,a=iMath.abs(a)&&(l=a,c=o),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:r,min:o,max:a}}function Qa(i,t,e,s){return B(i)?su(i,t,e,s):t[e.axis]=e.parse(i,s),t}function ma(i,t,e,s){let n=i.iScale,r=i.vScale,o=n.getLabels(),a=n===r,l=[],c,h,u,d;for(c=e,h=e+s;c=e?1:-1)}function ru(i){let t,e,s,n,r;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.basel.controller.options.grouped),r=s.options.stacked,o=[],a=l=>{let c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(P(h)||isNaN(h))return!0};for(let l of n)if(!(e!==void 0&&a(l))&&((r===!1||o.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){let n=this._getStacks(t,s),r=e!==void 0?n.indexOf(e):-1;return r===-1?n.length-1:r}_getRuler(){let t=this.options,e=this._cachedMeta,s=e.iScale,n=[],r,o;for(r=0,o=e.data.length;r=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,{xScale:s,yScale:n}=e,r=this.getParsed(t),o=s.getLabelForValue(r.x),a=n.getLabelForValue(r.y),l=r._custom;return{label:e.label,value:"("+o+", "+a+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){let r=n==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=o.axis,u=a.axis;for(let d=e;dNe(_,a,l,!0)?1:Math.max(w,w*e,x,x*e),m=(_,w,x)=>Ne(_,a,l,!0)?-1:Math.min(w,w*e,x,x*e),g=f(0,c,u),p=f(U,h,d),y=m(j,c,u),b=m(j+U,h,d);s=(g-y)/2,n=(p-b)/2,r=-(g+y)/2,o=-(p+b)/2}return{ratioX:s,ratioY:n,offsetX:r,offsetY:o}}var ne=class extends gt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let r=l=>+s[l];if(F(s[t])){let{key:l="value"}=this._parsing;r=c=>+Vt(s[c],l)}let o,a;for(o=t,a=t+e;o0&&!isNaN(t)?H*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],r=ze(e._parsed[t],s.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0,s=this.chart,n,r,o,a,l;if(!t){for(n=0,r=s.data.datasets.length;ni!=="spacing",_indexable:i=>i!=="spacing"};ne.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let o=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){let t=i.label,e=": "+i.formattedValue;return B(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};var je=class extends gt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:s,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled,{start:a,count:l}=zn(e,n,o);this._drawStart=a,this._drawCount=l,Vn(e)&&(a=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=n;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!o,options:c},t),this.updateElements(n,a,l,t)}updateElements(t,e,s,n){let r=n==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,n),d=o.axis,f=a.axis,{spanGaps:m,segment:g}=this.options,p=ge(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||n==="none",b=e>0&&this.getParsed(e-1);for(let _=e;_0&&Math.abs(x[d]-b[d])>p,g&&(S.parsed=x,S.raw=c.data[_]),u&&(S.options=h||this.resolveDataElementOptions(_,w.active?"active":n)),y||this.updateElement(w,_,S,n),b=x}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;let r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,r,o)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};je.id="line";je.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};je.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var Ue=class extends gt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],r=ze(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:r}}parseObjectData(t,e,s,n){return Kn.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{let r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(re.max&&(e.max=r))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=Math.max(s.cutoutPercentage?r/100*s.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,s,n){let r=n==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,d=c.getIndexAngle(0)-.5*j,f=d,m,g=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?_t(this.resolveDataElementOptions(t,e).angle||s):0}};Ue.id="polarArea";Ue.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Ue.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let o=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){return i.chart.data.labels[i.dataIndex]+": "+i.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};var Ci=class extends ne{};Ci.id="pie";Ci.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var Ye=class extends gt{getLabelAndValue(t){let e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return Kn.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta,s=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(s.points=n,t!=="resize"){let o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);let a={_loop:!0,_fullLoop:r.length===n.length,options:o};this.updateElement(s,void 0,a,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){let r=this._cachedMeta.rScale,o=n==="reset";for(let a=e;a{n[r]=s[r]&&s[r].active()?s[r]._to:this[r]}),n}};pt.defaults={};pt.defaultRoutes=void 0;var tl={values(i){return B(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let s=this.chart.options.locale,n,r=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),r=hu(i,e)}let o=mt(Math.abs(r)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ze(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";let s=i/Math.pow(10,Math.floor(mt(i)));return s===1||s===2||s===5?tl.numeric.call(this,i,t,e):""}};function hu(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Gs={formatters:tl};A.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});A.route("scale.ticks","color","","color");A.route("scale.grid","color","","borderColor");A.route("scale.grid","borderColor","","borderColor");A.route("scale.title","color","","color");A.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"});A.describe("scales",{_fallback:"scale"});A.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"});function uu(i,t){let e=i.options.ticks,s=e.maxTicksLimit||du(i),n=e.major.enabled?mu(t):[],r=n.length,o=n[0],a=n[r-1],l=[];if(r>s)return gu(t,l,n,r/s),l;let c=fu(n,t,s);if(r>0){let h,u,d=r>1?Math.round((a-o)/(r-1)):null;for(Ns(t,l,c,P(d)?0:o-d,o),h=0,u=r-1;hn)return l}return Math.max(n,1)}function mu(i){let t=[],e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,ya=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e;function ba(i,t){let e=[],s=i.length/t,n=i.length,r=0;for(;ro+a)))return l}function xu(i,t){V(i,e=>{let s=e.gc,n=s.length/2,r;if(n>t){for(r=0;rs?s:e,s=n&&e>s?e:s,{min:ft(e,ft(s,e)),max:ft(s,ft(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$(this.options.beforeUpdate,[this])}update(t,e,s){let{beginAtZero:n,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Go(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a=r||s<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),u=h.widest.width,d=h.highest.height,f=tt(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),u+6>a&&(a=f/(s-(t.offset?.5:1)),l=this.maxHeight-Ti(t.grid)-e.padding-xa(t.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),o=Os(Math.min(Math.asin(tt((h.highest.height+6)/a,-1,1)),Math.asin(tt(l/c,-1,1))-Math.asin(tt(d/c,-1,1)))),o=Math.max(n,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){$(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){let l=xa(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ti(r)+l):(t.height=this.maxHeight,t.width=Ti(r)+l),s.display&&this.ticks.length){let{first:c,last:h,widest:u,highest:d}=this._getLabelSizes(),f=s.padding*2,m=_t(this.labelRotation),g=Math.cos(m),p=Math.sin(m);if(a){let y=s.mirror?0:p*u.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+y+f)}else{let y=s.mirror?0:g*u.width+p*d.height;t.width=Math.min(this.maxWidth,t.width+y+f)}this._calculatePadding(c,h,p,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){let{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),d=0,f=0;l?c?(d=n*t.width,f=s*e.height):(d=s*t.height,f=n*e.width):r==="start"?f=e.width:r==="end"?d=t.width:r!=="inner"&&(d=t.width/2,f=e.width/2),this.paddingLeft=Math.max((d-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-u+o)*this.width/(this.width-u),0)}else{let h=e.height/2,u=t.height/2;r==="start"?(h=0,u=t.height):r==="end"&&(h=e.height,u=0),this.paddingTop=h+o,this.paddingBottom=u+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:r[k]||0,height:o[k]||0});return{first:S(0),last:S(e-1),widest:S(w),highest:S(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Lo(this._alignToPixels?Jt(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&ta*n?a/s:l/n:l*n0}_computeGridLineItems(t){let e=this.axis,s=this.chart,n=this.options,{grid:r,position:o}=n,a=r.offset,l=this.isHorizontal(),h=this.ticks.length+(a?1:0),u=Ti(r),d=[],f=r.setContext(this.getContext()),m=f.drawBorder?f.borderWidth:0,g=m/2,p=function(D){return Jt(s,D,m)},y,b,_,w,x,S,k,v,T,C,N,L;if(o==="top")y=p(this.bottom),S=this.bottom-u,v=y-g,C=p(t.top)+g,L=t.bottom;else if(o==="bottom")y=p(this.top),C=t.top,L=p(t.bottom)-g,S=y+g,v=this.top+u;else if(o==="left")y=p(this.right),x=this.right-u,k=y-g,T=p(t.left)+g,N=t.right;else if(o==="right")y=p(this.left),T=t.left,N=p(t.right)-g,x=y+g,k=this.left+u;else if(e==="x"){if(o==="center")y=p((t.top+t.bottom)/2+.5);else if(F(o)){let D=Object.keys(o)[0],J=o[D];y=p(this.chart.scales[D].getPixelForValue(J))}C=t.top,L=t.bottom,S=y+g,v=S+u}else if(e==="y"){if(o==="center")y=p((t.left+t.right)/2);else if(F(o)){let D=Object.keys(o)[0],J=o[D];y=p(this.chart.scales[D].getPixelForValue(J))}x=y-g,k=x-u,T=t.left,N=t.right}let K=E(n.ticks.maxTicksLimit,h),lt=Math.max(1,Math.ceil(h/K));for(b=0;br.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){let e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),r,o,a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(r=0,o=n.length;r{this.draw(n)}}]:[{z:s,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:s+1,draw:()=>{this.drawBorder()}},{z:e,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],r,o;for(r=0,o=e.length;r{let s=e.split("."),n=s.pop(),r=[i].concat(s).join("."),o=t[e].split("."),a=o.pop(),l=o.join(".");A.route(r,n,l,a)})}function vu(i){return"id"in i&&"defaults"in i}var pr=class{constructor(){this.controllers=new He(gt,"datasets",!0),this.elements=new He(pt,"elements"),this.plugins=new He(Object,"plugins"),this.scales=new He(be,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{let r=s||this._getRegistryForType(n);s||r.isForType(n)||r===this.plugins&&n.id?this._exec(t,r,n):V(n,o=>{let a=s||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,e,s){let n=vs(t);$(s["before"+n],[],s),e[t](s),$(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let w=e;w0&&Math.abs(S[f]-_[f])>y,p&&(k.parsed=S,k.raw=c.data[w]),d&&(k.options=u||this.resolveDataElementOptions(w,x.active?"active":n)),b||this.updateElement(x,w,k,n),_=S}this.updateSharedOptions(u,n,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}let s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;let r=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,r,o)/2}};Ze.id="scatter";Ze.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Ze.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(i){return"("+i.label+", "+i.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Ou=Object.freeze({__proto__:null,BarController:Be,BubbleController:$e,DoughnutController:ne,LineController:je,PolarAreaController:Ue,PieController:Ci,RadarController:Ye,ScatterController:Ze});function ye(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Fi=class{constructor(t){this.options=t||{}}init(t){}formats(){return ye()}parse(t,e){return ye()}format(t,e){return ye()}add(t,e,s){return ye()}diff(t,e,s){return ye()}startOf(t,e,s){return ye()}endOf(t,e){return ye()}};Fi.override=function(i){Object.assign(Fi.prototype,i)};var Or={_date:Fi};function Du(i,t,e,s){let{controller:n,data:r,_sorted:o}=i,a=n._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&r.length){let l=a._reversePixels?Po:Ct;if(s){if(n._sharedOptions){let c=r[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){let u=l(r,t,e-h),d=l(r,t,e+h);return{lo:u.lo,hi:d.hi}}}}else return l(r,t,e)}return{lo:0,hi:r.length-1}}function zi(i,t,e,s,n){let r=i.getSortedVisibleDatasetMetas(),o=e[t];for(let a=0,l=r.length;a{l[o](t[e],n)&&(r.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:r}var Fu={evaluateInteractionItems:zi,modes:{index(i,t,e,s){let n=ee(t,i),r=e.axis||"x",o=e.includeInvisible||!1,a=e.intersect?lr(i,n,r,s,o):cr(i,n,r,!1,s,o),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let h=a[0].index,u=c.data[h];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){let n=ee(t,i),r=e.axis||"xy",o=e.includeInvisible||!1,a=e.intersect?lr(i,n,r,s,o):cr(i,n,r,!1,s,o);if(a.length>0){let l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function wa(i,t){return i.filter(e=>el.indexOf(e.pos)===-1&&e.box.axis===t)}function Oi(i,t){return i.sort((e,s)=>{let n=t?s:e,r=t?e:s;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function Au(i){let t=[],e,s,n,r,o,a;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=Oi(vi(t,"left"),!0),n=Oi(vi(t,"right")),r=Oi(vi(t,"top"),!0),o=Oi(vi(t,"bottom")),a=wa(t,"x"),l=wa(t,"y");return{fullSize:e,leftAndTop:s.concat(r),rightAndBottom:n.concat(l).concat(o).concat(a),chartArea:vi(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:r.concat(o).concat(a)}}function Sa(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function il(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Ru(i,t,e,s){let{pos:n,box:r}=e,o=i.maxPadding;if(!F(n)){e.size&&(i[n]-=e.size);let u=s[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?r.height:r.width),e.size=u.size/u.count,i[n]+=e.size}r.getPadding&&il(o,r.getPadding());let a=Math.max(0,t.outerWidth-Sa(o,i,"left","right")),l=Math.max(0,t.outerHeight-Sa(o,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Wu(i){let t=i.maxPadding;function e(s){let n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function zu(i,t){let e=t.maxPadding;function s(n){let r={left:0,top:0,right:0,bottom:0};return n.forEach(o=>{r[o]=Math.max(t[o],e[o])}),r}return s(i?["left","right"]:["top","bottom"])}function Ei(i,t,e,s){let n=[],r,o,a,l,c,h;for(r=0,o=i.length,c=0;r{typeof g.beforeLayout=="function"&&g.beforeLayout()});let h=l.reduce((g,p)=>p.box.options&&p.box.options.display===!1?g:g+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/h,hBoxMaxHeight:o/2}),d=Object.assign({},n);il(d,rt(s));let f=Object.assign({maxPadding:d,w:r,h:o,x:n.left,y:n.top},n),m=Pu(l.concat(c),u);Ei(a.fullSize,f,u,m),Ei(l,f,u,m),Ei(c,f,u,m)&&Ei(l,f,u,m),Wu(f),ka(a.leftAndTop,f,u,m),f.x+=f.w,f.y+=f.h,ka(a.rightAndBottom,f,u,m),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},V(a.chartArea,g=>{let p=g.box;Object.assign(p,i.chartArea),p.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},js=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}},yr=class extends js{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},Bs="$chartjs",Vu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ma=i=>i===null||i==="";function Hu(i,t){let e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[Bs]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ma(n)){let r=tr(i,"width");r!==void 0&&(i.width=r)}if(Ma(s))if(i.style.height==="")i.height=i.width/(t||2);else{let r=tr(i,"height");r!==void 0&&(i.height=r)}return i}var sl=ia?{passive:!0}:!1;function Bu(i,t,e){i.addEventListener(t,e,sl)}function $u(i,t,e){i.canvas.removeEventListener(t,e,sl)}function ju(i,t){let e=Vu[i.type]||i.type,{x:s,y:n}=ee(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Us(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function Uu(i,t,e){let s=i.canvas,n=new MutationObserver(r=>{let o=!1;for(let a of r)o=o||Us(a.addedNodes,s),o=o&&!Us(a.removedNodes,s);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Yu(i,t,e){let s=i.canvas,n=new MutationObserver(r=>{let o=!1;for(let a of r)o=o||Us(a.removedNodes,s),o=o&&!Us(a.addedNodes,s);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}var Ai=new Map,Ta=0;function nl(){let i=window.devicePixelRatio;i!==Ta&&(Ta=i,Ai.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Zu(i,t){Ai.size||window.addEventListener("resize",nl),Ai.set(i,t)}function qu(i){Ai.delete(i),Ai.size||window.removeEventListener("resize",nl)}function Gu(i,t,e){let s=i.canvas,n=s&&Ls(s);if(!n)return;let r=Wn((a,l)=>{let c=n.clientWidth;e(a,l),c{let l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||r(c,h)});return o.observe(n),Zu(i,r),o}function hr(i,t,e){e&&e.disconnect(),t==="resize"&&qu(i)}function Xu(i,t,e){let s=i.canvas,n=Wn(r=>{i.ctx!==null&&e(ju(r,i))},i,r=>{let o=r[0];return[o,o.offsetX,o.offsetY]});return Bu(s,t,n),n}var br=class extends js{acquireContext(t,e){let s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Hu(t,e),s):null}releaseContext(t){let e=t.canvas;if(!e[Bs])return!1;let s=e[Bs].initial;["height","width"].forEach(r=>{let o=s[r];P(o)?e.removeAttribute(r):e.setAttribute(r,o)});let n=s.style||{};return Object.keys(n).forEach(r=>{e.style[r]=n[r]}),e.width=e.width,delete e[Bs],!0}addEventListener(t,e,s){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),o={attach:Uu,detach:Yu,resize:Gu}[e]||Xu;n[e]=o(t,e,s)}removeEventListener(t,e){let s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:hr,detach:hr,resize:hr}[e]||$u)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return ea(t,e,s,n)}isAttached(t){let e=Ls(t);return!!(e&&e.isConnected)}};function Ku(i){return!Jn()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?yr:br}var xr=class{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let r=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(r,t,e,s);return e==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,s,n){n=n||{};for(let r of t){let o=r.plugin,a=o[s],l=[e,n,r.options];if($(a,l,o)===!1&&n.cancelable)return!1}return!0}invalidate(){P(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let s=t&&t.config,n=E(s.options&&s.options.plugins,{}),r=Ju(s);return n===!1&&!e?[]:td(t,r,n,e)}_notifyStateChanges(t){let e=this._oldCache||[],s=this._cache,n=(r,o)=>r.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}};function Ju(i){let t={},e=[],s=Object.keys(Pt.plugins.items);for(let r=0;r{let l=s[a];if(!F(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let c=wr(a,l),h=sd(c,n),u=e.scales||{};r[c]=r[c]||a,o[a]=Le(Object.create(null),[{axis:c},l,u[c],u[h]])}),i.data.datasets.forEach(a=>{let l=a.type||i.type,c=a.indexAxis||_r(l,t),u=(Kt[l]||{}).scales||{};Object.keys(u).forEach(d=>{let f=id(d,c),m=a[f+"AxisID"]||r[f]||f;o[m]=o[m]||Object.create(null),Le(o[m],[{axis:f},s[m],u[d]])})}),Object.keys(o).forEach(a=>{let l=o[a];Le(l,[A.scales[l.type],A.scale])}),o}function rl(i){let t=i.options||(i.options={});t.plugins=E(t.plugins,{}),t.scales=rd(i,t)}function ol(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function od(i){return i=i||{},i.data=ol(i.data),rl(i),i}var va=new Map,al=new Set;function Ws(i,t){let e=va.get(i);return e||(e=t(),va.set(i,e),al.add(e)),e}var Di=(i,t,e)=>{let s=Vt(t,e);s!==void 0&&i.add(s)},Sr=class{constructor(t){this._config=od(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ol(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),rl(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ws(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ws(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ws(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,s=this.type;return Ws(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let s=this._scopeCache,n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){let{options:n,type:r}=this,o=this._cachedScopes(t,s),a=o.get(e);if(a)return a;let l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(u=>Di(l,t,u))),h.forEach(u=>Di(l,n,u)),h.forEach(u=>Di(l,Kt[r]||{},u)),h.forEach(u=>Di(l,A,u)),h.forEach(u=>Di(l,Is,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),al.has(e)&&o.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,Kt[e]||{},A.datasets[e]||{},{type:e},A,Is]}resolveNamedOptions(t,e,s,n=[""]){let r={$shared:!0},{resolver:o,subPrefixes:a}=Oa(this._resolverCache,t,n),l=o;if(ld(o,e)){r.$shared=!1,s=zt(s)?s():s;let c=this.createResolver(t,s,a);l=me(o,s,c)}for(let c of e)r[c]=l[c];return r}createResolver(t,e,s=[""],n){let{resolver:r}=Oa(this._resolverCache,t,s);return F(e)?me(r,e,void 0,n):r}};function Oa(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));let n=e.join(),r=s.get(n);return r||(r={resolver:As(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,r)),r}var ad=i=>F(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||zt(i[e]),!1);function ld(i,t){let{isScriptable:e,isIndexable:s}=qn(i);for(let n of t){let r=e(n),o=s(n),a=(o||r)&&i[n];if(r&&(zt(a)||ad(a))||o&&B(a))return!0}return!1}var cd="3.9.1",hd=["top","bottom","left","right","chartArea"];function Da(i,t){return i==="top"||i==="bottom"||hd.indexOf(i)===-1&&t==="x"}function Ea(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Ia(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),$(e&&e.onComplete,[i],t)}function ud(i){let t=i.chart,e=t.options.animation;$(e&&e.onProgress,[i],t)}function ll(i){return Jn()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var Ys={},cl=i=>{let t=ll(i);return Object.values(Ys).filter(e=>e.canvas===t).pop()};function dd(i,t,e){let s=Object.keys(i);for(let n of s){let r=+n;if(r>=t){let o=i[n];delete i[n],(e>0||r>t)&&(i[r+e]=o)}}}function fd(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}var xe=class{constructor(t,e){let s=this.config=new Sr(e),n=ll(t),r=cl(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");let o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Ku(n)),this.platform.updateConfig(s);let a=this.platform.acquireContext(n,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Do(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new xr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=zo(u=>this.update(u),o.resizeDelay||0),this._dataChanges=[],Ys[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Bt.listen(this,"complete",Ia),Bt.listen(this,"progress",ud),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:r}=this;return P(t)?e&&r?r:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Un(this.canvas,this.ctx),this}stop(){return Bt.stop(this),this}resize(t,e){Bt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let s=this.options,n=this.canvas,r=s.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Qn(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),$(s.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};V(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){let t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((o,a)=>(o[a]=!1,o),{}),r=[];e&&(r=r.concat(Object.keys(e).map(o=>{let a=e[o],l=wr(o,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),V(r,o=>{let a=o.options,l=a.id,c=wr(l,a),h=E(a.type,o.dtype);(a.position===void 0||Da(a.position,c)!==Da(o.dposition))&&(a.position=o.dposition),n[l]=!0;let u=null;if(l in s&&s[l].type===h)u=s[l];else{let d=Pt.getScale(h);u=new d({id:l,type:h,ctx:this.ctx,chart:this}),s[u.id]=u}u.init(a,t)}),V(n,(o,a)=>{o||delete s[a]}),V(s,o=>{ot.configure(this,o,o.options),ot.addBox(this,o)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,r)=>n.index-r.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(r=>r===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ea("z","_idx"));let{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){V(this.scales,t=>{ot.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!In(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:s,start:n,count:r}of e){let o=s==="_removeElements"?-r:r;dd(t,n,o)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,s=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),n=s(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ot.update(this,this.width,this.height,t);let e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],V(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,r)=>{n._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,s=t._clip,n=!s.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(n&&Si(e,{left:s.left===!1?0:r.left-s.left,right:s.right===!1?this.width:r.right+s.right,top:s.top===!1?0:r.top-s.top,bottom:s.bottom===!1?this.height:r.bottom+s.bottom}),t.controller.draw(),n&&ki(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Fe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){let r=Fu.modes[e];return typeof r=="function"?r(this,t,s,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],s=this._metasets,n=s.filter(r=>r&&r._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Ht(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){let s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){let n=s?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);dt(e)?(r.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),o.update(r,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Bt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,r,o),t[r]=o},n=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};V(this.options.events,r=>s(r,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)},o,a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",r),s("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){V(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},V(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){let n=s?"set":"remove",r,o,a,l;for(e==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a{let a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!_i(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}_updateHoverStyles(t,e,s){let n=this.options.hover,r=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),o=r(e,t),a=s?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){let s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;let r=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(r||s.changed)&&this.render(),this}_handleEvent(t,e,s){let{_active:n=[],options:r}=this,o=e,a=this._getActiveElements(t,n,s,o),l=Co(t),c=fd(t,this._lastEvent,s,l);s&&(this._lastEvent=null,$(r.onHover,[t,a,this],this),l&&$(r.onClick,[t,a,this],this));let h=!_i(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}},Ca=()=>V(xe.instances,i=>i._plugins.invalidate()),ie=!0;Object.defineProperties(xe,{defaults:{enumerable:ie,value:A},instances:{enumerable:ie,value:Ys},overrides:{enumerable:ie,value:Kt},registry:{enumerable:ie,value:Pt},version:{enumerable:ie,value:cd},getChart:{enumerable:ie,value:cl},register:{enumerable:ie,value:(...i)=>{Pt.add(...i),Ca()}},unregister:{enumerable:ie,value:(...i)=>{Pt.remove(...i),Ca()}}});function hl(i,t,e){let{startAngle:s,pixelMargin:n,x:r,y:o,outerRadius:a,innerRadius:l}=t,c=n/a;i.beginPath(),i.arc(r,o,a,s-c,e+c),l>n?(c=n/l,i.arc(r,o,l,e+c,s-c,!0)):i.arc(r,o,n,e+U,s-U),i.closePath(),i.clip()}function md(i){return Fs(i,["outerStart","outerEnd","innerStart","innerEnd"])}function gd(i,t,e,s){let n=md(i.options.borderRadius),r=(e-t)/2,o=Math.min(r,s*t/2),a=l=>{let c=(e-Math.min(r,l))*s/2;return tt(l,0,Math.min(r,c))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:tt(n.innerStart,0,o),innerEnd:tt(n.innerEnd,0,o)}}function Ve(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function kr(i,t,e,s,n,r){let{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,u=Math.max(t.outerRadius+s+e-c,0),d=h>0?h+s+e+c:0,f=0,m=n-l;if(s){let D=h>0?h-s:0,J=u>0?u-s:0,X=(D+J)/2,de=X!==0?m*X/(X+s):m;f=(m-de)/2}let g=Math.max(.001,m*u-e/j)/u,p=(m-g)/2,y=l+p+f,b=n-p-f,{outerStart:_,outerEnd:w,innerStart:x,innerEnd:S}=gd(t,d,u,b-y),k=u-_,v=u-w,T=y+_/k,C=b-w/v,N=d+x,L=d+S,K=y+x/N,lt=b-S/L;if(i.beginPath(),r){if(i.arc(o,a,u,T,C),w>0){let X=Ve(v,C,o,a);i.arc(X.x,X.y,w,C,b+U)}let D=Ve(L,b,o,a);if(i.lineTo(D.x,D.y),S>0){let X=Ve(L,lt,o,a);i.arc(X.x,X.y,S,b+U,lt+Math.PI)}if(i.arc(o,a,d,b-S/d,y+x/d,!0),x>0){let X=Ve(N,K,o,a);i.arc(X.x,X.y,x,K+Math.PI,y-U)}let J=Ve(k,y,o,a);if(i.lineTo(J.x,J.y),_>0){let X=Ve(k,T,o,a);i.arc(X.x,X.y,_,y-U,T)}}else{i.moveTo(o,a);let D=Math.cos(T)*u+o,J=Math.sin(T)*u+a;i.lineTo(D,J);let X=Math.cos(C)*u+o,de=Math.sin(C)*u+a;i.lineTo(X,de)}i.closePath()}function pd(i,t,e,s,n){let{fullCircles:r,startAngle:o,circumference:a}=t,l=t.endAngle;if(r){kr(i,t,e,s,o+H,n);for(let c=0;c=H||Ne(r,a,l),g=At(o,c+d,h+d);return m&&g}getCenterPoint(t){let{x:e,y:s,startAngle:n,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,h=(n+r)/2,u=(o+a+c+l)/2;return{x:e+Math.cos(h)*u,y:s+Math.sin(h)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:s}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>H?Math.floor(s/H):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(n){a=n/2;let c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*a,Math.sin(c)*a),this.circumference>=j&&(a=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;let l=pd(t,this,a,r,o);bd(t,this,a,r,l,o),t.restore()}};qe.id="arc";qe.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};qe.defaultRoutes={backgroundColor:"backgroundColor"};function ul(i,t,e=t){i.lineCap=E(e.borderCapStyle,t.borderCapStyle),i.setLineDash(E(e.borderDash,t.borderDash)),i.lineDashOffset=E(e.borderDashOffset,t.borderDashOffset),i.lineJoin=E(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=E(e.borderWidth,t.borderWidth),i.strokeStyle=E(e.borderColor,t.borderColor)}function xd(i,t,e){i.lineTo(e.x,e.y)}function _d(i){return i.stepped?Zo:i.tension||i.cubicInterpolationMode==="monotone"?qo:xd}function dl(i,t,e={}){let s=i.length,{start:n=0,end:r=s-1}=e,{start:o,end:a}=t,l=Math.max(n,o),c=Math.min(r,a),h=na&&r>a;return{count:s,start:l,loop:t.loop,ilen:c(o+(c?a-w:w))%r,_=()=>{g!==p&&(i.lineTo(h,p),i.lineTo(h,g),i.lineTo(h,y))};for(l&&(f=n[b(0)],i.moveTo(f.x,f.y)),d=0;d<=a;++d){if(f=n[b(d)],f.skip)continue;let w=f.x,x=f.y,S=w|0;S===m?(xp&&(p=x),h=(u*h+w)/++u):(_(),i.lineTo(w,x),m=S,u=0,g=p=x),y=x}_()}function Mr(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Sd:wd}function kd(i){return i.stepped?sa:i.tension||i.cubicInterpolationMode==="monotone"?na:qt}function Md(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),ul(i,t.options),i.stroke(n)}function Td(i,t,e,s){let{segments:n,options:r}=t,o=Mr(t);for(let a of n)ul(i,r,a.style),i.beginPath(),o(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}var vd=typeof Path2D=="function";function Od(i,t,e,s){vd&&!t.options.segment?Md(i,t,e,s):Td(i,t,e,s)}var Nt=class extends pt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let n=s.spanGaps?this._loop:this._fullLoop;ta(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=oa(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){let s=this.options,n=t[e],r=this.points,o=nr(this,{property:e,start:n,end:n});if(!o.length)return;let a=[],l=kd(s),c,h;for(c=0,h=o.length;ci!=="borderDash"&&i!=="fill"};function Fa(i,t,e,s){let n=i.options,{[e]:r}=i.getProps([e],s);return Math.abs(t-r)=e)return i.slice(t,t+e);let o=[],a=(e-2)/(r-2),l=0,c=t+e-1,h=t,u,d,f,m,g;for(o[l++]=i[h],u=0;uf&&(f=m,d=i[b],g=b);o[l++]=d,h=g}return o[l++]=i[c],o}function Pd(i,t,e,s){let n=0,r=0,o,a,l,c,h,u,d,f,m,g,p=[],y=t+e-1,b=i[t].x,w=i[y].x-b;for(o=t;og&&(g=c,d=o),n=(r*n+a.x)/++r;else{let S=o-1;if(!P(u)&&!P(d)){let k=Math.min(u,d),v=Math.max(u,d);k!==f&&k!==S&&p.push({...i[k],x:n}),v!==f&&v!==S&&p.push({...i[v],x:n})}o>0&&S!==f&&p.push(i[S]),p.push(a),h=x,r=0,m=g=c,u=d=f=o}}return p}function ml(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{value:t})}}function Aa(i){i.data.datasets.forEach(t=>{ml(t)})}function Nd(i,t){let e=t.length,s=0,n,{iScale:r}=i,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(s=tt(Ct(t,r.axis,o).lo,0,e-1)),c?n=tt(Ct(t,r.axis,a).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var Rd={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Aa(i);return}let s=i.width;i.data.datasets.forEach((n,r)=>{let{_data:o,indexAxis:a}=n,l=i.getDatasetMeta(r),c=o||n.data;if(We([a,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:u,count:d}=Nd(l,c),f=e.threshold||4*s;if(d<=f){ml(n);return}P(o)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(e.algorithm){case"lttb":m=Ld(c,u,d,s,e);break;case"min-max":m=Pd(c,u,d,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=m})},destroy(i){Aa(i)}};function Wd(i,t,e){let s=i.segments,n=i.points,r=t.points,o=[];for(let a of s){let{start:l,end:c}=a;c=Dr(l,c,n);let h=Tr(e,n[l],n[c],a.loop);if(!t.segments){o.push({source:a,target:h,start:n[l],end:n[c]});continue}let u=nr(t,h);for(let d of u){let f=Tr(e,r[d.start],r[d.end],d.loop),m=sr(a,n,f);for(let g of m)o.push({source:g,target:d,start:{[e]:La(h,f,"start",Math.max)},end:{[e]:La(h,f,"end",Math.min)}})}}return o}function Tr(i,t,e,s){if(s)return;let n=t[i],r=e[i];return i==="angle"&&(n=ct(n),r=ct(r)),{property:i,start:n,end:r}}function zd(i,t){let{x:e=null,y:s=null}=i||{},n=t.points,r=[];return t.segments.forEach(({start:o,end:a})=>{a=Dr(o,a,n);let l=n[o],c=n[a];s!==null?(r.push({x:l.x,y:s}),r.push({x:c.x,y:s})):e!==null&&(r.push({x:e,y:l.y}),r.push({x:e,y:c.y}))}),r}function Dr(i,t,e){for(;t>i;t--){let s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function La(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function gl(i,t){let e=[],s=!1;return B(i)?(s=!0,e=i):e=zd(i,t),e.length?new Nt({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Pa(i){return i&&i.fill!==!1}function Vd(i,t,e){let n=i[t].fill,r=[t],o;if(!e)return n;for(;n!==!1&&r.indexOf(n)===-1;){if(!q(n))return n;if(o=i[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function Hd(i,t,e){let s=Ud(i);if(F(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return q(n)&&Math.floor(n)===n?Bd(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Bd(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function $d(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:F(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function jd(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:F(i)?s=i.value:s=t.getBaseValue(),s}function Ud(i){let t=i.options,e=t.fill,s=E(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Yd(i){let{scale:t,index:e,line:s}=i,n=[],r=s.segments,o=s.points,a=Zd(t,e);a.push(gl({x:null,y:t.bottom},s));for(let l=0;l=0;--o){let a=n[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),s&&a.fill&&fr(i.ctx,a,r))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let r=s[n].$filler;Pa(r)&&fr(i.ctx,r,i.chartArea)}},beforeDatasetDraw(i,t,e){let s=t.meta.$filler;!Pa(s)||e.drawTime!=="beforeDatasetDraw"||fr(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},za=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},rf=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,qs=class extends pt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=$(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let s=t.labels,n=Q(s.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=za(s,r),c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(o,r,a,l)+10):(h=this.maxHeight,c=this._fitCols(o,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){let{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a,u=t;r.textAlign="left",r.textBaseline="middle";let d=-1,f=-h;return this.legendItems.forEach((m,g)=>{let p=s+e/2+r.measureText(m.text).width;(g===0||c[c.length-1]+p+2*a>o)&&(u+=h,c[c.length-(g>0?0:1)]=0,f+=h,d++),l[g]={left:0,top:f,row:d,width:p,height:n},c[c.length-1]+=p+a}),u}_fitCols(t,e,s,n){let{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=o-t,u=a,d=0,f=0,m=0,g=0;return this.legendItems.forEach((p,y)=>{let b=s+e/2+r.measureText(p.text).width;y>0&&f+n+2*a>h&&(u+=d+a,c.push({width:d,height:f}),m+=d+a,g++,d=f=0),l[y]={left:m,top:f,col:g,width:b,height:n},d=Math.max(d,b),f+=n+a}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:r}}=this,o=pe(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=nt(s,this.left+n,this.right-this.lineWidths[a]);for(let c of e)a!==c.row&&(a=c.row,l=nt(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+n}else{let a=0,l=nt(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(let c of e)c.col!==a&&(a=c.col,l=nt(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;Si(t,this),this._draw(),ki(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:r,labels:o}=t,a=A.color,l=pe(t.rtl,this.left,this.width),c=Q(o.font),{color:h,padding:u}=o,d=c.size,f=d/2,m;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:g,boxHeight:p,itemHeight:y}=za(o,d),b=function(k,v,T){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;n.save();let C=E(T.lineWidth,1);if(n.fillStyle=E(T.fillStyle,a),n.lineCap=E(T.lineCap,"butt"),n.lineDashOffset=E(T.lineDashOffset,0),n.lineJoin=E(T.lineJoin,"miter"),n.lineWidth=C,n.strokeStyle=E(T.strokeStyle,a),n.setLineDash(E(T.lineDash,[])),o.usePointStyle){let N={radius:p*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:C},L=l.xPlus(k,g/2),K=v+f;Yn(n,N,L,K,o.pointStyleWidth&&g)}else{let N=v+Math.max((d-p)/2,0),L=l.leftForLtr(k,g),K=te(T.borderRadius);n.beginPath(),Object.values(K).some(lt=>lt!==0)?Re(n,{x:L,y:N,w:g,h:p,radius:K}):n.rect(L,N,g,p),n.fill(),C!==0&&n.stroke()}n.restore()},_=function(k,v,T){Qt(n,T.text,k,v+y/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?m={x:nt(r,this.left+u,this.right-s[0]),y:this.top+u+x,line:0}:m={x:this.left+u,y:nt(r,this.top+x+u,this.bottom-e[0].height),line:0},er(this.ctx,t.textDirection);let S=y+u;this.legendItems.forEach((k,v)=>{n.strokeStyle=k.fontColor||h,n.fillStyle=k.fontColor||h;let T=n.measureText(k.text).width,C=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),N=g+f+T,L=m.x,K=m.y;l.setWidth(this.width),w?v>0&&L+N+u>this.right&&(K=m.y+=S,m.line++,L=m.x=nt(r,this.left+u,this.right-s[m.line])):v>0&&K+S>this.bottom&&(L=m.x=L+e[m.line].width+u,m.line++,K=m.y=nt(r,this.top+x+u,this.bottom-e[m.line].height));let lt=l.x(L);b(lt,K,k),L=Vo(C,L+g+f,w?L+N:this.right,t.rtl),_(l.x(L),K,k),w?m.x+=N+u:m.y+=S}),ir(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,s=Q(e.font),n=rt(e.padding);if(!e.display)return;let r=pe(t.rtl,this.left,this.width),o=this.ctx,a=e.position,l=s.size/2,c=n.top+l,h,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,u=nt(t.align,u,this.right-d);else{let m=this.columnSizes.reduce((g,p)=>Math.max(g,p.height),0);h=c+nt(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}let f=nt(a,u,u+d);o.textAlign=r.textAlign(Es(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=s.string,Qt(o,e.text,f,h,s)}_computeTitleHeight(){let t=this.options.title,e=Q(t.font),s=rt(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,r;if(At(t,this.left,this.right)&&At(e,this.top,this.bottom)){for(r=this.legendHitBoxes,s=0;si.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:r}}=i.legend.options;return i._getSortedDatasetMetas().map(o=>{let a=o.controller.getStyle(e?0:void 0),l=rt(a.borderWidth);return{text:t[o.index].label,fillStyle:a.backgroundColor,fontColor:r,hidden:!o.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:a.borderColor,pointStyle:s||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:0,datasetIndex:o.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},Li=class extends pt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let n=B(s.text)?s.text.length:1;this._padding=rt(s.padding);let r=n*Q(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:s,bottom:n,right:r,options:o}=this,a=o.align,l=0,c,h,u;return this.isHorizontal()?(h=nt(a,s,r),u=e+t,c=r-s):(o.position==="left"?(h=s+t,u=nt(a,n,e),l=j*-.5):(h=r-t,u=nt(a,e,n),l=j*.5),c=n-e),{titleX:h,titleY:u,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let s=Q(e.font),r=s.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);Qt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:Es(e.align),textBaseline:"middle",translation:[o,a]})}};function lf(i,t){let e=new Li({ctx:i.ctx,options:t,chart:i});ot.configure(i,e,t),ot.addBox(i,e),i.titleBlock=e}var cf={id:"title",_element:Li,start(i,t,e){lf(i,e)},stop(i){let t=i.titleBlock;ot.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let s=i.titleBlock;ot.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},zs=new WeakMap,hf={id:"subtitle",start(i,t,e){let s=new Li({ctx:i.ctx,options:e,chart:i});ot.configure(i,s,e),ot.addBox(i,s),zs.set(i,s)},stop(i){ot.removeBox(i,zs.get(i)),zs.delete(i)},beforeUpdate(i,t,e){let s=zs.get(i);ot.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Ii={average(i){if(!i.length)return!1;let t,e,s=0,n=0,r=0;for(t=0,e=i.length;t-1?i.split(` +`):i}function uf(i,t){let{element:e,datasetIndex:s,index:n}=t,r=i.getDatasetMeta(s).controller,{label:o,value:a}=r.getLabelAndValue(n);return{chart:i,label:o,parsed:r.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:a,dataset:r.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Va(i,t){let e=i.chart.ctx,{body:s,footer:n,title:r}=i,{boxWidth:o,boxHeight:a}=t,l=Q(t.bodyFont),c=Q(t.titleFont),h=Q(t.footerFont),u=r.length,d=n.length,f=s.length,m=rt(t.padding),g=m.height,p=0,y=s.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(y+=i.beforeBody.length+i.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),y){let w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*w+(y-f)*l.lineHeight+(y-1)*t.bodySpacing}d&&(g+=t.footerMarginTop+d*h.lineHeight+(d-1)*t.footerSpacing);let b=0,_=function(w){p=Math.max(p,e.measureText(w).width+b)};return e.save(),e.font=c.string,V(i.title,_),e.font=l.string,V(i.beforeBody.concat(i.afterBody),_),b=t.displayColors?o+2+t.boxPadding:0,V(s,w=>{V(w.before,_),V(w.lines,_),V(w.after,_)}),b=0,e.font=h.string,V(i.footer,_),e.restore(),p+=m.width,{width:p,height:g}}function df(i,t){let{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function ff(i,t,e,s){let{x:n,width:r}=s,o=e.caretSize+e.caretPadding;if(i==="left"&&n+r+o>t.width||i==="right"&&n-r-o<0)return!0}function mf(i,t,e,s){let{x:n,width:r}=e,{width:o,chartArea:{left:a,right:l}}=i,c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=r/2?c="left":n>=o-r/2&&(c="right"),ff(c,i,t,e)&&(c="center"),c}function Ha(i,t,e){let s=e.yAlign||t.yAlign||df(i,e);return{xAlign:e.xAlign||t.xAlign||mf(i,t,e,s),yAlign:s}}function gf(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function pf(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Ba(i,t,e,s){let{caretSize:n,caretPadding:r,cornerRadius:o}=i,{xAlign:a,yAlign:l}=e,c=n+r,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=te(o),m=gf(t,a),g=pf(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(h,d)+n:a==="right"&&(m+=Math.max(u,f)+n),{x:tt(m,0,s.width-t.width),y:tt(g,0,s.height-t.height)}}function Vs(i,t,e){let s=rt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function $a(i){return Lt([],$t(i))}function yf(i,t,e){return Ht(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ja(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}var Pi=class extends pt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,r=new $s(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=yf(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:s}=e,n=s.beforeTitle.apply(this,[t]),r=s.title.apply(this,[t]),o=s.afterTitle.apply(this,[t]),a=[];return a=Lt(a,$t(n)),a=Lt(a,$t(r)),a=Lt(a,$t(o)),a}getBeforeBody(t,e){return $a(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){let{callbacks:s}=e,n=[];return V(t,r=>{let o={before:[],lines:[],after:[]},a=ja(s,r);Lt(o.before,$t(a.beforeLabel.call(this,r))),Lt(o.lines,a.label.call(this,r)),Lt(o.after,$t(a.afterLabel.call(this,r))),n.push(o)}),n}getAfterBody(t,e){return $a(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){let{callbacks:s}=e,n=s.beforeFooter.apply(this,[t]),r=s.footer.apply(this,[t]),o=s.afterFooter.apply(this,[t]),a=[];return a=Lt(a,$t(n)),a=Lt(a,$t(r)),a=Lt(a,$t(o)),a}_createItems(t){let e=this._active,s=this.chart.data,n=[],r=[],o=[],a=[],l,c;for(l=0,c=e.length;lt.filter(h,u,d,s))),t.itemSort&&(a=a.sort((h,u)=>t.itemSort(h,u,s))),V(a,h=>{let u=ja(t.callbacks,h);n.push(u.labelColor.call(this,h)),r.push(u.labelPointStyle.call(this,h)),o.push(u.labelTextColor.call(this,h))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(t,e){let s=this.options.setContext(this.getContext()),n=this._active,r,o=[];if(!n.length)this.opacity!==0&&(r={opacity:0});else{let a=Ii[s.position].call(this,n,this._eventPosition);o=this._createItems(s),this.title=this.getTitle(o,s),this.beforeBody=this.getBeforeBody(o,s),this.body=this.getBody(o,s),this.afterBody=this.getAfterBody(o,s),this.footer=this.getFooter(o,s);let l=this._size=Va(this,s),c=Object.assign({},a,l),h=Ha(this.chart,s,c),u=Ba(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,r={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){let r=this.getCaretPosition(t,s,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,s){let{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=te(a),{x:d,y:f}=t,{width:m,height:g}=e,p,y,b,_,w,x;return r==="center"?(w=f+g/2,n==="left"?(p=d,y=p-o,_=w+o,x=w-o):(p=d+m,y=p+o,_=w-o,x=w+o),b=p):(n==="left"?y=d+Math.max(l,h)+o:n==="right"?y=d+m-Math.max(c,u)-o:y=this.caretX,r==="top"?(_=f,w=_-o,p=y-o,b=y+o):(_=f+g,w=_+o,p=y+o,b=y-o),x=_),{x1:p,x2:y,x3:b,y1:_,y2:w,y3:x}}drawTitle(t,e,s){let n=this.title,r=n.length,o,a,l;if(r){let c=pe(s.rtl,this.x,this.width);for(t.x=Vs(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",o=Q(s.titleFont),a=s.titleSpacing,e.fillStyle=s.titleColor,e.font=o.string,l=0;l_!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Re(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Re(t,{x:y,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(y,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){let{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=s,u=Q(s.bodyFont),d=u.lineHeight,f=0,m=pe(s.rtl,this.x,this.width),g=function(v){e.fillText(v,m.x(t.x+f),t.y+d/2),t.y+=d+r},p=m.textAlign(o),y,b,_,w,x,S,k;for(e.textAlign=o,e.textBaseline="middle",e.font=u.string,t.x=Vs(this,p,s),e.fillStyle=s.bodyColor,V(this.beforeBody,g),f=a&&p!=="right"?o==="center"?c/2+h:c+2+h:0,w=0,S=n.length;w0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,s=this.$animations,n=s&&s.x,r=s&&s.y;if(n||r){let o=Ii[t.position].call(this,this._active,this._eventPosition);if(!o)return;let a=this._size=Va(this,t),l=Object.assign({},o,this._size),c=Ha(e,t,l),h=Ba(t,l,c,e);(n._to!==h.x||r._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},r={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let o=rt(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(r,t,n,e),er(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),ir(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let s=this._active,n=t.map(({datasetIndex:a,index:l})=>{let c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!_i(s,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,r=this._active||[],o=this._getActiveElements(t,r,e,s),a=this._positionChanged(o,t),l=e||!_i(o,r)||a;return l&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){let r=this.options;if(t.type==="mouseout")return[];if(!n)return e;let o=this.chart.getElementsAtEventForMode(t,r.mode,r,s);return r.reverse&&o.reverse(),o}_positionChanged(t,e){let{caretX:s,caretY:n,options:r}=this,o=Ii[r.position].call(this,t,e);return o!==!1&&(s!==o.x||n!==o.y)}};Pi.positioners=Ii;var bf={id:"tooltip",_element:Pi,positioners:Ii,afterInit(i,t,e){e&&(i.tooltip=new Pi({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Ft,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndexi!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},xf=Object.freeze({__proto__:null,Decimation:Rd,Filler:nf,Legend:af,SubTitle:hf,Title:cf,Tooltip:bf}),_f=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function wf(i,t,e,s){let n=i.indexOf(t);if(n===-1)return _f(i,t,e,s);let r=i.lastIndexOf(t);return n!==r?e:n}var Sf=(i,t)=>i===null?null:tt(Math.round(i),0,t),Ke=class extends be{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let s=this.getLabels();for(let{index:n,label:r}of e)s[n]===r&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(P(t))return null;let s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:wf(s,t,E(e,t),this._addedLabels),Sf(e,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){let t=this.min,e=this.max,s=this.options.offset,n=[],r=this.getLabels();r=t===0&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let o=t;o<=e;o++)n.push({value:o});return n}getLabelForValue(t){let e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};Ke.id="category";Ke.defaults={ticks:{callback:Ke.prototype.getLabelForValue}};function kf(i,t){let e=[],{bounds:n,step:r,min:o,max:a,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:d}=i,f=r||1,m=h-1,{min:g,max:p}=t,y=!P(o),b=!P(a),_=!P(c),w=(p-g)/(u+1),x=Cn((p-g)/m/f)*f,S,k,v,T;if(x<1e-14&&!y&&!b)return[{value:g},{value:p}];T=Math.ceil(p/x)-Math.floor(g/x),T>m&&(x=Cn(T*x/m/f)*f),P(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),n==="ticks"?(k=Math.floor(g/x)*x,v=Math.ceil(p/x)*x):(k=g,v=p),y&&b&&r&&Ao((a-o)/r,x/1e3)?(T=Math.round(Math.min((a-o)/x,h)),x=(a-o)/T,k=o,v=a):_?(k=y?o:k,v=b?a:v,T=c-1,x=(v-k)/T):(T=(v-k)/x,Pe(T,Math.round(T),x/1e3)?T=Math.round(T):T=Math.ceil(T));let C=Math.max(An(x),An(k));S=Math.pow(10,P(l)?C:l),k=Math.round(k*S)/S,v=Math.round(v*S)/S;let N=0;for(y&&(d&&k!==o?(e.push({value:o}),kn=e?n:l,a=l=>r=s?r:l;if(t){let l=Mt(n),c=Mt(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(n===r){let l=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(r*.05)),a(r+l),t||o(n-l)}this.min=n,this.max=r}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,s=this.getTickLimit();s=Math.max(2,s);let n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,o=kf(n,r);return t.bounds==="ticks"&&Fn(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){let t=this.ticks,e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){let n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return ze(t,this.chart.options.locale,this.options.ticks.format)}},Ni=class extends Je{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=q(t)?t:0,this.max=q(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,s=_t(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};Ni.id="linear";Ni.defaults={ticks:{callback:Gs.formatters.numeric}};function Ya(i){return i/Math.pow(10,Math.floor(mt(i)))===1}function Mf(i,t){let e=Math.floor(mt(t.max)),s=Math.ceil(t.max/Math.pow(10,e)),n=[],r=ft(i.min,Math.pow(10,Math.floor(mt(t.min)))),o=Math.floor(mt(r)),a=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do n.push({value:r,major:Ya(r)}),++a,a===10&&(a=1,++o,l=o>=0?1:l),r=Math.round(a*Math.pow(10,o)*l)/l;while(o0?s:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=q(t)?Math.max(0,t):null,this.max=q(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),s=this.min,n=this.max,r=l=>s=t?s:l,o=l=>n=e?n:l,a=(l,c)=>Math.pow(10,Math.floor(mt(l))+c);s===n&&(s<=0?(r(1),o(10)):(r(a(s,-1)),o(a(n,1)))),s<=0&&r(a(n,-1)),n<=0&&o(a(s,1)),this._zero&&this.min!==this._suggestedMin&&s===a(this.min,0)&&r(a(s,-1)),this.min=s,this.max=n}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},s=Mf(e,this);return t.bounds==="ticks"&&Fn(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":ze(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=mt(t),this._valueRange=mt(this.max)-mt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(mt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};Ri.id="logarithmic";Ri.defaults={ticks:{callback:Gs.formatters.logarithmic,major:{enabled:!0}}};function vr(i){let t=i.ticks;if(t.display&&i.display){let e=rt(t.backdropPadding);return E(t.font&&t.font.size,A.font.size)+e.height}return 0}function Tf(i,t,e){return e=B(e)?e:[e],{w:Yo(i,t.string,e),h:e.length*t.lineHeight}}function Za(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function vf(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],r=i._pointLabels.length,o=i.options.pointLabels,a=o.centerPointLabels?j/r:0;for(let l=0;lt.r&&(a=(s.end-t.r)/r,i.r=Math.max(i.r,t.r+a)),n.startt.b&&(l=(n.end-t.b)/o,i.b=Math.max(i.b,t.b+l))}function Df(i,t,e){let s=[],n=i._pointLabels.length,r=i.options,o=vr(r)/2,a=i.drawingArea,l=r.pointLabels.centerPointLabels?j/n:0;for(let c=0;c270||e<90)&&(i-=t),i}function Ff(i,t){let{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){let r=s.setContext(i.getPointLabelContext(n)),o=Q(r.font),{x:a,y:l,textAlign:c,left:h,top:u,right:d,bottom:f}=i._pointLabelItems[n],{backdropColor:m}=r;if(!P(m)){let g=te(r.borderRadius),p=rt(r.backdropPadding);e.fillStyle=m;let y=h-p.left,b=u-p.top,_=d-h+p.width,w=f-u+p.height;Object.values(g).some(x=>x!==0)?(e.beginPath(),Re(e,{x:y,y:b,w:_,h:w,radius:g}),e.fill()):e.fillRect(y,b,_,w)}Qt(e,i._pointLabels[n],a,l+o.lineHeight/2,o,{color:r.color,textAlign:c,textBaseline:"middle"})}}function pl(i,t,e,s){let{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,H);else{let r=i.getPointPosition(0,t);n.moveTo(r.x,r.y);for(let o=1;o{let n=$(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){let t=this.options;t.display&&t.pointLabels.display?vf(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){let e=H/(this._pointLabels.length||1),s=this.options.startAngle||0;return ct(t*e+_t(s))}getDistanceFromCenterForValue(t){if(P(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(P(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t{if(h!==0){a=this.getDistanceFromCenterForValue(c.value);let u=n.setContext(this.getContext(h-1));Af(this,u,a,r)}}),s.display){for(t.save(),o=r-1;o>=0;o--){let c=s.setContext(this.getPointLabelContext(o)),{color:h,lineWidth:u}=c;!u||!h||(t.lineWidth=u,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;let n=this.getIndexAngle(0),r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!e.reverse)return;let c=s.setContext(this.getContext(l)),h=Q(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;let u=rt(c.backdropPadding);t.fillRect(-o/2-u.left,-r-h.size/2-u.top,o+u.width,h.size+u.height)}Qt(t,a.label,0,-r,h,{color:c.color})}),t.restore()}drawTitle(){}};_e.id="radialLinear";_e.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gs.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}};_e.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};_e.descriptors={angleLines:{_fallback:"grid"}};var Xs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ht=Object.keys(Xs);function Pf(i,t){return i-t}function qa(i,t){if(P(t))return null;let e=i._adapter,{parser:s,round:n,isoWeekday:r}=i._parseOpts,o=t;return typeof s=="function"&&(o=s(o)),q(o)||(o=typeof s=="string"?e.parse(o,s):e.parse(o)),o===null?null:(n&&(o=n==="week"&&(ge(r)||r===!0)?e.startOf(o,"isoWeek",r):e.startOf(o,n)),+o)}function Ga(i,t,e,s){let n=ht.length;for(let r=ht.indexOf(i);r=ht.indexOf(e);r--){let o=ht[r];if(Xs[o].common&&i._adapter.diff(n,s,o)>=t-1)return o}return ht[e?ht.indexOf(e):0]}function Rf(i){for(let t=ht.indexOf(i)+1,e=ht.length;t=t?e[s]:e[n];i[r]=!0}}function Wf(i,t,e,s){let n=i._adapter,r=+n.startOf(t[0].value,s),o=t[t.length-1].value,a,l;for(a=r;a<=o;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function Ka(i,t,e){let s=[],n={},r=t.length,o,a;for(o=0;o+t.value))}initOffsets(t){let e=0,s=0,n,r;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?s=r:s=(r-this.getDecimalForValue(t[t.length-2]))/2);let o=t.length<3?.5:.25;e=tt(e,0,o),s=tt(s,0,o),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){let t=this._adapter,e=this.min,s=this.max,n=this.options,r=n.time,o=r.unit||Ga(r.minUnit,e,s,this._getLabelCapacity(e)),a=E(r.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=ge(l)||l===!0,h={},u=e,d,f;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":o),t.diff(s,e,o)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+o);let m=n.ticks.source==="data"&&this.getDataTimestamps();for(d=u,f=0;dg-p).map(g=>+g)}getLabelForValue(t){let e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}_tickFormatFunction(t,e,s,n){let r=this.options,o=r.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&o[a],h=l&&o[l],u=s[e],d=l&&h&&u&&u.major,f=this._adapter.format(t,n||(d?h:c)),m=r.ticks.callback;return m?$(m,[f,e,s],this):f}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=Ct(i,"pos",t)),{pos:r,time:a}=i[s],{pos:o,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=Ct(i,"time",t)),{time:r,pos:a}=i[s],{time:o,pos:l}=i[n]);let c=o-r;return c?a+(l-a)*(t-r)/c:a}var Wi=class extends we{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Hs(e,this.min),this._tableRange=Hs(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:s}=this,n=[],r=[],o,a,l,c,h;for(o=0,a=t.length;o=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(o=0,a=n.length;o=0?m:1e3+m,(d-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}};var bl={};function jf(i,t={}){let e=JSON.stringify([i,t]),s=bl[e];return s||(s=new Intl.ListFormat(i,t),bl[e]=s),s}var Fr={};function Ar(i,t={}){let e=JSON.stringify([i,t]),s=Fr[e];return s||(s=new Intl.DateTimeFormat(i,t),Fr[e]=s),s}var Lr={};function Uf(i,t={}){let e=JSON.stringify([i,t]),s=Lr[e];return s||(s=new Intl.NumberFormat(i,t),Lr[e]=s),s}var Pr={};function Yf(i,t={}){let{base:e,...s}=t,n=JSON.stringify([i,s]),r=Pr[n];return r||(r=new Intl.RelativeTimeFormat(i,t),Pr[n]=r),r}var rs=null;function Zf(){return rs||(rs=new Intl.DateTimeFormat().resolvedOptions().locale,rs)}var xl={};function qf(i){let t=xl[i];if(!t){let e=new Intl.Locale(i);t="getWeekInfo"in e?e.getWeekInfo():e.weekInfo,xl[i]=t}return t}function Gf(i){let t=i.indexOf("-x-");t!==-1&&(i=i.substring(0,t));let e=i.indexOf("-u-");if(e===-1)return[i];{let s,n;try{s=Ar(i).resolvedOptions(),n=i}catch{let l=i.substring(0,e);s=Ar(l).resolvedOptions(),n=l}let{numberingSystem:r,calendar:o}=s;return[n,r,o]}}function Xf(i,t,e){return(e||t)&&(i.includes("-u-")||(i+="-u"),e&&(i+=`-ca-${e}`),t&&(i+=`-nu-${t}`)),i}function Kf(i){let t=[];for(let e=1;e<=12;e++){let s=I.utc(2009,e,1);t.push(i(s))}return t}function Jf(i){let t=[];for(let e=1;e<=7;e++){let s=I.utc(2016,11,13+e);t.push(i(s))}return t}function rn(i,t,e,s){let n=i.listingMode();return n==="error"?null:n==="en"?e(t):s(t)}function Qf(i){return i.numberingSystem&&i.numberingSystem!=="latn"?!1:i.numberingSystem==="latn"||!i.locale||i.locale.startsWith("en")||new Intl.DateTimeFormat(i.intl).resolvedOptions().numberingSystem==="latn"}var Nr=class{constructor(t,e,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;let{padTo:n,floor:r,...o}=s;if(!e||Object.keys(o).length>0){let a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=Uf(t,a)}}format(t){if(this.inf){let e=this.floor?Math.floor(t):t;return this.inf.format(e)}else{let e=this.floor?Math.floor(t):ei(t,3);return Y(e,this.padTo)}}},Rr=class{constructor(t,e,s){this.opts=s,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){let o=-1*(t.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&at.create(a).valid?(n=a,this.dt=t):(n="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,n=t.zone.name):(n="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);let r={...this.opts};r.timeZone=r.timeZone||n,this.dtf=Ar(e,r)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(e=>{if(e.type==="timeZoneName"){let s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:s}}else return e}):t}resolvedOptions(){return this.dtf.resolvedOptions()}},Wr=class{constructor(t,e,s){this.opts={style:"long",...s},!e&&on()&&(this.rtf=Yf(t,s))}format(t,e){return this.rtf?this.rtf.format(t,e):_l(e,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}},tm={firstDay:1,minimalDays:4,weekend:[6,7]},W=class i{static fromOpts(t){return i.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,s,n,r=!1){let o=t||R.defaultLocale,a=o||(r?"en-US":Zf()),l=e||R.defaultNumberingSystem,c=s||R.defaultOutputCalendar,h=os(n)||R.defaultWeekSettings;return new i(a,l,c,h,o)}static resetCache(){rs=null,Fr={},Lr={},Pr={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:s,weekSettings:n}={}){return i.create(t,e,s,n)}constructor(t,e,s,n,r){let[o,a,l]=Gf(t);this.locale=o,this.numberingSystem=e||a||null,this.outputCalendar=s||l||null,this.weekSettings=n,this.intl=Xf(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Qf(this)),this.fastNumbersCached}listingMode(){let t=this.isEnglish(),e=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&e?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:i.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,os(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return rn(this,t,zr,()=>{let s=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=Kf(r=>this.extract(r,s,"month"))),this.monthsCache[n][t]})}weekdays(t,e=!1){return rn(this,t,Vr,()=>{let s=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=Jf(r=>this.extract(r,s,"weekday"))),this.weekdaysCache[n][t]})}meridiems(){return rn(this,void 0,()=>Hr,()=>{if(!this.meridiemCache){let t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[I.utc(2016,11,13,9),I.utc(2016,11,13,19)].map(e=>this.extract(e,t,"dayperiod"))}return this.meridiemCache})}eras(t){return rn(this,t,Br,()=>{let e={era:t};return this.eraCache[t]||(this.eraCache[t]=[I.utc(-40,1,1),I.utc(2017,1,1)].map(s=>this.extract(s,e,"era"))),this.eraCache[t]})}extract(t,e,s){let n=this.dtFormatter(t,e),r=n.formatToParts(),o=r.find(a=>a.type.toLowerCase()===s);return o?o.value:null}numberFormatter(t={}){return new Nr(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new Rr(t,this.intl,e)}relFormatter(t={}){return new Wr(this.intl,this.isEnglish(),t)}listFormatter(t={}){return jf(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:an()?qf(this.locale):tm}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}};var jr=null,et=class i extends ut{static get utcInstance(){return jr===null&&(jr=new i(0)),jr}static instance(t){return t===0?i.utcInstance:new i(t)}static parseSpecifier(t){if(t){let e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new i(Se(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ae(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ae(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return ae(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}};var ii=class extends ut{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Dt(i,t){let e;if(O(i)||i===null)return t;if(i instanceof ut)return i;if(wl(i)){let s=i.toLowerCase();return s==="default"?t:s==="local"||s==="system"?oe.instance:s==="utc"||s==="gmt"?et.utcInstance:et.parseSpecifier(s)||at.create(i)}else return Et(i)?et.instance(i):typeof i=="object"&&"offset"in i&&typeof i.offset=="function"?i:new ii(i)}var Ur={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Sl={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},em=Ur.hanidec.replace(/[\[|\]]/g,"").split("");function kl(i){let t=parseInt(i,10);if(isNaN(t)){t="";for(let e=0;e=r&&s<=o&&(t+=s-r)}}return parseInt(t,10)}else return t}var si={};function Ml(){si={}}function wt({numberingSystem:i},t=""){let e=i||"latn";return si[e]||(si[e]={}),si[e][t]||(si[e][t]=new RegExp(`${Ur[e]}${t}`)),si[e][t]}var Tl=()=>Date.now(),vl="system",Ol=null,Dl=null,El=null,Il=60,Cl,Fl=null,R=class{static get now(){return Tl}static set now(t){Tl=t}static set defaultZone(t){vl=t}static get defaultZone(){return Dt(vl,oe.instance)}static get defaultLocale(){return Ol}static set defaultLocale(t){Ol=t}static get defaultNumberingSystem(){return Dl}static set defaultNumberingSystem(t){Dl=t}static get defaultOutputCalendar(){return El}static set defaultOutputCalendar(t){El=t}static get defaultWeekSettings(){return Fl}static set defaultWeekSettings(t){Fl=os(t)}static get twoDigitCutoffYear(){return Il}static set twoDigitCutoffYear(t){Il=t%100}static get throwOnInvalid(){return Cl}static set throwOnInvalid(t){Cl=t}static resetCaches(){W.resetCache(),at.resetCache(),I.resetCache(),Ml()}};var it=class{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var Al=[0,31,59,90,120,151,181,212,243,273,304,334],Ll=[0,31,60,91,121,152,182,213,244,274,305,335];function St(i,t){return new it("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${i}, which is invalid`)}function ln(i,t,e){let s=new Date(Date.UTC(i,t-1,e));i<100&&i>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);let n=s.getUTCDay();return n===0?7:n}function Pl(i,t,e){return e+(Me(i)?Ll:Al)[t-1]}function Nl(i,t){let e=Me(i)?Ll:Al,s=e.findIndex(r=>rke(s,t,e)?(c=s+1,l=1):c=s,{weekYear:c,weekNumber:l,weekday:a,...cs(i)}}function Yr(i,t=4,e=1){let{weekYear:s,weekNumber:n,weekday:r}=i,o=cn(ln(s,1,t),e),a=le(s),l=n*7+r-o-7+t,c;l<1?(c=s-1,l+=le(c)):l>a?(c=s+1,l-=le(s)):c=s;let{month:h,day:u}=Nl(c,l);return{year:c,month:h,day:u,...cs(i)}}function hn(i){let{year:t,month:e,day:s}=i,n=Pl(t,e,s);return{year:t,ordinal:n,...cs(i)}}function Zr(i){let{year:t,ordinal:e}=i,{month:s,day:n}=Nl(t,e);return{year:t,month:s,day:n,...cs(i)}}function qr(i,t){if(!O(i.localWeekday)||!O(i.localWeekNumber)||!O(i.localWeekYear)){if(!O(i.weekday)||!O(i.weekNumber)||!O(i.weekYear))throw new Tt("Cannot mix locale-based week fields with ISO-based week fields");return O(i.localWeekday)||(i.weekday=i.localWeekday),O(i.localWeekNumber)||(i.weekNumber=i.localWeekNumber),O(i.localWeekYear)||(i.weekYear=i.localWeekYear),delete i.localWeekday,delete i.localWeekNumber,delete i.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Rl(i,t=4,e=1){let s=ls(i.weekYear),n=bt(i.weekNumber,1,ke(i.weekYear,t,e)),r=bt(i.weekday,1,7);return s?n?r?!1:St("weekday",i.weekday):St("week",i.weekNumber):St("weekYear",i.weekYear)}function Wl(i){let t=ls(i.year),e=bt(i.ordinal,1,le(i.year));return t?e?!1:St("ordinal",i.ordinal):St("year",i.year)}function Gr(i){let t=ls(i.year),e=bt(i.month,1,12),s=bt(i.day,1,ni(i.year,i.month));return t?e?s?!1:St("day",i.day):St("month",i.month):St("year",i.year)}function Xr(i){let{hour:t,minute:e,second:s,millisecond:n}=i,r=bt(t,0,23)||t===24&&e===0&&s===0&&n===0,o=bt(e,0,59),a=bt(s,0,59),l=bt(n,0,999);return r?o?a?l?!1:St("millisecond",n):St("second",s):St("minute",e):St("hour",t)}function O(i){return typeof i>"u"}function Et(i){return typeof i=="number"}function ls(i){return typeof i=="number"&&i%1===0}function wl(i){return typeof i=="string"}function Vl(i){return Object.prototype.toString.call(i)==="[object Date]"}function on(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function an(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Hl(i){return Array.isArray(i)?i:[i]}function Kr(i,t,e){if(i.length!==0)return i.reduce((s,n)=>{let r=[t(n),n];return s&&e(s[0],r[0])===s[0]?s:r},null)[1]}function Bl(i,t){return t.reduce((e,s)=>(e[s]=i[s],e),{})}function ce(i,t){return Object.prototype.hasOwnProperty.call(i,t)}function os(i){if(i==null)return null;if(typeof i!="object")throw new G("Week settings must be an object");if(!bt(i.firstDay,1,7)||!bt(i.minimalDays,1,7)||!Array.isArray(i.weekend)||i.weekend.some(t=>!bt(t,1,7)))throw new G("Invalid week settings");return{firstDay:i.firstDay,minimalDays:i.minimalDays,weekend:Array.from(i.weekend)}}function bt(i,t,e){return ls(i)&&i>=t&&i<=e}function im(i,t){return i-t*Math.floor(i/t)}function Y(i,t=2){let e=i<0,s;return e?s="-"+(""+-i).padStart(t,"0"):s=(""+i).padStart(t,"0"),s}function Ut(i){if(!(O(i)||i===null||i===""))return parseInt(i,10)}function he(i){if(!(O(i)||i===null||i===""))return parseFloat(i)}function hs(i){if(!(O(i)||i===null||i==="")){let t=parseFloat("0."+i)*1e3;return Math.floor(t)}}function ei(i,t,e=!1){let s=10**t;return(e?Math.trunc:Math.round)(i*s)/s}function Me(i){return i%4===0&&(i%100!==0||i%400===0)}function le(i){return Me(i)?366:365}function ni(i,t){let e=im(t-1,12)+1,s=i+(t-e)/12;return e===2?Me(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][e-1]}function ti(i){let t=Date.UTC(i.year,i.month-1,i.day,i.hour,i.minute,i.second,i.millisecond);return i.year<100&&i.year>=0&&(t=new Date(t),t.setUTCFullYear(i.year,i.month-1,i.day)),+t}function zl(i,t,e){return-cn(ln(i,1,t),e)+t-1}function ke(i,t=4,e=1){let s=zl(i,t,e),n=zl(i+1,t,e);return(le(i)-s+n)/7}function us(i){return i>99?i:i>R.twoDigitCutoffYear?1900+i:2e3+i}function en(i,t,e,s=null){let n=new Date(i),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(r.timeZone=s);let o={timeZoneName:t,...r},a=new Intl.DateTimeFormat(e,o).formatToParts(n).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function Se(i,t){let e=parseInt(i,10);Number.isNaN(e)&&(e=0);let s=parseInt(t,10)||0,n=e<0||Object.is(e,-0)?-s:s;return e*60+n}function Jr(i){let t=Number(i);if(typeof i=="boolean"||i===""||Number.isNaN(t))throw new G(`Invalid unit value ${i}`);return t}function ri(i,t){let e={};for(let s in i)if(ce(i,s)){let n=i[s];if(n==null)continue;e[t(s)]=Jr(n)}return e}function ae(i,t){let e=Math.trunc(Math.abs(i/60)),s=Math.trunc(Math.abs(i%60)),n=i>=0?"+":"-";switch(t){case"short":return`${n}${Y(e,2)}:${Y(s,2)}`;case"narrow":return`${n}${e}${s>0?`:${s}`:""}`;case"techie":return`${n}${Y(e,2)}${Y(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function cs(i){return Bl(i,["hour","minute","second","millisecond"])}var sm=["January","February","March","April","May","June","July","August","September","October","November","December"],Qr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],nm=["J","F","M","A","M","J","J","A","S","O","N","D"];function zr(i){switch(i){case"narrow":return[...nm];case"short":return[...Qr];case"long":return[...sm];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var to=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],eo=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rm=["M","T","W","T","F","S","S"];function Vr(i){switch(i){case"narrow":return[...rm];case"short":return[...eo];case"long":return[...to];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Hr=["AM","PM"],om=["Before Christ","Anno Domini"],am=["BC","AD"],lm=["B","A"];function Br(i){switch(i){case"narrow":return[...lm];case"short":return[...am];case"long":return[...om];default:return null}}function $l(i){return Hr[i.hour<12?0:1]}function jl(i,t){return Vr(t)[i.weekday-1]}function Ul(i,t){return zr(t)[i.month-1]}function Yl(i,t){return Br(t)[i.year<0?0:1]}function _l(i,t,e="always",s=!1){let n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=["hours","minutes","seconds"].indexOf(i)===-1;if(e==="auto"&&r){let u=i==="days";switch(t){case 1:return u?"tomorrow":`next ${n[i][0]}`;case-1:return u?"yesterday":`last ${n[i][0]}`;case 0:return u?"today":`this ${n[i][0]}`;default:}}let o=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=n[i],h=s?l?c[1]:c[2]||c[1]:l?n[i][0]:i;return o?`${a} ${h} ago`:`in ${a} ${h}`}function Zl(i,t){let e="";for(let s of i)s.literal?e+=s.val:e+=t(s.val);return e}var cm={D:re,DD:Vi,DDD:Hi,DDDD:Bi,t:$i,tt:ji,ttt:Ui,tttt:Yi,T:Zi,TT:qi,TTT:Gi,TTTT:Xi,f:Ki,ff:Qi,fff:es,ffff:ss,F:Ji,FF:ts,FFF:is,FFFF:ns},st=class i{static create(t,e={}){return new i(t,e)}static parseFormat(t){let e=null,s="",n=!1,r=[];for(let o=0;o0&&r.push({literal:n||/^\s+$/.test(s),val:s}),e=null,s="",n=!n):n||a===e?s+=a:(s.length>0&&r.push({literal:/^\s+$/.test(s),val:s}),s=a,e=a)}return s.length>0&&r.push({literal:n||/^\s+$/.test(s),val:s}),r}static macroTokenToFormatOpts(t){return cm[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return Y(t,e);let s={...this.opts};return e>0&&(s.padTo=e),this.loc.numberFormatter(s).format(t)}formatDateTimeFromString(t,e){let s=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(f,m)=>this.loc.extract(t,f,m),o=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>s?$l(t):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,m)=>s?Ul(t,f):r(m?{month:f}:{month:f,day:"numeric"},"month"),c=(f,m)=>s?jl(t,f):r(m?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),h=f=>{let m=i.macroTokenToFormatOpts(f);return m?this.formatWithSystemDefault(t,m):f},u=f=>s?Yl(t,f):r({era:f},"era"),d=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return n?r({day:"numeric"},"day"):this.num(t.day);case"dd":return n?r({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return n?r({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?r({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return n?r({month:"numeric"},"month"):this.num(t.month);case"MM":return n?r({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return n?r({year:"numeric"},"year"):this.num(t.year);case"yy":return n?r({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?r({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?r({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(f)}};return Zl(i.parseFormat(e),d)}formatDurationFromString(t,e){let s=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=l=>c=>{let h=s(c);return h?this.num(l.get(h),c.length):c},r=i.parseFormat(e),o=r.reduce((l,{literal:c,val:h})=>c?l:l.concat(h),[]),a=t.shiftTo(...o.map(s).filter(l=>l));return Zl(r,n(a))}};var Gl=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ai(...i){let t=i.reduce((e,s)=>e+s.source,"");return RegExp(`^${t}$`)}function li(...i){return t=>i.reduce(([e,s,n],r)=>{let[o,a,l]=r(t,n);return[{...e,...o},a||s,l]},[{},null,1]).slice(0,2)}function ci(i,...t){if(i==null)return[null,null];for(let[e,s]of t){let n=e.exec(i);if(n)return s(n)}return[null,null]}function Xl(...i){return(t,e)=>{let s={},n;for(n=0;nf!==void 0&&(m||f&&h)?-f:f;return[{years:d(he(e)),months:d(he(s)),weeks:d(he(n)),days:d(he(r)),hours:d(he(o)),minutes:d(he(a)),seconds:d(he(l),l==="-0"),milliseconds:d(hs(c),u)}]}var Sm={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function no(i,t,e,s,n,r,o){let a={year:t.length===2?us(Ut(t)):Ut(t),month:Qr.indexOf(e)+1,day:Ut(s),hour:Ut(n),minute:Ut(r)};return o&&(a.second=Ut(o)),i&&(a.weekday=i.length>3?to.indexOf(i)+1:eo.indexOf(i)+1),a}var km=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Mm(i){let[,t,e,s,n,r,o,a,l,c,h,u]=i,d=no(t,n,s,e,r,o,a),f;return l?f=Sm[l]:c?f=0:f=Se(h,u),[d,new et(f)]}function Tm(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var vm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Om=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Dm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ql(i){let[,t,e,s,n,r,o,a]=i;return[no(t,n,s,e,r,o,a),et.utcInstance]}function Em(i){let[,t,e,s,n,r,o,a]=i;return[no(t,a,e,s,n,r,o),et.utcInstance]}var Im=ai(um,so),Cm=ai(dm,so),Fm=ai(fm,so),Am=ai(Jl),tc=li(bm,hi,ds,fs),Lm=li(mm,hi,ds,fs),Pm=li(gm,hi,ds,fs),Nm=li(hi,ds,fs);function ec(i){return ci(i,[Im,tc],[Cm,Lm],[Fm,Pm],[Am,Nm])}function ic(i){return ci(Tm(i),[km,Mm])}function sc(i){return ci(i,[vm,ql],[Om,ql],[Dm,Em])}function nc(i){return ci(i,[_m,wm])}var Rm=li(hi);function rc(i){return ci(i,[xm,Rm])}var Wm=ai(pm,ym),zm=ai(Ql),Vm=li(hi,ds,fs);function oc(i){return ci(i,[Wm,tc],[zm,Vm])}var ac="Invalid Duration",cc={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Hm={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...cc},kt=146097/400,ui=146097/4800,Bm={years:{quarters:4,months:12,weeks:kt/7,days:kt,hours:kt*24,minutes:kt*24*60,seconds:kt*24*60*60,milliseconds:kt*24*60*60*1e3},quarters:{months:3,weeks:kt/28,days:kt/4,hours:kt*24/4,minutes:kt*24*60/4,seconds:kt*24*60*60/4,milliseconds:kt*24*60*60*1e3/4},months:{weeks:ui/7,days:ui,hours:ui*24,minutes:ui*24*60,seconds:ui*24*60*60,milliseconds:ui*24*60*60*1e3},...cc},Te=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],$m=Te.slice(0).reverse();function ue(i,t,e=!1){let s={values:e?t.values:{...i.values,...t.values||{}},loc:i.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||i.conversionAccuracy,matrix:t.matrix||i.matrix};return new Z(s)}function hc(i,t){let e=t.milliseconds??0;for(let s of $m.slice(1))t[s]&&(e+=t[s]*i[s].milliseconds);return e}function lc(i,t){let e=hc(i,t)<0?-1:1;Te.reduceRight((s,n)=>{if(O(t[n]))return s;if(s){let r=t[s]*e,o=i[n][s],a=Math.floor(r/o);t[n]+=a*e,t[s]-=a*o*e}return n},null),Te.reduce((s,n)=>{if(O(t[n]))return s;if(s){let r=t[s]%1;t[s]-=r,t[n]+=r*i[s][n]}return n},null)}function jm(i){let t={};for(let[e,s]of Object.entries(i))s!==0&&(t[e]=s);return t}var Z=class i{constructor(t){let e=t.conversionAccuracy==="longterm"||!1,s=e?Bm:Hm;t.matrix&&(s=t.matrix),this.values=t.values,this.loc=t.loc||W.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(t,e){return i.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(t==null||typeof t!="object")throw new G(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new i({values:ri(t,i.normalizeUnit),loc:W.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Et(t))return i.fromMillis(t);if(i.isDuration(t))return t;if(typeof t=="object")return i.fromObject(t);throw new G(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){let[s]=nc(t);return s?i.fromObject(s,e):i.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){let[s]=rc(t);return s?i.fromObject(s,e):i.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new G("need to specify a reason the Duration is invalid");let s=t instanceof it?t:new it(t,e);if(R.throwOnInvalid)throw new Qs(s);return new i({invalid:s})}static normalizeUnit(t){let e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!e)throw new Qe(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){let s={...e,floor:e.round!==!1&&e.floor!==!1};return this.isValid?st.create(this.loc,s).formatDurationFromString(this,t):ac}toHuman(t={}){if(!this.isValid)return ac;let e=Te.map(s=>{let n=this.values[s];return O(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:s.slice(0,-1)}).format(n)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=ei(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;let e=this.toMillis();return e<0||e>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},I.fromMillis(e,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hc(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let e=i.fromDurationLike(t),s={};for(let n of Te)(ce(e.values,n)||ce(this.values,n))&&(s[n]=e.get(n)+this.get(n));return ue(this,{values:s},!0)}minus(t){if(!this.isValid)return this;let e=i.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;let e={};for(let s of Object.keys(this.values))e[s]=Jr(t(this.values[s],s));return ue(this,{values:e},!0)}get(t){return this[i.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let e={...this.values,...ri(t,i.normalizeUnit)};return ue(this,{values:e})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:s,matrix:n}={}){let o={loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:n,conversionAccuracy:s};return ue(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;let t=this.toObject();return lc(this.matrix,t),ue(this,{values:t},!0)}rescale(){if(!this.isValid)return this;let t=jm(this.normalize().shiftToAll().toObject());return ue(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>i.normalizeUnit(o));let e={},s={},n=this.toObject(),r;for(let o of Te)if(t.indexOf(o)>=0){r=o;let a=0;for(let c in s)a+=this.matrix[c][o]*s[c],s[c]=0;Et(n[o])&&(a+=n[o]);let l=Math.trunc(a);e[o]=l,s[o]=(a*1e3-l*1e3)/1e3}else Et(n[o])&&(s[o]=n[o]);for(let o in s)s[o]!==0&&(e[r]+=o===r?s[o]:s[o]/this.matrix[r][o]);return lc(this.matrix,e),ue(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let t={};for(let e of Object.keys(this.values))t[e]=this.values[e]===0?0:-this.values[e];return ue(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function e(s,n){return s===void 0||s===0?n===void 0||n===0:s===n}for(let s of Te)if(!e(this.values[s],t.values[s]))return!1;return!0}};var di="Invalid Interval";function Um(i,t){return!i||!i.isValid?Yt.invalid("missing or invalid start"):!t||!t.isValid?Yt.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:e}={}){return this.isValid?i.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];let e=t.map(fi).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),s=[],{s:n}=this,r=0;for(;n+this.e?this.e:o;s.push(i.fromDateTimes(n,a)),n=a,r+=1}return s}splitBy(t){let e=Z.fromDurationLike(t);if(!this.isValid||!e.isValid||e.as("milliseconds")===0)return[];let{s}=this,n=1,r,o=[];for(;sl*n));r=+a>+this.e?this.e:a,o.push(i.fromDateTimes(s,r)),s=r,n+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;let e=this.s>t.s?this.s:t.s,s=this.e=s?null:i.fromDateTimes(e,s)}union(t){if(!this.isValid)return this;let e=this.st.e?this.e:t.e;return i.fromDateTimes(e,s)}static merge(t){let[e,s]=t.sort((n,r)=>n.s-r.s).reduce(([n,r],o)=>r?r.overlaps(o)||r.abutsStart(o)?[n,r.union(o)]:[n.concat([r]),o]:[n,o],[[],null]);return s&&e.push(s),e}static xor(t){let e=null,s=0,n=[],r=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...r),a=o.sort((l,c)=>l.time-c.time);for(let l of a)s+=l.type==="s"?1:-1,s===1?e=l.time:(e&&+e!=+l.time&&n.push(i.fromDateTimes(e,l.time)),e=null);return i.merge(n)}difference(...t){return i.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:di}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=re,e={}){return this.isValid?st.create(this.s.loc.clone(e),t).formatInterval(this):di}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:di}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:di}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:di}toFormat(t,{separator:e=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:di}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):Z.invalid(this.invalidReason)}mapEndpoints(t){return i.fromDateTimes(t(this.s),t(this.e))}};var Zt=class{static hasDST(t=R.defaultZone){let e=I.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return at.isValidZone(t)}static normalizeZone(t){return Dt(t,R.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:s=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||W.create(e,s,r)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:s=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||W.create(e,s,r)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:s=null,locObj:n=null}={}){return(n||W.create(e,s,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:s=null,locObj:n=null}={}){return(n||W.create(e,s,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return W.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return W.create(e,null,"gregory").eras(t)}static features(){return{relative:on(),localeWeek:an()}}};function uc(i,t){let e=n=>n.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=e(t)-e(i);return Math.floor(Z.fromMillis(s).as("days"))}function Ym(i,t,e){let s=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let h=uc(l,c);return(h-h%7)/7}],["days",uc]],n={},r=i,o,a;for(let[l,c]of s)e.indexOf(l)>=0&&(o=l,n[l]=c(i,t),a=r.plus(n),a>t?(n[l]--,i=r.plus(n),i>t&&(a=i,n[l]--,i=r.plus(n))):i=a);return[i,n,a,o]}function dc(i,t,e,s){let[n,r,o,a]=Ym(i,t,e),l=t-n,c=e.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);c.length===0&&(o0?Z.fromMillis(l,s).shiftTo(...c).plus(h):h}var Zm="missing Intl.DateTimeFormat.formatToParts support";function z(i,t=e=>e){return{regex:i,deser:([e])=>t(kl(e))}}var qm="\xA0",gc=`[ ${qm}]`,pc=new RegExp(gc,"g");function Gm(i){return i.replace(/\./g,"\\.?").replace(pc,gc)}function fc(i){return i.replace(/\./g,"").replace(pc," ").toLowerCase()}function It(i,t){return i===null?null:{regex:RegExp(i.map(Gm).join("|")),deser:([e])=>i.findIndex(s=>fc(e)===fc(s))+t}}function mc(i,t){return{regex:i,deser:([,e,s])=>Se(e,s),groups:t}}function un(i){return{regex:i,deser:([t])=>t}}function Xm(i){return i.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Km(i,t){let e=wt(t),s=wt(t,"{2}"),n=wt(t,"{3}"),r=wt(t,"{4}"),o=wt(t,"{6}"),a=wt(t,"{1,2}"),l=wt(t,"{1,3}"),c=wt(t,"{1,6}"),h=wt(t,"{1,9}"),u=wt(t,"{2,4}"),d=wt(t,"{4,6}"),f=p=>({regex:RegExp(Xm(p.val)),deser:([y])=>y,literal:!0}),g=(p=>{if(i.literal)return f(p);switch(p.val){case"G":return It(t.eras("short"),0);case"GG":return It(t.eras("long"),0);case"y":return z(c);case"yy":return z(u,us);case"yyyy":return z(r);case"yyyyy":return z(d);case"yyyyyy":return z(o);case"M":return z(a);case"MM":return z(s);case"MMM":return It(t.months("short",!0),1);case"MMMM":return It(t.months("long",!0),1);case"L":return z(a);case"LL":return z(s);case"LLL":return It(t.months("short",!1),1);case"LLLL":return It(t.months("long",!1),1);case"d":return z(a);case"dd":return z(s);case"o":return z(l);case"ooo":return z(n);case"HH":return z(s);case"H":return z(a);case"hh":return z(s);case"h":return z(a);case"mm":return z(s);case"m":return z(a);case"q":return z(a);case"qq":return z(s);case"s":return z(a);case"ss":return z(s);case"S":return z(l);case"SSS":return z(n);case"u":return un(h);case"uu":return un(a);case"uuu":return z(e);case"a":return It(t.meridiems(),0);case"kkkk":return z(r);case"kk":return z(u,us);case"W":return z(a);case"WW":return z(s);case"E":case"c":return z(e);case"EEE":return It(t.weekdays("short",!1),1);case"EEEE":return It(t.weekdays("long",!1),1);case"ccc":return It(t.weekdays("short",!0),1);case"cccc":return It(t.weekdays("long",!0),1);case"Z":case"ZZ":return mc(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return mc(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return un(/[a-z_+-/]{1,256}?/i);case" ":return un(/[^\S\n\r]/);default:return f(p)}})(i)||{invalidReason:Zm};return g.token=i,g}var Jm={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Qm(i,t,e){let{type:s,value:n}=i;if(s==="literal"){let l=/^\s+$/.test(n);return{literal:!l,val:l?" ":n}}let r=t[s],o=s;s==="hour"&&(t.hour12!=null?o=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?o="hour12":o="hour24":o=e.hour12?"hour12":"hour24");let a=Jm[o];if(typeof a=="object"&&(a=a[r]),a)return{literal:!1,val:a}}function tg(i){return[`^${i.map(e=>e.regex).reduce((e,s)=>`${e}(${s.source})`,"")}$`,i]}function eg(i,t,e){let s=i.match(t);if(s){let n={},r=1;for(let o in e)if(ce(e,o)){let a=e[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(n[a.token.val[0]]=a.deser(s.slice(r,r+l))),r+=l}return[s,n]}else return[s,{}]}function ig(i){let t=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},e=null,s;return O(i.z)||(e=at.create(i.z)),O(i.Z)||(e||(e=new et(i.Z)),s=i.Z),O(i.q)||(i.M=(i.q-1)*3+1),O(i.h)||(i.h<12&&i.a===1?i.h+=12:i.h===12&&i.a===0&&(i.h=0)),i.G===0&&i.y&&(i.y=-i.y),O(i.u)||(i.S=hs(i.u)),[Object.keys(i).reduce((r,o)=>{let a=t(o);return a&&(r[a]=i[o]),r},{}),e,s]}var ro=null;function sg(){return ro||(ro=I.fromMillis(1555555555555)),ro}function ng(i,t){if(i.literal)return i;let e=st.macroTokenToFormatOpts(i.val),s=lo(e,t);return s==null||s.includes(void 0)?i:s}function oo(i,t){return Array.prototype.concat(...i.map(e=>ng(e,t)))}var ms=class{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=oo(st.parseFormat(e),t),this.units=this.tokens.map(s=>Km(s,t)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){let[s,n]=tg(this.units);this.regex=RegExp(s,"i"),this.handlers=n}}explainFromTokens(t){if(this.isValid){let[e,s]=eg(t,this.regex,this.handlers),[n,r,o]=s?ig(s):[null,null,void 0];if(ce(s,"a")&&ce(s,"H"))throw new Tt("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:s,result:n,zone:r,specificOffset:o}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function ao(i,t,e){return new ms(i,e).explainFromTokens(t)}function yc(i,t,e){let{result:s,zone:n,specificOffset:r,invalidReason:o}=ao(i,t,e);return[s,n,r,o]}function lo(i,t){if(!i)return null;let s=st.create(t,i).dtFormatter(sg()),n=s.formatToParts(),r=s.resolvedOptions();return n.map(o=>Qm(o,i,r))}var co="Invalid DateTime",bc=864e13;function gs(i){return new it("unsupported zone",`the zone "${i.name}" is not supported`)}function ho(i){return i.weekData===null&&(i.weekData=as(i.c)),i.weekData}function uo(i){return i.localWeekData===null&&(i.localWeekData=as(i.c,i.loc.getMinDaysInFirstWeek(),i.loc.getStartOfWeek())),i.localWeekData}function ve(i,t){let e={ts:i.ts,zone:i.zone,c:i.c,o:i.o,loc:i.loc,invalid:i.invalid};return new I({...e,...t,old:e})}function Tc(i,t,e){let s=i-t*60*1e3,n=e.offset(s);if(t===n)return[s,t];s-=(n-t)*60*1e3;let r=e.offset(s);return n===r?[s,n]:[i-Math.min(n,r)*60*1e3,Math.max(n,r)]}function dn(i,t){i+=t*60*1e3;let e=new Date(i);return{year:e.getUTCFullYear(),month:e.getUTCMonth()+1,day:e.getUTCDate(),hour:e.getUTCHours(),minute:e.getUTCMinutes(),second:e.getUTCSeconds(),millisecond:e.getUTCMilliseconds()}}function mn(i,t,e){return Tc(ti(i),t,e)}function xc(i,t){let e=i.o,s=i.c.year+Math.trunc(t.years),n=i.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,r={...i.c,year:s,month:n,day:Math.min(i.c.day,ni(s,n))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=Z.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=ti(r),[l,c]=Tc(a,e,i.zone);return o!==0&&(l+=o,c=i.zone.offset(l)),{ts:l,o:c}}function mi(i,t,e,s,n,r){let{setZone:o,zone:a}=e;if(i&&Object.keys(i).length!==0||t){let l=t||a,c=I.fromObject(i,{...e,zone:l,specificOffset:r});return o?c:c.setZone(a)}else return I.invalid(new it("unparsable",`the input "${n}" can't be parsed as ${s}`))}function fn(i,t,e=!0){return i.isValid?st.create(W.create("en-US"),{allowZ:e,forceSimple:!0}).formatDateTimeFromString(i,t):null}function fo(i,t){let e=i.c.year>9999||i.c.year<0,s="";return e&&i.c.year>=0&&(s+="+"),s+=Y(i.c.year,e?6:4),t?(s+="-",s+=Y(i.c.month),s+="-",s+=Y(i.c.day)):(s+=Y(i.c.month),s+=Y(i.c.day)),s}function _c(i,t,e,s,n,r){let o=Y(i.c.hour);return t?(o+=":",o+=Y(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!e)&&(o+=":")):o+=Y(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!e)&&(o+=Y(i.c.second),(i.c.millisecond!==0||!s)&&(o+=".",o+=Y(i.c.millisecond,3))),n&&(i.isOffsetFixed&&i.offset===0&&!r?o+="Z":i.o<0?(o+="-",o+=Y(Math.trunc(-i.o/60)),o+=":",o+=Y(Math.trunc(-i.o%60))):(o+="+",o+=Y(Math.trunc(i.o/60)),o+=":",o+=Y(Math.trunc(i.o%60)))),r&&(o+="["+i.zone.ianaName+"]"),o}var vc={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rg={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},og={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Oc=["year","month","day","hour","minute","second","millisecond"],ag=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lg=["year","ordinal","hour","minute","second","millisecond"];function cg(i){let t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[i.toLowerCase()];if(!t)throw new Qe(i);return t}function wc(i){switch(i.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return cg(i)}}function hg(i){return pn[i]||(gn===void 0&&(gn=R.now()),pn[i]=i.offset(gn)),pn[i]}function Sc(i,t){let e=Dt(t.zone,R.defaultZone);if(!e.isValid)return I.invalid(gs(e));let s=W.fromObject(t),n,r;if(O(i.year))n=R.now();else{for(let l of Oc)O(i[l])&&(i[l]=vc[l]);let o=Gr(i)||Xr(i);if(o)return I.invalid(o);let a=hg(e);[n,r]=mn(i,a,e)}return new I({ts:n,zone:e,loc:s,o:r})}function kc(i,t,e){let s=O(e.round)?!0:e.round,n=(o,a)=>(o=ei(o,s||e.calendary?0:2,!0),t.loc.clone(e).relFormatter(e).format(o,a)),r=o=>e.calendary?t.hasSame(i,o)?0:t.startOf(o).diff(i.startOf(o),o).get(o):t.diff(i,o).get(o);if(e.unit)return n(r(e.unit),e.unit);for(let o of e.units){let a=r(o);if(Math.abs(a)>=1)return n(a,o)}return n(i>t?-0:0,e.units[e.units.length-1])}function Mc(i){let t={},e;return i.length>0&&typeof i[i.length-1]=="object"?(t=i[i.length-1],e=Array.from(i).slice(0,i.length-1)):e=Array.from(i),[t,e]}var gn,pn={},I=class i{constructor(t){let e=t.zone||R.defaultZone,s=t.invalid||(Number.isNaN(t.ts)?new it("invalid input"):null)||(e.isValid?null:gs(e));this.ts=O(t.ts)?R.now():t.ts;let n=null,r=null;if(!s)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,r]=[t.old.c,t.old.o];else{let a=Et(t.o)&&!t.old?t.o:e.offset(this.ts);n=dn(this.ts,a),s=Number.isNaN(n.year)?new it("invalid input"):null,n=s?null:n,r=s?null:a}this._zone=e,this.loc=t.loc||W.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=n,this.o=r,this.isLuxonDateTime=!0}static now(){return new i({})}static local(){let[t,e]=Mc(arguments),[s,n,r,o,a,l,c]=e;return Sc({year:s,month:n,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static utc(){let[t,e]=Mc(arguments),[s,n,r,o,a,l,c]=e;return t.zone=et.utcInstance,Sc({year:s,month:n,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,e={}){let s=Vl(t)?t.valueOf():NaN;if(Number.isNaN(s))return i.invalid("invalid input");let n=Dt(e.zone,R.defaultZone);return n.isValid?new i({ts:s,zone:n,loc:W.fromObject(e)}):i.invalid(gs(n))}static fromMillis(t,e={}){if(Et(t))return t<-bc||t>bc?i.invalid("Timestamp out of range"):new i({ts:t,zone:Dt(e.zone,R.defaultZone),loc:W.fromObject(e)});throw new G(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Et(t))return new i({ts:t*1e3,zone:Dt(e.zone,R.defaultZone),loc:W.fromObject(e)});throw new G("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};let s=Dt(e.zone,R.defaultZone);if(!s.isValid)return i.invalid(gs(s));let n=W.fromObject(e),r=ri(t,wc),{minDaysInFirstWeek:o,startOfWeek:a}=qr(r,n),l=R.now(),c=O(e.specificOffset)?s.offset(l):e.specificOffset,h=!O(r.ordinal),u=!O(r.year),d=!O(r.month)||!O(r.day),f=u||d,m=r.weekYear||r.weekNumber;if((f||h)&&m)throw new Tt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&h)throw new Tt("Can't mix ordinal dates with month/day");let g=m||r.weekday&&!f,p,y,b=dn(l,c);g?(p=ag,y=rg,b=as(b,o,a)):h?(p=lg,y=og,b=hn(b)):(p=Oc,y=vc);let _=!1;for(let C of p){let N=r[C];O(N)?_?r[C]=y[C]:r[C]=b[C]:_=!0}let w=g?Rl(r,o,a):h?Wl(r):Gr(r),x=w||Xr(r);if(x)return i.invalid(x);let S=g?Yr(r,o,a):h?Zr(r):r,[k,v]=mn(S,c,s),T=new i({ts:k,zone:s,o:v,loc:n});return r.weekday&&f&&t.weekday!==T.weekday?i.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${T.toISO()}`):T.isValid?T:i.invalid(T.invalid)}static fromISO(t,e={}){let[s,n]=ec(t);return mi(s,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){let[s,n]=ic(t);return mi(s,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){let[s,n]=sc(t);return mi(s,n,e,"HTTP",e)}static fromFormat(t,e,s={}){if(O(t)||O(e))throw new G("fromFormat requires an input string and a format");let{locale:n=null,numberingSystem:r=null}=s,o=W.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),[a,l,c,h]=yc(o,t,e);return h?i.invalid(h):mi(a,l,s,`format ${e}`,t,c)}static fromString(t,e,s={}){return i.fromFormat(t,e,s)}static fromSQL(t,e={}){let[s,n]=oc(t);return mi(s,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new G("need to specify a reason the DateTime is invalid");let s=t instanceof it?t:new it(t,e);if(R.throwOnInvalid)throw new Ks(s);return new i({invalid:s})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){let s=lo(t,W.fromObject(e));return s?s.map(n=>n?n.val:null).join(""):null}static expandFormat(t,e={}){return oo(st.parseFormat(t),W.fromObject(e)).map(n=>n.val).join("")}static resetCache(){gn=void 0,pn={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ho(this).weekYear:NaN}get weekNumber(){return this.isValid?ho(this).weekNumber:NaN}get weekday(){return this.isValid?ho(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?uo(this).weekday:NaN}get localWeekNumber(){return this.isValid?uo(this).weekNumber:NaN}get localWeekYear(){return this.isValid?uo(this).weekYear:NaN}get ordinal(){return this.isValid?hn(this.c).ordinal:NaN}get monthShort(){return this.isValid?Zt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Zt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Zt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Zt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let t=864e5,e=6e4,s=ti(this.c),n=this.zone.offset(s-t),r=this.zone.offset(s+t),o=this.zone.offset(s-n*e),a=this.zone.offset(s-r*e);if(o===a)return[this];let l=s-o*e,c=s-a*e,h=dn(l,o),u=dn(c,a);return h.hour===u.hour&&h.minute===u.minute&&h.second===u.second&&h.millisecond===u.millisecond?[ve(this,{ts:l}),ve(this,{ts:c})]:[this]}get isInLeapYear(){return Me(this.year)}get daysInMonth(){return ni(this.year,this.month)}get daysInYear(){return this.isValid?le(this.year):NaN}get weeksInWeekYear(){return this.isValid?ke(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ke(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){let{locale:e,numberingSystem:s,calendar:n}=st.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:s,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(et.instance(t),e)}toLocal(){return this.setZone(R.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:s=!1}={}){if(t=Dt(t,R.defaultZone),t.equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||s){let r=t.offset(this.ts),o=this.toObject();[n]=mn(o,r,t)}return ve(this,{ts:n,zone:t})}else return i.invalid(gs(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:s}={}){let n=this.loc.clone({locale:t,numberingSystem:e,outputCalendar:s});return ve(this,{loc:n})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;let e=ri(t,wc),{minDaysInFirstWeek:s,startOfWeek:n}=qr(e,this.loc),r=!O(e.weekYear)||!O(e.weekNumber)||!O(e.weekday),o=!O(e.ordinal),a=!O(e.year),l=!O(e.month)||!O(e.day),c=a||l,h=e.weekYear||e.weekNumber;if((c||o)&&h)throw new Tt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new Tt("Can't mix ordinal dates with month/day");let u;r?u=Yr({...as(this.c,s,n),...e},s,n):O(e.ordinal)?(u={...this.toObject(),...e},O(e.day)&&(u.day=Math.min(ni(u.year,u.month),u.day))):u=Zr({...hn(this.c),...e});let[d,f]=mn(u,this.o,this.zone);return ve(this,{ts:d,o:f})}plus(t){if(!this.isValid)return this;let e=Z.fromDurationLike(t);return ve(this,xc(this,e))}minus(t){if(!this.isValid)return this;let e=Z.fromDurationLike(t).negate();return ve(this,xc(this,e))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;let s={},n=Z.normalizeUnit(t);switch(n){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break;case"milliseconds":break}if(n==="weeks")if(e){let r=this.loc.getStartOfWeek(),{weekday:o}=this;othis.valueOf(),a=o?this:t,l=o?t:this,c=dc(a,l,r,n);return o?c.negate():c}diffNow(t="milliseconds",e={}){return this.diff(i.now(),t,e)}until(t){return this.isValid?Yt.fromDateTimes(this,t):this}hasSame(t,e,s){if(!this.isValid)return!1;let n=t.valueOf(),r=this.setZone(t.zone,{keepLocalTime:!0});return r.startOf(e,s)<=n&&n<=r.endOf(e,s)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;let e=t.base||i.fromObject({},{zone:this.zone}),s=t.padding?thise.valueOf(),Math.min)}static max(...t){if(!t.every(i.isDateTime))throw new G("max requires all arguments be DateTimes");return Kr(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(t,e,s={}){let{locale:n=null,numberingSystem:r=null}=s,o=W.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return ao(o,t,e)}static fromStringExplain(t,e,s={}){return i.fromFormatExplain(t,e,s)}static buildFormatParser(t,e={}){let{locale:s=null,numberingSystem:n=null}=e,r=W.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0});return new ms(r,t)}static fromFormatParser(t,e,s={}){if(O(t)||O(e))throw new G("fromFormatParser requires an input string and a format parser");let{locale:n=null,numberingSystem:r=null}=s,o=W.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});if(!o.equals(e.locale))throw new G(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${e.locale}`);let{result:a,zone:l,specificOffset:c,invalidReason:h}=e.explainFromTokens(t);return h?i.invalid(h):mi(a,l,s,`format ${e.format}`,t,c)}static get DATE_SHORT(){return re}static get DATE_MED(){return Vi}static get DATE_MED_WITH_WEEKDAY(){return Er}static get DATE_FULL(){return Hi}static get DATE_HUGE(){return Bi}static get TIME_SIMPLE(){return $i}static get TIME_WITH_SECONDS(){return ji}static get TIME_WITH_SHORT_OFFSET(){return Ui}static get TIME_WITH_LONG_OFFSET(){return Yi}static get TIME_24_SIMPLE(){return Zi}static get TIME_24_WITH_SECONDS(){return qi}static get TIME_24_WITH_SHORT_OFFSET(){return Gi}static get TIME_24_WITH_LONG_OFFSET(){return Xi}static get DATETIME_SHORT(){return Ki}static get DATETIME_SHORT_WITH_SECONDS(){return Ji}static get DATETIME_MED(){return Qi}static get DATETIME_MED_WITH_SECONDS(){return ts}static get DATETIME_MED_WITH_WEEKDAY(){return Ir}static get DATETIME_FULL(){return es}static get DATETIME_FULL_WITH_SECONDS(){return is}static get DATETIME_HUGE(){return ss}static get DATETIME_HUGE_WITH_SECONDS(){return ns}};function fi(i){if(I.isDateTime(i))return i;if(i&&i.valueOf&&Et(i.valueOf()))return I.fromJSDate(i);if(i&&typeof i=="object")return I.fromObject(i);throw new G(`Unknown datetime argument: ${i}, of type ${typeof i}`)}var ug={datetime:I.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:I.TIME_WITH_SECONDS,minute:I.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};Or._date.override({_id:"luxon",_create:function(i){return I.fromMillis(i,this.options)},init(i){this.options.locale||(this.options.locale=i.locale)},formats:function(){return ug},parse:function(i,t){let e=this.options,s=typeof i;return i===null||s==="undefined"?null:(s==="number"?i=this._create(i):s==="string"?typeof t=="string"?i=I.fromFormat(i,t,e):i=I.fromISO(i,e):i instanceof Date?i=I.fromJSDate(i,e):s==="object"&&!(i instanceof I)&&(i=I.fromObject(i,e)),i.isValid?i.valueOf():null)},format:function(i,t){let e=this._create(i);return typeof t=="string"?e.toFormat(t):e.toLocaleString(t)},add:function(i,t,e){let s={};return s[e]=t,this._create(i).plus(s).valueOf()},diff:function(i,t,e){return this._create(i).diff(this._create(t)).as(e).valueOf()},startOf:function(i,t,e){if(t==="isoWeek"){e=Math.trunc(Math.min(Math.max(0,e),6));let s=this._create(i);return s.minus({days:(s.weekday-e+7)%7}).startOf("day").valueOf()}return t?this._create(i).startOf(t).valueOf():i},endOf:function(i,t){return this._create(i).endOf(t).valueOf()}});function yn({cachedData:i,options:t,type:e}){return{init:function(){this.initChart(),this.$wire.$on("updateChartData",({data:s})=>{yn=this.getChart(),yn.data=s,yn.update("resize")}),Alpine.effect(()=>{Alpine.store("theme"),this.$nextTick(()=>{this.getChart()&&(this.getChart().destroy(),this.initChart())})}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Alpine.store("theme")==="system"&&this.$nextTick(()=>{this.getChart().destroy(),this.initChart()})})},initChart:function(s=null){var o,a,l,c,h,u,d,f,m;if(!this.$refs.canvas||!this.$refs.backgroundColorElement||!this.$refs.borderColorElement||!this.$refs.textColorElement||!this.$refs.gridColorElement)return;Rt.defaults.animation.duration=0,Rt.defaults.backgroundColor=getComputedStyle(this.$refs.backgroundColorElement).color;let n=getComputedStyle(this.$refs.borderColorElement).color;Rt.defaults.borderColor=n,Rt.defaults.color=getComputedStyle(this.$refs.textColorElement).color,Rt.defaults.font.family=getComputedStyle(this.$el).fontFamily,Rt.defaults.plugins.legend.labels.boxWidth=12,Rt.defaults.plugins.legend.position="bottom";let r=getComputedStyle(this.$refs.gridColorElement).color;return t??(t={}),t.borderWidth??(t.borderWidth=2),t.pointBackgroundColor??(t.pointBackgroundColor=n),t.pointHitRadius??(t.pointHitRadius=4),t.pointRadius??(t.pointRadius=2),t.scales??(t.scales={}),(o=t.scales).x??(o.x={}),(a=t.scales.x).grid??(a.grid={}),(l=t.scales.x.grid).color??(l.color=r),(c=t.scales.x.grid).display??(c.display=!1),(h=t.scales.x.grid).drawBorder??(h.drawBorder=!1),(u=t.scales).y??(u.y={}),(d=t.scales.y).grid??(d.grid={}),(f=t.scales.y.grid).color??(f.color=r),(m=t.scales.y.grid).drawBorder??(m.drawBorder=!1),new Rt(this.$refs.canvas,{type:e,data:s??i,options:t,plugins:window.filamentChartJsPlugins??[]})},getChart:function(){return this.$refs.canvas?Rt.getChart(this.$refs.canvas):null}}}export{yn as default}; /*! Bundled license information: chart.js/dist/chunks/helpers.segment.mjs: diff --git a/public/js/filament/widgets/components/stats-overview/stat/chart.js b/public/js/filament/widgets/components/stats-overview/stat/chart.js index b8a1e72d4..b607cd185 100644 --- a/public/js/filament/widgets/components/stats-overview/stat/chart.js +++ b/public/js/filament/widgets/components/stats-overview/stat/chart.js @@ -1,6 +1,6 @@ -function rt(){}var Hs=function(){let i=0;return function(){return i++}}();function T(i){return i===null||typeof i>"u"}function I(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function D(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}var W=i=>(typeof i=="number"||i instanceof Number)&&isFinite(+i);function Q(i,t){return W(i)?i:t}function C(i,t){return typeof i>"u"?t:i}var js=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:i/t,Di=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function z(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function E(i,t,e,s){let n,o,a;if(I(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function gt(i,t){return(Ds[t]||(Ds[t]=Io(t)))(i)}function Io(i){let t=zo(i);return e=>{for(let s of t){if(s==="")break;e=e&&e[s]}return e}}function zo(i){let t=i.split("."),e=[],s="";for(let n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Ue(i){return i.charAt(0).toUpperCase()+i.slice(1)}var J=i=>typeof i<"u",ft=i=>typeof i=="function",Oi=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};function Ys(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var B=Math.PI,F=2*B,Bo=F+B,$e=Number.POSITIVE_INFINITY,Vo=B/180,V=B/2,fe=B/4,Os=B*2/3,tt=Math.log10,ot=Math.sign;function Ai(i){let t=Math.round(i);i=Kt(i,t,i/1e3)?t:i;let e=Math.pow(10,Math.floor(tt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function Xs(i){let t=[],e=Math.sqrt(i),s;for(s=1;sn-o).pop(),t}function Rt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Kt(i,t,e){return Math.abs(i-t)=i}function Ti(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function qe(i,t,e){e=e||(a=>i[a]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}var at=(i,t,e,s)=>qe(i,e,s?n=>i[n][t]<=e:n=>i[n][t]qe(i,e,s=>i[s][t]>=e);function Gs(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{let s="_onData"+Ue(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){let a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ei(i,t){let e=i._chartjs;if(!e)return;let s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Zs.forEach(o=>{delete i[o]}),delete i._chartjs)}function Fi(i){let t=new Set,e,s;for(e=0,s=i.length;e"u"?function(i){return i()}:window.requestAnimationFrame}();function zi(i,t,e){let s=e||(a=>Array.prototype.slice.call(a)),n=!1,o=[];return function(...a){o=s(a),n||(n=!0,Ii.call(window,()=>{n=!1,i.apply(t,o)}))}}function Qs(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}var Ge=i=>i==="start"?"left":i==="end"?"right":"center",X=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,tn=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function Bi(i,t,e){let s=t.length,n=0,o=s;if(i._sorted){let{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=Y(Math.min(at(r,a.axis,c).lo,e?s:at(t,l,a.getPixelForValue(c)).lo),0,s-1)),u?o=Y(Math.max(at(r,a.axis,h,!0).hi+1,e?0:at(t,l,a.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function Vi(i){let{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;let o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}var Be=i=>i===0||i===1,As=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e)),Ts=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,Ht={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*V)+1,easeOutSine:i=>Math.sin(i*V),easeInOutSine:i=>-.5*(Math.cos(B*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Be(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Be(i)?i:As(i,.075,.3),easeOutElastic:i=>Be(i)?i:Ts(i,.075,.3),easeInOutElastic(i){return Be(i)?i:i<.5?.5*As(i*2,.1125,.45):.5+.5*Ts(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ht.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ht.easeInBounce(i*2)*.5:Ht.easeOutBounce(i*2-1)*.5+.5};function _e(i){return i+.5|0}var yt=(i,t,e)=>Math.max(Math.min(i,e),t);function ge(i){return yt(_e(i*2.55),0,255)}function vt(i){return yt(_e(i*255),0,255)}function ut(i){return yt(_e(i/2.55)/100,0,1)}function Ls(i){return yt(_e(i*100),0,100)}var st={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Pi=[..."0123456789ABCDEF"],No=i=>Pi[i&15],Ho=i=>Pi[(i&240)>>4]+Pi[i&15],Ve=i=>(i&240)>>4===(i&15),jo=i=>Ve(i.r)&&Ve(i.g)&&Ve(i.b)&&Ve(i.a);function $o(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&st[i[1]]*17,g:255&st[i[2]]*17,b:255&st[i[3]]*17,a:t===5?st[i[4]]*17:255}:(t===7||t===9)&&(e={r:st[i[1]]<<4|st[i[2]],g:st[i[3]]<<4|st[i[4]],b:st[i[5]]<<4|st[i[6]],a:t===9?st[i[7]]<<4|st[i[8]]:255})),e}var Yo=(i,t)=>i<255?t(i):"";function Xo(i){var t=jo(i)?No:Ho;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Yo(i.a,t):void 0}var Uo=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function en(i,t,e){let s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Ko(i,t,e){let s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function qo(i,t,e){let s=en(i,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function Go(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-a):h/(o+a),l=Go(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function Ni(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(vt)}function Hi(i,t,e){return Ni(en,i,t,e)}function Zo(i,t,e){return Ni(qo,i,t,e)}function Jo(i,t,e){return Ni(Ko,i,t,e)}function sn(i){return(i%360+360)%360}function Qo(i){let t=Uo.exec(i),e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?ge(+t[5]):vt(+t[5]));let n=sn(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=Zo(n,o,a):t[1]==="hsv"?s=Jo(n,o,a):s=Hi(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function ta(i,t){var e=Wi(i);e[0]=sn(e[0]+t),e=Hi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function ea(i){if(!i)return;let t=Wi(i),e=t[0],s=Ls(t[1]),n=Ls(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${ut(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}var Rs={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Es={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ia(){let i={},t=Object.keys(Es),e=Object.keys(Rs),s,n,o,a,r;for(s=0;s>16&255,o>>8&255,o&255]}return i}var We;function sa(i){We||(We=ia(),We.transparent=[0,0,0,0]);let t=We[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var na=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function oa(i){let t=na.exec(i),e=255,s,n,o;if(t){if(t[7]!==s){let a=+t[7];e=t[8]?ge(a):yt(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?ge(s):yt(s,0,255)),n=255&(t[4]?ge(n):yt(n,0,255)),o=255&(t[6]?ge(o):yt(o,0,255)),{r:s,g:n,b:o,a:e}}}function aa(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${ut(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var Mi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Nt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function ra(i,t,e){let s=Nt(ut(i.r)),n=Nt(ut(i.g)),o=Nt(ut(i.b));return{r:vt(Mi(s+e*(Nt(ut(t.r))-s))),g:vt(Mi(n+e*(Nt(ut(t.g))-n))),b:vt(Mi(o+e*(Nt(ut(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Ne(i,t,e){if(i){let s=Wi(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Hi(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function nn(i,t){return i&&Object.assign(t||{},i)}function Fs(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=vt(i[3]))):(t=nn(i,{r:0,g:0,b:0,a:1}),t.a=vt(t.a)),t}function la(i){return i.charAt(0)==="r"?oa(i):Qo(i)}var $t=class{constructor(t){if(t instanceof $t)return t;let e=typeof t,s;e==="object"?s=Fs(t):e==="string"&&(s=$o(t)||sa(t)||la(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=nn(this._rgb);return t&&(t.a=ut(t.a)),t}set rgb(t){this._rgb=Fs(t)}rgbString(){return this._valid?aa(this._rgb):void 0}hexString(){return this._valid?Xo(this._rgb):void 0}hslString(){return this._valid?ea(this._rgb):void 0}mix(t,e){if(t){let s=this.rgb,n=t.rgb,o,a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=ra(this._rgb,t._rgb,e)),this}clone(){return new $t(this.rgb)}alpha(t){return this._rgb.a=vt(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=_e(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ne(this._rgb,2,t),this}darken(t){return Ne(this._rgb,2,-t),this}saturate(t){return Ne(this._rgb,1,t),this}desaturate(t){return Ne(this._rgb,1,-t),this}rotate(t){return ta(this._rgb,t),this}};function on(i){return new $t(i)}function an(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ji(i){return an(i)?i:on(i)}function wi(i){return an(i)?i:on(i).saturate(.5).darken(.1).hexString()}var Mt=Object.create(null),Ze=Object.create(null);function pe(i,t){if(!t)return i;let e=t.split(".");for(let s=0,n=e.length;se.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,s)=>wi(s.backgroundColor),this.hoverBorderColor=(e,s)=>wi(s.borderColor),this.hoverColor=(e,s)=>wi(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return ki(this,t,e)}get(t){return pe(this,t)}describe(t,e){return ki(Ze,t,e)}override(t,e){return ki(Mt,t,e)}route(t,e,s,n){let o=pe(this,t),a=pe(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[r],c=a[n];return D(l)?Object.assign({},c,l):C(l,c)},set(l){this[r]=l}}})}},O=new Ci({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ca(i){return!i||T(i.size)||T(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function me(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function rn(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0,r=e.length,l,c,h,d,u;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function Yt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="",l,c;for(i.save(),i.font=n.string,ha(i,o),l=0;l+i||0;function Qe(i,t){let e={},s=D(t),n=s?Object.keys(t):t,o=D(i)?s?a=>C(i[a],i[t[a]]):a=>i[a]:()=>i;for(let a of n)e[a]=pa(o(a));return e}function Xi(i){return Qe(i,{top:"y",right:"x",bottom:"y",left:"x"})}function St(i){return Qe(i,["topLeft","topRight","bottomLeft","bottomRight"])}function U(i){let t=Xi(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function $(i,t){i=i||{},t=t||O.font;let e=C(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=C(i.style,t.style);s&&!(""+s).match(fa)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");let n={family:C(i.family,t.family),lineHeight:ga(C(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:C(i.weight,t.weight),string:""};return n.string=ca(n),n}function Zt(i,t,e,s){let n=!0,o,a,r;for(o=0,a=i.length;oe&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function pt(i,t){return Object.assign(Object.create(i),t)}function ti(i,t=[""],e=i,s,n=()=>i[0]){J(s)||(s=fn("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:s,_getTarget:n,override:a=>ti([a,...i],t,e,s)};return new Proxy(o,{deleteProperty(a,r){return delete a[r],delete a._keys,delete i[0][r],!0},get(a,r){return dn(a,r,()=>wa(r,t,i,a))},getOwnPropertyDescriptor(a,r){return Reflect.getOwnPropertyDescriptor(a._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,r){return zs(a).includes(r)},ownKeys(a){return zs(a)},set(a,r,l){let c=a._storage||(a._storage=n());return a[r]=c[r]=l,delete a._keys,!0}})}function Lt(i,t,e,s){let n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ui(i,s),setContext:o=>Lt(i,o,e,s),override:o=>Lt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return dn(o,a,()=>ba(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function Ui(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ft(e)?e:()=>e,isIndexable:ft(s)?s:()=>s}}var ma=(i,t)=>i?i+Ue(t):t,Ki=(i,t)=>D(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function dn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];let s=e();return i[t]=s,s}function ba(i,t,e){let{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i,r=s[t];return ft(r)&&a.isScriptable(t)&&(r=_a(t,r,i,e)),I(r)&&r.length&&(r=xa(t,r,i,a.isIndexable)),Ki(t,r)&&(r=Lt(r,n,o&&o[t],a)),r}function _a(i,t,e,s){let{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);return r.add(i),t=t(o,a||s),r.delete(i),Ki(i,t)&&(t=qi(n._scopes,n,i,t)),t}function xa(i,t,e,s){let{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(J(o.index)&&s(i))t=t[o.index%t.length];else if(D(t[0])){let l=t,c=n._scopes.filter(h=>h!==l);t=[];for(let h of l){let d=qi(c,n,i,h);t.push(Lt(d,o,a&&a[i],r))}}return t}function un(i,t,e){return ft(i)?i(t,e):i}var ya=(i,t)=>i===!0?t:typeof i=="string"?gt(t,i):void 0;function va(i,t,e,s,n){for(let o of t){let a=ya(e,o);if(a){i.add(a);let r=un(a._fallback,e,n);if(J(r)&&r!==e&&r!==s)return r}else if(a===!1&&J(s)&&e!==s)return null}return!1}function qi(i,t,e,s){let n=t._rootScopes,o=un(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=Is(r,a,e,o||e,s);return l===null||J(o)&&o!==e&&(l=Is(r,a,o,l,s),l===null)?!1:ti(Array.from(r),[""],n,o,()=>Ma(t,e,s))}function Is(i,t,e,s,n){for(;e;)e=va(i,t,e,s,n);return e}function Ma(i,t,e){let s=i._getTarget();t in s||(s[t]={});let n=s[t];return I(n)&&D(e)?e:n}function wa(i,t,e,s){let n;for(let o of t)if(n=fn(ma(o,i),e),J(n))return Ki(i,n)?qi(e,s,i,n):n}function fn(i,t){for(let e of t){if(!e)continue;let s=e[i];if(J(s))return s}}function zs(i){let t=i._keys;return t||(t=i._keys=ka(i._scopes)),t}function ka(i){let t=new Set;for(let e of i)for(let s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function Gi(i,t,e,s){let{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s),r,l,c,h;for(r=0,l=s;rti==="x"?"y":"x";function Pa(i,t,e,s){let n=i.skip?t:i,o=t,a=e.skip?t:e,r=Ye(o,n),l=Ye(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Ca(i,t,e){let s=i.length,n,o,a,r,l,c=Xt(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")Oa(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,a=i.length;owindow.getComputedStyle(i,null);function Ta(i,t){return ii(i).getPropertyValue(t)}var La=["top","right","bottom","left"];function Tt(i,t,e){let s={};e=e?"-"+e:"";for(let n=0;n<4;n++){let o=La[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var Ra=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Ea(i,t){let e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s,a=!1,r,l;if(Ra(n,o,i.target))r=n,l=o;else{let c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Pt(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:s}=t,n=ii(e),o=n.boxSizing==="border-box",a=Tt(n,"padding"),r=Tt(n,"border","width"),{x:l,y:c,box:h}=Ea(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top),{width:f,height:g}=t;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/g*e.height/s)}}function Fa(i,t,e){let s,n;if(t===void 0||e===void 0){let o=ei(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{let a=o.getBoundingClientRect(),r=ii(o),l=Tt(r,"border","width"),c=Tt(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=Xe(r.maxWidth,o,"clientWidth"),n=Xe(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||$e,maxHeight:n||$e}}var Si=i=>Math.round(i*10)/10;function mn(i,t,e,s){let n=ii(i),o=Tt(n,"margin"),a=Xe(n.maxWidth,i,"clientWidth")||$e,r=Xe(n.maxHeight,i,"clientHeight")||$e,l=Fa(i,t,e),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let d=Tt(n,"border","width"),u=Tt(n,"padding");c-=u.width+d.width,h-=u.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?Math.floor(c/s):h-o.height),c=Si(Math.min(c,a,l.maxWidth)),h=Si(Math.min(h,r,l.maxHeight)),c&&!h&&(h=Si(c/2)),{width:c,height:h}}function Ji(i,t,e){let s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=n/s,i.width=o/s;let a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}var bn=function(){let i=!1;try{let t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Qi(i,t){let e=Ta(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function xt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function _n(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function xn(i,t,e,s){let n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=xt(i,n,e),r=xt(n,o,e),l=xt(o,t,e),c=xt(a,r,e),h=xt(r,l,e);return xt(c,h,e)}var Bs=new Map;function Ia(i,t){t=t||{};let e=i+JSON.stringify(t),s=Bs.get(e);return s||(s=new Intl.NumberFormat(i,t),Bs.set(e,s)),s}function Jt(i,t,e){return Ia(t,e).format(i)}var za=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Ba=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Et(i,t,e){return i?za(t,e):Ba()}function ts(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function es(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function yn(i){return i==="angle"?{between:qt,compare:Wo,normalize:G}:{between:lt,compare:(t,e)=>t-e,normalize:t=>t}}function Vs({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Va(i,t,e){let{property:s,start:n,end:o}=e,{between:a,normalize:r}=yn(s),l=t.length,{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(n,v,b)&&r(n,v)!==0,x=()=>r(o,b)===0||l(o,v,b),M=()=>p||y(),w=()=>!p||x();for(let S=h,k=h;S<=d;++S)_=t[S%a],!_.skip&&(b=c(_[s]),b!==v&&(p=l(b,n,o),m===null&&M()&&(m=r(b,n)===0?S:k),m!==null&&w()&&(g.push(Vs({start:m,end:S,loop:u,count:a,style:f})),m=null),k=S,v=b));return m!==null&&g.push(Vs({start:m,end:d,loop:u,count:a,style:f})),g}function ss(i,t){let e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Na(i,t,e,s){let n=i.length,o=[],a=t,r=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:s}),o}function vn(i,t){let e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];let o=!!i._loop,{start:a,end:r}=Wa(e,n,o,s);if(s===!0)return Ws(i,[{start:a,end:r,loop:o}],e,t);let l=rr({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Ii.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let o=s.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let s=e.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},mt=new fs,Mn="transparent",$a={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let s=ji(i||Mn),n=s.valid&&ji(t||Mn);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}},gs=class{constructor(t,e,s,n){let o=e[s];n=Zt([t.to,n,o,t.from]);let a=Zt([t.from,o,n]);this._active=!0,this._fn=t.fn||$a[t.type||typeof a],this._easing=Ht[t.easing]||Ht.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);let n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Zt([t.to,e,n,t.from]),this._from=Zt([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){let e=t?"res":"rej",s=this._promises||[];for(let n=0;ni!=="onProgress"&&i!=="onComplete"&&i!=="fn"});O.set("animations",{colors:{type:"color",properties:Xa},numbers:{type:"number",properties:Ya}});O.describe("animations",{_fallback:"animation"});O.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}});var hi=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!D(t))return;let e=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let n=t[s];if(!D(n))return;let o={};for(let a of Ua)o[a]=n[a];(I(n.properties)&&n.properties||[s]).forEach(a=>{(a===s||!e.has(a))&&e.set(a,o)})})}_animateOptions(t,e){let s=e.options,n=qa(t,s);if(!n)return[];let o=this._createAnimations(n,s);return s.$shared&&Ka(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){let s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}let h=e[c],d=o[c],u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new gs(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let s=this._createAnimations(t,e);if(s.length)return mt.add(this._chart,s),!0}};function Ka(i,t){let e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function Cn(i,t){let{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=Qa(o,a,s),d=t.length,u;for(let f=0;fe[s].axis===t).shift()}function ir(i,t){return pt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function sr(i,t,e){return pt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ve(i,t){let e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(let n of t){let o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e]}}}var os=i=>i==="reset"||i==="none",Dn=(i,t)=>t?i:Object.assign({},i),nr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:go(e,!0),values:null},et=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Sn(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ve(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=e.xAxisID=C(s.xAxisID,ns(t,"x")),a=e.yAxisID=C(s.yAxisID,ns(t,"y")),r=e.rAxisID=C(s.rAxisID,ns(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Ei(this._data,this),t._stacked&&ve(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(D(e))this._data=Ja(e);else if(s!==e){if(s){Ei(s,this);let n=this._cachedMeta;ve(n),n._parsed=[]}e&&Object.isExtensible(e)&&Js(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,s=this.getDataset(),n=!1;this._dataCheck();let o=e._stacked;e._stacked=Sn(e.vScale,e),e.stack!==s.stack&&(n=!0,ve(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&Cn(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis,l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{I(n[t])?u=this.parseArrayData(s,n,t,e):D(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);let f=()=>d[r]===null||c&&d[r]p||d=0;--u)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,s=[],n,o,a;for(n=0,o=e.length;n=0&&tthis.getContext(s,n),p=c.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(Dn(p,l))),p}_resolveAnimations(t,e,s){let n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){let h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}let c=new hi(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||os(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){os(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!os(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;let o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,s=this._cachedMeta.data;for(let[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];let n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;rn-o))}return i._cache.$bar}function ar(i){let t=i.iScale,e=or(t,i.type),s=t._length,n,o,a,r,l=()=>{a===32767||a===-32768||(J(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n0?n[i-1]:null,r=iMath.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function po(i,t,e,s){return I(i)?cr(i,t,e,s):t[e.axis]=e.parse(i,s),t}function On(i,t,e,s){let n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[],c,h,d,u;for(c=e,h=e+s;c=e?1:-1)}function dr(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.basel.controller.options.grouped),o=s.options.stacked,a=[],r=l=>{let c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(T(h)||isNaN(h))return!0};for(let l of n)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){let n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){let t=this.options,e=this._cachedMeta,s=e.iScale,n=[],o,a;for(o=0,a=e.data.length;o=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),l=o._custom;return{label:e.label,value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=a.axis,d=r.axis;for(let u=e;uqt(v,r,l,!0)?1:Math.max(y,y*e,x,x*e),g=(v,y,x)=>qt(v,r,l,!0)?-1:Math.min(y,y*e,x,x*e),p=f(0,c,d),m=f(V,h,u),b=g(B,c,d),_=g(B+V,h,u);s=(p-b)/2,n=(m-_)/2,o=-(p+b)/2,a=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}var Ot=class extends et{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(D(s[t])){let{key:l="value"}=this._parsing;o=c=>+gt(s[c],l)}let a,r;for(a=t,r=t+e;a0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Jt(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0,s=this.chart,n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;ni!=="spacing",_indexable:i=>i!=="spacing"};Ot.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let a=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){let t=i.label,e=": "+i.formattedValue;return I(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};var se=class extends et{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled,{start:r,count:l}=Bi(e,n,a);this._drawStart=r,this._drawCount=l,Vi(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:c},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=Rt(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e>0&&this.getParsed(e-1);for(let v=e;v0&&Math.abs(x[u]-_[u])>m,p&&(M.parsed=x,M.raw=c.data[v]),d&&(M.options=h||this.resolveDataElementOptions(v,y.active?"active":n)),b||this.updateElement(y,v,M,n),_=x}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;let o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};se.id="line";se.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};se.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var ne=class extends et{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Jt(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return Gi.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{let o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(oe.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){let o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*B,f=u,g,p=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||s):0}};ne.id="polarArea";ne.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};ne.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let a=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){return i.chart.data.labels[i.dataIndex]+": "+i.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};var De=class extends Ot{};De.id="pie";De.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var oe=class extends et{getLabelAndValue(t){let e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return Gi.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,t!=="resize"){let a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);let r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(s,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){let o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}};it.defaults={};it.defaultRoutes=void 0;var mo={values(i){return I(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let s=this.chart.options.locale,n,o=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=mr(i,e)}let a=tt(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Jt(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";let s=i/Math.pow(10,Math.floor(tt(i)));return s===1||s===2||s===5?mo.numeric.call(this,i,t,e):""}};function mr(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var mi={formatters:mo};O.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:mi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});O.route("scale.ticks","color","","color");O.route("scale.grid","color","","borderColor");O.route("scale.grid","borderColor","","borderColor");O.route("scale.title","color","","color");O.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"});O.describe("scales",{_fallback:"scale"});O.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"});function br(i,t){let e=i.options.ticks,s=e.maxTicksLimit||_r(i),n=e.major.enabled?yr(t):[],o=n.length,a=n[0],r=n[o-1],l=[];if(o>s)return vr(t,l,n,o/s),l;let c=xr(n,t,s);if(o>0){let h,d,u=o>1?Math.round((r-a)/(o-1)):null;for(si(t,l,c,T(u)?0:a-u,a),h=0,d=o-1;hn)return l}return Math.max(n,1)}function yr(i){let t=[],e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,Ln=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e;function Rn(i,t){let e=[],s=i.length/t,n=i.length,o=0;for(;oa+r)))return l}function Sr(i,t){E(i,e=>{let s=e.gc,n=s.length/2,o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:Q(e,Q(s,e)),max:Q(s,Q(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){z(this.options.beforeUpdate,[this])}update(t,e,s){let{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=hn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Y(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(t.offset?.5:1)),l=this.maxHeight-Me(t.grid)-e.padding-En(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Ke(Math.min(Math.asin(Y((h.highest.height+6)/r,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){z(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){z(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=En(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Me(o)+l):(t.height=this.maxHeight,t.width=Me(o)+l),s.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,g=nt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){let b=s.mirror?0:m*d.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{let b=s.mirror?0:p*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,p)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){z(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:o[w]||0,height:a[w]||0});return{first:M(0),last:M(e-1),widest:M(y),highest:M(x),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Ks(this._alignToPixels?wt(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&tr*n?r/s:l/n:l*n0}_computeGridLineItems(t){let e=this.axis,s=this.chart,n=this.options,{grid:o,position:a}=n,r=o.offset,l=this.isHorizontal(),h=this.ticks.length+(r?1:0),d=Me(o),u=[],f=o.setContext(this.getContext()),g=f.drawBorder?f.borderWidth:0,p=g/2,m=function(P){return wt(s,P,g)},b,_,v,y,x,M,w,S,k,L,R,A;if(a==="top")b=m(this.bottom),M=this.bottom-d,S=b-p,L=m(t.top)+p,A=t.bottom;else if(a==="bottom")b=m(this.top),L=t.top,A=m(t.bottom)-p,M=b+p,S=this.top+d;else if(a==="left")b=m(this.right),x=this.right-d,w=b-p,k=m(t.left)+p,R=t.right;else if(a==="right")b=m(this.left),k=t.left,R=m(t.right)-p,x=b+p,w=this.left+d;else if(e==="x"){if(a==="center")b=m((t.top+t.bottom)/2+.5);else if(D(a)){let P=Object.keys(a)[0],j=a[P];b=m(this.chart.scales[P].getPixelForValue(j))}L=t.top,A=t.bottom,M=b+p,S=M+d}else if(e==="y"){if(a==="center")b=m((t.left+t.right)/2);else if(D(a)){let P=Object.keys(a)[0],j=a[P];b=m(this.chart.scales[P].getPixelForValue(j))}x=b-p,w=x-d,k=t.left,R=t.right}let H=C(n.ticks.maxTicksLimit,h),q=Math.max(1,Math.ceil(h/H));for(_=0;_o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){let e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o,a,r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o{this.draw(n)}}]:[{z:s,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:s+1,draw:()=>{this.drawBorder()}},{z:e,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],o,a;for(o=0,a=e.length;o{let s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");O.route(o,n,l,r)})}function Lr(i){return"id"in i&&"defaults"in i}var ps=class{constructor(){this.controllers=new te(et,"datasets",!0),this.elements=new te(it,"elements"),this.plugins=new te(Object,"plugins"),this.scales=new te(_t,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{let o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):E(n,a=>{let r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){let n=Ue(t);z(s["before"+n],[],s),e[t](s),z(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let y=e;y0&&Math.abs(M[f]-v[f])>b,m&&(w.parsed=M,w.raw=c.data[y]),u&&(w.options=d||this.resolveDataElementOptions(y,x.active?"active":n)),_||this.updateElement(x,y,w,n),v=M}this.updateSharedOptions(d,n,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}let s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;let o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}};ae.id="scatter";ae.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};ae.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(i){return"("+i.label+", "+i.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Rr=Object.freeze({__proto__:null,BarController:ee,BubbleController:ie,DoughnutController:Ot,LineController:se,PolarAreaController:ne,PieController:De,RadarController:oe,ScatterController:ae});function Ft(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Oe=class{constructor(t){this.options=t||{}}init(t){}formats(){return Ft()}parse(t,e){return Ft()}format(t,e){return Ft()}add(t,e,s){return Ft()}diff(t,e,s){return Ft()}startOf(t,e,s){return Ft()}endOf(t,e){return Ft()}};Oe.override=function(i){Object.assign(Oe.prototype,i)};var Er={_date:Oe};function Fr(i,t,e,s){let{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){let l=r._reversePixels?qs:at;if(s){if(n._sharedOptions){let c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){let d=l(o,t,e-h),u=l(o,t,e+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function Ie(i,t,e,s,n){let o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r{l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var Vr={evaluateInteractionItems:Ie,modes:{index(i,t,e,s){let n=Pt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?rs(i,n,o,s,a):ls(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){let n=Pt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1,r=e.intersect?rs(i,n,o,s,a):ls(i,n,o,!1,s,a);if(r.length>0){let l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;he.pos===t)}function In(i,t){return i.filter(e=>bo.indexOf(e.pos)===-1&&e.box.axis===t)}function ke(i,t){return i.sort((e,s)=>{let n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Wr(i){let t=[],e,s,n,o,a,r;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=ke(we(t,"left"),!0),n=ke(we(t,"right")),o=ke(we(t,"top"),!0),a=ke(we(t,"bottom")),r=In(t,"x"),l=In(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:we(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function zn(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function _o(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function $r(i,t,e,s){let{pos:n,box:o}=e,a=i.maxPadding;if(!D(n)){e.size&&(i[n]-=e.size);let d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&_o(a,o.getPadding());let r=Math.max(0,t.outerWidth-zn(a,i,"left","right")),l=Math.max(0,t.outerHeight-zn(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Yr(i){let t=i.maxPadding;function e(s){let n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Xr(i,t){let e=t.maxPadding;function s(n){let o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function Pe(i,t,e,s){let n=[],o,a,r,l,c,h;for(o=0,a=i.length,c=0;o{typeof p.beforeLayout=="function"&&p.beforeLayout()});let h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);_o(u,U(s));let f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=Hr(l.concat(c),d);Pe(r.fullSize,f,d,g),Pe(l,f,d,g),Pe(c,f,d,g)&&Pe(l,f,d,g),Yr(f),Bn(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Bn(r.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(r.chartArea,p=>{let m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},di=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}},ms=class extends di{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},ci="$chartjs",Ur={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vn=i=>i===null||i==="";function Kr(i,t){let e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[ci]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Vn(n)){let o=Qi(i,"width");o!==void 0&&(i.width=o)}if(Vn(s))if(i.style.height==="")i.height=i.width/(t||2);else{let o=Qi(i,"height");o!==void 0&&(i.height=o)}return i}var xo=bn?{passive:!0}:!1;function qr(i,t,e){i.addEventListener(t,e,xo)}function Gr(i,t,e){i.canvas.removeEventListener(t,e,xo)}function Zr(i,t){let e=Ur[i.type]||i.type,{x:s,y:n}=Pt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function ui(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function Jr(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||ui(r.addedNodes,s),a=a&&!ui(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Qr(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||ui(r.removedNodes,s),a=a&&!ui(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}var Ae=new Map,Wn=0;function yo(){let i=window.devicePixelRatio;i!==Wn&&(Wn=i,Ae.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function tl(i,t){Ae.size||window.addEventListener("resize",yo),Ae.set(i,t)}function el(i){Ae.delete(i),Ae.size||window.removeEventListener("resize",yo)}function il(i,t,e){let s=i.canvas,n=s&&ei(s);if(!n)return;let o=zi((r,l)=>{let c=n.clientWidth;e(r,l),c{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),tl(i,o),a}function cs(i,t,e){e&&e.disconnect(),t==="resize"&&el(i)}function sl(i,t,e){let s=i.canvas,n=zi(o=>{i.ctx!==null&&e(Zr(o,i))},i,o=>{let a=o[0];return[a,a.offsetX,a.offsetY]});return qr(s,t,n),n}var bs=class extends di{acquireContext(t,e){let s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Kr(t,e),s):null}releaseContext(t){let e=t.canvas;if(!e[ci])return!1;let s=e[ci].initial;["height","width"].forEach(o=>{let a=s[o];T(a)?e.removeAttribute(o):e.setAttribute(o,a)});let n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[ci],!0}addEventListener(t,e,s){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),a={attach:Jr,detach:Qr,resize:il}[e]||sl;n[e]=a(t,e,s)}removeEventListener(t,e){let s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:cs,detach:cs,resize:cs}[e]||Gr)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return mn(t,e,s,n)}isAttached(t){let e=ei(t);return!!(e&&e.isConnected)}};function nl(i){return!Zi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?ms:bs}var _s=class{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,s,n){n=n||{};for(let o of t){let a=o.plugin,r=a[s],l=[e,n,o.options];if(z(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){T(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let s=t&&t.config,n=C(s.options&&s.options.plugins,{}),o=ol(s);return n===!1&&!e?[]:rl(t,o,n,e)}_notifyStateChanges(t){let e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}};function ol(i){let t={},e=[],s=Object.keys(ht.plugins.items);for(let o=0;o{let l=s[r];if(!D(l))return console.error(`Invalid scale configuration for scale: ${r}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);let c=ys(r,l),h=hl(c,n),d=e.scales||{};o[c]=o[c]||r,a[r]=Ut(Object.create(null),[{axis:c},l,d[c],d[h]])}),i.data.datasets.forEach(r=>{let l=r.type||i.type,c=r.indexAxis||xs(l,t),d=(Mt[l]||{}).scales||{};Object.keys(d).forEach(u=>{let f=cl(u,c),g=r[f+"AxisID"]||o[f]||f;a[g]=a[g]||Object.create(null),Ut(a[g],[{axis:f},s[g],d[u]])})}),Object.keys(a).forEach(r=>{let l=a[r];Ut(l,[O.scales[l.type],O.scale])}),a}function vo(i){let t=i.options||(i.options={});t.plugins=C(t.plugins,{}),t.scales=ul(i,t)}function Mo(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function fl(i){return i=i||{},i.data=Mo(i.data),vo(i),i}var Nn=new Map,wo=new Set;function oi(i,t){let e=Nn.get(i);return e||(e=t(),Nn.set(i,e),wo.add(e)),e}var Se=(i,t,e)=>{let s=gt(t,e);s!==void 0&&i.add(s)},vs=class{constructor(t){this._config=fl(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Mo(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),vo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return oi(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return oi(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return oi(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,s=this.type;return oi(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let s=this._scopeCache,n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){let{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;let l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Se(l,t,d))),h.forEach(d=>Se(l,n,d)),h.forEach(d=>Se(l,Mt[o]||{},d)),h.forEach(d=>Se(l,O,d)),h.forEach(d=>Se(l,Ze,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),wo.has(e)&&a.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,Mt[e]||{},O.datasets[e]||{},{type:e},O,Ze]}resolveNamedOptions(t,e,s,n=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=Hn(this._resolverCache,t,n),l=a;if(pl(a,e)){o.$shared=!1,s=ft(s)?s():s;let c=this.createResolver(t,s,r);l=Lt(a,s,c)}for(let c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){let{resolver:o}=Hn(this._resolverCache,t,s);return D(e)?Lt(o,e,void 0,n):o}};function Hn(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));let n=e.join(),o=s.get(n);return o||(o={resolver:ti(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}var gl=i=>D(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||ft(i[e]),!1);function pl(i,t){let{isScriptable:e,isIndexable:s}=Ui(i);for(let n of t){let o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(ft(r)||gl(r))||a&&I(r))return!0}return!1}var ml="3.9.1",bl=["top","bottom","left","right","chartArea"];function jn(i,t){return i==="top"||i==="bottom"||bl.indexOf(i)===-1&&t==="x"}function $n(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Yn(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),z(e&&e.onComplete,[i],t)}function _l(i){let t=i.chart,e=t.options.animation;z(e&&e.onProgress,[i],t)}function ko(i){return Zi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var fi={},So=i=>{let t=ko(i);return Object.values(fi).filter(e=>e.canvas===t).pop()};function xl(i,t,e){let s=Object.keys(i);for(let n of s){let o=+n;if(o>=t){let a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function yl(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}var It=class{constructor(t,e){let s=this.config=new vs(e),n=ko(t),o=So(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||nl(n)),this.platform.updateConfig(s);let r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Hs(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _s,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Qs(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],fi[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}mt.listen(this,"complete",Yn),mt.listen(this,"progress",_l),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return T(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ji(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return $i(this.canvas,this.ctx),this}stop(){return mt.stop(this),this}resize(t,e){mt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ji(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),z(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};E(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){let t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{}),o=[];e&&(o=o.concat(Object.keys(e).map(a=>{let r=e[a],l=ys(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),E(o,a=>{let r=a.options,l=r.id,c=ys(l,r),h=C(r.type,a.dtype);(r.position===void 0||jn(r.position,c)!==jn(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{let u=ht.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),E(n,(a,r)=>{a||delete s[r]}),E(s,a=>{K.configure(this,a,a.options),K.addBox(this,a)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort($n("z","_idx"));let{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){E(this.scales,t=>{K.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Oi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:s,start:n,count:o}of e){let a=s==="_removeElements"?-o:o;xl(t,n,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;K.update(this,this.width,this.height,t);let e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],E(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,s=t._clip,n=!s.disabled,o=this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&xe(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&ye(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Yt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){let o=Vr.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],s=this._metasets,n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){let s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){let n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);J(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),mt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};E(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)},a,r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){E(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},E(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){let n=s?"set":"remove",o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r{let r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!be(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}_updateHoverStyles(t,e,s){let n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){let s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;let o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){let{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=Ys(t),c=yl(t,this._lastEvent,s,l);s&&(this._lastEvent=null,z(o.onHover,[t,r,this],this),l&&z(o.onClick,[t,r,this],this));let h=!be(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}},Xn=()=>E(It.instances,i=>i._plugins.invalidate()),Ct=!0;Object.defineProperties(It,{defaults:{enumerable:Ct,value:O},instances:{enumerable:Ct,value:fi},overrides:{enumerable:Ct,value:Mt},registry:{enumerable:Ct,value:ht},version:{enumerable:Ct,value:ml},getChart:{enumerable:Ct,value:So},register:{enumerable:Ct,value:(...i)=>{ht.add(...i),Xn()}},unregister:{enumerable:Ct,value:(...i)=>{ht.remove(...i),Xn()}}});function Po(i,t,e){let{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t,c=n/r;i.beginPath(),i.arc(o,a,r,s-c,e+c),l>n?(c=n/l,i.arc(o,a,l,e+c,s-c,!0)):i.arc(o,a,n,e+V,s-V),i.closePath(),i.clip()}function vl(i){return Qe(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Ml(i,t,e,s){let n=vl(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{let c=(e-Math.min(o,l))*s/2;return Y(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Y(n.innerStart,0,a),innerEnd:Y(n.innerEnd,0,a)}}function Qt(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function Ms(i,t,e,s,n,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0,f=0,g=n-l;if(s){let P=h>0?h-s:0,j=d>0?d-s:0,N=(P+j)/2,At=N!==0?g*N/(N+s):g;f=(g-At)/2}let p=Math.max(.001,g*d-e/B)/d,m=(g-p)/2,b=l+m+f,_=n-m-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:M}=Ml(t,u,d,_-b),w=d-v,S=d-y,k=b+v/w,L=_-y/S,R=u+x,A=u+M,H=b+x/R,q=_-M/A;if(i.beginPath(),o){if(i.arc(a,r,d,k,L),y>0){let N=Qt(S,L,a,r);i.arc(N.x,N.y,y,L,_+V)}let P=Qt(A,_,a,r);if(i.lineTo(P.x,P.y),M>0){let N=Qt(A,q,a,r);i.arc(N.x,N.y,M,_+V,q+Math.PI)}if(i.arc(a,r,u,_-M/u,b+x/u,!0),x>0){let N=Qt(R,H,a,r);i.arc(N.x,N.y,x,H+Math.PI,b-V)}let j=Qt(w,b,a,r);if(i.lineTo(j.x,j.y),v>0){let N=Qt(w,k,a,r);i.arc(N.x,N.y,v,b-V,k)}}else{i.moveTo(a,r);let P=Math.cos(k)*d+a,j=Math.sin(k)*d+r;i.lineTo(P,j);let N=Math.cos(L)*d+a,At=Math.sin(L)*d+r;i.lineTo(N,At)}i.closePath()}function wl(i,t,e,s,n){let{fullCircles:o,startAngle:a,circumference:r}=t,l=t.endAngle;if(o){Ms(i,t,e,s,a+F,n);for(let c=0;c=F||qt(o,r,l),p=lt(a,c+u,h+u);return g&&p}getCenterPoint(t){let{x:e,y:s,startAngle:n,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(a+r+c+l)/2;return{x:e+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:s}=this,n=(e.offset||0)/2,o=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>F?Math.floor(s/F):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(n){r=n/2;let c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*r,Math.sin(c)*r),this.circumference>=B&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;let l=wl(t,this,r,o,a);Sl(t,this,r,o,l,a),t.restore()}};re.id="arc";re.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};re.defaultRoutes={backgroundColor:"backgroundColor"};function Co(i,t,e=t){i.lineCap=C(e.borderCapStyle,t.borderCapStyle),i.setLineDash(C(e.borderDash,t.borderDash)),i.lineDashOffset=C(e.borderDashOffset,t.borderDashOffset),i.lineJoin=C(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=C(e.borderWidth,t.borderWidth),i.strokeStyle=C(e.borderColor,t.borderColor)}function Pl(i,t,e){i.lineTo(e.x,e.y)}function Cl(i){return i.stepped?ln:i.tension||i.cubicInterpolationMode==="monotone"?cn:Pl}function Do(i,t,e={}){let s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),h=nr&&o>r;return{count:s,start:l,loop:t.loop,ilen:c(a+(c?r-y:y))%o,v=()=>{p!==m&&(i.lineTo(h,m),i.lineTo(h,p),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[_(u)],f.skip)continue;let y=f.x,x=f.y,M=y|0;M===g?(xm&&(m=x),h=(d*h+y)/++d):(v(),i.lineTo(y,x),g=M,d=0,p=m=x),b=x}v()}function ws(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Ol:Dl}function Al(i){return i.stepped?_n:i.tension||i.cubicInterpolationMode==="monotone"?xn:xt}function Tl(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),Co(i,t.options),i.stroke(n)}function Ll(i,t,e,s){let{segments:n,options:o}=t,a=ws(t);for(let r of n)Co(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}var Rl=typeof Path2D=="function";function El(i,t,e,s){Rl&&!t.options.segment?Tl(i,t,e,s):Ll(i,t,e,s)}var dt=class extends it{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let n=s.spanGaps?this._loop:this._fullLoop;pn(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=vn(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){let s=this.options,n=t[e],o=this.points,a=ss(this,{property:e,start:n,end:n});if(!a.length)return;let r=[],l=Al(s),c,h;for(c=0,h=a.length;ci!=="borderDash"&&i!=="fill"};function Un(i,t,e,s){let n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)=e)return i.slice(t,t+e);let a=[],r=(e-2)/(o-2),l=0,c=t+e-1,h=t,d,u,f,g,p;for(a[l++]=i[h],d=0;df&&(f=g,u=i[_],p=_);a[l++]=u,h=p}return a[l++]=i[c],a}function Hl(i,t,e,s){let n=0,o=0,a,r,l,c,h,d,u,f,g,p,m=[],b=t+e-1,_=i[t].x,y=i[b].x-_;for(a=t;ap&&(p=c,u=a),n=(o*n+r.x)/++o;else{let M=a-1;if(!T(d)&&!T(u)){let w=Math.min(d,u),S=Math.max(d,u);w!==f&&w!==M&&m.push({...i[w],x:n}),S!==f&&S!==M&&m.push({...i[S],x:n})}a>0&&M!==f&&m.push(i[M]),m.push(r),h=x,o=0,g=p=c,d=u=f=a}}return m}function Ao(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{value:t})}}function Kn(i){i.data.datasets.forEach(t=>{Ao(t)})}function jl(i,t){let e=t.length,s=0,n,{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Y(at(t,o.axis,a).lo,0,e-1)),c?n=Y(at(t,o.axis,r).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var $l={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Kn(i);return}let s=i.width;i.data.datasets.forEach((n,o)=>{let{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),c=a||n.data;if(Zt([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=jl(l,c),f=e.threshold||4*s;if(u<=f){Ao(n);return}T(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(e.algorithm){case"lttb":g=Nl(c,d,u,s,e);break;case"min-max":g=Hl(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=g})},destroy(i){Kn(i)}};function Yl(i,t,e){let s=i.segments,n=i.points,o=t.points,a=[];for(let r of s){let{start:l,end:c}=r;c=Ps(l,c,n);let h=ks(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}let d=ss(t,h);for(let u of d){let f=ks(e,o[u.start],o[u.end],u.loop),g=is(r,n,f);for(let p of g)a.push({source:p,target:u,start:{[e]:qn(h,f,"start",Math.max)},end:{[e]:qn(h,f,"end",Math.min)}})}}return a}function ks(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=G(n),o=G(o)),{property:i,start:n,end:o}}function Xl(i,t){let{x:e=null,y:s=null}=i||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Ps(a,r,n);let l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Ps(i,t,e){for(;t>i;t--){let s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function qn(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function To(i,t){let e=[],s=!1;return I(i)?(s=!0,e=i):e=Xl(i,t),e.length?new dt({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Gn(i){return i&&i.fill!==!1}function Ul(i,t,e){let n=i[t].fill,o=[t],a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!W(n))return n;if(a=i[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function Kl(i,t,e){let s=Jl(i);if(D(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return W(n)&&Math.floor(n)===n?ql(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function ql(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Gl(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:D(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Zl(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:D(i)?s=i.value:s=t.getBaseValue(),s}function Jl(i){let t=i.options,e=t.fill,s=C(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Ql(i){let{scale:t,index:e,line:s}=i,n=[],o=s.segments,a=s.points,r=tc(t,e);r.push(To({x:null,y:t.bottom},s));for(let l=0;l=0;--a){let r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&us(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let o=s[n].$filler;Gn(o)&&us(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){let s=t.meta.$filler;!Gn(s)||e.drawTime!=="beforeDatasetDraw"||us(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},to=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},dc=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,pi=class extends it{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=z(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let s=t.labels,n=$(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=to(s,o),c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,o,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r,d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{let m=s+e/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(t,e,s,n){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t,d=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{let _=s+e/2+o.measureText(m.text).width;b>0&&f+n+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[b]={left:g,top:f,col:p,width:_,height:n},u=Math.max(u,_),f+=n+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=Et(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=X(s,this.left+n,this.right-this.lineWidths[r]);for(let c of e)r!==c.row&&(r=c.row,l=X(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=X(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(let c of e)c.col!==r&&(r=c.col,l=X(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;xe(t,this),this._draw(),ye(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=O.color,l=Et(t.rtl,this.left,this.width),c=$(a.font),{color:h,padding:d}=a,u=c.size,f=u/2,g;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:b}=to(a,u),_=function(w,S,k){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;n.save();let L=C(k.lineWidth,1);if(n.fillStyle=C(k.fillStyle,r),n.lineCap=C(k.lineCap,"butt"),n.lineDashOffset=C(k.lineDashOffset,0),n.lineJoin=C(k.lineJoin,"miter"),n.lineWidth=L,n.strokeStyle=C(k.strokeStyle,r),n.setLineDash(C(k.lineDash,[])),a.usePointStyle){let R={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:L},A=l.xPlus(w,p/2),H=S+f;Yi(n,R,A,H,a.pointStyleWidth&&p)}else{let R=S+Math.max((u-m)/2,0),A=l.leftForLtr(w,p),H=St(k.borderRadius);n.beginPath(),Object.values(H).some(q=>q!==0)?Gt(n,{x:A,y:R,w:p,h:m,radius:H}):n.rect(A,R,p,m),n.fill(),L!==0&&n.stroke()}n.restore()},v=function(w,S,k){kt(n,k.text,w,S+b/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},y=this.isHorizontal(),x=this._computeTitleHeight();y?g={x:X(o,this.left+d,this.right-s[0]),y:this.top+d+x,line:0}:g={x:this.left+d,y:X(o,this.top+x+d,this.bottom-e[0].height),line:0},ts(this.ctx,t.textDirection);let M=b+d;this.legendItems.forEach((w,S)=>{n.strokeStyle=w.fontColor||h,n.fillStyle=w.fontColor||h;let k=n.measureText(w.text).width,L=l.textAlign(w.textAlign||(w.textAlign=a.textAlign)),R=p+f+k,A=g.x,H=g.y;l.setWidth(this.width),y?S>0&&A+R+d>this.right&&(H=g.y+=M,g.line++,A=g.x=X(o,this.left+d,this.right-s[g.line])):S>0&&H+M>this.bottom&&(A=g.x=A+e[g.line].width+d,g.line++,H=g.y=X(o,this.top+x+d,this.bottom-e[g.line].height));let q=l.x(A);_(q,H,w),A=tn(L,A+p+f,y?A+R:this.right,t.rtl),v(l.x(A),H,w),y?g.x+=R+d:g.y+=M}),es(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,s=$(e.font),n=U(e.padding);if(!e.display)return;let o=Et(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=X(t.align,d,this.right-u);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+X(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}let f=X(r,d,d+u);a.textAlign=o.textAlign(Ge(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,kt(a,e.text,f,h,s)}_computeTitleHeight(){let t=this.options.title,e=$(t.font),s=U(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(lt(t,this.left,this.right)&<(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;si.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o}}=i.legend.options;return i._getSortedDatasetMetas().map(a=>{let r=a.controller.getStyle(e?0:void 0),l=U(r.borderWidth);return{text:t[a.index].label,fillStyle:r.backgroundColor,fontColor:o,hidden:!a.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:r.borderColor,pointStyle:s||r.pointStyle,rotation:r.rotation,textAlign:n||r.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},Te=class extends it{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let n=I(s.text)?s.text.length:1;this._padding=U(s.padding);let o=n*$(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=X(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=X(r,n,e),l=B*-.5):(h=o-t,d=X(r,e,n),l=B*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let s=$(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);kt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:Ge(e.align),textBaseline:"middle",translation:[a,r]})}};function gc(i,t){let e=new Te({ctx:i.ctx,options:t,chart:i});K.configure(i,e,t),K.addBox(i,e),i.titleBlock=e}var pc={id:"title",_element:Te,start(i,t,e){gc(i,e)},stop(i){let t=i.titleBlock;K.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let s=i.titleBlock;K.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},ai=new WeakMap,mc={id:"subtitle",start(i,t,e){let s=new Te({ctx:i.ctx,options:e,chart:i});K.configure(i,s,e),K.addBox(i,s),ai.set(i,s)},stop(i){K.removeBox(i,ai.get(i)),ai.delete(i)},beforeUpdate(i,t,e){let s=ai.get(i);K.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Ce={average(i){if(!i.length)return!1;let t,e,s=0,n=0,o=0;for(t=0,e=i.length;t"u"}function I(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function D(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}var W=i=>(typeof i=="number"||i instanceof Number)&&isFinite(+i);function Q(i,t){return W(i)?i:t}function C(i,t){return typeof i>"u"?t:i}var js=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:i/t,Di=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function z(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function E(i,t,e,s){let n,o,a;if(I(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function gt(i,t){return(Ds[t]||(Ds[t]=Io(t)))(i)}function Io(i){let t=zo(i);return e=>{for(let s of t){if(s==="")break;e=e&&e[s]}return e}}function zo(i){let t=i.split("."),e=[],s="";for(let n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Xe(i){return i.charAt(0).toUpperCase()+i.slice(1)}var J=i=>typeof i<"u",ft=i=>typeof i=="function",Oi=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};function Ys(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var B=Math.PI,F=2*B,Bo=F+B,je=Number.POSITIVE_INFINITY,Vo=B/180,V=B/2,ue=B/4,Os=B*2/3,tt=Math.log10,ot=Math.sign;function Ai(i){let t=Math.round(i);i=Ut(i,t,i/1e3)?t:i;let e=Math.pow(10,Math.floor(tt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function Xs(i){let t=[],e=Math.sqrt(i),s;for(s=1;sn-o).pop(),t}function Lt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Ut(i,t,e){return Math.abs(i-t)=i}function Ti(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Ke(i,t,e){e=e||(a=>i[a]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}var at=(i,t,e,s)=>Ke(i,e,s?n=>i[n][t]<=e:n=>i[n][t]Ke(i,e,s=>i[s][t]>=e);function Gs(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{let s="_onData"+Xe(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){let a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ei(i,t){let e=i._chartjs;if(!e)return;let s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Zs.forEach(o=>{delete i[o]}),delete i._chartjs)}function Fi(i){let t=new Set,e,s;for(e=0,s=i.length;e"u"?function(i){return i()}:window.requestAnimationFrame}();function zi(i,t,e){let s=e||(a=>Array.prototype.slice.call(a)),n=!1,o=[];return function(...a){o=s(a),n||(n=!0,Ii.call(window,()=>{n=!1,i.apply(t,o)}))}}function Qs(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}var qe=i=>i==="start"?"left":i==="end"?"right":"center",X=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,tn=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function Bi(i,t,e){let s=t.length,n=0,o=s;if(i._sorted){let{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=Y(Math.min(at(r,a.axis,c).lo,e?s:at(t,l,a.getPixelForValue(c)).lo),0,s-1)),u?o=Y(Math.max(at(r,a.axis,h,!0).hi+1,e?0:at(t,l,a.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function Vi(i){let{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;let o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}var ze=i=>i===0||i===1,As=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e)),Ts=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,Ht={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*V)+1,easeOutSine:i=>Math.sin(i*V),easeInOutSine:i=>-.5*(Math.cos(B*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ze(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ze(i)?i:As(i,.075,.3),easeOutElastic:i=>ze(i)?i:Ts(i,.075,.3),easeInOutElastic(i){return ze(i)?i:i<.5?.5*As(i*2,.1125,.45):.5+.5*Ts(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ht.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ht.easeInBounce(i*2)*.5:Ht.easeOutBounce(i*2-1)*.5+.5};function be(i){return i+.5|0}var xt=(i,t,e)=>Math.max(Math.min(i,e),t);function fe(i){return xt(be(i*2.55),0,255)}function yt(i){return xt(be(i*255),0,255)}function ut(i){return xt(be(i/2.55)/100,0,1)}function Ls(i){return xt(be(i*100),0,100)}var st={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Si=[..."0123456789ABCDEF"],No=i=>Si[i&15],Ho=i=>Si[(i&240)>>4]+Si[i&15],Be=i=>(i&240)>>4===(i&15),jo=i=>Be(i.r)&&Be(i.g)&&Be(i.b)&&Be(i.a);function $o(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&st[i[1]]*17,g:255&st[i[2]]*17,b:255&st[i[3]]*17,a:t===5?st[i[4]]*17:255}:(t===7||t===9)&&(e={r:st[i[1]]<<4|st[i[2]],g:st[i[3]]<<4|st[i[4]],b:st[i[5]]<<4|st[i[6]],a:t===9?st[i[7]]<<4|st[i[8]]:255})),e}var Yo=(i,t)=>i<255?t(i):"";function Xo(i){var t=jo(i)?No:Ho;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Yo(i.a,t):void 0}var Uo=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function en(i,t,e){let s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Ko(i,t,e){let s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function qo(i,t,e){let s=en(i,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function Go(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-a):h/(o+a),l=Go(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function Ni(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(yt)}function Hi(i,t,e){return Ni(en,i,t,e)}function Zo(i,t,e){return Ni(qo,i,t,e)}function Jo(i,t,e){return Ni(Ko,i,t,e)}function sn(i){return(i%360+360)%360}function Qo(i){let t=Uo.exec(i),e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?fe(+t[5]):yt(+t[5]));let n=sn(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=Zo(n,o,a):t[1]==="hsv"?s=Jo(n,o,a):s=Hi(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function ta(i,t){var e=Wi(i);e[0]=sn(e[0]+t),e=Hi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function ea(i){if(!i)return;let t=Wi(i),e=t[0],s=Ls(t[1]),n=Ls(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${ut(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}var Rs={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Es={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ia(){let i={},t=Object.keys(Es),e=Object.keys(Rs),s,n,o,a,r;for(s=0;s>16&255,o>>8&255,o&255]}return i}var Ve;function sa(i){Ve||(Ve=ia(),Ve.transparent=[0,0,0,0]);let t=Ve[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var na=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function oa(i){let t=na.exec(i),e=255,s,n,o;if(t){if(t[7]!==s){let a=+t[7];e=t[8]?fe(a):xt(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?fe(s):xt(s,0,255)),n=255&(t[4]?fe(n):xt(n,0,255)),o=255&(t[6]?fe(o):xt(o,0,255)),{r:s,g:n,b:o,a:e}}}function aa(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${ut(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var vi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Nt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function ra(i,t,e){let s=Nt(ut(i.r)),n=Nt(ut(i.g)),o=Nt(ut(i.b));return{r:yt(vi(s+e*(Nt(ut(t.r))-s))),g:yt(vi(n+e*(Nt(ut(t.g))-n))),b:yt(vi(o+e*(Nt(ut(t.b))-o))),a:i.a+e*(t.a-i.a)}}function We(i,t,e){if(i){let s=Wi(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Hi(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function nn(i,t){return i&&Object.assign(t||{},i)}function Fs(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=yt(i[3]))):(t=nn(i,{r:0,g:0,b:0,a:1}),t.a=yt(t.a)),t}function la(i){return i.charAt(0)==="r"?oa(i):Qo(i)}var Pi=class i{constructor(t){if(t instanceof i)return t;let e=typeof t,s;e==="object"?s=Fs(t):e==="string"&&(s=$o(t)||sa(t)||la(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=nn(this._rgb);return t&&(t.a=ut(t.a)),t}set rgb(t){this._rgb=Fs(t)}rgbString(){return this._valid?aa(this._rgb):void 0}hexString(){return this._valid?Xo(this._rgb):void 0}hslString(){return this._valid?ea(this._rgb):void 0}mix(t,e){if(t){let s=this.rgb,n=t.rgb,o,a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=ra(this._rgb,t._rgb,e)),this}clone(){return new i(this.rgb)}alpha(t){return this._rgb.a=yt(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=be(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return We(this._rgb,2,t),this}darken(t){return We(this._rgb,2,-t),this}saturate(t){return We(this._rgb,1,t),this}desaturate(t){return We(this._rgb,1,-t),this}rotate(t){return ta(this._rgb,t),this}};function on(i){return new Pi(i)}function an(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ji(i){return an(i)?i:on(i)}function Mi(i){return an(i)?i:on(i).saturate(.5).darken(.1).hexString()}var vt=Object.create(null),Ge=Object.create(null);function ge(i,t){if(!t)return i;let e=t.split(".");for(let s=0,n=e.length;se.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,s)=>Mi(s.backgroundColor),this.hoverBorderColor=(e,s)=>Mi(s.borderColor),this.hoverColor=(e,s)=>Mi(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return wi(this,t,e)}get(t){return ge(this,t)}describe(t,e){return wi(Ge,t,e)}override(t,e){return wi(vt,t,e)}route(t,e,s,n){let o=ge(this,t),a=ge(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[r],c=a[n];return D(l)?Object.assign({},c,l):C(l,c)},set(l){this[r]=l}}})}},O=new Ci({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ca(i){return!i||T(i.size)||T(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function pe(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function rn(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0,r=e.length,l,c,h,d,u;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function $t(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="",l,c;for(i.save(),i.font=n.string,ha(i,o),l=0;l+i||0;function Je(i,t){let e={},s=D(t),n=s?Object.keys(t):t,o=D(i)?s?a=>C(i[a],i[t[a]]):a=>i[a]:()=>i;for(let a of n)e[a]=pa(o(a));return e}function Xi(i){return Je(i,{top:"y",right:"x",bottom:"y",left:"x"})}function kt(i){return Je(i,["topLeft","topRight","bottomLeft","bottomRight"])}function U(i){let t=Xi(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function $(i,t){i=i||{},t=t||O.font;let e=C(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=C(i.style,t.style);s&&!(""+s).match(fa)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");let n={family:C(i.family,t.family),lineHeight:ga(C(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:C(i.weight,t.weight),string:""};return n.string=ca(n),n}function Gt(i,t,e,s){let n=!0,o,a,r;for(o=0,a=i.length;oe&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function pt(i,t){return Object.assign(Object.create(i),t)}function Qe(i,t=[""],e=i,s,n=()=>i[0]){J(s)||(s=fn("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:s,_getTarget:n,override:a=>Qe([a,...i],t,e,s)};return new Proxy(o,{deleteProperty(a,r){return delete a[r],delete a._keys,delete i[0][r],!0},get(a,r){return dn(a,r,()=>wa(r,t,i,a))},getOwnPropertyDescriptor(a,r){return Reflect.getOwnPropertyDescriptor(a._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,r){return zs(a).includes(r)},ownKeys(a){return zs(a)},set(a,r,l){let c=a._storage||(a._storage=n());return a[r]=c[r]=l,delete a._keys,!0}})}function Tt(i,t,e,s){let n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ui(i,s),setContext:o=>Tt(i,o,e,s),override:o=>Tt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return dn(o,a,()=>ba(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function Ui(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ft(e)?e:()=>e,isIndexable:ft(s)?s:()=>s}}var ma=(i,t)=>i?i+Xe(t):t,Ki=(i,t)=>D(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function dn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];let s=e();return i[t]=s,s}function ba(i,t,e){let{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i,r=s[t];return ft(r)&&a.isScriptable(t)&&(r=_a(t,r,i,e)),I(r)&&r.length&&(r=xa(t,r,i,a.isIndexable)),Ki(t,r)&&(r=Tt(r,n,o&&o[t],a)),r}function _a(i,t,e,s){let{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);return r.add(i),t=t(o,a||s),r.delete(i),Ki(i,t)&&(t=qi(n._scopes,n,i,t)),t}function xa(i,t,e,s){let{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(J(o.index)&&s(i))t=t[o.index%t.length];else if(D(t[0])){let l=t,c=n._scopes.filter(h=>h!==l);t=[];for(let h of l){let d=qi(c,n,i,h);t.push(Tt(d,o,a&&a[i],r))}}return t}function un(i,t,e){return ft(i)?i(t,e):i}var ya=(i,t)=>i===!0?t:typeof i=="string"?gt(t,i):void 0;function va(i,t,e,s,n){for(let o of t){let a=ya(e,o);if(a){i.add(a);let r=un(a._fallback,e,n);if(J(r)&&r!==e&&r!==s)return r}else if(a===!1&&J(s)&&e!==s)return null}return!1}function qi(i,t,e,s){let n=t._rootScopes,o=un(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=Is(r,a,e,o||e,s);return l===null||J(o)&&o!==e&&(l=Is(r,a,o,l,s),l===null)?!1:Qe(Array.from(r),[""],n,o,()=>Ma(t,e,s))}function Is(i,t,e,s,n){for(;e;)e=va(i,t,e,s,n);return e}function Ma(i,t,e){let s=i._getTarget();t in s||(s[t]={});let n=s[t];return I(n)&&D(e)?e:n}function wa(i,t,e,s){let n;for(let o of t)if(n=fn(ma(o,i),e),J(n))return Ki(i,n)?qi(e,s,i,n):n}function fn(i,t){for(let e of t){if(!e)continue;let s=e[i];if(J(s))return s}}function zs(i){let t=i._keys;return t||(t=i._keys=ka(i._scopes)),t}function ka(i){let t=new Set;for(let e of i)for(let s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function Gi(i,t,e,s){let{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s),r,l,c,h;for(r=0,l=s;rti==="x"?"y":"x";function Pa(i,t,e,s){let n=i.skip?t:i,o=t,a=e.skip?t:e,r=$e(o,n),l=$e(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Ca(i,t,e){let s=i.length,n,o,a,r,l,c=Yt(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")Oa(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,a=i.length;owindow.getComputedStyle(i,null);function Ta(i,t){return ei(i).getPropertyValue(t)}var La=["top","right","bottom","left"];function At(i,t,e){let s={};e=e?"-"+e:"";for(let n=0;n<4;n++){let o=La[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var Ra=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Ea(i,t){let e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s,a=!1,r,l;if(Ra(n,o,i.target))r=n,l=o;else{let c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function St(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:s}=t,n=ei(e),o=n.boxSizing==="border-box",a=At(n,"padding"),r=At(n,"border","width"),{x:l,y:c,box:h}=Ea(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top),{width:f,height:g}=t;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/g*e.height/s)}}function Fa(i,t,e){let s,n;if(t===void 0||e===void 0){let o=ti(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{let a=o.getBoundingClientRect(),r=ei(o),l=At(r,"border","width"),c=At(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=Ye(r.maxWidth,o,"clientWidth"),n=Ye(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||je,maxHeight:n||je}}var ki=i=>Math.round(i*10)/10;function mn(i,t,e,s){let n=ei(i),o=At(n,"margin"),a=Ye(n.maxWidth,i,"clientWidth")||je,r=Ye(n.maxHeight,i,"clientHeight")||je,l=Fa(i,t,e),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let d=At(n,"border","width"),u=At(n,"padding");c-=u.width+d.width,h-=u.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?Math.floor(c/s):h-o.height),c=ki(Math.min(c,a,l.maxWidth)),h=ki(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ki(c/2)),{width:c,height:h}}function Ji(i,t,e){let s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=n/s,i.width=o/s;let a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}var bn=function(){let i=!1;try{let t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Qi(i,t){let e=Ta(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function _t(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function _n(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function xn(i,t,e,s){let n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=_t(i,n,e),r=_t(n,o,e),l=_t(o,t,e),c=_t(a,r,e),h=_t(r,l,e);return _t(c,h,e)}var Bs=new Map;function Ia(i,t){t=t||{};let e=i+JSON.stringify(t),s=Bs.get(e);return s||(s=new Intl.NumberFormat(i,t),Bs.set(e,s)),s}function Zt(i,t,e){return Ia(t,e).format(i)}var za=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Ba=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Rt(i,t,e){return i?za(t,e):Ba()}function ts(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function es(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function yn(i){return i==="angle"?{between:Kt,compare:Wo,normalize:G}:{between:lt,compare:(t,e)=>t-e,normalize:t=>t}}function Vs({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Va(i,t,e){let{property:s,start:n,end:o}=e,{between:a,normalize:r}=yn(s),l=t.length,{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(n,v,b)&&r(n,v)!==0,x=()=>r(o,b)===0||l(o,v,b),M=()=>p||y(),w=()=>!p||x();for(let S=h,k=h;S<=d;++S)_=t[S%a],!_.skip&&(b=c(_[s]),b!==v&&(p=l(b,n,o),m===null&&M()&&(m=r(b,n)===0?S:k),m!==null&&w()&&(g.push(Vs({start:m,end:S,loop:u,count:a,style:f})),m=null),k=S,v=b));return m!==null&&g.push(Vs({start:m,end:d,loop:u,count:a,style:f})),g}function ss(i,t){let e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Na(i,t,e,s){let n=i.length,o=[],a=t,r=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:s}),o}function vn(i,t){let e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];let o=!!i._loop,{start:a,end:r}=Wa(e,n,o,s);if(s===!0)return Ws(i,[{start:a,end:r,loop:o}],e,t);let l=rr({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Ii.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let o=s.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let s=e.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},mt=new fs,Mn="transparent",$a={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let s=ji(i||Mn),n=s.valid&&ji(t||Mn);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}},gs=class{constructor(t,e,s,n){let o=e[s];n=Gt([t.to,n,o,t.from]);let a=Gt([t.from,o,n]);this._active=!0,this._fn=t.fn||$a[t.type||typeof a],this._easing=Ht[t.easing]||Ht.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);let n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Gt([t.to,e,n,t.from]),this._from=Gt([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){let e=t?"res":"rej",s=this._promises||[];for(let n=0;ni!=="onProgress"&&i!=="onComplete"&&i!=="fn"});O.set("animations",{colors:{type:"color",properties:Xa},numbers:{type:"number",properties:Ya}});O.describe("animations",{_fallback:"animation"});O.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}});var ci=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!D(t))return;let e=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let n=t[s];if(!D(n))return;let o={};for(let a of Ua)o[a]=n[a];(I(n.properties)&&n.properties||[s]).forEach(a=>{(a===s||!e.has(a))&&e.set(a,o)})})}_animateOptions(t,e){let s=e.options,n=qa(t,s);if(!n)return[];let o=this._createAnimations(n,s);return s.$shared&&Ka(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){let s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}let h=e[c],d=o[c],u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new gs(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let s=this._createAnimations(t,e);if(s.length)return mt.add(this._chart,s),!0}};function Ka(i,t){let e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function Cn(i,t){let{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=Qa(o,a,s),d=t.length,u;for(let f=0;fe[s].axis===t).shift()}function ir(i,t){return pt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function sr(i,t,e){return pt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ye(i,t){let e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(let n of t){let o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e]}}}var os=i=>i==="reset"||i==="none",Dn=(i,t)=>t?i:Object.assign({},i),nr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:go(e,!0),values:null},et=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Sn(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ye(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=e.xAxisID=C(s.xAxisID,ns(t,"x")),a=e.yAxisID=C(s.yAxisID,ns(t,"y")),r=e.rAxisID=C(s.rAxisID,ns(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Ei(this._data,this),t._stacked&&ye(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(D(e))this._data=Ja(e);else if(s!==e){if(s){Ei(s,this);let n=this._cachedMeta;ye(n),n._parsed=[]}e&&Object.isExtensible(e)&&Js(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,s=this.getDataset(),n=!1;this._dataCheck();let o=e._stacked;e._stacked=Sn(e.vScale,e),e.stack!==s.stack&&(n=!0,ye(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&Cn(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis,l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{I(n[t])?u=this.parseArrayData(s,n,t,e):D(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);let f=()=>d[r]===null||c&&d[r]p||d=0;--u)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,s=[],n,o,a;for(n=0,o=e.length;n=0&&tthis.getContext(s,n),p=c.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(Dn(p,l))),p}_resolveAnimations(t,e,s){let n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){let h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}let c=new ci(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||os(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){os(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!os(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;let o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,s=this._cachedMeta.data;for(let[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];let n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;rn-o))}return i._cache.$bar}function ar(i){let t=i.iScale,e=or(t,i.type),s=t._length,n,o,a,r,l=()=>{a===32767||a===-32768||(J(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n0?n[i-1]:null,r=iMath.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function po(i,t,e,s){return I(i)?cr(i,t,e,s):t[e.axis]=e.parse(i,s),t}function On(i,t,e,s){let n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[],c,h,d,u;for(c=e,h=e+s;c=e?1:-1)}function dr(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.basel.controller.options.grouped),o=s.options.stacked,a=[],r=l=>{let c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(T(h)||isNaN(h))return!0};for(let l of n)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){let n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){let t=this.options,e=this._cachedMeta,s=e.iScale,n=[],o,a;for(o=0,a=e.data.length;o=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),l=o._custom;return{label:e.label,value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=a.axis,d=r.axis;for(let u=e;uKt(v,r,l,!0)?1:Math.max(y,y*e,x,x*e),g=(v,y,x)=>Kt(v,r,l,!0)?-1:Math.min(y,y*e,x,x*e),p=f(0,c,d),m=f(V,h,u),b=g(B,c,d),_=g(B+V,h,u);s=(p-b)/2,n=(m-_)/2,o=-(p+b)/2,a=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}var Dt=class extends et{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(D(s[t])){let{key:l="value"}=this._parsing;o=c=>+gt(s[c],l)}let a,r;for(a=t,r=t+e;a0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Zt(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0,s=this.chart,n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;ni!=="spacing",_indexable:i=>i!=="spacing"};Dt.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let a=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){let t=i.label,e=": "+i.formattedValue;return I(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};var ie=class extends et{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled,{start:r,count:l}=Bi(e,n,a);this._drawStart=r,this._drawCount=l,Vi(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:c},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=Lt(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e>0&&this.getParsed(e-1);for(let v=e;v0&&Math.abs(x[u]-_[u])>m,p&&(M.parsed=x,M.raw=c.data[v]),d&&(M.options=h||this.resolveDataElementOptions(v,y.active?"active":n)),b||this.updateElement(y,v,M,n),_=x}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;let o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};ie.id="line";ie.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};ie.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var se=class extends et{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Zt(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return Gi.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{let o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(oe.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){let o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*B,f=u,g,p=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||s):0}};se.id="polarArea";se.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};se.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let a=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){return i.chart.data.labels[i.dataIndex]+": "+i.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};var Ce=class extends Dt{};Ce.id="pie";Ce.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var ne=class extends et{getLabelAndValue(t){let e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return Gi.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,t!=="resize"){let a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);let r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(s,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){let o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}};it.defaults={};it.defaultRoutes=void 0;var mo={values(i){return I(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let s=this.chart.options.locale,n,o=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=mr(i,e)}let a=tt(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Zt(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";let s=i/Math.pow(10,Math.floor(tt(i)));return s===1||s===2||s===5?mo.numeric.call(this,i,t,e):""}};function mr(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var pi={formatters:mo};O.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:pi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});O.route("scale.ticks","color","","color");O.route("scale.grid","color","","borderColor");O.route("scale.grid","borderColor","","borderColor");O.route("scale.title","color","","color");O.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"});O.describe("scales",{_fallback:"scale"});O.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"});function br(i,t){let e=i.options.ticks,s=e.maxTicksLimit||_r(i),n=e.major.enabled?yr(t):[],o=n.length,a=n[0],r=n[o-1],l=[];if(o>s)return vr(t,l,n,o/s),l;let c=xr(n,t,s);if(o>0){let h,d,u=o>1?Math.round((r-a)/(o-1)):null;for(ii(t,l,c,T(u)?0:a-u,a),h=0,d=o-1;hn)return l}return Math.max(n,1)}function yr(i){let t=[],e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,Ln=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e;function Rn(i,t){let e=[],s=i.length/t,n=i.length,o=0;for(;oa+r)))return l}function Sr(i,t){E(i,e=>{let s=e.gc,n=s.length/2,o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:Q(e,Q(s,e)),max:Q(s,Q(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){z(this.options.beforeUpdate,[this])}update(t,e,s){let{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=hn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Y(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(t.offset?.5:1)),l=this.maxHeight-ve(t.grid)-e.padding-En(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Ue(Math.min(Math.asin(Y((h.highest.height+6)/r,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){z(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){z(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=En(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=ve(o)+l):(t.height=this.maxHeight,t.width=ve(o)+l),s.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,g=nt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){let b=s.mirror?0:m*d.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{let b=s.mirror?0:p*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,p)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){z(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:o[w]||0,height:a[w]||0});return{first:M(0),last:M(e-1),widest:M(y),highest:M(x),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Ks(this._alignToPixels?Mt(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&tr*n?r/s:l/n:l*n0}_computeGridLineItems(t){let e=this.axis,s=this.chart,n=this.options,{grid:o,position:a}=n,r=o.offset,l=this.isHorizontal(),h=this.ticks.length+(r?1:0),d=ve(o),u=[],f=o.setContext(this.getContext()),g=f.drawBorder?f.borderWidth:0,p=g/2,m=function(P){return Mt(s,P,g)},b,_,v,y,x,M,w,S,k,L,R,A;if(a==="top")b=m(this.bottom),M=this.bottom-d,S=b-p,L=m(t.top)+p,A=t.bottom;else if(a==="bottom")b=m(this.top),L=t.top,A=m(t.bottom)-p,M=b+p,S=this.top+d;else if(a==="left")b=m(this.right),x=this.right-d,w=b-p,k=m(t.left)+p,R=t.right;else if(a==="right")b=m(this.left),k=t.left,R=m(t.right)-p,x=b+p,w=this.left+d;else if(e==="x"){if(a==="center")b=m((t.top+t.bottom)/2+.5);else if(D(a)){let P=Object.keys(a)[0],j=a[P];b=m(this.chart.scales[P].getPixelForValue(j))}L=t.top,A=t.bottom,M=b+p,S=M+d}else if(e==="y"){if(a==="center")b=m((t.left+t.right)/2);else if(D(a)){let P=Object.keys(a)[0],j=a[P];b=m(this.chart.scales[P].getPixelForValue(j))}x=b-p,w=x-d,k=t.left,R=t.right}let H=C(n.ticks.maxTicksLimit,h),q=Math.max(1,Math.ceil(h/H));for(_=0;_o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){let e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o,a,r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o{this.draw(n)}}]:[{z:s,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:s+1,draw:()=>{this.drawBorder()}},{z:e,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],o,a;for(o=0,a=e.length;o{let s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");O.route(o,n,l,r)})}function Lr(i){return"id"in i&&"defaults"in i}var ps=class{constructor(){this.controllers=new Qt(et,"datasets",!0),this.elements=new Qt(it,"elements"),this.plugins=new Qt(Object,"plugins"),this.scales=new Qt(Ft,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{let o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):E(n,a=>{let r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){let n=Xe(t);z(s["before"+n],[],s),e[t](s),z(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let y=e;y0&&Math.abs(M[f]-v[f])>b,m&&(w.parsed=M,w.raw=c.data[y]),u&&(w.options=d||this.resolveDataElementOptions(y,x.active?"active":n)),_||this.updateElement(x,y,w,n),v=M}this.updateSharedOptions(d,n,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}let s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;let o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}};oe.id="scatter";oe.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};oe.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(i){return"("+i.label+", "+i.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Rr=Object.freeze({__proto__:null,BarController:te,BubbleController:ee,DoughnutController:Dt,LineController:ie,PolarAreaController:se,PieController:Ce,RadarController:ne,ScatterController:oe});function Et(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var De=class{constructor(t){this.options=t||{}}init(t){}formats(){return Et()}parse(t,e){return Et()}format(t,e){return Et()}add(t,e,s){return Et()}diff(t,e,s){return Et()}startOf(t,e,s){return Et()}endOf(t,e){return Et()}};De.override=function(i){Object.assign(De.prototype,i)};var Er={_date:De};function Fr(i,t,e,s){let{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){let l=r._reversePixels?qs:at;if(s){if(n._sharedOptions){let c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){let d=l(o,t,e-h),u=l(o,t,e+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function Fe(i,t,e,s,n){let o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r{l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var Vr={evaluateInteractionItems:Fe,modes:{index(i,t,e,s){let n=St(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?rs(i,n,o,s,a):ls(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){let n=St(t,i),o=e.axis||"xy",a=e.includeInvisible||!1,r=e.intersect?rs(i,n,o,s,a):ls(i,n,o,!1,s,a);if(r.length>0){let l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;he.pos===t)}function In(i,t){return i.filter(e=>bo.indexOf(e.pos)===-1&&e.box.axis===t)}function we(i,t){return i.sort((e,s)=>{let n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Wr(i){let t=[],e,s,n,o,a,r;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=we(Me(t,"left"),!0),n=we(Me(t,"right")),o=we(Me(t,"top"),!0),a=we(Me(t,"bottom")),r=In(t,"x"),l=In(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Me(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function zn(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function _o(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function $r(i,t,e,s){let{pos:n,box:o}=e,a=i.maxPadding;if(!D(n)){e.size&&(i[n]-=e.size);let d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&_o(a,o.getPadding());let r=Math.max(0,t.outerWidth-zn(a,i,"left","right")),l=Math.max(0,t.outerHeight-zn(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Yr(i){let t=i.maxPadding;function e(s){let n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Xr(i,t){let e=t.maxPadding;function s(n){let o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function Se(i,t,e,s){let n=[],o,a,r,l,c,h;for(o=0,a=i.length,c=0;o{typeof p.beforeLayout=="function"&&p.beforeLayout()});let h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);_o(u,U(s));let f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=Hr(l.concat(c),d);Se(r.fullSize,f,d,g),Se(l,f,d,g),Se(c,f,d,g)&&Se(l,f,d,g),Yr(f),Bn(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Bn(r.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(r.chartArea,p=>{let m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},hi=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}},ms=class extends hi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},li="$chartjs",Ur={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vn=i=>i===null||i==="";function Kr(i,t){let e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[li]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Vn(n)){let o=Qi(i,"width");o!==void 0&&(i.width=o)}if(Vn(s))if(i.style.height==="")i.height=i.width/(t||2);else{let o=Qi(i,"height");o!==void 0&&(i.height=o)}return i}var xo=bn?{passive:!0}:!1;function qr(i,t,e){i.addEventListener(t,e,xo)}function Gr(i,t,e){i.canvas.removeEventListener(t,e,xo)}function Zr(i,t){let e=Ur[i.type]||i.type,{x:s,y:n}=St(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function di(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function Jr(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||di(r.addedNodes,s),a=a&&!di(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Qr(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||di(r.removedNodes,s),a=a&&!di(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}var Oe=new Map,Wn=0;function yo(){let i=window.devicePixelRatio;i!==Wn&&(Wn=i,Oe.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function tl(i,t){Oe.size||window.addEventListener("resize",yo),Oe.set(i,t)}function el(i){Oe.delete(i),Oe.size||window.removeEventListener("resize",yo)}function il(i,t,e){let s=i.canvas,n=s&&ti(s);if(!n)return;let o=zi((r,l)=>{let c=n.clientWidth;e(r,l),c{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),tl(i,o),a}function cs(i,t,e){e&&e.disconnect(),t==="resize"&&el(i)}function sl(i,t,e){let s=i.canvas,n=zi(o=>{i.ctx!==null&&e(Zr(o,i))},i,o=>{let a=o[0];return[a,a.offsetX,a.offsetY]});return qr(s,t,n),n}var bs=class extends hi{acquireContext(t,e){let s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Kr(t,e),s):null}releaseContext(t){let e=t.canvas;if(!e[li])return!1;let s=e[li].initial;["height","width"].forEach(o=>{let a=s[o];T(a)?e.removeAttribute(o):e.setAttribute(o,a)});let n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[li],!0}addEventListener(t,e,s){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),a={attach:Jr,detach:Qr,resize:il}[e]||sl;n[e]=a(t,e,s)}removeEventListener(t,e){let s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:cs,detach:cs,resize:cs}[e]||Gr)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return mn(t,e,s,n)}isAttached(t){let e=ti(t);return!!(e&&e.isConnected)}};function nl(i){return!Zi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?ms:bs}var _s=class{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,s,n){n=n||{};for(let o of t){let a=o.plugin,r=a[s],l=[e,n,o.options];if(z(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){T(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let s=t&&t.config,n=C(s.options&&s.options.plugins,{}),o=ol(s);return n===!1&&!e?[]:rl(t,o,n,e)}_notifyStateChanges(t){let e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}};function ol(i){let t={},e=[],s=Object.keys(ht.plugins.items);for(let o=0;o{let l=s[r];if(!D(l))return console.error(`Invalid scale configuration for scale: ${r}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);let c=ys(r,l),h=hl(c,n),d=e.scales||{};o[c]=o[c]||r,a[r]=Xt(Object.create(null),[{axis:c},l,d[c],d[h]])}),i.data.datasets.forEach(r=>{let l=r.type||i.type,c=r.indexAxis||xs(l,t),d=(vt[l]||{}).scales||{};Object.keys(d).forEach(u=>{let f=cl(u,c),g=r[f+"AxisID"]||o[f]||f;a[g]=a[g]||Object.create(null),Xt(a[g],[{axis:f},s[g],d[u]])})}),Object.keys(a).forEach(r=>{let l=a[r];Xt(l,[O.scales[l.type],O.scale])}),a}function vo(i){let t=i.options||(i.options={});t.plugins=C(t.plugins,{}),t.scales=ul(i,t)}function Mo(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function fl(i){return i=i||{},i.data=Mo(i.data),vo(i),i}var Nn=new Map,wo=new Set;function ni(i,t){let e=Nn.get(i);return e||(e=t(),Nn.set(i,e),wo.add(e)),e}var ke=(i,t,e)=>{let s=gt(t,e);s!==void 0&&i.add(s)},vs=class{constructor(t){this._config=fl(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Mo(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),vo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ni(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ni(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ni(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,s=this.type;return ni(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let s=this._scopeCache,n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){let{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;let l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>ke(l,t,d))),h.forEach(d=>ke(l,n,d)),h.forEach(d=>ke(l,vt[o]||{},d)),h.forEach(d=>ke(l,O,d)),h.forEach(d=>ke(l,Ge,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),wo.has(e)&&a.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,vt[e]||{},O.datasets[e]||{},{type:e},O,Ge]}resolveNamedOptions(t,e,s,n=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=Hn(this._resolverCache,t,n),l=a;if(pl(a,e)){o.$shared=!1,s=ft(s)?s():s;let c=this.createResolver(t,s,r);l=Tt(a,s,c)}for(let c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){let{resolver:o}=Hn(this._resolverCache,t,s);return D(e)?Tt(o,e,void 0,n):o}};function Hn(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));let n=e.join(),o=s.get(n);return o||(o={resolver:Qe(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}var gl=i=>D(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||ft(i[e]),!1);function pl(i,t){let{isScriptable:e,isIndexable:s}=Ui(i);for(let n of t){let o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(ft(r)||gl(r))||a&&I(r))return!0}return!1}var ml="3.9.1",bl=["top","bottom","left","right","chartArea"];function jn(i,t){return i==="top"||i==="bottom"||bl.indexOf(i)===-1&&t==="x"}function $n(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Yn(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),z(e&&e.onComplete,[i],t)}function _l(i){let t=i.chart,e=t.options.animation;z(e&&e.onProgress,[i],t)}function ko(i){return Zi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var ui={},So=i=>{let t=ko(i);return Object.values(ui).filter(e=>e.canvas===t).pop()};function xl(i,t,e){let s=Object.keys(i);for(let n of s){let o=+n;if(o>=t){let a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function yl(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}var It=class{constructor(t,e){let s=this.config=new vs(e),n=ko(t),o=So(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||nl(n)),this.platform.updateConfig(s);let r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Hs(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _s,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Qs(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],ui[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}mt.listen(this,"complete",Yn),mt.listen(this,"progress",_l),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return T(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ji(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return $i(this.canvas,this.ctx),this}stop(){return mt.stop(this),this}resize(t,e){mt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ji(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),z(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};E(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){let t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{}),o=[];e&&(o=o.concat(Object.keys(e).map(a=>{let r=e[a],l=ys(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),E(o,a=>{let r=a.options,l=r.id,c=ys(l,r),h=C(r.type,a.dtype);(r.position===void 0||jn(r.position,c)!==jn(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{let u=ht.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),E(n,(a,r)=>{a||delete s[r]}),E(s,a=>{K.configure(this,a,a.options),K.addBox(this,a)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort($n("z","_idx"));let{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){E(this.scales,t=>{K.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Oi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:s,start:n,count:o}of e){let a=s==="_removeElements"?-o:o;xl(t,n,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;K.update(this,this.width,this.height,t);let e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],E(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,s=t._clip,n=!s.disabled,o=this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&_e(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&xe(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return $t(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){let o=Vr.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],s=this._metasets,n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){let s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){let n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);J(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),mt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};E(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)},a,r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){E(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},E(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){let n=s?"set":"remove",o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r{let r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!me(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}_updateHoverStyles(t,e,s){let n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){let s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;let o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){let{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=Ys(t),c=yl(t,this._lastEvent,s,l);s&&(this._lastEvent=null,z(o.onHover,[t,r,this],this),l&&z(o.onClick,[t,r,this],this));let h=!me(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}},Xn=()=>E(It.instances,i=>i._plugins.invalidate()),Pt=!0;Object.defineProperties(It,{defaults:{enumerable:Pt,value:O},instances:{enumerable:Pt,value:ui},overrides:{enumerable:Pt,value:vt},registry:{enumerable:Pt,value:ht},version:{enumerable:Pt,value:ml},getChart:{enumerable:Pt,value:So},register:{enumerable:Pt,value:(...i)=>{ht.add(...i),Xn()}},unregister:{enumerable:Pt,value:(...i)=>{ht.remove(...i),Xn()}}});function Po(i,t,e){let{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t,c=n/r;i.beginPath(),i.arc(o,a,r,s-c,e+c),l>n?(c=n/l,i.arc(o,a,l,e+c,s-c,!0)):i.arc(o,a,n,e+V,s-V),i.closePath(),i.clip()}function vl(i){return Je(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Ml(i,t,e,s){let n=vl(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{let c=(e-Math.min(o,l))*s/2;return Y(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Y(n.innerStart,0,a),innerEnd:Y(n.innerEnd,0,a)}}function Jt(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function Ms(i,t,e,s,n,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0,f=0,g=n-l;if(s){let P=h>0?h-s:0,j=d>0?d-s:0,N=(P+j)/2,Ot=N!==0?g*N/(N+s):g;f=(g-Ot)/2}let p=Math.max(.001,g*d-e/B)/d,m=(g-p)/2,b=l+m+f,_=n-m-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:M}=Ml(t,u,d,_-b),w=d-v,S=d-y,k=b+v/w,L=_-y/S,R=u+x,A=u+M,H=b+x/R,q=_-M/A;if(i.beginPath(),o){if(i.arc(a,r,d,k,L),y>0){let N=Jt(S,L,a,r);i.arc(N.x,N.y,y,L,_+V)}let P=Jt(A,_,a,r);if(i.lineTo(P.x,P.y),M>0){let N=Jt(A,q,a,r);i.arc(N.x,N.y,M,_+V,q+Math.PI)}if(i.arc(a,r,u,_-M/u,b+x/u,!0),x>0){let N=Jt(R,H,a,r);i.arc(N.x,N.y,x,H+Math.PI,b-V)}let j=Jt(w,b,a,r);if(i.lineTo(j.x,j.y),v>0){let N=Jt(w,k,a,r);i.arc(N.x,N.y,v,b-V,k)}}else{i.moveTo(a,r);let P=Math.cos(k)*d+a,j=Math.sin(k)*d+r;i.lineTo(P,j);let N=Math.cos(L)*d+a,Ot=Math.sin(L)*d+r;i.lineTo(N,Ot)}i.closePath()}function wl(i,t,e,s,n){let{fullCircles:o,startAngle:a,circumference:r}=t,l=t.endAngle;if(o){Ms(i,t,e,s,a+F,n);for(let c=0;c=F||Kt(o,r,l),p=lt(a,c+u,h+u);return g&&p}getCenterPoint(t){let{x:e,y:s,startAngle:n,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(a+r+c+l)/2;return{x:e+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:s}=this,n=(e.offset||0)/2,o=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>F?Math.floor(s/F):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(n){r=n/2;let c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*r,Math.sin(c)*r),this.circumference>=B&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;let l=wl(t,this,r,o,a);Sl(t,this,r,o,l,a),t.restore()}};ae.id="arc";ae.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};ae.defaultRoutes={backgroundColor:"backgroundColor"};function Co(i,t,e=t){i.lineCap=C(e.borderCapStyle,t.borderCapStyle),i.setLineDash(C(e.borderDash,t.borderDash)),i.lineDashOffset=C(e.borderDashOffset,t.borderDashOffset),i.lineJoin=C(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=C(e.borderWidth,t.borderWidth),i.strokeStyle=C(e.borderColor,t.borderColor)}function Pl(i,t,e){i.lineTo(e.x,e.y)}function Cl(i){return i.stepped?ln:i.tension||i.cubicInterpolationMode==="monotone"?cn:Pl}function Do(i,t,e={}){let s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),h=nr&&o>r;return{count:s,start:l,loop:t.loop,ilen:c(a+(c?r-y:y))%o,v=()=>{p!==m&&(i.lineTo(h,m),i.lineTo(h,p),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[_(u)],f.skip)continue;let y=f.x,x=f.y,M=y|0;M===g?(xm&&(m=x),h=(d*h+y)/++d):(v(),i.lineTo(y,x),g=M,d=0,p=m=x),b=x}v()}function ws(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Ol:Dl}function Al(i){return i.stepped?_n:i.tension||i.cubicInterpolationMode==="monotone"?xn:_t}function Tl(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),Co(i,t.options),i.stroke(n)}function Ll(i,t,e,s){let{segments:n,options:o}=t,a=ws(t);for(let r of n)Co(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}var Rl=typeof Path2D=="function";function El(i,t,e,s){Rl&&!t.options.segment?Tl(i,t,e,s):Ll(i,t,e,s)}var dt=class extends it{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let n=s.spanGaps?this._loop:this._fullLoop;pn(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=vn(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){let s=this.options,n=t[e],o=this.points,a=ss(this,{property:e,start:n,end:n});if(!a.length)return;let r=[],l=Al(s),c,h;for(c=0,h=a.length;ci!=="borderDash"&&i!=="fill"};function Un(i,t,e,s){let n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)=e)return i.slice(t,t+e);let a=[],r=(e-2)/(o-2),l=0,c=t+e-1,h=t,d,u,f,g,p;for(a[l++]=i[h],d=0;df&&(f=g,u=i[_],p=_);a[l++]=u,h=p}return a[l++]=i[c],a}function Hl(i,t,e,s){let n=0,o=0,a,r,l,c,h,d,u,f,g,p,m=[],b=t+e-1,_=i[t].x,y=i[b].x-_;for(a=t;ap&&(p=c,u=a),n=(o*n+r.x)/++o;else{let M=a-1;if(!T(d)&&!T(u)){let w=Math.min(d,u),S=Math.max(d,u);w!==f&&w!==M&&m.push({...i[w],x:n}),S!==f&&S!==M&&m.push({...i[S],x:n})}a>0&&M!==f&&m.push(i[M]),m.push(r),h=x,o=0,g=p=c,d=u=f=a}}return m}function Ao(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{value:t})}}function Kn(i){i.data.datasets.forEach(t=>{Ao(t)})}function jl(i,t){let e=t.length,s=0,n,{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Y(at(t,o.axis,a).lo,0,e-1)),c?n=Y(at(t,o.axis,r).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var $l={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Kn(i);return}let s=i.width;i.data.datasets.forEach((n,o)=>{let{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),c=a||n.data;if(Gt([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=jl(l,c),f=e.threshold||4*s;if(u<=f){Ao(n);return}T(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(e.algorithm){case"lttb":g=Nl(c,d,u,s,e);break;case"min-max":g=Hl(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=g})},destroy(i){Kn(i)}};function Yl(i,t,e){let s=i.segments,n=i.points,o=t.points,a=[];for(let r of s){let{start:l,end:c}=r;c=Ps(l,c,n);let h=ks(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}let d=ss(t,h);for(let u of d){let f=ks(e,o[u.start],o[u.end],u.loop),g=is(r,n,f);for(let p of g)a.push({source:p,target:u,start:{[e]:qn(h,f,"start",Math.max)},end:{[e]:qn(h,f,"end",Math.min)}})}}return a}function ks(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=G(n),o=G(o)),{property:i,start:n,end:o}}function Xl(i,t){let{x:e=null,y:s=null}=i||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Ps(a,r,n);let l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Ps(i,t,e){for(;t>i;t--){let s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function qn(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function To(i,t){let e=[],s=!1;return I(i)?(s=!0,e=i):e=Xl(i,t),e.length?new dt({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Gn(i){return i&&i.fill!==!1}function Ul(i,t,e){let n=i[t].fill,o=[t],a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!W(n))return n;if(a=i[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function Kl(i,t,e){let s=Jl(i);if(D(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return W(n)&&Math.floor(n)===n?ql(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function ql(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Gl(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:D(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Zl(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:D(i)?s=i.value:s=t.getBaseValue(),s}function Jl(i){let t=i.options,e=t.fill,s=C(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Ql(i){let{scale:t,index:e,line:s}=i,n=[],o=s.segments,a=s.points,r=tc(t,e);r.push(To({x:null,y:t.bottom},s));for(let l=0;l=0;--a){let r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&us(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let o=s[n].$filler;Gn(o)&&us(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){let s=t.meta.$filler;!Gn(s)||e.drawTime!=="beforeDatasetDraw"||us(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},to=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},dc=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,gi=class extends it{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=z(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let s=t.labels,n=$(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=to(s,o),c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,o,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r,d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{let m=s+e/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(t,e,s,n){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t,d=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{let _=s+e/2+o.measureText(m.text).width;b>0&&f+n+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[b]={left:g,top:f,col:p,width:_,height:n},u=Math.max(u,_),f+=n+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=Rt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=X(s,this.left+n,this.right-this.lineWidths[r]);for(let c of e)r!==c.row&&(r=c.row,l=X(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=X(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(let c of e)c.col!==r&&(r=c.col,l=X(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;_e(t,this),this._draw(),xe(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=O.color,l=Rt(t.rtl,this.left,this.width),c=$(a.font),{color:h,padding:d}=a,u=c.size,f=u/2,g;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:b}=to(a,u),_=function(w,S,k){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;n.save();let L=C(k.lineWidth,1);if(n.fillStyle=C(k.fillStyle,r),n.lineCap=C(k.lineCap,"butt"),n.lineDashOffset=C(k.lineDashOffset,0),n.lineJoin=C(k.lineJoin,"miter"),n.lineWidth=L,n.strokeStyle=C(k.strokeStyle,r),n.setLineDash(C(k.lineDash,[])),a.usePointStyle){let R={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:L},A=l.xPlus(w,p/2),H=S+f;Yi(n,R,A,H,a.pointStyleWidth&&p)}else{let R=S+Math.max((u-m)/2,0),A=l.leftForLtr(w,p),H=kt(k.borderRadius);n.beginPath(),Object.values(H).some(q=>q!==0)?qt(n,{x:A,y:R,w:p,h:m,radius:H}):n.rect(A,R,p,m),n.fill(),L!==0&&n.stroke()}n.restore()},v=function(w,S,k){wt(n,k.text,w,S+b/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},y=this.isHorizontal(),x=this._computeTitleHeight();y?g={x:X(o,this.left+d,this.right-s[0]),y:this.top+d+x,line:0}:g={x:this.left+d,y:X(o,this.top+x+d,this.bottom-e[0].height),line:0},ts(this.ctx,t.textDirection);let M=b+d;this.legendItems.forEach((w,S)=>{n.strokeStyle=w.fontColor||h,n.fillStyle=w.fontColor||h;let k=n.measureText(w.text).width,L=l.textAlign(w.textAlign||(w.textAlign=a.textAlign)),R=p+f+k,A=g.x,H=g.y;l.setWidth(this.width),y?S>0&&A+R+d>this.right&&(H=g.y+=M,g.line++,A=g.x=X(o,this.left+d,this.right-s[g.line])):S>0&&H+M>this.bottom&&(A=g.x=A+e[g.line].width+d,g.line++,H=g.y=X(o,this.top+x+d,this.bottom-e[g.line].height));let q=l.x(A);_(q,H,w),A=tn(L,A+p+f,y?A+R:this.right,t.rtl),v(l.x(A),H,w),y?g.x+=R+d:g.y+=M}),es(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,s=$(e.font),n=U(e.padding);if(!e.display)return;let o=Rt(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=X(t.align,d,this.right-u);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+X(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}let f=X(r,d,d+u);a.textAlign=o.textAlign(qe(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,wt(a,e.text,f,h,s)}_computeTitleHeight(){let t=this.options.title,e=$(t.font),s=U(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(lt(t,this.left,this.right)&<(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;si.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o}}=i.legend.options;return i._getSortedDatasetMetas().map(a=>{let r=a.controller.getStyle(e?0:void 0),l=U(r.borderWidth);return{text:t[a.index].label,fillStyle:r.backgroundColor,fontColor:o,hidden:!a.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:r.borderColor,pointStyle:s||r.pointStyle,rotation:r.rotation,textAlign:n||r.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},Ae=class extends it{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let n=I(s.text)?s.text.length:1;this._padding=U(s.padding);let o=n*$(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=X(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=X(r,n,e),l=B*-.5):(h=o-t,d=X(r,e,n),l=B*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let s=$(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);wt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:qe(e.align),textBaseline:"middle",translation:[a,r]})}};function gc(i,t){let e=new Ae({ctx:i.ctx,options:t,chart:i});K.configure(i,e,t),K.addBox(i,e),i.titleBlock=e}var pc={id:"title",_element:Ae,start(i,t,e){gc(i,e)},stop(i){let t=i.titleBlock;K.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let s=i.titleBlock;K.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},oi=new WeakMap,mc={id:"subtitle",start(i,t,e){let s=new Ae({ctx:i.ctx,options:e,chart:i});K.configure(i,s,e),K.addBox(i,s),oi.set(i,s)},stop(i){K.removeBox(i,oi.get(i)),oi.delete(i)},beforeUpdate(i,t,e){let s=oi.get(i);K.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Pe={average(i){if(!i.length)return!1;let t,e,s=0,n=0,o=0;for(t=0,e=i.length;t-1?i.split(` -`):i}function bc(i,t){let{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function eo(i,t){let e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=$(t.bodyFont),c=$(t.titleFont),h=$(t.footerFont),d=o.length,u=n.length,f=s.length,g=U(t.padding),p=g.height,m=0,b=s.reduce((y,x)=>y+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){let y=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*y+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(p+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0,v=function(y){m=Math.max(m,e.measureText(y).width+_)};return e.save(),e.font=c.string,E(i.title,v),e.font=l.string,E(i.beforeBody.concat(i.afterBody),v),_=t.displayColors?a+2+t.boxPadding:0,E(s,y=>{E(y.before,v),E(y.lines,v),E(y.after,v)}),_=0,e.font=h.string,E(i.footer,v),e.restore(),m+=g.width,{width:m,height:p}}function _c(i,t){let{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function xc(i,t,e,s){let{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function yc(i,t,e,s){let{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i,c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),xc(c,i,t,e)&&(c="center"),c}function io(i,t,e){let s=e.yAlign||t.yAlign||_c(i,e);return{xAlign:e.xAlign||t.xAlign||yc(i,t,e,s),yAlign:s}}function vc(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function Mc(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function so(i,t,e,s){let{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=St(a),g=vc(t,r),p=Mc(t,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(h,u)+n:r==="right"&&(g+=Math.max(d,f)+n),{x:Y(g,0,s.width-t.width),y:Y(p,0,s.height-t.height)}}function ri(i,t,e){let s=U(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function no(i){return ct([],bt(i))}function wc(i,t,e){return pt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function oo(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}var Le=class extends it{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new hi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wc(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:s}=e,n=s.beforeTitle.apply(this,[t]),o=s.title.apply(this,[t]),a=s.afterTitle.apply(this,[t]),r=[];return r=ct(r,bt(n)),r=ct(r,bt(o)),r=ct(r,bt(a)),r}getBeforeBody(t,e){return no(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){let{callbacks:s}=e,n=[];return E(t,o=>{let a={before:[],lines:[],after:[]},r=oo(s,o);ct(a.before,bt(r.beforeLabel.call(this,o))),ct(a.lines,r.label.call(this,o)),ct(a.after,bt(r.afterLabel.call(this,o))),n.push(a)}),n}getAfterBody(t,e){return no(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){let{callbacks:s}=e,n=s.beforeFooter.apply(this,[t]),o=s.footer.apply(this,[t]),a=s.afterFooter.apply(this,[t]),r=[];return r=ct(r,bt(n)),r=ct(r,bt(o)),r=ct(r,bt(a)),r}_createItems(t){let e=this._active,s=this.chart.data,n=[],o=[],a=[],r=[],l,c;for(l=0,c=e.length;lt.filter(h,d,u,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),E(r,h=>{let d=oo(t.callbacks,h);n.push(d.labelColor.call(this,h)),o.push(d.labelPointStyle.call(this,h)),a.push(d.labelTextColor.call(this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){let s=this.options.setContext(this.getContext()),n=this._active,o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{let r=Ce[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);let l=this._size=eo(this,s),c=Object.assign({},r,l),h=io(this.chart,s,c),d=so(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){let o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){let{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=St(r),{x:u,y:f}=t,{width:g,height:p}=e,m,b,_,v,y,x;return o==="center"?(y=f+p/2,n==="left"?(m=u,b=m-a,v=y+a,x=y-a):(m=u+g,b=m+a,v=y-a,x=y+a),_=m):(n==="left"?b=u+Math.max(l,h)+a:n==="right"?b=u+g-Math.max(c,d)-a:b=this.caretX,o==="top"?(v=f,y=v-a,m=b-a,_=b+a):(v=f+p,y=v+a,m=b+a,_=b-a),x=v),{x1:m,x2:b,x3:_,y1:v,y2:y,y3:x}}drawTitle(t,e,s){let n=this.title,o=n.length,a,r,l;if(o){let c=Et(s.rtl,this.x,this.width);for(t.x=ri(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=$(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;lv!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Gt(t,{x:m,y:p,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Gt(t,{x:b,y:p+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(b,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){let{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=$(s.bodyFont),u=d.lineHeight,f=0,g=Et(s.rtl,this.x,this.width),p=function(S){e.fillText(S,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a),b,_,v,y,x,M,w;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=ri(this,m,s),e.fillStyle=s.bodyColor,E(this.beforeBody,p),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,y=0,M=n.length;y0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){let a=Ce[t.position].call(this,this._active,this._eventPosition);if(!a)return;let r=this._size=eo(this,t),l=Object.assign({},a,this._size),c=io(e,t,l),h=so(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let a=U(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),ts(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),es(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let s=this._active,n=t.map(({datasetIndex:r,index:l})=>{let c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!be(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!be(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){let o=this.options;if(t.type==="mouseout")return[];if(!n)return e;let a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:s,caretY:n,options:o}=this,a=Ce[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}};Le.positioners=Ce;var kc={id:"tooltip",_element:Le,positioners:Ce,afterInit(i,t,e){e&&(i.tooltip=new Le({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:rt,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndexi!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Sc=Object.freeze({__proto__:null,Decimation:$l,Filler:hc,Legend:fc,SubTitle:mc,Title:pc,Tooltip:kc}),Pc=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Cc(i,t,e,s){let n=i.indexOf(t);if(n===-1)return Pc(i,t,e,s);let o=i.lastIndexOf(t);return n!==o?e:n}var Dc=(i,t)=>i===null?null:Y(Math.round(i),0,t),he=class extends _t{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let s=this.getLabels();for(let{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(T(t))return null;let s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:Cc(s,t,C(e,t),this._addedLabels),Dc(e,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){let t=this.min,e=this.max,s=this.options.offset,n=[],o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){let e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};he.id="category";he.defaults={ticks:{callback:he.prototype.getLabelForValue}};function Oc(i,t){let e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,g=h-1,{min:p,max:m}=t,b=!T(a),_=!T(r),v=!T(c),y=(m-p)/(d+1),x=Ai((m-p)/g/f)*f,M,w,S,k;if(x<1e-14&&!b&&!_)return[{value:p},{value:m}];k=Math.ceil(m/x)-Math.floor(p/x),k>g&&(x=Ai(k*x/g/f)*f),T(l)||(M=Math.pow(10,l),x=Math.ceil(x*M)/M),n==="ticks"?(w=Math.floor(p/x)*x,S=Math.ceil(m/x)*x):(w=p,S=m),b&&_&&o&&Us((r-a)/o,x/1e3)?(k=Math.round(Math.min((r-a)/x,h)),x=(r-a)/k,w=a,S=r):v?(w=b?a:w,S=_?r:S,k=c-1,x=(S-w)/k):(k=(S-w)/x,Kt(k,Math.round(k),x/1e3)?k=Math.round(k):k=Math.ceil(k));let L=Math.max(Li(x),Li(w));M=Math.pow(10,T(l)?L:l),w=Math.round(w*M)/M,S=Math.round(S*M)/M;let R=0;for(b&&(u&&w!==a?(e.push({value:a}),wn=e?n:l,r=l=>o=s?o:l;if(t){let l=ot(n),c=ot(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,s=this.getTickLimit();s=Math.max(2,s);let n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=Oc(n,o);return t.bounds==="ticks"&&Ti(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let t=this.ticks,e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){let n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Jt(t,this.chart.options.locale,this.options.ticks.format)}},Re=class extends de{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,s=nt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};Re.id="linear";Re.defaults={ticks:{callback:mi.formatters.numeric}};function ro(i){return i/Math.pow(10,Math.floor(tt(i)))===1}function Ac(i,t){let e=Math.floor(tt(t.max)),s=Math.ceil(t.max/Math.pow(10,e)),n=[],o=Q(i.min,Math.pow(10,Math.floor(tt(t.min)))),a=Math.floor(tt(o)),r=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do n.push({value:o,major:ro(o)}),++r,r===10&&(r=1,++a,l=a>=0?1:l),o=Math.round(r*Math.pow(10,a)*l)/l;while(a0?s:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?Math.max(0,t):null,this.max=W(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),s=this.min,n=this.max,o=l=>s=t?s:l,a=l=>n=e?n:l,r=(l,c)=>Math.pow(10,Math.floor(tt(l))+c);s===n&&(s<=0?(o(1),a(10)):(o(r(s,-1)),a(r(n,1)))),s<=0&&o(r(n,-1)),n<=0&&a(r(s,1)),this._zero&&this.min!==this._suggestedMin&&s===r(this.min,0)&&o(r(s,-1)),this.min=s,this.max=n}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},s=Ac(e,this);return t.bounds==="ticks"&&Ti(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":Jt(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=tt(t),this._valueRange=tt(this.max)-tt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(tt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};Ee.id="logarithmic";Ee.defaults={ticks:{callback:mi.formatters.logarithmic,major:{enabled:!0}}};function Ss(i){let t=i.ticks;if(t.display&&i.display){let e=U(t.backdropPadding);return C(t.font&&t.font.size,O.font.size)+e.height}return 0}function Tc(i,t,e){return e=I(e)?e:[e],{w:rn(i,t.string,e),h:e.length*t.lineHeight}}function lo(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function Lc(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?B/o:0;for(let l=0;lt.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.startt.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function Ec(i,t,e){let s=[],n=i._pointLabels.length,o=i.options,a=Ss(o)/2,r=i.drawingArea,l=o.pointLabels.centerPointLabels?B/n:0;for(let c=0;c270||e<90)&&(i-=t),i}function Bc(i,t){let{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){let o=s.setContext(i.getPointLabelContext(n)),a=$(o.font),{x:r,y:l,textAlign:c,left:h,top:d,right:u,bottom:f}=i._pointLabelItems[n],{backdropColor:g}=o;if(!T(g)){let p=St(o.borderRadius),m=U(o.backdropPadding);e.fillStyle=g;let b=h-m.left,_=d-m.top,v=u-h+m.width,y=f-d+m.height;Object.values(p).some(x=>x!==0)?(e.beginPath(),Gt(e,{x:b,y:_,w:v,h:y,radius:p}),e.fill()):e.fillRect(b,_,v,y)}kt(e,i._pointLabels[n],r,l+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function Lo(i,t,e,s){let{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,F);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a{let n=z(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){let t=this.options;t.display&&t.pointLabels.display?Lc(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){let e=F/(this._pointLabels.length||1),s=this.options.startAngle||0;return G(t*e+nt(s))}getDistanceFromCenterForValue(t){if(T(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(T(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t{if(h!==0){r=this.getDistanceFromCenterForValue(c.value);let d=n.setContext(this.getContext(h-1));Vc(this,d,r,o)}}),s.display){for(t.save(),a=o-1;a>=0;a--){let c=s.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:d}=c;!d||!h||(t.lineWidth=d,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;let n=this.getIndexAngle(0),o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;let c=s.setContext(this.getContext(l)),h=$(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;let d=U(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}kt(t,r.label,0,-o,h,{color:c.color})}),t.restore()}drawTitle(){}};zt.id="radialLinear";zt.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:mi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}};zt.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};zt.descriptors={angleLines:{_fallback:"grid"}};var bi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Z=Object.keys(bi);function Nc(i,t){return i-t}function co(i,t){if(T(t))return null;let e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts,a=t;return typeof s=="function"&&(a=s(a)),W(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(Rt(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function ho(i,t,e,s){let n=Z.length;for(let o=Z.indexOf(i);o=Z.indexOf(e);o--){let a=Z[o];if(bi[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return Z[e?Z.indexOf(e):0]}function jc(i){for(let t=Z.indexOf(i)+1,e=Z.length;t=t?e[s]:e[n];i[o]=!0}}function $c(i,t,e,s){let n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value,r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function fo(i,t,e){let s=[],n={},o=t.length,a,r;for(a=0;a+t.value))}initOffsets(t){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;e=Y(e,0,a),s=Y(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){let t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||ho(o.minUnit,e,s,this._getLabelCapacity(e)),r=C(o.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Rt(l)||l===!0,h={},d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);let g=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;up-m).map(p=>+p)}getLabelForValue(t){let e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}_tickFormatFunction(t,e,s,n){let o=this.options,a=o.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&a[r],h=l&&a[l],d=s[e],u=l&&h&&d&&d.major,f=this._adapter.format(t,n||(u?h:c)),g=o.ticks.callback;return g?z(g,[f,e,s],this):f}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=at(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=at(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);let c=a-o;return c?r+(l-r)*(t-o)/c:r}var Fe=class extends Bt{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=li(e,this.min),this._tableRange=li(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:s}=this,n=[],o=[],a,r,l,c,h;for(a=0,r=t.length;a=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a{Alpine.store("theme");let s=this.getChart();s&&s.destroy(),this.initChart()}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Alpine.store("theme")==="system"&&this.$nextTick(()=>{let s=this.getChart();s&&s.destroy(),this.initChart()})})},initChart:function(){if(!(!this.$refs.canvas||!this.$refs.backgroundColorElement||!this.$refs.borderColorElement))return new Cs(this.$refs.canvas,{type:"line",data:{labels:t,datasets:[{data:e,borderWidth:2,fill:"start",tension:.5,backgroundColor:getComputedStyle(this.$refs.backgroundColorElement).color,borderColor:getComputedStyle(this.$refs.borderColorElement).color}]},options:{animation:{duration:0},elements:{point:{radius:0}},maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{x:{display:!1},y:{display:!1}},tooltips:{enabled:!1}}})},getChart:function(){return this.$refs.canvas?Cs.getChart(this.$refs.canvas):null}}}export{Xc as default}; +`):i}function bc(i,t){let{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function eo(i,t){let e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=$(t.bodyFont),c=$(t.titleFont),h=$(t.footerFont),d=o.length,u=n.length,f=s.length,g=U(t.padding),p=g.height,m=0,b=s.reduce((y,x)=>y+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){let y=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*y+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(p+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0,v=function(y){m=Math.max(m,e.measureText(y).width+_)};return e.save(),e.font=c.string,E(i.title,v),e.font=l.string,E(i.beforeBody.concat(i.afterBody),v),_=t.displayColors?a+2+t.boxPadding:0,E(s,y=>{E(y.before,v),E(y.lines,v),E(y.after,v)}),_=0,e.font=h.string,E(i.footer,v),e.restore(),m+=g.width,{width:m,height:p}}function _c(i,t){let{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function xc(i,t,e,s){let{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function yc(i,t,e,s){let{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i,c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),xc(c,i,t,e)&&(c="center"),c}function io(i,t,e){let s=e.yAlign||t.yAlign||_c(i,e);return{xAlign:e.xAlign||t.xAlign||yc(i,t,e,s),yAlign:s}}function vc(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function Mc(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function so(i,t,e,s){let{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=kt(a),g=vc(t,r),p=Mc(t,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(h,u)+n:r==="right"&&(g+=Math.max(d,f)+n),{x:Y(g,0,s.width-t.width),y:Y(p,0,s.height-t.height)}}function ai(i,t,e){let s=U(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function no(i){return ct([],bt(i))}function wc(i,t,e){return pt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function oo(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}var Te=class extends it{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new ci(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wc(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:s}=e,n=s.beforeTitle.apply(this,[t]),o=s.title.apply(this,[t]),a=s.afterTitle.apply(this,[t]),r=[];return r=ct(r,bt(n)),r=ct(r,bt(o)),r=ct(r,bt(a)),r}getBeforeBody(t,e){return no(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){let{callbacks:s}=e,n=[];return E(t,o=>{let a={before:[],lines:[],after:[]},r=oo(s,o);ct(a.before,bt(r.beforeLabel.call(this,o))),ct(a.lines,r.label.call(this,o)),ct(a.after,bt(r.afterLabel.call(this,o))),n.push(a)}),n}getAfterBody(t,e){return no(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){let{callbacks:s}=e,n=s.beforeFooter.apply(this,[t]),o=s.footer.apply(this,[t]),a=s.afterFooter.apply(this,[t]),r=[];return r=ct(r,bt(n)),r=ct(r,bt(o)),r=ct(r,bt(a)),r}_createItems(t){let e=this._active,s=this.chart.data,n=[],o=[],a=[],r=[],l,c;for(l=0,c=e.length;lt.filter(h,d,u,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),E(r,h=>{let d=oo(t.callbacks,h);n.push(d.labelColor.call(this,h)),o.push(d.labelPointStyle.call(this,h)),a.push(d.labelTextColor.call(this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){let s=this.options.setContext(this.getContext()),n=this._active,o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{let r=Pe[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);let l=this._size=eo(this,s),c=Object.assign({},r,l),h=io(this.chart,s,c),d=so(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){let o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){let{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=kt(r),{x:u,y:f}=t,{width:g,height:p}=e,m,b,_,v,y,x;return o==="center"?(y=f+p/2,n==="left"?(m=u,b=m-a,v=y+a,x=y-a):(m=u+g,b=m+a,v=y-a,x=y+a),_=m):(n==="left"?b=u+Math.max(l,h)+a:n==="right"?b=u+g-Math.max(c,d)-a:b=this.caretX,o==="top"?(v=f,y=v-a,m=b-a,_=b+a):(v=f+p,y=v+a,m=b+a,_=b-a),x=v),{x1:m,x2:b,x3:_,y1:v,y2:y,y3:x}}drawTitle(t,e,s){let n=this.title,o=n.length,a,r,l;if(o){let c=Rt(s.rtl,this.x,this.width);for(t.x=ai(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=$(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;lv!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,qt(t,{x:m,y:p,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),qt(t,{x:b,y:p+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(b,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){let{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=$(s.bodyFont),u=d.lineHeight,f=0,g=Rt(s.rtl,this.x,this.width),p=function(S){e.fillText(S,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a),b,_,v,y,x,M,w;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=ai(this,m,s),e.fillStyle=s.bodyColor,E(this.beforeBody,p),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,y=0,M=n.length;y0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){let a=Pe[t.position].call(this,this._active,this._eventPosition);if(!a)return;let r=this._size=eo(this,t),l=Object.assign({},a,this._size),c=io(e,t,l),h=so(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let a=U(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),ts(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),es(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let s=this._active,n=t.map(({datasetIndex:r,index:l})=>{let c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!me(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!me(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){let o=this.options;if(t.type==="mouseout")return[];if(!n)return e;let a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:s,caretY:n,options:o}=this,a=Pe[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}};Te.positioners=Pe;var kc={id:"tooltip",_element:Te,positioners:Pe,afterInit(i,t,e){e&&(i.tooltip=new Te({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:rt,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndexi!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Sc=Object.freeze({__proto__:null,Decimation:$l,Filler:hc,Legend:fc,SubTitle:mc,Title:pc,Tooltip:kc}),Pc=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Cc(i,t,e,s){let n=i.indexOf(t);if(n===-1)return Pc(i,t,e,s);let o=i.lastIndexOf(t);return n!==o?e:n}var Dc=(i,t)=>i===null?null:Y(Math.round(i),0,t),ce=class extends Ft{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let s=this.getLabels();for(let{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(T(t))return null;let s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:Cc(s,t,C(e,t),this._addedLabels),Dc(e,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){let t=this.min,e=this.max,s=this.options.offset,n=[],o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){let e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};ce.id="category";ce.defaults={ticks:{callback:ce.prototype.getLabelForValue}};function Oc(i,t){let e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,g=h-1,{min:p,max:m}=t,b=!T(a),_=!T(r),v=!T(c),y=(m-p)/(d+1),x=Ai((m-p)/g/f)*f,M,w,S,k;if(x<1e-14&&!b&&!_)return[{value:p},{value:m}];k=Math.ceil(m/x)-Math.floor(p/x),k>g&&(x=Ai(k*x/g/f)*f),T(l)||(M=Math.pow(10,l),x=Math.ceil(x*M)/M),n==="ticks"?(w=Math.floor(p/x)*x,S=Math.ceil(m/x)*x):(w=p,S=m),b&&_&&o&&Us((r-a)/o,x/1e3)?(k=Math.round(Math.min((r-a)/x,h)),x=(r-a)/k,w=a,S=r):v?(w=b?a:w,S=_?r:S,k=c-1,x=(S-w)/k):(k=(S-w)/x,Ut(k,Math.round(k),x/1e3)?k=Math.round(k):k=Math.ceil(k));let L=Math.max(Li(x),Li(w));M=Math.pow(10,T(l)?L:l),w=Math.round(w*M)/M,S=Math.round(S*M)/M;let R=0;for(b&&(u&&w!==a?(e.push({value:a}),wn=e?n:l,r=l=>o=s?o:l;if(t){let l=ot(n),c=ot(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,s=this.getTickLimit();s=Math.max(2,s);let n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=Oc(n,o);return t.bounds==="ticks"&&Ti(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let t=this.ticks,e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){let n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Zt(t,this.chart.options.locale,this.options.ticks.format)}},Le=class extends he{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,s=nt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};Le.id="linear";Le.defaults={ticks:{callback:pi.formatters.numeric}};function ro(i){return i/Math.pow(10,Math.floor(tt(i)))===1}function Ac(i,t){let e=Math.floor(tt(t.max)),s=Math.ceil(t.max/Math.pow(10,e)),n=[],o=Q(i.min,Math.pow(10,Math.floor(tt(t.min)))),a=Math.floor(tt(o)),r=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do n.push({value:o,major:ro(o)}),++r,r===10&&(r=1,++a,l=a>=0?1:l),o=Math.round(r*Math.pow(10,a)*l)/l;while(a0?s:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?Math.max(0,t):null,this.max=W(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),s=this.min,n=this.max,o=l=>s=t?s:l,a=l=>n=e?n:l,r=(l,c)=>Math.pow(10,Math.floor(tt(l))+c);s===n&&(s<=0?(o(1),a(10)):(o(r(s,-1)),a(r(n,1)))),s<=0&&o(r(n,-1)),n<=0&&a(r(s,1)),this._zero&&this.min!==this._suggestedMin&&s===r(this.min,0)&&o(r(s,-1)),this.min=s,this.max=n}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},s=Ac(e,this);return t.bounds==="ticks"&&Ti(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":Zt(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=tt(t),this._valueRange=tt(this.max)-tt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(tt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};Re.id="logarithmic";Re.defaults={ticks:{callback:pi.formatters.logarithmic,major:{enabled:!0}}};function Ss(i){let t=i.ticks;if(t.display&&i.display){let e=U(t.backdropPadding);return C(t.font&&t.font.size,O.font.size)+e.height}return 0}function Tc(i,t,e){return e=I(e)?e:[e],{w:rn(i,t.string,e),h:e.length*t.lineHeight}}function lo(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function Lc(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?B/o:0;for(let l=0;lt.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.startt.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function Ec(i,t,e){let s=[],n=i._pointLabels.length,o=i.options,a=Ss(o)/2,r=i.drawingArea,l=o.pointLabels.centerPointLabels?B/n:0;for(let c=0;c270||e<90)&&(i-=t),i}function Bc(i,t){let{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){let o=s.setContext(i.getPointLabelContext(n)),a=$(o.font),{x:r,y:l,textAlign:c,left:h,top:d,right:u,bottom:f}=i._pointLabelItems[n],{backdropColor:g}=o;if(!T(g)){let p=kt(o.borderRadius),m=U(o.backdropPadding);e.fillStyle=g;let b=h-m.left,_=d-m.top,v=u-h+m.width,y=f-d+m.height;Object.values(p).some(x=>x!==0)?(e.beginPath(),qt(e,{x:b,y:_,w:v,h:y,radius:p}),e.fill()):e.fillRect(b,_,v,y)}wt(e,i._pointLabels[n],r,l+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function Lo(i,t,e,s){let{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,F);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a{let n=z(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){let t=this.options;t.display&&t.pointLabels.display?Lc(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){let e=F/(this._pointLabels.length||1),s=this.options.startAngle||0;return G(t*e+nt(s))}getDistanceFromCenterForValue(t){if(T(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(T(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t{if(h!==0){r=this.getDistanceFromCenterForValue(c.value);let d=n.setContext(this.getContext(h-1));Vc(this,d,r,o)}}),s.display){for(t.save(),a=o-1;a>=0;a--){let c=s.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:d}=c;!d||!h||(t.lineWidth=d,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;let n=this.getIndexAngle(0),o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;let c=s.setContext(this.getContext(l)),h=$(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;let d=U(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}wt(t,r.label,0,-o,h,{color:c.color})}),t.restore()}drawTitle(){}};zt.id="radialLinear";zt.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:pi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}};zt.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};zt.descriptors={angleLines:{_fallback:"grid"}};var mi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Z=Object.keys(mi);function Nc(i,t){return i-t}function co(i,t){if(T(t))return null;let e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts,a=t;return typeof s=="function"&&(a=s(a)),W(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(Lt(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function ho(i,t,e,s){let n=Z.length;for(let o=Z.indexOf(i);o=Z.indexOf(e);o--){let a=Z[o];if(mi[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return Z[e?Z.indexOf(e):0]}function jc(i){for(let t=Z.indexOf(i)+1,e=Z.length;t=t?e[s]:e[n];i[o]=!0}}function $c(i,t,e,s){let n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value,r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function fo(i,t,e){let s=[],n={},o=t.length,a,r;for(a=0;a+t.value))}initOffsets(t){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;e=Y(e,0,a),s=Y(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){let t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||ho(o.minUnit,e,s,this._getLabelCapacity(e)),r=C(o.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Lt(l)||l===!0,h={},d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);let g=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;up-m).map(p=>+p)}getLabelForValue(t){let e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}_tickFormatFunction(t,e,s,n){let o=this.options,a=o.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&a[r],h=l&&a[l],d=s[e],u=l&&h&&d&&d.major,f=this._adapter.format(t,n||(u?h:c)),g=o.ticks.callback;return g?z(g,[f,e,s],this):f}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=at(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=at(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);let c=a-o;return c?r+(l-r)*(t-o)/c:r}var Ee=class extends Bt{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ri(e,this.min),this._tableRange=ri(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:s}=this,n=[],o=[],a,r,l,c,h;for(a=0,r=t.length;a=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a{Alpine.store("theme");let s=this.getChart();s&&s.destroy(),this.initChart()}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Alpine.store("theme")==="system"&&this.$nextTick(()=>{let s=this.getChart();s&&s.destroy(),this.initChart()})})},initChart:function(){if(!(!this.$refs.canvas||!this.$refs.backgroundColorElement||!this.$refs.borderColorElement))return new Cs(this.$refs.canvas,{type:"line",data:{labels:t,datasets:[{data:e,borderWidth:2,fill:"start",tension:.5,backgroundColor:getComputedStyle(this.$refs.backgroundColorElement).color,borderColor:getComputedStyle(this.$refs.borderColorElement).color}]},options:{animation:{duration:0},elements:{point:{radius:0}},maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{x:{display:!1},y:{display:!1}},tooltips:{enabled:!1}}})},getChart:function(){return this.$refs.canvas?Cs.getChart(this.$refs.canvas):null}}}export{Xc as default}; /*! Bundled license information: chart.js/dist/chunks/helpers.segment.mjs: diff --git a/resources/css/app.css b/resources/css/app.css index 510ff1d53..197ad6727 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -2,3 +2,7 @@ @tailwind components; @tailwind utilities; @tailwind variants; + +.fi-section-header-icon { + @apply !self-center; +} diff --git a/resources/views/errors/400.blade.php b/resources/views/errors/400.blade.php new file mode 100644 index 000000000..4d8dd2876 --- /dev/null +++ b/resources/views/errors/400.blade.php @@ -0,0 +1,8 @@ +@props([ +'code' => '400', +'title' => 'Bad request', +'subtitle' => $exception->getMessage(), +'icon' => 'tabler-exclamation-circle' +]) + +@extends('errors::layout') \ No newline at end of file diff --git a/resources/views/filament/admin/widgets/canary-widget.blade.php b/resources/views/filament/admin/widgets/canary-widget.blade.php new file mode 100644 index 000000000..d05fc589c --- /dev/null +++ b/resources/views/filament/admin/widgets/canary-widget.blade.php @@ -0,0 +1,19 @@ + + + {{ trans('admin/dashboard.sections.intro-developers.heading') }} + +

{{ trans('admin/dashboard.sections.intro-developers.content') }}

+ +


+ +

{{ trans('admin/dashboard.sections.intro-developers.extra_note') }}

+
+
diff --git a/resources/views/filament/admin/widgets/help-widget.blade.php b/resources/views/filament/admin/widgets/help-widget.blade.php new file mode 100644 index 000000000..3b33b0b7d --- /dev/null +++ b/resources/views/filament/admin/widgets/help-widget.blade.php @@ -0,0 +1,14 @@ + + + {{ trans('admin/dashboard.sections.intro-help.heading') }} + +

{{ trans('admin/dashboard.sections.intro-help.content') }}

+
+
diff --git a/resources/views/filament/admin/widgets/no-nodes-widget.blade.php b/resources/views/filament/admin/widgets/no-nodes-widget.blade.php new file mode 100644 index 000000000..47904b891 --- /dev/null +++ b/resources/views/filament/admin/widgets/no-nodes-widget.blade.php @@ -0,0 +1,14 @@ + + + {{ trans('admin/dashboard.sections.intro-first-node.heading') }} + +

{{ trans('admin/dashboard.sections.intro-first-node.content') }}

+
+
diff --git a/resources/views/filament/admin/widgets/support-widget.blade.php b/resources/views/filament/admin/widgets/support-widget.blade.php new file mode 100644 index 000000000..a45f0849c --- /dev/null +++ b/resources/views/filament/admin/widgets/support-widget.blade.php @@ -0,0 +1,18 @@ + + + {{ trans('admin/dashboard.sections.intro-support.heading') }} + +

{{ trans('admin/dashboard.sections.intro-support.content') }}

+ +


+ +

{{ trans('admin/dashboard.sections.intro-support.extra_note') }}

+
+
diff --git a/resources/views/filament/admin/widgets/update-widget.blade.php b/resources/views/filament/admin/widgets/update-widget.blade.php new file mode 100644 index 000000000..9dd757514 --- /dev/null +++ b/resources/views/filament/admin/widgets/update-widget.blade.php @@ -0,0 +1,25 @@ + + @if (!$isLatest) + + {{ trans('admin/dashboard.sections.intro-update-available.heading') }} + +

{{ trans('admin/dashboard.sections.intro-update-available.content', ['latestVersion' => $latestVersion]) }}

+ +
+ @else + + {{ trans('admin/dashboard.sections.intro-no-update.heading') }} + +

{{ trans('admin/dashboard.sections.intro-no-update.content', ['version' => $version]) }}

+
+ @endif +
diff --git a/resources/views/filament/components/server-console.blade.php b/resources/views/filament/components/server-console.blade.php index 933c8899e..366f814c7 100644 --- a/resources/views/filament/components/server-console.blade.php +++ b/resources/views/filament/components/server-console.blade.php @@ -1,11 +1,25 @@ @assets - + @php + $userFont = auth()->user()->getCustomization()['console_font'] ?? 'monospace'; + $userFontSize = auth()->user()->getCustomization()['console_font_size'] ?? 14; + $userRows = auth()->user()->getCustomization()['console_rows'] ?? 30; + @endphp + @if($userFont) + + + @endif + @endassets @@ -18,6 +32,7 @@ icon="tabler-chevrons-right" /> + class="grid grid-flow-row w-full p-3 rounded-lg bg-white shadow-sm overflow-hidden ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10"> {{ $getLabel() }} diff --git a/resources/views/filament/pages/dashboard.blade.php b/resources/views/filament/pages/dashboard.blade.php deleted file mode 100644 index 3fd691793..000000000 --- a/resources/views/filament/pages/dashboard.blade.php +++ /dev/null @@ -1,105 +0,0 @@ - - - -

{{ trans('admin/dashboard.expand_sections') }}

- - @if (!$isLatest) - - {{ trans('admin/dashboard.sections.intro-update-available.heading') }} - -

{{ trans('admin/dashboard.sections.intro-update-available.content', ['latestVersion' => $latestVersion]) }}

- -
- @else - - {{ trans('admin/dashboard.sections.intro-no-update.heading') }} - -

{{ trans('admin/dashboard.sections.intro-no-update.content', ['version' => $version]) }}

-
- @endif - - - @if ($inDevelopment) - - {{ trans('admin/dashboard.sections.intro-developers.heading') }} - -

{{ trans('admin/dashboard.sections.intro-developers.content') }}

- -


- -

{{ trans('admin/dashboard.sections.intro-developers.extra_note') }}

- -
- @endif - - {{-- No Nodes Created --}} - @if ($nodesCount <= 0) - - {{ trans('admin/dashboard.sections.intro-first-node.heading') }} - -

{{ trans('admin/dashboard.sections.intro-first-node.content') }}

- -
- @endif - - {{-- No Nodes Active --}} - - - {{ trans('admin/dashboard.sections.intro-support.heading') }} - -

{{ trans('admin/dashboard.sections.intro-support.content') }}

- -


- -

{{ trans('admin/dashboard.sections.intro-support.extra_note') }}

- -
- - - {{ trans('admin/dashboard.sections.intro-help.heading') }} -

{{ trans('admin/dashboard.sections.intro-help.content') }}

-
-
diff --git a/resources/views/filament/plugins/monaco-editor-logs.blade.php b/resources/views/filament/plugins/monaco-editor-logs.blade.php new file mode 100644 index 000000000..cb5766359 --- /dev/null +++ b/resources/views/filament/plugins/monaco-editor-logs.blade.php @@ -0,0 +1,184 @@ +@script + +@endscript + + + +
+
+ @if($getShowFullScreenToggle()) + + @endif +
+
+ +
+
+
+
+
+ + diff --git a/resources/views/filament/plugins/monaco-editor.blade.php b/resources/views/filament/plugins/monaco-editor.blade.php index 919082593..6332840f4 100644 --- a/resources/views/filament/plugins/monaco-editor.blade.php +++ b/resources/views/filament/plugins/monaco-editor.blade.php @@ -119,8 +119,8 @@ }, wordWrap: 'on', WrappingIndent: 'same', - }); + $el.style.zIndex = '1'; monacoEditor(document.getElementById(monacoId).editor); document.getElementById(monacoId).addEventListener('monaco-editor-focused', (event) => { document.getElementById(monacoId).editor.focus(); diff --git a/resources/views/filament/server/pages/console.blade.php b/resources/views/filament/server/pages/console.blade.php index 2deb74c68..7e3f6250c 100644 --- a/resources/views/filament/server/pages/console.blade.php +++ b/resources/views/filament/server/pages/console.blade.php @@ -4,4 +4,7 @@ :data="$this->getWidgetData()" :widgets="$this->getVisibleWidgets()" /> + + + diff --git a/resources/views/livewire/alerts/alert-banner-container.blade.php b/resources/views/livewire/alerts/alert-banner-container.blade.php index b8a8402d5..3d1f34d3f 100644 --- a/resources/views/livewire/alerts/alert-banner-container.blade.php +++ b/resources/views/livewire/alerts/alert-banner-container.blade.php @@ -1,4 +1,4 @@ -
+
@foreach (array_values($alertBanners) as $alertBanner) @include('livewire.alerts.alert-banner', ['alertBanner' => $alertBanner]) @endforeach diff --git a/resources/views/tables/columns/server-entry-column.blade.php b/resources/views/tables/columns/server-entry-column.blade.php index bdeb0719e..152db35b6 100644 --- a/resources/views/tables/columns/server-entry-column.blade.php +++ b/resources/views/tables/columns/server-entry-column.blade.php @@ -13,17 +13,13 @@
- -
- +
-
-
-

CPU

@@ -59,6 +54,7 @@
diff --git a/storage/app/packs/.githold b/storage/app/packs/.githold deleted file mode 100755 index e69de29bb..000000000 diff --git a/tests/Feature/SettingsControllerTest.php b/tests/Feature/SettingsControllerTest.php new file mode 100644 index 000000000..c1850489e --- /dev/null +++ b/tests/Feature/SettingsControllerTest.php @@ -0,0 +1,179 @@ +group('API'); + +covers(SettingsController::class); + +it('server name cannot be changed', function () { + [$user, $server] = generateTestAccount([Permission::ACTION_WEBSOCKET_CONNECT]); + $originalName = $server->name; + + $this->actingAs($user) + ->post("/api/client/servers/$server->uuid/settings/rename", [ + 'name' => 'Test Server Name', + ]) + ->assertStatus(Response::HTTP_FORBIDDEN); + + $server = $server->refresh(); + expect()->toLogActivities(0) + ->and($server->name)->toBe($originalName); +}); + +it('server description can be changed', function () { + [$user, $server] = generateTestAccount([Permission::ACTION_SETTINGS_DESCRIPTION]); + $originalDescription = $server->description; + + $newDescription = 'Test Server Description'; + $this->actingAs($user) + ->post("/api/client/servers/$server->uuid/settings/description", [ + 'description' => $newDescription, + ]) + ->assertStatus(Response::HTTP_NO_CONTENT); + + $server = $server->refresh(); + $logged = \App\Models\ActivityLog::first(); + expect()->toLogActivities(1) + ->and($logged->properties['old'])->toBe($originalDescription) + ->and($logged->properties['new'])->toBe($newDescription) + ->and($server->description)->not()->toBe($originalDescription); +}); + +it('server description cannot be changed', function () { + [$user, $server] = generateTestAccount([Permission::ACTION_SETTINGS_DESCRIPTION]); + Config::set('panel.editable_server_descriptions', false); + $originalDescription = $server->description; + + $this->actingAs($user) + ->post("/api/client/servers/$server->uuid/settings/description", [ + 'description' => 'Test Description', + ]) + ->assertStatus(Response::HTTP_NO_CONTENT); + + $server = $server->refresh(); + expect()->toLogActivities(0) + ->and($server->description)->toBe($originalDescription); +}); + +it('server name can be changed', function () { + [$user, $server] = generateTestAccount([Permission::ACTION_WEBSOCKET_CONNECT, Permission::ACTION_SETTINGS_RENAME]); + $originalName = $server->name; + + $this->actingAs($user) + ->post("/api/client/servers/$server->uuid/settings/rename", [ + 'name' => 'Test Server Name', + ]) + ->assertStatus(Response::HTTP_NO_CONTENT); + + $server = $server->refresh(); + expect()->toLogActivities(1) + ->and($server->name)->not()->toBe($originalName); +}); + +test('unauthorized user cannot change docker image in use by server', function () { + [$user, $server] = generateTestAccount([Permission::ACTION_WEBSOCKET_CONNECT]); + $originalImage = $server->image; + + $this->actingAs($user) + ->put("/api/client/servers/$server->uuid/settings/docker-image", [ + 'docker_image' => 'ghcr.io/pelican-dev/yolks:java_21', + ]) + ->assertStatus(Response::HTTP_FORBIDDEN); + + $server = $server->refresh(); + expect()->toLogActivities(0) + ->and($server->image)->toBe($originalImage); +}); + +test('cannot change docker image to image not allowed by egg', function () { + + [$user, $server] = generateTestAccount([Permission::ACTION_STARTUP_DOCKER_IMAGE]); + $server->image = 'ghcr.io/parkervcp/yolks:java_17'; + $server->save(); + + $newImage = 'ghcr.io/parkervcp/fake:image'; + + $server = $server->refresh(); + + $this->actingAs($user) + ->putJson("/api/client/servers/$server->uuid/settings/docker-image", [ + 'docker_image' => $newImage, + ]) + ->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY); + + $server->refresh(); + expect()->toLogActivities(0) + ->and($server->image)->not()->toBe($newImage); +}); + +test('can change docker image in use by server', function () { + [$user, $server] = generateTestAccount([Permission::ACTION_STARTUP_DOCKER_IMAGE]); + $oldImage = 'ghcr.io/parkervcp/yolks:java_17'; + $server->image = $oldImage; + $server->save(); + + $newImage = 'ghcr.io/parkervcp/yolks:java_21'; + + $this->actingAs($user) + ->putJson("/api/client/servers/$server->uuid/settings/docker-image", [ + 'docker_image' => $newImage, + ]) + ->assertStatus(Response::HTTP_NO_CONTENT); + + $server = $server->refresh(); + + $logItem = \App\Models\ActivityLog::first(); + expect()->toLogActivities(1) + ->and($logItem->properties['old'])->toBe($oldImage) + ->and($logItem->properties['new'])->toBe($newImage) + ->and($server->image)->toBe($newImage); +}); + +test('unable to change the docker image set by administrator', function () { + [$user, $server] = generateTestAccount([Permission::ACTION_STARTUP_DOCKER_IMAGE]); + $oldImage = 'ghcr.io/parkervcp/yolks:java_custom'; + $server->image = $oldImage; + $server->save(); + + $newImage = 'ghcr.io/parkervcp/yolks:java_8'; + + $this->actingAs($user) + ->putJson("/api/client/servers/$server->uuid/settings/docker-image", [ + 'docker_image' => $newImage, + ]) + ->assertStatus(Response::HTTP_BAD_REQUEST); + + $server = $server->refresh(); + + expect()->toLogActivities(0) + ->and($server->image)->toBe($oldImage); +}); + +test('can be reinstalled', function () { + [$user, $server] = generateTestAccount([Permission::ACTION_SETTINGS_REINSTALL]); + expect($server->isInstalled())->toBeTrue(); + + $service = \Mockery::mock(DaemonServerRepository::class); + $this->app->instance(DaemonServerRepository::class, $service); + + $service->expects('setServer') + ->with(\Mockery::on(function ($value) use ($server) { + return $value->uuid === $server->uuid; + })) + ->andReturnSelf() + ->getMock() + ->expects('reinstall') + ->andReturnUndefined(); + + $this->actingAs($user)->postJson("/api/client/servers/$server->uuid/settings/reinstall") + ->assertStatus(Response::HTTP_ACCEPTED); + + $server = $server->refresh(); + expect()->toLogActivities(1) + ->and($server->status)->toBe(ServerState::Installing); +}); diff --git a/tests/Filament/Admin/ListEggsTest.php b/tests/Filament/Admin/ListEggsTest.php new file mode 100644 index 000000000..0e34b22fa --- /dev/null +++ b/tests/Filament/Admin/ListEggsTest.php @@ -0,0 +1,49 @@ +syncRoles(Role::getRootAdmin()); + + $this->actingAs($admin); + livewire(ListEggs::class) + ->assertSuccessful() + ->assertCountTableRecords($eggs->count()) + ->assertCanSeeTableRecords($eggs); +}); + +it('non root admin cannot see any eggs', function () { + $role = Role::factory()->create(['name' => 'Node Viewer', 'guard_name' => 'web']); + // Node Permission is on purpose, we check the wrong permissions. + $permission = Permission::factory()->create(['name' => RolePermissionModels::Node->viewAny(), 'guard_name' => 'web']); + $role->permissions()->attach($permission); + [$user] = generateTestAccount([]); + + $this->actingAs($user); + livewire(ListEggs::class) + ->assertForbidden(); +}); + +it('non root admin with permissions can see eggs', function () { + $role = Role::factory()->create(['name' => 'Egg Viewer', 'guard_name' => 'web']); + $permission = Permission::factory()->create(['name' => RolePermissionModels::Egg->viewAny(), 'guard_name' => 'web']); + $role->permissions()->attach($permission); + + $eggs = Egg::all(); + [$user] = generateTestAccount([]); + $user = $user->syncRoles($role); + + $this->actingAs($user); + livewire(ListEggs::class) + ->assertSuccessful() + ->assertCountTableRecords($eggs->count()) + ->assertCanSeeTableRecords($eggs); +}); diff --git a/tests/Filament/Admin/ListNodesTest.php b/tests/Filament/Admin/ListNodesTest.php new file mode 100644 index 000000000..9f7115556 --- /dev/null +++ b/tests/Filament/Admin/ListNodesTest.php @@ -0,0 +1,67 @@ +syncRoles(Role::getRootAdmin()); + $nodes = Node::all(); + + $this->actingAs($admin); + livewire(ListNodes::class) + ->assertSuccessful() + ->assertCountTableRecords($nodes->count()) + ->assertCanSeeTableRecords($nodes); +}); + +it('non root admin cannot see any nodes', function () { + $role = Role::factory()->create(['name' => 'Egg Viewer', 'guard_name' => 'web']); + // Egg Permission is on purpose, we check the wrong permissions. + $permission = Permission::factory()->create(['name' => RolePermissionModels::Egg->viewAny(), 'guard_name' => 'web']); + $role->permissions()->attach($permission); + [$user] = generateTestAccount(); + + $this->actingAs($user); + livewire(ListNodes::class) + ->assertForbidden(); +}); + +it('non root admin with permissions can see nodes', function () { + $role = Role::factory()->create(['name' => 'Node Viewer', 'guard_name' => 'web']); + $permission = Permission::factory()->create(['name' => RolePermissionModels::Node->viewAny(), 'guard_name' => 'web']); + $role->permissions()->attach($permission); + + [$user] = generateTestAccount(); + $nodes = Node::all(); + $user = $user->syncRoles($role); + + $this->actingAs($user); + livewire(ListNodes::class) + ->assertSuccessful() + ->assertCountTableRecords($nodes->count()) + ->assertCanSeeTableRecords($nodes); +}); + +it('displays the create button in the table instead of the header when 0 nodes', function () { + [$admin] = generateTestAccount([]); + $admin = $admin->syncRoles(Role::getRootAdmin()); + + // Nuke servers & nodes + Server::truncate(); + Node::truncate(); + + $this->actingAs($admin); + livewire(ListNodes::class) + ->assertSuccessful() + ->assertHeaderMissing(CreateAction::class) + ->assertActionExists(TableCreateAction::class); +}); diff --git a/tests/Integration/Api/Application/EggControllerTest.php b/tests/Integration/Api/Application/EggControllerTest.php index 66548e38d..8731d9f9e 100644 --- a/tests/Integration/Api/Application/EggControllerTest.php +++ b/tests/Integration/Api/Application/EggControllerTest.php @@ -101,7 +101,7 @@ class EggControllerTest extends ApplicationApiIntegrationTestCase */ public function test_get_missing_egg(): void { - $response = $this->getJson('/api/application/eggs/nil'); + $response = $this->getJson('/api/application/eggs/12345'); $this->assertNotFoundJson($response); } diff --git a/tests/Integration/Api/Application/Users/ExternalUserControllerTest.php b/tests/Integration/Api/Application/Users/ExternalUserControllerTest.php index 80069f4bc..7606c80fd 100644 --- a/tests/Integration/Api/Application/Users/ExternalUserControllerTest.php +++ b/tests/Integration/Api/Application/Users/ExternalUserControllerTest.php @@ -50,7 +50,7 @@ class ExternalUserControllerTest extends ApplicationApiIntegrationTestCase */ public function test_get_missing_user(): void { - $response = $this->getJson('/api/application/users/external/nil'); + $response = $this->getJson('/api/application/users/external/12345'); $this->assertNotFoundJson($response); } diff --git a/tests/Integration/Api/Application/Users/UserControllerTest.php b/tests/Integration/Api/Application/Users/UserControllerTest.php index 9d83cd53f..f98d33216 100644 --- a/tests/Integration/Api/Application/Users/UserControllerTest.php +++ b/tests/Integration/Api/Application/Users/UserControllerTest.php @@ -182,7 +182,7 @@ class UserControllerTest extends ApplicationApiIntegrationTestCase */ public function test_get_missing_user(): void { - $response = $this->getJson('/api/application/users/nil'); + $response = $this->getJson('/api/application/users/12345'); $this->assertNotFoundJson($response); } diff --git a/tests/Integration/Api/Client/ClientApiIntegrationTestCase.php b/tests/Integration/Api/Client/ClientApiIntegrationTestCase.php index 90ff06d35..129572688 100644 --- a/tests/Integration/Api/Client/ClientApiIntegrationTestCase.php +++ b/tests/Integration/Api/Client/ClientApiIntegrationTestCase.php @@ -3,15 +3,13 @@ namespace App\Tests\Integration\Api\Client; use App\Models\Task; -use App\Models\Model; use App\Models\Backup; use App\Models\Server; use App\Models\Schedule; use Illuminate\Support\Collection; use App\Models\Allocation; -use App\Tests\Integration\TestResponse; use App\Tests\Integration\IntegrationTestCase; -use Illuminate\Database\Eloquent\Model as EloquentModel; +use Illuminate\Database\Eloquent\Model; use App\Transformers\Api\Client\BaseClientTransformer; abstract class ClientApiIntegrationTestCase extends IntegrationTestCase @@ -57,7 +55,7 @@ abstract class ClientApiIntegrationTestCase extends IntegrationTestCase * Asserts that the data passed through matches the output of the data from the transformer. This * will remove the "relationships" key when performing the comparison. */ - protected function assertJsonTransformedWith(array $data, Model|EloquentModel $model): void + protected function assertJsonTransformedWith(array $data, Model $model): void { $reflect = new \ReflectionClass($model); $transformer = sprintf('\\App\\Transformers\\Api\\Client\\%sTransformer', $reflect->getShortName()); diff --git a/tests/Integration/Api/Client/ClientControllerTest.php b/tests/Integration/Api/Client/ClientControllerTest.php index f8f1be56e..18e11df22 100644 --- a/tests/Integration/Api/Client/ClientControllerTest.php +++ b/tests/Integration/Api/Client/ClientControllerTest.php @@ -53,13 +53,13 @@ class ClientControllerTest extends ClientApiIntegrationTestCase /** @var \App\Models\Server[] $servers */ $servers = [ - $this->createServerModel(['user_id' => $users[0]->id, 'name' => 'Julia']), - $this->createServerModel(['user_id' => $users[1]->id, 'uuid_short' => '12121212', 'name' => 'Janice']), - $this->createServerModel(['user_id' => $users[1]->id, 'uuid' => '88788878-12356789', 'external_id' => 'ext123', 'name' => 'Julia']), - $this->createServerModel(['user_id' => $users[1]->id, 'uuid' => '88788878-abcdefgh', 'name' => 'Jennifer']), + $this->createServerModel(['user_id' => $users[0]->id, 'name' => 'julia']), + $this->createServerModel(['user_id' => $users[1]->id, 'uuid_short' => '12121212', 'name' => 'janice']), + $this->createServerModel(['user_id' => $users[1]->id, 'uuid' => '88788878-12356789', 'external_id' => 'ext123', 'name' => 'julia']), + $this->createServerModel(['user_id' => $users[1]->id, 'uuid' => '88788878-abcdefgh', 'name' => 'jennifer']), ]; - $this->actingAs($users[1])->getJson('/api/client?filter[*]=Julia') + $this->actingAs($users[1])->getJson('/api/client?filter[*]=julia') ->assertOk() ->assertJsonCount(1, 'data') ->assertJsonPath('data.0.attributes.identifier', $servers[2]->uuid_short); @@ -90,7 +90,7 @@ class ClientControllerTest extends ClientApiIntegrationTestCase ->assertJsonCount(1, 'data') ->assertJsonPath('data.0.attributes.identifier', $servers[3]->uuid_short); - $this->actingAs($users[0])->getJson('/api/client?filter[*]=Julia&type=admin-all') + $this->actingAs($users[0])->getJson('/api/client?filter[*]=julia&type=admin-all') ->assertOk() ->assertJsonCount(2, 'data') ->assertJsonPath('data.0.attributes.identifier', $servers[0]->uuid_short) diff --git a/tests/Integration/Api/Client/Server/Startup/GetStartupAndVariablesTest.php b/tests/Integration/Api/Client/Server/Startup/GetStartupAndVariablesTest.php index ea8376988..0065abff9 100644 --- a/tests/Integration/Api/Client/Server/Startup/GetStartupAndVariablesTest.php +++ b/tests/Integration/Api/Client/Server/Startup/GetStartupAndVariablesTest.php @@ -23,7 +23,7 @@ class GetStartupAndVariablesTest extends ClientApiIntegrationTestCase $egg = $this->cloneEggAndVariables($server->egg); // BUNGEE_VERSION should never be returned to the user in this API call, either in // the array of variables, or revealed in the startup command. - $egg->variables()->first()->update([ + $egg->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->update([ 'user_viewable' => false, ]); @@ -42,7 +42,7 @@ class GetStartupAndVariablesTest extends ClientApiIntegrationTestCase $response->assertJsonPath('object', 'list'); $response->assertJsonCount(1, 'data'); $response->assertJsonPath('data.0.object', EggVariable::RESOURCE_NAME); - $this->assertJsonTransformedWith($response->json('data.0.attributes'), $egg->variables[1]); + $this->assertJsonTransformedWith($response->json('data.0.attributes'), $egg->variables()->where('user_viewable', true)->first()); } /** diff --git a/tests/Integration/Api/Client/Server/Startup/UpdateStartupVariableTest.php b/tests/Integration/Api/Client/Server/Startup/UpdateStartupVariableTest.php index 063abc42b..dc832e577 100644 --- a/tests/Integration/Api/Client/Server/Startup/UpdateStartupVariableTest.php +++ b/tests/Integration/Api/Client/Server/Startup/UpdateStartupVariableTest.php @@ -39,7 +39,7 @@ class UpdateStartupVariableTest extends ClientApiIntegrationTestCase $response->assertOk(); $response->assertJsonPath('object', EggVariable::RESOURCE_NAME); - $this->assertJsonTransformedWith($response->json('attributes'), $server->variables[0]); + $this->assertJsonTransformedWith($response->json('attributes'), $server->variables->firstWhere('env_variable', 'BUNGEE_VERSION')); $response->assertJsonPath('meta.startup_command', 'java bungeecord.jar --version 123'); $response->assertJsonPath('meta.raw_startup_command', $server->startup); } @@ -90,7 +90,7 @@ class UpdateStartupVariableTest extends ClientApiIntegrationTestCase [$user, $server] = $this->generateTestAccount(); $egg = $this->cloneEggAndVariables($server->egg); - $egg->variables()->first()->update(['user_viewable' => false]); + $egg->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->update(['user_viewable' => false]); $server->fill([ 'egg_id' => $egg->id, @@ -119,7 +119,7 @@ class UpdateStartupVariableTest extends ClientApiIntegrationTestCase [$user, $server] = $this->generateTestAccount(); $egg = $this->cloneEggAndVariables($server->egg); - $egg->variables()->first()->update(['rules' => ['nullable', 'string']]); + $egg->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->update(['rules' => ['nullable', 'string']]); $server->fill(['egg_id' => $egg->id])->save(); $server->refresh(); diff --git a/tests/Integration/Api/Client/TwoFactorControllerTest.php b/tests/Integration/Api/Client/TwoFactorControllerTest.php index 996762de4..a36a27ccb 100644 --- a/tests/Integration/Api/Client/TwoFactorControllerTest.php +++ b/tests/Integration/Api/Client/TwoFactorControllerTest.php @@ -142,7 +142,7 @@ class TwoFactorControllerTest extends ClientApiIntegrationTestCase $user = $user->refresh(); $this->assertFalse($user->use_totp); $this->assertNotNull($user->totp_authenticated_at); - $this->assertSame(Carbon::now()->toAtomString(), $user->totp_authenticated_at->toAtomString()); + $this->assertTrue(now()->isSameAs('Y-m-d H:i:s', $user->totp_authenticated_at)); } /** diff --git a/tests/Integration/Services/Servers/ServerCreationServiceTest.php b/tests/Integration/Services/Servers/ServerCreationServiceTest.php index 43c5c862b..c51cc1b3c 100644 --- a/tests/Integration/Services/Servers/ServerCreationServiceTest.php +++ b/tests/Integration/Services/Servers/ServerCreationServiceTest.php @@ -118,8 +118,8 @@ class ServerCreationServiceTest extends IntegrationTestCase $this->assertSame($response->uuid_short, substr($response->uuid, 0, 8)); $this->assertSame($egg->id, $response->egg_id); $this->assertCount(2, $response->variables); - $this->assertSame('123', $response->variables[0]->server_value); - $this->assertSame('server2.jar', $response->variables[1]->server_value); + $this->assertSame('123', $response->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->server_value); + $this->assertSame('server2.jar', $response->variables()->firstWhere('env_variable', 'SERVER_JARFILE')->server_value); foreach ($data as $key => $value) { if (in_array($key, ['allocation_additional', 'environment', 'start_on_completion'])) { diff --git a/tests/Integration/Services/Servers/StartupModificationServiceTest.php b/tests/Integration/Services/Servers/StartupModificationServiceTest.php index 5bc661452..14c5b4688 100644 --- a/tests/Integration/Services/Servers/StartupModificationServiceTest.php +++ b/tests/Integration/Services/Servers/StartupModificationServiceTest.php @@ -60,8 +60,8 @@ class StartupModificationServiceTest extends IntegrationTestCase $this->assertInstanceOf(Server::class, $result); $this->assertCount(2, $result->variables); $this->assertSame($server->startup, $result->startup); - $this->assertSame('1234', $result->variables[0]->server_value); - $this->assertSame('test.jar', $result->variables[1]->server_value); + $this->assertSame('1234', $result->variables->firstWhere('env_variable', 'BUNGEE_VERSION')->server_value); + $this->assertSame('test.jar', $result->variables->firstWhere('env_variable', 'SERVER_JARFILE')->server_value); } /** @@ -106,7 +106,7 @@ class StartupModificationServiceTest extends IntegrationTestCase $clone = $this->cloneEggAndVariables($server->egg); // This makes the BUNGEE_VERSION variable not user editable. - $clone->variables()->first()->update([ + $clone->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->update([ 'user_editable' => false, ]); @@ -115,7 +115,7 @@ class StartupModificationServiceTest extends IntegrationTestCase ServerVariable::query()->updateOrCreate([ 'server_id' => $server->id, - 'variable_id' => $server->variables[0]->id, + 'variable_id' => $server->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->id, ], ['variable_value' => 'EXIST']); $response = $this->getService()->handle($server, [ @@ -126,8 +126,8 @@ class StartupModificationServiceTest extends IntegrationTestCase ]); $this->assertCount(2, $response->variables); - $this->assertSame('EXIST', $response->variables[0]->server_value); - $this->assertSame('test.jar', $response->variables[1]->server_value); + $this->assertSame('EXIST', $response->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->server_value); + $this->assertSame('test.jar', $response->variables()->firstWhere('env_variable', 'SERVER_JARFILE')->server_value); $response = $this->getService() ->setUserLevel(User::USER_LEVEL_ADMIN) @@ -139,8 +139,8 @@ class StartupModificationServiceTest extends IntegrationTestCase ]); $this->assertCount(2, $response->variables); - $this->assertSame('1234', $response->variables[0]->server_value); - $this->assertSame('test.jar', $response->variables[1]->server_value); + $this->assertSame('1234', $response->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->server_value); + $this->assertSame('test.jar', $response->variables()->firstWhere('env_variable', 'SERVER_JARFILE')->server_value); } /** diff --git a/tests/Integration/Services/Servers/VariableValidatorServiceTest.php b/tests/Integration/Services/Servers/VariableValidatorServiceTest.php index 66255bd8c..ac0cd35a9 100644 --- a/tests/Integration/Services/Servers/VariableValidatorServiceTest.php +++ b/tests/Integration/Services/Servers/VariableValidatorServiceTest.php @@ -52,12 +52,15 @@ class VariableValidatorServiceTest extends IntegrationTestCase 'SERVER_JARFILE' => 'server.jar', ]); + $bungeeVersion = $response->firstWhere('key', 'BUNGEE_VERSION'); + $serverJarfile = $response->firstWhere('key', 'SERVER_JARFILE'); + $this->assertInstanceOf(Collection::class, $response); $this->assertCount(2, $response); - $this->assertSame('BUNGEE_VERSION', $response->get(0)->key); - $this->assertSame('1234', $response->get(0)->value); - $this->assertSame('SERVER_JARFILE', $response->get(1)->key); - $this->assertSame('server.jar', $response->get(1)->value); + $this->assertSame('BUNGEE_VERSION', $bungeeVersion->key); + $this->assertSame('1234', $bungeeVersion->value); + $this->assertSame('SERVER_JARFILE', $serverJarfile->key); + $this->assertSame('server.jar', $serverJarfile->value); } /** @@ -67,7 +70,7 @@ class VariableValidatorServiceTest extends IntegrationTestCase public function test_normal_user_cannot_validate_non_user_editable_variables(): void { $egg = $this->cloneEggAndVariables($this->egg); - $egg->variables()->first()->update([ + $egg->variables()->firstWhere('env_variable', 'BUNGEE_VERSION')->update([ 'user_editable' => false, ]); @@ -79,8 +82,8 @@ class VariableValidatorServiceTest extends IntegrationTestCase $this->assertInstanceOf(Collection::class, $response); $this->assertCount(1, $response); - $this->assertSame('SERVER_JARFILE', $response->get(0)->key); - $this->assertSame('server.jar', $response->get(0)->value); + $this->assertSame('SERVER_JARFILE', $response->firstWhere('key', 'SERVER_JARFILE')->key); + $this->assertSame('server.jar', $response->firstWhere('key', 'SERVER_JARFILE')->value); } public function test_environment_variables_can_be_updated_as_admin(): void @@ -107,12 +110,15 @@ class VariableValidatorServiceTest extends IntegrationTestCase 'SERVER_JARFILE' => 'server.jar', ]); + $bungeeVersion = $response->firstWhere('key', 'BUNGEE_VERSION'); + $serverJarfile = $response->firstWhere('key', 'SERVER_JARFILE'); + $this->assertInstanceOf(Collection::class, $response); $this->assertCount(2, $response); - $this->assertSame('BUNGEE_VERSION', $response->get(0)->key); - $this->assertSame('123', $response->get(0)->value); - $this->assertSame('SERVER_JARFILE', $response->get(1)->key); - $this->assertSame('server.jar', $response->get(1)->value); + $this->assertSame('BUNGEE_VERSION', $bungeeVersion->key); + $this->assertSame('123', $bungeeVersion->value); + $this->assertSame('SERVER_JARFILE', $serverJarfile->key); + $this->assertSame('server.jar', $serverJarfile->value); } public function test_nullable_environment_variables_can_be_used_correctly(): void diff --git a/tests/Pest.php b/tests/Pest.php index fd279ada6..c396b3bb7 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -24,10 +24,26 @@ | */ +use App\Models\ActivityLog; +use App\Models\Allocation; +use App\Models\Egg; +use App\Models\Node; +use App\Models\Server; +use App\Models\Subuser; +use App\Models\User; +use App\Tests\Integration\IntegrationTestCase; +use Ramsey\Uuid\Uuid; + expect()->extend('toBeOne', function () { return $this->toBe(1); }); +expect()->extend('toLogActivities', function (int $times) { + expect(ActivityLog::count())->toBe($times); +}); + +uses(IntegrationTestCase::class)->in('Feature', 'Filament'); + /* |-------------------------------------------------------------------------- | Functions @@ -43,3 +59,119 @@ function something() { // .. } + +/** + * Generates a user and a server for that user. If an array of permissions is passed it + * is assumed that the user is actually a subuser of the server. + * + * @param string[] $permissions + * @return array{\App\Models\User, \App\Models\Server} + */ + +/** + * Creates a server model in the databases for the purpose of testing. If an attribute + * is passed in that normally requires this function to create a model no model will be + * created and that attribute's value will be used. + * + * The returned server model will have all the relationships loaded onto it. + */ +function createServerModel(array $attributes = []): Server +{ + if (isset($attributes['user_id'])) { + $attributes['owner_id'] = $attributes['user_id']; + } + + if (!isset($attributes['owner_id'])) { + /** @var \App\Models\User $user */ + $user = User::factory()->create(); + $attributes['owner_id'] = $user->id; + } + + if (!isset($attributes['node_id'])) { + /** @var \App\Models\Node $node */ + $node = Node::factory()->create(); + $attributes['node_id'] = $node->id; + } + + if (!isset($attributes['allocation_id'])) { + /** @var \App\Models\Allocation $allocation */ + $allocation = Allocation::factory()->create(['node_id' => $attributes['node_id']]); + $attributes['allocation_id'] = $allocation->id; + } + + if (empty($attributes['egg_id'])) { + $egg = getBungeecordEgg(); + + $attributes['egg_id'] = $egg->id; + } + + unset($attributes['user_id']); + + /** @var \App\Models\Server $server */ + $server = Server::factory()->create($attributes); + + Allocation::query()->where('id', $server->allocation_id)->update(['server_id' => $server->id]); + + return $server->fresh([ + 'user', 'node', 'allocation', 'egg', + ]); +} + +/** + * Generates a user and a server for that user. If an array of permissions is passed it + * is assumed that the user is actually a subuser of the server. + * + * @param string[] $permissions + * @return array{\App\Models\User, \App\Models\Server} + */ +function generateTestAccount(array $permissions = []): array +{ + /** @var \App\Models\User $user */ + $user = User::factory()->create(); + + if (empty($permissions)) { + return [$user, createServerModel(['user_id' => $user->id])]; + } + + $server = createServerModel(); + + Subuser::query()->create([ + 'user_id' => $user->id, + 'server_id' => $server->id, + 'permissions' => $permissions, + ]); + + return [$user, $server]; +} + +/** + * Clones a given egg allowing us to make modifications that don't affect other + * tests that rely on the egg existing in the correct state. + */ +function cloneEggAndVariables(Egg $egg): Egg +{ + $model = $egg->replicate(['id', 'uuid']); + $model->uuid = Uuid::uuid4()->toString(); + $model->push(); + + /** @var \App\Models\Egg $model */ + $model = $model->fresh(); + + foreach ($egg->variables as $variable) { + $variable->replicate(['id', 'egg_id'])->forceFill(['egg_id' => $model->id])->push(); + } + + return $model->fresh(); +} + +/** + * Almost every test just assumes it is using BungeeCord — this is the critical + * egg model for all tests unless specified otherwise. + */ +function getBungeecordEgg(): Egg +{ + /** @var \App\Models\Egg $egg */ + $egg = Egg::query()->where('author', 'panel@example.com')->where('name', 'Bungeecord')->firstOrFail(); + + return $egg; +} diff --git a/tests/TestCase.php b/tests/TestCase.php index d789400e3..ac07330fb 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -42,6 +42,9 @@ abstract class TestCase extends BaseTestCase */ protected function tearDown(): void { + restore_exception_handler(); + restore_error_handler(); + parent::tearDown(); Carbon::setTestNow();