diff --git a/src/new/composer.json b/src/new/composer.json index b9d054411..98df67446 100755 --- a/src/new/composer.json +++ b/src/new/composer.json @@ -47,7 +47,7 @@ "mobiledetect/mobiledetectlib": "^2.8", "mpdf/mpdf": "dev-qrcode", "mpdf/qrcode": "^1.2", - "nelmio/api-doc-bundle": "^5", + "nelmio/api-doc-bundle": "^4", "nelmio/cors-bundle": "^2.2", "nicolab/php-ftp-client": "^1.4", "oneup/uploader-bundle": "^3", diff --git a/src/new/composer.lock b/src/new/composer.lock index bbb0560f0..eb4300130 100755 --- a/src/new/composer.lock +++ b/src/new/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": "9b481d5b6c4b610b15183e3afe963bd1", + "content-hash": "f0609413226c0c4e60f20fbe8a606b6b", "packages": [ { "name": "azuyalabs/yasumi", @@ -5694,74 +5694,74 @@ }, { "name": "nelmio/api-doc-bundle", - "version": "v5.4.0", + "version": "v4.38.2", "source": { "type": "git", "url": "https://github.com/nelmio/NelmioApiDocBundle.git", - "reference": "49098f9e3f5e7a466b95b1d108d45857ba533c96" + "reference": "fdc1cf5bc57287787db59f205a8e77485bd22072" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/49098f9e3f5e7a466b95b1d108d45857ba533c96", - "reference": "49098f9e3f5e7a466b95b1d108d45857ba533c96", + "url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/fdc1cf5bc57287787db59f205a8e77485bd22072", + "reference": "fdc1cf5bc57287787db59f205a8e77485bd22072", "shasum": "" }, "require": { - "php": ">=8.1", - "phpdocumentor/reflection-docblock": "^5.0", + "ext-json": "*", + "php": ">=7.4", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0", "phpdocumentor/type-resolver": "^1.8.2", "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/container": "^1.0 || ^2.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "symfony/config": "^6.4 || ^7.1", - "symfony/console": "^6.4 || ^7.1", - "symfony/dependency-injection": "^6.4 || ^7.1", + "symfony/config": "^5.4 || ^6.4 || ^7.1", + "symfony/console": "^5.4 || ^6.4 || ^7.1", + "symfony/dependency-injection": "^5.4 || ^6.4 || ^7.1", "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/framework-bundle": "^6.4 || ^7.1", - "symfony/http-foundation": "^6.4 || ^7.1", - "symfony/http-kernel": "^6.4 || ^7.1", - "symfony/options-resolver": "^6.4 || ^7.1", - "symfony/property-info": "^6.4 || ^7.1", - "symfony/routing": "^6.4 || ^7.1", + "symfony/framework-bundle": "^5.4.24 || ^6.4 || ^7.1", + "symfony/http-foundation": "^5.4 || ^6.4 || ^7.1", + "symfony/http-kernel": "^5.4 || ^6.4 || ^7.1", + "symfony/options-resolver": "^5.4 || ^6.4 || ^7.1", + "symfony/property-info": "^5.4.10 || ^6.4 || ^7.1", + "symfony/routing": "^5.4 || ^6.4 || ^7.1", "zircote/swagger-php": "^4.11.1 || ^5.0" }, "conflict": { "zircote/swagger-php": "4.8.7" }, "require-dev": { - "api-platform/core": "^3.2", + "api-platform/core": "^2.7.0 || ^3", + "composer/package-versions-deprecated": "1.11.99.1", + "doctrine/annotations": "^2.0", "friendsofphp/php-cs-fixer": "^3.52", - "friendsofsymfony/rest-bundle": "^3.2.0", - "jms/serializer": "^3.32", - "jms/serializer-bundle": "^5.5", + "friendsofsymfony/rest-bundle": "^2.8 || ^3.0", + "jms/serializer": "^1.14 || ^3.0", + "jms/serializer-bundle": "^2.3 || ^3.0 || ^4.0 || ^5.0", "phpstan/phpstan": "^1.10", "phpstan/phpstan-phpunit": "^1.3", "phpstan/phpstan-strict-rules": "^1.5", "phpstan/phpstan-symfony": "^1.3", - "phpunit/phpunit": "^10.5", - "symfony/asset": "^6.4 || ^7.1", - "symfony/browser-kit": "^6.4 || ^7.1", - "symfony/cache": "^6.4 || ^7.1", - "symfony/dom-crawler": "^6.4 || ^7.1", - "symfony/expression-language": "^6.4 || ^7.1", - "symfony/finder": "^6.4 || ^7.1", - "symfony/form": "^6.4 || ^7.1", - "symfony/phpunit-bridge": "^6.4 || ^7.1", - "symfony/property-access": "^6.4 || ^7.1", - "symfony/security-csrf": "^6.4 || ^7.1", - "symfony/security-http": "^6.4 || ^7.1", - "symfony/serializer": "^6.4 || ^7.1", - "symfony/stopwatch": "^6.4 || ^7.1", - "symfony/templating": "^6.4 || ^7.1", - "symfony/translation": "^6.4 || ^7.1", - "symfony/twig-bundle": "^6.4 || ^7.1", - "symfony/uid": "^6.4 || ^7.1", - "symfony/validator": "^6.4 || ^7.1", - "willdurand/hateoas-bundle": "^2.7", - "willdurand/negotiation": "^3.0" + "phpunit/phpunit": "^9.6 || ^10.5", + "symfony/asset": "^5.4 || ^6.4 || ^7.1", + "symfony/browser-kit": "^5.4 || ^6.4 || ^7.1", + "symfony/cache": "^5.4 || ^6.4 || ^7.1", + "symfony/dom-crawler": "^5.4 || ^6.4 || ^7.1", + "symfony/expression-language": "^5.4 || ^6.4 || ^7.1", + "symfony/form": "^5.4 || ^6.4 || ^7.1", + "symfony/phpunit-bridge": "^6.4", + "symfony/property-access": "^5.4 || ^6.4 || ^7.1", + "symfony/security-csrf": "^5.4 || ^6.4 || ^7.1", + "symfony/serializer": "^5.4 || ^6.4 || ^7.1", + "symfony/stopwatch": "^5.4 || ^6.4 || ^7.1", + "symfony/templating": "^5.4 || ^6.4 || ^7.1", + "symfony/twig-bundle": "^5.4 || ^6.4 || ^7.1", + "symfony/uid": "^5.4 || ^6.4 || ^7.1", + "symfony/validator": "^5.4 || ^6.4 || ^7.1", + "willdurand/hateoas-bundle": "^1.0 || ^2.0" }, "suggest": { "api-platform/core": "For using an API oriented framework.", + "doctrine/annotations": "For using doctrine annotations", "friendsofsymfony/rest-bundle": "For using the parameters annotations.", "jms/serializer-bundle": "For describing your models.", "symfony/asset": "For using the Swagger UI.", @@ -5777,8 +5777,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-4.x": "4.x-dev", - "dev-5.x": "5.x-dev" + "dev-4.x": "4.x-dev" } }, "autoload": { @@ -5796,7 +5795,7 @@ "homepage": "https://github.com/nelmio/NelmioApiDocBundle/contributors" } ], - "description": "Generates documentation for your REST API from attributes", + "description": "Generates documentation for your REST API from annotations and attributes", "keywords": [ "api", "doc", @@ -5805,7 +5804,7 @@ ], "support": { "issues": "https://github.com/nelmio/NelmioApiDocBundle/issues", - "source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v5.4.0" + "source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v4.38.2" }, "funding": [ { @@ -5813,7 +5812,7 @@ "type": "github" } ], - "time": "2025-06-26T15:03:21+00:00" + "time": "2025-03-24T15:00:53+00:00" }, { "name": "nelmio/cors-bundle", diff --git a/src/new/src/PSC/Shop/AccountBundle/Api/AllByShop.php b/src/new/src/PSC/Shop/AccountBundle/Api/AllByShop.php index f1976f2e0..9f588dfe5 100755 --- a/src/new/src/PSC/Shop/AccountBundle/Api/AllByShop.php +++ b/src/new/src/PSC/Shop/AccountBundle/Api/AllByShop.php @@ -3,54 +3,49 @@ namespace PSC\Shop\AccountBundle\Api; use Doctrine\ORM\EntityManagerInterface; -use Nelmio\ApiDocBundle\Annotation\Model; -use Nelmio\ApiDocBundle\Annotation\Security; -use OpenApi\Annotations as OA; +use Nelmio\ApiDocBundle\Attribute\Model; +use OpenApi\Attributes\JsonContent; +use OpenApi\Attributes\Response as OpenApiResponse; +use OpenApi\Attributes\Tag; use PSC\Component\ApiBundle\Dto\Error\NotFound; +use PSC\Shop\AccountBundle\Dto\All\Output; use PSC\Shop\AccountBundle\Model\Account as ModelAccount; +use PSC\Shop\AccountBundle\Transformer\Account as TransformerAccount; +use PSC\Shop\EntityBundle\Entity\Account; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\Yaml\Yaml; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; -use Symfony\Component\HttpFoundation\Request; -use PSC\Shop\AccountBundle\Dto\All\Output; -use PSC\Shop\AccountBundle\Transformer\Account as TransformerAccount; -use PSC\Shop\EntityBundle\Entity\Account; class AllByShop extends AbstractController { - /** - * get accounts by shop - * - * @OA\Response( - * response=200, - * description="account", - * @OA\JsonContent(ref=@Model(type=\PSC\Shop\AccountBundle\Dto\All\Output::class)) - * ) - * @OA\Tag(name="Account") - * @Security(name="Bearer") - */ + #[OpenApiResponse( + response: 200, + description: 'get all accounts by shop', + content: new JsonContent(ref: new Model(type: Output::class)), + )] #[Route(path: 'allbyshop/{shop_uuid}', methods: ['GET'])] #[IsGranted('ROLE_SHOP')] + #[Tag('Account')] + #[Security('Bearer')] public function AllAction( EntityManagerInterface $entityManager, TransformerAccount $transformerAccount, - string $shop_uuid = "" + string $shop_uuid = '', ): JsonResponse { - $output = new Output(); $accountRepository = $entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Account'); - $qb = $accountRepository->createQueryBuilder('account') - ->leftJoin('account.shops', 'shops') - ->orderBy('account.uid', 'desc'); + $qb = $accountRepository->createQueryBuilder('account')->leftJoin('account.shops', 'shops')->orderBy( + 'account.uid', + 'desc', + ); - $qb->andWhere('(shops.uid = :shop_id or shops.uuid = :shop_id)') - ->setParameter("shop_id", $shop_uuid); + $qb->andWhere('(shops.uid = :shop_id or shops.uuid = :shop_id)')->setParameter('shop_id', $shop_uuid); $accounts = $qb->getQuery()->execute(); diff --git a/src/new/src/PSC/Shop/MediaBundle/Api/Folder/Add.php b/src/new/src/PSC/Shop/MediaBundle/Api/Folder/Add.php index 7a7d28f5d..8fc50bd82 100644 --- a/src/new/src/PSC/Shop/MediaBundle/Api/Folder/Add.php +++ b/src/new/src/PSC/Shop/MediaBundle/Api/Folder/Add.php @@ -2,9 +2,14 @@ namespace PSC\Shop\MediaBundle\Api\Folder; +use Doctrine\ODM\MongoDB\DocumentManager; +use Nelmio\ApiDocBundle\Attribute\Model; +use Nelmio\ApiDocBundle\Attribute\Security; +use OpenApi\Attributes\JsonContent; use OpenApi\Attributes\RequestBody; use OpenApi\Attributes\Response; use OpenApi\Attributes\Tag; +use PSC\Shop\MediaBundle\Document\Folder as PSCFolder; use PSC\Shop\MediaBundle\Dto\Folder\Input; use PSC\Shop\MediaBundle\Model\Folder; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; @@ -14,14 +19,29 @@ use Symfony\Component\Security\Http\Attribute\IsGranted; class Add extends AbstractController { + public function __construct( + private readonly DocumentManager $dm, + ) {} + #[Response(response: 200, description: 'add Folder', ref: Folder::class)] #[Route(path: '/folder/add', methods: ['POST'])] #[Tag('Media')] #[RequestBody(content: new Model(type: Input::class))] #[ParamConverter('data', class: Input::class, converter: 'psc_rest.request_body')] - #[IsGranted('SHOP_ADMIN')] + #[IsGranted('ROLE_ADMIN')] + #[Security(name: 'Security')] public function add(Input $data) { - return $this->json($data); + $cat = new PSCFolder(); + $cat->setTitle($data->title); + $cat->setIcon('fa-file'); + $this->dm->persist($cat); + $this->dm->flush(); + + $fModel = new Folder(); + $fModel->setUuid($cat->getId()); + $fModel->setTitle($cat->getTitle()); + + return $this->json($fModel); } } diff --git a/src/new/src/PSC/Shop/MediaBundle/Api/Folder/All.php b/src/new/src/PSC/Shop/MediaBundle/Api/Folder/All.php new file mode 100644 index 000000000..f904122ad --- /dev/null +++ b/src/new/src/PSC/Shop/MediaBundle/Api/Folder/All.php @@ -0,0 +1,55 @@ +dm + ->getRepository(Folder::class) + ->createQueryBuilder('folder') + ->field('parent_id') + ->exists(false) + ->sort('title', 'ASC') + ->getQuery() + ->execute(); + + $output = new PSCAll(); + + foreach ($folders as $folder) { + $f = new PSCFolder(); + $f->setTitle($folder->getTitle()); + $f->setUuid($folder->getId()); + $output->data[] = $f; + } + + return $this->json($output); + } +} diff --git a/src/new/src/PSC/Shop/MediaBundle/Api/Upload.php b/src/new/src/PSC/Shop/MediaBundle/Api/Upload.php index e3020ff1e..b0444adfc 100644 --- a/src/new/src/PSC/Shop/MediaBundle/Api/Upload.php +++ b/src/new/src/PSC/Shop/MediaBundle/Api/Upload.php @@ -3,19 +3,19 @@ namespace PSC\Shop\MediaBundle\Api; use Doctrine\ODM\MongoDB\DocumentManager; +use Nelmio\ApiDocBundle\Annotation\Model; +use Nelmio\ApiDocBundle\Annotation\Security; +use OpenApi\Annotations as OA; use PSC\Shop\MediaBundle\Document\Media; -use PSC\Shop\MediaBundle\Model\Media as MediaModel; use PSC\Shop\MediaBundle\Helper\MediaManager; +use PSC\Shop\MediaBundle\Model\Media as MediaModel; use PSC\System\SettingsBundle\Service\Shop; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Attribute\Route; -use OpenApi\Annotations as OA; -use Nelmio\ApiDocBundle\Annotation\Security; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; -use Nelmio\ApiDocBundle\Annotation\Model; class Upload extends AbstractController { @@ -53,27 +53,29 @@ class Upload extends AbstractController * @Security(name="Bearer") */ #[Route(path: '/create', methods: ['POST'])] - public function create(MediaManager $mediaManager, Shop $shopService, DocumentManager $documentManager, Request $req): JsonResponse - { + public function create( + MediaManager $mediaManager, + Shop $shopService, + DocumentManager $documentManager, + Request $req, + ): JsonResponse { $selectedShop = $shopService->getShopByDomain(); $selectedFolder = $documentManager ->getRepository('PSC\Shop\MediaBundle\Document\Folder') - ->findOneBy(array('id' => $req->get('folder'))); - $handler = $mediaManager->getHandlerForType('pdf'); - $media = new Media(); - $helper = $handler->getFormHelper($media); + ->findOneBy(['id' => $req->get('folder')]); + $handler = $mediaManager->getHandlerForType('pdf'); + $media = new Media(); + $helper = $handler->getFormHelper($media); $media->setContent($req->files->get('file')); $handler->prepareMedia($media); $media->setFolder($selectedFolder); $media->setShop($selectedShop->getUid()); $documentManager->persist($media); $documentManager->flush(); - $mediaModel = new MediaModel(); $mediaModel->setUuid($media->getId()); $mediaModel->setUrl($media->getUrl()); $mediaModel->setTitle($media->getTitle()); return $this->json($mediaModel); } - } diff --git a/src/new/src/PSC/Shop/MediaBundle/Dto/Folder/All.php b/src/new/src/PSC/Shop/MediaBundle/Dto/Folder/All.php new file mode 100644 index 000000000..b0bc8c3b3 --- /dev/null +++ b/src/new/src/PSC/Shop/MediaBundle/Dto/Folder/All.php @@ -0,0 +1,14 @@ +uuid = $uuid; } + #[\Override] public function __toString(): string { return $this->uuid; @@ -75,9 +76,9 @@ class Media public function getArray(): array { return [ - 'uuid' => $this->uuid, - 'url' => $this->url, - 'title' => $this->title + 'uuid' => $this->uuid, + 'url' => $this->url, + 'title' => $this->title, ]; } diff --git a/src/new/src/PSC/Shop/ProductBundle/Api/Product/GetAllByTerm.php b/src/new/src/PSC/Shop/ProductBundle/Api/Product/GetAllByTerm.php index 1816b4f69..7cfcf52d5 100755 --- a/src/new/src/PSC/Shop/ProductBundle/Api/Product/GetAllByTerm.php +++ b/src/new/src/PSC/Shop/ProductBundle/Api/Product/GetAllByTerm.php @@ -3,22 +3,22 @@ namespace PSC\Shop\ProductBundle\Api\Product; use Doctrine\ORM\EntityManagerInterface; +use Nelmio\ApiDocBundle\Annotation\Model; +use Nelmio\ApiDocBundle\Annotation\Security; +use OpenApi\Annotations as OA; use PSC\Component\ApiBundle\Dto\Error\NotFound; use PSC\Shop\EntityBundle\Entity\Paper; use PSC\Shop\EntityBundle\Entity\Product; use PSC\Shop\EntityBundle\Entity\Productgroup; use PSC\Shop\ProductBundle\Dto\Product\GetAllByProductGroup\Output; use PSC\Shop\ProductBundle\Hydrate\Product as PSCProduct; +use PSC\System\SettingsBundle\Model\Paper as PSCPaper; use PSC\System\SettingsBundle\Model\Papercontainer; use PSC\System\SettingsBundle\Service\Shop; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Annotation\Route; -use OpenApi\Annotations as OA; -use Nelmio\ApiDocBundle\Annotation\Model; -use PSC\System\SettingsBundle\Model\Paper as PSCPaper; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; -use Nelmio\ApiDocBundle\Annotation\Security; class GetAllByTerm extends AbstractController { @@ -31,6 +31,7 @@ class GetAllByTerm extends AbstractController $this->entityManager = $entityManager; $this->productHydrate = $productHydrate; } + /** * get product * @@ -44,7 +45,7 @@ class GetAllByTerm extends AbstractController #[Route(path: '/product/getallbyterm/{shop_uuid}/{term}', methods: ['GET'])] public function getAll(string $term, string $shop_uuid): JsonResponse { - $temp = []; + $temp = []; $products = $this->entityManager ->getRepository('PSC\Shop\EntityBundle\Entity\Product') @@ -52,15 +53,34 @@ class GetAllByTerm extends AbstractController ->leftJoin('product.shop', 'shop') ->andWhere(" shop.uid = :shop_id and - (product.uid LIKE '%" . $term . "%' OR - product.title LIKE '%" . $term . "%' OR - product.calcXml LIKE '%" . $term . "%' OR - product.textFormat LIKE '%" . $term . "%' OR - product.description LIKE '%" . $term . "%' OR - product.nrIntern LIKE '%" . $term . "%' OR - product.nrExtern LIKE '%" . $term . "%' OR - product.textArt LIKE '%" . $term . "%') - ")->setParameter('shop_id', $shop_uuid)->getQuery()->execute(); + (product.uid LIKE '%" . + $term . + "%' OR + product.title LIKE '%" . + $term . + "%' OR + product.calcXml LIKE '%" . + $term . + "%' OR + product.textFormat LIKE '%" . + $term . + "%' OR + product.description LIKE '%" . + $term . + "%' OR + product.nrIntern LIKE '%" . + $term . + "%' OR + product.nrExtern LIKE '%" . + $term . + "%' OR + product.textArt LIKE '%" . + $term . + "%') + ") + ->setParameter('shop_id', $shop_uuid) + ->getQuery() + ->execute(); /** @var Product $product */ foreach ($products as $product) { diff --git a/src/new/tests/PSC/Shop/Media/Api/FolderTest.php b/src/new/tests/PSC/Shop/Media/Api/FolderTest.php index a12af8f67..9b1e325a1 100644 --- a/src/new/tests/PSC/Shop/Media/Api/FolderTest.php +++ b/src/new/tests/PSC/Shop/Media/Api/FolderTest.php @@ -2,6 +2,8 @@ namespace App\Tests\PSC\Shop\Media\Api; +use Faker\Factory; +use Faker\Generator; use PSC\Shop\ContactBundle\Repository\ContactRepository; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\File\UploadedFile; @@ -11,6 +13,13 @@ class FolderTest extends WebTestCase { use RefreshDatabaseTrait; + private Generator $faker; + + public function setUp(): void + { + $this->faker = Factory::create(locale: 'de_DE'); + } + public function testCreateFolder(): void { $client = static::createClient(); @@ -21,16 +30,43 @@ class FolderTest extends WebTestCase $client->loginUser($testUser, 'api'); - $client->request( + $name = $this->faker->slug(); + $client->jsonRequest( 'POST', - '/api/media/folder/create', + '/api/media/folder/add', [ - 'name' => 'Test1', + 'title' => $name, ], [], ); - self::assertResponseIsSuccessful($client->getResponse()); - $media = json_decode($client->getResponse()->getContent(), true); + $this->assertResponseIsSuccessful(); + $data = json_decode($client->getResponse()->getContent(), true); + self::assertSame($name, $data['title']); + } + + public function testCreateAndGetFolders(): void + { + $client = static::createClient(); + + $userRepository = static::getContainer()->get(ContactRepository::class); + + $testUser = $userRepository->loadUserByUsername('admin@shop.de'); + + $client->loginUser($testUser, 'api'); + + for ($i = 0; $i < 5; $i++) { + $client->jsonRequest( + 'POST', + '/api/media/folder/add', + [ + 'title' => $this->faker->slug(), + ], + [], + ); + $this->assertResponseIsSuccessful(); + } + $client->jsonRequest('GET', '/api/media/folder/all', [], []); + self::assertCount(5, json_decode($client->getResponse()->getContent(), true)['data']); } } diff --git a/src/new/tests/PSC/Shop/Media/Api/UploadTest.php b/src/new/tests/PSC/Shop/Media/Api/UploadTest.php index 4dae04059..256997805 100644 --- a/src/new/tests/PSC/Shop/Media/Api/UploadTest.php +++ b/src/new/tests/PSC/Shop/Media/Api/UploadTest.php @@ -22,16 +22,17 @@ class UploadTest extends WebTestCase $client->loginUser($testUser, 'api'); - $uploadedFile = new UploadedFile( - __DIR__.'/../../../../kenny.jpg', - 'kenney.jpg' + $uploadedFile = new UploadedFile(__DIR__ . '/../../../../kenny.jpg', 'kenney.jpg'); + $client->request( + 'POST', + '/api/media/create', + [], + [ + 'file' => $uploadedFile, + ], ); - $client->request('POST', '/api/media/create', [], [ - 'file' => $uploadedFile - ]); $media = json_decode($client->getResponse()->getContent(), true); - self::assertSame('kenney.jpg', $media['title']); } } diff --git a/src/new/tests/RefreshDatabaseTrait.php b/src/new/tests/RefreshDatabaseTrait.php index cc612f118..a77dc1d6a 100755 --- a/src/new/tests/RefreshDatabaseTrait.php +++ b/src/new/tests/RefreshDatabaseTrait.php @@ -14,6 +14,7 @@ use PSC\Shop\EntityBundle\Document\Instance; use PSC\Shop\EntityBundle\Document\Order; use PSC\Shop\EntityBundle\Document\Position; use PSC\Shop\EntityBundle\Document\Shop; +use PSC\Shop\MediaBundle\Document\Folder; use PSC\Shop\MediaBundle\Document\Media; use PSC\System\PluginBundle\Document\Plugin; use PSC\System\SettingsBundle\Document\Help; @@ -38,16 +39,17 @@ trait RefreshDatabaseTrait $container = static::$kernel->getContainer(); /** - * @var EntityManagerInterface $doc -*/ + * @var EntityManagerInterface $doc + */ $em = $container->get('doctrine.orm.entity_manager'); /** - * @var DocumentManager $doc -*/ + * @var DocumentManager $doc + */ $doc = $container->get('doctrine_mongodb.odm.document_manager'); $doc->getSchemaManager()->dropDocumentCollection(Media::class); + $doc->getSchemaManager()->dropDocumentCollection(Folder::class); $doc->getSchemaManager()->dropDocumentCollection(Order::class); $doc->getSchemaManager()->dropDocumentCollection(Position::class); $doc->getSchemaManager()->dropDocumentCollection(Instance::class); @@ -69,7 +71,7 @@ trait RefreshDatabaseTrait } $instance = new Instance(); - $instance->setAppId("1"); + $instance->setAppId('1'); $instance->setInvoiceNumberStart(1); $instance->setOfferNumberStart(1); $instance->setCancelationNumberStart(1); @@ -87,7 +89,9 @@ trait RefreshDatabaseTrait $doc->persist($instance); - $shopEntity = $em->getRepository(\PSC\Shop\EntityBundle\Entity\Shop::class)->findOneBy(['title' => 'Printchampion']); + $shopEntity = $em->getRepository(\PSC\Shop\EntityBundle\Entity\Shop::class)->findOneBy([ + 'title' => 'Printchampion', + ]); $shop = new Shop(); $shop->setUid($shopEntity->getUid()); @@ -113,12 +117,12 @@ trait RefreshDatabaseTrait $shop->setParcelCancelationNumberPattern('STS-{{ "now"|date("Ym") }}-{{number}}'); $shop->setParcelInvoiceNumberPattern('STR-{{ "now"|date("Ym") }}-{{number}}'); $shop->setSenderZip(12345); - $shop->setSenderCity("ShopMusterOrt"); - $shop->setSenderCompany("ShopMusterCompany"); - $shop->setSenderLId("ShopMusterLeitwegId"); - $shop->setSenderIban("ShopMusterIban"); - $shop->setSenderEmail("ShopMusterEmail"); - $shop->setSenderSteuerId("ShopMusterSteuerId"); + $shop->setSenderCity('ShopMusterOrt'); + $shop->setSenderCompany('ShopMusterCompany'); + $shop->setSenderLId('ShopMusterLeitwegId'); + $shop->setSenderIban('ShopMusterIban'); + $shop->setSenderEmail('ShopMusterEmail'); + $shop->setSenderSteuerId('ShopMusterSteuerId'); $doc->persist($shop); @@ -130,18 +134,22 @@ trait RefreshDatabaseTrait $doc->persist($country); - $contactEntity = $em->getRepository(\PSC\Shop\EntityBundle\Entity\Contact::class)->findOneBy(['username' => 'company@shop.de']); + $contactEntity = $em->getRepository(\PSC\Shop\EntityBundle\Entity\Contact::class)->findOneBy([ + 'username' => 'company@shop.de', + ]); $contact = new Contact(); $contact->setAccountType(AccountType::COMPANY); - $contact->setUid((string)$contactEntity->getUid()); + $contact->setUid((string) $contactEntity->getUid()); $doc->persist($contact); - $contactEntity = $em->getRepository(\PSC\Shop\EntityBundle\Entity\Contact::class)->findOneBy(['username' => 'association@shop.de']); + $contactEntity = $em->getRepository(\PSC\Shop\EntityBundle\Entity\Contact::class)->findOneBy([ + 'username' => 'association@shop.de', + ]); $contact = new Contact(); $contact->setAccountType(AccountType::ASSOCIATION); - $contact->setUid((string)$contactEntity->getUid()); + $contact->setUid((string) $contactEntity->getUid()); $doc->persist($contact); $help1 = new Help(); @@ -170,5 +178,4 @@ trait RefreshDatabaseTrait return $kernel; } - } diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/Gui.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/Gui.vue index 6ca3c71ba..1307bf50e 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/Gui.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/Gui.vue @@ -13,7 +13,6 @@ import { ElementProperties, SpecialElementProperties } from '../components/app/e import { ElementDependency } from '../components/app/elementdependency' import { Main } from '../components/app/main' import FormulaVisualizer from './app/FormulaVisualizer.vue' -import JsonView from './app/JsonView.vue' import XmlView from './app/XmlView.vue' import ParameterView from './app/ParameterView.vue' import PaperDBView from './app/PaperDBView.vue' diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/FormelView.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/FormelView.vue index af6fcacd6..b6b8354e0 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/FormelView.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/FormelView.vue @@ -3,7 +3,6 @@ import { ref, watch } from 'vue' import { Codemirror } from 'vue-codemirror' import { php } from '@codemirror/lang-php' import { useGlobalStore } from '../../stores/Global' -import { debounce } from 'ts-debounce' import { Button } from '../ui/button' const store = useGlobalStore(); diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/PaperDBView.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/PaperDBView.vue index f7fe30485..94ad97cc7 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/PaperDBView.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/PaperDBView.vue @@ -4,7 +4,6 @@ import { Codemirror } from 'vue-codemirror' import { xml } from '@codemirror/lang-xml' import { useGlobalStore } from '../../stores/Global' import xmlFormat from 'xml-formatter' -import { debounce } from 'ts-debounce' import { Button } from '../ui/button' const store = useGlobalStore(); diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/ParameterView.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/ParameterView.vue index 7047cb6af..8bb22c038 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/ParameterView.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/ParameterView.vue @@ -3,7 +3,6 @@ import { ref, watch } from 'vue' import { Codemirror } from 'vue-codemirror' import { php } from '@codemirror/lang-php' import { useGlobalStore } from '../../stores/Global' -import { debounce } from 'ts-debounce' import { Button } from '../ui/button' const store = useGlobalStore(); diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/TopBar.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/TopBar.vue index 6334a37e1..81ef7d1ea 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/TopBar.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/TopBar.vue @@ -1,10 +1,8 @@ diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/elements/RowElementForm.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/elements/RowElementForm.vue index 3bd521d54..111162842 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/elements/RowElementForm.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/elements/RowElementForm.vue @@ -69,7 +69,7 @@ const dragEnterEmpty = (event: DragEvent, uuid: string) => { } } -const addColumn = (mode: int, model: Row, uuid: string) => { +const addColumn = (mode: number, model: Row, uuid: string) => { if(mode == 1) { model.addColumnAtTheBeginning(new Column()); diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/FieldsetElement.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/FieldsetElement.vue index ca3248de5..8b443110c 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/FieldsetElement.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/FieldsetElement.vue @@ -2,15 +2,6 @@ import FieldsetElement from '../../../model/FieldsetElement'; import { computed } from 'vue'; import { Input } from '../../../components/ui/input' -import { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectTrigger, - SelectValue, -} from '../../../components/ui/select' - const props = defineProps({ modelValue: FieldsetElement }) @@ -27,6 +18,6 @@ const theModel = computed({ diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/MediaElement.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/MediaElement.vue index 9f7ebd0f9..deeaa2170 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/MediaElement.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/MediaElement.vue @@ -2,7 +2,9 @@ import MediaElement from '../../../model/MediaElement'; import { computed } from 'vue'; import { Input } from '../../../components/ui/input' -//import { useMedia } from '../../../composables/useMedia' +import { Button } from '../../../components/ui/button' +import { fetchMediaDirectories, uploadFile } from '../../../lib/api'; +import { onMounted, ref } from 'vue'; const props = defineProps({ modelValue: MediaElement @@ -15,15 +17,121 @@ const theModel = computed({ set: (value) => emit('update:modelValue', value), }); -//const { media, loading, error } = useMedia() +interface Folder { + uuid: string + title: string +} +const uploadProgress = ref(0); +const isDragging = ref(false); +const directories = ref([]); +const selectedDirectory = ref(''); +const onDragOver = () => { + isDragging.value = true; +}; + +const onDragLeave = () => { + isDragging.value = false; +}; + +const onDrop = (event: DragEvent) => { + isDragging.value = false; + const files = event.dataTransfer?.files; + if (files && files.length > 0) { + handleFile(files[0]); + } +}; + +const onFileChange = (event: Event) => { + const target = event.target as HTMLInputElement; + const files = target.files; + if (files && files.length > 0) { + handleFile(files[0]); + } +}; + +onMounted(async () => { + try { + let response: any = await fetchMediaDirectories() + directories.value = response.data + if (response.data.length > 0) { + selectedDirectory.value = directories.value[0].uuid; + } + } catch (error) { + console.error('Failed to fetch directories', error); + } +}); + +const handleFile = async (file: File) => { + uploadProgress.value = 0; + if(selectedDirectory) { + try { + let response = await uploadFile(file, selectedDirectory.value, (progress) => { + uploadProgress.value = progress; + }); + theModel.value.url = response.url + theModel.value.default = response.uuid + // Handle successful upload + } catch (error) { + console.error('Upload failed', error); + // Handle failed upload + } finally { + setTimeout(() => (uploadProgress.value = 0), 2000); + } + } +}; + diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/renderelements/RenderElements.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/renderelements/RenderElements.vue index a5351e0f0..c6e65f62f 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/renderelements/RenderElements.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/renderelements/RenderElements.vue @@ -143,7 +143,7 @@ const editElementDependency = (item: BaseElement) => { /> void) => { +export const uploadFile = async (file: File, folder: string, onProgress: (progress: number) => void) => { const formData = new FormData(); formData.append('file', file); + formData.append('folder', folder); try { - const response = await api.post('api/plugin/media/upload', { // Changed to a more appropriate media upload endpoint + const response = await api.post('api/media/create', { body: formData, onDownloadProgress: (progress) => { onProgress(Math.round(progress.percent * 100)); @@ -128,7 +126,7 @@ export const uploadFile = async (file: File, onProgress: (progress: number) => v export const fetchMediaDirectories = async () => { try { - const response = await api.get('api/plugin/media/directories'); + const response = await api.get('api/media/folder/all'); return await response.json(); } catch (error) { console.error('Error fetching media directories:', error); diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/BaseElement.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/BaseElement.ts index 595b24fa9..e482451fe 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/BaseElement.ts +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/BaseElement.ts @@ -1,4 +1,4 @@ -import {v4 as uuidv4} from 'uuid' +import { v4 as uuidv4 } from 'uuid' import Dependency from './Dependency.ts' export enum ElementType { @@ -11,6 +11,7 @@ export enum ElementType { Column = 8, Row = 7, Media = 9, + FieldsetElement = 12, } export default class BaseElement { @@ -51,15 +52,14 @@ export default class BaseElement { } changeFocus(uuid: string) { - if(this.uuid == uuid) { + if (this.uuid == uuid) { this.isFocused = true - }else{ + } else { this.isFocused = false } } - addDependency(dep: Dependency) - { + addDependency(dep: Dependency) { this.dependencys.push(dep) } diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/MediaElement.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/MediaElement.ts index 6159ff418..71752a894 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/MediaElement.ts +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/MediaElement.ts @@ -1,10 +1,11 @@ import BaseElement from "./BaseElement"; -export default class MediaElement extends BaseElement { +export default class MediaElement extends BaseElement { default: string = "" name: string = "" xmlType: string = "img" - + url: string = "" + constructor() { super(); this.type = 9 diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/stores/Global.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/stores/Global.ts index 0a904c08f..66cc975e3 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/stores/Global.ts +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/stores/Global.ts @@ -24,7 +24,7 @@ export const useGlobalStore = defineStore('global', { shopUuid: "", saving: false, syncing: false, - currentTab: 'designer', + currentTab: 'designer' as string | number, }), getters: { getActiveItem: (state) => state.activeItem as BaseElement, @@ -152,7 +152,7 @@ export const useGlobalStore = defineStore('global', { } }, - setCurrentTab(tab: string) { + setCurrentTab(tab: string | number) { this.currentTab = tab } } diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts index ab5689614..ec76ca0ef 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts @@ -24,12 +24,16 @@ export default defineConfig({ }, server: { proxy: { + '/uploads': { + target: 'http://type-dev-tp.local', + changeOrigin: true, + }, '/apps': { target: 'http://type-dev-tp.local', changeOrigin: true, configure: (proxy) => { proxy.on('proxyReq', (proxyReq) => { - proxyReq.setHeader('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE3NTM2ODg4MTksImV4cCI6MTc1MzY5MjQxOSwicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfU0hPUF9PUEVSQVRPUiIsIlJPTEVfVVNFUiIsIlJPTEVfVVNFUiIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9FZGl0IiwiUk9MRV9QU0NfQ29sbGVjdF9Db250YWN0X0FkZCIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9EZWxldGUiLCJST0xFX1BTQ19Db2xsZWN0X0NvbnRhY3RfTG9jayIsIlJPTEVfUFNDX1IyX1NlbmRjbG91ZF9TaG93Il0sInVpZCI6MX0.j8BCuZxhIqw5G6TVgV9znMkZCF98T96rm6uYyj158-vZWykPbCyLtrNRk1wJXNA5gsGKUQYKffpqOlMFIkc9YlSKcYTSZjyablGlue34ELuoT7h4JXrKSD8SYBB99wphsV0aViAoyabn5L7QZLSzhwqZYxvJrmCW_KcrCcAr1Uy-AGYJNOE39bknwwNolRSPh2Gu5x2tE85LugazW0jo9ghWuPVOB35BB9NN1HHmjwzO4uinv8oorlGSWAsnLOOdjPAY7LjcoAY59v5r3U4FmMkHj5QfxxUsBaN_0ostJWxDfqr2cJqBEk-XimsaGQdyjuD6bintNO_N2m4DxuIjgw'); + proxyReq.setHeader('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE3NTM4ODEwMjUsImV4cCI6MTc1Mzg4NDYyNSwicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfU0hPUF9PUEVSQVRPUiIsIlJPTEVfVVNFUiIsIlJPTEVfVVNFUiIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9FZGl0IiwiUk9MRV9QU0NfQ29sbGVjdF9Db250YWN0X0FkZCIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9EZWxldGUiLCJST0xFX1BTQ19Db2xsZWN0X0NvbnRhY3RfTG9jayIsIlJPTEVfUFNDX1IyX1NlbmRjbG91ZF9TaG93Il0sInVpZCI6MX0.T0JzZ8qoZOqOOGtHXtuGvY5xAwwWGSAHh9MXgGJlyngjsmA_RWUnL8wVW3Ah827sJQNL2W1JPEz_f9CuCvfCSVjoLml9T_n5N5xtB98wVdcksgh3PvtFrYs-NVUat9QlwJ54F0cUXIkyuimEc2op0Y2sSC9Pyw6d9m8WtYrPX657uXZ3U8KcX8FIqCMWpjzIsbLK2QemT-fgkJpVnSdvo8nFvComZ1yDPvj5Zl_m0NEF3CybYdxOOwz42egI297BM_qGp6_cZLeSrl2EwphzeFqPo8-q9wmuHj33HZozlwjlu_Uvp4vq0Jr98-WZkIUwK7706E1t_TdSc46nONyxVA'); }); }, }, diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.css b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.css index f84898271..aa13d670d 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.css +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.css @@ -1 +1 @@ -/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-800:oklch(47% .157 37.304);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-800:oklch(47.6% .114 61.907);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-800:oklch(45.3% .124 130.933);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-600:oklch(60% .118 184.704);--color-teal-800:oklch(43.7% .078 188.216);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-800:oklch(43.8% .218 303.724);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-xs:.125rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2,.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-8{margin-block:calc(var(--spacing)*8)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-5{margin-right:calc(var(--spacing)*5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-6{margin-left:calc(var(--spacing)*6)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.size-2\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.h-1{height:calc(var(--spacing)*1)}.h-4{height:calc(var(--spacing)*4)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-\[1\.15rem\]{height:1.15rem}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[var\(--reka-select-trigger-height\)\]{height:var(--reka-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\(--reka-select-content-available-height\){max-height:var(--reka-select-content-available-height)}.max-h-\[90dvh\]{max-height:90dvh}.min-h-5{min-height:calc(var(--spacing)*5)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-8{width:calc(var(--spacing)*8)}.w-60{width:calc(var(--spacing)*60)}.w-64{width:calc(var(--spacing)*64)}.w-\[180px\]{width:180px}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--reka-select-trigger-width\)\]{min-width:var(--reka-select-trigger-width)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-rows-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.content-center{align-content:center}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}.overflow-auto{overflow:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[4px\]{border-radius:4px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-b-lg{border-bottom-right-radius:var(--radius);border-bottom-left-radius:var(--radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-3{border-left-style:var(--tw-border-style);border-left-width:3px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-black{border-color:var(--color-black)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-500{border-color:var(--color-blue-500)}.border-border{border-color:var(--border)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-500{border-color:var(--color-green-500)}.border-input{border-color:var(--input)}.border-lime-400{border-color:var(--color-lime-400)}.border-orange-300{border-color:var(--color-orange-300)}.border-purple-300{border-color:var(--color-purple-300)}.border-red-300{border-color:var(--color-red-300)}.border-red-500{border-color:var(--color-red-500)}.border-teal-300{border-color:var(--color-teal-300)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-300{border-color:var(--color-yellow-300)}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-border{background-color:var(--border)}.bg-destructive{background-color:var(--destructive)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-200{background-color:var(--color-green-200)}.bg-lime-100{background-color:var(--color-lime-100)}.bg-muted{background-color:var(--muted)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-secondary{background-color:var(--secondary)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-teal-100{background-color:var(--color-teal-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-\[3px\]{padding:3px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-1{padding-top:calc(var(--spacing)*1)}.pr-8{padding-right:calc(var(--spacing)*8)}.pl-2{padding-left:calc(var(--spacing)*2)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-current{color:currentColor}.text-foreground{color:var(--foreground)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-lime-800{color:var(--color-lime-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-800{color:var(--color-orange-800)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-600{color:var(--color-purple-600)}.text-purple-800{color:var(--color-purple-800)}.text-red-500{color:var(--color-red-500)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-teal-600{color:var(--color-teal-600)}.text-teal-800{color:var(--color-teal-800)}.text-white{color:var(--color-white)}.text-yellow-800{color:var(--color-yellow-800)}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing)*0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing)*1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}@media (hover:hover){.hover\:border-orange-500:hover{border-color:var(--color-orange-500)}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[orientation\=vertical\]\:h-px[data-orientation=vertical]{height:1px}.data-\[orientation\=vertical\]\:w-full[data-orientation=vertical]{width:100%}.data-\[orientation\=vertical\]\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\[orientation\=vertical\]\:after\:left-0[data-orientation=vertical]:after{content:var(--tw-content);left:calc(var(--spacing)*0)}.data-\[orientation\=vertical\]\:after\:h-1[data-orientation=vertical]:after{content:var(--tw-content);height:calc(var(--spacing)*1)}.data-\[orientation\=vertical\]\:after\:w-full[data-orientation=vertical]:after{content:var(--tw-content);width:100%}.data-\[orientation\=vertical\]\:after\:translate-x-0[data-orientation=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[orientation\=vertical\]\:after\:-translate-y-1\/2[data-orientation=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@media (min-width:40rem){.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:48rem){.md\:w-full{width:100%}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}.dark\:bg-gray-700:is(.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}.dark\:text-white:is(.dark *){color:var(--color-white)}@media (hover:hover){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input)80%,transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_svg\:not\(\[class\*\=\\\'size-\\\'\]\)\]\:size-4 svg:not([class*="'size-'"]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}.\[\&\[data-orientation\=vertical\]\>div\]\:rotate-90[data-orientation=vertical]>div{rotate:90deg}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--destructive-foreground:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--radius:.625rem;--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(14.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(14.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(98.5% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(39.6% .141 25.723);--destructive-foreground:oklch(63.7% .237 25.331);--border:oklch(26.9% 0 0);--input:oklch(26.9% 0 0);--ring:oklch(43.9% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(26.9% 0 0);--sidebar-ring:oklch(43.9% 0 0)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}.element:hover>.buttons[data-v-30c8d590]{visibility:visible} +/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-800:oklch(47% .157 37.304);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-800:oklch(47.6% .114 61.907);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-800:oklch(45.3% .124 130.933);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-600:oklch(60% .118 184.704);--color-teal-800:oklch(43.7% .078 188.216);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-800:oklch(43.8% .218 303.724);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-xs:.125rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2,.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-8{margin-block:calc(var(--spacing)*8)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-5{margin-right:calc(var(--spacing)*5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-6{margin-left:calc(var(--spacing)*6)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.size-2\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.h-1{height:calc(var(--spacing)*1)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-4{height:calc(var(--spacing)*4)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-32{height:calc(var(--spacing)*32)}.h-\[1\.15rem\]{height:1.15rem}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[var\(--reka-select-trigger-height\)\]{height:var(--reka-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\(--reka-select-content-available-height\){max-height:var(--reka-select-content-available-height)}.max-h-\[90dvh\]{max-height:90dvh}.min-h-5{min-height:calc(var(--spacing)*5)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-8{width:calc(var(--spacing)*8)}.w-60{width:calc(var(--spacing)*60)}.w-64{width:calc(var(--spacing)*64)}.w-\[180px\]{width:180px}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--reka-select-trigger-width\)\]{min-width:var(--reka-select-trigger-width)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-rows-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.content-center{align-content:center}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}.place-self-center{place-self:center}.overflow-auto{overflow:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[4px\]{border-radius:4px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-b-lg{border-bottom-right-radius:var(--radius);border-bottom-left-radius:var(--radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-3{border-left-style:var(--tw-border-style);border-left-width:3px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-black{border-color:var(--color-black)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-500{border-color:var(--color-blue-500)}.border-border{border-color:var(--border)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-500{border-color:var(--color-green-500)}.border-input{border-color:var(--input)}.border-lime-400{border-color:var(--color-lime-400)}.border-orange-300{border-color:var(--color-orange-300)}.border-purple-300{border-color:var(--color-purple-300)}.border-red-300{border-color:var(--color-red-300)}.border-red-500{border-color:var(--color-red-500)}.border-teal-300{border-color:var(--color-teal-300)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-300{border-color:var(--color-yellow-300)}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-border{background-color:var(--border)}.bg-destructive{background-color:var(--destructive)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-200{background-color:var(--color-green-200)}.bg-lime-100{background-color:var(--color-lime-100)}.bg-muted{background-color:var(--muted)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-secondary{background-color:var(--secondary)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-teal-100{background-color:var(--color-teal-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-\[3px\]{padding:3px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-10{padding-block:calc(var(--spacing)*10)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-5{padding-top:calc(var(--spacing)*5)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-2{padding-left:calc(var(--spacing)*2)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-current{color:currentColor}.text-foreground{color:var(--foreground)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-lime-800{color:var(--color-lime-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-800{color:var(--color-orange-800)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-600{color:var(--color-purple-600)}.text-purple-800{color:var(--color-purple-800)}.text-red-500{color:var(--color-red-500)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-teal-600{color:var(--color-teal-600)}.text-teal-800{color:var(--color-teal-800)}.text-white{color:var(--color-white)}.text-yellow-800{color:var(--color-yellow-800)}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing)*0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing)*1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}@media (hover:hover){.hover\:border-orange-500:hover{border-color:var(--color-orange-500)}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[orientation\=vertical\]\:h-px[data-orientation=vertical]{height:1px}.data-\[orientation\=vertical\]\:w-full[data-orientation=vertical]{width:100%}.data-\[orientation\=vertical\]\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\[orientation\=vertical\]\:after\:left-0[data-orientation=vertical]:after{content:var(--tw-content);left:calc(var(--spacing)*0)}.data-\[orientation\=vertical\]\:after\:h-1[data-orientation=vertical]:after{content:var(--tw-content);height:calc(var(--spacing)*1)}.data-\[orientation\=vertical\]\:after\:w-full[data-orientation=vertical]:after{content:var(--tw-content);width:100%}.data-\[orientation\=vertical\]\:after\:translate-x-0[data-orientation=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[orientation\=vertical\]\:after\:-translate-y-1\/2[data-orientation=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@media (min-width:40rem){.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width:48rem){.md\:w-full{width:100%}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:border-gray-600:is(.dark *){border-color:var(--color-gray-600)}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}.dark\:bg-gray-700:is(.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}.dark\:text-white:is(.dark *){color:var(--color-white)}@media (hover:hover){.dark\:hover\:border-gray-500:is(.dark *):hover{border-color:var(--color-gray-500)}.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.dark\:hover\:bg-gray-600:is(.dark *):hover{background-color:var(--color-gray-600)}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input)80%,transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_svg\:not\(\[class\*\=\\\'size-\\\'\]\)\]\:size-4 svg:not([class*="'size-'"]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}.\[\&\[data-orientation\=vertical\]\>div\]\:rotate-90[data-orientation=vertical]>div{rotate:90deg}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--destructive-foreground:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--radius:.625rem;--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(14.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(14.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(98.5% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(39.6% .141 25.723);--destructive-foreground:oklch(63.7% .237 25.331);--border:oklch(26.9% 0 0);--input:oklch(26.9% 0 0);--ring:oklch(43.9% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(26.9% 0 0);--sidebar-ring:oklch(43.9% 0 0)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}.element:hover>.buttons[data-v-ce332e58]{visibility:visible} diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.js b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.js index 0df463930..f2e53b467 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.js +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/public/formbuilderts/assets/index.js @@ -1,175 +1,207 @@ -var l_=Object.defineProperty;var $g=t=>{throw TypeError(t)};var a_=(t,e,n)=>e in t?l_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var he=(t,e,n)=>a_(t,typeof e!="symbol"?e+"":e,n),c_=(t,e,n)=>e.has(t)||$g("Cannot "+n);var Yo=(t,e,n)=>(c_(t,e,"read from private field"),n?n.call(t):e.get(t)),Vg=(t,e,n)=>e.has(t)?$g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();/** +var P_=Object.defineProperty;var qg=t=>{throw TypeError(t)};var x_=(t,e,n)=>e in t?P_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var de=(t,e,n)=>x_(t,typeof e!="symbol"?e+"":e,n),w_=(t,e,n)=>e.has(t)||qg("Cannot "+n);var ga=(t,e,n)=>(w_(t,e,"read from private field"),n?n.call(t):e.get(t)),Ig=(t,e,n)=>e.has(t)?qg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();/** * @vue/shared v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function qu(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const We={},oo=[],Yn=()=>{},u_=()=>!1,ha=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Hp=t=>t.startsWith("onUpdate:"),ut=Object.assign,Up=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},f_=Object.prototype.hasOwnProperty,Ze=(t,e)=>f_.call(t,e),we=Array.isArray,lo=t=>Vo(t)==="[object Map]",Ir=t=>Vo(t)==="[object Set]",Bg=t=>Vo(t)==="[object Date]",d_=t=>Vo(t)==="[object RegExp]",_e=t=>typeof t=="function",ht=t=>typeof t=="string",ui=t=>typeof t=="symbol",ot=t=>t!==null&&typeof t=="object",jp=t=>(ot(t)||_e(t))&&_e(t.then)&&_e(t.catch),qv=Object.prototype.toString,Vo=t=>qv.call(t),h_=t=>Vo(t).slice(8,-1),Ku=t=>Vo(t)==="[object Object]",qp=t=>ht(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ao=qu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Gu=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},p_=/-(\w)/g,Bt=Gu(t=>t.replace(p_,(e,n)=>n?n.toUpperCase():"")),m_=/\B([A-Z])/g,On=Gu(t=>t.replace(m_,"-$1").toLowerCase()),pa=Gu(t=>t.charAt(0).toUpperCase()+t.slice(1)),co=Gu(t=>t?`on${pa(t)}`:""),cn=(t,e)=>!Object.is(t,e),uo=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},Xc=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Jc=t=>{const e=ht(t)?Number(t):NaN;return isNaN(e)?t:e};let Fg;const Yu=()=>Fg||(Fg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),g_="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",y_=qu(g_);function ti(t){if(we(t)){const e={};for(let n=0;n{if(n){const i=n.split(v_);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Ct(t){let e="";if(ht(t))e=t;else if(we(t))for(let n=0;nqs(n,e))}const Yv=t=>!!(t&&t.__v_isRef===!0),oe=t=>ht(t)?t:t==null?"":we(t)||ot(t)&&(t.toString===qv||!_e(t.toString))?Yv(t)?oe(t.value):JSON.stringify(t,Xv,2):String(t),Xv=(t,e)=>Yv(e)?Xv(t,e.value):lo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[Xf(i,r)+" =>"]=s,n),{})}:Ir(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Xf(n))}:ui(e)?Xf(e):ot(e)&&!we(e)&&!Ku(e)?String(e):e,Xf=(t,e="")=>{var n;return ui(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** +**//*! #__NO_SIDE_EFFECTS__ */function wO(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const We={},So=[],si=()=>{},T_=()=>!1,ql=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Zp=t=>t.startsWith("onUpdate:"),Ot=Object.assign,zp=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},__=Object.prototype.hasOwnProperty,tt=(t,e)=>__.call(t,e),ye=Array.isArray,vo=t=>ta(t)==="[object Map]",jr=t=>ta(t)==="[object Set]",Ug=t=>ta(t)==="[object Date]",k_=t=>ta(t)==="[object RegExp]",ke=t=>typeof t=="function",pt=t=>typeof t=="string",mi=t=>typeof t=="symbol",at=t=>t!==null&&typeof t=="object",Yp=t=>(at(t)||ke(t))&&ke(t.then)&&ke(t.catch),PS=Object.prototype.toString,ta=t=>PS.call(t),R_=t=>ta(t).slice(8,-1),TO=t=>ta(t)==="[object Object]",Mp=t=>pt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Po=wO(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_O=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},X_=/-(\w)/g,Wt=_O(t=>t.replace(X_,(e,n)=>n?n.toUpperCase():"")),C_=/\B([A-Z])/g,Rn=_O(t=>t.replace(C_,"-$1").toLowerCase()),Il=_O(t=>t.charAt(0).toUpperCase()+t.slice(1)),xo=_O(t=>t?`on${Il(t)}`:""),hn=(t,e)=>!Object.is(t,e),wo=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},xu=t=>{const e=parseFloat(t);return isNaN(e)?t:e},wu=t=>{const e=pt(t)?Number(t):NaN;return isNaN(e)?t:e};let Wg;const kO=()=>Wg||(Wg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),V_="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",A_=wO(V_);function Gn(t){if(ye(t)){const e={};for(let n=0;n{if(n){const i=n.split(Z_);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function bt(t){let e="";if(pt(t))e=t;else if(ye(t))for(let n=0;ntr(n,e))}const TS=t=>!!(t&&t.__v_isRef===!0),ne=t=>pt(t)?t:t==null?"":ye(t)||at(t)&&(t.toString===PS||!ke(t.toString))?TS(t)?ne(t.value):JSON.stringify(t,_S,2):String(t),_S=(t,e)=>TS(e)?_S(t,e.value):vo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[_f(i,r)+" =>"]=s,n),{})}:jr(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>_f(n))}:mi(e)?_f(e):at(e)&&!ye(e)&&!TO(e)?String(e):e,_f=(t,e="")=>{var n;return mi(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** * @vue/reactivity v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let en;class Kp{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=en,!e&&en&&(this.index=(en.scopes||(en.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0&&--this._on===0&&(en=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n0)return;if(vl){let e=vl;for(vl=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;bl;){let e=bl;for(bl=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Zv(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function e1(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),Xp(i),C_(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function th(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(t1(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function t1(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Dl)||(t.globalVersion=Dl,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!th(t))))return;t.flags|=2;const e=t.dep,n=dt,i=ci;dt=t,ci=!0;try{Zv(t);const s=t.fn(t._value);(e.version===0||cn(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{dt=n,ci=i,e1(t),t.flags&=-3}}function Xp(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Xp(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function C_(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function __(t,e){t.effect instanceof Ml&&(t=t.effect.fn);const n=new Ml(t);e&&ut(n,e);try{n.run()}catch(s){throw n.stop(),s}const i=n.run.bind(n);return i.effect=n,i}function A_(t){t.effect.stop()}let ci=!0;const n1=[];function as(){n1.push(ci),ci=!1}function cs(){const t=n1.pop();ci=t===void 0?!0:t}function Wg(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=dt;dt=void 0;try{e()}finally{dt=n}}}let Dl=0;class E_{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Zu{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!dt||!ci||dt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dt)n=this.activeLink=new E_(dt,this),dt.deps?(n.prevDep=dt.depsTail,dt.depsTail.nextDep=n,dt.depsTail=n):dt.deps=dt.depsTail=n,i1(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=dt.depsTail,n.nextDep=void 0,dt.depsTail.nextDep=n,dt.depsTail=n,dt.deps===n&&(dt.deps=i)}return n}trigger(e){this.version++,Dl++,this.notify(e)}notify(e){Gp();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Yp()}}}function i1(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)i1(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Qc=new WeakMap,wr=Symbol(""),nh=Symbol(""),Rl=Symbol("");function nn(t,e,n){if(ci&&dt){let i=Qc.get(t);i||Qc.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new Zu),s.map=i,s.key=n),s.track()}}function Qi(t,e,n,i,s,r){const o=Qc.get(t);if(!o){Dl++;return}const l=a=>{a&&a.trigger()};if(Gp(),e==="clear")o.forEach(l);else{const a=we(t),c=a&&qp(n);if(a&&n==="length"){const u=Number(i);o.forEach((f,d)=>{(d==="length"||d===Rl||!ui(d)&&d>=u)&&l(f)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),c&&l(o.get(Rl)),e){case"add":a?c&&l(o.get("length")):(l(o.get(wr)),lo(t)&&l(o.get(nh)));break;case"delete":a||(l(o.get(wr)),lo(t)&&l(o.get(nh)));break;case"set":lo(t)&&l(o.get(wr));break}}Yp()}function T_(t,e){const n=Qc.get(t);return n&&n.get(e)}function Wr(t){const e=Ve(t);return e===t?e:(nn(e,"iterate",Rl),Vn(t)?e:e.map(Yt))}function ef(t){return nn(t=Ve(t),"iterate",Rl),t}const P_={__proto__:null,[Symbol.iterator](){return Qf(this,Symbol.iterator,Yt)},concat(...t){return Wr(this).concat(...t.map(e=>we(e)?Wr(e):e))},entries(){return Qf(this,"entries",t=>(t[1]=Yt(t[1]),t))},every(t,e){return qi(this,"every",t,e,void 0,arguments)},filter(t,e){return qi(this,"filter",t,e,n=>n.map(Yt),arguments)},find(t,e){return qi(this,"find",t,e,Yt,arguments)},findIndex(t,e){return qi(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return qi(this,"findLast",t,e,Yt,arguments)},findLastIndex(t,e){return qi(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return qi(this,"forEach",t,e,void 0,arguments)},includes(...t){return Zf(this,"includes",t)},indexOf(...t){return Zf(this,"indexOf",t)},join(t){return Wr(this).join(t)},lastIndexOf(...t){return Zf(this,"lastIndexOf",t)},map(t,e){return qi(this,"map",t,e,void 0,arguments)},pop(){return Xo(this,"pop")},push(...t){return Xo(this,"push",t)},reduce(t,...e){return zg(this,"reduce",t,e)},reduceRight(t,...e){return zg(this,"reduceRight",t,e)},shift(){return Xo(this,"shift")},some(t,e){return qi(this,"some",t,e,void 0,arguments)},splice(...t){return Xo(this,"splice",t)},toReversed(){return Wr(this).toReversed()},toSorted(t){return Wr(this).toSorted(t)},toSpliced(...t){return Wr(this).toSpliced(...t)},unshift(...t){return Xo(this,"unshift",t)},values(){return Qf(this,"values",Yt)}};function Qf(t,e,n){const i=ef(t),s=i[e]();return i!==t&&!Vn(t)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=n(r.value)),r}),s}const M_=Array.prototype;function qi(t,e,n,i,s,r){const o=ef(t),l=o!==t&&!Vn(t),a=o[e];if(a!==M_[e]){const f=a.apply(t,r);return l?Yt(f):f}let c=n;o!==t&&(l?c=function(f,d){return n.call(this,Yt(f),d,t)}:n.length>2&&(c=function(f,d){return n.call(this,f,d,t)}));const u=a.call(o,c,i);return l&&s?s(u):u}function zg(t,e,n,i){const s=ef(t);let r=n;return s!==t&&(Vn(t)?n.length>3&&(r=function(o,l,a){return n.call(this,o,l,a,t)}):r=function(o,l,a){return n.call(this,o,Yt(l),a,t)}),s[e](r,...i)}function Zf(t,e,n){const i=Ve(t);nn(i,"iterate",Rl);const s=i[e](...n);return(s===-1||s===!1)&&rf(n[0])?(n[0]=Ve(n[0]),i[e](...n)):s}function Xo(t,e,n=[]){as(),Gp();const i=Ve(t)[e].apply(t,n);return Yp(),cs(),i}const D_=qu("__proto__,__v_isRef,__isVue"),s1=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(ui));function R_(t){ui(t)||(t=String(t));const e=Ve(this);return nn(e,"has",t),e.hasOwnProperty(t)}class r1{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const s=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(s?r?f1:u1:r?c1:a1).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=we(e);if(!s){let a;if(o&&(a=P_[n]))return a;if(n==="hasOwnProperty")return R_}const l=Reflect.get(e,n,qe(e)?e:i);return(ui(n)?s1.has(n):D_(n))||(s||nn(e,"get",n),r)?l:qe(l)?o&&qp(n)?l:l.value:ot(l)?s?nf(l):us(l):l}}class o1 extends r1{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];if(!this._isShallow){const a=fs(r);if(!Vn(i)&&!fs(i)&&(r=Ve(r),i=Ve(i)),!we(e)&&qe(r)&&!qe(i))return a?!1:(r.value=i,!0)}const o=we(e)&&qp(n)?Number(n)t,Ia=t=>Reflect.getPrototypeOf(t);function V_(t,e,n){return function(...i){const s=this.__v_raw,r=Ve(s),o=lo(r),l=t==="entries"||t===Symbol.iterator&&o,a=t==="keys"&&o,c=s[t](...i),u=n?ih:e?Zc:Yt;return!e&&nn(r,"iterate",a?nh:wr),{next(){const{value:f,done:d}=c.next();return d?{value:f,done:d}:{value:l?[u(f[0]),u(f[1])]:u(f),done:d}},[Symbol.iterator](){return this}}}}function La(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function B_(t,e){const n={get(s){const r=this.__v_raw,o=Ve(r),l=Ve(s);t||(cn(s,l)&&nn(o,"get",s),nn(o,"get",l));const{has:a}=Ia(o),c=e?ih:t?Zc:Yt;if(a.call(o,s))return c(r.get(s));if(a.call(o,l))return c(r.get(l));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!t&&nn(Ve(s),"iterate",wr),Reflect.get(s,"size",s)},has(s){const r=this.__v_raw,o=Ve(r),l=Ve(s);return t||(cn(s,l)&&nn(o,"has",s),nn(o,"has",l)),s===l?r.has(s):r.has(s)||r.has(l)},forEach(s,r){const o=this,l=o.__v_raw,a=Ve(l),c=e?ih:t?Zc:Yt;return!t&&nn(a,"iterate",wr),l.forEach((u,f)=>s.call(r,c(u),c(f),o))}};return ut(n,t?{add:La("add"),set:La("set"),delete:La("delete"),clear:La("clear")}:{add(s){!e&&!Vn(s)&&!fs(s)&&(s=Ve(s));const r=Ve(this);return Ia(r).has.call(r,s)||(r.add(s),Qi(r,"add",s,s)),this},set(s,r){!e&&!Vn(r)&&!fs(r)&&(r=Ve(r));const o=Ve(this),{has:l,get:a}=Ia(o);let c=l.call(o,s);c||(s=Ve(s),c=l.call(o,s));const u=a.call(o,s);return o.set(s,r),c?cn(r,u)&&Qi(o,"set",s,r):Qi(o,"add",s,r),this},delete(s){const r=Ve(this),{has:o,get:l}=Ia(r);let a=o.call(r,s);a||(s=Ve(s),a=o.call(r,s)),l&&l.call(r,s);const c=r.delete(s);return a&&Qi(r,"delete",s,void 0),c},clear(){const s=Ve(this),r=s.size!==0,o=s.clear();return r&&Qi(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=V_(s,t,e)}),n}function tf(t,e){const n=B_(t,e);return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(Ze(n,s)&&s in i?n:i,s,r)}const F_={get:tf(!1,!1)},W_={get:tf(!1,!0)},z_={get:tf(!0,!1)},H_={get:tf(!0,!0)},a1=new WeakMap,c1=new WeakMap,u1=new WeakMap,f1=new WeakMap;function U_(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function j_(t){return t.__v_skip||!Object.isExtensible(t)?0:U_(h_(t))}function us(t){return fs(t)?t:sf(t,!1,I_,F_,a1)}function d1(t){return sf(t,!1,N_,W_,c1)}function nf(t){return sf(t,!0,L_,z_,u1)}function dr(t){return sf(t,!0,$_,H_,f1)}function sf(t,e,n,i,s){if(!ot(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=j_(t);if(r===0)return t;const o=s.get(t);if(o)return o;const l=new Proxy(t,r===2?i:n);return s.set(t,l),l}function Ri(t){return fs(t)?Ri(t.__v_raw):!!(t&&t.__v_isReactive)}function fs(t){return!!(t&&t.__v_isReadonly)}function Vn(t){return!!(t&&t.__v_isShallow)}function rf(t){return t?!!t.__v_raw:!1}function Ve(t){const e=t&&t.__v_raw;return e?Ve(e):t}function ga(t){return!Ze(t,"__v_skip")&&Object.isExtensible(t)&&Kv(t,"__v_skip",!0),t}const Yt=t=>ot(t)?us(t):t,Zc=t=>ot(t)?nf(t):t;function qe(t){return t?t.__v_isRef===!0:!1}function se(t){return h1(t,!1)}function rs(t){return h1(t,!0)}function h1(t,e){return qe(t)?t:new q_(t,e)}class q_{constructor(e,n){this.dep=new Zu,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:Ve(e),this._value=n?e:Yt(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Vn(e)||fs(e);e=i?e:Ve(e),cn(e,n)&&(this._rawValue=e,this._value=i?e:Yt(e),this.dep.trigger())}}function K_(t){t.dep&&t.dep.trigger()}function v(t){return qe(t)?t.value:t}function Qt(t){return _e(t)?t():v(t)}const G_={get:(t,e,n)=>e==="__v_raw"?t:v(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return qe(s)&&!qe(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function Jp(t){return Ri(t)?t:new Proxy(t,G_)}class Y_{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Zu,{get:i,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function Qp(t){return new Y_(t)}function yn(t){const e=we(t)?new Array(t.length):{};for(const n in t)e[n]=m1(t,n);return e}class X_{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return T_(Ve(this._object),this._key)}}class J_{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function p1(t,e,n){return qe(t)?t:_e(t)?new J_(t):ot(t)&&arguments.length>1?m1(t,e,n):se(t)}function m1(t,e,n){const i=t[e];return qe(i)?i:new X_(t,e,n)}class Q_{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new Zu(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Dl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&dt!==this)return Qv(this,!0),!0}get value(){const e=this.dep.track();return t1(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Z_(t,e,n=!1){let i,s;return _e(t)?i=t:(i=t.get,s=t.set),new Q_(i,s,n)}const eA={GET:"get",HAS:"has",ITERATE:"iterate"},tA={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Na={},eu=new WeakMap;let Ms;function nA(){return Ms}function g1(t,e=!1,n=Ms){if(n){let i=eu.get(n);i||eu.set(n,i=[]),i.push(t)}}function iA(t,e,n=We){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:l,call:a}=n,c=w=>s?w:Vn(w)||s===!1||s===0?Zi(w,1):Zi(w);let u,f,d,h,p=!1,m=!1;if(qe(t)?(f=()=>t.value,p=Vn(t)):Ri(t)?(f=()=>c(t),p=!0):we(t)?(m=!0,p=t.some(w=>Ri(w)||Vn(w)),f=()=>t.map(w=>{if(qe(w))return w.value;if(Ri(w))return c(w);if(_e(w))return a?a(w,2):w()})):_e(t)?e?f=a?()=>a(t,2):t:f=()=>{if(d){as();try{d()}finally{cs()}}const w=Ms;Ms=u;try{return a?a(t,3,[h]):t(h)}finally{Ms=w}}:f=Yn,e&&s){const w=f,S=s===!0?1/0:s;f=()=>Zi(w(),S)}const y=ma(),g=()=>{u.stop(),y&&y.active&&Up(y.effects,u)};if(r&&e){const w=e;e=(...S)=>{w(...S),g()}}let x=m?new Array(t.length).fill(Na):Na;const b=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(e){const S=u.run();if(s||p||(m?S.some((k,O)=>cn(k,x[O])):cn(S,x))){d&&d();const k=Ms;Ms=u;try{const O=[S,x===Na?void 0:m&&x[0]===Na?[]:x,h];x=S,a?a(e,3,O):e(...O)}finally{Ms=k}}}else u.run()};return l&&l(b),u=new Ml(f),u.scheduler=o?()=>o(b,!1):b,h=w=>g1(w,!1,u),d=u.onStop=()=>{const w=eu.get(u);if(w){if(a)a(w,4);else for(const S of w)S();eu.delete(u)}},e?i?b(!0):x=u.run():o?o(b.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}function Zi(t,e=1/0,n){if(e<=0||!ot(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,qe(t))Zi(t.value,e,n);else if(we(t))for(let i=0;i{Zi(i,e,n)});else if(Ku(t)){for(const i in t)Zi(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Zi(t[i],e,n)}return t}/** +**/let rn;class qp{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=rn,!e&&rn&&(this.index=(rn.scopes||(rn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0&&--this._on===0&&(rn=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n0)return;if(Da){let e=Da;for(Da=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Wa;){let e=Wa;for(Wa=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function XS(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function CS(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),Wp(i),U_(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function Wd(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(VS(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function VS(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===sl)||(t.globalVersion=sl,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Wd(t))))return;t.flags|=2;const e=t.dep,n=dt,i=pi;dt=t,pi=!0;try{XS(t);const s=t.fn(t._value);(e.version===0||hn(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{dt=n,pi=i,CS(t),t.flags&=-3}}function Wp(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Wp(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function U_(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function W_(t,e){t.effect instanceof il&&(t=t.effect.fn);const n=new il(t);e&&Ot(n,e);try{n.run()}catch(s){throw n.stop(),s}const i=n.run.bind(n);return i.effect=n,i}function D_(t){t.effect.stop()}let pi=!0;const AS=[];function ys(){AS.push(pi),pi=!1}function bs(){const t=AS.pop();pi=t===void 0?!0:t}function Dg(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=dt;dt=void 0;try{e()}finally{dt=n}}}let sl=0;class L_{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class VO{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!dt||!pi||dt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dt)n=this.activeLink=new L_(dt,this),dt.deps?(n.prevDep=dt.depsTail,dt.depsTail.nextDep=n,dt.depsTail=n):dt.deps=dt.depsTail=n,ES(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=dt.depsTail,n.nextDep=void 0,dt.depsTail.nextDep=n,dt.depsTail=n,dt.deps===n&&(dt.deps=i)}return n}trigger(e){this.version++,sl++,this.notify(e)}notify(e){Ip();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Up()}}}function ES(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)ES(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Tu=new WeakMap,Cr=Symbol(""),Dd=Symbol(""),rl=Symbol("");function an(t,e,n){if(pi&&dt){let i=Tu.get(t);i||Tu.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new VO),s.map=i,s.key=n),s.track()}}function cs(t,e,n,i,s,r){const o=Tu.get(t);if(!o){sl++;return}const a=l=>{l&&l.trigger()};if(Ip(),e==="clear")o.forEach(a);else{const l=ye(t),c=l&&Mp(n);if(l&&n==="length"){const u=Number(i);o.forEach((O,f)=>{(f==="length"||f===rl||!mi(f)&&f>=u)&&a(O)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(rl)),e){case"add":l?c&&a(o.get("length")):(a(o.get(Cr)),vo(t)&&a(o.get(Dd)));break;case"delete":l||(a(o.get(Cr)),vo(t)&&a(o.get(Dd)));break;case"set":vo(t)&&a(o.get(Cr));break}}Up()}function N_(t,e){const n=Tu.get(t);return n&&n.get(e)}function eo(t){const e=qe(t);return e===t?e:(an(e,"iterate",rl),Ln(t)?e:e.map(Kt))}function AO(t){return an(t=qe(t),"iterate",rl),t}const j_={__proto__:null,[Symbol.iterator](){return Rf(this,Symbol.iterator,Kt)},concat(...t){return eo(this).concat(...t.map(e=>ye(e)?eo(e):e))},entries(){return Rf(this,"entries",t=>(t[1]=Kt(t[1]),t))},every(t,e){return ns(this,"every",t,e,void 0,arguments)},filter(t,e){return ns(this,"filter",t,e,n=>n.map(Kt),arguments)},find(t,e){return ns(this,"find",t,e,Kt,arguments)},findIndex(t,e){return ns(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ns(this,"findLast",t,e,Kt,arguments)},findLastIndex(t,e){return ns(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ns(this,"forEach",t,e,void 0,arguments)},includes(...t){return Xf(this,"includes",t)},indexOf(...t){return Xf(this,"indexOf",t)},join(t){return eo(this).join(t)},lastIndexOf(...t){return Xf(this,"lastIndexOf",t)},map(t,e){return ns(this,"map",t,e,void 0,arguments)},pop(){return $a(this,"pop")},push(...t){return $a(this,"push",t)},reduce(t,...e){return Lg(this,"reduce",t,e)},reduceRight(t,...e){return Lg(this,"reduceRight",t,e)},shift(){return $a(this,"shift")},some(t,e){return ns(this,"some",t,e,void 0,arguments)},splice(...t){return $a(this,"splice",t)},toReversed(){return eo(this).toReversed()},toSorted(t){return eo(this).toSorted(t)},toSpliced(...t){return eo(this).toSpliced(...t)},unshift(...t){return $a(this,"unshift",t)},values(){return Rf(this,"values",Kt)}};function Rf(t,e,n){const i=AO(t),s=i[e]();return i!==t&&!Ln(t)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=n(r.value)),r}),s}const B_=Array.prototype;function ns(t,e,n,i,s,r){const o=AO(t),a=o!==t&&!Ln(t),l=o[e];if(l!==B_[e]){const O=l.apply(t,r);return a?Kt(O):O}let c=n;o!==t&&(a?c=function(O,f){return n.call(this,Kt(O),f,t)}:n.length>2&&(c=function(O,f){return n.call(this,O,f,t)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Lg(t,e,n,i){const s=AO(t);let r=n;return s!==t&&(Ln(t)?n.length>3&&(r=function(o,a,l){return n.call(this,o,a,l,t)}):r=function(o,a,l){return n.call(this,o,Kt(a),l,t)}),s[e](r,...i)}function Xf(t,e,n){const i=qe(t);an(i,"iterate",rl);const s=i[e](...n);return(s===-1||s===!1)&&YO(n[0])?(n[0]=qe(n[0]),i[e](...n)):s}function $a(t,e,n=[]){ys(),Ip();const i=qe(t)[e].apply(t,n);return Up(),bs(),i}const G_=wO("__proto__,__v_isRef,__isVue"),ZS=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(mi));function F_(t){mi(t)||(t=String(t));const e=qe(this);return an(e,"has",t),e.hasOwnProperty(t)}class zS{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const s=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(s?r?WS:US:r?IS:qS).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=ye(e);if(!s){let l;if(o&&(l=j_[n]))return l;if(n==="hasOwnProperty")return F_}const a=Reflect.get(e,n,Ge(e)?e:i);return(mi(n)?ZS.has(n):G_(n))||(s||an(e,"get",n),r)?a:Ge(a)?o&&Mp(n)?a:a.value:at(a)?s?ZO(a):Ss(a):a}}class YS extends zS{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];if(!this._isShallow){const l=vs(r);if(!Ln(i)&&!vs(i)&&(r=qe(r),i=qe(i)),!ye(e)&&Ge(r)&&!Ge(i))return l?!1:(r.value=i,!0)}const o=ye(e)&&Mp(n)?Number(n)t,uc=t=>Reflect.getPrototypeOf(t);function tk(t,e,n){return function(...i){const s=this.__v_raw,r=qe(s),o=vo(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...i),u=n?Ld:e?_u:Kt;return!e&&an(r,"iterate",l?Dd:Cr),{next(){const{value:O,done:f}=c.next();return f?{value:O,done:f}:{value:a?[u(O[0]),u(O[1])]:u(O),done:f}},[Symbol.iterator](){return this}}}}function Oc(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function nk(t,e){const n={get(s){const r=this.__v_raw,o=qe(r),a=qe(s);t||(hn(s,a)&&an(o,"get",s),an(o,"get",a));const{has:l}=uc(o),c=e?Ld:t?_u:Kt;if(l.call(o,s))return c(r.get(s));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!t&&an(qe(s),"iterate",Cr),Reflect.get(s,"size",s)},has(s){const r=this.__v_raw,o=qe(r),a=qe(s);return t||(hn(s,a)&&an(o,"has",s),an(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,l=qe(a),c=e?Ld:t?_u:Kt;return!t&&an(l,"iterate",Cr),a.forEach((u,O)=>s.call(r,c(u),c(O),o))}};return Ot(n,t?{add:Oc("add"),set:Oc("set"),delete:Oc("delete"),clear:Oc("clear")}:{add(s){!e&&!Ln(s)&&!vs(s)&&(s=qe(s));const r=qe(this);return uc(r).has.call(r,s)||(r.add(s),cs(r,"add",s,s)),this},set(s,r){!e&&!Ln(r)&&!vs(r)&&(r=qe(r));const o=qe(this),{has:a,get:l}=uc(o);let c=a.call(o,s);c||(s=qe(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,r),c?hn(r,u)&&cs(o,"set",s,r):cs(o,"add",s,r),this},delete(s){const r=qe(this),{has:o,get:a}=uc(r);let l=o.call(r,s);l||(s=qe(s),l=o.call(r,s)),a&&a.call(r,s);const c=r.delete(s);return l&&cs(r,"delete",s,void 0),c},clear(){const s=qe(this),r=s.size!==0,o=s.clear();return r&&cs(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=tk(s,t,e)}),n}function EO(t,e){const n=nk(t,e);return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(tt(n,s)&&s in i?n:i,s,r)}const ik={get:EO(!1,!1)},sk={get:EO(!1,!0)},rk={get:EO(!0,!1)},ok={get:EO(!0,!0)},qS=new WeakMap,IS=new WeakMap,US=new WeakMap,WS=new WeakMap;function ak(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lk(t){return t.__v_skip||!Object.isExtensible(t)?0:ak(R_(t))}function Ss(t){return vs(t)?t:zO(t,!1,H_,ik,qS)}function DS(t){return zO(t,!1,J_,sk,IS)}function ZO(t){return zO(t,!0,K_,rk,US)}function Pr(t){return zO(t,!0,ek,ok,WS)}function zO(t,e,n,i,s){if(!at(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=lk(t);if(r===0)return t;const o=s.get(t);if(o)return o;const a=new Proxy(t,r===2?i:n);return s.set(t,a),a}function qi(t){return vs(t)?qi(t.__v_raw):!!(t&&t.__v_isReactive)}function vs(t){return!!(t&&t.__v_isReadonly)}function Ln(t){return!!(t&&t.__v_isShallow)}function YO(t){return t?!!t.__v_raw:!1}function qe(t){const e=t&&t.__v_raw;return e?qe(e):t}function Wl(t){return!tt(t,"__v_skip")&&Object.isExtensible(t)&&xS(t,"__v_skip",!0),t}const Kt=t=>at(t)?Ss(t):t,_u=t=>at(t)?ZO(t):t;function Ge(t){return t?t.__v_isRef===!0:!1}function te(t){return LS(t,!1)}function ms(t){return LS(t,!0)}function LS(t,e){return Ge(t)?t:new ck(t,e)}class ck{constructor(e,n){this.dep=new VO,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:qe(e),this._value=n?e:Kt(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Ln(e)||vs(e);e=i?e:qe(e),hn(e,n)&&(this._rawValue=e,this._value=i?e:Kt(e),this.dep.trigger())}}function uk(t){t.dep&&t.dep.trigger()}function $(t){return Ge(t)?t.value:t}function nn(t){return ke(t)?t():$(t)}const Ok={get:(t,e,n)=>e==="__v_raw"?t:$(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return Ge(s)&&!Ge(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function Dp(t){return qi(t)?t:new Proxy(t,Ok)}class fk{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new VO,{get:i,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function Lp(t){return new fk(t)}function bn(t){const e=ye(t)?new Array(t.length):{};for(const n in t)e[n]=jS(t,n);return e}class dk{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return N_(qe(this._object),this._key)}}class hk{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function NS(t,e,n){return Ge(t)?t:ke(t)?new hk(t):at(t)&&arguments.length>1?jS(t,e,n):te(t)}function jS(t,e,n){const i=t[e];return Ge(i)?i:new dk(t,e,n)}class pk{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new VO(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=sl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&dt!==this)return RS(this,!0),!0}get value(){const e=this.dep.track();return VS(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function mk(t,e,n=!1){let i,s;return ke(t)?i=t:(i=t.get,s=t.set),new pk(i,s,n)}const gk={GET:"get",HAS:"has",ITERATE:"iterate"},$k={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},fc={},ku=new WeakMap;let Us;function Qk(){return Us}function BS(t,e=!1,n=Us){if(n){let i=ku.get(n);i||ku.set(n,i=[]),i.push(t)}}function yk(t,e,n=We){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=n,c=y=>s?y:Ln(y)||s===!1||s===0?us(y,1):us(y);let u,O,f,d,h=!1,p=!1;if(Ge(t)?(O=()=>t.value,h=Ln(t)):qi(t)?(O=()=>c(t),h=!0):ye(t)?(p=!0,h=t.some(y=>qi(y)||Ln(y)),O=()=>t.map(y=>{if(Ge(y))return y.value;if(qi(y))return c(y);if(ke(y))return l?l(y,2):y()})):ke(t)?e?O=l?()=>l(t,2):t:O=()=>{if(f){ys();try{f()}finally{bs()}}const y=Us;Us=u;try{return l?l(t,3,[d]):t(d)}finally{Us=y}}:O=si,e&&s){const y=O,S=s===!0?1/0:s;O=()=>us(y(),S)}const m=Ul(),g=()=>{u.stop(),m&&m.active&&zp(m.effects,u)};if(r&&e){const y=e;e=(...S)=>{y(...S),g()}}let b=p?new Array(t.length).fill(fc):fc;const Q=y=>{if(!(!(u.flags&1)||!u.dirty&&!y))if(e){const S=u.run();if(s||h||(p?S.some((v,P)=>hn(v,b[P])):hn(S,b))){f&&f();const v=Us;Us=u;try{const P=[S,b===fc?void 0:p&&b[0]===fc?[]:b,d];b=S,l?l(e,3,P):e(...P)}finally{Us=v}}}else u.run()};return a&&a(Q),u=new il(O),u.scheduler=o?()=>o(Q,!1):Q,d=y=>BS(y,!1,u),f=u.onStop=()=>{const y=ku.get(u);if(y){if(l)l(y,4);else for(const S of y)S();ku.delete(u)}},e?i?Q(!0):b=u.run():o?o(Q.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}function us(t,e=1/0,n){if(e<=0||!at(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Ge(t))us(t.value,e,n);else if(ye(t))for(let i=0;i{us(i,e,n)});else if(TO(t)){for(const i in t)us(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&us(t[i],e,n)}return t}/** * @vue/runtime-core v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const y1=[];function sA(t){y1.push(t)}function rA(){y1.pop()}function oA(t,e){}const lA={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},aA={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Fo(t,e,n,i){try{return i?t(...i):t()}catch(s){Lr(s,e,n)}}function Zn(t,e,n,i){if(_e(t)){const s=Fo(t,e,n,i);return s&&jp(s)&&s.catch(r=>{Lr(r,e,n)}),s}if(we(t)){const s=[];for(let r=0;r>>1,s=un[i],r=Ll(s);r=Ll(n)?un.push(t):un.splice(uA(e),0,t),t.flags|=1,v1()}}function v1(){tu||(tu=b1.then(w1))}function Il(t){we(t)?fo.push(...t):Ds&&t.id===-1?Ds.splice(Kr+1,0,t):t.flags&1||(fo.push(t),t.flags|=1),v1()}function Hg(t,e,n=Ci+1){for(;nLl(n)-Ll(i));if(fo.length=0,Ds){Ds.push(...e);return}for(Ds=e,Kr=0;Krt.id==null?t.flags&2?-1:1/0:t.id;function w1(t){try{for(Ci=0;CiGr.emit(s,...r)),$a=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{x1(r,e)}),setTimeout(()=>{Gr||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,$a=[])},3e3)):$a=[]}let $t=null,of=null;function Nl(t){const e=$t;return $t=t,of=t&&t.type.__scopeId||null,e}function fA(t){of=t}function dA(){of=null}const hA=t=>V;function V(t,e=$t,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&fh(-1);const r=Nl(e);let o;try{o=t(...s)}finally{Nl(r),i._d&&fh(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function lf(t,e){if($t===null)return t;const n=wa($t),i=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport,wl=t=>t&&(t.disabled||t.disabled===""),Ug=t=>t&&(t.defer||t.defer===""),jg=t=>typeof SVGElement<"u"&&t instanceof SVGElement,qg=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,sh=(t,e)=>{const n=t&&t.to;return ht(n)?e?e(n):null:n},O1={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,r,o,l,a,c){const{mc:u,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:m,createComment:y}}=c,g=wl(e.props);let{shapeFlag:x,children:b,dynamicChildren:w}=e;if(t==null){const S=e.el=m(""),k=e.anchor=m("");h(S,n,i),h(k,n,i);const O=(E,I)=>{x&16&&(s&&s.isCE&&(s.ce._teleportTarget=E),u(b,E,I,s,r,o,l,a))},_=()=>{const E=e.target=sh(e.props,p),I=C1(E,e,m,h);E&&(o!=="svg"&&jg(E)?o="svg":o!=="mathml"&&qg(E)&&(o="mathml"),g||(O(E,I),Dc(e,!1)))};g&&(O(n,k),Dc(e,!0)),Ug(e.props)?(e.el.__isMounted=!1,Rt(()=>{_(),delete e.el.__isMounted},r)):_()}else{if(Ug(e.props)&&t.el.__isMounted===!1){Rt(()=>{O1.process(t,e,n,i,s,r,o,l,a,c)},r);return}e.el=t.el,e.targetStart=t.targetStart;const S=e.anchor=t.anchor,k=e.target=t.target,O=e.targetAnchor=t.targetAnchor,_=wl(t.props),E=_?n:k,I=_?S:O;if(o==="svg"||jg(k)?o="svg":(o==="mathml"||qg(k))&&(o="mathml"),w?(d(t.dynamicChildren,w,E,s,r,o,l),dm(t,e,!0)):a||f(t,e,E,I,s,r,o,l,!1),g)_?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Va(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const F=e.target=sh(e.props,p);F&&Va(e,F,null,c,0)}else _&&Va(e,k,O,c,1);Dc(e,g)}},remove(t,e,n,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:l,anchor:a,targetStart:c,targetAnchor:u,target:f,props:d}=t;if(f&&(s(c),s(u)),r&&s(a),o&16){const h=r||!wl(d);for(let p=0;p{t.isMounted=!0}),Nr(()=>{t.isUnmounting=!0}),t}const Un=[Function,Array],nm={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Un,onEnter:Un,onAfterEnter:Un,onEnterCancelled:Un,onBeforeLeave:Un,onLeave:Un,onAfterLeave:Un,onLeaveCancelled:Un,onBeforeAppear:Un,onAppear:Un,onAfterAppear:Un,onAppearCancelled:Un},_1=t=>{const e=t.subTree;return e.component?_1(e.component):e},mA={name:"BaseTransition",props:nm,setup(t,{slots:e}){const n=yt(),i=tm();return()=>{const s=e.default&&af(e.default(),!0);if(!s||!s.length)return;const r=A1(s),o=Ve(t),{mode:l}=o;if(i.isLeaving)return ed(r);const a=Kg(r);if(!a)return ed(r);let c=xo(a,o,i,n,f=>c=f);a.type!==xt&&ds(a,c);let u=n.subTree&&Kg(n.subTree);if(u&&u.type!==xt&&!oi(a,u)&&_1(n).type!==xt){let f=xo(u,o,i,n);if(ds(u,f),l==="out-in"&&a.type!==xt)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},ed(r);l==="in-out"&&a.type!==xt?f.delayLeave=(d,h,p)=>{const m=T1(i,u);m[String(u.key)]=u,d[Rs]=()=>{h(),d[Rs]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function A1(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==xt){e=n;break}}return e}const E1=mA;function T1(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function xo(t,e,n,i,s){const{appear:r,mode:o,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:y,onAppear:g,onAfterAppear:x,onAppearCancelled:b}=e,w=String(t.key),S=T1(n,t),k=(E,I)=>{E&&Zn(E,i,9,I)},O=(E,I)=>{const F=I[1];k(E,I),we(E)?E.every(L=>L.length<=1)&&F():E.length<=1&&F()},_={mode:o,persisted:l,beforeEnter(E){let I=a;if(!n.isMounted)if(r)I=y||a;else return;E[Rs]&&E[Rs](!0);const F=S[w];F&&oi(t,F)&&F.el[Rs]&&F.el[Rs](),k(I,[E])},enter(E){let I=c,F=u,L=f;if(!n.isMounted)if(r)I=g||c,F=x||u,L=b||f;else return;let Y=!1;const ee=E[Ba]=re=>{Y||(Y=!0,re?k(L,[E]):k(F,[E]),_.delayedLeave&&_.delayedLeave(),E[Ba]=void 0)};I?O(I,[E,ee]):ee()},leave(E,I){const F=String(t.key);if(E[Ba]&&E[Ba](!0),n.isUnmounting)return I();k(d,[E]);let L=!1;const Y=E[Rs]=ee=>{L||(L=!0,I(),ee?k(m,[E]):k(p,[E]),E[Rs]=void 0,S[F]===t&&delete S[F])};S[F]=t,h?O(h,[E,Y]):Y()},clone(E){const I=xo(E,e,n,i,s);return s&&s(I),I}};return _}function ed(t){if(ya(t))return t=fi(t),t.children=null,t}function Kg(t){if(!ya(t))return k1(t.type)&&t.children?A1(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&_e(n.default))return n.default()}}function ds(t,e){t.shapeFlag&6&&t.component?(t.transition=e,ds(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function af(t,e=!1,n){let i=[],s=0;for(let r=0;r1)for(let r=0;rn.value,set:r=>n.value=r})}return n}function $l(t,e,n,i,s=!1){if(we(t)){t.forEach((p,m)=>$l(p,e&&(we(e)?e[m]:e),n,i,s));return}if(Hs(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&$l(t,e,n,i.component.subTree);return}const r=i.shapeFlag&4?wa(i.component):i.el,o=s?null:r,{i:l,r:a}=t,c=e&&e.r,u=l.refs===We?l.refs={}:l.refs,f=l.setupState,d=Ve(f),h=f===We?()=>!1:p=>Ze(d,p);if(c!=null&&c!==a&&(ht(c)?(u[c]=null,h(c)&&(f[c]=null)):qe(c)&&(c.value=null)),_e(a))Fo(a,l,12,[o,u]);else{const p=ht(a),m=qe(a);if(p||m){const y=()=>{if(t.f){const g=p?h(a)?f[a]:u[a]:a.value;s?we(g)&&Up(g,r):we(g)?g.includes(r)||g.push(r):p?(u[a]=[r],h(a)&&(f[a]=u[a])):(a.value=[r],t.k&&(u[t.k]=a.value))}else p?(u[a]=o,h(a)&&(f[a]=o)):m&&(a.value=o,t.k&&(u[t.k]=o))};o?(y.id=-1,Rt(y,n)):y()}}}let Gg=!1;const zr=()=>{Gg||(console.error("Hydration completed but contains mismatches."),Gg=!0)},yA=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",bA=t=>t.namespaceURI.includes("MathML"),Fa=t=>{if(t.nodeType===1){if(yA(t))return"svg";if(bA(t))return"mathml"}},eo=t=>t.nodeType===8;function vA(t){const{mt:e,p:n,o:{patchProp:i,createText:s,nextSibling:r,parentNode:o,remove:l,insert:a,createComment:c}}=t,u=(b,w)=>{if(!w.hasChildNodes()){n(null,b,w),nu(),w._vnode=b;return}f(w.firstChild,b,null,null,null),nu(),w._vnode=b},f=(b,w,S,k,O,_=!1)=>{_=_||!!w.dynamicChildren;const E=eo(b)&&b.data==="[",I=()=>m(b,w,S,k,O,E),{type:F,ref:L,shapeFlag:Y,patchFlag:ee}=w;let re=b.nodeType;w.el=b,ee===-2&&(_=!1,w.dynamicChildren=null);let q=null;switch(F){case os:re!==3?w.children===""?(a(w.el=s(""),o(b),b),q=b):q=I():(b.data!==w.children&&(zr(),b.data=w.children),q=r(b));break;case xt:x(b)?(q=r(b),g(w.el=b.content.firstChild,b,S)):re!==8||E?q=I():q=r(b);break;case Sr:if(E&&(b=r(b),re=b.nodeType),re===1||re===3){q=b;const B=!w.children.length;for(let N=0;N{_=_||!!w.dynamicChildren;const{type:E,props:I,patchFlag:F,shapeFlag:L,dirs:Y,transition:ee}=w,re=E==="input"||E==="option";if(re||F!==-1){Y&&_i(w,null,S,"created");let q=!1;if(x(b)){q=nw(null,ee)&&S&&S.vnode.props&&S.vnode.props.appear;const N=b.content.firstChild;if(q){const K=N.getAttribute("class");K&&(N.$cls=K),ee.beforeEnter(N)}g(N,b,S),w.el=b=N}if(L&16&&!(I&&(I.innerHTML||I.textContent))){let N=h(b.firstChild,w,b,S,k,O,_);for(;N;){Wa(b,1)||zr();const K=N;N=N.nextSibling,l(K)}}else if(L&8){let N=w.children;N[0]===` -`&&(b.tagName==="PRE"||b.tagName==="TEXTAREA")&&(N=N.slice(1)),b.textContent!==N&&(Wa(b,0)||zr(),b.textContent=w.children)}if(I){if(re||!_||F&48){const N=b.tagName.includes("-");for(const K in I)(re&&(K.endsWith("value")||K==="indeterminate")||ha(K)&&!ao(K)||K[0]==="."||N)&&i(b,K,null,I[K],void 0,S)}else if(I.onClick)i(b,"onClick",null,I.onClick,void 0,S);else if(F&4&&Ri(I.style))for(const N in I.style)I.style[N]}let B;(B=I&&I.onVnodeBeforeMount)&&vn(B,S,w),Y&&_i(w,null,S,"beforeMount"),((B=I&&I.onVnodeMounted)||Y||q)&&fw(()=>{B&&vn(B,S,w),q&&ee.enter(b),Y&&_i(w,null,S,"mounted")},k)}return b.nextSibling},h=(b,w,S,k,O,_,E)=>{E=E||!!w.dynamicChildren;const I=w.children,F=I.length;for(let L=0;L{const{slotScopeIds:E}=w;E&&(O=O?O.concat(E):E);const I=o(b),F=h(r(b),w,I,S,k,O,_);return F&&eo(F)&&F.data==="]"?r(w.anchor=F):(zr(),a(w.anchor=c("]"),I,F),F)},m=(b,w,S,k,O,_)=>{if(Wa(b.parentElement,1)||zr(),w.el=null,_){const F=y(b);for(;;){const L=r(b);if(L&&L!==F)l(L);else break}}const E=r(b),I=o(b);return l(b),n(null,w,I,E,S,k,Fa(I),O),S&&(S.vnode.el=w.el,df(S,w.el)),E},y=(b,w="[",S="]")=>{let k=0;for(;b;)if(b=r(b),b&&eo(b)&&(b.data===w&&k++,b.data===S)){if(k===0)return r(b);k--}return b},g=(b,w,S)=>{const k=w.parentNode;k&&k.replaceChild(b,w);let O=S;for(;O;)O.vnode.el===w&&(O.vnode.el=O.subTree.el=b),O=O.parent},x=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[u,f]}const Yg="data-allow-mismatch",wA={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Wa(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(Yg);)t=t.parentElement;const n=t&&t.getAttribute(Yg);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return e===0&&i.includes("children")?!0:n.split(",").includes(wA[e])}}const xA=Yu().requestIdleCallback||(t=>setTimeout(t,1)),SA=Yu().cancelIdleCallback||(t=>clearTimeout(t)),kA=(t=1e4)=>e=>{const n=xA(e,{timeout:t});return()=>SA(n)};function OA(t){const{top:e,left:n,bottom:i,right:s}=t.getBoundingClientRect(),{innerHeight:r,innerWidth:o}=window;return(e>0&&e0&&i0&&n0&&s(e,n)=>{const i=new IntersectionObserver(s=>{for(const r of s)if(r.isIntersecting){i.disconnect(),e();break}},t);return n(s=>{if(s instanceof Element){if(OA(s))return e(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},_A=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},AA=(t=[])=>(e,n)=>{ht(t)&&(t=[t]);let i=!1;const s=o=>{i||(i=!0,r(),e(),o.target.dispatchEvent(new o.constructor(o.type,o)))},r=()=>{n(o=>{for(const l of t)o.removeEventListener(l,s)})};return n(o=>{for(const l of t)o.addEventListener(l,s,{once:!0})}),r};function EA(t,e){if(eo(t)&&t.data==="["){let n=1,i=t.nextSibling;for(;i;){if(i.nodeType===1){if(e(i)===!1)break}else if(eo(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else e(t)}const Hs=t=>!!t.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function TA(t){_e(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:i,delay:s=200,hydrate:r,timeout:o,suspensible:l=!0,onError:a}=t;let c=null,u,f=0;const d=()=>(f++,c=null,h()),h=()=>{let p;return c||(p=c=e().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((y,g)=>{a(m,()=>y(d()),()=>g(m),f+1)});throw m}).then(m=>p!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return H({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(p,m,y){const g=r?()=>{const b=r(()=>{y()},w=>EA(p,w));b&&(m.bum||(m.bum=[])).push(b),(m.u||(m.u=[])).push(()=>!0)}:y;u?g():h().then(()=>!m.isUnmounted&&g())},get __asyncResolved(){return u},setup(){const p=Lt;if(im(p),u)return()=>td(u,p);const m=b=>{c=null,Lr(b,p,13,!i)};if(l&&p.suspense||So)return h().then(b=>()=>td(b,p)).catch(b=>(m(b),()=>i?P(i,{error:b}):null));const y=se(!1),g=se(),x=se(!!s);return s&&setTimeout(()=>{x.value=!1},s),o!=null&&setTimeout(()=>{if(!y.value&&!g.value){const b=new Error(`Async component timed out after ${o}ms.`);m(b),g.value=b}},o),h().then(()=>{y.value=!0,p.parent&&ya(p.parent.vnode)&&p.parent.update()}).catch(b=>{m(b),g.value=b}),()=>{if(y.value&&u)return td(u,p);if(g.value&&i)return P(i,{error:g.value});if(n&&!x.value)return P(n)}}})}function td(t,e){const{ref:n,props:i,children:s,ce:r}=e.vnode,o=P(t,i,s);return o.ref=n,o.ce=r,delete e.vnode.ce,o}const ya=t=>t.type.__isKeepAlive,PA={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=yt(),i=n.ctx;if(!i.renderer)return()=>{const x=e.default&&e.default();return x&&x.length===1?x[0]:x};const s=new Map,r=new Set;let o=null;const l=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:f}}}=i,d=f("div");i.activate=(x,b,w,S,k)=>{const O=x.component;c(x,b,w,0,l),a(O.vnode,x,b,w,O,l,S,x.slotScopeIds,k),Rt(()=>{O.isDeactivated=!1,O.a&&uo(O.a);const _=x.props&&x.props.onVnodeMounted;_&&vn(_,O.parent,x)},l)},i.deactivate=x=>{const b=x.component;su(b.m),su(b.a),c(x,d,null,1,l),Rt(()=>{b.da&&uo(b.da);const w=x.props&&x.props.onVnodeUnmounted;w&&vn(w,b.parent,x),b.isDeactivated=!0},l)};function h(x){nd(x),u(x,n,l,!0)}function p(x){s.forEach((b,w)=>{const S=gh(b.type);S&&!x(S)&&m(w)})}function m(x){const b=s.get(x);b&&(!o||!oi(b,o))?h(b):o&&nd(o),s.delete(x),r.delete(x)}Te(()=>[t.include,t.exclude],([x,b])=>{x&&p(w=>al(x,w)),b&&p(w=>!al(b,w))},{flush:"post",deep:!0});let y=null;const g=()=>{y!=null&&(ru(n.subTree.type)?Rt(()=>{s.set(y,za(n.subTree))},n.subTree.suspense):s.set(y,za(n.subTree)))};return St(g),uf(g),Nr(()=>{s.forEach(x=>{const{subTree:b,suspense:w}=n,S=za(b);if(x.type===S.type&&x.key===S.key){nd(S);const k=S.component.da;k&&Rt(k,w);return}h(x)})}),()=>{if(y=null,!e.default)return o=null;const x=e.default(),b=x[0];if(x.length>1)return o=null,x;if(!hs(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return o=null,b;let w=za(b);if(w.type===xt)return o=null,w;const S=w.type,k=gh(Hs(w)?w.type.__asyncResolved||{}:S),{include:O,exclude:_,max:E}=t;if(O&&(!k||!al(O,k))||_&&k&&al(_,k))return w.shapeFlag&=-257,o=w,b;const I=w.key==null?S:w.key,F=s.get(I);return w.el&&(w=fi(w),b.shapeFlag&128&&(b.ssContent=w)),y=I,F?(w.el=F.el,w.component=F.component,w.transition&&ds(w,w.transition),w.shapeFlag|=512,r.delete(I),r.add(I)):(r.add(I),E&&r.size>parseInt(E,10)&&m(r.values().next().value)),w.shapeFlag|=256,o=w,ru(b.type)?b:w}}},MA=PA;function al(t,e){return we(t)?t.some(n=>al(n,e)):ht(t)?t.split(",").includes(e):d_(t)?(t.lastIndex=0,t.test(e)):!1}function P1(t,e){D1(t,"a",e)}function M1(t,e){D1(t,"da",e)}function D1(t,e,n=Lt){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(cf(e,i,n),n){let s=n.parent;for(;s&&s.parent;)ya(s.parent.vnode)&&DA(i,e,n,s),s=s.parent}}function DA(t,e,n,i){const s=cf(e,t,i,!0);Fi(()=>{Up(i[e],s)},n)}function nd(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function za(t){return t.shapeFlag&128?t.ssContent:t}function cf(t,e,n=Lt,i=!1){if(n){const s=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...o)=>{as();const l=_r(n),a=Zn(e,n,t,o);return l(),cs(),a});return i?s.unshift(r):s.push(r),r}}const vs=t=>(e,n=Lt)=>{(!So||t==="sp")&&cf(t,(...i)=>e(...i),n)},R1=vs("bm"),St=vs("m"),sm=vs("bu"),uf=vs("u"),Nr=vs("bum"),Fi=vs("um"),I1=vs("sp"),L1=vs("rtg"),N1=vs("rtc");function $1(t,e=Lt){cf("ec",t,e)}const rm="components",RA="directives";function V1(t,e){return lm(rm,t,!0,e)||t}const B1=Symbol.for("v-ndc");function om(t){return ht(t)?lm(rm,t,!1)||t:t||B1}function IA(t){return lm(RA,t)}function lm(t,e,n=!0,i=!1){const s=$t||Lt;if(s){const r=s.type;if(t===rm){const l=gh(r,!1);if(l&&(l===e||l===Bt(e)||l===pa(Bt(e))))return r}const o=Xg(s[t]||r[t],e)||Xg(s.appContext[t],e);return!o&&i?r:o}}function Xg(t,e){return t&&(t[e]||t[Bt(e)]||t[pa(Bt(e))])}function Fn(t,e,n,i){let s;const r=n&&n[i],o=we(t);if(o||ht(t)){const l=o&&Ri(t);let a=!1,c=!1;l&&(a=!Vn(t),c=fs(t),t=ef(t)),s=new Array(t.length);for(let u=0,f=t.length;ue(l,a,void 0,r&&r[a]));else{const l=Object.keys(t);s=new Array(l.length);for(let a=0,c=l.length;a{const r=i.fn(...s);return r&&(r.key=i.key),r}:i.fn)}return t}function le(t,e,n={},i,s){if($t.ce||$t.parent&&Hs($t.parent)&&$t.parent.ce)return e!=="default"&&(n.name=e),D(),j(Me,null,[P("slot",n,i&&i())],64);let r=t[e];r&&r._c&&(r._d=!1),D();const o=r&&am(r(n)),l=n.key||o&&o.key,a=j(Me,{key:(l&&!ui(l)?l:`_${e}`)+(!o&&i?"_fb":"")},o||(i?i():[]),o&&t._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function am(t){return t.some(e=>hs(e)?!(e.type===xt||e.type===Me&&!am(e.children)):!0)?t:null}function NA(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:co(i)]=t[i];return n}const rh=t=>t?yw(t)?wa(t):rh(t.parent):null,xl=ut(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>rh(t.parent),$root:t=>rh(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>cm(t),$forceUpdate:t=>t.f||(t.f=()=>{Zp(t.update)}),$nextTick:t=>t.n||(t.n=Nt.bind(t.proxy)),$watch:t=>uE.bind(t)}),id=(t,e)=>t!==We&&!t.__isScriptSetup&&Ze(t,e),oh={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:r,accessCache:o,type:l,appContext:a}=t;let c;if(e[0]!=="$"){const h=o[e];if(h!==void 0)switch(h){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return r[e]}else{if(id(i,e))return o[e]=1,i[e];if(s!==We&&Ze(s,e))return o[e]=2,s[e];if((c=t.propsOptions[0])&&Ze(c,e))return o[e]=3,r[e];if(n!==We&&Ze(n,e))return o[e]=4,n[e];lh&&(o[e]=0)}}const u=xl[e];let f,d;if(u)return e==="$attrs"&&nn(t.attrs,"get",""),u(t);if((f=l.__cssModules)&&(f=f[e]))return f;if(n!==We&&Ze(n,e))return o[e]=4,n[e];if(d=a.config.globalProperties,Ze(d,e))return d[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:r}=t;return id(s,e)?(s[e]=n,!0):i!==We&&Ze(i,e)?(i[e]=n,!0):Ze(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:s,propsOptions:r}},o){let l;return!!n[o]||t!==We&&Ze(t,o)||id(e,o)||(l=r[0])&&Ze(l,o)||Ze(i,o)||Ze(xl,o)||Ze(s.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Ze(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},$A=ut({},oh,{get(t,e){if(e!==Symbol.unscopables)return oh.get(t,e,t)},has(t,e){return e[0]!=="_"&&!y_(e)}});function VA(){return null}function BA(){return null}function FA(t){}function WA(t){}function zA(){return null}function HA(){}function UA(t,e){return null}function jA(){return F1().slots}function qA(){return F1().attrs}function F1(){const t=yt();return t.setupContext||(t.setupContext=ww(t))}function Vl(t){return we(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function W1(t,e){const n=Vl(t);for(const i in e){if(i.startsWith("__skip"))continue;let s=n[i];s?we(s)||_e(s)?s=n[i]={type:s,default:e[i]}:s.default=e[i]:s===null&&(s=n[i]={default:e[i]}),s&&e[`__skip_${i}`]&&(s.skipFactory=!0)}return n}function KA(t,e){return!t||!e?t||e:we(t)&&we(e)?t.concat(e):ut({},Vl(t),Vl(e))}function GA(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}function YA(t){const e=yt();let n=t();return hh(),jp(n)&&(n=n.catch(i=>{throw _r(e),i})),[n,()=>_r(e)]}let lh=!0;function XA(t){const e=cm(t),n=t.proxy,i=t.ctx;lh=!1,e.beforeCreate&&Jg(e.beforeCreate,t,"bc");const{data:s,computed:r,methods:o,watch:l,provide:a,inject:c,created:u,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:m,deactivated:y,beforeDestroy:g,beforeUnmount:x,destroyed:b,unmounted:w,render:S,renderTracked:k,renderTriggered:O,errorCaptured:_,serverPrefetch:E,expose:I,inheritAttrs:F,components:L,directives:Y,filters:ee}=e;if(c&&JA(c,i,null),o)for(const B in o){const N=o[B];_e(N)&&(i[B]=N.bind(n))}if(s){const B=s.call(n,n);ot(B)&&(t.data=us(B))}if(lh=!0,r)for(const B in r){const N=r[B],K=_e(N)?N.bind(n,n):_e(N.get)?N.get.bind(n,n):Yn,ue=!_e(N)&&_e(N.set)?N.set.bind(n):Yn,Se=Q({get:K,set:ue});Object.defineProperty(i,B,{enumerable:!0,configurable:!0,get:()=>Se.value,set:fe=>Se.value=fe})}if(l)for(const B in l)z1(l[B],i,n,B);if(a){const B=_e(a)?a.call(n):a;Reflect.ownKeys(B).forEach(N=>{es(N,B[N])})}u&&Jg(u,t,"c");function q(B,N){we(N)?N.forEach(K=>B(K.bind(n))):N&&B(N.bind(n))}if(q(R1,f),q(St,d),q(sm,h),q(uf,p),q(P1,m),q(M1,y),q($1,_),q(N1,k),q(L1,O),q(Nr,x),q(Fi,w),q(I1,E),we(I))if(I.length){const B=t.exposed||(t.exposed={});I.forEach(N=>{Object.defineProperty(B,N,{get:()=>n[N],set:K=>n[N]=K})})}else t.exposed||(t.exposed={});S&&t.render===Yn&&(t.render=S),F!=null&&(t.inheritAttrs=F),L&&(t.components=L),Y&&(t.directives=Y),E&&im(t)}function JA(t,e,n=Yn){we(t)&&(t=ah(t));for(const i in t){const s=t[i];let r;ot(s)?"default"in s?r=dn(s.from||i,s.default,!0):r=dn(s.from||i):r=dn(s),qe(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function Jg(t,e,n){Zn(we(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function z1(t,e,n,i){let s=i.includes(".")?lw(n,i):()=>n[i];if(ht(t)){const r=e[t];_e(r)&&Te(s,r)}else if(_e(t))Te(s,t.bind(n));else if(ot(t))if(we(t))t.forEach(r=>z1(r,e,n,i));else{const r=_e(t.handler)?t.handler.bind(n):e[t.handler];_e(r)&&Te(s,r,t)}}function cm(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,l=r.get(e);let a;return l?a=l:!s.length&&!n&&!i?a=e:(a={},s.length&&s.forEach(c=>iu(a,c,o,!0)),iu(a,e,o)),ot(e)&&r.set(e,a),a}function iu(t,e,n,i=!1){const{mixins:s,extends:r}=e;r&&iu(t,r,n,!0),s&&s.forEach(o=>iu(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const l=QA[o]||n&&n[o];t[o]=l?l(t[o],e[o]):e[o]}return t}const QA={data:Qg,props:Zg,emits:Zg,methods:cl,computed:cl,beforeCreate:ln,created:ln,beforeMount:ln,mounted:ln,beforeUpdate:ln,updated:ln,beforeDestroy:ln,beforeUnmount:ln,destroyed:ln,unmounted:ln,activated:ln,deactivated:ln,errorCaptured:ln,serverPrefetch:ln,components:cl,directives:cl,watch:eE,provide:Qg,inject:ZA};function Qg(t,e){return e?t?function(){return ut(_e(t)?t.call(this,this):t,_e(e)?e.call(this,this):e)}:e:t}function ZA(t,e){return cl(ah(t),ah(e))}function ah(t){if(we(t)){const e={};for(let n=0;n1)return n&&_e(e)?e.call(i&&i.proxy):e}}function U1(){return!!(Lt||$t||xr)}const j1={},q1=()=>Object.create(j1),K1=t=>Object.getPrototypeOf(t)===j1;function iE(t,e,n,i=!1){const s={},r=q1();t.propsDefaults=Object.create(null),G1(t,e,s,r);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);n?t.props=i?s:d1(s):t.type.props?t.props=s:t.props=r,t.attrs=r}function sE(t,e,n,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=t,l=Ve(s),[a]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let f=0;f{a=!0;const[d,h]=Y1(f,e,!0);ut(o,d),h&&l.push(...h)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!a)return ot(t)&&i.set(t,oo),oo;if(we(r))for(let u=0;ut[0]==="_"||t==="$stable",fm=t=>we(t)?t.map(wn):[wn(t)],oE=(t,e,n)=>{if(e._n)return e;const i=V((...s)=>fm(e(...s)),n);return i._c=!1,i},X1=(t,e,n)=>{const i=t._ctx;for(const s in t){if(um(s))continue;const r=t[s];if(_e(r))e[s]=oE(s,r,i);else if(r!=null){const o=fm(r);e[s]=()=>o}}},J1=(t,e)=>{const n=fm(e);t.slots.default=()=>n},Q1=(t,e,n)=>{for(const i in e)(n||!um(i))&&(t[i]=e[i])},lE=(t,e,n)=>{const i=t.slots=q1();if(t.vnode.shapeFlag&32){const s=e._;s?(Q1(i,e,n),n&&Kv(i,"_",s,!0)):X1(e,i)}else e&&J1(t,e)},aE=(t,e,n)=>{const{vnode:i,slots:s}=t;let r=!0,o=We;if(i.shapeFlag&32){const l=e._;l?n&&l===1?r=!1:Q1(s,e,n):(r=!e.$stable,X1(e,s)),o=e}else e&&(J1(t,e),o={default:1});if(r)for(const l in s)!um(l)&&o[l]==null&&delete s[l]},Rt=fw;function Z1(t){return tw(t)}function ew(t){return tw(t,vA)}function tw(t,e){const n=Yu();n.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:l,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:d,setScopeId:h=Yn,insertStaticContent:p}=t,m=(T,R,U,te=null,Z=null,C=null,A=void 0,$=null,z=!!R.dynamicChildren)=>{if(T===R)return;T&&!oi(T,R)&&(te=Ae(T),fe(T,Z,C,!0),T=null),R.patchFlag===-2&&(z=!1,R.dynamicChildren=null);const{type:G,ref:ie,shapeFlag:M}=R;switch(G){case os:y(T,R,U,te);break;case xt:g(T,R,U,te);break;case Sr:T==null&&x(R,U,te,A);break;case Me:L(T,R,U,te,Z,C,A,$,z);break;default:M&1?S(T,R,U,te,Z,C,A,$,z):M&6?Y(T,R,U,te,Z,C,A,$,z):(M&64||M&128)&&G.process(T,R,U,te,Z,C,A,$,z,ft)}ie!=null&&Z&&$l(ie,T&&T.ref,C,R||T,!R)},y=(T,R,U,te)=>{if(T==null)i(R.el=l(R.children),U,te);else{const Z=R.el=T.el;R.children!==T.children&&c(Z,R.children)}},g=(T,R,U,te)=>{T==null?i(R.el=a(R.children||""),U,te):R.el=T.el},x=(T,R,U,te)=>{[T.el,T.anchor]=p(T.children,R,U,te,T.el,T.anchor)},b=({el:T,anchor:R},U,te)=>{let Z;for(;T&&T!==R;)Z=d(T),i(T,U,te),T=Z;i(R,U,te)},w=({el:T,anchor:R})=>{let U;for(;T&&T!==R;)U=d(T),s(T),T=U;s(R)},S=(T,R,U,te,Z,C,A,$,z)=>{R.type==="svg"?A="svg":R.type==="math"&&(A="mathml"),T==null?k(R,U,te,Z,C,A,$,z):E(T,R,Z,C,A,$,z)},k=(T,R,U,te,Z,C,A,$)=>{let z,G;const{props:ie,shapeFlag:M,transition:W,dirs:de}=T;if(z=T.el=o(T.type,C,ie&&ie.is,ie),M&8?u(z,T.children):M&16&&_(T.children,z,null,te,Z,sd(T,C),A,$),de&&_i(T,null,te,"created"),O(z,T,T.scopeId,A,te),ie){for(const He in ie)He!=="value"&&!ao(He)&&r(z,He,null,ie[He],C,te);"value"in ie&&r(z,"value",null,ie.value,C),(G=ie.onVnodeBeforeMount)&&vn(G,te,T)}de&&_i(T,null,te,"beforeMount");const ke=nw(Z,W);ke&&W.beforeEnter(z),i(z,R,U),((G=ie&&ie.onVnodeMounted)||ke||de)&&Rt(()=>{G&&vn(G,te,T),ke&&W.enter(z),de&&_i(T,null,te,"mounted")},Z)},O=(T,R,U,te,Z)=>{if(U&&h(T,U),te)for(let C=0;C{for(let G=z;G{const $=R.el=T.el;let{patchFlag:z,dynamicChildren:G,dirs:ie}=R;z|=T.patchFlag&16;const M=T.props||We,W=R.props||We;let de;if(U&&ar(U,!1),(de=W.onVnodeBeforeUpdate)&&vn(de,U,R,T),ie&&_i(R,T,U,"beforeUpdate"),U&&ar(U,!0),(M.innerHTML&&W.innerHTML==null||M.textContent&&W.textContent==null)&&u($,""),G?I(T.dynamicChildren,G,$,U,te,sd(R,Z),C):A||N(T,R,$,null,U,te,sd(R,Z),C,!1),z>0){if(z&16)F($,M,W,U,Z);else if(z&2&&M.class!==W.class&&r($,"class",null,W.class,Z),z&4&&r($,"style",M.style,W.style,Z),z&8){const ke=R.dynamicProps;for(let He=0;He{de&&vn(de,U,R,T),ie&&_i(R,T,U,"updated")},te)},I=(T,R,U,te,Z,C,A)=>{for(let $=0;${if(R!==U){if(R!==We)for(const C in R)!ao(C)&&!(C in U)&&r(T,C,R[C],null,Z,te);for(const C in U){if(ao(C))continue;const A=U[C],$=R[C];A!==$&&C!=="value"&&r(T,C,$,A,Z,te)}"value"in U&&r(T,"value",R.value,U.value,Z)}},L=(T,R,U,te,Z,C,A,$,z)=>{const G=R.el=T?T.el:l(""),ie=R.anchor=T?T.anchor:l("");let{patchFlag:M,dynamicChildren:W,slotScopeIds:de}=R;de&&($=$?$.concat(de):de),T==null?(i(G,U,te),i(ie,U,te),_(R.children||[],U,ie,Z,C,A,$,z)):M>0&&M&64&&W&&T.dynamicChildren?(I(T.dynamicChildren,W,U,Z,C,A,$),(R.key!=null||Z&&R===Z.subTree)&&dm(T,R,!0)):N(T,R,U,ie,Z,C,A,$,z)},Y=(T,R,U,te,Z,C,A,$,z)=>{R.slotScopeIds=$,T==null?R.shapeFlag&512?Z.ctx.activate(R,U,te,A,z):ee(R,U,te,Z,C,A,z):re(T,R,z)},ee=(T,R,U,te,Z,C,A)=>{const $=T.component=gw(T,te,Z);if(ya(T)&&($.ctx.renderer=ft),bw($,!1,A),$.asyncDep){if(Z&&Z.registerDep($,q,A),!T.el){const z=$.subTree=P(xt);g(null,z,R,U)}}else q($,T,R,U,Z,C,A)},re=(T,R,U)=>{const te=R.component=T.component;if(gE(T,R,U))if(te.asyncDep&&!te.asyncResolved){B(te,R,U);return}else te.next=R,te.update();else R.el=T.el,te.vnode=R},q=(T,R,U,te,Z,C,A)=>{const $=()=>{if(T.isMounted){let{next:M,bu:W,u:de,parent:ke,vnode:He}=T;{const Pn=iw(T);if(Pn){M&&(M.el=He.el,B(T,M,A)),Pn.asyncDep.then(()=>{T.isUnmounted||$()});return}}let Ue=M,At;ar(T,!1),M?(M.el=He.el,B(T,M,A)):M=He,W&&uo(W),(At=M.props&&M.props.onVnodeBeforeUpdate)&&vn(At,ke,M,He),ar(T,!0);const Wt=Ic(T),Hn=T.subTree;T.subTree=Wt,m(Hn,Wt,f(Hn.el),Ae(Hn),T,Z,C),M.el=Wt.el,Ue===null&&df(T,Wt.el),de&&Rt(de,Z),(At=M.props&&M.props.onVnodeUpdated)&&Rt(()=>vn(At,ke,M,He),Z)}else{let M;const{el:W,props:de}=R,{bm:ke,m:He,parent:Ue,root:At,type:Wt}=T,Hn=Hs(R);if(ar(T,!1),ke&&uo(ke),!Hn&&(M=de&&de.onVnodeBeforeMount)&&vn(M,Ue,R),ar(T,!0),W&&vt){const Pn=()=>{T.subTree=Ic(T),vt(W,T.subTree,T,Z,null)};Hn&&Wt.__asyncHydrate?Wt.__asyncHydrate(W,T,Pn):Pn()}else{At.ce&&At.ce._injectChildStyle(Wt);const Pn=T.subTree=Ic(T);m(null,Pn,U,te,T,Z,C),R.el=Pn.el}if(He&&Rt(He,Z),!Hn&&(M=de&&de.onVnodeMounted)){const Pn=R;Rt(()=>vn(M,Ue,Pn),Z)}(R.shapeFlag&256||Ue&&Hs(Ue.vnode)&&Ue.vnode.shapeFlag&256)&&T.a&&Rt(T.a,Z),T.isMounted=!0,R=U=te=null}};T.scope.on();const z=T.effect=new Ml($);T.scope.off();const G=T.update=z.run.bind(z),ie=T.job=z.runIfDirty.bind(z);ie.i=T,ie.id=T.uid,z.scheduler=()=>Zp(ie),ar(T,!0),G()},B=(T,R,U)=>{R.component=T;const te=T.vnode.props;T.vnode=R,T.next=null,sE(T,R.props,te,U),aE(T,R.children,U),as(),Hg(T),cs()},N=(T,R,U,te,Z,C,A,$,z=!1)=>{const G=T&&T.children,ie=T?T.shapeFlag:0,M=R.children,{patchFlag:W,shapeFlag:de}=R;if(W>0){if(W&128){ue(G,M,U,te,Z,C,A,$,z);return}else if(W&256){K(G,M,U,te,Z,C,A,$,z);return}}de&8?(ie&16&&Re(G,Z,C),M!==G&&u(U,M)):ie&16?de&16?ue(G,M,U,te,Z,C,A,$,z):Re(G,Z,C,!0):(ie&8&&u(U,""),de&16&&_(M,U,te,Z,C,A,$,z))},K=(T,R,U,te,Z,C,A,$,z)=>{T=T||oo,R=R||oo;const G=T.length,ie=R.length,M=Math.min(G,ie);let W;for(W=0;Wie?Re(T,Z,C,!0,!1,M):_(R,U,te,Z,C,A,$,z,M)},ue=(T,R,U,te,Z,C,A,$,z)=>{let G=0;const ie=R.length;let M=T.length-1,W=ie-1;for(;G<=M&&G<=W;){const de=T[G],ke=R[G]=z?Is(R[G]):wn(R[G]);if(oi(de,ke))m(de,ke,U,null,Z,C,A,$,z);else break;G++}for(;G<=M&&G<=W;){const de=T[M],ke=R[W]=z?Is(R[W]):wn(R[W]);if(oi(de,ke))m(de,ke,U,null,Z,C,A,$,z);else break;M--,W--}if(G>M){if(G<=W){const de=W+1,ke=deW)for(;G<=M;)fe(T[G],Z,C,!0),G++;else{const de=G,ke=G,He=new Map;for(G=ke;G<=W;G++){const Mn=R[G]=z?Is(R[G]):wn(R[G]);Mn.key!=null&&He.set(Mn.key,G)}let Ue,At=0;const Wt=W-ke+1;let Hn=!1,Pn=0;const Go=new Array(Wt);for(G=0;G=Wt){fe(Mn,Z,C,!0);continue}let bi;if(Mn.key!=null)bi=He.get(Mn.key);else for(Ue=ke;Ue<=W;Ue++)if(Go[Ue-ke]===0&&oi(Mn,R[Ue])){bi=Ue;break}bi===void 0?fe(Mn,Z,C,!0):(Go[bi-ke]=G+1,bi>=Pn?Pn=bi:Hn=!0,m(Mn,R[bi],U,null,Z,C,A,$,z),At++)}const Lg=Hn?cE(Go):oo;for(Ue=Lg.length-1,G=Wt-1;G>=0;G--){const Mn=ke+G,bi=R[Mn],Ng=Mn+1{const{el:C,type:A,transition:$,children:z,shapeFlag:G}=T;if(G&6){Se(T.component.subTree,R,U,te);return}if(G&128){T.suspense.move(R,U,te);return}if(G&64){A.move(T,R,U,ft);return}if(A===Me){i(C,R,U);for(let M=0;M$.enter(C),Z);else{const{leave:M,delayLeave:W,afterLeave:de}=$,ke=()=>{T.ctx.isUnmounted?s(C):i(C,R,U)},He=()=>{M(C,()=>{ke(),de&&de()})};W?W(C,ke,He):He()}else i(C,R,U)},fe=(T,R,U,te=!1,Z=!1)=>{const{type:C,props:A,ref:$,children:z,dynamicChildren:G,shapeFlag:ie,patchFlag:M,dirs:W,cacheIndex:de}=T;if(M===-2&&(Z=!1),$!=null&&(as(),$l($,null,U,T,!0),cs()),de!=null&&(R.renderCache[de]=void 0),ie&256){R.ctx.deactivate(T);return}const ke=ie&1&&W,He=!Hs(T);let Ue;if(He&&(Ue=A&&A.onVnodeBeforeUnmount)&&vn(Ue,R,T),ie&6)Ke(T.component,U,te);else{if(ie&128){T.suspense.unmount(U,te);return}ke&&_i(T,null,R,"beforeUnmount"),ie&64?T.type.remove(T,R,U,ft,te):G&&!G.hasOnce&&(C!==Me||M>0&&M&64)?Re(G,R,U,!1,!0):(C===Me&&M&384||!Z&&ie&16)&&Re(z,R,U),te&&Oe(T)}(He&&(Ue=A&&A.onVnodeUnmounted)||ke)&&Rt(()=>{Ue&&vn(Ue,R,T),ke&&_i(T,null,R,"unmounted")},U)},Oe=T=>{const{type:R,el:U,anchor:te,transition:Z}=T;if(R===Me){Pe(U,te);return}if(R===Sr){w(T);return}const C=()=>{s(U),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(T.shapeFlag&1&&Z&&!Z.persisted){const{leave:A,delayLeave:$}=Z,z=()=>A(U,C);$?$(T.el,C,z):z()}else C()},Pe=(T,R)=>{let U;for(;T!==R;)U=d(T),s(T),T=U;s(R)},Ke=(T,R,U)=>{const{bum:te,scope:Z,job:C,subTree:A,um:$,m:z,a:G,parent:ie,slots:{__:M}}=T;su(z),su(G),te&&uo(te),ie&&we(M)&&M.forEach(W=>{ie.renderCache[W]=void 0}),Z.stop(),C&&(C.flags|=8,fe(A,T,R,U)),$&&Rt($,R),Rt(()=>{T.isUnmounted=!0},R),R&&R.pendingBranch&&!R.isUnmounted&&T.asyncDep&&!T.asyncResolved&&T.suspenseId===R.pendingId&&(R.deps--,R.deps===0&&R.resolve())},Re=(T,R,U,te=!1,Z=!1,C=0)=>{for(let A=C;A{if(T.shapeFlag&6)return Ae(T.component.subTree);if(T.shapeFlag&128)return T.suspense.next();const R=d(T.anchor||T.el),U=R&&R[S1];return U?d(U):R};let nt=!1;const ze=(T,R,U)=>{T==null?R._vnode&&fe(R._vnode,null,null,!0):m(R._vnode||null,T,R,null,null,null,U),R._vnode=T,nt||(nt=!0,Hg(),nu(),nt=!1)},ft={p:m,um:fe,m:Se,r:Oe,mt:ee,mc:_,pc:N,pbc:I,n:Ae,o:t};let qt,vt;return e&&([qt,vt]=e(ft)),{render:ze,hydrate:qt,createApp:nE(ze,qt)}}function sd({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function ar({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function nw(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function dm(t,e,n=!1){const i=t.children,s=e.children;if(we(i)&&we(s))for(let r=0;r>1,t[n[l]]0&&(e[i]=n[r-1]),n[r]=i)}}for(r=n.length,o=n[r-1];r-- >0;)n[r]=o,o=e[o];return n}function iw(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:iw(e)}function su(t){if(t)for(let e=0;edn(sw);function Mt(t,e){return ba(t,null,e)}function hm(t,e){return ba(t,null,{flush:"post"})}function ow(t,e){return ba(t,null,{flush:"sync"})}function Te(t,e,n){return ba(t,e,n)}function ba(t,e,n=We){const{immediate:i,deep:s,flush:r,once:o}=n,l=ut({},n),a=e&&i||!e&&r!=="post";let c;if(So){if(r==="sync"){const h=rw();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=Yn,h.resume=Yn,h.pause=Yn,h}}const u=Lt;l.call=(h,p,m)=>Zn(h,u,p,m);let f=!1;r==="post"?l.scheduler=h=>{Rt(h,u&&u.suspense)}:r!=="sync"&&(f=!0,l.scheduler=(h,p)=>{p?h():Zp(h)}),l.augmentJob=h=>{e&&(h.flags|=4),f&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const d=iA(t,e,l);return So&&(c?c.push(d):a&&d()),d}function uE(t,e,n){const i=this.proxy,s=ht(t)?t.includes(".")?lw(i,t):()=>i[t]:t.bind(i,i);let r;_e(e)?r=e:(r=e.handler,n=e);const o=_r(this),l=ba(s,r.bind(i),n);return o(),l}function lw(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;s{let u,f=We,d;return ow(()=>{const h=t[s];cn(u,h)&&(u=h,c())}),{get(){return a(),n.get?n.get(u):u},set(h){const p=n.set?n.set(h):h;if(!cn(p,u)&&!(f!==We&&cn(h,f)))return;const m=i.vnode.props;m&&(e in m||s in m||r in m)&&(`onUpdate:${e}`in m||`onUpdate:${s}`in m||`onUpdate:${r}`in m)||(u=h,c()),i.emit(`update:${e}`,p),cn(h,p)&&cn(h,f)&&!cn(p,d)&&c(),f=h,d=p}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?o||We:l,done:!1}:{done:!0}}}},l}const aw=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Bt(e)}Modifiers`]||t[`${On(e)}Modifiers`];function dE(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||We;let s=n;const r=e.startsWith("update:"),o=r&&aw(i,e.slice(7));o&&(o.trim&&(s=n.map(u=>ht(u)?u.trim():u)),o.number&&(s=n.map(Xc)));let l,a=i[l=co(e)]||i[l=co(Bt(e))];!a&&r&&(a=i[l=co(On(e))]),a&&Zn(a,t,6,s);const c=i[l+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[l])return;t.emitted[l]=!0,Zn(c,t,6,s)}}function cw(t,e,n=!1){const i=e.emitsCache,s=i.get(t);if(s!==void 0)return s;const r=t.emits;let o={},l=!1;if(!_e(t)){const a=c=>{const u=cw(c,e,!0);u&&(l=!0,ut(o,u))};!n&&e.mixins.length&&e.mixins.forEach(a),t.extends&&a(t.extends),t.mixins&&t.mixins.forEach(a)}return!r&&!l?(ot(t)&&i.set(t,null),null):(we(r)?r.forEach(a=>o[a]=null):ut(o,r),ot(t)&&i.set(t,o),o)}function ff(t,e){return!t||!ha(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ze(t,e[0].toLowerCase()+e.slice(1))||Ze(t,On(e))||Ze(t,e))}function Ic(t){const{type:e,vnode:n,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:l,emit:a,render:c,renderCache:u,props:f,data:d,setupState:h,ctx:p,inheritAttrs:m}=t,y=Nl(t);let g,x;try{if(n.shapeFlag&4){const w=s||i,S=w;g=wn(c.call(S,w,u,f,h,d,p)),x=l}else{const w=e;g=wn(w.length>1?w(f,{attrs:l,slots:o,emit:a}):w(f,null)),x=e.props?l:pE(l)}}catch(w){Sl.length=0,Lr(w,t,1),g=P(xt)}let b=g;if(x&&m!==!1){const w=Object.keys(x),{shapeFlag:S}=b;w.length&&S&7&&(r&&w.some(Hp)&&(x=mE(x,r)),b=fi(b,x,!1,!0))}return n.dirs&&(b=fi(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ds(b,n.transition),g=b,Nl(y),g}function hE(t,e=!0){let n;for(let i=0;i{let e;for(const n in t)(n==="class"||n==="style"||ha(n))&&((e||(e={}))[n]=t[n]);return e},mE=(t,e)=>{const n={};for(const i in t)(!Hp(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function gE(t,e,n){const{props:i,children:s,component:r}=t,{props:o,children:l,patchFlag:a}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return i?t0(i,o,c):!!o;if(a&8){const u=e.dynamicProps;for(let f=0;ft.__isSuspense;let uh=0;const yE={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,r,o,l,a,c){if(t==null)vE(e,n,i,s,r,o,l,a,c);else{if(r&&r.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}wE(t,e,n,i,s,o,l,a,c)}},hydrate:xE,normalize:SE},bE=yE;function Bl(t,e){const n=t.props&&t.props[e];_e(n)&&n()}function vE(t,e,n,i,s,r,o,l,a){const{p:c,o:{createElement:u}}=a,f=u("div"),d=t.suspense=uw(t,s,i,e,f,n,r,o,l,a);c(null,d.pendingBranch=t.ssContent,f,null,i,d,r,o),d.deps>0?(Bl(t,"onPending"),Bl(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,r,o),ho(d,t.ssFallback)):d.resolve(!1,!0)}function wE(t,e,n,i,s,r,o,l,{p:a,um:c,o:{createElement:u}}){const f=e.suspense=t.suspense;f.vnode=e,e.el=t.el;const d=e.ssContent,h=e.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:y,isHydrating:g}=f;if(m)f.pendingBranch=d,oi(d,m)?(a(m,d,f.hiddenContainer,null,s,f,r,o,l),f.deps<=0?f.resolve():y&&(g||(a(p,h,n,i,s,null,r,o,l),ho(f,h)))):(f.pendingId=uh++,g?(f.isHydrating=!1,f.activeBranch=m):c(m,s,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),y?(a(null,d,f.hiddenContainer,null,s,f,r,o,l),f.deps<=0?f.resolve():(a(p,h,n,i,s,null,r,o,l),ho(f,h))):p&&oi(d,p)?(a(p,d,n,i,s,f,r,o,l),f.resolve(!0)):(a(null,d,f.hiddenContainer,null,s,f,r,o,l),f.deps<=0&&f.resolve()));else if(p&&oi(d,p))a(p,d,n,i,s,f,r,o,l),ho(f,d);else if(Bl(e,"onPending"),f.pendingBranch=d,d.shapeFlag&512?f.pendingId=d.component.suspenseId:f.pendingId=uh++,a(null,d,f.hiddenContainer,null,s,f,r,o,l),f.deps<=0)f.resolve();else{const{timeout:x,pendingId:b}=f;x>0?setTimeout(()=>{f.pendingId===b&&f.fallback(h)},x):x===0&&f.fallback(h)}}function uw(t,e,n,i,s,r,o,l,a,c,u=!1){const{p:f,m:d,um:h,n:p,o:{parentNode:m,remove:y}}=c;let g;const x=kE(t);x&&e&&e.pendingBranch&&(g=e.pendingId,e.deps++);const b=t.props?Jc(t.props.timeout):void 0,w=r,S={vnode:t,parent:e,parentComponent:n,namespace:o,container:i,hiddenContainer:s,deps:0,pendingId:uh++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(k=!1,O=!1){const{vnode:_,activeBranch:E,pendingBranch:I,pendingId:F,effects:L,parentComponent:Y,container:ee}=S;let re=!1;S.isHydrating?S.isHydrating=!1:k||(re=E&&I.transition&&I.transition.mode==="out-in",re&&(E.transition.afterLeave=()=>{F===S.pendingId&&(d(I,ee,r===w?p(E):r,0),Il(L))}),E&&(m(E.el)===ee&&(r=p(E)),h(E,Y,S,!0)),re||d(I,ee,r,0)),ho(S,I),S.pendingBranch=null,S.isInFallback=!1;let q=S.parent,B=!1;for(;q;){if(q.pendingBranch){q.effects.push(...L),B=!0;break}q=q.parent}!B&&!re&&Il(L),S.effects=[],x&&e&&e.pendingBranch&&g===e.pendingId&&(e.deps--,e.deps===0&&!O&&e.resolve()),Bl(_,"onResolve")},fallback(k){if(!S.pendingBranch)return;const{vnode:O,activeBranch:_,parentComponent:E,container:I,namespace:F}=S;Bl(O,"onFallback");const L=p(_),Y=()=>{S.isInFallback&&(f(null,k,I,L,E,null,F,l,a),ho(S,k))},ee=k.transition&&k.transition.mode==="out-in";ee&&(_.transition.afterLeave=Y),S.isInFallback=!0,h(_,E,null,!0),ee||Y()},move(k,O,_){S.activeBranch&&d(S.activeBranch,k,O,_),S.container=k},next(){return S.activeBranch&&p(S.activeBranch)},registerDep(k,O,_){const E=!!S.pendingBranch;E&&S.deps++;const I=k.vnode.el;k.asyncDep.catch(F=>{Lr(F,k,0)}).then(F=>{if(k.isUnmounted||S.isUnmounted||S.pendingId!==k.suspenseId)return;k.asyncResolved=!0;const{vnode:L}=k;ph(k,F,!1),I&&(L.el=I);const Y=!I&&k.subTree.el;O(k,L,m(I||k.subTree.el),I?null:p(k.subTree),S,o,_),Y&&y(Y),df(k,L.el),E&&--S.deps===0&&S.resolve()})},unmount(k,O){S.isUnmounted=!0,S.activeBranch&&h(S.activeBranch,n,k,O),S.pendingBranch&&h(S.pendingBranch,n,k,O)}};return S}function xE(t,e,n,i,s,r,o,l,a){const c=e.suspense=uw(e,i,n,t.parentNode,document.createElement("div"),null,s,r,o,l,!0),u=a(t,c.pendingBranch=e.ssContent,n,c,r,o);return c.deps===0&&c.resolve(!1,!0),u}function SE(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=n0(i?n.default:n),t.ssFallback=i?n0(n.fallback):P(xt)}function n0(t){let e;if(_e(t)){const n=Cr&&t._c;n&&(t._d=!1,D()),t=t(),n&&(t._d=!0,e=rn,dw())}return we(t)&&(t=hE(t)),t=wn(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function fw(t,e){e&&e.pendingBranch?we(t)?e.effects.push(...t):e.effects.push(t):Il(t)}function ho(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,df(i,s))}function kE(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const Me=Symbol.for("v-fgt"),os=Symbol.for("v-txt"),xt=Symbol.for("v-cmt"),Sr=Symbol.for("v-stc"),Sl=[];let rn=null;function D(t=!1){Sl.push(rn=t?null:[])}function dw(){Sl.pop(),rn=Sl[Sl.length-1]||null}let Cr=1;function fh(t,e=!1){Cr+=t,t<0&&rn&&e&&(rn.hasOnce=!0)}function hw(t){return t.dynamicChildren=Cr>0?rn||oo:null,dw(),Cr>0&&rn&&rn.push(t),t}function ae(t,e,n,i,s,r){return hw(X(t,e,n,i,s,r,!0))}function j(t,e,n,i,s){return hw(P(t,e,n,i,s,!0))}function hs(t){return t?t.__v_isVNode===!0:!1}function oi(t,e){return t.type===e.type&&t.key===e.key}function OE(t){}const pw=({key:t})=>t??null,Lc=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?ht(t)||qe(t)||_e(t)?{i:$t,r:t,k:e,f:!!n}:t:null);function X(t,e=null,n=null,i=0,s=null,r=t===Me?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&pw(e),ref:e&&Lc(e),scopeId:of,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:$t};return l?(pm(a,n),r&128&&t.normalize(a)):n&&(a.shapeFlag|=ht(n)?8:16),Cr>0&&!o&&rn&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&rn.push(a),a}const P=CE;function CE(t,e=null,n=null,i=0,s=null,r=!1){if((!t||t===B1)&&(t=xt),hs(t)){const l=fi(t,e,!0);return n&&pm(l,n),Cr>0&&!r&&rn&&(l.shapeFlag&6?rn[rn.indexOf(t)]=l:rn.push(l)),l.patchFlag=-2,l}if(DE(t)&&(t=t.__vccOpts),e){e=va(e);let{class:l,style:a}=e;l&&!ht(l)&&(e.class=Ct(l)),ot(a)&&(rf(a)&&!we(a)&&(a=ut({},a)),e.style=ti(a))}const o=ht(t)?1:ru(t)?128:k1(t)?64:ot(t)?4:_e(t)?2:0;return X(t,e,n,i,s,o,r,!0)}function va(t){return t?rf(t)||K1(t)?ut({},t):t:null}function fi(t,e,n=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:l,transition:a}=t,c=e?xe(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&pw(c),ref:e&&e.ref?n&&r?we(r)?r.concat(Lc(e)):[r,Lc(e)]:Lc(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:l,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Me?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:a,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&fi(t.ssContent),ssFallback:t.ssFallback&&fi(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return a&&i&&ds(u,a.clone(u)),u}function je(t=" ",e=0){return P(os,null,t,e)}function mw(t,e){const n=P(Sr,null,t);return n.staticCount=e,n}function Ee(t="",e=!1){return e?(D(),j(xt,null,t)):P(xt,null,t)}function wn(t){return t==null||typeof t=="boolean"?P(xt):we(t)?P(Me,null,t.slice()):hs(t)?Is(t):P(os,null,String(t))}function Is(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:fi(t)}function pm(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(we(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),pm(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!K1(e)?e._ctx=$t:s===3&&$t&&($t.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else _e(e)?(e={default:e,_ctx:$t},n=32):(e=String(e),i&64?(n=16,e=[je(e)]):n=8);t.children=e,t.shapeFlag|=n}function xe(...t){const e={};for(let n=0;nLt||$t;let ou,dh;{const t=Yu(),e=(n,i)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};ou=e("__VUE_INSTANCE_SETTERS__",n=>Lt=n),dh=e("__VUE_SSR_SETTERS__",n=>So=n)}const _r=t=>{const e=Lt;return ou(t),t.scope.on(),()=>{t.scope.off(),ou(e)}},hh=()=>{Lt&&Lt.scope.off(),ou(null)};function yw(t){return t.vnode.shapeFlag&4}let So=!1;function bw(t,e=!1,n=!1){e&&dh(e);const{props:i,children:s}=t.vnode,r=yw(t);iE(t,i,r,e),lE(t,s,n||e);const o=r?EE(t,e):void 0;return e&&dh(!1),o}function EE(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,oh);const{setup:i}=n;if(i){as();const s=t.setupContext=i.length>1?ww(t):null,r=_r(t),o=Fo(i,t,0,[t.props,s]),l=jp(o);if(cs(),r(),(l||t.sp)&&!Hs(t)&&im(t),l){if(o.then(hh,hh),e)return o.then(a=>{ph(t,a,e)}).catch(a=>{Lr(a,t,0)});t.asyncDep=o}else ph(t,o,e)}else vw(t,e)}function ph(t,e,n){_e(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ot(e)&&(t.setupState=Jp(e)),vw(t,n)}let lu,mh;function TE(t){lu=t,mh=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,$A))}}const PE=()=>!lu;function vw(t,e,n){const i=t.type;if(!t.render){if(!e&&lu&&!i.render){const s=i.template||cm(t).template;if(s){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:l,compilerOptions:a}=i,c=ut(ut({isCustomElement:r,delimiters:l},o),a);i.render=lu(s,c)}}t.render=i.render||Yn,mh&&mh(t)}{const s=_r(t);as();try{XA(t)}finally{cs(),s()}}}const ME={get(t,e){return nn(t,"get",""),t[e]}};function ww(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,ME),slots:t.slots,emit:t.emit,expose:e}}function wa(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Jp(ga(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in xl)return xl[n](t)},has(e,n){return n in e||n in xl}})):t.proxy}function gh(t,e=!0){return _e(t)?t.displayName||t.name:t.name||e&&t.__name}function DE(t){return _e(t)&&"__vccOpts"in t}const Q=(t,e)=>Z_(t,e,So);function An(t,e,n){const i=arguments.length;return i===2?ot(e)&&!we(e)?hs(e)?P(t,null,[e]):P(t,e):P(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&hs(n)&&(n=[n]),P(t,e,n))}function RE(){}function IE(t,e,n,i){const s=n[i];if(s&&xw(s,t))return s;const r=e();return r.memo=t.slice(),r.cacheIndex=i,n[i]=r}function xw(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let i=0;i0&&rn&&rn.push(t),!0}const Sw="3.5.16",LE=Yn,NE=aA,$E=Gr,VE=x1,BE={createComponentInstance:gw,setupComponent:bw,renderComponentRoot:Ic,setCurrentRenderingInstance:Nl,isVNode:hs,normalizeVNode:wn,getComponentPublicInstance:wa,ensureValidVNode:am,pushWarningContext:sA,popWarningContext:rA},FE=BE,WE=null,zE=null,HE=null;/** +**/const GS=[];function bk(t){GS.push(t)}function Sk(){GS.pop()}function vk(t,e){}const Pk={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},xk={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ia(t,e,n,i){try{return i?t(...i):t()}catch(s){Br(s,e,n)}}function ai(t,e,n,i){if(ke(t)){const s=ia(t,e,n,i);return s&&Yp(s)&&s.catch(r=>{Br(r,e,n)}),s}if(ye(t)){const s=[];for(let r=0;r>>1,s=pn[i],r=al(s);r=al(n)?pn.push(t):pn.splice(Tk(e),0,t),t.flags|=1,HS()}}function HS(){Ru||(Ru=FS.then(KS))}function ol(t){ye(t)?To.push(...t):Ws&&t.id===-1?Ws.splice(lo+1,0,t):t.flags&1||(To.push(t),t.flags|=1),HS()}function Ng(t,e,n=Xi+1){for(;nal(n)-al(i));if(To.length=0,Ws){Ws.push(...e);return}for(Ws=e,lo=0;lot.id==null?t.flags&2?-1:1/0:t.id;function KS(t){try{for(Xi=0;Xico.emit(s,...r)),dc=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{JS(r,e)}),setTimeout(()=>{co||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,dc=[])},3e3)):dc=[]}let Ut=null,MO=null;function ll(t){const e=Ut;return Ut=t,MO=t&&t.type.__scopeId||null,e}function _k(t){MO=t}function kk(){MO=null}const Rk=t=>z;function z(t,e=Ut,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&Jd(-1);const r=ll(e);let o;try{o=t(...s)}finally{ll(r),i._d&&Jd(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function Dl(t,e){if(Ut===null)return t;const n=Bl(Ut),i=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport,La=t=>t&&(t.disabled||t.disabled===""),jg=t=>t&&(t.defer||t.defer===""),Bg=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Gg=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Nd=(t,e)=>{const n=t&&t.to;return pt(n)?e?e(n):null:n},n0={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,r,o,a,l,c){const{mc:u,pc:O,pbc:f,o:{insert:d,querySelector:h,createText:p,createComment:m}}=c,g=La(e.props);let{shapeFlag:b,children:Q,dynamicChildren:y}=e;if(t==null){const S=e.el=p(""),v=e.anchor=p("");d(S,n,i),d(v,n,i);const P=(k,E)=>{b&16&&(s&&s.isCE&&(s.ce._teleportTarget=k),u(Q,k,E,s,r,o,a,l))},w=()=>{const k=e.target=Nd(e.props,h),E=i0(k,e,p,d);k&&(o!=="svg"&&Bg(k)?o="svg":o!=="mathml"&&Gg(k)&&(o="mathml"),g||(P(k,E),ru(e,!1)))};g&&(P(n,v),ru(e,!0)),jg(e.props)?(e.el.__isMounted=!1,Yt(()=>{w(),delete e.el.__isMounted},r)):w()}else{if(jg(e.props)&&t.el.__isMounted===!1){Yt(()=>{n0.process(t,e,n,i,s,r,o,a,l,c)},r);return}e.el=t.el,e.targetStart=t.targetStart;const S=e.anchor=t.anchor,v=e.target=t.target,P=e.targetAnchor=t.targetAnchor,w=La(t.props),k=w?n:v,E=w?S:P;if(o==="svg"||Bg(v)?o="svg":(o==="mathml"||Gg(v))&&(o="mathml"),y?(f(t.dynamicChildren,y,k,s,r,o,a),rm(t,e,!0)):l||O(t,e,k,E,s,r,o,a,!1),g)w?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):hc(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const I=e.target=Nd(e.props,h);I&&hc(e,I,null,c,0)}else w&&hc(e,v,P,c,1);ru(e,g)}},remove(t,e,n,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:O,props:f}=t;if(O&&(s(c),s(u)),r&&s(l),o&16){const d=r||!La(f);for(let h=0;h{t.isMounted=!0}),Gr(()=>{t.isUnmounting=!0}),t}const Kn=[Function,Array],Gp={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Kn,onEnter:Kn,onAfterEnter:Kn,onEnterCancelled:Kn,onBeforeLeave:Kn,onLeave:Kn,onAfterLeave:Kn,onLeaveCancelled:Kn,onBeforeAppear:Kn,onAppear:Kn,onAfterAppear:Kn,onAppearCancelled:Kn},s0=t=>{const e=t.subTree;return e.component?s0(e.component):e},Ck={name:"BaseTransition",props:Gp,setup(t,{slots:e}){const n=Qt(),i=Bp();return()=>{const s=e.default&&qO(e.default(),!0);if(!s||!s.length)return;const r=r0(s),o=qe(t),{mode:a}=o;if(i.isLeaving)return Cf(r);const l=Fg(r);if(!l)return Cf(r);let c=Zo(l,o,i,n,O=>c=O);l.type!==Tt&&Ps(l,c);let u=n.subTree&&Fg(n.subTree);if(u&&u.type!==Tt&&!fi(l,u)&&s0(n).type!==Tt){let O=Zo(u,o,i,n);if(Ps(u,O),a==="out-in"&&l.type!==Tt)return i.isLeaving=!0,O.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete O.afterLeave,u=void 0},Cf(r);a==="in-out"&&l.type!==Tt?O.delayLeave=(f,d,h)=>{const p=a0(i,u);p[String(u.key)]=u,f[Ds]=()=>{d(),f[Ds]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function r0(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Tt){e=n;break}}return e}const o0=Ck;function a0(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function Zo(t,e,n,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:O,onBeforeLeave:f,onLeave:d,onAfterLeave:h,onLeaveCancelled:p,onBeforeAppear:m,onAppear:g,onAfterAppear:b,onAppearCancelled:Q}=e,y=String(t.key),S=a0(n,t),v=(k,E)=>{k&&ai(k,i,9,E)},P=(k,E)=>{const I=E[1];v(k,E),ye(k)?k.every(Z=>Z.length<=1)&&I():k.length<=1&&I()},w={mode:o,persisted:a,beforeEnter(k){let E=l;if(!n.isMounted)if(r)E=m||l;else return;k[Ds]&&k[Ds](!0);const I=S[y];I&&fi(t,I)&&I.el[Ds]&&I.el[Ds](),v(E,[k])},enter(k){let E=c,I=u,Z=O;if(!n.isMounted)if(r)E=g||c,I=b||u,Z=Q||O;else return;let K=!1;const ie=k[pc]=ae=>{K||(K=!0,ae?v(Z,[k]):v(I,[k]),w.delayedLeave&&w.delayedLeave(),k[pc]=void 0)};E?P(E,[k,ie]):ie()},leave(k,E){const I=String(t.key);if(k[pc]&&k[pc](!0),n.isUnmounting)return E();v(f,[k]);let Z=!1;const K=k[Ds]=ie=>{Z||(Z=!0,E(),ie?v(p,[k]):v(h,[k]),k[Ds]=void 0,S[I]===t&&delete S[I])};S[I]=t,d?P(d,[k,K]):K()},clone(k){const E=Zo(k,e,n,i,s);return s&&s(E),E}};return w}function Cf(t){if(Ll(t))return t=gi(t),t.children=null,t}function Fg(t){if(!Ll(t))return t0(t.type)&&t.children?r0(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&ke(n.default))return n.default()}}function Ps(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Ps(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function qO(t,e=!1,n){let i=[],s=0;for(let r=0;r1)for(let r=0;rn.value,set:r=>n.value=r})}return n}function cl(t,e,n,i,s=!1){if(ye(t)){t.forEach((h,p)=>cl(h,e&&(ye(e)?e[p]:e),n,i,s));return}if(Js(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&cl(t,e,n,i.component.subTree);return}const r=i.shapeFlag&4?Bl(i.component):i.el,o=s?null:r,{i:a,r:l}=t,c=e&&e.r,u=a.refs===We?a.refs={}:a.refs,O=a.setupState,f=qe(O),d=O===We?()=>!1:h=>tt(f,h);if(c!=null&&c!==l&&(pt(c)?(u[c]=null,d(c)&&(O[c]=null)):Ge(c)&&(c.value=null)),ke(l))ia(l,a,12,[o,u]);else{const h=pt(l),p=Ge(l);if(h||p){const m=()=>{if(t.f){const g=h?d(l)?O[l]:u[l]:l.value;s?ye(g)&&zp(g,r):ye(g)?g.includes(r)||g.push(r):h?(u[l]=[r],d(l)&&(O[l]=u[l])):(l.value=[r],t.k&&(u[t.k]=l.value))}else h?(u[l]=o,d(l)&&(O[l]=o)):p&&(l.value=o,t.k&&(u[t.k]=o))};o?(m.id=-1,Yt(m,n)):m()}}}let Hg=!1;const to=()=>{Hg||(console.error("Hydration completed but contains mismatches."),Hg=!0)},Ak=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",Ek=t=>t.namespaceURI.includes("MathML"),mc=t=>{if(t.nodeType===1){if(Ak(t))return"svg";if(Ek(t))return"mathml"}},mo=t=>t.nodeType===8;function Zk(t){const{mt:e,p:n,o:{patchProp:i,createText:s,nextSibling:r,parentNode:o,remove:a,insert:l,createComment:c}}=t,u=(Q,y)=>{if(!y.hasChildNodes()){n(null,Q,y),Xu(),y._vnode=Q;return}O(y.firstChild,Q,null,null,null),Xu(),y._vnode=Q},O=(Q,y,S,v,P,w=!1)=>{w=w||!!y.dynamicChildren;const k=mo(Q)&&Q.data==="[",E=()=>p(Q,y,S,v,P,k),{type:I,ref:Z,shapeFlag:K,patchFlag:ie}=y;let ae=Q.nodeType;y.el=Q,ie===-2&&(w=!1,y.dynamicChildren=null);let G=null;switch(I){case gs:ae!==3?y.children===""?(l(y.el=s(""),o(Q),Q),G=Q):G=E():(Q.data!==y.children&&(to(),Q.data=y.children),G=r(Q));break;case Tt:b(Q)?(G=r(Q),g(y.el=Q.content.firstChild,Q,S)):ae!==8||k?G=E():G=r(Q);break;case Ar:if(k&&(Q=r(Q),ae=Q.nodeType),ae===1||ae===3){G=Q;const q=!y.children.length;for(let Y=0;Y{w=w||!!y.dynamicChildren;const{type:k,props:E,patchFlag:I,shapeFlag:Z,dirs:K,transition:ie}=y,ae=k==="input"||k==="option";if(ae||I!==-1){K&&Ci(y,null,S,"created");let G=!1;if(b(Q)){G=A0(null,ie)&&S&&S.vnode.props&&S.vnode.props.appear;const Y=Q.content.firstChild;if(G){const F=Y.getAttribute("class");F&&(Y.$cls=F),ie.beforeEnter(Y)}g(Y,Q,S),y.el=Q=Y}if(Z&16&&!(E&&(E.innerHTML||E.textContent))){let Y=d(Q.firstChild,y,Q,S,v,P,w);for(;Y;){gc(Q,1)||to();const F=Y;Y=Y.nextSibling,a(F)}}else if(Z&8){let Y=y.children;Y[0]===` +`&&(Q.tagName==="PRE"||Q.tagName==="TEXTAREA")&&(Y=Y.slice(1)),Q.textContent!==Y&&(gc(Q,0)||to(),Q.textContent=y.children)}if(E){if(ae||!w||I&48){const Y=Q.tagName.includes("-");for(const F in E)(ae&&(F.endsWith("value")||F==="indeterminate")||ql(F)&&!Po(F)||F[0]==="."||Y)&&i(Q,F,null,E[F],void 0,S)}else if(E.onClick)i(Q,"onClick",null,E.onClick,void 0,S);else if(I&4&&qi(E.style))for(const Y in E.style)E.style[Y]}let q;(q=E&&E.onVnodeBeforeMount)&&xn(q,S,y),K&&Ci(y,null,S,"beforeMount"),((q=E&&E.onVnodeMounted)||K||G)&&W0(()=>{q&&xn(q,S,y),G&&ie.enter(Q),K&&Ci(y,null,S,"mounted")},v)}return Q.nextSibling},d=(Q,y,S,v,P,w,k)=>{k=k||!!y.dynamicChildren;const E=y.children,I=E.length;for(let Z=0;Z{const{slotScopeIds:k}=y;k&&(P=P?P.concat(k):k);const E=o(Q),I=d(r(Q),y,E,S,v,P,w);return I&&mo(I)&&I.data==="]"?r(y.anchor=I):(to(),l(y.anchor=c("]"),E,I),I)},p=(Q,y,S,v,P,w)=>{if(gc(Q.parentElement,1)||to(),y.el=null,w){const I=m(Q);for(;;){const Z=r(Q);if(Z&&Z!==I)a(Z);else break}}const k=r(Q),E=o(Q);return a(Q),n(null,y,E,k,S,v,mc(E),P),S&&(S.vnode.el=y.el,DO(S,y.el)),k},m=(Q,y="[",S="]")=>{let v=0;for(;Q;)if(Q=r(Q),Q&&mo(Q)&&(Q.data===y&&v++,Q.data===S)){if(v===0)return r(Q);v--}return Q},g=(Q,y,S)=>{const v=y.parentNode;v&&v.replaceChild(Q,y);let P=S;for(;P;)P.vnode.el===y&&(P.vnode.el=P.subTree.el=Q),P=P.parent},b=Q=>Q.nodeType===1&&Q.tagName==="TEMPLATE";return[u,O]}const Kg="data-allow-mismatch",zk={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function gc(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(Kg);)t=t.parentElement;const n=t&&t.getAttribute(Kg);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return e===0&&i.includes("children")?!0:n.split(",").includes(zk[e])}}const Yk=kO().requestIdleCallback||(t=>setTimeout(t,1)),Mk=kO().cancelIdleCallback||(t=>clearTimeout(t)),qk=(t=1e4)=>e=>{const n=Yk(e,{timeout:t});return()=>Mk(n)};function Ik(t){const{top:e,left:n,bottom:i,right:s}=t.getBoundingClientRect(),{innerHeight:r,innerWidth:o}=window;return(e>0&&e0&&i0&&n0&&s(e,n)=>{const i=new IntersectionObserver(s=>{for(const r of s)if(r.isIntersecting){i.disconnect(),e();break}},t);return n(s=>{if(s instanceof Element){if(Ik(s))return e(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},Wk=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},Dk=(t=[])=>(e,n)=>{pt(t)&&(t=[t]);let i=!1;const s=o=>{i||(i=!0,r(),e(),o.target.dispatchEvent(new o.constructor(o.type,o)))},r=()=>{n(o=>{for(const a of t)o.removeEventListener(a,s)})};return n(o=>{for(const a of t)o.addEventListener(a,s,{once:!0})}),r};function Lk(t,e){if(mo(t)&&t.data==="["){let n=1,i=t.nextSibling;for(;i;){if(i.nodeType===1){if(e(i)===!1)break}else if(mo(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else e(t)}const Js=t=>!!t.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Nk(t){ke(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:i,delay:s=200,hydrate:r,timeout:o,suspensible:a=!0,onError:l}=t;let c=null,u,O=0;const f=()=>(O++,c=null,d()),d=()=>{let h;return c||(h=c=e().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),l)return new Promise((m,g)=>{l(p,()=>m(f()),()=>g(p),O+1)});throw p}).then(p=>h!==c&&c?c:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),u=p,p)))};return W({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(h,p,m){const g=r?()=>{const Q=r(()=>{m()},y=>Lk(h,y));Q&&(p.bum||(p.bum=[])).push(Q),(p.u||(p.u=[])).push(()=>!0)}:m;u?g():d().then(()=>!p.isUnmounted&&g())},get __asyncResolved(){return u},setup(){const h=qt;if(Fp(h),u)return()=>Vf(u,h);const p=Q=>{c=null,Br(Q,h,13,!i)};if(a&&h.suspense||zo)return d().then(Q=>()=>Vf(Q,h)).catch(Q=>(p(Q),()=>i?X(i,{error:Q}):null));const m=te(!1),g=te(),b=te(!!s);return s&&setTimeout(()=>{b.value=!1},s),o!=null&&setTimeout(()=>{if(!m.value&&!g.value){const Q=new Error(`Async component timed out after ${o}ms.`);p(Q),g.value=Q}},o),d().then(()=>{m.value=!0,h.parent&&Ll(h.parent.vnode)&&h.parent.update()}).catch(Q=>{p(Q),g.value=Q}),()=>{if(m.value&&u)return Vf(u,h);if(g.value&&i)return X(i,{error:g.value});if(n&&!b.value)return X(n)}}})}function Vf(t,e){const{ref:n,props:i,children:s,ce:r}=e.vnode,o=X(t,i,s);return o.ref=n,o.ce=r,delete e.vnode.ce,o}const Ll=t=>t.type.__isKeepAlive,jk={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=Qt(),i=n.ctx;if(!i.renderer)return()=>{const b=e.default&&e.default();return b&&b.length===1?b[0]:b};const s=new Map,r=new Set;let o=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:O}}}=i,f=O("div");i.activate=(b,Q,y,S,v)=>{const P=b.component;c(b,Q,y,0,a),l(P.vnode,b,Q,y,P,a,S,b.slotScopeIds,v),Yt(()=>{P.isDeactivated=!1,P.a&&wo(P.a);const w=b.props&&b.props.onVnodeMounted;w&&xn(w,P.parent,b)},a)},i.deactivate=b=>{const Q=b.component;Vu(Q.m),Vu(Q.a),c(b,f,null,1,a),Yt(()=>{Q.da&&wo(Q.da);const y=b.props&&b.props.onVnodeUnmounted;y&&xn(y,Q.parent,b),Q.isDeactivated=!0},a)};function d(b){Af(b),u(b,n,a,!0)}function h(b){s.forEach((Q,y)=>{const S=sh(Q.type);S&&!b(S)&&p(y)})}function p(b){const Q=s.get(b);Q&&(!o||!fi(Q,o))?d(Q):o&&Af(o),s.delete(b),r.delete(b)}_e(()=>[t.include,t.exclude],([b,Q])=>{b&&h(y=>Ca(b,y)),Q&&h(y=>!Ca(Q,y))},{flush:"post",deep:!0});let m=null;const g=()=>{m!=null&&(Au(n.subTree.type)?Yt(()=>{s.set(m,$c(n.subTree))},n.subTree.suspense):s.set(m,$c(n.subTree)))};return Pt(g),UO(g),Gr(()=>{s.forEach(b=>{const{subTree:Q,suspense:y}=n,S=$c(Q);if(b.type===S.type&&b.key===S.key){Af(S);const v=S.component.da;v&&Yt(v,y);return}d(b)})}),()=>{if(m=null,!e.default)return o=null;const b=e.default(),Q=b[0];if(b.length>1)return o=null,b;if(!xs(Q)||!(Q.shapeFlag&4)&&!(Q.shapeFlag&128))return o=null,Q;let y=$c(Q);if(y.type===Tt)return o=null,y;const S=y.type,v=sh(Js(y)?y.type.__asyncResolved||{}:S),{include:P,exclude:w,max:k}=t;if(P&&(!v||!Ca(P,v))||w&&v&&Ca(w,v))return y.shapeFlag&=-257,o=y,Q;const E=y.key==null?S:y.key,I=s.get(E);return y.el&&(y=gi(y),Q.shapeFlag&128&&(Q.ssContent=y)),m=E,I?(y.el=I.el,y.component=I.component,y.transition&&Ps(y,y.transition),y.shapeFlag|=512,r.delete(E),r.add(E)):(r.add(E),k&&r.size>parseInt(k,10)&&p(r.values().next().value)),y.shapeFlag|=256,o=y,Au(Q.type)?Q:y}}},Bk=jk;function Ca(t,e){return ye(t)?t.some(n=>Ca(n,e)):pt(t)?t.split(",").includes(e):k_(t)?(t.lastIndex=0,t.test(e)):!1}function l0(t,e){u0(t,"a",e)}function c0(t,e){u0(t,"da",e)}function u0(t,e,n=qt){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(IO(e,i,n),n){let s=n.parent;for(;s&&s.parent;)Ll(s.parent.vnode)&&Gk(i,e,n,s),s=s.parent}}function Gk(t,e,n,i){const s=IO(e,t,i,!0);Bi(()=>{zp(i[e],s)},n)}function Af(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function $c(t){return t.shapeFlag&128?t.ssContent:t}function IO(t,e,n=qt,i=!1){if(n){const s=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...o)=>{ys();const a=Mr(n),l=ai(e,n,t,o);return a(),bs(),l});return i?s.unshift(r):s.push(r),r}}const Xs=t=>(e,n=qt)=>{(!zo||t==="sp")&&IO(t,(...i)=>e(...i),n)},O0=Xs("bm"),Pt=Xs("m"),Hp=Xs("bu"),UO=Xs("u"),Gr=Xs("bum"),Bi=Xs("um"),f0=Xs("sp"),d0=Xs("rtg"),h0=Xs("rtc");function p0(t,e=qt){IO("ec",t,e)}const Kp="components",Fk="directives";function m0(t,e){return em(Kp,t,!0,e)||t}const g0=Symbol.for("v-ndc");function Jp(t){return pt(t)?em(Kp,t,!1)||t:t||g0}function Hk(t){return em(Fk,t)}function em(t,e,n=!0,i=!1){const s=Ut||qt;if(s){const r=s.type;if(t===Kp){const a=sh(r,!1);if(a&&(a===e||a===Wt(e)||a===Il(Wt(e))))return r}const o=Jg(s[t]||r[t],e)||Jg(s.appContext[t],e);return!o&&i?r:o}}function Jg(t,e){return t&&(t[e]||t[Wt(e)]||t[Il(Wt(e))])}function An(t,e,n,i){let s;const r=n&&n[i],o=ye(t);if(o||pt(t)){const a=o&&qi(t);let l=!1,c=!1;a&&(l=!Ln(t),c=vs(t),t=AO(t)),s=new Array(t.length);for(let u=0,O=t.length;ue(a,l,void 0,r&&r[l]));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l{const r=i.fn(...s);return r&&(r.key=i.key),r}:i.fn)}return t}function le(t,e,n={},i,s){if(Ut.ce||Ut.parent&&Js(Ut.parent)&&Ut.parent.ce)return e!=="default"&&(n.name=e),C(),j(Ce,null,[X("slot",n,i&&i())],64);let r=t[e];r&&r._c&&(r._d=!1),C();const o=r&&tm(r(n)),a=n.key||o&&o.key,l=j(Ce,{key:(a&&!mi(a)?a:`_${e}`)+(!o&&i?"_fb":"")},o||(i?i():[]),o&&t._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l}function tm(t){return t.some(e=>xs(e)?!(e.type===Tt||e.type===Ce&&!tm(e.children)):!0)?t:null}function Jk(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:xo(i)]=t[i];return n}const jd=t=>t?B0(t)?Bl(t):jd(t.parent):null,Na=Ot(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>jd(t.parent),$root:t=>jd(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>nm(t),$forceUpdate:t=>t.f||(t.f=()=>{Np(t.update)}),$nextTick:t=>t.n||(t.n=It.bind(t.proxy)),$watch:t=>TR.bind(t)}),Ef=(t,e)=>t!==We&&!t.__isScriptSetup&&tt(t,e),Bd={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return r[e]}else{if(Ef(i,e))return o[e]=1,i[e];if(s!==We&&tt(s,e))return o[e]=2,s[e];if((c=t.propsOptions[0])&&tt(c,e))return o[e]=3,r[e];if(n!==We&&tt(n,e))return o[e]=4,n[e];Gd&&(o[e]=0)}}const u=Na[e];let O,f;if(u)return e==="$attrs"&&an(t.attrs,"get",""),u(t);if((O=a.__cssModules)&&(O=O[e]))return O;if(n!==We&&tt(n,e))return o[e]=4,n[e];if(f=l.config.globalProperties,tt(f,e))return f[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:r}=t;return Ef(s,e)?(s[e]=n,!0):i!==We&&tt(i,e)?(i[e]=n,!0):tt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!n[o]||t!==We&&tt(t,o)||Ef(e,o)||(a=r[0])&&tt(a,o)||tt(i,o)||tt(Na,o)||tt(s.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:tt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},eR=Ot({},Bd,{get(t,e){if(e!==Symbol.unscopables)return Bd.get(t,e,t)},has(t,e){return e[0]!=="_"&&!A_(e)}});function tR(){return null}function nR(){return null}function iR(t){}function sR(t){}function rR(){return null}function oR(){}function aR(t,e){return null}function lR(){return $0().slots}function cR(){return $0().attrs}function $0(){const t=Qt();return t.setupContext||(t.setupContext=H0(t))}function ul(t){return ye(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function Q0(t,e){const n=ul(t);for(const i in e){if(i.startsWith("__skip"))continue;let s=n[i];s?ye(s)||ke(s)?s=n[i]={type:s,default:e[i]}:s.default=e[i]:s===null&&(s=n[i]={default:e[i]}),s&&e[`__skip_${i}`]&&(s.skipFactory=!0)}return n}function uR(t,e){return!t||!e?t||e:ye(t)&&ye(e)?t.concat(e):Ot({},ul(t),ul(e))}function OR(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}function fR(t){const e=Qt();let n=t();return th(),Yp(n)&&(n=n.catch(i=>{throw Mr(e),i})),[n,()=>Mr(e)]}let Gd=!0;function dR(t){const e=nm(t),n=t.proxy,i=t.ctx;Gd=!1,e.beforeCreate&&e$(e.beforeCreate,t,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:O,mounted:f,beforeUpdate:d,updated:h,activated:p,deactivated:m,beforeDestroy:g,beforeUnmount:b,destroyed:Q,unmounted:y,render:S,renderTracked:v,renderTriggered:P,errorCaptured:w,serverPrefetch:k,expose:E,inheritAttrs:I,components:Z,directives:K,filters:ie}=e;if(c&&hR(c,i,null),o)for(const q in o){const Y=o[q];ke(Y)&&(i[q]=Y.bind(n))}if(s){const q=s.call(n,n);at(q)&&(t.data=Ss(q))}if(Gd=!0,r)for(const q in r){const Y=r[q],F=ke(Y)?Y.bind(n,n):ke(Y.get)?Y.get.bind(n,n):si,ue=!ke(Y)&&ke(Y.set)?Y.set.bind(n):si,Se=J({get:F,set:ue});Object.defineProperty(i,q,{enumerable:!0,configurable:!0,get:()=>Se.value,set:fe=>Se.value=fe})}if(a)for(const q in a)y0(a[q],i,n,q);if(l){const q=ke(l)?l.call(n):l;Reflect.ownKeys(q).forEach(Y=>{Os(Y,q[Y])})}u&&e$(u,t,"c");function G(q,Y){ye(Y)?Y.forEach(F=>q(F.bind(n))):Y&&q(Y.bind(n))}if(G(O0,O),G(Pt,f),G(Hp,d),G(UO,h),G(l0,p),G(c0,m),G(p0,w),G(h0,v),G(d0,P),G(Gr,b),G(Bi,y),G(f0,k),ye(E))if(E.length){const q=t.exposed||(t.exposed={});E.forEach(Y=>{Object.defineProperty(q,Y,{get:()=>n[Y],set:F=>n[Y]=F})})}else t.exposed||(t.exposed={});S&&t.render===si&&(t.render=S),I!=null&&(t.inheritAttrs=I),Z&&(t.components=Z),K&&(t.directives=K),k&&Fp(t)}function hR(t,e,n=si){ye(t)&&(t=Fd(t));for(const i in t){const s=t[i];let r;at(s)?"default"in s?r=gn(s.from||i,s.default,!0):r=gn(s.from||i):r=gn(s),Ge(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function e$(t,e,n){ai(ye(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function y0(t,e,n,i){let s=i.includes(".")?M0(n,i):()=>n[i];if(pt(t)){const r=e[t];ke(r)&&_e(s,r)}else if(ke(t))_e(s,t.bind(n));else if(at(t))if(ye(t))t.forEach(r=>y0(r,e,n,i));else{const r=ke(t.handler)?t.handler.bind(n):e[t.handler];ke(r)&&_e(s,r,t)}}function nm(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,a=r.get(e);let l;return a?l=a:!s.length&&!n&&!i?l=e:(l={},s.length&&s.forEach(c=>Cu(l,c,o,!0)),Cu(l,e,o)),at(e)&&r.set(e,l),l}function Cu(t,e,n,i=!1){const{mixins:s,extends:r}=e;r&&Cu(t,r,n,!0),s&&s.forEach(o=>Cu(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=pR[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const pR={data:t$,props:n$,emits:n$,methods:Va,computed:Va,beforeCreate:fn,created:fn,beforeMount:fn,mounted:fn,beforeUpdate:fn,updated:fn,beforeDestroy:fn,beforeUnmount:fn,destroyed:fn,unmounted:fn,activated:fn,deactivated:fn,errorCaptured:fn,serverPrefetch:fn,components:Va,directives:Va,watch:gR,provide:t$,inject:mR};function t$(t,e){return e?t?function(){return Ot(ke(t)?t.call(this,this):t,ke(e)?e.call(this,this):e)}:e:t}function mR(t,e){return Va(Fd(t),Fd(e))}function Fd(t){if(ye(t)){const e={};for(let n=0;n1)return n&&ke(e)?e.call(i&&i.proxy):e}}function S0(){return!!(qt||Ut||Vr)}const v0={},P0=()=>Object.create(v0),x0=t=>Object.getPrototypeOf(t)===v0;function yR(t,e,n,i=!1){const s={},r=P0();t.propsDefaults=Object.create(null),w0(t,e,s,r);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);n?t.props=i?s:DS(s):t.type.props?t.props=s:t.props=r,t.attrs=r}function bR(t,e,n,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=t,a=qe(s),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let O=0;O{l=!0;const[f,d]=T0(O,e,!0);Ot(o,f),d&&a.push(...d)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!l)return at(t)&&i.set(t,So),So;if(ye(r))for(let u=0;ut[0]==="_"||t==="$stable",sm=t=>ye(t)?t.map(wn):[wn(t)],vR=(t,e,n)=>{if(e._n)return e;const i=z((...s)=>sm(e(...s)),n);return i._c=!1,i},_0=(t,e,n)=>{const i=t._ctx;for(const s in t){if(im(s))continue;const r=t[s];if(ke(r))e[s]=vR(s,r,i);else if(r!=null){const o=sm(r);e[s]=()=>o}}},k0=(t,e)=>{const n=sm(e);t.slots.default=()=>n},R0=(t,e,n)=>{for(const i in e)(n||!im(i))&&(t[i]=e[i])},PR=(t,e,n)=>{const i=t.slots=P0();if(t.vnode.shapeFlag&32){const s=e._;s?(R0(i,e,n),n&&xS(i,"_",s,!0)):_0(e,i)}else e&&k0(t,e)},xR=(t,e,n)=>{const{vnode:i,slots:s}=t;let r=!0,o=We;if(i.shapeFlag&32){const a=e._;a?n&&a===1?r=!1:R0(s,e,n):(r=!e.$stable,_0(e,s)),o=e}else e&&(k0(t,e),o={default:1});if(r)for(const a in s)!im(a)&&o[a]==null&&delete s[a]},Yt=W0;function X0(t){return V0(t)}function C0(t){return V0(t,Zk)}function V0(t,e){const n=kO();n.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:O,nextSibling:f,setScopeId:d=si,insertStaticContent:h}=t,p=(R,A,L,se=null,ee=null,x=null,T=void 0,M=null,D=!!A.dynamicChildren)=>{if(R===A)return;R&&!fi(R,A)&&(se=Re(R),fe(R,ee,x,!0),R=null),A.patchFlag===-2&&(D=!1,A.dynamicChildren=null);const{type:H,ref:oe,shapeFlag:V}=A;switch(H){case gs:m(R,A,L,se);break;case Tt:g(R,A,L,se);break;case Ar:R==null&&b(A,L,se,T);break;case Ce:Z(R,A,L,se,ee,x,T,M,D);break;default:V&1?S(R,A,L,se,ee,x,T,M,D):V&6?K(R,A,L,se,ee,x,T,M,D):(V&64||V&128)&&H.process(R,A,L,se,ee,x,T,M,D,ft)}oe!=null&&ee&&cl(oe,R&&R.ref,x,A||R,!A)},m=(R,A,L,se)=>{if(R==null)i(A.el=a(A.children),L,se);else{const ee=A.el=R.el;A.children!==R.children&&c(ee,A.children)}},g=(R,A,L,se)=>{R==null?i(A.el=l(A.children||""),L,se):A.el=R.el},b=(R,A,L,se)=>{[R.el,R.anchor]=h(R.children,A,L,se,R.el,R.anchor)},Q=({el:R,anchor:A},L,se)=>{let ee;for(;R&&R!==A;)ee=f(R),i(R,L,se),R=ee;i(A,L,se)},y=({el:R,anchor:A})=>{let L;for(;R&&R!==A;)L=f(R),s(R),R=L;s(A)},S=(R,A,L,se,ee,x,T,M,D)=>{A.type==="svg"?T="svg":A.type==="math"&&(T="mathml"),R==null?v(A,L,se,ee,x,T,M,D):k(R,A,ee,x,T,M,D)},v=(R,A,L,se,ee,x,T,M)=>{let D,H;const{props:oe,shapeFlag:V,transition:U,dirs:he}=R;if(D=R.el=o(R.type,x,oe&&oe.is,oe),V&8?u(D,R.children):V&16&&w(R.children,D,null,se,ee,Zf(R,x),T,M),he&&Ci(R,null,se,"created"),P(D,R,R.scopeId,T,se),oe){for(const Le in oe)Le!=="value"&&!Po(Le)&&r(D,Le,null,oe[Le],x,se);"value"in oe&&r(D,"value",null,oe.value,x),(H=oe.onVnodeBeforeMount)&&xn(H,se,R)}he&&Ci(R,null,se,"beforeMount");const we=A0(ee,U);we&&U.beforeEnter(D),i(D,A,L),((H=oe&&oe.onVnodeMounted)||we||he)&&Yt(()=>{H&&xn(H,se,R),we&&U.enter(D),he&&Ci(R,null,se,"mounted")},ee)},P=(R,A,L,se,ee)=>{if(L&&d(R,L),se)for(let x=0;x{for(let H=D;H{const M=A.el=R.el;let{patchFlag:D,dynamicChildren:H,dirs:oe}=A;D|=R.patchFlag&16;const V=R.props||We,U=A.props||We;let he;if(L&&yr(L,!1),(he=U.onVnodeBeforeUpdate)&&xn(he,L,A,R),oe&&Ci(A,R,L,"beforeUpdate"),L&&yr(L,!0),(V.innerHTML&&U.innerHTML==null||V.textContent&&U.textContent==null)&&u(M,""),H?E(R.dynamicChildren,H,M,L,se,Zf(A,ee),x):T||Y(R,A,M,null,L,se,Zf(A,ee),x,!1),D>0){if(D&16)I(M,V,U,L,ee);else if(D&2&&V.class!==U.class&&r(M,"class",null,U.class,ee),D&4&&r(M,"style",V.style,U.style,ee),D&8){const we=A.dynamicProps;for(let Le=0;Le{he&&xn(he,L,A,R),oe&&Ci(A,R,L,"updated")},se)},E=(R,A,L,se,ee,x,T)=>{for(let M=0;M{if(A!==L){if(A!==We)for(const x in A)!Po(x)&&!(x in L)&&r(R,x,A[x],null,ee,se);for(const x in L){if(Po(x))continue;const T=L[x],M=A[x];T!==M&&x!=="value"&&r(R,x,M,T,ee,se)}"value"in L&&r(R,"value",A.value,L.value,ee)}},Z=(R,A,L,se,ee,x,T,M,D)=>{const H=A.el=R?R.el:a(""),oe=A.anchor=R?R.anchor:a("");let{patchFlag:V,dynamicChildren:U,slotScopeIds:he}=A;he&&(M=M?M.concat(he):he),R==null?(i(H,L,se),i(oe,L,se),w(A.children||[],L,oe,ee,x,T,M,D)):V>0&&V&64&&U&&R.dynamicChildren?(E(R.dynamicChildren,U,L,ee,x,T,M),(A.key!=null||ee&&A===ee.subTree)&&rm(R,A,!0)):Y(R,A,L,oe,ee,x,T,M,D)},K=(R,A,L,se,ee,x,T,M,D)=>{A.slotScopeIds=M,R==null?A.shapeFlag&512?ee.ctx.activate(A,L,se,T,D):ie(A,L,se,ee,x,T,D):ae(R,A,D)},ie=(R,A,L,se,ee,x,T)=>{const M=R.component=j0(R,se,ee);if(Ll(R)&&(M.ctx.renderer=ft),G0(M,!1,T),M.asyncDep){if(ee&&ee.registerDep(M,G,T),!R.el){const D=M.subTree=X(Tt);g(null,D,A,L)}}else G(M,R,A,L,ee,x,T)},ae=(R,A,L)=>{const se=A.component=R.component;if(VR(R,A,L))if(se.asyncDep&&!se.asyncResolved){q(se,A,L);return}else se.next=A,se.update();else A.el=R.el,se.vnode=A},G=(R,A,L,se,ee,x,T)=>{const M=()=>{if(R.isMounted){let{next:V,bu:U,u:he,parent:we,vnode:Le}=R;{const Zn=E0(R);if(Zn){V&&(V.el=Le.el,q(R,V,T)),Zn.asyncDep.then(()=>{R.isUnmounted||M()});return}}let Ne=V,Ct;yr(R,!1),V?(V.el=Le.el,q(R,V,T)):V=Le,U&&wo(U),(Ct=V.props&&V.props.onVnodeBeforeUpdate)&&xn(Ct,we,V,Le),yr(R,!0);const Nt=au(R),Hn=R.subTree;R.subTree=Nt,p(Hn,Nt,O(Hn.el),Re(Hn),R,ee,x),V.el=Nt.el,Ne===null&&DO(R,Nt.el),he&&Yt(he,ee),(Ct=V.props&&V.props.onVnodeUpdated)&&Yt(()=>xn(Ct,we,V,Le),ee)}else{let V;const{el:U,props:he}=A,{bm:we,m:Le,parent:Ne,root:Ct,type:Nt}=R,Hn=Js(A);if(yr(R,!1),we&&wo(we),!Hn&&(V=he&&he.onVnodeBeforeMount)&&xn(V,Ne,A),yr(R,!0),U&&xt){const Zn=()=>{R.subTree=au(R),xt(U,R.subTree,R,ee,null)};Hn&&Nt.__asyncHydrate?Nt.__asyncHydrate(U,R,Zn):Zn()}else{Ct.ce&&Ct.ce._injectChildStyle(Nt);const Zn=R.subTree=au(R);p(null,Zn,L,se,R,ee,x),A.el=Zn.el}if(Le&&Yt(Le,ee),!Hn&&(V=he&&he.onVnodeMounted)){const Zn=A;Yt(()=>xn(V,Ne,Zn),ee)}(A.shapeFlag&256||Ne&&Js(Ne.vnode)&&Ne.vnode.shapeFlag&256)&&R.a&&Yt(R.a,ee),R.isMounted=!0,A=L=se=null}};R.scope.on();const D=R.effect=new il(M);R.scope.off();const H=R.update=D.run.bind(D),oe=R.job=D.runIfDirty.bind(D);oe.i=R,oe.id=R.uid,D.scheduler=()=>Np(oe),yr(R,!0),H()},q=(R,A,L)=>{A.component=R;const se=R.vnode.props;R.vnode=A,R.next=null,bR(R,A.props,se,L),xR(R,A.children,L),ys(),Ng(R),bs()},Y=(R,A,L,se,ee,x,T,M,D=!1)=>{const H=R&&R.children,oe=R?R.shapeFlag:0,V=A.children,{patchFlag:U,shapeFlag:he}=A;if(U>0){if(U&128){ue(H,V,L,se,ee,x,T,M,D);return}else if(U&256){F(H,V,L,se,ee,x,T,M,D);return}}he&8?(oe&16&&Ze(H,ee,x),V!==H&&u(L,V)):oe&16?he&16?ue(H,V,L,se,ee,x,T,M,D):Ze(H,ee,x,!0):(oe&8&&u(L,""),he&16&&w(V,L,se,ee,x,T,M,D))},F=(R,A,L,se,ee,x,T,M,D)=>{R=R||So,A=A||So;const H=R.length,oe=A.length,V=Math.min(H,oe);let U;for(U=0;Uoe?Ze(R,ee,x,!0,!1,V):w(A,L,se,ee,x,T,M,D,V)},ue=(R,A,L,se,ee,x,T,M,D)=>{let H=0;const oe=A.length;let V=R.length-1,U=oe-1;for(;H<=V&&H<=U;){const he=R[H],we=A[H]=D?Ls(A[H]):wn(A[H]);if(fi(he,we))p(he,we,L,null,ee,x,T,M,D);else break;H++}for(;H<=V&&H<=U;){const he=R[V],we=A[U]=D?Ls(A[U]):wn(A[U]);if(fi(he,we))p(he,we,L,null,ee,x,T,M,D);else break;V--,U--}if(H>V){if(H<=U){const he=U+1,we=heU)for(;H<=V;)fe(R[H],ee,x,!0),H++;else{const he=H,we=H,Le=new Map;for(H=we;H<=U;H++){const zn=A[H]=D?Ls(A[H]):wn(A[H]);zn.key!=null&&Le.set(zn.key,H)}let Ne,Ct=0;const Nt=U-we+1;let Hn=!1,Zn=0;const ma=new Array(Nt);for(H=0;H=Nt){fe(zn,ee,x,!0);continue}let Pi;if(zn.key!=null)Pi=Le.get(zn.key);else for(Ne=we;Ne<=U;Ne++)if(ma[Ne-we]===0&&fi(zn,A[Ne])){Pi=Ne;break}Pi===void 0?fe(zn,ee,x,!0):(ma[Pi-we]=H+1,Pi>=Zn?Zn=Pi:Hn=!0,p(zn,A[Pi],L,null,ee,x,T,M,D),Ct++)}const Yg=Hn?wR(ma):So;for(Ne=Yg.length-1,H=Nt-1;H>=0;H--){const zn=we+H,Pi=A[zn],Mg=zn+1{const{el:x,type:T,transition:M,children:D,shapeFlag:H}=R;if(H&6){Se(R.component.subTree,A,L,se);return}if(H&128){R.suspense.move(A,L,se);return}if(H&64){T.move(R,A,L,ft);return}if(T===Ce){i(x,A,L);for(let V=0;VM.enter(x),ee);else{const{leave:V,delayLeave:U,afterLeave:he}=M,we=()=>{R.ctx.isUnmounted?s(x):i(x,A,L)},Le=()=>{V(x,()=>{we(),he&&he()})};U?U(x,we,Le):Le()}else i(x,A,L)},fe=(R,A,L,se=!1,ee=!1)=>{const{type:x,props:T,ref:M,children:D,dynamicChildren:H,shapeFlag:oe,patchFlag:V,dirs:U,cacheIndex:he}=R;if(V===-2&&(ee=!1),M!=null&&(ys(),cl(M,null,L,R,!0),bs()),he!=null&&(A.renderCache[he]=void 0),oe&256){A.ctx.deactivate(R);return}const we=oe&1&&U,Le=!Js(R);let Ne;if(Le&&(Ne=T&&T.onVnodeBeforeUnmount)&&xn(Ne,A,R),oe&6)Fe(R.component,L,se);else{if(oe&128){R.suspense.unmount(L,se);return}we&&Ci(R,null,A,"beforeUnmount"),oe&64?R.type.remove(R,A,L,ft,se):H&&!H.hasOnce&&(x!==Ce||V>0&&V&64)?Ze(H,A,L,!1,!0):(x===Ce&&V&384||!ee&&oe&16)&&Ze(D,A,L),se&&Te(R)}(Le&&(Ne=T&&T.onVnodeUnmounted)||we)&&Yt(()=>{Ne&&xn(Ne,A,R),we&&Ci(R,null,A,"unmounted")},L)},Te=R=>{const{type:A,el:L,anchor:se,transition:ee}=R;if(A===Ce){Ve(L,se);return}if(A===Ar){y(R);return}const x=()=>{s(L),ee&&!ee.persisted&&ee.afterLeave&&ee.afterLeave()};if(R.shapeFlag&1&&ee&&!ee.persisted){const{leave:T,delayLeave:M}=ee,D=()=>T(L,x);M?M(R.el,x,D):D()}else x()},Ve=(R,A)=>{let L;for(;R!==A;)L=f(R),s(R),R=L;s(A)},Fe=(R,A,L)=>{const{bum:se,scope:ee,job:x,subTree:T,um:M,m:D,a:H,parent:oe,slots:{__:V}}=R;Vu(D),Vu(H),se&&wo(se),oe&&ye(V)&&V.forEach(U=>{oe.renderCache[U]=void 0}),ee.stop(),x&&(x.flags|=8,fe(T,R,A,L)),M&&Yt(M,A),Yt(()=>{R.isUnmounted=!0},A),A&&A.pendingBranch&&!A.isUnmounted&&R.asyncDep&&!R.asyncResolved&&R.suspenseId===A.pendingId&&(A.deps--,A.deps===0&&A.resolve())},Ze=(R,A,L,se=!1,ee=!1,x=0)=>{for(let T=x;T{if(R.shapeFlag&6)return Re(R.component.subTree);if(R.shapeFlag&128)return R.suspense.next();const A=f(R.anchor||R.el),L=A&&A[e0];return L?f(L):A};let st=!1;const De=(R,A,L)=>{R==null?A._vnode&&fe(A._vnode,null,null,!0):p(A._vnode||null,R,A,null,null,null,L),A._vnode=R,st||(st=!0,Ng(),Xu(),st=!1)},ft={p,um:fe,m:Se,r:Te,mt:ie,mc:w,pc:Y,pbc:E,n:Re,o:t};let Gt,xt;return e&&([Gt,xt]=e(ft)),{render:De,hydrate:Gt,createApp:QR(De,Gt)}}function Zf({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function yr({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function A0(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function rm(t,e,n=!1){const i=t.children,s=e.children;if(ye(i)&&ye(s))for(let r=0;r>1,t[n[a]]0&&(e[i]=n[r-1]),n[r]=i)}}for(r=n.length,o=n[r-1];r-- >0;)n[r]=o,o=e[o];return n}function E0(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:E0(e)}function Vu(t){if(t)for(let e=0;egn(Z0);function Zt(t,e){return Nl(t,null,e)}function om(t,e){return Nl(t,null,{flush:"post"})}function Y0(t,e){return Nl(t,null,{flush:"sync"})}function _e(t,e,n){return Nl(t,e,n)}function Nl(t,e,n=We){const{immediate:i,deep:s,flush:r,once:o}=n,a=Ot({},n),l=e&&i||!e&&r!=="post";let c;if(zo){if(r==="sync"){const d=z0();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=si,d.resume=si,d.pause=si,d}}const u=qt;a.call=(d,h,p)=>ai(d,u,h,p);let O=!1;r==="post"?a.scheduler=d=>{Yt(d,u&&u.suspense)}:r!=="sync"&&(O=!0,a.scheduler=(d,h)=>{h?d():Np(d)}),a.augmentJob=d=>{e&&(d.flags|=4),O&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const f=yk(t,e,a);return zo&&(c?c.push(f):l&&f()),f}function TR(t,e,n){const i=this.proxy,s=pt(t)?t.includes(".")?M0(i,t):()=>i[t]:t.bind(i,i);let r;ke(e)?r=e:(r=e.handler,n=e);const o=Mr(this),a=Nl(s,r.bind(i),n);return o(),a}function M0(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;s{let u,O=We,f;return Y0(()=>{const d=t[s];hn(u,d)&&(u=d,c())}),{get(){return l(),n.get?n.get(u):u},set(d){const h=n.set?n.set(d):d;if(!hn(h,u)&&!(O!==We&&hn(d,O)))return;const p=i.vnode.props;p&&(e in p||s in p||r in p)&&(`onUpdate:${e}`in p||`onUpdate:${s}`in p||`onUpdate:${r}`in p)||(u=d,c()),i.emit(`update:${e}`,h),hn(d,h)&&hn(d,O)&&!hn(h,f)&&c(),O=d,f=h}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||We:a,done:!1}:{done:!0}}}},a}const q0=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Wt(e)}Modifiers`]||t[`${Rn(e)}Modifiers`];function kR(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||We;let s=n;const r=e.startsWith("update:"),o=r&&q0(i,e.slice(7));o&&(o.trim&&(s=n.map(u=>pt(u)?u.trim():u)),o.number&&(s=n.map(xu)));let a,l=i[a=xo(e)]||i[a=xo(Wt(e))];!l&&r&&(l=i[a=xo(Rn(e))]),l&&ai(l,t,6,s);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,ai(c,t,6,s)}}function I0(t,e,n=!1){const i=e.emitsCache,s=i.get(t);if(s!==void 0)return s;const r=t.emits;let o={},a=!1;if(!ke(t)){const l=c=>{const u=I0(c,e,!0);u&&(a=!0,Ot(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!a?(at(t)&&i.set(t,null),null):(ye(r)?r.forEach(l=>o[l]=null):Ot(o,r),at(t)&&i.set(t,o),o)}function WO(t,e){return!t||!ql(e)?!1:(e=e.slice(2).replace(/Once$/,""),tt(t,e[0].toLowerCase()+e.slice(1))||tt(t,Rn(e))||tt(t,e))}function au(t){const{type:e,vnode:n,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:O,data:f,setupState:d,ctx:h,inheritAttrs:p}=t,m=ll(t);let g,b;try{if(n.shapeFlag&4){const y=s||i,S=y;g=wn(c.call(S,y,u,O,d,f,h)),b=a}else{const y=e;g=wn(y.length>1?y(O,{attrs:a,slots:o,emit:l}):y(O,null)),b=e.props?a:XR(a)}}catch(y){ja.length=0,Br(y,t,1),g=X(Tt)}let Q=g;if(b&&p!==!1){const y=Object.keys(b),{shapeFlag:S}=Q;y.length&&S&7&&(r&&y.some(Zp)&&(b=CR(b,r)),Q=gi(Q,b,!1,!0))}return n.dirs&&(Q=gi(Q,null,!1,!0),Q.dirs=Q.dirs?Q.dirs.concat(n.dirs):n.dirs),n.transition&&Ps(Q,n.transition),g=Q,ll(m),g}function RR(t,e=!0){let n;for(let i=0;i{let e;for(const n in t)(n==="class"||n==="style"||ql(n))&&((e||(e={}))[n]=t[n]);return e},CR=(t,e)=>{const n={};for(const i in t)(!Zp(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function VR(t,e,n){const{props:i,children:s,component:r}=t,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?s$(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let O=0;Ot.__isSuspense;let Kd=0;const AR={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,r,o,a,l,c){if(t==null)ZR(e,n,i,s,r,o,a,l,c);else{if(r&&r.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}zR(t,e,n,i,s,o,a,l,c)}},hydrate:YR,normalize:MR},ER=AR;function Ol(t,e){const n=t.props&&t.props[e];ke(n)&&n()}function ZR(t,e,n,i,s,r,o,a,l){const{p:c,o:{createElement:u}}=l,O=u("div"),f=t.suspense=U0(t,s,i,e,O,n,r,o,a,l);c(null,f.pendingBranch=t.ssContent,O,null,i,f,r,o),f.deps>0?(Ol(t,"onPending"),Ol(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,r,o),_o(f,t.ssFallback)):f.resolve(!1,!0)}function zR(t,e,n,i,s,r,o,a,{p:l,um:c,o:{createElement:u}}){const O=e.suspense=t.suspense;O.vnode=e,e.el=t.el;const f=e.ssContent,d=e.ssFallback,{activeBranch:h,pendingBranch:p,isInFallback:m,isHydrating:g}=O;if(p)O.pendingBranch=f,fi(f,p)?(l(p,f,O.hiddenContainer,null,s,O,r,o,a),O.deps<=0?O.resolve():m&&(g||(l(h,d,n,i,s,null,r,o,a),_o(O,d)))):(O.pendingId=Kd++,g?(O.isHydrating=!1,O.activeBranch=p):c(p,s,O),O.deps=0,O.effects.length=0,O.hiddenContainer=u("div"),m?(l(null,f,O.hiddenContainer,null,s,O,r,o,a),O.deps<=0?O.resolve():(l(h,d,n,i,s,null,r,o,a),_o(O,d))):h&&fi(f,h)?(l(h,f,n,i,s,O,r,o,a),O.resolve(!0)):(l(null,f,O.hiddenContainer,null,s,O,r,o,a),O.deps<=0&&O.resolve()));else if(h&&fi(f,h))l(h,f,n,i,s,O,r,o,a),_o(O,f);else if(Ol(e,"onPending"),O.pendingBranch=f,f.shapeFlag&512?O.pendingId=f.component.suspenseId:O.pendingId=Kd++,l(null,f,O.hiddenContainer,null,s,O,r,o,a),O.deps<=0)O.resolve();else{const{timeout:b,pendingId:Q}=O;b>0?setTimeout(()=>{O.pendingId===Q&&O.fallback(d)},b):b===0&&O.fallback(d)}}function U0(t,e,n,i,s,r,o,a,l,c,u=!1){const{p:O,m:f,um:d,n:h,o:{parentNode:p,remove:m}}=c;let g;const b=qR(t);b&&e&&e.pendingBranch&&(g=e.pendingId,e.deps++);const Q=t.props?wu(t.props.timeout):void 0,y=r,S={vnode:t,parent:e,parentComponent:n,namespace:o,container:i,hiddenContainer:s,deps:0,pendingId:Kd++,timeout:typeof Q=="number"?Q:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(v=!1,P=!1){const{vnode:w,activeBranch:k,pendingBranch:E,pendingId:I,effects:Z,parentComponent:K,container:ie}=S;let ae=!1;S.isHydrating?S.isHydrating=!1:v||(ae=k&&E.transition&&E.transition.mode==="out-in",ae&&(k.transition.afterLeave=()=>{I===S.pendingId&&(f(E,ie,r===y?h(k):r,0),ol(Z))}),k&&(p(k.el)===ie&&(r=h(k)),d(k,K,S,!0)),ae||f(E,ie,r,0)),_o(S,E),S.pendingBranch=null,S.isInFallback=!1;let G=S.parent,q=!1;for(;G;){if(G.pendingBranch){G.effects.push(...Z),q=!0;break}G=G.parent}!q&&!ae&&ol(Z),S.effects=[],b&&e&&e.pendingBranch&&g===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),Ol(w,"onResolve")},fallback(v){if(!S.pendingBranch)return;const{vnode:P,activeBranch:w,parentComponent:k,container:E,namespace:I}=S;Ol(P,"onFallback");const Z=h(w),K=()=>{S.isInFallback&&(O(null,v,E,Z,k,null,I,a,l),_o(S,v))},ie=v.transition&&v.transition.mode==="out-in";ie&&(w.transition.afterLeave=K),S.isInFallback=!0,d(w,k,null,!0),ie||K()},move(v,P,w){S.activeBranch&&f(S.activeBranch,v,P,w),S.container=v},next(){return S.activeBranch&&h(S.activeBranch)},registerDep(v,P,w){const k=!!S.pendingBranch;k&&S.deps++;const E=v.vnode.el;v.asyncDep.catch(I=>{Br(I,v,0)}).then(I=>{if(v.isUnmounted||S.isUnmounted||S.pendingId!==v.suspenseId)return;v.asyncResolved=!0;const{vnode:Z}=v;nh(v,I,!1),E&&(Z.el=E);const K=!E&&v.subTree.el;P(v,Z,p(E||v.subTree.el),E?null:h(v.subTree),S,o,w),K&&m(K),DO(v,Z.el),k&&--S.deps===0&&S.resolve()})},unmount(v,P){S.isUnmounted=!0,S.activeBranch&&d(S.activeBranch,n,v,P),S.pendingBranch&&d(S.pendingBranch,n,v,P)}};return S}function YR(t,e,n,i,s,r,o,a,l){const c=e.suspense=U0(e,i,n,t.parentNode,document.createElement("div"),null,s,r,o,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,r,o);return c.deps===0&&c.resolve(!1,!0),u}function MR(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=r$(i?n.default:n),t.ssFallback=i?r$(n.fallback):X(Tt)}function r$(t){let e;if(ke(t)){const n=Yr&&t._c;n&&(t._d=!1,C()),t=t(),n&&(t._d=!0,e=cn,D0())}return ye(t)&&(t=RR(t)),t=wn(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function W0(t,e){e&&e.pendingBranch?ye(t)?e.effects.push(...t):e.effects.push(t):ol(t)}function _o(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,DO(i,s))}function qR(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const Ce=Symbol.for("v-fgt"),gs=Symbol.for("v-txt"),Tt=Symbol.for("v-cmt"),Ar=Symbol.for("v-stc"),ja=[];let cn=null;function C(t=!1){ja.push(cn=t?null:[])}function D0(){ja.pop(),cn=ja[ja.length-1]||null}let Yr=1;function Jd(t,e=!1){Yr+=t,t<0&&cn&&e&&(cn.hasOnce=!0)}function L0(t){return t.dynamicChildren=Yr>0?cn||So:null,D0(),Yr>0&&cn&&cn.push(t),t}function re(t,e,n,i,s,r){return L0(N(t,e,n,i,s,r,!0))}function j(t,e,n,i,s){return L0(X(t,e,n,i,s,!0))}function xs(t){return t?t.__v_isVNode===!0:!1}function fi(t,e){return t.type===e.type&&t.key===e.key}function IR(t){}const N0=({key:t})=>t??null,lu=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?pt(t)||Ge(t)||ke(t)?{i:Ut,r:t,k:e,f:!!n}:t:null);function N(t,e=null,n=null,i=0,s=null,r=t===Ce?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&N0(e),ref:e&&lu(e),scopeId:MO,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ut};return a?(lm(l,n),r&128&&t.normalize(l)):n&&(l.shapeFlag|=pt(n)?8:16),Yr>0&&!o&&cn&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&cn.push(l),l}const X=UR;function UR(t,e=null,n=null,i=0,s=null,r=!1){if((!t||t===g0)&&(t=Tt),xs(t)){const a=gi(t,e,!0);return n&&lm(a,n),Yr>0&&!r&&cn&&(a.shapeFlag&6?cn[cn.indexOf(t)]=a:cn.push(a)),a.patchFlag=-2,a}if(GR(t)&&(t=t.__vccOpts),e){e=jl(e);let{class:a,style:l}=e;a&&!pt(a)&&(e.class=bt(a)),at(l)&&(YO(l)&&!ye(l)&&(l=Ot({},l)),e.style=Gn(l))}const o=pt(t)?1:Au(t)?128:t0(t)?64:at(t)?4:ke(t)?2:0;return N(t,e,n,i,s,o,r,!0)}function jl(t){return t?YO(t)||x0(t)?Ot({},t):t:null}function gi(t,e,n=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=t,c=e?be(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&N0(c),ref:e&&e.ref?n&&r?ye(r)?r.concat(lu(e)):[r,lu(e)]:lu(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ce?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&gi(t.ssContent),ssFallback:t.ssFallback&&gi(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&Ps(u,l.clone(u)),u}function Ae(t=" ",e=0){return X(gs,null,t,e)}function am(t,e){const n=X(Ar,null,t);return n.staticCount=e,n}function Pe(t="",e=!1){return e?(C(),j(Tt,null,t)):X(Tt,null,t)}function wn(t){return t==null||typeof t=="boolean"?X(Tt):ye(t)?X(Ce,null,t.slice()):xs(t)?Ls(t):X(gs,null,String(t))}function Ls(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:gi(t)}function lm(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(ye(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),lm(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!x0(e)?e._ctx=Ut:s===3&&Ut&&(Ut.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else ke(e)?(e={default:e,_ctx:Ut},n=32):(e=String(e),i&64?(n=16,e=[Ae(e)]):n=8);t.children=e,t.shapeFlag|=n}function be(...t){const e={};for(let n=0;nqt||Ut;let Eu,eh;{const t=kO(),e=(n,i)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};Eu=e("__VUE_INSTANCE_SETTERS__",n=>qt=n),eh=e("__VUE_SSR_SETTERS__",n=>zo=n)}const Mr=t=>{const e=qt;return Eu(t),t.scope.on(),()=>{t.scope.off(),Eu(e)}},th=()=>{qt&&qt.scope.off(),Eu(null)};function B0(t){return t.vnode.shapeFlag&4}let zo=!1;function G0(t,e=!1,n=!1){e&&eh(e);const{props:i,children:s}=t.vnode,r=B0(t);yR(t,i,r,e),PR(t,s,n||e);const o=r?LR(t,e):void 0;return e&&eh(!1),o}function LR(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Bd);const{setup:i}=n;if(i){ys();const s=t.setupContext=i.length>1?H0(t):null,r=Mr(t),o=ia(i,t,0,[t.props,s]),a=Yp(o);if(bs(),r(),(a||t.sp)&&!Js(t)&&Fp(t),a){if(o.then(th,th),e)return o.then(l=>{nh(t,l,e)}).catch(l=>{Br(l,t,0)});t.asyncDep=o}else nh(t,o,e)}else F0(t,e)}function nh(t,e,n){ke(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:at(e)&&(t.setupState=Dp(e)),F0(t,n)}let Zu,ih;function NR(t){Zu=t,ih=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,eR))}}const jR=()=>!Zu;function F0(t,e,n){const i=t.type;if(!t.render){if(!e&&Zu&&!i.render){const s=i.template||nm(t).template;if(s){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=Ot(Ot({isCustomElement:r,delimiters:a},o),l);i.render=Zu(s,c)}}t.render=i.render||si,ih&&ih(t)}{const s=Mr(t);ys();try{dR(t)}finally{bs(),s()}}}const BR={get(t,e){return an(t,"get",""),t[e]}};function H0(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,BR),slots:t.slots,emit:t.emit,expose:e}}function Bl(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Dp(Wl(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Na)return Na[n](t)},has(e,n){return n in e||n in Na}})):t.proxy}function sh(t,e=!0){return ke(t)?t.displayName||t.name:t.name||e&&t.__name}function GR(t){return ke(t)&&"__vccOpts"in t}const J=(t,e)=>mk(t,e,zo);function Vn(t,e,n){const i=arguments.length;return i===2?at(e)&&!ye(e)?xs(e)?X(t,null,[e]):X(t,e):X(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&xs(n)&&(n=[n]),X(t,e,n))}function FR(){}function HR(t,e,n,i){const s=n[i];if(s&&K0(s,t))return s;const r=e();return r.memo=t.slice(),r.cacheIndex=i,n[i]=r}function K0(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let i=0;i0&&cn&&cn.push(t),!0}const J0="3.5.16",KR=si,JR=xk,eX=co,tX=JS,nX={createComponentInstance:j0,setupComponent:G0,renderComponentRoot:au,setCurrentRenderingInstance:ll,isVNode:xs,normalizeVNode:wn,getComponentPublicInstance:Bl,ensureValidVNode:tm,pushWarningContext:bk,popWarningContext:Sk},iX=nX,sX=null,rX=null,oX=null;/** * @vue/runtime-dom v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let yh;const i0=typeof window<"u"&&window.trustedTypes;if(i0)try{yh=i0.createPolicy("vue",{createHTML:t=>t})}catch{}const kw=yh?t=>yh.createHTML(t):t=>t,UE="http://www.w3.org/2000/svg",jE="http://www.w3.org/1998/Math/MathML",Xi=typeof document<"u"?document:null,s0=Xi&&Xi.createElement("template"),qE={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e==="svg"?Xi.createElementNS(UE,t):e==="mathml"?Xi.createElementNS(jE,t):n?Xi.createElement(t,{is:n}):Xi.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>Xi.createTextNode(t),createComment:t=>Xi.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Xi.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,s,r){const o=n?n.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===r||!(s=s.nextSibling)););else{s0.innerHTML=kw(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const l=s0.content;if(i==="svg"||i==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}e.insertBefore(l,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},ks="transition",Jo="animation",ko=Symbol("_vtc"),Ow={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Cw=ut({},nm,Ow),KE=t=>(t.displayName="Transition",t.props=Cw,t),GE=KE((t,{slots:e})=>An(E1,_w(t),e)),cr=(t,e=[])=>{we(t)?t.forEach(n=>n(...e)):t&&t(...e)},r0=t=>t?we(t)?t.some(e=>e.length>1):t.length>1:!1;function _w(t){const e={};for(const L in t)L in Ow||(e[L]=t[L]);if(t.css===!1)return e;const{name:n="v",type:i,duration:s,enterFromClass:r=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:c=o,appearToClass:u=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,p=YE(s),m=p&&p[0],y=p&&p[1],{onBeforeEnter:g,onEnter:x,onEnterCancelled:b,onLeave:w,onLeaveCancelled:S,onBeforeAppear:k=g,onAppear:O=x,onAppearCancelled:_=b}=e,E=(L,Y,ee,re)=>{L._enterCancelled=re,Es(L,Y?u:l),Es(L,Y?c:o),ee&&ee()},I=(L,Y)=>{L._isLeaving=!1,Es(L,f),Es(L,h),Es(L,d),Y&&Y()},F=L=>(Y,ee)=>{const re=L?O:x,q=()=>E(Y,L,ee);cr(re,[Y,q]),o0(()=>{Es(Y,L?a:r),ki(Y,L?u:l),r0(re)||l0(Y,i,m,q)})};return ut(e,{onBeforeEnter(L){cr(g,[L]),ki(L,r),ki(L,o)},onBeforeAppear(L){cr(k,[L]),ki(L,a),ki(L,c)},onEnter:F(!1),onAppear:F(!0),onLeave(L,Y){L._isLeaving=!0;const ee=()=>I(L,Y);ki(L,f),L._enterCancelled?(ki(L,d),bh()):(bh(),ki(L,d)),o0(()=>{L._isLeaving&&(Es(L,f),ki(L,h),r0(w)||l0(L,i,y,ee))}),cr(w,[L,ee])},onEnterCancelled(L){E(L,!1,void 0,!0),cr(b,[L])},onAppearCancelled(L){E(L,!0,void 0,!0),cr(_,[L])},onLeaveCancelled(L){I(L),cr(S,[L])}})}function YE(t){if(t==null)return null;if(ot(t))return[rd(t.enter),rd(t.leave)];{const e=rd(t);return[e,e]}}function rd(t){return Jc(t)}function ki(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[ko]||(t[ko]=new Set)).add(e)}function Es(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[ko];n&&(n.delete(e),n.size||(t[ko]=void 0))}function o0(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let XE=0;function l0(t,e,n,i){const s=t._endId=++XE,r=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:l,propCount:a}=Aw(t,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{t.removeEventListener(c,d),r()},d=h=>{h.target===t&&++u>=a&&f()};setTimeout(()=>{u(n[p]||"").split(", "),s=i(`${ks}Delay`),r=i(`${ks}Duration`),o=a0(s,r),l=i(`${Jo}Delay`),a=i(`${Jo}Duration`),c=a0(l,a);let u=null,f=0,d=0;e===ks?o>0&&(u=ks,f=o,d=r.length):e===Jo?c>0&&(u=Jo,f=c,d=a.length):(f=Math.max(o,c),u=f>0?o>c?ks:Jo:null,d=u?u===ks?r.length:a.length:0);const h=u===ks&&/\b(transform|all)(,|$)/.test(i(`${ks}Property`).toString());return{type:u,timeout:f,propCount:d,hasTransform:h}}function a0(t,e){for(;t.lengthc0(n)+c0(t[i])))}function c0(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function bh(){return document.body.offsetHeight}function JE(t,e,n){const i=t[ko];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const au=Symbol("_vod"),Ew=Symbol("_vsh"),Tw={beforeMount(t,{value:e},{transition:n}){t[au]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Qo(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),Qo(t,!0),i.enter(t)):i.leave(t,()=>{Qo(t,!1)}):Qo(t,e))},beforeUnmount(t,{value:e}){Qo(t,e)}};function Qo(t,e){t.style.display=e?t[au]:"none",t[Ew]=!e}function QE(){Tw.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const Pw=Symbol("");function ZE(t){const e=yt();if(!e)return;const n=e.ut=(s=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(r=>cu(r,s))},i=()=>{const s=t(e.proxy);e.ce?cu(e.ce,s):vh(e.subTree,s),n(s)};sm(()=>{Il(i)}),St(()=>{Te(i,Yn,{flush:"post"});const s=new MutationObserver(i);s.observe(e.subTree.el.parentNode,{childList:!0}),Fi(()=>s.disconnect())})}function vh(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{vh(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)cu(t.el,e);else if(t.type===Me)t.children.forEach(n=>vh(n,e));else if(t.type===Sr){let{el:n,anchor:i}=t;for(;n&&(cu(n,e),n!==i);)n=n.nextSibling}}function cu(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const s in e)n.setProperty(`--${s}`,e[s]),i+=`--${s}: ${e[s]};`;n[Pw]=i}}const eT=/(^|;)\s*display\s*:/;function tT(t,e,n){const i=t.style,s=ht(n);let r=!1;if(n&&!s){if(e)if(ht(e))for(const o of e.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&Nc(i,l,"")}else for(const o in e)n[o]==null&&Nc(i,o,"");for(const o in n)o==="display"&&(r=!0),Nc(i,o,n[o])}else if(s){if(e!==n){const o=i[Pw];o&&(n+=";"+o),i.cssText=n,r=eT.test(n)}}else e&&t.removeAttribute("style");au in t&&(t[au]=r?i.display:"",t[Ew]&&(i.display="none"))}const u0=/\s*!important$/;function Nc(t,e,n){if(we(n))n.forEach(i=>Nc(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=nT(t,e);u0.test(n)?t.setProperty(On(i),n.replace(u0,""),"important"):t[i]=n}}const f0=["Webkit","Moz","ms"],od={};function nT(t,e){const n=od[e];if(n)return n;let i=Bt(e);if(i!=="filter"&&i in t)return od[e]=i;i=pa(i);for(let s=0;sld||(oT.then(()=>ld=0),ld=Date.now());function aT(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Zn(cT(i,n.value),e,5,[i])};return n.value=t,n.attached=lT(),n}function cT(t,e){if(we(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const y0=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,uT=(t,e,n,i,s,r)=>{const o=s==="svg";e==="class"?JE(t,i,o):e==="style"?tT(t,n,i):ha(e)?Hp(e)||sT(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):fT(t,e,i,o))?(p0(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&h0(t,e,i,o,r,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!ht(i))?p0(t,Bt(e),i,r,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),h0(t,e,i,o))};function fT(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&y0(e)&&_e(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return y0(e)&&ht(n)?!1:e in t}const b0={};/*! #__NO_SIDE_EFFECTS__ */function Mw(t,e,n){const i=H(t,e);Ku(i)&&ut(i,e);class s extends hf{constructor(o){super(i,o,n)}}return s.def=i,s}/*! #__NO_SIDE_EFFECTS__ */const dT=(t,e)=>Mw(t,e,zw),hT=typeof HTMLElement<"u"?HTMLElement:class{};class hf extends hT{constructor(e,n={},i=fu){super(),this._def=e,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==fu?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof hf){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,Nt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i{for(const s of i)this._setAttr(s.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(i,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:o}=i;let l;if(r&&!we(r))for(const a in r){const c=r[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=Jc(this._props[a])),(l||(l=Object.create(null)))[Bt(a)]=!0)}this._numberProps=l,this._resolveProps(i),this.shadowRoot&&this._applyStyles(o),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>e(this._def=i,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)Ze(this,i)||Object.defineProperty(this,i,{get:()=>v(n[i])})}_resolveProps(e){const{props:n}=e,i=we(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s]);for(const s of i.map(Bt))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(r){this._setProp(s,r,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let i=n?this.getAttribute(e):b0;const s=Bt(e);n&&this._numberProps&&this._numberProps[s]&&(i=Jc(i)),this._setProp(s,i,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,i=!0,s=!1){if(n!==this._props[e]&&(n===b0?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),i)){const r=this._ob;r&&r.disconnect(),n===!0?this.setAttribute(On(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(On(e),n+""):n||this.removeAttribute(On(e)),r&&r.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),Ww(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=P(this._def,ut(e,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const s=(r,o)=>{this.dispatchEvent(new CustomEvent(r,Ku(o[0])?ut({detail:o},o[0]):{detail:o}))};i.emit=(r,...o)=>{s(r,o),On(r)!==r&&s(On(r),o)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const i=this._nonce;for(let s=e.length-1;s>=0;s--){const r=document.createElement("style");i&&r.setAttribute("nonce",i),r.textContent=e[s],this.shadowRoot.prepend(r)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(e[i]||(e[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let i=0;i(delete t.props.mode,t),yT=gT({name:"TransitionGroup",props:ut({},Cw,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=yt(),i=tm();let s,r;return uf(()=>{if(!s.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!ST(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(vT),s.forEach(wT);const l=s.filter(xT);bh(),l.forEach(a=>{const c=a.el,u=c.style;ki(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const f=c[uu]=d=>{d&&d.target!==c||(!d||/transform$/.test(d.propertyName))&&(c.removeEventListener("transitionend",f),c[uu]=null,Es(c,o))};c.addEventListener("transitionend",f)}),s=[]}),()=>{const o=Ve(t),l=_w(o);let a=o.tag||Me;if(s=[],r)for(let c=0;c{l.split(/\s+/).forEach(a=>a&&i.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&i.classList.add(l)),i.style.display="none";const r=e.nodeType===1?e:e.parentNode;r.appendChild(i);const{hasTransform:o}=Aw(i);return r.removeChild(i),o}const Ks=t=>{const e=t.props["onUpdate:modelValue"]||!1;return we(e)?n=>uo(e,n):e};function kT(t){t.target.composing=!0}function w0(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Xn=Symbol("_assign"),Oo={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[Xn]=Ks(s);const r=i||s.props&&s.props.type==="number";ts(t,e?"change":"input",o=>{if(o.target.composing)return;let l=t.value;n&&(l=l.trim()),r&&(l=Xc(l)),t[Xn](l)}),n&&ts(t,"change",()=>{t.value=t.value.trim()}),e||(ts(t,"compositionstart",kT),ts(t,"compositionend",w0),ts(t,"change",w0))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:r}},o){if(t[Xn]=Ks(o),t.composing)return;const l=(r||t.type==="number")&&!/^0\d/.test(t.value)?Xc(t.value):t.value,a=e??"";l!==a&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||s&&t.value.trim()===a)||(t.value=a))}},mm={deep:!0,created(t,e,n){t[Xn]=Ks(n),ts(t,"change",()=>{const i=t._modelValue,s=Co(t),r=t.checked,o=t[Xn];if(we(i)){const l=Ju(i,s),a=l!==-1;if(r&&!a)o(i.concat(s));else if(!r&&a){const c=[...i];c.splice(l,1),o(c)}}else if(Ir(i)){const l=new Set(i);r?l.add(s):l.delete(s),o(l)}else o(Lw(t,r))})},mounted:x0,beforeUpdate(t,e,n){t[Xn]=Ks(n),x0(t,e,n)}};function x0(t,{value:e,oldValue:n},i){t._modelValue=e;let s;if(we(e))s=Ju(e,i.props.value)>-1;else if(Ir(e))s=e.has(i.props.value);else{if(e===n)return;s=qs(e,Lw(t,!0))}t.checked!==s&&(t.checked=s)}const gm={created(t,{value:e},n){t.checked=qs(e,n.props.value),t[Xn]=Ks(n),ts(t,"change",()=>{t[Xn](Co(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[Xn]=Ks(i),e!==n&&(t.checked=qs(e,i.props.value))}},ym={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Ir(e);ts(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?Xc(Co(o)):Co(o));t[Xn](t.multiple?s?new Set(r):r:r[0]),t._assigning=!0,Nt(()=>{t._assigning=!1})}),t[Xn]=Ks(i)},mounted(t,{value:e}){S0(t,e)},beforeUpdate(t,e,n){t[Xn]=Ks(n)},updated(t,{value:e}){t._assigning||S0(t,e)}};function S0(t,e){const n=t.multiple,i=we(e);if(!(n&&!i&&!Ir(e))){for(let s=0,r=t.options.length;sString(c)===String(l)):o.selected=Ju(e,l)>-1}else o.selected=e.has(l);else if(qs(Co(o),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Co(t){return"_value"in t?t._value:t.value}function Lw(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const Nw={created(t,e,n){Ha(t,e,n,null,"created")},mounted(t,e,n){Ha(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){Ha(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){Ha(t,e,n,i,"updated")}};function $w(t,e){switch(t){case"SELECT":return ym;case"TEXTAREA":return Oo;default:switch(e){case"checkbox":return mm;case"radio":return gm;default:return Oo}}}function Ha(t,e,n,i,s){const o=$w(t.tagName,n.props&&n.props.type)[s];o&&o(t,e,n,i)}function OT(){Oo.getSSRProps=({value:t})=>({value:t}),gm.getSSRProps=({value:t},e)=>{if(e.props&&qs(e.props.value,t))return{checked:!0}},mm.getSSRProps=({value:t},e)=>{if(we(t)){if(e.props&&Ju(t,e.props.value)>-1)return{checked:!0}}else if(Ir(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},Nw.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=$w(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const CT=["ctrl","shift","alt","meta"],_T={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>CT.some(n=>t[`${n}Key`]&&!e.includes(n))},st=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(s,...r)=>{for(let o=0;o{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=s=>{if(!("key"in s))return;const r=On(s.key);if(e.some(o=>o===r||AT[o]===r))return t(s)})},Vw=ut({patchProp:uT},qE);let kl,k0=!1;function Bw(){return kl||(kl=Z1(Vw))}function Fw(){return kl=k0?kl:ew(Vw),k0=!0,kl}const Ww=(...t)=>{Bw().render(...t)},ET=(...t)=>{Fw().hydrate(...t)},fu=(...t)=>{const e=Bw().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=Uw(i);if(!s)return;const r=e._component;!_e(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,Hw(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e},zw=(...t)=>{const e=Fw().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=Uw(i);if(s)return n(s,!0,Hw(s))},e};function Hw(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function Uw(t){return ht(t)?document.querySelector(t):t}let O0=!1;const TT=()=>{O0||(O0=!0,OT(),QE())};/** +**/let rh;const o$=typeof window<"u"&&window.trustedTypes;if(o$)try{rh=o$.createPolicy("vue",{createHTML:t=>t})}catch{}const ev=rh?t=>rh.createHTML(t):t=>t,aX="http://www.w3.org/2000/svg",lX="http://www.w3.org/1998/Math/MathML",as=typeof document<"u"?document:null,a$=as&&as.createElement("template"),cX={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e==="svg"?as.createElementNS(aX,t):e==="mathml"?as.createElementNS(lX,t):n?as.createElement(t,{is:n}):as.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>as.createTextNode(t),createComment:t=>as.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>as.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,s,r){const o=n?n.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===r||!(s=s.nextSibling)););else{a$.innerHTML=ev(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=a$.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},As="transition",Qa="animation",Yo=Symbol("_vtc"),tv={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},nv=Ot({},Gp,tv),uX=t=>(t.displayName="Transition",t.props=nv,t),OX=uX((t,{slots:e})=>Vn(o0,iv(t),e)),br=(t,e=[])=>{ye(t)?t.forEach(n=>n(...e)):t&&t(...e)},l$=t=>t?ye(t)?t.some(e=>e.length>1):t.length>1:!1;function iv(t){const e={};for(const Z in t)Z in tv||(e[Z]=t[Z]);if(t.css===!1)return e;const{name:n="v",type:i,duration:s,enterFromClass:r=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:O=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=t,h=fX(s),p=h&&h[0],m=h&&h[1],{onBeforeEnter:g,onEnter:b,onEnterCancelled:Q,onLeave:y,onLeaveCancelled:S,onBeforeAppear:v=g,onAppear:P=b,onAppearCancelled:w=Q}=e,k=(Z,K,ie,ae)=>{Z._enterCancelled=ae,Ms(Z,K?u:a),Ms(Z,K?c:o),ie&&ie()},E=(Z,K)=>{Z._isLeaving=!1,Ms(Z,O),Ms(Z,d),Ms(Z,f),K&&K()},I=Z=>(K,ie)=>{const ae=Z?P:b,G=()=>k(K,Z,ie);br(ae,[K,G]),c$(()=>{Ms(K,Z?l:r),ki(K,Z?u:a),l$(ae)||u$(K,i,p,G)})};return Ot(e,{onBeforeEnter(Z){br(g,[Z]),ki(Z,r),ki(Z,o)},onBeforeAppear(Z){br(v,[Z]),ki(Z,l),ki(Z,c)},onEnter:I(!1),onAppear:I(!0),onLeave(Z,K){Z._isLeaving=!0;const ie=()=>E(Z,K);ki(Z,O),Z._enterCancelled?(ki(Z,f),oh()):(oh(),ki(Z,f)),c$(()=>{Z._isLeaving&&(Ms(Z,O),ki(Z,d),l$(y)||u$(Z,i,m,ie))}),br(y,[Z,ie])},onEnterCancelled(Z){k(Z,!1,void 0,!0),br(Q,[Z])},onAppearCancelled(Z){k(Z,!0,void 0,!0),br(w,[Z])},onLeaveCancelled(Z){E(Z),br(S,[Z])}})}function fX(t){if(t==null)return null;if(at(t))return[zf(t.enter),zf(t.leave)];{const e=zf(t);return[e,e]}}function zf(t){return wu(t)}function ki(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[Yo]||(t[Yo]=new Set)).add(e)}function Ms(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[Yo];n&&(n.delete(e),n.size||(t[Yo]=void 0))}function c$(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let dX=0;function u$(t,e,n,i){const s=t._endId=++dX,r=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=sv(t,e);if(!o)return i();const c=o+"end";let u=0;const O=()=>{t.removeEventListener(c,f),r()},f=d=>{d.target===t&&++u>=l&&O()};setTimeout(()=>{u(n[h]||"").split(", "),s=i(`${As}Delay`),r=i(`${As}Duration`),o=O$(s,r),a=i(`${Qa}Delay`),l=i(`${Qa}Duration`),c=O$(a,l);let u=null,O=0,f=0;e===As?o>0&&(u=As,O=o,f=r.length):e===Qa?c>0&&(u=Qa,O=c,f=l.length):(O=Math.max(o,c),u=O>0?o>c?As:Qa:null,f=u?u===As?r.length:l.length:0);const d=u===As&&/\b(transform|all)(,|$)/.test(i(`${As}Property`).toString());return{type:u,timeout:O,propCount:f,hasTransform:d}}function O$(t,e){for(;t.lengthf$(n)+f$(t[i])))}function f$(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function oh(){return document.body.offsetHeight}function hX(t,e,n){const i=t[Yo];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const zu=Symbol("_vod"),rv=Symbol("_vsh"),ov={beforeMount(t,{value:e},{transition:n}){t[zu]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):ya(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),ya(t,!0),i.enter(t)):i.leave(t,()=>{ya(t,!1)}):ya(t,e))},beforeUnmount(t,{value:e}){ya(t,e)}};function ya(t,e){t.style.display=e?t[zu]:"none",t[rv]=!e}function pX(){ov.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const av=Symbol("");function mX(t){const e=Qt();if(!e)return;const n=e.ut=(s=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(r=>Yu(r,s))},i=()=>{const s=t(e.proxy);e.ce?Yu(e.ce,s):ah(e.subTree,s),n(s)};Hp(()=>{ol(i)}),Pt(()=>{_e(i,si,{flush:"post"});const s=new MutationObserver(i);s.observe(e.subTree.el.parentNode,{childList:!0}),Bi(()=>s.disconnect())})}function ah(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ah(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)Yu(t.el,e);else if(t.type===Ce)t.children.forEach(n=>ah(n,e));else if(t.type===Ar){let{el:n,anchor:i}=t;for(;n&&(Yu(n,e),n!==i);)n=n.nextSibling}}function Yu(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const s in e)n.setProperty(`--${s}`,e[s]),i+=`--${s}: ${e[s]};`;n[av]=i}}const gX=/(^|;)\s*display\s*:/;function $X(t,e,n){const i=t.style,s=pt(n);let r=!1;if(n&&!s){if(e)if(pt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&cu(i,a,"")}else for(const o in e)n[o]==null&&cu(i,o,"");for(const o in n)o==="display"&&(r=!0),cu(i,o,n[o])}else if(s){if(e!==n){const o=i[av];o&&(n+=";"+o),i.cssText=n,r=gX.test(n)}}else e&&t.removeAttribute("style");zu in t&&(t[zu]=r?i.display:"",t[rv]&&(i.display="none"))}const d$=/\s*!important$/;function cu(t,e,n){if(ye(n))n.forEach(i=>cu(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=QX(t,e);d$.test(n)?t.setProperty(Rn(i),n.replace(d$,""),"important"):t[i]=n}}const h$=["Webkit","Moz","ms"],Yf={};function QX(t,e){const n=Yf[e];if(n)return n;let i=Wt(e);if(i!=="filter"&&i in t)return Yf[e]=i;i=Il(i);for(let s=0;sMf||(vX.then(()=>Mf=0),Mf=Date.now());function xX(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;ai(wX(i,n.value),e,5,[i])};return n.value=t,n.attached=PX(),n}function wX(t,e){if(ye(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const y$=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,TX=(t,e,n,i,s,r)=>{const o=s==="svg";e==="class"?hX(t,i,o):e==="style"?$X(t,n,i):ql(e)?Zp(e)||bX(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):_X(t,e,i,o))?(g$(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&m$(t,e,i,o,r,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!pt(i))?g$(t,Wt(e),i,r,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),m$(t,e,i,o))};function _X(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&y$(e)&&ke(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return y$(e)&&pt(n)?!1:e in t}const b$={};/*! #__NO_SIDE_EFFECTS__ */function lv(t,e,n){const i=W(t,e);TO(i)&&Ot(i,e);class s extends LO{constructor(o){super(i,o,n)}}return s.def=i,s}/*! #__NO_SIDE_EFFECTS__ */const kX=(t,e)=>lv(t,e,Qv),RX=typeof HTMLElement<"u"?HTMLElement:class{};class LO extends RX{constructor(e,n={},i=qu){super(),this._def=e,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==qu?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof LO){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,It(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i{for(const s of i)this._setAttr(s.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(i,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:o}=i;let a;if(r&&!ye(r))for(const l in r){const c=r[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=wu(this._props[l])),(a||(a=Object.create(null)))[Wt(l)]=!0)}this._numberProps=a,this._resolveProps(i),this.shadowRoot&&this._applyStyles(o),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>e(this._def=i,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)tt(this,i)||Object.defineProperty(this,i,{get:()=>$(n[i])})}_resolveProps(e){const{props:n}=e,i=ye(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s]);for(const s of i.map(Wt))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(r){this._setProp(s,r,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let i=n?this.getAttribute(e):b$;const s=Wt(e);n&&this._numberProps&&this._numberProps[s]&&(i=wu(i)),this._setProp(s,i,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,i=!0,s=!1){if(n!==this._props[e]&&(n===b$?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),i)){const r=this._ob;r&&r.disconnect(),n===!0?this.setAttribute(Rn(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Rn(e),n+""):n||this.removeAttribute(Rn(e)),r&&r.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),$v(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=X(this._def,Ot(e,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const s=(r,o)=>{this.dispatchEvent(new CustomEvent(r,TO(o[0])?Ot({detail:o},o[0]):{detail:o}))};i.emit=(r,...o)=>{s(r,o),Rn(r)!==r&&s(Rn(r),o)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const i=this._nonce;for(let s=e.length-1;s>=0;s--){const r=document.createElement("style");i&&r.setAttribute("nonce",i),r.textContent=e[s],this.shadowRoot.prepend(r)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(e[i]||(e[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let i=0;i(delete t.props.mode,t),AX=VX({name:"TransitionGroup",props:Ot({},nv,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Qt(),i=Bp();let s,r;return UO(()=>{if(!s.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!MX(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(ZX),s.forEach(zX);const a=s.filter(YX);oh(),a.forEach(l=>{const c=l.el,u=c.style;ki(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const O=c[Mu]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",O),c[Mu]=null,Ms(c,o))};c.addEventListener("transitionend",O)}),s=[]}),()=>{const o=qe(t),a=iv(o);let l=o.tag||Ce;if(s=[],r)for(let c=0;c{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const r=e.nodeType===1?e:e.parentNode;r.appendChild(i);const{hasTransform:o}=sv(i);return r.removeChild(i),o}const nr=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ye(e)?n=>wo(e,n):e};function qX(t){t.target.composing=!0}function v$(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ri=Symbol("_assign"),Mo={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[ri]=nr(s);const r=i||s.props&&s.props.type==="number";fs(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),r&&(a=xu(a)),t[ri](a)}),n&&fs(t,"change",()=>{t.value=t.value.trim()}),e||(fs(t,"compositionstart",qX),fs(t,"compositionend",v$),fs(t,"change",v$))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:r}},o){if(t[ri]=nr(o),t.composing)return;const a=(r||t.type==="number")&&!/^0\d/.test(t.value)?xu(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||s&&t.value.trim()===l)||(t.value=l))}},cm={deep:!0,created(t,e,n){t[ri]=nr(n),fs(t,"change",()=>{const i=t._modelValue,s=qo(t),r=t.checked,o=t[ri];if(ye(i)){const a=XO(i,s),l=a!==-1;if(r&&!l)o(i.concat(s));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(jr(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(fv(t,r))})},mounted:P$,beforeUpdate(t,e,n){t[ri]=nr(n),P$(t,e,n)}};function P$(t,{value:e,oldValue:n},i){t._modelValue=e;let s;if(ye(e))s=XO(e,i.props.value)>-1;else if(jr(e))s=e.has(i.props.value);else{if(e===n)return;s=tr(e,fv(t,!0))}t.checked!==s&&(t.checked=s)}const um={created(t,{value:e},n){t.checked=tr(e,n.props.value),t[ri]=nr(n),fs(t,"change",()=>{t[ri](qo(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[ri]=nr(i),e!==n&&(t.checked=tr(e,i.props.value))}},NO={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=jr(e);fs(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?xu(qo(o)):qo(o));t[ri](t.multiple?s?new Set(r):r:r[0]),t._assigning=!0,It(()=>{t._assigning=!1})}),t[ri]=nr(i)},mounted(t,{value:e}){x$(t,e)},beforeUpdate(t,e,n){t[ri]=nr(n)},updated(t,{value:e}){t._assigning||x$(t,e)}};function x$(t,e){const n=t.multiple,i=ye(e);if(!(n&&!i&&!jr(e))){for(let s=0,r=t.options.length;sString(c)===String(a)):o.selected=XO(e,a)>-1}else o.selected=e.has(a);else if(tr(qo(o),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function qo(t){return"_value"in t?t._value:t.value}function fv(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const dv={created(t,e,n){Qc(t,e,n,null,"created")},mounted(t,e,n){Qc(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){Qc(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){Qc(t,e,n,i,"updated")}};function hv(t,e){switch(t){case"SELECT":return NO;case"TEXTAREA":return Mo;default:switch(e){case"checkbox":return cm;case"radio":return um;default:return Mo}}}function Qc(t,e,n,i,s){const o=hv(t.tagName,n.props&&n.props.type)[s];o&&o(t,e,n,i)}function IX(){Mo.getSSRProps=({value:t})=>({value:t}),um.getSSRProps=({value:t},e)=>{if(e.props&&tr(e.props.value,t))return{checked:!0}},cm.getSSRProps=({value:t},e)=>{if(ye(t)){if(e.props&&XO(t,e.props.value)>-1)return{checked:!0}}else if(jr(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},dv.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=hv(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const UX=["ctrl","shift","alt","meta"],WX={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>UX.some(n=>t[`${n}Key`]&&!e.includes(n))},He=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(s,...r)=>{for(let o=0;o{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=s=>{if(!("key"in s))return;const r=Rn(s.key);if(e.some(o=>o===r||DX[o]===r))return t(s)})},pv=Ot({patchProp:TX},cX);let Ba,w$=!1;function mv(){return Ba||(Ba=X0(pv))}function gv(){return Ba=w$?Ba:C0(pv),w$=!0,Ba}const $v=(...t)=>{mv().render(...t)},LX=(...t)=>{gv().hydrate(...t)},qu=(...t)=>{const e=mv().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=bv(i);if(!s)return;const r=e._component;!ke(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,yv(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e},Qv=(...t)=>{const e=gv().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=bv(i);if(s)return n(s,!0,yv(s))},e};function yv(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function bv(t){return pt(t)?document.querySelector(t):t}let T$=!1;const NX=()=>{T$||(T$=!0,IX(),pX())};/** * vue v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const PT=()=>{},MT=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:E1,BaseTransitionPropsValidators:nm,Comment:xt,DeprecationTypes:HE,EffectScope:Kp,ErrorCodes:lA,ErrorTypeStrings:NE,Fragment:Me,KeepAlive:MA,ReactiveEffect:Ml,Static:Sr,Suspense:bE,Teleport:em,Text:os,TrackOpTypes:eA,Transition:GE,TransitionGroup:bT,TriggerOpTypes:tA,VueElement:hf,assertNumber:oA,callWithAsyncErrorHandling:Zn,callWithErrorHandling:Fo,camelize:Bt,capitalize:pa,cloneVNode:fi,compatUtils:zE,compile:PT,computed:Q,createApp:fu,createBlock:j,createCommentVNode:Ee,createElementBlock:ae,createElementVNode:X,createHydrationRenderer:ew,createPropsRestProxy:GA,createRenderer:Z1,createSSRApp:zw,createSlots:LA,createStaticVNode:mw,createTextVNode:je,createVNode:P,customRef:Qp,defineAsyncComponent:TA,defineComponent:H,defineCustomElement:Mw,defineEmits:BA,defineExpose:FA,defineModel:HA,defineOptions:WA,defineProps:VA,defineSSRCustomElement:dT,defineSlots:zA,devtools:$E,effect:__,effectScope:Bo,getCurrentInstance:yt,getCurrentScope:ma,getCurrentWatcher:nA,getTransitionRawChildren:af,guardReactiveProps:va,h:An,handleError:Lr,hasInjectionContext:U1,hydrate:ET,hydrateOnIdle:kA,hydrateOnInteraction:AA,hydrateOnMediaQuery:_A,hydrateOnVisible:CA,initCustomFormatter:RE,initDirectivesForSSR:TT,inject:dn,isMemoSame:xw,isProxy:rf,isReactive:Ri,isReadonly:fs,isRef:qe,isRuntimeOnly:PE,isShallow:Vn,isVNode:hs,markRaw:ga,mergeDefaults:W1,mergeModels:KA,mergeProps:xe,nextTick:Nt,normalizeClass:Ct,normalizeProps:Xu,normalizeStyle:ti,onActivated:P1,onBeforeMount:R1,onBeforeUnmount:Nr,onBeforeUpdate:sm,onDeactivated:M1,onErrorCaptured:$1,onMounted:St,onRenderTracked:N1,onRenderTriggered:L1,onScopeDispose:Qu,onServerPrefetch:I1,onUnmounted:Fi,onUpdated:uf,onWatcherCleanup:g1,openBlock:D,popScopeId:dA,provide:es,proxyRefs:Jp,pushScopeId:fA,queuePostFlushCb:Il,reactive:us,readonly:nf,ref:se,registerRuntimeCompiler:TE,render:Ww,renderList:Fn,renderSlot:le,resolveComponent:V1,resolveDirective:IA,resolveDynamicComponent:om,resolveFilter:WE,resolveTransitionHooks:xo,setBlockTracking:fh,setDevtoolsHook:VE,setTransitionHooks:ds,shallowReactive:d1,shallowReadonly:dr,shallowRef:rs,ssrContextKey:sw,ssrUtils:FE,stop:A_,toDisplayString:oe,toHandlerKey:co,toHandlers:NA,toRaw:Ve,toRef:p1,toRefs:yn,toValue:Qt,transformVNodeArgs:OE,triggerRef:K_,unref:v,useAttrs:qA,useCssModule:mT,useCssVars:ZE,useHost:Dw,useId:Rc,useModel:fE,useSSRContext:rw,useShadowRoot:pT,useSlots:jA,useTemplateRef:gA,useTransitionState:tm,vModelCheckbox:mm,vModelDynamic:Nw,vModelRadio:gm,vModelSelect:ym,vModelText:Oo,vShow:Tw,version:Sw,warn:LE,watch:Te,watchEffect:Mt,watchPostEffect:hm,watchSyncEffect:ow,withAsyncContext:YA,withCtx:V,withDefaults:UA,withDirectives:lf,withKeys:pf,withMemo:IE,withModifiers:st,withScopeId:hA},Symbol.toStringTag,{value:"Module"}));/*! +**/const jX=()=>{},BX=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:o0,BaseTransitionPropsValidators:Gp,Comment:Tt,DeprecationTypes:oX,EffectScope:qp,ErrorCodes:Pk,ErrorTypeStrings:JR,Fragment:Ce,KeepAlive:Bk,ReactiveEffect:il,Static:Ar,Suspense:ER,Teleport:jp,Text:gs,TrackOpTypes:gk,Transition:OX,TransitionGroup:EX,TriggerOpTypes:$k,VueElement:LO,assertNumber:vk,callWithAsyncErrorHandling:ai,callWithErrorHandling:ia,camelize:Wt,capitalize:Il,cloneVNode:gi,compatUtils:rX,compile:jX,computed:J,createApp:qu,createBlock:j,createCommentVNode:Pe,createElementBlock:re,createElementVNode:N,createHydrationRenderer:C0,createPropsRestProxy:OR,createRenderer:X0,createSSRApp:Qv,createSlots:Kk,createStaticVNode:am,createTextVNode:Ae,createVNode:X,customRef:Lp,defineAsyncComponent:Nk,defineComponent:W,defineCustomElement:lv,defineEmits:nR,defineExpose:iR,defineModel:oR,defineOptions:sR,defineProps:tR,defineSSRCustomElement:kX,defineSlots:rR,devtools:eX,effect:W_,effectScope:na,getCurrentInstance:Qt,getCurrentScope:Ul,getCurrentWatcher:Qk,getTransitionRawChildren:qO,guardReactiveProps:jl,h:Vn,handleError:Br,hasInjectionContext:S0,hydrate:LX,hydrateOnIdle:qk,hydrateOnInteraction:Dk,hydrateOnMediaQuery:Wk,hydrateOnVisible:Uk,initCustomFormatter:FR,initDirectivesForSSR:NX,inject:gn,isMemoSame:K0,isProxy:YO,isReactive:qi,isReadonly:vs,isRef:Ge,isRuntimeOnly:jR,isShallow:Ln,isVNode:xs,markRaw:Wl,mergeDefaults:Q0,mergeModels:uR,mergeProps:be,nextTick:It,normalizeClass:bt,normalizeProps:RO,normalizeStyle:Gn,onActivated:l0,onBeforeMount:O0,onBeforeUnmount:Gr,onBeforeUpdate:Hp,onDeactivated:c0,onErrorCaptured:p0,onMounted:Pt,onRenderTracked:h0,onRenderTriggered:d0,onScopeDispose:CO,onServerPrefetch:f0,onUnmounted:Bi,onUpdated:UO,onWatcherCleanup:BS,openBlock:C,popScopeId:kk,provide:Os,proxyRefs:Dp,pushScopeId:_k,queuePostFlushCb:ol,reactive:Ss,readonly:ZO,ref:te,registerRuntimeCompiler:NR,render:$v,renderList:An,renderSlot:le,resolveComponent:m0,resolveDirective:Hk,resolveDynamicComponent:Jp,resolveFilter:sX,resolveTransitionHooks:Zo,setBlockTracking:Jd,setDevtoolsHook:tX,setTransitionHooks:Ps,shallowReactive:DS,shallowReadonly:Pr,shallowRef:ms,ssrContextKey:Z0,ssrUtils:iX,stop:D_,toDisplayString:ne,toHandlerKey:xo,toHandlers:Jk,toRaw:qe,toRef:NS,toRefs:bn,toValue:nn,transformVNodeArgs:IR,triggerRef:uk,unref:$,useAttrs:cR,useCssModule:CX,useCssVars:mX,useHost:cv,useId:ou,useModel:_R,useSSRContext:z0,useShadowRoot:XX,useSlots:lR,useTemplateRef:Vk,useTransitionState:Bp,vModelCheckbox:cm,vModelDynamic:dv,vModelRadio:um,vModelSelect:NO,vModelText:Mo,vShow:ov,version:J0,warn:KR,watch:_e,watchEffect:Zt,watchPostEffect:om,watchSyncEffect:Y0,withAsyncContext:fR,withCtx:z,withDefaults:aR,withDirectives:Dl,withKeys:jO,withMemo:HR,withModifiers:He,withScopeId:Rk},Symbol.toStringTag,{value:"Module"}));/*! * pinia v3.0.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let jw;const mf=t=>jw=t,qw=Symbol();function wh(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Ol;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Ol||(Ol={}));function DT(){const t=Bo(!0),e=t.run(()=>se({}));let n=[],i=[];const s=ga({install(r){mf(s),s._a=r,r.provide(qw,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return this._a?n.push(r):i.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const Kw=()=>{};function C0(t,e,n,i=Kw){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&ma()&&Qu(s),s}function Hr(t,...e){t.slice().forEach(n=>{n(...e)})}const RT=t=>t(),_0=Symbol(),ad=Symbol();function xh(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];wh(s)&&wh(i)&&t.hasOwnProperty(n)&&!qe(i)&&!Ri(i)?t[n]=xh(s,i):t[n]=i}return t}const IT=Symbol();function LT(t){return!wh(t)||!Object.prototype.hasOwnProperty.call(t,IT)}const{assign:Ts}=Object;function NT(t){return!!(qe(t)&&t.effect)}function $T(t,e,n,i){const{state:s,actions:r,getters:o}=e,l=n.state.value[t];let a;function c(){l||(n.state.value[t]=s?s():{});const u=yn(n.state.value[t]);return Ts(u,r,Object.keys(o||{}).reduce((f,d)=>(f[d]=ga(Q(()=>{mf(n);const h=n._s.get(t);return o[d].call(h,h)})),f),{}))}return a=Gw(t,c,e,n,i,!0),a}function Gw(t,e,n={},i,s,r){let o;const l=Ts({actions:{}},n),a={deep:!0};let c,u,f=[],d=[],h;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),se({});let m;function y(_){let E;c=u=!1,typeof _=="function"?(_(i.state.value[t]),E={type:Ol.patchFunction,storeId:t,events:h}):(xh(i.state.value[t],_),E={type:Ol.patchObject,payload:_,storeId:t,events:h});const I=m=Symbol();Nt().then(()=>{m===I&&(c=!0)}),u=!0,Hr(f,E,i.state.value[t])}const g=r?function(){const{state:E}=n,I=E?E():{};this.$patch(F=>{Ts(F,I)})}:Kw;function x(){o.stop(),f=[],d=[],i._s.delete(t)}const b=(_,E="")=>{if(_0 in _)return _[ad]=E,_;const I=function(){mf(i);const F=Array.from(arguments),L=[],Y=[];function ee(B){L.push(B)}function re(B){Y.push(B)}Hr(d,{args:F,name:I[ad],store:S,after:ee,onError:re});let q;try{q=_.apply(this&&this.$id===t?this:S,F)}catch(B){throw Hr(Y,B),B}return q instanceof Promise?q.then(B=>(Hr(L,B),B)).catch(B=>(Hr(Y,B),Promise.reject(B))):(Hr(L,q),q)};return I[_0]=!0,I[ad]=E,I},w={_p:i,$id:t,$onAction:C0.bind(null,d),$patch:y,$reset:g,$subscribe(_,E={}){const I=C0(f,_,E.detached,()=>F()),F=o.run(()=>Te(()=>i.state.value[t],L=>{(E.flush==="sync"?u:c)&&_({storeId:t,type:Ol.direct,events:h},L)},Ts({},a,E)));return I},$dispose:x},S=us(w);i._s.set(t,S);const O=(i._a&&i._a.runWithContext||RT)(()=>i._e.run(()=>(o=Bo()).run(()=>e({action:b}))));for(const _ in O){const E=O[_];if(qe(E)&&!NT(E)||Ri(E))r||(p&<(E)&&(qe(E)?E.value=p[_]:xh(E,p[_])),i.state.value[t][_]=E);else if(typeof E=="function"){const I=b(E,_);O[_]=I,l.actions[_]=E}}return Ts(S,O),Ts(Ve(S),O),Object.defineProperty(S,"$state",{get:()=>i.state.value[t],set:_=>{y(E=>{Ts(E,_)})}}),i._p.forEach(_=>{Ts(S,o.run(()=>_({store:S,app:i._a,pinia:i,options:l})))}),p&&r&&n.hydrate&&n.hydrate(S.$state,p),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function Yw(t,e,n){let i;const s=typeof e=="function";i=s?n:e;function r(o,l){const a=U1();return o=o||(a?dn(qw,null):null),o&&mf(o),o=jw,o._s.has(t)||(s?Gw(t,e,i,o):$T(t,i,o)),o._s.get(t)}return r.$id=t,r}function VT(t){if(!qe(t))return us(t);const e=new Proxy({},{get(n,i,s){return v(Reflect.get(t.value,i,s))},set(n,i,s){return qe(t.value[i])&&!qe(s)?t.value[i].value=s:t.value[i]=s,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return us(e)}function BT(t){return VT(Q(t))}function kt(t,...e){const n=e.flat(),i=n[0];return BT(()=>Object.fromEntries(typeof i=="function"?Object.entries(yn(t)).filter(([s,r])=>!i(Qt(r),s)):Object.entries(yn(t)).filter(s=>!n.includes(s[0]))))}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const FT=t=>typeof t<"u";function WT(t){return JSON.parse(JSON.stringify(t))}function Xw(t,e,n,i={}){var s,r,o;const{clone:l=!1,passive:a=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:d}=i,h=yt(),p=n||(h==null?void 0:h.emit)||((s=h==null?void 0:h.$emit)==null?void 0:s.bind(h))||((o=(r=h==null?void 0:h.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(h==null?void 0:h.proxy));let m=c;m=m||`update:${e.toString()}`;const y=b=>l?typeof l=="function"?l(b):WT(b):b,g=()=>FT(t[e])?y(t[e]):f,x=b=>{d?d(b)&&p(m,b):p(m,b)};if(a){const b=g(),w=se(b);let S=!1;return Te(()=>t[e],k=>{S||(S=!0,w.value=y(k),Nt(()=>S=!1))}),Te(w,k=>{!S&&(k!==t[e]||u)&&x(k)},{deep:u}),w}else return Q({get(){return g()},set(b){x(b)}})}/** + */let Sv;const BO=t=>Sv=t,vv=Symbol();function lh(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Ga;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Ga||(Ga={}));function GX(){const t=na(!0),e=t.run(()=>te({}));let n=[],i=[];const s=Wl({install(r){BO(s),s._a=r,r.provide(vv,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return this._a?n.push(r):i.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const Pv=()=>{};function _$(t,e,n,i=Pv){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&Ul()&&CO(s),s}function no(t,...e){t.slice().forEach(n=>{n(...e)})}const FX=t=>t(),k$=Symbol(),qf=Symbol();function ch(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];lh(s)&&lh(i)&&t.hasOwnProperty(n)&&!Ge(i)&&!qi(i)?t[n]=ch(s,i):t[n]=i}return t}const HX=Symbol();function KX(t){return!lh(t)||!Object.prototype.hasOwnProperty.call(t,HX)}const{assign:qs}=Object;function JX(t){return!!(Ge(t)&&t.effect)}function eC(t,e,n,i){const{state:s,actions:r,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=bn(n.state.value[t]);return qs(u,r,Object.keys(o||{}).reduce((O,f)=>(O[f]=Wl(J(()=>{BO(n);const d=n._s.get(t);return o[f].call(d,d)})),O),{}))}return l=xv(t,c,e,n,i,!0),l}function xv(t,e,n={},i,s,r){let o;const a=qs({actions:{}},n),l={deep:!0};let c,u,O=[],f=[],d;const h=i.state.value[t];!r&&!h&&(i.state.value[t]={}),te({});let p;function m(w){let k;c=u=!1,typeof w=="function"?(w(i.state.value[t]),k={type:Ga.patchFunction,storeId:t,events:d}):(ch(i.state.value[t],w),k={type:Ga.patchObject,payload:w,storeId:t,events:d});const E=p=Symbol();It().then(()=>{p===E&&(c=!0)}),u=!0,no(O,k,i.state.value[t])}const g=r?function(){const{state:k}=n,E=k?k():{};this.$patch(I=>{qs(I,E)})}:Pv;function b(){o.stop(),O=[],f=[],i._s.delete(t)}const Q=(w,k="")=>{if(k$ in w)return w[qf]=k,w;const E=function(){BO(i);const I=Array.from(arguments),Z=[],K=[];function ie(q){Z.push(q)}function ae(q){K.push(q)}no(f,{args:I,name:E[qf],store:S,after:ie,onError:ae});let G;try{G=w.apply(this&&this.$id===t?this:S,I)}catch(q){throw no(K,q),q}return G instanceof Promise?G.then(q=>(no(Z,q),q)).catch(q=>(no(K,q),Promise.reject(q))):(no(Z,G),G)};return E[k$]=!0,E[qf]=k,E},y={_p:i,$id:t,$onAction:_$.bind(null,f),$patch:m,$reset:g,$subscribe(w,k={}){const E=_$(O,w,k.detached,()=>I()),I=o.run(()=>_e(()=>i.state.value[t],Z=>{(k.flush==="sync"?u:c)&&w({storeId:t,type:Ga.direct,events:d},Z)},qs({},l,k)));return E},$dispose:b},S=Ss(y);i._s.set(t,S);const P=(i._a&&i._a.runWithContext||FX)(()=>i._e.run(()=>(o=na()).run(()=>e({action:Q}))));for(const w in P){const k=P[w];if(Ge(k)&&!JX(k)||qi(k))r||(h&&KX(k)&&(Ge(k)?k.value=h[w]:ch(k,h[w])),i.state.value[t][w]=k);else if(typeof k=="function"){const E=Q(k,w);P[w]=E,a.actions[w]=k}}return qs(S,P),qs(qe(S),P),Object.defineProperty(S,"$state",{get:()=>i.state.value[t],set:w=>{m(k=>{qs(k,w)})}}),i._p.forEach(w=>{qs(S,o.run(()=>w({store:S,app:i._a,pinia:i,options:a})))}),h&&r&&n.hydrate&&n.hydrate(S.$state,h),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function wv(t,e,n){let i;const s=typeof e=="function";i=s?n:e;function r(o,a){const l=S0();return o=o||(l?gn(vv,null):null),o&&BO(o),o=Sv,o._s.has(t)||(s?xv(t,e,i,o):eC(t,i,o)),o._s.get(t)}return r.$id=t,r}function tC(t){if(!Ge(t))return Ss(t);const e=new Proxy({},{get(n,i,s){return $(Reflect.get(t.value,i,s))},set(n,i,s){return Ge(t.value[i])&&!Ge(s)?t.value[i].value=s:t.value[i]=s,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Ss(e)}function nC(t){return tC(J(t))}function _t(t,...e){const n=e.flat(),i=n[0];return nC(()=>Object.fromEntries(typeof i=="function"?Object.entries(bn(t)).filter(([s,r])=>!i(nn(r),s)):Object.entries(bn(t)).filter(s=>!n.includes(s[0]))))}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const iC=t=>typeof t<"u";function sC(t){return JSON.parse(JSON.stringify(t))}function Tv(t,e,n,i={}){var s,r,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:O,shouldEmit:f}=i,d=Qt(),h=n||(d==null?void 0:d.emit)||((s=d==null?void 0:d.$emit)==null?void 0:s.bind(d))||((o=(r=d==null?void 0:d.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let p=c;p=p||`update:${e.toString()}`;const m=Q=>a?typeof a=="function"?a(Q):sC(Q):Q,g=()=>iC(t[e])?m(t[e]):O,b=Q=>{f?f(Q)&&h(p,Q):h(p,Q)};if(l){const Q=g(),y=te(Q);let S=!1;return _e(()=>t[e],v=>{S||(S=!0,y.value=m(v),It(()=>S=!1))}),_e(y,v=>{!S&&(v!==t[e]||u)&&b(v)},{deep:u}),y}else return J({get(){return g()},set(Q){b(Q)}})}/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const A0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zT=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase()),HT=t=>{const e=zT(t);return e.charAt(0).toUpperCase()+e.slice(1)},UT=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/** + */const R$=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rC=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase()),oC=t=>{const e=rC(t);return e.charAt(0).toUpperCase()+e.slice(1)},aC=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var Ua={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/** + */var yc={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jT=({size:t,strokeWidth:e=2,absoluteStrokeWidth:n,color:i,iconNode:s,name:r,class:o,...l},{slots:a})=>An("svg",{...Ua,width:t||Ua.width,height:t||Ua.height,stroke:i||Ua.stroke,"stroke-width":n?Number(e)*24/Number(t):e,class:UT("lucide",...r?[`lucide-${A0(HT(r))}-icon`,`lucide-${A0(r)}`]:["lucide-icon"]),...l},[...s.map(c=>An(...c)),...a.default?[a.default()]:[]]);/** + */const lC=({size:t,strokeWidth:e=2,absoluteStrokeWidth:n,color:i,iconNode:s,name:r,class:o,...a},{slots:l})=>Vn("svg",{...yc,width:t||yc.width,height:t||yc.height,stroke:i||yc.stroke,"stroke-width":n?Number(e)*24/Number(t):e,class:aC("lucide",...r?[`lucide-${R$(oC(r))}-icon`,`lucide-${R$(r)}`]:["lucide-icon"]),...a},[...s.map(c=>Vn(...c)),...l.default?[l.default()]:[]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jt=(t,e)=>(n,{slots:i})=>An(jT,{...n,iconNode:e,name:t},i);/** + */const kt=(t,e)=>(n,{slots:i})=>Vn(lC,{...n,iconNode:e,name:t},i);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Jw=jt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const uh=kt("between-vertical-start",[["rect",{width:"7",height:"13",x:"3",y:"8",rx:"1",key:"1fjrkv"}],["path",{d:"m15 2-3 3-3-3",key:"1uh6eb"}],["rect",{width:"7",height:"13",x:"14",y:"8",rx:"1",key:"w3fjg8"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bm=jt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const _v=kt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qT=jt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const Om=kt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KT=jt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const cC=kt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Qw=jt("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** + */const uC=kt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GT=jt("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** + */const fm=kt("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YT=jt("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** + */const OC=kt("delete",[["path",{d:"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",key:"1yo7s0"}],["path",{d:"m12 9 6 6",key:"anjzzh"}],["path",{d:"m18 9-6 6",key:"1fp51s"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XT=jt("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** + */const fC=kt("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JT=jt("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/** + */const dC=kt("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QT=jt("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const hC=kt("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZT=jt("square-chevron-down",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]);/** + */const pC=kt("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const E0=jt("square-dashed",[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}]]);/** + */const mC=kt("rows-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eP=jt("square-dot",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/** + */const gC=kt("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tP=jt("square-menu",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 8h10",key:"1jw688"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** + */const $C=kt("square-chevron-down",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nP=jt("square-parking",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 17V7h4a3 3 0 0 1 0 6H9",key:"1dfk2c"}]]);/** + */const QC=kt("square-dashed",[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const iP=jt("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** + */const yC=kt("square-dot",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sP=jt("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/** + */const bC=kt("square-menu",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 8h10",key:"1jw688"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** * @license lucide-vue-next v0.514.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Zw=jt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),rP=["top","right","bottom","left"],Gs=Math.min,Nn=Math.max,du=Math.round,ja=Math.floor,Ii=t=>({x:t,y:t}),oP={left:"right",right:"left",bottom:"top",top:"bottom"},lP={start:"end",end:"start"};function Sh(t,e,n){return Nn(t,Gs(e,n))}function ps(t,e){return typeof t=="function"?t(e):t}function ms(t){return t.split("-")[0]}function Wo(t){return t.split("-")[1]}function vm(t){return t==="x"?"y":"x"}function wm(t){return t==="y"?"height":"width"}function Pi(t){return["top","bottom"].includes(ms(t))?"y":"x"}function xm(t){return vm(Pi(t))}function aP(t,e,n){n===void 0&&(n=!1);const i=Wo(t),s=xm(t),r=wm(s);let o=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(o=hu(o)),[o,hu(o)]}function cP(t){const e=hu(t);return[kh(t),e,kh(e)]}function kh(t){return t.replace(/start|end/g,e=>lP[e])}function uP(t,e,n){const i=["left","right"],s=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?r:o;default:return[]}}function fP(t,e,n,i){const s=Wo(t);let r=uP(ms(t),n==="start",i);return s&&(r=r.map(o=>o+"-"+s),e&&(r=r.concat(r.map(kh)))),r}function hu(t){return t.replace(/left|right|bottom|top/g,e=>oP[e])}function dP(t){return{top:0,right:0,bottom:0,left:0,...t}}function ex(t){return typeof t!="number"?dP(t):{top:t,right:t,bottom:t,left:t}}function pu(t){const{x:e,y:n,width:i,height:s}=t;return{width:i,height:s,top:n,left:e,right:e+i,bottom:n+s,x:e,y:n}}function T0(t,e,n){let{reference:i,floating:s}=t;const r=Pi(e),o=xm(e),l=wm(o),a=ms(e),c=r==="y",u=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2,d=i[l]/2-s[l]/2;let h;switch(a){case"top":h={x:u,y:i.y-s.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:f};break;case"left":h={x:i.x-s.width,y:f};break;default:h={x:i.x,y:i.y}}switch(Wo(e)){case"start":h[o]-=d*(n&&c?-1:1);break;case"end":h[o]+=d*(n&&c?-1:1);break}return h}const hP=async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:o}=n,l=r.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=T0(c,i,a),d=i,h={},p=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:s,rects:r,platform:o,elements:l,middlewareData:a}=e,{element:c,padding:u=0}=ps(t,e)||{};if(c==null)return{};const f=ex(u),d={x:n,y:i},h=xm(s),p=wm(h),m=await o.getDimensions(c),y=h==="y",g=y?"top":"left",x=y?"bottom":"right",b=y?"clientHeight":"clientWidth",w=r.reference[p]+r.reference[h]-d[h]-r.floating[p],S=d[h]-r.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let O=k?k[b]:0;(!O||!await(o.isElement==null?void 0:o.isElement(k)))&&(O=l.floating[b]||r.floating[p]);const _=w/2-S/2,E=O/2-m[p]/2-1,I=Gs(f[g],E),F=Gs(f[x],E),L=I,Y=O-m[p]-F,ee=O/2-m[p]/2+_,re=Sh(L,ee,Y),q=!a.arrow&&Wo(s)!=null&&ee!==re&&r.reference[p]/2-(eeee<=0)){var F,L;const ee=(((F=r.flip)==null?void 0:F.index)||0)+1,re=O[ee];if(re&&(!(f==="alignment"?x!==Pi(re):!1)||I.every(N=>N.overflows[0]>0&&Pi(N.placement)===x)))return{data:{index:ee,overflows:I},reset:{placement:re}};let q=(L=I.filter(B=>B.overflows[0]<=0).sort((B,N)=>B.overflows[1]-N.overflows[1])[0])==null?void 0:L.placement;if(!q)switch(h){case"bestFit":{var Y;const B=(Y=I.filter(N=>{if(k){const K=Pi(N.placement);return K===x||K==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(K=>K>0).reduce((K,ue)=>K+ue,0)]).sort((N,K)=>N[1]-K[1])[0])==null?void 0:Y[0];B&&(q=B);break}case"initialPlacement":q=l;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function P0(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function M0(t){return rP.some(e=>t[e]>=0)}const gP=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...s}=ps(t,e);switch(i){case"referenceHidden":{const r=await Fl(e,{...s,elementContext:"reference"}),o=P0(r,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:M0(o)}}}case"escaped":{const r=await Fl(e,{...s,altBoundary:!0}),o=P0(r,n.floating);return{data:{escapedOffsets:o,escaped:M0(o)}}}default:return{}}}}};async function yP(t,e){const{placement:n,platform:i,elements:s}=t,r=await(i.isRTL==null?void 0:i.isRTL(s.floating)),o=ms(n),l=Wo(n),a=Pi(n)==="y",c=["left","top"].includes(o)?-1:1,u=r&&a?-1:1,f=ps(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof p=="number"&&(h=l==="end"?p*-1:p),a?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const bP=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:s,y:r,placement:o,middlewareData:l}=e,a=await yP(e,t);return o===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:s+a.x,y:r+a.y,data:{...a,placement:o}}}}},vP=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:g,y:x}=y;return{x:g,y:x}}},...a}=ps(t,e),c={x:n,y:i},u=await Fl(e,a),f=Pi(ms(s)),d=vm(f);let h=c[d],p=c[f];if(r){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=h+u[y],b=h-u[g];h=Sh(x,h,b)}if(o){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+u[y],b=p-u[g];p=Sh(x,p,b)}const m=l.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-i,enabled:{[d]:r,[f]:o}}}}}},wP=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:s,rects:r,middlewareData:o}=e,{offset:l=0,mainAxis:a=!0,crossAxis:c=!0}=ps(t,e),u={x:n,y:i},f=Pi(s),d=vm(f);let h=u[d],p=u[f];const m=ps(l,e),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const b=d==="y"?"height":"width",w=r.reference[d]-r.floating[b]+y.mainAxis,S=r.reference[d]+r.reference[b]-y.mainAxis;hS&&(h=S)}if(c){var g,x;const b=d==="y"?"width":"height",w=["top","left"].includes(ms(s)),S=r.reference[f]-r.floating[b]+(w&&((g=o.offset)==null?void 0:g[f])||0)+(w?0:y.crossAxis),k=r.reference[f]+r.reference[b]+(w?0:((x=o.offset)==null?void 0:x[f])||0)-(w?y.crossAxis:0);pk&&(p=k)}return{[d]:h,[f]:p}}}},xP=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:s,rects:r,platform:o,elements:l}=e,{apply:a=()=>{},...c}=ps(t,e),u=await Fl(e,c),f=ms(s),d=Wo(s),h=Pi(s)==="y",{width:p,height:m}=r.floating;let y,g;f==="top"||f==="bottom"?(y=f,g=d===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(g=f,y=d==="end"?"top":"bottom");const x=m-u.top-u.bottom,b=p-u.left-u.right,w=Gs(m-u[y],x),S=Gs(p-u[g],b),k=!e.middlewareData.shift;let O=w,_=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(O=x),k&&!d){const I=Nn(u.left,0),F=Nn(u.right,0),L=Nn(u.top,0),Y=Nn(u.bottom,0);h?_=p-2*(I!==0||F!==0?I+F:Nn(u.left,u.right)):O=m-2*(L!==0||Y!==0?L+Y:Nn(u.top,u.bottom))}await a({...e,availableWidth:_,availableHeight:O});const E=await o.getDimensions(l.floating);return p!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function gf(){return typeof window<"u"}function $r(t){return Sm(t)?(t.nodeName||"").toLowerCase():"#document"}function Bn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Wi(t){var e;return(e=(Sm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Sm(t){return gf()?t instanceof Node||t instanceof Bn(t).Node:!1}function di(t){return gf()?t instanceof Element||t instanceof Bn(t).Element:!1}function $i(t){return gf()?t instanceof HTMLElement||t instanceof Bn(t).HTMLElement:!1}function D0(t){return!gf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Bn(t).ShadowRoot}function xa(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=hi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function SP(t){return["table","td","th"].includes($r(t))}function yf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function km(t){const e=Om(),n=di(t)?hi(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function kP(t){let e=Ys(t);for(;$i(e)&&!_o(e);){if(km(e))return e;if(yf(e))return null;e=Ys(e)}return null}function Om(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _o(t){return["html","body","#document"].includes($r(t))}function hi(t){return Bn(t).getComputedStyle(t)}function bf(t){return di(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ys(t){if($r(t)==="html")return t;const e=t.assignedSlot||t.parentNode||D0(t)&&t.host||Wi(t);return D0(e)?e.host:e}function tx(t){const e=Ys(t);return _o(e)?t.ownerDocument?t.ownerDocument.body:t.body:$i(e)&&xa(e)?e:tx(e)}function Wl(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=tx(t),r=s===((i=t.ownerDocument)==null?void 0:i.body),o=Bn(s);if(r){const l=Oh(o);return e.concat(o,o.visualViewport||[],xa(s)?s:[],l&&n?Wl(l):[])}return e.concat(s,Wl(s,[],n))}function Oh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function nx(t){const e=hi(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=$i(t),r=s?t.offsetWidth:n,o=s?t.offsetHeight:i,l=du(n)!==r||du(i)!==o;return l&&(n=r,i=o),{width:n,height:i,$:l}}function Cm(t){return di(t)?t:t.contextElement}function po(t){const e=Cm(t);if(!$i(e))return Ii(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:r}=nx(e);let o=(r?du(n.width):n.width)/i,l=(r?du(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const OP=Ii(0);function ix(t){const e=Bn(t);return!Om()||!e.visualViewport?OP:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function CP(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Bn(t)?!1:e}function Ar(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),r=Cm(t);let o=Ii(1);e&&(i?di(i)&&(o=po(i)):o=po(t));const l=CP(r,n,i)?ix(r):Ii(0);let a=(s.left+l.x)/o.x,c=(s.top+l.y)/o.y,u=s.width/o.x,f=s.height/o.y;if(r){const d=Bn(r),h=i&&di(i)?Bn(i):i;let p=d,m=Oh(p);for(;m&&i&&h!==p;){const y=po(m),g=m.getBoundingClientRect(),x=hi(m),b=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*y.x,w=g.top+(m.clientTop+parseFloat(x.paddingTop))*y.y;a*=y.x,c*=y.y,u*=y.x,f*=y.y,a+=b,c+=w,p=Bn(m),m=Oh(p)}}return pu({width:u,height:f,x:a,y:c})}function _m(t,e){const n=bf(t).scrollLeft;return e?e.left+n:Ar(Wi(t)).left+n}function sx(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=i.left+e.scrollLeft-(n?0:_m(t,i)),r=i.top+e.scrollTop;return{x:s,y:r}}function _P(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const r=s==="fixed",o=Wi(i),l=e?yf(e.floating):!1;if(i===o||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=Ii(1);const u=Ii(0),f=$i(i);if((f||!f&&!r)&&(($r(i)!=="body"||xa(o))&&(a=bf(i)),$i(i))){const h=Ar(i);c=po(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}const d=o&&!f&&!r?sx(o,a,!0):Ii(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-a.scrollTop*c.y+u.y+d.y}}function AP(t){return Array.from(t.getClientRects())}function EP(t){const e=Wi(t),n=bf(t),i=t.ownerDocument.body,s=Nn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=Nn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+_m(t);const l=-n.scrollTop;return hi(i).direction==="rtl"&&(o+=Nn(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:o,y:l}}function TP(t,e){const n=Bn(t),i=Wi(t),s=n.visualViewport;let r=i.clientWidth,o=i.clientHeight,l=0,a=0;if(s){r=s.width,o=s.height;const c=Om();(!c||c&&e==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}return{width:r,height:o,x:l,y:a}}function PP(t,e){const n=Ar(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,r=$i(t)?po(t):Ii(1),o=t.clientWidth*r.x,l=t.clientHeight*r.y,a=s*r.x,c=i*r.y;return{width:o,height:l,x:a,y:c}}function R0(t,e,n){let i;if(e==="viewport")i=TP(t,n);else if(e==="document")i=EP(Wi(t));else if(di(e))i=PP(e,n);else{const s=ix(t);i={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return pu(i)}function rx(t,e){const n=Ys(t);return n===e||!di(n)||_o(n)?!1:hi(n).position==="fixed"||rx(n,e)}function MP(t,e){const n=e.get(t);if(n)return n;let i=Wl(t,[],!1).filter(l=>di(l)&&$r(l)!=="body"),s=null;const r=hi(t).position==="fixed";let o=r?Ys(t):t;for(;di(o)&&!_o(o);){const l=hi(o),a=km(o);!a&&l.position==="fixed"&&(s=null),(r?!a&&!s:!a&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||xa(o)&&!a&&rx(t,o))?i=i.filter(u=>u!==o):s=l,o=Ys(o)}return e.set(t,i),i}function DP(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const o=[...n==="clippingAncestors"?yf(e)?[]:MP(e,this._c):[].concat(n),i],l=o[0],a=o.reduce((c,u)=>{const f=R0(e,u,s);return c.top=Nn(f.top,c.top),c.right=Gs(f.right,c.right),c.bottom=Gs(f.bottom,c.bottom),c.left=Nn(f.left,c.left),c},R0(e,l,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function RP(t){const{width:e,height:n}=nx(t);return{width:e,height:n}}function IP(t,e,n){const i=$i(e),s=Wi(e),r=n==="fixed",o=Ar(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=Ii(0);function c(){a.x=_m(s)}if(i||!i&&!r)if(($r(e)!=="body"||xa(s))&&(l=bf(e)),i){const h=Ar(e,!0,r,e);a.x=h.x+e.clientLeft,a.y=h.y+e.clientTop}else s&&c();r&&!i&&s&&c();const u=s&&!i&&!r?sx(s,l):Ii(0),f=o.left+l.scrollLeft-a.x-u.x,d=o.top+l.scrollTop-a.y-u.y;return{x:f,y:d,width:o.width,height:o.height}}function cd(t){return hi(t).position==="static"}function I0(t,e){if(!$i(t)||hi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Wi(t)===n&&(n=n.ownerDocument.body),n}function ox(t,e){const n=Bn(t);if(yf(t))return n;if(!$i(t)){let s=Ys(t);for(;s&&!_o(s);){if(di(s)&&!cd(s))return s;s=Ys(s)}return n}let i=I0(t,e);for(;i&&SP(i)&&cd(i);)i=I0(i,e);return i&&_o(i)&&cd(i)&&!km(i)?n:i||kP(t)||n}const LP=async function(t){const e=this.getOffsetParent||ox,n=this.getDimensions,i=await n(t.floating);return{reference:IP(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function NP(t){return hi(t).direction==="rtl"}const $P={convertOffsetParentRelativeRectToViewportRelativeRect:_P,getDocumentElement:Wi,getClippingRect:DP,getOffsetParent:ox,getElementRects:LP,getClientRects:AP,getDimensions:RP,getScale:po,isElement:di,isRTL:NP};function lx(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function VP(t,e){let n=null,i;const s=Wi(t);function r(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function o(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),r();const c=t.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(l||e(),!d||!h)return;const p=ja(f),m=ja(s.clientWidth-(u+d)),y=ja(s.clientHeight-(f+h)),g=ja(u),b={rootMargin:-p+"px "+-m+"px "+-y+"px "+-g+"px",threshold:Nn(0,Gs(1,a))||1};let w=!0;function S(k){const O=k[0].intersectionRatio;if(O!==a){if(!w)return o();O?o(!1,O):i=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!lx(c,t.getBoundingClientRect())&&o(),w=!1}try{n=new IntersectionObserver(S,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return o(!0),r}function BP(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=i,c=Cm(t),u=s||r?[...c?Wl(c):[],...Wl(e)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),r&&g.addEventListener("resize",n)});const f=c&&l?VP(c,n):null;let d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[x]=g;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),n()}),c&&!a&&h.observe(c),h.observe(e));let p,m=a?Ar(t):null;a&&y();function y(){const g=Ar(t);m&&!lx(m,g)&&n(),m=g,p=requestAnimationFrame(y)}return n(),()=>{var g;u.forEach(x=>{s&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),f==null||f(),(g=h)==null||g.disconnect(),h=null,a&&cancelAnimationFrame(p)}}const FP=bP,WP=vP,L0=mP,zP=xP,HP=gP,UP=pP,jP=wP,qP=(t,e,n)=>{const i=new Map,s={platform:$P,...n},r={...s.platform,_c:i};return hP(t,e,{...s,platform:r})};function KP(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ch(t){if(KP(t)){const e=t.$el;return Sm(e)&&$r(e)==="#comment"?null:e}return t}function Yr(t){return typeof t=="function"?t():v(t)}function GP(t){return{name:"arrow",options:t,fn(e){const n=Ch(Yr(t.element));return n==null?{}:UP({element:n,padding:t.padding}).fn(e)}}}function ax(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function N0(t,e){const n=ax(t);return Math.round(e*n)/n}function YP(t,e,n){n===void 0&&(n={});const i=n.whileElementsMounted,s=Q(()=>{var O;return(O=Yr(n.open))!=null?O:!0}),r=Q(()=>Yr(n.middleware)),o=Q(()=>{var O;return(O=Yr(n.placement))!=null?O:"bottom"}),l=Q(()=>{var O;return(O=Yr(n.strategy))!=null?O:"absolute"}),a=Q(()=>{var O;return(O=Yr(n.transform))!=null?O:!0}),c=Q(()=>Ch(t.value)),u=Q(()=>Ch(e.value)),f=se(0),d=se(0),h=se(l.value),p=se(o.value),m=rs({}),y=se(!1),g=Q(()=>{const O={position:h.value,left:"0",top:"0"};if(!u.value)return O;const _=N0(u.value,f.value),E=N0(u.value,d.value);return a.value?{...O,transform:"translate("+_+"px, "+E+"px)",...ax(u.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:_+"px",top:E+"px"}});let x;function b(){if(c.value==null||u.value==null)return;const O=s.value;qP(c.value,u.value,{middleware:r.value,placement:o.value,strategy:l.value}).then(_=>{f.value=_.x,d.value=_.y,h.value=_.strategy,p.value=_.placement,m.value=_.middlewareData,y.value=O!==!1})}function w(){typeof x=="function"&&(x(),x=void 0)}function S(){if(w(),i===void 0){b();return}if(c.value!=null&&u.value!=null){x=i(c.value,u.value,b);return}}function k(){s.value||(y.value=!1)}return Te([r,o,l,s],b,{flush:"sync"}),Te([c,u],S,{flush:"sync"}),Te(s,k,{flush:"sync"}),ma()&&Qu(w),{x:dr(f),y:dr(d),strategy:dr(h),placement:dr(p),middlewareData:dr(m),isPositioned:dr(y),floatingStyles:g,update:b}}function Am(t){return t?t.flatMap(e=>e.type===Me?Am(e.children):[e]):[]}const _h=H({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var a;if(!n.default)return null;const i=Am(n.default()),s=i.findIndex(c=>c.type!==xt);if(s===-1)return i;const r=i[s];(a=r.props)==null||delete a.ref;const o=r.props?xe(e,r.props):e,l=fi({...r,props:{}},o);return i.length===1?l:(i[s]=l,i)}}}),XP=["area","img","input"],Fe=H({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const i=t.asChild?"template":t.as;return typeof i=="string"&&XP.includes(i)?()=>An(i,e):i!=="template"?()=>An(t.as,e,{default:n.default}):()=>An(_h,e,{default:n.default})}}),cx=H({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(D(),j(v(Fe),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:V(()=>[le(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function JP(t,e){var n;const i=rs();return Mt(()=>{i.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),nf(i)}function vf(t){return ma()?(Qu(t),!0):!1}function QP(t){let e=!1,n;const i=Bo(!0);return(...s)=>(e||(n=i.run(()=>t(...s)),e=!0),n)}function ZP(t){let e=0,n,i;const s=()=>{e-=1,i&&e<=0&&(i.stop(),n=void 0,i=void 0)};return(...r)=>(e+=1,i||(i=Bo(!0),n=i.run(()=>t(...r))),vf(s),n)}const nr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const eM=t=>typeof t<"u",tM=Object.prototype.toString,nM=t=>tM.call(t)==="[object Object]",$0=iM();function iM(){var t,e;return nr&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function sM(t){return yt()}function ud(t){return Array.isArray(t)?t:[t]}function rM(t,e=1e4){return Qp((n,i)=>{let s=Qt(t),r;const o=()=>setTimeout(()=>{s=Qt(t),i()},Qt(e));return vf(()=>{clearTimeout(r)}),{get(){return n(),s},set(l){s=l,i(),clearTimeout(r),r=o()}}})}const oM=Qt;function lM(t,e){sM()&&Nr(t,e)}function aM(t,e,n){return Te(t,e,{...n,immediate:!0})}const wf=nr?window:void 0;function Vi(t){var e;const n=Qt(t);return(e=n==null?void 0:n.$el)!=null?e:n}function ux(...t){const e=[],n=()=>{e.forEach(l=>l()),e.length=0},i=(l,a,c,u)=>(l.addEventListener(a,c,u),()=>l.removeEventListener(a,c,u)),s=Q(()=>{const l=ud(Qt(t[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),r=aM(()=>{var l,a;return[(a=(l=s.value)==null?void 0:l.map(c=>Vi(c)))!=null?a:[wf].filter(c=>c!=null),ud(Qt(s.value?t[1]:t[0])),ud(v(s.value?t[2]:t[1])),Qt(s.value?t[3]:t[2])]},([l,a,c,u])=>{if(n(),!(l!=null&&l.length)||!(a!=null&&a.length)||!(c!=null&&c.length))return;const f=nM(u)?{...u}:u;e.push(...l.flatMap(d=>a.flatMap(h=>c.map(p=>i(d,h,p,f)))))},{flush:"post"}),o=()=>{r(),n()};return vf(n),o}function fx(){const t=rs(!1),e=yt();return e&&St(()=>{t.value=!0},e),t}function cM(t){const e=fx();return Q(()=>(e.value,!!t()))}function uM(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function fM(...t){let e,n,i={};t.length===3?(e=t[0],n=t[1],i=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],i=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:s=wf,eventName:r="keydown",passive:o=!1,dedupe:l=!1}=i,a=uM(e);return ux(s,r,u=>{u.repeat&&Qt(l)||a(u)&&n(u)},o)}function dM(t){return JSON.parse(JSON.stringify(t))}function hM(t,e,n={}){const{window:i=wf,...s}=n;let r;const o=cM(()=>i&&"ResizeObserver"in i),l=()=>{r&&(r.disconnect(),r=void 0)},a=Q(()=>{const f=Qt(t);return Array.isArray(f)?f.map(d=>Vi(d)):[Vi(f)]}),c=Te(a,f=>{if(l(),o.value&&i){r=new ResizeObserver(e);for(const d of f)d&&r.observe(d,s)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return vf(u),{isSupported:o,stop:u}}function Er(t,e,n,i={}){var s,r,o;const{clone:l=!1,passive:a=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:d}=i,h=yt(),p=n||(h==null?void 0:h.emit)||((s=h==null?void 0:h.$emit)==null?void 0:s.bind(h))||((o=(r=h==null?void 0:h.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(h==null?void 0:h.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const y=b=>l?typeof l=="function"?l(b):dM(b):b,g=()=>eM(t[e])?y(t[e]):f,x=b=>{d?d(b)&&p(m,b):p(m,b)};if(a){const b=g(),w=se(b);let S=!1;return Te(()=>t[e],k=>{S||(S=!0,w.value=y(k),Nt(()=>S=!1))}),Te(w,k=>{!S&&(k!==t[e]||u)&&x(k)},{deep:u}),w}else return Q({get(){return g()},set(b){x(b)}})}function bn(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,i=Symbol(n);return[o=>{const l=dn(i,o);if(l||l===null)return l;throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(es(i,o),o)]}function V0(t){return typeof t=="string"?`'${t}'`:new pM().serialize(t)}const pM=function(){var e;class t{constructor(){Vg(this,e,new Map)}compare(i,s){const r=typeof i,o=typeof s;return r==="string"&&o==="string"?i.localeCompare(s):r==="number"&&o==="number"?i-s:String.prototype.localeCompare.call(this.serialize(i,!0),this.serialize(s,!0))}serialize(i,s){if(i===null)return"null";switch(typeof i){case"string":return s?i:`'${i}'`;case"bigint":return`${i}n`;case"object":return this.$object(i);case"function":return this.$function(i)}return String(i)}serializeObject(i){const s=Object.prototype.toString.call(i);if(s!=="[object Object]")return this.serializeBuiltInType(s.length<10?`unknown:${s}`:s.slice(8,-1),i);const r=i.constructor,o=r===Object||r===void 0?"":r.name;if(o!==""&&globalThis[o]===r)return this.serializeBuiltInType(o,i);if(typeof i.toJSON=="function"){const l=i.toJSON();return o+(l!==null&&typeof l=="object"?this.$object(l):`(${this.serialize(l)})`)}return this.serializeObjectEntries(o,Object.entries(i))}serializeBuiltInType(i,s){const r=this["$"+i];if(r)return r.call(this,s);if(typeof(s==null?void 0:s.entries)=="function")return this.serializeObjectEntries(i,s.entries());throw new Error(`Cannot serialize ${i}`)}serializeObjectEntries(i,s){const r=Array.from(s).sort((l,a)=>this.compare(l[0],a[0]));let o=`${i}{`;for(let l=0;lthis.compare(s,r)))}`}$Map(i){return this.serializeObjectEntries("Map",i.entries())}}e=new WeakMap;for(const n of["Error","RegExp","URL"])t.prototype["$"+n]=function(i){return`${n}(${i})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+n]=function(i){return`${n}[${i.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])t.prototype["$"+n]=function(i){return`${n}[${i.join("n,")}${i.length>0?"n":""}]`};return t}();function mu(t,e){return t===e||V0(t)===V0(e)}function zl(t){return t==null}function B0(t,e){return zl(t)?!1:Array.isArray(t)?t.some(n=>mu(n,e)):mu(t,e)}const[xf,PU]=bn("ConfigProvider");function Sf(t){const e=xf({dir:se("ltr")});return Q(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function Xe(){const t=yt(),e=se(),n=Q(()=>{var o,l;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:Vi(e)}),i=Object.assign({},t.exposed),s={};for(const o in t.props)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(i).length>0)for(const o in i)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>i[o]});Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=s;function r(o){e.value=o,o&&(Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),t.exposed=s)}return{forwardRef:r,currentRef:e,currentElement:n}}let mM=0;function pi(t,e="reka"){if(t)return t;const n=xf({useId:void 0});return Object.hasOwn(MT,"useId")?`${e}-${Rc==null?void 0:Rc()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++mM}`}function gM(t,e){const n=se(t);function i(r){return e[n.value][r]??n.value}return{state:n,dispatch:r=>{n.value=i(r)}}}function yM(t,e){var y;const n=se({}),i=se("none"),s=se(t),r=t.value?"mounted":"unmounted";let o;const l=((y=e.value)==null?void 0:y.ownerDocument.defaultView)??wf,{state:a,dispatch:c}=gM(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=g=>{var x;if(nr){const b=new CustomEvent(g,{bubbles:!1,cancelable:!1});(x=e.value)==null||x.dispatchEvent(b)}};Te(t,async(g,x)=>{var w;const b=x!==g;if(await Nt(),b){const S=i.value,k=qa(e.value);g?(c("MOUNT"),u("enter"),k==="none"&&u("after-enter")):k==="none"||k==="undefined"||((w=n.value)==null?void 0:w.display)==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):x&&S!==k?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const f=g=>{const x=qa(e.value),b=x.includes(g.animationName),w=a.value==="mounted"?"enter":"leave";if(g.target===e.value&&b&&(u(`after-${w}`),c("ANIMATION_END"),!s.value)){const S=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",o=l==null?void 0:l.setTimeout(()=>{var k;((k=e.value)==null?void 0:k.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=S)})}g.target===e.value&&x==="none"&&c("ANIMATION_END")},d=g=>{g.target===e.value&&(i.value=qa(e.value))},h=Te(e,(g,x)=>{g?(n.value=getComputedStyle(g),g.addEventListener("animationstart",d),g.addEventListener("animationcancel",f),g.addEventListener("animationend",f)):(c("ANIMATION_END"),o!==void 0&&(l==null||l.clearTimeout(o)),x==null||x.removeEventListener("animationstart",d),x==null||x.removeEventListener("animationcancel",f),x==null||x.removeEventListener("animationend",f))},{immediate:!0}),p=Te(a,()=>{const g=qa(e.value);i.value=a.value==="mounted"?g:"none"});return Fi(()=>{h(),p()}),{isPresent:Q(()=>["mounted","unmountSuspended"].includes(a.value))}}function qa(t){return t&&getComputedStyle(t).animationName||"none"}const Sa=H({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var c;const{present:i,forceMount:s}=yn(t),r=se(),{isPresent:o}=yM(i,r);n({present:o});let l=e.default({present:o.value});l=Am(l||[]);const a=yt();if(l&&(l==null?void 0:l.length)>1){const u=(c=a==null?void 0:a.parent)!=null&&c.type.name?`<${a.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(f=>` - ${f}`).join(` + */const SC=kt("square-parking",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 17V7h4a3 3 0 0 1 0 6H9",key:"1dfk2c"}]]);/** + * @license lucide-vue-next v0.514.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vC=kt("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** + * @license lucide-vue-next v0.514.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PC=kt("table-cells-merge",[["path",{d:"M12 21v-6",key:"lihzve"}],["path",{d:"M12 9V3",key:"da5inc"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M3 9h18",key:"1pudct"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** + * @license lucide-vue-next v0.514.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xC=kt("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/** + * @license lucide-vue-next v0.514.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kv=kt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wC=["top","right","bottom","left"],ir=Math.min,Wn=Math.max,Iu=Math.round,bc=Math.floor,Ii=t=>({x:t,y:t}),TC={left:"right",right:"left",bottom:"top",top:"bottom"},_C={start:"end",end:"start"};function Oh(t,e,n){return Wn(t,ir(e,n))}function ws(t,e){return typeof t=="function"?t(e):t}function Ts(t){return t.split("-")[0]}function sa(t){return t.split("-")[1]}function dm(t){return t==="x"?"y":"x"}function hm(t){return t==="y"?"height":"width"}function Zi(t){return["top","bottom"].includes(Ts(t))?"y":"x"}function pm(t){return dm(Zi(t))}function kC(t,e,n){n===void 0&&(n=!1);const i=sa(t),s=pm(t),r=hm(s);let o=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(o=Uu(o)),[o,Uu(o)]}function RC(t){const e=Uu(t);return[fh(t),e,fh(e)]}function fh(t){return t.replace(/start|end/g,e=>_C[e])}function XC(t,e,n){const i=["left","right"],s=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?r:o;default:return[]}}function CC(t,e,n,i){const s=sa(t);let r=XC(Ts(t),n==="start",i);return s&&(r=r.map(o=>o+"-"+s),e&&(r=r.concat(r.map(fh)))),r}function Uu(t){return t.replace(/left|right|bottom|top/g,e=>TC[e])}function VC(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rv(t){return typeof t!="number"?VC(t):{top:t,right:t,bottom:t,left:t}}function Wu(t){const{x:e,y:n,width:i,height:s}=t;return{width:i,height:s,top:n,left:e,right:e+i,bottom:n+s,x:e,y:n}}function X$(t,e,n){let{reference:i,floating:s}=t;const r=Zi(e),o=pm(e),a=hm(o),l=Ts(e),c=r==="y",u=i.x+i.width/2-s.width/2,O=i.y+i.height/2-s.height/2,f=i[a]/2-s[a]/2;let d;switch(l){case"top":d={x:u,y:i.y-s.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:O};break;case"left":d={x:i.x-s.width,y:O};break;default:d={x:i.x,y:i.y}}switch(sa(e)){case"start":d[o]-=f*(n&&c?-1:1);break;case"end":d[o]+=f*(n&&c?-1:1);break}return d}const AC=async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:o}=n,a=r.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:O}=X$(c,i,l),f=i,d={},h=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:s,rects:r,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=ws(t,e)||{};if(c==null)return{};const O=Rv(u),f={x:n,y:i},d=pm(s),h=hm(d),p=await o.getDimensions(c),m=d==="y",g=m?"top":"left",b=m?"bottom":"right",Q=m?"clientHeight":"clientWidth",y=r.reference[h]+r.reference[d]-f[d]-r.floating[h],S=f[d]-r.reference[d],v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let P=v?v[Q]:0;(!P||!await(o.isElement==null?void 0:o.isElement(v)))&&(P=a.floating[Q]||r.floating[h]);const w=y/2-S/2,k=P/2-p[h]/2-1,E=ir(O[g],k),I=ir(O[b],k),Z=E,K=P-p[h]-I,ie=P/2-p[h]/2+w,ae=Oh(Z,ie,K),G=!l.arrow&&sa(s)!=null&&ie!==ae&&r.reference[h]/2-(ieie<=0)){var I,Z;const ie=(((I=r.flip)==null?void 0:I.index)||0)+1,ae=P[ie];if(ae&&(!(O==="alignment"?b!==Zi(ae):!1)||E.every(Y=>Y.overflows[0]>0&&Zi(Y.placement)===b)))return{data:{index:ie,overflows:E},reset:{placement:ae}};let G=(Z=E.filter(q=>q.overflows[0]<=0).sort((q,Y)=>q.overflows[1]-Y.overflows[1])[0])==null?void 0:Z.placement;if(!G)switch(d){case"bestFit":{var K;const q=(K=E.filter(Y=>{if(v){const F=Zi(Y.placement);return F===b||F==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(F=>F>0).reduce((F,ue)=>F+ue,0)]).sort((Y,F)=>Y[1]-F[1])[0])==null?void 0:K[0];q&&(G=q);break}case"initialPlacement":G=a;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function C$(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function V$(t){return wC.some(e=>t[e]>=0)}const zC=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...s}=ws(t,e);switch(i){case"referenceHidden":{const r=await fl(e,{...s,elementContext:"reference"}),o=C$(r,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:V$(o)}}}case"escaped":{const r=await fl(e,{...s,altBoundary:!0}),o=C$(r,n.floating);return{data:{escapedOffsets:o,escaped:V$(o)}}}default:return{}}}}};async function YC(t,e){const{placement:n,platform:i,elements:s}=t,r=await(i.isRTL==null?void 0:i.isRTL(s.floating)),o=Ts(n),a=sa(n),l=Zi(n)==="y",c=["left","top"].includes(o)?-1:1,u=r&&l?-1:1,O=ws(e,t);let{mainAxis:f,crossAxis:d,alignmentAxis:h}=typeof O=="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};return a&&typeof h=="number"&&(d=a==="end"?h*-1:h),l?{x:d*u,y:f*c}:{x:f*c,y:d*u}}const MC=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:s,y:r,placement:o,middlewareData:a}=e,l=await YC(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:o}}}}},qC=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:o=!1,limiter:a={fn:m=>{let{x:g,y:b}=m;return{x:g,y:b}}},...l}=ws(t,e),c={x:n,y:i},u=await fl(e,l),O=Zi(Ts(s)),f=dm(O);let d=c[f],h=c[O];if(r){const m=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=d+u[m],Q=d-u[g];d=Oh(b,d,Q)}if(o){const m=O==="y"?"top":"left",g=O==="y"?"bottom":"right",b=h+u[m],Q=h-u[g];h=Oh(b,h,Q)}const p=a.fn({...e,[f]:d,[O]:h});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[f]:r,[O]:o}}}}}},IC=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:s,rects:r,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ws(t,e),u={x:n,y:i},O=Zi(s),f=dm(O);let d=u[f],h=u[O];const p=ws(a,e),m=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const Q=f==="y"?"height":"width",y=r.reference[f]-r.floating[Q]+m.mainAxis,S=r.reference[f]+r.reference[Q]-m.mainAxis;dS&&(d=S)}if(c){var g,b;const Q=f==="y"?"width":"height",y=["top","left"].includes(Ts(s)),S=r.reference[O]-r.floating[Q]+(y&&((g=o.offset)==null?void 0:g[O])||0)+(y?0:m.crossAxis),v=r.reference[O]+r.reference[Q]+(y?0:((b=o.offset)==null?void 0:b[O])||0)-(y?m.crossAxis:0);hv&&(h=v)}return{[f]:d,[O]:h}}}},UC=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:s,rects:r,platform:o,elements:a}=e,{apply:l=()=>{},...c}=ws(t,e),u=await fl(e,c),O=Ts(s),f=sa(s),d=Zi(s)==="y",{width:h,height:p}=r.floating;let m,g;O==="top"||O==="bottom"?(m=O,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=O,m=f==="end"?"top":"bottom");const b=p-u.top-u.bottom,Q=h-u.left-u.right,y=ir(p-u[m],b),S=ir(h-u[g],Q),v=!e.middlewareData.shift;let P=y,w=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(w=Q),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(P=b),v&&!f){const E=Wn(u.left,0),I=Wn(u.right,0),Z=Wn(u.top,0),K=Wn(u.bottom,0);d?w=h-2*(E!==0||I!==0?E+I:Wn(u.left,u.right)):P=p-2*(Z!==0||K!==0?Z+K:Wn(u.top,u.bottom))}await l({...e,availableWidth:w,availableHeight:P});const k=await o.getDimensions(a.floating);return h!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}};function GO(){return typeof window<"u"}function Fr(t){return mm(t)?(t.nodeName||"").toLowerCase():"#document"}function Nn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Gi(t){var e;return(e=(mm(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function mm(t){return GO()?t instanceof Node||t instanceof Nn(t).Node:!1}function $i(t){return GO()?t instanceof Element||t instanceof Nn(t).Element:!1}function Li(t){return GO()?t instanceof HTMLElement||t instanceof Nn(t).HTMLElement:!1}function A$(t){return!GO()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Nn(t).ShadowRoot}function Gl(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=Qi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function WC(t){return["table","td","th"].includes(Fr(t))}function FO(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function gm(t){const e=$m(),n=$i(t)?Qi(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function DC(t){let e=sr(t);for(;Li(e)&&!Io(e);){if(gm(e))return e;if(FO(e))return null;e=sr(e)}return null}function $m(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Io(t){return["html","body","#document"].includes(Fr(t))}function Qi(t){return Nn(t).getComputedStyle(t)}function HO(t){return $i(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function sr(t){if(Fr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||A$(t)&&t.host||Gi(t);return A$(e)?e.host:e}function Xv(t){const e=sr(t);return Io(e)?t.ownerDocument?t.ownerDocument.body:t.body:Li(e)&&Gl(e)?e:Xv(e)}function dl(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Xv(t),r=s===((i=t.ownerDocument)==null?void 0:i.body),o=Nn(s);if(r){const a=dh(o);return e.concat(o,o.visualViewport||[],Gl(s)?s:[],a&&n?dl(a):[])}return e.concat(s,dl(s,[],n))}function dh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Cv(t){const e=Qi(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=Li(t),r=s?t.offsetWidth:n,o=s?t.offsetHeight:i,a=Iu(n)!==r||Iu(i)!==o;return a&&(n=r,i=o),{width:n,height:i,$:a}}function Qm(t){return $i(t)?t:t.contextElement}function ko(t){const e=Qm(t);if(!Li(e))return Ii(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:r}=Cv(e);let o=(r?Iu(n.width):n.width)/i,a=(r?Iu(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const LC=Ii(0);function Vv(t){const e=Nn(t);return!$m()||!e.visualViewport?LC:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function NC(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Nn(t)?!1:e}function qr(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),r=Qm(t);let o=Ii(1);e&&(i?$i(i)&&(o=ko(i)):o=ko(t));const a=NC(r,n,i)?Vv(r):Ii(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,O=s.height/o.y;if(r){const f=Nn(r),d=i&&$i(i)?Nn(i):i;let h=f,p=dh(h);for(;p&&i&&d!==h;){const m=ko(p),g=p.getBoundingClientRect(),b=Qi(p),Q=g.left+(p.clientLeft+parseFloat(b.paddingLeft))*m.x,y=g.top+(p.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,O*=m.y,l+=Q,c+=y,h=Nn(p),p=dh(h)}}return Wu({width:u,height:O,x:l,y:c})}function ym(t,e){const n=HO(t).scrollLeft;return e?e.left+n:qr(Gi(t)).left+n}function Av(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=i.left+e.scrollLeft-(n?0:ym(t,i)),r=i.top+e.scrollTop;return{x:s,y:r}}function jC(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const r=s==="fixed",o=Gi(i),a=e?FO(e.floating):!1;if(i===o||a&&r)return n;let l={scrollLeft:0,scrollTop:0},c=Ii(1);const u=Ii(0),O=Li(i);if((O||!O&&!r)&&((Fr(i)!=="body"||Gl(o))&&(l=HO(i)),Li(i))){const d=qr(i);c=ko(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}const f=o&&!O&&!r?Av(o,l,!0):Ii(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function BC(t){return Array.from(t.getClientRects())}function GC(t){const e=Gi(t),n=HO(t),i=t.ownerDocument.body,s=Wn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=Wn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+ym(t);const a=-n.scrollTop;return Qi(i).direction==="rtl"&&(o+=Wn(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:o,y:a}}function FC(t,e){const n=Nn(t),i=Gi(t),s=n.visualViewport;let r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;const c=$m();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a,y:l}}function HC(t,e){const n=qr(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,r=Li(t)?ko(t):Ii(1),o=t.clientWidth*r.x,a=t.clientHeight*r.y,l=s*r.x,c=i*r.y;return{width:o,height:a,x:l,y:c}}function E$(t,e,n){let i;if(e==="viewport")i=FC(t,n);else if(e==="document")i=GC(Gi(t));else if($i(e))i=HC(e,n);else{const s=Vv(t);i={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Wu(i)}function Ev(t,e){const n=sr(t);return n===e||!$i(n)||Io(n)?!1:Qi(n).position==="fixed"||Ev(n,e)}function KC(t,e){const n=e.get(t);if(n)return n;let i=dl(t,[],!1).filter(a=>$i(a)&&Fr(a)!=="body"),s=null;const r=Qi(t).position==="fixed";let o=r?sr(t):t;for(;$i(o)&&!Io(o);){const a=Qi(o),l=gm(o);!l&&a.position==="fixed"&&(s=null),(r?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Gl(o)&&!l&&Ev(t,o))?i=i.filter(u=>u!==o):s=a,o=sr(o)}return e.set(t,i),i}function JC(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const o=[...n==="clippingAncestors"?FO(e)?[]:KC(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const O=E$(e,u,s);return c.top=Wn(O.top,c.top),c.right=ir(O.right,c.right),c.bottom=ir(O.bottom,c.bottom),c.left=Wn(O.left,c.left),c},E$(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function eV(t){const{width:e,height:n}=Cv(t);return{width:e,height:n}}function tV(t,e,n){const i=Li(e),s=Gi(e),r=n==="fixed",o=qr(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=Ii(0);function c(){l.x=ym(s)}if(i||!i&&!r)if((Fr(e)!=="body"||Gl(s))&&(a=HO(e)),i){const d=qr(e,!0,r,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else s&&c();r&&!i&&s&&c();const u=s&&!i&&!r?Av(s,a):Ii(0),O=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:O,y:f,width:o.width,height:o.height}}function If(t){return Qi(t).position==="static"}function Z$(t,e){if(!Li(t)||Qi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Gi(t)===n&&(n=n.ownerDocument.body),n}function Zv(t,e){const n=Nn(t);if(FO(t))return n;if(!Li(t)){let s=sr(t);for(;s&&!Io(s);){if($i(s)&&!If(s))return s;s=sr(s)}return n}let i=Z$(t,e);for(;i&&WC(i)&&If(i);)i=Z$(i,e);return i&&Io(i)&&If(i)&&!gm(i)?n:i||DC(t)||n}const nV=async function(t){const e=this.getOffsetParent||Zv,n=this.getDimensions,i=await n(t.floating);return{reference:tV(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function iV(t){return Qi(t).direction==="rtl"}const sV={convertOffsetParentRelativeRectToViewportRelativeRect:jC,getDocumentElement:Gi,getClippingRect:JC,getOffsetParent:Zv,getElementRects:nV,getClientRects:BC,getDimensions:eV,getScale:ko,isElement:$i,isRTL:iV};function zv(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function rV(t,e){let n=null,i;const s=Gi(t);function r(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),r();const c=t.getBoundingClientRect(),{left:u,top:O,width:f,height:d}=c;if(a||e(),!f||!d)return;const h=bc(O),p=bc(s.clientWidth-(u+f)),m=bc(s.clientHeight-(O+d)),g=bc(u),Q={rootMargin:-h+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Wn(0,ir(1,l))||1};let y=!0;function S(v){const P=v[0].intersectionRatio;if(P!==l){if(!y)return o();P?o(!1,P):i=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!zv(c,t.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(S,{...Q,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,Q)}n.observe(t)}return o(!0),r}function oV(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Qm(t),u=s||r?[...c?dl(c):[],...dl(e)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),r&&g.addEventListener("resize",n)});const O=c&&a?rV(c,n):null;let f=-1,d=null;o&&(d=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&d&&(d.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var Q;(Q=d)==null||Q.observe(e)})),n()}),c&&!l&&d.observe(c),d.observe(e));let h,p=l?qr(t):null;l&&m();function m(){const g=qr(t);p&&!zv(p,g)&&n(),p=g,h=requestAnimationFrame(m)}return n(),()=>{var g;u.forEach(b=>{s&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),O==null||O(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const aV=MC,lV=qC,z$=ZC,cV=UC,uV=zC,OV=EC,fV=IC,dV=(t,e,n)=>{const i=new Map,s={platform:sV,...n},r={...s.platform,_c:i};return AC(t,e,{...s,platform:r})};function hV(t){return t!=null&&typeof t=="object"&&"$el"in t}function hh(t){if(hV(t)){const e=t.$el;return mm(e)&&Fr(e)==="#comment"?null:e}return t}function uo(t){return typeof t=="function"?t():$(t)}function pV(t){return{name:"arrow",options:t,fn(e){const n=hh(uo(t.element));return n==null?{}:OV({element:n,padding:t.padding}).fn(e)}}}function Yv(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Y$(t,e){const n=Yv(t);return Math.round(e*n)/n}function mV(t,e,n){n===void 0&&(n={});const i=n.whileElementsMounted,s=J(()=>{var P;return(P=uo(n.open))!=null?P:!0}),r=J(()=>uo(n.middleware)),o=J(()=>{var P;return(P=uo(n.placement))!=null?P:"bottom"}),a=J(()=>{var P;return(P=uo(n.strategy))!=null?P:"absolute"}),l=J(()=>{var P;return(P=uo(n.transform))!=null?P:!0}),c=J(()=>hh(t.value)),u=J(()=>hh(e.value)),O=te(0),f=te(0),d=te(a.value),h=te(o.value),p=ms({}),m=te(!1),g=J(()=>{const P={position:d.value,left:"0",top:"0"};if(!u.value)return P;const w=Y$(u.value,O.value),k=Y$(u.value,f.value);return l.value?{...P,transform:"translate("+w+"px, "+k+"px)",...Yv(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:w+"px",top:k+"px"}});let b;function Q(){if(c.value==null||u.value==null)return;const P=s.value;dV(c.value,u.value,{middleware:r.value,placement:o.value,strategy:a.value}).then(w=>{O.value=w.x,f.value=w.y,d.value=w.strategy,h.value=w.placement,p.value=w.middlewareData,m.value=P!==!1})}function y(){typeof b=="function"&&(b(),b=void 0)}function S(){if(y(),i===void 0){Q();return}if(c.value!=null&&u.value!=null){b=i(c.value,u.value,Q);return}}function v(){s.value||(m.value=!1)}return _e([r,o,a,s],Q,{flush:"sync"}),_e([c,u],S,{flush:"sync"}),_e(s,v,{flush:"sync"}),Ul()&&CO(y),{x:Pr(O),y:Pr(f),strategy:Pr(d),placement:Pr(h),middlewareData:Pr(p),isPositioned:Pr(m),floatingStyles:g,update:Q}}function bm(t){return t?t.flatMap(e=>e.type===Ce?bm(e.children):[e]):[]}const ph=W({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var l;if(!n.default)return null;const i=bm(n.default()),s=i.findIndex(c=>c.type!==Tt);if(s===-1)return i;const r=i[s];(l=r.props)==null||delete l.ref;const o=r.props?be(e,r.props):e,a=gi({...r,props:{}},o);return i.length===1?a:(i[s]=a,i)}}}),gV=["area","img","input"],Ue=W({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const i=t.asChild?"template":t.as;return typeof i=="string"&&gV.includes(i)?()=>Vn(i,e):i!=="template"?()=>Vn(t.as,e,{default:n.default}):()=>Vn(ph,e,{default:n.default})}}),Mv=W({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(C(),j($(Ue),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:z(()=>[le(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function $V(t,e){var n;const i=ms();return Zt(()=>{i.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),ZO(i)}function KO(t){return Ul()?(CO(t),!0):!1}function QV(t){let e=!1,n;const i=na(!0);return(...s)=>(e||(n=i.run(()=>t(...s)),e=!0),n)}function yV(t){let e=0,n,i;const s=()=>{e-=1,i&&e<=0&&(i.stop(),n=void 0,i=void 0)};return(...r)=>(e+=1,i||(i=na(!0),n=i.run(()=>t(...r))),KO(s),n)}const dr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bV=t=>typeof t<"u",SV=Object.prototype.toString,vV=t=>SV.call(t)==="[object Object]",M$=PV();function PV(){var t,e;return dr&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function xV(t){return Qt()}function Uf(t){return Array.isArray(t)?t:[t]}function wV(t,e=1e4){return Lp((n,i)=>{let s=nn(t),r;const o=()=>setTimeout(()=>{s=nn(t),i()},nn(e));return KO(()=>{clearTimeout(r)}),{get(){return n(),s},set(a){s=a,i(),clearTimeout(r),r=o()}}})}const TV=nn;function _V(t,e){xV()&&Gr(t,e)}function kV(t,e,n){return _e(t,e,{...n,immediate:!0})}const JO=dr?window:void 0;function Ni(t){var e;const n=nn(t);return(e=n==null?void 0:n.$el)!=null?e:n}function qv(...t){const e=[],n=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=J(()=>{const a=Uf(nn(t[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=kV(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>Ni(c)))!=null?l:[JO].filter(c=>c!=null),Uf(nn(s.value?t[1]:t[0])),Uf($(s.value?t[2]:t[1])),nn(s.value?t[3]:t[2])]},([a,l,c,u])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const O=vV(u)?{...u}:u;e.push(...a.flatMap(f=>l.flatMap(d=>c.map(h=>i(f,d,h,O)))))},{flush:"post"}),o=()=>{r(),n()};return KO(n),o}function Iv(){const t=ms(!1),e=Qt();return e&&Pt(()=>{t.value=!0},e),t}function RV(t){const e=Iv();return J(()=>(e.value,!!t()))}function XV(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function CV(...t){let e,n,i={};t.length===3?(e=t[0],n=t[1],i=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],i=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:s=JO,eventName:r="keydown",passive:o=!1,dedupe:a=!1}=i,l=XV(e);return qv(s,r,u=>{u.repeat&&nn(a)||l(u)&&n(u)},o)}function VV(t){return JSON.parse(JSON.stringify(t))}function AV(t,e,n={}){const{window:i=JO,...s}=n;let r;const o=RV(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=J(()=>{const O=nn(t);return Array.isArray(O)?O.map(f=>Ni(f)):[Ni(O)]}),c=_e(l,O=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const f of O)f&&r.observe(f,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return KO(u),{isSupported:o,stop:u}}function Ir(t,e,n,i={}){var s,r,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:O,shouldEmit:f}=i,d=Qt(),h=n||(d==null?void 0:d.emit)||((s=d==null?void 0:d.$emit)==null?void 0:s.bind(d))||((o=(r=d==null?void 0:d.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let p=c;e||(e="modelValue"),p=p||`update:${e.toString()}`;const m=Q=>a?typeof a=="function"?a(Q):VV(Q):Q,g=()=>bV(t[e])?m(t[e]):O,b=Q=>{f?f(Q)&&h(p,Q):h(p,Q)};if(l){const Q=g(),y=te(Q);let S=!1;return _e(()=>t[e],v=>{S||(S=!0,y.value=m(v),It(()=>S=!1))}),_e(y,v=>{!S&&(v!==t[e]||u)&&b(v)},{deep:u}),y}else return J({get(){return g()},set(Q){b(Q)}})}function vn(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,i=Symbol(n);return[o=>{const a=gn(i,o);if(a||a===null)return a;throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(Os(i,o),o)]}function q$(t){return typeof t=="string"?`'${t}'`:new EV().serialize(t)}const EV=function(){var e;class t{constructor(){Ig(this,e,new Map)}compare(i,s){const r=typeof i,o=typeof s;return r==="string"&&o==="string"?i.localeCompare(s):r==="number"&&o==="number"?i-s:String.prototype.localeCompare.call(this.serialize(i,!0),this.serialize(s,!0))}serialize(i,s){if(i===null)return"null";switch(typeof i){case"string":return s?i:`'${i}'`;case"bigint":return`${i}n`;case"object":return this.$object(i);case"function":return this.$function(i)}return String(i)}serializeObject(i){const s=Object.prototype.toString.call(i);if(s!=="[object Object]")return this.serializeBuiltInType(s.length<10?`unknown:${s}`:s.slice(8,-1),i);const r=i.constructor,o=r===Object||r===void 0?"":r.name;if(o!==""&&globalThis[o]===r)return this.serializeBuiltInType(o,i);if(typeof i.toJSON=="function"){const a=i.toJSON();return o+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(o,Object.entries(i))}serializeBuiltInType(i,s){const r=this["$"+i];if(r)return r.call(this,s);if(typeof(s==null?void 0:s.entries)=="function")return this.serializeObjectEntries(i,s.entries());throw new Error(`Cannot serialize ${i}`)}serializeObjectEntries(i,s){const r=Array.from(s).sort((a,l)=>this.compare(a[0],l[0]));let o=`${i}{`;for(let a=0;athis.compare(s,r)))}`}$Map(i){return this.serializeObjectEntries("Map",i.entries())}}e=new WeakMap;for(const n of["Error","RegExp","URL"])t.prototype["$"+n]=function(i){return`${n}(${i})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+n]=function(i){return`${n}[${i.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])t.prototype["$"+n]=function(i){return`${n}[${i.join("n,")}${i.length>0?"n":""}]`};return t}();function Du(t,e){return t===e||q$(t)===q$(e)}function hl(t){return t==null}function I$(t,e){return hl(t)?!1:Array.isArray(t)?t.some(n=>Du(n,e)):Du(t,e)}const[ef,wB]=vn("ConfigProvider");function tf(t){const e=ef({dir:te("ltr")});return J(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function Je(){const t=Qt(),e=te(),n=J(()=>{var o,a;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(a=e.value)==null?void 0:a.$el.nextElementSibling:Ni(e)}),i=Object.assign({},t.exposed),s={};for(const o in t.props)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(i).length>0)for(const o in i)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>i[o]});Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=s;function r(o){e.value=o,o&&(Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),t.exposed=s)}return{forwardRef:r,currentRef:e,currentElement:n}}let ZV=0;function yi(t,e="reka"){if(t)return t;const n=ef({useId:void 0});return Object.hasOwn(BX,"useId")?`${e}-${ou==null?void 0:ou()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++ZV}`}function zV(t,e){const n=te(t);function i(r){return e[n.value][r]??n.value}return{state:n,dispatch:r=>{n.value=i(r)}}}function YV(t,e){var m;const n=te({}),i=te("none"),s=te(t),r=t.value?"mounted":"unmounted";let o;const a=((m=e.value)==null?void 0:m.ownerDocument.defaultView)??JO,{state:l,dispatch:c}=zV(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=g=>{var b;if(dr){const Q=new CustomEvent(g,{bubbles:!1,cancelable:!1});(b=e.value)==null||b.dispatchEvent(Q)}};_e(t,async(g,b)=>{var y;const Q=b!==g;if(await It(),Q){const S=i.value,v=Sc(e.value);g?(c("MOUNT"),u("enter"),v==="none"&&u("after-enter")):v==="none"||v==="undefined"||((y=n.value)==null?void 0:y.display)==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):b&&S!==v?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const O=g=>{const b=Sc(e.value),Q=b.includes(g.animationName),y=l.value==="mounted"?"enter":"leave";if(g.target===e.value&&Q&&(u(`after-${y}`),c("ANIMATION_END"),!s.value)){const S=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",o=a==null?void 0:a.setTimeout(()=>{var v;((v=e.value)==null?void 0:v.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=S)})}g.target===e.value&&b==="none"&&c("ANIMATION_END")},f=g=>{g.target===e.value&&(i.value=Sc(e.value))},d=_e(e,(g,b)=>{g?(n.value=getComputedStyle(g),g.addEventListener("animationstart",f),g.addEventListener("animationcancel",O),g.addEventListener("animationend",O)):(c("ANIMATION_END"),o!==void 0&&(a==null||a.clearTimeout(o)),b==null||b.removeEventListener("animationstart",f),b==null||b.removeEventListener("animationcancel",O),b==null||b.removeEventListener("animationend",O))},{immediate:!0}),h=_e(l,()=>{const g=Sc(e.value);i.value=l.value==="mounted"?g:"none"});return Bi(()=>{d(),h()}),{isPresent:J(()=>["mounted","unmountSuspended"].includes(l.value))}}function Sc(t){return t&&getComputedStyle(t).animationName||"none"}const Fl=W({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var c;const{present:i,forceMount:s}=bn(t),r=te(),{isPresent:o}=YV(i,r);n({present:o});let a=e.default({present:o.value});a=bm(a||[]);const l=Qt();if(a&&(a==null?void 0:a.length)>1){const u=(c=l==null?void 0:l.parent)!=null&&c.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(O=>` - ${O}`).join(` `)].join(` -`))}return()=>s.value||i.value||o.value?An(e.default({present:o.value})[0],{ref:u=>{const f=Vi(u);return typeof(f==null?void 0:f.hasAttribute)>"u"||(f!=null&&f.hasAttribute("data-reka-popper-content-wrapper")?r.value=f.firstElementChild:r.value=f),f}}):null}}),[zi,bM]=bn("DialogRoot"),dx=H({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,s=Er(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),r=se(),o=se(),{modal:l}=yn(n);return bM({open:s,modal:l,openModal:()=>{s.value=!0},onOpenChange:a=>{s.value=a},onOpenToggle:()=>{s.value=!s.value},contentId:"",titleId:"",descriptionId:"",triggerElement:r,contentElement:o}),(a,c)=>le(a.$slots,"default",{open:v(s),close:()=>s.value=!1})}}),Em=H({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;Xe();const n=zi();return(i,s)=>(D(),j(v(Fe),xe(e,{type:i.as==="button"?"button":void 0,onClick:s[0]||(s[0]=r=>v(n).onOpenChange(!1))}),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["type"]))}});function kf(t){const e=yt(),n=e==null?void 0:e.type.emits,i={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(s=>{i[co(Bt(s))]=(...r)=>t(s,...r)}),i}function pn(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function vM(t){return t?"open":"closed"}function F0(t){const e=pn();for(const n of t)if(n===e||(n.focus(),pn()!==e))return}const wM=QP(()=>se([]));function xM(){const t=wM();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=W0(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=W0(t.value,e),(n=t.value[0])==null||n.resume()}}}function W0(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function SM(t){return t.filter(e=>e.tagName!=="A")}const fd="focusScope.autoFocusOnMount",dd="focusScope.autoFocusOnUnmount",z0={bubbles:!1,cancelable:!0};function kM(t,{select:e=!1}={}){const n=pn();for(const i of t)if(Ps(i,{select:e}),pn()!==n)return!0}function OM(t){const e=hx(t),n=H0(e,t),i=H0(e.reverse(),t);return[n,i]}function hx(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function H0(t,e){for(const n of t)if(!CM(n,{upTo:e}))return n}function CM(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function _M(t){return t instanceof HTMLInputElement&&"select"in t}function Ps(t,{select:e=!1}={}){if(t&&t.focus){const n=pn();t.focus({preventScroll:!0}),t!==n&&_M(t)&&e&&t.select()}}const px=H({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,i=e,{currentRef:s,currentElement:r}=Xe(),o=se(null),l=xM(),a=us({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Mt(u=>{if(!nr)return;const f=r.value;if(!n.trapped)return;function d(y){if(a.paused||!f)return;const g=y.target;f.contains(g)?o.value=g:Ps(o.value,{select:!0})}function h(y){if(a.paused||!f)return;const g=y.relatedTarget;g!==null&&(f.contains(g)||Ps(o.value,{select:!0}))}function p(y){f.contains(o.value)||Ps(f)}document.addEventListener("focusin",d),document.addEventListener("focusout",h);const m=new MutationObserver(p);f&&m.observe(f,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",h),m.disconnect()})}),Mt(async u=>{const f=r.value;if(await Nt(),!f)return;l.add(a);const d=pn();if(!f.contains(d)){const p=new CustomEvent(fd,z0);f.addEventListener(fd,m=>i("mountAutoFocus",m)),f.dispatchEvent(p),p.defaultPrevented||(kM(SM(hx(f)),{select:!0}),pn()===d&&Ps(f))}u(()=>{f.removeEventListener(fd,y=>i("mountAutoFocus",y));const p=new CustomEvent(dd,z0),m=y=>{i("unmountAutoFocus",y)};f.addEventListener(dd,m),f.dispatchEvent(p),setTimeout(()=>{p.defaultPrevented||Ps(d??document.body,{select:!0}),f.removeEventListener(dd,m),l.remove(a)},0)})});function c(u){if(!n.loop&&!n.trapped||a.paused)return;const f=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,d=pn();if(f&&d){const h=u.currentTarget,[p,m]=OM(h);p&&m?!u.shiftKey&&d===m?(u.preventDefault(),n.loop&&Ps(p,{select:!0})):u.shiftKey&&d===p&&(u.preventDefault(),n.loop&&Ps(m,{select:!0})):d===h&&u.preventDefault()}}return(u,f)=>(D(),j(v(Fe),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:V(()=>[le(u.$slots,"default")]),_:3},8,["as-child","as"]))}});function Tm(t,e,n){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),i.dispatchEvent(s)}const AM="dismissableLayer.pointerDownOutside",EM="dismissableLayer.focusOutside";function mx(t,e){const n=e.closest("[data-dismissable-layer]"),i=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),s=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(i===n||s.indexOf(i){});return Mt(l=>{if(!nr||!Qt(n))return;const a=async u=>{const f=u.target;if(!(!(e!=null&&e.value)||!f)){if(mx(e.value,f)){s.value=!1;return}if(u.target&&!s.value){let d=function(){Tm(AM,t,h)};const h={originalEvent:u};u.pointerType==="touch"?(i.removeEventListener("click",r.value),r.value=d,i.addEventListener("click",r.value,{once:!0})):d()}else i.removeEventListener("click",r.value);s.value=!1}},c=window.setTimeout(()=>{i.addEventListener("pointerdown",a)},0);l(()=>{window.clearTimeout(c),i.removeEventListener("pointerdown",a),i.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>{Qt(n)&&(s.value=!0)}}}function PM(t,e,n=!0){var r;const i=((r=e==null?void 0:e.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),s=se(!1);return Mt(o=>{if(!nr||!Qt(n))return;const l=async a=>{if(!(e!=null&&e.value))return;await Nt(),await Nt();const c=a.target;!e.value||!c||mx(e.value,c)||a.target&&!s.value&&Tm(EM,t,{originalEvent:a})};i.addEventListener("focusin",l),o(()=>i.removeEventListener("focusin",l))}),{onFocusCapture:()=>{Qt(n)&&(s.value=!0)},onBlurCapture:()=>{Qt(n)&&(s.value=!1)}}}const Ki=us({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gx=H({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:s,currentElement:r}=Xe(),o=Q(()=>{var p;return((p=r.value)==null?void 0:p.ownerDocument)??globalThis.document}),l=Q(()=>Ki.layersRoot),a=Q(()=>r.value?Array.from(l.value).indexOf(r.value):-1),c=Q(()=>Ki.layersWithOutsidePointerEventsDisabled.size>0),u=Q(()=>{const p=Array.from(l.value),[m]=[...Ki.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(m);return a.value>=y}),f=TM(async p=>{const m=[...Ki.branches].some(y=>y==null?void 0:y.contains(p.target));!u.value||m||(i("pointerDownOutside",p),i("interactOutside",p),await Nt(),p.defaultPrevented||i("dismiss"))},r),d=PM(p=>{[...Ki.branches].some(y=>y==null?void 0:y.contains(p.target))||(i("focusOutside",p),i("interactOutside",p),p.defaultPrevented||i("dismiss"))},r);fM("Escape",p=>{a.value===l.value.size-1&&(i("escapeKeyDown",p),p.defaultPrevented||i("dismiss"))});let h;return Mt(p=>{r.value&&(n.disableOutsidePointerEvents&&(Ki.layersWithOutsidePointerEventsDisabled.size===0&&(h=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),Ki.layersWithOutsidePointerEventsDisabled.add(r.value)),l.value.add(r.value),p(()=>{n.disableOutsidePointerEvents&&Ki.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=h)}))}),Mt(p=>{p(()=>{r.value&&(l.value.delete(r.value),Ki.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(p,m)=>(D(),j(v(Fe),{ref:v(s),"as-child":p.asChild,as:p.as,"data-dismissable-layer":"",style:ti({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:v(d).onFocusCapture,onBlurCapture:v(d).onBlurCapture,onPointerdownCapture:v(f).onPointerDownCapture},{default:V(()=>[le(p.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),yx=H({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=zi(),{forwardRef:r,currentElement:o}=Xe();return s.titleId||(s.titleId=pi(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=pi(void 0,"reka-dialog-description")),St(()=>{s.contentElement=o,pn()!==document.body&&(s.triggerElement.value=pn())}),(l,a)=>(D(),j(v(px),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:a[5]||(a[5]=c=>i("openAutoFocus",c)),onUnmountAutoFocus:a[6]||(a[6]=c=>i("closeAutoFocus",c))},{default:V(()=>[P(v(gx),xe({id:v(s).contentId,ref:v(r),as:l.as,"as-child":l.asChild,"disable-outside-pointer-events":l.disableOutsidePointerEvents,role:"dialog","aria-describedby":v(s).descriptionId,"aria-labelledby":v(s).titleId,"data-state":v(vM)(v(s).open.value)},l.$attrs,{onDismiss:a[0]||(a[0]=c=>v(s).onOpenChange(!1)),onEscapeKeyDown:a[1]||(a[1]=c=>i("escapeKeyDown",c)),onFocusOutside:a[2]||(a[2]=c=>i("focusOutside",c)),onInteractOutside:a[3]||(a[3]=c=>i("interactOutside",c)),onPointerDownOutside:a[4]||(a[4]=c=>i("pointerDownOutside",c))}),{default:V(()=>[le(l.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}});var MM=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ur=new WeakMap,Ka=new WeakMap,Ga={},hd=0,bx=function(t){return t&&(t.host||bx(t.parentNode))},DM=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=bx(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},RM=function(t,e,n,i){var s=DM(e,Array.isArray(t)?t:[t]);Ga[n]||(Ga[n]=new WeakMap);var r=Ga[n],o=[],l=new Set,a=new Set(s),c=function(f){!f||l.has(f)||(l.add(f),c(f.parentNode))};s.forEach(c);var u=function(f){!f||a.has(f)||Array.prototype.forEach.call(f.children,function(d){if(l.has(d))u(d);else try{var h=d.getAttribute(i),p=h!==null&&h!=="false",m=(Ur.get(d)||0)+1,y=(r.get(d)||0)+1;Ur.set(d,m),r.set(d,y),o.push(d),m===1&&p&&Ka.set(d,!0),y===1&&d.setAttribute(n,"true"),p||d.setAttribute(i,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return u(e),l.clear(),hd++,function(){o.forEach(function(f){var d=Ur.get(f)-1,h=r.get(f)-1;Ur.set(f,d),r.set(f,h),d||(Ka.has(f)||f.removeAttribute(i),Ka.delete(f)),h||f.removeAttribute(n)}),hd--,hd||(Ur=new WeakMap,Ur=new WeakMap,Ka=new WeakMap,Ga={})}},IM=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),s=MM(t);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),RM(i,s,n,"aria-hidden")):function(){return null}};function vx(t){let e;Te(()=>Vi(t),n=>{n?e=IM(n):e&&e()}),Fi(()=>{e&&e()})}const LM=H({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=zi(),r=kf(i),{forwardRef:o,currentElement:l}=Xe();return vx(l),(a,c)=>(D(),j(yx,xe({...n,...v(r)},{ref:v(o),"trap-focus":v(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=u=>{var f;u.defaultPrevented||(u.preventDefault(),(f=v(s).triggerElement.value)==null||f.focus())}),onPointerDownOutside:c[1]||(c[1]=u=>{const f=u.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0;(f.button===2||d)&&u.preventDefault()}),onFocusOutside:c[2]||(c[2]=u=>{u.preventDefault()})}),{default:V(()=>[le(a.$slots,"default")]),_:3},16,["trap-focus"]))}}),NM=H({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,s=kf(e);Xe();const r=zi(),o=se(!1),l=se(!1);return(a,c)=>(D(),j(yx,xe({...n,...v(s)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=u=>{var f;u.defaultPrevented||(o.value||(f=v(r).triggerElement.value)==null||f.focus(),u.preventDefault()),o.value=!1,l.value=!1}),onInteractOutside:c[1]||(c[1]=u=>{var h;u.defaultPrevented||(o.value=!0,u.detail.originalEvent.type==="pointerdown"&&(l.value=!0));const f=u.target;((h=v(r).triggerElement.value)==null?void 0:h.contains(f))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.value&&u.preventDefault()})}),{default:V(()=>[le(a.$slots,"default")]),_:3},16))}}),wx=H({__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=zi(),r=kf(i),{forwardRef:o}=Xe();return(l,a)=>(D(),j(v(Sa),{present:l.forceMount||v(s).open.value},{default:V(()=>[v(s).modal.value?(D(),j(LM,xe({key:0,ref:v(o)},{...n,...v(r),...l.$attrs}),{default:V(()=>[le(l.$slots,"default")]),_:3},16)):(D(),j(NM,xe({key:1,ref:v(o)},{...n,...v(r),...l.$attrs}),{default:V(()=>[le(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),xx=H({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(t){const e=t;Xe();const n=zi();return(i,s)=>(D(),j(v(Fe),xe(e,{id:v(n).descriptionId}),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["id"]))}});function pd(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Ah(t,e,n=".",i){if(!pd(e))return Ah(t,{},n,i);const s=Object.assign({},e);for(const r in t){if(r==="__proto__"||r==="constructor")continue;const o=t[r];o!=null&&(i&&i(s,r,o,n)||(Array.isArray(o)&&Array.isArray(s[r])?s[r]=[...o,...s[r]]:pd(o)&&pd(s[r])?s[r]=Ah(o,s[r],(n?`${n}.`:"")+r.toString(),i):s[r]=o))}return s}function $M(t){return(...e)=>e.reduce((n,i)=>Ah(n,i,"",t),{})}const VM=$M(),BM=ZP(()=>{const t=se(new Map),e=se(),n=Q(()=>{for(const o of t.value.values())if(o)return!0;return!1}),i=xf({scrollBody:se(!0)});let s=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",$0&&(s==null||s()),e.value=void 0};return Te(n,(o,l)=>{var f;if(!nr)return;if(!o){l&&r();return}e.value===void 0&&(e.value=document.body.style.overflow);const a=window.innerWidth-document.documentElement.clientWidth,c={padding:a,margin:0},u=(f=i.scrollBody)!=null&&f.value?typeof i.scrollBody.value=="object"?VM({padding:i.scrollBody.value.padding===!0?a:i.scrollBody.value.padding,margin:i.scrollBody.value.margin===!0?a:i.scrollBody.value.margin},c):c:{padding:0,margin:0};a>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.documentElement.style.setProperty("--scrollbar-width",`${a}px`),document.body.style.overflow="hidden"),$0&&(s=ux(document,"touchmove",d=>FM(d),{passive:!1})),Nt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Sx(t){const e=Math.random().toString(36).substring(2,7),n=BM();n.value.set(e,t??!1);const i=Q({get:()=>n.value.get(e)??!1,set:s=>n.value.set(e,s)});return lM(()=>{n.value.delete(e)}),i}function kx(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const WM=H({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(t){const e=zi();return Sx(!0),Xe(),(n,i)=>(D(),j(v(Fe),{as:n.as,"as-child":n.asChild,"data-state":v(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:V(()=>[le(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Ox=H({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=zi(),{forwardRef:n}=Xe();return(i,s)=>{var r;return(r=v(e))!=null&&r.modal.value?(D(),j(v(Sa),{key:0,present:i.forceMount||v(e).open.value},{default:V(()=>[P(WM,xe(i.$attrs,{ref:v(n),as:i.as,"as-child":i.asChild}),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Ee("",!0)}}}),Cx=H({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=fx();return(n,i)=>v(e)||n.forceMount?(D(),j(em,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[le(n.$slots,"default")],8,["to","disabled","defer"])):Ee("",!0)}});function Hi(t){const e=yt(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((s,r)=>{const o=(e==null?void 0:e.type.props[r]).default;return o!==void 0&&(s[r]=o),s},{}),i=p1(t);return Q(()=>{const s={},r=(e==null?void 0:e.vnode.props)??{};return Object.keys(r).forEach(o=>{s[Bt(o)]=r[o]}),Object.keys({...n,...s}).reduce((o,l)=>(i.value[l]!==void 0&&(o[l]=i.value[l]),o),{})})}function zn(t,e){const n=Hi(t),i=e?kf(e):{};return Q(()=>({...n.value,...i}))}const _x=H({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(t){const e=t,n=zi();return Xe(),(i,s)=>(D(),j(v(Fe),xe(e,{id:v(n).titleId}),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["id"]))}}),zM=H({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=zi(),{forwardRef:i,currentElement:s}=Xe();return n.contentId||(n.contentId=pi(void 0,"reka-dialog-content")),St(()=>{n.triggerElement.value=s.value}),(r,o)=>(D(),j(v(Fe),xe(e,{ref:v(i),type:r.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":v(n).open.value||!1,"aria-controls":v(n).open.value?v(n).contentId:void 0,"data-state":v(n).open.value?"open":"closed",onClick:v(n).onOpenToggle}),{default:V(()=>[le(r.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}});function Eh(){const t=se(),e=Q(()=>{var n,i;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(i=t.value)==null?void 0:i.$el.nextElementSibling:Vi(t)});return{primitiveElement:t,currentElement:e}}function Pm(t){return Q(()=>{var e;return oM(t)?!!((e=Vi(t))!=null&&e.closest("form")):!0})}const U0="data-reka-collection-item";function ir(t={}){const{key:e="",isProvider:n=!1}=t,i=`${e}CollectionProvider`;let s;if(n){const u=se(new Map);s={collectionRef:se(),itemMap:u},es(i,s)}else s=dn(i);const r=(u=!1)=>{const f=s.collectionRef.value;if(!f)return[];const d=Array.from(f.querySelectorAll(`[${U0}]`)),p=Array.from(s.itemMap.value.values()).sort((m,y)=>d.indexOf(m.ref)-d.indexOf(y.ref));return u?p:p.filter(m=>m.ref.dataset.disabled!=="")},o=H({name:"CollectionSlot",setup(u,{slots:f}){const{primitiveElement:d,currentElement:h}=Eh();return Te(h,()=>{s.collectionRef.value=h.value}),()=>An(_h,{ref:d},f)}}),l=H({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(u,{slots:f,attrs:d}){const{primitiveElement:h,currentElement:p}=Eh();return Mt(m=>{if(p.value){const y=ga(p.value);s.itemMap.value.set(y,{ref:p.value,value:u.value}),m(()=>s.itemMap.value.delete(y))}}),()=>An(_h,{...d,[U0]:"",ref:h},f)}}),a=Q(()=>Array.from(s.itemMap.value.values())),c=Q(()=>s.itemMap.value.size);return{getItems:r,reactiveItems:a,itemMapSize:c,CollectionSlot:o,CollectionItem:l}}const HM="rovingFocusGroup.onEntryFocus",UM={bubbles:!1,cancelable:!0},jM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qM(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function KM(t,e,n){const i=qM(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return jM[i]}function Ax(t,e=!1){const n=pn();for(const i of t)if(i===n||(i.focus({preventScroll:e}),pn()!==n))return}function GM(t,e){return t.map((n,i)=>t[(e+i)%t.length])}const[YM,XM]=bn("RovingFocusGroup"),JM=H({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const i=t,s=n,{loop:r,orientation:o,dir:l}=yn(i),a=Sf(l),c=Er(i,"currentTabStopId",s,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),u=se(!1),f=se(!1),d=se(0),{getItems:h,CollectionSlot:p}=ir({isProvider:!0});function m(g){const x=!f.value;if(g.currentTarget&&g.target===g.currentTarget&&x&&!u.value){const b=new CustomEvent(HM,UM);if(g.currentTarget.dispatchEvent(b),s("entryFocus",b),!b.defaultPrevented){const w=h().map(_=>_.ref).filter(_=>_.dataset.disabled!==""),S=w.find(_=>_.getAttribute("data-active")===""),k=w.find(_=>_.id===c.value),O=[S,k,...w].filter(Boolean);Ax(O,i.preventScrollOnEntryFocus)}}f.value=!1}function y(){setTimeout(()=>{f.value=!1},1)}return e({getItems:h}),XM({loop:r,dir:a,orientation:o,currentTabStopId:c,onItemFocus:g=>{c.value=g},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{d.value++},onFocusableItemRemove:()=>{d.value--}}),(g,x)=>(D(),j(v(p),null,{default:V(()=>[P(v(Fe),{tabindex:u.value||d.value===0?-1:0,"data-orientation":v(o),as:g.as,"as-child":g.asChild,dir:v(a),style:{outline:"none"},onMousedown:x[0]||(x[0]=b=>f.value=!0),onMouseup:y,onFocus:m,onBlur:x[1]||(x[1]=b=>u.value=!1)},{default:V(()=>[le(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),j0=H({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:i}=Eh(),s=Q(()=>e.checked??e.value);return Te(s,(r,o)=>{if(!i.value)return;const l=i.value,a=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(a,"value").set;if(u&&r!==o){const f=new Event("input",{bubbles:!0}),d=new Event("change",{bubbles:!0});u.call(l,r),l.dispatchEvent(f),l.dispatchEvent(d)}}),(r,o)=>(D(),j(cx,xe({ref_key:"primitiveElement",ref:n},{...e,...r.$attrs},{as:"input"}),null,16))}}),Ex=H({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,n=Q(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),i=Q(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((s,r)=>typeof s=="object"?Object.entries(s).map(([o,l])=>({name:`[${e.name}][${r}][${o}]`,value:l})):{name:`[${e.name}][${r}]`,value:s}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([s,r])=>({name:`[${e.name}][${s}]`,value:r})):[]);return(s,r)=>n.value?(D(),j(j0,xe({key:s.name},{...e,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(D(!0),ae(Me,{key:1},Fn(i.value,o=>(D(),j(j0,xe({key:o.name,ref_for:!0},{...e,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))}}),[QM,MU]=bn("CheckboxGroupRoot");function gu(t){return t==="indeterminate"}function Tx(t){return gu(t)?"indeterminate":t?"checked":"unchecked"}const Px=H({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=YM(),i=pi(),s=Q(()=>e.tabStopId||i),r=Q(()=>n.currentTabStopId.value===s.value),{getItems:o,CollectionItem:l}=ir();St(()=>{e.focusable&&n.onFocusableItemAdd()}),Fi(()=>{e.focusable&&n.onFocusableItemRemove()});function a(c){if(c.key==="Tab"&&c.shiftKey){n.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=KM(c,n.orientation.value,n.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!e.allowShiftKey&&c.shiftKey)return;c.preventDefault();let f=[...o().map(d=>d.ref).filter(d=>d.dataset.disabled!=="")];if(u==="last")f.reverse();else if(u==="prev"||u==="next"){u==="prev"&&f.reverse();const d=f.indexOf(c.currentTarget);f=n.loop.value?GM(f,d+1):f.slice(d+1)}Nt(()=>Ax(f))}}return(c,u)=>(D(),j(v(l),null,{default:V(()=>[P(v(Fe),{tabindex:r.value?0:-1,"data-orientation":v(n).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=f=>{c.focusable?v(n).onItemFocus(s.value):f.preventDefault()}),onFocus:u[1]||(u[1]=f=>v(n).onItemFocus(s.value)),onKeydown:a},{default:V(()=>[le(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[ZM,eD]=bn("CheckboxRoot"),tD=H({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null],default:void 0},disabled:{type:Boolean},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:s,currentElement:r}=Xe(),o=QM(null),l=Er(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),a=Q(()=>(o==null?void 0:o.disabled.value)||n.disabled),c=Q(()=>zl(o==null?void 0:o.modelValue.value)?l.value==="indeterminate"?"indeterminate":l.value:B0(o.modelValue.value,n.value));function u(){if(zl(o==null?void 0:o.modelValue.value))l.value=gu(l.value)?!0:!l.value;else{const h=[...o.modelValue.value||[]];if(B0(h,n.value)){const p=h.findIndex(m=>mu(m,n.value));h.splice(p,1)}else h.push(n.value);o.modelValue.value=h}}const f=Pm(r),d=Q(()=>{var h;return n.id&&r.value?(h=document.querySelector(`[for="${n.id}"]`))==null?void 0:h.innerText:void 0});return eD({disabled:a,state:c}),(h,p)=>{var m,y;return D(),j(om((m=v(o))!=null&&m.rovingFocus.value?v(Px):v(Fe)),xe(h.$attrs,{id:h.id,ref:v(s),role:"checkbox","as-child":h.asChild,as:h.as,type:h.as==="button"?"button":void 0,"aria-checked":v(gu)(c.value)?"mixed":c.value,"aria-required":h.required,"aria-label":h.$attrs["aria-label"]||d.value,"data-state":v(Tx)(c.value),"data-disabled":a.value?"":void 0,disabled:a.value,focusable:(y=v(o))!=null&&y.rovingFocus.value?!a.value:void 0,onKeydown:pf(st(()=>{},["prevent"]),["enter"]),onClick:u}),{default:V(()=>[le(h.$slots,"default",{modelValue:v(l),state:c.value}),v(f)&&h.name&&!v(o)?(D(),j(v(Ex),{key:0,type:"checkbox",checked:!!c.value,name:h.name,value:h.value,disabled:a.value,required:h.required},null,8,["checked","name","value","disabled","required"])):Ee("",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])}}}),nD=H({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e}=Xe(),n=ZM();return(i,s)=>(D(),j(v(Sa),{present:i.forceMount||v(gu)(v(n).state.value)||v(n).state.value===!0},{default:V(()=>[P(v(Fe),xe({ref:v(e),"data-state":v(Tx)(v(n).state.value),"data-disabled":v(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":i.asChild,as:i.as},i.$attrs),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[Mx,iD]=bn("PopperRoot"),sD=H({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=se();return iD({anchor:e,onAnchorChange:n=>e.value=n}),(n,i)=>le(n.$slots,"default")}}),rD=H({__name:"PopperAnchor",props:{reference:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Xe(),s=Mx();return hm(()=>{s.onAnchorChange(e.reference??i.value)}),(r,o)=>(D(),j(v(Fe),{ref:v(n),as:r.as,"as-child":r.asChild},{default:V(()=>[le(r.$slots,"default")]),_:3},8,["as","as-child"]))}});function oD(t){return t!==null}function lD(t){return{name:"transformOrigin",options:t,fn(e){var y,g,x;const{placement:n,rects:i,middlewareData:s}=e,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:t.arrowWidth,a=o?0:t.arrowHeight,[c,u]=Th(n),f={start:"0%",center:"50%",end:"100%"}[u],d=(((g=s.arrow)==null?void 0:g.x)??0)+l/2,h=(((x=s.arrow)==null?void 0:x.y)??0)+a/2;let p="",m="";return c==="bottom"?(p=o?f:`${d}px`,m=`${-a}px`):c==="top"?(p=o?f:`${d}px`,m=`${i.floating.height+a}px`):c==="right"?(p=`${-a}px`,m=o?f:`${h}px`):c==="left"&&(p=`${i.floating.width+a}px`,m=o?f:`${h}px`),{data:{x:p,y:m}}}}}function Th(t){const[e,n="center"]=t.split("-");return[e,n]}function aD(t){const e=se(),n=Q(()=>{var s;return((s=e.value)==null?void 0:s.width)??0}),i=Q(()=>{var s;return((s=e.value)==null?void 0:s.height)??0});return St(()=>{const s=Vi(t);if(s){e.value={width:s.offsetWidth,height:s.offsetHeight};const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let a,c;if("borderBoxSize"in l){const u=l.borderBoxSize,f=Array.isArray(u)?u[0]:u;a=f.inlineSize,c=f.blockSize}else a=s.offsetWidth,c=s.offsetHeight;e.value={width:a,height:c}});return r.observe(s,{box:"border-box"}),()=>r.unobserve(s)}else e.value=void 0}),{width:n,height:i}}const cD={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[DU,uD]=bn("PopperContent"),fD=H({inheritAttrs:!1,__name:"PopperContent",props:W1({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},{...cD}),emits:["placed"],setup(t,{emit:e}){const n=t,i=e,s=Mx(),{forwardRef:r,currentElement:o}=Xe(),l=se(),a=se(),{width:c,height:u}=aD(a),f=Q(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),d=Q(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),h=Q(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),p=Q(()=>({padding:d.value,boundary:h.value.filter(oD),altBoundary:h.value.length>0})),m=JP(()=>[FP({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&L0({...p.value}),n.avoidCollisions&&WP({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?jP():void 0,...p.value}),!n.prioritizePosition&&n.avoidCollisions&&L0({...p.value}),zP({...p.value,apply:({elements:F,rects:L,availableWidth:Y,availableHeight:ee})=>{const{width:re,height:q}=L.reference,B=F.floating.style;B.setProperty("--reka-popper-available-width",`${Y}px`),B.setProperty("--reka-popper-available-height",`${ee}px`),B.setProperty("--reka-popper-anchor-width",`${re}px`),B.setProperty("--reka-popper-anchor-height",`${q}px`)}}),a.value&&GP({element:a.value,padding:n.arrowPadding}),lD({arrowWidth:c.value,arrowHeight:u.value}),n.hideWhenDetached&&HP({strategy:"referenceHidden",...p.value})]),y=Q(()=>n.reference??s.anchor.value),{floatingStyles:g,placement:x,isPositioned:b,middlewareData:w}=YP(y,l,{strategy:n.positionStrategy,placement:f,whileElementsMounted:(...F)=>BP(...F,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:m}),S=Q(()=>Th(x.value)[0]),k=Q(()=>Th(x.value)[1]);hm(()=>{b.value&&i("placed")});const O=Q(()=>{var F;return((F=w.value.arrow)==null?void 0:F.centerOffset)!==0}),_=se("");Mt(()=>{o.value&&(_.value=window.getComputedStyle(o.value).zIndex)});const E=Q(()=>{var F;return((F=w.value.arrow)==null?void 0:F.x)??0}),I=Q(()=>{var F;return((F=w.value.arrow)==null?void 0:F.y)??0});return uD({placedSide:S,onArrowChange:F=>a.value=F,arrowX:E,arrowY:I,shouldHideArrow:O}),(F,L)=>{var Y,ee,re;return D(),ae("div",{ref_key:"floatingRef",ref:l,"data-reka-popper-content-wrapper":"",style:ti({...v(g),transform:v(b)?v(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_.value,"--reka-popper-transform-origin":[(Y=v(w).transformOrigin)==null?void 0:Y.x,(ee=v(w).transformOrigin)==null?void 0:ee.y].join(" "),...((re=v(w).hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[P(v(Fe),xe({ref:v(r)},F.$attrs,{"as-child":n.asChild,as:F.as,"data-side":S.value,"data-align":k.value,style:{animation:v(b)?void 0:"none"}}),{default:V(()=>[le(F.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}});function Dx(t){const e=rM("",1e3);return{search:e,handleTypeaheadSearch:(s,r)=>{e.value=e.value+s;{const o=pn(),l=r.map(d=>{var h,p;return{...d,textValue:((h=d.value)==null?void 0:h.textValue)??((p=d.ref.textContent)==null?void 0:p.trim())??""}}),a=l.find(d=>d.ref===o),c=l.map(d=>d.textValue),u=hD(c,e.value,a==null?void 0:a.textValue),f=l.find(d=>d.textValue===u);return f&&f.ref.focus(),f==null?void 0:f.ref}},resetTypeahead:()=>{e.value=""}}}function dD(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function hD(t,e,n){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let o=dD(t,Math.max(r,0));s.length===1&&(o=o.filter(c=>c!==n));const a=o.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return a!==n?a:void 0}function pD(t,e){if(t.length!==e.length)return!1;for(let n=0;n{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}let md=0;function gD(){Mt(t=>{if(!nr)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??q0()),document.body.insertAdjacentElement("beforeend",e[1]??q0()),md++,t(()=>{md===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),md--})})}function q0(){const t=document.createElement("span");return t.setAttribute("data-reka-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}const Rx=H({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,i)=>(D(),j(v(Cx),Xu(va(e)),{default:V(()=>[le(n.$slots,"default")]),_:3},16))}}),yD=H({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(t){const e=t;return Xe(),(n,i)=>(D(),j(v(Fe),xe(e,{onMousedown:i[0]||(i[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:V(()=>[le(n.$slots,"default")]),_:3},16))}});function K0(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}const bD=[" ","Enter","ArrowUp","ArrowDown"],vD=[" ","Enter"],si=10;function yu(t,e,n){return t===void 0?!1:Array.isArray(t)?t.some(i=>Ph(i,e,n)):Ph(t,e,n)}function Ph(t,e,n){return t===void 0||e===void 0?!1:typeof t=="string"?t===e:typeof n=="function"?n(t,e):typeof n=="string"?(t==null?void 0:t[n])===(e==null?void 0:e[n]):mu(t,e)}function wD(t){return t==null||t===""||Array.isArray(t)&&t.length===0}const xD=H({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(t){const e=t,n=se();return Te(()=>e.value,(i,s)=>{const r=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(r,"value").set;if(i!==s&&l&&n.value){const a=new Event("change",{bubbles:!0});l.call(n.value,i),n.value.dispatchEvent(a)}}),(i,s)=>(D(),j(v(cx),{"as-child":""},{default:V(()=>[X("select",xe({ref_key:"selectElement",ref:n},e),[le(i.$slots,"default")],16)]),_:3}))}}),SD={key:0,value:""},[Vr,Ix]=bn("SelectRoot"),kD=H({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{default:void 0},by:{},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,i=e,{required:s,disabled:r,multiple:o,dir:l}=yn(n),a=Er(n,"modelValue",i,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),c=Er(n,"open",i,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=se(),f=se(),d=se({x:0,y:0}),h=Q(()=>{var b;return o.value&&Array.isArray(a.value)?((b=a.value)==null?void 0:b.length)===0:zl(a.value)});ir({isProvider:!0});const p=Sf(l),m=Pm(u),y=se(new Set),g=Q(()=>Array.from(y.value).map(b=>b.value).join(";"));function x(b){if(o.value){const w=Array.isArray(a.value)?[...a.value]:[],S=w.findIndex(k=>Ph(k,b,n.by));S===-1?w.push(b):w.splice(S,1),a.value=[...w]}else a.value=b}return Ix({triggerElement:u,onTriggerChange:b=>{u.value=b},valueElement:f,onValueElementChange:b=>{f.value=b},contentId:"",modelValue:a,onValueChange:x,by:n.by,open:c,multiple:o,required:s,onOpenChange:b=>{c.value=b},dir:p,triggerPointerDownPosRef:d,disabled:r,isEmptyModelValue:h,optionsSet:y,onOptionAdd:b=>y.value.add(b),onOptionRemove:b=>y.value.delete(b)}),(b,w)=>(D(),j(v(sD),null,{default:V(()=>[le(b.$slots,"default",{modelValue:v(a),open:v(c)}),v(m)?(D(),j(xD,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:v(o),required:v(s),name:b.name,autocomplete:b.autocomplete,disabled:v(r),value:v(a)},{default:V(()=>[v(zl)(v(a))?(D(),ae("option",SD)):Ee("",!0),(D(!0),ae(Me,null,Fn(Array.from(y.value),S=>(D(),ae("option",xe({key:S.value??"",ref_for:!0},S),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Ee("",!0)]),_:3}))}}),[Mm,OD]=bn("SelectItemAlignedPosition"),CD=H({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(t,{emit:e}){const n=t,i=e,{getItems:s}=ir(),r=Vr(),o=Br(),l=se(!1),a=se(!0),c=se(),{forwardRef:u,currentElement:f}=Xe(),{viewport:d,selectedItem:h,selectedItemText:p,focusSelectedItem:m}=o;function y(){if(r.triggerElement.value&&r.valueElement.value&&c.value&&f.value&&(d!=null&&d.value)&&(h!=null&&h.value)&&(p!=null&&p.value)){const b=r.triggerElement.value.getBoundingClientRect(),w=f.value.getBoundingClientRect(),S=r.valueElement.value.getBoundingClientRect(),k=p.value.getBoundingClientRect();if(r.dir.value!=="rtl"){const Ae=k.left-w.left,nt=S.left-Ae,ze=b.left-nt,ft=b.width+ze,qt=Math.max(ft,w.width),vt=window.innerWidth-si,T=K0(nt,si,Math.max(si,vt-qt));c.value.style.minWidth=`${ft}px`,c.value.style.left=`${T}px`}else{const Ae=w.right-k.right,nt=window.innerWidth-S.right-Ae,ze=window.innerWidth-b.right-nt,ft=b.width+ze,qt=Math.max(ft,w.width),vt=window.innerWidth-si,T=K0(nt,si,Math.max(si,vt-qt));c.value.style.minWidth=`${ft}px`,c.value.style.right=`${T}px`}const O=s().map(Ae=>Ae.ref),_=window.innerHeight-si*2,E=d.value.scrollHeight,I=window.getComputedStyle(f.value),F=Number.parseInt(I.borderTopWidth,10),L=Number.parseInt(I.paddingTop,10),Y=Number.parseInt(I.borderBottomWidth,10),ee=Number.parseInt(I.paddingBottom,10),re=F+L+E+ee+Y,q=Math.min(h.value.offsetHeight*5,re),B=window.getComputedStyle(d.value),N=Number.parseInt(B.paddingTop,10),K=Number.parseInt(B.paddingBottom,10),ue=b.top+b.height/2-si,Se=_-ue,fe=h.value.offsetHeight/2,Oe=h.value.offsetTop+fe,Pe=F+L+Oe,Ke=re-Pe;if(Pe<=ue){const Ae=h.value===O[O.length-1];c.value.style.bottom="0px";const nt=f.value.clientHeight-d.value.offsetTop-d.value.offsetHeight,ze=Math.max(Se,fe+(Ae?K:0)+nt+Y),ft=Pe+ze;c.value.style.height=`${ft}px`}else{const Ae=h.value===O[0];c.value.style.top="0px";const ze=Math.max(ue,F+d.value.offsetTop+(Ae?N:0)+fe)+Ke;c.value.style.height=`${ze}px`,d.value.scrollTop=Pe-ue+d.value.offsetTop}c.value.style.margin=`${si}px 0`,c.value.style.minHeight=`${q}px`,c.value.style.maxHeight=`${_}px`,i("placed"),requestAnimationFrame(()=>l.value=!0)}}const g=se("");St(async()=>{await Nt(),y(),f.value&&(g.value=window.getComputedStyle(f.value).zIndex)});function x(b){b&&a.value===!0&&(y(),m==null||m(),a.value=!1)}return hM(r.triggerElement,()=>{y()}),OD({contentWrapper:c,shouldExpandOnScrollRef:l,onScrollButtonChange:x}),(b,w)=>(D(),ae("div",{ref_key:"contentWrapperElement",ref:c,style:ti({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[P(v(Fe),xe({ref:v(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...b.$attrs,...n}),{default:V(()=>[le(b.$slots,"default")]),_:3},16)],4))}}),_D=H({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:si},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},setup(t){const n=Hi(t);return(i,s)=>(D(),j(v(fD),xe(v(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:V(()=>[le(i.$slots,"default")]),_:3},16))}}),AD={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Br,Lx]=bn("SelectContent"),ED=H({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,s=Vr();gD(),Sx(n.bodyLock);const{CollectionSlot:r,getItems:o}=ir(),l=se();vx(l);const{search:a,handleTypeaheadSearch:c}=Dx(),u=se(),f=se(),d=se(),h=se(!1),p=se(!1),m=se(!1);function y(){f.value&&l.value&&F0([f.value,l.value])}Te(h,()=>{y()});const{onOpenChange:g,triggerPointerDownPosRef:x}=s;Mt(k=>{if(!l.value)return;let O={x:0,y:0};const _=I=>{var F,L;O={x:Math.abs(Math.round(I.pageX)-(((F=x.value)==null?void 0:F.x)??0)),y:Math.abs(Math.round(I.pageY)-(((L=x.value)==null?void 0:L.y)??0))}},E=I=>{var F;I.pointerType!=="touch"&&(O.x<=10&&O.y<=10?I.preventDefault():(F=l.value)!=null&&F.contains(I.target)||g(!1),document.removeEventListener("pointermove",_),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",E,{capture:!0,once:!0})),k(()=>{document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",E,{capture:!0})})});function b(k){const O=k.ctrlKey||k.altKey||k.metaKey;if(k.key==="Tab"&&k.preventDefault(),!O&&k.key.length===1&&c(k.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(k.key)){let E=[...o().map(I=>I.ref)];if(["ArrowUp","End"].includes(k.key)&&(E=E.slice().reverse()),["ArrowUp","ArrowDown"].includes(k.key)){const I=k.target,F=E.indexOf(I);E=E.slice(F+1)}setTimeout(()=>F0(E)),k.preventDefault()}}const w=Q(()=>n.position==="popper"?n:{}),S=Hi(w.value);return Lx({content:l,viewport:u,onViewportChange:k=>{u.value=k},itemRefCallback:(k,O,_)=>{const E=!p.value&&!_,I=yu(s.modelValue.value,O,s.by);if(s.multiple.value){if(m.value)return;(I||E)&&(f.value=k,I&&(m.value=!0))}else(I||E)&&(f.value=k);E&&(p.value=!0)},selectedItem:f,selectedItemText:d,onItemLeave:()=>{var k;(k=l.value)==null||k.focus()},itemTextRefCallback:(k,O,_)=>{const E=!p.value&&!_;(yu(s.modelValue.value,O,s.by)||E)&&(d.value=k)},focusSelectedItem:y,position:n.position,isPositioned:h,searchRef:a}),(k,O)=>(D(),j(v(r),null,{default:V(()=>[P(v(px),{"as-child":"",onMountAutoFocus:O[6]||(O[6]=st(()=>{},["prevent"])),onUnmountAutoFocus:O[7]||(O[7]=_=>{var E;i("closeAutoFocus",_),!_.defaultPrevented&&((E=v(s).triggerElement.value)==null||E.focus({preventScroll:!0}),_.preventDefault())})},{default:V(()=>[P(v(gx),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:O[2]||(O[2]=st(()=>{},["prevent"])),onDismiss:O[3]||(O[3]=_=>v(s).onOpenChange(!1)),onEscapeKeyDown:O[4]||(O[4]=_=>i("escapeKeyDown",_)),onPointerDownOutside:O[5]||(O[5]=_=>i("pointerDownOutside",_))},{default:V(()=>[(D(),j(om(k.position==="popper"?_D:CD),xe({...k.$attrs,...v(S)},{id:v(s).contentId,ref:_=>{l.value=v(Vi)(_)},role:"listbox","data-state":v(s).open.value?"open":"closed",dir:v(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:O[0]||(O[0]=st(()=>{},["prevent"])),onPlaced:O[1]||(O[1]=_=>h.value=!0),onKeydown:b}),{default:V(()=>[le(k.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3})]),_:3}))}}),TD=H({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(t){return Ix(t.context),Lx(AD),(n,i)=>le(n.$slots,"default")}}),PD={key:1},MD=H({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,s=zn(n,e),r=Vr(),o=se();St(()=>{o.value=new DocumentFragment});const l=se(),a=Q(()=>n.forceMount||r.open.value),c=se(a.value);return Te(a,()=>{setTimeout(()=>c.value=a.value)}),(u,f)=>{var d;return a.value||c.value||(d=l.value)!=null&&d.present?(D(),j(v(Sa),{key:0,ref_key:"presenceRef",ref:l,present:a.value},{default:V(()=>[P(ED,Xu(va({...v(s),...u.$attrs})),{default:V(()=>[le(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):o.value?(D(),ae("div",PD,[(D(),j(em,{to:o.value},[P(TD,{context:v(r)},{default:V(()=>[le(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Ee("",!0)}}}),[RU,DD]=bn("SelectGroup"),RD=H({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=pi(void 0,"reka-select-group");return DD({id:n}),(i,s)=>(D(),j(v(Fe),xe({role:"group"},e,{"aria-labelledby":v(n)}),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),ID=H({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(D(),j(v(Fe),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:V(()=>[le(e.$slots,"default",{},()=>[n[0]||(n[0]=je("▼"))])]),_:3},8,["as","as-child"]))}}),[Nx,LD]=bn("SelectItem"),ND=H({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,i=e,{disabled:s}=yn(n),r=Vr(),o=Br(),{forwardRef:l,currentElement:a}=Xe(),{CollectionItem:c}=ir(),u=Q(()=>{var w;return yu((w=r.modelValue)==null?void 0:w.value,n.value,r.by)}),f=se(!1),d=se(n.textValue??""),h=pi(void 0,"reka-select-item-text"),p="select.select";async function m(w){if(w.defaultPrevented)return;const S={originalEvent:w,value:n.value};Tm(p,y,S)}async function y(w){await Nt(),i("select",w),!w.defaultPrevented&&(s.value||(r.onValueChange(n.value),r.multiple.value||r.onOpenChange(!1)))}async function g(w){var S,k;await Nt(),!w.defaultPrevented&&(s.value?(S=o.onItemLeave)==null||S.call(o):(k=w.currentTarget)==null||k.focus({preventScroll:!0}))}async function x(w){var S;await Nt(),!w.defaultPrevented&&w.currentTarget===pn()&&((S=o.onItemLeave)==null||S.call(o))}async function b(w){var k;await Nt(),!(w.defaultPrevented||((k=o.searchRef)==null?void 0:k.value)!==""&&w.key===" ")&&(vD.includes(w.key)&&m(w),w.key===" "&&w.preventDefault())}if(n.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return St(()=>{a.value&&o.itemRefCallback(a.value,n.value,n.disabled)}),LD({value:n.value,disabled:s,textId:h,isSelected:u,onItemTextChange:w=>{d.value=((d.value||(w==null?void 0:w.textContent))??"").trim()}}),(w,S)=>(D(),j(v(c),{value:{textValue:d.value}},{default:V(()=>[P(v(Fe),{ref:v(l),role:"option","aria-labelledby":v(h),"data-highlighted":f.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":v(s)||void 0,"data-disabled":v(s)?"":void 0,tabindex:v(s)?void 0:-1,as:w.as,"as-child":w.asChild,onFocus:S[0]||(S[0]=k=>f.value=!0),onBlur:S[1]||(S[1]=k=>f.value=!1),onPointerup:m,onPointerdown:S[2]||(S[2]=k=>{k.currentTarget.focus({preventScroll:!0})}),onTouchend:S[3]||(S[3]=st(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:x,onKeydown:b},{default:V(()=>[le(w.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),$D=H({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=Nx();return(i,s)=>v(n).isSelected.value?(D(),j(v(Fe),xe({key:0,"aria-hidden":"true"},e),{default:V(()=>[le(i.$slots,"default")]),_:3},16)):Ee("",!0)}}),VD=H({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=Vr(),i=Br(),s=Nx(),{forwardRef:r,currentElement:o}=Xe(),l=Q(()=>{var a,c;return{value:s.value,disabled:s.disabled.value,textContent:((a=o.value)==null?void 0:a.textContent)??((c=s.value)==null?void 0:c.toString())??""}});return St(()=>{o.value&&(s.onItemTextChange(o.value),i.itemTextRefCallback(o.value,s.value,s.disabled.value),n.onOptionAdd(l.value))}),Fi(()=>{n.onOptionRemove(l.value)}),(a,c)=>(D(),j(v(Fe),xe({id:v(s).textId,ref:v(r)},{...e,...a.$attrs}),{default:V(()=>[le(a.$slots,"default")]),_:3},16,["id"]))}}),BD=H({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,i)=>(D(),j(v(Cx),Xu(va(e)),{default:V(()=>[le(n.$slots,"default")]),_:3},16))}}),$x=H({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{getItems:i}=ir(),s=Br(),r=se(null);function o(){r.value!==null&&(window.clearInterval(r.value),r.value=null)}Mt(()=>{const c=i().map(u=>u.ref).find(u=>u===pn());c==null||c.scrollIntoView({block:"nearest"})});function l(){r.value===null&&(r.value=window.setInterval(()=>{n("autoScroll")},50))}function a(){var c;(c=s.onItemLeave)==null||c.call(s),r.value===null&&(r.value=window.setInterval(()=>{n("autoScroll")},50))}return Nr(()=>o()),(c,u)=>{var f;return D(),j(v(Fe),xe({"aria-hidden":"true",style:{flexShrink:0}},(f=c.$parent)==null?void 0:f.$props,{onPointerdown:l,onPointermove:a,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:V(()=>[le(c.$slots,"default")]),_:3},16)}}}),FD=H({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=Br(),n=e.position==="item-aligned"?Mm():void 0,{forwardRef:i,currentElement:s}=Xe(),r=se(!1);return Mt(o=>{var l,a;if((l=e.viewport)!=null&&l.value&&((a=e.isPositioned)!=null&&a.value)){let c=function(){const f=u.scrollHeight-u.clientHeight;r.value=Math.ceil(u.scrollTop)u.removeEventListener("scroll",c))}}),Te(s,()=>{s.value&&(n==null||n.onScrollButtonChange(s.value))}),(o,l)=>r.value?(D(),j($x,{key:0,ref:v(i),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:a,selectedItem:c}=v(e);a!=null&&a.value&&(c!=null&&c.value)&&(a.value.scrollTop=a.value.scrollTop+c.value.offsetHeight)})},{default:V(()=>[le(o.$slots,"default")]),_:3},512)):Ee("",!0)}}),WD=H({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=Br(),n=e.position==="item-aligned"?Mm():void 0,{forwardRef:i,currentElement:s}=Xe(),r=se(!1);return Mt(o=>{var l,a;if((l=e.viewport)!=null&&l.value&&((a=e.isPositioned)!=null&&a.value)){let c=function(){r.value=u.scrollTop>0};const u=e.viewport.value;c(),u.addEventListener("scroll",c),o(()=>u.removeEventListener("scroll",c))}}),Te(s,()=>{s.value&&(n==null||n.onScrollButtonChange(s.value))}),(o,l)=>r.value?(D(),j($x,{key:0,ref:v(i),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:a,selectedItem:c}=v(e);a!=null&&a.value&&(c!=null&&c.value)&&(a.value.scrollTop=a.value.scrollTop-c.value.offsetHeight)})},{default:V(()=>[le(o.$slots,"default")]),_:3},512)):Ee("",!0)}}),zD=H({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Vr(),{forwardRef:i,currentElement:s}=Xe(),r=Q(()=>{var d;return((d=n.disabled)==null?void 0:d.value)||e.disabled});n.contentId||(n.contentId=pi(void 0,"reka-select-content")),St(()=>{n.onTriggerChange(s.value)});const{getItems:o}=ir(),{search:l,handleTypeaheadSearch:a,resetTypeahead:c}=Dx();function u(){r.value||(n.onOpenChange(!0),c())}function f(d){u(),n.triggerPointerDownPosRef.value={x:Math.round(d.pageX),y:Math.round(d.pageY)}}return(d,h)=>(D(),j(v(rD),{"as-child":"",reference:d.reference},{default:V(()=>{var p,m,y,g;return[P(v(Fe),{ref:v(i),role:"combobox",type:d.as==="button"?"button":void 0,"aria-controls":v(n).contentId,"aria-expanded":v(n).open.value||!1,"aria-required":(p=v(n).required)==null?void 0:p.value,"aria-autocomplete":"none",disabled:r.value,dir:(m=v(n))==null?void 0:m.dir.value,"data-state":(y=v(n))!=null&&y.open.value?"open":"closed","data-disabled":r.value?"":void 0,"data-placeholder":v(wD)((g=v(n).modelValue)==null?void 0:g.value)?"":void 0,"as-child":d.asChild,as:d.as,onClick:h[0]||(h[0]=x=>{var b;(b=x==null?void 0:x.currentTarget)==null||b.focus()}),onPointerdown:h[1]||(h[1]=x=>{if(x.pointerType==="touch")return x.preventDefault();const b=x.target;b.hasPointerCapture(x.pointerId)&&b.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(f(x),x.preventDefault())}),onPointerup:h[2]||(h[2]=st(x=>{x.pointerType==="touch"&&f(x)},["prevent"])),onKeydown:h[3]||(h[3]=x=>{const b=v(l)!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&b&&x.key===" "||(v(a)(x.key,v(o)()),v(bD).includes(x.key)&&(u(),x.preventDefault()))})},{default:V(()=>[le(d.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),HD=H({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Xe(),s=Vr();St(()=>{s.valueElement=i});const r=Q(()=>{var u;let l=[];const a=Array.from(s.optionsSet.value),c=f=>a.find(d=>yu(f,d.value,s.by));return Array.isArray(s.modelValue.value)?l=s.modelValue.value.map(f=>{var d;return((d=c(f))==null?void 0:d.textContent)??""}):l=[((u=c(s.modelValue.value))==null?void 0:u.textContent)??""],l.filter(Boolean)}),o=Q(()=>r.value.length?r.value.join(", "):e.placeholder);return(l,a)=>(D(),j(v(Fe),{ref:v(n),as:l.as,"as-child":l.asChild,style:{pointerEvents:"none"},"data-placeholder":r.value.length?void 0:e.placeholder},{default:V(()=>[le(l.$slots,"default",{selectedLabel:r.value,modelValue:v(s).modelValue.value},()=>[je(oe(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),UD=H({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{nonce:n}=yn(e),i=mD(n),s=Br(),r=s.position==="item-aligned"?Mm():void 0,{forwardRef:o,currentElement:l}=Xe();St(()=>{s==null||s.onViewportChange(l.value)});const a=se(0);function c(u){const f=u.currentTarget,{shouldExpandOnScrollRef:d,contentWrapper:h}=r??{};if(d!=null&&d.value&&(h!=null&&h.value)){const p=Math.abs(a.value-f.scrollTop);if(p>0){const m=window.innerHeight-si*2,y=Number.parseFloat(h.value.style.minHeight),g=Number.parseFloat(h.value.style.height),x=Math.max(y,g);if(x0?S:0,h.value.style.justifyContent="flex-end")}}}a.value=f.scrollTop}return(u,f)=>(D(),ae(Me,null,[P(v(Fe),xe({ref:v(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:V(()=>[le(u.$slots,"default")]),_:3},16),P(v(Fe),{as:"style",nonce:v(i)},{default:V(()=>f[0]||(f[0]=[je(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1},8,["nonce"])],64))}});function Le(t,e="Assertion failed!"){if(!t)throw console.error(e),new Error(e)}const ka=typeof document<"u";function Vx(t,e=document){var i;if(!ka)return null;if(e instanceof HTMLElement&&((i=e==null?void 0:e.dataset)==null?void 0:i.panelGroupId)===t)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return n||null}function Of(t,e=document){if(!ka)return null;const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function Bx(t,e,n=document){return ka?Hl(t,n).findIndex(r=>r.getAttribute("data-panel-resize-handle-id")===e)??null:null}function Hl(t,e=document){return ka?Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`)):[]}function jD(t,e,n,i=document){var c,u;const s=Of(e,i),r=Hl(t,i),o=s?r.indexOf(s):-1,l=((c=n[o])==null?void 0:c.id)??null,a=((u=n[o+1])==null?void 0:u.id)??null;return[l,a]}function Fx(t){return t.type==="keydown"}function Wx(t){return t.type.startsWith("mouse")}function zx(t){return t.type.startsWith("touch")}function Cf(t){if(Wx(t))return{x:t.clientX,y:t.clientY};if(zx(t)){const e=t.touches[0];if(e&&e.clientX&&e.clientY)return{x:e.clientX,y:e.clientY}}return{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY}}function Hx(t,e){const n=t==="horizontal",{x:i,y:s}=Cf(e);return n?i:s}function qD(t,e,n,i,s){const r=n==="horizontal",o=Of(e,s);Le(o);const l=o.getAttribute("data-panel-group-id");Le(l);const{initialCursorPosition:a}=i,c=Hx(n,t),u=Vx(l,s);Le(u);const f=u.getBoundingClientRect(),d=r?f.width:f.height;return(c-a)/d*100}function KD(t,e,n,i,s,r){if(Fx(t)){const o=n==="horizontal";let l=0;t.shiftKey?l=100:l=s??10;let a=0;switch(t.key){case"ArrowDown":a=o?0:l;break;case"ArrowLeft":a=o?-l:0;break;case"ArrowRight":a=o?l:0;break;case"ArrowUp":a=o?0:-l;break;case"End":a=100;break;case"Home":a=-100;break}return a}else return i==null?0:qD(t,e,n,i,r)}function GD({layout:t,panelsArray:e,pivotIndices:n}){let i=0,s=100,r=0,o=0;const l=n[0];Le(l!=null),e.forEach((f,d)=>{const{constraints:h}=f,{maxSize:p=100,minSize:m=0}=h;d===l?(i=m,s=p):(r+=m,o+=p)});const a=Math.min(s,100-r),c=Math.max(i,100-o),u=t[l];return{valueMax:a,valueMin:c,valueNow:u}}function YD({panelDataArray:t}){const e=Array.from({length:t.length}),n=t.map(r=>r.constraints);let i=0,s=100;for(let r=0;r{const r=t[s];Le(r);const{callbacks:o,constraints:l,id:a}=r,{collapsedSize:c=0,collapsible:u}=l,f=n[a];if(f==null||i!==f){n[a]=i;const{onCollapse:d,onExpand:h,onResize:p}=o;p&&p(i,f),u&&(d||h)&&(h&&(f==null||f===c)&&i!==c&&h(),d&&(f==null||f!==c)&&i===c&&d())}})}function XD(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}const Dm=10;function Ul(t,e,n=Dm){t=Number.parseFloat(t.toFixed(n)),e=Number.parseFloat(e.toFixed(n));const i=t-e;return i===0?0:i>0?1:-1}function In(t,e,n){return Ul(t,e,n)===0}function to({panelConstraints:t,panelIndex:e,size:n}){const i=t[e];Le(i!=null);const{collapsedSize:s=0,collapsible:r,maxSize:o=100,minSize:l=0}=i;if(Ul(n,l)<0)if(r){const a=(s+l)/2;Ul(n,a)<0?n=s:n=l}else n=l;return n=Math.min(o,n),n=Number.parseFloat(n.toFixed(Dm)),n}function Ya(t,e){if(t.length!==e.length)return!1;for(let n=0;n0&&(t=t<0?0-y:y)}}}{const u=t<0?o:l,f=n[u];Le(f);const{collapsible:d}=f;if(d){const h=e[u];Le(h!=null);const p=n[u];Le(p);const{collapsedSize:m=0,minSize:y=0}=p;if(In(h,y)){const g=h-m;Ul(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const u=t<0?1:-1;let f=t<0?l:o,d=0;for(;;){const p=e[f];Le(p!=null);const y=to({panelConstraints:n,panelIndex:f,size:100})-p;if(d+=y,f+=u,f<0||f>=n.length)break}const h=Math.min(Math.abs(t),Math.abs(d));t=t<0?0-h:h}{let f=t<0?o:l;for(;f>=0&&f=0))break;t<0?f--:f++}}if(In(a,0))return e;{const u=t<0?l:o,f=e[u];Le(f!=null);const d=f+a,h=to({panelConstraints:n,panelIndex:u,size:d});if(r[u]=h,!In(h,d)){let p=d-h,y=t<0?l:o;for(;y>=0&&y0?y--:y++}}}const c=r.reduce((u,f)=>f+u,0);return In(c,100)?r:e}function Ux(t,e,n){const i=Bx(t,e,n);return i!=null?[i,i+1]:[-1,-1]}function JD(t,e,n){return t.xe.x&&t.ye.y}function QD(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:X0(t),b:X0(e)};let i;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),i=t;Le(i);const s={a:Y0(G0(n.a)),b:Y0(G0(n.b))};if(s.a===s.b){const r=i.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let l=r.length;for(;l--;){const a=r[l];if(a===o.a)return 1;if(a===o.b)return-1}}return Math.sign(s.a-s.b)}const ZD=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function eR(t){const e=getComputedStyle(jx(t)).display;return e==="flex"||e==="inline-flex"}function tR(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||eR(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||ZD.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function G0(t){let e=t.length;for(;e--;){const n=t[e];if(Le(n),tR(n))return n}return null}function Y0(t){return t&&Number(getComputedStyle(t).zIndex)||0}function X0(t){const e=[];for(;t;)e.push(t),t=jx(t);return e}function jx(t){var e;return t.parentNode instanceof DocumentFragment&&((e=t.parentNode)==null?void 0:e.host)||t.parentNode}let Mh=null,gr=null;function nR(t,e){if(e){const n=(e&Kx)!==0,i=(e&Gx)!==0,s=(e&Yx)!==0,r=(e&Xx)!==0;if(n)return s?"se-resize":r?"ne-resize":"e-resize";if(i)return s?"sw-resize":r?"nw-resize":"w-resize";if(s)return"s-resize";if(r)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function qx(){gr!==null&&(document.head.removeChild(gr),Mh=null,gr=null)}function gd(t,e){const n=nR(t,e);Mh!==n&&(Mh=n,gr===null&&(gr=document.createElement("style"),document.head.appendChild(gr)),gr.innerHTML=`*{cursor: ${n}!important;}`)}function iR({defaultSize:t,dragState:e,layout:n,panelData:i,panelIndex:s,precision:r=3}){const o=n[s];let l;return o==null?l=t!==void 0?t.toPrecision(r):"1":i.length===1?l="1":l=o.toPrecision(r),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}const Kx=1,Gx=2,Yx=4,Xx=8;function sR(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const rR=sR()==="coarse",Xs=[];let _f=!1;const $s=new Map,Af=new Map,jl=new Set;function oR(t,e,n,i,s){const{ownerDocument:r}=e,o={direction:n,element:e,hitAreaMargins:i,setResizeHandlerState:s},l=$s.get(r)??0;return $s.set(r,l+1),jl.add(o),bu(),function(){Af.delete(t),jl.delete(o);const c=$s.get(r)??1;$s.set(r,c-1),bu(),qx(),c===1&&$s.delete(r)}}function Xa(t){const{target:e}=t,{x:n,y:i}=Cf(t);_f=!0,Rm({target:e,x:n,y:i}),bu(),Xs.length>0&&(Im("down",t),t.preventDefault())}function Os(t){const{x:e,y:n}=Cf(t);if(!_f){const{target:i}=t;Rm({target:i,x:e,y:n})}Im("move",t),Jx(),Xs.length>0&&t.preventDefault()}function Cs(t){const{target:e}=t,{x:n,y:i}=Cf(t);Af.clear(),_f=!1,Xs.length>0&&t.preventDefault(),Im("up",t),Rm({target:e,x:n,y:i}),Jx(),bu()}function Rm({target:t,x:e,y:n}){Xs.splice(0);let i=null;t instanceof HTMLElement&&(i=t),jl.forEach(s=>{const{element:r,hitAreaMargins:o}=s,l=r.getBoundingClientRect(),{bottom:a,left:c,right:u,top:f}=l,d=rR?o.coarse:o.fine;if(e>=c-d&&e<=u+d&&n>=f-d&&n<=a+d){if(i!==null&&r!==i&&!r.contains(i)&&!i.contains(r)&&QD(i,r)>0){let p=i,m=!1;for(;p&&!p.contains(r);){if(JD(p.getBoundingClientRect(),l)){m=!0;break}p=p.parentElement}if(m)return}Xs.push(s)}})}function yd(t,e){Af.set(t,e)}function Jx(){let t=!1,e=!1;Xs.forEach(i=>{const{direction:s}=i;s.value==="horizontal"?t=!0:e=!0});let n=0;Af.forEach(i=>{n|=i}),t&&e?gd("intersection",n):t?gd("horizontal",n):e?gd("vertical",n):qx()}function bu(){$s.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Cs),n.removeEventListener("mousedown",Xa),n.removeEventListener("mouseleave",Os),n.removeEventListener("mousemove",Os),n.removeEventListener("touchmove",Os),n.removeEventListener("touchstart",Xa)}),window.removeEventListener("mouseup",Cs),window.removeEventListener("touchcancel",Cs),window.removeEventListener("touchend",Cs),jl.size>0&&(_f?(Xs.length>0&&$s.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Cs),n.addEventListener("mouseleave",Os),n.addEventListener("mousemove",Os),n.addEventListener("touchmove",Os,{passive:!1}))}),window.addEventListener("mouseup",Cs),window.addEventListener("touchcancel",Cs),window.addEventListener("touchend",Cs)):$s.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("mousedown",Xa),n.addEventListener("mousemove",Os),n.addEventListener("touchmove",Os,{passive:!1}),n.addEventListener("touchstart",Xa))}))}function Im(t,e){jl.forEach(n=>{const{setResizeHandlerState:i}=n,s=Xs.includes(n);i(t,s,e)})}function lR({layout:t,panelConstraints:e}){const n=[...t],i=n.reduce((r,o)=>r+o,0);if(n.length!==e.length)throw new Error(`Invalid ${e.length} panel layout: ${n.map(r=>`${r}%`).join(", ")}`);if(!In(i,100)){console.warn(`WARNING: Invalid layout total size: ${n.map(r=>`${r}%`).join(", ")}. Layout normalization will be applied.`);for(let r=0;r{const l=s.value;if(!l)return;const a=Hl(e,l);for(let c=0;c{a.forEach(c=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})})}),Mt(o=>{const l=s.value;if(!l)return;const a=t.value;Le(a);const{panelDataArray:c}=a,u=Vx(e,l);Le(u!=null,`No group found for id "${e}"`);const f=Hl(e,l);Le(f);const d=f.map(h=>{const p=h.getAttribute("data-panel-resize-handle-id");Le(p);const[m,y]=jD(e,p,c,l);if(m==null||y==null)return()=>{};const g=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const b=c.findIndex(w=>w.id===m);if(b>=0){const w=c[b];Le(w);const S=n.value[b],{collapsedSize:k=0,collapsible:O,minSize:_=0}=w.constraints;if(S!=null&&O){const E=ul({delta:In(S,k)?_-k:k-S,layout:n.value,panelConstraints:c.map(I=>I.constraints),pivotIndices:Ux(e,p,l),trigger:"keyboard"});n.value!==E&&r(E)}}break}}};return h.addEventListener("keydown",g),()=>{h.removeEventListener("keydown",g)}});o(()=>{d.forEach(h=>h())})})}function J0(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new TypeError("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Qx(t){return`reka:${t}`}function Zx(t){return t.map(e=>{const{constraints:n,id:i,idIsFromProps:s,order:r}=e;return s?i:r?`${r}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function eS(t,e){try{const n=Qx(t),i=e.getItem(n);if(i){const s=JSON.parse(i);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function cR(t,e,n){const i=eS(t,n)??{},s=Zx(e);return i[s]??null}function uR(t,e,n,i,s){const r=Qx(t),o=Zx(e),l=eS(t,s)??{};l[o]={expandToSizes:Object.fromEntries(n.entries()),layout:i};try{s.setItem(r,JSON.stringify(l))}catch(a){console.error(a)}}const fR=100,fl={getItem:t=>(J0(fl),fl.getItem(t)),setItem:(t,e)=>{J0(fl),fl.setItem(t,e)}},[tS,dR]=bn("PanelGroup"),hR=H({__name:"SplitterGroup",props:{id:{},autoSaveId:{default:null},direction:{},keyboardResizeBy:{default:10},storage:{default:()=>fl},asChild:{type:Boolean},as:{}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,s={},{direction:r}=yn(n),o=pi(n.id,"reka-splitter-group"),l=Sf(),{forwardRef:a,currentElement:c}=Xe(),u=se(null),f=se([]),d=se({}),h=se(new Map),p=se(0),m=Q(()=>({autoSaveId:n.autoSaveId,direction:n.direction,dragState:u.value,id:o,keyboardResizeBy:n.keyboardResizeBy,storage:n.storage})),y=se({layout:f.value,panelDataArray:[],panelDataArrayChanged:!1}),g=B=>f.value=B;aR({eagerValuesRef:y,groupId:o,layout:f,panelDataArray:y.value.panelDataArray,setLayout:g,panelGroupElement:c}),Mt(()=>{const{panelDataArray:B}=y.value,{autoSaveId:N}=n;if(N){if(f.value.length===0||f.value.length!==B.length)return;let K=s[N];K||(K=XD(uR,fR),s[N]=K);const ue=[...B],Se=new Map(h.value);K(N,ue,Se,f.value,n.storage)}});function x(B,N){const{panelDataArray:K}=y.value,ue=re(K,B);return iR({defaultSize:N,dragState:u.value,layout:f.value,panelData:K,panelIndex:ue})}function b(B){const{panelDataArray:N}=y.value;N.push(B),N.sort((K,ue)=>{const Se=K.order,fe=ue.order;return Se==null&&fe==null?0:Se==null?-1:fe==null?1:Se-fe}),y.value.panelDataArrayChanged=!0}Te(()=>y.value.panelDataArrayChanged,()=>{if(y.value.panelDataArrayChanged){y.value.panelDataArrayChanged=!1;const{autoSaveId:B,storage:N}=m.value,{layout:K,panelDataArray:ue}=y.value;let Se=null;if(B){const Oe=cR(B,ue,N);Oe&&(h.value=new Map(Object.entries(Oe.expandToSizes)),Se=Oe.layout)}Se===null&&(Se=YD({panelDataArray:ue}));const fe=lR({layout:Se,panelConstraints:ue.map(Oe=>Oe.constraints)});pD(K,fe)||(g(fe),y.value.layout=fe,i("layout",fe),Zo(ue,fe,d.value))}});function w(B){return function(K){K.preventDefault();const ue=c.value;if(!ue)return()=>null;const{direction:Se,dragState:fe,id:Oe,keyboardResizeBy:Pe}=m.value,{layout:Ke,panelDataArray:Re}=y.value,{initialLayout:Ae}=fe??{},nt=Ux(Oe,B,ue);let ze=KD(K,B,Se,fe,Pe,ue);if(ze===0)return;const ft=Se==="horizontal";l.value==="rtl"&&ft&&(ze=-ze);const qt=Re.map(R=>R.constraints),vt=ul({delta:ze,layout:Ae??Ke,panelConstraints:qt,pivotIndices:nt,trigger:Fx(K)?"keyboard":"mouse-or-touch"}),T=!Ya(Ke,vt);(Wx(K)||zx(K))&&p.value!==ze&&(p.value=ze,T?yd(B,0):ft?yd(B,ze<0?Kx:Gx):yd(B,ze<0?Yx:Xx)),T&&(g(vt),y.value.layout=vt,i("layout",vt),Zo(Re,vt,d.value))}}function S(B,N){const{layout:K,panelDataArray:ue}=y.value,Se=ue.map(Ae=>Ae.constraints),{panelSize:fe,pivotIndices:Oe}=q(ue,B,K);Le(fe!=null);const Ke=re(ue,B)===ue.length-1?fe-N:N-fe,Re=ul({delta:Ke,layout:K,panelConstraints:Se,pivotIndices:Oe,trigger:"imperative-api"});Ya(K,Re)||(g(Re),y.value.layout=Re,i("layout",Re),Zo(ue,Re,d.value))}function k(B,N){const{layout:K,panelDataArray:ue}=y.value,Se=re(ue,B);ue[Se]=B,y.value.panelDataArrayChanged=!0;const{collapsedSize:fe=0,collapsible:Oe}=N,{collapsedSize:Pe=0,collapsible:Ke,maxSize:Re=100,minSize:Ae=0}=B.constraints,{panelSize:nt}=q(ue,B,K);nt!==null&&(Oe&&Ke&&nt===fe?fe!==Pe&&S(B,Pe):ntRe&&S(B,Re))}function O(B,N){const{direction:K}=m.value,{layout:ue}=y.value;if(!c.value)return;const Se=Of(B,c.value);Le(Se);const fe=Hx(K,N);u.value={dragHandleId:B,dragHandleRect:Se.getBoundingClientRect(),initialCursorPosition:fe,initialLayout:ue}}function _(){u.value=null}function E(B){const{panelDataArray:N}=y.value,K=re(N,B);K>=0&&(N.splice(K,1),delete d.value[B.id],y.value.panelDataArrayChanged=!0)}function I(B){const{layout:N,panelDataArray:K}=y.value;if(B.constraints.collapsible){const ue=K.map(Pe=>Pe.constraints),{collapsedSize:Se=0,panelSize:fe,pivotIndices:Oe}=q(K,B,N);if(Le(fe!=null,`Panel size not found for panel "${B.id}"`),fe!==Se){h.value.set(B.id,fe);const Ke=re(K,B)===K.length-1?fe-Se:Se-fe,Re=ul({delta:Ke,layout:N,panelConstraints:ue,pivotIndices:Oe,trigger:"imperative-api"});Ya(N,Re)||(g(Re),y.value.layout=Re,i("layout",Re),Zo(K,Re,d.value))}}}function F(B){const{layout:N,panelDataArray:K}=y.value;if(B.constraints.collapsible){const ue=K.map(Ke=>Ke.constraints),{collapsedSize:Se=0,panelSize:fe,minSize:Oe=0,pivotIndices:Pe}=q(K,B,N);if(fe===Se){const Ke=h.value.get(B.id),Re=Ke!=null&&Ke>=Oe?Ke:Oe,nt=re(K,B)===K.length-1?fe-Re:Re-fe,ze=ul({delta:nt,layout:N,panelConstraints:ue,pivotIndices:Pe,trigger:"imperative-api"});Ya(N,ze)||(g(ze),y.value.layout=ze,i("layout",ze),Zo(K,ze,d.value))}}}function L(B){const{layout:N,panelDataArray:K}=y.value,{panelSize:ue}=q(K,B,N);return Le(ue!=null,`Panel size not found for panel "${B.id}"`),ue}function Y(B){const{layout:N,panelDataArray:K}=y.value,{collapsedSize:ue=0,collapsible:Se,panelSize:fe}=q(K,B,N);return Se?fe===void 0?B.constraints.defaultSize===B.constraints.collapsedSize:fe===ue:!1}function ee(B){const{layout:N,panelDataArray:K}=y.value,{collapsedSize:ue=0,collapsible:Se,panelSize:fe}=q(K,B,N);return Le(fe!=null,`Panel size not found for panel "${B.id}"`),!Se||fe>ue}dR({direction:r,dragState:u.value,groupId:o,reevaluatePanelConstraints:k,registerPanel:b,registerResizeHandle:w,resizePanel:S,startDragging:O,stopDragging:_,unregisterPanel:E,panelGroupElement:c,collapsePanel:I,expandPanel:F,isPanelCollapsed:Y,isPanelExpanded:ee,getPanelSize:L,getPanelStyle:x});function re(B,N){return B.findIndex(K=>K===N||K.id===N.id)}function q(B,N,K){const ue=re(B,N),fe=ue===B.length-1?[ue-1,ue]:[ue,ue+1],Oe=K[ue];return{...N.constraints,panelSize:Oe,pivotIndices:fe}}return(B,N)=>(D(),j(v(Fe),{ref:v(a),as:B.as,"as-child":B.asChild,style:ti({display:"flex",flexDirection:v(r)==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"}),"data-panel-group":"","data-orientation":v(r),"data-panel-group-id":v(o)},{default:V(()=>[le(B.$slots,"default",{layout:f.value})]),_:3},8,["as","as-child","style","data-orientation","data-panel-group-id"]))}}),pR=H({__name:"SplitterPanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const i=t,s=n,r=tS();if(r===null)throw new Error("SplitterPanel components must be rendered within a SplitterGroup container");const{collapsePanel:o,expandPanel:l,getPanelSize:a,getPanelStyle:c,isPanelCollapsed:u,resizePanel:f,groupId:d,reevaluatePanelConstraints:h,registerPanel:p,unregisterPanel:m}=r,y=pi(i.id,"reka-splitter-panel"),g=Q(()=>({callbacks:{onCollapse:()=>s("collapse"),onExpand:()=>s("expand"),onResize:(..._)=>s("resize",..._)},constraints:{collapsedSize:i.collapsedSize&&Number.parseFloat(i.collapsedSize.toFixed(Dm)),collapsible:i.collapsible,defaultSize:i.defaultSize,maxSize:i.maxSize,minSize:i.minSize},id:y,idIsFromProps:i.id!==void 0,order:i.order}));Te(()=>g.value.constraints,(_,E)=>{(E.collapsedSize!==_.collapsedSize||E.collapsible!==_.collapsible||E.maxSize!==_.maxSize||E.minSize!==_.minSize)&&h(g.value,E)},{deep:!0}),St(()=>{const _=g.value;p(_),Fi(()=>{m(_)})});const x=Q(()=>c(g.value,i.defaultSize)),b=Q(()=>u(g.value)),w=Q(()=>!b.value);function S(){o(g.value)}function k(){l(g.value)}function O(_){f(g.value,_)}return e({collapse:S,expand:k,getSize(){return a(g.value)},resize:O,isCollapsed:b,isExpanded:w}),(_,E)=>(D(),j(v(Fe),{id:v(y),style:ti(x.value),as:_.as,"as-child":_.asChild,"data-panel":"","data-panel-collapsible":_.collapsible||void 0,"data-panel-group-id":v(d),"data-panel-id":v(y),"data-panel-size":Number.parseFloat(`${x.value.flexGrow}`).toFixed(1),"data-state":_.collapsible?b.value?"collapsed":"expanded":void 0},{default:V(()=>[le(_.$slots,"default",{isCollapsed:b.value,isExpanded:w.value,expand:k,collapse:S,resize:O})]),_:3},8,["id","style","as","as-child","data-panel-collapsible","data-panel-group-id","data-panel-id","data-panel-size","data-state"]))}});function mR({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:i}){Mt(s=>{const r=i.value;if(t.value||n.value===null||r===null)return;const o=Of(e,r);if(o==null)return;const l=a=>{var c;if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),(c=n.value)==null||c.call(n,a);break}case"F6":{a.preventDefault();const u=o.getAttribute("data-panel-group-id");Le(u);const f=Hl(u,r),d=Bx(u,e,r);Le(d!==null);const h=a.shiftKey?d>0?d-1:f.length-1:d+1{o.removeEventListener("keydown",l)})})}const gR=H({__name:"SplitterResizeHandle",props:{id:{},hitAreaMargins:{},tabindex:{default:0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:s,currentElement:r}=Xe(),{disabled:o}=yn(n),l=tS();if(l===null)throw new Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:a,groupId:c,registerResizeHandle:u,startDragging:f,stopDragging:d,panelGroupElement:h}=l,p=pi(n.id,"reka-splitter-resize-handle"),m=se("inactive"),y=se(!1),g=se(null);return Te(o,()=>{ka&&(o.value?g.value=null:g.value=u(p))},{immediate:!0}),Mt(x=>{var S,k;if(o.value||g.value===null)return;const b=r.value;if(!b)return;Le(b);const w=(O,_,E)=>{var I;if(_)switch(O){case"down":{m.value="drag",f(p,E),i("dragging",!0);break}case"move":{m.value!=="drag"&&(m.value="hover"),(I=g.value)==null||I.call(g,E);break}case"up":{m.value="hover",d(),i("dragging",!1);break}}else m.value="inactive"};x(oR(p,b,a,{coarse:((S=n.hitAreaMargins)==null?void 0:S.coarse)??15,fine:((k=n.hitAreaMargins)==null?void 0:k.fine)??5},w))}),mR({disabled:o,resizeHandler:g,handleId:p,panelGroupElement:h}),(x,b)=>(D(),j(v(Fe),{id:v(p),ref:v(s),style:{touchAction:"none",userSelect:"none"},as:x.as,"as-child":x.asChild,role:"separator","data-resize-handle":"",tabindex:x.tabindex,"data-state":m.value,"data-disabled":v(o)?"":void 0,"data-orientation":v(a),"data-panel-group-id":v(c),"data-resize-handle-active":m.value==="drag"?"pointer":y.value?"keyboard":void 0,"data-resize-handle-state":m.value,"data-panel-resize-handle-enabled":!v(o),"data-panel-resize-handle-id":v(p),onBlur:b[0]||(b[0]=w=>y.value=!1),onFocus:b[1]||(b[1]=w=>y.value=!1)},{default:V(()=>[le(x.$slots,"default")]),_:3},8,["id","as","as-child","tabindex","data-state","data-disabled","data-orientation","data-panel-group-id","data-resize-handle-active","data-resize-handle-state","data-panel-resize-handle-enabled","data-panel-resize-handle-id"]))}}),[yR,bR]=bn("SwitchRoot"),vR=H({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{disabled:s}=yn(n),r=Er(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function o(){s.value||(r.value=!r.value)}const{forwardRef:l,currentElement:a}=Xe(),c=Pm(a),u=Q(()=>{var f;return n.id&&a.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return bR({modelValue:r,toggleCheck:o,disabled:s}),(f,d)=>(D(),j(v(Fe),xe(f.$attrs,{id:f.id,ref:v(l),role:"switch",type:f.as==="button"?"button":void 0,value:f.value,"aria-label":f.$attrs["aria-label"]||u.value,"aria-checked":v(r),"aria-required":f.required,"data-state":v(r)?"checked":"unchecked","data-disabled":v(s)?"":void 0,"as-child":f.asChild,as:f.as,disabled:v(s),onClick:o,onKeydown:pf(st(o,["prevent"]),["enter"])}),{default:V(()=>[le(f.$slots,"default",{modelValue:v(r)}),v(c)&&f.name?(D(),j(v(Ex),{key:0,type:"checkbox",name:f.name,disabled:v(s),required:f.required,value:f.value,checked:!!v(r)},null,8,["name","disabled","required","value","checked"])):Ee("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),wR=H({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=yR();return Xe(),(n,i)=>{var s;return D(),j(v(Fe),{"data-state":(s=v(e).modelValue)!=null&&s.value?"checked":"unchecked","data-disabled":v(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:V(()=>[le(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}});function nS(t,e){return`${t}-trigger-${e}`}function iS(t,e){return`${t}-content-${e}`}const[Lm,xR]=bn("TabsRoot"),SR=H({__name:"TabsRoot",props:{defaultValue:{},orientation:{default:"horizontal"},dir:{},activationMode:{default:"automatic"},modelValue:{},unmountOnHide:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{orientation:s,unmountOnHide:r,dir:o}=yn(n),l=Sf(o);Xe();const a=Er(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),c=se();return xR({modelValue:a,changeModelValue:u=>{a.value=u},orientation:s,dir:l,unmountOnHide:r,activationMode:n.activationMode,baseId:pi(void 0,"reka-tabs"),tabsList:c}),(u,f)=>(D(),j(v(Fe),{dir:v(l),"data-orientation":v(s),"as-child":u.asChild,as:u.as},{default:V(()=>[le(u.$slots,"default",{modelValue:v(a)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),kR=H({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=Xe(),i=Lm(),s=Q(()=>nS(i.baseId,e.value)),r=Q(()=>iS(i.baseId,e.value)),o=Q(()=>e.value===i.modelValue.value),l=se(o.value);return St(()=>{requestAnimationFrame(()=>{l.value=!1})}),(a,c)=>(D(),j(v(Sa),{present:a.forceMount||o.value,"force-mount":""},{default:V(({present:u})=>[P(v(Fe),{id:r.value,ref:v(n),"as-child":a.asChild,as:a.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":v(i).orientation.value,"aria-labelledby":s.value,hidden:!u,tabindex:"0",style:ti({animationDuration:l.value?"0s":void 0})},{default:V(()=>[!v(i).unmountOnHide.value||u?le(a.$slots,"default",{key:0}):Ee("",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),OR=H({__name:"TabsList",props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(t){const e=t,{loop:n}=yn(e),{forwardRef:i,currentElement:s}=Xe(),r=Lm();return r.tabsList=s,(o,l)=>(D(),j(v(JM),{"as-child":"",orientation:v(r).orientation.value,dir:v(r).dir.value,loop:v(n)},{default:V(()=>[P(v(Fe),{ref:v(i),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":v(r).orientation.value},{default:V(()=>[le(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),CR=H({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,{forwardRef:n}=Xe(),i=Lm(),s=Q(()=>nS(i.baseId,e.value)),r=Q(()=>iS(i.baseId,e.value)),o=Q(()=>e.value===i.modelValue.value);return(l,a)=>(D(),j(v(Px),{"as-child":"",focusable:!l.disabled,active:o.value},{default:V(()=>[P(v(Fe),{id:s.value,ref:v(n),role:"tab",type:l.as==="button"?"button":void 0,as:l.as,"as-child":l.asChild,"aria-selected":o.value?"true":"false","aria-controls":r.value,"data-state":o.value?"active":"inactive",disabled:l.disabled,"data-disabled":l.disabled?"":void 0,"data-orientation":v(i).orientation.value,onMousedown:a[0]||(a[0]=st(c=>{!l.disabled&&c.ctrlKey===!1?v(i).changeModelValue(l.value):c.preventDefault()},["left"])),onKeydown:a[1]||(a[1]=pf(c=>v(i).changeModelValue(l.value),["enter","space"])),onFocus:a[2]||(a[2]=()=>{const c=v(i).activationMode!=="manual";!o.value&&!l.disabled&&c&&v(i).changeModelValue(l.value)})},{default:V(()=>[le(l.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}});function sS(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const e=ER(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{const l=o.split(Nm);return l[0]===""&&l.length!==1&&l.shift(),oS(l,e)||AR(o)},getConflictingClassGroupIds:(o,l)=>{const a=n[o]||[];return l&&i[o]?[...a,...i[o]]:a}}},oS=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),s=i?oS(t.slice(1),i):void 0;if(s)return s;if(e.validators.length===0)return;const r=t.join(Nm);return(o=e.validators.find(({validator:l})=>l(r)))==null?void 0:o.classGroupId},Q0=/^\[(.+)\]$/,AR=t=>{if(Q0.test(t)){const e=Q0.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},ER=t=>{const{theme:e,classGroups:n}=t,i={nextPart:new Map,validators:[]};for(const s in n)Dh(n[s],i,s,e);return i},Dh=(t,e,n,i)=>{t.forEach(s=>{if(typeof s=="string"){const r=s===""?e:Z0(e,s);r.classGroupId=n;return}if(typeof s=="function"){if(TR(s)){Dh(s(i),e,n,i);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([r,o])=>{Dh(o,Z0(e,r),n,i)})})},Z0=(t,e)=>{let n=t;return e.split(Nm).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},TR=t=>t.isThemeGetter,PR=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const s=(r,o)=>{n.set(r,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(r){let o=n.get(r);if(o!==void 0)return o;if((o=i.get(r))!==void 0)return s(r,o),o},set(r,o){n.has(r)?n.set(r,o):s(r,o)}}},Rh="!",Ih=":",MR=Ih.length,DR=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=s=>{const r=[];let o=0,l=0,a=0,c;for(let p=0;pa?c-a:void 0;return{modifiers:r,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}};if(e){const s=e+Ih,r=i;i=o=>o.startsWith(s)?r(o.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const s=i;i=r=>n({className:r,parseClassName:s})}return i},RR=t=>t.endsWith(Rh)?t.substring(0,t.length-1):t.startsWith(Rh)?t.substring(1):t,IR=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const s=[];let r=[];return i.forEach(o=>{o[0]==="["||e[o]?(s.push(...r.sort(),o),r=[]):r.push(o)}),s.push(...r.sort()),s}},LR=t=>({cache:PR(t.cacheSize),parseClassName:DR(t),sortModifiers:IR(t),..._R(t)}),NR=/\s+/,$R=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:r}=e,o=[],l=t.trim().split(NR);let a="";for(let c=l.length-1;c>=0;c-=1){const u=l[c],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}=n(u);if(f){a=u+(a.length>0?" "+a:a);continue}let y=!!m,g=i(y?p.substring(0,m):p);if(!g){if(!y){a=u+(a.length>0?" "+a:a);continue}if(g=i(p),!g){a=u+(a.length>0?" "+a:a);continue}y=!1}const x=r(d).join(":"),b=h?x+Rh:x,w=b+g;if(o.includes(w))continue;o.push(w);const S=s(g,y);for(let k=0;k0?" "+a:a)}return a};function VR(){let t=0,e,n,i="";for(;t{if(typeof t=="string")return t;let e,n="";for(let i=0;if(u),t());return n=LR(c),i=n.cache.get,s=n.cache.set,r=l,l(a)}function l(a){const c=i(a);if(c)return c;const u=$R(a,n);return s(a,u),u}return function(){return r(VR.apply(null,arguments))}}const Dt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},aS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,FR=/^\d+\/\d+$/,WR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=t=>FR.test(t),Ie=t=>!!t&&!Number.isNaN(Number(t)),_s=t=>!!t&&Number.isInteger(Number(t)),bd=t=>t.endsWith("%")&&Ie(t.slice(0,-1)),Gi=t=>WR.test(t),qR=()=>!0,KR=t=>zR.test(t)&&!HR.test(t),uS=()=>!1,GR=t=>UR.test(t),YR=t=>jR.test(t),XR=t=>!be(t)&&!ve(t),JR=t=>zo(t,hS,uS),be=t=>aS.test(t),ur=t=>zo(t,pS,KR),vd=t=>zo(t,nI,Ie),ey=t=>zo(t,fS,uS),QR=t=>zo(t,dS,YR),Ja=t=>zo(t,mS,GR),ve=t=>cS.test(t),el=t=>Ho(t,pS),ZR=t=>Ho(t,iI),ty=t=>Ho(t,fS),eI=t=>Ho(t,hS),tI=t=>Ho(t,dS),Qa=t=>Ho(t,mS,!0),zo=(t,e,n)=>{const i=aS.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},Ho=(t,e,n=!1)=>{const i=cS.exec(t);return i?i[1]?e(i[1]):n:!1},fS=t=>t==="position"||t==="percentage",dS=t=>t==="image"||t==="url",hS=t=>t==="length"||t==="size"||t==="bg-size",pS=t=>t==="length",nI=t=>t==="number",iI=t=>t==="family-name",mS=t=>t==="shadow",sI=()=>{const t=Dt("color"),e=Dt("font"),n=Dt("text"),i=Dt("font-weight"),s=Dt("tracking"),r=Dt("leading"),o=Dt("breakpoint"),l=Dt("container"),a=Dt("spacing"),c=Dt("radius"),u=Dt("shadow"),f=Dt("inset-shadow"),d=Dt("text-shadow"),h=Dt("drop-shadow"),p=Dt("blur"),m=Dt("perspective"),y=Dt("aspect"),g=Dt("ease"),x=Dt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...w(),ve,be],k=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],_=()=>[ve,be,a],E=()=>[jr,"full","auto",..._()],I=()=>[_s,"none","subgrid",ve,be],F=()=>["auto",{span:["full",_s,ve,be]},_s,ve,be],L=()=>[_s,"auto",ve,be],Y=()=>["auto","min","max","fr",ve,be],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",..._()],B=()=>[jr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],N=()=>[t,ve,be],K=()=>[...w(),ty,ey,{position:[ve,be]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",eI,JR,{size:[ve,be]}],fe=()=>[bd,el,ur],Oe=()=>["","none","full",c,ve,be],Pe=()=>["",Ie,el,ur],Ke=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ae=()=>[Ie,bd,ty,ey],nt=()=>["","none",p,ve,be],ze=()=>["none",Ie,ve,be],ft=()=>["none",Ie,ve,be],qt=()=>[Ie,ve,be],vt=()=>[jr,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gi],breakpoint:[Gi],color:[qR],container:[Gi],"drop-shadow":[Gi],ease:["in","out","in-out"],font:[XR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gi],shadow:[Gi],spacing:["px",Ie],text:[Gi],"text-shadow":[Gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jr,be,ve,y]}],container:["container"],columns:[{columns:[Ie,be,ve,l]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{start:E()}],end:[{end:E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[_s,"auto",ve,be]}],basis:[{basis:[jr,"full","auto",l,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,jr,"auto","initial","none",be]}],grow:[{grow:["",Ie,ve,be]}],shrink:[{shrink:["",Ie,ve,be]}],order:[{order:[_s,"first","last","none",ve,be]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[l,"screen",...B()]}],"min-w":[{"min-w":[l,"screen","none",...B()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,el,ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ve,vd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bd,be]}],"font-family":[{font:[ZR,be,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ve,be]}],"line-clamp":[{"line-clamp":[Ie,"none",ve,vd]}],leading:[{leading:[r,..._()]}],"list-image":[{"list-image":["none",ve,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",ve,ur]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[Ie,"auto",ve,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_s,ve,be],radial:["",ve,be],conic:[_s,ve,be]},tI,QR]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:fe()}],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:Oe()}],"rounded-s":[{"rounded-s":Oe()}],"rounded-e":[{"rounded-e":Oe()}],"rounded-t":[{"rounded-t":Oe()}],"rounded-r":[{"rounded-r":Oe()}],"rounded-b":[{"rounded-b":Oe()}],"rounded-l":[{"rounded-l":Oe()}],"rounded-ss":[{"rounded-ss":Oe()}],"rounded-se":[{"rounded-se":Oe()}],"rounded-ee":[{"rounded-ee":Oe()}],"rounded-es":[{"rounded-es":Oe()}],"rounded-tl":[{"rounded-tl":Oe()}],"rounded-tr":[{"rounded-tr":Oe()}],"rounded-br":[{"rounded-br":Oe()}],"rounded-bl":[{"rounded-bl":Oe()}],"border-w":[{border:Pe()}],"border-w-x":[{"border-x":Pe()}],"border-w-y":[{"border-y":Pe()}],"border-w-s":[{"border-s":Pe()}],"border-w-e":[{"border-e":Pe()}],"border-w-t":[{"border-t":Pe()}],"border-w-r":[{"border-r":Pe()}],"border-w-b":[{"border-b":Pe()}],"border-w-l":[{"border-l":Pe()}],"divide-x":[{"divide-x":Pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ke(),"hidden","none"]}],"divide-style":[{divide:[...Ke(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...Ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,ve,be]}],"outline-w":[{outline:["",Ie,el,ur]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",u,Qa,Ja]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",f,Qa,Ja]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:Pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[Ie,ur]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":Pe()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",d,Qa,Ja]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[Ie,ve,be]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ae()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":Ae()}],"mask-image-t-to-pos":[{"mask-t-to":Ae()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":Ae()}],"mask-image-r-to-pos":[{"mask-r-to":Ae()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":Ae()}],"mask-image-b-to-pos":[{"mask-b-to":Ae()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":Ae()}],"mask-image-l-to-pos":[{"mask-l-to":Ae()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":Ae()}],"mask-image-x-to-pos":[{"mask-x-to":Ae()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":Ae()}],"mask-image-y-to-pos":[{"mask-y-to":Ae()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[ve,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ae()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ae()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,be]}],filter:[{filter:["","none",ve,be]}],blur:[{blur:nt()}],brightness:[{brightness:[Ie,ve,be]}],contrast:[{contrast:[Ie,ve,be]}],"drop-shadow":[{"drop-shadow":["","none",h,Qa,Ja]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",Ie,ve,be]}],"hue-rotate":[{"hue-rotate":[Ie,ve,be]}],invert:[{invert:["",Ie,ve,be]}],saturate:[{saturate:[Ie,ve,be]}],sepia:[{sepia:["",Ie,ve,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,be]}],"backdrop-blur":[{"backdrop-blur":nt()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,ve,be]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,ve,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,ve,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,ve,be]}],"backdrop-invert":[{"backdrop-invert":["",Ie,ve,be]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,ve,be]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,ve,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,ve,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",ve,be]}],ease:[{ease:["linear","initial",g,ve,be]}],delay:[{delay:[Ie,ve,be]}],animate:[{animate:["none",x,ve,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ve,be]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ze()}],"rotate-x":[{"rotate-x":ze()}],"rotate-y":[{"rotate-y":ze()}],"rotate-z":[{"rotate-z":ze()}],scale:[{scale:ft()}],"scale-x":[{"scale-x":ft()}],"scale-y":[{"scale-y":ft()}],"scale-z":[{"scale-z":ft()}],"scale-3d":["scale-3d"],skew:[{skew:qt()}],"skew-x":[{"skew-x":qt()}],"skew-y":[{"skew-y":qt()}],transform:[{transform:[ve,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:vt()}],"translate-x":[{"translate-x":vt()}],"translate-y":[{"translate-y":vt()}],"translate-z":[{"translate-z":vt()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,be]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[Ie,el,ur,vd]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},rI=BR(sI);function tt(...t){return rI(rS(t))}const oI={key:0,class:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border"},lI=H({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{},withHandle:{type:Boolean}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,s=kt(n,"class","withHandle"),r=zn(s,i);return(o,l)=>(D(),j(v(gR),xe({"data-slot":"resizable-handle"},v(r),{class:v(tt)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",n.class)}),{default:V(()=>[n.withHandle?(D(),ae("div",oI,[P(v(GT),{class:"size-2.5"})])):Ee("",!0)]),_:1},16,["class"]))}}),ny=H({__name:"ResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{type:[String,Object,Function]}},emits:["collapse","expand","resize"],setup(t,{emit:e}){const s=zn(t,e);return(r,o)=>(D(),j(v(pR),xe({"data-slot":"resizable-panel"},v(s)),{default:V(()=>[le(r.$slots,"default")]),_:3},16))}}),aI=H({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,s=kt(n,"class"),r=zn(s,i);return(o,l)=>(D(),j(v(hR),xe({"data-slot":"resizable-panel-group"},v(r),{class:v(tt)("flex h-full w-full data-[orientation=vertical]:flex-col",n.class)}),{default:V(()=>[le(o.$slots,"default")]),_:3},16,["class"]))}}),cI=H({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=kt(n,"class"),r=zn(s,i);return(o,l)=>(D(),j(v(SR),xe({"data-slot":"tabs"},v(r),{class:v(tt)("flex flex-col gap-2",n.class)}),{default:V(()=>[le(o.$slots,"default")]),_:3},16,["class"]))}}),Za=H({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class");return(i,s)=>(D(),j(v(kR),xe({"data-slot":"tabs-content",class:v(tt)("flex-1 outline-none",e.class)},v(n)),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),uI=H({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class");return(i,s)=>(D(),j(v(OR),xe({"data-slot":"tabs-list"},v(n),{class:v(tt)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-b-lg p-[3px]",e.class)}),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),ec=H({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class"),i=Hi(n);return(s,r)=>(D(),j(v(CR),xe({"data-slot":"tabs-trigger"},v(i),{class:v(tt)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[le(s.$slots,"default")]),_:3},16,["class"]))}}),Kt=[];for(let t=0;t<256;++t)Kt.push((t+256).toString(16).slice(1));function fI(t,e=0){return(Kt[t[e+0]]+Kt[t[e+1]]+Kt[t[e+2]]+Kt[t[e+3]]+"-"+Kt[t[e+4]]+Kt[t[e+5]]+"-"+Kt[t[e+6]]+Kt[t[e+7]]+"-"+Kt[t[e+8]]+Kt[t[e+9]]+"-"+Kt[t[e+10]]+Kt[t[e+11]]+Kt[t[e+12]]+Kt[t[e+13]]+Kt[t[e+14]]+Kt[t[e+15]]).toLowerCase()}let wd;const dI=new Uint8Array(16);function hI(){if(!wd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");wd=crypto.getRandomValues.bind(crypto)}return wd(dI)}const pI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iy={randomUUID:pI};function Ao(t,e,n){var s;if(iy.randomUUID&&!t)return iy.randomUUID();t=t||{};const i=t.random??((s=t.rng)==null?void 0:s.call(t))??hI();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,fI(i)}class gS{constructor(){he(this,"uuid","");he(this,"formula","");he(this,"calcValue","");he(this,"calcValue1","");he(this,"calcValue2","");he(this,"calcValue3","");he(this,"calcValue4","");he(this,"calcValue5","");he(this,"calcValue6","");he(this,"calcValue7","");he(this,"calcValue8","");he(this,"calcValue9","");he(this,"calcValue10","");he(this,"flatRate","");he(this,"value","");he(this,"dependencys",[]);this.uuid=Ao()}addDependency(e){this.dependencys.push(e)}toJSON(){return{formula:this.formula,calcValue:this.calcValue,calcValue1:this.calcValue1,calcValue2:this.calcValue2,calcValue3:this.calcValue3,calcValue4:this.calcValue4,calcValue5:this.calcValue5,calcValue6:this.calcValue6,calcValue7:this.calcValue7,calcValue8:this.calcValue8,calcValue9:this.calcValue9,calcValue10:this.calcValue10,flatRate:this.flatRate,value:this.value,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.formula=e.formula,this.value=e.value,this.flatRate=e.flatRate,this.calcValue=e.calcValue,this.calcValue1=e.calcValue1,this.calcValue2=e.calcValue2,this.calcValue3=e.calcValue3,this.calcValue4=e.calcValue4,this.calcValue5=e.calcValue5,this.calcValue6=e.calcValue6,this.calcValue7=e.calcValue7,this.calcValue8=e.calcValue8,this.calcValue9=e.calcValue9,this.calcValue10=e.calcValue10,e.dependencys.map(n=>{const i=new Uo;i.fromJSON(n),this.dependencys.push(i)})}}class Uo{constructor(){he(this,"uuid","");he(this,"relation","");he(this,"formula","");he(this,"borders",[]);this.uuid=Ao()}addBorder(e){this.borders.push(e)}toJSON(){return{formula:this.formula,relation:this.relation,borders:this.borders.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.relation=e.relation,this.formula=e.formula,e.borders.map(n=>{const i=new gS;i.fromJSON(n),this.borders.push(i)})}}class ws{constructor(){he(this,"uuid","");he(this,"id","");he(this,"type",1);he(this,"isFocused",!1);he(this,"dependencys",[]);this.uuid=Ao(),this.id=this.uuid}hasDependencys(){return this.dependencys.length>0}toJSON(){return{id:this.id,type:this.type,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.id=e.id,this.type=e.type,e.dependencys.map(n=>{const i=new Uo;i.fromJSON(n),this.dependencys.push(i)})}changeFocus(e){this.uuid==e?this.isFocused=!0:this.isFocused=!1}addDependency(e){this.dependencys.push(e)}insertItem(e,n){return!1}cutItem(e){return null}deleteItem(e){return!1}}class sy extends Error{constructor(n,i,s){const r=n.status||n.status===0?n.status:"",o=n.statusText||"",l=`${r} ${o}`.trim(),a=l?`status code ${l}`:"an unknown error";super(`Request failed with ${a}: ${i.method} ${i.url}`);he(this,"response");he(this,"request");he(this,"options");this.name="HTTPError",this.response=n,this.request=i,this.options=s}}class yS extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);he(this,"request");this.name="TimeoutError",this.request=n}}const ry=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(n&&i)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return t&&!e})(),mI=typeof globalThis.AbortController=="function",gI=typeof globalThis.ReadableStream=="function",yI=typeof globalThis.FormData=="function",bS=["get","post","put","patch","head","delete"],bI={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},xd=2147483647,vI=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,vS=Symbol("stop"),wI={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},xI={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},SI=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[n,i]of t)e+=vI,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,e+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},kI=(t,e)=>{const n=Number(t.headers.get("content-length"))||0;let i=0;return t.status===204?(e&&e({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new Response(new ReadableStream({async start(s){const r=t.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function o(){const{done:l,value:a}=await r.read();if(l){s.close();return}if(e){i+=a.byteLength;const c=n===0?0:i/n;e({percent:c,transferredBytes:i,totalBytes:n},a)}s.enqueue(a),await o()}await o()}}),{status:t.status,statusText:t.statusText,headers:t.headers})},OI=(t,e)=>{const n=SI(t.body);let i=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(s){const r=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();async function o(){const{done:l,value:a}=await r.read();if(l){e&&e({percent:1,transferredBytes:i,totalBytes:Math.max(n,i)},new Uint8Array),s.close();return}i+=a.byteLength;let c=n===0?0:i/n;(nt!==null&&typeof t=="object",tc=(...t)=>{for(const e of t)if((!dl(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return $m({},...t)},wS=(t={},e={})=>{const n=new globalThis.Headers(t),i=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[r,o]of s.entries())i&&o==="undefined"||o===void 0?n.delete(r):n.set(r,o);return n};function nc(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:$m(t[n]??[],e[n]??[])}const xS=(t={},e={})=>({beforeRequest:nc(t,e,"beforeRequest"),beforeRetry:nc(t,e,"beforeRetry"),afterResponse:nc(t,e,"afterResponse"),beforeError:nc(t,e,"beforeError")}),$m=(...t)=>{let e={},n={},i={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(dl(s)){for(let[r,o]of Object.entries(s))dl(o)&&r in e&&(o=$m(e[r],o)),e={...e,[r]:o};dl(s.hooks)&&(i=xS(i,s.hooks),e.hooks=i),dl(s.headers)&&(n=wS(n,s.headers),e.headers=n)}return e},CI=t=>bS.includes(t)?t.toUpperCase():t,_I=["get","put","head","delete","options","trace"],AI=[408,413,429,500,502,503,504],EI=[413,429,503],oy={limit:2,methods:_I,statusCodes:AI,afterStatusCodes:EI,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},TI=(t={})=>{if(typeof t=="number")return{...oy,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...oy,...t}};async function PI(t,e,n,i){return new Promise((s,r)=>{const o=setTimeout(()=>{n&&n.abort(),r(new yS(t))},i.timeout);i.fetch(t,e).then(s).catch(r).then(()=>{clearTimeout(o)})})}async function MI(t,{signal:e}){return new Promise((n,i)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",s,{once:!0}));function s(){clearTimeout(r),i(e.reason)}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",s),n()},t)})}const DI=(t,e)=>{const n={};for(const i in e)!(i in xI)&&!(i in wI)&&!(i in t)&&(n[i]=e[i]);return n};class vu{constructor(e,n={}){he(this,"request");he(this,"abortController");he(this,"_retryCount",0);he(this,"_input");he(this,"_options");var i,s;if(this._input=e,this._options={...n,headers:wS(this._input.headers,n.headers),hooks:xS({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:CI(n.method??this._input.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:TI(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(mI){const r=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=r?AbortSignal.any([r,this.abortController.signal]):this.abortController.signal}if(ry&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((s=(i=this._options).stringifyJson)==null?void 0:s.call(i,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),l=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(yI&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(l,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!ry)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=OI(this.request,this._options.onUploadProgress))}}static create(e,n){const i=new vu(e,n),s=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>xd)throw new RangeError(`The \`timeout\` option cannot be greater than ${xd}`);await Promise.resolve();let l=await i._fetch();for(const a of i._options.hooks.afterResponse){const c=await a(i.request,i._options,i._decorateResponse(l.clone()));c instanceof globalThis.Response&&(l=c)}if(i._decorateResponse(l),!l.ok&&i._options.throwHttpErrors){let a=new sy(l,i.request,i._options);for(const c of i._options.hooks.beforeError)a=await c(a);throw a}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!gI)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return kI(l.clone(),i._options.onDownloadProgress)}return l},o=(i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(s):s()).finally(async()=>{var l;i.request.bodyUsed||await((l=i.request.body)==null?void 0:l.cancel())});for(const[l,a]of Object.entries(bI))o[l]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||a);const c=await o;if(l==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await c.text())}return c[l]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof yS)throw e;if(e instanceof sy){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const i=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(e.response.status)){let s=Number(i)*1e3;Number.isNaN(s)?s=Date.parse(i)-Date.now():s>=Date.parse("2024-01-01")&&(s-=Date.now());const r=this._options.retry.maxRetryAfter??s;return sthis._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(n){const i=Math.min(this._calculateRetryDelay(n),xd);if(this._retryCount<1)throw n;await MI(i,{signal:this._options.signal});for(const s of this._options.hooks.beforeRetry)if(await s({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===vS)return;return this._retry(e)}}async _fetch(){for(const i of this._options.hooks.beforeRequest){const s=await i(this.request,this._options);if(s instanceof Request){this.request=s;break}if(s instanceof Response)return s}const e=DI(this.request,this._options),n=this.request;return this.request=n.clone(),this._options.timeout===!1?this._options.fetch(n,e):PI(n,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const Lh=t=>{const e=(n,i)=>vu.create(n,tc(t,i));for(const n of bS)e[n]=(i,s)=>vu.create(i,tc(t,s,{method:n}));return e.create=n=>Lh(tc(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),Lh(tc(t,n))),e.stop=vS,e},RI=Lh(),Vm=RI.create({prefixUrl:"/apps",headers:{"Content-Type":"application/json"},timeout:1e4,hooks:{beforeRequest:[t=>{const e=localStorage.getItem("token");e&&t.headers.set("Authorization",`Bearer ${e}`)}]}}),II=async t=>{try{return await(await Vm.post("api/plugin/system/psc/xmlcalc/product/config",{json:{product:t}})).json()}catch(e){throw console.error("Error loading JSON from API:",e),e}},LI=async t=>{try{return await(await Vm.post("api/plugin/system/psc/xmlcalc/price",{json:{product:t}})).json()}catch(e){throw console.error("Error loading price from API:",e),e}},NI=async(t,e)=>{try{return await(await Vm.post("api/plugin/system/psc/xmlcalc/product/design",{json:{product:t,jsonProduct:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},ni=Yw("global",{state:()=>({activeItem:{},formulaData:[],formulaError:"",productUuid:"",isFormulaLoading:!1,showProperties:!1,showDependency:!1,showOptions:!1,showPreview:!1,sourceDragUuid:"",dragMode:"",json:"",xml:""}),getters:{getActiveItem:t=>t.activeItem,isShowPropierties:t=>t.showProperties,isShowDependency:t=>t.showDependency,isShowOptions:t=>t.showOptions,isShowPreview:t=>t.showPreview,getSourceDragUuid:t=>t.sourceDragUuid,getDragMode:t=>t.dragMode,getFormulaData:t=>t.formulaData,getFormulaError:t=>t.formulaError},actions:{setShowDependency(t){this.showDependency=t},setShowOptions(t){this.showOptions=t},setShowProperties(t){this.showProperties=t},setProductUuid(t){this.productUuid=t},setShowPreview(t){this.showPreview=t},setActiveItem(t){this.activeItem=t},setSourceDragUuid(t){this.sourceDragUuid=t},setDragMode(t){this.dragMode=t},async loadConfigFromProductApi(t){const e=await II(t);return this.json=e.json,this.xml=e.xml,e.json},async loadFormulaAnalyserDataFromApi(t){if(!(this.formulaData&&this.formulaData.length>0)){this.isFormulaLoading=!0,this.formulaError="";try{const e=await LI(t);if(e&&e.debug&&e.debug.graphJson)this.formulaData=JSON.parse(e.debug.graphJson);else throw new Error("Invalid or empty response format from API.")}catch(e){this.formulaError=`Failed to load formula data: ${e.message}`,console.error(e)}finally{this.isFormulaLoading=!1}}},setXML(t){this.xml=t},setJSON(t){this.json=t},saveDesign(t){NI(this.productUuid,t).then(e=>{this.setXML(e.xml),this.setJSON(e.json),this.formulaData=JSON.parse(e.jsonGraph)})}}}),$I=H({__name:"Switch",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean},id:{},value:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=kt(n,"class"),r=zn(s,i);return(o,l)=>(D(),j(v(vR),xe({"data-slot":"switch"},v(r),{class:v(tt)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[P(v(wR),{"data-slot":"switch-thumb",class:Ct(v(tt)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:V(()=>[le(o.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),SS=H({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class");return(i,s)=>(D(),j(v(yD),xe({"data-slot":"label"},v(n),{class:v(tt)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class)}),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}});/*! +`))}return()=>s.value||i.value||o.value?Vn(e.default({present:o.value})[0],{ref:u=>{const O=Ni(u);return typeof(O==null?void 0:O.hasAttribute)>"u"||(O!=null&&O.hasAttribute("data-reka-popper-content-wrapper")?r.value=O.firstElementChild:r.value=O),O}}):null}}),[Fi,MV]=vn("DialogRoot"),Uv=W({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,s=Ir(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),r=te(),o=te(),{modal:a}=bn(n);return MV({open:s,modal:a,openModal:()=>{s.value=!0},onOpenChange:l=>{s.value=l},onOpenToggle:()=>{s.value=!s.value},contentId:"",titleId:"",descriptionId:"",triggerElement:r,contentElement:o}),(l,c)=>le(l.$slots,"default",{open:$(s),close:()=>s.value=!1})}}),Sm=W({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;Je();const n=Fi();return(i,s)=>(C(),j($(Ue),be(e,{type:i.as==="button"?"button":void 0,onClick:s[0]||(s[0]=r=>$(n).onOpenChange(!1))}),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["type"]))}});function nf(t){const e=Qt(),n=e==null?void 0:e.type.emits,i={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(s=>{i[xo(Wt(s))]=(...r)=>t(s,...r)}),i}function $n(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function qV(t){return t?"open":"closed"}function U$(t){const e=$n();for(const n of t)if(n===e||(n.focus(),$n()!==e))return}const IV=QV(()=>te([]));function UV(){const t=IV();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=W$(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=W$(t.value,e),(n=t.value[0])==null||n.resume()}}}function W$(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function WV(t){return t.filter(e=>e.tagName!=="A")}const Wf="focusScope.autoFocusOnMount",Df="focusScope.autoFocusOnUnmount",D$={bubbles:!1,cancelable:!0};function DV(t,{select:e=!1}={}){const n=$n();for(const i of t)if(Is(i,{select:e}),$n()!==n)return!0}function LV(t){const e=Wv(t),n=L$(e,t),i=L$(e.reverse(),t);return[n,i]}function Wv(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function L$(t,e){for(const n of t)if(!NV(n,{upTo:e}))return n}function NV(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function jV(t){return t instanceof HTMLInputElement&&"select"in t}function Is(t,{select:e=!1}={}){if(t&&t.focus){const n=$n();t.focus({preventScroll:!0}),t!==n&&jV(t)&&e&&t.select()}}const Dv=W({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,i=e,{currentRef:s,currentElement:r}=Je(),o=te(null),a=UV(),l=Ss({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Zt(u=>{if(!dr)return;const O=r.value;if(!n.trapped)return;function f(m){if(l.paused||!O)return;const g=m.target;O.contains(g)?o.value=g:Is(o.value,{select:!0})}function d(m){if(l.paused||!O)return;const g=m.relatedTarget;g!==null&&(O.contains(g)||Is(o.value,{select:!0}))}function h(m){O.contains(o.value)||Is(O)}document.addEventListener("focusin",f),document.addEventListener("focusout",d);const p=new MutationObserver(h);O&&p.observe(O,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",d),p.disconnect()})}),Zt(async u=>{const O=r.value;if(await It(),!O)return;a.add(l);const f=$n();if(!O.contains(f)){const h=new CustomEvent(Wf,D$);O.addEventListener(Wf,p=>i("mountAutoFocus",p)),O.dispatchEvent(h),h.defaultPrevented||(DV(WV(Wv(O)),{select:!0}),$n()===f&&Is(O))}u(()=>{O.removeEventListener(Wf,m=>i("mountAutoFocus",m));const h=new CustomEvent(Df,D$),p=m=>{i("unmountAutoFocus",m)};O.addEventListener(Df,p),O.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Is(f??document.body,{select:!0}),O.removeEventListener(Df,p),a.remove(l)},0)})});function c(u){if(!n.loop&&!n.trapped||l.paused)return;const O=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,f=$n();if(O&&f){const d=u.currentTarget,[h,p]=LV(d);h&&p?!u.shiftKey&&f===p?(u.preventDefault(),n.loop&&Is(h,{select:!0})):u.shiftKey&&f===h&&(u.preventDefault(),n.loop&&Is(p,{select:!0})):f===d&&u.preventDefault()}}return(u,O)=>(C(),j($(Ue),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:z(()=>[le(u.$slots,"default")]),_:3},8,["as-child","as"]))}});function vm(t,e,n){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),i.dispatchEvent(s)}const BV="dismissableLayer.pointerDownOutside",GV="dismissableLayer.focusOutside";function Lv(t,e){const n=e.closest("[data-dismissable-layer]"),i=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),s=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(i===n||s.indexOf(i){});return Zt(a=>{if(!dr||!nn(n))return;const l=async u=>{const O=u.target;if(!(!(e!=null&&e.value)||!O)){if(Lv(e.value,O)){s.value=!1;return}if(u.target&&!s.value){let f=function(){vm(BV,t,d)};const d={originalEvent:u};u.pointerType==="touch"?(i.removeEventListener("click",r.value),r.value=f,i.addEventListener("click",r.value,{once:!0})):f()}else i.removeEventListener("click",r.value);s.value=!1}},c=window.setTimeout(()=>{i.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(c),i.removeEventListener("pointerdown",l),i.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>{nn(n)&&(s.value=!0)}}}function HV(t,e,n=!0){var r;const i=((r=e==null?void 0:e.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),s=te(!1);return Zt(o=>{if(!dr||!nn(n))return;const a=async l=>{if(!(e!=null&&e.value))return;await It(),await It();const c=l.target;!e.value||!c||Lv(e.value,c)||l.target&&!s.value&&vm(GV,t,{originalEvent:l})};i.addEventListener("focusin",a),o(()=>i.removeEventListener("focusin",a))}),{onFocusCapture:()=>{nn(n)&&(s.value=!0)},onBlurCapture:()=>{nn(n)&&(s.value=!1)}}}const is=Ss({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nv=W({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:s,currentElement:r}=Je(),o=J(()=>{var h;return((h=r.value)==null?void 0:h.ownerDocument)??globalThis.document}),a=J(()=>is.layersRoot),l=J(()=>r.value?Array.from(a.value).indexOf(r.value):-1),c=J(()=>is.layersWithOutsidePointerEventsDisabled.size>0),u=J(()=>{const h=Array.from(a.value),[p]=[...is.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(p);return l.value>=m}),O=FV(async h=>{const p=[...is.branches].some(m=>m==null?void 0:m.contains(h.target));!u.value||p||(i("pointerDownOutside",h),i("interactOutside",h),await It(),h.defaultPrevented||i("dismiss"))},r),f=HV(h=>{[...is.branches].some(m=>m==null?void 0:m.contains(h.target))||(i("focusOutside",h),i("interactOutside",h),h.defaultPrevented||i("dismiss"))},r);CV("Escape",h=>{l.value===a.value.size-1&&(i("escapeKeyDown",h),h.defaultPrevented||i("dismiss"))});let d;return Zt(h=>{r.value&&(n.disableOutsidePointerEvents&&(is.layersWithOutsidePointerEventsDisabled.size===0&&(d=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),is.layersWithOutsidePointerEventsDisabled.add(r.value)),a.value.add(r.value),h(()=>{n.disableOutsidePointerEvents&&is.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=d)}))}),Zt(h=>{h(()=>{r.value&&(a.value.delete(r.value),is.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(h,p)=>(C(),j($(Ue),{ref:$(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:Gn({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:$(f).onFocusCapture,onBlurCapture:$(f).onBlurCapture,onPointerdownCapture:$(O).onPointerDownCapture},{default:z(()=>[le(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),jv=W({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=Fi(),{forwardRef:r,currentElement:o}=Je();return s.titleId||(s.titleId=yi(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=yi(void 0,"reka-dialog-description")),Pt(()=>{s.contentElement=o,$n()!==document.body&&(s.triggerElement.value=$n())}),(a,l)=>(C(),j($(Dv),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>i("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>i("closeAutoFocus",c))},{default:z(()=>[X($(Nv),be({id:$(s).contentId,ref:$(r),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":$(s).descriptionId,"aria-labelledby":$(s).titleId,"data-state":$(qV)($(s).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=c=>$(s).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=c=>i("escapeKeyDown",c)),onFocusOutside:l[2]||(l[2]=c=>i("focusOutside",c)),onInteractOutside:l[3]||(l[3]=c=>i("interactOutside",c)),onPointerDownOutside:l[4]||(l[4]=c=>i("pointerDownOutside",c))}),{default:z(()=>[le(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}});var KV=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},io=new WeakMap,vc=new WeakMap,Pc={},Lf=0,Bv=function(t){return t&&(t.host||Bv(t.parentNode))},JV=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=Bv(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},e5=function(t,e,n,i){var s=JV(e,Array.isArray(t)?t:[t]);Pc[n]||(Pc[n]=new WeakMap);var r=Pc[n],o=[],a=new Set,l=new Set(s),c=function(O){!O||a.has(O)||(a.add(O),c(O.parentNode))};s.forEach(c);var u=function(O){!O||l.has(O)||Array.prototype.forEach.call(O.children,function(f){if(a.has(f))u(f);else try{var d=f.getAttribute(i),h=d!==null&&d!=="false",p=(io.get(f)||0)+1,m=(r.get(f)||0)+1;io.set(f,p),r.set(f,m),o.push(f),p===1&&h&&vc.set(f,!0),m===1&&f.setAttribute(n,"true"),h||f.setAttribute(i,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return u(e),a.clear(),Lf++,function(){o.forEach(function(O){var f=io.get(O)-1,d=r.get(O)-1;io.set(O,f),r.set(O,d),f||(vc.has(O)||O.removeAttribute(i),vc.delete(O)),d||O.removeAttribute(n)}),Lf--,Lf||(io=new WeakMap,io=new WeakMap,vc=new WeakMap,Pc={})}},t5=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),s=KV(t);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),e5(i,s,n,"aria-hidden")):function(){return null}};function Gv(t){let e;_e(()=>Ni(t),n=>{n?e=t5(n):e&&e()}),Bi(()=>{e&&e()})}const n5=W({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=Fi(),r=nf(i),{forwardRef:o,currentElement:a}=Je();return Gv(a),(l,c)=>(C(),j(jv,be({...n,...$(r)},{ref:$(o),"trap-focus":$(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=u=>{var O;u.defaultPrevented||(u.preventDefault(),(O=$(s).triggerElement.value)==null||O.focus())}),onPointerDownOutside:c[1]||(c[1]=u=>{const O=u.detail.originalEvent,f=O.button===0&&O.ctrlKey===!0;(O.button===2||f)&&u.preventDefault()}),onFocusOutside:c[2]||(c[2]=u=>{u.preventDefault()})}),{default:z(()=>[le(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),i5=W({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,s=nf(e);Je();const r=Fi(),o=te(!1),a=te(!1);return(l,c)=>(C(),j(jv,be({...n,...$(s)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=u=>{var O;u.defaultPrevented||(o.value||(O=$(r).triggerElement.value)==null||O.focus(),u.preventDefault()),o.value=!1,a.value=!1}),onInteractOutside:c[1]||(c[1]=u=>{var d;u.defaultPrevented||(o.value=!0,u.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const O=u.target;((d=$(r).triggerElement.value)==null?void 0:d.contains(O))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&a.value&&u.preventDefault()})}),{default:z(()=>[le(l.$slots,"default")]),_:3},16))}}),Fv=W({__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=Fi(),r=nf(i),{forwardRef:o}=Je();return(a,l)=>(C(),j($(Fl),{present:a.forceMount||$(s).open.value},{default:z(()=>[$(s).modal.value?(C(),j(n5,be({key:0,ref:$(o)},{...n,...$(r),...a.$attrs}),{default:z(()=>[le(a.$slots,"default")]),_:3},16)):(C(),j(i5,be({key:1,ref:$(o)},{...n,...$(r),...a.$attrs}),{default:z(()=>[le(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Hv=W({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(t){const e=t;Je();const n=Fi();return(i,s)=>(C(),j($(Ue),be(e,{id:$(n).descriptionId}),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["id"]))}});function Nf(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function mh(t,e,n=".",i){if(!Nf(e))return mh(t,{},n,i);const s=Object.assign({},e);for(const r in t){if(r==="__proto__"||r==="constructor")continue;const o=t[r];o!=null&&(i&&i(s,r,o,n)||(Array.isArray(o)&&Array.isArray(s[r])?s[r]=[...o,...s[r]]:Nf(o)&&Nf(s[r])?s[r]=mh(o,s[r],(n?`${n}.`:"")+r.toString(),i):s[r]=o))}return s}function s5(t){return(...e)=>e.reduce((n,i)=>mh(n,i,"",t),{})}const r5=s5(),o5=yV(()=>{const t=te(new Map),e=te(),n=J(()=>{for(const o of t.value.values())if(o)return!0;return!1}),i=ef({scrollBody:te(!0)});let s=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",M$&&(s==null||s()),e.value=void 0};return _e(n,(o,a)=>{var O;if(!dr)return;if(!o){a&&r();return}e.value===void 0&&(e.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,c={padding:l,margin:0},u=(O=i.scrollBody)!=null&&O.value?typeof i.scrollBody.value=="object"?r5({padding:i.scrollBody.value.padding===!0?l:i.scrollBody.value.padding,margin:i.scrollBody.value.margin===!0?l:i.scrollBody.value.margin},c):c:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),M$&&(s=qv(document,"touchmove",f=>a5(f),{passive:!1})),It(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Kv(t){const e=Math.random().toString(36).substring(2,7),n=o5();n.value.set(e,t??!1);const i=J({get:()=>n.value.get(e)??!1,set:s=>n.value.set(e,s)});return _V(()=>{n.value.delete(e)}),i}function Jv(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const l5=W({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(t){const e=Fi();return Kv(!0),Je(),(n,i)=>(C(),j($(Ue),{as:n.as,"as-child":n.asChild,"data-state":$(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:z(()=>[le(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),e1=W({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=Fi(),{forwardRef:n}=Je();return(i,s)=>{var r;return(r=$(e))!=null&&r.modal.value?(C(),j($(Fl),{key:0,present:i.forceMount||$(e).open.value},{default:z(()=>[X(l5,be(i.$attrs,{ref:$(n),as:i.as,"as-child":i.asChild}),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Pe("",!0)}}}),t1=W({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=Iv();return(n,i)=>$(e)||n.forceMount?(C(),j(jp,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[le(n.$slots,"default")],8,["to","disabled","defer"])):Pe("",!0)}});function Hi(t){const e=Qt(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((s,r)=>{const o=(e==null?void 0:e.type.props[r]).default;return o!==void 0&&(s[r]=o),s},{}),i=NS(t);return J(()=>{const s={},r=(e==null?void 0:e.vnode.props)??{};return Object.keys(r).forEach(o=>{s[Wt(o)]=r[o]}),Object.keys({...n,...s}).reduce((o,a)=>(i.value[a]!==void 0&&(o[a]=i.value[a]),o),{})})}function Fn(t,e){const n=Hi(t),i=e?nf(e):{};return J(()=>({...n.value,...i}))}const n1=W({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(t){const e=t,n=Fi();return Je(),(i,s)=>(C(),j($(Ue),be(e,{id:$(n).titleId}),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["id"]))}}),c5=W({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Fi(),{forwardRef:i,currentElement:s}=Je();return n.contentId||(n.contentId=yi(void 0,"reka-dialog-content")),Pt(()=>{n.triggerElement.value=s.value}),(r,o)=>(C(),j($(Ue),be(e,{ref:$(i),type:r.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":$(n).open.value||!1,"aria-controls":$(n).open.value?$(n).contentId:void 0,"data-state":$(n).open.value?"open":"closed",onClick:$(n).onOpenToggle}),{default:z(()=>[le(r.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}});function gh(){const t=te(),e=J(()=>{var n,i;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(i=t.value)==null?void 0:i.$el.nextElementSibling:Ni(t)});return{primitiveElement:t,currentElement:e}}function Pm(t){return J(()=>{var e;return TV(t)?!!((e=Ni(t))!=null&&e.closest("form")):!0})}const N$="data-reka-collection-item";function hr(t={}){const{key:e="",isProvider:n=!1}=t,i=`${e}CollectionProvider`;let s;if(n){const u=te(new Map);s={collectionRef:te(),itemMap:u},Os(i,s)}else s=gn(i);const r=(u=!1)=>{const O=s.collectionRef.value;if(!O)return[];const f=Array.from(O.querySelectorAll(`[${N$}]`)),h=Array.from(s.itemMap.value.values()).sort((p,m)=>f.indexOf(p.ref)-f.indexOf(m.ref));return u?h:h.filter(p=>p.ref.dataset.disabled!=="")},o=W({name:"CollectionSlot",setup(u,{slots:O}){const{primitiveElement:f,currentElement:d}=gh();return _e(d,()=>{s.collectionRef.value=d.value}),()=>Vn(ph,{ref:f},O)}}),a=W({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(u,{slots:O,attrs:f}){const{primitiveElement:d,currentElement:h}=gh();return Zt(p=>{if(h.value){const m=Wl(h.value);s.itemMap.value.set(m,{ref:h.value,value:u.value}),p(()=>s.itemMap.value.delete(m))}}),()=>Vn(ph,{...f,[N$]:"",ref:d},O)}}),l=J(()=>Array.from(s.itemMap.value.values())),c=J(()=>s.itemMap.value.size);return{getItems:r,reactiveItems:l,itemMapSize:c,CollectionSlot:o,CollectionItem:a}}const u5="rovingFocusGroup.onEntryFocus",O5={bubbles:!1,cancelable:!0},f5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function d5(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function h5(t,e,n){const i=d5(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return f5[i]}function i1(t,e=!1){const n=$n();for(const i of t)if(i===n||(i.focus({preventScroll:e}),$n()!==n))return}function p5(t,e){return t.map((n,i)=>t[(e+i)%t.length])}const[m5,g5]=vn("RovingFocusGroup"),$5=W({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const i=t,s=n,{loop:r,orientation:o,dir:a}=bn(i),l=tf(a),c=Ir(i,"currentTabStopId",s,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),u=te(!1),O=te(!1),f=te(0),{getItems:d,CollectionSlot:h}=hr({isProvider:!0});function p(g){const b=!O.value;if(g.currentTarget&&g.target===g.currentTarget&&b&&!u.value){const Q=new CustomEvent(u5,O5);if(g.currentTarget.dispatchEvent(Q),s("entryFocus",Q),!Q.defaultPrevented){const y=d().map(w=>w.ref).filter(w=>w.dataset.disabled!==""),S=y.find(w=>w.getAttribute("data-active")===""),v=y.find(w=>w.id===c.value),P=[S,v,...y].filter(Boolean);i1(P,i.preventScrollOnEntryFocus)}}O.value=!1}function m(){setTimeout(()=>{O.value=!1},1)}return e({getItems:d}),g5({loop:r,dir:l,orientation:o,currentTabStopId:c,onItemFocus:g=>{c.value=g},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(g,b)=>(C(),j($(h),null,{default:z(()=>[X($(Ue),{tabindex:u.value||f.value===0?-1:0,"data-orientation":$(o),as:g.as,"as-child":g.asChild,dir:$(l),style:{outline:"none"},onMousedown:b[0]||(b[0]=Q=>O.value=!0),onMouseup:m,onFocus:p,onBlur:b[1]||(b[1]=Q=>u.value=!1)},{default:z(()=>[le(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),j$=W({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:i}=gh(),s=J(()=>e.checked??e.value);return _e(s,(r,o)=>{if(!i.value)return;const a=i.value,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(u&&r!==o){const O=new Event("input",{bubbles:!0}),f=new Event("change",{bubbles:!0});u.call(a,r),a.dispatchEvent(O),a.dispatchEvent(f)}}),(r,o)=>(C(),j(Mv,be({ref_key:"primitiveElement",ref:n},{...e,...r.$attrs},{as:"input"}),null,16))}}),s1=W({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,n=J(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),i=J(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((s,r)=>typeof s=="object"?Object.entries(s).map(([o,a])=>({name:`[${e.name}][${r}][${o}]`,value:a})):{name:`[${e.name}][${r}]`,value:s}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([s,r])=>({name:`[${e.name}][${s}]`,value:r})):[]);return(s,r)=>n.value?(C(),j(j$,be({key:s.name},{...e,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(C(!0),re(Ce,{key:1},An(i.value,o=>(C(),j(j$,be({key:o.name,ref_for:!0},{...e,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))}}),[Q5,TB]=vn("CheckboxGroupRoot");function Lu(t){return t==="indeterminate"}function r1(t){return Lu(t)?"indeterminate":t?"checked":"unchecked"}const o1=W({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=m5(),i=yi(),s=J(()=>e.tabStopId||i),r=J(()=>n.currentTabStopId.value===s.value),{getItems:o,CollectionItem:a}=hr();Pt(()=>{e.focusable&&n.onFocusableItemAdd()}),Bi(()=>{e.focusable&&n.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){n.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=h5(c,n.orientation.value,n.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!e.allowShiftKey&&c.shiftKey)return;c.preventDefault();let O=[...o().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")O.reverse();else if(u==="prev"||u==="next"){u==="prev"&&O.reverse();const f=O.indexOf(c.currentTarget);O=n.loop.value?p5(O,f+1):O.slice(f+1)}It(()=>i1(O))}}return(c,u)=>(C(),j($(a),null,{default:z(()=>[X($(Ue),{tabindex:r.value?0:-1,"data-orientation":$(n).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=O=>{c.focusable?$(n).onItemFocus(s.value):O.preventDefault()}),onFocus:u[1]||(u[1]=O=>$(n).onItemFocus(s.value)),onKeydown:l},{default:z(()=>[le(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[y5,b5]=vn("CheckboxRoot"),S5=W({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null],default:void 0},disabled:{type:Boolean},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:s,currentElement:r}=Je(),o=Q5(null),a=Ir(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),l=J(()=>(o==null?void 0:o.disabled.value)||n.disabled),c=J(()=>hl(o==null?void 0:o.modelValue.value)?a.value==="indeterminate"?"indeterminate":a.value:I$(o.modelValue.value,n.value));function u(){if(hl(o==null?void 0:o.modelValue.value))a.value=Lu(a.value)?!0:!a.value;else{const d=[...o.modelValue.value||[]];if(I$(d,n.value)){const h=d.findIndex(p=>Du(p,n.value));d.splice(h,1)}else d.push(n.value);o.modelValue.value=d}}const O=Pm(r),f=J(()=>{var d;return n.id&&r.value?(d=document.querySelector(`[for="${n.id}"]`))==null?void 0:d.innerText:void 0});return b5({disabled:l,state:c}),(d,h)=>{var p,m;return C(),j(Jp((p=$(o))!=null&&p.rovingFocus.value?$(o1):$(Ue)),be(d.$attrs,{id:d.id,ref:$(s),role:"checkbox","as-child":d.asChild,as:d.as,type:d.as==="button"?"button":void 0,"aria-checked":$(Lu)(c.value)?"mixed":c.value,"aria-required":d.required,"aria-label":d.$attrs["aria-label"]||f.value,"data-state":$(r1)(c.value),"data-disabled":l.value?"":void 0,disabled:l.value,focusable:(m=$(o))!=null&&m.rovingFocus.value?!l.value:void 0,onKeydown:jO(He(()=>{},["prevent"]),["enter"]),onClick:u}),{default:z(()=>[le(d.$slots,"default",{modelValue:$(a),state:c.value}),$(O)&&d.name&&!$(o)?(C(),j($(s1),{key:0,type:"checkbox",checked:!!c.value,name:d.name,value:d.value,disabled:l.value,required:d.required},null,8,["checked","name","value","disabled","required"])):Pe("",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])}}}),v5=W({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e}=Je(),n=y5();return(i,s)=>(C(),j($(Fl),{present:i.forceMount||$(Lu)($(n).state.value)||$(n).state.value===!0},{default:z(()=>[X($(Ue),be({ref:$(e),"data-state":$(r1)($(n).state.value),"data-disabled":$(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":i.asChild,as:i.as},i.$attrs),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[a1,P5]=vn("PopperRoot"),x5=W({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=te();return P5({anchor:e,onAnchorChange:n=>e.value=n}),(n,i)=>le(n.$slots,"default")}}),w5=W({__name:"PopperAnchor",props:{reference:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Je(),s=a1();return om(()=>{s.onAnchorChange(e.reference??i.value)}),(r,o)=>(C(),j($(Ue),{ref:$(n),as:r.as,"as-child":r.asChild},{default:z(()=>[le(r.$slots,"default")]),_:3},8,["as","as-child"]))}});function T5(t){return t!==null}function _5(t){return{name:"transformOrigin",options:t,fn(e){var m,g,b;const{placement:n,rects:i,middlewareData:s}=e,o=((m=s.arrow)==null?void 0:m.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=$h(n),O={start:"0%",center:"50%",end:"100%"}[u],f=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,d=(((b=s.arrow)==null?void 0:b.y)??0)+l/2;let h="",p="";return c==="bottom"?(h=o?O:`${f}px`,p=`${-l}px`):c==="top"?(h=o?O:`${f}px`,p=`${i.floating.height+l}px`):c==="right"?(h=`${-l}px`,p=o?O:`${d}px`):c==="left"&&(h=`${i.floating.width+l}px`,p=o?O:`${d}px`),{data:{x:h,y:p}}}}}function $h(t){const[e,n="center"]=t.split("-");return[e,n]}function k5(t){const e=te(),n=J(()=>{var s;return((s=e.value)==null?void 0:s.width)??0}),i=J(()=>{var s;return((s=e.value)==null?void 0:s.height)??0});return Pt(()=>{const s=Ni(t);if(s){e.value={width:s.offsetWidth,height:s.offsetHeight};const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const u=a.borderBoxSize,O=Array.isArray(u)?u[0]:u;l=O.inlineSize,c=O.blockSize}else l=s.offsetWidth,c=s.offsetHeight;e.value={width:l,height:c}});return r.observe(s,{box:"border-box"}),()=>r.unobserve(s)}else e.value=void 0}),{width:n,height:i}}const R5={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[_B,X5]=vn("PopperContent"),C5=W({inheritAttrs:!1,__name:"PopperContent",props:Q0({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},{...R5}),emits:["placed"],setup(t,{emit:e}){const n=t,i=e,s=a1(),{forwardRef:r,currentElement:o}=Je(),a=te(),l=te(),{width:c,height:u}=k5(l),O=J(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=J(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=J(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),h=J(()=>({padding:f.value,boundary:d.value.filter(T5),altBoundary:d.value.length>0})),p=$V(()=>[aV({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&z$({...h.value}),n.avoidCollisions&&lV({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?fV():void 0,...h.value}),!n.prioritizePosition&&n.avoidCollisions&&z$({...h.value}),cV({...h.value,apply:({elements:I,rects:Z,availableWidth:K,availableHeight:ie})=>{const{width:ae,height:G}=Z.reference,q=I.floating.style;q.setProperty("--reka-popper-available-width",`${K}px`),q.setProperty("--reka-popper-available-height",`${ie}px`),q.setProperty("--reka-popper-anchor-width",`${ae}px`),q.setProperty("--reka-popper-anchor-height",`${G}px`)}}),l.value&&pV({element:l.value,padding:n.arrowPadding}),_5({arrowWidth:c.value,arrowHeight:u.value}),n.hideWhenDetached&&uV({strategy:"referenceHidden",...h.value})]),m=J(()=>n.reference??s.anchor.value),{floatingStyles:g,placement:b,isPositioned:Q,middlewareData:y}=mV(m,a,{strategy:n.positionStrategy,placement:O,whileElementsMounted:(...I)=>oV(...I,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:p}),S=J(()=>$h(b.value)[0]),v=J(()=>$h(b.value)[1]);om(()=>{Q.value&&i("placed")});const P=J(()=>{var I;return((I=y.value.arrow)==null?void 0:I.centerOffset)!==0}),w=te("");Zt(()=>{o.value&&(w.value=window.getComputedStyle(o.value).zIndex)});const k=J(()=>{var I;return((I=y.value.arrow)==null?void 0:I.x)??0}),E=J(()=>{var I;return((I=y.value.arrow)==null?void 0:I.y)??0});return X5({placedSide:S,onArrowChange:I=>l.value=I,arrowX:k,arrowY:E,shouldHideArrow:P}),(I,Z)=>{var K,ie,ae;return C(),re("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:Gn({...$(g),transform:$(Q)?$(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:w.value,"--reka-popper-transform-origin":[(K=$(y).transformOrigin)==null?void 0:K.x,(ie=$(y).transformOrigin)==null?void 0:ie.y].join(" "),...((ae=$(y).hide)==null?void 0:ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[X($(Ue),be({ref:$(r)},I.$attrs,{"as-child":n.asChild,as:I.as,"data-side":S.value,"data-align":v.value,style:{animation:$(Q)?void 0:"none"}}),{default:z(()=>[le(I.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}});function l1(t){const e=wV("",1e3);return{search:e,handleTypeaheadSearch:(s,r)=>{e.value=e.value+s;{const o=$n(),a=r.map(f=>{var d,h;return{...f,textValue:((d=f.value)==null?void 0:d.textValue)??((h=f.ref.textContent)==null?void 0:h.trim())??""}}),l=a.find(f=>f.ref===o),c=a.map(f=>f.textValue),u=A5(c,e.value,l==null?void 0:l.textValue),O=a.find(f=>f.textValue===u);return O&&O.ref.focus(),O==null?void 0:O.ref}},resetTypeahead:()=>{e.value=""}}}function V5(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function A5(t,e,n){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let o=V5(t,Math.max(r,0));s.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function E5(t,e){if(t.length!==e.length)return!1;for(let n=0;n{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}let jf=0;function z5(){Zt(t=>{if(!dr)return;const e=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??B$()),document.body.insertAdjacentElement("beforeend",e[1]??B$()),jf++,t(()=>{jf===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),jf--})})}function B$(){const t=document.createElement("span");return t.setAttribute("data-reka-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}const c1=W({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,i)=>(C(),j($(t1),RO(jl(e)),{default:z(()=>[le(n.$slots,"default")]),_:3},16))}}),Y5=W({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(t){const e=t;return Je(),(n,i)=>(C(),j($(Ue),be(e,{onMousedown:i[0]||(i[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:z(()=>[le(n.$slots,"default")]),_:3},16))}});function G$(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}const M5=[" ","Enter","ArrowUp","ArrowDown"],q5=[" ","Enter"],ui=10;function Nu(t,e,n){return t===void 0?!1:Array.isArray(t)?t.some(i=>Qh(i,e,n)):Qh(t,e,n)}function Qh(t,e,n){return t===void 0||e===void 0?!1:typeof t=="string"?t===e:typeof n=="function"?n(t,e):typeof n=="string"?(t==null?void 0:t[n])===(e==null?void 0:e[n]):Du(t,e)}function I5(t){return t==null||t===""||Array.isArray(t)&&t.length===0}const U5=W({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(t){const e=t,n=te();return _e(()=>e.value,(i,s)=>{const r=window.HTMLSelectElement.prototype,a=Object.getOwnPropertyDescriptor(r,"value").set;if(i!==s&&a&&n.value){const l=new Event("change",{bubbles:!0});a.call(n.value,i),n.value.dispatchEvent(l)}}),(i,s)=>(C(),j($(Mv),{"as-child":""},{default:z(()=>[N("select",be({ref_key:"selectElement",ref:n},e),[le(i.$slots,"default")],16)]),_:3}))}}),W5={key:0,value:""},[Hr,u1]=vn("SelectRoot"),D5=W({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{default:void 0},by:{},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,i=e,{required:s,disabled:r,multiple:o,dir:a}=bn(n),l=Ir(n,"modelValue",i,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),c=Ir(n,"open",i,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=te(),O=te(),f=te({x:0,y:0}),d=J(()=>{var Q;return o.value&&Array.isArray(l.value)?((Q=l.value)==null?void 0:Q.length)===0:hl(l.value)});hr({isProvider:!0});const h=tf(a),p=Pm(u),m=te(new Set),g=J(()=>Array.from(m.value).map(Q=>Q.value).join(";"));function b(Q){if(o.value){const y=Array.isArray(l.value)?[...l.value]:[],S=y.findIndex(v=>Qh(v,Q,n.by));S===-1?y.push(Q):y.splice(S,1),l.value=[...y]}else l.value=Q}return u1({triggerElement:u,onTriggerChange:Q=>{u.value=Q},valueElement:O,onValueElementChange:Q=>{O.value=Q},contentId:"",modelValue:l,onValueChange:b,by:n.by,open:c,multiple:o,required:s,onOpenChange:Q=>{c.value=Q},dir:h,triggerPointerDownPosRef:f,disabled:r,isEmptyModelValue:d,optionsSet:m,onOptionAdd:Q=>m.value.add(Q),onOptionRemove:Q=>m.value.delete(Q)}),(Q,y)=>(C(),j($(x5),null,{default:z(()=>[le(Q.$slots,"default",{modelValue:$(l),open:$(c)}),$(p)?(C(),j(U5,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:$(o),required:$(s),name:Q.name,autocomplete:Q.autocomplete,disabled:$(r),value:$(l)},{default:z(()=>[$(hl)($(l))?(C(),re("option",W5)):Pe("",!0),(C(!0),re(Ce,null,An(Array.from(m.value),S=>(C(),re("option",be({key:S.value??"",ref_for:!0},S),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Pe("",!0)]),_:3}))}}),[xm,L5]=vn("SelectItemAlignedPosition"),N5=W({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(t,{emit:e}){const n=t,i=e,{getItems:s}=hr(),r=Hr(),o=Kr(),a=te(!1),l=te(!0),c=te(),{forwardRef:u,currentElement:O}=Je(),{viewport:f,selectedItem:d,selectedItemText:h,focusSelectedItem:p}=o;function m(){if(r.triggerElement.value&&r.valueElement.value&&c.value&&O.value&&(f!=null&&f.value)&&(d!=null&&d.value)&&(h!=null&&h.value)){const Q=r.triggerElement.value.getBoundingClientRect(),y=O.value.getBoundingClientRect(),S=r.valueElement.value.getBoundingClientRect(),v=h.value.getBoundingClientRect();if(r.dir.value!=="rtl"){const Re=v.left-y.left,st=S.left-Re,De=Q.left-st,ft=Q.width+De,Gt=Math.max(ft,y.width),xt=window.innerWidth-ui,R=G$(st,ui,Math.max(ui,xt-Gt));c.value.style.minWidth=`${ft}px`,c.value.style.left=`${R}px`}else{const Re=y.right-v.right,st=window.innerWidth-S.right-Re,De=window.innerWidth-Q.right-st,ft=Q.width+De,Gt=Math.max(ft,y.width),xt=window.innerWidth-ui,R=G$(st,ui,Math.max(ui,xt-Gt));c.value.style.minWidth=`${ft}px`,c.value.style.right=`${R}px`}const P=s().map(Re=>Re.ref),w=window.innerHeight-ui*2,k=f.value.scrollHeight,E=window.getComputedStyle(O.value),I=Number.parseInt(E.borderTopWidth,10),Z=Number.parseInt(E.paddingTop,10),K=Number.parseInt(E.borderBottomWidth,10),ie=Number.parseInt(E.paddingBottom,10),ae=I+Z+k+ie+K,G=Math.min(d.value.offsetHeight*5,ae),q=window.getComputedStyle(f.value),Y=Number.parseInt(q.paddingTop,10),F=Number.parseInt(q.paddingBottom,10),ue=Q.top+Q.height/2-ui,Se=w-ue,fe=d.value.offsetHeight/2,Te=d.value.offsetTop+fe,Ve=I+Z+Te,Fe=ae-Ve;if(Ve<=ue){const Re=d.value===P[P.length-1];c.value.style.bottom="0px";const st=O.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,De=Math.max(Se,fe+(Re?F:0)+st+K),ft=Ve+De;c.value.style.height=`${ft}px`}else{const Re=d.value===P[0];c.value.style.top="0px";const De=Math.max(ue,I+f.value.offsetTop+(Re?Y:0)+fe)+Fe;c.value.style.height=`${De}px`,f.value.scrollTop=Ve-ue+f.value.offsetTop}c.value.style.margin=`${ui}px 0`,c.value.style.minHeight=`${G}px`,c.value.style.maxHeight=`${w}px`,i("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=te("");Pt(async()=>{await It(),m(),O.value&&(g.value=window.getComputedStyle(O.value).zIndex)});function b(Q){Q&&l.value===!0&&(m(),p==null||p(),l.value=!1)}return AV(r.triggerElement,()=>{m()}),L5({contentWrapper:c,shouldExpandOnScrollRef:a,onScrollButtonChange:b}),(Q,y)=>(C(),re("div",{ref_key:"contentWrapperElement",ref:c,style:Gn({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[X($(Ue),be({ref:$(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...Q.$attrs,...n}),{default:z(()=>[le(Q.$slots,"default")]),_:3},16)],4))}}),j5=W({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:ui},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},setup(t){const n=Hi(t);return(i,s)=>(C(),j($(C5),be($(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:z(()=>[le(i.$slots,"default")]),_:3},16))}}),B5={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Kr,O1]=vn("SelectContent"),G5=W({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,s=Hr();z5(),Kv(n.bodyLock);const{CollectionSlot:r,getItems:o}=hr(),a=te();Gv(a);const{search:l,handleTypeaheadSearch:c}=l1(),u=te(),O=te(),f=te(),d=te(!1),h=te(!1),p=te(!1);function m(){O.value&&a.value&&U$([O.value,a.value])}_e(d,()=>{m()});const{onOpenChange:g,triggerPointerDownPosRef:b}=s;Zt(v=>{if(!a.value)return;let P={x:0,y:0};const w=E=>{var I,Z;P={x:Math.abs(Math.round(E.pageX)-(((I=b.value)==null?void 0:I.x)??0)),y:Math.abs(Math.round(E.pageY)-(((Z=b.value)==null?void 0:Z.y)??0))}},k=E=>{var I;E.pointerType!=="touch"&&(P.x<=10&&P.y<=10?E.preventDefault():(I=a.value)!=null&&I.contains(E.target)||g(!1),document.removeEventListener("pointermove",w),b.value=null)};b.value!==null&&(document.addEventListener("pointermove",w),document.addEventListener("pointerup",k,{capture:!0,once:!0})),v(()=>{document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",k,{capture:!0})})});function Q(v){const P=v.ctrlKey||v.altKey||v.metaKey;if(v.key==="Tab"&&v.preventDefault(),!P&&v.key.length===1&&c(v.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(v.key)){let k=[...o().map(E=>E.ref)];if(["ArrowUp","End"].includes(v.key)&&(k=k.slice().reverse()),["ArrowUp","ArrowDown"].includes(v.key)){const E=v.target,I=k.indexOf(E);k=k.slice(I+1)}setTimeout(()=>U$(k)),v.preventDefault()}}const y=J(()=>n.position==="popper"?n:{}),S=Hi(y.value);return O1({content:a,viewport:u,onViewportChange:v=>{u.value=v},itemRefCallback:(v,P,w)=>{const k=!h.value&&!w,E=Nu(s.modelValue.value,P,s.by);if(s.multiple.value){if(p.value)return;(E||k)&&(O.value=v,E&&(p.value=!0))}else(E||k)&&(O.value=v);k&&(h.value=!0)},selectedItem:O,selectedItemText:f,onItemLeave:()=>{var v;(v=a.value)==null||v.focus()},itemTextRefCallback:(v,P,w)=>{const k=!h.value&&!w;(Nu(s.modelValue.value,P,s.by)||k)&&(f.value=v)},focusSelectedItem:m,position:n.position,isPositioned:d,searchRef:l}),(v,P)=>(C(),j($(r),null,{default:z(()=>[X($(Dv),{"as-child":"",onMountAutoFocus:P[6]||(P[6]=He(()=>{},["prevent"])),onUnmountAutoFocus:P[7]||(P[7]=w=>{var k;i("closeAutoFocus",w),!w.defaultPrevented&&((k=$(s).triggerElement.value)==null||k.focus({preventScroll:!0}),w.preventDefault())})},{default:z(()=>[X($(Nv),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:P[2]||(P[2]=He(()=>{},["prevent"])),onDismiss:P[3]||(P[3]=w=>$(s).onOpenChange(!1)),onEscapeKeyDown:P[4]||(P[4]=w=>i("escapeKeyDown",w)),onPointerDownOutside:P[5]||(P[5]=w=>i("pointerDownOutside",w))},{default:z(()=>[(C(),j(Jp(v.position==="popper"?j5:N5),be({...v.$attrs,...$(S)},{id:$(s).contentId,ref:w=>{a.value=$(Ni)(w)},role:"listbox","data-state":$(s).open.value?"open":"closed",dir:$(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:P[0]||(P[0]=He(()=>{},["prevent"])),onPlaced:P[1]||(P[1]=w=>d.value=!0),onKeydown:Q}),{default:z(()=>[le(v.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3})]),_:3}))}}),F5=W({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(t){return u1(t.context),O1(B5),(n,i)=>le(n.$slots,"default")}}),H5={key:1},K5=W({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,s=Fn(n,e),r=Hr(),o=te();Pt(()=>{o.value=new DocumentFragment});const a=te(),l=J(()=>n.forceMount||r.open.value),c=te(l.value);return _e(l,()=>{setTimeout(()=>c.value=l.value)}),(u,O)=>{var f;return l.value||c.value||(f=a.value)!=null&&f.present?(C(),j($(Fl),{key:0,ref_key:"presenceRef",ref:a,present:l.value},{default:z(()=>[X(G5,RO(jl({...$(s),...u.$attrs})),{default:z(()=>[le(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):o.value?(C(),re("div",H5,[(C(),j(jp,{to:o.value},[X(F5,{context:$(r)},{default:z(()=>[le(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Pe("",!0)}}}),[kB,J5]=vn("SelectGroup"),eA=W({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=yi(void 0,"reka-select-group");return J5({id:n}),(i,s)=>(C(),j($(Ue),be({role:"group"},e,{"aria-labelledby":$(n)}),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),tA=W({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(C(),j($(Ue),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:z(()=>[le(e.$slots,"default",{},()=>[n[0]||(n[0]=Ae("▼"))])]),_:3},8,["as","as-child"]))}}),[f1,nA]=vn("SelectItem"),iA=W({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,i=e,{disabled:s}=bn(n),r=Hr(),o=Kr(),{forwardRef:a,currentElement:l}=Je(),{CollectionItem:c}=hr(),u=J(()=>{var y;return Nu((y=r.modelValue)==null?void 0:y.value,n.value,r.by)}),O=te(!1),f=te(n.textValue??""),d=yi(void 0,"reka-select-item-text"),h="select.select";async function p(y){if(y.defaultPrevented)return;const S={originalEvent:y,value:n.value};vm(h,m,S)}async function m(y){await It(),i("select",y),!y.defaultPrevented&&(s.value||(r.onValueChange(n.value),r.multiple.value||r.onOpenChange(!1)))}async function g(y){var S,v;await It(),!y.defaultPrevented&&(s.value?(S=o.onItemLeave)==null||S.call(o):(v=y.currentTarget)==null||v.focus({preventScroll:!0}))}async function b(y){var S;await It(),!y.defaultPrevented&&y.currentTarget===$n()&&((S=o.onItemLeave)==null||S.call(o))}async function Q(y){var v;await It(),!(y.defaultPrevented||((v=o.searchRef)==null?void 0:v.value)!==""&&y.key===" ")&&(q5.includes(y.key)&&p(y),y.key===" "&&y.preventDefault())}if(n.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Pt(()=>{l.value&&o.itemRefCallback(l.value,n.value,n.disabled)}),nA({value:n.value,disabled:s,textId:d,isSelected:u,onItemTextChange:y=>{f.value=((f.value||(y==null?void 0:y.textContent))??"").trim()}}),(y,S)=>(C(),j($(c),{value:{textValue:f.value}},{default:z(()=>[X($(Ue),{ref:$(a),role:"option","aria-labelledby":$(d),"data-highlighted":O.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":$(s)||void 0,"data-disabled":$(s)?"":void 0,tabindex:$(s)?void 0:-1,as:y.as,"as-child":y.asChild,onFocus:S[0]||(S[0]=v=>O.value=!0),onBlur:S[1]||(S[1]=v=>O.value=!1),onPointerup:p,onPointerdown:S[2]||(S[2]=v=>{v.currentTarget.focus({preventScroll:!0})}),onTouchend:S[3]||(S[3]=He(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:b,onKeydown:Q},{default:z(()=>[le(y.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),sA=W({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=f1();return(i,s)=>$(n).isSelected.value?(C(),j($(Ue),be({key:0,"aria-hidden":"true"},e),{default:z(()=>[le(i.$slots,"default")]),_:3},16)):Pe("",!0)}}),rA=W({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=Hr(),i=Kr(),s=f1(),{forwardRef:r,currentElement:o}=Je(),a=J(()=>{var l,c;return{value:s.value,disabled:s.disabled.value,textContent:((l=o.value)==null?void 0:l.textContent)??((c=s.value)==null?void 0:c.toString())??""}});return Pt(()=>{o.value&&(s.onItemTextChange(o.value),i.itemTextRefCallback(o.value,s.value,s.disabled.value),n.onOptionAdd(a.value))}),Bi(()=>{n.onOptionRemove(a.value)}),(l,c)=>(C(),j($(Ue),be({id:$(s).textId,ref:$(r)},{...e,...l.$attrs}),{default:z(()=>[le(l.$slots,"default")]),_:3},16,["id"]))}}),oA=W({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,i)=>(C(),j($(t1),RO(jl(e)),{default:z(()=>[le(n.$slots,"default")]),_:3},16))}}),d1=W({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{getItems:i}=hr(),s=Kr(),r=te(null);function o(){r.value!==null&&(window.clearInterval(r.value),r.value=null)}Zt(()=>{const c=i().map(u=>u.ref).find(u=>u===$n());c==null||c.scrollIntoView({block:"nearest"})});function a(){r.value===null&&(r.value=window.setInterval(()=>{n("autoScroll")},50))}function l(){var c;(c=s.onItemLeave)==null||c.call(s),r.value===null&&(r.value=window.setInterval(()=>{n("autoScroll")},50))}return Gr(()=>o()),(c,u)=>{var O;return C(),j($(Ue),be({"aria-hidden":"true",style:{flexShrink:0}},(O=c.$parent)==null?void 0:O.$props,{onPointerdown:a,onPointermove:l,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:z(()=>[le(c.$slots,"default")]),_:3},16)}}}),aA=W({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=Kr(),n=e.position==="item-aligned"?xm():void 0,{forwardRef:i,currentElement:s}=Je(),r=te(!1);return Zt(o=>{var a,l;if((a=e.viewport)!=null&&a.value&&((l=e.isPositioned)!=null&&l.value)){let c=function(){const O=u.scrollHeight-u.clientHeight;r.value=Math.ceil(u.scrollTop)u.removeEventListener("scroll",c))}}),_e(s,()=>{s.value&&(n==null||n.onScrollButtonChange(s.value))}),(o,a)=>r.value?(C(),j(d1,{key:0,ref:$(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=$(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop+c.value.offsetHeight)})},{default:z(()=>[le(o.$slots,"default")]),_:3},512)):Pe("",!0)}}),lA=W({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=Kr(),n=e.position==="item-aligned"?xm():void 0,{forwardRef:i,currentElement:s}=Je(),r=te(!1);return Zt(o=>{var a,l;if((a=e.viewport)!=null&&a.value&&((l=e.isPositioned)!=null&&l.value)){let c=function(){r.value=u.scrollTop>0};const u=e.viewport.value;c(),u.addEventListener("scroll",c),o(()=>u.removeEventListener("scroll",c))}}),_e(s,()=>{s.value&&(n==null||n.onScrollButtonChange(s.value))}),(o,a)=>r.value?(C(),j(d1,{key:0,ref:$(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=$(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop-c.value.offsetHeight)})},{default:z(()=>[le(o.$slots,"default")]),_:3},512)):Pe("",!0)}}),cA=W({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Hr(),{forwardRef:i,currentElement:s}=Je(),r=J(()=>{var f;return((f=n.disabled)==null?void 0:f.value)||e.disabled});n.contentId||(n.contentId=yi(void 0,"reka-select-content")),Pt(()=>{n.onTriggerChange(s.value)});const{getItems:o}=hr(),{search:a,handleTypeaheadSearch:l,resetTypeahead:c}=l1();function u(){r.value||(n.onOpenChange(!0),c())}function O(f){u(),n.triggerPointerDownPosRef.value={x:Math.round(f.pageX),y:Math.round(f.pageY)}}return(f,d)=>(C(),j($(w5),{"as-child":"",reference:f.reference},{default:z(()=>{var h,p,m,g;return[X($(Ue),{ref:$(i),role:"combobox",type:f.as==="button"?"button":void 0,"aria-controls":$(n).contentId,"aria-expanded":$(n).open.value||!1,"aria-required":(h=$(n).required)==null?void 0:h.value,"aria-autocomplete":"none",disabled:r.value,dir:(p=$(n))==null?void 0:p.dir.value,"data-state":(m=$(n))!=null&&m.open.value?"open":"closed","data-disabled":r.value?"":void 0,"data-placeholder":$(I5)((g=$(n).modelValue)==null?void 0:g.value)?"":void 0,"as-child":f.asChild,as:f.as,onClick:d[0]||(d[0]=b=>{var Q;(Q=b==null?void 0:b.currentTarget)==null||Q.focus()}),onPointerdown:d[1]||(d[1]=b=>{if(b.pointerType==="touch")return b.preventDefault();const Q=b.target;Q.hasPointerCapture(b.pointerId)&&Q.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(O(b),b.preventDefault())}),onPointerup:d[2]||(d[2]=He(b=>{b.pointerType==="touch"&&O(b)},["prevent"])),onKeydown:d[3]||(d[3]=b=>{const Q=$(a)!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&Q&&b.key===" "||($(l)(b.key,$(o)()),$(M5).includes(b.key)&&(u(),b.preventDefault()))})},{default:z(()=>[le(f.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),uA=W({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Je(),s=Hr();Pt(()=>{s.valueElement=i});const r=J(()=>{var u;let a=[];const l=Array.from(s.optionsSet.value),c=O=>l.find(f=>Nu(O,f.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(O=>{var f;return((f=c(O))==null?void 0:f.textContent)??""}):a=[((u=c(s.modelValue.value))==null?void 0:u.textContent)??""],a.filter(Boolean)}),o=J(()=>r.value.length?r.value.join(", "):e.placeholder);return(a,l)=>(C(),j($(Ue),{ref:$(n),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":r.value.length?void 0:e.placeholder},{default:z(()=>[le(a.$slots,"default",{selectedLabel:r.value,modelValue:$(s).modelValue.value},()=>[Ae(ne(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),OA=W({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{nonce:n}=bn(e),i=Z5(n),s=Kr(),r=s.position==="item-aligned"?xm():void 0,{forwardRef:o,currentElement:a}=Je();Pt(()=>{s==null||s.onViewportChange(a.value)});const l=te(0);function c(u){const O=u.currentTarget,{shouldExpandOnScrollRef:f,contentWrapper:d}=r??{};if(f!=null&&f.value&&(d!=null&&d.value)){const h=Math.abs(l.value-O.scrollTop);if(h>0){const p=window.innerHeight-ui*2,m=Number.parseFloat(d.value.style.minHeight),g=Number.parseFloat(d.value.style.height),b=Math.max(m,g);if(b0?S:0,d.value.style.justifyContent="flex-end")}}}l.value=O.scrollTop}return(u,O)=>(C(),re(Ce,null,[X($(Ue),be({ref:$(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:z(()=>[le(u.$slots,"default")]),_:3},16),X($(Ue),{as:"style",nonce:$(i)},{default:z(()=>O[0]||(O[0]=[Ae(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1},8,["nonce"])],64))}});function Ye(t,e="Assertion failed!"){if(!t)throw console.error(e),new Error(e)}const Hl=typeof document<"u";function h1(t,e=document){var i;if(!Hl)return null;if(e instanceof HTMLElement&&((i=e==null?void 0:e.dataset)==null?void 0:i.panelGroupId)===t)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return n||null}function sf(t,e=document){if(!Hl)return null;const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function p1(t,e,n=document){return Hl?pl(t,n).findIndex(r=>r.getAttribute("data-panel-resize-handle-id")===e)??null:null}function pl(t,e=document){return Hl?Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`)):[]}function fA(t,e,n,i=document){var c,u;const s=sf(e,i),r=pl(t,i),o=s?r.indexOf(s):-1,a=((c=n[o])==null?void 0:c.id)??null,l=((u=n[o+1])==null?void 0:u.id)??null;return[a,l]}function m1(t){return t.type==="keydown"}function g1(t){return t.type.startsWith("mouse")}function $1(t){return t.type.startsWith("touch")}function rf(t){if(g1(t))return{x:t.clientX,y:t.clientY};if($1(t)){const e=t.touches[0];if(e&&e.clientX&&e.clientY)return{x:e.clientX,y:e.clientY}}return{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY}}function Q1(t,e){const n=t==="horizontal",{x:i,y:s}=rf(e);return n?i:s}function dA(t,e,n,i,s){const r=n==="horizontal",o=sf(e,s);Ye(o);const a=o.getAttribute("data-panel-group-id");Ye(a);const{initialCursorPosition:l}=i,c=Q1(n,t),u=h1(a,s);Ye(u);const O=u.getBoundingClientRect(),f=r?O.width:O.height;return(c-l)/f*100}function hA(t,e,n,i,s,r){if(m1(t)){const o=n==="horizontal";let a=0;t.shiftKey?a=100:a=s??10;let l=0;switch(t.key){case"ArrowDown":l=o?0:a;break;case"ArrowLeft":l=o?-a:0;break;case"ArrowRight":l=o?a:0;break;case"ArrowUp":l=o?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return i==null?0:dA(t,e,n,i,r)}function pA({layout:t,panelsArray:e,pivotIndices:n}){let i=0,s=100,r=0,o=0;const a=n[0];Ye(a!=null),e.forEach((O,f)=>{const{constraints:d}=O,{maxSize:h=100,minSize:p=0}=d;f===a?(i=p,s=h):(r+=p,o+=h)});const l=Math.min(s,100-r),c=Math.max(i,100-o),u=t[a];return{valueMax:l,valueMin:c,valueNow:u}}function mA({panelDataArray:t}){const e=Array.from({length:t.length}),n=t.map(r=>r.constraints);let i=0,s=100;for(let r=0;r{const r=t[s];Ye(r);const{callbacks:o,constraints:a,id:l}=r,{collapsedSize:c=0,collapsible:u}=a,O=n[l];if(O==null||i!==O){n[l]=i;const{onCollapse:f,onExpand:d,onResize:h}=o;h&&h(i,O),u&&(f||d)&&(d&&(O==null||O===c)&&i!==c&&d(),f&&(O==null||O!==c)&&i===c&&f())}})}function gA(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}const wm=10;function ml(t,e,n=wm){t=Number.parseFloat(t.toFixed(n)),e=Number.parseFloat(e.toFixed(n));const i=t-e;return i===0?0:i>0?1:-1}function In(t,e,n){return ml(t,e,n)===0}function go({panelConstraints:t,panelIndex:e,size:n}){const i=t[e];Ye(i!=null);const{collapsedSize:s=0,collapsible:r,maxSize:o=100,minSize:a=0}=i;if(ml(n,a)<0)if(r){const l=(s+a)/2;ml(n,l)<0?n=s:n=a}else n=a;return n=Math.min(o,n),n=Number.parseFloat(n.toFixed(wm)),n}function xc(t,e){if(t.length!==e.length)return!1;for(let n=0;n0&&(t=t<0?0-m:m)}}}{const u=t<0?o:a,O=n[u];Ye(O);const{collapsible:f}=O;if(f){const d=e[u];Ye(d!=null);const h=n[u];Ye(h);const{collapsedSize:p=0,minSize:m=0}=h;if(In(d,m)){const g=d-p;ml(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const u=t<0?1:-1;let O=t<0?a:o,f=0;for(;;){const h=e[O];Ye(h!=null);const m=go({panelConstraints:n,panelIndex:O,size:100})-h;if(f+=m,O+=u,O<0||O>=n.length)break}const d=Math.min(Math.abs(t),Math.abs(f));t=t<0?0-d:d}{let O=t<0?o:a;for(;O>=0&&O=0))break;t<0?O--:O++}}if(In(l,0))return e;{const u=t<0?a:o,O=e[u];Ye(O!=null);const f=O+l,d=go({panelConstraints:n,panelIndex:u,size:f});if(r[u]=d,!In(d,f)){let h=f-d,m=t<0?a:o;for(;m>=0&&m0?m--:m++}}}const c=r.reduce((u,O)=>O+u,0);return In(c,100)?r:e}function y1(t,e,n){const i=p1(t,e,n);return i!=null?[i,i+1]:[-1,-1]}function $A(t,e,n){return t.xe.x&&t.ye.y}function QA(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:K$(t),b:K$(e)};let i;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),i=t;Ye(i);const s={a:H$(F$(n.a)),b:H$(F$(n.b))};if(s.a===s.b){const r=i.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let a=r.length;for(;a--;){const l=r[a];if(l===o.a)return 1;if(l===o.b)return-1}}return Math.sign(s.a-s.b)}const yA=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function bA(t){const e=getComputedStyle(b1(t)).display;return e==="flex"||e==="inline-flex"}function SA(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||bA(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||yA.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function F$(t){let e=t.length;for(;e--;){const n=t[e];if(Ye(n),SA(n))return n}return null}function H$(t){return t&&Number(getComputedStyle(t).zIndex)||0}function K$(t){const e=[];for(;t;)e.push(t),t=b1(t);return e}function b1(t){var e;return t.parentNode instanceof DocumentFragment&&((e=t.parentNode)==null?void 0:e.host)||t.parentNode}let yh=null,_r=null;function vA(t,e){if(e){const n=(e&v1)!==0,i=(e&P1)!==0,s=(e&x1)!==0,r=(e&w1)!==0;if(n)return s?"se-resize":r?"ne-resize":"e-resize";if(i)return s?"sw-resize":r?"nw-resize":"w-resize";if(s)return"s-resize";if(r)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function S1(){_r!==null&&(document.head.removeChild(_r),yh=null,_r=null)}function Bf(t,e){const n=vA(t,e);yh!==n&&(yh=n,_r===null&&(_r=document.createElement("style"),document.head.appendChild(_r)),_r.innerHTML=`*{cursor: ${n}!important;}`)}function PA({defaultSize:t,dragState:e,layout:n,panelData:i,panelIndex:s,precision:r=3}){const o=n[s];let a;return o==null?a=t!==void 0?t.toPrecision(r):"1":i.length===1?a="1":a=o.toPrecision(r),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}const v1=1,P1=2,x1=4,w1=8;function xA(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const wA=xA()==="coarse",rr=[];let of=!1;const Bs=new Map,af=new Map,gl=new Set;function TA(t,e,n,i,s){const{ownerDocument:r}=e,o={direction:n,element:e,hitAreaMargins:i,setResizeHandlerState:s},a=Bs.get(r)??0;return Bs.set(r,a+1),gl.add(o),ju(),function(){af.delete(t),gl.delete(o);const c=Bs.get(r)??1;Bs.set(r,c-1),ju(),S1(),c===1&&Bs.delete(r)}}function wc(t){const{target:e}=t,{x:n,y:i}=rf(t);of=!0,Tm({target:e,x:n,y:i}),ju(),rr.length>0&&(_m("down",t),t.preventDefault())}function Es(t){const{x:e,y:n}=rf(t);if(!of){const{target:i}=t;Tm({target:i,x:e,y:n})}_m("move",t),T1(),rr.length>0&&t.preventDefault()}function Zs(t){const{target:e}=t,{x:n,y:i}=rf(t);af.clear(),of=!1,rr.length>0&&t.preventDefault(),_m("up",t),Tm({target:e,x:n,y:i}),T1(),ju()}function Tm({target:t,x:e,y:n}){rr.splice(0);let i=null;t instanceof HTMLElement&&(i=t),gl.forEach(s=>{const{element:r,hitAreaMargins:o}=s,a=r.getBoundingClientRect(),{bottom:l,left:c,right:u,top:O}=a,f=wA?o.coarse:o.fine;if(e>=c-f&&e<=u+f&&n>=O-f&&n<=l+f){if(i!==null&&r!==i&&!r.contains(i)&&!i.contains(r)&&QA(i,r)>0){let h=i,p=!1;for(;h&&!h.contains(r);){if($A(h.getBoundingClientRect(),a)){p=!0;break}h=h.parentElement}if(p)return}rr.push(s)}})}function Gf(t,e){af.set(t,e)}function T1(){let t=!1,e=!1;rr.forEach(i=>{const{direction:s}=i;s.value==="horizontal"?t=!0:e=!0});let n=0;af.forEach(i=>{n|=i}),t&&e?Bf("intersection",n):t?Bf("horizontal",n):e?Bf("vertical",n):S1()}function ju(){Bs.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Zs),n.removeEventListener("mousedown",wc),n.removeEventListener("mouseleave",Es),n.removeEventListener("mousemove",Es),n.removeEventListener("touchmove",Es),n.removeEventListener("touchstart",wc)}),window.removeEventListener("mouseup",Zs),window.removeEventListener("touchcancel",Zs),window.removeEventListener("touchend",Zs),gl.size>0&&(of?(rr.length>0&&Bs.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Zs),n.addEventListener("mouseleave",Es),n.addEventListener("mousemove",Es),n.addEventListener("touchmove",Es,{passive:!1}))}),window.addEventListener("mouseup",Zs),window.addEventListener("touchcancel",Zs),window.addEventListener("touchend",Zs)):Bs.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("mousedown",wc),n.addEventListener("mousemove",Es),n.addEventListener("touchmove",Es,{passive:!1}),n.addEventListener("touchstart",wc))}))}function _m(t,e){gl.forEach(n=>{const{setResizeHandlerState:i}=n,s=rr.includes(n);i(t,s,e)})}function _A({layout:t,panelConstraints:e}){const n=[...t],i=n.reduce((r,o)=>r+o,0);if(n.length!==e.length)throw new Error(`Invalid ${e.length} panel layout: ${n.map(r=>`${r}%`).join(", ")}`);if(!In(i,100)){console.warn(`WARNING: Invalid layout total size: ${n.map(r=>`${r}%`).join(", ")}. Layout normalization will be applied.`);for(let r=0;r{const a=s.value;if(!a)return;const l=pl(e,a);for(let c=0;c{l.forEach(c=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})})}),Zt(o=>{const a=s.value;if(!a)return;const l=t.value;Ye(l);const{panelDataArray:c}=l,u=h1(e,a);Ye(u!=null,`No group found for id "${e}"`);const O=pl(e,a);Ye(O);const f=O.map(d=>{const h=d.getAttribute("data-panel-resize-handle-id");Ye(h);const[p,m]=fA(e,h,c,a);if(p==null||m==null)return()=>{};const g=b=>{if(!b.defaultPrevented)switch(b.key){case"Enter":{b.preventDefault();const Q=c.findIndex(y=>y.id===p);if(Q>=0){const y=c[Q];Ye(y);const S=n.value[Q],{collapsedSize:v=0,collapsible:P,minSize:w=0}=y.constraints;if(S!=null&&P){const k=Aa({delta:In(S,v)?w-v:v-S,layout:n.value,panelConstraints:c.map(E=>E.constraints),pivotIndices:y1(e,h,a),trigger:"keyboard"});n.value!==k&&r(k)}}break}}};return d.addEventListener("keydown",g),()=>{d.removeEventListener("keydown",g)}});o(()=>{f.forEach(d=>d())})})}function J$(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new TypeError("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function _1(t){return`reka:${t}`}function k1(t){return t.map(e=>{const{constraints:n,id:i,idIsFromProps:s,order:r}=e;return s?i:r?`${r}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function R1(t,e){try{const n=_1(t),i=e.getItem(n);if(i){const s=JSON.parse(i);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function RA(t,e,n){const i=R1(t,n)??{},s=k1(e);return i[s]??null}function XA(t,e,n,i,s){const r=_1(t),o=k1(e),a=R1(t,s)??{};a[o]={expandToSizes:Object.fromEntries(n.entries()),layout:i};try{s.setItem(r,JSON.stringify(a))}catch(l){console.error(l)}}const CA=100,Ea={getItem:t=>(J$(Ea),Ea.getItem(t)),setItem:(t,e)=>{J$(Ea),Ea.setItem(t,e)}},[X1,VA]=vn("PanelGroup"),AA=W({__name:"SplitterGroup",props:{id:{},autoSaveId:{default:null},direction:{},keyboardResizeBy:{default:10},storage:{default:()=>Ea},asChild:{type:Boolean},as:{}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,s={},{direction:r}=bn(n),o=yi(n.id,"reka-splitter-group"),a=tf(),{forwardRef:l,currentElement:c}=Je(),u=te(null),O=te([]),f=te({}),d=te(new Map),h=te(0),p=J(()=>({autoSaveId:n.autoSaveId,direction:n.direction,dragState:u.value,id:o,keyboardResizeBy:n.keyboardResizeBy,storage:n.storage})),m=te({layout:O.value,panelDataArray:[],panelDataArrayChanged:!1}),g=q=>O.value=q;kA({eagerValuesRef:m,groupId:o,layout:O,panelDataArray:m.value.panelDataArray,setLayout:g,panelGroupElement:c}),Zt(()=>{const{panelDataArray:q}=m.value,{autoSaveId:Y}=n;if(Y){if(O.value.length===0||O.value.length!==q.length)return;let F=s[Y];F||(F=gA(XA,CA),s[Y]=F);const ue=[...q],Se=new Map(d.value);F(Y,ue,Se,O.value,n.storage)}});function b(q,Y){const{panelDataArray:F}=m.value,ue=ae(F,q);return PA({defaultSize:Y,dragState:u.value,layout:O.value,panelData:F,panelIndex:ue})}function Q(q){const{panelDataArray:Y}=m.value;Y.push(q),Y.sort((F,ue)=>{const Se=F.order,fe=ue.order;return Se==null&&fe==null?0:Se==null?-1:fe==null?1:Se-fe}),m.value.panelDataArrayChanged=!0}_e(()=>m.value.panelDataArrayChanged,()=>{if(m.value.panelDataArrayChanged){m.value.panelDataArrayChanged=!1;const{autoSaveId:q,storage:Y}=p.value,{layout:F,panelDataArray:ue}=m.value;let Se=null;if(q){const Te=RA(q,ue,Y);Te&&(d.value=new Map(Object.entries(Te.expandToSizes)),Se=Te.layout)}Se===null&&(Se=mA({panelDataArray:ue}));const fe=_A({layout:Se,panelConstraints:ue.map(Te=>Te.constraints)});E5(F,fe)||(g(fe),m.value.layout=fe,i("layout",fe),ba(ue,fe,f.value))}});function y(q){return function(F){F.preventDefault();const ue=c.value;if(!ue)return()=>null;const{direction:Se,dragState:fe,id:Te,keyboardResizeBy:Ve}=p.value,{layout:Fe,panelDataArray:Ze}=m.value,{initialLayout:Re}=fe??{},st=y1(Te,q,ue);let De=hA(F,q,Se,fe,Ve,ue);if(De===0)return;const ft=Se==="horizontal";a.value==="rtl"&&ft&&(De=-De);const Gt=Ze.map(A=>A.constraints),xt=Aa({delta:De,layout:Re??Fe,panelConstraints:Gt,pivotIndices:st,trigger:m1(F)?"keyboard":"mouse-or-touch"}),R=!xc(Fe,xt);(g1(F)||$1(F))&&h.value!==De&&(h.value=De,R?Gf(q,0):ft?Gf(q,De<0?v1:P1):Gf(q,De<0?x1:w1)),R&&(g(xt),m.value.layout=xt,i("layout",xt),ba(Ze,xt,f.value))}}function S(q,Y){const{layout:F,panelDataArray:ue}=m.value,Se=ue.map(Re=>Re.constraints),{panelSize:fe,pivotIndices:Te}=G(ue,q,F);Ye(fe!=null);const Fe=ae(ue,q)===ue.length-1?fe-Y:Y-fe,Ze=Aa({delta:Fe,layout:F,panelConstraints:Se,pivotIndices:Te,trigger:"imperative-api"});xc(F,Ze)||(g(Ze),m.value.layout=Ze,i("layout",Ze),ba(ue,Ze,f.value))}function v(q,Y){const{layout:F,panelDataArray:ue}=m.value,Se=ae(ue,q);ue[Se]=q,m.value.panelDataArrayChanged=!0;const{collapsedSize:fe=0,collapsible:Te}=Y,{collapsedSize:Ve=0,collapsible:Fe,maxSize:Ze=100,minSize:Re=0}=q.constraints,{panelSize:st}=G(ue,q,F);st!==null&&(Te&&Fe&&st===fe?fe!==Ve&&S(q,Ve):stZe&&S(q,Ze))}function P(q,Y){const{direction:F}=p.value,{layout:ue}=m.value;if(!c.value)return;const Se=sf(q,c.value);Ye(Se);const fe=Q1(F,Y);u.value={dragHandleId:q,dragHandleRect:Se.getBoundingClientRect(),initialCursorPosition:fe,initialLayout:ue}}function w(){u.value=null}function k(q){const{panelDataArray:Y}=m.value,F=ae(Y,q);F>=0&&(Y.splice(F,1),delete f.value[q.id],m.value.panelDataArrayChanged=!0)}function E(q){const{layout:Y,panelDataArray:F}=m.value;if(q.constraints.collapsible){const ue=F.map(Ve=>Ve.constraints),{collapsedSize:Se=0,panelSize:fe,pivotIndices:Te}=G(F,q,Y);if(Ye(fe!=null,`Panel size not found for panel "${q.id}"`),fe!==Se){d.value.set(q.id,fe);const Fe=ae(F,q)===F.length-1?fe-Se:Se-fe,Ze=Aa({delta:Fe,layout:Y,panelConstraints:ue,pivotIndices:Te,trigger:"imperative-api"});xc(Y,Ze)||(g(Ze),m.value.layout=Ze,i("layout",Ze),ba(F,Ze,f.value))}}}function I(q){const{layout:Y,panelDataArray:F}=m.value;if(q.constraints.collapsible){const ue=F.map(Fe=>Fe.constraints),{collapsedSize:Se=0,panelSize:fe,minSize:Te=0,pivotIndices:Ve}=G(F,q,Y);if(fe===Se){const Fe=d.value.get(q.id),Ze=Fe!=null&&Fe>=Te?Fe:Te,st=ae(F,q)===F.length-1?fe-Ze:Ze-fe,De=Aa({delta:st,layout:Y,panelConstraints:ue,pivotIndices:Ve,trigger:"imperative-api"});xc(Y,De)||(g(De),m.value.layout=De,i("layout",De),ba(F,De,f.value))}}}function Z(q){const{layout:Y,panelDataArray:F}=m.value,{panelSize:ue}=G(F,q,Y);return Ye(ue!=null,`Panel size not found for panel "${q.id}"`),ue}function K(q){const{layout:Y,panelDataArray:F}=m.value,{collapsedSize:ue=0,collapsible:Se,panelSize:fe}=G(F,q,Y);return Se?fe===void 0?q.constraints.defaultSize===q.constraints.collapsedSize:fe===ue:!1}function ie(q){const{layout:Y,panelDataArray:F}=m.value,{collapsedSize:ue=0,collapsible:Se,panelSize:fe}=G(F,q,Y);return Ye(fe!=null,`Panel size not found for panel "${q.id}"`),!Se||fe>ue}VA({direction:r,dragState:u.value,groupId:o,reevaluatePanelConstraints:v,registerPanel:Q,registerResizeHandle:y,resizePanel:S,startDragging:P,stopDragging:w,unregisterPanel:k,panelGroupElement:c,collapsePanel:E,expandPanel:I,isPanelCollapsed:K,isPanelExpanded:ie,getPanelSize:Z,getPanelStyle:b});function ae(q,Y){return q.findIndex(F=>F===Y||F.id===Y.id)}function G(q,Y,F){const ue=ae(q,Y),fe=ue===q.length-1?[ue-1,ue]:[ue,ue+1],Te=F[ue];return{...Y.constraints,panelSize:Te,pivotIndices:fe}}return(q,Y)=>(C(),j($(Ue),{ref:$(l),as:q.as,"as-child":q.asChild,style:Gn({display:"flex",flexDirection:$(r)==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"}),"data-panel-group":"","data-orientation":$(r),"data-panel-group-id":$(o)},{default:z(()=>[le(q.$slots,"default",{layout:O.value})]),_:3},8,["as","as-child","style","data-orientation","data-panel-group-id"]))}}),EA=W({__name:"SplitterPanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const i=t,s=n,r=X1();if(r===null)throw new Error("SplitterPanel components must be rendered within a SplitterGroup container");const{collapsePanel:o,expandPanel:a,getPanelSize:l,getPanelStyle:c,isPanelCollapsed:u,resizePanel:O,groupId:f,reevaluatePanelConstraints:d,registerPanel:h,unregisterPanel:p}=r,m=yi(i.id,"reka-splitter-panel"),g=J(()=>({callbacks:{onCollapse:()=>s("collapse"),onExpand:()=>s("expand"),onResize:(...w)=>s("resize",...w)},constraints:{collapsedSize:i.collapsedSize&&Number.parseFloat(i.collapsedSize.toFixed(wm)),collapsible:i.collapsible,defaultSize:i.defaultSize,maxSize:i.maxSize,minSize:i.minSize},id:m,idIsFromProps:i.id!==void 0,order:i.order}));_e(()=>g.value.constraints,(w,k)=>{(k.collapsedSize!==w.collapsedSize||k.collapsible!==w.collapsible||k.maxSize!==w.maxSize||k.minSize!==w.minSize)&&d(g.value,k)},{deep:!0}),Pt(()=>{const w=g.value;h(w),Bi(()=>{p(w)})});const b=J(()=>c(g.value,i.defaultSize)),Q=J(()=>u(g.value)),y=J(()=>!Q.value);function S(){o(g.value)}function v(){a(g.value)}function P(w){O(g.value,w)}return e({collapse:S,expand:v,getSize(){return l(g.value)},resize:P,isCollapsed:Q,isExpanded:y}),(w,k)=>(C(),j($(Ue),{id:$(m),style:Gn(b.value),as:w.as,"as-child":w.asChild,"data-panel":"","data-panel-collapsible":w.collapsible||void 0,"data-panel-group-id":$(f),"data-panel-id":$(m),"data-panel-size":Number.parseFloat(`${b.value.flexGrow}`).toFixed(1),"data-state":w.collapsible?Q.value?"collapsed":"expanded":void 0},{default:z(()=>[le(w.$slots,"default",{isCollapsed:Q.value,isExpanded:y.value,expand:v,collapse:S,resize:P})]),_:3},8,["id","style","as","as-child","data-panel-collapsible","data-panel-group-id","data-panel-id","data-panel-size","data-state"]))}});function ZA({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:i}){Zt(s=>{const r=i.value;if(t.value||n.value===null||r===null)return;const o=sf(e,r);if(o==null)return;const a=l=>{var c;if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),(c=n.value)==null||c.call(n,l);break}case"F6":{l.preventDefault();const u=o.getAttribute("data-panel-group-id");Ye(u);const O=pl(u,r),f=p1(u,e,r);Ye(f!==null);const d=l.shiftKey?f>0?f-1:O.length-1:f+1{o.removeEventListener("keydown",a)})})}const zA=W({__name:"SplitterResizeHandle",props:{id:{},hitAreaMargins:{},tabindex:{default:0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:s,currentElement:r}=Je(),{disabled:o}=bn(n),a=X1();if(a===null)throw new Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:l,groupId:c,registerResizeHandle:u,startDragging:O,stopDragging:f,panelGroupElement:d}=a,h=yi(n.id,"reka-splitter-resize-handle"),p=te("inactive"),m=te(!1),g=te(null);return _e(o,()=>{Hl&&(o.value?g.value=null:g.value=u(h))},{immediate:!0}),Zt(b=>{var S,v;if(o.value||g.value===null)return;const Q=r.value;if(!Q)return;Ye(Q);const y=(P,w,k)=>{var E;if(w)switch(P){case"down":{p.value="drag",O(h,k),i("dragging",!0);break}case"move":{p.value!=="drag"&&(p.value="hover"),(E=g.value)==null||E.call(g,k);break}case"up":{p.value="hover",f(),i("dragging",!1);break}}else p.value="inactive"};b(TA(h,Q,l,{coarse:((S=n.hitAreaMargins)==null?void 0:S.coarse)??15,fine:((v=n.hitAreaMargins)==null?void 0:v.fine)??5},y))}),ZA({disabled:o,resizeHandler:g,handleId:h,panelGroupElement:d}),(b,Q)=>(C(),j($(Ue),{id:$(h),ref:$(s),style:{touchAction:"none",userSelect:"none"},as:b.as,"as-child":b.asChild,role:"separator","data-resize-handle":"",tabindex:b.tabindex,"data-state":p.value,"data-disabled":$(o)?"":void 0,"data-orientation":$(l),"data-panel-group-id":$(c),"data-resize-handle-active":p.value==="drag"?"pointer":m.value?"keyboard":void 0,"data-resize-handle-state":p.value,"data-panel-resize-handle-enabled":!$(o),"data-panel-resize-handle-id":$(h),onBlur:Q[0]||(Q[0]=y=>m.value=!1),onFocus:Q[1]||(Q[1]=y=>m.value=!1)},{default:z(()=>[le(b.$slots,"default")]),_:3},8,["id","as","as-child","tabindex","data-state","data-disabled","data-orientation","data-panel-group-id","data-resize-handle-active","data-resize-handle-state","data-panel-resize-handle-enabled","data-panel-resize-handle-id"]))}}),[YA,MA]=vn("SwitchRoot"),qA=W({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{disabled:s}=bn(n),r=Ir(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function o(){s.value||(r.value=!r.value)}const{forwardRef:a,currentElement:l}=Je(),c=Pm(l),u=J(()=>{var O;return n.id&&l.value?(O=document.querySelector(`[for="${n.id}"]`))==null?void 0:O.innerText:void 0});return MA({modelValue:r,toggleCheck:o,disabled:s}),(O,f)=>(C(),j($(Ue),be(O.$attrs,{id:O.id,ref:$(a),role:"switch",type:O.as==="button"?"button":void 0,value:O.value,"aria-label":O.$attrs["aria-label"]||u.value,"aria-checked":$(r),"aria-required":O.required,"data-state":$(r)?"checked":"unchecked","data-disabled":$(s)?"":void 0,"as-child":O.asChild,as:O.as,disabled:$(s),onClick:o,onKeydown:jO(He(o,["prevent"]),["enter"])}),{default:z(()=>[le(O.$slots,"default",{modelValue:$(r)}),$(c)&&O.name?(C(),j($(s1),{key:0,type:"checkbox",name:O.name,disabled:$(s),required:O.required,value:O.value,checked:!!$(r)},null,8,["name","disabled","required","value","checked"])):Pe("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),IA=W({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=YA();return Je(),(n,i)=>{var s;return C(),j($(Ue),{"data-state":(s=$(e).modelValue)!=null&&s.value?"checked":"unchecked","data-disabled":$(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:z(()=>[le(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}});function C1(t,e){return`${t}-trigger-${e}`}function V1(t,e){return`${t}-content-${e}`}const[km,UA]=vn("TabsRoot"),WA=W({__name:"TabsRoot",props:{defaultValue:{},orientation:{default:"horizontal"},dir:{},activationMode:{default:"automatic"},modelValue:{},unmountOnHide:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{orientation:s,unmountOnHide:r,dir:o}=bn(n),a=tf(o);Je();const l=Ir(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),c=te();return UA({modelValue:l,changeModelValue:u=>{l.value=u},orientation:s,dir:a,unmountOnHide:r,activationMode:n.activationMode,baseId:yi(void 0,"reka-tabs"),tabsList:c}),(u,O)=>(C(),j($(Ue),{dir:$(a),"data-orientation":$(s),"as-child":u.asChild,as:u.as},{default:z(()=>[le(u.$slots,"default",{modelValue:$(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),DA=W({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=Je(),i=km(),s=J(()=>C1(i.baseId,e.value)),r=J(()=>V1(i.baseId,e.value)),o=J(()=>e.value===i.modelValue.value),a=te(o.value);return Pt(()=>{requestAnimationFrame(()=>{a.value=!1})}),(l,c)=>(C(),j($(Fl),{present:l.forceMount||o.value,"force-mount":""},{default:z(({present:u})=>[X($(Ue),{id:r.value,ref:$(n),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":$(i).orientation.value,"aria-labelledby":s.value,hidden:!u,tabindex:"0",style:Gn({animationDuration:a.value?"0s":void 0})},{default:z(()=>[!$(i).unmountOnHide.value||u?le(l.$slots,"default",{key:0}):Pe("",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),LA=W({__name:"TabsList",props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(t){const e=t,{loop:n}=bn(e),{forwardRef:i,currentElement:s}=Je(),r=km();return r.tabsList=s,(o,a)=>(C(),j($($5),{"as-child":"",orientation:$(r).orientation.value,dir:$(r).dir.value,loop:$(n)},{default:z(()=>[X($(Ue),{ref:$(i),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":$(r).orientation.value},{default:z(()=>[le(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),NA=W({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,{forwardRef:n}=Je(),i=km(),s=J(()=>C1(i.baseId,e.value)),r=J(()=>V1(i.baseId,e.value)),o=J(()=>e.value===i.modelValue.value);return(a,l)=>(C(),j($(o1),{"as-child":"",focusable:!a.disabled,active:o.value},{default:z(()=>[X($(Ue),{id:s.value,ref:$(n),role:"tab",type:a.as==="button"?"button":void 0,as:a.as,"as-child":a.asChild,"aria-selected":o.value?"true":"false","aria-controls":r.value,"data-state":o.value?"active":"inactive",disabled:a.disabled,"data-disabled":a.disabled?"":void 0,"data-orientation":$(i).orientation.value,onMousedown:l[0]||(l[0]=He(c=>{!a.disabled&&c.ctrlKey===!1?$(i).changeModelValue(a.value):c.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=jO(c=>$(i).changeModelValue(a.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const c=$(i).activationMode!=="manual";!o.value&&!a.disabled&&c&&$(i).changeModelValue(a.value)})},{default:z(()=>[le(a.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}});function A1(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const e=GA(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{const a=o.split(Rm);return a[0]===""&&a.length!==1&&a.shift(),Z1(a,e)||BA(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},Z1=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),s=i?Z1(t.slice(1),i):void 0;if(s)return s;if(e.validators.length===0)return;const r=t.join(Rm);return(o=e.validators.find(({validator:a})=>a(r)))==null?void 0:o.classGroupId},eQ=/^\[(.+)\]$/,BA=t=>{if(eQ.test(t)){const e=eQ.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},GA=t=>{const{theme:e,classGroups:n}=t,i={nextPart:new Map,validators:[]};for(const s in n)bh(n[s],i,s,e);return i},bh=(t,e,n,i)=>{t.forEach(s=>{if(typeof s=="string"){const r=s===""?e:tQ(e,s);r.classGroupId=n;return}if(typeof s=="function"){if(FA(s)){bh(s(i),e,n,i);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([r,o])=>{bh(o,tQ(e,r),n,i)})})},tQ=(t,e)=>{let n=t;return e.split(Rm).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},FA=t=>t.isThemeGetter,HA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const s=(r,o)=>{n.set(r,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(r){let o=n.get(r);if(o!==void 0)return o;if((o=i.get(r))!==void 0)return s(r,o),o},set(r,o){n.has(r)?n.set(r,o):s(r,o)}}},Sh="!",vh=":",KA=vh.length,JA=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=s=>{const r=[];let o=0,a=0,l=0,c;for(let h=0;hl?c-l:void 0;return{modifiers:r,hasImportantModifier:f,baseClassName:O,maybePostfixModifierPosition:d}};if(e){const s=e+vh,r=i;i=o=>o.startsWith(s)?r(o.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const s=i;i=r=>n({className:r,parseClassName:s})}return i},e8=t=>t.endsWith(Sh)?t.substring(0,t.length-1):t.startsWith(Sh)?t.substring(1):t,t8=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const s=[];let r=[];return i.forEach(o=>{o[0]==="["||e[o]?(s.push(...r.sort(),o),r=[]):r.push(o)}),s.push(...r.sort()),s}},n8=t=>({cache:HA(t.cacheSize),parseClassName:JA(t),sortModifiers:t8(t),...jA(t)}),i8=/\s+/,s8=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:r}=e,o=[],a=t.trim().split(i8);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:O,modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);if(O){l=u+(l.length>0?" "+l:l);continue}let m=!!p,g=i(m?h.substring(0,p):h);if(!g){if(!m){l=u+(l.length>0?" "+l:l);continue}if(g=i(h),!g){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=r(f).join(":"),Q=d?b+Sh:b,y=Q+g;if(o.includes(y))continue;o.push(y);const S=s(g,m);for(let v=0;v0?" "+l:l)}return l};function r8(){let t=0,e,n,i="";for(;t{if(typeof t=="string")return t;let e,n="";for(let i=0;iO(u),t());return n=n8(c),i=n.cache.get,s=n.cache.set,r=a,a(l)}function a(l){const c=i(l);if(c)return c;const u=s8(l,n);return s(l,u),u}return function(){return r(r8.apply(null,arguments))}}const zt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},Y1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,a8=/^\d+\/\d+$/,l8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,O8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,so=t=>a8.test(t),ze=t=>!!t&&!Number.isNaN(Number(t)),zs=t=>!!t&&Number.isInteger(Number(t)),Ff=t=>t.endsWith("%")&&ze(t.slice(0,-1)),ss=t=>l8.test(t),d8=()=>!0,h8=t=>c8.test(t)&&!u8.test(t),q1=()=>!1,p8=t=>O8.test(t),m8=t=>f8.test(t),g8=t=>!$e(t)&&!Qe(t),$8=t=>ra(t,W1,q1),$e=t=>Y1.test(t),Sr=t=>ra(t,D1,h8),Hf=t=>ra(t,v8,ze),nQ=t=>ra(t,I1,q1),Q8=t=>ra(t,U1,m8),Tc=t=>ra(t,L1,p8),Qe=t=>M1.test(t),Sa=t=>oa(t,D1),y8=t=>oa(t,P8),iQ=t=>oa(t,I1),b8=t=>oa(t,W1),S8=t=>oa(t,U1),_c=t=>oa(t,L1,!0),ra=(t,e,n)=>{const i=Y1.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},oa=(t,e,n=!1)=>{const i=M1.exec(t);return i?i[1]?e(i[1]):n:!1},I1=t=>t==="position"||t==="percentage",U1=t=>t==="image"||t==="url",W1=t=>t==="length"||t==="size"||t==="bg-size",D1=t=>t==="length",v8=t=>t==="number",P8=t=>t==="family-name",L1=t=>t==="shadow",x8=()=>{const t=zt("color"),e=zt("font"),n=zt("text"),i=zt("font-weight"),s=zt("tracking"),r=zt("leading"),o=zt("breakpoint"),a=zt("container"),l=zt("spacing"),c=zt("radius"),u=zt("shadow"),O=zt("inset-shadow"),f=zt("text-shadow"),d=zt("drop-shadow"),h=zt("blur"),p=zt("perspective"),m=zt("aspect"),g=zt("ease"),b=zt("animate"),Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...y(),Qe,$e],v=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],w=()=>[Qe,$e,l],k=()=>[so,"full","auto",...w()],E=()=>[zs,"none","subgrid",Qe,$e],I=()=>["auto",{span:["full",zs,Qe,$e]},zs,Qe,$e],Z=()=>[zs,"auto",Qe,$e],K=()=>["auto","min","max","fr",Qe,$e],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...w()],q=()=>[so,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],Y=()=>[t,Qe,$e],F=()=>[...y(),iQ,nQ,{position:[Qe,$e]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",b8,$8,{size:[Qe,$e]}],fe=()=>[Ff,Sa,Sr],Te=()=>["","none","full",c,Qe,$e],Ve=()=>["",ze,Sa,Sr],Fe=()=>["solid","dashed","dotted","double"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>[ze,Ff,iQ,nQ],st=()=>["","none",h,Qe,$e],De=()=>["none",ze,Qe,$e],ft=()=>["none",ze,Qe,$e],Gt=()=>[ze,Qe,$e],xt=()=>[so,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ss],breakpoint:[ss],color:[d8],container:[ss],"drop-shadow":[ss],ease:["in","out","in-out"],font:[g8],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ss],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ss],shadow:[ss],spacing:["px",ze],text:[ss],"text-shadow":[ss],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",so,$e,Qe,m]}],container:["container"],columns:[{columns:[ze,$e,Qe,a]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[zs,"auto",Qe,$e]}],basis:[{basis:[so,"full","auto",a,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,so,"auto","initial","none",$e]}],grow:[{grow:["",ze,Qe,$e]}],shrink:[{shrink:["",ze,Qe,$e]}],order:[{order:[zs,"first","last","none",Qe,$e]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[a,"screen",...q()]}],"min-w":[{"min-w":[a,"screen","none",...q()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Sa,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Qe,Hf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ff,$e]}],"font-family":[{font:[y8,$e,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Qe,$e]}],"line-clamp":[{"line-clamp":[ze,"none",Qe,Hf]}],leading:[{leading:[r,...w()]}],"list-image":[{"list-image":["none",Qe,$e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Qe,$e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",Qe,Sr]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[ze,"auto",Qe,$e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qe,$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Qe,$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},zs,Qe,$e],radial:["",Qe,$e],conic:[zs,Qe,$e]},S8,Q8]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:fe()}],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:Te()}],"rounded-s":[{"rounded-s":Te()}],"rounded-e":[{"rounded-e":Te()}],"rounded-t":[{"rounded-t":Te()}],"rounded-r":[{"rounded-r":Te()}],"rounded-b":[{"rounded-b":Te()}],"rounded-l":[{"rounded-l":Te()}],"rounded-ss":[{"rounded-ss":Te()}],"rounded-se":[{"rounded-se":Te()}],"rounded-ee":[{"rounded-ee":Te()}],"rounded-es":[{"rounded-es":Te()}],"rounded-tl":[{"rounded-tl":Te()}],"rounded-tr":[{"rounded-tr":Te()}],"rounded-br":[{"rounded-br":Te()}],"rounded-bl":[{"rounded-bl":Te()}],"border-w":[{border:Ve()}],"border-w-x":[{"border-x":Ve()}],"border-w-y":[{"border-y":Ve()}],"border-w-s":[{"border-s":Ve()}],"border-w-e":[{"border-e":Ve()}],"border-w-t":[{"border-t":Ve()}],"border-w-r":[{"border-r":Ve()}],"border-w-b":[{"border-b":Ve()}],"border-w-l":[{"border-l":Ve()}],"divide-x":[{"divide-x":Ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Fe(),"hidden","none"]}],"divide-style":[{divide:[...Fe(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...Fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,Qe,$e]}],"outline-w":[{outline:["",ze,Sa,Sr]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",u,_c,Tc]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",O,_c,Tc]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[ze,Sr]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":Ve()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",f,_c,Tc]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[ze,Qe,$e]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":Re()}],"mask-image-linear-to-pos":[{"mask-linear-to":Re()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":Re()}],"mask-image-t-to-pos":[{"mask-t-to":Re()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":Re()}],"mask-image-r-to-pos":[{"mask-r-to":Re()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":Re()}],"mask-image-b-to-pos":[{"mask-b-to":Re()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":Re()}],"mask-image-l-to-pos":[{"mask-l-to":Re()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":Re()}],"mask-image-x-to-pos":[{"mask-x-to":Re()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":Re()}],"mask-image-y-to-pos":[{"mask-y-to":Re()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Qe,$e]}],"mask-image-radial-from-pos":[{"mask-radial-from":Re()}],"mask-image-radial-to-pos":[{"mask-radial-to":Re()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":Re()}],"mask-image-conic-to-pos":[{"mask-conic-to":Re()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Qe,$e]}],filter:[{filter:["","none",Qe,$e]}],blur:[{blur:st()}],brightness:[{brightness:[ze,Qe,$e]}],contrast:[{contrast:[ze,Qe,$e]}],"drop-shadow":[{"drop-shadow":["","none",d,_c,Tc]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",ze,Qe,$e]}],"hue-rotate":[{"hue-rotate":[ze,Qe,$e]}],invert:[{invert:["",ze,Qe,$e]}],saturate:[{saturate:[ze,Qe,$e]}],sepia:[{sepia:["",ze,Qe,$e]}],"backdrop-filter":[{"backdrop-filter":["","none",Qe,$e]}],"backdrop-blur":[{"backdrop-blur":st()}],"backdrop-brightness":[{"backdrop-brightness":[ze,Qe,$e]}],"backdrop-contrast":[{"backdrop-contrast":[ze,Qe,$e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,Qe,$e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,Qe,$e]}],"backdrop-invert":[{"backdrop-invert":["",ze,Qe,$e]}],"backdrop-opacity":[{"backdrop-opacity":[ze,Qe,$e]}],"backdrop-saturate":[{"backdrop-saturate":[ze,Qe,$e]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,Qe,$e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Qe,$e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",Qe,$e]}],ease:[{ease:["linear","initial",g,Qe,$e]}],delay:[{delay:[ze,Qe,$e]}],animate:[{animate:["none",b,Qe,$e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,Qe,$e]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:ft()}],"scale-x":[{"scale-x":ft()}],"scale-y":[{"scale-y":ft()}],"scale-z":[{"scale-z":ft()}],"scale-3d":["scale-3d"],skew:[{skew:Gt()}],"skew-x":[{"skew-x":Gt()}],"skew-y":[{"skew-y":Gt()}],transform:[{transform:[Qe,$e,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xt()}],"translate-x":[{"translate-x":xt()}],"translate-y":[{"translate-y":xt()}],"translate-z":[{"translate-z":xt()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Qe,$e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Qe,$e]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[ze,Sa,Sr,Hf]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},w8=o8(x8);function it(...t){return w8(E1(t))}const T8={key:0,class:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border"},_8=W({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{},withHandle:{type:Boolean}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,s=_t(n,"class","withHandle"),r=Fn(s,i);return(o,a)=>(C(),j($(zA),be({"data-slot":"resizable-handle"},$(r),{class:$(it)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",n.class)}),{default:z(()=>[n.withHandle?(C(),re("div",T8,[X($(fC),{class:"size-2.5"})])):Pe("",!0)]),_:1},16,["class"]))}}),sQ=W({__name:"ResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{type:[String,Object,Function]}},emits:["collapse","expand","resize"],setup(t,{emit:e}){const s=Fn(t,e);return(r,o)=>(C(),j($(EA),be({"data-slot":"resizable-panel"},$(s)),{default:z(()=>[le(r.$slots,"default")]),_:3},16))}}),k8=W({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,s=_t(n,"class"),r=Fn(s,i);return(o,a)=>(C(),j($(AA),be({"data-slot":"resizable-panel-group"},$(r),{class:$(it)("flex h-full w-full data-[orientation=vertical]:flex-col",n.class)}),{default:z(()=>[le(o.$slots,"default")]),_:3},16,["class"]))}}),R8=W({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=_t(n,"class"),r=Fn(s,i);return(o,a)=>(C(),j($(WA),be({"data-slot":"tabs"},$(r),{class:$(it)("flex flex-col gap-2",n.class)}),{default:z(()=>[le(o.$slots,"default")]),_:3},16,["class"]))}}),ro=W({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class");return(i,s)=>(C(),j($(DA),be({"data-slot":"tabs-content",class:$(it)("flex-1 outline-none",e.class)},$(n)),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),X8=W({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class");return(i,s)=>(C(),j($(LA),be({"data-slot":"tabs-list"},$(n),{class:$(it)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-b-lg p-[3px]",e.class)}),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),oo=W({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class"),i=Hi(n);return(s,r)=>(C(),j($(NA),be({"data-slot":"tabs-trigger"},$(i),{class:$(it)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:z(()=>[le(s.$slots,"default")]),_:3},16,["class"]))}}),rQ=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,oQ=E1,C8=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return oQ(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:r}=e,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],O=r==null?void 0:r[c];if(u===null)return null;const f=rQ(u)||rQ(O);return s[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[O,f]=u;return f===void 0||(c[O]=f),c},{}),l=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:O,className:f,...d}=u;return Object.entries(d).every(h=>{let[p,m]=h;return Array.isArray(m)?m.includes({...r,...a}[p]):{...r,...a}[p]===m})?[...c,O,f]:c},[]);return oQ(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},jn=W({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{type:[String,Object,Function],default:"button"}},setup(t){const e=t;return(n,i)=>(C(),j($(Ue),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:bt($(it)($(V8)({variant:n.variant,size:n.size}),e.class))},{default:z(()=>[le(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),V8=C8("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Ft=[];for(let t=0;t<256;++t)Ft.push((t+256).toString(16).slice(1));function A8(t,e=0){return(Ft[t[e+0]]+Ft[t[e+1]]+Ft[t[e+2]]+Ft[t[e+3]]+"-"+Ft[t[e+4]]+Ft[t[e+5]]+"-"+Ft[t[e+6]]+Ft[t[e+7]]+"-"+Ft[t[e+8]]+Ft[t[e+9]]+"-"+Ft[t[e+10]]+Ft[t[e+11]]+Ft[t[e+12]]+Ft[t[e+13]]+Ft[t[e+14]]+Ft[t[e+15]]).toLowerCase()}let Kf;const E8=new Uint8Array(16);function Z8(){if(!Kf){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Kf=crypto.getRandomValues.bind(crypto)}return Kf(E8)}const z8=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),aQ={randomUUID:z8};function Uo(t,e,n){var s;if(aQ.randomUUID&&!t)return aQ.randomUUID();t=t||{};const i=t.random??((s=t.rng)==null?void 0:s.call(t))??Z8();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,A8(i)}class N1{constructor(){de(this,"uuid","");de(this,"formula","");de(this,"calcValue","");de(this,"calcValue1","");de(this,"calcValue2","");de(this,"calcValue3","");de(this,"calcValue4","");de(this,"calcValue5","");de(this,"calcValue6","");de(this,"calcValue7","");de(this,"calcValue8","");de(this,"calcValue9","");de(this,"calcValue10","");de(this,"flatRate","");de(this,"value","");de(this,"dependencys",[]);this.uuid=Uo()}addDependency(e){this.dependencys.push(e)}toJSON(){return{formula:this.formula,calcValue:this.calcValue,calcValue1:this.calcValue1,calcValue2:this.calcValue2,calcValue3:this.calcValue3,calcValue4:this.calcValue4,calcValue5:this.calcValue5,calcValue6:this.calcValue6,calcValue7:this.calcValue7,calcValue8:this.calcValue8,calcValue9:this.calcValue9,calcValue10:this.calcValue10,flatRate:this.flatRate,value:this.value,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.formula=e.formula,this.value=e.value,this.flatRate=e.flatRate,this.calcValue=e.calcValue,this.calcValue1=e.calcValue1,this.calcValue2=e.calcValue2,this.calcValue3=e.calcValue3,this.calcValue4=e.calcValue4,this.calcValue5=e.calcValue5,this.calcValue6=e.calcValue6,this.calcValue7=e.calcValue7,this.calcValue8=e.calcValue8,this.calcValue9=e.calcValue9,this.calcValue10=e.calcValue10,e.dependencys.map(n=>{const i=new aa;i.fromJSON(n),this.dependencys.push(i)})}}class aa{constructor(){de(this,"uuid","");de(this,"relation","");de(this,"formula","");de(this,"borders",[]);this.uuid=Uo()}addBorder(e){this.borders.push(e)}toJSON(){return{formula:this.formula,relation:this.relation,borders:this.borders.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.relation=e.relation,this.formula=e.formula,e.borders.map(n=>{const i=new N1;i.fromJSON(n),this.borders.push(i)})}}class Ki{constructor(){de(this,"uuid","");de(this,"id","");de(this,"type",1);de(this,"isFocused",!1);de(this,"dependencys",[]);this.uuid=Uo(),this.id=this.uuid}hasDependencys(){return this.dependencys.length>0}toJSON(){return{id:this.id,type:this.type,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.id=e.id,this.type=e.type,e.dependencys.map(n=>{const i=new aa;i.fromJSON(n),this.dependencys.push(i)})}changeFocus(e){this.uuid==e?this.isFocused=!0:this.isFocused=!1}addDependency(e){this.dependencys.push(e)}insertItem(e,n){return!1}cutItem(e){return null}deleteItem(e){return!1}}class lQ extends Error{constructor(n,i,s){const r=n.status||n.status===0?n.status:"",o=n.statusText||"",a=`${r} ${o}`.trim(),l=a?`status code ${a}`:"an unknown error";super(`Request failed with ${l}: ${i.method} ${i.url}`);de(this,"response");de(this,"request");de(this,"options");this.name="HTTPError",this.response=n,this.request=i,this.options=s}}class j1 extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);de(this,"request");this.name="TimeoutError",this.request=n}}const cQ=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(n&&i)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(s){if(s instanceof Error&&s.message==="unsupported BodyInit type")return!1;throw s}return t&&!e})(),Y8=typeof globalThis.AbortController=="function",M8=typeof globalThis.ReadableStream=="function",q8=typeof globalThis.FormData=="function",B1=["get","post","put","patch","head","delete"],I8={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Jf=2147483647,U8=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,G1=Symbol("stop"),W8={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},D8={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},L8=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[n,i]of t)e+=U8,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,e+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},N8=(t,e)=>{const n=Number(t.headers.get("content-length"))||0;let i=0;return t.status===204?(e&&e({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new Response(new ReadableStream({async start(s){const r=t.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function o(){const{done:a,value:l}=await r.read();if(a){s.close();return}if(e){i+=l.byteLength;const c=n===0?0:i/n;e({percent:c,transferredBytes:i,totalBytes:n},l)}s.enqueue(l),await o()}await o()}}),{status:t.status,statusText:t.statusText,headers:t.headers})},j8=(t,e)=>{const n=L8(t.body);let i=0;return new Request(t,{duplex:"half",body:new ReadableStream({async start(s){const r=t.body instanceof ReadableStream?t.body.getReader():new Response("").body.getReader();async function o(){const{done:a,value:l}=await r.read();if(a){e&&e({percent:1,transferredBytes:i,totalBytes:Math.max(n,i)},new Uint8Array),s.close();return}i+=l.byteLength;let c=n===0?0:i/n;(nt!==null&&typeof t=="object",kc=(...t)=>{for(const e of t)if((!Za(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Xm({},...t)},F1=(t={},e={})=>{const n=new globalThis.Headers(t),i=e instanceof globalThis.Headers,s=new globalThis.Headers(e);for(const[r,o]of s.entries())i&&o==="undefined"||o===void 0?n.delete(r):n.set(r,o);return n};function Rc(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:Xm(t[n]??[],e[n]??[])}const H1=(t={},e={})=>({beforeRequest:Rc(t,e,"beforeRequest"),beforeRetry:Rc(t,e,"beforeRetry"),afterResponse:Rc(t,e,"afterResponse"),beforeError:Rc(t,e,"beforeError")}),Xm=(...t)=>{let e={},n={},i={};for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(Za(s)){for(let[r,o]of Object.entries(s))Za(o)&&r in e&&(o=Xm(e[r],o)),e={...e,[r]:o};Za(s.hooks)&&(i=H1(i,s.hooks),e.hooks=i),Za(s.headers)&&(n=F1(n,s.headers),e.headers=n)}return e},B8=t=>B1.includes(t)?t.toUpperCase():t,G8=["get","put","head","delete","options","trace"],F8=[408,413,429,500,502,503,504],H8=[413,429,503],uQ={limit:2,methods:G8,statusCodes:F8,afterStatusCodes:H8,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},K8=(t={})=>{if(typeof t=="number")return{...uQ,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...uQ,...t}};async function J8(t,e,n,i){return new Promise((s,r)=>{const o=setTimeout(()=>{n&&n.abort(),r(new j1(t))},i.timeout);i.fetch(t,e).then(s).catch(r).then(()=>{clearTimeout(o)})})}async function eE(t,{signal:e}){return new Promise((n,i)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",s,{once:!0}));function s(){clearTimeout(r),i(e.reason)}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",s),n()},t)})}const tE=(t,e)=>{const n={};for(const i in e)!(i in D8)&&!(i in W8)&&!(i in t)&&(n[i]=e[i]);return n};class Bu{constructor(e,n={}){de(this,"request");de(this,"abortController");de(this,"_retryCount",0);de(this,"_input");de(this,"_options");var i,s;if(this._input=e,this._options={...n,headers:F1(this._input.headers,n.headers),hooks:H1({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:B8(n.method??this._input.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:K8(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(Y8){const r=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=r?AbortSignal.any([r,this.abortController.signal]):this.abortController.signal}if(cQ&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((s=(i=this._options).stringifyJson)==null?void 0:s.call(i,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(q8&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!cQ)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=j8(this.request,this._options.onUploadProgress))}}static create(e,n){const i=new Bu(e,n),s=async()=>{if(typeof i._options.timeout=="number"&&i._options.timeout>Jf)throw new RangeError(`The \`timeout\` option cannot be greater than ${Jf}`);await Promise.resolve();let a=await i._fetch();for(const l of i._options.hooks.afterResponse){const c=await l(i.request,i._options,i._decorateResponse(a.clone()));c instanceof globalThis.Response&&(a=c)}if(i._decorateResponse(a),!a.ok&&i._options.throwHttpErrors){let l=new lQ(a,i.request,i._options);for(const c of i._options.hooks.beforeError)l=await c(l);throw l}if(i._options.onDownloadProgress){if(typeof i._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!M8)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return N8(a.clone(),i._options.onDownloadProgress)}return a},o=(i._options.retry.methods.includes(i.request.method.toLowerCase())?i._retry(s):s()).finally(async()=>{var a;i.request.bodyUsed||await((a=i.request.body)==null?void 0:a.cancel())});for(const[a,l]of Object.entries(I8))o[a]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||l);const c=await o;if(a==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await c.text())}return c[a]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof j1)throw e;if(e instanceof lQ){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const i=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(i&&this._options.retry.afterStatusCodes.includes(e.response.status)){let s=Number(i)*1e3;Number.isNaN(s)?s=Date.parse(i)-Date.now():s>=Date.parse("2024-01-01")&&(s-=Date.now());const r=this._options.retry.maxRetryAfter??s;return sthis._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(n){const i=Math.min(this._calculateRetryDelay(n),Jf);if(this._retryCount<1)throw n;await eE(i,{signal:this._options.signal});for(const s of this._options.hooks.beforeRetry)if(await s({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===G1)return;return this._retry(e)}}async _fetch(){for(const i of this._options.hooks.beforeRequest){const s=await i(this.request,this._options);if(s instanceof Request){this.request=s;break}if(s instanceof Response)return s}const e=tE(this.request,this._options),n=this.request;return this.request=n.clone(),this._options.timeout===!1?this._options.fetch(n,e):J8(n,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const Ph=t=>{const e=(n,i)=>Bu.create(n,kc(t,i));for(const n of B1)e[n]=(i,s)=>Bu.create(i,kc(t,s,{method:n}));return e.create=n=>Ph(kc(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),Ph(kc(t,n))),e.stop=G1,e},ed=Ph(),Cs=ed.create({prefixUrl:"/apps",headers:{"Content-Type":"application/json"},timeout:1e4,hooks:{afterResponse:[(t,e,n)=>(console.log(n),n),async(t,e,n)=>{if(n.status===403){const i=await ed("https://example.com/token").text();return t.headers.set("Authorization",`token ${i}`),ed(t)}}]}}),nE=async t=>{try{return await(await Cs.post("api/plugin/system/psc/xmlcalc/product/config",{json:{product:t}})).json()}catch(e){throw console.error("Error loading JSON from API:",e),e}},iE=async t=>{try{return await(await Cs.post("api/plugin/system/psc/xmlcalc/price",{json:{product:t}})).json()}catch(e){throw console.error("Error loading price from API:",e),e}},sE=async(t,e)=>{try{return await(await Cs.post("api/plugin/system/psc/xmlcalc/product/design",{json:{product:t,jsonProduct:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},rE=async(t,e)=>{try{return await(await Cs.post("api/plugin/system/psc/xmlcalc/product/xml",{json:{product:t,xml:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},oE=async(t,e)=>{try{return await(await Cs.put("api/plugin/system/psc/xmlcalc/product/"+t,{json:{calcXml:e}})).json()}catch(n){throw console.error("Error XML to PRODUCT API:",n),n}},aE=async(t,e,n)=>{try{return await(await Cs.put("api/plugin/system/psc/xmlcalc/shop/"+t,{json:{formel:e,parameter:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},lE=async(t,e)=>{try{return await(await Cs.put("api/system/papercontainer",{json:{content:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},cE=async(t,e,n)=>{const i=new FormData;i.append("file",t),i.append("folder",e);try{return await(await Cs.post("api/media/create",{body:i,headers:{"Content-Type":"multipart/form-data"},onDownloadProgress:r=>{n(Math.round(r.percent*100))}})).json()}catch(s){throw console.error("Error uploading file:",s),s}},uE=async()=>{try{return await(await Cs.get("api/media/folder/all")).json()}catch(t){throw console.error("Error fetching media directories:",t),t}};class OQ extends Ki{constructor(){super();de(this,"default","");de(this,"placeHolder","Placeholder");de(this,"required",!1);de(this,"name","");de(this,"xmlType","input");de(this,"minValue",0);de(this,"minCalc","");de(this,"maxCalc","");de(this,"maxValue",0);this.type=2}toJSON(){return Object.assign(super.toJSON(),{placeHolder:this.placeHolder,default:this.default,name:this.name,minValue:this.minValue,minCalc:this.minCalc,maxValue:this.maxValue,maxCalc:this.maxCalc,required:this.required})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.required=n.required,this.placeHolder=n.placeHolder,this.minValue=n.minValue,this.minCalc=n.minCalc,this.maxValue=n.maxValue,this.maxCalc=n.maxCalc}}class Er extends Ki{constructor(){super();de(this,"items",[]);this.type=8}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),n.options.map(i=>{const s=Jr.getModelForType(i.type);s.fromJSON(i),this.items.push(s)})}cutItem(n){let i=null;return this.items.forEach((s,r)=>{if(s.uuid===n)return i=this.items.splice(r,1)[0],!0;i===null&&(i=s.cutItem(n))}),i}insertItem(n,i){let s=!1;for(let r=0;r{if(i.uuid===n.uuid)return n=this.items.splice(s,1)[0],!0;if(i.deleteItem(n))return!0})}}class K1 extends Ki{constructor(){super();de(this,"columns",[]);this.type=7}addColumnAtTheEnd(n){this.columns.push(n)}addColumnAtTheBeginning(n){this.columns.unshift(n)}deleteColumnAt(n){return this.columns.some((i,s)=>{if(i.uuid===n)return this.columns.splice(s,1)[0],!0})}addColumnAt(n,i){let s=!1;for(let r=0;r(n.push(i.toJSON()),n),[])})}cutItem(n){let i=null;return this.columns.some(s=>{if(i=s.cutItem(n),i!==null)return!0}),i}insertItem(n,i){return this.columns.some(s=>{if(s.insertItem(n,i))return!0}),!1}deleteItem(n){return this.columns.some(i=>{if(i.deleteItem(n))return!0}),!1}insertItemInEmptyColumn(n,i,s){return this.uuid==i?(s.items.push(n),!0):!1}fromJSON(n){super.fromJSON(n),n.columns.map(i=>{const s=new Er;s.fromJSON(i),this.columns.push(s)})}}class J1 extends Ki{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","img");this.type=9}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class eP extends Ki{constructor(){super();de(this,"items",[]);de(this,"label","");this.type=12}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{label:this.label,options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),this.label=n.label,n.options.map(i=>{const s=Jr.getModelForType(i.type);s.fromJSON(i),this.items.push(s)})}cutItem(n){let i=null;return this.items.forEach((s,r)=>{if(s.uuid===n)return i=this.items.splice(r,1)[0],!0;i===null&&(i=s.cutItem(n))}),i}insertItem(n,i){let s=!1;for(let r=0;r{if(i.uuid===n.uuid)return n=this.items.splice(s,1)[0],!0;if(i.deleteItem(n))return!0})}}class tP extends Ki{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","hidden");this.type=1,this.name="hidden"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}let nP=class{constructor(e){de(this,"uuid","");de(this,"id","");de(this,"name","");de(this,"dependencys",[]);this.uuid=Uo(),this.id=e}addDependency(e){this.dependencys.push(e)}toJSON(){return{id:this.id,name:this.name,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.name=e.name,this.id=e.id,e.dependencys.map(n=>{const i=new aa;i.fromJSON(n),this.dependencys.push(i)})}};class iP extends Ki{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","select");de(this,"options",[]);de(this,"mode","normal");de(this,"container","");this.type=3}addOption(n){this.options.push(n)}hasDependencys(){return this.options.reduce((i,s)=>(s.dependencys.length>0&&(i=!0),i),!1)||super.hasDependencys()}toJSON(){return Object.assign(super.toJSON(),{default:this.default,mode:this.mode,container:this.container,options:this.options.reduce((n,i)=>(n.push(i.toJSON()),n),[]),name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.mode=n.mode,this.container=n.container,this.default=n.default,n.options.map(i=>{const s=new nP("");s.fromJSON(i),this.options.push(s)})}}class OE extends Ki{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","text");this.type=4,this.default="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class fE extends Ki{constructor(){super();de(this,"default","");de(this,"name","");de(this,"xmlType","text");this.type=5}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class sP extends Ki{constructor(){super();de(this,"default","");de(this,"variant","1");de(this,"name","");de(this,"xmlType","text");this.type=6,this.default="Headline"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name,variant:this.variant})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.variant=n.variant}}let Jr=class{static getModelForType(e){switch(e){case 12:return new eP;case 9:return new J1;case 8:return new Er;case 7:return new K1;case 6:return new sP;case 5:return new fE;case 4:return new OE;case 3:return new iP;case 2:return new OQ;case 1:return new tP;default:return new OQ}}};const la=wv("items",{state:()=>({uuid:Uo(),items:[],name:Uo()}),getters:{getCount:t=>t.items.length,getItems:t=>t.items,getUuid:t=>t.uuid},actions:{loadJSON(){let t=this.items.reduce((e,n)=>(e.push(n.toJSON()),e),[]);return[{uuid:this.uuid,name:this.name,options:t}]},parseJSON(t){this.items=[];let e=JSON.parse(t);this.name=e[0].name,e[0].uuid&&(this.uuid=e[0].uuid),e[0].options.map(n=>{const i=Jr.getModelForType(n.type);i.fromJSON(n),this.addElement(i)})},addElement(t){this.items.push(t)},deleteItem(t){return this.items.some((e,n)=>{if(e.uuid===t.uuid)return t=this.items.splice(n,1)[0],!0;if(e.deleteItem(t))return!0})},moveItemBefore(t,e){const n=this.cutItem(t);return n?this.insertItem(this.items,n,e):!1},addElementAfter(t,e){this.insertItem(this.items,t,e)},cutItem(t){let e=null;return this.items.some((n,i)=>{if(n.uuid===t)return e=this.items.splice(i,1)[0],!0;if(e===null&&(e=n.cutItem(t),e!==null))return!0}),e},insertItem(t,e,n){let i=!1;for(let s=0;s({activeItem:{},formulaData:[],formulaError:"",productUuid:"",isFormulaLoading:!1,showProperties:!1,showDependency:!1,showOptions:!1,showPreview:!1,sourceDragUuid:"",dragMode:"",json:"",xml:"",formulas:"",paperContainer:"",parameter:"",shopUuid:"",saving:!1,syncing:!1,currentTab:"designer"}),getters:{getActiveItem:t=>t.activeItem,isShowPropierties:t=>t.showProperties,isShowDependency:t=>t.showDependency,isShowOptions:t=>t.showOptions,isShowPreview:t=>t.showPreview,getSourceDragUuid:t=>t.sourceDragUuid,getDragMode:t=>t.dragMode,getFormulaData:t=>t.formulaData,getFormulaError:t=>t.formulaError},actions:{setXml(t){this.xml=t},setFormulas(t){this.formulas=t},setPaperContainer(t){this.paperContainer=t},setParameter(t){this.parameter=t},setJson(t){this.json=t},setShowDependency(t){this.showDependency=t},setShowOptions(t){this.showOptions=t},setShowProperties(t){this.showProperties=t},setProductUuid(t){this.productUuid=t},setShowPreview(t){this.showPreview=t},setActiveItem(t){this.activeItem=t},setSourceDragUuid(t){this.sourceDragUuid=t},setDragMode(t){this.dragMode=t},async loadConfigFromProductApi(t){const e=await nE(t);return this.json=e.json,this.xml=e.xml,this.parameter=e.parameter,this.formulas=e.formulas,this.paperContainer=e.paperContainer,this.shopUuid=e.shopUuid,e.json},async loadFormulaAnalyserDataFromApi(t){if(!(this.formulaData&&this.formulaData.length>0)){this.isFormulaLoading=!0,this.formulaError="";try{const e=await iE(t);if(e&&e.debug&&e.debug.graphJson)this.formulaData=JSON.parse(e.debug.graphJson);else throw new Error("Invalid or empty response format from API.")}catch(e){this.formulaError=`Failed to load formula data: ${e.message}`,console.error(e)}finally{this.isFormulaLoading=!1}}},setXML(t){this.xml=t},setJSON(t){this.json=t},saveDesign(t){sE(this.productUuid,t).then(e=>{this.setXML(e.xml),this.setJSON(e.json),this.formulaData=JSON.parse(e.jsonGraph)})},manualSave(){this.saving=!0,oE(this.productUuid,this.xml).then(t=>{this.saving=!1})},manualSync(){this.syncing=!0,this.currentTab=="xml"&&rE(this.productUuid,this.xml).then(t=>{this.setXML(t.xml),this.setJSON(t.json),this.formulaData=JSON.parse(t.jsonGraph),this.syncing=!1,la().parseJSON(t.json)}),(this.currentTab=="formulas"||this.currentTab=="parameter")&&aE(this.shopUuid,this.formulas,this.parameter).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1}),this.currentTab=="paperdb"&&lE(this.shopUuid,this.paperContainer).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1})},setCurrentTab(t){this.currentTab=t}}}),dE={class:"w-full p-2 flex"},hE=W({__name:"TopBar",setup(t){const e=sn();function n(){e.manualSave()}return(i,s)=>(C(),re("div",dE,[X($(jn),{onClick:n,disabled:$(e).saving},{default:z(()=>[Ae(ne($(e).saving?i.$t("saving"):i.$t("save")),1)]),_:1},8,["disabled"])]))}}),pE=W({__name:"Switch",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean},id:{},value:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=_t(n,"class"),r=Fn(s,i);return(o,a)=>(C(),j($(qA),be({"data-slot":"switch"},$(r),{class:$(it)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:z(()=>[X($(IA),{"data-slot":"switch-thumb",class:bt($(it)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:z(()=>[le(o.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),rP=W({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class");return(i,s)=>(C(),j($(Y5),be({"data-slot":"label"},$(n),{class:$(it)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class)}),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}});/*! * shared v11.1.9 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const wu=typeof window<"u",sr=(t,e=!1)=>e?Symbol.for(t):Symbol(t),VI=(t,e,n)=>BI({l:t,k:e,s:n}),BI=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Tt=t=>typeof t=="number"&&isFinite(t),FI=t=>Bm(t)==="[object Date]",Eo=t=>Bm(t)==="[object RegExp]",Ef=t=>$e(t)&&Object.keys(t).length===0,Ft=Object.assign,WI=Object.create,rt=(t=null)=>WI(t);let ly;const yr=()=>ly||(ly=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:rt());function ay(t){return t.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const zI=Object.prototype.hasOwnProperty;function li(t,e){return zI.call(t,e)}const wt=Array.isArray,mt=t=>typeof t=="function",ye=t=>typeof t=="string",Qe=t=>typeof t=="boolean",et=t=>t!==null&&typeof t=="object",HI=t=>et(t)&&mt(t.then)&&mt(t.catch),kS=Object.prototype.toString,Bm=t=>kS.call(t),$e=t=>Bm(t)==="[object Object]",UI=t=>t==null?"":wt(t)||$e(t)&&t.toString===kS?JSON.stringify(t,null,2):String(t);function Fm(t,e=""){return t.reduce((n,i,s)=>s===0?n+i:n+e+i,"")}function jI(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const ic=t=>!et(t)||wt(t);function $c(t,e){if(ic(t)||ic(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:i,des:s}=n.pop();Object.keys(i).forEach(r=>{r!=="__proto__"&&(et(i[r])&&!et(s[r])&&(s[r]=Array.isArray(i[r])?[]:rt()),ic(s[r])||ic(i[r])?s[r]=i[r]:n.push({src:i[r],des:s[r]}))})}}/*! + */const Gu=typeof window<"u",pr=(t,e=!1)=>e?Symbol.for(t):Symbol(t),mE=(t,e,n)=>gE({l:t,k:e,s:n}),gE=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),At=t=>typeof t=="number"&&isFinite(t),$E=t=>Cm(t)==="[object Date]",Wo=t=>Cm(t)==="[object RegExp]",lf=t=>Me(t)&&Object.keys(t).length===0,Dt=Object.assign,QE=Object.create,ot=(t=null)=>QE(t);let fQ;const kr=()=>fQ||(fQ=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:ot());function dQ(t){return t.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const yE=Object.prototype.hasOwnProperty;function di(t,e){return yE.call(t,e)}const wt=Array.isArray,gt=t=>typeof t=="function",ge=t=>typeof t=="string",et=t=>typeof t=="boolean",nt=t=>t!==null&&typeof t=="object",bE=t=>nt(t)&>(t.then)&>(t.catch),oP=Object.prototype.toString,Cm=t=>oP.call(t),Me=t=>Cm(t)==="[object Object]",SE=t=>t==null?"":wt(t)||Me(t)&&t.toString===oP?JSON.stringify(t,null,2):String(t);function Vm(t,e=""){return t.reduce((n,i,s)=>s===0?n+i:n+e+i,"")}function vE(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const Xc=t=>!nt(t)||wt(t);function uu(t,e){if(Xc(t)||Xc(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:i,des:s}=n.pop();Object.keys(i).forEach(r=>{r!=="__proto__"&&(nt(i[r])&&!nt(s[r])&&(s[r]=Array.isArray(i[r])?[]:ot()),Xc(s[r])||Xc(i[r])?s[r]=i[r]:n.push({src:i[r],des:s[r]}))})}}/*! * message-compiler v11.1.9 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function qI(t,e,n){return{line:t,column:e,offset:n}}function Nh(t,e,n){return{start:t,end:e}}const it={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},KI=17;function Tf(t,e,n={}){const{domain:i,messages:s,args:r}=n,o=t,l=new SyntaxError(String(o));return l.code=t,e&&(l.location=e),l.domain=i,l}function GI(t){throw t}const Yi=" ",YI="\r",an=` -`,XI="\u2028",JI="\u2029";function QI(t){const e=t;let n=0,i=1,s=1,r=0;const o=O=>e[O]===YI&&e[O+1]===an,l=O=>e[O]===an,a=O=>e[O]===JI,c=O=>e[O]===XI,u=O=>o(O)||l(O)||a(O)||c(O),f=()=>n,d=()=>i,h=()=>s,p=()=>r,m=O=>o(O)||a(O)||c(O)?an:e[O],y=()=>m(n),g=()=>m(n+r);function x(){return r=0,u(n)&&(i++,s=0),o(n)&&n++,n++,s++,e[n]}function b(){return o(n+r)&&r++,r++,e[n+r]}function w(){n=0,i=1,s=1,r=0}function S(O=0){r=O}function k(){const O=n+r;for(;O!==n;)x();r=0}return{index:f,line:d,column:h,peekOffset:p,charAt:m,currentChar:y,currentPeek:g,next:x,peek:b,reset:w,resetPeek:S,skipToPeek:k}}const As=void 0,ZI=".",cy="'",e2="tokenizer";function t2(t,e={}){const n=e.location!==!1,i=QI(t),s=()=>i.index(),r=()=>qI(i.line(),i.column(),i.index()),o=r(),l=s(),a={currentType:13,offset:l,startLoc:o,endLoc:o,lastType:13,lastOffset:l,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>a,{onError:u}=e;function f(C,A,$,...z){const G=c();if(A.column+=$,A.offset+=$,u){const ie=n?Nh(G.startLoc,A):null,M=Tf(C,ie,{domain:e2,args:z});u(M)}}function d(C,A,$){C.endLoc=r(),C.currentType=A;const z={type:A};return n&&(z.loc=Nh(C.startLoc,C.endLoc)),$!=null&&(z.value=$),z}const h=C=>d(C,13);function p(C,A){return C.currentChar()===A?(C.next(),A):(f(it.EXPECTED_TOKEN,r(),0,A),"")}function m(C){let A="";for(;C.currentPeek()===Yi||C.currentPeek()===an;)A+=C.currentPeek(),C.peek();return A}function y(C){const A=m(C);return C.skipToPeek(),A}function g(C){if(C===As)return!1;const A=C.charCodeAt(0);return A>=97&&A<=122||A>=65&&A<=90||A===95}function x(C){if(C===As)return!1;const A=C.charCodeAt(0);return A>=48&&A<=57}function b(C,A){const{currentType:$}=A;if($!==2)return!1;m(C);const z=g(C.currentPeek());return C.resetPeek(),z}function w(C,A){const{currentType:$}=A;if($!==2)return!1;m(C);const z=C.currentPeek()==="-"?C.peek():C.currentPeek(),G=x(z);return C.resetPeek(),G}function S(C,A){const{currentType:$}=A;if($!==2)return!1;m(C);const z=C.currentPeek()===cy;return C.resetPeek(),z}function k(C,A){const{currentType:$}=A;if($!==7)return!1;m(C);const z=C.currentPeek()===".";return C.resetPeek(),z}function O(C,A){const{currentType:$}=A;if($!==8)return!1;m(C);const z=g(C.currentPeek());return C.resetPeek(),z}function _(C,A){const{currentType:$}=A;if(!($===7||$===11))return!1;m(C);const z=C.currentPeek()===":";return C.resetPeek(),z}function E(C,A){const{currentType:$}=A;if($!==9)return!1;const z=()=>{const ie=C.currentPeek();return ie==="{"?g(C.peek()):ie==="@"||ie==="|"||ie===":"||ie==="."||ie===Yi||!ie?!1:ie===an?(C.peek(),z()):F(C,!1)},G=z();return C.resetPeek(),G}function I(C){m(C);const A=C.currentPeek()==="|";return C.resetPeek(),A}function F(C,A=!0){const $=(G=!1,ie="")=>{const M=C.currentPeek();return M==="{"||M==="@"||!M?G:M==="|"?!(ie===Yi||ie===an):M===Yi?(C.peek(),$(!0,Yi)):M===an?(C.peek(),$(!0,an)):!0},z=$();return A&&C.resetPeek(),z}function L(C,A){const $=C.currentChar();return $===As?As:A($)?(C.next(),$):null}function Y(C){const A=C.charCodeAt(0);return A>=97&&A<=122||A>=65&&A<=90||A>=48&&A<=57||A===95||A===36}function ee(C){return L(C,Y)}function re(C){const A=C.charCodeAt(0);return A>=97&&A<=122||A>=65&&A<=90||A>=48&&A<=57||A===95||A===36||A===45}function q(C){return L(C,re)}function B(C){const A=C.charCodeAt(0);return A>=48&&A<=57}function N(C){return L(C,B)}function K(C){const A=C.charCodeAt(0);return A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102}function ue(C){return L(C,K)}function Se(C){let A="",$="";for(;A=N(C);)$+=A;return $}function fe(C){let A="";for(;;){const $=C.currentChar();if($==="{"||$==="}"||$==="@"||$==="|"||!$)break;if($===Yi||$===an)if(F(C))A+=$,C.next();else{if(I(C))break;A+=$,C.next()}else A+=$,C.next()}return A}function Oe(C){y(C);let A="",$="";for(;A=q(C);)$+=A;return C.currentChar()===As&&f(it.UNTERMINATED_CLOSING_BRACE,r(),0),$}function Pe(C){y(C);let A="";return C.currentChar()==="-"?(C.next(),A+=`-${Se(C)}`):A+=Se(C),C.currentChar()===As&&f(it.UNTERMINATED_CLOSING_BRACE,r(),0),A}function Ke(C){return C!==cy&&C!==an}function Re(C){y(C),p(C,"'");let A="",$="";for(;A=L(C,Ke);)A==="\\"?$+=Ae(C):$+=A;const z=C.currentChar();return z===an||z===As?(f(it.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),z===an&&(C.next(),p(C,"'")),$):(p(C,"'"),$)}function Ae(C){const A=C.currentChar();switch(A){case"\\":case"'":return C.next(),`\\${A}`;case"u":return nt(C,A,4);case"U":return nt(C,A,6);default:return f(it.UNKNOWN_ESCAPE_SEQUENCE,r(),0,A),""}}function nt(C,A,$){p(C,A);let z="";for(let G=0;G<$;G++){const ie=ue(C);if(!ie){f(it.INVALID_UNICODE_ESCAPE_SEQUENCE,r(),0,`\\${A}${z}${C.currentChar()}`);break}z+=ie}return`\\${A}${z}`}function ze(C){return C!=="{"&&C!=="}"&&C!==Yi&&C!==an}function ft(C){y(C);let A="",$="";for(;A=L(C,ze);)$+=A;return $}function qt(C){let A="",$="";for(;A=ee(C);)$+=A;return $}function vt(C){const A=$=>{const z=C.currentChar();return z==="{"||z==="@"||z==="|"||z==="("||z===")"||!z||z===Yi?$:($+=z,C.next(),A($))};return A("")}function T(C){y(C);const A=p(C,"|");return y(C),A}function R(C,A){let $=null;switch(C.currentChar()){case"{":return A.braceNest>=1&&f(it.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),C.next(),$=d(A,2,"{"),y(C),A.braceNest++,$;case"}":return A.braceNest>0&&A.currentType===2&&f(it.EMPTY_PLACEHOLDER,r(),0),C.next(),$=d(A,3,"}"),A.braceNest--,A.braceNest>0&&y(C),A.inLinked&&A.braceNest===0&&(A.inLinked=!1),$;case"@":return A.braceNest>0&&f(it.UNTERMINATED_CLOSING_BRACE,r(),0),$=U(C,A)||h(A),A.braceNest=0,$;default:{let G=!0,ie=!0,M=!0;if(I(C))return A.braceNest>0&&f(it.UNTERMINATED_CLOSING_BRACE,r(),0),$=d(A,1,T(C)),A.braceNest=0,A.inLinked=!1,$;if(A.braceNest>0&&(A.currentType===4||A.currentType===5||A.currentType===6))return f(it.UNTERMINATED_CLOSING_BRACE,r(),0),A.braceNest=0,te(C,A);if(G=b(C,A))return $=d(A,4,Oe(C)),y(C),$;if(ie=w(C,A))return $=d(A,5,Pe(C)),y(C),$;if(M=S(C,A))return $=d(A,6,Re(C)),y(C),$;if(!G&&!ie&&!M)return $=d(A,12,ft(C)),f(it.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,$.value),y(C),$;break}}return $}function U(C,A){const{currentType:$}=A;let z=null;const G=C.currentChar();switch(($===7||$===8||$===11||$===9)&&(G===an||G===Yi)&&f(it.INVALID_LINKED_FORMAT,r(),0),G){case"@":return C.next(),z=d(A,7,"@"),A.inLinked=!0,z;case".":return y(C),C.next(),d(A,8,".");case":":return y(C),C.next(),d(A,9,":");default:return I(C)?(z=d(A,1,T(C)),A.braceNest=0,A.inLinked=!1,z):k(C,A)||_(C,A)?(y(C),U(C,A)):O(C,A)?(y(C),d(A,11,qt(C))):E(C,A)?(y(C),G==="{"?R(C,A)||z:d(A,10,vt(C))):($===7&&f(it.INVALID_LINKED_FORMAT,r(),0),A.braceNest=0,A.inLinked=!1,te(C,A))}}function te(C,A){let $={type:13};if(A.braceNest>0)return R(C,A)||h(A);if(A.inLinked)return U(C,A)||h(A);switch(C.currentChar()){case"{":return R(C,A)||h(A);case"}":return f(it.UNBALANCED_CLOSING_BRACE,r(),0),C.next(),d(A,3,"}");case"@":return U(C,A)||h(A);default:{if(I(C))return $=d(A,1,T(C)),A.braceNest=0,A.inLinked=!1,$;if(F(C))return d(A,0,fe(C));break}}return $}function Z(){const{currentType:C,offset:A,startLoc:$,endLoc:z}=a;return a.lastType=C,a.lastOffset=A,a.lastStartLoc=$,a.lastEndLoc=z,a.offset=s(),a.startLoc=r(),i.currentChar()===As?d(a,13):te(i,a)}return{nextToken:Z,currentOffset:s,currentPosition:r,context:c}}const n2="parser",i2=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function s2(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function r2(t={}){const e=t.location!==!1,{onError:n}=t;function i(g,x,b,w,...S){const k=g.currentPosition();if(k.offset+=w,k.column+=w,n){const O=e?Nh(b,k):null,_=Tf(x,O,{domain:n2,args:S});n(_)}}function s(g,x,b){const w={type:g};return e&&(w.start=x,w.end=x,w.loc={start:b,end:b}),w}function r(g,x,b,w){e&&(g.end=x,g.loc&&(g.loc.end=b))}function o(g,x){const b=g.context(),w=s(3,b.offset,b.startLoc);return w.value=x,r(w,g.currentOffset(),g.currentPosition()),w}function l(g,x){const b=g.context(),{lastOffset:w,lastStartLoc:S}=b,k=s(5,w,S);return k.index=parseInt(x,10),g.nextToken(),r(k,g.currentOffset(),g.currentPosition()),k}function a(g,x){const b=g.context(),{lastOffset:w,lastStartLoc:S}=b,k=s(4,w,S);return k.key=x,g.nextToken(),r(k,g.currentOffset(),g.currentPosition()),k}function c(g,x){const b=g.context(),{lastOffset:w,lastStartLoc:S}=b,k=s(9,w,S);return k.value=x.replace(i2,s2),g.nextToken(),r(k,g.currentOffset(),g.currentPosition()),k}function u(g){const x=g.nextToken(),b=g.context(),{lastOffset:w,lastStartLoc:S}=b,k=s(8,w,S);return x.type!==11?(i(g,it.UNEXPECTED_EMPTY_LINKED_MODIFIER,b.lastStartLoc,0),k.value="",r(k,w,S),{nextConsumeToken:x,node:k}):(x.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,vi(x)),k.value=x.value||"",r(k,g.currentOffset(),g.currentPosition()),{node:k})}function f(g,x){const b=g.context(),w=s(7,b.offset,b.startLoc);return w.value=x,r(w,g.currentOffset(),g.currentPosition()),w}function d(g){const x=g.context(),b=s(6,x.offset,x.startLoc);let w=g.nextToken();if(w.type===8){const S=u(g);b.modifier=S.node,w=S.nextConsumeToken||g.nextToken()}switch(w.type!==9&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(w)),w=g.nextToken(),w.type===2&&(w=g.nextToken()),w.type){case 10:w.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(w)),b.key=f(g,w.value||"");break;case 4:w.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(w)),b.key=a(g,w.value||"");break;case 5:w.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(w)),b.key=l(g,w.value||"");break;case 6:w.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(w)),b.key=c(g,w.value||"");break;default:{i(g,it.UNEXPECTED_EMPTY_LINKED_KEY,x.lastStartLoc,0);const S=g.context(),k=s(7,S.offset,S.startLoc);return k.value="",r(k,S.offset,S.startLoc),b.key=k,r(b,S.offset,S.startLoc),{nextConsumeToken:w,node:b}}}return r(b,g.currentOffset(),g.currentPosition()),{node:b}}function h(g){const x=g.context(),b=x.currentType===1?g.currentOffset():x.offset,w=x.currentType===1?x.endLoc:x.startLoc,S=s(2,b,w);S.items=[];let k=null;do{const E=k||g.nextToken();switch(k=null,E.type){case 0:E.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(E)),S.items.push(o(g,E.value||""));break;case 5:E.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(E)),S.items.push(l(g,E.value||""));break;case 4:E.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(E)),S.items.push(a(g,E.value||""));break;case 6:E.value==null&&i(g,it.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,vi(E)),S.items.push(c(g,E.value||""));break;case 7:{const I=d(g);S.items.push(I.node),k=I.nextConsumeToken||null;break}}}while(x.currentType!==13&&x.currentType!==1);const O=x.currentType===1?x.lastOffset:g.currentOffset(),_=x.currentType===1?x.lastEndLoc:g.currentPosition();return r(S,O,_),S}function p(g,x,b,w){const S=g.context();let k=w.items.length===0;const O=s(1,x,b);O.cases=[],O.cases.push(w);do{const _=h(g);k||(k=_.items.length===0),O.cases.push(_)}while(S.currentType!==13);return k&&i(g,it.MUST_HAVE_MESSAGES_IN_PLURAL,b,0),r(O,g.currentOffset(),g.currentPosition()),O}function m(g){const x=g.context(),{offset:b,startLoc:w}=x,S=h(g);return x.currentType===13?S:p(g,b,w,S)}function y(g){const x=t2(g,Ft({},t)),b=x.context(),w=s(0,b.offset,b.startLoc);return e&&w.loc&&(w.loc.source=g),w.body=m(x),t.onCacheKey&&(w.cacheKey=t.onCacheKey(g)),b.currentType!==13&&i(x,it.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,g[b.offset]||""),r(w,x.currentOffset(),x.currentPosition()),w}return{parse:y}}function vi(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function o2(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:r=>(n.helpers.add(r),r)}}function uy(t,e){for(let n=0;nfy(n)),t}function fy(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;no;function a(m,y){o.code+=m}function c(m,y=!0){const g=y?i:"";a(s?g+" ".repeat(m):g)}function u(m=!0){const y=++o.indentLevel;m&&c(y)}function f(m=!0){const y=--o.indentLevel;m&&c(y)}function d(){c(o.indentLevel)}return{context:l,push:a,indent:u,deindent:f,newline:d,helper:m=>`_${m}`,needIndent:()=>o.needIndent}}function u2(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),To(t,e.key),e.modifier?(t.push(", "),To(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function f2(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const s=e.items.length;for(let r=0;r1){t.push(`${n("plural")}([`),t.indent(i());const s=e.cases.length;for(let r=0;r{const n=ye(e.mode)?e.mode:"normal",i=ye(e.filename)?e.filename:"message.intl";e.sourceMap;const s=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":` -`,r=e.needIndent?e.needIndent:n!=="arrow",o=t.helpers||[],l=c2(t,{filename:i,breakLineCode:s,needIndent:r});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(r),o.length>0&&(l.push(`const { ${Fm(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),l.newline()),l.push("return "),To(l,t),l.deindent(r),l.push("}"),delete t.helpers;const{code:a,map:c}=l.context();return{ast:t,code:a,map:c?c.toJSON():void 0}};function m2(t,e={}){const n=Ft({},e),i=!!n.jit,s=!!n.minify,r=n.optimize==null?!0:n.optimize,l=r2(n).parse(t);return i?(r&&a2(l),s&&Xr(l),{ast:l,code:""}):(l2(l,n),p2(l,n))}/*! + */function PE(t,e,n){return{line:t,column:e,offset:n}}function xh(t,e,n){return{start:t,end:e}}const rt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},xE=17;function cf(t,e,n={}){const{domain:i,messages:s,args:r}=n,o=t,a=new SyntaxError(String(o));return a.code=t,e&&(a.location=e),a.domain=i,a}function wE(t){throw t}const rs=" ",TE="\r",dn=` +`,_E="\u2028",kE="\u2029";function RE(t){const e=t;let n=0,i=1,s=1,r=0;const o=P=>e[P]===TE&&e[P+1]===dn,a=P=>e[P]===dn,l=P=>e[P]===kE,c=P=>e[P]===_E,u=P=>o(P)||a(P)||l(P)||c(P),O=()=>n,f=()=>i,d=()=>s,h=()=>r,p=P=>o(P)||l(P)||c(P)?dn:e[P],m=()=>p(n),g=()=>p(n+r);function b(){return r=0,u(n)&&(i++,s=0),o(n)&&n++,n++,s++,e[n]}function Q(){return o(n+r)&&r++,r++,e[n+r]}function y(){n=0,i=1,s=1,r=0}function S(P=0){r=P}function v(){const P=n+r;for(;P!==n;)b();r=0}return{index:O,line:f,column:d,peekOffset:h,charAt:p,currentChar:m,currentPeek:g,next:b,peek:Q,reset:y,resetPeek:S,skipToPeek:v}}const Ys=void 0,XE=".",hQ="'",CE="tokenizer";function VE(t,e={}){const n=e.location!==!1,i=RE(t),s=()=>i.index(),r=()=>PE(i.line(),i.column(),i.index()),o=r(),a=s(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function O(x,T,M,...D){const H=c();if(T.column+=M,T.offset+=M,u){const oe=n?xh(H.startLoc,T):null,V=cf(x,oe,{domain:CE,args:D});u(V)}}function f(x,T,M){x.endLoc=r(),x.currentType=T;const D={type:T};return n&&(D.loc=xh(x.startLoc,x.endLoc)),M!=null&&(D.value=M),D}const d=x=>f(x,13);function h(x,T){return x.currentChar()===T?(x.next(),T):(O(rt.EXPECTED_TOKEN,r(),0,T),"")}function p(x){let T="";for(;x.currentPeek()===rs||x.currentPeek()===dn;)T+=x.currentPeek(),x.peek();return T}function m(x){const T=p(x);return x.skipToPeek(),T}function g(x){if(x===Ys)return!1;const T=x.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T===95}function b(x){if(x===Ys)return!1;const T=x.charCodeAt(0);return T>=48&&T<=57}function Q(x,T){const{currentType:M}=T;if(M!==2)return!1;p(x);const D=g(x.currentPeek());return x.resetPeek(),D}function y(x,T){const{currentType:M}=T;if(M!==2)return!1;p(x);const D=x.currentPeek()==="-"?x.peek():x.currentPeek(),H=b(D);return x.resetPeek(),H}function S(x,T){const{currentType:M}=T;if(M!==2)return!1;p(x);const D=x.currentPeek()===hQ;return x.resetPeek(),D}function v(x,T){const{currentType:M}=T;if(M!==7)return!1;p(x);const D=x.currentPeek()===".";return x.resetPeek(),D}function P(x,T){const{currentType:M}=T;if(M!==8)return!1;p(x);const D=g(x.currentPeek());return x.resetPeek(),D}function w(x,T){const{currentType:M}=T;if(!(M===7||M===11))return!1;p(x);const D=x.currentPeek()===":";return x.resetPeek(),D}function k(x,T){const{currentType:M}=T;if(M!==9)return!1;const D=()=>{const oe=x.currentPeek();return oe==="{"?g(x.peek()):oe==="@"||oe==="|"||oe===":"||oe==="."||oe===rs||!oe?!1:oe===dn?(x.peek(),D()):I(x,!1)},H=D();return x.resetPeek(),H}function E(x){p(x);const T=x.currentPeek()==="|";return x.resetPeek(),T}function I(x,T=!0){const M=(H=!1,oe="")=>{const V=x.currentPeek();return V==="{"||V==="@"||!V?H:V==="|"?!(oe===rs||oe===dn):V===rs?(x.peek(),M(!0,rs)):V===dn?(x.peek(),M(!0,dn)):!0},D=M();return T&&x.resetPeek(),D}function Z(x,T){const M=x.currentChar();return M===Ys?Ys:T(M)?(x.next(),M):null}function K(x){const T=x.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36}function ie(x){return Z(x,K)}function ae(x){const T=x.charCodeAt(0);return T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===95||T===36||T===45}function G(x){return Z(x,ae)}function q(x){const T=x.charCodeAt(0);return T>=48&&T<=57}function Y(x){return Z(x,q)}function F(x){const T=x.charCodeAt(0);return T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102}function ue(x){return Z(x,F)}function Se(x){let T="",M="";for(;T=Y(x);)M+=T;return M}function fe(x){let T="";for(;;){const M=x.currentChar();if(M==="{"||M==="}"||M==="@"||M==="|"||!M)break;if(M===rs||M===dn)if(I(x))T+=M,x.next();else{if(E(x))break;T+=M,x.next()}else T+=M,x.next()}return T}function Te(x){m(x);let T="",M="";for(;T=G(x);)M+=T;return x.currentChar()===Ys&&O(rt.UNTERMINATED_CLOSING_BRACE,r(),0),M}function Ve(x){m(x);let T="";return x.currentChar()==="-"?(x.next(),T+=`-${Se(x)}`):T+=Se(x),x.currentChar()===Ys&&O(rt.UNTERMINATED_CLOSING_BRACE,r(),0),T}function Fe(x){return x!==hQ&&x!==dn}function Ze(x){m(x),h(x,"'");let T="",M="";for(;T=Z(x,Fe);)T==="\\"?M+=Re(x):M+=T;const D=x.currentChar();return D===dn||D===Ys?(O(rt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),D===dn&&(x.next(),h(x,"'")),M):(h(x,"'"),M)}function Re(x){const T=x.currentChar();switch(T){case"\\":case"'":return x.next(),`\\${T}`;case"u":return st(x,T,4);case"U":return st(x,T,6);default:return O(rt.UNKNOWN_ESCAPE_SEQUENCE,r(),0,T),""}}function st(x,T,M){h(x,T);let D="";for(let H=0;H{const D=x.currentChar();return D==="{"||D==="@"||D==="|"||D==="("||D===")"||!D||D===rs?M:(M+=D,x.next(),T(M))};return T("")}function R(x){m(x);const T=h(x,"|");return m(x),T}function A(x,T){let M=null;switch(x.currentChar()){case"{":return T.braceNest>=1&&O(rt.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),x.next(),M=f(T,2,"{"),m(x),T.braceNest++,M;case"}":return T.braceNest>0&&T.currentType===2&&O(rt.EMPTY_PLACEHOLDER,r(),0),x.next(),M=f(T,3,"}"),T.braceNest--,T.braceNest>0&&m(x),T.inLinked&&T.braceNest===0&&(T.inLinked=!1),M;case"@":return T.braceNest>0&&O(rt.UNTERMINATED_CLOSING_BRACE,r(),0),M=L(x,T)||d(T),T.braceNest=0,M;default:{let H=!0,oe=!0,V=!0;if(E(x))return T.braceNest>0&&O(rt.UNTERMINATED_CLOSING_BRACE,r(),0),M=f(T,1,R(x)),T.braceNest=0,T.inLinked=!1,M;if(T.braceNest>0&&(T.currentType===4||T.currentType===5||T.currentType===6))return O(rt.UNTERMINATED_CLOSING_BRACE,r(),0),T.braceNest=0,se(x,T);if(H=Q(x,T))return M=f(T,4,Te(x)),m(x),M;if(oe=y(x,T))return M=f(T,5,Ve(x)),m(x),M;if(V=S(x,T))return M=f(T,6,Ze(x)),m(x),M;if(!H&&!oe&&!V)return M=f(T,12,ft(x)),O(rt.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,M.value),m(x),M;break}}return M}function L(x,T){const{currentType:M}=T;let D=null;const H=x.currentChar();switch((M===7||M===8||M===11||M===9)&&(H===dn||H===rs)&&O(rt.INVALID_LINKED_FORMAT,r(),0),H){case"@":return x.next(),D=f(T,7,"@"),T.inLinked=!0,D;case".":return m(x),x.next(),f(T,8,".");case":":return m(x),x.next(),f(T,9,":");default:return E(x)?(D=f(T,1,R(x)),T.braceNest=0,T.inLinked=!1,D):v(x,T)||w(x,T)?(m(x),L(x,T)):P(x,T)?(m(x),f(T,11,Gt(x))):k(x,T)?(m(x),H==="{"?A(x,T)||D:f(T,10,xt(x))):(M===7&&O(rt.INVALID_LINKED_FORMAT,r(),0),T.braceNest=0,T.inLinked=!1,se(x,T))}}function se(x,T){let M={type:13};if(T.braceNest>0)return A(x,T)||d(T);if(T.inLinked)return L(x,T)||d(T);switch(x.currentChar()){case"{":return A(x,T)||d(T);case"}":return O(rt.UNBALANCED_CLOSING_BRACE,r(),0),x.next(),f(T,3,"}");case"@":return L(x,T)||d(T);default:{if(E(x))return M=f(T,1,R(x)),T.braceNest=0,T.inLinked=!1,M;if(I(x))return f(T,0,fe(x));break}}return M}function ee(){const{currentType:x,offset:T,startLoc:M,endLoc:D}=l;return l.lastType=x,l.lastOffset=T,l.lastStartLoc=M,l.lastEndLoc=D,l.offset=s(),l.startLoc=r(),i.currentChar()===Ys?f(l,13):se(i,l)}return{nextToken:ee,currentOffset:s,currentPosition:r,context:c}}const AE="parser",EE=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function ZE(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function zE(t={}){const e=t.location!==!1,{onError:n}=t;function i(g,b,Q,y,...S){const v=g.currentPosition();if(v.offset+=y,v.column+=y,n){const P=e?xh(Q,v):null,w=cf(b,P,{domain:AE,args:S});n(w)}}function s(g,b,Q){const y={type:g};return e&&(y.start=b,y.end=b,y.loc={start:Q,end:Q}),y}function r(g,b,Q,y){e&&(g.end=b,g.loc&&(g.loc.end=Q))}function o(g,b){const Q=g.context(),y=s(3,Q.offset,Q.startLoc);return y.value=b,r(y,g.currentOffset(),g.currentPosition()),y}function a(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:S}=Q,v=s(5,y,S);return v.index=parseInt(b,10),g.nextToken(),r(v,g.currentOffset(),g.currentPosition()),v}function l(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:S}=Q,v=s(4,y,S);return v.key=b,g.nextToken(),r(v,g.currentOffset(),g.currentPosition()),v}function c(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:S}=Q,v=s(9,y,S);return v.value=b.replace(EE,ZE),g.nextToken(),r(v,g.currentOffset(),g.currentPosition()),v}function u(g){const b=g.nextToken(),Q=g.context(),{lastOffset:y,lastStartLoc:S}=Q,v=s(8,y,S);return b.type!==11?(i(g,rt.UNEXPECTED_EMPTY_LINKED_MODIFIER,Q.lastStartLoc,0),v.value="",r(v,y,S),{nextConsumeToken:b,node:v}):(b.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,Q.lastStartLoc,0,xi(b)),v.value=b.value||"",r(v,g.currentOffset(),g.currentPosition()),{node:v})}function O(g,b){const Q=g.context(),y=s(7,Q.offset,Q.startLoc);return y.value=b,r(y,g.currentOffset(),g.currentPosition()),y}function f(g){const b=g.context(),Q=s(6,b.offset,b.startLoc);let y=g.nextToken();if(y.type===8){const S=u(g);Q.modifier=S.node,y=S.nextConsumeToken||g.nextToken()}switch(y.type!==9&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(y)),y=g.nextToken(),y.type===2&&(y=g.nextToken()),y.type){case 10:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(y)),Q.key=O(g,y.value||"");break;case 4:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(y)),Q.key=l(g,y.value||"");break;case 5:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(y)),Q.key=a(g,y.value||"");break;case 6:y.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(y)),Q.key=c(g,y.value||"");break;default:{i(g,rt.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const S=g.context(),v=s(7,S.offset,S.startLoc);return v.value="",r(v,S.offset,S.startLoc),Q.key=v,r(Q,S.offset,S.startLoc),{nextConsumeToken:y,node:Q}}}return r(Q,g.currentOffset(),g.currentPosition()),{node:Q}}function d(g){const b=g.context(),Q=b.currentType===1?g.currentOffset():b.offset,y=b.currentType===1?b.endLoc:b.startLoc,S=s(2,Q,y);S.items=[];let v=null;do{const k=v||g.nextToken();switch(v=null,k.type){case 0:k.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(k)),S.items.push(o(g,k.value||""));break;case 5:k.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(k)),S.items.push(a(g,k.value||""));break;case 4:k.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(k)),S.items.push(l(g,k.value||""));break;case 6:k.value==null&&i(g,rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,xi(k)),S.items.push(c(g,k.value||""));break;case 7:{const E=f(g);S.items.push(E.node),v=E.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const P=b.currentType===1?b.lastOffset:g.currentOffset(),w=b.currentType===1?b.lastEndLoc:g.currentPosition();return r(S,P,w),S}function h(g,b,Q,y){const S=g.context();let v=y.items.length===0;const P=s(1,b,Q);P.cases=[],P.cases.push(y);do{const w=d(g);v||(v=w.items.length===0),P.cases.push(w)}while(S.currentType!==13);return v&&i(g,rt.MUST_HAVE_MESSAGES_IN_PLURAL,Q,0),r(P,g.currentOffset(),g.currentPosition()),P}function p(g){const b=g.context(),{offset:Q,startLoc:y}=b,S=d(g);return b.currentType===13?S:h(g,Q,y,S)}function m(g){const b=VE(g,Dt({},t)),Q=b.context(),y=s(0,Q.offset,Q.startLoc);return e&&y.loc&&(y.loc.source=g),y.body=p(b),t.onCacheKey&&(y.cacheKey=t.onCacheKey(g)),Q.currentType!==13&&i(b,rt.UNEXPECTED_LEXICAL_ANALYSIS,Q.lastStartLoc,0,g[Q.offset]||""),r(y,b.currentOffset(),b.currentPosition()),y}return{parse:m}}function xi(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function YE(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:r=>(n.helpers.add(r),r)}}function pQ(t,e){for(let n=0;nmQ(n)),t}function mQ(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;no;function l(p,m){o.code+=p}function c(p,m=!0){const g=m?i:"";l(s?g+" ".repeat(p):g)}function u(p=!0){const m=++o.indentLevel;p&&c(m)}function O(p=!0){const m=--o.indentLevel;p&&c(m)}function f(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:O,newline:f,helper:p=>`_${p}`,needIndent:()=>o.needIndent}}function UE(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),Do(t,e.key),e.modifier?(t.push(", "),Do(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function WE(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const s=e.items.length;for(let r=0;r1){t.push(`${n("plural")}([`),t.indent(i());const s=e.cases.length;for(let r=0;r{const n=ge(e.mode)?e.mode:"normal",i=ge(e.filename)?e.filename:"message.intl";e.sourceMap;const s=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":` +`,r=e.needIndent?e.needIndent:n!=="arrow",o=t.helpers||[],a=IE(t,{filename:i,breakLineCode:s,needIndent:r});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(r),o.length>0&&(a.push(`const { ${Vm(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),Do(a,t),a.deindent(r),a.push("}"),delete t.helpers;const{code:l,map:c}=a.context();return{ast:t,code:l,map:c?c.toJSON():void 0}};function jE(t,e={}){const n=Dt({},e),i=!!n.jit,s=!!n.minify,r=n.optimize==null?!0:n.optimize,a=zE(n).parse(t);return i?(r&&qE(a),s&&Oo(a),{ast:a,code:""}):(ME(a,n),NE(a,n))}/*! * core-base v11.1.9 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function g2(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(yr().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(yr().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Li(t){return et(t)&&zm(t)===0&&(li(t,"b")||li(t,"body"))}const OS=["b","body"];function y2(t){return rr(t,OS)}const CS=["c","cases"];function b2(t){return rr(t,CS,[])}const _S=["s","static"];function v2(t){return rr(t,_S)}const AS=["i","items"];function w2(t){return rr(t,AS,[])}const ES=["t","type"];function zm(t){return rr(t,ES)}const TS=["v","value"];function sc(t,e){const n=rr(t,TS);if(n!=null)return n;throw ql(e)}const PS=["m","modifier"];function x2(t){return rr(t,PS)}const MS=["k","key"];function S2(t){const e=rr(t,MS);if(e)return e;throw ql(6)}function rr(t,e,n){for(let i=0;ik2(n,t)}function k2(t,e){const n=y2(e);if(n==null)throw ql(0);if(zm(n)===1){const r=b2(n);return t.plural(r.reduce((o,l)=>[...o,dy(t,l)],[]))}else return dy(t,n)}function dy(t,e){const n=v2(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const i=w2(e).reduce((s,r)=>[...s,$h(t,r)],[]);return t.normalize(i)}}function $h(t,e){const n=zm(e);switch(n){case 3:return sc(e,n);case 9:return sc(e,n);case 4:{const i=e;if(li(i,"k")&&i.k)return t.interpolate(t.named(i.k));if(li(i,"key")&&i.key)return t.interpolate(t.named(i.key));throw ql(n)}case 5:{const i=e;if(li(i,"i")&&Tt(i.i))return t.interpolate(t.list(i.i));if(li(i,"index")&&Tt(i.index))return t.interpolate(t.list(i.index));throw ql(n)}case 6:{const i=e,s=x2(i),r=S2(i);return t.linked($h(t,r),s?$h(t,s):void 0,t.type)}case 7:return sc(e,n);case 8:return sc(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const O2=t=>t;let rc=rt();function C2(t,e={}){let n=!1;const i=e.onError||GI;return e.onError=s=>{n=!0,i(s)},{...m2(t,e),detectError:n}}function _2(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ye(t)){Qe(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||O2)(t),s=rc[i];if(s)return s;const{ast:r,detectError:o}=C2(t,{...e,location:!1,jit:!0}),l=Sd(r);return o?l:rc[i]=l}else{const n=t.cacheKey;if(n){const i=rc[n];return i||(rc[n]=Sd(t))}else return Sd(t)}}let Kl=null;function A2(t){Kl=t}function E2(t,e,n){Kl&&Kl.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const T2=P2("function:translate");function P2(t){return e=>Kl&&Kl.emit(t,e)}const is={INVALID_ARGUMENT:KI,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},M2=24;function ss(t){return Tf(t,null,void 0)}function Hm(t,e){return e.locale!=null?hy(e.locale):hy(t.locale)}let kd;function hy(t){if(ye(t))return t;if(mt(t)){if(t.resolvedOnce&&kd!=null)return kd;if(t.constructor.name==="Function"){const e=t();if(HI(e))throw ss(is.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return kd=e}else throw ss(is.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw ss(is.NOT_SUPPORT_LOCALE_TYPE)}function D2(t,e,n){return[...new Set([n,...wt(e)?e:et(e)?Object.keys(e):ye(e)?[e]:[n]])]}function RS(t,e,n){const i=ye(n)?n:Gl,s=t;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(i);if(!r){r=[];let o=[n];for(;wt(o);)o=py(r,o,e);const l=wt(e)||!$e(e)?e:e.default?e.default:null;o=ye(l)?[l]:l,wt(o)&&py(r,o,!1),s.__localeChainCache.set(i,r)}return r}function py(t,e,n){let i=!0;for(let s=0;s{o===void 0?o=l:o+=l},d[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},d[2]=()=>{d[0](),s++},d[3]=()=>{if(s>0)s--,i=4,d[0]();else{if(s=0,o===void 0||(o=B2(o),o===!1))return!1;d[1]()}};function h(){const p=t[n+1];if(i===5&&p==="'"||i===6&&p==='"')return n++,l="\\"+p,d[0](),!0}for(;i!==null;)if(n++,r=t[n],!(r==="\\"&&h())){if(a=V2(r),f=or[i],c=f[a]||f.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=d[c[1]],u&&(l=r,u()===!1))))return;if(i===7)return e}}const my=new Map;function W2(t,e){return et(t)?t[e]:null}function z2(t,e){if(!et(t))return null;let n=my.get(e);if(n||(n=F2(e),n&&my.set(e,n)),!n)return null;const i=n.length;let s=t,r=0;for(;r`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function U2(){return{upper:(t,e)=>e==="text"&&ye(t)?t.toUpperCase():e==="vnode"&&et(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&ye(t)?t.toLowerCase():e==="vnode"&&et(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&ye(t)?yy(t):e==="vnode"&&et(t)&&"__v_isVNode"in t?yy(t.children):t}}let IS;function j2(t){IS=t}let LS;function q2(t){LS=t}let NS;function K2(t){NS=t}let $S=null;const G2=t=>{$S=t},Y2=()=>$S;let VS=null;const by=t=>{VS=t},X2=()=>VS;let vy=0;function J2(t={}){const e=mt(t.onWarn)?t.onWarn:jI,n=ye(t.version)?t.version:H2,i=ye(t.locale)||mt(t.locale)?t.locale:Gl,s=mt(i)?Gl:i,r=wt(t.fallbackLocale)||$e(t.fallbackLocale)||ye(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:s,o=$e(t.messages)?t.messages:Od(s),l=$e(t.datetimeFormats)?t.datetimeFormats:Od(s),a=$e(t.numberFormats)?t.numberFormats:Od(s),c=Ft(rt(),t.modifiers,U2()),u=t.pluralRules||rt(),f=mt(t.missing)?t.missing:null,d=Qe(t.missingWarn)||Eo(t.missingWarn)?t.missingWarn:!0,h=Qe(t.fallbackWarn)||Eo(t.fallbackWarn)?t.fallbackWarn:!0,p=!!t.fallbackFormat,m=!!t.unresolving,y=mt(t.postTranslation)?t.postTranslation:null,g=$e(t.processor)?t.processor:null,x=Qe(t.warnHtmlMessage)?t.warnHtmlMessage:!0,b=!!t.escapeParameter,w=mt(t.messageCompiler)?t.messageCompiler:IS,S=mt(t.messageResolver)?t.messageResolver:LS||W2,k=mt(t.localeFallbacker)?t.localeFallbacker:NS||D2,O=et(t.fallbackContext)?t.fallbackContext:void 0,_=t,E=et(_.__datetimeFormatters)?_.__datetimeFormatters:new Map,I=et(_.__numberFormatters)?_.__numberFormatters:new Map,F=et(_.__meta)?_.__meta:{};vy++;const L={version:n,cid:vy,locale:i,fallbackLocale:r,messages:o,modifiers:c,pluralRules:u,missing:f,missingWarn:d,fallbackWarn:h,fallbackFormat:p,unresolving:m,postTranslation:y,processor:g,warnHtmlMessage:x,escapeParameter:b,messageCompiler:w,messageResolver:S,localeFallbacker:k,fallbackContext:O,onWarn:e,__meta:F};return L.datetimeFormats=l,L.numberFormats=a,L.__datetimeFormatters=E,L.__numberFormatters=I,__INTLIFY_PROD_DEVTOOLS__&&E2(L,n,F),L}const Od=t=>({[t]:rt()});function Um(t,e,n,i,s){const{missing:r,onWarn:o}=t;if(r!==null){const l=r(t,n,e,s);return ye(l)?l:e}else return e}function tl(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function Q2(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function Z2(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let i=n+1;i{BS.includes(a)?o[a]=n[a]:r[a]=n[a]}),ye(i)?r.locale=i:$e(i)&&(o=i),$e(s)&&(o=s),[r.key||"",l,r,o]}function xy(t,e,n){const i=t;for(const s in n){const r=`${e}__${s}`;i.__datetimeFormatters.has(r)&&i.__datetimeFormatters.delete(r)}}function Sy(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:s,onWarn:r,localeFallbacker:o}=t,{__numberFormatters:l}=t,[a,c,u,f]=Bh(...e),d=Qe(u.missingWarn)?u.missingWarn:t.missingWarn;Qe(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const h=!!u.part,p=Hm(t,u),m=o(t,s,p);if(!ye(a)||a==="")return new Intl.NumberFormat(p,f).format(c);let y={},g,x=null;const b="number format";for(let k=0;k{FS.includes(a)?o[a]=n[a]:r[a]=n[a]}),ye(i)?r.locale=i:$e(i)&&(o=i),$e(s)&&(o=s),[r.key||"",l,r,o]}function ky(t,e,n){const i=t;for(const s in n){const r=`${e}__${s}`;i.__numberFormatters.has(r)&&i.__numberFormatters.delete(r)}}const eL=t=>t,tL=t=>"",nL="text",iL=t=>t.length===0?"":Fm(t),sL=UI;function Oy(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function rL(t){const e=Tt(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Tt(t.named.count)||Tt(t.named.n))?Tt(t.named.count)?t.named.count:Tt(t.named.n)?t.named.n:e:e}function oL(t,e){e.count||(e.count=t),e.n||(e.n=t)}function lL(t={}){const e=t.locale,n=rL(t),i=et(t.pluralRules)&&ye(e)&&mt(t.pluralRules[e])?t.pluralRules[e]:Oy,s=et(t.pluralRules)&&ye(e)&&mt(t.pluralRules[e])?Oy:void 0,r=g=>g[i(n,g.length,s)],o=t.list||[],l=g=>o[g],a=t.named||rt();Tt(t.pluralIndex)&&oL(n,a);const c=g=>a[g];function u(g,x){const b=mt(t.messages)?t.messages(g,!!x):et(t.messages)?t.messages[g]:!1;return b||(t.parent?t.parent.message(g):tL)}const f=g=>t.modifiers?t.modifiers[g]:eL,d=$e(t.processor)&&mt(t.processor.normalize)?t.processor.normalize:iL,h=$e(t.processor)&&mt(t.processor.interpolate)?t.processor.interpolate:sL,p=$e(t.processor)&&ye(t.processor.type)?t.processor.type:nL,y={list:l,named:c,plural:r,linked:(g,...x)=>{const[b,w]=x;let S="text",k="";x.length===1?et(b)?(k=b.modifier||k,S=b.type||S):ye(b)&&(k=b||k):x.length===2&&(ye(b)&&(k=b||k),ye(w)&&(S=w||S));const O=u(g,!0)(y),_=S==="vnode"&&wt(O)&&k?O[0]:O;return k?f(k)(_,S):_},message:u,type:p,interpolate:h,normalize:d,values:Ft(rt(),o,a)};return y}const Cy=()=>"",jn=t=>mt(t);function _y(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:l}=t,[a,c]=Fh(...e),u=Qe(c.missingWarn)?c.missingWarn:t.missingWarn,f=Qe(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,d=Qe(c.escapeParameter)?c.escapeParameter:t.escapeParameter,h=!!c.resolvedMessage,p=ye(c.default)||Qe(c.default)?Qe(c.default)?r?a:()=>a:c.default:n?r?a:()=>a:null,m=n||p!=null&&(ye(p)||mt(p)),y=Hm(t,c);d&&aL(c);let[g,x,b]=h?[a,y,l[y]||rt()]:WS(t,a,y,o,f,u),w=g,S=a;if(!h&&!(ye(w)||Li(w)||jn(w))&&m&&(w=p,S=w),!h&&(!(ye(w)||Li(w)||jn(w))||!ye(x)))return s?Pf:a;let k=!1;const O=()=>{k=!0},_=jn(w)?w:zS(t,a,x,w,S,O);if(k)return w;const E=fL(t,x,b,c),I=lL(E),F=cL(t,_,I),L=i?i(F,a):F;if(__INTLIFY_PROD_DEVTOOLS__){const Y={timestamp:Date.now(),key:ye(a)?a:jn(w)?w.key:"",locale:x||(jn(w)?w.locale:""),format:ye(w)?w:jn(w)?w.source:"",message:L};Y.meta=Ft({},t.__meta,Y2()||{}),T2(Y)}return L}function aL(t){wt(t.list)?t.list=t.list.map(e=>ye(e)?ay(e):e):et(t.named)&&Object.keys(t.named).forEach(e=>{ye(t.named[e])&&(t.named[e]=ay(t.named[e]))})}function WS(t,e,n,i,s,r){const{messages:o,onWarn:l,messageResolver:a,localeFallbacker:c}=t,u=c(t,i,n);let f=rt(),d,h=null;const p="translate";for(let m=0;mi;return c.locale=n,c.key=e,c}const a=o(i,uL(t,n,s,i,l,r));return a.locale=n,a.key=e,a.source=i,a}function cL(t,e,n){return e(n)}function Fh(...t){const[e,n,i]=t,s=rt();if(!ye(e)&&!Tt(e)&&!jn(e)&&!Li(e))throw ss(is.INVALID_ARGUMENT);const r=Tt(e)?String(e):(jn(e),e);return Tt(n)?s.plural=n:ye(n)?s.default=n:$e(n)&&!Ef(n)?s.named=n:wt(n)&&(s.list=n),Tt(i)?s.plural=i:ye(i)?s.default=i:$e(i)&&Ft(s,i),[r,s]}function uL(t,e,n,i,s,r){return{locale:e,key:n,warnHtmlMessage:s,onError:o=>{throw r&&r(o),o},onCacheKey:o=>VI(e,n,o)}}function fL(t,e,n,i){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:l,fallbackWarn:a,missingWarn:c,fallbackContext:u}=t,d={locale:e,modifiers:s,pluralRules:r,messages:(h,p)=>{let m=o(n,h);if(m==null&&(u||p)){const[,,y]=WS(u||t,h,e,l,a,c);m=o(y,h)}if(ye(m)||Li(m)){let y=!1;const x=zS(t,h,e,m,h,()=>{y=!0});return y?Cy:x}else return jn(m)?m:Cy}};return t.processor&&(d.processor=t.processor),i.list&&(d.list=i.list),i.named&&(d.named=i.named),Tt(i.plural)&&(d.pluralIndex=i.plural),d}g2();/*! + */function BE(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(kr().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(kr().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Ui(t){return nt(t)&&Em(t)===0&&(di(t,"b")||di(t,"body"))}const aP=["b","body"];function GE(t){return mr(t,aP)}const lP=["c","cases"];function FE(t){return mr(t,lP,[])}const cP=["s","static"];function HE(t){return mr(t,cP)}const uP=["i","items"];function KE(t){return mr(t,uP,[])}const OP=["t","type"];function Em(t){return mr(t,OP)}const fP=["v","value"];function Cc(t,e){const n=mr(t,fP);if(n!=null)return n;throw $l(e)}const dP=["m","modifier"];function JE(t){return mr(t,dP)}const hP=["k","key"];function e2(t){const e=mr(t,hP);if(e)return e;throw $l(6)}function mr(t,e,n){for(let i=0;it2(n,t)}function t2(t,e){const n=GE(e);if(n==null)throw $l(0);if(Em(n)===1){const r=FE(n);return t.plural(r.reduce((o,a)=>[...o,gQ(t,a)],[]))}else return gQ(t,n)}function gQ(t,e){const n=HE(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const i=KE(e).reduce((s,r)=>[...s,wh(t,r)],[]);return t.normalize(i)}}function wh(t,e){const n=Em(e);switch(n){case 3:return Cc(e,n);case 9:return Cc(e,n);case 4:{const i=e;if(di(i,"k")&&i.k)return t.interpolate(t.named(i.k));if(di(i,"key")&&i.key)return t.interpolate(t.named(i.key));throw $l(n)}case 5:{const i=e;if(di(i,"i")&&At(i.i))return t.interpolate(t.list(i.i));if(di(i,"index")&&At(i.index))return t.interpolate(t.list(i.index));throw $l(n)}case 6:{const i=e,s=JE(i),r=e2(i);return t.linked(wh(t,r),s?wh(t,s):void 0,t.type)}case 7:return Cc(e,n);case 8:return Cc(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const n2=t=>t;let Vc=ot();function i2(t,e={}){let n=!1;const i=e.onError||wE;return e.onError=s=>{n=!0,i(s)},{...jE(t,e),detectError:n}}function s2(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ge(t)){et(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||n2)(t),s=Vc[i];if(s)return s;const{ast:r,detectError:o}=i2(t,{...e,location:!1,jit:!0}),a=td(r);return o?a:Vc[i]=a}else{const n=t.cacheKey;if(n){const i=Vc[n];return i||(Vc[n]=td(t))}else return td(t)}}let Ql=null;function r2(t){Ql=t}function o2(t,e,n){Ql&&Ql.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const a2=l2("function:translate");function l2(t){return e=>Ql&&Ql.emit(t,e)}const hs={INVALID_ARGUMENT:xE,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},c2=24;function ps(t){return cf(t,null,void 0)}function Zm(t,e){return e.locale!=null?$Q(e.locale):$Q(t.locale)}let nd;function $Q(t){if(ge(t))return t;if(gt(t)){if(t.resolvedOnce&&nd!=null)return nd;if(t.constructor.name==="Function"){const e=t();if(bE(e))throw ps(hs.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return nd=e}else throw ps(hs.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw ps(hs.NOT_SUPPORT_LOCALE_TYPE)}function u2(t,e,n){return[...new Set([n,...wt(e)?e:nt(e)?Object.keys(e):ge(e)?[e]:[n]])]}function mP(t,e,n){const i=ge(n)?n:yl,s=t;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(i);if(!r){r=[];let o=[n];for(;wt(o);)o=QQ(r,o,e);const a=wt(e)||!Me(e)?e:e.default?e.default:null;o=ge(a)?[a]:a,wt(o)&&QQ(r,o,!1),s.__localeChainCache.set(i,r)}return r}function QQ(t,e,n){let i=!0;for(let s=0;s{o===void 0?o=a:o+=a},f[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,i=4,f[0]();else{if(s=0,o===void 0||(o=g2(o),o===!1))return!1;f[1]()}};function d(){const h=t[n+1];if(i===5&&h==="'"||i===6&&h==='"')return n++,a="\\"+h,f[0](),!0}for(;i!==null;)if(n++,r=t[n],!(r==="\\"&&d())){if(l=m2(r),O=gr[i],c=O[l]||O.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(a=r,u()===!1))))return;if(i===7)return e}}const yQ=new Map;function Q2(t,e){return nt(t)?t[e]:null}function y2(t,e){if(!nt(t))return null;let n=yQ.get(e);if(n||(n=$2(e),n&&yQ.set(e,n)),!n)return null;const i=n.length;let s=t,r=0;for(;r`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function S2(){return{upper:(t,e)=>e==="text"&&ge(t)?t.toUpperCase():e==="vnode"&&nt(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&ge(t)?t.toLowerCase():e==="vnode"&&nt(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&ge(t)?SQ(t):e==="vnode"&&nt(t)&&"__v_isVNode"in t?SQ(t.children):t}}let gP;function v2(t){gP=t}let $P;function P2(t){$P=t}let QP;function x2(t){QP=t}let yP=null;const w2=t=>{yP=t},T2=()=>yP;let bP=null;const vQ=t=>{bP=t},_2=()=>bP;let PQ=0;function k2(t={}){const e=gt(t.onWarn)?t.onWarn:vE,n=ge(t.version)?t.version:b2,i=ge(t.locale)||gt(t.locale)?t.locale:yl,s=gt(i)?yl:i,r=wt(t.fallbackLocale)||Me(t.fallbackLocale)||ge(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:s,o=Me(t.messages)?t.messages:id(s),a=Me(t.datetimeFormats)?t.datetimeFormats:id(s),l=Me(t.numberFormats)?t.numberFormats:id(s),c=Dt(ot(),t.modifiers,S2()),u=t.pluralRules||ot(),O=gt(t.missing)?t.missing:null,f=et(t.missingWarn)||Wo(t.missingWarn)?t.missingWarn:!0,d=et(t.fallbackWarn)||Wo(t.fallbackWarn)?t.fallbackWarn:!0,h=!!t.fallbackFormat,p=!!t.unresolving,m=gt(t.postTranslation)?t.postTranslation:null,g=Me(t.processor)?t.processor:null,b=et(t.warnHtmlMessage)?t.warnHtmlMessage:!0,Q=!!t.escapeParameter,y=gt(t.messageCompiler)?t.messageCompiler:gP,S=gt(t.messageResolver)?t.messageResolver:$P||Q2,v=gt(t.localeFallbacker)?t.localeFallbacker:QP||u2,P=nt(t.fallbackContext)?t.fallbackContext:void 0,w=t,k=nt(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=nt(w.__numberFormatters)?w.__numberFormatters:new Map,I=nt(w.__meta)?w.__meta:{};PQ++;const Z={version:n,cid:PQ,locale:i,fallbackLocale:r,messages:o,modifiers:c,pluralRules:u,missing:O,missingWarn:f,fallbackWarn:d,fallbackFormat:h,unresolving:p,postTranslation:m,processor:g,warnHtmlMessage:b,escapeParameter:Q,messageCompiler:y,messageResolver:S,localeFallbacker:v,fallbackContext:P,onWarn:e,__meta:I};return Z.datetimeFormats=a,Z.numberFormats=l,Z.__datetimeFormatters=k,Z.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&o2(Z,n,I),Z}const id=t=>({[t]:ot()});function zm(t,e,n,i,s){const{missing:r,onWarn:o}=t;if(r!==null){const a=r(t,n,e,s);return ge(a)?a:e}else return e}function va(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function R2(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function X2(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let i=n+1;i{SP.includes(l)?o[l]=n[l]:r[l]=n[l]}),ge(i)?r.locale=i:Me(i)&&(o=i),Me(s)&&(o=s),[r.key||"",a,r,o]}function wQ(t,e,n){const i=t;for(const s in n){const r=`${e}__${s}`;i.__datetimeFormatters.has(r)&&i.__datetimeFormatters.delete(r)}}function TQ(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:s,onWarn:r,localeFallbacker:o}=t,{__numberFormatters:a}=t,[l,c,u,O]=_h(...e),f=et(u.missingWarn)?u.missingWarn:t.missingWarn;et(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const d=!!u.part,h=Zm(t,u),p=o(t,s,h);if(!ge(l)||l==="")return new Intl.NumberFormat(h,O).format(c);let m={},g,b=null;const Q="number format";for(let v=0;v{vP.includes(l)?o[l]=n[l]:r[l]=n[l]}),ge(i)?r.locale=i:Me(i)&&(o=i),Me(s)&&(o=s),[r.key||"",a,r,o]}function _Q(t,e,n){const i=t;for(const s in n){const r=`${e}__${s}`;i.__numberFormatters.has(r)&&i.__numberFormatters.delete(r)}}const C2=t=>t,V2=t=>"",A2="text",E2=t=>t.length===0?"":Vm(t),Z2=SE;function kQ(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function z2(t){const e=At(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(At(t.named.count)||At(t.named.n))?At(t.named.count)?t.named.count:At(t.named.n)?t.named.n:e:e}function Y2(t,e){e.count||(e.count=t),e.n||(e.n=t)}function M2(t={}){const e=t.locale,n=z2(t),i=nt(t.pluralRules)&&ge(e)&>(t.pluralRules[e])?t.pluralRules[e]:kQ,s=nt(t.pluralRules)&&ge(e)&>(t.pluralRules[e])?kQ:void 0,r=g=>g[i(n,g.length,s)],o=t.list||[],a=g=>o[g],l=t.named||ot();At(t.pluralIndex)&&Y2(n,l);const c=g=>l[g];function u(g,b){const Q=gt(t.messages)?t.messages(g,!!b):nt(t.messages)?t.messages[g]:!1;return Q||(t.parent?t.parent.message(g):V2)}const O=g=>t.modifiers?t.modifiers[g]:C2,f=Me(t.processor)&>(t.processor.normalize)?t.processor.normalize:E2,d=Me(t.processor)&>(t.processor.interpolate)?t.processor.interpolate:Z2,h=Me(t.processor)&&ge(t.processor.type)?t.processor.type:A2,m={list:a,named:c,plural:r,linked:(g,...b)=>{const[Q,y]=b;let S="text",v="";b.length===1?nt(Q)?(v=Q.modifier||v,S=Q.type||S):ge(Q)&&(v=Q||v):b.length===2&&(ge(Q)&&(v=Q||v),ge(y)&&(S=y||S));const P=u(g,!0)(m),w=S==="vnode"&&wt(P)&&v?P[0]:P;return v?O(v)(w,S):w},message:u,type:h,interpolate:d,normalize:f,values:Dt(ot(),o,l)};return m}const RQ=()=>"",Jn=t=>gt(t);function XQ(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=t,[l,c]=kh(...e),u=et(c.missingWarn)?c.missingWarn:t.missingWarn,O=et(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,f=et(c.escapeParameter)?c.escapeParameter:t.escapeParameter,d=!!c.resolvedMessage,h=ge(c.default)||et(c.default)?et(c.default)?r?l:()=>l:c.default:n?r?l:()=>l:null,p=n||h!=null&&(ge(h)||gt(h)),m=Zm(t,c);f&&q2(c);let[g,b,Q]=d?[l,m,a[m]||ot()]:PP(t,l,m,o,O,u),y=g,S=l;if(!d&&!(ge(y)||Ui(y)||Jn(y))&&p&&(y=h,S=y),!d&&(!(ge(y)||Ui(y)||Jn(y))||!ge(b)))return s?uf:l;let v=!1;const P=()=>{v=!0},w=Jn(y)?y:xP(t,l,b,y,S,P);if(v)return y;const k=W2(t,b,Q,c),E=M2(k),I=I2(t,w,E),Z=i?i(I,l):I;if(__INTLIFY_PROD_DEVTOOLS__){const K={timestamp:Date.now(),key:ge(l)?l:Jn(y)?y.key:"",locale:b||(Jn(y)?y.locale:""),format:ge(y)?y:Jn(y)?y.source:"",message:Z};K.meta=Dt({},t.__meta,T2()||{}),a2(K)}return Z}function q2(t){wt(t.list)?t.list=t.list.map(e=>ge(e)?dQ(e):e):nt(t.named)&&Object.keys(t.named).forEach(e=>{ge(t.named[e])&&(t.named[e]=dQ(t.named[e]))})}function PP(t,e,n,i,s,r){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=t,u=c(t,i,n);let O=ot(),f,d=null;const h="translate";for(let p=0;pi;return c.locale=n,c.key=e,c}const l=o(i,U2(t,n,s,i,a,r));return l.locale=n,l.key=e,l.source=i,l}function I2(t,e,n){return e(n)}function kh(...t){const[e,n,i]=t,s=ot();if(!ge(e)&&!At(e)&&!Jn(e)&&!Ui(e))throw ps(hs.INVALID_ARGUMENT);const r=At(e)?String(e):(Jn(e),e);return At(n)?s.plural=n:ge(n)?s.default=n:Me(n)&&!lf(n)?s.named=n:wt(n)&&(s.list=n),At(i)?s.plural=i:ge(i)?s.default=i:Me(i)&&Dt(s,i),[r,s]}function U2(t,e,n,i,s,r){return{locale:e,key:n,warnHtmlMessage:s,onError:o=>{throw r&&r(o),o},onCacheKey:o=>mE(e,n,o)}}function W2(t,e,n,i){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=t,f={locale:e,modifiers:s,pluralRules:r,messages:(d,h)=>{let p=o(n,d);if(p==null&&(u||h)){const[,,m]=PP(u||t,d,e,a,l,c);p=o(m,d)}if(ge(p)||Ui(p)){let m=!1;const b=xP(t,d,e,p,d,()=>{m=!0});return m?RQ:b}else return Jn(p)?p:RQ}};return t.processor&&(f.processor=t.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),At(i.plural)&&(f.pluralIndex=i.plural),f}BE();/*! * vue-i18n v11.1.9 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const dL="11.1.9";function hL(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(yr().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(yr().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(yr().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(yr().__INTLIFY_PROD_DEVTOOLS__=!1)}const En={UNEXPECTED_RETURN_TYPE:M2,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Wn(t,...e){return Tf(t,null,void 0)}const Wh=sr("__translateVNode"),zh=sr("__datetimeParts"),Hh=sr("__numberParts"),HS=sr("__setPluralRules"),US=sr("__injectWithOption"),Uh=sr("__dispose");function Yl(t){if(!et(t)||Li(t))return t;for(const e in t)if(li(t,e))if(!e.includes("."))et(t[e])&&Yl(t[e]);else{const n=e.split("."),i=n.length-1;let s=t,r=!1;for(let o=0;o{if("locale"in l&&"resource"in l){const{locale:a,resource:c}=l;a?(o[a]=o[a]||rt(),$c(c,o[a])):$c(c,o)}else ye(l)&&$c(JSON.parse(l),o)}),s==null&&r)for(const l in o)li(o,l)&&Yl(o[l]);return o}function jS(t){return t.type}function qS(t,e,n){let i=et(e.messages)?e.messages:rt();"__i18nGlobal"in n&&(i=jm(t.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(r=>{t.mergeLocaleMessage(r,i[r])});{if(et(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(et(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function Ay(t){return P(os,null,t,0)}const Ey="__INTLIFY_META__",Ty=()=>[],pL=()=>!1;let Py=0;function My(t){return(e,n,i,s)=>t(n,i,yt()||void 0,s)}const mL=()=>{const t=yt();let e=null;return t&&(e=jS(t)[Ey])?{[Ey]:e}:null};function qm(t={}){const{__root:e,__injectWithOption:n}=t,i=e===void 0,s=t.flatJson,r=wu?se:rs;let o=Qe(t.inheritLocale)?t.inheritLocale:!0;const l=r(e&&o?e.locale.value:ye(t.locale)?t.locale:Gl),a=r(e&&o?e.fallbackLocale.value:ye(t.fallbackLocale)||wt(t.fallbackLocale)||$e(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:l.value),c=r(jm(l.value,t)),u=r($e(t.datetimeFormats)?t.datetimeFormats:{[l.value]:{}}),f=r($e(t.numberFormats)?t.numberFormats:{[l.value]:{}});let d=e?e.missingWarn:Qe(t.missingWarn)||Eo(t.missingWarn)?t.missingWarn:!0,h=e?e.fallbackWarn:Qe(t.fallbackWarn)||Eo(t.fallbackWarn)?t.fallbackWarn:!0,p=e?e.fallbackRoot:Qe(t.fallbackRoot)?t.fallbackRoot:!0,m=!!t.fallbackFormat,y=mt(t.missing)?t.missing:null,g=mt(t.missing)?My(t.missing):null,x=mt(t.postTranslation)?t.postTranslation:null,b=e?e.warnHtmlMessage:Qe(t.warnHtmlMessage)?t.warnHtmlMessage:!0,w=!!t.escapeParameter;const S=e?e.modifiers:$e(t.modifiers)?t.modifiers:{};let k=t.pluralRules||e&&e.pluralRules,O;O=(()=>{i&&by(null);const M={version:dL,locale:l.value,fallbackLocale:a.value,messages:c.value,modifiers:S,pluralRules:k,missing:g===null?void 0:g,missingWarn:d,fallbackWarn:h,fallbackFormat:m,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:b,escapeParameter:w,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};M.datetimeFormats=u.value,M.numberFormats=f.value,M.__datetimeFormatters=$e(O)?O.__datetimeFormatters:void 0,M.__numberFormatters=$e(O)?O.__numberFormatters:void 0;const W=J2(M);return i&&by(W),W})(),tl(O,l.value,a.value);function E(){return[l.value,a.value,c.value,u.value,f.value]}const I=Q({get:()=>l.value,set:M=>{O.locale=M,l.value=M}}),F=Q({get:()=>a.value,set:M=>{O.fallbackLocale=M,a.value=M,tl(O,l.value,M)}}),L=Q(()=>c.value),Y=Q(()=>u.value),ee=Q(()=>f.value);function re(){return mt(x)?x:null}function q(M){x=M,O.postTranslation=M}function B(){return y}function N(M){M!==null&&(g=My(M)),y=M,O.missing=g}const K=(M,W,de,ke,He,Ue)=>{E();let At;try{__INTLIFY_PROD_DEVTOOLS__,i||(O.fallbackContext=e?X2():void 0),At=M(O)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(O.fallbackContext=void 0)}if(de!=="translate exists"&&Tt(At)&&At===Pf||de==="translate exists"&&!At){const[Wt,Hn]=W();return e&&p?ke(e):He(Wt)}else{if(Ue(At))return At;throw Wn(En.UNEXPECTED_RETURN_TYPE)}};function ue(...M){return K(W=>Reflect.apply(_y,null,[W,...M]),()=>Fh(...M),"translate",W=>Reflect.apply(W.t,W,[...M]),W=>W,W=>ye(W))}function Se(...M){const[W,de,ke]=M;if(ke&&!et(ke))throw Wn(En.INVALID_ARGUMENT);return ue(W,de,Ft({resolvedMessage:!0},ke||{}))}function fe(...M){return K(W=>Reflect.apply(wy,null,[W,...M]),()=>Vh(...M),"datetime format",W=>Reflect.apply(W.d,W,[...M]),()=>gy,W=>ye(W)||wt(W))}function Oe(...M){return K(W=>Reflect.apply(Sy,null,[W,...M]),()=>Bh(...M),"number format",W=>Reflect.apply(W.n,W,[...M]),()=>gy,W=>ye(W)||wt(W))}function Pe(M){return M.map(W=>ye(W)||Tt(W)||Qe(W)?Ay(String(W)):W)}const Re={normalize:Pe,interpolate:M=>M,type:"vnode"};function Ae(...M){return K(W=>{let de;const ke=W;try{ke.processor=Re,de=Reflect.apply(_y,null,[ke,...M])}finally{ke.processor=null}return de},()=>Fh(...M),"translate",W=>W[Wh](...M),W=>[Ay(W)],W=>wt(W))}function nt(...M){return K(W=>Reflect.apply(Sy,null,[W,...M]),()=>Bh(...M),"number format",W=>W[Hh](...M),Ty,W=>ye(W)||wt(W))}function ze(...M){return K(W=>Reflect.apply(wy,null,[W,...M]),()=>Vh(...M),"datetime format",W=>W[zh](...M),Ty,W=>ye(W)||wt(W))}function ft(M){k=M,O.pluralRules=k}function qt(M,W){return K(()=>{if(!M)return!1;const de=ye(W)?W:l.value,ke=R(de),He=O.messageResolver(ke,M);return Li(He)||jn(He)||ye(He)},()=>[M],"translate exists",de=>Reflect.apply(de.te,de,[M,W]),pL,de=>Qe(de))}function vt(M){let W=null;const de=RS(O,a.value,l.value);for(let ke=0;ke{o&&(l.value=M,O.locale=M,tl(O,l.value,a.value))}),Te(e.fallbackLocale,M=>{o&&(a.value=M,O.fallbackLocale=M,tl(O,l.value,a.value))}));const ie={id:Py,locale:I,fallbackLocale:F,get inheritLocale(){return o},set inheritLocale(M){o=M,M&&e&&(l.value=e.locale.value,a.value=e.fallbackLocale.value,tl(O,l.value,a.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:L,get modifiers(){return S},get pluralRules(){return k||{}},get isGlobal(){return i},get missingWarn(){return d},set missingWarn(M){d=M,O.missingWarn=d},get fallbackWarn(){return h},set fallbackWarn(M){h=M,O.fallbackWarn=h},get fallbackRoot(){return p},set fallbackRoot(M){p=M},get fallbackFormat(){return m},set fallbackFormat(M){m=M,O.fallbackFormat=m},get warnHtmlMessage(){return b},set warnHtmlMessage(M){b=M,O.warnHtmlMessage=M},get escapeParameter(){return w},set escapeParameter(M){w=M,O.escapeParameter=M},t:ue,getLocaleMessage:R,setLocaleMessage:U,mergeLocaleMessage:te,getPostTranslationHandler:re,setPostTranslationHandler:q,getMissingHandler:B,setMissingHandler:N,[HS]:ft};return ie.datetimeFormats=Y,ie.numberFormats=ee,ie.rt=Se,ie.te=qt,ie.tm=T,ie.d=fe,ie.n=Oe,ie.getDateTimeFormat=Z,ie.setDateTimeFormat=C,ie.mergeDateTimeFormat=A,ie.getNumberFormat=$,ie.setNumberFormat=z,ie.mergeNumberFormat=G,ie[US]=n,ie[Wh]=Ae,ie[zh]=ze,ie[Hh]=nt,ie}function gL(t){const e=ye(t.locale)?t.locale:Gl,n=ye(t.fallbackLocale)||wt(t.fallbackLocale)||$e(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,i=mt(t.missing)?t.missing:void 0,s=Qe(t.silentTranslationWarn)||Eo(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,r=Qe(t.silentFallbackWarn)||Eo(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,o=Qe(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,a=$e(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,u=mt(t.postTranslation)?t.postTranslation:void 0,f=ye(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,d=!!t.escapeParameterHtml,h=Qe(t.sync)?t.sync:!0;let p=t.messages;if($e(t.sharedMessages)){const S=t.sharedMessages;p=Object.keys(S).reduce((O,_)=>{const E=O[_]||(O[_]={});return Ft(E,S[_]),O},p||{})}const{__i18n:m,__root:y,__injectWithOption:g}=t,x=t.datetimeFormats,b=t.numberFormats,w=t.flatJson;return{locale:e,fallbackLocale:n,messages:p,flatJson:w,datetimeFormats:x,numberFormats:b,missing:i,missingWarn:s,fallbackWarn:r,fallbackRoot:o,fallbackFormat:l,modifiers:a,pluralRules:c,postTranslation:u,warnHtmlMessage:f,escapeParameter:d,messageResolver:t.messageResolver,inheritLocale:h,__i18n:m,__root:y,__injectWithOption:g}}function jh(t={}){const e=qm(gL(t)),{__extender:n}=t,i={id:e.id,get locale(){return e.locale.value},set locale(s){e.locale.value=s},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(s){e.fallbackLocale.value=s},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(s){e.setMissingHandler(s)},get silentTranslationWarn(){return Qe(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(s){e.missingWarn=Qe(s)?!s:s},get silentFallbackWarn(){return Qe(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(s){e.fallbackWarn=Qe(s)?!s:s},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(s){e.fallbackFormat=s},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(s){e.setPostTranslationHandler(s)},get sync(){return e.inheritLocale},set sync(s){e.inheritLocale=s},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){e.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(s){e.escapeParameter=s},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...s){return Reflect.apply(e.t,e,[...s])},rt(...s){return Reflect.apply(e.rt,e,[...s])},te(s,r){return e.te(s,r)},tm(s){return e.tm(s)},getLocaleMessage(s){return e.getLocaleMessage(s)},setLocaleMessage(s,r){e.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){e.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(e.d,e,[...s])},getDateTimeFormat(s){return e.getDateTimeFormat(s)},setDateTimeFormat(s,r){e.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){e.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(e.n,e,[...s])},getNumberFormat(s){return e.getNumberFormat(s)},setNumberFormat(s,r){e.setNumberFormat(s,r)},mergeNumberFormat(s,r){e.mergeNumberFormat(s,r)}};return i.__extender=n,i}function yL(t,e,n){return{beforeCreate(){const i=yt();if(!i)throw Wn(En.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=e,this===this.$root)this.$i18n=Dy(t,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=jh(r);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=Dy(t,s);else{this.$i18n=jh({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=t;s.__i18nGlobal&&qS(e,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$te=(r,o)=>this.$i18n.te(r,o),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=yt();if(!i)throw Wn(En.UNEXPECTED_ERROR);const s=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(i),delete this.$i18n}}}function Dy(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[HS](e.pluralizationRules||t.pluralizationRules);const n=jm(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(i=>t.mergeLocaleMessage(i,n[i])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(i=>t.mergeDateTimeFormat(i,e.datetimeFormats[i])),e.numberFormats&&Object.keys(e.numberFormats).forEach(i=>t.mergeNumberFormat(i,e.numberFormats[i])),t}const Km={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function bL({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((i,s)=>[...i,...s.type===Me?s.children:[s]],[]):e.reduce((n,i)=>{const s=t[i];return s&&(n[i]=s()),n},rt())}function KS(){return Me}const vL=H({name:"i18n-t",props:Ft({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Tt(t)||!isNaN(t)}},Km),setup(t,e){const{slots:n,attrs:i}=e,s=t.i18n||Mf({useScope:t.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(f=>f[0]!=="_"),o=rt();t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=ye(t.plural)?+t.plural:t.plural);const l=bL(e,r),a=s[Wh](t.keypath,l,o),c=Ft(rt(),i),u=ye(t.tag)||et(t.tag)?t.tag:KS();return An(u,c,a)}}}),Ry=vL;function wL(t){return wt(t)&&!ye(t[0])}function GS(t,e,n,i){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let l=rt();t.locale&&(o.locale=t.locale),ye(t.format)?o.key=t.format:et(t.format)&&(ye(t.format.key)&&(o.key=t.format.key),l=Object.keys(t.format).reduce((d,h)=>n.includes(h)?Ft(rt(),d,{[h]:t.format[h]}):d,rt()));const a=i(t.value,o,l);let c=[o.key];wt(a)?c=a.map((d,h)=>{const p=s[d.type],m=p?p({[d.type]:d.value,index:h,parts:a}):[d.value];return wL(m)&&(m[0].key=`${d.type}-${h}`),m}):ye(a)&&(c=[a]);const u=Ft(rt(),r),f=ye(t.tag)||et(t.tag)?t.tag:KS();return An(f,u,c)}}const xL=H({name:"i18n-n",props:Ft({value:{type:Number,required:!0},format:{type:[String,Object]}},Km),setup(t,e){const n=t.i18n||Mf({useScope:t.scope,__useComponent:!0});return GS(t,e,FS,(...i)=>n[Hh](...i))}}),Iy=xL;function SL(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const i=n.__getInstance(e);return i!=null?i.__composer:t.global.__composer}}function kL(t){const e=o=>{const{instance:l,value:a}=o;if(!l||!l.$)throw Wn(En.UNEXPECTED_ERROR);const c=SL(t,l.$),u=Ly(a);return[Reflect.apply(c.t,c,[...Ny(u)]),c]};return{created:(o,l)=>{const[a,c]=e(l);wu&&t.global===c&&(o.__i18nWatcher=Te(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),o.__composer=c,o.textContent=a},unmounted:o=>{wu&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:l})=>{if(o.__composer){const a=o.__composer,c=Ly(l);o.textContent=Reflect.apply(a.t,a,[...Ny(c)])}},getSSRProps:o=>{const[l]=e(o);return{textContent:l}}}}function Ly(t){if(ye(t))return{path:t};if($e(t)){if(!("path"in t))throw Wn(En.REQUIRED_VALUE,"path");return t}else throw Wn(En.INVALID_VALUE)}function Ny(t){const{path:e,locale:n,args:i,choice:s,plural:r}=t,o={},l=i||{};return ye(n)&&(o.locale=n),Tt(s)&&(o.plural=s),Tt(r)&&(o.plural=r),[e,l,o]}function OL(t,e,...n){const i=$e(n[0])?n[0]:{};(Qe(i.globalInstall)?i.globalInstall:!0)&&([Ry.name,"I18nT"].forEach(r=>t.component(r,Ry)),[Iy.name,"I18nN"].forEach(r=>t.component(r,Iy)),[Vy.name,"I18nD"].forEach(r=>t.component(r,Vy))),t.directive("t",kL(e))}const CL=sr("global-vue-i18n");function _L(t={}){const e=__VUE_I18N_LEGACY_API__&&Qe(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,n=Qe(t.globalInjection)?t.globalInjection:!0,i=new Map,[s,r]=AL(t,e),o=sr("");function l(f){return i.get(f)||null}function a(f,d){i.set(f,d)}function c(f){i.delete(f)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(f,...d){if(f.__VUE_I18N_SYMBOL__=o,f.provide(f.__VUE_I18N_SYMBOL__,u),$e(d[0])){const m=d[0];u.__composerExtend=m.__composerExtend,u.__vueI18nExtend=m.__vueI18nExtend}let h=null;!e&&n&&(h=LL(f,u.global)),__VUE_I18N_FULL_INSTALL__&&OL(f,u,...d),__VUE_I18N_LEGACY_API__&&e&&f.mixin(yL(r,r.__composer,u));const p=f.unmount;f.unmount=()=>{h&&h(),u.dispose(),p()}},get global(){return r},dispose(){s.stop()},__instances:i,__getInstance:l,__setInstance:a,__deleteInstance:c};return u}function Mf(t={}){const e=yt();if(e==null)throw Wn(En.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Wn(En.NOT_INSTALLED);const n=EL(e),i=PL(n),s=jS(e),r=TL(t,s);if(r==="global")return qS(i,t,s),i;if(r==="parent"){let a=ML(n,e,t.__useComponent);return a==null&&(a=i),a}const o=n;let l=o.__getInstance(e);if(l==null){const a=Ft({},t);"__i18n"in s&&(a.__i18n=s.__i18n),i&&(a.__root=i),l=qm(a),o.__composerExtend&&(l[Uh]=o.__composerExtend(l)),RL(o,e,l),o.__setInstance(e,l)}return l}function AL(t,e){const n=Bo(),i=__VUE_I18N_LEGACY_API__&&e?n.run(()=>jh(t)):n.run(()=>qm(t));if(i==null)throw Wn(En.UNEXPECTED_ERROR);return[n,i]}function EL(t){const e=dn(t.isCE?CL:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Wn(t.isCE?En.NOT_INSTALLED_WITH_PROVIDE:En.UNEXPECTED_ERROR);return e}function TL(t,e){return Ef(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function PL(t){return t.mode==="composition"?t.global:t.global.__composer}function ML(t,e,n=!1){let i=null;const s=e.root;let r=DL(e,n);for(;r!=null;){const o=t;if(t.mode==="composition")i=o.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const l=o.__getInstance(r);l!=null&&(i=l.__composer,n&&i&&!i[US]&&(i=null))}if(i!=null||s===r)break;r=r.parent}return i}function DL(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function RL(t,e,n){St(()=>{},e),Fi(()=>{const i=n;t.__deleteInstance(e);const s=i[Uh];s&&(s(),delete i[Uh])},e)}const IL=["locale","fallbackLocale","availableLocales"],$y=["t","rt","d","n","tm","te"];function LL(t,e){const n=Object.create(null);return IL.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw Wn(En.UNEXPECTED_ERROR);const o=qe(r.value)?{get(){return r.value.value},set(l){r.value.value=l}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,o)}),t.config.globalProperties.$i18n=n,$y.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw Wn(En.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${s}`,r)}),()=>{delete t.config.globalProperties.$i18n,$y.forEach(s=>{delete t.config.globalProperties[`$${s}`]})}}const NL=H({name:"i18n-d",props:Ft({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Km),setup(t,e){const n=t.i18n||Mf({useScope:t.scope,__useComponent:!0});return GS(t,e,BS,(...i)=>n[zh](...i))}}),Vy=NL;hL();j2(_2);q2(z2);K2(RS);if(__INTLIFY_PROD_DEVTOOLS__){const t=yr();t.__INTLIFY__=!0,A2(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const $L={class:"flex flex-col p-3 gap-3 overflow-auto"},VL={class:"flex items-center space-x-2"},BL={class:"flex items-center space-x-2"},FL=H({__name:"Library",setup(t){const{locale:e}=Mf(),n=ni();let i=se(!1);function s(r,o){r.dataTransfer&&(r.dataTransfer.dropEffect="move",r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("itemId",o)),n.setDragMode("insert")}return Te(i,r=>{r===!1?n.setShowPreview(!1):n.setShowPreview(!0)}),(r,o)=>(D(),ae("div",$L,[X("div",VL,[lf(X("select",{"onUpdate:modelValue":o[0]||(o[0]=l=>qe(e)?e.value=l:null)},o[26]||(o[26]=[X("option",{value:"de"},"DE",-1),X("option",{value:"en"},"EN",-1)]),512),[[ym,v(e)]])]),X("div",BL,[P(v($I),{id:"preview-mode",modelValue:v(i),"onUpdate:modelValue":o[1]||(o[1]=l=>qe(i)?i.value=l:i=l)},null,8,["modelValue"]),P(v(SS),{for:"preview-mode"},{default:V(()=>[je(oe(r.$t("preview_mode")),1)]),_:1})]),X("div",{id:"headline",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[2]||(o[2]=l=>s(l,"6")),onDragenter:o[3]||(o[3]=st(()=>{},["prevent"])),onDragover:o[4]||(o[4]=st(()=>{},["prevent"]))},[P(v(eP)),X("span",null,oe(r.$t("headline")),1)],32),X("div",{id:"text",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[5]||(o[5]=l=>s(l,"4")),onDragenter:o[6]||(o[6]=st(()=>{},["prevent"])),onDragover:o[7]||(o[7]=st(()=>{},["prevent"]))},[P(v(nP)),X("span",null,oe(r.$t("text")),1)],32),X("div",{id:"media",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[8]||(o[8]=l=>s(l,"9")),onDragenter:o[9]||(o[9]=st(()=>{},["prevent"])),onDragover:o[10]||(o[10]=st(()=>{},["prevent"]))},[P(v(YT)),X("span",null,oe(r.$t("media")),1)],32),X("div",{id:"textarea",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[11]||(o[11]=l=>s(l,"5")),onDragenter:o[12]||(o[12]=st(()=>{},["prevent"])),onDragover:o[13]||(o[13]=st(()=>{},["prevent"]))},[P(v(tP)),X("span",null,oe(r.$t("textarea")),1)],32),X("div",{id:"input",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[14]||(o[14]=l=>s(l,"2")),onDragenter:o[15]||(o[15]=st(()=>{},["prevent"])),onDragover:o[16]||(o[16]=st(()=>{},["prevent"]))},[P(v(iP)),X("span",null,oe(r.$t("input")),1)],32),X("div",{id:"select",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[17]||(o[17]=l=>s(l,"3")),onDragenter:o[18]||(o[18]=st(()=>{},["prevent"])),onDragover:o[19]||(o[19]=st(()=>{},["prevent"]))},[P(v(ZT)),X("span",null,oe(r.$t("select")),1)],32),X("div",{id:"hidden",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[20]||(o[20]=l=>s(l,"1")),onDragenter:o[21]||(o[21]=st(()=>{},["prevent"])),onDragover:o[22]||(o[22]=st(()=>{},["prevent"]))},[P(v(E0)),X("span",null,oe(r.$t("hidden")),1)],32),X("div",{id:"row",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[23]||(o[23]=l=>s(l,"7")),onDragenter:o[24]||(o[24]=st(()=>{},["prevent"])),onDragover:o[25]||(o[25]=st(()=>{},["prevent"]))},[P(v(E0)),X("span",null,oe(r.$t("row")),1)],32)]))}});class By extends ws{constructor(){super();he(this,"default","");he(this,"placeHolder","Placeholder");he(this,"required",!1);he(this,"name","");he(this,"xmlType","input");he(this,"minValue",0);he(this,"minCalc","");he(this,"maxCalc","");he(this,"maxValue",0);this.type=2}toJSON(){return Object.assign(super.toJSON(),{placeHolder:this.placeHolder,default:this.default,name:this.name,minValue:this.minValue,minCalc:this.minCalc,maxValue:this.maxValue,maxCalc:this.maxCalc,required:this.required})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.required=n.required,this.placeHolder=n.placeHolder,this.minValue=n.minValue,this.minCalc=n.minCalc,this.maxValue=n.maxValue,this.maxCalc=n.maxCalc}}let YS=class{constructor(e){he(this,"uuid","");he(this,"id","");he(this,"name","");he(this,"dependencys",[]);this.uuid=Ao(),this.id=e}addDependency(e){this.dependencys.push(e)}toJSON(){return{id:this.id,name:this.name,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.name=e.name,this.id=e.id,e.dependencys.map(n=>{const i=new Uo;i.fromJSON(n),this.dependencys.push(i)})}};class XS extends ws{constructor(){super();he(this,"default","");he(this,"name","");he(this,"xmlType","select");he(this,"options",[]);he(this,"mode","normal");he(this,"container","");this.type=3}addOption(n){this.options.push(n)}hasDependencys(){return this.options.reduce((i,s)=>(s.dependencys.length>0&&(i=!0),i),!1)||super.hasDependencys()}toJSON(){return Object.assign(super.toJSON(),{default:this.default,mode:this.mode,container:this.container,options:this.options.reduce((n,i)=>(n.push(i.toJSON()),n),[]),name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.mode=n.mode,this.container=n.container,this.default=n.default,n.options.map(i=>{const s=new YS("");s.fromJSON(i),this.options.push(s)})}}class JS extends ws{constructor(){super();he(this,"default","");he(this,"name","");he(this,"xmlType","img");this.type=9}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class QS extends ws{constructor(){super();he(this,"default","");he(this,"name","");he(this,"xmlType","hidden");this.type=1,this.name="hidden"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class WL extends ws{constructor(){super();he(this,"default","");he(this,"name","");he(this,"xmlType","text");this.type=4,this.default="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class Oa extends ws{constructor(){super();he(this,"items",[]);this.type=8}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{items:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),n.columns.map(i=>{const s=new Oa;s.fromJSON(i),this.items.push(s)})}cutItem(n){let i=null;return this.items.forEach((s,r)=>{if(s.uuid===n)return i=this.items.splice(r,1)[0],!0;i===null&&(i=s.cutItem(n))}),i}insertItem(n,i){let s=!1;for(let r=0;r{if(i.uuid===n.uuid)return n=this.items.splice(s,1)[0],!0;if(i.deleteItem(n))return!0})}}class ZS extends ws{constructor(){super();he(this,"columns",[]);this.type=7}addColumn(n){this.columns.push(n)}toJSON(){return Object.assign(super.toJSON(),{columns:this.columns.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}cutItem(n){let i=null;return this.columns.some(s=>{if(i=s.cutItem(n),i!==null)return!0}),i}insertItem(n,i){return this.columns.some(s=>{if(s.insertItem(n,i))return!0}),!1}deleteItem(n){return this.columns.some(i=>{if(i.deleteItem(n))return!0}),!1}insertItemInEmptyColumn(n,i,s){return this.uuid==i?(s.items.push(n),!0):!1}fromJSON(n){super.fromJSON(n),n.columns.map(i=>{const s=new Oa;s.fromJSON(i),this.columns.push(s)})}}class zL extends ws{constructor(){super();he(this,"default","");he(this,"name","");he(this,"xmlType","text");this.type=5}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class ek extends ws{constructor(){super();he(this,"default","");he(this,"variant","1");he(this,"name","");he(this,"xmlType","text");this.type=6,this.default="Headline"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name,variant:this.variant})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.variant=n.variant}}const Je=H({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,s=Xw(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(r,o)=>lf((D(),ae("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>qe(s)?s.value=l:null),"data-slot":"input",class:Ct(v(tt)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n.class))},null,2)),[[Oo,v(s)]])}}),HL=H({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=kt(n,"class"),r=zn(s,i);return(o,l)=>(D(),j(v(tD),xe({"data-slot":"checkbox"},v(r),{class:v(tt)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[P(v(nD),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:V(()=>[le(o.$slots,"default",{},()=>[P(v(Jw),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),UL={class:"form-check-label",for:"flexSwitchCheckDefault"},jL=H({__name:"InputElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae(Me,null,[X("label",null,oe(r.$t("id")),1),P(v(Je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value.id=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("placeholder")),1),P(v(Je),{modelValue:s.value.placeHolder,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.placeHolder=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("default")),1),P(v(Je),{modelValue:s.value.default,"onUpdate:modelValue":o[2]||(o[2]=l=>s.value.default=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("name")),1),P(v(Je),{modelValue:s.value.name,"onUpdate:modelValue":o[3]||(o[3]=l=>s.value.name=l)},null,8,["modelValue"]),P(v(HL),{modelValue:s.value.required,"onUpdate:modelValue":o[4]||(o[4]=l=>s.value.required=l)},null,8,["modelValue"]),X("label",UL,oe(r.$t("required")),1),X("label",null,oe(r.$t("min")),1),P(v(Je),{modelValue:s.value.minValue,"onUpdate:modelValue":o[5]||(o[5]=l=>s.value.minValue=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("max")),1),P(v(Je),{modelValue:s.value.maxValue,"onUpdate:modelValue":o[6]||(o[6]=l=>s.value.maxValue=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("min_calc")),1),P(v(Je),{modelValue:s.value.minCalc,"onUpdate:modelValue":o[7]||(o[7]=l=>s.value.minCalc=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("max_calc")),1),P(v(Je),{modelValue:s.value.maxCalc,"onUpdate:modelValue":o[8]||(o[8]=l=>s.value.maxCalc=l)},null,8,["modelValue"])],64))}}),Df=H({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const s=zn(t,e);return(r,o)=>(D(),j(v(kD),xe({"data-slot":"select"},v(s)),{default:V(()=>[le(r.$slots,"default")]),_:3},16))}}),Rf=H({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,s=kt(n,"class"),r=zn(s,i);return(o,l)=>(D(),j(v(BD),null,{default:V(()=>[P(v(MD),xe({"data-slot":"select-content"},{...v(r),...o.$attrs},{class:v(tt)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",o.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:V(()=>[P(v(GL)),P(v(UD),{class:Ct(v(tt)("p-1",o.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:V(()=>[le(o.$slots,"default")]),_:3},8,["class"]),P(v(KL))]),_:3},16,["class"])]),_:3}))}}),Gm=H({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(D(),j(v(RD),xe({"data-slot":"select-group"},e),{default:V(()=>[le(n.$slots,"default")]),_:3},16))}}),qL={class:"absolute right-2 flex size-3.5 items-center justify-center"},ri=H({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class"),i=Hi(n);return(s,r)=>(D(),j(v(ND),xe({"data-slot":"select-item"},v(i),{class:v(tt)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e.class)}),{default:V(()=>[X("span",qL,[P(v($D),null,{default:V(()=>[P(v(Jw),{class:"size-4"})]),_:1})]),P(v(VD),null,{default:V(()=>[le(s.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),KL=H({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class"),i=Hi(n);return(s,r)=>(D(),j(v(FD),xe({"data-slot":"select-scroll-down-button"},v(i),{class:v(tt)("flex cursor-default items-center justify-center py-1",e.class)}),{default:V(()=>[le(s.$slots,"default",{},()=>[P(v(bm),{class:"size-4"})])]),_:3},16,["class"]))}}),GL=H({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class"),i=Hi(n);return(s,r)=>(D(),j(v(WD),xe({"data-slot":"select-scroll-up-button"},v(i),{class:v(tt)("flex cursor-default items-center justify-center py-1",e.class)}),{default:V(()=>[le(s.$slots,"default",{},()=>[P(v(KT),{class:"size-4"})])]),_:3},16,["class"]))}}),If=H({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(t){const e=t,n=kt(e,"class","size"),i=Hi(n);return(s,r)=>(D(),j(v(zD),xe({"data-slot":"select-trigger","data-size":s.size},v(i),{class:v(tt)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[le(s.$slots,"default"),P(v(ID),{"as-child":""},{default:V(()=>[P(v(bm),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),Lf=H({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(D(),j(v(HD),xe({"data-slot":"select-value"},e),{default:V(()=>[le(n.$slots,"default")]),_:3},16))}}),YL=H({__name:"SelectElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae(Me,null,[X("label",null,oe(r.$t("id")),1),P(v(Je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value.id=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("default")),1),P(v(Je),{modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.default=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("name")),1),P(v(Je),{modelValue:s.value.name,"onUpdate:modelValue":o[2]||(o[2]=l=>s.value.name=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("mode")),1),P(v(Df),{modelValue:s.value.mode,"onUpdate:modelValue":o[3]||(o[3]=l=>s.value.mode=l)},{default:V(()=>[P(v(If),null,{default:V(()=>[P(v(Lf))]),_:1}),P(v(Rf),null,{default:V(()=>[P(v(Gm),null,{default:V(()=>[P(v(ri),{value:"normal"},{default:V(()=>[je(oe(r.$t("normal")),1)]),_:1}),P(v(ri),{value:"paperdb"},{default:V(()=>[je(oe(r.$t("paperdb")),1)]),_:1}),P(v(ri),{value:"colordb"},{default:V(()=>[je(oe(r.$t("colordb")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),X("label",null,oe(r.$t("container")),1),P(v(Je),{modelValue:s.value.container,"onUpdate:modelValue":o[4]||(o[4]=l=>s.value.container=l)},null,8,["modelValue"])],64))}}),XL=H({__name:"MediaElement",props:{modelValue:JS},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae(Me,null,[X("label",null,oe(r.$t("id")),1),P(v(Je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value.id=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("default")),1),P(v(Je),{modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.default=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("name")),1),P(v(Je),{modelValue:s.value.name,"onUpdate:modelValue":o[2]||(o[2]=l=>s.value.name=l)},null,8,["modelValue"])],64))}}),JL=H({__name:"HiddenElement",props:{modelValue:QS},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae(Me,null,[X("label",null,oe(r.$t("id")),1),P(v(Je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value.id=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("default")),1),P(v(Je),{modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.default=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("name")),1),P(v(Je),{modelValue:s.value.name,"onUpdate:modelValue":o[2]||(o[2]=l=>s.value.name=l)},null,8,["modelValue"])],64))}}),Ym=H({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,s=Xw(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(r,o)=>lf((D(),ae("textarea",{"onUpdate:modelValue":o[0]||(o[0]=l=>qe(s)?s.value=l:null),"data-slot":"textarea",class:Ct(v(tt)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n.class))},null,2)),[[Oo,v(s)]])}}),QL=H({__name:"TextElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae(Me,null,[X("label",null,oe(r.$t("id")),1),P(v(Je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value.id=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("name")),1),P(v(Je),{modelValue:s.value.name,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.name=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("default")),1),P(v(Ym),{modelValue:s.value.default,"onUpdate:modelValue":o[2]||(o[2]=l=>s.value.default=l)},null,8,["modelValue"])],64))}}),ZL=H({__name:"TextareaElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae(Me,null,[X("label",null,oe(r.$t("id")),1),P(v(Je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value.id=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("name")),1),P(v(Je),{modelValue:s.value.name,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.name=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("default")),1),P(v(Ym),{modelValue:s.value.default,"onUpdate:modelValue":o[2]||(o[2]=l=>s.value.default=l)},null,8,["modelValue"])],64))}}),eN=H({__name:"HeadlineElement",props:{modelValue:ek},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae(Me,null,[X("label",null,oe(r.$t("id")),1),P(v(Je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value.id=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("default")),1),P(v(Je),{modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.default=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("name")),1),P(v(Je),{modelValue:s.value.name,"onUpdate:modelValue":o[2]||(o[2]=l=>s.value.name=l)},null,8,["modelValue"]),X("label",null,oe(r.$t("variant")),1),P(v(Df),{modelValue:s.value.variant,"onUpdate:modelValue":o[3]||(o[3]=l=>s.value.variant=l)},{default:V(()=>[P(v(If),null,{default:V(()=>[P(v(Lf))]),_:1}),P(v(Rf),null,{default:V(()=>[P(v(Gm),null,{default:V(()=>[P(v(ri),{value:"1"},{default:V(()=>[je(oe(r.$t("headline1")),1)]),_:1}),P(v(ri),{value:"2"},{default:V(()=>[je(oe(r.$t("headline2")),1)]),_:1}),P(v(ri),{value:"3"},{default:V(()=>[je(oe(r.$t("headline3")),1)]),_:1}),P(v(ri),{value:"4"},{default:V(()=>[je(oe(r.$t("headline4")),1)]),_:1}),P(v(ri),{value:"5"},{default:V(()=>[je(oe(r.$t("headline5")),1)]),_:1}),P(v(ri),{value:"6"},{default:V(()=>[je(oe(r.$t("headline6")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),Fy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Wy=rS,tN=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return Wy(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:r}=e,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],f=r==null?void 0:r[c];if(u===null)return null;const d=Fy(u)||Fy(f);return s[c][d]}),l=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),a=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...r,...l}[m]):{...r,...l}[m]===y})?[...c,f,d]:c},[]);return Wy(t,o,a,n==null?void 0:n.class,n==null?void 0:n.className)},Us=H({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{type:[String,Object,Function],default:"button"}},setup(t){const e=t;return(n,i)=>(D(),j(v(Fe),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:Ct(v(tt)(v(nN)({variant:n.variant,size:n.size}),e.class))},{default:V(()=>[le(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),nN=tN("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),iN=H({__name:"RowElement",props:{modelValue:ZS},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:o=>i("update:modelValue",o)});function r(o){o!==null&&o.addColumn(new Oa)}return(o,l)=>(D(),j(v(Us),{onClick:l[0]||(l[0]=a=>r(s.value))},{default:V(()=>[je(oe(o.$t("add_column")),1)]),_:1}))}}),sN=H({__name:"Sheet",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const s=zn(t,e);return(r,o)=>(D(),j(v(dx),xe({"data-slot":"sheet"},v(s)),{default:V(()=>[le(r.$slots,"default")]),_:3},16))}}),rN=H({__name:"SheetOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class");return(i,s)=>(D(),j(v(Ox),xe({"data-slot":"sheet-overlay",class:v(tt)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)},v(n)),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),oN=H({inheritAttrs:!1,__name:"SheetContent",props:{class:{},side:{default:"right"},forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=kt(n,"class","side"),r=zn(s,i);return(o,l)=>(D(),j(v(Rx),null,{default:V(()=>[P(rN),P(v(wx),xe({"data-slot":"sheet-content",class:v(tt)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",o.side==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",o.side==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",o.side==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",o.side==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",n.class)},{...v(r),...o.$attrs}),{default:V(()=>[le(o.$slots,"default"),P(v(Em),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"},{default:V(()=>[P(v(Zw),{class:"size-4"}),l[0]||(l[0]=X("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),lN=H({__name:"SheetDescription",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class");return(i,s)=>(D(),j(v(xx),xe({"data-slot":"sheet-description",class:v(tt)("text-muted-foreground text-sm",e.class)},v(n)),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),aN=H({__name:"SheetHeader",props:{class:{}},setup(t){const e=t;return(n,i)=>(D(),ae("div",{"data-slot":"sheet-header",class:Ct(v(tt)("flex flex-col gap-1.5 p-4",e.class))},[le(n.$slots,"default")],2))}}),cN=H({__name:"SheetTitle",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class");return(i,s)=>(D(),j(v(_x),xe({"data-slot":"sheet-title",class:v(tt)("text-foreground font-semibold",e.class)},v(n)),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),uN={class:"flex flex-col w-full m-2"},fN=H({__name:"ElementProperties",emits:["update:modelValue"],setup(t,{emit:e}){let n=se(!1);const i=ni();return i.$subscribe((s,r)=>{r.showProperties&&(n.value=!0)}),Te(n,s=>{s===!1&&i.setShowProperties(!1)}),(s,r)=>(D(),j(v(sN),{open:v(n),"onUpdate:open":r[8]||(r[8]=o=>qe(n)?n.value=o:n=o)},{default:V(()=>[P(v(oN),null,{default:V(()=>[P(v(aN),null,{default:V(()=>[P(v(cN),null,{default:V(()=>r[9]||(r[9]=[je("Properties")])),_:1,__:[9]}),P(v(lN))]),_:1}),X("div",uN,[v(i).getActiveItem.type===6?(D(),j(eN,{key:0,modelValue:v(i).getActiveItem,"onUpdate:modelValue":r[0]||(r[0]=o=>v(i).getActiveItem=o)},null,8,["modelValue"])):Ee("",!0),v(i).getActiveItem.type===9?(D(),j(XL,{key:1,modelValue:v(i).getActiveItem,"onUpdate:modelValue":r[1]||(r[1]=o=>v(i).getActiveItem=o)},null,8,["modelValue"])):Ee("",!0),v(i).getActiveItem.type===7?(D(),j(iN,{key:2,modelValue:v(i).getActiveItem,"onUpdate:modelValue":r[2]||(r[2]=o=>v(i).getActiveItem=o)},null,8,["modelValue"])):Ee("",!0),v(i).getActiveItem.type===5?(D(),j(ZL,{key:3,modelValue:v(i).getActiveItem,"onUpdate:modelValue":r[3]||(r[3]=o=>v(i).getActiveItem=o)},null,8,["modelValue"])):Ee("",!0),v(i).getActiveItem.type===4?(D(),j(QL,{key:4,modelValue:v(i).getActiveItem,"onUpdate:modelValue":r[4]||(r[4]=o=>v(i).getActiveItem=o)},null,8,["modelValue"])):Ee("",!0),v(i).getActiveItem.type===3?(D(),j(YL,{key:5,modelValue:v(i).getActiveItem,"onUpdate:modelValue":r[5]||(r[5]=o=>v(i).getActiveItem=o)},null,8,["modelValue"])):Ee("",!0),v(i).getActiveItem.type===2?(D(),j(jL,{key:6,modelValue:v(i).getActiveItem,"onUpdate:modelValue":r[6]||(r[6]=o=>v(i).getActiveItem=o)},null,8,["modelValue"])):Ee("",!0),v(i).getActiveItem.type===1?(D(),j(JL,{key:7,modelValue:v(i).getActiveItem,"onUpdate:modelValue":r[7]||(r[7]=o=>v(i).getActiveItem=o)},null,8,["modelValue"])):Ee("",!0)])]),_:1})]),_:1},8,["open"]))}}),tk=H({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const s=zn(t,e);return(r,o)=>(D(),j(v(dx),xe({"data-slot":"dialog"},v(s)),{default:V(()=>[le(r.$slots,"default")]),_:3},16))}}),dN=H({__name:"DialogClose",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(D(),j(v(Em),xe({"data-slot":"dialog-close"},e),{default:V(()=>[le(n.$slots,"default")]),_:3},16))}}),hN=H({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class");return(i,s)=>(D(),j(v(Ox),xe({"data-slot":"dialog-overlay"},v(n),{class:v(tt)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)}),{default:V(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),nk=H({__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=kt(n,"class"),r=zn(s,i);return(o,l)=>(D(),j(v(Rx),null,{default:V(()=>[P(hN),P(v(wx),xe({"data-slot":"dialog-content"},v(r),{class:v(tt)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",n.class)}),{default:V(()=>[le(o.$slots,"default"),P(v(Em),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},{default:V(()=>[P(v(Zw)),l[0]||(l[0]=X("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),ik=H({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class"),i=Hi(n);return(s,r)=>(D(),j(v(xx),xe({"data-slot":"dialog-description"},v(i),{class:v(tt)("text-muted-foreground text-sm",e.class)}),{default:V(()=>[le(s.$slots,"default")]),_:3},16,["class"]))}}),sk=H({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,i)=>(D(),ae("div",{"data-slot":"dialog-footer",class:Ct(v(tt)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e.class))},[le(n.$slots,"default")],2))}}),rk=H({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,i)=>(D(),ae("div",{"data-slot":"dialog-header",class:Ct(v(tt)("flex flex-col gap-2 text-center sm:text-left",e.class))},[le(n.$slots,"default")],2))}}),ok=H({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=kt(e,"class"),i=Hi(n);return(s,r)=>(D(),j(v(_x),xe({"data-slot":"dialog-title"},v(i),{class:v(tt)("text-lg leading-none font-semibold",e.class)}),{default:V(()=>[le(s.$slots,"default")]),_:3},16,["class"]))}}),pN=H({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(D(),j(v(zM),xe({"data-slot":"dialog-trigger"},e),{default:V(()=>[le(n.$slots,"default")]),_:3},16))}}),mN={class:"overflow-auto h-full w-full"},gN=H({__name:"ElementDependency",setup(t){const e=ni();let n=se(!1);function i(){e.getActiveItem.addDependency(new Uo)}return e.$subscribe((s,r)=>{r.showDependency&&(n.value=!0)}),Te(n,s=>{s===!1&&e.setShowDependency(!1)}),(s,r)=>(D(),j(v(tk),{class:"w-full h-full",open:v(n),"onUpdate:open":r[1]||(r[1]=o=>qe(n)?n.value=o:n=o)},{default:V(()=>[P(v(nk),{class:"h-full"},{default:V(()=>[P(v(rk),null,{default:V(()=>[P(v(ok),null,{default:V(()=>r[2]||(r[2]=[je("Dependencys")])),_:1,__:[2]}),P(v(ik))]),_:1}),X("div",mN,[P(v(Us),{onClick:r[0]||(r[0]=o=>i())},{default:V(()=>r[3]||(r[3]=[je("Add Dependency")])),_:1,__:[3]}),P(v(Xm),{dependencys:v(e).getActiveItem.dependencys},null,8,["dependencys"])]),P(v(sk))]),_:1})]),_:1},8,["open"]))}});let Nf=class{static getModelForType(e){switch(e){case 9:return new JS;case 8:return new Oa;case 7:return new ZS;case 6:return new ek;case 5:return new zL;case 4:return new WL;case 3:return new XS;case 2:return new By;case 1:return new QS;default:return new By}}};const Ca=Yw("items",{state:()=>({uuid:Ao(),items:[],name:Ao()}),getters:{getCount:t=>t.items.length,getItems:t=>t.items,getUuid:t=>t.uuid},actions:{loadJSON(){let t=this.items.reduce((e,n)=>(e.push(n.toJSON()),e),[]);return[{uuid:this.uuid,name:this.name,options:t}]},parseJSON(t){this.items=[];let e=JSON.parse(t);this.name=e[0].name,e[0].uuid&&(this.uuid=e[0].uuid),e[0].options.map(n=>{const i=Nf.getModelForType(n.type);i.fromJSON(n),this.addElement(i)})},addElement(t){this.items.push(t)},deleteItem(t){return this.items.some((e,n)=>{if(e.uuid===t.uuid)return t=this.items.splice(n,1)[0],!0;if(e.deleteItem(t))return!0})},moveItemBefore(t,e){const n=this.cutItem(t);return n?this.insertItem(this.items,n,e):!1},addElementAfter(t,e){this.insertItem(this.items,t,e)},cutItem(t){let e=null;return this.items.some((n,i)=>{if(n.uuid===t)return e=this.items.splice(i,1)[0],!0;if(e===null&&(e=n.cutItem(t),e!==null))return!0}),e},insertItem(t,e,n){let i=!1;for(let s=0;s(D(),ae("div",yN,[P(v(wN),{borders:e.dependency.borders},null,8,["borders"])]))}}),vN={class:"flex flex-row items-center gap-2 border-l-3 border-black pt-1"},wN=H({__name:"Border",props:{borders:{}},setup(t){function e(n){n.addDependency(new Uo)}return(n,i)=>(D(!0),ae(Me,null,Fn(n.borders,s=>(D(),ae("div",{class:"flex flex-col",key:s.uuid},[X("div",vN,[i[1]||(i[1]=X("span",{class:"w-5 flex-none"},[X("hr",{class:"bg-black h-1 border-0"})],-1)),P(v(Je),{modelValue:s.formula,"onUpdate:modelValue":r=>s.formula=r,placeholder:"Formula"},null,8,["modelValue","onUpdate:modelValue"]),P(v(Je),{modelValue:s.calcValue,"onUpdate:modelValue":r=>s.calcValue=r,placeholder:"CalcValue"},null,8,["modelValue","onUpdate:modelValue"]),P(v(Je),{modelValue:s.value,"onUpdate:modelValue":r=>s.value=r,placeholder:"Value"},null,8,["modelValue","onUpdate:modelValue"]),P(v(Us),{onClick:r=>e(s)},{default:V(()=>i[0]||(i[0]=[je("Add Dependency")])),_:2,__:[0]},1032,["onClick"])]),P(v(Xm),{dependencys:s.dependencys},null,8,["dependencys"])]))),128))}}),xN={class:"flex flex-row gap-2 border-l-3 border-black pt-1"},Xm=H({__name:"Dependency",props:{dependencys:{}},setup(t){const e=Ca();function n(i){i.addBorder(new gS)}return(i,s)=>(D(!0),ae(Me,null,Fn(i.dependencys,r=>(D(),ae("div",{class:"d-flex flex-wrap relative ml-5 mr-5",key:r.uuid},[X("div",xN,[s[2]||(s[2]=X("span",{class:"w-2 flex-none"},null,-1)),P(v(Df),{modelValue:r.relation,"onUpdate:modelValue":o=>r.relation=o},{default:V(()=>[P(v(If),{class:"w-[180px]"},{default:V(()=>[P(v(Lf),{placeholder:"Select Relation"})]),_:1}),P(v(Rf),null,{default:V(()=>[(D(!0),ae(Me,null,Fn(v(e).getItems,o=>(D(),j(v(ri),{value:o.id},{default:V(()=>[je(oe(o.id),1)]),_:2},1032,["value"]))),256))]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),P(v(SS),{for:"formula"},{default:V(()=>s[0]||(s[0]=[je("Formula")])),_:1,__:[0]}),P(v(Je),{name:"formula",modelValue:r.formula,"onUpdate:modelValue":o=>r.formula=o},null,8,["modelValue","onUpdate:modelValue"]),P(v(Us),{onClick:o=>n(r)},{default:V(()=>s[1]||(s[1]=[je("Add Border")])),_:2,__:[1]},1032,["onClick"])]),P(v(bN),{dependency:r},null,8,["dependency"])]))),128))}}),SN={class:"flex flex-row gap-1"},kN=H({__name:"OptionElement",props:{option:{}},emits:["update:option"],setup(t,{emit:e}){const n=t;function i(o){o.addDependency(new Uo)}let s=e;const r=Q({get:()=>n.option,set:o=>s("update:option",o)});return(o,l)=>(D(),ae(Me,null,[X("div",SN,[X("label",null,oe(o.$t("id")),1),P(v(Je),{modelValue:r.value.id,"onUpdate:modelValue":l[0]||(l[0]=a=>r.value.id=a)},null,8,["modelValue"]),X("label",null,oe(o.$t("name")),1),P(v(Je),{modelValue:r.value.name,"onUpdate:modelValue":l[1]||(l[1]=a=>r.value.name=a)},null,8,["modelValue"]),P(v(Us),{onClick:l[2]||(l[2]=a=>i(r.value))},{default:V(()=>[je(oe(o.$t("add_dependency")),1)]),_:1})]),P(v(Xm),{dependencys:r.value.dependencys},null,8,["dependencys"])],64))}}),ON={class:"w-full grid overflow-y-auto px-6"},CN=H({__name:"SelectSpecial",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e,s=se(!1);const r=Q({get:()=>n.modelValue,set:a=>i("update:modelValue",a)});function o(a){a.addOption(new YS(String(a.options.length+1)))}const l=ni();return l.$subscribe((a,c)=>{c.showOptions&&(s.value=!0)},{detached:!0}),Te(s,a=>{a===!1&&l.setShowOptions(!1)}),(a,c)=>v(l).getActiveItem.type===3?(D(),j(v(tk),{key:0,open:v(s),"onUpdate:open":c[1]||(c[1]=u=>qe(s)?s.value=u:s=u)},{default:V(()=>[P(v(pN),null,{default:V(()=>[P(v(Us),{class:"mt-2"},{default:V(()=>[je(oe(a.$t("edit_options")),1)]),_:1})]),_:1}),P(v(nk),{class:"min-w-full grid-rows-[auto_minmax(0,1fr)_auto] p-4 max-h-[90dvh]"},{default:V(()=>[P(v(rk),null,{default:V(()=>[P(v(ok),null,{default:V(()=>[je(oe(a.$t("edit_options")),1)]),_:1}),P(v(ik),null,{default:V(()=>[P(v(Us),{onClick:c[0]||(c[0]=u=>o(r.value))},{default:V(()=>[je(oe(a.$t("add_option")),1)]),_:1})]),_:1})]),_:1}),X("div",ON,[(D(!0),ae(Me,null,Fn(r.value.options,u=>(D(),ae("div",{class:"d-flex flex-wrap p-2 relative",key:u.uuid},[P(kN,{option:u},null,8,["option"])]))),128))]),P(v(sk),null,{default:V(()=>[P(v(dN),{"as-child":""},{default:V(()=>[P(v(Us),{type:"button",variant:"secondary"},{default:V(()=>[je(oe(a.$t("close")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Ee("",!0)}}),_N={class:""},AN=H({__name:"SpecialProperties",emits:["update:modelValue"],setup(t,{emit:e}){const n=ni();return(i,s)=>(D(),ae("div",_N,[P(CN,{modelValue:v(n).getActiveItem,"onUpdate:modelValue":s[0]||(s[0]=r=>v(n).getActiveItem=r)},null,8,["modelValue"])]))}}),EN={class:"flex gap-2 flex-row items-center"},TN={class:"w-60 flex-inital"},PN=H({__name:"InputElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae("div",EN,[X("label",TN,oe(s.value.name),1),P(v(Je),{placeholder:s.value.placeHolder,"onUpdate:placeholder":o[0]||(o[0]=l=>s.value.placeHolder=l),modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.default=l),name:s.value.name,"onUpdate:name":o[2]||(o[2]=l=>s.value.name=l),id:s.value.id,"onUpdate:id":o[3]||(o[3]=l=>s.value.id=l),required:s.value.required,"onUpdate:required":o[4]||(o[4]=l=>s.value.required=l)},null,8,["placeholder","modelValue","name","id","required"])]))}}),MN={class:"flex gap-2 flex-row"},DN={class:"w-60 flex-inital"},RN=H({__name:"HiddenElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae("div",MN,[X("label",DN,oe(s.value.name),1)]))}}),IN={class:"flex gap-2 flex-row items-center content-center"},LN={key:0,class:"text-4xl"},NN={key:1,class:"text-base"},$N={key:2,class:"text-lg"},VN={key:3,class:"text-xl"},BN={key:4,class:"text-2xl"},FN={key:5,class:"text-3xl"},WN={key:6,class:"text-4xl"},zN=H({__name:"HeadlineElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>{var l,a,c,u,f,d,h,p,m,y,g,x,b;return D(),ae("div",IN,[((l=s.value)==null?void 0:l.variant)=="1"?(D(),ae("h1",LN,oe((a=s.value)==null?void 0:a.default),1)):((c=s.value)==null?void 0:c.variant)=="6"?(D(),ae("h6",NN,oe((u=s.value)==null?void 0:u.default),1)):((f=s.value)==null?void 0:f.variant)=="5"?(D(),ae("h5",$N,oe((d=s.value)==null?void 0:d.default),1)):((h=s.value)==null?void 0:h.variant)=="4"?(D(),ae("h4",VN,oe((p=s.value)==null?void 0:p.default),1)):((m=s.value)==null?void 0:m.variant)=="3"?(D(),ae("h3",BN,oe((y=s.value)==null?void 0:y.default),1)):((g=s.value)==null?void 0:g.variant)=="2"?(D(),ae("h2",FN,oe((x=s.value)==null?void 0:x.default),1)):(D(),ae("h1",WN,oe((b=s.value)==null?void 0:b.default),1))])}}}),HN={class:"flex gap-2 flex-row"},UN={style:{"white-space":"pre-line"}},jN=H({__name:"TextElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>{var l;return D(),ae("div",HN,[X("p",UN,oe((l=s.value)==null?void 0:l.default),1)])}}}),qN={class:"flex gap-2 flex-row"},KN={class:"w-60 flex-inital"},GN=H({__name:"MediaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(D(),ae("div",qN,[X("label",KN,oe(s.value.name),1)]))}}),YN={class:"flex gap-2 flex-row"},XN={class:"w-60 flex-inital"},JN=H({__name:"TextareaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>{var l,a,c,u;return D(),ae("div",YN,[X("label",XN,oe((l=s.value)==null?void 0:l.name),1),P(v(Ym),{value:(a=s.value)==null?void 0:a.default,name:(c=s.value)==null?void 0:c.name,id:(u=s.value)==null?void 0:u.id},null,8,["value","name","id"])])}}}),QN={class:"flex gap-2 flex-row items-center"},ZN={class:"w-60 flex-inital"},e$={class:"w-full"},t$=H({__name:"SelectElementForm",props:{modelValue:XS},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=Q({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>{var l;return D(),ae("div",QN,[X("label",ZN,oe((l=s.value)==null?void 0:l.name),1),X("div",e$,[P(v(Df),{modelValue:s.value.default,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.default=a)},{default:V(()=>[P(v(If),null,{default:V(()=>[P(v(Lf))]),_:1}),P(v(Rf),null,{default:V(()=>[P(v(Gm),null,{default:V(()=>{var a;return[(D(!0),ae(Me,null,Fn((a=s.value)==null?void 0:a.options,c=>(D(),j(v(ri),{key:c.uuid,value:c.id},{default:V(()=>[je(oe(c.name),1)]),_:2},1032,["value"]))),128))]}),_:1})]),_:1})]),_:1},8,["modelValue"])])])}}}),lk=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},n$={},i$={class:"p-5 m-2 h-full text-center"};function s$(t,e){return D(),ae("div",i$,"Empty")}const r$=lk(n$,[["render",s$]]),o$={class:"flex gap-2 flex-col"},l$={key:0,class:"w-full flex flex-row gap-1"},a$=["onDrop","onDragleave","onDragenter"],c$={class:"inline-flex items-center justify-center w-full pointer-events-none"},u$={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},f$=H({__name:"RowElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=se("");let r=se(!1);const o=Ca(),l=ni(),a=Q({get:()=>n.modelValue,set:d=>i("update:modelValue",d)}),c=(d,h,p)=>{var m,y;if(s.value="",((m=d.dataTransfer)==null?void 0:m.getData("mode"))=="sort"){let g=o.cutItem(l.getSourceDragUuid);g!==null&&p.items.push(g),l.setDragMode(""),d.stopImmediatePropagation()}if(l.getDragMode=="insert"){const g=Number((y=d.dataTransfer)==null?void 0:y.getData("itemId"));p.items.push(Nf.getModelForType(g)),l.setDragMode(""),d.stopImmediatePropagation()}},u=(d,h)=>{s.value="",d.stopImmediatePropagation()};l.$subscribe((d,h)=>{h.showPreview?r.value=!0:r.value=!1});const f=(d,h)=>{s.value=h,d.stopImmediatePropagation(),l.getDragMode=="sort"&&h!=l.getSourceDragUuid&&d.stopImmediatePropagation()};return(d,h)=>(D(),ae("div",o$,[a.value.columns.length>0?(D(),ae("div",l$,[(D(!0),ae(Me,null,Fn(a.value.columns,p=>(D(),ae("div",{class:Ct([{border:!v(r)},"flex-1 p-1 bg-white"])},[p.items.length==0?(D(),ae("div",{key:0,class:"h-8 group items-center content-justify w-full mb-2",onDrop:m=>c(m,a.value.uuid,p),onDragleave:m=>u(m,p.uuid),onDragenter:m=>f(m,p.uuid)},[X("div",c$,[X("hr",{class:Ct(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":s.value==p.uuid}])},null,2),X("span",u$,[P(v(Qw),{class:Ct([{"text-orange-500":s.value==p.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,a$)):Ee("",!0),p.items.length>0?(D(),j(v(ak),{key:1,onDrop:m=>c(m,a.value.uuid,p),items:p.items},null,8,["onDrop","items"])):Ee("",!0)],2))),256))])):Ee("",!0),a.value.columns.length==0?(D(),j(r$,{key:1})):Ee("",!0)]))}}),d$={class:"overflow-auto h-full"},h$={class:"flex flex-col gap-2"},p$={key:0,class:"w-full"},m$=["onDragleave","onDragenter","onDrop"],g$={class:"inline-flex items-center justify-center w-full pointer-events-none"},y$={class:"absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-900 pointer-events-none"},b$=["onDragstart"],v$={class:"grow content-center items-center"},w$={key:0,class:"buttons absolute rounded-sm invisible right-0 bg-slate-100/70 flex flex-row gap-2"},x$=["onClick","title"],S$=["onClick","title"],k$=["onClick","title"],O$=["onClick"],C$=H({__name:"RenderElements",props:{items:{}},setup(t){const e=Ca(),n=ni(),i=se("");let s=se(!1);n.$subscribe((h,p)=>{p.showPreview?s.value=!0:s.value=!1});const r=(h,p)=>{var m;h.dataTransfer.dropEffect="move",h.dataTransfer.effectAllowed="move",(m=h.dataTransfer)==null||m.setData("mode","sort"),n.setDragMode("sort"),n.setSourceDragUuid(p),h.stopImmediatePropagation()},o=(h,p)=>{i.value="",h.stopImmediatePropagation()},l=(h,p)=>{i.value=p,n.getDragMode=="sort"&&p!=n.getSourceDragUuid&&h.stopImmediatePropagation()},a=(h,p)=>{var m,y;if(((m=h.dataTransfer)==null?void 0:m.getData("mode"))=="sort"){if(i.value="",n.getSourceDragUuid==p){n.setDragMode(""),h.stopImmediatePropagation();return}e.moveItemBefore(n.getSourceDragUuid,p),n.setDragMode(""),h.stopImmediatePropagation()}if(n.dragMode=="insert"){const g=Number((y=h.dataTransfer)==null?void 0:y.getData("itemId"));e.addElementAfter(Nf.getModelForType(g),p),h.stopImmediatePropagation()}},c=h=>{e.deleteItem(h)},u=h=>{n.setActiveItem(h),n.setShowProperties(!0)},f=h=>{n.setActiveItem(h),n.setShowOptions(!0)},d=h=>{n.setActiveItem(h),n.setShowDependency(!0)};return(h,p)=>(D(),ae("div",d$,[X("div",h$,[h.items.length>0?(D(!0),ae(Me,{key:0},Fn(h.items,m=>(D(),ae("div",{class:"d-flex flex flex-col relative items-center",key:m.uuid},[m.type!==1||m.type===1&&!v(s)?(D(),ae("div",p$,[v(s)?Ee("",!0):(D(),ae("div",{key:0,class:"h-8 group w-full",onDragleave:st(y=>o(y,m.uuid),["self"]),onDragenter:st(y=>l(y,m.uuid),["self"]),onDrop:y=>a(y,m.uuid)},[X("div",g$,[X("hr",{class:Ct(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":i.value==m.uuid}])},null,2),X("span",y$,[P(v(Qw),{class:Ct([{"text-orange-500":i.value==m.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,m$)),X("div",{class:Ct([{"border-white":!m.hasDependencys(),"border-blue-500":m.hasDependencys()},"element w-full flex flex-row border-l-2 hover:border-orange-500 pl-2 transition duration-500 min-h-5",{" bg-slate-50":m.isFocused===!0}]),onDragstart:y=>r(y,m.uuid),draggable:"true"},[X("div",v$,[m.type===2?(D(),j(PN,{key:0,modelValue:m,"onUpdate:modelValue":y=>m=y},null,8,["modelValue","onUpdate:modelValue"])):Ee("",!0),m.type===1?(D(),j(RN,{key:1,modelValue:m,"onUpdate:modelValue":y=>m=y},null,8,["modelValue","onUpdate:modelValue"])):Ee("",!0),m.type===3?(D(),j(t$,{key:2,modelValue:m,"onUpdate:modelValue":y=>m=y},null,8,["modelValue","onUpdate:modelValue"])):Ee("",!0),m.type===4?(D(),j(jN,{key:3,modelValue:m,"onUpdate:modelValue":y=>m=y},null,8,["modelValue","onUpdate:modelValue"])):Ee("",!0),m.type===5?(D(),j(JN,{key:4,modelValue:m,"onUpdate:modelValue":y=>m=y},null,8,["modelValue","onUpdate:modelValue"])):Ee("",!0),m.type===6?(D(),j(zN,{key:5,modelValue:m,"onUpdate:modelValue":y=>m=y},null,8,["modelValue","onUpdate:modelValue"])):Ee("",!0),m.type===7?(D(),j(f$,{key:6,modelValue:m,"onUpdate:modelValue":y=>m=y},null,8,["modelValue","onUpdate:modelValue"])):Ee("",!0),m.type===9?(D(),j(GN,{key:7,modelValue:m,"onUpdate:modelValue":y=>m=y},null,8,["modelValue","onUpdate:modelValue"])):Ee("",!0)]),v(s)?Ee("",!0):(D(),ae("div",w$,[X("div",{onClick:y=>d(m),title:h.$t("dependencies"),class:"m-2 cursor-pointer"},[P(v(JT))],8,x$),m.type===3?(D(),ae("div",{key:0,onClick:y=>f(m),title:h.$t("options"),class:"m-2 cursor-pointer"},[P(v(XT))],8,S$)):Ee("",!0),X("div",{onClick:y=>u(m),title:h.$t("settings"),class:"m-2 cursor-pointer"},[P(v(QT))],8,k$),X("div",{onClick:y=>c(m),class:"text-red-500 m-2 cursor-pointer"},[P(v(sP))],8,O$)]))],42,b$)])):Ee("",!0)]))),128)):Ee("",!0)])]))}}),ak=lk(C$,[["__scopeId","data-v-30c8d590"]]),_$=H({__name:"Main",setup(t){const e=ni(),n=Ca();function i(s){var r;if(e.dragMode=="insert"){const o=Number((r=s.dataTransfer)==null?void 0:r.getData("itemId"));n.addElement(Nf.getModelForType(o))}}return(s,r)=>(D(),ae("div",{class:"border m-1 p-4 rounded-xl w-full h-full shadow bg-white",onDrop:r[0]||(r[0]=o=>i(o)),onDragover:r[1]||(r[1]=st(()=>{},["prevent"]))},[P(v(ak),{items:v(n).getItems},null,8,["items"])],32))}}),A$={class:"mb-2"},E$={key:0,class:"mr-2"},T$={class:"font-medium"},P$={class:"ml-2 text-xs bg-white px-2 py-1 rounded opacity-75"},M$={key:1,class:"ml-2 text-xs bg-green-200 px-2 py-1 rounded font-mono"},D$={key:0,class:"mt-2 ml-6 space-y-1"},R$={class:"p-2 bg-gray-50 rounded text-sm font-mono"},I$={class:"font-semibold text-gray-700"},L$={key:0,class:"p-2 bg-blue-50 rounded text-sm font-mono"},N$={class:"text-blue-800"},$$={key:0,class:"mt-2"},V$=H({__name:"NodeRenderer",props:{node:{},level:{},parentId:{},index:{}},setup(t){const e=t,n=dn("expandedNodes"),i=dn("toggleNode"),s=dn("getNodeType"),r=dn("getNodeColor"),o=dn("getColoredFormulaParts"),l=Q(()=>`${e.parentId}-${e.index}`),a=Q(()=>e.node.parts&&e.node.parts.length>0),c=Q(()=>n==null?void 0:n.value.has(l.value)),u=Q(()=>s?s(e.node.name):""),f=Q(()=>r&&u.value?r(u.value):""),d=Q(()=>e.node.unParsed),h=()=>{a.value&&i&&i(l.value)};return(p,m)=>{const y=V1("NodeRenderer",!0);return D(),ae("div",A$,[X("div",{class:Ct(["p-3 rounded-lg border-2 transition-all hover:shadow-md",f.value]),style:ti({marginLeft:p.level*20+"px"})},[X("div",{class:"flex items-center cursor-pointer",onClick:h},[a.value?(D(),ae("span",E$,[c.value?(D(),j(v(bm),{key:0,size:16})):(D(),j(v(qT),{key:1,size:16}))])):Ee("",!0),X("span",T$,oe(p.node.name),1),X("span",P$,oe(u.value),1),p.node.result!==void 0?(D(),ae("span",M$," = "+oe(p.node.result),1)):Ee("",!0)]),d.value?(D(),ae("div",D$,[X("div",R$,[X("span",I$,oe(p.node.name)+" = ",1),v(o)?(D(!0),ae(Me,{key:0},Fn(v(o)(d.value),(g,x)=>(D(),ae("span",{key:x,class:Ct(g.colorClass)},oe(g.text),3))),128)):Ee("",!0)]),p.node.parsed&&p.node.parsed!==p.node.unParsed?(D(),ae("div",L$,[m[0]||(m[0]=X("span",{class:"font-semibold text-blue-700"},"Aufgelöst: ",-1)),X("span",N$,oe(p.node.parsed),1)])):Ee("",!0)])):Ee("",!0)],6),a.value&&c.value?(D(),ae("div",$$,[(D(!0),ae(Me,null,Fn(p.node.parts,(g,x)=>(D(),j(y,{key:x,node:g,level:p.level+1,"parent-id":l.value,index:x},null,8,["node","level","parent-id","index"]))),128))])):Ee("",!0)])}}}),B$={class:"w-full p-6 min-h-screen"},F$={key:0,class:"mb-4 bg-red-100 border-l-4 border-red-500 text-red-700 p-4",role:"alert"},W$={key:1,class:"text-center py-10"},z$={key:2,class:"grid grid-cols-1 gap-6"},H$={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white"},U$={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white border-l-4 border-green-500"},j$={class:"flex items-center justify-between bg-green-50 p-4 rounded-lg"},q$={class:"flex items-center space-x-3"},K$={class:"text-lg font-medium text-gray-800"},G$={class:"text-2xl font-bold text-green-600"},Y$={class:"text-sm text-gray-500"},X$=H({__name:"FormulaVisualizer",setup(t){const e=se(new Set),n=ni(),i=Q(()=>n.getFormulaData),s=Q(()=>n.getFormulaError),r=Q(()=>n.isFormulaLoading),o=f=>{const d=new Set(e.value);d.has(f)?d.delete(f):d.add(f),e.value=d},l=f=>f.startsWith("$F")&&f.endsWith("$F")?"formula":f.startsWith("$P")&&f.endsWith("$P")?"parameter":f.startsWith("$V")&&f.endsWith("$V")?"variable":f.startsWith("$CV")&&f.endsWith("$CV")?"calc-variable":/^[0-9.]+$/.test(f)?"value":f.startsWith("calc")?"main":"function",a=f=>{switch(f){case"formula":return"bg-purple-100 border-purple-300 text-purple-800";case"parameter":return"bg-blue-100 border-blue-300 text-blue-800";case"variable":return"bg-orange-100 border-orange-300 text-orange-800";case"calc-variable":return"bg-teal-100 border-teal-300 text-teal-800";case"value":return"bg-lime-100 border-lime-400 text-lime-800";case"main":return"bg-red-100 border-red-300 text-red-800";case"function":return"bg-yellow-100 border-yellow-300 text-yellow-800";default:return"bg-gray-100 border-gray-300 text-gray-800"}},c=f=>{const d=[];let h=0;const p=/(\$F[^$]*\$F|\$P[^$]*\$P|\$CV[^$]*\$CV|\$V[^$]*\$V)/g;let m;for(;(m=p.exec(f))!==null;){m.index>h&&d.push({text:f.substring(h,m.index),colorClass:"text-gray-800"});const y=m[0];let g="";y.startsWith("$F")?g="text-purple-600 font-semibold":y.startsWith("$P")?g="text-blue-600 font-semibold":y.startsWith("$CV")?g="text-teal-600 font-semibold":y.startsWith("$V")&&(g="text-orange-600 font-semibold"),d.push({text:y,colorClass:g}),h=m.index+y.length}return hi.value?i.value.reduce((f,d)=>f+(d.result||0),0):0;return es("expandedNodes",e),es("toggleNode",o),es("getNodeType",l),es("getNodeColor",a),es("getColoredFormulaParts",c),(f,d)=>(D(),ae("div",B$,[s.value?(D(),ae("div",F$,[d[0]||(d[0]=X("p",{class:"font-bold"},"Fehler",-1)),X("p",null,oe(s.value),1)])):Ee("",!0),r.value?(D(),ae("div",W$,d[1]||(d[1]=[X("p",null,"Lade Formeldaten...",-1)]))):Ee("",!0),!r.value&&i.value?(D(),ae("div",z$,[X("div",H$,[d[2]||(d[2]=X("h2",{class:"text-xl font-semibold mb-4 text-gray-700"},"Baum-Struktur",-1)),X("div",null,[(D(!0),ae(Me,null,Fn(i.value,(h,p)=>(D(),j(V$,{key:p,node:h,level:0,"parent-id":"root",index:p},null,8,["node","index"]))),128))])]),X("div",U$,[d[4]||(d[4]=X("h2",{class:"text-xl font-semibold mb-3 text-gray-700"},"Gesamtsumme",-1)),X("div",j$,[X("div",q$,[X("span",K$,oe(i.value.map(h=>h.result||0).join(" + ")),1),d[3]||(d[3]=X("span",{class:"text-gray-500"},"=",-1)),X("span",G$,oe(u()),1)]),X("div",Y$," ("+oe(i.value.length)+" Formel"+oe(i.value.length!==1?"n":"")+") ",1)])]),d[5]||(d[5]=mw('

Legende

Formel ($F...$F)
Parameter ($P...$P)
Variable ($V...$V)
Kalk-Variable ($CV...$CV)
Wert (Zahlen)
Hauptformel
',1))])):Ee("",!0)]))}});let qh=[],ck=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=ck[i])e=i+1;else return!0;if(e==n)return!1}}function zy(t){return t>=127462&&t<=127487}const Hy=8205;function Q$(t,e,n=!0,i=!0){return(n?uk:Z$)(t,e,i)}function uk(t,e,n){if(e==t.length)return e;e&&fk(t.charCodeAt(e))&&dk(t.charCodeAt(e-1))&&e--;let i=Cd(t,e);for(e+=Uy(i);e=0&&zy(Cd(t,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Z$(t,e,n){for(;e>0;){let i=uk(t,e-2,n);if(i=56320&&t<57344}function dk(t){return t>=55296&&t<56320}function Uy(t){return t<65536?1:2}class Ye{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Po(this,e,n);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(n,this.length,s,1),Ai.from(s,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Po(this,e,n);let i=[];return this.decompose(e,n,i,0),Ai.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Cl(this),r=new Cl(e);for(let o=n,l=n;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Cl(this,e)}iterRange(e,n=this.length){return new hk(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new pk(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ye.empty:e.length<=32?new Ot(e):Ai.from(Ot.split(e,[]))}}class Ot extends Ye{constructor(e,n=eV(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((n?i:l)>=e)return new tV(s,l,i,o);s=l+1,i++}}decompose(e,n,i,s){let r=e<=0&&n>=this.length?this:new Ot(jy(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Vc(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Ot(l,o.length+r.length));else{let a=l.length>>1;i.push(new Ot(l.slice(0,a)),new Ot(l.slice(a)))}}else i.push(r)}replace(e,n,i){if(!(i instanceof Ot))return super.replace(e,n,i);[e,n]=Po(this,e,n);let s=Vc(this.text,Vc(i.text,jy(this.text,0,e)),n),r=this.length+i.length-(n-e);return s.length<=32?new Ot(s,r):Ai.from(Ot.split(s,[]),r)}sliceString(e,n=this.length,i=` -`){[e,n]=Po(this,e,n);let s="";for(let r=0,o=0;r<=n&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),n-r)),r=a+1}return s}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(n.push(new Ot(i,s)),i=[],s=-1);return s>-1&&n.push(new Ot(i,s)),n}}class Ai extends Ye{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((n?a:l)>=e)return o.lineInner(e,n,i,s);s=l+1,i=a+1}}decompose(e,n,i,s){for(let r=0,o=0;o<=n&&r=o){let c=s&((o<=e?1:0)|(a>=n?2:0));o>=e&&a<=n&&!c?i.push(l):l.decompose(e-o,n-o,i,c)}o=a+1}}replace(e,n,i){if([e,n]=Po(this,e,n),i.lines=r&&n<=l){let a=o.replace(e-r,n-r,i),c=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>c>>6){let u=this.children.slice();return u[s]=a,new Ai(u,this.length-(n-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` -`){[e,n]=Po(this,e,n);let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,n-o,i)),o=a+1}return s}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ai))return 0;let i=0,[s,r,o,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=n,r+=n){if(s==o||r==l)return i;let a=this.children[s],c=e.children[r];if(a!=c)return i+a.scanIdentical(c,n);i+=a.length+1}}static from(e,n=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let h of e)i+=h.lines;if(i<32){let h=[];for(let p of e)p.flatten(h);return new Ot(h,n)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,c=-1,u=[];function f(h){let p;if(h.lines>r&&h instanceof Ai)for(let m of h.children)f(m);else h.lines>o&&(a>o||!a)?(d(),l.push(h)):h instanceof Ot&&a&&(p=u[u.length-1])instanceof Ot&&h.lines+p.lines<=32?(a+=h.lines,c+=h.length+1,u[u.length-1]=new Ot(p.text.concat(h.text),p.length+1+h.length)):(a+h.lines>s&&d(),a+=h.lines,c+=h.length+1,u.push(h))}function d(){a!=0&&(l.push(u.length==1?u[0]:Ai.from(u,c)),c=-1,a=u.length=0)}for(let h of e)f(h);return d(),l.length==1?l[0]:new Ai(l,n)}}Ye.empty=new Ot([""],0);function eV(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Vc(t,e,n=0,i=1e9){for(let s=0,r=0,o=!0;r=n&&(a>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof Ot?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof Ot?s.text.length:s.children.length;if(o==(n>0?l:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(s instanceof Ot){let a=s.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,a.length>Math.max(0,e))return this.value=e==0?a:n>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(n<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(n>0?1:(a instanceof Ot?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class hk{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Cl(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*n,this.value=s.length<=i?s:n<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class pk{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:s}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ye.prototype[Symbol.iterator]=function(){return this.iter()},Cl.prototype[Symbol.iterator]=hk.prototype[Symbol.iterator]=pk.prototype[Symbol.iterator]=function(){return this});class tV{constructor(e,n,i,s){this.from=e,this.to=n,this.number=i,this.text=s}get length(){return this.to-this.from}}function Po(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Jt(t,e,n=!0,i=!0){return Q$(t,e,n,i)}function nV(t){return t>=56320&&t<57344}function iV(t){return t>=55296&&t<56320}function xn(t,e){let n=t.charCodeAt(e);if(!iV(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return nV(i)?(n-55296<<10)+(i-56320)+65536:n}function Jm(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Ei(t){return t<65536?1:2}const Kh=/\r\n?|\n/;var hn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(hn||(hn={}));class Ni{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return r+(e-s);r+=l}else{if(i!=hn.Simple&&c>=e&&(i==hn.TrackDel&&se||i==hn.TrackBefore&&se))return null;if(c>e||c==e&&n<0&&!l)return e==s||n<0?r:r+a;r+=a}s=c}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,n=e){for(let i=0,s=0;i=0&&s<=n&&l>=e)return sn?"cover":!0;s=l}return!1}toString(){let e="";for(let n=0;n=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ni(e)}static create(e){return new Ni(e)}}class It extends Ni{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Gh(this,(n,i,s,r,o)=>e=e.replace(s,s+(i-n),o),!1),e}mapDesc(e,n=!1){return Yh(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let s=0,r=0;s=0){n[s]=l,n[s+1]=o;let a=s>>1;for(;i.length0&&Bs(i,n,r.text),r.forward(u),l+=u}let c=e[o++];for(;l>1].toJSON()))}return e}static of(e,n,i){let s=[],r=[],o=0,l=null;function a(u=!1){if(!u&&!s.length)return;od||f<0||d>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let p=h?typeof h=="string"?Ye.of(h.split(i||Kh)):h:Ye.empty,m=p.length;if(f==d&&m==0)return;fo&&tn(s,f-o,-1),tn(s,d-f,m),Bs(r,s,p),o=d}}return c(e),a(!l),l}static empty(e){return new It(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)n.push(r[0],0);else{for(;i.length=0&&n<=0&&n==t[s+1]?t[s]+=e:s>=0&&e==0&&t[s]==0?t[s+1]+=n:i?(t[s]+=e,t[s+1]+=n):t.push(e,n)}function Bs(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],a=t.sections[o++];e(s,c,r,u,f),s=c,r=u}}}function Yh(t,e,n,i=!1){let s=[],r=i?[]:null,o=new Xl(t),l=new Xl(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let c=Math.min(o.len,l.len);tn(s,c,-1),o.forward(c),l.forward(c)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let c=0,u=o.len;for(;u;)if(l.ins==-1){let f=Math.min(u,l.len);c+=f,u-=f,l.forward(f)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>c),r.forward2(a),o.forward(a)}}}}class Xl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Ye.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Ye.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class br{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new br(i,s,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return J.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return J.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return J.range(e.anchor,e.head)}static create(e,n,i){return new br(e,n,i)}}class J{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:J.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new J(e.ranges.map(n=>br.fromJSON(n)),e.main)}static single(e,n=e){return new J([J.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?8:0)|r)}static normalized(e,n=0){let i=e[n];e.sort((s,r)=>s.from-r.from),n=e.indexOf(i);for(let s=1;sr.head?J.range(a,l):J.range(l,a))}}return new J(e,n)}}function gk(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Qm=0;class ge{constructor(e,n,i,s,r){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=s,this.id=Qm++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new ge(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:Zm),!!e.static,e.enables)}of(e){return new Bc([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bc(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bc(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function Zm(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class Bc{constructor(e,n,i,s){this.dependencies=e,this.facet=n,this.type=i,this.value=s,this.id=Qm++}dynamicSlot(e){var n;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?c=!0:(((n=e[f.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,d){if(a&&d.docChanged||c&&(d.docChanged||d.selection)||Xh(f,u)){let h=i(f);if(l?!qy(h,f.values[o],s):!s(h,f.values[o]))return f.values[o]=h,1}return 0},reconfigure:(f,d)=>{let h,p=d.config.address[r];if(p!=null){let m=Su(d,p);if(this.dependencies.every(y=>y instanceof ge?d.facet(y)===f.facet(y):y instanceof Zt?d.field(y,!1)==f.field(y,!1):!0)||(l?qy(h=i(f),m,s):s(h=i(f),m)))return f.values[o]=m,0}else h=i(f);return f.values[o]=h,1}}}}function qy(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[a.id]),s=n.map(a=>a.type),r=i.filter(a=>!(a&1)),o=t[e.id]>>1;function l(a){let c=[];for(let u=0;ui===s),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(oc).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,s)=>{let r=i.values[n],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[n]=o,1)},reconfigure:(i,s)=>{let r=i.facet(oc),o=s.facet(oc),l;return(l=r.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[n]=l.create(i),1):s.config.address[this.id]!=null?(i.values[n]=s.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,oc.of({field:this,create:e})]}get extension(){return this}}const hr={lowest:4,low:3,default:2,high:1,highest:0};function nl(t){return e=>new yk(e,t)}const Fr={highest:nl(hr.highest),high:nl(hr.high),default:nl(hr.default),low:nl(hr.low),lowest:nl(hr.lowest)};class yk{constructor(e,n){this.inner=e,this.prec=n}}class _a{of(e){return new Jh(this,e)}reconfigure(e){return _a.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Jh{constructor(e,n){this.compartment=e,this.inner=n}}class xu{constructor(e,n,i,s,r,o){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let s=[],r=Object.create(null),o=new Map;for(let d of rV(e,n,o))d instanceof Zt?s.push(d):(r[d.facet.id]||(r[d.facet.id]=[])).push(d);let l=Object.create(null),a=[],c=[];for(let d of s)l[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=i==null?void 0:i.config.facets;for(let d in r){let h=r[d],p=h[0].facet,m=u&&u[d]||[];if(h.every(y=>y.type==0))if(l[p.id]=a.length<<1|1,Zm(m,h))a.push(i.facet(p));else{let y=p.combine(h.map(g=>g.value));a.push(i&&p.compare(y,i.facet(p))?i.facet(p):y)}else{for(let y of h)y.type==0?(l[y.id]=a.length<<1|1,a.push(y.value)):(l[y.id]=c.length<<1,c.push(g=>y.dynamicSlot(g)));l[p.id]=c.length<<1,c.push(y=>sV(y,p,h))}}let f=c.map(d=>d(l));return new xu(e,o,f,l,a,r)}}function rV(t,e,n){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let c=i[a].indexOf(o);c>-1&&i[a].splice(c,1),o instanceof Jh&&n.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let c of o)r(c,l);else if(o instanceof Jh){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),r(c,l)}else if(o instanceof yk)r(o.inner,o.prec);else if(o instanceof Zt)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Bc)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,hr.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(c,l)}}return r(t,hr.default),i.reduce((o,l)=>o.concat(l))}function _l(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let s=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|s}function Su(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const bk=ge.define(),Qh=ge.define({combine:t=>t.some(e=>e),static:!0}),vk=ge.define({combine:t=>t.length?t[0]:void 0,static:!0}),wk=ge.define(),xk=ge.define(),Sk=ge.define(),kk=ge.define({combine:t=>t.length?t[0]:!1});class xs{constructor(e,n){this.type=e,this.value=n}static define(){return new oV}}class oV{of(e){return new xs(this,e)}}class lV{constructor(e){this.map=e}of(e){return new De(this,e)}}class De{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new De(this.type,n)}is(e){return this.type==e}static define(e={}){return new lV(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(n);r&&i.push(r)}return i}}De.reconfigure=De.define();De.appendConfig=De.define();class Vt{constructor(e,n,i,s,r,o){this.startState=e,this.changes=n,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&gk(i,n.newLength),r.some(l=>l.type==Vt.time)||(this.annotations=r.concat(Vt.time.of(Date.now())))}static create(e,n,i,s,r,o){return new Vt(e,n,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Vt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Vt.time=xs.define();Vt.userEvent=xs.define();Vt.addToHistory=xs.define();Vt.remote=xs.define();function aV(t,e){let n=[];for(let i=0,s=0;;){let r,o;if(i=t[i]))r=t[i++],o=t[i++];else if(s=0;s--){let r=i[s](t);r instanceof Vt?t=r:Array.isArray(r)&&r.length==1&&r[0]instanceof Vt?t=r[0]:t=Ck(e,mo(r),!1)}return t}function uV(t){let e=t.startState,n=e.facet(Sk),i=t;for(let s=n.length-1;s>=0;s--){let r=n[s](t);r&&Object.keys(r).length&&(i=Ok(i,Zh(e,r,t.changes.newLength),!0))}return i==t?t:Vt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const fV=[];function mo(t){return t==null?fV:Array.isArray(t)?t:[t]}var bt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(bt||(bt={}));const dV=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ep;try{ep=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function hV(t){if(ep)return ep.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||dV.test(n)))return!0}return!1}function pV(t){return e=>{if(!/\S/.test(e))return bt.Space;if(hV(e))return bt.Word;for(let n=0;n-1)return bt.Word;return bt.Other}}class Be{constructor(e,n,i,s,r,o){this.config=e,this.doc=n,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(c,a)),n=null),s.set(l.value.compartment,l.value.extension)):l.is(De.reconfigure)?(n=null,i=l.value):l.is(De.appendConfig)&&(n=null,i=mo(i).concat(l.value));let r;n?r=e.startState.values.slice():(n=xu.resolve(i,s,this),r=new Be(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(a,c)=>c.reconfigure(a,this),null).values);let o=e.startState.facet(Qh)?e.newSelection:e.newSelection.asSingle();new Be(n,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:J.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),s=this.changes(i.changes),r=[i.range],o=mo(i.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return Be.create({doc:e.doc,selection:J.fromJSON(e.selection),extensions:n.extensions?s.concat([n.extensions]):s})}static create(e={}){let n=xu.resolve(e.extensions||[],new Map),i=e.doc instanceof Ye?e.doc:Ye.of((e.doc||"").split(n.staticFacet(Be.lineSeparator)||Kh)),s=e.selection?e.selection instanceof J?e.selection:J.single(e.selection.anchor,e.selection.head):J.single(0);return gk(s,i.length),n.staticFacet(Qh)||(s=s.asSingle()),new Be(n,i,s,n.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Be.tabSize)}get lineBreak(){return this.facet(Be.lineSeparator)||` -`}get readOnly(){return this.facet(kk)}phrase(e,...n){for(let i of this.facet(Be.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>n.length?i:n[r-1]})),e}languageDataAt(e,n,i=-1){let s=[];for(let r of this.facet(bk))for(let o of r(this,n,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return pV(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=Jt(n,o,!1);if(r(n.slice(a,o))!=bt.Word)break;o=a}for(;lt.length?t[0]:4});Be.lineSeparator=vk;Be.readOnly=kk;Be.phrases=ge.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(s=>t[s]==e[s])}});Be.languageData=bk;Be.changeFilter=wk;Be.transactionFilter=xk;Be.transactionExtender=Sk;_a.reconfigure=De.define();function Ui(t,e,n={}){let i={};for(let s of t)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(n,r))i[r]=n[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class Tr{eq(e){return this==e}range(e,n=e){return tp.create(e,n,this)}}Tr.prototype.startSide=Tr.prototype.endSide=0;Tr.prototype.point=!1;Tr.prototype.mapMode=hn.TrackDel;let tp=class _k{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new _k(e,n,i)}};function np(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class eg{constructor(e,n,i,s){this.from=e,this.to=n,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,c=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-n;if(a==o)return c>=0?o:l;c>=0?l=a:o=a+1}}between(e,n,i,s){for(let r=this.findIndex(n,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rh||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(l=Math.max(l,h-d)),i.push(c),s.push(d-o),r.push(h-o))}return{mapped:i.length?new eg(s,r,i,l):null,pos:o}}}class Ge{constructor(e,n,i,s){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=s}static create(e,n,i,s){return new Ge(e,n,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(i&&(n=n.slice().sort(np)),this.isEmpty)return n.length?Ge.of(n):this;let l=new Ak(this,null,-1).goto(0),a=0,c=[],u=new gs;for(;l.value||a=0){let f=n[a++];u.addInner(f.from,f.to,f.value)||c.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,n-r,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return Jl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Jl.from(e).goto(n)}static compare(e,n,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=Ky(o,l,i),c=new il(o,a,r),u=new il(l,a,r);i.iterGaps((f,d,h)=>Gy(c,f,u,d,h,s)),i.empty&&i.length==0&&Gy(c,0,u,0,0,s)}static eq(e,n,i=0,s){s==null&&(s=999999999);let r=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=Ky(r,o),a=new il(r,l,0).goto(i),c=new il(o,l,0).goto(i);for(;;){if(a.to!=c.to||!ip(a.active,c.active)||a.point&&(!c.point||!a.point.eq(c.point)))return!1;if(a.to>s)return!0;a.next(),c.next()}}static spans(e,n,i,s,r=-1){let o=new il(e,null,r).goto(n),l=n,a=o.openStart;for(;;){let c=Math.min(o.to,i);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,c,o.active,a),a=o.openEnd(c));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,n=!1){let i=new gs;for(let s of e instanceof tp?[e]:n?mV(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return Ge.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=Ge.empty;s=s.nextLayer)n=new Ge(s.chunkPos,s.chunk,n,Math.max(s.maxPoint,n.maxPoint));return n}}Ge.empty=new Ge([],[],null,-1);function mV(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(np);e=i}return t}Ge.empty.nextLayer=Ge.empty;class gs{finishChunk(e){this.chunks.push(new eg(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new gs)).add(e,n,i)}addInner(e,n,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(Ge.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ge.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Ky(t,e,n){let i=new Map;for(let r of t)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new Ak(o,n,i,r));return s.length==1?s[0]:new Jl(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)_d(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)_d(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),_d(this.heap,0)}}}function _d(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let s=t[i];if(i+1=0&&(s=t[i+1],i++),n.compare(s)<0)break;t[i]=n,t[e]=s,e=i}}class il{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Jl.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){lc(this.active,e),lc(this.activeTo,e),lc(this.activeRank,e),this.minActive=Yy(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:s,rank:r}=this.cursor;for(;n0;)n++;ac(this.active,n,i),ac(this.activeTo,n,s),ac(this.activeRank,n,r),e&&ac(e,n,this.cursor.from),this.minActive=Yy(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&lc(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function Gy(t,e,n,i,s,r){t.goto(e),n.goto(i);let o=i+s,l=i,a=i-e;for(;;){let c=t.to+a-n.to,u=c||t.endSide-n.endSide,f=u<0?t.to+a:n.to,d=Math.min(f,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&ip(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(l,d,t.point,n.point):d>l&&!ip(t.active,n.active)&&r.compareRange(l,d,t.active,n.active),f>o)break;(c||t.openEnd!=n.openEnd)&&r.boundChange&&r.boundChange(f),l=f,u<=0&&t.next(),u>=0&&n.next()}}function ip(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function Yy(t,e){let n=-1,i=1e9;for(let s=0;s=e)return s;if(s==t.length)break;r+=t.charCodeAt(s)==9?n-r%n:1,s=Jt(t,s)}return i===!0?-1:t.length}const rp="ͼ",Xy=typeof Symbol>"u"?"__"+rp:Symbol.for(rp),op=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Jy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Js{constructor(e,n){this.rules=[];let{finish:i}=n||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,c){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let h in l){let p=l[h];if(/&/.test(h))r(h.split(/,\s*/).map(m=>o.map(y=>m.replace(/&/,y))).reduce((m,y)=>m.concat(y)),p,a);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");r(s(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||d)&&a.push((i&&!f&&!c?o.map(i):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=Jy[Xy]||1;return Jy[Xy]=e+1,rp+e.toString(36)}static mount(e,n,i){let s=e[op],r=i&&i.nonce;s?r&&s.setNonce(r):s=new gV(e,r),s.mount(Array.isArray(n)?n:[n],e)}}let Qy=new Map;class gV{constructor(e,n){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=Qy.get(i);if(r)return e[op]=r;this.sheet=new s.CSSStyleSheet,Qy.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[op]=this}mount(e,n){let i=this.sheet,s=0,r=0;for(let o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},yV=typeof navigator<"u"&&/Mac/.test(navigator.platform),bV=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Xt=0;Xt<10;Xt++)Qs[48+Xt]=Qs[96+Xt]=String(Xt);for(var Xt=1;Xt<=24;Xt++)Qs[Xt+111]="F"+Xt;for(var Xt=65;Xt<=90;Xt++)Qs[Xt]=String.fromCharCode(Xt+32),Ql[Xt]=String.fromCharCode(Xt);for(var Ad in Qs)Ql.hasOwnProperty(Ad)||(Ql[Ad]=Qs[Ad]);function vV(t){var e=yV&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||bV&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ql:Qs)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function lt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var s=n[i];typeof s=="string"?t.setAttribute(i,s):s!=null&&(t[i]=s)}e++}for(;e.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function xV(t,e,n,i,s,r,o,l){let a=t.ownerDocument,c=a.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==a.body,p=1,m=1;if(h)d=wV(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let x=u.getBoundingClientRect();({scaleX:p,scaleY:m}=Tk(u,x)),d={left:x.left,right:x.left+u.clientWidth*p,top:x.top,bottom:x.top+u.clientHeight*m}}let y=0,g=0;if(s=="nearest")e.top0&&e.bottom>d.bottom+g&&(g=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(g=e.bottom-d.bottom+o,n<0&&e.top-g0&&e.right>d.right+y&&(y=e.right-d.right+r)):e.right>d.right&&(y=e.right-d.right+r,n<0&&e.leftd.bottom||e.leftd.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function SV(t){let e=t.ownerDocument,n,i;for(let s=t.parentNode;s&&!(s==e.body||n&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),!n&&s.scrollWidth>s.clientWidth&&(n=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:n,y:i}}class kV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Bi(n):0),i,Math.min(e.focusOffset,i?Bi(i):0))}set(e,n,i,s){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=s}}let qr=null;function Pk(t){if(t.setActive)return t.setActive();if(qr)return t.focus(qr);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(qr==null?{get preventScroll(){return qr={preventScroll:!0},!0}}:void 0),!qr){qr=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function Rk(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=Bi(n)}else if(n.parentNode&&!ku(n))i=Pr(n),n=n.parentNode;else return null}}function Ik(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&in)return f.domBoundsAround(e,n,c);if(d>=e&&s==-1&&(s=a,r=c),c>n&&f.dom.parentNode==this.dom){o=a,l=u;break}u=d,c=d+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=tg){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Nk(t,e,n,i,s,r,o,l,a){let{children:c}=t,u=c.length?c[e]:null,f=r.length?r[r.length-1]:null,d=f?f.breakAfter:o;if(!(e==i&&u&&!o&&!d&&r.length<2&&u.merge(n,s,r.length?f:null,n==0,l,a))){if(i0&&(!o&&r.length&&u.merge(n,u.length,r[0],!1,l,0)?u.breakAfter=r.shift().breakAfter:(n2);var me={mac:ib||/Mac/.test(Sn.platform),windows:/Win/.test(Sn.platform),linux:/Linux|X11/.test(Sn.platform),ie:$f,ie_version:Vk?ap.documentMode||6:up?+up[1]:cp?+cp[1]:0,gecko:nb,gecko_version:nb?+(/Firefox\/(\d+)/.exec(Sn.userAgent)||[0,0])[1]:0,chrome:!!Ed,chrome_version:Ed?+Ed[1]:0,ios:ib,android:/Android\b/.test(Sn.userAgent),safari:Bk,webkit_version:_V?+(/\bAppleWebKit\/(\d+)/.exec(Sn.userAgent)||[0,0])[1]:0,tabSize:ap.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const AV=256;class mi extends ct{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof mi)||this.length-(n-e)+i.length>AV||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new mi(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new sn(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return EV(this.dom,e,n)}}class ys extends ct{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let s of n)s.setParent(this)}setAttrs(e){if(Mk(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,s,r,o){return i&&(!(i instanceof ys&&i.mark.eq(this.mark))||e&&r<=0||ne&&n.push(i=e&&(s=r),i=a,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new ys(this.mark,n,o)}domAtPos(e){return Fk(this,e)}coordsAt(e,n){return zk(this,e,n)}}function EV(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&n<0||e==i&&n>=0?me.chrome||me.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return me.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,c=>c.width)||a),o?Aa(a,o<0):a||null}class Fs extends ct{static create(e,n,i){return new Fs(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Fs.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,s,r,o){return i&&(!(i instanceof Fs)||!this.widget.compare(i.widget)||e>0&&r<=0||n0)?sn.before(this.dom):sn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?s.length-1:0;r=s[l],!(e>0?l==0:l==s.length-1||r.top0?sn.before(this.dom):sn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ye.empty}get isHidden(){return!0}}mi.prototype.children=Fs.prototype.children=Do.prototype.children=tg;function Fk(t,e){let n=t.dom,{children:i}=t,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof ys&&s.length&&(i=s[s.length-1])instanceof ys&&i.mark.eq(e.mark)?Wk(i,e.children[0],n-1):(s.push(e),e.setParent(t)),t.length+=e.length}function zk(t,e,n){let i=null,s=-1,r=null,o=-1;function l(c,u){for(let f=0,d=0;f=u&&(h.children.length?l(h,u-d):(!r||r.isHidden&&(n>0||PV(r,h)))&&(p>u||d==p&&h.getSide()>0)?(r=h,o=u-d):(d-1?1:0)!=s.length-(n&&s.indexOf(n)>-1?1:0))return!1;for(let r of i)if(r!=n&&(s.indexOf(r)==-1||t[r]!==e[r]))return!1;return!0}function dp(t,e,n){let i=!1;if(e)for(let s in e)n&&s in n||(i=!0,s=="style"?t.style.cssText="":t.removeAttribute(s));if(n)for(let s in n)e&&e[s]==n[s]||(i=!0,s=="style"?t.style.cssText=n[s]:t.setAttribute(s,n[s]));return i}function MV(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Zs(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Hk(e,n);i=(r?n?-3e8:-1:5e8)-1,s=(o?n?2e8:1:-6e8)+1}return new Zs(e,i,s,n,e.widget||null,!0)}static line(e){return new Ta(e)}static set(e,n=!1){return Ge.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ce.none=Ge.empty;class Ea extends Ce{constructor(e){let{start:n,end:i}=Hk(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof Ea&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&Ou(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Ea.prototype.point=!1;class Ta extends Ce{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Ta&&this.spec.class==e.spec.class&&Ou(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Ta.prototype.mapMode=hn.TrackBefore;Ta.prototype.point=!0;class Zs extends Ce{constructor(e,n,i,s,r,o){super(n,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?n<=0?hn.TrackBefore:hn.TrackAfter:hn.TrackDel}get type(){return this.startSide!=this.endSide?mn.WidgetRange:this.startSide<=0?mn.WidgetBefore:mn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Zs&&DV(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Zs.prototype.point=!0;function Hk(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function DV(t,e){return t==e||!!(t&&e&&t.compare(e))}function Wc(t,e,n,i=0){let s=n.length-1;s>=0&&n[s]+i>=t?n[s]=Math.max(n[s],e):n.push(t,e)}class Et extends ct{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,i,s,r,o){if(i){if(!(i instanceof Et))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),$k(this,e,n,i?i.children.slice():[],r,o),!0}split(e){let n=new Et;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i,off:s}=this.childPos(e);s&&(n.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ou(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){Wk(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=fp(n,this.attrs||{})),i&&(this.attrs=fp({class:i},this.attrs||{}))}domAtPos(e){return Fk(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(Mk(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(dp(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let s=this.dom.lastChild;for(;s&&ct.get(s)instanceof ys;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=ct.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!me.ios||!this.children.some(r=>r instanceof mi))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof mi)||/[^ -~]/.test(i.text))return null;let s=Mo(i.dom);if(s.length!=1)return null;e+=s[0].width,n=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=zk(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=n){if(r instanceof Et)return r;if(o>n)break}s=o+r.breakAfter}return null}}class ls extends ct{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,s,r,o){return i&&(!(i instanceof ls)||!this.widget.compare(i.widget)||e>0&&r<=0||n0}}class hp extends Ss{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class El{constructor(e,n,i,s){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ls&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Et),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(cc(new Do(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ls)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(cc(new mi(this.text.slice(this.textOff,this.textOff+s)),n),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,n,i,s){this.buildText(n-e,i,s),this.pos=n,this.openStart<0&&(this.openStart=s)}point(e,n,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Zs){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=n-e;if(i instanceof Zs)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ls(i.widget||Ro.block,l,i));else{let a=Fs.create(i.widget||Ro.inline,l,l?0:i.startSide),c=this.atCursorPos&&!a.isEditable&&r<=s.length&&(e0),u=!a.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!c&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),c&&(f.append(cc(new Do(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(cc(a,s),r),this.atCursorPos=u,this.pendingBuffer=u?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=r)}static build(e,n,i,s,r){let o=new El(e,n,i,r);return o.openEnd=Ge.spans(s,n,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function cc(t,e){for(let n of e)t=new ys(n,[t],t.length);return t}class Ro extends Ss{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ro.inline=new Ro("span");Ro.block=new Ro("div");var gt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(gt||(gt={}));const Dr=gt.LTR,ng=gt.RTL;function Uk(t){let e=[];for(let n=0;n=n){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromn:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function qk(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;m-=3)if(wi[m+1]==-h){let y=wi[m+2],g=y&2?s:y&4?y&1?r:s:0;g&&(at[f]=at[wi[m]]=g),l=m;break}}else{if(wi.length==189)break;wi[l++]=f,wi[l++]=d,wi[l++]=a}else if((p=at[f])==2||p==1){let m=p==s;a=m?0:1;for(let y=l-3;y>=0;y-=3){let g=wi[y+2];if(g&2)break;if(m)wi[y+2]|=2;else{if(g&4)break;wi[y+2]|=4}}}}}function VV(t,e,n,i){for(let s=0,r=i;s<=n.length;s++){let o=s?n[s-1].to:t,l=sa;)p==y&&(p=n[--m].from,y=m?n[m-1].to:t),at[--p]=h;a=u}else r=c,a++}}}function mp(t,e,n,i,s,r,o){let l=i%2?2:1;if(i%2==s%2)for(let a=e,c=0;aa&&o.push(new Ws(a,m.from,h));let y=m.direction==Dr!=!(h%2);gp(t,y?i+1:i,s,m.inner,m.from,m.to,o),a=m.to}p=m.to}else{if(p==n||(u?at[p]!=l:at[p]==l))break;p++}d?mp(t,a,p,i+1,s,d,o):ae;){let u=!0,f=!1;if(!c||a>r[c-1].to){let m=at[a-1];m!=l&&(u=!1,f=m==16)}let d=!u&&l==1?[]:null,h=u?i:i+1,p=a;e:for(;;)if(c&&p==r[c-1].to){if(f)break e;let m=r[--c];if(!u)for(let y=m.from,g=c;;){if(y==e)break e;if(g&&r[g-1].to==y)y=r[--g].from;else{if(at[y-1]==l)break e;break}}if(d)d.push(m);else{m.toat.length;)at[at.length]=256;let i=[],s=e==Dr?0:1;return gp(t,s,s,n,0,t.length,i),i}function Kk(t){return[new Ws(0,t,0)]}let Gk="";function FV(t,e,n,i,s){var r;let o=i.head-t.from,l=Ws.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=e[l],c=a.side(s,n);if(o==c){let d=l+=s?1:-1;if(d<0||d>=e.length)return null;a=e[l=d],o=a.side(!s,n),c=a.side(s,n)}let u=Jt(t.text,o,a.forward(s,n));(ua.to)&&(u=c),Gk=t.text.slice(Math.min(o,u),Math.max(o,u));let f=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return f&&u==c&&f.level+(s?0:1)t.some(e=>e)}),nO=ge.define({combine:t=>t.some(e=>e)}),iO=ge.define();class yo{constructor(e,n="nearest",i="nearest",s=5,r=5,o=!1){this.range=e,this.y=n,this.x=i,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new yo(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new yo(J.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const uc=De.define({map:(t,e)=>t.map(e)}),sO=De.define();function Cn(t,e,n){let i=t.facet(Qk);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const ns=ge.define({combine:t=>t.length?t[0]:!0});let zV=0;const no=ge.define({combine(t){return t.filter((e,n)=>{for(let i=0;i{let a=[];return o&&a.push(ea.of(c=>{let u=c.plugin(l);return u?o(u):Ce.none})),r&&a.push(r(l)),a})}static fromClass(e,n){return _t.define((i,s)=>new e(i,s),n)}}class Td{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(Cn(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){Cn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){Cn(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const rO=ge.define(),rg=ge.define(),ea=ge.define(),oO=ge.define(),og=ge.define(),lO=ge.define();function rb(t,e){let n=t.state.facet(lO);if(!n.length)return n;let i=n.map(r=>r instanceof Function?r(t):r),s=[];return Ge.spans(i,e.from,e.to,{point(){},span(r,o,l,a){let c=r-e.from,u=o-e.from,f=s;for(let d=l.length-1;d>=0;d--,a--){let h=l[d].spec.bidiIsolate,p;if(h==null&&(h=WV(e.text,c,u)),a>0&&f.length&&(p=f[f.length-1]).to==c&&p.direction==h)p.to=u,f=p.inner;else{let m={from:c,to:u,direction:h,inner:[]};f.push(m),f=m.inner}}}}),s}const aO=ge.define();function lg(t){let e=0,n=0,i=0,s=0;for(let r of t.state.facet(aO)){let o=r(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:n,top:i,bottom:s}}const hl=ge.define();class Jn{constructor(e,n,i,s){this.fromA=e,this.toA=n,this.fromB=i,this.toB=s}join(e){return new Jn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let s=e[n-1];if(!(s.fromA>i.toA)){if(s.toAu)break;r+=2}if(!a)return i;new Jn(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class Cu{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=It.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,a)=>s.push(new Jn(r,o,l,a))),this.changedRanges=s}static create(e,n,i){return new Cu(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class ob extends ct{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ce.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Et],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Jn(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?s=this.domChanged.newSel.head:!YV(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?UV(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;i=new Jn(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(me.ie||me.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=KV(o,l,e.changes);return i=Jn.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=me.chrome||me.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?s[o]:null;if(!l)break;let{fromA:a,toA:c,fromB:u,toB:f}=l,d,h,p,m;if(i&&i.range.fromBu){let w=El.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),S=El.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);h=w.breakAtStart,p=w.openStart,m=S.openEnd;let k=this.compositionView(i);S.breakAtStart?k.breakAfter=1:S.content.length&&k.merge(k.length,k.length,S.content[0],!1,S.openStart,0)&&(k.breakAfter=S.content[0].breakAfter,S.content.shift()),w.content.length&&k.merge(0,0,w.content[w.content.length-1],!0,0,w.openEnd)&&w.content.pop(),d=w.content.concat(k).concat(S.content)}else({content:d,breakAtStart:h,openStart:p,openEnd:m}=El.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:y,off:g}=r.findPos(c,1),{i:x,off:b}=r.findPos(a,-1);Nk(this,x,b,y,g,d,h,p,m)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(sO)&&(this.editContextFormatting=i.value)}compositionView(e){let n=new mi(e.text.nodeValue);n.flags|=8;for(let{deco:s}of e.marks)n=new ys(s,[n],n.length);let i=new Et;return i.append(n,0),i}fixCompositionDOM(e){let n=(r,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=ct.get(r);l&&l!=o&&(l.dom=null),o.setDOM(r)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];n(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)i=s.childPos(i.off,1),s=s.children[i.i],n(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&!(this.view.state.facet(ns)||this.dom.tabIndex>-1)&&Fc(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||n||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),c=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(me.gecko&&l.empty&&!this.hasComposition&&HV(a)){let f=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(f,a.node.childNodes[a.offset]||null)),a=c=new sn(f,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!Al(a.node,a.offset,u.anchorNode,u.anchorOffset)||!Al(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,l))&&(this.view.observer.ignore(()=>{me.android&&me.chrome&&this.dom.contains(u.focusNode)&&GV(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Zl(this.view.root);if(f)if(l.empty){if(me.gecko){let d=jV(a.node,a.offset);if(d&&d!=3){let h=(d==1?Rk:Ik)(a.node,a.offset);h&&(a=new sn(h.node,h.offset))}}f.collapse(a.node,a.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(a.node,a.offset);try{f.extend(c.node,c.offset)}catch{}}else{let d=document.createRange();l.anchor>l.head&&([a,c]=[c,a]),d.setEnd(c.node,c.offset),d.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(d)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,c)),this.impreciseAnchor=a.precise?null:new sn(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new sn(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Al(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=Zl(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let o=Et.find(this,n.head);if(!o)return;let l=o.posAtStart;if(n.head==l||n.head==l+o.length)return;let a=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!a||!c||a.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);i.collapse(u.node,u.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&i.collapse(s,r)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let s=e.offset;!i&&s=0;s--){let r=ct.get(n.childNodes[s]);r instanceof Et&&(i=r.domAtPos(r.length))}return i?new sn(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=ct.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;o--){let l=this.children[o],a=r-l.breakAfter,c=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof Et&&!(i instanceof Et&&n>=0)))i=l,s=c;else if(i&&c==e&&a==e&&l instanceof ls&&Math.abs(n)<2){if(l.deco.startSide<0)break;o&&(i=null)}r=c}return i?i.coordsAt(e-s,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),s=this.children[n];if(!(s instanceof Et))return null;for(;s.children.length;){let{i:l,off:a}=s.childPos(i,1);for(;;l++){if(l==s.children.length)return null;if((s=s.children[l]).length)break}i=a}if(!(s instanceof mi))return null;let r=Jt(s.text,i);if(r==i)return null;let o=Mr(s.dom,i,r).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==gt.LTR;for(let c=0,u=0;us)break;if(c>=i){let h=f.dom.getBoundingClientRect();if(n.push(h.height),o){let p=f.dom.lastChild,m=p?Mo(p):[];if(m.length){let y=m[m.length-1],g=a?y.right-h.left:h.right-y.left;g>l&&(l=g,this.minWidth=r,this.minWidthFrom=c,this.minWidthTo=d)}}}c=d+f.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?gt.RTL:gt.LTR}measureTextSize(){for(let r of this.children)if(r instanceof Et){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),n,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=Mo(e.firstChild)[0];n=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:s}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new Lk(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,s=0;;s++){let r=s==n.viewports.length?null:n.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=(n.lineBlockAt(o).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(Ce.replace({widget:new hp(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return Ce.set(e)}updateDeco(){let e=1,n=this.view.state.facet(ea).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),i=!1,s=this.view.state.facet(oO).map((r,o)=>{let l=typeof r=="function";return l&&(i=!0),l?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=i,n.push(Ge.join(s))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),s;if(!i)return;!n.empty&&(s=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=lg(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;xV(this.view.scrollDOM,o,n.head{ie.from&&(n=!0)}),n}function XV(t,e,n=1){let i=t.charCategorizer(e),s=t.doc.lineAt(e),r=e-s.from;if(s.length==0)return J.cursor(e);r==0?n=1:r==s.length&&(n=-1);let o=r,l=r;n<0?o=Jt(s.text,r,!1):l=Jt(s.text,r);let a=i(s.text.slice(o,l));for(;o>0;){let c=Jt(s.text,o,!1);if(i(s.text.slice(c,o))!=a)break;o=c}for(;lt?e.left-t:Math.max(0,t-e.right)}function QV(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Pd(t,e){return t.tope.top+1}function lb(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function bp(t,e,n){let i,s,r,o,l=!1,a,c,u,f;for(let p=t.firstChild;p;p=p.nextSibling){let m=Mo(p);for(let y=0;yb||o==b&&r>x)&&(i=p,s=g,r=x,o=b,l=x?e0:yg.bottom&&(!u||u.bottomg.top)&&(c=p,f=g):u&&Pd(u,g)?u=ab(u,g.bottom):f&&Pd(f,g)&&(f=lb(f,g.top))}}if(u&&u.bottom>=n?(i=a,s=u):f&&f.top<=n&&(i=c,s=f),!i)return{node:t,offset:0};let d=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return cb(i,d,n);if(l&&i.contentEditable!="false")return bp(i,d,n);let h=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:t,offset:h}}function cb(t,e,n){let i=t.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;ln?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f=(u.left+u.right)/2,h=d;if((me.chrome||me.gecko)&&Mr(t,l).getBoundingClientRect().left==u.right&&(h=!d),f<=0)return{node:t,offset:l+(h?1:0)};s=l+(h?1:0),r=f}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function uO(t,e,n,i=-1){var s,r;let o=t.contentDOM.getBoundingClientRect(),l=o.top+t.viewState.paddingTop,a,{docHeight:c}=t.viewState,{x:u,y:f}=e,d=f-l;if(d<0)return 0;if(d>c)return t.state.doc.length;for(let w=t.viewState.heightOracle.textHeight/2,S=!1;a=t.elementAtHeight(d),a.type!=mn.Text;)for(;d=i>0?a.bottom+w:a.top-w,!(d>=0&&d<=c);){if(S)return n?null:0;S=!0,i=-i}f=l+d;let h=a.from;if(ht.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:ub(t,o,a,u,f);let p=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:p,y=m.elementFromPoint(u,f);y&&!t.contentDOM.contains(y)&&(y=null),y||(u=Math.max(o.left+1,Math.min(o.right-1,u)),y=m.elementFromPoint(u,f),y&&!t.contentDOM.contains(y)&&(y=null));let g,x=-1;if(y&&((s=t.docView.nearest(y))===null||s===void 0?void 0:s.isEditable)!=!1){if(p.caretPositionFromPoint){let w=p.caretPositionFromPoint(u,f);w&&({offsetNode:g,offset:x}=w)}else if(p.caretRangeFromPoint){let w=p.caretRangeFromPoint(u,f);w&&({startContainer:g,startOffset:x}=w,(!t.contentDOM.contains(g)||me.safari&&ZV(g,x,u)||me.chrome&&eB(g,x,u))&&(g=void 0))}g&&(x=Math.min(Bi(g),x))}if(!g||!t.docView.dom.contains(g)){let w=Et.find(t.docView,h);if(!w)return d>a.top+a.height/2?a.to:a.from;({node:g,offset:x}=bp(w.dom,u,f))}let b=t.docView.nearest(g);if(!b)return null;if(b.isWidget&&((r=b.dom)===null||r===void 0?void 0:r.nodeType)==1){let w=b.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,a=Math.floor((s-n.top-(t.defaultLineHeight-l)*.5)/l);r+=a*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+sp(o,r,t.state.tabSize)}function ZV(t,e,n){let i,s=t;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(;;){let r=s.nextSibling;if(r){if(r.nodeName=="BR")break;return!1}else{let o=s.parentNode;if(!o||o.nodeName=="DIV")break;s=o}}return Mr(t,i-1,i).getBoundingClientRect().right>n}function eB(t,e,n){if(e!=0)return!1;for(let s=t;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=t.nodeType==1?t.getBoundingClientRect():Mr(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function vp(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let s;for(let r of i.type){if(r.from>e)break;if(!(r.toe)return r;(!s||r.type==mn.Text&&(s.type!=r.type||(n<0?r.frome)))&&(s=r)}}return s||i}return i}function tB(t,e,n,i){let s=vp(t,e.head,e.assoc||-1),r=!i||s.type!=mn.Text||!(t.lineWrapping||s.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=t.dom.getBoundingClientRect(),l=t.textDirectionAt(s.from),a=t.posAtCoords({x:n==(l==gt.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(a!=null)return J.cursor(a,n?-1:1)}return J.cursor(n?s.to:s.from,n?-1:1)}function fb(t,e,n,i){let s=t.state.doc.lineAt(e.head),r=t.bidiSpans(s),o=t.textDirectionAt(s.from);for(let l=e,a=null;;){let c=FV(s,r,o,l,n),u=Gk;if(!c){if(s.number==(n?t.state.doc.lines:1))return l;u=` -`,s=t.state.doc.line(s.number+(n?1:-1)),r=t.bidiSpans(s),c=t.visualLineSide(s,!n)}if(a){if(!a(u))return l}else{if(!i)return c;a=i(u)}l=c}}function nB(t,e,n){let i=t.state.charCategorizer(e),s=i(n);return r=>{let o=i(r);return s==bt.Space&&(s=o),s==o}}function iB(t,e,n,i){let s=e.head,r=n?1:-1;if(s==(n?t.state.doc.length:0))return J.cursor(s,e.assoc);let o=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(s,e.assoc||-1),u=t.documentTop;if(c)o==null&&(o=c.left-a.left),l=r<0?c.top:c.bottom;else{let h=t.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,t.defaultCharacterWidth*(s-h.from))),l=(r<0?h.top:h.bottom)+u}let f=a.left+o,d=i??t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let p=l+(d+h)*r,m=uO(t,{x:f,y:p},!1,r);if(pa.bottom||(r<0?ms)){let y=t.docView.coordsForChar(m),g=!y||p{if(e>r&&es(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:J.cursor(i,ir)&&this.lineBreak(),s=o}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=n.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(n))&&(r=l.index,o=l[0].length),this.append(n.slice(i,r<0?n.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let n=ct.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(rB(e,i.node,i.offset)?n:0))}}function rB(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let l=r||o?[]:cB(e),a=new sB(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=uB(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!lp(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!lp(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),u=e.viewport;if((me.ios||me.chrome)&&e.state.selection.main.empty&&a!=c&&(u.from>0||u.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=s.from,c=null;(r===8||me.android&&e.text.length=s.from&&n.to<=s.to&&(n.from!=s.from||n.to!=s.to)&&s.to-s.from-(n.to-n.from)<=4?n={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,s.to))}:me.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==` - `&&t.lineWrapping&&(i&&(i=J.single(i.main.anchor-1,i.main.head-1)),n={from:s.from,to:s.to,insert:Ye.of([" "])}),n)return ag(t,n,i,r);if(i&&!i.main.eq(s)){let o=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),l=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function ag(t,e,n,i=-1){if(me.ios&&t.inputState.flushIOSKey(e))return!0;let s=t.state.selection.main;if(me.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&t.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&go(t.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.lengths.head)&&go(t.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&go(t.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,l=()=>o||(o=lB(t,e,n));return t.state.facet(Zk).some(a=>a(t,e.from,e.to,r,l))||t.dispatch(l()),!0}function lB(t,e,n){let i,s=t.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=r.frome.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let l=s.changes(e),a=n&&n.main.to<=l.newLength?n.main:void 0;if(s.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let c=t.state.sliceDoc(e.from,e.to),u,f=n&&cO(t,n.main.head);if(f){let p=e.insert.length-(e.to-e.from);u={from:f.from,to:f.to-p}}else u=t.state.doc.lineAt(r.head);let d=r.to-e.to,h=r.to-r.from;i=s.changeByRange(p=>{if(p.from==r.from&&p.to==r.to)return{changes:l,range:a||p.map(l)};let m=p.to-d,y=m-c.length;if(p.to-p.from!=h||t.state.sliceDoc(y,m)!=c||p.to>=u.from&&p.from<=u.to)return{range:p};let g=s.changes({from:y,to:m,insert:e.insert}),x=p.to-r.to;return{changes:g,range:a?J.range(Math.max(0,a.anchor+x),Math.max(0,a.head+x)):p.map(g)}})}else i={changes:l,selection:a&&s.selection.replaceRange(a)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function aB(t,e,n,i){let s=Math.min(t.length,e.length),r=0;for(;r0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));n-=o+a-r}if(o=o?r-n:0;r-=a,l=r+(l-o),o=r}else if(l=l?r-n:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function cB(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:s,focusOffset:r}=t.observer.selectionRange;return n&&(e.push(new db(n,i)),(s!=n||r!=i)&&e.push(new db(s,r))),e}function uB(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?J.single(n+e,i+e):null}class fB{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,me.safari&&e.contentDOM.addEventListener("input",()=>null),me.gecko&&AB(e.contentDOM.ownerDocument)}handleEvent(e){!vB(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,n);for(let s of i.handlers){if(n.defaultPrevented)break;if(s(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=dB(e),i=this.handlers,s=this.view.contentDOM;for(let r in n)if(r!="scroll"){let o=!n[r].handlers.length,l=i[r];l&&o!=!l.handlers.length&&(s.removeEventListener(r,this.handleEvent),l=null),l||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in i)r!="scroll"&&!n[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&hO.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),me.android&&me.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return me.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=dO.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||hB.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:me.safari&&!me.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function hb(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(s){Cn(n.state,s)}}}function dB(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let s=i.spec,r=s&&s.plugin.domEventHandlers,o=s&&s.plugin.domEventObservers;if(r)for(let l in r){let a=r[l];a&&n(l).handlers.push(hb(i.value,a))}if(o)for(let l in o){let a=o[l];a&&n(l).observers.push(hb(i.value,a))}}for(let i in gi)n(i).handlers.push(gi[i]);for(let i in ei)n(i).observers.push(ei[i]);return e}const dO=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],hB="dthko",hO=[16,17,18,20,91,92,224,225],fc=6;function dc(t){return Math.max(0,t)*.7+8}function pB(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class mB{constructor(e,n,i,s){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=SV(e.contentDOM),this.atoms=e.state.facet(og).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Be.allowMultipleSelections)&&gB(e,n),this.dragging=bB(e,n)&&gO(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&pB(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,s=0,r=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=lg(this.view);e.clientX-a.left<=s+fc?n=-dc(s-e.clientX):e.clientX+a.right>=o-fc&&(n=dc(e.clientX-o)),e.clientY-a.top<=r+fc?i=-dc(r-e.clientY):e.clientY+a.bottom>=l-fc&&(i=dc(e.clientY-l)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;in.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function gB(t,e){let n=t.state.facet(Yk);return n.length?n[0](e):me.mac?e.metaKey:e.ctrlKey}function yB(t,e){let n=t.state.facet(Xk);return n.length?n[0](e):me.mac?!e.altKey:!e.ctrlKey}function bB(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=Zl(t.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function vB(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=ct.get(n))&&i.ignoreEvent(e))return!1;return!0}const gi=Object.create(null),ei=Object.create(null),pO=me.ie&&me.ie_version<15||me.ios&&me.webkit_version<604;function wB(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),mO(t,n.value)},50)}function Vf(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function mO(t,e){e=Vf(t.state,ig,e);let{state:n}=t,i,s=1,r=n.toText(e),o=r.lines==n.selection.ranges.length;if(wp!=null&&n.selection.ranges.every(a=>a.empty)&&wp==r.toString()){let a=-1;i=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==a)return{range:c};a=u.from;let f=n.toText((o?r.line(s++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:f},range:J.cursor(c.from+f.length)}})}else o?i=n.changeByRange(a=>{let c=r.line(s++);return{changes:{from:a.from,to:a.to,insert:c.text},range:J.cursor(a.from+c.length)}}):i=n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ei.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};gi.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);ei.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};ei.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};gi.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(Jk))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=kB(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new mB(t,e,n,i)),i&&t.observer.ignore(()=>{Pk(t.contentDOM);let r=t.root.activeElement;r&&!r.contains(t.contentDOM)&&r.blur()});let s=t.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function pb(t,e,n,i){if(i==1)return J.cursor(e,n);if(i==2)return XV(t.state,e,n);{let s=Et.find(t.docView,e),r=t.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return le>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function xB(t,e,n,i){let s=Et.find(t.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&mb(n,i,o))return-1;let l=s.coordsAt(r,1);return l&&mb(n,i,l)?1:o&&o.bottom>=i?-1:1}function gb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:xB(t,n,e.clientX,e.clientY)}}const SB=me.ie&&me.ie_version<=11;let yb=null,bb=0,vb=0;function gO(t){if(!SB)return t.detail;let e=yb,n=vb;return yb=t,vb=Date.now(),bb=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(bb+1)%3:1}function kB(t,e){let n=gb(t,e),i=gO(e),s=t.state.selection;return{update(r){r.docChanged&&(n.pos=r.changes.mapPos(n.pos),s=s.map(r.changes))},get(r,o,l){let a=gb(t,r),c,u=pb(t,a.pos,a.bias,i);if(n.pos!=a.pos&&!o){let f=pb(t,n.pos,n.bias,i),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d1&&(c=OB(s,a.pos))?c:l?s.addRange(u):J.create([u])}}}function OB(t,e){for(let n=0;n=e)return J.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}gi.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let s=t.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=n.to||o<=n.from)&&(n=J.range(r,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Vf(t.state,sg,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};gi.dragend=t=>(t.inputState.draggedContent=null,!1);function wb(t,e,n,i){if(n=Vf(t.state,ig,n),!n)return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=t.inputState,o=i&&r&&yB(t,e)?{from:r.from,to:r.to}:null,l={from:s,insert:n},a=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}gi.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),s=0,r=()=>{++s==n.length&&wb(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(n[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return wb(t,e,i,!0),!0}return!1};gi.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=pO?null:e.clipboardData;return n?(mO(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(wB(t),!1)};function CB(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function _B(t){let e=[],n=[],i=!1;for(let s of t.selection.ranges)s.empty||(e.push(t.sliceDoc(s.from,s.to)),n.push(s));if(!e.length){let s=-1;for(let{from:r}of t.selection.ranges){let o=t.doc.lineAt(r);o.number>s&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),s=o.number}i=!0}return{text:Vf(t,sg,e.join(t.lineBreak)),ranges:n,linewise:i}}let wp=null;gi.copy=gi.cut=(t,e)=>{let{text:n,ranges:i,linewise:s}=_B(t.state);if(!n&&!s)return!1;wp=s?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let r=pO?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",n),!0):(CB(t,n),!1)};const yO=xs.define();function bO(t,e){let n=[];for(let i of t.facet(eO)){let s=i(t,e);s&&n.push(s)}return n.length?t.update({effects:n,annotations:yO.of(!0)}):null}function vO(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=bO(t.state,e);n?t.dispatch(n):t.update([])}},10)}ei.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),vO(t)};ei.blur=t=>{t.observer.clearSelectionRange(),vO(t)};ei.compositionstart=ei.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};ei.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,me.chrome&&me.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};ei.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};gi.beforeinput=(t,e)=>{var n,i;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let r=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let l=o[0],a=t.posAtDOM(l.startContainer,l.startOffset),c=t.posAtDOM(l.endContainer,l.endOffset);return ag(t,{from:a,to:c,insert:t.state.toText(r)},null),!0}}let s;if(me.chrome&&me.android&&(s=dO.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return me.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),me.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>ei.compositionend(t,e),20),!1};const xb=new Set;function AB(t){xb.has(t)||(xb.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Sb=["pre-wrap","normal","pre-line","break-spaces"];let Io=!1;function kb(){Io=!1}class EB{constructor(e){this.lineWrapping=e,this.doc=Ye.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Sb.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,a=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=i,this.textHeight=s,this.lineLength=r,a){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Hc&&(Io=!0),this.height=e)}replace(e,n,i){return gn.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:a,toA:c,fromB:u,toB:f}=s[l],d=r.lineAt(a,pt.ByPosNoHeight,i.setDoc(n),0,0),h=d.to>=c?d:r.lineAt(c,pt.ByPosNoHeight,i,0,0);for(f+=h.to-c,c=h.to;l>0&&d.from<=s[l-1].toA;)a=s[l-1].fromA,u=s[l-1].fromB,l--,ar*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,n=0,i=!1,s){return s&&s.from<=n&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ln extends wO{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,s){return new Ti(s,this.length,i,this.height,this.breaks)}replace(e,n,i){let s=i[0];return i.length==1&&(s instanceof Ln||s instanceof Gt&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof Gt?s=new Ln(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):gn.of(i)}updateHeight(e,n=0,i=!1,s){return s&&s.from<=n&&s.more?this.setHeight(s.heights[s.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Gt extends gn{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,s=e.doc.lineAt(n+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);o=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,n,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(n,s);if(n.lineWrapping){let c=s+(e0){let r=i[i.length-1];r instanceof Gt?i[i.length-1]=new Gt(r.length+s):i.push(null,new Gt(s-1))}if(e>0){let r=i[0];r instanceof Gt?i[0]=new Gt(e+r.length):i.unshift(new Gt(e-1),null)}return gn.of(i)}decomposeLeft(e,n){n.push(new Gt(e-1),null)}decomposeRight(e,n){n.push(null,new Gt(this.length-e-1))}updateHeight(e,n=0,i=!1,s){let r=n+this.length;if(s&&s.from<=n+this.length&&s.more){let o=[],l=Math.max(n,s.from),a=-1;for(s.from>n&&o.push(new Gt(s.from-n-1).updateHeight(e,n));l<=r&&s.more;){let u=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];a==-1?a=f:Math.abs(f-a)>=Hc&&(a=-2);let d=new Ln(u,f);d.outdated=!1,o.push(d),l+=u+1}l<=r&&o.push(null,new Gt(r-l).updateHeight(e,l));let c=gn.of(o);return(a<0||Math.abs(c.height-this.height)>=Hc||Math.abs(a-this.heightMetrics(e,n).perLine)>=Hc)&&(Io=!0),_u(this,c)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class PB extends gn{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,s){let r=i+this.left.height;return el))return c;let u=n==pt.ByPosNoHeight?pt.ByPosNoHeight:pt.ByPos;return a?c.join(this.right.lineAt(l,u,i,o,l)):this.left.lineAt(l,u,i,s,r).join(c)}forEachLine(e,n,i,s,r,o){let l=s+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,n,i,l,a,o);else{let c=this.lineAt(a,pt.ByPos,i,s,r);e=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,i,l,a,o)}}replace(e,n,i){let s=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-s,n-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&Ob(r,o-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,n);e2*n.size||n.size>2*e.size?gn.of(this.break?[e,null,n]:[e,n]):(this.left=_u(this.left,e),this.right=_u(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,s){let{left:r,right:o}=this,l=n+r.length+this.break,a=null;return s&&s.from<=n+r.length&&s.more?a=r=r.updateHeight(e,n,i,s):r.updateHeight(e,n,i),s&&s.from<=l+o.length&&s.more?a=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Ob(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Gt&&(i=t[e+1])instanceof Gt&&t.splice(e-1,3,new Gt(n.length+1+i.length))}const MB=5;class cg{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Ln?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ln(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=MB)&&this.addLineDeco(s,r,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ln(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new Gt(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ln)return e;let n=new Ln(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ln)&&!this.isCovered?this.nodes.push(new Ln(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();r=Math.max(r,d.left),o=Math.min(o,d.right),l=Math.max(l,d.top),a=Math.min(c==t.parentNode?s.innerHeight:a,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:r-n.left,right:Math.max(r,o)-n.left,top:l-(n.top+e),bottom:Math.max(l,a)-(n.top+e)}}function LB(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function NB(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Dd{constructor(e,n,i,s){this.from=e,this.to=n,this.size=i,this.displaySize=s}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new EB(n),this.stateDeco=e.facet(ea).filter(i=>typeof i!="function"),this.heightMap=gn.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle.setDoc(e.doc),[new Jn(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ce.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let s=i?n.head:n.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new hc(r,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?_b:new ug(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ml(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ea).filter(u=>typeof u!="function");let s=e.changedRanges,r=Jn.extendWithRanges(s,DB(i,this.stateDeco,e?e.changes:It.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);kb(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Io)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,n));let c=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(nO)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?gt.RTL:gt.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=n.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let c=0,u=0;if(l.width&&l.height){let{scaleX:w,scaleY:S}=Tk(n,l);(w>.005&&Math.abs(this.scaleX-w)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=w,this.scaleY=S,c|=16,o=a=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,d=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=Dk(e.scrollDOM);let p=(this.printing?NB:IB)(n,this.paddingTop),m=p.top-this.pixelViewport.top,y=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget&&!LB(e.dom))return 0;let x=l.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),a){let w=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(w)&&(o=!0),o||s.lineWrapping&&Math.abs(x-this.contentDOMWidth)>s.charWidth){let{lineHeight:S,charWidth:k,textHeight:O}=e.docView.measureTextSize();o=S>0&&s.refresh(r,S,k,O,x/k,w),o&&(e.docView.minWidth=0,c|=16)}m>0&&y>0?u=Math.max(m,y):m<0&&y<0&&(u=Math.min(m,y)),kb();for(let S of this.viewports){let k=S.from==this.viewport.from?w:e.docView.measureVisibleLineHeights(S);this.heightMap=(o?gn.empty().applyChanges(this.stateDeco,Ye.empty,this.heightOracle,[new Jn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new TB(S.from,k))}Io&&(c|=2)}let b=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return b&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new hc(s.lineAt(o-i*1e3,pt.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,pt.ByHeight,r,0,0).to);if(n){let{head:c}=n.range;if(ca.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(c,pt.ByPos,r,0,0),d;n.y=="center"?d=(f.top+f.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=gt.LTR&&!i)return[];let l=[],a=(u,f,d,h)=>{if(f-uu&&gg.from>=d.from&&g.to<=d.to&&Math.abs(g.from-u)g.fromx));if(!y){if(fb.from<=f&&b.to>=f)){let b=n.moveToLineBoundary(J.cursor(f),!1,!0).head;b>u&&(f=b)}let g=this.gapSize(d,u,f,h),x=i||g<2e6?g:2e6;y=new Dd(u,f,g,x)}l.push(y)},c=u=>{if(u.length2e6)for(let k of e)k.from>=u.from&&k.fromu.from&&a(u.from,h,u,f),pn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];Ge.spans(n,this.viewport.from,this.viewport.to,{span(r,o){i.push({from:r,to:o})},point(){}},20);let s=0;if(i.length!=this.visibleRanges.length)s=12;else for(let r=0;r=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||ml(this.heightMap.lineAt(e,pt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||ml(this.heightMap.lineAt(this.scaler.fromDOM(e),pt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return ml(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class hc{constructor(e,n){this.from=e,this.to=n}}function VB(t,e,n){let i=[],s=t,r=0;return Ge.spans(n,t,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function mc(t,e){let n=0;for(let{from:i,to:s}of t.ranges){if(e<=s){n+=e-i;break}n+=s-i}return n/t.total}function BB(t,e){for(let n of t)if(e(n))return n}const _b={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class ug{constructor(e,n,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let c=n.lineAt(l,pt.ByPos,e,0,0).top,u=n.lineAt(a,pt.ByPos,e,0,0).bottom;return s+=u-c,{from:l,to:a,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(n.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let n=0,i=0,s=0;;n++){let r=nn.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function ml(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Ti(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(s=>ml(s,e)):t._content)}const gc=ge.define({combine:t=>t.join(" ")}),xp=ge.define({combine:t=>t.indexOf(!0)>-1}),Sp=Js.newName(),xO=Js.newName(),SO=Js.newName(),kO={"&light":"."+xO,"&dark":"."+SO};function kp(t,e,n){return new Js(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return t;if(!n||!n[s])throw new RangeError(`Unsupported selector: ${s}`);return n[s]}):t+" "+i}})}const FB=kp("."+Sp,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},kO),WB={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Rd=me.ie&&me.ie_version<=11;class zB{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new kV,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(me.ie&&me.ie_version<=11||me.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&me.android&&e.constructor.EDIT_CONTEXT!==!1&&!(me.chrome&&me.chrome_version<126)&&(this.editContext=new UB(e),e.state.facet(ns)&&(e.contentDOM.editContext=this.editContext.editContext)),Rd&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(ns)?i.root.activeElement!=this.dom:!Fc(this.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(me.ie&&me.ie_version<=11||me.android&&me.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Al(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Zl(e.root);if(!n)return!1;let i=me.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&HB(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let s=Fc(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&go(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),n==-1?{from:n,to:i}=o:(n=Math.min(o.from,n),i=Math.max(o.to,i)))}return{from:n,to:i,typeOver:s}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Fc(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new oB(this.view,e,n,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,s=fO(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=Ab(n,e.previousSibling||e.target.previousSibling,-1),s=Ab(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:s?n.posBefore(s):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(ns)!=e.state.facet(ns)&&(e.view.contentDOM.editContext=e.state.facet(ns)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Ab(t,e,n){for(;e;){let i=ct.get(e);if(i&&i.parent==t)return i;let s=e.parentNode;e=s!=t.dom?s:n>0?e.nextSibling:e.previousSibling}return null}function Eb(t,e){let n=e.startContainer,i=e.startOffset,s=e.endContainer,r=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return Al(o.node,o.offset,s,r)&&([n,i,s,r]=[s,r,n,i]),{anchorNode:n,anchorOffset:i,focusNode:s,focusOffset:r}}function HB(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return Eb(t,s)}let n=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?Eb(t,n):null}class UB{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let s=e.state.selection.main,{anchor:r,head:o}=s,l=this.toEditorPos(i.updateRangeStart),a=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:l,drifted:!1});let c={from:l,to:a,insert:Ye.of(i.text.split(` -`))};if(c.from==this.from&&rthis.to&&(c.to=r),c.from==c.to&&!c.insert.length){let u=J.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));u.main.eq(s)||e.dispatch({selection:u,userEvent:"select"});return}if((me.mac||me.android)&&c.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:l,to:a,insert:Ye.of([i.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);ag(e,c,J.single(this.toEditorPos(i.selectionStart,u),this.toEditorPos(i.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(o!="None"&&l!="None"){let a=this.toEditorPos(r.rangeStart),c=this.toEditorPos(r.rangeEnd);if(a{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=Zl(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,c)=>{if(i)return;let u=c.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(c)){s=this.pendingContextChange=null,n+=u,this.to+=u;return}else s=null,this.revertPending(e.state);if(r+=n,o+=n,o<=this.from)this.from+=u,this.to+=u;else if(rthis.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),c.toString()),this.to+=u}n+=u}),s&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),s=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class pe{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(s=>s.forEach(r=>i(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||OV(e.parent)||document,this.viewState=new Cb(e.state||Be.create(e)),e.scrollTo&&e.scrollTo.is(uc)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(no).map(s=>new Td(s));for(let s of this.plugins)s.update(this);this.observer=new zB(this),this.inputState=new fB(this),this.inputState.ensureHandlers(this.plugins),this.docView=new ob(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Vt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,s,r=this.state;for(let d of e){if(d.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=d.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,a=null;e.some(d=>d.annotation(yO))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=bO(r,o),a||(l=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(u=null)):this.observer.clear(),r.facet(Be.phrases)!=this.state.facet(Be.phrases))return this.setState(r);s=Cu.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new yo(h.empty?h:J.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(uc)&&(f=h.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=Au.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),n=this.docView.update(s),this.state.facet(hl)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(gc)!=s.state.facet(gc)&&(this.viewState.mustMeasureContent=!0),(n||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!s.empty)for(let d of this.state.facet(yp))try{d(s)}catch(h){Cn(this.state,h,"update listener")}(a||u)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),u&&!fO(this,u)&&c.force&&go(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Cb(e),this.plugins=e.facet(no).map(i=>new Td(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new ob(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(no),i=e.state.facet(no);if(n!=i){let s=[];for(let r of i){let o=n.indexOf(r);if(o<0)s.push(new Td(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(Dk(i))r=-1,o=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(s);r=h.from,o=h.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];a&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(p){return Cn(this.state,p),Tb}}),f=Cu.create(this,this.state,[]),d=!1;f.flags|=a,n?n.flags|=a:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h1||p<-1){s=s+p,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(yp))l(n)}get themeClasses(){return Sp+" "+(this.state.facet(xp)?SO:xO)+" "+this.state.facet(gc)}updateAttrs(){let e=Pb(this,rO,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(ns)?"true":"false",class:"cm-content",style:`${me.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Pb(this,rg,n);let i=this.observer.ignore(()=>{let s=dp(this.contentDOM,this.contentAttrs,n),r=dp(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let s of i.effects)if(s.is(pe.announce)){n&&(this.announceDOM.textContent=""),n=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(hl);let e=this.state.facet(pe.cspNonce);Js.mount(this.root,this.styleModules.concat(FB).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Md(this,e,fb(this,e,n,i))}moveByGroup(e,n){return Md(this,e,fb(this,e,n,i=>nB(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=i[n?i.length-1:0];return J.cursor(r.side(n,s)+e.from,r.forward(!n,s)?1:-1)}moveToLineBoundary(e,n,i=!0){return tB(this,e,n,i)}moveVertically(e,n,i){return Md(this,e,iB(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),uO(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[Ws.find(r,e-s.from,-1,n)];return Aa(i,o.dir==gt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(tO)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>jB)return Kk(e.length);let n=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||qk(r.isolates,i=rb(this,e))))return r.order;i||(i=rb(this,e));let s=BV(e.text,n,i);return this.bidiCache.push(new Au(e.from,e.to,n,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||me.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Pk(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return uc.of(new yo(typeof e=="number"?J.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return uc.of(new yo(J.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return _t.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return _t.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=Js.newName(),s=[gc.of(i),hl.of(kp(`.${i}`,e))];return n&&n.dark&&s.push(xp.of(!0)),s}static baseTheme(e){return Fr.lowest(hl.of(kp("."+Sp,e,kO)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),s=i&&ct.get(i)||ct.get(e);return((n=s==null?void 0:s.rootView)===null||n===void 0?void 0:n.view)||null}}pe.styleModule=hl;pe.inputHandler=Zk;pe.clipboardInputFilter=ig;pe.clipboardOutputFilter=sg;pe.scrollHandler=iO;pe.focusChangeEffect=eO;pe.perLineTextDirection=tO;pe.exceptionSink=Qk;pe.updateListener=yp;pe.editable=ns;pe.mouseSelectionStyle=Jk;pe.dragMovesSelection=Xk;pe.clickAddsSelectionRange=Yk;pe.decorations=ea;pe.outerDecorations=oO;pe.atomicRanges=og;pe.bidiIsolatedRanges=lO;pe.scrollMargins=aO;pe.darkTheme=xp;pe.cspNonce=ge.define({combine:t=>t.length?t[0]:""});pe.contentAttributes=rg;pe.editorAttributes=rO;pe.lineWrapping=pe.contentAttributes.of({class:"cm-lineWrapping"});pe.announce=De.define();const jB=4096,Tb={};class Au{constructor(e,n,i,s,r,o){this.from=e,this.to=n,this.dir=i,this.isolates=s,this.fresh=r,this.order=o}static update(e,n){if(n.empty&&!e.some(r=>r.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:gt.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(t):r;o&&fp(o,n)}return n}const qB=me.mac?"mac":me.windows?"win":me.linux?"linux":"key";function KB(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let a=0;ai.concat(s),[]))),n}function YB(t,e,n){return CO(OO(t.state),e,t,n)}let Vs=null;const XB=4e3;function JB(t,e=qB){let n=Object.create(null),i=Object.create(null),s=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,a,c,u)=>{var f,d;let h=n[o]||(n[o]=Object.create(null)),p=l.split(/ (?!$)/).map(g=>KB(g,e));for(let g=1;g{let w=Vs={view:b,prefix:x,scope:o};return setTimeout(()=>{Vs==w&&(Vs=null)},XB),!0}]})}let m=p.join(" ");s(m,!1);let y=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});a&&y.run.push(a),c&&(y.preventDefault=!0),u&&(y.stopPropagation=!0)};for(let o of t){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of l){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(h=>f(h,Op))}let a=o[e]||o.key;if(a)for(let c of l)r(c,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(c,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return n}let Op=null;function CO(t,e,n,i){Op=e;let s=vV(e),r=xn(s,0),o=Ei(r)==s.length&&s!=" ",l="",a=!1,c=!1,u=!1;Vs&&Vs.view==n&&Vs.scope==i&&(l=Vs.prefix+" ",hO.indexOf(e.keyCode)<0&&(c=!0,Vs=null));let f=new Set,d=y=>{if(y){for(let g of y.run)if(!f.has(g)&&(f.add(g),g(n)))return y.stopPropagation&&(u=!0),!0;y.preventDefault&&(y.stopPropagation&&(u=!0),c=!0)}return!1},h=t[i],p,m;return h&&(d(h[l+yc(s,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(me.windows&&e.ctrlKey&&e.altKey)&&(p=Qs[e.keyCode])&&p!=s?(d(h[l+yc(p,e,!0)])||e.shiftKey&&(m=Ql[e.keyCode])!=s&&m!=p&&d(h[l+yc(m,e,!1)]))&&(a=!0):o&&e.shiftKey&&d(h[l+yc(s,e,!0)])&&(a=!0),!a&&d(h._any)&&(a=!0)),c&&(a=!0),a&&u&&e.stopPropagation(),Op=null,a}class Pa{constructor(e,n,i,s,r){this.className=e,this.left=n,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=_O(e);return[new Pa(n,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return QB(e,n,i)}}function _O(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==gt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Db(t,e,n,i){let s=t.coordsAtPos(e,n*2);if(!s)return i;let r=t.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,l=t.posAtCoords({x:r.left+1,y:o}),a=t.posAtCoords({x:r.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}function QB(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),s=Math.min(n.to,t.viewport.to),r=t.textDirection==gt.LTR,o=t.contentDOM,l=o.getBoundingClientRect(),a=_O(t),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),f=l.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=l.right-(u?parseInt(u.paddingRight):0),h=vp(t,i,1),p=vp(t,s,-1),m=h.type==mn.Text?h:null,y=p.type==mn.Text?p:null;if(m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=Db(t,i,1,m)),y&&(t.lineWrapping||p.widgetLineBreaks)&&(y=Db(t,s,-1,y)),m&&y&&m.from==y.from&&m.to==y.to)return x(b(n.from,n.to,m));{let S=m?b(n.from,null,m):w(h,!1),k=y?b(null,n.to,y):w(p,!0),O=[];return(m||h).to<(y||p).from-(m&&y?1:0)||h.widgetLineBreaks>1&&S.bottom+t.defaultLineHeight/2L&&ee.from=q)break;ue>re&&F(Math.max(K,re),S==null&&K<=L,Math.min(ue,q),k==null&&ue>=Y,N.dir)}if(re=B.to+1,re>=q)break}return I.length==0&&F(L,S==null,Y,k==null,t.textDirection),{top:_,bottom:E,horizontal:I}}function w(S,k){let O=l.top+(k?S.top:S.bottom);return{top:O,bottom:O,horizontal:[]}}}function ZB(t,e){return t.constructor==e.constructor&&t.eq(e)}class eF{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Uc)!=e.state.facet(Uc)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(Uc);for(;n!ZB(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let s of e)s.update&&n&&s.constructor&&this.drawn[i].constructor&&s.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(s.draw(),n);for(;n;){let s=n.nextSibling;n.remove(),n=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Uc=ge.define();function AO(t){return[_t.define(e=>new eF(e,t)),Uc.of(t)]}const ta=ge.define({combine(t){return Ui(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function tF(t={}){return[ta.of(t),nF,iF,sF,nO.of(!0)]}function EO(t){return t.startState.facet(ta)!=t.state.facet(ta)}const nF=AO({above:!0,markers(t){let{state:e}=t,n=e.facet(ta),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty||n.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:J.cursor(s.head,s.head>s.anchor?-1:1);for(let a of Pa.forRange(t,o,l))i.push(a)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=EO(t);return n&&Rb(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Rb(e.state,t)},class:"cm-cursorLayer"});function Rb(t,e){e.style.animationDuration=t.facet(ta).cursorBlinkRate+"ms"}const iF=AO({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Pa.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||EO(t)},class:"cm-selectionLayer"}),sF=Fr.highest(pe.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),TO=De.define({map(t,e){return t==null?null:e.mapPos(t)}}),gl=Zt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(TO)?i.value:n,t)}}),rF=_t.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(gl);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(gl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(gl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(gl)!=t&&this.view.dispatch({effects:TO.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function oF(){return[gl,rF]}function Ib(t,e,n,i,s){e.lastIndex=0;for(let r=t.iterRange(n,i),o=n,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function lF(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:s,to:r}of n)s=Math.max(t.state.doc.lineAt(s).from,s-e),r=Math.min(t.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class aF{constructor(e){const{regexp:n,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,s)this.addMatch=(l,a,c,u)=>s(u,c,c+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,c,u)=>{let f=i(l,a,c);f&&u(c,c+l[0].length,f)};else if(i)this.addMatch=(l,a,c,u)=>u(c,c+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let n=new gs,i=n.add.bind(n);for(let{from:s,to:r}of lF(e,this.maxLength))Ib(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return n.finish()}updateDeco(e,n){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,a)=>{a>=e.view.viewport.from&&l<=e.view.viewport.to&&(i=Math.min(l,i),s=Math.max(a,s))}),e.viewportMoved||s-i>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,n.map(e.changes),i,s):n}updateRange(e,n,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>=o){let a=e.state.doc.lineAt(o),c=a.toa.from;o--)if(this.boundary.test(a.text[o-1-a.from])){u=o;break}for(;ld.push(g.range(m,y));if(a==c)for(this.regexp.lastIndex=u-a.from;(h=this.regexp.exec(a.text))&&h.indexthis.addMatch(y,e,m,p));n=n.update({filterFrom:u,filterTo:f,filter:(m,y)=>mf,add:d})}}return n}}const Cp=/x/.unicode!=null?"gu":"g",cF=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Cp),uF={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Id=null;function fF(){var t;if(Id==null&&typeof document<"u"&&document.body){let e=document.body.style;Id=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Id||!1}const jc=ge.define({combine(t){let e=Ui(t,{render:null,specialChars:cF,addSpecialChars:null});return(e.replaceTabs=!fF())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Cp)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Cp)),e}});function dF(t={}){return[jc.of(t),hF()]}let Lb=null;function hF(){return Lb||(Lb=_t.fromClass(class{constructor(t){this.view=t,this.decorations=Ce.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(jc)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new aF({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:s}=n.state,r=xn(e[0],0);if(r==9){let o=s.lineAt(i),l=n.state.tabSize,a=jo(o.text,l,i-o.from);return Ce.replace({widget:new yF((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=Ce.replace({widget:new gF(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(jc);t.startState.facet(jc)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const pF="•";function mF(t){return t>=32?pF:t==10?"␤":String.fromCharCode(9216+t)}class gF extends Ss{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=mF(this.code),i=e.state.phrase("Control character")+" "+(uF[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,n);if(s)return s;let r=document.createElement("span");return r.textContent=n,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class yF extends Ss{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function bF(){return wF}const vF=Ce.line({class:"cm-activeLine"}),wF=_t.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let s=t.lineBlockAt(i.head);s.from>e&&(n.push(vF.range(s.from)),e=s.from)}return Ce.set(n)}},{decorations:t=>t.decorations});class xF extends Ss{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Mo(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),s=Aa(n[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function SF(t){let e=_t.fromClass(class{constructor(n){this.view=n,this.placeholder=t?Ce.set([Ce.widget({widget:new xF(t),side:1}).range(0)]):Ce.none}get decorations(){return this.view.state.doc.length?Ce.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,pe.contentAttributes.of({"aria-placeholder":t})]:e}const _p=2e3;function kF(t,e,n){let i=Math.min(e.line,n.line),s=Math.max(e.line,n.line),r=[];if(e.off>_p||n.off>_p||e.col<0||n.col<0){let o=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let a=i;a<=s;a++){let c=t.doc.line(a);c.length<=l&&r.push(J.range(c.from+o,c.to+l))}}else{let o=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let a=i;a<=s;a++){let c=t.doc.line(a),u=sp(c.text,o,t.tabSize,!0);if(u<0)r.push(J.cursor(c.to));else{let f=sp(c.text,l,t.tabSize);r.push(J.range(c.from+u,c.from+f))}}}return r}function OF(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Nb(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),s=n-i.from,r=s>_p?-1:s==i.length?OF(t,e.clientX):jo(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:r,off:s}}function CF(t,e){let n=Nb(t,e),i=t.state.selection;return n?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(n.line).from),o=s.state.doc.lineAt(r);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=Nb(t,s);if(!l)return i;let a=kF(t.state,n,l);return a.length?o?J.create(a.concat(i.ranges)):J.create(a):i}}:null}function _F(t){let e=n=>n.altKey&&n.button==0;return pe.mouseSelectionStyle.of((n,i)=>e(i)?CF(n,i):null)}const AF={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},EF={style:"cursor: crosshair"};function TF(t={}){let[e,n]=AF[t.key||"Alt"],i=_t.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||n(s))},keyup(s){(s.keyCode==e||!n(s))&&this.set(!1)},mousemove(s){this.set(n(s))}}});return[i,pe.contentAttributes.of(s=>{var r;return!((r=s.plugin(i))===null||r===void 0)&&r.isDown?EF:null})]}const sl="-10000px";class PO{constructor(e,n,i,s){this.facet=n,this.createTooltipView=i,this.removeTooltipView=s,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=i(o,r))}update(e,n){var i;let s=e.state.facet(this.facet),r=s.filter(a=>a);if(s===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=n?[]:null;for(let a=0;an[c]=a),n.length=l.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function PF(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Ld=ge.define({combine:t=>{var e,n,i;return{position:me.ios?"absolute":((e=t.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(s=>s.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||PF}}}),$b=new WeakMap,fg=_t.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Ld);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new PO(t,dg,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(Ld);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",n.dom.appendChild(s)}return n.dom.style.position=this.position,n.dom.style.top=sl,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(me.gecko)n=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==sl&&r.style.left=="0px"){let o=r.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(n||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(t=r.width/this.parent.offsetWidth,e=r.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),s=lg(this.view);return{visible:{left:i.left+s.left,top:i.top+s.top,right:i.right-s.right,bottom:i.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((r,o)=>{let l=this.manager.tooltipViews[o];return l.getCoords?l.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Ld).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:n,space:i,scaleX:s,scaleY:r}=t,o=[];for(let l=0;l=Math.min(n.bottom,i.bottom)||f.rightMath.min(n.right,i.right)+.1)){u.style.top=sl;continue}let h=a.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=h?7:0,m=d.right-d.left,y=(e=$b.get(c))!==null&&e!==void 0?e:d.bottom-d.top,g=c.offset||DF,x=this.view.textDirection==gt.LTR,b=d.width>i.right-i.left?x?i.left:i.right-d.width:x?Math.max(i.left,Math.min(f.left-(h?14:0)+g.x,i.right-m)):Math.min(Math.max(i.left,f.left-m+(h?14:0)-g.x),i.right-m),w=this.above[l];!a.strictSide&&(w?f.top-y-p-g.yi.bottom)&&w==i.bottom-f.bottom>f.top-i.top&&(w=this.above[l]=!w);let S=(w?f.top-i.top:i.bottom-f.bottom)-p;if(Sb&&_.topk&&(k=w?_.top-y-2-p:_.bottom+p+2);if(this.position=="absolute"?(u.style.top=(k-t.parent.top)/r+"px",Vb(u,(b-t.parent.left)/s)):(u.style.top=k/r+"px",Vb(u,b/s)),h){let _=f.left+(x?g.x:-g.x)-(b+14-7);h.style.left=_/s+"px"}c.overlap!==!0&&o.push({left:b,top:k,right:O,bottom:k+y}),u.classList.toggle("cm-tooltip-above",w),u.classList.toggle("cm-tooltip-below",!w),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=sl}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Vb(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const MF=pe.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),DF={x:0,y:0},dg=ge.define({enables:[fg,MF]}),Eu=ge.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Ff{static create(e){return new Ff(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new PO(e,Eu,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let s=i[e];if(s!==void 0){if(n===void 0)n=s;else if(n!==s)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const RF=dg.compute([Eu],t=>{let e=t.facet(Eu);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:Ff.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class IF{constructor(e,n,i,s,r){this.view=e,this.source=n,this.field=i,this.setHover=s,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;el.bottom||n.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(s)).find(u=>u.from<=s&&u.to>=s),c=a&&a.dir==gt.RTL?-1:1;r=n.x{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>Cn(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(fg),n=e?e.manager.tooltips.findIndex(i=>i.create==Ff.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:r}=this;if(s.length&&r&&!LF(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,l=(i=(n=s[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!NF(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const bc=4;function LF(t,e){let{left:n,right:i,top:s,bottom:r}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();s=Math.min(l.top,s),r=Math.max(l.bottom,r)}return e.clientX>=n-bc&&e.clientX<=i+bc&&e.clientY>=s-bc&&e.clientY<=r+bc}function NF(t,e,n,i,s,r){let o=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.rights||Math.min(o.bottom,l)=e&&a<=n}function $F(t,e={}){let n=De.define(),i=Zt.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let l of s){let a=r.changes.mapPos(l.pos,-1,hn.TrackDel);if(a!=null){let c=Object.assign(Object.create(null),l);c.pos=a,c.end!=null&&(c.end=r.changes.mapPos(c.end)),o.push(c)}}s=o}for(let o of r.effects)o.is(n)&&(s=o.value),o.is(VF)&&(s=[]);return s},provide:s=>Eu.from(s)});return{active:i,extension:[i,_t.define(s=>new IF(s,t,i,n,e.hoverTime||300)),RF]}}function MO(t,e){let n=t.plugin(fg);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const VF=De.define(),Bb=ge.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function na(t,e){let n=t.plugin(DO),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const DO=_t.fromClass(class{constructor(t){this.input=t.state.facet(ia),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Bb);this.top=new vc(t,!0,e.topContainer),this.bottom=new vc(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Bb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new vc(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new vc(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(ia);if(n!=this.input){let i=n.filter(a=>a),s=[],r=[],o=[],l=[];for(let a of i){let c=this.specs.indexOf(a),u;c<0?(u=a(t.view),l.push(u)):(u=this.panels[c],u.update&&u.update(t)),s.push(u),(u.top?r:o).push(u)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>pe.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class vc{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Fb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Fb(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Fb(t){let e=t.nextSibling;return t.remove(),e}const ia=ge.define({enables:DO});class bs extends Tr{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}bs.prototype.elementClass="";bs.prototype.toDOM=void 0;bs.prototype.mapMode=hn.TrackBefore;bs.prototype.startSide=bs.prototype.endSide=-1;bs.prototype.point=!0;const qc=ge.define(),BF=ge.define(),FF={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ge.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Tl=ge.define();function WF(t){return[RO(),Tl.of({...FF,...t})]}const Wb=ge.define({combine:t=>t.some(e=>e)});function RO(t){return[zF]}const zF=_t.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Tl).map(e=>new Hb(t,e)),this.fixed=!t.state.facet(Wb);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Wb)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ge.iter(this.view.state.facet(qc),this.view.viewport.from),i=[],s=this.gutters.map(r=>new HF(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let o=!0;for(let l of r.type)if(l.type==mn.Text&&o){Ap(n,i,l.from);for(let a of s)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of s)a.widget(this.view,l)}else if(r.type==mn.Text){Ap(n,i,r.from);for(let o of s)o.line(this.view,r,i)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Tl),n=t.state.facet(Tl),i=t.docChanged||t.heightChanged||t.viewportChanged||!Ge.eq(t.startState.facet(qc),t.state.facet(qc),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let s of this.gutters)s.update(t)&&(i=!0);else{i=!0;let s=[];for(let r of n){let o=e.indexOf(r);o<0?s.push(new Hb(this.view,r)):(this.gutters[o].update(t),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)r.config.side=="after"?this.getDOMAfter().appendChild(r.dom):this.dom.appendChild(r.dom);this.gutters=s}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>pe.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,s=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==gt.LTR?{left:i,right:s}:{right:i,left:s}})});function zb(t){return Array.isArray(t)?t:[t]}function Ap(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class HF{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Ge.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:s}=this,r=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==s.elements.length){let l=new IO(e,o,r,i);s.elements.push(l),s.dom.appendChild(l.dom)}else s.elements[this.i].update(e,o,r,i);this.height=n.bottom,this.i++}line(e,n,i){let s=[];Ap(this.cursor,s,n.from),i.length&&(s=s.concat(i));let r=this.gutter.config.lineMarker(e,n,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,s)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),s=i?[i]:null;for(let r of e.state.facet(BF)){let o=r(e,n.widget,n);o&&(s||(s=[])).push(o)}s&&this.addElement(e,n,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Hb{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=s.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[i](e,l,s)&&s.preventDefault()});this.markers=zb(n.markers(e)),n.initialSpacer&&(this.spacer=new IO(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=zb(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let i=e.view.viewport;return!Ge.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class IO{constructor(e,n,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,s)}update(e,n,i,s){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),UF(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,n){let i="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let l=o,a=rr(l,a,c)||o(l,a,c):o}return i}})}});class Nd extends bs{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function $d(t,e){return t.state.facet(io).formatNumber(e,t.state)}const KF=Tl.compute([io],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(jF)},lineMarker(e,n,i){return i.some(s=>s.toDOM)?null:new Nd($d(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let s of e.state.facet(qF)){let r=s(e,n,i);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(io)!=e.state.facet(io),initialSpacer(e){return new Nd($d(e,Ub(e.state.doc.lines)))},updateSpacer(e,n){let i=$d(n.view,Ub(n.view.state.doc.lines));return i==e.number?e:new Nd(i)},domEventHandlers:t.facet(io).domEventHandlers,side:"before"}));function GF(t={}){return[io.of(t),RO(),KF]}function Ub(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let s=t.doc.lineAt(i.head).from;s>n&&(n=s,e.push(YF.range(s)))}return Ge.of(e)});function JF(){return XF}const LO=1024;let QF=0;class Vd{constructor(e,n){this.from=e,this.to=n}}class Ne{constructor(e={}){this.id=QF++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Tn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}Ne.closedBy=new Ne({deserialize:t=>t.split(" ")});Ne.openedBy=new Ne({deserialize:t=>t.split(" ")});Ne.group=new Ne({deserialize:t=>t.split(" ")});Ne.isolate=new Ne({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Ne.contextHash=new Ne({perNode:!0});Ne.lookAhead=new Ne({perNode:!0});Ne.mounted=new Ne({perNode:!0});class Tu{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[Ne.mounted.id]}}const ZF=Object.create(null);class Tn{constructor(e,n,i,s=0){this.name=e,this.props=n,this.id=i,this.flags=s}static define(e){let n=e.props&&e.props.length?Object.create(null):ZF,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Tn(e.name||"",n,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Ne.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let s of i.split(" "))n[s]=e[i];return i=>{for(let s=i.prop(Ne.group),r=-1;r<(s?s.length:0);r++){let o=n[r<0?i.name:s[r]];if(o)return o}}}}Tn.none=new Tn("",Object.create(null),0,8);class hg{constructor(e){this.types=e;for(let n=0;n0;for(let a=this.cursor(o|zt.IncludeAnonymous);;){let c=!1;if(a.from<=r&&a.to>=s&&(!l&&a.type.isAnonymous||n(a)!==!1)){if(a.firstChild())continue;c=!0}for(;c&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:gg(Tn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,s)=>new Pt(this.type,n,i,s,this.propValues),e.makeTree||((n,i,s)=>new Pt(Tn.none,n,i,s)))}static build(e){return i3(e)}}Pt.empty=new Pt(Tn.none,[],[],0);class pg{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new pg(this.buffer,this.index)}}class er{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Tn.none}toString(){let e=[];for(let n=0;n0));a=o[a+3]);return l}slice(e,n,i){let s=this.buffer,r=new Uint16Array(n-e),o=0;for(let l=e,a=0;l=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function sa(t,e,n,i){for(var s;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?l.length:-1;e!=c;e+=n){let u=l[e],f=a[e]+o.from;if(NO(s,i,f,f+u.length)){if(u instanceof er){if(r&zt.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,n,i-f,s);if(d>-1)return new zs(new e3(o,u,e,f),null,d)}else if(r&zt.IncludeAnonymous||!u.type.isAnonymous||mg(u)){let d;if(!(r&zt.IgnoreMounts)&&(d=Tu.get(u))&&!d.overlay)return new Qn(d.tree,f,e,o);let h=new Qn(u,f,e,o);return r&zt.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,i,s)}}}if(r&zt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let s;if(!(i&zt.IgnoreOverlays)&&(s=Tu.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((n>0?o<=r:o=r:l>r))return new Qn(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function qb(t,e,n,i){let s=t.cursor(),r=[];if(!s.firstChild())return r;if(n!=null){for(let o=!1;!o;)if(o=s.type.is(n),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function Ep(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class e3{constructor(e,n,i,s){this.parent=e,this.buffer=n,this.index=i,this.start=s}}class zs extends $O{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,n-this.context.start,i);return r<0?null:new zs(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&zt.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return r<0?null:new zs(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new zs(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new zs(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),n.push(0)}return new Pt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function VO(t){if(!t.length)return null;let e=0,n=t[0];for(let r=1;rn.from||o.to=e){let l=new Qn(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(sa(l,e,n,!1))}}return s?VO(s):i}class Tp{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Qn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=n||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Qn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,n-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&zt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&zt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&zt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(n.findChild(s,this.index,-1,0,4))}else{let s=n.buffer[this.index+3];if(s<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=n+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&zt.IncludeAnonymous||l instanceof er||!l.type.isAnonymous||mg(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;n=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return Ep(this._tree,e,s);let o=i[n.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function mg(t){return t.children.some(e=>e instanceof er||!e.type.isAnonymous||mg(e))}function i3(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:s=LO,reused:r=[],minRepeatType:o=i.types.length}=t,l=Array.isArray(n)?new pg(n,n.length):n,a=i.types,c=0,u=0;function f(S,k,O,_,E,I){let{id:F,start:L,end:Y,size:ee}=l,re=u,q=c;for(;ee<0;)if(l.next(),ee==-1){let Se=r[F];O.push(Se),_.push(L-S);return}else if(ee==-3){c=F;return}else if(ee==-4){u=F;return}else throw new RangeError(`Unrecognized record size: ${ee}`);let B=a[F],N,K,ue=L-S;if(Y-L<=s&&(K=y(l.pos-k,E))){let Se=new Uint16Array(K.size-K.skip),fe=l.pos-K.size,Oe=Se.length;for(;l.pos>fe;)Oe=g(K.start,Se,Oe);N=new er(Se,Y-K.start,i),ue=K.start-S}else{let Se=l.pos-ee;l.next();let fe=[],Oe=[],Pe=F>=o?F:-1,Ke=0,Re=Y;for(;l.pos>Se;)Pe>=0&&l.id==Pe&&l.size>=0?(l.end<=Re-s&&(p(fe,Oe,L,Ke,l.end,Re,Pe,re,q),Ke=fe.length,Re=l.end),l.next()):I>2500?d(L,Se,fe,Oe):f(L,Se,fe,Oe,Pe,I+1);if(Pe>=0&&Ke>0&&Ke-1&&Ke>0){let Ae=h(B,q);N=gg(B,fe,Oe,0,fe.length,0,Y-L,Ae,Ae)}else N=m(B,fe,Oe,Y-L,re-Y,q)}O.push(N),_.push(ue)}function d(S,k,O,_){let E=[],I=0,F=-1;for(;l.pos>k;){let{id:L,start:Y,end:ee,size:re}=l;if(re>4)l.next();else{if(F>-1&&Y=0;ee-=3)L[re++]=E[ee],L[re++]=E[ee+1]-Y,L[re++]=E[ee+2]-Y,L[re++]=re;O.push(new er(L,E[2]-Y,i)),_.push(Y-S)}}function h(S,k){return(O,_,E)=>{let I=0,F=O.length-1,L,Y;if(F>=0&&(L=O[F])instanceof Pt){if(!F&&L.type==S&&L.length==E)return L;(Y=L.prop(Ne.lookAhead))&&(I=_[F]+L.length+Y)}return m(S,O,_,E,I,k)}}function p(S,k,O,_,E,I,F,L,Y){let ee=[],re=[];for(;S.length>_;)ee.push(S.pop()),re.push(k.pop()+O-E);S.push(m(i.types[F],ee,re,I-E,L-I,Y)),k.push(E-O)}function m(S,k,O,_,E,I,F){if(I){let L=[Ne.contextHash,I];F=F?[L].concat(F):[L]}if(E>25){let L=[Ne.lookAhead,E];F=F?[L].concat(F):[L]}return new Pt(S,k,O,_,F)}function y(S,k){let O=l.fork(),_=0,E=0,I=0,F=O.end-s,L={size:0,start:0,skip:0};e:for(let Y=O.pos-S;O.pos>Y;){let ee=O.size;if(O.id==k&&ee>=0){L.size=_,L.start=E,L.skip=I,I+=4,_+=4,O.next();continue}let re=O.pos-ee;if(ee<0||re=o?4:0,B=O.start;for(O.next();O.pos>re;){if(O.size<0)if(O.size==-3)q+=4;else break e;else O.id>=o&&(q+=4);O.next()}E=B,_+=ee,I+=q}return(k<0||_==S)&&(L.size=_,L.start=E,L.skip=I),L.size>4?L:void 0}function g(S,k,O){let{id:_,start:E,end:I,size:F}=l;if(l.next(),F>=0&&_4){let Y=l.pos-(F-4);for(;l.pos>Y;)O=g(S,k,O)}k[--O]=L,k[--O]=I-S,k[--O]=E-S,k[--O]=_}else F==-3?c=_:F==-4&&(u=_);return O}let x=[],b=[];for(;l.pos>0;)f(t.start||0,t.bufferStart||0,x,b,-1,0);let w=(e=t.length)!==null&&e!==void 0?e:x.length?b[0]+x[0].length:0;return new Pt(a[t.topID],x.reverse(),b.reverse(),w)}const Kb=new WeakMap;function Kc(t,e){if(!t.isAnonymous||e instanceof er||e.type!=t)return 1;let n=Kb.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof Pt)){n=1;break}n+=Kc(t,i)}Kb.set(e,n)}return n}function gg(t,e,n,i,s,r,o,l,a){let c=0;for(let p=i;p=u)break;k+=O}if(b==w+1){if(k>u){let O=p[w];h(O.children,O.positions,0,O.children.length,m[w]+x);continue}f.push(p[w])}else{let O=m[b-1]+p[b-1].length-S;f.push(gg(t,p,m,w,b,S,O,null,a))}d.push(S+x-r)}}return h(e,n,i,s,0),(l||a)(f,d,o)}class kr{constructor(e,n,i,s,r=!1,o=!1){this.from=e,this.to=n,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let s=[new kr(0,e.length,e,0,!1,i)];for(let r of n)r.to>e.length&&s.push(r);return s}static applyChanges(e,n,i=128){if(!n.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,c=0;;l++){let u=l=i)for(;o&&o.from=d.from||f<=d.to||c){let h=Math.max(d.from,a)-c,p=Math.min(d.to,f)-c;d=h>=p?null:new kr(h,p,d.tree,d.offset+c,l>0,!!u)}if(d&&s.push(d),o.to>f)break;o=rnew Vd(s.from,s.to)):[new Vd(0,0)]:[new Vd(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let s=this.startParse(e,n,i);for(;;){let r=s.advance();if(r)return r}}}class s3{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Ne({perNode:!0});let r3=0;class qn{constructor(e,n,i,s){this.name=e,this.set=n,this.base=i,this.modified=s,this.id=r3++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof qn&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let s=new qn(i,[],null,[]);if(s.set.push(s),n)for(let r of n.set)s.set.push(r);return s}static defineModifier(e){let n=new Pu(e);return i=>i.modified.indexOf(n)>-1?i:Pu.get(i.base||i,i.modified.concat(n).sort((s,r)=>s.id-r.id))}}let o3=0;class Pu{constructor(e){this.name=e,this.instances=[],this.id=o3++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(l=>l.base==e&&l3(n,l.modified));if(i)return i;let s=[],r=new qn(e.name,s,e,n);for(let l of n)l.instances.push(r);let o=a3(n);for(let l of e.set)if(!l.modified.length)for(let a of o)s.push(Pu.get(l,a));return r}}function l3(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function a3(t){let e=[[]];for(let n=0;ni.length-n.length)}function yg(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let s of n.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!d)throw new RangeError("Invalid path: "+s);if(r.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==s.length)break;let h=s[f++];if(f==s.length&&h=="!"){o=0;break}if(h!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let a=r.length-1,c=r[a];if(!c)throw new RangeError("Invalid path: "+s);let u=new Mu(i,o,a>0?r.slice(0,a):null);e[c]=u.sort(e[c])}}return FO.add(e)}const FO=new Ne;class Mu{constructor(e,n,i,s){this.tags=e,this.mode=n,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let a of l.set){let c=n[a.id];if(c){o=o?o+" "+c:c;break}}return o},scope:i}}function c3(t,e){let n=null;for(let i of t){let s=i.style(e);s&&(n=n?n+" "+s:s)}return n}function u3(t,e,n,i=0,s=t.length){let r=new f3(i,Array.isArray(e)?e:[e],n);r.highlightRange(t.cursor(),i,s,"",r.highlighters),r.flush(s)}class f3{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,s,r){let{type:o,from:l,to:a}=e;if(l>=i||a<=n)return;o.isTop&&(r=this.highlighters.filter(h=>!h.scope||h.scope(o)));let c=s,u=d3(e)||Mu.empty,f=c3(r,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(n,l),c),u.opaque)return;let d=e.tree&&e.tree.prop(Ne.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+l,1),p=this.highlighters.filter(y=>!y.scope||y.scope(d.tree.type)),m=e.firstChild();for(let y=0,g=l;;y++){let x=y=b||!e.nextSibling())););if(!x||b>i)break;g=x.to+l,g>n&&(this.highlightRange(h.cursor(),Math.max(n,x.from+l),Math.min(i,g),"",p),this.startSpan(Math.min(i,g),c))}m&&e.parent()}else if(e.firstChild()){d&&(s="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,s,r),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}}function d3(t){let e=t.type.prop(FO);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ce=qn.define,xc=ce(),Ls=ce(),Gb=ce(Ls),Yb=ce(Ls),Ns=ce(),Sc=ce(Ns),Bd=ce(Ns),Oi=ce(),fr=ce(Oi),xi=ce(),Si=ce(),Pp=ce(),rl=ce(Pp),kc=ce(),ne={comment:xc,lineComment:ce(xc),blockComment:ce(xc),docComment:ce(xc),name:Ls,variableName:ce(Ls),typeName:Gb,tagName:ce(Gb),propertyName:Yb,attributeName:ce(Yb),className:ce(Ls),labelName:ce(Ls),namespace:ce(Ls),macroName:ce(Ls),literal:Ns,string:Sc,docString:ce(Sc),character:ce(Sc),attributeValue:ce(Sc),number:Bd,integer:ce(Bd),float:ce(Bd),bool:ce(Ns),regexp:ce(Ns),escape:ce(Ns),color:ce(Ns),url:ce(Ns),keyword:xi,self:ce(xi),null:ce(xi),atom:ce(xi),unit:ce(xi),modifier:ce(xi),operatorKeyword:ce(xi),controlKeyword:ce(xi),definitionKeyword:ce(xi),moduleKeyword:ce(xi),operator:Si,derefOperator:ce(Si),arithmeticOperator:ce(Si),logicOperator:ce(Si),bitwiseOperator:ce(Si),compareOperator:ce(Si),updateOperator:ce(Si),definitionOperator:ce(Si),typeOperator:ce(Si),controlOperator:ce(Si),punctuation:Pp,separator:ce(Pp),bracket:rl,angleBracket:ce(rl),squareBracket:ce(rl),paren:ce(rl),brace:ce(rl),content:Oi,heading:fr,heading1:ce(fr),heading2:ce(fr),heading3:ce(fr),heading4:ce(fr),heading5:ce(fr),heading6:ce(fr),contentSeparator:ce(Oi),list:ce(Oi),quote:ce(Oi),emphasis:ce(Oi),strong:ce(Oi),link:ce(Oi),monospace:ce(Oi),strikethrough:ce(Oi),inserted:ce(),deleted:ce(),changed:ce(),invalid:ce(),meta:kc,documentMeta:ce(kc),annotation:ce(kc),processingInstruction:ce(kc),definition:qn.defineModifier("definition"),constant:qn.defineModifier("constant"),function:qn.defineModifier("function"),standard:qn.defineModifier("standard"),local:qn.defineModifier("local"),special:qn.defineModifier("special")};for(let t in ne){let e=ne[t];e instanceof qn&&(e.name=t)}WO([{tag:ne.link,class:"tok-link"},{tag:ne.heading,class:"tok-heading"},{tag:ne.emphasis,class:"tok-emphasis"},{tag:ne.strong,class:"tok-strong"},{tag:ne.keyword,class:"tok-keyword"},{tag:ne.atom,class:"tok-atom"},{tag:ne.bool,class:"tok-bool"},{tag:ne.url,class:"tok-url"},{tag:ne.labelName,class:"tok-labelName"},{tag:ne.inserted,class:"tok-inserted"},{tag:ne.deleted,class:"tok-deleted"},{tag:ne.literal,class:"tok-literal"},{tag:ne.string,class:"tok-string"},{tag:ne.number,class:"tok-number"},{tag:[ne.regexp,ne.escape,ne.special(ne.string)],class:"tok-string2"},{tag:ne.variableName,class:"tok-variableName"},{tag:ne.local(ne.variableName),class:"tok-variableName tok-local"},{tag:ne.definition(ne.variableName),class:"tok-variableName tok-definition"},{tag:ne.special(ne.variableName),class:"tok-variableName2"},{tag:ne.definition(ne.propertyName),class:"tok-propertyName tok-definition"},{tag:ne.typeName,class:"tok-typeName"},{tag:ne.namespace,class:"tok-namespace"},{tag:ne.className,class:"tok-className"},{tag:ne.macroName,class:"tok-macroName"},{tag:ne.propertyName,class:"tok-propertyName"},{tag:ne.operator,class:"tok-operator"},{tag:ne.comment,class:"tok-comment"},{tag:ne.meta,class:"tok-meta"},{tag:ne.invalid,class:"tok-invalid"},{tag:ne.punctuation,class:"tok-punctuation"}]);var Fd;const so=new Ne;function h3(t){return ge.define({combine:t?e=>e.concat(t):void 0})}const p3=new Ne;class ai{constructor(e,n,i=[],s=""){this.data=e,this.name=s,Be.prototype.hasOwnProperty("tree")||Object.defineProperty(Be.prototype,"tree",{get(){return Ut(this)}}),this.parser=n,this.extension=[tr.of(this),Be.languageData.of((r,o,l)=>{let a=Xb(r,o,l),c=a.type.prop(so);if(!c)return[];let u=r.facet(c),f=a.type.prop(p3);if(f){let d=a.resolve(o-a.from,l);for(let h of f)if(h.test(d,r)){let p=r.facet(h.facet);return h.type=="replace"?p:p.concat(u)}}return u})].concat(i)}isActiveAt(e,n,i=-1){return Xb(e,n,i).type.prop(so)==this.data}findRegions(e){let n=e.facet(tr);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(so)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(Ne.mounted);if(l){if(l.tree.prop(so)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let a=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;ai.isTop?n:void 0)]}),e.name)}configure(e,n){return new ra(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ut(t){let e=t.field(ai.state,!1);return e?e.tree:Pt.empty}class m3{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let ol=null;class Du{constructor(e,n,i=[],s,r,o,l,a){this.parser=e,this.state=n,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new Du(e,n,[],Pt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new m3(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Pt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(kr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=ol;ol=this;try{return e()}finally{ol=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Jb(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((c,u,f,d)=>a.push({fromA:c,toA:u,fromB:f,toB:d})),i=kr.applyChanges(i,a),s=Pt.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);ue.from&&(this.fragments=Jb(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends BO{createParse(n,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let a=ol;if(a){for(let c of s)a.tempSkipped.push(c);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new Pt(Tn.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return ol}}function Jb(t,e,n){return kr.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Lo{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new Lo(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=Du.create(e.facet(tr).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new Lo(i)}}ai.state=Zt.define({create:Lo.init,update(t,e){for(let n of e.effects)if(n.is(ai.setState))return n.value;return e.startState.facet(tr)!=e.state.facet(tr)?Lo.init(e.state):t.apply(e)}});let zO=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(zO=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Wd=typeof navigator<"u"&&(!((Fd=navigator.scheduling)===null||Fd===void 0)&&Fd.isInputPending)?()=>navigator.scheduling.isInputPending():null,g3=_t.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(ai.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(ai.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=zO(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnds+1e3,a=r.context.work(()=>Wd&&Wd()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:ai.setState.of(new Lo(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Cn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),tr=ge.define({combine(t){return t.length?t[0]:null},enables:t=>[ai.state,g3,pe.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class HO{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const y3=ge.define(),Wf=ge.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ru(t){let e=t.facet(Wf);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function oa(t,e){let n="",i=t.tabSize,s=t.facet(Wf)[0];if(s==" "){for(;e>=i;)n+=" ",e-=i;s=" "}for(let r=0;r=e?b3(t,n,e):null}class zf{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ru(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(n<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,n=e.length){return jo(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:s}=this.lineAt(e,n),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const vg=new Ne;function b3(t,e,n){let i=e.resolveStack(n),s=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(s!=i.node){let r=[];for(let o=s;o&&!(o.fromi.node.to||o.from==i.node.from&&o.type==i.node.type);o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)i={node:r[o],next:i}}return UO(i,t,n)}function UO(t,e,n){for(let i=t;i;i=i.next){let s=w3(i.node);if(s)return s(wg.create(e,n,i))}return 0}function v3(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function w3(t){let e=t.type.prop(vg);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(Ne.closedBy))){let s=t.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>O3(o,!0,1,void 0,r&&!v3(o)?s.from:void 0)}return t.parent==null?x3:null}function x3(){return 0}class wg extends zf{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new wg(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(S3(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return UO(this.context.next,this.base,this.pos)}}function S3(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function k3(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let s=t.options.simulateBreak,r=t.state.doc.lineAt(n.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let c=/^ */.exec(r.text.slice(n.to-r.from))[0].length;return{from:n.from,to:n.to+c}}l=a.to}}function O3(t,e,n,i,s){let r=t.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==t.pos+o,a=k3(t);return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*n)}function Qb({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const C3=200;function _3(){return Be.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,s=n.lineAt(i);if(i>s.from+C3)return t;let r=n.sliceString(s.from,i);if(!e.some(c=>c.test(r)))return t;let{state:o}=t,l=-1,a=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==l)continue;l=u.from;let f=bg(o,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],h=oa(o,f);d!=h&&a.push({from:u.from,to:u.from+d.length,insert:h})}return a.length?[t,{changes:a,sequential:!0}]:t})}const A3=ge.define(),xg=new Ne;function E3(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(r&&l.from=e&&c.to>n&&(r=c)}}return r}function P3(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Iu(t,e,n){for(let i of t.facet(A3)){let s=i(t,e,n);if(s)return s}return T3(t,e,n)}function jO(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const Hf=De.define({map:jO}),Ma=De.define({map:jO});function qO(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Rr=Zt.define({create(){return Ce.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>t=Zb(t,n,i)),t=t.map(e.changes);for(let n of e.effects)if(n.is(Hf)&&!M3(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(YO),s=i?Ce.replace({widget:new V3(i(e.state,n.value))}):ev;t=t.update({add:[s.range(n.value.from,n.value.to)]})}else n.is(Ma)&&(t=t.update({filter:(i,s)=>n.value.from!=i||n.value.to!=s,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=Zb(t,e.selection.main.head)),t},provide:t=>pe.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,s)=>{n.push(i,s)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{se&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(s,r)=>s>=n||r<=e}):t}function Lu(t,e,n){var i;let s=null;return(i=t.field(Rr,!1))===null||i===void 0||i.between(e,n,(r,o)=>{(!s||s.from>r)&&(s={from:r,to:o})}),s}function M3(t,e,n){let i=!1;return t.between(e,e,(s,r)=>{s==e&&r==n&&(i=!0)}),i}function KO(t,e){return t.field(Rr,!1)?e:e.concat(De.appendConfig.of(XO()))}const D3=t=>{for(let e of qO(t)){let n=Iu(t.state,e.from,e.to);if(n)return t.dispatch({effects:KO(t.state,[Hf.of(n),GO(t,n)])}),!0}return!1},R3=t=>{if(!t.state.field(Rr,!1))return!1;let e=[];for(let n of qO(t)){let i=Lu(t.state,n.from,n.to);i&&e.push(Ma.of(i),GO(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function GO(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number;return pe.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${s}.`)}const I3=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Rr,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,s)=>{n.push(Ma.of({from:i,to:s}))}),t.dispatch({effects:n}),!0},N3=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:D3},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:R3},{key:"Ctrl-Alt-[",run:I3},{key:"Ctrl-Alt-]",run:L3}],$3={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},YO=ge.define({combine(t){return Ui(t,$3)}});function XO(t){return[Rr,W3]}function JO(t,e){let{state:n}=t,i=n.facet(YO),s=o=>{let l=t.lineBlockAt(t.posAtDOM(o.target)),a=Lu(t.state,l.from,l.to);a&&t.dispatch({effects:Ma.of(a)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,s,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const ev=Ce.replace({widget:new class extends Ss{toDOM(t){return JO(t,null)}}});class V3 extends Ss{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return JO(e,this.value)}}const B3={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class zd extends bs{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function F3(t={}){let e={...B3,...t},n=new zd(e,!0),i=new zd(e,!1),s=_t.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(tr)!=o.state.facet(tr)||o.startState.field(Rr,!1)!=o.state.field(Rr,!1)||Ut(o.startState)!=Ut(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new gs;for(let a of o.viewportLineBlocks){let c=Lu(o.state,a.from,a.to)?i:Iu(o.state,a.from,a.to)?n:null;c&&l.add(a.from,a.from,c)}return l.finish()}}),{domEventHandlers:r}=e;return[s,WF({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(s))===null||l===void 0?void 0:l.markers)||Ge.empty},initialSpacer(){return new zd(e,!1)},domEventHandlers:{...r,click:(o,l,a)=>{if(r.click&&r.click(o,l,a))return!0;let c=Lu(o.state,l.from,l.to);if(c)return o.dispatch({effects:Ma.of(c)}),!0;let u=Iu(o.state,l.from,l.to);return u?(o.dispatch({effects:Hf.of(u)}),!0):!1}}}),XO()]}const W3=pe.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Uf{constructor(e,n){this.specs=e;let i;function s(l){let a=Js.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof n.all=="string"?n.all:n.all?s(n.all):void 0,o=n.scope;this.scope=o instanceof ai?l=>l.prop(so)==o.data:o?l=>l==o:void 0,this.style=WO(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Js(i):null,this.themeType=n.themeType}static define(e,n){return new Uf(e,n||{})}}const Mp=ge.define(),QO=ge.define({combine(t){return t.length?[t[0]]:null}});function Hd(t){let e=t.facet(Mp);return e.length?e:t.facet(QO)}function z3(t,e){let n=[U3],i;return t instanceof Uf&&(t.module&&n.push(pe.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(QO.of(t)):i?n.push(Mp.computeN([pe.darkTheme],s=>s.facet(pe.darkTheme)==(i=="dark")?[t]:[])):n.push(Mp.of(t)),n}class H3{constructor(e){this.markCache=Object.create(null),this.tree=Ut(e.state),this.decorations=this.buildDeco(e,Hd(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Ut(e.state),i=Hd(e.state),s=i!=Hd(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||s)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,n){if(!n||!this.tree.length)return Ce.none;let i=new gs;for(let{from:s,to:r}of e.visibleRanges)u3(this.tree,n,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=Ce.mark({class:a})))},s,r);return i.finish()}}const U3=Fr.high(_t.fromClass(H3,{decorations:t=>t.decorations})),j3=Uf.define([{tag:ne.meta,color:"#404740"},{tag:ne.link,textDecoration:"underline"},{tag:ne.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ne.emphasis,fontStyle:"italic"},{tag:ne.strong,fontWeight:"bold"},{tag:ne.strikethrough,textDecoration:"line-through"},{tag:ne.keyword,color:"#708"},{tag:[ne.atom,ne.bool,ne.url,ne.contentSeparator,ne.labelName],color:"#219"},{tag:[ne.literal,ne.inserted],color:"#164"},{tag:[ne.string,ne.deleted],color:"#a11"},{tag:[ne.regexp,ne.escape,ne.special(ne.string)],color:"#e40"},{tag:ne.definition(ne.variableName),color:"#00f"},{tag:ne.local(ne.variableName),color:"#30a"},{tag:[ne.typeName,ne.namespace],color:"#085"},{tag:ne.className,color:"#167"},{tag:[ne.special(ne.variableName),ne.macroName],color:"#256"},{tag:ne.definition(ne.propertyName),color:"#00c"},{tag:ne.comment,color:"#940"},{tag:ne.invalid,color:"#f00"}]),q3=pe.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),ZO=1e4,eC="()[]{}",tC=ge.define({combine(t){return Ui(t,{afterCursor:!0,brackets:eC,maxScanDistance:ZO,renderMatch:Y3})}}),K3=Ce.mark({class:"cm-matchingBracket"}),G3=Ce.mark({class:"cm-nonmatchingBracket"});function Y3(t){let e=[],n=t.matched?K3:G3;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const X3=Zt.define({create(){return Ce.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(tC);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=Mi(e.state,s.head,-1,i)||s.head>0&&Mi(e.state,s.head-1,1,i)||i.afterCursor&&(Mi(e.state,s.head,1,i)||s.headpe.decorations.from(t)}),J3=[X3,q3];function Q3(t={}){return[tC.of(t),J3]}const nC=new Ne;function Dp(t,e,n){let i=t.prop(e<0?Ne.openedBy:Ne.closedBy);if(i)return i;if(t.name.length==1){let s=n.indexOf(t.name);if(s>-1&&s%2==(e<0?1:0))return[n[s+e]]}return null}function Rp(t){let e=t.type.prop(nC);return e?e(t.node):t}function Mi(t,e,n,i={}){let s=i.maxScanDistance||ZO,r=i.brackets||eC,o=Ut(t),l=o.resolveInner(e,n);for(let a=l;a;a=a.parent){let c=Dp(a.type,n,r);if(c&&a.from0?e>=u.from&&eu.from&&e<=u.to))return Z3(t,e,n,a,u,c,r)}}return e8(t,e,n,o,l.type,s,r)}function Z3(t,e,n,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},c=0,u=l==null?void 0:l.cursor();if(u&&(n<0?u.childBefore(i.from):u.childAfter(i.to)))do if(n<0?u.to<=i.from:u.from>=i.to){if(c==0&&r.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=r;){let h=u.value;n<0&&(d+=h.length);let p=e+d*n;for(let m=n>0?0:h.length-1,y=n>0?h.length:-1;m!=y;m+=n){let g=o.indexOf(h[m]);if(!(g<0||i.resolveInner(p+m,1).type!=s))if(g%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:p+m,to:p+m+1},matched:g>>1==a>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}const t8=Object.create(null),tv=[Tn.none],nv=[],iv=Object.create(null),n8=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])n8[t]=i8(t8,e);function Ud(t,e){nv.indexOf(t)>-1||(nv.push(t),console.warn(e))}function i8(t,e){let n=[];for(let l of e.split(" ")){let a=[];for(let c of l.split(".")){let u=t[c]||ne[c];u?typeof u=="function"?a.length?a=a.map(u):Ud(c,`Modifier ${c} used at start of tag`):a.length?Ud(c,`Tag ${c} used as modifier`):a=Array.isArray(u)?u:[u]:Ud(c,`Unknown highlighting tag ${c}`)}for(let c of a)n.push(c)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+n.map(l=>l.id),r=iv[s];if(r)return r.id;let o=iv[s]=Tn.define({id:tv.length,name:i,props:[yg({[i]:n})]});return tv.push(o),o.id}gt.RTL,gt.LTR;const s8=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=kg(t.state,n.from);return i.line?r8(t):i.block?l8(t):!1};function Sg(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let s=t(e,n);return s?(i(n.update(s)),!0):!1}}const r8=Sg(u8,0),o8=Sg(iC,0),l8=Sg((t,e)=>iC(t,e,c8(e)),0);function kg(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const ll=50;function a8(t,{open:e,close:n},i,s){let r=t.sliceDoc(i-ll,i),o=t.sliceDoc(s,s+ll),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(o)[0].length,c=r.length-l;if(r.slice(c-e.length,c)==e&&o.slice(a,a+n.length)==n)return{open:{pos:i-l,margin:l&&1},close:{pos:s+a,margin:a&&1}};let u,f;s-i<=2*ll?u=f=t.sliceDoc(i,s):(u=t.sliceDoc(i,i+ll),f=t.sliceDoc(s-ll,s));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,p=f.length-h-n.length;return u.slice(d,d+e.length)==e&&f.slice(p,p+n.length)==n?{open:{pos:i+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:s-h-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function c8(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),s=n.to<=i.to?i:t.doc.lineAt(n.to);s.from>i.from&&s.from==n.to&&(s=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function iC(t,e,n=e.selection.ranges){let i=n.map(r=>kg(e,r.from).block);if(!i.every(r=>r))return null;let s=n.map((r,o)=>a8(e,i[o],r.from,r.to));if(t!=2&&!s.every(r=>r))return{changes:e.changes(n.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(t!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,p=f.text.slice(d,d+c.length)==c?d:-1;dr.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:c,empty:u,single:f}of i)(f||!u)&&r.push({from:l.from+c,insert:a+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let c=o.from+l,u=c+a.length;o.text[u-o.from]==" "&&u++,r.push({from:c,to:u})}return{changes:r}}return null}const Ip=xs.define(),f8=xs.define(),d8=ge.define(),sC=ge.define({combine(t){return Ui(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,s)=>e(i,s)||n(i,s)})}}),rC=Zt.define({create(){return Di.empty},update(t,e){let n=e.state.facet(sC),i=e.annotation(Ip);if(i){let a=_n.fromTransaction(e,i.selection),c=i.side,u=c==0?t.undone:t.done;return a?u=Nu(u,u.length,n.minDepth,a):u=aC(u,e.startState.selection),new Di(c==0?i.rest:u,c==0?u:i.rest)}let s=e.annotation(f8);if((s=="full"||s=="before")&&(t=t.isolate()),e.annotation(Vt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let r=_n.fromTransaction(e),o=e.annotation(Vt.time),l=e.annotation(Vt.userEvent);return r?t=t.addChanges(r,o,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,l,n.newGroupDelay)),(s=="full"||s=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Di(t.done.map(_n.fromJSON),t.undone.map(_n.fromJSON))}});function h8(t={}){return[rC,sC.of(t),pe.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?oC:e.inputType=="historyRedo"?Lp:null;return i?(e.preventDefault(),i(n)):!1}})]}function jf(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let s=n.field(rC,!1);if(!s)return!1;let r=s.pop(t,n,e);return r?(i(r),!0):!1}}const oC=jf(0,!1),Lp=jf(1,!1),p8=jf(0,!0),m8=jf(1,!0);class _n{constructor(e,n,i,s,r){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new _n(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new _n(e.changes&&It.fromJSON(e.changes),[],e.mapped&&Ni.fromJSON(e.mapped),e.startSelection&&J.fromJSON(e.startSelection),e.selectionsAfter.map(J.fromJSON))}static fromTransaction(e,n){let i=Kn;for(let s of e.startState.facet(d8)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new _n(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,Kn)}static selection(e){return new _n(void 0,Kn,void 0,void 0,e)}}function Nu(t,e,n,i){let s=e+1>n+20?e-n-1:0,r=t.slice(s,e);return r.push(i),r}function g8(t,e){let n=[],i=!1;return t.iterChangedRanges((s,r)=>n.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let a=0;a=c&&o<=u&&(i=!0)}}),i}function y8(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function lC(t,e){return t.length?e.length?t.concat(e):t:e}const Kn=[],b8=200;function aC(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-b8));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),Nu(t,t.length-1,1e9,n.setSelAfter(i)))}else return[_n.selection([e])]}function v8(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function jd(t,e){if(!t.length)return t;let n=t.length,i=Kn;for(;n;){let s=w8(t[n-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=t.slice(0,n);return r[n-1]=s,r}else e=s.mapped,n--,i=s.selectionsAfter}return i.length?[_n.selection(i)]:Kn}function w8(t,e,n){let i=lC(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):Kn,n);if(!t.changes)return _n.selection(i);let s=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new _n(s,De.mapEffects(t.effects,e),o,t.startSelection.map(r),i)}const x8=/^(input\.type|delete)($|\.)/;class Di{constructor(e,n,i=0,s=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new Di(this.done,this.undone):this}addChanges(e,n,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||x8.test(i))&&(!l.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):qf(n,e))}function on(t){return t.textDirectionAt(t.state.selection.main.head)==gt.LTR}const uC=t=>cC(t,!on(t)),fC=t=>cC(t,on(t));function dC(t,e){return yi(t,n=>n.empty?t.moveByGroup(n,e):qf(n,e))}const k8=t=>dC(t,!on(t)),O8=t=>dC(t,on(t));function C8(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Kf(t,e,n){let i=Ut(t).resolveInner(e.head),s=n?Ne.closedBy:Ne.openedBy;for(let a=e.head;;){let c=n?i.childAfter(a):i.childBefore(a);if(!c)break;C8(t,c,s)?i=c:a=n?c.to:c.from}let r=i.type.prop(s),o,l;return r&&(o=n?Mi(t,i.from,1):Mi(t,i.to,-1))&&o.matched?l=n?o.end.to:o.end.from:l=n?i.to:i.from,J.cursor(l,n?-1:1)}const _8=t=>yi(t,e=>Kf(t.state,e,!on(t))),A8=t=>yi(t,e=>Kf(t.state,e,on(t)));function hC(t,e){return yi(t,n=>{if(!n.empty)return qf(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const pC=t=>hC(t,!1),mC=t=>hC(t,!0);function gC(t){let e=t.scrollDOM.clientHeighto.empty?t.moveVertically(o,e,n.height):qf(o,e));if(s.eq(i.selection))return!1;let r;if(n.selfScroll){let o=t.coordsAtPos(i.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,c=l.bottom-n.marginBottom;o&&o.top>a&&o.bottomyC(t,!1),Np=t=>yC(t,!0);function lr(t,e,n){let i=t.lineBlockAt(e.head),s=t.moveToLineBoundary(e,n);if(s.head==e.head&&s.head!=(n?i.to:i.from)&&(s=t.moveToLineBoundary(e,n,!1)),!n&&s.head==i.from&&i.length){let r=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=J.cursor(i.from+r))}return s}const E8=t=>yi(t,e=>lr(t,e,!0)),T8=t=>yi(t,e=>lr(t,e,!1)),P8=t=>yi(t,e=>lr(t,e,!on(t))),M8=t=>yi(t,e=>lr(t,e,on(t))),D8=t=>yi(t,e=>J.cursor(t.lineBlockAt(e.head).from,1)),R8=t=>yi(t,e=>J.cursor(t.lineBlockAt(e.head).to,-1));function I8(t,e,n){let i=!1,s=qo(t.selection,r=>{let o=Mi(t,r.head,-1)||Mi(t,r.head,1)||r.head>0&&Mi(t,r.head-1,1)||r.headI8(t,e);function ii(t,e){let n=qo(t.state.selection,i=>{let s=e(i);return J.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(ji(t.state,n)),!0)}function bC(t,e){return ii(t,n=>t.moveByChar(n,e))}const vC=t=>bC(t,!on(t)),wC=t=>bC(t,on(t));function xC(t,e){return ii(t,n=>t.moveByGroup(n,e))}const N8=t=>xC(t,!on(t)),$8=t=>xC(t,on(t)),V8=t=>ii(t,e=>Kf(t.state,e,!on(t))),B8=t=>ii(t,e=>Kf(t.state,e,on(t)));function SC(t,e){return ii(t,n=>t.moveVertically(n,e))}const kC=t=>SC(t,!1),OC=t=>SC(t,!0);function CC(t,e){return ii(t,n=>t.moveVertically(n,e,gC(t).height))}const rv=t=>CC(t,!1),ov=t=>CC(t,!0),F8=t=>ii(t,e=>lr(t,e,!0)),W8=t=>ii(t,e=>lr(t,e,!1)),z8=t=>ii(t,e=>lr(t,e,!on(t))),H8=t=>ii(t,e=>lr(t,e,on(t))),U8=t=>ii(t,e=>J.cursor(t.lineBlockAt(e.head).from)),j8=t=>ii(t,e=>J.cursor(t.lineBlockAt(e.head).to)),lv=({state:t,dispatch:e})=>(e(ji(t,{anchor:0})),!0),av=({state:t,dispatch:e})=>(e(ji(t,{anchor:t.doc.length})),!0),cv=({state:t,dispatch:e})=>(e(ji(t,{anchor:t.selection.main.anchor,head:0})),!0),uv=({state:t,dispatch:e})=>(e(ji(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),q8=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),K8=({state:t,dispatch:e})=>{let n=Gf(t).map(({from:i,to:s})=>J.range(i,Math.min(s+1,t.doc.length)));return e(t.update({selection:J.create(n),userEvent:"select"})),!0},G8=({state:t,dispatch:e})=>{let n=qo(t.selection,i=>{let s=Ut(t),r=s.resolveStack(i.from,1);if(i.empty){let o=s.resolveStack(i.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:l}=o;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&o.next)return J.range(l.to,l.from)}return i});return n.eq(t.selection)?!1:(e(ji(t,n)),!0)},Y8=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=J.create([n.main]):n.main.empty||(i=J.create([J.cursor(n.main.head)])),i?(e(ji(t,i)),!0):!1};function Da(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let a=e(r);ao&&(n="delete.forward",a=Oc(t,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=Oc(t,o,!1),l=Oc(t,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:J.cursor(o,os(t)))i.between(e,e,(s,r)=>{se&&(e=n?r:s)});return e}const _C=(t,e,n)=>Da(t,i=>{let s=i.from,{state:r}=t,o=r.doc.lineAt(s),l,a;if(n&&!e&&s>o.from&&s_C(t,!1,!0),AC=t=>_C(t,!0,!1),EC=(t,e)=>Da(t,n=>{let i=n.head,{state:s}=t,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==n.head&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let a=Jt(r.text,i-r.from,e)+r.from,c=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),u=o(c);if(l!=null&&u!=l)break;(c!=" "||i!=n.head)&&(l=u),i=a}return i}),TC=t=>EC(t,!1),X8=t=>EC(t,!0),J8=t=>Da(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headDa(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Z8=t=>Da(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Ye.of(["",""])},range:J.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},tW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let s=i.from,r=t.doc.lineAt(s),o=s==r.from?s-1:Jt(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:Jt(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:t.doc.slice(s,l).append(t.doc.slice(o,s))},range:J.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Gf(t){let e=[],n=-1;for(let i of t.selection.ranges){let s=t.doc.lineAt(i.from),r=t.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=t.doc.lineAt(i.to-1)),n>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});n=r.number+1}return e}function PC(t,e,n){if(t.readOnly)return!1;let i=[],s=[];for(let r of Gf(t)){if(n?r.to==t.doc.length:r.from==0)continue;let o=t.doc.lineAt(n?r.to+1:r.from-1),l=o.length+1;if(n){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+t.lineBreak});for(let a of r.ranges)s.push(J.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:t.lineBreak+o.text});for(let a of r.ranges)s.push(J.range(a.anchor-l,a.head-l))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:J.create(s,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const nW=({state:t,dispatch:e})=>PC(t,e,!1),iW=({state:t,dispatch:e})=>PC(t,e,!0);function MC(t,e,n){if(t.readOnly)return!1;let i=[];for(let s of Gf(t))n?i.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):i.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const sW=({state:t,dispatch:e})=>MC(t,e,!1),rW=({state:t,dispatch:e})=>MC(t,e,!0),oW=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Gf(e).map(({from:s,to:r})=>(s>0?s--:r{let r;if(t.lineWrapping){let o=t.lineBlockAt(s.head),l=t.coordsAtPos(s.head,s.assoc||1);l&&(r=o.bottom+t.documentTop-l.bottom+t.defaultLineHeight/2)}return t.moveVertically(s,!0,r)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function lW(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Ut(t).resolveInner(e),i=n.childBefore(e),s=n.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(Ne.closedBy))&&r.indexOf(s.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(s.from).from&&!/\S/.test(t.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}const fv=DC(!1),aW=DC(!0);function DC(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),a=!t&&r==o&&lW(e,r);t&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let c=new zf(e,{simulateBreak:r,simulateDoubleBreak:!!a}),u=bg(c,r);for(u==null&&(u=jo(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=t.doc.lineAt(o);l.number>n&&(i.empty||i.to>l.from)&&(e(l,s,i),n=l.number),o=l.to+1}let r=t.changes(s);return{changes:s,range:J.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const cW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new zf(t,{overrideIndentation:r=>{let o=n[r];return o??-1}}),s=Og(t,(r,o,l)=>{let a=bg(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let c=/^\s*/.exec(r.text)[0],u=oa(t,a);(c!=u||l.fromt.readOnly?!1:(e(t.update(Og(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Wf)})}),{userEvent:"input.indent"})),!0),IC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Og(t,(n,i)=>{let s=/^\s*/.exec(n.text)[0];if(!s)return;let r=jo(s,t.tabSize),o=0,l=oa(t,Math.max(0,r-Ru(t)));for(;o(t.setTabFocusMode(),!0),fW=[{key:"Ctrl-b",run:uC,shift:vC,preventDefault:!0},{key:"Ctrl-f",run:fC,shift:wC},{key:"Ctrl-p",run:pC,shift:kC},{key:"Ctrl-n",run:mC,shift:OC},{key:"Ctrl-a",run:D8,shift:U8},{key:"Ctrl-e",run:R8,shift:j8},{key:"Ctrl-d",run:AC},{key:"Ctrl-h",run:$p},{key:"Ctrl-k",run:J8},{key:"Ctrl-Alt-h",run:TC},{key:"Ctrl-o",run:eW},{key:"Ctrl-t",run:tW},{key:"Ctrl-v",run:Np}],dW=[{key:"ArrowLeft",run:uC,shift:vC,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:k8,shift:N8,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:P8,shift:z8,preventDefault:!0},{key:"ArrowRight",run:fC,shift:wC,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:O8,shift:$8,preventDefault:!0},{mac:"Cmd-ArrowRight",run:M8,shift:H8,preventDefault:!0},{key:"ArrowUp",run:pC,shift:kC,preventDefault:!0},{mac:"Cmd-ArrowUp",run:lv,shift:cv},{mac:"Ctrl-ArrowUp",run:sv,shift:rv},{key:"ArrowDown",run:mC,shift:OC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:av,shift:uv},{mac:"Ctrl-ArrowDown",run:Np,shift:ov},{key:"PageUp",run:sv,shift:rv},{key:"PageDown",run:Np,shift:ov},{key:"Home",run:T8,shift:W8,preventDefault:!0},{key:"Mod-Home",run:lv,shift:cv},{key:"End",run:E8,shift:F8,preventDefault:!0},{key:"Mod-End",run:av,shift:uv},{key:"Enter",run:fv,shift:fv},{key:"Mod-a",run:q8},{key:"Backspace",run:$p,shift:$p},{key:"Delete",run:AC},{key:"Mod-Backspace",mac:"Alt-Backspace",run:TC},{key:"Mod-Delete",mac:"Alt-Delete",run:X8},{mac:"Mod-Backspace",run:Q8},{mac:"Mod-Delete",run:Z8}].concat(fW.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),hW=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:_8,shift:V8},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:A8,shift:B8},{key:"Alt-ArrowUp",run:nW},{key:"Shift-Alt-ArrowUp",run:sW},{key:"Alt-ArrowDown",run:iW},{key:"Shift-Alt-ArrowDown",run:rW},{key:"Escape",run:Y8},{key:"Mod-Enter",run:aW},{key:"Alt-l",mac:"Ctrl-l",run:K8},{key:"Mod-i",run:G8,preventDefault:!0},{key:"Mod-[",run:IC},{key:"Mod-]",run:RC},{key:"Mod-Alt-\\",run:cW},{key:"Shift-Mod-k",run:oW},{key:"Shift-Mod-\\",run:L8},{key:"Mod-/",run:s8},{key:"Alt-A",run:o8},{key:"Ctrl-m",mac:"Shift-Alt-m",run:uW}].concat(dW),pW={key:"Tab",run:RC,shift:IC},dv=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class No{constructor(e,n,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(dv(l)):dv,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return xn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Jm(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Ei(e);let s=this.normalize(n);if(s.length)for(let r=0,o=i;;r++){let l=s.charCodeAt(r),a=this.match(l,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(a)return this.value=a,this;break}o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,s=i+n[0].length;if(this.matchPos=$u(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,n)))return this.value={from:i,to:s,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=n){let l=new bo(n,e.sliceString(n,i));return qd.set(e,l),l}if(s.from==n&&s.to==i)return s;let{text:r,from:o}=s;return o>n&&(r=e.sliceString(n,o)+r,o=n),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,s=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,n)))return this.value={from:i,to:s,match:n},this.matchPos=$u(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=bo.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(NC.prototype[Symbol.iterator]=$C.prototype[Symbol.iterator]=function(){return this});function mW(t){try{return new RegExp(t,Cg),!0}catch{return!1}}function $u(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function Vp(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=lt("input",{class:"cm-textfield",name:"line",value:e}),i=lt("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),t.dispatch({effects:Pl.of(!1)}),t.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},lt("label",t.state.phrase("Go to line"),": ",n)," ",lt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),lt("button",{name:"close",onclick:()=>{t.dispatch({effects:Pl.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!r)return;let{state:o}=t,l=o.doc.lineAt(o.selection.main.head),[,a,c,u,f]=r,d=u?+u.slice(1):0,h=c?+c:l.number;if(c&&f){let y=h/100;a&&(y=y*(a=="-"?-1:1)+l.number/o.doc.lines),h=Math.round(o.doc.lines*y)}else c&&a&&(h=h*(a=="-"?-1:1)+l.number);let p=o.doc.line(Math.max(1,Math.min(o.doc.lines,h))),m=J.cursor(p.from+Math.max(0,Math.min(d,p.length)));t.dispatch({effects:[Pl.of(!1),pe.scrollIntoView(m.from,{y:"center"})],selection:m}),t.focus()}return{dom:i}}const Pl=De.define(),hv=Zt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Pl)&&(t=n.value);return t},provide:t=>ia.from(t,e=>e?Vp:null)}),gW=t=>{let e=na(t,Vp);if(!e){let n=[Pl.of(!0)];t.state.field(hv,!1)==null&&n.push(De.appendConfig.of([hv,yW])),t.dispatch({effects:n}),e=na(t,Vp)}return e&&e.dom.querySelector("input").select(),!0},yW=pe.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),bW={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},vW=ge.define({combine(t){return Ui(t,bW,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function wW(t){return[CW,OW]}const xW=Ce.mark({class:"cm-selectionMatch"}),SW=Ce.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function pv(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=bt.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=bt.Word)}function kW(t,e,n,i){return t(e.sliceDoc(n,n+1))==bt.Word&&t(e.sliceDoc(i-1,i))==bt.Word}const OW=_t.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(vW),{state:n}=t,i=n.selection;if(i.ranges.length>1)return Ce.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return Ce.none;let a=n.wordAt(s.head);if(!a)return Ce.none;o=n.charCategorizer(s.head),r=n.sliceDoc(a.from,a.to)}else{let a=s.to-s.from;if(a200)return Ce.none;if(e.wholeWords){if(r=n.sliceDoc(s.from,s.to),o=n.charCategorizer(s.head),!(pv(o,n,s.from,s.to)&&kW(o,n,s.from,s.to)))return Ce.none}else if(r=n.sliceDoc(s.from,s.to),!r)return Ce.none}let l=[];for(let a of t.visibleRanges){let c=new No(n.doc,r,a.from,a.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!o||pv(o,n,u,f))&&(s.empty&&u<=s.from&&f>=s.to?l.push(SW.range(u,f)):(u>=s.to||f<=s.from)&&l.push(xW.range(u,f)),l.length>e.maxMatches))return Ce.none}}return Ce.set(l)}},{decorations:t=>t.decorations}),CW=pe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),_W=({state:t,dispatch:e})=>{let{selection:n}=t,i=J.create(n.ranges.map(s=>t.wordAt(s.head)||J.cursor(s.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function AW(t,e){let{main:n,ranges:i}=t.selection,s=t.wordAt(n.head),r=s&&s.from==n.from&&s.to==n.to;for(let o=!1,l=new No(t.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new No(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(r){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const EW=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(r=>r.from===r.to))return _W({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(r=>t.sliceDoc(r.from,r.to)!=i))return!1;let s=AW(t,i);return s?(e(t.update({selection:t.selection.addRange(J.range(s.from,s.to),!1),effects:pe.scrollIntoView(s.to)})),!0):!1},Ko=ge.define({combine(t){return Ui(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new FW(e),scrollToMatch:e=>pe.scrollIntoView(e)})}});class VC{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||mW(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new DW(this):new PW(this)}getCursor(e,n=0,i){let s=e.doc?e:Be.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Qr(this,s,n,i):Jr(this,s,n,i)}}class BC{constructor(e){this.spec=e}}function Jr(t,e,n,i){return new No(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:s=>s.toLowerCase(),t.wholeWord?TW(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function TW(t,e){return(n,i,s,r)=>((r>n||r+s.length=n)return null;s.push(i.value)}return s}highlight(e,n,i,s){let r=Jr(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Qr(t,e,n,i){return new NC(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?MW(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function Vu(t,e){return t.slice(Jt(t,e,!1),e)}function Bu(t,e){return t.slice(e,Jt(t,e))}function MW(t){return(e,n,i)=>!i[0].length||(t(Vu(i.input,i.index))!=bt.Word||t(Bu(i.input,i.index))!=bt.Word)&&(t(Bu(i.input,i.index+i[0].length))!=bt.Word||t(Vu(i.input,i.index+i[0].length))!=bt.Word)}class DW extends BC{nextMatch(e,n,i){let s=Qr(this.spec,e,i,e.doc.length).next();return s.done&&(s=Qr(this.spec,e,0,n).next()),s.done?null:s.value}prevMatchInRange(e,n,i){for(let s=1;;s++){let r=Math.max(n,i-s*1e4),o=Qr(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==n||l.from>r+10))return l;if(r==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let s=i.length;s>0;s--){let r=+i.slice(0,s);if(r>0&&r=n)return null;s.push(i.value)}return s}highlight(e,n,i,s){let r=Qr(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const la=De.define(),_g=De.define(),js=Zt.define({create(t){return new Kd(Bp(t).create(),null)},update(t,e){for(let n of e.effects)n.is(la)?t=new Kd(n.value.create(),t.panel):n.is(_g)&&(t=new Kd(t.query,n.value?Ag:null));return t},provide:t=>ia.from(t,e=>e.panel)});class Kd{constructor(e,n){this.query=e,this.panel=n}}const RW=Ce.mark({class:"cm-searchMatch"}),IW=Ce.mark({class:"cm-searchMatch cm-searchMatch-selected"}),LW=_t.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(js))}update(t){let e=t.state.field(js);(e!=t.startState.field(js)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ce.none;let{view:n}=this,i=new gs;for(let s=0,r=n.visibleRanges,o=r.length;sr[s+1].from-2*250;)a=r[++s].to;t.highlight(n.state,l,a,(c,u)=>{let f=n.state.selection.ranges.some(d=>d.from==c&&d.to==u);i.add(c,u,f?IW:RW)})}return i.finish()}},{decorations:t=>t.decorations});function Ra(t){return e=>{let n=e.state.field(js,!1);return n&&n.query.spec.valid?t(e,n):zC(e)}}const Fu=Ra((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let s=J.single(i.from,i.to),r=t.state.facet(Ko);return t.dispatch({selection:s,effects:[Eg(t,i),r.scrollToMatch(s.main,t)],userEvent:"select.search"}),WC(t),!0}),Wu=Ra((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,s=e.prevMatch(n,i,i);if(!s)return!1;let r=J.single(s.from,s.to),o=t.state.facet(Ko);return t.dispatch({selection:r,effects:[Eg(t,s),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),WC(t),!0}),NW=Ra((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:J.create(n.map(i=>J.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),$W=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:s}=n.main,r=[],o=0;for(let l=new No(t.doc,t.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(J.range(l.value.from,l.value.to))}return e(t.update({selection:J.create(r,o),userEvent:"select.search.matches"})),!0},mv=Ra((t,{query:e})=>{let{state:n}=t,{from:i,to:s}=n.selection.main;if(n.readOnly)return!1;let r=e.nextMatch(n,i,i);if(!r)return!1;let o=r,l=[],a,c,u=[];o.from==i&&o.to==s&&(c=n.toText(e.getReplacement(o)),l.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(n,o.from,o.to),u.push(pe.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+".")));let f=t.state.changes(l);return o&&(a=J.single(o.from,o.to).map(f),u.push(Eg(t,o)),u.push(n.facet(Ko).scrollToMatch(a.main,t))),t.dispatch({changes:f,selection:a,effects:u,userEvent:"input.replace"}),!0}),VW=Ra((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:pe.announce.of(i),userEvent:"input.replace.all"}),!0});function Ag(t){return t.state.facet(Ko).createPanel(t)}function Bp(t,e){var n,i,s,r,o;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let c=t.facet(Ko);return new VC({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:c.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:c.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:c.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function FC(t){let e=na(t,Ag);return e&&e.dom.querySelector("[main-field]")}function WC(t){let e=FC(t);e&&e==t.root.activeElement&&e.select()}const zC=t=>{let e=t.state.field(js,!1);if(e&&e.panel){let n=FC(t);if(n&&n!=t.root.activeElement){let i=Bp(t.state,e.query.spec);i.valid&&t.dispatch({effects:la.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[_g.of(!0),e?la.of(Bp(t.state,e.query.spec)):De.appendConfig.of(zW)]});return!0},HC=t=>{let e=t.state.field(js,!1);if(!e||!e.panel)return!1;let n=na(t,Ag);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:_g.of(!1)}),!0},BW=[{key:"Mod-f",run:zC,scope:"editor search-panel"},{key:"F3",run:Fu,shift:Wu,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Fu,shift:Wu,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:HC,scope:"editor search-panel"},{key:"Mod-Shift-l",run:$W},{key:"Mod-Alt-g",run:gW},{key:"Mod-d",run:EW,preventDefault:!0}];class FW{constructor(e){this.view=e;let n=this.query=e.state.field(js).query.spec;this.commit=this.commit.bind(this),this.searchField=lt("input",{value:n.search,placeholder:Dn(e,"Find"),"aria-label":Dn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=lt("input",{value:n.replace,placeholder:Dn(e,"Replace"),"aria-label":Dn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=lt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=lt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=lt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(s,r,o){return lt("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=lt("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>Fu(e),[Dn(e,"next")]),i("prev",()=>Wu(e),[Dn(e,"previous")]),i("select",()=>NW(e),[Dn(e,"all")]),lt("label",null,[this.caseField,Dn(e,"match case")]),lt("label",null,[this.reField,Dn(e,"regexp")]),lt("label",null,[this.wordField,Dn(e,"by word")]),...e.state.readOnly?[]:[lt("br"),this.replaceField,i("replace",()=>mv(e),[Dn(e,"replace")]),i("replaceAll",()=>VW(e),[Dn(e,"replace all")])],lt("button",{name:"close",onclick:()=>HC(e),"aria-label":Dn(e,"close"),type:"button"},["×"])])}commit(){let e=new VC({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:la.of(e)}))}keydown(e){YB(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Wu:Fu)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),mv(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(la)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ko).top}}function Dn(t,e){return t.state.phrase(e)}const Cc=30,_c=/[\s\.,:;?!]/;function Eg(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),s=t.state.doc.lineAt(n).to,r=Math.max(i.from,e-Cc),o=Math.min(s,n+Cc),l=t.state.sliceDoc(r,o);if(r!=i.from){for(let a=0;al.length-Cc;a--)if(!_c.test(l[a-1])&&_c.test(l[a])){l=l.slice(0,a);break}}return pe.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${i.number}.`)}const WW=pe.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),zW=[js,Fr.low(LW),WW];class UC{constructor(e,n,i,s){this.state=e,this.pos=n,this.explicit=i,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Ut(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),s=n.text.slice(i-n.from,this.pos-n.from),r=s.search(jC(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function gv(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function HW(t){let e=Object.create(null),n=Object.create(null);for(let{label:s}of t){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[n,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:HW(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:n}:null}}class yv{constructor(e,n,i,s){this.completion=e,this.source=n,this.match=i,this.score=s}}function Or(t){return t.selection.main.from}function jC(t,e){var n;let{source:i}=t,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?t:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const qC=xs.define();function jW(t,e,n,i){let{main:s}=t.selection,r=n-s.from,o=i-s.from;return Object.assign(Object.assign({},t.changeByRange(l=>{if(l!=s&&n!=i&&t.sliceDoc(l.from+r,l.from+o)!=t.sliceDoc(n,i))return{range:l};let a=t.toText(e);return{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:a},range:J.cursor(l.from+r+a.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const bv=new WeakMap;function qW(t){if(!Array.isArray(t))return t;let e=bv.get(t);return e||bv.set(t,e=UW(t)),e}const zu=De.define(),aa=De.define();class KW{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(k=Jm(S))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!x||O==1&&y||w==0&&O!=0)&&(n[f]==S||i[f]==S&&(d=!0)?o[f++]=x:o.length&&(g=!1)),w=O,x+=Ei(S)}return f==a&&o[0]==0&&g?this.result(-100+(d?-200:0),o,e):h==a&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):h==a?this.ret(-900-e.length,[p,m]):f==a?this.result(-100+(d?-200:0)+-700+(g?0:-1100),o,e):n.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,n,i){let s=[],r=0;for(let o of n){let l=o+(this.astral?Ei(xn(i,o)):1);r&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return this.ret(e-i.length,s)}}class GW{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:YW,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>vv(e(i),n(i)),optionClass:(e,n)=>i=>vv(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function vv(t,e){return t?e?t+" "+e:t:e}function YW(t,e,n,i,s,r){let o=t.textDirection==gt.RTL,l=o,a=!1,c="top",u,f,d=e.left-s.left,h=s.right-e.right,p=i.right-i.left,m=i.bottom-i.top;if(l&&d=m||x>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let y=(e.bottom-e.top)/r.offsetHeight,g=(e.right-e.left)/r.offsetWidth;return{style:`${c}: ${u/y}px; max-width: ${f/g}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function XW(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let l=n.displayLabel||n.label,a=0;for(let c=0;ca&&o.appendChild(document.createTextNode(l.slice(a,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(l.slice(u,f))),d.className="cm-completionMatchedText",a=f}return an.position-i.position).map(n=>n.render)}function Gd(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let s=Math.floor(e/n);return{from:s*n,to:(s+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class JW{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let s=e.state.field(n),{options:r,selected:o}=s.open,l=e.state.facet(Ht);this.optionContent=XW(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=Gd(r.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:c}=e.state.field(n).open;for(let u=a.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Ht).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:aa.of(null)})}),this.showOptions(r,s.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=s){let{options:r,selected:o,disabled:l}=i.open;(!s.open||s.open.options!=r)&&(this.range=Gd(r.length,o,e.state.facet(Ht).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),l!=((n=s.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Gd(n.options.length,n.selected,this.view.state.facet(Ht).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Cn(this.view.state,o,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;i.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&ZW(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return s.top>Math.min(r.bottom,n.bottom)-10||s.bottom{o.target==s&&o.preventDefault()});let r=null;for(let o=i.from;oi.from||i.from==0))if(r=d,typeof c!="string"&&c.header)s.appendChild(c.header(c));else{let h=s.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=s.appendChild(document.createElement("li"));u.id=n+"-"+o,u.setAttribute("role","option");let f=this.optionClass(l);f&&(u.className=f);for(let d of this.optionContent){let h=d(l,this.view.state,this.view,a);h&&u.appendChild(h)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew JW(n,t,e)}function ZW(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),s=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/s)}function wv(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function ez(t,e){let n=[],i=null,s=c=>{n.push(c);let{section:u}=c.completion;if(u){i||(i=[]);let f=typeof u=="string"?u:u.name;i.some(d=>d.name==f)||i.push(typeof u=="string"?{name:f}:u)}},r=e.facet(Ht);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let f of c.result.options)s(new yv(f,c.source,u?u(f):[],1e9-n.length));else{let f=e.sliceDoc(c.from,c.to),d,h=r.filterStrict?new GW(f):new KW(f);for(let p of c.result.options)if(d=h.match(p.label)){let m=p.displayLabel?u?u(p,d.matched):[]:d.matched;s(new yv(p,c.source,m,d.score+(p.boost||0)))}}}if(i){let c=Object.create(null),u=0,f=(d,h)=>{var p,m;return((p=d.rank)!==null&&p!==void 0?p:1e9)-((m=h.rank)!==null&&m!==void 0?m:1e9)||(d.namef.score-u.score||a(u.completion,f.completion))){let u=c.completion;!l||l.label!=u.label||l.detail!=u.detail||l.type!=null&&u.type!=null&&l.type!=u.type||l.apply!=u.apply||l.boost!=u.boost?o.push(c):wv(c.completion)>wv(l)&&(o[o.length-1]=c),l=c.completion}return o}class ro{constructor(e,n,i,s,r,o){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new ro(this.options,xv(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,s,r,o){if(s&&!o&&e.some(c=>c.isPending))return s.setDisabled();let l=ez(e,n);if(!l.length)return s&&e.some(c=>c.isPending)?s.setDisabled():null;let a=n.facet(Ht).selectOnOpen?0:-1;if(s&&s.selected!=a&&s.selected!=-1){let c=s.options[s.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:oz,above:r.aboveCursor},s?s.timestamp:Date.now(),a,!1)}map(e){return new ro(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new ro(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Hu{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new Hu(sz,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Ht),r=(i.override||n.languageDataAt("autocomplete",Or(n)).map(qW)).map(a=>(this.active.find(u=>u.source==a)||new Gn(a,this.active.some(u=>u.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((a,c)=>a==this.active[c])&&(r=this.active);let o=this.open,l=e.effects.some(a=>a.is(Tg));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!tz(r,this.active)||l?o=ro.build(r,n,this.id,o,i,l):o&&o.disabled&&!r.some(a=>a.isPending)&&(o=null),!o&&r.every(a=>!a.isPending)&&r.some(a=>a.hasResult())&&(r=r.map(a=>a.hasResult()?new Gn(a.source,0):a));for(let a of e.effects)a.is(GC)&&(o=o&&o.setSelected(a.value,this.id));return r==this.active&&o==this.open?this:new Hu(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?nz:iz}}function tz(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const sz=[];function KC(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(qC);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Gn{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=KC(e,n),s=this;(i&8||i&16&&this.touches(e))&&(s=new Gn(s.source,0)),i&4&&s.state==0&&(s=new Gn(this.source,1)),s=s.updateFor(e,i);for(let r of e.effects)if(r.is(zu))s=new Gn(s.source,1,r.value);else if(r.is(aa))s=new Gn(s.source,0);else if(r.is(Tg))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Or(e.state))}}class vo extends Gn{constructor(e,n,i,s,r,o){super(e,3,n),this.limit=i,this.result=s,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Or(e.state);if(l>o||!s||n&2&&(Or(e.startState)==this.from||ln.map(e))}}),GC=De.define(),kn=Zt.define({create(){return Hu.start()},update(t,e){return t.update(e)},provide:t=>[dg.from(t,e=>e.tooltip),pe.contentAttributes.from(t,e=>e.attrs)]});function Pg(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(kn).active.find(s=>s.source==e.source);return i instanceof vo?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},jW(t.state,n,i.from,i.to)),{annotations:qC.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const oz=QW(kn,Pg);function Ac(t,e="option"){return n=>{let i=n.state.field(kn,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(t?1:-1):t?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),n.dispatch({effects:GC.of(l)}),!0}}const lz=t=>{let e=t.state.field(kn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(kn,!1)?(t.dispatch({effects:zu.of(!0)}),!0):!1,az=t=>{let e=t.state.field(kn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:aa.of(null)}),!0)};class cz{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const uz=50,fz=1e3,dz=_t.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(kn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(kn),n=t.state.facet(Ht);if(!t.selectionSet&&!t.docChanged&&t.startState.field(kn)==e)return;let i=t.transactions.some(r=>{let o=KC(r,n);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;ruz&&Date.now()-o.time>fz){for(let l of o.context.abortListeners)try{l()}catch(a){Cn(this.view.state,a)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(r=>r.effects.some(o=>o.is(zu)))&&(this.pendingStart=!0);let s=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.isPending&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of t.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(kn);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ht).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Or(e),i=new UC(e,n,t.explicit,this.view),s=new cz(t,i);this.running.push(s),Promise.resolve(t.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:aa.of(null)}),Cn(this.view.state,r)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ht).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Ht),i=this.view.state.field(kn);for(let s=0;sl.source==r.active.source);if(o&&o.isPending)if(r.done==null){let l=new Gn(r.active.source,0);for(let a of r.updates)l=l.update(a,n);l.isPending||e.push(l)}else this.startQuery(o)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:Tg.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(kn,!1);if(e&&e.tooltip&&this.view.state.facet(Ht).closeOnBlur){let n=e.open&&MO(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:aa.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:zu.of(!1)}),20),this.composing=0}}}),hz=typeof navigator=="object"&&/Win/.test(navigator.platform),pz=Fr.highest(pe.domEventHandlers({keydown(t,e){let n=e.state.field(kn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(hz&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],s=n.active.find(o=>o.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(t.key)>-1&&Pg(e,i),!1}})),mz=pe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),ca={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},vr=De.define({map(t,e){let n=e.mapPos(t,-1,hn.TrackAfter);return n??void 0}}),Mg=new class extends Tr{};Mg.startSide=1;Mg.endSide=-1;const YC=Zt.define({create(){return Ge.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(vr)&&(t=t.update({add:[Mg.range(n.value,n.value+1)]}));return t}});function gz(){return[bz,YC]}const Yd="()[]{}<>«»»«[]{}";function XC(t){for(let e=0;e{if((yz?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let s=t.state.selection.main;if(i.length>2||i.length==2&&Ei(xn(i,0))==1||e!=s.from||n!=s.to)return!1;let r=xz(t.state,i);return r?(t.dispatch(r),!0):!1}),vz=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=JC(t,t.selection.main.head).brackets||ca.brackets,s=null,r=t.changeByRange(o=>{if(o.empty){let l=Sz(t.doc,o.head);for(let a of i)if(a==l&&Yf(t.doc,o.head)==XC(xn(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:J.cursor(o.head-a.length)}}return{range:s=o}});return s||e(t.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},wz=[{key:"Backspace",run:vz}];function xz(t,e){let n=JC(t,t.selection.main.head),i=n.brackets||ca.brackets;for(let s of i){let r=XC(xn(s,0));if(e==s)return r==s?Cz(t,s,i.indexOf(s+s+s)>-1,n):kz(t,s,r,n.before||ca.before);if(e==r&&QC(t,t.selection.main.from))return Oz(t,s,r)}return null}function QC(t,e){let n=!1;return t.field(YC).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function Yf(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Ei(xn(n,0)))}function Sz(t,e){let n=t.sliceString(e-2,e);return Ei(xn(n,0))==n.length?n:n.slice(1)}function kz(t,e,n,i){let s=null,r=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:vr.of(o.to+e.length),range:J.range(o.anchor+e.length,o.head+e.length)};let l=Yf(t.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+n,from:o.head},effects:vr.of(o.head+e.length),range:J.cursor(o.head+e.length)}:{range:s=o}});return s?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Oz(t,e,n){let i=null,s=t.changeByRange(r=>r.empty&&Yf(t.doc,r.head)==n?{changes:{from:r.head,to:r.head+n.length,insert:n},range:J.cursor(r.head+n.length)}:i={range:r});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Cz(t,e,n,i){let s=i.stringPrefixes||ca.stringPrefixes,r=null,o=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:vr.of(l.to+e.length),range:J.range(l.anchor+e.length,l.head+e.length)};let a=l.head,c=Yf(t.doc,a),u;if(c==e){if(kv(t,a))return{changes:{insert:e+e,from:a},effects:vr.of(a+e.length),range:J.cursor(a+e.length)};if(QC(t,a)){let d=n&&t.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+d.length,insert:d},range:J.cursor(a+d.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(u=Ov(t,a-2*e.length,s))>-1&&kv(t,u))return{changes:{insert:e+e+e+e,from:a},effects:vr.of(a+e.length),range:J.cursor(a+e.length)};if(t.charCategorizer(a)(c)!=bt.Word&&Ov(t,a,s)>-1&&!_z(t,a,e,s))return{changes:{insert:e+e,from:a},effects:vr.of(a+e.length),range:J.cursor(a+e.length)}}return{range:r=l}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function kv(t,e){let n=Ut(t).resolveInner(e+1);return n.parent&&n.from==e}function _z(t,e,n,i){let s=Ut(t).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=t.sliceDoc(s.from,Math.min(s.to,s.from+n.length+r)),a=l.indexOf(n);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let u=s.firstChild;for(;u&&u.from==s.from&&u.to-u.from>n.length+a;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=s.to==e&&s.parent;if(!c)break;s=c}return!1}function Ov(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=bt.Word)return e;for(let s of n){let r=e-s.length;if(t.sliceDoc(r,e)==s&&i(t.sliceDoc(r-1,r))!=bt.Word)return r}return-1}function Az(t={}){return[pz,kn,Ht.of(t),dz,Ez,mz]}const ZC=[{key:"Ctrl-Space",run:Sv},{mac:"Alt-`",run:Sv},{key:"Escape",run:az},{key:"ArrowDown",run:Ac(!0)},{key:"ArrowUp",run:Ac(!1)},{key:"PageDown",run:Ac(!0,"page")},{key:"PageUp",run:Ac(!1,"page")},{key:"Enter",run:lz}],Ez=Fr.highest(Bf.computeN([Ht],t=>t.facet(Ht).defaultKeymap?[ZC]:[]));class Cv{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class pr{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let s=i.facet(ua).markerFilter;s&&(e=s(e,i));let r=e.slice().sort((u,f)=>u.from-f.from||u.to-f.to),o=new gs,l=[],a=0;for(let u=0;;){let f=u==r.length?null:r[u];if(!f&&!l.length)break;let d,h;for(l.length?(d=a,h=l.reduce((m,y)=>Math.min(m,y.to),f&&f.from>d?f.from:1e8)):(d=f.from,h=f.to,l.push(f),u++);um.from||m.to==d))l.push(m),u++,h=Math.min(m.to,h);else{h=Math.min(m.from,h);break}}let p=Wz(l);if(l.some(m=>m.from==m.to||m.from==m.to-1&&i.doc.lineAt(m.from).to==m.from))o.add(d,d,Ce.widget({widget:new $z(p),diagnostics:l.slice()}));else{let m=l.reduce((y,g)=>g.markClass?y+" "+g.markClass:y,"");o.add(d,h,Ce.mark({class:"cm-lintRange cm-lintRange-"+p+m,diagnostics:l.slice(),inclusiveEnd:l.some(y=>y.to>h)}))}a=h;for(let m=0;m{if(!(e&&o.diagnostics.indexOf(e)<0))if(!i)i=new Cv(s,r,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new Cv(i.from,r,i.diagnostic)}}),i}function Tz(t,e){let n=e.pos,i=e.end||n,s=t.state.facet(ua).hideOn(t,n,i);if(s!=null)return s;let r=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(e_))||t.changes.touchesRange(r.from,Math.max(r.to,i)))}function Pz(t,e){return t.field($n,!1)?e:e.concat(De.appendConfig.of(zz))}const e_=De.define(),Dg=De.define(),t_=De.define(),$n=Zt.define({create(){return new pr(Ce.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,s=t.panel;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=$o(n,t.selected.diagnostic,r)||$o(n,null,r)}!n.size&&s&&e.state.facet(ua).autoPanel&&(s=null),t=new pr(n,s,i)}for(let n of e.effects)if(n.is(e_)){let i=e.state.facet(ua).autoPanel?n.value.length?fa.open:null:t.panel;t=pr.init(n.value,i,e.state)}else n.is(Dg)?t=new pr(t.diagnostics,n.value?fa.open:null,t.selected):n.is(t_)&&(t=new pr(t.diagnostics,t.panel,n.value));return t},provide:t=>[ia.from(t,e=>e.panel),pe.decorations.from(t,e=>e.diagnostics)]}),Mz=Ce.mark({class:"cm-lintRange cm-lintRange-active"});function Dz(t,e,n){let{diagnostics:i}=t.state.field($n),s,r=-1,o=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(a,c,{spec:u})=>{if(e>=a&&e<=c&&(a==c||(e>a||n>0)&&(ei_(t,n,!1)))}const Iz=t=>{let e=t.state.field($n,!1);(!e||!e.panel)&&t.dispatch({effects:Pz(t.state,[Dg.of(!0)])});let n=na(t,fa.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},_v=t=>{let e=t.state.field($n,!1);return!e||!e.panel?!1:(t.dispatch({effects:Dg.of(!1)}),!0)},Lz=t=>{let e=t.state.field($n,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},Nz=[{key:"Mod-Shift-m",run:Iz,preventDefault:!0},{key:"F8",run:Lz}],ua=ge.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Ui(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function n_(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;ir.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function i_(t,e,n){var i;let s=n?n_(e.actions):[];return lt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},lt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,o)=>{let l=!1,a=d=>{if(d.preventDefault(),l)return;l=!0;let h=$o(t.state.field($n).diagnostics,e);h&&r.apply(t,h.from,h.to)},{name:c}=r,u=s[o]?c.indexOf(s[o]):-1,f=u<0?c:[c.slice(0,u),lt("u",c.slice(u,u+1)),c.slice(u+1)];return lt("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${c}${u<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&<("div",{class:"cm-diagnosticSource"},e.source))}class $z extends Ss{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return lt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Av{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=i_(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class fa{constructor(e){this.view=e,this.items=[];let n=s=>{if(s.keyCode==27)_v(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=n_(r.actions);for(let l=0;l{for(let r=0;r_v(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field($n).selected;if(!e)return-1;for(let n=0;n{for(let u of c.diagnostics){if(o.has(u))continue;o.add(u);let f=-1,d;for(let h=i;hi&&(this.items.splice(i,f-i),s=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),r=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),i++}});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:a})=>{let c=a.height/this.list.offsetHeight;l.topa.bottom&&(this.list.scrollTop+=(l.bottom-a.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field($n),i=$o(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:t_.of(i)})}static open(e){return new fa(e)}}function Vz(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Ec(t){return Vz(``,'width="6" height="3"')}const Bz=pe.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ec("#d11")},".cm-lintRange-warning":{backgroundImage:Ec("orange")},".cm-lintRange-info":{backgroundImage:Ec("#999")},".cm-lintRange-hint":{backgroundImage:Ec("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function Fz(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Wz(t){let e="hint",n=1;for(let i of t){let s=Fz(i.severity);s>n&&(n=s,e=i.severity)}return e}const zz=[$n,pe.decorations.compute([$n],t=>{let{selected:e,panel:n}=t.field($n);return!e||!n||e.from==e.to?Ce.none:Ce.set([Mz.range(e.from,e.to)])}),$F(Dz,{hideOn:Tz}),Bz],Hz=[GF(),JF(),dF(),h8(),F3(),tF(),oF(),Be.allowMultipleSelections.of(!0),_3(),z3(j3,{fallback:!0}),Q3(),gz(),Az(),_F(),TF(),bF(),wW(),Bf.of([...wz,...hW,...BW,...S8,...N3,...ZC,...Nz])];/*! + */const D2="11.1.9";function L2(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(kr().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(kr().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(kr().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(kr().__INTLIFY_PROD_DEVTOOLS__=!1)}const En={UNEXPECTED_RETURN_TYPE:c2,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Bn(t,...e){return cf(t,null,void 0)}const Rh=pr("__translateVNode"),Xh=pr("__datetimeParts"),Ch=pr("__numberParts"),wP=pr("__setPluralRules"),TP=pr("__injectWithOption"),Vh=pr("__dispose");function bl(t){if(!nt(t)||Ui(t))return t;for(const e in t)if(di(t,e))if(!e.includes("."))nt(t[e])&&bl(t[e]);else{const n=e.split("."),i=n.length-1;let s=t,r=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||ot(),uu(c,o[l])):uu(c,o)}else ge(a)&&uu(JSON.parse(a),o)}),s==null&&r)for(const a in o)di(o,a)&&bl(o[a]);return o}function _P(t){return t.type}function kP(t,e,n){let i=nt(e.messages)?e.messages:ot();"__i18nGlobal"in n&&(i=Ym(t.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(r=>{t.mergeLocaleMessage(r,i[r])});{if(nt(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(nt(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function CQ(t){return X(gs,null,t,0)}const VQ="__INTLIFY_META__",AQ=()=>[],N2=()=>!1;let EQ=0;function ZQ(t){return(e,n,i,s)=>t(n,i,Qt()||void 0,s)}const j2=()=>{const t=Qt();let e=null;return t&&(e=_P(t)[VQ])?{[VQ]:e}:null};function Mm(t={}){const{__root:e,__injectWithOption:n}=t,i=e===void 0,s=t.flatJson,r=Gu?te:ms;let o=et(t.inheritLocale)?t.inheritLocale:!0;const a=r(e&&o?e.locale.value:ge(t.locale)?t.locale:yl),l=r(e&&o?e.fallbackLocale.value:ge(t.fallbackLocale)||wt(t.fallbackLocale)||Me(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:a.value),c=r(Ym(a.value,t)),u=r(Me(t.datetimeFormats)?t.datetimeFormats:{[a.value]:{}}),O=r(Me(t.numberFormats)?t.numberFormats:{[a.value]:{}});let f=e?e.missingWarn:et(t.missingWarn)||Wo(t.missingWarn)?t.missingWarn:!0,d=e?e.fallbackWarn:et(t.fallbackWarn)||Wo(t.fallbackWarn)?t.fallbackWarn:!0,h=e?e.fallbackRoot:et(t.fallbackRoot)?t.fallbackRoot:!0,p=!!t.fallbackFormat,m=gt(t.missing)?t.missing:null,g=gt(t.missing)?ZQ(t.missing):null,b=gt(t.postTranslation)?t.postTranslation:null,Q=e?e.warnHtmlMessage:et(t.warnHtmlMessage)?t.warnHtmlMessage:!0,y=!!t.escapeParameter;const S=e?e.modifiers:Me(t.modifiers)?t.modifiers:{};let v=t.pluralRules||e&&e.pluralRules,P;P=(()=>{i&&vQ(null);const V={version:D2,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:S,pluralRules:v,missing:g===null?void 0:g,missingWarn:f,fallbackWarn:d,fallbackFormat:p,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:Q,escapeParameter:y,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};V.datetimeFormats=u.value,V.numberFormats=O.value,V.__datetimeFormatters=Me(P)?P.__datetimeFormatters:void 0,V.__numberFormatters=Me(P)?P.__numberFormatters:void 0;const U=k2(V);return i&&vQ(U),U})(),va(P,a.value,l.value);function k(){return[a.value,l.value,c.value,u.value,O.value]}const E=J({get:()=>a.value,set:V=>{P.locale=V,a.value=V}}),I=J({get:()=>l.value,set:V=>{P.fallbackLocale=V,l.value=V,va(P,a.value,V)}}),Z=J(()=>c.value),K=J(()=>u.value),ie=J(()=>O.value);function ae(){return gt(b)?b:null}function G(V){b=V,P.postTranslation=V}function q(){return m}function Y(V){V!==null&&(g=ZQ(V)),m=V,P.missing=g}const F=(V,U,he,we,Le,Ne)=>{k();let Ct;try{__INTLIFY_PROD_DEVTOOLS__,i||(P.fallbackContext=e?_2():void 0),Ct=V(P)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(P.fallbackContext=void 0)}if(he!=="translate exists"&&At(Ct)&&Ct===uf||he==="translate exists"&&!Ct){const[Nt,Hn]=U();return e&&h?we(e):Le(Nt)}else{if(Ne(Ct))return Ct;throw Bn(En.UNEXPECTED_RETURN_TYPE)}};function ue(...V){return F(U=>Reflect.apply(XQ,null,[U,...V]),()=>kh(...V),"translate",U=>Reflect.apply(U.t,U,[...V]),U=>U,U=>ge(U))}function Se(...V){const[U,he,we]=V;if(we&&!nt(we))throw Bn(En.INVALID_ARGUMENT);return ue(U,he,Dt({resolvedMessage:!0},we||{}))}function fe(...V){return F(U=>Reflect.apply(xQ,null,[U,...V]),()=>Th(...V),"datetime format",U=>Reflect.apply(U.d,U,[...V]),()=>bQ,U=>ge(U)||wt(U))}function Te(...V){return F(U=>Reflect.apply(TQ,null,[U,...V]),()=>_h(...V),"number format",U=>Reflect.apply(U.n,U,[...V]),()=>bQ,U=>ge(U)||wt(U))}function Ve(V){return V.map(U=>ge(U)||At(U)||et(U)?CQ(String(U)):U)}const Ze={normalize:Ve,interpolate:V=>V,type:"vnode"};function Re(...V){return F(U=>{let he;const we=U;try{we.processor=Ze,he=Reflect.apply(XQ,null,[we,...V])}finally{we.processor=null}return he},()=>kh(...V),"translate",U=>U[Rh](...V),U=>[CQ(U)],U=>wt(U))}function st(...V){return F(U=>Reflect.apply(TQ,null,[U,...V]),()=>_h(...V),"number format",U=>U[Ch](...V),AQ,U=>ge(U)||wt(U))}function De(...V){return F(U=>Reflect.apply(xQ,null,[U,...V]),()=>Th(...V),"datetime format",U=>U[Xh](...V),AQ,U=>ge(U)||wt(U))}function ft(V){v=V,P.pluralRules=v}function Gt(V,U){return F(()=>{if(!V)return!1;const he=ge(U)?U:a.value,we=A(he),Le=P.messageResolver(we,V);return Ui(Le)||Jn(Le)||ge(Le)},()=>[V],"translate exists",he=>Reflect.apply(he.te,he,[V,U]),N2,he=>et(he))}function xt(V){let U=null;const he=mP(P,l.value,a.value);for(let we=0;we{o&&(a.value=V,P.locale=V,va(P,a.value,l.value))}),_e(e.fallbackLocale,V=>{o&&(l.value=V,P.fallbackLocale=V,va(P,a.value,l.value))}));const oe={id:EQ,locale:E,fallbackLocale:I,get inheritLocale(){return o},set inheritLocale(V){o=V,V&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,va(P,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:Z,get modifiers(){return S},get pluralRules(){return v||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(V){f=V,P.missingWarn=f},get fallbackWarn(){return d},set fallbackWarn(V){d=V,P.fallbackWarn=d},get fallbackRoot(){return h},set fallbackRoot(V){h=V},get fallbackFormat(){return p},set fallbackFormat(V){p=V,P.fallbackFormat=p},get warnHtmlMessage(){return Q},set warnHtmlMessage(V){Q=V,P.warnHtmlMessage=V},get escapeParameter(){return y},set escapeParameter(V){y=V,P.escapeParameter=V},t:ue,getLocaleMessage:A,setLocaleMessage:L,mergeLocaleMessage:se,getPostTranslationHandler:ae,setPostTranslationHandler:G,getMissingHandler:q,setMissingHandler:Y,[wP]:ft};return oe.datetimeFormats=K,oe.numberFormats=ie,oe.rt=Se,oe.te=Gt,oe.tm=R,oe.d=fe,oe.n=Te,oe.getDateTimeFormat=ee,oe.setDateTimeFormat=x,oe.mergeDateTimeFormat=T,oe.getNumberFormat=M,oe.setNumberFormat=D,oe.mergeNumberFormat=H,oe[TP]=n,oe[Rh]=Re,oe[Xh]=De,oe[Ch]=st,oe}function B2(t){const e=ge(t.locale)?t.locale:yl,n=ge(t.fallbackLocale)||wt(t.fallbackLocale)||Me(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,i=gt(t.missing)?t.missing:void 0,s=et(t.silentTranslationWarn)||Wo(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,r=et(t.silentFallbackWarn)||Wo(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,o=et(t.fallbackRoot)?t.fallbackRoot:!0,a=!!t.formatFallbackMessages,l=Me(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,u=gt(t.postTranslation)?t.postTranslation:void 0,O=ge(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,f=!!t.escapeParameterHtml,d=et(t.sync)?t.sync:!0;let h=t.messages;if(Me(t.sharedMessages)){const S=t.sharedMessages;h=Object.keys(S).reduce((P,w)=>{const k=P[w]||(P[w]={});return Dt(k,S[w]),P},h||{})}const{__i18n:p,__root:m,__injectWithOption:g}=t,b=t.datetimeFormats,Q=t.numberFormats,y=t.flatJson;return{locale:e,fallbackLocale:n,messages:h,flatJson:y,datetimeFormats:b,numberFormats:Q,missing:i,missingWarn:s,fallbackWarn:r,fallbackRoot:o,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:O,escapeParameter:f,messageResolver:t.messageResolver,inheritLocale:d,__i18n:p,__root:m,__injectWithOption:g}}function Ah(t={}){const e=Mm(B2(t)),{__extender:n}=t,i={id:e.id,get locale(){return e.locale.value},set locale(s){e.locale.value=s},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(s){e.fallbackLocale.value=s},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(s){e.setMissingHandler(s)},get silentTranslationWarn(){return et(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(s){e.missingWarn=et(s)?!s:s},get silentFallbackWarn(){return et(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(s){e.fallbackWarn=et(s)?!s:s},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(s){e.fallbackFormat=s},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(s){e.setPostTranslationHandler(s)},get sync(){return e.inheritLocale},set sync(s){e.inheritLocale=s},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){e.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(s){e.escapeParameter=s},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...s){return Reflect.apply(e.t,e,[...s])},rt(...s){return Reflect.apply(e.rt,e,[...s])},te(s,r){return e.te(s,r)},tm(s){return e.tm(s)},getLocaleMessage(s){return e.getLocaleMessage(s)},setLocaleMessage(s,r){e.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){e.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(e.d,e,[...s])},getDateTimeFormat(s){return e.getDateTimeFormat(s)},setDateTimeFormat(s,r){e.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){e.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(e.n,e,[...s])},getNumberFormat(s){return e.getNumberFormat(s)},setNumberFormat(s,r){e.setNumberFormat(s,r)},mergeNumberFormat(s,r){e.mergeNumberFormat(s,r)}};return i.__extender=n,i}function G2(t,e,n){return{beforeCreate(){const i=Qt();if(!i)throw Bn(En.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=e,this===this.$root)this.$i18n=zQ(t,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=Ah(r);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=zQ(t,s);else{this.$i18n=Ah({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=t;s.__i18nGlobal&&kP(e,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$te=(r,o)=>this.$i18n.te(r,o),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=Qt();if(!i)throw Bn(En.UNEXPECTED_ERROR);const s=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(i),delete this.$i18n}}}function zQ(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[wP](e.pluralizationRules||t.pluralizationRules);const n=Ym(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(i=>t.mergeLocaleMessage(i,n[i])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(i=>t.mergeDateTimeFormat(i,e.datetimeFormats[i])),e.numberFormats&&Object.keys(e.numberFormats).forEach(i=>t.mergeNumberFormat(i,e.numberFormats[i])),t}const qm={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function F2({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((i,s)=>[...i,...s.type===Ce?s.children:[s]],[]):e.reduce((n,i)=>{const s=t[i];return s&&(n[i]=s()),n},ot())}function RP(){return Ce}const H2=W({name:"i18n-t",props:Dt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>At(t)||!isNaN(t)}},qm),setup(t,e){const{slots:n,attrs:i}=e,s=t.i18n||Of({useScope:t.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(O=>O[0]!=="_"),o=ot();t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=ge(t.plural)?+t.plural:t.plural);const a=F2(e,r),l=s[Rh](t.keypath,a,o),c=Dt(ot(),i),u=ge(t.tag)||nt(t.tag)?t.tag:RP();return Vn(u,c,l)}}}),YQ=H2;function K2(t){return wt(t)&&!ge(t[0])}function XP(t,e,n,i){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=ot();t.locale&&(o.locale=t.locale),ge(t.format)?o.key=t.format:nt(t.format)&&(ge(t.format.key)&&(o.key=t.format.key),a=Object.keys(t.format).reduce((f,d)=>n.includes(d)?Dt(ot(),f,{[d]:t.format[d]}):f,ot()));const l=i(t.value,o,a);let c=[o.key];wt(l)?c=l.map((f,d)=>{const h=s[f.type],p=h?h({[f.type]:f.value,index:d,parts:l}):[f.value];return K2(p)&&(p[0].key=`${f.type}-${d}`),p}):ge(l)&&(c=[l]);const u=Dt(ot(),r),O=ge(t.tag)||nt(t.tag)?t.tag:RP();return Vn(O,u,c)}}const J2=W({name:"i18n-n",props:Dt({value:{type:Number,required:!0},format:{type:[String,Object]}},qm),setup(t,e){const n=t.i18n||Of({useScope:t.scope,__useComponent:!0});return XP(t,e,vP,(...i)=>n[Ch](...i))}}),MQ=J2;function eZ(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const i=n.__getInstance(e);return i!=null?i.__composer:t.global.__composer}}function tZ(t){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Bn(En.UNEXPECTED_ERROR);const c=eZ(t,a.$),u=qQ(l);return[Reflect.apply(c.t,c,[...IQ(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);Gu&&t.global===c&&(o.__i18nWatcher=_e(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{Gu&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=qQ(a);o.textContent=Reflect.apply(l.t,l,[...IQ(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function qQ(t){if(ge(t))return{path:t};if(Me(t)){if(!("path"in t))throw Bn(En.REQUIRED_VALUE,"path");return t}else throw Bn(En.INVALID_VALUE)}function IQ(t){const{path:e,locale:n,args:i,choice:s,plural:r}=t,o={},a=i||{};return ge(n)&&(o.locale=n),At(s)&&(o.plural=s),At(r)&&(o.plural=r),[e,a,o]}function nZ(t,e,...n){const i=Me(n[0])?n[0]:{};(et(i.globalInstall)?i.globalInstall:!0)&&([YQ.name,"I18nT"].forEach(r=>t.component(r,YQ)),[MQ.name,"I18nN"].forEach(r=>t.component(r,MQ)),[WQ.name,"I18nD"].forEach(r=>t.component(r,WQ))),t.directive("t",tZ(e))}const iZ=pr("global-vue-i18n");function sZ(t={}){const e=__VUE_I18N_LEGACY_API__&&et(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,n=et(t.globalInjection)?t.globalInjection:!0,i=new Map,[s,r]=rZ(t,e),o=pr("");function a(O){return i.get(O)||null}function l(O,f){i.set(O,f)}function c(O){i.delete(O)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(O,...f){if(O.__VUE_I18N_SYMBOL__=o,O.provide(O.__VUE_I18N_SYMBOL__,u),Me(f[0])){const p=f[0];u.__composerExtend=p.__composerExtend,u.__vueI18nExtend=p.__vueI18nExtend}let d=null;!e&&n&&(d=dZ(O,u.global)),__VUE_I18N_FULL_INSTALL__&&nZ(O,u,...f),__VUE_I18N_LEGACY_API__&&e&&O.mixin(G2(r,r.__composer,u));const h=O.unmount;O.unmount=()=>{d&&d(),u.dispose(),h()}},get global(){return r},dispose(){s.stop()},__instances:i,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function Of(t={}){const e=Qt();if(e==null)throw Bn(En.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Bn(En.NOT_INSTALLED);const n=oZ(e),i=lZ(n),s=_P(e),r=aZ(t,s);if(r==="global")return kP(i,t,s),i;if(r==="parent"){let l=cZ(n,e,t.__useComponent);return l==null&&(l=i),l}const o=n;let a=o.__getInstance(e);if(a==null){const l=Dt({},t);"__i18n"in s&&(l.__i18n=s.__i18n),i&&(l.__root=i),a=Mm(l),o.__composerExtend&&(a[Vh]=o.__composerExtend(a)),OZ(o,e,a),o.__setInstance(e,a)}return a}function rZ(t,e){const n=na(),i=__VUE_I18N_LEGACY_API__&&e?n.run(()=>Ah(t)):n.run(()=>Mm(t));if(i==null)throw Bn(En.UNEXPECTED_ERROR);return[n,i]}function oZ(t){const e=gn(t.isCE?iZ:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Bn(t.isCE?En.NOT_INSTALLED_WITH_PROVIDE:En.UNEXPECTED_ERROR);return e}function aZ(t,e){return lf(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function lZ(t){return t.mode==="composition"?t.global:t.global.__composer}function cZ(t,e,n=!1){let i=null;const s=e.root;let r=uZ(e,n);for(;r!=null;){const o=t;if(t.mode==="composition")i=o.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(r);a!=null&&(i=a.__composer,n&&i&&!i[TP]&&(i=null))}if(i!=null||s===r)break;r=r.parent}return i}function uZ(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function OZ(t,e,n){Pt(()=>{},e),Bi(()=>{const i=n;t.__deleteInstance(e);const s=i[Vh];s&&(s(),delete i[Vh])},e)}const fZ=["locale","fallbackLocale","availableLocales"],UQ=["t","rt","d","n","tm","te"];function dZ(t,e){const n=Object.create(null);return fZ.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw Bn(En.UNEXPECTED_ERROR);const o=Ge(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,o)}),t.config.globalProperties.$i18n=n,UQ.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw Bn(En.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${s}`,r)}),()=>{delete t.config.globalProperties.$i18n,UQ.forEach(s=>{delete t.config.globalProperties[`$${s}`]})}}const hZ=W({name:"i18n-d",props:Dt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},qm),setup(t,e){const n=t.i18n||Of({useScope:t.scope,__useComponent:!0});return XP(t,e,SP,(...i)=>n[Xh](...i))}}),WQ=hZ;L2();v2(s2);P2(y2);x2(mP);if(__INTLIFY_PROD_DEVTOOLS__){const t=kr();t.__INTLIFY__=!0,r2(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const pZ={class:"flex flex-col p-3 gap-3 overflow-auto"},mZ={class:"flex flex-row gap-2"},gZ={class:"flex items-center space-x-2"},$Z={class:"flex items-center space-x-2"},QZ=W({__name:"Library",setup(t){const{locale:e}=Of(),n=sn();let i=te(!1);function s(r,o){r.dataTransfer&&(r.dataTransfer.dropEffect="move",r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("itemId",o)),n.setDragMode("insert")}return _e(i,r=>{r===!1?n.setShowPreview(!1):n.setShowPreview(!0)}),(r,o)=>(C(),re("div",pZ,[N("div",mZ,[N("div",gZ,[Dl(N("select",{"onUpdate:modelValue":o[0]||(o[0]=a=>Ge(e)?e.value=a:null)},o[29]||(o[29]=[N("option",{value:"de"},"DE",-1),N("option",{value:"en"},"EN",-1)]),512),[[NO,$(e)]])]),N("div",$Z,[X($(pE),{id:"preview-mode",modelValue:$(i),"onUpdate:modelValue":o[1]||(o[1]=a=>Ge(i)?i.value=a:i=a)},null,8,["modelValue"]),X($(rP),{for:"preview-mode"},{default:z(()=>[Ae(ne(r.$t("preview_mode")),1)]),_:1})])]),N("div",{id:"headline",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[2]||(o[2]=a=>s(a,"6")),onDragenter:o[3]||(o[3]=He(()=>{},["prevent"])),onDragover:o[4]||(o[4]=He(()=>{},["prevent"]))},[X($(yC)),N("span",null,ne(r.$t("headline")),1)],32),N("div",{id:"text",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[5]||(o[5]=a=>s(a,"4")),onDragenter:o[6]||(o[6]=He(()=>{},["prevent"])),onDragover:o[7]||(o[7]=He(()=>{},["prevent"]))},[X($(SC)),N("span",null,ne(r.$t("text")),1)],32),N("div",{id:"fieldset",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[8]||(o[8]=a=>s(a,"12")),onDragenter:o[9]||(o[9]=He(()=>{},["prevent"])),onDragover:o[10]||(o[10]=He(()=>{},["prevent"]))},[X($(mC)),N("span",null,ne(r.$t("fieldset")),1)],32),N("div",{id:"media",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[11]||(o[11]=a=>s(a,"9")),onDragenter:o[12]||(o[12]=He(()=>{},["prevent"])),onDragover:o[13]||(o[13]=He(()=>{},["prevent"]))},[X($(dC)),N("span",null,ne(r.$t("media")),1)],32),N("div",{id:"textarea",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[14]||(o[14]=a=>s(a,"5")),onDragenter:o[15]||(o[15]=He(()=>{},["prevent"])),onDragover:o[16]||(o[16]=He(()=>{},["prevent"]))},[X($(bC)),N("span",null,ne(r.$t("textarea")),1)],32),N("div",{id:"input",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[17]||(o[17]=a=>s(a,"2")),onDragenter:o[18]||(o[18]=He(()=>{},["prevent"])),onDragover:o[19]||(o[19]=He(()=>{},["prevent"]))},[X($(vC)),N("span",null,ne(r.$t("input")),1)],32),N("div",{id:"select",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[20]||(o[20]=a=>s(a,"3")),onDragenter:o[21]||(o[21]=He(()=>{},["prevent"])),onDragover:o[22]||(o[22]=He(()=>{},["prevent"]))},[X($($C)),N("span",null,ne(r.$t("select")),1)],32),N("div",{id:"hidden",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[23]||(o[23]=a=>s(a,"1")),onDragenter:o[24]||(o[24]=He(()=>{},["prevent"])),onDragover:o[25]||(o[25]=He(()=>{},["prevent"]))},[X($(QC)),N("span",null,ne(r.$t("hidden")),1)],32),N("div",{id:"row",class:"border-1 p-2 w-full flex flex-row gap-2",draggable:"true",onDragstart:o[26]||(o[26]=a=>s(a,"7")),onDragenter:o[27]||(o[27]=He(()=>{},["prevent"])),onDragover:o[28]||(o[28]=He(()=>{},["prevent"]))},[X($(PC)),N("span",null,ne(r.$t("row")),1)],32)]))}}),je=W({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,s=Tv(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(r,o)=>Dl((C(),re("input",{"onUpdate:modelValue":o[0]||(o[0]=a=>Ge(s)?s.value=a:null),"data-slot":"input",class:bt($(it)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n.class))},null,2)),[[Mo,$(s)]])}}),yZ=W({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,s=_t(n,"class"),r=Fn(s,i);return(o,a)=>(C(),j($(S5),be({"data-slot":"checkbox"},$(r),{class:$(it)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:z(()=>[X($(v5),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:z(()=>[le(o.$slots,"default",{},()=>[X($(_v),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),bZ={class:"form-check-label",for:"flexSwitchCheckDefault"},SZ=W({__name:"InputElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re(Ce,null,[N("label",null,ne(r.$t("id")),1),X($(je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.id=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("placeholder")),1),X($(je),{modelValue:s.value.placeHolder,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.placeHolder=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("default")),1),X($(je),{modelValue:s.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>s.value.default=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("name")),1),X($(je),{modelValue:s.value.name,"onUpdate:modelValue":o[3]||(o[3]=a=>s.value.name=a)},null,8,["modelValue"]),X($(yZ),{modelValue:s.value.required,"onUpdate:modelValue":o[4]||(o[4]=a=>s.value.required=a)},null,8,["modelValue"]),N("label",bZ,ne(r.$t("required")),1),N("label",null,ne(r.$t("min")),1),X($(je),{modelValue:s.value.minValue,"onUpdate:modelValue":o[5]||(o[5]=a=>s.value.minValue=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("max")),1),X($(je),{modelValue:s.value.maxValue,"onUpdate:modelValue":o[6]||(o[6]=a=>s.value.maxValue=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("min_calc")),1),X($(je),{modelValue:s.value.minCalc,"onUpdate:modelValue":o[7]||(o[7]=a=>s.value.minCalc=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("max_calc")),1),X($(je),{modelValue:s.value.maxCalc,"onUpdate:modelValue":o[8]||(o[8]=a=>s.value.maxCalc=a)},null,8,["modelValue"])],64))}}),ff=W({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const s=Fn(t,e);return(r,o)=>(C(),j($(D5),be({"data-slot":"select"},$(s)),{default:z(()=>[le(r.$slots,"default")]),_:3},16))}}),df=W({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,s=_t(n,"class"),r=Fn(s,i);return(o,a)=>(C(),j($(oA),null,{default:z(()=>[X($(K5),be({"data-slot":"select-content"},{...$(r),...o.$attrs},{class:$(it)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",o.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:z(()=>[X($(xZ)),X($(OA),{class:bt($(it)("p-1",o.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:z(()=>[le(o.$slots,"default")]),_:3},8,["class"]),X($(PZ))]),_:3},16,["class"])]),_:3}))}}),Im=W({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(C(),j($(eA),be({"data-slot":"select-group"},e),{default:z(()=>[le(n.$slots,"default")]),_:3},16))}}),vZ={class:"absolute right-2 flex size-3.5 items-center justify-center"},Oi=W({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class"),i=Hi(n);return(s,r)=>(C(),j($(iA),be({"data-slot":"select-item"},$(i),{class:$(it)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e.class)}),{default:z(()=>[N("span",vZ,[X($(sA),null,{default:z(()=>[X($(_v),{class:"size-4"})]),_:1})]),X($(rA),null,{default:z(()=>[le(s.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),PZ=W({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class"),i=Hi(n);return(s,r)=>(C(),j($(aA),be({"data-slot":"select-scroll-down-button"},$(i),{class:$(it)("flex cursor-default items-center justify-center py-1",e.class)}),{default:z(()=>[le(s.$slots,"default",{},()=>[X($(Om),{class:"size-4"})])]),_:3},16,["class"]))}}),xZ=W({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class"),i=Hi(n);return(s,r)=>(C(),j($(lA),be({"data-slot":"select-scroll-up-button"},$(i),{class:$(it)("flex cursor-default items-center justify-center py-1",e.class)}),{default:z(()=>[le(s.$slots,"default",{},()=>[X($(uC),{class:"size-4"})])]),_:3},16,["class"]))}}),hf=W({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(t){const e=t,n=_t(e,"class","size"),i=Hi(n);return(s,r)=>(C(),j($(cA),be({"data-slot":"select-trigger","data-size":s.size},$(i),{class:$(it)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:z(()=>[le(s.$slots,"default"),X($(tA),{"as-child":""},{default:z(()=>[X($(Om),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),pf=W({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(C(),j($(uA),be({"data-slot":"select-value"},e),{default:z(()=>[le(n.$slots,"default")]),_:3},16))}}),wZ=W({__name:"SelectElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re(Ce,null,[N("label",null,ne(r.$t("id")),1),X($(je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.id=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("default")),1),X($(je),{modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.default=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("name")),1),X($(je),{modelValue:s.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>s.value.name=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("mode")),1),X($(ff),{modelValue:s.value.mode,"onUpdate:modelValue":o[3]||(o[3]=a=>s.value.mode=a)},{default:z(()=>[X($(hf),null,{default:z(()=>[X($(pf))]),_:1}),X($(df),null,{default:z(()=>[X($(Im),null,{default:z(()=>[X($(Oi),{value:"normal"},{default:z(()=>[Ae(ne(r.$t("normal")),1)]),_:1}),X($(Oi),{value:"paperdb"},{default:z(()=>[Ae(ne(r.$t("paperdb")),1)]),_:1}),X($(Oi),{value:"colordb"},{default:z(()=>[Ae(ne(r.$t("colordb")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),N("label",null,ne(r.$t("container")),1),X($(je),{modelValue:s.value.container,"onUpdate:modelValue":o[4]||(o[4]=a=>s.value.container=a)},null,8,["modelValue"])],64))}}),TZ=W({__name:"MediaElement",props:{modelValue:J1},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re(Ce,null,[N("label",null,ne(r.$t("id")),1),X($(je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.id=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("default")),1),X($(je),{modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.default=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("name")),1),X($(je),{modelValue:s.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>s.value.name=a)},null,8,["modelValue"])],64))}}),_Z=W({__name:"FieldsetElement",props:{modelValue:eP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re(Ce,null,[N("label",null,ne(r.$t("id")),1),X($(je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.id=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("label")),1),X($(je),{modelValue:s.value.label,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.label=a)},null,8,["modelValue"])],64))}}),kZ=W({__name:"HiddenElement",props:{modelValue:tP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re(Ce,null,[N("label",null,ne(r.$t("id")),1),X($(je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.id=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("default")),1),X($(je),{modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.default=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("name")),1),X($(je),{modelValue:s.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>s.value.name=a)},null,8,["modelValue"])],64))}}),Um=W({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,s=Tv(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(r,o)=>Dl((C(),re("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>Ge(s)?s.value=a:null),"data-slot":"textarea",class:bt($(it)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n.class))},null,2)),[[Mo,$(s)]])}}),RZ=W({__name:"TextElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re(Ce,null,[N("label",null,ne(r.$t("id")),1),X($(je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.id=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("name")),1),X($(je),{modelValue:s.value.name,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.name=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("default")),1),X($(Um),{modelValue:s.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>s.value.default=a)},null,8,["modelValue"])],64))}}),XZ=W({__name:"TextareaElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re(Ce,null,[N("label",null,ne(r.$t("id")),1),X($(je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.id=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("name")),1),X($(je),{modelValue:s.value.name,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.name=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("default")),1),X($(Um),{modelValue:s.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>s.value.default=a)},null,8,["modelValue"])],64))}}),CZ=W({__name:"HeadlineElement",props:{modelValue:sP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re(Ce,null,[N("label",null,ne(r.$t("id")),1),X($(je),{modelValue:s.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>s.value.id=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("default")),1),X($(je),{modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.default=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("name")),1),X($(je),{modelValue:s.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>s.value.name=a)},null,8,["modelValue"]),N("label",null,ne(r.$t("variant")),1),X($(ff),{modelValue:s.value.variant,"onUpdate:modelValue":o[3]||(o[3]=a=>s.value.variant=a)},{default:z(()=>[X($(hf),null,{default:z(()=>[X($(pf))]),_:1}),X($(df),null,{default:z(()=>[X($(Im),null,{default:z(()=>[X($(Oi),{value:"1"},{default:z(()=>[Ae(ne(r.$t("headline1")),1)]),_:1}),X($(Oi),{value:"2"},{default:z(()=>[Ae(ne(r.$t("headline2")),1)]),_:1}),X($(Oi),{value:"3"},{default:z(()=>[Ae(ne(r.$t("headline3")),1)]),_:1}),X($(Oi),{value:"4"},{default:z(()=>[Ae(ne(r.$t("headline4")),1)]),_:1}),X($(Oi),{value:"5"},{default:z(()=>[Ae(ne(r.$t("headline5")),1)]),_:1}),X($(Oi),{value:"6"},{default:z(()=>[Ae(ne(r.$t("headline6")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),VZ=W({__name:"RowElement",props:{modelValue:K1},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:o=>i("update:modelValue",o)});function r(o){o!==null&&o.addColumnAtTheEnd(new Er)}return(o,a)=>(C(),j($(jn),{onClick:a[0]||(a[0]=l=>r(s.value))},{default:z(()=>[Ae(ne(o.$t("add_column")),1)]),_:1}))}}),AZ=W({__name:"Sheet",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const s=Fn(t,e);return(r,o)=>(C(),j($(Uv),be({"data-slot":"sheet"},$(s)),{default:z(()=>[le(r.$slots,"default")]),_:3},16))}}),EZ=W({__name:"SheetOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class");return(i,s)=>(C(),j($(e1),be({"data-slot":"sheet-overlay",class:$(it)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)},$(n)),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),ZZ=W({inheritAttrs:!1,__name:"SheetContent",props:{class:{},side:{default:"right"},forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=_t(n,"class","side"),r=Fn(s,i);return(o,a)=>(C(),j($(c1),null,{default:z(()=>[X(EZ),X($(Fv),be({"data-slot":"sheet-content",class:$(it)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",o.side==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",o.side==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",o.side==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",o.side==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",n.class)},{...$(r),...o.$attrs}),{default:z(()=>[le(o.$slots,"default"),X($(Sm),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"},{default:z(()=>[X($(kv),{class:"size-4"}),a[0]||(a[0]=N("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),zZ=W({__name:"SheetDescription",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class");return(i,s)=>(C(),j($(Hv),be({"data-slot":"sheet-description",class:$(it)("text-muted-foreground text-sm",e.class)},$(n)),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),YZ=W({__name:"SheetHeader",props:{class:{}},setup(t){const e=t;return(n,i)=>(C(),re("div",{"data-slot":"sheet-header",class:bt($(it)("flex flex-col gap-1.5 p-4",e.class))},[le(n.$slots,"default")],2))}}),MZ=W({__name:"SheetTitle",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class");return(i,s)=>(C(),j($(n1),be({"data-slot":"sheet-title",class:$(it)("text-foreground font-semibold",e.class)},$(n)),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),qZ={class:"flex flex-col w-full m-2"},IZ=W({__name:"ElementProperties",emits:["update:modelValue"],setup(t,{emit:e}){let n=te(!1);const i=sn();return i.$subscribe((s,r)=>{r.showProperties&&(n.value=!0)}),_e(n,s=>{s===!1&&i.setShowProperties(!1)}),(s,r)=>(C(),j($(AZ),{open:$(n),"onUpdate:open":r[9]||(r[9]=o=>Ge(n)?n.value=o:n=o)},{default:z(()=>[X($(ZZ),null,{default:z(()=>[X($(YZ),null,{default:z(()=>[X($(MZ),null,{default:z(()=>r[10]||(r[10]=[Ae("Properties")])),_:1,__:[10]}),X($(zZ))]),_:1}),N("div",qZ,[$(i).getActiveItem.type===6?(C(),j(CZ,{key:0,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[0]||(r[0]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0),$(i).getActiveItem.type===9?(C(),j(TZ,{key:1,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[1]||(r[1]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0),$(i).getActiveItem.type===7?(C(),j(VZ,{key:2,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[2]||(r[2]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0),$(i).getActiveItem.type===5?(C(),j(XZ,{key:3,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[3]||(r[3]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0),$(i).getActiveItem.type===4?(C(),j(RZ,{key:4,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[4]||(r[4]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0),$(i).getActiveItem.type===12?(C(),j(_Z,{key:5,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[5]||(r[5]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0),$(i).getActiveItem.type===3?(C(),j(wZ,{key:6,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[6]||(r[6]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0),$(i).getActiveItem.type===2?(C(),j(SZ,{key:7,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[7]||(r[7]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0),$(i).getActiveItem.type===1?(C(),j(kZ,{key:8,modelValue:$(i).getActiveItem,"onUpdate:modelValue":r[8]||(r[8]=o=>$(i).getActiveItem=o)},null,8,["modelValue"])):Pe("",!0)])]),_:1})]),_:1},8,["open"]))}}),CP=W({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const s=Fn(t,e);return(r,o)=>(C(),j($(Uv),be({"data-slot":"dialog"},$(s)),{default:z(()=>[le(r.$slots,"default")]),_:3},16))}}),UZ=W({__name:"DialogClose",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(C(),j($(Sm),be({"data-slot":"dialog-close"},e),{default:z(()=>[le(n.$slots,"default")]),_:3},16))}}),WZ=W({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class");return(i,s)=>(C(),j($(e1),be({"data-slot":"dialog-overlay"},$(n),{class:$(it)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)}),{default:z(()=>[le(i.$slots,"default")]),_:3},16,["class"]))}}),VP=W({__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,s=_t(n,"class"),r=Fn(s,i);return(o,a)=>(C(),j($(c1),null,{default:z(()=>[X(WZ),X($(Fv),be({"data-slot":"dialog-content"},$(r),{class:$(it)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",n.class)}),{default:z(()=>[le(o.$slots,"default"),X($(Sm),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},{default:z(()=>[X($(kv)),a[0]||(a[0]=N("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3}))}}),AP=W({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class"),i=Hi(n);return(s,r)=>(C(),j($(Hv),be({"data-slot":"dialog-description"},$(i),{class:$(it)("text-muted-foreground text-sm",e.class)}),{default:z(()=>[le(s.$slots,"default")]),_:3},16,["class"]))}}),EP=W({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,i)=>(C(),re("div",{"data-slot":"dialog-footer",class:bt($(it)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e.class))},[le(n.$slots,"default")],2))}}),ZP=W({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,i)=>(C(),re("div",{"data-slot":"dialog-header",class:bt($(it)("flex flex-col gap-2 text-center sm:text-left",e.class))},[le(n.$slots,"default")],2))}}),zP=W({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]},class:{}},setup(t){const e=t,n=_t(e,"class"),i=Hi(n);return(s,r)=>(C(),j($(n1),be({"data-slot":"dialog-title"},$(i),{class:$(it)("text-lg leading-none font-semibold",e.class)}),{default:z(()=>[le(s.$slots,"default")]),_:3},16,["class"]))}}),DZ=W({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{type:[String,Object,Function]}},setup(t){const e=t;return(n,i)=>(C(),j($(c5),be({"data-slot":"dialog-trigger"},e),{default:z(()=>[le(n.$slots,"default")]),_:3},16))}}),LZ={class:"overflow-auto h-full w-full"},NZ=W({__name:"ElementDependency",setup(t){const e=sn();let n=te(!1);function i(){e.getActiveItem.addDependency(new aa)}return e.$subscribe((s,r)=>{r.showDependency&&(n.value=!0)}),_e(n,s=>{s===!1&&e.setShowDependency(!1)}),(s,r)=>(C(),j($(CP),{class:"w-full h-full",open:$(n),"onUpdate:open":r[1]||(r[1]=o=>Ge(n)?n.value=o:n=o)},{default:z(()=>[X($(VP),{class:"h-full"},{default:z(()=>[X($(ZP),null,{default:z(()=>[X($(zP),null,{default:z(()=>r[2]||(r[2]=[Ae("Dependencys")])),_:1,__:[2]}),X($(AP))]),_:1}),N("div",LZ,[X($(jn),{onClick:r[0]||(r[0]=o=>i())},{default:z(()=>r[3]||(r[3]=[Ae("Add Dependency")])),_:1,__:[3]}),X($(Wm),{dependencys:$(e).getActiveItem.dependencys},null,8,["dependencys"])]),X($(EP))]),_:1})]),_:1},8,["open"]))}}),jZ={class:"w-full"},BZ=W({__name:"ElementBorder",props:{dependency:{}},setup(t){return(e,n)=>(C(),re("div",jZ,[X($(FZ),{borders:e.dependency.borders},null,8,["borders"])]))}}),GZ={class:"flex flex-row items-center gap-2 border-l-3 border-black pt-1"},FZ=W({__name:"Border",props:{borders:{}},setup(t){function e(n){n.addDependency(new aa)}return(n,i)=>(C(!0),re(Ce,null,An(n.borders,s=>(C(),re("div",{class:"flex flex-col",key:s.uuid},[N("div",GZ,[i[1]||(i[1]=N("span",{class:"w-5 flex-none"},[N("hr",{class:"bg-black h-1 border-0"})],-1)),X($(je),{modelValue:s.formula,"onUpdate:modelValue":r=>s.formula=r,placeholder:"Formula"},null,8,["modelValue","onUpdate:modelValue"]),X($(je),{modelValue:s.calcValue,"onUpdate:modelValue":r=>s.calcValue=r,placeholder:"CalcValue"},null,8,["modelValue","onUpdate:modelValue"]),X($(je),{modelValue:s.value,"onUpdate:modelValue":r=>s.value=r,placeholder:"Value"},null,8,["modelValue","onUpdate:modelValue"]),X($(jn),{onClick:r=>e(s)},{default:z(()=>i[0]||(i[0]=[Ae("Add Dependency")])),_:2,__:[0]},1032,["onClick"])]),X($(Wm),{dependencys:s.dependencys},null,8,["dependencys"])]))),128))}}),HZ={class:"flex flex-row gap-2 border-l-3 border-black pt-1"},Wm=W({__name:"Dependency",props:{dependencys:{}},setup(t){const e=la();function n(i){i.addBorder(new N1)}return(i,s)=>(C(!0),re(Ce,null,An(i.dependencys,r=>(C(),re("div",{class:"d-flex flex-wrap relative ml-5 mr-5",key:r.uuid},[N("div",HZ,[s[2]||(s[2]=N("span",{class:"w-2 flex-none"},null,-1)),X($(ff),{modelValue:r.relation,"onUpdate:modelValue":o=>r.relation=o},{default:z(()=>[X($(hf),{class:"w-[180px]"},{default:z(()=>[X($(pf),{placeholder:"Select Relation"})]),_:1}),X($(df),null,{default:z(()=>[(C(!0),re(Ce,null,An($(e).getItems,o=>(C(),j($(Oi),{value:o.id},{default:z(()=>[Ae(ne(o.id),1)]),_:2},1032,["value"]))),256))]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),X($(rP),{for:"formula"},{default:z(()=>s[0]||(s[0]=[Ae("Formula")])),_:1,__:[0]}),X($(je),{name:"formula",modelValue:r.formula,"onUpdate:modelValue":o=>r.formula=o},null,8,["modelValue","onUpdate:modelValue"]),X($(jn),{onClick:o=>n(r)},{default:z(()=>s[1]||(s[1]=[Ae("Add Border")])),_:2,__:[1]},1032,["onClick"])]),X($(BZ),{dependency:r},null,8,["dependency"])]))),128))}}),KZ={class:"flex flex-row gap-1"},JZ=W({__name:"OptionElement",props:{option:{}},emits:["update:option"],setup(t,{emit:e}){const n=t;function i(o){o.addDependency(new aa)}let s=e;const r=J({get:()=>n.option,set:o=>s("update:option",o)});return(o,a)=>(C(),re(Ce,null,[N("div",KZ,[N("label",null,ne(o.$t("id")),1),X($(je),{modelValue:r.value.id,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value.id=l)},null,8,["modelValue"]),N("label",null,ne(o.$t("name")),1),X($(je),{modelValue:r.value.name,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value.name=l)},null,8,["modelValue"]),X($(jn),{onClick:a[2]||(a[2]=l=>i(r.value))},{default:z(()=>[Ae(ne(o.$t("add_dependency")),1)]),_:1})]),X($(Wm),{dependencys:r.value.dependencys},null,8,["dependencys"])],64))}}),ez={class:"w-full grid overflow-y-auto px-6"},tz=W({__name:"SelectSpecial",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e,s=te(!1);const r=J({get:()=>n.modelValue,set:l=>i("update:modelValue",l)});function o(l){l.addOption(new nP(String(l.options.length+1)))}const a=sn();return a.$subscribe((l,c)=>{c.showOptions&&(s.value=!0)},{detached:!0}),_e(s,l=>{l===!1&&a.setShowOptions(!1)}),(l,c)=>$(a).getActiveItem.type===3?(C(),j($(CP),{key:0,open:$(s),"onUpdate:open":c[1]||(c[1]=u=>Ge(s)?s.value=u:s=u)},{default:z(()=>[X($(DZ),null,{default:z(()=>[X($(jn),{class:"mt-2"},{default:z(()=>[Ae(ne(l.$t("edit_options")),1)]),_:1})]),_:1}),X($(VP),{class:"min-w-full grid-rows-[auto_minmax(0,1fr)_auto] p-4 max-h-[90dvh]"},{default:z(()=>[X($(ZP),null,{default:z(()=>[X($(zP),null,{default:z(()=>[Ae(ne(l.$t("edit_options")),1)]),_:1}),X($(AP),null,{default:z(()=>[X($(jn),{onClick:c[0]||(c[0]=u=>o(r.value))},{default:z(()=>[Ae(ne(l.$t("add_option")),1)]),_:1})]),_:1})]),_:1}),N("div",ez,[(C(!0),re(Ce,null,An(r.value.options,u=>(C(),re("div",{class:"d-flex flex-wrap p-2 relative",key:u.uuid},[X(JZ,{option:u},null,8,["option"])]))),128))]),X($(EP),null,{default:z(()=>[X($(UZ),{"as-child":""},{default:z(()=>[X($(jn),{type:"button",variant:"secondary"},{default:z(()=>[Ae(ne(l.$t("close")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Pe("",!0)}}),nz={class:""},iz=W({__name:"SpecialProperties",emits:["update:modelValue"],setup(t,{emit:e}){const n=sn();return(i,s)=>(C(),re("div",nz,[X(tz,{modelValue:$(n).getActiveItem,"onUpdate:modelValue":s[0]||(s[0]=r=>$(n).getActiveItem=r)},null,8,["modelValue"])]))}}),sz={class:"flex gap-2 flex-row items-center"},rz={class:"w-60 flex-inital"},oz=W({__name:"InputElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re("div",sz,[N("label",rz,ne(s.value.name),1),X($(je),{placeholder:s.value.placeHolder,"onUpdate:placeholder":o[0]||(o[0]=a=>s.value.placeHolder=a),modelValue:s.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>s.value.default=a),name:s.value.name,"onUpdate:name":o[2]||(o[2]=a=>s.value.name=a),id:s.value.id,"onUpdate:id":o[3]||(o[3]=a=>s.value.id=a),required:s.value.required,"onUpdate:required":o[4]||(o[4]=a=>s.value.required=a)},null,8,["placeholder","modelValue","name","id","required"])]))}}),az={class:"flex gap-2 flex-row"},lz={class:"w-60 flex-inital"},cz=W({__name:"HiddenElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>(C(),re("div",az,[N("label",lz,ne(s.value.id),1)]))}}),uz={class:"flex gap-2 flex-row items-center content-center"},Oz={key:0,class:"text-4xl"},fz={key:1,class:"text-base"},dz={key:2,class:"text-lg"},hz={key:3,class:"text-xl"},pz={key:4,class:"text-2xl"},mz={key:5,class:"text-3xl"},gz={key:6,class:"text-4xl"},$z=W({__name:"HeadlineElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>{var a,l,c,u,O,f,d,h,p,m,g,b,Q;return C(),re("div",uz,[((a=s.value)==null?void 0:a.variant)=="1"?(C(),re("h1",Oz,ne((l=s.value)==null?void 0:l.default),1)):((c=s.value)==null?void 0:c.variant)=="6"?(C(),re("h6",fz,ne((u=s.value)==null?void 0:u.default),1)):((O=s.value)==null?void 0:O.variant)=="5"?(C(),re("h5",dz,ne((f=s.value)==null?void 0:f.default),1)):((d=s.value)==null?void 0:d.variant)=="4"?(C(),re("h4",hz,ne((h=s.value)==null?void 0:h.default),1)):((p=s.value)==null?void 0:p.variant)=="3"?(C(),re("h3",pz,ne((m=s.value)==null?void 0:m.default),1)):((g=s.value)==null?void 0:g.variant)=="2"?(C(),re("h2",mz,ne((b=s.value)==null?void 0:b.default),1)):(C(),re("h1",gz,ne((Q=s.value)==null?void 0:Q.default),1))])}}}),Qz={class:"flex gap-2 flex-row"},yz={style:{"white-space":"pre-line"}},bz=W({__name:"TextElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>{var a;return C(),re("div",Qz,[N("p",yz,ne((a=s.value)==null?void 0:a.default),1)])}}}),Sz={class:"flex gap-2 flex-row"},vz={for:"dropzone-file",class:"flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"},Pz={class:"flex items-center justify-center w-full"},xz=["value"],wz={key:0,class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Tz=W({__name:"MediaElementForm",emits:["update:modelValue"],setup(t,{emit:e}){const n=te(0),i=te(!1),s=te([]),r=te(""),o=()=>{i.value=!0},a=()=>{i.value=!1},l=O=>{var d;i.value=!1;const f=(d=O.dataTransfer)==null?void 0:d.files;f&&f.length>0&&u(f[0])},c=O=>{const d=O.target.files;d&&d.length>0&&u(d[0])};Pt(async()=>{try{let O=await uE();s.value=O.data,O.data.length>0&&(r.value=s.value[0].uuid)}catch(O){console.error("Failed to fetch directories",O)}});const u=async O=>{if(n.value=0,r)try{await cE(O,r.value,f=>{n.value=f}),console.log("Upload successful")}catch(f){console.error("Upload failed",f)}finally{setTimeout(()=>n.value=0,2e3)}};return(O,f)=>(C(),re("div",Sz,[N("div",{class:bt(["flex items-center justify-center w-full",{"border-blue-500":i.value}]),onDragover:He(o,["prevent"]),onDragleave:He(a,["prevent"]),onDrop:He(l,["prevent"])},[N("label",vz,[f[1]||(f[1]=am('

Click to upload or drag and drop

SVG, PNG, JPG or GIF (MAX. 800x400px)

',1)),N("input",{id:"dropzone-file",type:"file",class:"hidden",onChange:c},null,32)])],34),N("div",Pz,[Dl(N("select",{"onUpdate:modelValue":f[0]||(f[0]=d=>r.value=d),class:"w-full p-2 border rounded-md"},[(C(!0),re(Ce,null,An(s.value,d=>(C(),re("option",{key:d.uuid,value:d.uuid},ne(d.title),9,xz))),128))],512),[[NO,r.value]])]),n.value>0?(C(),re("div",wz,[N("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Gn({width:n.value+"%"})},null,4)])):Pe("",!0)]))}}),_z={class:"flex gap-2 flex-row"},kz={class:"w-60 flex-inital"},Rz=W({__name:"TextareaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>{var a,l,c,u;return C(),re("div",_z,[N("label",kz,ne((a=s.value)==null?void 0:a.name),1),X($(Um),{value:(l=s.value)==null?void 0:l.default,name:(c=s.value)==null?void 0:c.name,id:(u=s.value)==null?void 0:u.id},null,8,["value","name","id"])])}}}),Xz={class:"flex gap-2 flex-row items-center"},Cz={class:"w-60 flex-inital"},Vz={class:"w-full"},Az=W({__name:"SelectElementForm",props:{modelValue:iP},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=J({get:()=>n.modelValue,set:r=>i("update:modelValue",r)});return(r,o)=>{var a;return C(),re("div",Xz,[N("label",Cz,ne((a=s.value)==null?void 0:a.name),1),N("div",Vz,[X($(ff),{modelValue:s.value.default,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value.default=l)},{default:z(()=>[X($(hf),null,{default:z(()=>[X($(pf))]),_:1}),X($(df),null,{default:z(()=>[X($(Im),null,{default:z(()=>{var l;return[(C(!0),re(Ce,null,An((l=s.value)==null?void 0:l.options,c=>(C(),j($(Oi),{key:c.uuid,value:c.id},{default:z(()=>[Ae(ne(c.name),1)]),_:2},1032,["value"]))),128))]}),_:1})]),_:1})]),_:1},8,["modelValue"])])])}}}),Ez={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},Zz=W({__name:"EmptyElementForm",props:{row:{}},setup(t){const e=t;function n(i){i.addColumnAtTheEnd(new Er)}return(i,s)=>(C(),re("div",{onClick:s[0]||(s[0]=r=>n(e.row)),class:"flex h-full justify-center"},[N("span",Ez,[X($(uh))])]))}}),zz={class:"flex gap-2 flex-col"},Yz={key:0,class:"w-full flex flex-row gap-1 h-full"},Mz={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},qz={class:"flex w-full h-auto"},Iz=["onDrop","onDragleave","onDragenter"],Uz={class:"inline-flex items-center justify-center w-full pointer-events-none"},Wz={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},Dz=["onClick"],Lz={class:"font-medium text-red-500 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},Nz=["onClick"],jz={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},Bz=W({__name:"RowElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=te("");let r=te(!1);const o=la(),a=sn(),l=J({get:()=>n.modelValue,set:h=>i("update:modelValue",h)}),c=(h,p,m)=>{var g,b;if(s.value="",((g=h.dataTransfer)==null?void 0:g.getData("mode"))=="sort"){let Q=o.cutItem(a.getSourceDragUuid);Q!==null&&m.items.push(Q),a.setDragMode(""),h.stopImmediatePropagation()}if(a.getDragMode=="insert"){const Q=Number((b=h.dataTransfer)==null?void 0:b.getData("itemId"));m.items.push(Jr.getModelForType(Q)),a.setDragMode(""),h.stopImmediatePropagation()}},u=(h,p)=>{s.value="",h.stopImmediatePropagation()};a.$subscribe((h,p)=>{p.showPreview?r.value=!0:r.value=!1});const O=(h,p)=>{s.value=p,h.stopImmediatePropagation(),a.getDragMode=="sort"&&p!=a.getSourceDragUuid&&h.stopImmediatePropagation()},f=(h,p,m)=>{h==1&&p.addColumnAtTheBeginning(new Er),h==2&&p.addColumnAtTheEnd(new Er),h==3&&p.addColumnAt(new Er,m)},d=(h,p)=>{h.deleteColumnAt(p)};return(h,p)=>(C(),re("div",zz,[l.value.columns.length>0?(C(),re("div",Yz,[$(r)?Pe("",!0):(C(),re("div",{key:0,onClick:p[0]||(p[0]=m=>f(1,l.value,"")),class:"flex h-full justify-center place-self-center"},[N("span",Mz,[X($(uh))])])),(C(!0),re(Ce,null,An(l.value.columns,m=>(C(),re("div",qz,[N("div",{class:bt([{border:!$(r)},"flex-1 p-1 bg-white"])},[!$(r)&&m.items.length==0?(C(),re("div",{key:0,class:"h-8 group items-center content-justify w-full mb-2",onDrop:g=>c(g,l.value.uuid,m),onDragleave:g=>u(g,m.uuid),onDragenter:g=>O(g,m.uuid)},[N("div",Uz,[N("hr",{class:bt(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":s.value==m.uuid}])},null,2),N("span",Wz,[X($(fm),{class:bt([{"text-orange-500":s.value==m.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,Iz)):Pe("",!0),m.items.length>0?(C(),j($(Dm),{key:1,onDrop:g=>c(g,l.value.uuid,m),items:m.items},null,8,["onDrop","items"])):Pe("",!0)],2),$(r)?Pe("",!0):(C(),re("div",{key:0,onClick:g=>d(l.value,m.uuid),class:"flex h-auto justify-center place-self-center"},[N("span",Lz,[X($(OC))])],8,Dz)),$(r)?Pe("",!0):(C(),re("div",{key:1,onClick:g=>f(3,l.value,m.uuid),class:"flex h-auto justify-center place-self-center"},[N("span",jz,[X($(uh))])],8,Nz))]))),256))])):Pe("",!0),l.value.columns.length==0?(C(),j(Zz,{key:1,row:l.value},null,8,["row"])):Pe("",!0)]))}}),Gz={class:"fieldset bg-base-200 border-base-300 rounded-box w-full border p-4"},Fz={key:0,class:"fieldset-legend"},Hz={class:"inline-flex items-center justify-center w-full pointer-events-none"},Kz={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},Jz=W({__name:"FieldsetElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const s=te("");let r=te(!1);const o=sn(),a=J({get:()=>n.modelValue,set:O=>i("update:modelValue",O)}),l=(O,f,d)=>{var h;if(o.getDragMode=="insert"){const p=Number((h=O.dataTransfer)==null?void 0:h.getData("itemId"));d.items.push(Jr.getModelForType(p)),o.setDragMode(""),O.stopImmediatePropagation()}},c=O=>{s.value="",O.stopImmediatePropagation()};o.$subscribe((O,f)=>{f.showPreview?r.value=!0:r.value=!1});const u=(O,f)=>{s.value=f,O.stopImmediatePropagation(),o.getDragMode=="sort"&&f!=o.getSourceDragUuid&&O.stopImmediatePropagation()};return(O,f)=>(C(),re("fieldset",Gz,[a.value.label!=""?(C(),re("legend",Fz,ne(a.value.label),1)):Pe("",!0),a.value.items.length==0?(C(),re("div",{key:1,class:"h-8 group items-center content-justify w-full mb-2",onDrop:f[0]||(f[0]=d=>l(d,a.value.uuid,a.value)),onDragleave:f[1]||(f[1]=d=>c(d)),onDragenter:f[2]||(f[2]=d=>u(d,a.value.uuid))},[N("div",Hz,[N("hr",{class:bt(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":s.value==a.value.uuid}])},null,2),N("span",Kz,[X($(fm),{class:bt([{"text-orange-500":s.value==a.value.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],32)):Pe("",!0),a.value.items.length>0?(C(),j($(Dm),{key:2,items:a.value.items},null,8,["items"])):Pe("",!0)]))}}),eY={class:"overflow-auto h-full"},tY={class:"flex flex-col gap-2"},nY={key:0,class:"w-full"},iY=["onDragleave","onDragenter","onDrop"],sY={class:"inline-flex items-center justify-center w-full pointer-events-none"},rY={class:"absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-900 pointer-events-none"},oY=["onDragstart"],aY={class:"grow content-center items-center"},lY={key:0,class:"buttons absolute rounded-sm invisible right-0 bg-slate-100/70 flex flex-row gap-2"},cY=["onClick","title"],uY=["onClick","title"],OY=["onClick","title"],fY=["onClick"],dY=W({__name:"RenderElements",props:{items:{}},setup(t){const e=la(),n=sn(),i=te("");let s=te(!1);s.value=n.showPreview,n.$subscribe((d,h)=>{h.showPreview?s.value=!0:s.value=!1});const r=(d,h)=>{var p;d.dataTransfer.dropEffect="move",d.dataTransfer.effectAllowed="move",(p=d.dataTransfer)==null||p.setData("mode","sort"),n.setDragMode("sort"),n.setSourceDragUuid(h),d.stopImmediatePropagation()},o=(d,h)=>{i.value="",d.stopImmediatePropagation()},a=(d,h)=>{i.value=h,n.getDragMode=="sort"&&h!=n.getSourceDragUuid&&d.stopImmediatePropagation()},l=(d,h)=>{var p,m;if(((p=d.dataTransfer)==null?void 0:p.getData("mode"))=="sort"){if(i.value="",n.getSourceDragUuid==h){n.setDragMode(""),d.stopImmediatePropagation();return}e.moveItemBefore(n.getSourceDragUuid,h),n.setDragMode(""),d.stopImmediatePropagation()}if(n.dragMode=="insert"){const g=Number((m=d.dataTransfer)==null?void 0:m.getData("itemId"));e.addElementAfter(Jr.getModelForType(g),h),d.stopImmediatePropagation()}},c=d=>{e.deleteItem(d)},u=d=>{n.setActiveItem(d),n.setShowProperties(!0)},O=d=>{n.setActiveItem(d),n.setShowOptions(!0)},f=d=>{n.setActiveItem(d),n.setShowDependency(!0)};return(d,h)=>(C(),re("div",eY,[N("div",tY,[d.items.length>0?(C(!0),re(Ce,{key:0},An(d.items,p=>(C(),re("div",{class:"d-flex flex flex-col relative items-center",key:p.uuid},[p.type!==1||p.type===1&&!$(s)?(C(),re("div",nY,[$(s)?Pe("",!0):(C(),re("div",{key:0,class:"h-8 group w-full",onDragleave:He(m=>o(m,p.uuid),["self"]),onDragenter:He(m=>a(m,p.uuid),["self"]),onDrop:m=>l(m,p.uuid)},[N("div",sY,[N("hr",{class:bt(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":i.value==p.uuid}])},null,2),N("span",rY,[X($(fm),{class:bt([{"text-orange-500":i.value==p.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,iY)),N("div",{class:bt([{"border-white":!p.hasDependencys()||$(s),"border-blue-500":p.hasDependencys()&&!$(s)},"element w-full flex flex-row border-l-2 hover:border-orange-500 pl-2 transition duration-500 min-h-5",{" bg-slate-50":p.isFocused===!0}]),onDragstart:m=>r(m,p.uuid),draggable:"true"},[N("div",aY,[p.type===2?(C(),j(oz,{key:0,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0),p.type===1?(C(),j(cz,{key:1,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0),p.type===3?(C(),j(Az,{key:2,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0),p.type===4?(C(),j(bz,{key:3,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0),p.type===5?(C(),j(Rz,{key:4,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0),p.type===6?(C(),j($z,{key:5,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0),p.type===12?(C(),j(Jz,{key:6,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0),p.type===7?(C(),j(Bz,{key:7,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0),p.type===9?(C(),j(Tz,{key:8,modelValue:p,"onUpdate:modelValue":m=>p=m},null,8,["modelValue","onUpdate:modelValue"])):Pe("",!0)]),$(s)?Pe("",!0):(C(),re("div",lY,[N("div",{onClick:m=>f(p),title:d.$t("dependencies"),class:"m-2 cursor-pointer"},[X($(pC))],8,cY),p.type===3?(C(),re("div",{key:0,onClick:m=>O(p),title:d.$t("options"),class:"m-2 cursor-pointer"},[X($(hC))],8,uY)):Pe("",!0),N("div",{onClick:m=>u(p),title:d.$t("settings"),class:"m-2 cursor-pointer"},[X($(gC))],8,OY),N("div",{onClick:m=>c(p),class:"text-red-500 m-2 cursor-pointer"},[X($(xC))],8,fY)]))],42,oY)])):Pe("",!0)]))),128)):Pe("",!0)])]))}}),hY=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},Dm=hY(dY,[["__scopeId","data-v-ce332e58"]]),pY=W({__name:"Main",setup(t){const e=sn(),n=la();function i(s){var r;if(e.dragMode=="insert"){const o=Number((r=s.dataTransfer)==null?void 0:r.getData("itemId"));n.addElement(Jr.getModelForType(o))}}return(s,r)=>(C(),re("div",{class:"border m-1 p-4 rounded-xl w-full h-full shadow bg-white",onDrop:r[0]||(r[0]=o=>i(o)),onDragover:r[1]||(r[1]=He(()=>{},["prevent"]))},[X($(Dm),{items:$(n).getItems},null,8,["items"])],32))}}),mY={class:"mb-2"},gY={key:0,class:"mr-2"},$Y={class:"font-medium"},QY={class:"ml-2 text-xs bg-white px-2 py-1 rounded opacity-75"},yY={key:1,class:"ml-2 text-xs bg-green-200 px-2 py-1 rounded font-mono"},bY={key:0,class:"mt-2 ml-6 space-y-1"},SY={class:"p-2 bg-gray-50 rounded text-sm font-mono"},vY={class:"font-semibold text-gray-700"},PY={key:0,class:"p-2 bg-blue-50 rounded text-sm font-mono"},xY={class:"text-blue-800"},wY={key:0,class:"mt-2"},TY=W({__name:"NodeRenderer",props:{node:{},level:{},parentId:{},index:{}},setup(t){const e=t,n=gn("expandedNodes"),i=gn("toggleNode"),s=gn("getNodeType"),r=gn("getNodeColor"),o=gn("getColoredFormulaParts"),a=J(()=>`${e.parentId}-${e.index}`),l=J(()=>e.node.parts&&e.node.parts.length>0),c=J(()=>n==null?void 0:n.value.has(a.value)),u=J(()=>s?s(e.node.name):""),O=J(()=>r&&u.value?r(u.value):""),f=J(()=>e.node.unParsed),d=()=>{l.value&&i&&i(a.value)};return(h,p)=>{const m=m0("NodeRenderer",!0);return C(),re("div",mY,[N("div",{class:bt(["p-3 rounded-lg border-2 transition-all hover:shadow-md",O.value]),style:Gn({marginLeft:h.level*20+"px"})},[N("div",{class:"flex items-center cursor-pointer",onClick:d},[l.value?(C(),re("span",gY,[c.value?(C(),j($(Om),{key:0,size:16})):(C(),j($(cC),{key:1,size:16}))])):Pe("",!0),N("span",$Y,ne(h.node.name),1),N("span",QY,ne(u.value),1),h.node.result!==void 0?(C(),re("span",yY," = "+ne(h.node.result),1)):Pe("",!0)]),f.value?(C(),re("div",bY,[N("div",SY,[N("span",vY,ne(h.node.name)+" = ",1),$(o)?(C(!0),re(Ce,{key:0},An($(o)(f.value),(g,b)=>(C(),re("span",{key:b,class:bt(g.colorClass)},ne(g.text),3))),128)):Pe("",!0)]),h.node.parsed&&h.node.parsed!==h.node.unParsed?(C(),re("div",PY,[p[0]||(p[0]=N("span",{class:"font-semibold text-blue-700"},"Aufgelöst: ",-1)),N("span",xY,ne(h.node.parsed),1)])):Pe("",!0)])):Pe("",!0)],6),l.value&&c.value?(C(),re("div",wY,[(C(!0),re(Ce,null,An(h.node.parts,(g,b)=>(C(),j(m,{key:b,node:g,level:h.level+1,"parent-id":a.value,index:b},null,8,["node","level","parent-id","index"]))),128))])):Pe("",!0)])}}}),_Y={class:"w-full p-6 min-h-screen"},kY={key:0,class:"mb-4 bg-red-100 border-l-4 border-red-500 text-red-700 p-4",role:"alert"},RY={key:1,class:"text-center py-10"},XY={key:2,class:"grid grid-cols-1 gap-6"},CY={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white"},VY={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white border-l-4 border-green-500"},AY={class:"flex items-center justify-between bg-green-50 p-4 rounded-lg"},EY={class:"flex items-center space-x-3"},ZY={class:"text-lg font-medium text-gray-800"},zY={class:"text-2xl font-bold text-green-600"},YY={class:"text-sm text-gray-500"},MY=W({__name:"FormulaVisualizer",setup(t){const e=te(new Set),n=sn(),i=J(()=>n.getFormulaData),s=J(()=>n.getFormulaError),r=J(()=>n.isFormulaLoading),o=O=>{const f=new Set(e.value);f.has(O)?f.delete(O):f.add(O),e.value=f},a=O=>O.startsWith("$F")&&O.endsWith("$F")?"formula":O.startsWith("$P")&&O.endsWith("$P")?"parameter":O.startsWith("$V")&&O.endsWith("$V")?"variable":O.startsWith("$CV")&&O.endsWith("$CV")?"calc-variable":/^[0-9.]+$/.test(O)?"value":O.startsWith("calc")?"main":"function",l=O=>{switch(O){case"formula":return"bg-purple-100 border-purple-300 text-purple-800";case"parameter":return"bg-blue-100 border-blue-300 text-blue-800";case"variable":return"bg-orange-100 border-orange-300 text-orange-800";case"calc-variable":return"bg-teal-100 border-teal-300 text-teal-800";case"value":return"bg-lime-100 border-lime-400 text-lime-800";case"main":return"bg-red-100 border-red-300 text-red-800";case"function":return"bg-yellow-100 border-yellow-300 text-yellow-800";default:return"bg-gray-100 border-gray-300 text-gray-800"}},c=O=>{const f=[];let d=0;const h=/(\$F[^$]*\$F|\$P[^$]*\$P|\$CV[^$]*\$CV|\$V[^$]*\$V)/g;let p;for(;(p=h.exec(O))!==null;){p.index>d&&f.push({text:O.substring(d,p.index),colorClass:"text-gray-800"});const m=p[0];let g="";m.startsWith("$F")?g="text-purple-600 font-semibold":m.startsWith("$P")?g="text-blue-600 font-semibold":m.startsWith("$CV")?g="text-teal-600 font-semibold":m.startsWith("$V")&&(g="text-orange-600 font-semibold"),f.push({text:m,colorClass:g}),d=p.index+m.length}return di.value?i.value.reduce((O,f)=>O+(f.result||0),0):0;return Os("expandedNodes",e),Os("toggleNode",o),Os("getNodeType",a),Os("getNodeColor",l),Os("getColoredFormulaParts",c),(O,f)=>(C(),re("div",_Y,[s.value?(C(),re("div",kY,[f[0]||(f[0]=N("p",{class:"font-bold"},"Fehler",-1)),N("p",null,ne(s.value),1)])):Pe("",!0),r.value?(C(),re("div",RY,f[1]||(f[1]=[N("p",null,"Lade Formeldaten...",-1)]))):Pe("",!0),!r.value&&i.value?(C(),re("div",XY,[N("div",CY,[f[2]||(f[2]=N("h2",{class:"text-xl font-semibold mb-4 text-gray-700"},"Baum-Struktur",-1)),N("div",null,[(C(!0),re(Ce,null,An(i.value,(d,h)=>(C(),j(TY,{key:h,node:d,level:0,"parent-id":"root",index:h},null,8,["node","index"]))),128))])]),N("div",VY,[f[4]||(f[4]=N("h2",{class:"text-xl font-semibold mb-3 text-gray-700"},"Gesamtsumme",-1)),N("div",AY,[N("div",EY,[N("span",ZY,ne(i.value.map(d=>d.result||0).join(" + ")),1),f[3]||(f[3]=N("span",{class:"text-gray-500"},"=",-1)),N("span",zY,ne(u()),1)]),N("div",YY," ("+ne(i.value.length)+" Formel"+ne(i.value.length!==1?"n":"")+") ",1)])]),f[5]||(f[5]=am('

Legende

Formel ($F...$F)
Parameter ($P...$P)
Variable ($V...$V)
Kalk-Variable ($CV...$CV)
Wert (Zahlen)
Hauptformel
',1))])):Pe("",!0)]))}});let Eh=[],YP=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=YP[i])e=i+1;else return!0;if(e==n)return!1}}function DQ(t){return t>=127462&&t<=127487}const LQ=8205;function IY(t,e,n=!0,i=!0){return(n?MP:UY)(t,e,i)}function MP(t,e,n){if(e==t.length)return e;e&&qP(t.charCodeAt(e))&&IP(t.charCodeAt(e-1))&&e--;let i=sd(t,e);for(e+=NQ(i);e=0&&DQ(sd(t,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function UY(t,e,n){for(;e>0;){let i=MP(t,e-2,n);if(i=56320&&t<57344}function IP(t){return t>=55296&&t<56320}function NQ(t){return t<65536?1:2}class Be{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Lo(this,e,n);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(n,this.length,s,1),Vi.from(s,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Lo(this,e,n);let i=[];return this.decompose(e,n,i,0),Vi.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Fa(this),r=new Fa(e);for(let o=n,a=n;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(a+=s.value.length,s.done||a>=i)return!0}}iter(e=1){return new Fa(this,e)}iterRange(e,n=this.length){return new UP(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new WP(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Be.empty:e.length<=32?new Rt(e):Vi.from(Rt.split(e,[]))}}class Rt extends Be{constructor(e,n=WY(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,s){for(let r=0;;r++){let o=this.text[r],a=s+o.length;if((n?i:a)>=e)return new DY(s,a,i,o);s=a+1,i++}}decompose(e,n,i,s){let r=e<=0&&n>=this.length?this:new Rt(jQ(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),a=Ou(r.text,o.text.slice(),0,r.length);if(a.length<=32)i.push(new Rt(a,o.length+r.length));else{let l=a.length>>1;i.push(new Rt(a.slice(0,l)),new Rt(a.slice(l)))}}else i.push(r)}replace(e,n,i){if(!(i instanceof Rt))return super.replace(e,n,i);[e,n]=Lo(this,e,n);let s=Ou(this.text,Ou(i.text,jQ(this.text,0,e)),n),r=this.length+i.length-(n-e);return s.length<=32?new Rt(s,r):Vi.from(Rt.split(s,[]),r)}sliceString(e,n=this.length,i=` +`){[e,n]=Lo(this,e,n);let s="";for(let r=0,o=0;r<=n&&oe&&o&&(s+=i),er&&(s+=a.slice(Math.max(0,e-r),n-r)),r=l+1}return s}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(n.push(new Rt(i,s)),i=[],s=-1);return s>-1&&n.push(new Rt(i,s)),n}}class Vi extends Be{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,s){for(let r=0;;r++){let o=this.children[r],a=s+o.length,l=i+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,i,s);s=a+1,i=l+1}}decompose(e,n,i,s){for(let r=0,o=0;o<=n&&r=o){let c=s&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!c?i.push(a):a.decompose(e-o,n-o,i,c)}o=l+1}}replace(e,n,i){if([e,n]=Lo(this,e,n),i.lines=r&&n<=a){let l=o.replace(e-r,n-r,i),c=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>c>>6){let u=this.children.slice();return u[s]=l,new Vi(u,this.length-(n-e)+i.length)}return super.replace(r,a,l)}r=a+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` +`){[e,n]=Lo(this,e,n);let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=a.sliceString(e-o,n-o,i)),o=l+1}return s}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Vi))return 0;let i=0,[s,r,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=n,r+=n){if(s==o||r==a)return i;let l=this.children[s],c=e.children[r];if(l!=c)return i+l.scanIdentical(c,n);i+=l.length+1}}static from(e,n=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let h of e)h.flatten(d);return new Rt(d,n)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,a=[],l=0,c=-1,u=[];function O(d){let h;if(d.lines>r&&d instanceof Vi)for(let p of d.children)O(p);else d.lines>o&&(l>o||!l)?(f(),a.push(d)):d instanceof Rt&&l&&(h=u[u.length-1])instanceof Rt&&d.lines+h.lines<=32?(l+=d.lines,c+=d.length+1,u[u.length-1]=new Rt(h.text.concat(d.text),h.length+1+d.length)):(l+d.lines>s&&f(),l+=d.lines,c+=d.length+1,u.push(d))}function f(){l!=0&&(a.push(u.length==1?u[0]:Vi.from(u,c)),c=-1,l=u.length=0)}for(let d of e)O(d);return f(),a.length==1?a[0]:new Vi(a,n)}}Be.empty=new Rt([""],0);function WY(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Ou(t,e,n=0,i=1e9){for(let s=0,r=0,o=!0;r=n&&(l>i&&(a=a.slice(0,i-s)),s0?1:(e instanceof Rt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,a=s instanceof Rt?s.text.length:s.children.length;if(o==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof Rt){let l=s.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=s.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Rt?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class UP{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Fa(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*n,this.value=s.length<=i?s:n<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class WP{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:s}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Be.prototype[Symbol.iterator]=function(){return this.iter()},Fa.prototype[Symbol.iterator]=UP.prototype[Symbol.iterator]=WP.prototype[Symbol.iterator]=function(){return this});class DY{constructor(e,n,i,s){this.from=e,this.to=n,this.number=i,this.text=s}get length(){return this.to-this.from}}function Lo(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function tn(t,e,n=!0,i=!0){return IY(t,e,n,i)}function LY(t){return t>=56320&&t<57344}function NY(t){return t>=55296&&t<56320}function Tn(t,e){let n=t.charCodeAt(e);if(!NY(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return LY(i)?(n-55296<<10)+(i-56320)+65536:n}function Lm(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Ai(t){return t<65536?1:2}const Zh=/\r\n?|\n/;var en=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(en||(en={}));class Wi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return r+(e-s);r+=a}else{if(i!=en.Simple&&c>=e&&(i==en.TrackDel&&se||i==en.TrackBefore&&se))return null;if(c>e||c==e&&n<0&&!a)return e==s||n<0?r:r+l;r+=l}s=c}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,n=e){for(let i=0,s=0;i=0&&s<=n&&a>=e)return sn?"cover":!0;s=a}return!1}toString(){let e="";for(let n=0;n=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Wi(e)}static create(e){return new Wi(e)}}class Mt extends Wi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return zh(this,(n,i,s,r,o)=>e=e.replace(s,s+(i-n),o),!1),e}mapDesc(e,n=!1){return Yh(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let s=0,r=0;s=0){n[s]=a,n[s+1]=o;let l=s>>1;for(;i.length0&&Fs(i,n,r.text),r.forward(u),a+=u}let c=e[o++];for(;a>1].toJSON()))}return e}static of(e,n,i){let s=[],r=[],o=0,a=null;function l(u=!1){if(!u&&!s.length)return;of||O<0||f>n)throw new RangeError(`Invalid change range ${O} to ${f} (in doc of length ${n})`);let h=d?typeof d=="string"?Be.of(d.split(i||Zh)):d:Be.empty,p=h.length;if(O==f&&p==0)return;Oo&&on(s,O-o,-1),on(s,f-O,p),Fs(r,s,h),o=f}}return c(e),l(!a),a}static empty(e){return new Mt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let s=0;sa&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)n.push(r[0],0);else{for(;i.length=0&&n<=0&&n==t[s+1]?t[s]+=e:s>=0&&e==0&&t[s]==0?t[s+1]+=n:i?(t[s]+=e,t[s+1]+=n):t.push(e,n)}function Fs(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(s,c,r,u,O),s=c,r=u}}}function Yh(t,e,n,i=!1){let s=[],r=i?[]:null,o=new Sl(t),a=new Sl(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);on(s,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len=0&&l=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let O=Math.min(u,a.len);c+=O,u-=O,a.forward(O)}else if(a.ins==0&&a.lenl||o.ins>=0&&o.len>l)&&(a||i.length>c),r.forward2(l),o.forward(l)}}}}class Sl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Be.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Be.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Rr{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new Rr(i,s,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return B.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return B.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return B.range(e.anchor,e.head)}static create(e,n,i){return new Rr(e,n,i)}}class B{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:B.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new B(e.ranges.map(n=>Rr.fromJSON(n)),e.main)}static single(e,n=e){return new B([B.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?8:0)|r)}static normalized(e,n=0){let i=e[n];e.sort((s,r)=>s.from-r.from),n=e.indexOf(i);for(let s=1;sr.head?B.range(l,a):B.range(a,l))}}return new B(e,n)}}function LP(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Nm=0;class pe{constructor(e,n,i,s,r){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=s,this.id=Nm++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new pe(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:jm),!!e.static,e.enables)}of(e){return new fu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new fu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new fu(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function jm(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class fu{constructor(e,n,i,s){this.dependencies=e,this.facet=n,this.type=i,this.value=s,this.id=Nm++}dynamicSlot(e){var n;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let O of this.dependencies)O=="doc"?l=!0:O=="selection"?c=!0:(((n=e[O.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[O.id]);return{create(O){return O.values[o]=i(O),1},update(O,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||Mh(O,u)){let d=i(O);if(a?!BQ(d,O.values[o],s):!s(d,O.values[o]))return O.values[o]=d,1}return 0},reconfigure:(O,f)=>{let d,h=f.config.address[r];if(h!=null){let p=Hu(f,h);if(this.dependencies.every(m=>m instanceof pe?f.facet(m)===O.facet(m):m instanceof Bt?f.field(m,!1)==O.field(m,!1):!0)||(a?BQ(d=i(O),p,s):s(d=i(O),p)))return O.values[o]=p,0}else d=i(O);return O.values[o]=d,1}}}}function BQ(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[l.id]),s=n.map(l=>l.type),r=i.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;ui===s),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Ac).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,s)=>{let r=i.values[n],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[n]=o,1)},reconfigure:(i,s)=>{let r=i.facet(Ac),o=s.facet(Ac),a;return(a=r.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(i.values[n]=a.create(i),1):s.config.address[this.id]!=null?(i.values[n]=s.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,Ac.of({field:this,create:e})]}get extension(){return this}}const xr={lowest:4,low:3,default:2,high:1,highest:0};function Pa(t){return e=>new NP(e,t)}const $r={highest:Pa(xr.highest),high:Pa(xr.high),default:Pa(xr.default),low:Pa(xr.low),lowest:Pa(xr.lowest)};class NP{constructor(e,n){this.inner=e,this.prec=n}}class Kl{of(e){return new qh(this,e)}reconfigure(e){return Kl.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class qh{constructor(e,n){this.compartment=e,this.inner=n}}class Fu{constructor(e,n,i,s,r,o){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let s=[],r=Object.create(null),o=new Map;for(let f of BY(e,n,o))f instanceof Bt?s.push(f):(r[f.facet.id]||(r[f.facet.id]=[])).push(f);let a=Object.create(null),l=[],c=[];for(let f of s)a[f.id]=c.length<<1,c.push(d=>f.slot(d));let u=i==null?void 0:i.config.facets;for(let f in r){let d=r[f],h=d[0].facet,p=u&&u[f]||[];if(d.every(m=>m.type==0))if(a[h.id]=l.length<<1|1,jm(p,d))l.push(i.facet(h));else{let m=h.combine(d.map(g=>g.value));l.push(i&&h.compare(m,i.facet(h))?i.facet(h):m)}else{for(let m of d)m.type==0?(a[m.id]=l.length<<1|1,l.push(m.value)):(a[m.id]=c.length<<1,c.push(g=>m.dynamicSlot(g)));a[h.id]=c.length<<1,c.push(m=>jY(m,h,d))}}let O=c.map(f=>f(a));return new Fu(e,o,O,a,l,r)}}function BY(t,e,n){let i=[[],[],[],[],[]],s=new Map;function r(o,a){let l=s.get(o);if(l!=null){if(l<=a)return;let c=i[l].indexOf(o);c>-1&&i[l].splice(c,1),o instanceof qh&&n.delete(o.compartment)}if(s.set(o,a),Array.isArray(o))for(let c of o)r(c,a);else if(o instanceof qh){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),r(c,a)}else if(o instanceof NP)r(o.inner,o.prec);else if(o instanceof Bt)i[a].push(o),o.provides&&r(o.provides,a);else if(o instanceof fu)i[a].push(o),o.facet.extensions&&r(o.facet.extensions,xr.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(c,a)}}return r(t,xr.default),i.reduce((o,a)=>o.concat(a))}function Ha(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let s=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|s}function Hu(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const jP=pe.define(),Ih=pe.define({combine:t=>t.some(e=>e),static:!0}),BP=pe.define({combine:t=>t.length?t[0]:void 0,static:!0}),GP=pe.define(),FP=pe.define(),HP=pe.define(),KP=pe.define({combine:t=>t.length?t[0]:!1});class Vs{constructor(e,n){this.type=e,this.value=n}static define(){return new GY}}class GY{of(e){return new Vs(this,e)}}class FY{constructor(e){this.map=e}of(e){return new Xe(this,e)}}class Xe{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Xe(this.type,n)}is(e){return this.type==e}static define(e={}){return new FY(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(n);r&&i.push(r)}return i}}Xe.reconfigure=Xe.define();Xe.appendConfig=Xe.define();class Et{constructor(e,n,i,s,r,o){this.startState=e,this.changes=n,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&LP(i,n.newLength),r.some(a=>a.type==Et.time)||(this.annotations=r.concat(Et.time.of(Date.now())))}static create(e,n,i,s,r,o){return new Et(e,n,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Et.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Et.time=Vs.define();Et.userEvent=Vs.define();Et.addToHistory=Vs.define();Et.remote=Vs.define();function HY(t,e){let n=[];for(let i=0,s=0;;){let r,o;if(i=t[i]))r=t[i++],o=t[i++];else if(s=0;s--){let r=i[s](t);r instanceof Et?t=r:Array.isArray(r)&&r.length==1&&r[0]instanceof Et?t=r[0]:t=ex(e,Ro(r),!1)}return t}function JY(t){let e=t.startState,n=e.facet(HP),i=t;for(let s=n.length-1;s>=0;s--){let r=n[s](t);r&&Object.keys(r).length&&(i=JP(i,Uh(e,r,t.changes.newLength),!0))}return i==t?t:Et.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const eM=[];function Ro(t){return t==null?eM:Array.isArray(t)?t:[t]}var yt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(yt||(yt={}));const tM=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Wh;try{Wh=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function nM(t){if(Wh)return Wh.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||tM.test(n)))return!0}return!1}function iM(t){return e=>{if(!/\S/.test(e))return yt.Space;if(nM(e))return yt.Word;for(let n=0;n-1)return yt.Word;return yt.Other}}class Ie{constructor(e,n,i,s,r,o){this.config=e,this.doc=n,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let a=0;as.set(c,l)),n=null),s.set(a.value.compartment,a.value.extension)):a.is(Xe.reconfigure)?(n=null,i=a.value):a.is(Xe.appendConfig)&&(n=null,i=Ro(i).concat(a.value));let r;n?r=e.startState.values.slice():(n=Fu.resolve(i,s,this),r=new Ie(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(Ih)?e.newSelection:e.newSelection.asSingle();new Ie(n,e.newDoc,o,r,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:B.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Ro(i.effects);for(let a=1;ao.spec.fromJSON(a,l)))}}return Ie.create({doc:e.doc,selection:B.fromJSON(e.selection),extensions:n.extensions?s.concat([n.extensions]):s})}static create(e={}){let n=Fu.resolve(e.extensions||[],new Map),i=e.doc instanceof Be?e.doc:Be.of((e.doc||"").split(n.staticFacet(Ie.lineSeparator)||Zh)),s=e.selection?e.selection instanceof B?e.selection:B.single(e.selection.anchor,e.selection.head):B.single(0);return LP(s,i.length),n.staticFacet(Ih)||(s=s.asSingle()),new Ie(n,i,s,n.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(Ie.tabSize)}get lineBreak(){return this.facet(Ie.lineSeparator)||` +`}get readOnly(){return this.facet(KP)}phrase(e,...n){for(let i of this.facet(Ie.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>n.length?i:n[r-1]})),e}languageDataAt(e,n,i=-1){let s=[];for(let r of this.facet(jP))for(let o of r(this,n,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return iM(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,a=e-i;for(;o>0;){let l=tn(n,o,!1);if(r(n.slice(l,o))!=yt.Word)break;o=l}for(;at.length?t[0]:4});Ie.lineSeparator=BP;Ie.readOnly=KP;Ie.phrases=pe.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(s=>t[s]==e[s])}});Ie.languageData=jP;Ie.changeFilter=GP;Ie.transactionFilter=FP;Ie.transactionExtender=HP;Kl.reconfigure=Xe.define();function Ji(t,e,n={}){let i={};for(let s of t)for(let r of Object.keys(s)){let o=s[r],a=i[r];if(a===void 0)i[r]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,r))i[r]=n[r](a,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class Ur{eq(e){return this==e}range(e,n=e){return Dh.create(e,n,this)}}Ur.prototype.startSide=Ur.prototype.endSide=0;Ur.prototype.point=!1;Ur.prototype.mapMode=en.TrackDel;let Dh=class tx{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new tx(e,n,i)}};function Lh(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Bm{constructor(e,n,i,s){this.from=e,this.to=n,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,s=0){let r=i?this.to:this.from;for(let o=s,a=r.length;;){if(o==a)return o;let l=o+a>>1,c=r[l]-e||(i?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,n,i,s){for(let r=this.findIndex(n,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||f==d&&c.startSide>0&&c.endSide<=0)continue;(d-f||c.endSide-c.startSide)<0||(o<0&&(o=f),c.point&&(a=Math.max(a,d-f)),i.push(c),s.push(f-o),r.push(d-o))}return{mapped:i.length?new Bm(s,r,i,a):null,pos:o}}}class Ke{constructor(e,n,i,s){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=s}static create(e,n,i,s){return new Ke(e,n,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(i&&(n=n.slice().sort(Lh)),this.isEmpty)return n.length?Ke.of(n):this;let a=new nx(this,null,-1).goto(0),l=0,c=[],u=new _s;for(;a.value||l=0){let O=n[l++];u.addInner(O.from,O.to,O.value)||c.push(O)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||ra.to||r=r&&e<=r+o.length&&o.between(r,e-r,n-r,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return vl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return vl.from(e).goto(n)}static compare(e,n,i,s,r=-1){let o=e.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=r),a=n.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=r),l=GQ(o,a,i),c=new xa(o,l,r),u=new xa(a,l,r);i.iterGaps((O,f,d)=>FQ(c,O,u,f,d,s)),i.empty&&i.length==0&&FQ(c,0,u,0,0,s)}static eq(e,n,i=0,s){s==null&&(s=999999999);let r=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let a=GQ(r,o),l=new xa(r,a,0).goto(i),c=new xa(o,a,0).goto(i);for(;;){if(l.to!=c.to||!Nh(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>s)return!0;l.next(),c.next()}}static spans(e,n,i,s,r=-1){let o=new xa(e,null,r).goto(n),a=n,l=o.openStart;for(;;){let c=Math.min(o.to,i);if(o.point){let u=o.activeForPoint(o.to),O=o.pointFroma&&(s.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>i)return l+(o.point&&o.to>i?1:0);a=o.to,o.next()}}static of(e,n=!1){let i=new _s;for(let s of e instanceof Dh?[e]:n?sM(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return Ke.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=Ke.empty;s=s.nextLayer)n=new Ke(s.chunkPos,s.chunk,n,Math.max(s.maxPoint,n.maxPoint));return n}}Ke.empty=new Ke([],[],null,-1);function sM(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(Lh);e=i}return t}Ke.empty.nextLayer=Ke.empty;class _s{finishChunk(e){this.chunks.push(new Bm(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new _s)).add(e,n,i)}addInner(e,n,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(Ke.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ke.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function GQ(t,e,n){let i=new Map;for(let r of t)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new nx(o,n,i,r));return s.length==1?s[0]:new vl(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)rd(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)rd(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),rd(this.heap,0)}}}function rd(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let s=t[i];if(i+1=0&&(s=t[i+1],i++),n.compare(s)<0)break;t[i]=n,t[e]=s,e=i}}class xa{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=vl.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Ec(this.active,e),Ec(this.activeTo,e),Ec(this.activeRank,e),this.minActive=HQ(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:s,rank:r}=this.cursor;for(;n0;)n++;Zc(this.active,n,i),Zc(this.activeTo,n,s),Zc(this.activeRank,n,r),e&&Zc(e,n,this.cursor.from),this.minActive=HQ(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&Ec(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function FQ(t,e,n,i,s,r){t.goto(e),n.goto(i);let o=i+s,a=i,l=i-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,O=u<0?t.to+l:n.to,f=Math.min(O,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Nh(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(a,f,t.point,n.point):f>a&&!Nh(t.active,n.active)&&r.compareRange(a,f,t.active,n.active),O>o)break;(c||t.openEnd!=n.openEnd)&&r.boundChange&&r.boundChange(O),a=O,u<=0&&t.next(),u>=0&&n.next()}}function Nh(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function HQ(t,e){let n=-1,i=1e9;for(let s=0;s=e)return s;if(s==t.length)break;r+=t.charCodeAt(s)==9?n-r%n:1,s=tn(t,s)}return i===!0?-1:t.length}const Bh="ͼ",KQ=typeof Symbol>"u"?"__"+Bh:Symbol.for(Bh),Gh=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),JQ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class or{constructor(e,n){this.rules=[];let{finish:i}=n||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,a,l,c){let u=[],O=/^@(\w+)\b/.exec(o[0]),f=O&&O[1]=="keyframes";if(O&&a==null)return l.push(o[0]+";");for(let d in a){let h=a[d];if(/&/.test(d))r(d.split(/,\s*/).map(p=>o.map(m=>p.replace(/&/,m))).reduce((p,m)=>p.concat(m)),h,l);else if(h&&typeof h=="object"){if(!O)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),h,u,f)}else h!=null&&u.push(d.replace(/_.*/,"").replace(/[A-Z]/g,p=>"-"+p.toLowerCase())+": "+h+";")}(u.length||f)&&l.push((i&&!O&&!c?o.map(i):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=JQ[KQ]||1;return JQ[KQ]=e+1,Bh+e.toString(36)}static mount(e,n,i){let s=e[Gh],r=i&&i.nonce;s?r&&s.setNonce(r):s=new rM(e,r),s.mount(Array.isArray(n)?n:[n],e)}}let ey=new Map;class rM{constructor(e,n){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=ey.get(i);if(r)return e[Gh]=r;this.sheet=new s.CSSStyleSheet,ey.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Gh]=this}mount(e,n){let i=this.sheet,s=0,r=0;for(let o=0;o-1&&(this.modules.splice(l,1),r--,l=-1),l==-1){if(this.modules.splice(r++,0,a),i)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},oM=typeof navigator<"u"&&/Mac/.test(navigator.platform),aM=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Jt=0;Jt<10;Jt++)ar[48+Jt]=ar[96+Jt]=String(Jt);for(var Jt=1;Jt<=24;Jt++)ar[Jt+111]="F"+Jt;for(var Jt=65;Jt<=90;Jt++)ar[Jt]=String.fromCharCode(Jt+32),Pl[Jt]=String.fromCharCode(Jt);for(var od in ar)Pl.hasOwnProperty(od)||(Pl[od]=ar[od]);function lM(t){var e=oM&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||aM&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Pl:ar)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function lt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var s=n[i];typeof s=="string"?t.setAttribute(i,s):s!=null&&(t[i]=s)}e++}for(;e.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function uM(t,e,n,i,s,r,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,O=!1;u&&!O;)if(u.nodeType==1){let f,d=u==l.body,h=1,p=1;if(d)f=cM(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(O=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let b=u.getBoundingClientRect();({scaleX:h,scaleY:p}=sx(u,b)),f={left:b.left,right:b.left+u.clientWidth*h,top:b.top,bottom:b.top+u.clientHeight*p}}let m=0,g=0;if(s=="nearest")e.top0&&e.bottom>f.bottom+g&&(g=e.bottom-f.bottom+o)):e.bottom>f.bottom&&(g=e.bottom-f.bottom+o,n<0&&e.top-g0&&e.right>f.right+m&&(m=e.right-f.right+r)):e.right>f.right&&(m=e.right-f.right+r,n<0&&e.leftf.bottom||e.leftf.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function OM(t){let e=t.ownerDocument,n,i;for(let s=t.parentNode;s&&!(s==e.body||n&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),!n&&s.scrollWidth>s.clientWidth&&(n=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:n,y:i}}class fM{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?ji(n):0),i,Math.min(e.focusOffset,i?ji(i):0))}set(e,n,i,s){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=s}}let ao=null;function rx(t){if(t.setActive)return t.setActive();if(ao)return t.focus(ao);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(ao==null?{get preventScroll(){return ao={preventScroll:!0},!0}}:void 0),!ao){ao=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function lx(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=ji(n)}else if(n.parentNode&&!Ku(n))i=Wr(n),n=n.parentNode;else return null}}function cx(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&in)return O.domBoundsAround(e,n,c);if(f>=e&&s==-1&&(s=l,r=c),c>n&&O.dom.parentNode==this.dom){o=l,a=u;break}u=f,c=f+O.breakAfter}return{from:r,to:a<0?i+this.length:a,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=Gm){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Ox(t,e,n,i,s,r,o,a,l){let{children:c}=t,u=c.length?c[e]:null,O=r.length?r[r.length-1]:null,f=O?O.breakAfter:o;if(!(e==i&&u&&!o&&!f&&r.length<2&&u.merge(n,s,r.length?O:null,n==0,a,l))){if(i0&&(!o&&r.length&&u.merge(n,u.length,r[0],!1,a,0)?u.breakAfter=r.shift().breakAfter:(n2);var me={mac:ry||/Mac/.test(_n.platform),windows:/Win/.test(_n.platform),linux:/Linux|X11/.test(_n.platform),ie:mf,ie_version:dx?Hh.documentMode||6:Jh?+Jh[1]:Kh?+Kh[1]:0,gecko:sy,gecko_version:sy?+(/Firefox\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,chrome:!!ad,chrome_version:ad?+ad[1]:0,ios:ry,android:/Android\b/.test(_n.userAgent),safari:hx,webkit_version:pM?+(/\bAppleWebKit\/(\d+)/.exec(_n.userAgent)||[0,0])[1]:0,tabSize:Hh.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const mM=256;class bi extends ut{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof bi)||this.length-(n-e)+i.length>mM||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new bi(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new ln(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return gM(this.dom,e,n)}}class ks extends ut{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let s of n)s.setParent(this)}setAttrs(e){if(ox(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,s,r,o){return i&&(!(i instanceof ks&&i.mark.eq(this.mark))||e&&r<=0||ne&&n.push(i=e&&(s=r),i=l,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new ks(this.mark,n,o)}domAtPos(e){return px(this,e)}coordsAt(e,n){return gx(this,e,n)}}function gM(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&n<0||e==i&&n>=0?me.chrome||me.gecko||(e?(s--,o=1):r=0)?0:a.length-1];return me.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?Jl(l,o<0):l||null}class Hs extends ut{static create(e,n,i){return new Hs(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Hs.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,s,r,o){return i&&(!(i instanceof Hs)||!this.widget.compare(i.widget)||e>0&&r<=0||n0)?ln.before(this.dom):ln.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?s.length-1:0;r=s[a],!(e>0?a==0:a==s.length-1||r.top0?ln.before(this.dom):ln.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Be.empty}get isHidden(){return!0}}bi.prototype.children=Hs.prototype.children=jo.prototype.children=Gm;function px(t,e){let n=t.dom,{children:i}=t,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof ks&&s.length&&(i=s[s.length-1])instanceof ks&&i.mark.eq(e.mark)?mx(i,e.children[0],n-1):(s.push(e),e.setParent(t)),t.length+=e.length}function gx(t,e,n){let i=null,s=-1,r=null,o=-1;function a(c,u){for(let O=0,f=0;O=u&&(d.children.length?a(d,u-f):(!r||r.isHidden&&(n>0||QM(r,d)))&&(h>u||f==h&&d.getSide()>0)?(r=d,o=u-f):(f-1?1:0)!=s.length-(n&&s.indexOf(n)>-1?1:0))return!1;for(let r of i)if(r!=n&&(s.indexOf(r)==-1||t[r]!==e[r]))return!1;return!0}function tp(t,e,n){let i=!1;if(e)for(let s in e)n&&s in n||(i=!0,s=="style"?t.style.cssText="":t.removeAttribute(s));if(n)for(let s in n)e&&e[s]==n[s]||(i=!0,s=="style"?t.style.cssText=n[s]:t.setAttribute(s,n[s]));return i}function yM(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new lr(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=$x(e,n);i=(r?n?-3e8:-1:5e8)-1,s=(o?n?2e8:1:-6e8)+1}return new lr(e,i,s,n,e.widget||null,!0)}static line(e){return new tc(e)}static set(e,n=!1){return Ke.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}xe.none=Ke.empty;class ec extends xe{constructor(e){let{start:n,end:i}=$x(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof ec&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&Ju(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}ec.prototype.point=!1;class tc extends xe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof tc&&this.spec.class==e.spec.class&&Ju(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}tc.prototype.mapMode=en.TrackBefore;tc.prototype.point=!0;class lr extends xe{constructor(e,n,i,s,r,o){super(n,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?n<=0?en.TrackBefore:en.TrackAfter:en.TrackDel}get type(){return this.startSide!=this.endSide?Qn.WidgetRange:this.startSide<=0?Qn.WidgetBefore:Qn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof lr&&bM(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}lr.prototype.point=!0;function $x(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function bM(t,e){return t==e||!!(t&&e&&t.compare(e))}function hu(t,e,n,i=0){let s=n.length-1;s>=0&&n[s]+i>=t?n[s]=Math.max(n[s],e):n.push(t,e)}class Vt extends ut{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,i,s,r,o){if(i){if(!(i instanceof Vt))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),fx(this,e,n,i?i.children.slice():[],r,o),!0}split(e){let n=new Vt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i,off:s}=this.childPos(e);s&&(n.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ju(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){mx(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=ep(n,this.attrs||{})),i&&(this.attrs=ep({class:i},this.attrs||{}))}domAtPos(e){return px(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(ox(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(tp(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let s=this.dom.lastChild;for(;s&&ut.get(s)instanceof ks;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=ut.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!me.ios||!this.children.some(r=>r instanceof bi))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof bi)||/[^ -~]/.test(i.text))return null;let s=No(i.dom);if(s.length!=1)return null;e+=s[0].width,n=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=gx(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=n){if(r instanceof Vt)return r;if(o>n)break}s=o+r.breakAfter}return null}}class $s extends ut{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,s,r,o){return i&&(!(i instanceof $s)||!this.widget.compare(i.widget)||e>0&&r<=0||n0}}class np extends es{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Ja{constructor(e,n,i,s){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof $s&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Vt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(zc(new jo(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof $s)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(zc(new bi(this.text.slice(this.textOff,this.textOff+s)),n),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,n,i,s){this.buildText(n-e,i,s),this.pos=n,this.openStart<0&&(this.openStart=s)}point(e,n,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof lr){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(i instanceof lr)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new $s(i.widget||Bo.block,a,i));else{let l=Hs.create(i.widget||Bo.inline,a,a?0:i.startSide),c=this.atCursorPos&&!l.isEditable&&r<=s.length&&(e0),u=!l.isEditable&&(es.length||i.startSide<=0),O=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),c&&(O.append(zc(new jo(1),s),r),r=s.length+Math.max(0,r-s.length)),O.append(zc(l,s),r),this.atCursorPos=u,this.pendingBuffer=u?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=r)}static build(e,n,i,s,r){let o=new Ja(e,n,i,r);return o.openEnd=Ke.spans(s,n,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function zc(t,e){for(let n of e)t=new ks(n,[t],t.length);return t}class Bo extends es{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Bo.inline=new Bo("span");Bo.block=new Bo("div");var $t=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}($t||($t={}));const Lr=$t.LTR,Fm=$t.RTL;function Qx(t){let e=[];for(let n=0;n=n){if(a.level==i)return o;(r<0||(s!=0?s<0?a.fromn:e[r].level>a.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function bx(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;p-=3)if(wi[p+1]==-d){let m=wi[p+2],g=m&2?s:m&4?m&1?r:s:0;g&&(ct[O]=ct[wi[p]]=g),a=p;break}}else{if(wi.length==189)break;wi[a++]=O,wi[a++]=f,wi[a++]=l}else if((h=ct[O])==2||h==1){let p=h==s;l=p?0:1;for(let m=a-3;m>=0;m-=3){let g=wi[m+2];if(g&2)break;if(p)wi[m+2]|=2;else{if(g&4)break;wi[m+2]|=4}}}}}function TM(t,e,n,i){for(let s=0,r=i;s<=n.length;s++){let o=s?n[s-1].to:t,a=sl;)h==m&&(h=n[--p].from,m=p?n[p-1].to:t),ct[--h]=d;l=u}else r=c,l++}}}function sp(t,e,n,i,s,r,o){let a=i%2?2:1;if(i%2==s%2)for(let l=e,c=0;ll&&o.push(new Ks(l,p.from,d));let m=p.direction==Lr!=!(d%2);rp(t,m?i+1:i,s,p.inner,p.from,p.to,o),l=p.to}h=p.to}else{if(h==n||(u?ct[h]!=a:ct[h]==a))break;h++}f?sp(t,l,h,i+1,s,f,o):le;){let u=!0,O=!1;if(!c||l>r[c-1].to){let p=ct[l-1];p!=a&&(u=!1,O=p==16)}let f=!u&&a==1?[]:null,d=u?i:i+1,h=l;e:for(;;)if(c&&h==r[c-1].to){if(O)break e;let p=r[--c];if(!u)for(let m=p.from,g=c;;){if(m==e)break e;if(g&&r[g-1].to==m)m=r[--g].from;else{if(ct[m-1]==a)break e;break}}if(f)f.push(p);else{p.toct.length;)ct[ct.length]=256;let i=[],s=e==Lr?0:1;return rp(t,s,s,n,0,t.length,i),i}function Sx(t){return[new Ks(0,t,0)]}let vx="";function kM(t,e,n,i,s){var r;let o=i.head-t.from,a=Ks.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),l=e[a],c=l.side(s,n);if(o==c){let f=a+=s?1:-1;if(f<0||f>=e.length)return null;l=e[a=f],o=l.side(!s,n),c=l.side(s,n)}let u=tn(t.text,o,l.forward(s,n));(ul.to)&&(u=c),vx=t.text.slice(Math.min(o,u),Math.max(o,u));let O=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return O&&u==c&&O.level+(s?0:1)t.some(e=>e)}),Xx=pe.define({combine:t=>t.some(e=>e)}),Cx=pe.define();class Co{constructor(e,n="nearest",i="nearest",s=5,r=5,o=!1){this.range=e,this.y=n,this.x=i,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new Co(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Co(B.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Yc=Xe.define({map:(t,e)=>t.map(e)}),Vx=Xe.define();function Xn(t,e,n){let i=t.facet(Tx);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const ds=pe.define({combine:t=>t.length?t[0]:!0});let XM=0;const $o=pe.define({combine(t){return t.filter((e,n)=>{for(let i=0;i{let l=[];return o&&l.push(wl.of(c=>{let u=c.plugin(a);return u?o(u):xe.none})),r&&l.push(r(a)),l})}static fromClass(e,n){return Xt.define((i,s)=>new e(i,s),n)}}class ld{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(Xn(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){Xn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){Xn(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Ax=pe.define(),Jm=pe.define(),wl=pe.define(),Ex=pe.define(),eg=pe.define(),Zx=pe.define();function ay(t,e){let n=t.state.facet(Zx);if(!n.length)return n;let i=n.map(r=>r instanceof Function?r(t):r),s=[];return Ke.spans(i,e.from,e.to,{point(){},span(r,o,a,l){let c=r-e.from,u=o-e.from,O=s;for(let f=a.length-1;f>=0;f--,l--){let d=a[f].spec.bidiIsolate,h;if(d==null&&(d=RM(e.text,c,u)),l>0&&O.length&&(h=O[O.length-1]).to==c&&h.direction==d)h.to=u,O=h.inner;else{let p={from:c,to:u,direction:d,inner:[]};O.push(p),O=p.inner}}}}),s}const zx=pe.define();function tg(t){let e=0,n=0,i=0,s=0;for(let r of t.state.facet(zx)){let o=r(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:n,top:i,bottom:s}}const za=pe.define();class oi{constructor(e,n,i,s){this.fromA=e,this.toA=n,this.fromB=i,this.toB=s}join(e){return new oi(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let s=e[n-1];if(!(s.fromA>i.toA)){if(s.toAu)break;r+=2}if(!l)return i;new oi(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),o=l.toA,a=l.toB}}}class eO{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Mt.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,a,l)=>s.push(new oi(r,o,a,l))),this.changedRanges=s}static create(e,n,i){return new eO(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class ly extends ut{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=xe.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Vt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new oi(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?s=this.domChanged.newSel.head:!YM(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?VM(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;i=new oi(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(me.ie||me.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.updateDeco(),l=ZM(o,a,e.changes);return i=oi.extendWithRanges(i,l),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=me.chrome||me.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?s[o]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:O}=a,f,d,h,p;if(i&&i.range.fromBu){let y=Ja.build(this.view.state.doc,u,i.range.fromB,this.decorations,this.dynamicDecorationMap),S=Ja.build(this.view.state.doc,i.range.toB,O,this.decorations,this.dynamicDecorationMap);d=y.breakAtStart,h=y.openStart,p=S.openEnd;let v=this.compositionView(i);S.breakAtStart?v.breakAfter=1:S.content.length&&v.merge(v.length,v.length,S.content[0],!1,S.openStart,0)&&(v.breakAfter=S.content[0].breakAfter,S.content.shift()),y.content.length&&v.merge(0,0,y.content[y.content.length-1],!0,0,y.openEnd)&&y.content.pop(),f=y.content.concat(v).concat(S.content)}else({content:f,breakAtStart:d,openStart:h,openEnd:p}=Ja.build(this.view.state.doc,u,O,this.decorations,this.dynamicDecorationMap));let{i:m,off:g}=r.findPos(c,1),{i:b,off:Q}=r.findPos(l,-1);Ox(this,b,Q,m,g,f,d,h,p)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(Vx)&&(this.editContextFormatting=i.value)}compositionView(e){let n=new bi(e.text.nodeValue);n.flags|=8;for(let{deco:s}of e.marks)n=new ks(s,[n],n.length);let i=new Vt;return i.append(n,0),i}fixCompositionDOM(e){let n=(r,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let a=ut.get(r);a&&a!=o&&(a.dom=null),o.setDOM(r)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];n(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)i=s.childPos(i.off,1),s=s.children[i.i],n(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&!(this.view.state.facet(ds)||this.dom.tabIndex>-1)&&du(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||n||r))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(me.gecko&&a.empty&&!this.hasComposition&&CM(l)){let O=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(O,l.node.childNodes[l.offset]||null)),l=c=new ln(O,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!Ka(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Ka(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{me.android&&me.chrome&&this.dom.contains(u.focusNode)&&zM(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let O=xl(this.view.root);if(O)if(a.empty){if(me.gecko){let f=AM(l.node,l.offset);if(f&&f!=3){let d=(f==1?lx:cx)(l.node,l.offset);d&&(l=new ln(d.node,d.offset))}}O.collapse(l.node,l.offset),a.bidiLevel!=null&&O.caretBidiLevel!==void 0&&(O.caretBidiLevel=a.bidiLevel)}else if(O.extend){O.collapse(l.node,l.offset);try{O.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),f.setEnd(c.node,c.offset),f.setStart(l.node,l.offset),O.removeAllRanges(),O.addRange(f)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new ln(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new ln(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Ka(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=xl(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let o=Vt.find(this,n.head);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);i.collapse(u.node,u.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let O=e.observer.selectionRange;e.docView.posFromDOM(O.anchorNode,O.anchorOffset)!=n.from&&i.collapse(s,r)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let s=e.offset;!i&&s=0;s--){let r=ut.get(n.childNodes[s]);r instanceof Vt&&(i=r.domAtPos(r.length))}return i?new ln(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=ut.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n=0;o--){let a=this.children[o],l=r-a.breakAfter,c=l-a.length;if(le||a.covers(1))&&(!i||a instanceof Vt&&!(i instanceof Vt&&n>=0)))i=a,s=c;else if(i&&c==e&&l==e&&a instanceof $s&&Math.abs(n)<2){if(a.deco.startSide<0)break;o&&(i=null)}r=c}return i?i.coordsAt(e-s,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),s=this.children[n];if(!(s instanceof Vt))return null;for(;s.children.length;){let{i:a,off:l}=s.childPos(i,1);for(;;a++){if(a==s.children.length)return null;if((s=s.children[a]).length)break}i=l}if(!(s instanceof bi))return null;let r=tn(s.text,i);if(r==i)return null;let o=Dr(s.dom,i,r).getClientRects();for(let a=0;aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==$t.LTR;for(let c=0,u=0;us)break;if(c>=i){let d=O.dom.getBoundingClientRect();if(n.push(d.height),o){let h=O.dom.lastChild,p=h?No(h):[];if(p.length){let m=p[p.length-1],g=l?m.right-d.left:d.right-m.left;g>a&&(a=g,this.minWidth=r,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+O.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?$t.RTL:$t.LTR}measureTextSize(){for(let r of this.children)if(r instanceof Vt){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),n,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=No(e.firstChild)[0];n=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:s}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new ux(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,s=0;;s++){let r=s==n.viewports.length?null:n.viewports[s],o=r?r.from-1:this.length;if(o>i){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(xe.replace({widget:new np(a),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return xe.set(e)}updateDeco(){let e=1,n=this.view.state.facet(wl).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),i=!1,s=this.view.state.facet(Ex).map((r,o)=>{let a=typeof r=="function";return a&&(i=!0),a?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=i,n.push(Ke.join(s))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),s;if(!i)return;!n.empty&&(s=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=tg(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;uM(this.view.scrollDOM,o,n.head{ie.from&&(n=!0)}),n}function MM(t,e,n=1){let i=t.charCategorizer(e),s=t.doc.lineAt(e),r=e-s.from;if(s.length==0)return B.cursor(e);r==0?n=1:r==s.length&&(n=-1);let o=r,a=r;n<0?o=tn(s.text,r,!1):a=tn(s.text,r);let l=i(s.text.slice(o,a));for(;o>0;){let c=tn(s.text,o,!1);if(i(s.text.slice(c,o))!=l)break;o=c}for(;at?e.left-t:Math.max(0,t-e.right)}function IM(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function cd(t,e){return t.tope.top+1}function cy(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function ap(t,e,n){let i,s,r,o,a=!1,l,c,u,O;for(let h=t.firstChild;h;h=h.nextSibling){let p=No(h);for(let m=0;mQ||o==Q&&r>b)&&(i=h,s=g,r=b,o=Q,a=b?e0:mg.bottom&&(!u||u.bottomg.top)&&(c=h,O=g):u&&cd(u,g)?u=uy(u,g.bottom):O&&cd(O,g)&&(O=cy(O,g.top))}}if(u&&u.bottom>=n?(i=l,s=u):O&&O.top<=n&&(i=c,s=O),!i)return{node:t,offset:0};let f=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Oy(i,f,n);if(a&&i.contentEditable!="false")return ap(i,f,n);let d=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:t,offset:d}}function Oy(t,e,n){let i=t.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;an?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&O=(u.left+u.right)/2,d=f;if((me.chrome||me.gecko)&&Dr(t,a).getBoundingClientRect().left==u.right&&(d=!f),O<=0)return{node:t,offset:a+(d?1:0)};s=a+(d?1:0),r=O}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function Mx(t,e,n,i=-1){var s,r;let o=t.contentDOM.getBoundingClientRect(),a=o.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:O}=e,f=O-a;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let y=t.viewState.heightOracle.textHeight/2,S=!1;l=t.elementAtHeight(f),l.type!=Qn.Text;)for(;f=i>0?l.bottom+y:l.top-y,!(f>=0&&f<=c);){if(S)return n?null:0;S=!0,i=-i}O=a+f;let d=l.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:fy(t,o,l,u,O);let h=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:h,m=p.elementFromPoint(u,O);m&&!t.contentDOM.contains(m)&&(m=null),m||(u=Math.max(o.left+1,Math.min(o.right-1,u)),m=p.elementFromPoint(u,O),m&&!t.contentDOM.contains(m)&&(m=null));let g,b=-1;if(m&&((s=t.docView.nearest(m))===null||s===void 0?void 0:s.isEditable)!=!1){if(h.caretPositionFromPoint){let y=h.caretPositionFromPoint(u,O);y&&({offsetNode:g,offset:b}=y)}else if(h.caretRangeFromPoint){let y=h.caretRangeFromPoint(u,O);y&&({startContainer:g,startOffset:b}=y,(!t.contentDOM.contains(g)||me.safari&&UM(g,b,u)||me.chrome&&WM(g,b,u))&&(g=void 0))}g&&(b=Math.min(ji(g),b))}if(!g||!t.docView.dom.contains(g)){let y=Vt.find(t.docView,d);if(!y)return f>l.top+l.height/2?l.to:l.from;({node:g,offset:b}=ap(y.dom,u,O))}let Q=t.docView.nearest(g);if(!Q)return null;if(Q.isWidget&&((r=Q.dom)===null||r===void 0?void 0:r.nodeType)==1){let y=Q.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((s-n.top-(t.defaultLineHeight-a)*.5)/a);r+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+jh(o,r,t.state.tabSize)}function UM(t,e,n){let i,s=t;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(;;){let r=s.nextSibling;if(r){if(r.nodeName=="BR")break;return!1}else{let o=s.parentNode;if(!o||o.nodeName=="DIV")break;s=o}}return Dr(t,i-1,i).getBoundingClientRect().right>n}function WM(t,e,n){if(e!=0)return!1;for(let s=t;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=t.nodeType==1?t.getBoundingClientRect():Dr(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function lp(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let s;for(let r of i.type){if(r.from>e)break;if(!(r.toe)return r;(!s||r.type==Qn.Text&&(s.type!=r.type||(n<0?r.frome)))&&(s=r)}}return s||i}return i}function DM(t,e,n,i){let s=lp(t,e.head,e.assoc||-1),r=!i||s.type!=Qn.Text||!(t.lineWrapping||s.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(s.from),l=t.posAtCoords({x:n==(a==$t.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(l!=null)return B.cursor(l,n?-1:1)}return B.cursor(n?s.to:s.from,n?-1:1)}function dy(t,e,n,i){let s=t.state.doc.lineAt(e.head),r=t.bidiSpans(s),o=t.textDirectionAt(s.from);for(let a=e,l=null;;){let c=kM(s,r,o,a,n),u=vx;if(!c){if(s.number==(n?t.state.doc.lines:1))return a;u=` +`,s=t.state.doc.line(s.number+(n?1:-1)),r=t.bidiSpans(s),c=t.visualLineSide(s,!n)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function LM(t,e,n){let i=t.state.charCategorizer(e),s=i(n);return r=>{let o=i(r);return s==yt.Space&&(s=o),s==o}}function NM(t,e,n,i){let s=e.head,r=n?1:-1;if(s==(n?t.state.doc.length:0))return B.cursor(s,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(s,e.assoc||-1),u=t.documentTop;if(c)o==null&&(o=c.left-l.left),a=r<0?c.top:c.bottom;else{let d=t.viewState.lineBlockAt(s);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(s-d.from))),a=(r<0?d.top:d.bottom)+u}let O=l.left+o,f=i??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let h=a+(f+d)*r,p=Mx(t,{x:O,y:h},!1,r);if(hl.bottom||(r<0?ps)){let m=t.docView.coordsForChar(p),g=!m||h{if(e>r&&es(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:B.cursor(i,ir)&&this.lineBreak(),s=o}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,a;if(this.lineSeparator?(r=n.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(a=s.exec(n))&&(r=a.index,o=a[0].length),this.append(n.slice(i,r<0?n.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let n=ut.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(BM(e,i.node,i.offset)?n:0))}}function BM(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let a=r||o?[]:KM(e),l=new jM(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=JM(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=r&&r.node==a.focusNode&&r.offset==a.focusOffset||!Fh(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!Fh(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((me.ios||me.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=s.from,c=null;(r===8||me.android&&e.text.length=s.from&&n.to<=s.to&&(n.from!=s.from||n.to!=s.to)&&s.to-s.from-(n.to-n.from)<=4?n={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,s.to))}:me.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==` + `&&t.lineWrapping&&(i&&(i=B.single(i.main.anchor-1,i.main.head-1)),n={from:s.from,to:s.to,insert:Be.of([" "])}),n)return ng(t,n,i,r);if(i&&!i.main.eq(s)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:o,userEvent:a}),!0}else return!1}function ng(t,e,n,i=-1){if(me.ios&&t.inputState.flushIOSKey(e))return!0;let s=t.state.selection.main;if(me.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&t.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Xo(t.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.lengths.head)&&Xo(t.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Xo(t.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=FM(t,e,n));return t.state.facet(_x).some(l=>l(t,e.from,e.to,r,a))||t.dispatch(a()),!0}function FM(t,e,n){let i,s=t.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=r.frome.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=s.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(s.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let c=t.state.sliceDoc(e.from,e.to),u,O=n&&Yx(t,n.main.head);if(O){let h=e.insert.length-(e.to-e.from);u={from:O.from,to:O.to-h}}else u=t.state.doc.lineAt(r.head);let f=r.to-e.to,d=r.to-r.from;i=s.changeByRange(h=>{if(h.from==r.from&&h.to==r.to)return{changes:a,range:l||h.map(a)};let p=h.to-f,m=p-c.length;if(h.to-h.from!=d||t.state.sliceDoc(m,p)!=c||h.to>=u.from&&h.from<=u.to)return{range:h};let g=s.changes({from:m,to:p,insert:e.insert}),b=h.to-r.to;return{changes:g,range:l?B.range(Math.max(0,l.anchor+b),Math.max(0,l.head+b)):h.map(g)}})}else i={changes:a,selection:l&&s.selection.replaceRange(l)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function HM(t,e,n,i){let s=Math.min(t.length,e.length),r=0;for(;r0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(i=="end"){let l=Math.max(0,r-Math.min(o,a));n-=o+l-r}if(o=o?r-n:0;r-=l,a=r+(a-o),o=r}else if(a=a?r-n:0;r-=l,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}function KM(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:s,focusOffset:r}=t.observer.selectionRange;return n&&(e.push(new hy(n,i)),(s!=n||r!=i)&&e.push(new hy(s,r))),e}function JM(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?B.single(n+e,i+e):null}class eq{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,me.safari&&e.contentDOM.addEventListener("input",()=>null),me.gecko&&mq(e.contentDOM.ownerDocument)}handleEvent(e){!lq(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,n);for(let s of i.handlers){if(n.defaultPrevented)break;if(s(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=tq(e),i=this.handlers,s=this.view.contentDOM;for(let r in n)if(r!="scroll"){let o=!n[r].handlers.length,a=i[r];a&&o!=!a.handlers.length&&(s.removeEventListener(r,this.handleEvent),a=null),a||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in i)r!="scroll"&&!n[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Ux.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),me.android&&me.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return me.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=Ix.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||nq.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:me.safari&&!me.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function py(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(s){Xn(n.state,s)}}}function tq(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let s=i.spec,r=s&&s.plugin.domEventHandlers,o=s&&s.plugin.domEventObservers;if(r)for(let a in r){let l=r[a];l&&n(a).handlers.push(py(i.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(py(i.value,l))}}for(let i in Si)n(i).handlers.push(Si[i]);for(let i in li)n(i).observers.push(li[i]);return e}const Ix=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],nq="dthko",Ux=[16,17,18,20,91,92,224,225],Mc=6;function qc(t){return Math.max(0,t)*.7+8}function iq(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class sq{constructor(e,n,i,s){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=OM(e.contentDOM),this.atoms=e.state.facet(eg).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ie.allowMultipleSelections)&&rq(e,n),this.dragging=aq(e,n)&&Lx(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&iq(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,s=0,r=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=tg(this.view);e.clientX-l.left<=s+Mc?n=-qc(s-e.clientX):e.clientX+l.right>=o-Mc&&(n=qc(e.clientX-o)),e.clientY-l.top<=r+Mc?i=-qc(r-e.clientY):e.clientY+l.bottom>=a-Mc&&(i=qc(e.clientY-a)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;in.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function rq(t,e){let n=t.state.facet(Px);return n.length?n[0](e):me.mac?e.metaKey:e.ctrlKey}function oq(t,e){let n=t.state.facet(xx);return n.length?n[0](e):me.mac?!e.altKey:!e.ctrlKey}function aq(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=xl(t.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function lq(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=ut.get(n))&&i.ignoreEvent(e))return!1;return!0}const Si=Object.create(null),li=Object.create(null),Wx=me.ie&&me.ie_version<15||me.ios&&me.webkit_version<604;function cq(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),Dx(t,n.value)},50)}function gf(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function Dx(t,e){e=gf(t.state,Hm,e);let{state:n}=t,i,s=1,r=n.toText(e),o=r.lines==n.selection.ranges.length;if(cp!=null&&n.selection.ranges.every(l=>l.empty)&&cp==r.toString()){let l=-1;i=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let O=n.toText((o?r.line(s++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:O},range:B.cursor(c.from+O.length)}})}else o?i=n.changeByRange(l=>{let c=r.line(s++);return{changes:{from:l.from,to:l.to,insert:c.text},range:B.cursor(l.from+c.length)}}):i=n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}li.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Si.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);li.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};li.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Si.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(wx))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=fq(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new sq(t,e,n,i)),i&&t.observer.ignore(()=>{rx(t.contentDOM);let r=t.root.activeElement;r&&!r.contains(t.contentDOM)&&r.blur()});let s=t.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function my(t,e,n,i){if(i==1)return B.cursor(e,n);if(i==2)return MM(t.state,e,n);{let s=Vt.find(t.docView,e),r=t.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,a=s?s.posAtEnd:r.to;return ae>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function uq(t,e,n,i){let s=Vt.find(t.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&gy(n,i,o))return-1;let a=s.coordsAt(r,1);return a&&gy(n,i,a)?1:o&&o.bottom>=i?-1:1}function $y(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:uq(t,n,e.clientX,e.clientY)}}const Oq=me.ie&&me.ie_version<=11;let Qy=null,yy=0,by=0;function Lx(t){if(!Oq)return t.detail;let e=Qy,n=by;return Qy=t,by=Date.now(),yy=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(yy+1)%3:1}function fq(t,e){let n=$y(t,e),i=Lx(e),s=t.state.selection;return{update(r){r.docChanged&&(n.pos=r.changes.mapPos(n.pos),s=s.map(r.changes))},get(r,o,a){let l=$y(t,r),c,u=my(t,l.pos,l.bias,i);if(n.pos!=l.pos&&!o){let O=my(t,n.pos,n.bias,i),f=Math.min(O.from,u.from),d=Math.max(O.to,u.to);u=f1&&(c=dq(s,l.pos))?c:a?s.addRange(u):B.create([u])}}}function dq(t,e){for(let n=0;n=e)return B.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Si.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let s=t.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=n.to||o<=n.from)&&(n=B.range(r,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",gf(t.state,Km,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Si.dragend=t=>(t.inputState.draggedContent=null,!1);function Sy(t,e,n,i){if(n=gf(t.state,Hm,n),!n)return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=t.inputState,o=i&&r&&oq(t,e)?{from:r.from,to:r.to}:null,a={from:s,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Si.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),s=0,r=()=>{++s==n.length&&Sy(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(i[o]=a.result),r()},a.readAsText(n[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Sy(t,e,i,!0),!0}return!1};Si.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=Wx?null:e.clipboardData;return n?(Dx(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(cq(t),!1)};function hq(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function pq(t){let e=[],n=[],i=!1;for(let s of t.selection.ranges)s.empty||(e.push(t.sliceDoc(s.from,s.to)),n.push(s));if(!e.length){let s=-1;for(let{from:r}of t.selection.ranges){let o=t.doc.lineAt(r);o.number>s&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),s=o.number}i=!0}return{text:gf(t,Km,e.join(t.lineBreak)),ranges:n,linewise:i}}let cp=null;Si.copy=Si.cut=(t,e)=>{let{text:n,ranges:i,linewise:s}=pq(t.state);if(!n&&!s)return!1;cp=s?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let r=Wx?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",n),!0):(hq(t,n),!1)};const Nx=Vs.define();function jx(t,e){let n=[];for(let i of t.facet(kx)){let s=i(t,e);s&&n.push(s)}return n.length?t.update({effects:n,annotations:Nx.of(!0)}):null}function Bx(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=jx(t.state,e);n?t.dispatch(n):t.update([])}},10)}li.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Bx(t)};li.blur=t=>{t.observer.clearSelectionRange(),Bx(t)};li.compositionstart=li.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};li.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,me.chrome&&me.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};li.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Si.beforeinput=(t,e)=>{var n,i;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let r=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return ng(t,{from:l,to:c,insert:t.state.toText(r)},null),!0}}let s;if(me.chrome&&me.android&&(s=Ix.find(r=>r.inputType==e.inputType))&&(t.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return me.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),me.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>li.compositionend(t,e),20),!1};const vy=new Set;function mq(t){vy.has(t)||(vy.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Py=["pre-wrap","normal","pre-line","break-spaces"];let Go=!1;function xy(){Go=!1}class gq{constructor(e){this.lineWrapping=e,this.doc=Be.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Py.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=i,this.textHeight=s,this.lineLength=r,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>mu&&(Go=!0),this.height=e)}replace(e,n,i){return yn.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,s){let r=this,o=i.doc;for(let a=s.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:O}=s[a],f=r.lineAt(l,mt.ByPosNoHeight,i.setDoc(n),0,0),d=f.to>=c?f:r.lineAt(c,mt.ByPosNoHeight,i,0,0);for(O+=d.to-c,c=d.to;a>0&&f.from<=s[a-1].toA;)l=s[a-1].fromA,u=s[a-1].fromB,a--,lr*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),i+=1+a.break,s-=a.size}else if(r>s*2){let a=e[i];a.break?e.splice(i,1,a.left,null,a.right):e.splice(i,1,a.left,a.right),i+=2+a.break,r-=a.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,n=0,i=!1,s){return s&&s.from<=n&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Un extends Gx{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,s){return new Ei(s,this.length,i,this.height,this.breaks)}replace(e,n,i){let s=i[0];return i.length==1&&(s instanceof Un||s instanceof Ht&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof Ht?s=new Un(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):yn.of(i)}updateHeight(e,n=0,i=!1,s){return s&&s.from<=n&&s.more?this.setHeight(s.heights[s.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ht extends yn{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,s=e.doc.lineAt(n+this.length).number,r=s-i+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*r);o=l/r,this.length>r+1&&(a=(this.height-l)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:a}}blockAt(e,n,i,s){let{firstLine:r,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,s);if(n.lineWrapping){let c=s+(e0){let r=i[i.length-1];r instanceof Ht?i[i.length-1]=new Ht(r.length+s):i.push(null,new Ht(s-1))}if(e>0){let r=i[0];r instanceof Ht?i[0]=new Ht(e+r.length):i.unshift(new Ht(e-1),null)}return yn.of(i)}decomposeLeft(e,n){n.push(new Ht(e-1),null)}decomposeRight(e,n){n.push(null,new Ht(this.length-e-1))}updateHeight(e,n=0,i=!1,s){let r=n+this.length;if(s&&s.from<=n+this.length&&s.more){let o=[],a=Math.max(n,s.from),l=-1;for(s.from>n&&o.push(new Ht(s.from-n-1).updateHeight(e,n));a<=r&&s.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let O=s.heights[s.index++];l==-1?l=O:Math.abs(O-l)>=mu&&(l=-2);let f=new Un(u,O);f.outdated=!1,o.push(f),a+=u+1}a<=r&&o.push(null,new Ht(r-a).updateHeight(e,a));let c=yn.of(o);return(l<0||Math.abs(c.height-this.height)>=mu||Math.abs(l-this.heightMetrics(e,n).perLine)>=mu)&&(Go=!0),tO(this,c)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Qq extends yn{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,s){let r=i+this.left.height;return ea))return c;let u=n==mt.ByPosNoHeight?mt.ByPosNoHeight:mt.ByPos;return l?c.join(this.right.lineAt(a,u,i,o,a)):this.left.lineAt(a,u,i,s,r).join(c)}forEachLine(e,n,i,s,r,o){let a=s+this.left.height,l=r+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,i,a,l,o);else{let c=this.lineAt(l,mt.ByPos,i,s,r);e=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,i,a,l,o)}}replace(e,n,i){let s=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-s,n-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let a of i)r.push(a);if(e>0&&wy(r,o-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,n);e2*n.size||n.size>2*e.size?yn.of(this.break?[e,null,n]:[e,n]):(this.left=tO(this.left,e),this.right=tO(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,s){let{left:r,right:o}=this,a=n+r.length+this.break,l=null;return s&&s.from<=n+r.length&&s.more?l=r=r.updateHeight(e,n,i,s):r.updateHeight(e,n,i),s&&s.from<=a+o.length&&s.more?l=o=o.updateHeight(e,a,i,s):o.updateHeight(e,a,i),l?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function wy(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Ht&&(i=t[e+1])instanceof Ht&&t.splice(e-1,3,new Ht(n.length+1+i.length))}const yq=5;class ig{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Un?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Un(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=yq)&&this.addLineDeco(s,r,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Un(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new Ht(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Un)return e;let n=new Un(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Un)&&!this.isCovered?this.nodes.push(new Un(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&O.overflow!="visible"){let f=u.getBoundingClientRect();r=Math.max(r,f.left),o=Math.min(o,f.right),a=Math.max(a,f.top),l=Math.min(c==t.parentNode?s.innerHeight:l,f.bottom)}c=O.position=="absolute"||O.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:r-n.left,right:Math.max(r,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function Pq(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function xq(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Od{constructor(e,n,i,s){this.from=e,this.to=n,this.size=i,this.displaySize=s}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new gq(n),this.stateDeco=e.facet(wl).filter(i=>typeof i!="function"),this.heightMap=yn.empty().applyChanges(this.stateDeco,Be.empty,this.heightOracle.setDoc(e.doc),[new oi(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xe.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let s=i?n.head:n.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Ic(r,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?_y:new sg(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Ma(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(wl).filter(u=>typeof u!="function");let s=e.changedRanges,r=oi.extendWithRanges(s,bq(i,this.stateDeco,e?e.changes:Mt.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);xy(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||Go)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Xx)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?$t.RTL:$t.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:y,scaleY:S}=sx(n,a);(y>.005&&Math.abs(this.scaleX-y)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=y,this.scaleY=S,c|=16,o=l=!0)}let O=(parseInt(i.paddingTop)||0)*this.scaleY,f=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=O||this.paddingBottom!=f)&&(this.paddingTop=O,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=ax(e.scrollDOM);let h=(this.printing?xq:vq)(n,this.paddingTop),p=h.top-this.pixelViewport.top,m=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget&&!Pq(e.dom))return 0;let b=a.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let y=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(y)&&(o=!0),o||s.lineWrapping&&Math.abs(b-this.contentDOMWidth)>s.charWidth){let{lineHeight:S,charWidth:v,textHeight:P}=e.docView.measureTextSize();o=S>0&&s.refresh(r,S,v,P,b/v,y),o&&(e.docView.minWidth=0,c|=16)}p>0&&m>0?u=Math.max(p,m):p<0&&m<0&&(u=Math.min(p,m)),xy();for(let S of this.viewports){let v=S.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(S);this.heightMap=(o?yn.empty().applyChanges(this.stateDeco,Be.empty,this.heightOracle,[new oi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new $q(S.from,v))}Go&&(c|=2)}let Q=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return Q&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||Q)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new Ic(s.lineAt(o-i*1e3,mt.ByHeight,r,0,0).from,s.lineAt(a+(1-i)*1e3,mt.ByHeight,r,0,0).to);if(n){let{head:c}=n.range;if(cl.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),O=s.lineAt(c,mt.ByPos,r,0,0),f;n.y=="center"?f=(O.top+O.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=a+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=$t.LTR&&!i)return[];let a=[],l=(u,O,f,d)=>{if(O-uu&&gg.from>=f.from&&g.to<=f.to&&Math.abs(g.from-u)g.fromb));if(!m){if(OQ.from<=O&&Q.to>=O)){let Q=n.moveToLineBoundary(B.cursor(O),!1,!0).head;Q>u&&(O=Q)}let g=this.gapSize(f,u,O,d),b=i||g<2e6?g:2e6;m=new Od(u,O,g,b)}a.push(m)},c=u=>{if(u.length2e6)for(let v of e)v.from>=u.from&&v.fromu.from&&l(u.from,d,u,O),hn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];Ke.spans(n,this.viewport.from,this.viewport.to,{span(r,o){i.push({from:r,to:o})},point(){}},20);let s=0;if(i.length!=this.visibleRanges.length)s=12;else for(let r=0;r=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Ma(this.heightMap.lineAt(e,mt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Ma(this.heightMap.lineAt(this.scaler.fromDOM(e),mt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Ma(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Ic{constructor(e,n){this.from=e,this.to=n}}function Tq(t,e,n){let i=[],s=t,r=0;return Ke.spans(n,t,e,{span(){},point(o,a){o>s&&(i.push({from:s,to:o}),r+=o-s),s=a}},20),s=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let s=0;;s++){let{from:r,to:o}=e[s],a=o-r;if(i<=a)return r+i;i-=a}}function Wc(t,e){let n=0;for(let{from:i,to:s}of t.ranges){if(e<=s){n+=e-i;break}n+=s-i}return n/t.total}function _q(t,e){for(let n of t)if(e(n))return n}const _y={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class sg{constructor(e,n,i){let s=0,r=0,o=0;this.viewports=i.map(({from:a,to:l})=>{let c=n.lineAt(a,mt.ByPos,e,0,0).top,u=n.lineAt(l,mt.ByPos,e,0,0).bottom;return s+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(n.height-s);for(let a of this.viewports)a.domTop=o+(a.top-r)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),r=a.bottom}toDOM(e){for(let n=0,i=0,s=0;;n++){let r=nn.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function Ma(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Ei(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(s=>Ma(s,e)):t._content)}const Dc=pe.define({combine:t=>t.join(" ")}),up=pe.define({combine:t=>t.indexOf(!0)>-1}),Op=or.newName(),Fx=or.newName(),Hx=or.newName(),Kx={"&light":"."+Fx,"&dark":"."+Hx};function fp(t,e,n){return new or(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return t;if(!n||!n[s])throw new RangeError(`Unsupported selector: ${s}`);return n[s]}):t+" "+i}})}const kq=fp("."+Op,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Kx),Rq={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},fd=me.ie&&me.ie_version<=11;class Xq{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new fM,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(me.ie&&me.ie_version<=11||me.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&me.android&&e.constructor.EDIT_CONTEXT!==!1&&!(me.chrome&&me.chrome_version<126)&&(this.editContext=new Vq(e),e.state.facet(ds)&&(e.contentDOM.editContext=this.editContext.editContext)),fd&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(ds)?i.root.activeElement!=this.dom:!du(this.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(me.ie&&me.ie_version<=11||me.android&&me.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Ka(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=xl(e.root);if(!n)return!1;let i=me.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Cq(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let s=du(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Xo(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),n==-1?{from:n,to:i}=o:(n=Math.min(o.from,n),i=Math.max(o.to,i)))}return{from:n,to:i,typeOver:s}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),s=this.selectionChanged&&du(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new GM(this.view,e,n,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,s=qx(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=ky(n,e.previousSibling||e.target.previousSibling,-1),s=ky(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:s?n.posBefore(s):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(ds)!=e.state.facet(ds)&&(e.view.contentDOM.editContext=e.state.facet(ds)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function ky(t,e,n){for(;e;){let i=ut.get(e);if(i&&i.parent==t)return i;let s=e.parentNode;e=s!=t.dom?s:n>0?e.nextSibling:e.previousSibling}return null}function Ry(t,e){let n=e.startContainer,i=e.startOffset,s=e.endContainer,r=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return Ka(o.node,o.offset,s,r)&&([n,i,s,r]=[s,r,n,i]),{anchorNode:n,anchorOffset:i,focusNode:s,focusOffset:r}}function Cq(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return Ry(t,s)}let n=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?Ry(t,n):null}class Vq{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let s=e.state.selection.main,{anchor:r,head:o}=s,a=this.toEditorPos(i.updateRangeStart),l=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:a,drifted:!1});let c={from:a,to:l,insert:Be.of(i.text.split(` +`))};if(c.from==this.from&&rthis.to&&(c.to=r),c.from==c.to&&!c.insert.length){let u=B.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));u.main.eq(s)||e.dispatch({selection:u,userEvent:"select"});return}if((me.mac||me.android)&&c.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:a,to:l,insert:Be.of([i.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);ng(e,c,B.single(this.toEditorPos(i.selectionStart,u),this.toEditorPos(i.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);o{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,a=r.underlineThickness;if(o!="None"&&a!="None"){let l=this.toEditorPos(r.rangeStart),c=this.toEditorPos(r.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=xl(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,a,l,c)=>{if(i)return;let u=c.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(c)){s=this.pendingContextChange=null,n+=u,this.to+=u;return}else s=null,this.revertPending(e.state);if(r+=n,o+=n,o<=this.from)this.from+=u,this.to+=u;else if(rthis.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),c.toString()),this.to+=u}n+=u}),s&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),s=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Oe{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(s=>s.forEach(r=>i(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||dM(e.parent)||document,this.viewState=new Ty(e.state||Ie.create(e)),e.scrollTo&&e.scrollTo.is(Yc)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet($o).map(s=>new ld(s));for(let s of this.plugins)s.update(this);this.observer=new Xq(this),this.inputState=new eq(this),this.inputState.ensureHandlers(this.plugins),this.docView=new ly(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Et?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,s,r=this.state;for(let f of e){if(f.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=f.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,a=0,l=null;e.some(f=>f.annotation(Nx))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=jx(r,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(u=null)):this.observer.clear(),r.facet(Ie.phrases)!=this.state.facet(Ie.phrases))return this.setState(r);s=eO.create(this,r,e),s.flags|=a;let O=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(O&&(O=O.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;O=new Co(d.empty?d:B.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(Yc)&&(O=d.value.clip(this.state))}this.viewState.update(s,O),this.bidiCache=nO.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),n=this.docView.update(s),this.state.facet(za)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Dc)!=s.state.facet(Dc)&&(this.viewState.mustMeasureContent=!0),(n||i||O||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!s.empty)for(let f of this.state.facet(op))try{f(s)}catch(d){Xn(this.state,d,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!qx(this,u)&&c.force&&Xo(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Ty(e),this.plugins=e.facet($o).map(i=>new ld(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new ly(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet($o),i=e.state.facet($o);if(n!=i){let s=[];for(let r of i){let o=n.indexOf(r);if(o<0)s.push(new ld(r));else{let a=this.plugins[o];a.mustUpdate=e,s.push(a)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(ax(i))r=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(s);r=d.from,o=d.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(d=>{try{return d.read(this)}catch(h){return Xn(this.state,h),Xy}}),O=eO.create(this,this.state,[]),f=!1;O.flags|=l,n?n.flags|=l:n=O,this.updateState=2,O.empty||(this.updatePlugins(O),this.inputState.update(O),this.updateAttrs(),f=this.docView.update(O),f&&this.docViewUpdate());for(let d=0;d1||h<-1){s=s+h,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(op))a(n)}get themeClasses(){return Op+" "+(this.state.facet(up)?Hx:Fx)+" "+this.state.facet(Dc)}updateAttrs(){let e=Cy(this,Ax,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(ds)?"true":"false",class:"cm-content",style:`${me.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Cy(this,Jm,n);let i=this.observer.ignore(()=>{let s=tp(this.contentDOM,this.contentAttrs,n),r=tp(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let s of i.effects)if(s.is(Oe.announce)){n&&(this.announceDOM.textContent=""),n=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(za);let e=this.state.facet(Oe.cspNonce);or.mount(this.root,this.styleModules.concat(kq).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return ud(this,e,dy(this,e,n,i))}moveByGroup(e,n){return ud(this,e,dy(this,e,n,i=>LM(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=i[n?i.length-1:0];return B.cursor(r.side(n,s)+e.from,r.forward(!n,s)?1:-1)}moveToLineBoundary(e,n,i=!0){return DM(this,e,n,i)}moveVertically(e,n,i){return ud(this,e,NM(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),Mx(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[Ks.find(r,e-s.from,-1,n)];return Jl(i,o.dir==$t.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Rx)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Aq)return Sx(e.length);let n=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||bx(r.isolates,i=ay(this,e))))return r.order;i||(i=ay(this,e));let s=_M(e.text,n,i);return this.bidiCache.push(new nO(e.from,e.to,n,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||me.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{rx(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Yc.of(new Co(typeof e=="number"?B.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Yc.of(new Co(B.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Xt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Xt.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=or.newName(),s=[Dc.of(i),za.of(fp(`.${i}`,e))];return n&&n.dark&&s.push(up.of(!0)),s}static baseTheme(e){return $r.lowest(za.of(fp("."+Op,e,Kx)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),s=i&&ut.get(i)||ut.get(e);return((n=s==null?void 0:s.rootView)===null||n===void 0?void 0:n.view)||null}}Oe.styleModule=za;Oe.inputHandler=_x;Oe.clipboardInputFilter=Hm;Oe.clipboardOutputFilter=Km;Oe.scrollHandler=Cx;Oe.focusChangeEffect=kx;Oe.perLineTextDirection=Rx;Oe.exceptionSink=Tx;Oe.updateListener=op;Oe.editable=ds;Oe.mouseSelectionStyle=wx;Oe.dragMovesSelection=xx;Oe.clickAddsSelectionRange=Px;Oe.decorations=wl;Oe.outerDecorations=Ex;Oe.atomicRanges=eg;Oe.bidiIsolatedRanges=Zx;Oe.scrollMargins=zx;Oe.darkTheme=up;Oe.cspNonce=pe.define({combine:t=>t.length?t[0]:""});Oe.contentAttributes=Jm;Oe.editorAttributes=Ax;Oe.lineWrapping=Oe.contentAttributes.of({class:"cm-lineWrapping"});Oe.announce=Xe.define();const Aq=4096,Xy={};class nO{constructor(e,n,i,s,r,o){this.from=e,this.to=n,this.dir=i,this.isolates=s,this.fresh=r,this.order=o}static update(e,n){if(n.empty&&!e.some(r=>r.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:$t.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(t):r;o&&ep(o,n)}return n}const Eq=me.mac?"mac":me.windows?"win":me.linux?"linux":"key";function Zq(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let s,r,o,a;for(let l=0;li.concat(s),[]))),n}function Yq(t,e,n){return ew(Jx(t.state),e,t,n)}let Gs=null;const Mq=4e3;function qq(t,e=Eq){let n=Object.create(null),i=Object.create(null),s=(o,a)=>{let l=i[o];if(l==null)i[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,a,l,c,u)=>{var O,f;let d=n[o]||(n[o]=Object.create(null)),h=a.split(/ (?!$)/).map(g=>Zq(g,e));for(let g=1;g{let y=Gs={view:Q,prefix:b,scope:o};return setTimeout(()=>{Gs==y&&(Gs=null)},Mq),!0}]})}let p=h.join(" ");s(p,!1);let m=d[p]||(d[p]={preventDefault:!1,stopPropagation:!1,run:((f=(O=d._any)===null||O===void 0?void 0:O.run)===null||f===void 0?void 0:f.slice())||[]});l&&m.run.push(l),c&&(m.preventDefault=!0),u&&(m.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:O}=o;for(let f in u)u[f].run.push(d=>O(d,dp))}let l=o[e]||o.key;if(l)for(let c of a)r(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let dp=null;function ew(t,e,n,i){dp=e;let s=lM(e),r=Tn(s,0),o=Ai(r)==s.length&&s!=" ",a="",l=!1,c=!1,u=!1;Gs&&Gs.view==n&&Gs.scope==i&&(a=Gs.prefix+" ",Ux.indexOf(e.keyCode)<0&&(c=!0,Gs=null));let O=new Set,f=m=>{if(m){for(let g of m.run)if(!O.has(g)&&(O.add(g),g(n)))return m.stopPropagation&&(u=!0),!0;m.preventDefault&&(m.stopPropagation&&(u=!0),c=!0)}return!1},d=t[i],h,p;return d&&(f(d[a+Lc(s,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(me.windows&&e.ctrlKey&&e.altKey)&&(h=ar[e.keyCode])&&h!=s?(f(d[a+Lc(h,e,!0)])||e.shiftKey&&(p=Pl[e.keyCode])!=s&&p!=h&&f(d[a+Lc(p,e,!1)]))&&(l=!0):o&&e.shiftKey&&f(d[a+Lc(s,e,!0)])&&(l=!0),!l&&f(d._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),dp=null,l}class ic{constructor(e,n,i,s,r){this.className=e,this.left=n,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=tw(e);return[new ic(n,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Iq(e,n,i)}}function tw(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==$t.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Ay(t,e,n,i){let s=t.coordsAtPos(e,n*2);if(!s)return i;let r=t.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,a=t.posAtCoords({x:r.left+1,y:o}),l=t.posAtCoords({x:r.right-1,y:o});return a==null||l==null?i:{from:Math.max(i.from,Math.min(a,l)),to:Math.min(i.to,Math.max(a,l))}}function Iq(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),s=Math.min(n.to,t.viewport.to),r=t.textDirection==$t.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=tw(t),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),O=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=a.right-(u?parseInt(u.paddingRight):0),d=lp(t,i,1),h=lp(t,s,-1),p=d.type==Qn.Text?d:null,m=h.type==Qn.Text?h:null;if(p&&(t.lineWrapping||d.widgetLineBreaks)&&(p=Ay(t,i,1,p)),m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=Ay(t,s,-1,m)),p&&m&&p.from==m.from&&p.to==m.to)return b(Q(n.from,n.to,p));{let S=p?Q(n.from,null,p):y(d,!1),v=m?Q(null,n.to,m):y(h,!0),P=[];return(p||d).to<(m||h).from-(p&&m?1:0)||d.widgetLineBreaks>1&&S.bottom+t.defaultLineHeight/2Z&&ie.from=G)break;ue>ae&&I(Math.max(F,ae),S==null&&F<=Z,Math.min(ue,G),v==null&&ue>=K,Y.dir)}if(ae=q.to+1,ae>=G)break}return E.length==0&&I(Z,S==null,K,v==null,t.textDirection),{top:w,bottom:k,horizontal:E}}function y(S,v){let P=a.top+(v?S.top:S.bottom);return{top:P,bottom:P,horizontal:[]}}}function Uq(t,e){return t.constructor==e.constructor&&t.eq(e)}class Wq{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(gu)!=e.state.facet(gu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(gu);for(;n!Uq(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let s of e)s.update&&n&&s.constructor&&this.drawn[i].constructor&&s.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(s.draw(),n);for(;n;){let s=n.nextSibling;n.remove(),n=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const gu=pe.define();function nw(t){return[Xt.define(e=>new Wq(e,t)),gu.of(t)]}const Tl=pe.define({combine(t){return Ji(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function Dq(t={}){return[Tl.of(t),Lq,Nq,jq,Xx.of(!0)]}function iw(t){return t.startState.facet(Tl)!=t.state.facet(Tl)}const Lq=nw({above:!0,markers(t){let{state:e}=t,n=e.facet(Tl),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty||n.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=s.empty?s:B.cursor(s.head,s.head>s.anchor?-1:1);for(let l of ic.forRange(t,o,a))i.push(l)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=iw(t);return n&&Ey(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Ey(e.state,t)},class:"cm-cursorLayer"});function Ey(t,e){e.style.animationDuration=t.facet(Tl).cursorBlinkRate+"ms"}const Nq=nw({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:ic.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||iw(t)},class:"cm-selectionLayer"}),jq=$r.highest(Oe.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),sw=Xe.define({map(t,e){return t==null?null:e.mapPos(t)}}),qa=Bt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(sw)?i.value:n,t)}}),Bq=Xt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(qa);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(qa)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(qa),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(qa)!=t&&this.view.dispatch({effects:sw.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Gq(){return[qa,Bq]}function Zy(t,e,n,i,s){e.lastIndex=0;for(let r=t.iterRange(n,i),o=n,a;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;a=e.exec(r.value);)s(o+a.index,a)}function Fq(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:s,to:r}of n)s=Math.max(t.state.doc.lineAt(s).from,s-e),r=Math.min(t.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class Hq{constructor(e){const{regexp:n,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,s)this.addMatch=(a,l,c,u)=>s(u,c,c+a[0].length,a,l);else if(typeof i=="function")this.addMatch=(a,l,c,u)=>{let O=i(a,l,c);O&&u(c,c+a[0].length,O)};else if(i)this.addMatch=(a,l,c,u)=>u(c,c+a[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let n=new _s,i=n.add.bind(n);for(let{from:s,to:r}of Fq(e,this.maxLength))Zy(e.state.doc,this.regexp,s,r,(o,a)=>this.addMatch(a,e,o,i));return n.finish()}updateDeco(e,n){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,a,l)=>{l>=e.view.viewport.from&&a<=e.view.viewport.to&&(i=Math.min(a,i),s=Math.max(l,s))}),e.viewportMoved||s-i>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,n.map(e.changes),i,s):n}updateRange(e,n,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),a=Math.min(r.to,s);if(a>=o){let l=e.state.doc.lineAt(o),c=l.tol.from;o--)if(this.boundary.test(l.text[o-1-l.from])){u=o;break}for(;af.push(g.range(p,m));if(l==c)for(this.regexp.lastIndex=u-l.from;(d=this.regexp.exec(l.text))&&d.indexthis.addMatch(m,e,p,h));n=n.update({filterFrom:u,filterTo:O,filter:(p,m)=>pO,add:f})}}return n}}const hp=/x/.unicode!=null?"gu":"g",Kq=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,hp),Jq={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let dd=null;function e4(){var t;if(dd==null&&typeof document<"u"&&document.body){let e=document.body.style;dd=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return dd||!1}const $u=pe.define({combine(t){let e=Ji(t,{render:null,specialChars:Kq,addSpecialChars:null});return(e.replaceTabs=!e4())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,hp)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,hp)),e}});function t4(t={}){return[$u.of(t),n4()]}let zy=null;function n4(){return zy||(zy=Xt.fromClass(class{constructor(t){this.view=t,this.decorations=xe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet($u)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Hq({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:s}=n.state,r=Tn(e[0],0);if(r==9){let o=s.lineAt(i),a=n.state.tabSize,l=ca(o.text,a,i-o.from);return xe.replace({widget:new o4((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=xe.replace({widget:new r4(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet($u);t.startState.facet($u)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const i4="•";function s4(t){return t>=32?i4:t==10?"␤":String.fromCharCode(9216+t)}class r4 extends es{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=s4(this.code),i=e.state.phrase("Control character")+" "+(Jq[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,n);if(s)return s;let r=document.createElement("span");return r.textContent=n,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class o4 extends es{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function a4(){return c4}const l4=xe.line({class:"cm-activeLine"}),c4=Xt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let s=t.lineBlockAt(i.head);s.from>e&&(n.push(l4.range(s.from)),e=s.from)}return xe.set(n)}},{decorations:t=>t.decorations});class u4 extends es{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?No(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),s=Jl(n[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function O4(t){let e=Xt.fromClass(class{constructor(n){this.view=n,this.placeholder=t?xe.set([xe.widget({widget:new u4(t),side:1}).range(0)]):xe.none}get decorations(){return this.view.state.doc.length?xe.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,Oe.contentAttributes.of({"aria-placeholder":t})]:e}const pp=2e3;function f4(t,e,n){let i=Math.min(e.line,n.line),s=Math.max(e.line,n.line),r=[];if(e.off>pp||n.off>pp||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=i;l<=s;l++){let c=t.doc.line(l);c.length<=a&&r.push(B.range(c.from+o,c.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=i;l<=s;l++){let c=t.doc.line(l),u=jh(c.text,o,t.tabSize,!0);if(u<0)r.push(B.cursor(c.to));else{let O=jh(c.text,a,t.tabSize);r.push(B.range(c.from+u,c.from+O))}}}return r}function d4(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Yy(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),s=n-i.from,r=s>pp?-1:s==i.length?d4(t,e.clientX):ca(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:r,off:s}}function h4(t,e){let n=Yy(t,e),i=t.state.selection;return n?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(n.line).from),o=s.state.doc.lineAt(r);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let a=Yy(t,s);if(!a)return i;let l=f4(t.state,n,a);return l.length?o?B.create(l.concat(i.ranges)):B.create(l):i}}:null}function p4(t){let e=n=>n.altKey&&n.button==0;return Oe.mouseSelectionStyle.of((n,i)=>e(i)?h4(n,i):null)}const m4={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},g4={style:"cursor: crosshair"};function $4(t={}){let[e,n]=m4[t.key||"Alt"],i=Xt.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||n(s))},keyup(s){(s.keyCode==e||!n(s))&&this.set(!1)},mousemove(s){this.set(n(s))}}});return[i,Oe.contentAttributes.of(s=>{var r;return!((r=s.plugin(i))===null||r===void 0)&&r.isDown?g4:null})]}const wa="-10000px";class rw{constructor(e,n,i,s){this.facet=n,this.createTooltipView=i,this.removeTooltipView=s,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=i(o,r))}update(e,n){var i;let s=e.state.facet(this.facet),r=s.filter(l=>l);if(s===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;ln[c]=l),n.length=a.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function Q4(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const hd=pe.define({combine:t=>{var e,n,i;return{position:me.ios?"absolute":((e=t.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(s=>s.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||Q4}}}),My=new WeakMap,rg=Xt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(hd);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new rw(t,og,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(hd);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",n.dom.appendChild(s)}return n.dom.style.position=this.position,n.dom.style.top=wa,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(me.gecko)n=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==wa&&r.style.left=="0px"){let o=r.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(n||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(t=r.width/this.parent.offsetWidth,e=r.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),s=tg(this.view);return{visible:{left:i.left+s.left,top:i.top+s.top,right:i.right-s.right,bottom:i.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((r,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(hd).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:i,scaleX:s,scaleY:r}=t,o=[];for(let a=0;a=Math.min(n.bottom,i.bottom)||O.rightMath.min(n.right,i.right)+.1)){u.style.top=wa;continue}let d=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,h=d?7:0,p=f.right-f.left,m=(e=My.get(c))!==null&&e!==void 0?e:f.bottom-f.top,g=c.offset||b4,b=this.view.textDirection==$t.LTR,Q=f.width>i.right-i.left?b?i.left:i.right-f.width:b?Math.max(i.left,Math.min(O.left-(d?14:0)+g.x,i.right-p)):Math.min(Math.max(i.left,O.left-p+(d?14:0)-g.x),i.right-p),y=this.above[a];!l.strictSide&&(y?O.top-m-h-g.yi.bottom)&&y==i.bottom-O.bottom>O.top-i.top&&(y=this.above[a]=!y);let S=(y?O.top-i.top:i.bottom-O.bottom)-h;if(SQ&&w.topv&&(v=y?w.top-m-2-h:w.bottom+h+2);if(this.position=="absolute"?(u.style.top=(v-t.parent.top)/r+"px",qy(u,(Q-t.parent.left)/s)):(u.style.top=v/r+"px",qy(u,Q/s)),d){let w=O.left+(b?g.x:-g.x)-(Q+14-7);d.style.left=w/s+"px"}c.overlap!==!0&&o.push({left:Q,top:v,right:P,bottom:v+m}),u.classList.toggle("cm-tooltip-above",y),u.classList.toggle("cm-tooltip-below",!y),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=wa}},{eventObservers:{scroll(){this.maybeMeasure()}}});function qy(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const y4=Oe.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),b4={x:0,y:0},og=pe.define({enables:[rg,y4]}),iO=pe.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class $f{static create(e){return new $f(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new rw(e,iO,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let s=i[e];if(s!==void 0){if(n===void 0)n=s;else if(n!==s)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const S4=og.compute([iO],t=>{let e=t.facet(iO);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:$f.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class v4{constructor(e,n,i,s,r){this.view=e,this.source=n,this.field=i,this.setHover=s,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;ea.bottom||n.xa.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(s)).find(u=>u.from<=s&&u.to>=s),c=l&&l.dir==$t.RTL?-1:1;r=n.x{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Xn(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(rg),n=e?e.manager.tooltips.findIndex(i=>i.create==$f.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:r}=this;if(s.length&&r&&!P4(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,a=(i=(n=s[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!x4(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Nc=4;function P4(t,e){let{left:n,right:i,top:s,bottom:r}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();s=Math.min(a.top,s),r=Math.max(a.bottom,r)}return e.clientX>=n-Nc&&e.clientX<=i+Nc&&e.clientY>=s-Nc&&e.clientY<=r+Nc}function x4(t,e,n,i,s,r){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.rights||Math.min(o.bottom,a)=e&&l<=n}function w4(t,e={}){let n=Xe.define(),i=Bt.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let a of s){let l=r.changes.mapPos(a.pos,-1,en.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=r.changes.mapPos(c.end)),o.push(c)}}s=o}for(let o of r.effects)o.is(n)&&(s=o.value),o.is(T4)&&(s=[]);return s},provide:s=>iO.from(s)});return{active:i,extension:[i,Xt.define(s=>new v4(s,t,i,n,e.hoverTime||300)),S4]}}function ow(t,e){let n=t.plugin(rg);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const T4=Xe.define(),Iy=pe.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function _l(t,e){let n=t.plugin(aw),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const aw=Xt.fromClass(class{constructor(t){this.input=t.state.facet(kl),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Iy);this.top=new jc(t,!0,e.topContainer),this.bottom=new jc(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Iy);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new jc(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new jc(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(kl);if(n!=this.input){let i=n.filter(l=>l),s=[],r=[],o=[],a=[];for(let l of i){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),s.push(u),(u.top?r:o).push(u)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Oe.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class jc{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Uy(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Uy(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Uy(t){let e=t.nextSibling;return t.remove(),e}const kl=pe.define({enables:aw});class Rs extends Ur{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Rs.prototype.elementClass="";Rs.prototype.toDOM=void 0;Rs.prototype.mapMode=en.TrackBefore;Rs.prototype.startSide=Rs.prototype.endSide=-1;Rs.prototype.point=!0;const Qu=pe.define(),_4=pe.define(),k4={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ke.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},el=pe.define();function R4(t){return[lw(),el.of({...k4,...t})]}const Wy=pe.define({combine:t=>t.some(e=>e)});function lw(t){return[X4]}const X4=Xt.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(el).map(e=>new Ly(t,e)),this.fixed=!t.state.facet(Wy);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Wy)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ke.iter(this.view.state.facet(Qu),this.view.viewport.from),i=[],s=this.gutters.map(r=>new C4(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let o=!0;for(let a of r.type)if(a.type==Qn.Text&&o){mp(n,i,a.from);for(let l of s)l.line(this.view,a,i);o=!1}else if(a.widget)for(let l of s)l.widget(this.view,a)}else if(r.type==Qn.Text){mp(n,i,r.from);for(let o of s)o.line(this.view,r,i)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(el),n=t.state.facet(el),i=t.docChanged||t.heightChanged||t.viewportChanged||!Ke.eq(t.startState.facet(Qu),t.state.facet(Qu),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let s of this.gutters)s.update(t)&&(i=!0);else{i=!0;let s=[];for(let r of n){let o=e.indexOf(r);o<0?s.push(new Ly(this.view,r)):(this.gutters[o].update(t),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)r.config.side=="after"?this.getDOMAfter().appendChild(r.dom):this.dom.appendChild(r.dom);this.gutters=s}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Oe.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,s=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==$t.LTR?{left:i,right:s}:{right:i,left:s}})});function Dy(t){return Array.isArray(t)?t:[t]}function mp(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class C4{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Ke.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:s}=this,r=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==s.elements.length){let a=new cw(e,o,r,i);s.elements.push(a),s.dom.appendChild(a.dom)}else s.elements[this.i].update(e,o,r,i);this.height=n.bottom,this.i++}line(e,n,i){let s=[];mp(this.cursor,s,n.from),i.length&&(s=s.concat(i));let r=this.gutter.config.lineMarker(e,n,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,s)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),s=i?[i]:null;for(let r of e.state.facet(_4)){let o=r(e,n.widget,n);o&&(s||(s=[])).push(o)}s&&this.addElement(e,n,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Ly{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let l=r.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=s.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[i](e,a,s)&&s.preventDefault()});this.markers=Dy(n.markers(e)),n.initialSpacer&&(this.spacer=new cw(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Dy(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let i=e.view.viewport;return!Ke.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class cw{constructor(e,n,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,s)}update(e,n,i,s){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),V4(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,n){let i="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let a=o,l=rr(a,l,c)||o(a,l,c):o}return i}})}});class pd extends Rs{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function md(t,e){return t.state.facet(Qo).formatNumber(e,t.state)}const Z4=el.compute([Qo],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(A4)},lineMarker(e,n,i){return i.some(s=>s.toDOM)?null:new pd(md(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let s of e.state.facet(E4)){let r=s(e,n,i);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(Qo)!=e.state.facet(Qo),initialSpacer(e){return new pd(md(e,Ny(e.state.doc.lines)))},updateSpacer(e,n){let i=md(n.view,Ny(n.view.state.doc.lines));return i==e.number?e:new pd(i)},domEventHandlers:t.facet(Qo).domEventHandlers,side:"before"}));function z4(t={}){return[Qo.of(t),lw(),Z4]}function Ny(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let s=t.doc.lineAt(i.head).from;s>n&&(n=s,e.push(Y4.range(s)))}return Ke.of(e)});function q4(){return M4}const uw=1024;let I4=0;class ti{constructor(e,n){this.from=e,this.to=n}}class Ee{constructor(e={}){this.id=I4++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Sn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}Ee.closedBy=new Ee({deserialize:t=>t.split(" ")});Ee.openedBy=new Ee({deserialize:t=>t.split(" ")});Ee.group=new Ee({deserialize:t=>t.split(" ")});Ee.isolate=new Ee({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Ee.contextHash=new Ee({perNode:!0});Ee.lookAhead=new Ee({perNode:!0});Ee.mounted=new Ee({perNode:!0});class Rl{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[Ee.mounted.id]}}const U4=Object.create(null);class Sn{constructor(e,n,i,s=0){this.name=e,this.props=n,this.id=i,this.flags=s}static define(e){let n=e.props&&e.props.length?Object.create(null):U4,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Sn(e.name||"",n,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Ee.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let s of i.split(" "))n[s]=e[i];return i=>{for(let s=i.prop(Ee.group),r=-1;r<(s?s.length:0);r++){let o=n[r<0?i.name:s[r]];if(o)return o}}}}Sn.none=new Sn("",Object.create(null),0,8);class ag{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(o|ht.IncludeAnonymous);;){let c=!1;if(l.from<=r&&l.to>=s&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&i&&(a||!l.type.isAnonymous)&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:ug(Sn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,s)=>new vt(this.type,n,i,s,this.propValues),e.makeTree||((n,i,s)=>new vt(Sn.none,n,i,s)))}static build(e){return N4(e)}}vt.empty=new vt(Sn.none,[],[],0);class lg{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new lg(this.buffer,this.index)}}class cr{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Sn.none}toString(){let e=[];for(let n=0;n0));l=o[l+3]);return a}slice(e,n,i){let s=this.buffer,r=new Uint16Array(n-e),o=0;for(let a=e,l=0;a=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function Xl(t,e,n,i){for(var s;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?a.length:-1;e!=c;e+=n){let u=a[e],O=l[e]+o.from;if(Ow(s,i,O,O+u.length)){if(u instanceof cr){if(r&ht.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,i-O,s);if(f>-1)return new zi(new W4(o,u,e,O),null,f)}else if(r&ht.IncludeAnonymous||!u.type.isAnonymous||cg(u)){let f;if(!(r&ht.IgnoreMounts)&&(f=Rl.get(u))&&!f.overlay)return new un(f.tree,O,e,o);let d=new un(u,O,e,o);return r&ht.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?u.children.length-1:0,n,i,s)}}}if(r&ht.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let s;if(!(i&ht.IgnoreOverlays)&&(s=Rl.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:a}of s.overlay)if((n>0?o<=r:o=r:a>r))return new un(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function By(t,e,n,i){let s=t.cursor(),r=[];if(!s.firstChild())return r;if(n!=null){for(let o=!1;!o;)if(o=s.type.is(n),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function gp(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class W4{constructor(e,n,i,s){this.parent=e,this.buffer=n,this.index=i,this.start=s}}class zi extends fw{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,n-this.context.start,i);return r<0?null:new zi(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&ht.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return r<0?null:new zi(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new zi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new zi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),n.push(0)}return new vt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function dw(t){if(!t.length)return null;let e=0,n=t[0];for(let r=1;rn.from||o.to=e){let a=new un(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(Xl(a,e,n,!1))}}return s?dw(s):i}class sO{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof un)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=n||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof un?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,n-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&ht.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ht.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ht.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(n.findChild(s,this.index,-1,0,4))}else{let s=n.buffer[this.index+3];if(s<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=n+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let a=i._tree.children[r];if(this.mode&ht.IncludeAnonymous||a instanceof cr||!a.type.isAnonymous||cg(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;n=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return gp(this._tree,e,s);let o=i[n.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function cg(t){return t.children.some(e=>e instanceof cr||!e.type.isAnonymous||cg(e))}function N4(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:s=uw,reused:r=[],minRepeatType:o=i.types.length}=t,a=Array.isArray(n)?new lg(n,n.length):n,l=i.types,c=0,u=0;function O(S,v,P,w,k,E){let{id:I,start:Z,end:K,size:ie}=a,ae=u,G=c;for(;ie<0;)if(a.next(),ie==-1){let Se=r[I];P.push(Se),w.push(Z-S);return}else if(ie==-3){c=I;return}else if(ie==-4){u=I;return}else throw new RangeError(`Unrecognized record size: ${ie}`);let q=l[I],Y,F,ue=Z-S;if(K-Z<=s&&(F=m(a.pos-v,k))){let Se=new Uint16Array(F.size-F.skip),fe=a.pos-F.size,Te=Se.length;for(;a.pos>fe;)Te=g(F.start,Se,Te);Y=new cr(Se,K-F.start,i),ue=F.start-S}else{let Se=a.pos-ie;a.next();let fe=[],Te=[],Ve=I>=o?I:-1,Fe=0,Ze=K;for(;a.pos>Se;)Ve>=0&&a.id==Ve&&a.size>=0?(a.end<=Ze-s&&(h(fe,Te,Z,Fe,a.end,Ze,Ve,ae,G),Fe=fe.length,Ze=a.end),a.next()):E>2500?f(Z,Se,fe,Te):O(Z,Se,fe,Te,Ve,E+1);if(Ve>=0&&Fe>0&&Fe-1&&Fe>0){let Re=d(q,G);Y=ug(q,fe,Te,0,fe.length,0,K-Z,Re,Re)}else Y=p(q,fe,Te,K-Z,ae-K,G)}P.push(Y),w.push(ue)}function f(S,v,P,w){let k=[],E=0,I=-1;for(;a.pos>v;){let{id:Z,start:K,end:ie,size:ae}=a;if(ae>4)a.next();else{if(I>-1&&K=0;ie-=3)Z[ae++]=k[ie],Z[ae++]=k[ie+1]-K,Z[ae++]=k[ie+2]-K,Z[ae++]=ae;P.push(new cr(Z,k[2]-K,i)),w.push(K-S)}}function d(S,v){return(P,w,k)=>{let E=0,I=P.length-1,Z,K;if(I>=0&&(Z=P[I])instanceof vt){if(!I&&Z.type==S&&Z.length==k)return Z;(K=Z.prop(Ee.lookAhead))&&(E=w[I]+Z.length+K)}return p(S,P,w,k,E,v)}}function h(S,v,P,w,k,E,I,Z,K){let ie=[],ae=[];for(;S.length>w;)ie.push(S.pop()),ae.push(v.pop()+P-k);S.push(p(i.types[I],ie,ae,E-k,Z-E,K)),v.push(k-P)}function p(S,v,P,w,k,E,I){if(E){let Z=[Ee.contextHash,E];I=I?[Z].concat(I):[Z]}if(k>25){let Z=[Ee.lookAhead,k];I=I?[Z].concat(I):[Z]}return new vt(S,v,P,w,I)}function m(S,v){let P=a.fork(),w=0,k=0,E=0,I=P.end-s,Z={size:0,start:0,skip:0};e:for(let K=P.pos-S;P.pos>K;){let ie=P.size;if(P.id==v&&ie>=0){Z.size=w,Z.start=k,Z.skip=E,E+=4,w+=4,P.next();continue}let ae=P.pos-ie;if(ie<0||ae=o?4:0,q=P.start;for(P.next();P.pos>ae;){if(P.size<0)if(P.size==-3)G+=4;else break e;else P.id>=o&&(G+=4);P.next()}k=q,w+=ie,E+=G}return(v<0||w==S)&&(Z.size=w,Z.start=k,Z.skip=E),Z.size>4?Z:void 0}function g(S,v,P){let{id:w,start:k,end:E,size:I}=a;if(a.next(),I>=0&&w4){let K=a.pos-(I-4);for(;a.pos>K;)P=g(S,v,P)}v[--P]=Z,v[--P]=E-S,v[--P]=k-S,v[--P]=w}else I==-3?c=w:I==-4&&(u=w);return P}let b=[],Q=[];for(;a.pos>0;)O(t.start||0,t.bufferStart||0,b,Q,-1,0);let y=(e=t.length)!==null&&e!==void 0?e:b.length?Q[0]+b[0].length:0;return new vt(l[t.topID],b.reverse(),Q.reverse(),y)}const Gy=new WeakMap;function yu(t,e){if(!t.isAnonymous||e instanceof cr||e.type!=t)return 1;let n=Gy.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof vt)){n=1;break}n+=yu(t,i)}Gy.set(e,n)}return n}function ug(t,e,n,i,s,r,o,a,l){let c=0;for(let h=i;h=u)break;v+=P}if(Q==y+1){if(v>u){let P=h[y];d(P.children,P.positions,0,P.children.length,p[y]+b);continue}O.push(h[y])}else{let P=p[Q-1]+h[Q-1].length-S;O.push(ug(t,h,p,y,Q,S,P,null,l))}f.push(S+b-r)}}return d(e,n,i,s,0),(a||l)(O,f,o)}class hw{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof zi?this.setBuffer(e.context.buffer,e.index,n):e instanceof un&&this.map.set(e.tree,n)}get(e){return e instanceof zi?this.getBuffer(e.context.buffer,e.index):e instanceof un?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Qs{constructor(e,n,i,s,r=!1,o=!1){this.from=e,this.to=n,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let s=[new Qs(0,e.length,e,0,!1,i)];for(let r of n)r.to>e.length&&s.push(r);return s}static applyChanges(e,n,i=128){if(!n.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a=i)for(;o&&o.from=f.from||O<=f.to||c){let d=Math.max(f.from,l)-c,h=Math.min(f.to,O)-c;f=d>=h?null:new Qs(d,h,f.tree,f.offset+c,a>0,!!u)}if(f&&s.push(f),o.to>O)break;o=rnew ti(s.from,s.to)):[new ti(0,0)]:[new ti(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let s=this.startParse(e,n,i);for(;;){let r=s.advance();if(r)return r}}}class j4{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function mw(t){return(e,n,i,s)=>new G4(e,t,n,i,s)}class Fy{constructor(e,n,i,s,r){this.parser=e,this.parse=n,this.overlay=i,this.target=s,this.from=r}}function Hy(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class B4{constructor(e,n,i,s,r,o,a){this.parser=e,this.predicate=n,this.mounts=i,this.index=s,this.start=r,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const $p=new Ee({perNode:!0});class G4{constructor(e,n,i,s,r){this.nest=n,this.input=i,this.fragments=s,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new vt(i.type,i.children,i.positions,i.length,i.propValues.concat([[$p,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[Ee.mounted.id]=new Rl(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)a=!1;else if(e.hasNode(s)){if(n){let c=n.mounts.find(u=>u.frag.from<=s.from&&u.frag.to>=s.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let O=u.from+c.pos,f=u.to+c.pos;O>=s.from&&f<=s.to&&!n.ranges.some(d=>d.fromO)&&n.ranges.push({from:O,to:f})}}a=!1}else if(i&&(o=F4(i.ranges,s.from,s.to)))a=o!=2;else if(!s.type.isAnonymous&&(r=this.nest(s,this.input))&&(s.fromnew ti(O.from-s.from,O.to-s.from)):null,s.tree,u.length?u[0].from:s.from)),r.overlay?u.length&&(i={ranges:u,depth:0,prev:i}):a=!1}}else if(n&&(l=n.predicate(s))&&(l===!0&&(l=new ti(s.from,s.to)),l.from=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&s.firstChild())n&&n.depth++,i&&i.depth++;else for(;!s.nextSibling();){if(!s.parent())break e;if(n&&!--n.depth){let c=eb(this.ranges,n.ranges);c.length&&(Hy(c),this.inner.splice(n.index,0,new Fy(n.parser,n.parser.startParse(this.input,tb(n.mounts,c),c),n.ranges.map(u=>new ti(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function F4(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function Ky(t,e,n,i,s,r){if(e=e&&n.enter(i,1,ht.IgnoreOverlays|ht.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof vt)n=n.children[0];else break}return!1}}let K4=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop($p))!==null&&n!==void 0?n:i.to,this.inner=new Jy(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop($p))!==null&&e!==void 0?e:n.to,this.inner=new Jy(n.tree,-n.offset)}}findMounts(e,n){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(i=r.tree)===null||i===void 0?void 0:i.prop(Ee.mounted);if(o&&o.parser==n)for(let a=this.fragI;a=r.to)break;l.tree==this.curFrag.tree&&s.push({frag:l,pos:r.from-l.offset,mount:o})}}}return s}};function eb(t,e){let n=null,i=e;for(let s=1,r=0;s=a)break;l.to<=o||(n||(i=n=e.slice()),l.froma&&n.splice(r+1,0,new ti(a,l.to))):l.to>a?n[r--]=new ti(a,l.to):n.splice(r--,1))}}return i}function J4(t,e,n,i){let s=0,r=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=s==t.length?1e9:o?t[s].to:t[s].from,O=r==e.length?1e9:a?e[r].to:e[r].from;if(o!=a){let f=Math.max(l,n),d=Math.min(u,O,i);fnew ti(f.from+i,f.to+i)),O=J4(e,u,l,c);for(let f=0,d=l;;f++){let h=f==O.length,p=h?c:O[f].from;if(p>d&&n.push(new Qs(d,p,s.tree,-o,r.from>=d||r.openStart,r.to<=p||r.openEnd)),h)break;d=O[f].to}}else n.push(new Qs(l,c,s.tree,-o,r.from>=o||r.openStart,r.to<=a||r.openEnd))}return n}let e6=0;class ei{constructor(e,n,i,s){this.name=e,this.set=n,this.base=i,this.modified=s,this.id=e6++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof ei&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let s=new ei(i,[],null,[]);if(s.set.push(s),n)for(let r of n.set)s.set.push(r);return s}static defineModifier(e){let n=new rO(e);return i=>i.modified.indexOf(n)>-1?i:rO.get(i.base||i,i.modified.concat(n).sort((s,r)=>s.id-r.id))}}let t6=0;class rO{constructor(e){this.name=e,this.instances=[],this.id=t6++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(a=>a.base==e&&n6(n,a.modified));if(i)return i;let s=[],r=new ei(e.name,s,e,n);for(let a of n)a.instances.push(r);let o=i6(n);for(let a of e.set)if(!a.modified.length)for(let l of o)s.push(rO.get(a,l));return r}}function n6(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function i6(t){let e=[[]];for(let n=0;ni.length-n.length)}function ua(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let s of n.split(" "))if(s){let r=[],o=2,a=s;for(let O=0;;){if(a=="..."&&O>0&&O+3==s.length){o=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!f)throw new RangeError("Invalid path: "+s);if(r.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),O+=f[0].length,O==s.length)break;let d=s[O++];if(O==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);a=s.slice(O)}let l=r.length-1,c=r[l];if(!c)throw new RangeError("Invalid path: "+s);let u=new oO(i,o,l>0?r.slice(0,l):null);e[c]=u.sort(e[c])}}return gw.add(e)}const gw=new Ee;class oO{constructor(e,n,i,s){this.tags=e,this.mode=n,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let a of r)for(let l of a.set){let c=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:i}}function s6(t,e){let n=null;for(let i of t){let s=i.style(e);s&&(n=n?n+" "+s:s)}return n}function r6(t,e,n,i=0,s=t.length){let r=new o6(i,Array.isArray(e)?e:[e],n);r.highlightRange(t.cursor(),i,s,"",r.highlighters),r.flush(s)}class o6{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,s,r){let{type:o,from:a,to:l}=e;if(a>=i||l<=n)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let c=s,u=a6(e)||oO.empty,O=s6(r,u.tags);if(O&&(c&&(c+=" "),c+=O,u.mode==1&&(s+=(s?" ":"")+O)),this.startSpan(Math.max(n,a),c),u.opaque)return;let f=e.tree&&e.tree.prop(Ee.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+a,1),h=this.highlighters.filter(m=>!m.scope||m.scope(f.tree.type)),p=e.firstChild();for(let m=0,g=a;;m++){let b=m=Q||!e.nextSibling())););if(!b||Q>i)break;g=b.to+a,g>n&&(this.highlightRange(d.cursor(),Math.max(n,b.from+a),Math.min(i,g),"",h),this.startSpan(Math.min(i,g),c))}p&&e.parent()}else if(e.firstChild()){f&&(s="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,s,r),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}}function a6(t){let e=t.type.prop(gw);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const ce=ei.define,Gc=ce(),Ns=ce(),nb=ce(Ns),ib=ce(Ns),js=ce(),Fc=ce(js),gd=ce(js),Ri=ce(),vr=ce(Ri),Ti=ce(),_i=ce(),Qp=ce(),Ta=ce(Qp),Hc=ce(),_={comment:Gc,lineComment:ce(Gc),blockComment:ce(Gc),docComment:ce(Gc),name:Ns,variableName:ce(Ns),typeName:nb,tagName:ce(nb),propertyName:ib,attributeName:ce(ib),className:ce(Ns),labelName:ce(Ns),namespace:ce(Ns),macroName:ce(Ns),literal:js,string:Fc,docString:ce(Fc),character:ce(Fc),attributeValue:ce(Fc),number:gd,integer:ce(gd),float:ce(gd),bool:ce(js),regexp:ce(js),escape:ce(js),color:ce(js),url:ce(js),keyword:Ti,self:ce(Ti),null:ce(Ti),atom:ce(Ti),unit:ce(Ti),modifier:ce(Ti),operatorKeyword:ce(Ti),controlKeyword:ce(Ti),definitionKeyword:ce(Ti),moduleKeyword:ce(Ti),operator:_i,derefOperator:ce(_i),arithmeticOperator:ce(_i),logicOperator:ce(_i),bitwiseOperator:ce(_i),compareOperator:ce(_i),updateOperator:ce(_i),definitionOperator:ce(_i),typeOperator:ce(_i),controlOperator:ce(_i),punctuation:Qp,separator:ce(Qp),bracket:Ta,angleBracket:ce(Ta),squareBracket:ce(Ta),paren:ce(Ta),brace:ce(Ta),content:Ri,heading:vr,heading1:ce(vr),heading2:ce(vr),heading3:ce(vr),heading4:ce(vr),heading5:ce(vr),heading6:ce(vr),contentSeparator:ce(Ri),list:ce(Ri),quote:ce(Ri),emphasis:ce(Ri),strong:ce(Ri),link:ce(Ri),monospace:ce(Ri),strikethrough:ce(Ri),inserted:ce(),deleted:ce(),changed:ce(),invalid:ce(),meta:Hc,documentMeta:ce(Hc),annotation:ce(Hc),processingInstruction:ce(Hc),definition:ei.defineModifier("definition"),constant:ei.defineModifier("constant"),function:ei.defineModifier("function"),standard:ei.defineModifier("standard"),local:ei.defineModifier("local"),special:ei.defineModifier("special")};for(let t in _){let e=_[t];e instanceof ei&&(e.name=t)}$w([{tag:_.link,class:"tok-link"},{tag:_.heading,class:"tok-heading"},{tag:_.emphasis,class:"tok-emphasis"},{tag:_.strong,class:"tok-strong"},{tag:_.keyword,class:"tok-keyword"},{tag:_.atom,class:"tok-atom"},{tag:_.bool,class:"tok-bool"},{tag:_.url,class:"tok-url"},{tag:_.labelName,class:"tok-labelName"},{tag:_.inserted,class:"tok-inserted"},{tag:_.deleted,class:"tok-deleted"},{tag:_.literal,class:"tok-literal"},{tag:_.string,class:"tok-string"},{tag:_.number,class:"tok-number"},{tag:[_.regexp,_.escape,_.special(_.string)],class:"tok-string2"},{tag:_.variableName,class:"tok-variableName"},{tag:_.local(_.variableName),class:"tok-variableName tok-local"},{tag:_.definition(_.variableName),class:"tok-variableName tok-definition"},{tag:_.special(_.variableName),class:"tok-variableName2"},{tag:_.definition(_.propertyName),class:"tok-propertyName tok-definition"},{tag:_.typeName,class:"tok-typeName"},{tag:_.namespace,class:"tok-namespace"},{tag:_.className,class:"tok-className"},{tag:_.macroName,class:"tok-macroName"},{tag:_.propertyName,class:"tok-propertyName"},{tag:_.operator,class:"tok-operator"},{tag:_.comment,class:"tok-comment"},{tag:_.meta,class:"tok-meta"},{tag:_.invalid,class:"tok-invalid"},{tag:_.punctuation,class:"tok-punctuation"}]);var $d;const yo=new Ee;function Qw(t){return pe.define({combine:t?e=>e.concat(t):void 0})}const Og=new Ee;class hi{constructor(e,n,i=[],s=""){this.data=e,this.name=s,Ie.prototype.hasOwnProperty("tree")||Object.defineProperty(Ie.prototype,"tree",{get(){return St(this)}}),this.parser=n,this.extension=[Or.of(this),Ie.languageData.of((r,o,a)=>{let l=sb(r,o,a),c=l.type.prop(yo);if(!c)return[];let u=r.facet(c),O=l.type.prop(Og);if(O){let f=l.resolve(o-l.from,a);for(let d of O)if(d.test(f,r)){let h=r.facet(d.facet);return d.type=="replace"?h:h.concat(u)}}return u})].concat(i)}isActiveAt(e,n,i=-1){return sb(e,n,i).type.prop(yo)==this.data}findRegions(e){let n=e.facet(Or);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(yo)==this.data){i.push({from:o,to:o+r.length});return}let a=r.prop(Ee.mounted);if(a){if(a.tree.prop(yo)==this.data){if(a.overlay)for(let l of a.overlay)i.push({from:l.from+o,to:l.to+o});else i.push({from:o,to:o+r.length});return}else if(a.overlay){let l=i.length;if(s(a.tree,a.overlay[0].from+o),i.length>l)return}}for(let l=0;li.isTop?n:void 0)]}),e.name)}configure(e,n){return new ur(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function St(t){let e=t.field(hi.state,!1);return e?e.tree:vt.empty}class l6{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let _a=null;class aO{constructor(e,n,i=[],s,r,o,a,l){this.parser=e,this.state=n,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new aO(e,n,[],vt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new l6(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=vt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Qs.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=_a;_a=this;try{return e()}finally{_a=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=rb(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,O,f)=>l.push({fromA:c,toA:u,fromB:O,toB:f})),i=Qs.applyChanges(i,l),s=vt.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),O=e.mapPos(c.to,-1);ue.from&&(this.fragments=rb(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends pw{createParse(n,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let l=_a;if(l){for(let c of s)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new vt(Sn.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return _a}}function rb(t,e,n){return Qs.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Fo{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new Fo(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=aO.create(e.facet(Or).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new Fo(i)}}hi.state=Bt.define({create:Fo.init,update(t,e){for(let n of e.effects)if(n.is(hi.setState))return n.value;return e.startState.facet(Or)!=e.state.facet(Or)?Fo.init(e.state):t.apply(e)}});let yw=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(yw=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Qd=typeof navigator<"u"&&(!(($d=navigator.scheduling)===null||$d===void 0)&&$d.isInputPending)?()=>navigator.scheduling.isInputPending():null,c6=Xt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(hi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(hi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=yw(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnds+1e3,l=r.context.work(()=>Qd&&Qd()||Date.now()>o,s+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:hi.setState.of(new Fo(r.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Xn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Or=pe.define({combine(t){return t.length?t[0]:null},enables:t=>[hi.state,c6,Oe.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class sc{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const u6=pe.define(),rc=pe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function lO(t){let e=t.facet(rc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Cl(t,e){let n="",i=t.tabSize,s=t.facet(rc)[0];if(s==" "){for(;e>=i;)n+=" ",e-=i;s=" "}for(let r=0;r=e?O6(t,n,e):null}class Qf{constructor(e,n={}){this.state=e,this.options=n,this.unit=lO(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(n<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,n=e.length){return ca(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:s}=this.lineAt(e,n),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Oa=new Ee;function O6(t,e,n){let i=e.resolveStack(n),s=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(s!=i.node){let r=[];for(let o=s;o&&!(o.fromi.node.to||o.from==i.node.from&&o.type==i.node.type);o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)i={node:r[o],next:i}}return bw(i,t,n)}function bw(t,e,n){for(let i=t;i;i=i.next){let s=d6(i.node);if(s)return s(dg.create(e,n,i))}return 0}function f6(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function d6(t){let e=t.type.prop(Oa);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(Ee.closedBy))){let s=t.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>vw(o,!0,1,void 0,r&&!f6(o)?s.from:void 0)}return t.parent==null?h6:null}function h6(){return 0}class dg extends Qf{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new dg(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(p6(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return bw(this.context.next,this.base,this.pos)}}function p6(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function m6(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let s=t.options.simulateBreak,r=t.state.doc.lineAt(n.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==i)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let c=/^ */.exec(r.text.slice(n.to-r.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function Sw({closing:t,align:e=!0,units:n=1}){return i=>vw(i,e,n,t)}function vw(t,e,n,i,s){let r=t.textAfter,o=r.match(/^\s*/)[0].length,a=i&&r.slice(o,o+i.length)==i||s==t.pos+o,l=e?m6(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const g6=t=>t.baseIndent;function Zr({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const $6=200;function Q6(){return Ie.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,s=n.lineAt(i);if(i>s.from+$6)return t;let r=n.sliceString(s.from,i);if(!e.some(c=>c.test(r)))return t;let{state:o}=t,a=-1,l=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==a)continue;a=u.from;let O=fg(o,u.from);if(O==null)continue;let f=/^\s*/.exec(u.text)[0],d=Cl(o,O);f!=d&&l.push({from:u.from,to:u.from+f.length,insert:d})}return l.length?[t,{changes:l,sequential:!0}]:t})}const y6=pe.define(),fa=new Ee;function hg(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(r&&a.from=e&&c.to>n&&(r=c)}}return r}function S6(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function cO(t,e,n){for(let i of t.facet(y6)){let s=i(t,e,n);if(s)return s}return b6(t,e,n)}function Pw(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const yf=Xe.define({map:Pw}),oc=Xe.define({map:Pw});function xw(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Nr=Bt.define({create(){return xe.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>t=ob(t,n,i)),t=t.map(e.changes);for(let n of e.effects)if(n.is(yf)&&!v6(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(_w),s=i?xe.replace({widget:new R6(i(e.state,n.value))}):ab;t=t.update({add:[s.range(n.value.from,n.value.to)]})}else n.is(oc)&&(t=t.update({filter:(i,s)=>n.value.from!=i||n.value.to!=s,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=ob(t,e.selection.main.head)),t},provide:t=>Oe.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,s)=>{n.push(i,s)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{se&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(s,r)=>s>=n||r<=e}):t}function uO(t,e,n){var i;let s=null;return(i=t.field(Nr,!1))===null||i===void 0||i.between(e,n,(r,o)=>{(!s||s.from>r)&&(s={from:r,to:o})}),s}function v6(t,e,n){let i=!1;return t.between(e,e,(s,r)=>{s==e&&r==n&&(i=!0)}),i}function ww(t,e){return t.field(Nr,!1)?e:e.concat(Xe.appendConfig.of(kw()))}const P6=t=>{for(let e of xw(t)){let n=cO(t.state,e.from,e.to);if(n)return t.dispatch({effects:ww(t.state,[yf.of(n),Tw(t,n)])}),!0}return!1},x6=t=>{if(!t.state.field(Nr,!1))return!1;let e=[];for(let n of xw(t)){let i=uO(t.state,n.from,n.to);i&&e.push(oc.of(i),Tw(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function Tw(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number;return Oe.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${s}.`)}const w6=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(Nr,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,s)=>{n.push(oc.of({from:i,to:s}))}),t.dispatch({effects:n}),!0},_6=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:P6},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:x6},{key:"Ctrl-Alt-[",run:w6},{key:"Ctrl-Alt-]",run:T6}],k6={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},_w=pe.define({combine(t){return Ji(t,k6)}});function kw(t){return[Nr,V6]}function Rw(t,e){let{state:n}=t,i=n.facet(_w),s=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=uO(t.state,a.from,a.to);l&&t.dispatch({effects:oc.of(l)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,s,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const ab=xe.replace({widget:new class extends es{toDOM(t){return Rw(t,null)}}});class R6 extends es{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Rw(e,this.value)}}const X6={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class yd extends Rs{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function C6(t={}){let e={...X6,...t},n=new yd(e,!0),i=new yd(e,!1),s=Xt.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Or)!=o.state.facet(Or)||o.startState.field(Nr,!1)!=o.state.field(Nr,!1)||St(o.startState)!=St(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new _s;for(let l of o.viewportLineBlocks){let c=uO(o.state,l.from,l.to)?i:cO(o.state,l.from,l.to)?n:null;c&&a.add(l.from,l.from,c)}return a.finish()}}),{domEventHandlers:r}=e;return[s,R4({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(s))===null||a===void 0?void 0:a.markers)||Ke.empty},initialSpacer(){return new yd(e,!1)},domEventHandlers:{...r,click:(o,a,l)=>{if(r.click&&r.click(o,a,l))return!0;let c=uO(o.state,a.from,a.to);if(c)return o.dispatch({effects:oc.of(c)}),!0;let u=cO(o.state,a.from,a.to);return u?(o.dispatch({effects:yf.of(u)}),!0):!1}}}),kw()]}const V6=Oe.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class bf{constructor(e,n){this.specs=e;let i;function s(a){let l=or.newName();return(i||(i=Object.create(null)))["."+l]=a,l}const r=typeof n.all=="string"?n.all:n.all?s(n.all):void 0,o=n.scope;this.scope=o instanceof hi?a=>a.prop(yo)==o.data:o?a=>a==o:void 0,this.style=$w(e.map(a=>({tag:a.tag,class:a.class||s(Object.assign({},a,{tag:null}))})),{all:r}).style,this.module=i?new or(i):null,this.themeType=n.themeType}static define(e,n){return new bf(e,n||{})}}const yp=pe.define(),Xw=pe.define({combine(t){return t.length?[t[0]]:null}});function bd(t){let e=t.facet(yp);return e.length?e:t.facet(Xw)}function A6(t,e){let n=[Z6],i;return t instanceof bf&&(t.module&&n.push(Oe.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(Xw.of(t)):i?n.push(yp.computeN([Oe.darkTheme],s=>s.facet(Oe.darkTheme)==(i=="dark")?[t]:[])):n.push(yp.of(t)),n}class E6{constructor(e){this.markCache=Object.create(null),this.tree=St(e.state),this.decorations=this.buildDeco(e,bd(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=St(e.state),i=bd(e.state),s=i!=bd(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||s)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,n){if(!n||!this.tree.length)return xe.none;let i=new _s;for(let{from:s,to:r}of e.visibleRanges)r6(this.tree,n,(o,a,l)=>{i.add(o,a,this.markCache[l]||(this.markCache[l]=xe.mark({class:l})))},s,r);return i.finish()}}const Z6=$r.high(Xt.fromClass(E6,{decorations:t=>t.decorations})),z6=bf.define([{tag:_.meta,color:"#404740"},{tag:_.link,textDecoration:"underline"},{tag:_.heading,textDecoration:"underline",fontWeight:"bold"},{tag:_.emphasis,fontStyle:"italic"},{tag:_.strong,fontWeight:"bold"},{tag:_.strikethrough,textDecoration:"line-through"},{tag:_.keyword,color:"#708"},{tag:[_.atom,_.bool,_.url,_.contentSeparator,_.labelName],color:"#219"},{tag:[_.literal,_.inserted],color:"#164"},{tag:[_.string,_.deleted],color:"#a11"},{tag:[_.regexp,_.escape,_.special(_.string)],color:"#e40"},{tag:_.definition(_.variableName),color:"#00f"},{tag:_.local(_.variableName),color:"#30a"},{tag:[_.typeName,_.namespace],color:"#085"},{tag:_.className,color:"#167"},{tag:[_.special(_.variableName),_.macroName],color:"#256"},{tag:_.definition(_.propertyName),color:"#00c"},{tag:_.comment,color:"#940"},{tag:_.invalid,color:"#f00"}]),Y6=Oe.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Cw=1e4,Vw="()[]{}",Aw=pe.define({combine(t){return Ji(t,{afterCursor:!0,brackets:Vw,maxScanDistance:Cw,renderMatch:I6})}}),M6=xe.mark({class:"cm-matchingBracket"}),q6=xe.mark({class:"cm-nonmatchingBracket"});function I6(t){let e=[],n=t.matched?M6:q6;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const U6=Bt.define({create(){return xe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(Aw);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=Yi(e.state,s.head,-1,i)||s.head>0&&Yi(e.state,s.head-1,1,i)||i.afterCursor&&(Yi(e.state,s.head,1,i)||s.headOe.decorations.from(t)}),W6=[U6,Y6];function D6(t={}){return[Aw.of(t),W6]}const pg=new Ee;function bp(t,e,n){let i=t.prop(e<0?Ee.openedBy:Ee.closedBy);if(i)return i;if(t.name.length==1){let s=n.indexOf(t.name);if(s>-1&&s%2==(e<0?1:0))return[n[s+e]]}return null}function Sp(t){let e=t.type.prop(pg);return e?e(t.node):t}function Yi(t,e,n,i={}){let s=i.maxScanDistance||Cw,r=i.brackets||Vw,o=St(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=bp(l.type,n,r);if(c&&l.from0?e>=u.from&&eu.from&&e<=u.to))return L6(t,e,n,l,u,c,r)}}return N6(t,e,n,o,a.type,s,r)}function L6(t,e,n,i,s,r,o){let a=i.parent,l={from:s.from,to:s.to},c=0,u=a==null?void 0:a.cursor();if(u&&(n<0?u.childBefore(i.from):u.childAfter(i.to)))do if(n<0?u.to<=i.from:u.from>=i.to){if(c==0&&r.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),O=0;for(let f=0;!u.next().done&&f<=r;){let d=u.value;n<0&&(f+=d.length);let h=e+f*n;for(let p=n>0?0:d.length-1,m=n>0?d.length:-1;p!=m;p+=n){let g=o.indexOf(d[p]);if(!(g<0||i.resolveInner(h+p,1).type!=s))if(g%2==0==n>0)O++;else{if(O==1)return{start:c,end:{from:h+p,to:h+p+1},matched:g>>1==l>>1};O--}}n>0&&(f+=d.length)}return u.done?{start:c,matched:!1}:null}const j6=Object.create(null),lb=[Sn.none],cb=[],ub=Object.create(null),B6=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])B6[t]=G6(j6,e);function Sd(t,e){cb.indexOf(t)>-1||(cb.push(t),console.warn(e))}function G6(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||_[c];u?typeof u=="function"?l.length?l=l.map(u):Sd(c,`Modifier ${c} used at start of tag`):l.length?Sd(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:Sd(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+n.map(a=>a.id),r=ub[s];if(r)return r.id;let o=ub[s]=Sn.define({id:lb.length,name:i,props:[ua({[i]:n})]});return lb.push(o),o.id}$t.RTL,$t.LTR;const F6=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=gg(t.state,n.from);return i.line?H6(t):i.block?J6(t):!1};function mg(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let s=t(e,n);return s?(i(n.update(s)),!0):!1}}const H6=mg(nI,0),K6=mg(Ew,0),J6=mg((t,e)=>Ew(t,e,tI(e)),0);function gg(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const ka=50;function eI(t,{open:e,close:n},i,s){let r=t.sliceDoc(i-ka,i),o=t.sliceDoc(s,s+ka),a=/\s*$/.exec(r)[0].length,l=/^\s*/.exec(o)[0].length,c=r.length-a;if(r.slice(c-e.length,c)==e&&o.slice(l,l+n.length)==n)return{open:{pos:i-a,margin:a&&1},close:{pos:s+l,margin:l&&1}};let u,O;s-i<=2*ka?u=O=t.sliceDoc(i,s):(u=t.sliceDoc(i,i+ka),O=t.sliceDoc(s-ka,s));let f=/^\s*/.exec(u)[0].length,d=/\s*$/.exec(O)[0].length,h=O.length-d-n.length;return u.slice(f,f+e.length)==e&&O.slice(h,h+n.length)==n?{open:{pos:i+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:s-d-n.length,margin:/\s/.test(O.charAt(h-1))?1:0}}:null}function tI(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),s=n.to<=i.to?i:t.doc.lineAt(n.to);s.from>i.from&&s.from==n.to&&(s=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Ew(t,e,n=e.selection.ranges){let i=n.map(r=>gg(e,r.from).block);if(!i.every(r=>r))return null;let s=n.map((r,o)=>eI(e,i[o],r.from,r.to));if(t!=2&&!s.every(r=>r))return{changes:e.changes(n.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(t!=1&&s.some(r=>r)){let r=[];for(let o=0,a;os&&(r==o||o>O.from)){s=O.from;let f=/^\s*/.exec(O.text)[0].length,d=f==O.length,h=O.text.slice(f,f+c.length)==c?f:-1;fr.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:a,token:l,indent:c,empty:u,single:O}of i)(O||!u)&&r.push({from:a.from+c,insert:l+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:a,token:l}of i)if(a>=0){let c=o.from+a,u=c+l.length;o.text[u-o.from]==" "&&u++,r.push({from:c,to:u})}return{changes:r}}return null}const vp=Vs.define(),iI=Vs.define(),sI=pe.define(),Zw=pe.define({combine(t){return Ji(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,s)=>e(i,s)||n(i,s)})}}),zw=Bt.define({create(){return Mi.empty},update(t,e){let n=e.state.facet(Zw),i=e.annotation(vp);if(i){let l=Cn.fromTransaction(e,i.selection),c=i.side,u=c==0?t.undone:t.done;return l?u=OO(u,u.length,n.minDepth,l):u=qw(u,e.startState.selection),new Mi(c==0?i.rest:u,c==0?u:i.rest)}let s=e.annotation(iI);if((s=="full"||s=="before")&&(t=t.isolate()),e.annotation(Et.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let r=Cn.fromTransaction(e),o=e.annotation(Et.time),a=e.annotation(Et.userEvent);return r?t=t.addChanges(r,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(s=="full"||s=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Mi(t.done.map(Cn.fromJSON),t.undone.map(Cn.fromJSON))}});function rI(t={}){return[zw,Zw.of(t),Oe.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?Yw:e.inputType=="historyRedo"?Pp:null;return i?(e.preventDefault(),i(n)):!1}})]}function Sf(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let s=n.field(zw,!1);if(!s)return!1;let r=s.pop(t,n,e);return r?(i(r),!0):!1}}const Yw=Sf(0,!1),Pp=Sf(1,!1),oI=Sf(0,!0),aI=Sf(1,!0);class Cn{constructor(e,n,i,s,r){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Cn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Cn(e.changes&&Mt.fromJSON(e.changes),[],e.mapped&&Wi.fromJSON(e.mapped),e.startSelection&&B.fromJSON(e.startSelection),e.selectionsAfter.map(B.fromJSON))}static fromTransaction(e,n){let i=ni;for(let s of e.startState.facet(sI)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Cn(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,ni)}static selection(e){return new Cn(void 0,ni,void 0,void 0,e)}}function OO(t,e,n,i){let s=e+1>n+20?e-n-1:0,r=t.slice(s,e);return r.push(i),r}function lI(t,e){let n=[],i=!1;return t.iterChangedRanges((s,r)=>n.push(s,r)),e.iterChangedRanges((s,r,o,a)=>{for(let l=0;l=c&&o<=u&&(i=!0)}}),i}function cI(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function Mw(t,e){return t.length?e.length?t.concat(e):t:e}const ni=[],uI=200;function qw(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-uI));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),OO(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Cn.selection([e])]}function OI(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function vd(t,e){if(!t.length)return t;let n=t.length,i=ni;for(;n;){let s=fI(t[n-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=t.slice(0,n);return r[n-1]=s,r}else e=s.mapped,n--,i=s.selectionsAfter}return i.length?[Cn.selection(i)]:ni}function fI(t,e,n){let i=Mw(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):ni,n);if(!t.changes)return Cn.selection(i);let s=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new Cn(s,Xe.mapEffects(t.effects,e),o,t.startSelection.map(r),i)}const dI=/^(input\.type|delete)($|\.)/;class Mi{constructor(e,n,i=0,s=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new Mi(this.done,this.undone):this}addChanges(e,n,i,s,r){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!i||dI.test(i))&&(!a.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):vf(n,e))}function On(t){return t.textDirectionAt(t.state.selection.main.head)==$t.LTR}const Uw=t=>Iw(t,!On(t)),Ww=t=>Iw(t,On(t));function Dw(t,e){return vi(t,n=>n.empty?t.moveByGroup(n,e):vf(n,e))}const pI=t=>Dw(t,!On(t)),mI=t=>Dw(t,On(t));function gI(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Pf(t,e,n){let i=St(t).resolveInner(e.head),s=n?Ee.closedBy:Ee.openedBy;for(let l=e.head;;){let c=n?i.childAfter(l):i.childBefore(l);if(!c)break;gI(t,c,s)?i=c:l=n?c.to:c.from}let r=i.type.prop(s),o,a;return r&&(o=n?Yi(t,i.from,1):Yi(t,i.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?i.to:i.from,B.cursor(a,n?-1:1)}const $I=t=>vi(t,e=>Pf(t.state,e,!On(t))),QI=t=>vi(t,e=>Pf(t.state,e,On(t)));function Lw(t,e){return vi(t,n=>{if(!n.empty)return vf(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const Nw=t=>Lw(t,!1),jw=t=>Lw(t,!0);function Bw(t){let e=t.scrollDOM.clientHeighto.empty?t.moveVertically(o,e,n.height):vf(o,e));if(s.eq(i.selection))return!1;let r;if(n.selfScroll){let o=t.coordsAtPos(i.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;o&&o.top>l&&o.bottomGw(t,!1),xp=t=>Gw(t,!0);function Qr(t,e,n){let i=t.lineBlockAt(e.head),s=t.moveToLineBoundary(e,n);if(s.head==e.head&&s.head!=(n?i.to:i.from)&&(s=t.moveToLineBoundary(e,n,!1)),!n&&s.head==i.from&&i.length){let r=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=B.cursor(i.from+r))}return s}const yI=t=>vi(t,e=>Qr(t,e,!0)),bI=t=>vi(t,e=>Qr(t,e,!1)),SI=t=>vi(t,e=>Qr(t,e,!On(t))),vI=t=>vi(t,e=>Qr(t,e,On(t))),PI=t=>vi(t,e=>B.cursor(t.lineBlockAt(e.head).from,1)),xI=t=>vi(t,e=>B.cursor(t.lineBlockAt(e.head).to,-1));function wI(t,e,n){let i=!1,s=da(t.selection,r=>{let o=Yi(t,r.head,-1)||Yi(t,r.head,1)||r.head>0&&Yi(t,r.head-1,1)||r.headwI(t,e);function ci(t,e){let n=da(t.state.selection,i=>{let s=e(i);return B.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(ts(t.state,n)),!0)}function Fw(t,e){return ci(t,n=>t.moveByChar(n,e))}const Hw=t=>Fw(t,!On(t)),Kw=t=>Fw(t,On(t));function Jw(t,e){return ci(t,n=>t.moveByGroup(n,e))}const _I=t=>Jw(t,!On(t)),kI=t=>Jw(t,On(t)),RI=t=>ci(t,e=>Pf(t.state,e,!On(t))),XI=t=>ci(t,e=>Pf(t.state,e,On(t)));function eT(t,e){return ci(t,n=>t.moveVertically(n,e))}const tT=t=>eT(t,!1),nT=t=>eT(t,!0);function iT(t,e){return ci(t,n=>t.moveVertically(n,e,Bw(t).height))}const fb=t=>iT(t,!1),db=t=>iT(t,!0),CI=t=>ci(t,e=>Qr(t,e,!0)),VI=t=>ci(t,e=>Qr(t,e,!1)),AI=t=>ci(t,e=>Qr(t,e,!On(t))),EI=t=>ci(t,e=>Qr(t,e,On(t))),ZI=t=>ci(t,e=>B.cursor(t.lineBlockAt(e.head).from)),zI=t=>ci(t,e=>B.cursor(t.lineBlockAt(e.head).to)),hb=({state:t,dispatch:e})=>(e(ts(t,{anchor:0})),!0),pb=({state:t,dispatch:e})=>(e(ts(t,{anchor:t.doc.length})),!0),mb=({state:t,dispatch:e})=>(e(ts(t,{anchor:t.selection.main.anchor,head:0})),!0),gb=({state:t,dispatch:e})=>(e(ts(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),YI=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),MI=({state:t,dispatch:e})=>{let n=xf(t).map(({from:i,to:s})=>B.range(i,Math.min(s+1,t.doc.length)));return e(t.update({selection:B.create(n),userEvent:"select"})),!0},qI=({state:t,dispatch:e})=>{let n=da(t.selection,i=>{let s=St(t),r=s.resolveStack(i.from,1);if(i.empty){let o=s.resolveStack(i.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:a}=o;if((a.from=i.to||a.to>i.to&&a.from<=i.from)&&o.next)return B.range(a.to,a.from)}return i});return n.eq(t.selection)?!1:(e(ts(t,n)),!0)},II=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=B.create([n.main]):n.main.empty||(i=B.create([B.cursor(n.main.head)])),i?(e(ts(t,i)),!0):!1};function ac(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,s=i.changeByRange(r=>{let{from:o,to:a}=r;if(o==a){let l=e(r);lo&&(n="delete.forward",l=Kc(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=Kc(t,o,!1),a=Kc(t,a,!0);return o==a?{range:r}:{changes:{from:o,to:a},range:B.cursor(o,os(t)))i.between(e,e,(s,r)=>{se&&(e=n?r:s)});return e}const sT=(t,e,n)=>ac(t,i=>{let s=i.from,{state:r}=t,o=r.doc.lineAt(s),a,l;if(n&&!e&&s>o.from&&ssT(t,!1,!0),rT=t=>sT(t,!0,!1),oT=(t,e)=>ac(t,n=>{let i=n.head,{state:s}=t,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let a=null;;){if(i==(e?r.to:r.from)){i==n.head&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let l=tn(r.text,i-r.from,e)+r.from,c=r.text.slice(Math.min(i,l)-r.from,Math.max(i,l)-r.from),u=o(c);if(a!=null&&u!=a)break;(c!=" "||i!=n.head)&&(a=u),i=l}return i}),aT=t=>oT(t,!1),UI=t=>oT(t,!0),WI=t=>ac(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headac(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),LI=t=>ac(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Be.of(["",""])},range:B.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},jI=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let s=i.from,r=t.doc.lineAt(s),o=s==r.from?s-1:tn(r.text,s-r.from,!1)+r.from,a=s==r.to?s+1:tn(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:a,insert:t.doc.slice(s,a).append(t.doc.slice(o,s))},range:B.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function xf(t){let e=[],n=-1;for(let i of t.selection.ranges){let s=t.doc.lineAt(i.from),r=t.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=t.doc.lineAt(i.to-1)),n>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});n=r.number+1}return e}function lT(t,e,n){if(t.readOnly)return!1;let i=[],s=[];for(let r of xf(t)){if(n?r.to==t.doc.length:r.from==0)continue;let o=t.doc.lineAt(n?r.to+1:r.from-1),a=o.length+1;if(n){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+t.lineBreak});for(let l of r.ranges)s.push(B.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:t.lineBreak+o.text});for(let l of r.ranges)s.push(B.range(l.anchor-a,l.head-a))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:B.create(s,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const BI=({state:t,dispatch:e})=>lT(t,e,!1),GI=({state:t,dispatch:e})=>lT(t,e,!0);function cT(t,e,n){if(t.readOnly)return!1;let i=[];for(let s of xf(t))n?i.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):i.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const FI=({state:t,dispatch:e})=>cT(t,e,!1),HI=({state:t,dispatch:e})=>cT(t,e,!0),KI=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(xf(e).map(({from:s,to:r})=>(s>0?s--:r{let r;if(t.lineWrapping){let o=t.lineBlockAt(s.head),a=t.coordsAtPos(s.head,s.assoc||1);a&&(r=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(s,!0,r)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function JI(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=St(t).resolveInner(e),i=n.childBefore(e),s=n.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(Ee.closedBy))&&r.indexOf(s.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(s.from).from&&!/\S/.test(t.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}const $b=uT(!1),eU=uT(!0);function uT(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,a=e.doc.lineAt(r),l=!t&&r==o&&JI(e,r);t&&(r=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new Qf(e,{simulateBreak:r,simulateDoubleBreak:!!l}),u=fg(c,r);for(u==null&&(u=ca(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));oa.from&&r{let s=[];for(let o=i.from;o<=i.to;){let a=t.doc.lineAt(o);a.number>n&&(i.empty||i.to>a.from)&&(e(a,s,i),n=a.number),o=a.to+1}let r=t.changes(s);return{changes:s,range:B.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const tU=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new Qf(t,{overrideIndentation:r=>{let o=n[r];return o??-1}}),s=$g(t,(r,o,a)=>{let l=fg(i,r.from);if(l==null)return;/\S/.test(r.text)||(l=0);let c=/^\s*/.exec(r.text)[0],u=Cl(t,l);(c!=u||a.fromt.readOnly?!1:(e(t.update($g(t,(n,i)=>{i.push({from:n.from,insert:t.facet(rc)})}),{userEvent:"input.indent"})),!0),fT=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update($g(t,(n,i)=>{let s=/^\s*/.exec(n.text)[0];if(!s)return;let r=ca(s,t.tabSize),o=0,a=Cl(t,Math.max(0,r-lO(t)));for(;o(t.setTabFocusMode(),!0),iU=[{key:"Ctrl-b",run:Uw,shift:Hw,preventDefault:!0},{key:"Ctrl-f",run:Ww,shift:Kw},{key:"Ctrl-p",run:Nw,shift:tT},{key:"Ctrl-n",run:jw,shift:nT},{key:"Ctrl-a",run:PI,shift:ZI},{key:"Ctrl-e",run:xI,shift:zI},{key:"Ctrl-d",run:rT},{key:"Ctrl-h",run:wp},{key:"Ctrl-k",run:WI},{key:"Ctrl-Alt-h",run:aT},{key:"Ctrl-o",run:NI},{key:"Ctrl-t",run:jI},{key:"Ctrl-v",run:xp}],sU=[{key:"ArrowLeft",run:Uw,shift:Hw,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:pI,shift:_I,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:SI,shift:AI,preventDefault:!0},{key:"ArrowRight",run:Ww,shift:Kw,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:mI,shift:kI,preventDefault:!0},{mac:"Cmd-ArrowRight",run:vI,shift:EI,preventDefault:!0},{key:"ArrowUp",run:Nw,shift:tT,preventDefault:!0},{mac:"Cmd-ArrowUp",run:hb,shift:mb},{mac:"Ctrl-ArrowUp",run:Ob,shift:fb},{key:"ArrowDown",run:jw,shift:nT,preventDefault:!0},{mac:"Cmd-ArrowDown",run:pb,shift:gb},{mac:"Ctrl-ArrowDown",run:xp,shift:db},{key:"PageUp",run:Ob,shift:fb},{key:"PageDown",run:xp,shift:db},{key:"Home",run:bI,shift:VI,preventDefault:!0},{key:"Mod-Home",run:hb,shift:mb},{key:"End",run:yI,shift:CI,preventDefault:!0},{key:"Mod-End",run:pb,shift:gb},{key:"Enter",run:$b,shift:$b},{key:"Mod-a",run:YI},{key:"Backspace",run:wp,shift:wp},{key:"Delete",run:rT},{key:"Mod-Backspace",mac:"Alt-Backspace",run:aT},{key:"Mod-Delete",mac:"Alt-Delete",run:UI},{mac:"Mod-Backspace",run:DI},{mac:"Mod-Delete",run:LI}].concat(iU.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),rU=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:$I,shift:RI},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:QI,shift:XI},{key:"Alt-ArrowUp",run:BI},{key:"Shift-Alt-ArrowUp",run:FI},{key:"Alt-ArrowDown",run:GI},{key:"Shift-Alt-ArrowDown",run:HI},{key:"Escape",run:II},{key:"Mod-Enter",run:eU},{key:"Alt-l",mac:"Ctrl-l",run:MI},{key:"Mod-i",run:qI,preventDefault:!0},{key:"Mod-[",run:fT},{key:"Mod-]",run:OT},{key:"Mod-Alt-\\",run:tU},{key:"Shift-Mod-k",run:KI},{key:"Shift-Mod-\\",run:TI},{key:"Mod-/",run:F6},{key:"Alt-A",run:K6},{key:"Ctrl-m",mac:"Shift-Alt-m",run:nU}].concat(sU),oU={key:"Tab",run:OT,shift:fT},Qb=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Ho{constructor(e,n,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?a=>r(Qb(a)):Qb,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Tn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Lm(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Ai(e);let s=this.normalize(n);if(s.length)for(let r=0,o=i;;r++){let a=s.charCodeAt(r),l=this.match(a,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(l)return this.value=l,this;break}o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,s=i+n[0].length;if(this.matchPos=fO(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,n)))return this.value={from:i,to:s,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=n){let a=new Vo(n,e.sliceString(n,i));return Pd.set(e,a),a}if(s.from==n&&s.to==i)return s;let{text:r,from:o}=s;return o>n&&(r=e.sliceString(n,o)+r,o=n),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,s=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,n)))return this.value={from:i,to:s,match:n},this.matchPos=fO(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Vo.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(hT.prototype[Symbol.iterator]=pT.prototype[Symbol.iterator]=function(){return this});function aU(t){try{return new RegExp(t,Qg),!0}catch{return!1}}function fO(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function Tp(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=lt("input",{class:"cm-textfield",name:"line",value:e}),i=lt("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),t.dispatch({effects:tl.of(!1)}),t.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},lt("label",t.state.phrase("Go to line"),": ",n)," ",lt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),lt("button",{name:"close",onclick:()=>{t.dispatch({effects:tl.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!r)return;let{state:o}=t,a=o.doc.lineAt(o.selection.main.head),[,l,c,u,O]=r,f=u?+u.slice(1):0,d=c?+c:a.number;if(c&&O){let m=d/100;l&&(m=m*(l=="-"?-1:1)+a.number/o.doc.lines),d=Math.round(o.doc.lines*m)}else c&&l&&(d=d*(l=="-"?-1:1)+a.number);let h=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),p=B.cursor(h.from+Math.max(0,Math.min(f,h.length)));t.dispatch({effects:[tl.of(!1),Oe.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:i}}const tl=Xe.define(),yb=Bt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(tl)&&(t=n.value);return t},provide:t=>kl.from(t,e=>e?Tp:null)}),lU=t=>{let e=_l(t,Tp);if(!e){let n=[tl.of(!0)];t.state.field(yb,!1)==null&&n.push(Xe.appendConfig.of([yb,cU])),t.dispatch({effects:n}),e=_l(t,Tp)}return e&&e.dom.querySelector("input").select(),!0},cU=Oe.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),uU={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},OU=pe.define({combine(t){return Ji(t,uU,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function fU(t){return[gU,mU]}const dU=xe.mark({class:"cm-selectionMatch"}),hU=xe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function bb(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=yt.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=yt.Word)}function pU(t,e,n,i){return t(e.sliceDoc(n,n+1))==yt.Word&&t(e.sliceDoc(i-1,i))==yt.Word}const mU=Xt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(OU),{state:n}=t,i=n.selection;if(i.ranges.length>1)return xe.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return xe.none;let l=n.wordAt(s.head);if(!l)return xe.none;o=n.charCategorizer(s.head),r=n.sliceDoc(l.from,l.to)}else{let l=s.to-s.from;if(l200)return xe.none;if(e.wholeWords){if(r=n.sliceDoc(s.from,s.to),o=n.charCategorizer(s.head),!(bb(o,n,s.from,s.to)&&pU(o,n,s.from,s.to)))return xe.none}else if(r=n.sliceDoc(s.from,s.to),!r)return xe.none}let a=[];for(let l of t.visibleRanges){let c=new Ho(n.doc,r,l.from,l.to);for(;!c.next().done;){let{from:u,to:O}=c.value;if((!o||bb(o,n,u,O))&&(s.empty&&u<=s.from&&O>=s.to?a.push(hU.range(u,O)):(u>=s.to||O<=s.from)&&a.push(dU.range(u,O)),a.length>e.maxMatches))return xe.none}}return xe.set(a)}},{decorations:t=>t.decorations}),gU=Oe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),$U=({state:t,dispatch:e})=>{let{selection:n}=t,i=B.create(n.ranges.map(s=>t.wordAt(s.head)||B.cursor(s.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function QU(t,e){let{main:n,ranges:i}=t.selection,s=t.wordAt(n.head),r=s&&s.from==n.from&&s.to==n.to;for(let o=!1,a=new Ho(t.doc,e,i[i.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Ho(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(l=>l.from==a.value.from))continue;if(r){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const yU=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(r=>r.from===r.to))return $U({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(r=>t.sliceDoc(r.from,r.to)!=i))return!1;let s=QU(t,i);return s?(e(t.update({selection:t.selection.addRange(B.range(s.from,s.to),!1),effects:Oe.scrollIntoView(s.to)})),!0):!1},ha=pe.define({combine(t){return Ji(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new CU(e),scrollToMatch:e=>Oe.scrollIntoView(e)})}});class mT{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||aU(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new PU(this):new SU(this)}getCursor(e,n=0,i){let s=e.doc?e:Ie.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?ho(this,s,n,i):fo(this,s,n,i)}}class gT{constructor(e){this.spec=e}}function fo(t,e,n,i){return new Ho(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:s=>s.toLowerCase(),t.wholeWord?bU(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function bU(t,e){return(n,i,s,r)=>((r>n||r+s.length=n)return null;s.push(i.value)}return s}highlight(e,n,i,s){let r=fo(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function ho(t,e,n,i){return new hT(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?vU(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function dO(t,e){return t.slice(tn(t,e,!1),e)}function hO(t,e){return t.slice(e,tn(t,e))}function vU(t){return(e,n,i)=>!i[0].length||(t(dO(i.input,i.index))!=yt.Word||t(hO(i.input,i.index))!=yt.Word)&&(t(hO(i.input,i.index+i[0].length))!=yt.Word||t(dO(i.input,i.index+i[0].length))!=yt.Word)}class PU extends gT{nextMatch(e,n,i){let s=ho(this.spec,e,i,e.doc.length).next();return s.done&&(s=ho(this.spec,e,0,n).next()),s.done?null:s.value}prevMatchInRange(e,n,i){for(let s=1;;s++){let r=Math.max(n,i-s*1e4),o=ho(this.spec,e,r,i),a=null;for(;!o.next().done;)a=o.value;if(a&&(r==n||a.from>r+10))return a;if(r==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let s=i.length;s>0;s--){let r=+i.slice(0,s);if(r>0&&r=n)return null;s.push(i.value)}return s}highlight(e,n,i,s){let r=ho(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Vl=Xe.define(),yg=Xe.define(),er=Bt.define({create(t){return new xd(_p(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Vl)?t=new xd(n.value.create(),t.panel):n.is(yg)&&(t=new xd(t.query,n.value?bg:null));return t},provide:t=>kl.from(t,e=>e.panel)});class xd{constructor(e,n){this.query=e,this.panel=n}}const xU=xe.mark({class:"cm-searchMatch"}),wU=xe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),TU=Xt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(er))}update(t){let e=t.state.field(er);(e!=t.startState.field(er)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return xe.none;let{view:n}=this,i=new _s;for(let s=0,r=n.visibleRanges,o=r.length;sr[s+1].from-2*250;)l=r[++s].to;t.highlight(n.state,a,l,(c,u)=>{let O=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);i.add(c,u,O?wU:xU)})}return i.finish()}},{decorations:t=>t.decorations});function lc(t){return e=>{let n=e.state.field(er,!1);return n&&n.query.spec.valid?t(e,n):yT(e)}}const pO=lc((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let s=B.single(i.from,i.to),r=t.state.facet(ha);return t.dispatch({selection:s,effects:[Sg(t,i),r.scrollToMatch(s.main,t)],userEvent:"select.search"}),QT(t),!0}),mO=lc((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,s=e.prevMatch(n,i,i);if(!s)return!1;let r=B.single(s.from,s.to),o=t.state.facet(ha);return t.dispatch({selection:r,effects:[Sg(t,s),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),QT(t),!0}),_U=lc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:B.create(n.map(i=>B.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),kU=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:s}=n.main,r=[],o=0;for(let a=new Ho(t.doc,t.sliceDoc(i,s));!a.next().done;){if(r.length>1e3)return!1;a.value.from==i&&(o=r.length),r.push(B.range(a.value.from,a.value.to))}return e(t.update({selection:B.create(r,o),userEvent:"select.search.matches"})),!0},Sb=lc((t,{query:e})=>{let{state:n}=t,{from:i,to:s}=n.selection.main;if(n.readOnly)return!1;let r=e.nextMatch(n,i,i);if(!r)return!1;let o=r,a=[],l,c,u=[];o.from==i&&o.to==s&&(c=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(n,o.from,o.to),u.push(Oe.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+".")));let O=t.state.changes(a);return o&&(l=B.single(o.from,o.to).map(O),u.push(Sg(t,o)),u.push(n.facet(ha).scrollToMatch(l.main,t))),t.dispatch({changes:O,selection:l,effects:u,userEvent:"input.replace"}),!0}),RU=lc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Oe.announce.of(i),userEvent:"input.replace.all"}),!0});function bg(t){return t.state.facet(ha).createPanel(t)}function _p(t,e){var n,i,s,r,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(ha);return new mT({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:c.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:c.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:c.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function $T(t){let e=_l(t,bg);return e&&e.dom.querySelector("[main-field]")}function QT(t){let e=$T(t);e&&e==t.root.activeElement&&e.select()}const yT=t=>{let e=t.state.field(er,!1);if(e&&e.panel){let n=$T(t);if(n&&n!=t.root.activeElement){let i=_p(t.state,e.query.spec);i.valid&&t.dispatch({effects:Vl.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[yg.of(!0),e?Vl.of(_p(t.state,e.query.spec)):Xe.appendConfig.of(AU)]});return!0},bT=t=>{let e=t.state.field(er,!1);if(!e||!e.panel)return!1;let n=_l(t,bg);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:yg.of(!1)}),!0},XU=[{key:"Mod-f",run:yT,scope:"editor search-panel"},{key:"F3",run:pO,shift:mO,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:pO,shift:mO,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:bT,scope:"editor search-panel"},{key:"Mod-Shift-l",run:kU},{key:"Mod-Alt-g",run:lU},{key:"Mod-d",run:yU,preventDefault:!0}];class CU{constructor(e){this.view=e;let n=this.query=e.state.field(er).query.spec;this.commit=this.commit.bind(this),this.searchField=lt("input",{value:n.search,placeholder:Yn(e,"Find"),"aria-label":Yn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=lt("input",{value:n.replace,placeholder:Yn(e,"Replace"),"aria-label":Yn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=lt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=lt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=lt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(s,r,o){return lt("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=lt("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>pO(e),[Yn(e,"next")]),i("prev",()=>mO(e),[Yn(e,"previous")]),i("select",()=>_U(e),[Yn(e,"all")]),lt("label",null,[this.caseField,Yn(e,"match case")]),lt("label",null,[this.reField,Yn(e,"regexp")]),lt("label",null,[this.wordField,Yn(e,"by word")]),...e.state.readOnly?[]:[lt("br"),this.replaceField,i("replace",()=>Sb(e),[Yn(e,"replace")]),i("replaceAll",()=>RU(e),[Yn(e,"replace all")])],lt("button",{name:"close",onclick:()=>bT(e),"aria-label":Yn(e,"close"),type:"button"},["×"])])}commit(){let e=new mT({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Vl.of(e)}))}keydown(e){Yq(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?mO:pO)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Sb(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(Vl)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ha).top}}function Yn(t,e){return t.state.phrase(e)}const Jc=30,eu=/[\s\.,:;?!]/;function Sg(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),s=t.state.doc.lineAt(n).to,r=Math.max(i.from,e-Jc),o=Math.min(s,n+Jc),a=t.state.sliceDoc(r,o);if(r!=i.from){for(let l=0;la.length-Jc;l--)if(!eu.test(a[l-1])&&eu.test(a[l])){a=a.slice(0,l);break}}return Oe.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${i.number}.`)}const VU=Oe.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),AU=[er,$r.low(TU),VU];class ST{constructor(e,n,i,s){this.state=e,this.pos=n,this.explicit=i,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=St(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),s=n.text.slice(i-n.from,this.pos-n.from),r=s.search(PT(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function vb(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function EU(t){let e=Object.create(null),n=Object.create(null);for(let{label:s}of t){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[n,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:EU(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:n}:null}}function ZU(t,e){return n=>{for(let i=St(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class Pb{constructor(e,n,i,s){this.completion=e,this.source=n,this.match=i,this.score=s}}function zr(t){return t.selection.main.from}function PT(t,e){var n;let{source:i}=t,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?t:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const vg=Vs.define();function zU(t,e,n,i){let{main:s}=t.selection,r=n-s.from,o=i-s.from;return Object.assign(Object.assign({},t.changeByRange(a=>{if(a!=s&&n!=i&&t.sliceDoc(a.from+r,a.from+o)!=t.sliceDoc(n,i))return{range:a};let l=t.toText(e);return{changes:{from:a.from+r,to:i==s.from?a.to:a.from+o,insert:l},range:B.cursor(a.from+r+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const xb=new WeakMap;function YU(t){if(!Array.isArray(t))return t;let e=xb.get(t);return e||xb.set(t,e=vT(t)),e}const gO=Xe.define(),Al=Xe.define();class MU{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(v=Lm(S))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!b||P==1&&m||y==0&&P!=0)&&(n[O]==S||i[O]==S&&(f=!0)?o[O++]=b:o.length&&(g=!1)),y=P,b+=Ai(S)}return O==l&&o[0]==0&&g?this.result(-100+(f?-200:0),o,e):d==l&&h==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):d==l?this.ret(-900-e.length,[h,p]):O==l?this.result(-100+(f?-200:0)+-700+(g?0:-1100),o,e):n.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,n,i){let s=[],r=0;for(let o of n){let a=o+(this.astral?Ai(Tn(i,o)):1);r&&s[r-1]==o?s[r-1]=a:(s[r++]=o,s[r++]=a)}return this.ret(e-i.length,s)}}class qU{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:IU,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>wb(e(i),n(i)),optionClass:(e,n)=>i=>wb(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function wb(t,e){return t?e?t+" "+e:t:e}function IU(t,e,n,i,s,r){let o=t.textDirection==$t.RTL,a=o,l=!1,c="top",u,O,f=e.left-s.left,d=s.right-e.right,h=i.right-i.left,p=i.bottom-i.top;if(a&&f=p||b>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let m=(e.bottom-e.top)/r.offsetHeight,g=(e.right-e.left)/r.offsetWidth;return{style:`${c}: ${u/m}px; max-width: ${O/g}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function UU(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let c=0;cl&&o.appendChild(document.createTextNode(a.slice(l,u)));let f=o.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(a.slice(u,O))),f.className="cm-completionMatchedText",l=O}return ln.position-i.position).map(n=>n.render)}function wd(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let s=Math.floor(e/n);return{from:s*n,to:(s+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class WU{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let s=e.state.field(n),{options:r,selected:o}=s.open,a=e.state.facet(jt);this.optionContent=UU(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=wd(r.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,O;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(O=/-(\d+)$/.exec(u.id))&&+O[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(jt).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Al.of(null)})}),this.showOptions(r,s.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=s){let{options:r,selected:o,disabled:a}=i.open;(!s.open||s.open.options!=r)&&(this.range=wd(r.length,o,e.state.facet(jt).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),a!=((n=s.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=wd(n.options.length,n.selected,this.view.state.facet(jt).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Xn(this.view.state,o,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;i.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&LU(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return s.top>Math.min(r.bottom,n.bottom)-10||s.bottom{o.target==s&&o.preventDefault()});let r=null;for(let o=i.from;oi.from||i.from==0))if(r=f,typeof c!="string"&&c.header)s.appendChild(c.header(c));else{let d=s.appendChild(document.createElement("completion-section"));d.textContent=f}}const u=s.appendChild(document.createElement("li"));u.id=n+"-"+o,u.setAttribute("role","option");let O=this.optionClass(a);O&&(u.className=O);for(let f of this.optionContent){let d=f(a,this.view.state,this.view,l);d&&u.appendChild(d)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew WU(n,t,e)}function LU(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),s=n.height/t.offsetHeight;i.topn.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/s)}function Tb(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function NU(t,e){let n=[],i=null,s=c=>{n.push(c);let{section:u}=c.completion;if(u){i||(i=[]);let O=typeof u=="string"?u:u.name;i.some(f=>f.name==O)||i.push(typeof u=="string"?{name:O}:u)}},r=e.facet(jt);for(let c of t)if(c.hasResult()){let u=c.result.getMatch;if(c.result.filter===!1)for(let O of c.result.options)s(new Pb(O,c.source,u?u(O):[],1e9-n.length));else{let O=e.sliceDoc(c.from,c.to),f,d=r.filterStrict?new qU(O):new MU(O);for(let h of c.result.options)if(f=d.match(h.label)){let p=h.displayLabel?u?u(h,f.matched):[]:f.matched;s(new Pb(h,c.source,p,f.score+(h.boost||0)))}}}if(i){let c=Object.create(null),u=0,O=(f,d)=>{var h,p;return((h=f.rank)!==null&&h!==void 0?h:1e9)-((p=d.rank)!==null&&p!==void 0?p:1e9)||(f.nameO.score-u.score||l(u.completion,O.completion))){let u=c.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?o.push(c):Tb(c.completion)>Tb(a)&&(o[o.length-1]=c),a=c.completion}return o}class bo{constructor(e,n,i,s,r,o){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new bo(this.options,_b(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,s,r,o){if(s&&!o&&e.some(c=>c.isPending))return s.setDisabled();let a=NU(e,n);if(!a.length)return s&&e.some(c=>c.isPending)?s.setDisabled():null;let l=n.facet(jt).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let c=s.options[s.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:KU,above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new bo(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new bo(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class $O{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new $O(FU,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(jt),r=(i.override||n.languageDataAt("autocomplete",zr(n)).map(YU)).map(l=>(this.active.find(u=>u.source==l)||new ii(l,this.active.some(u=>u.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,c)=>l==this.active[c])&&(r=this.active);let o=this.open,a=e.effects.some(l=>l.is(Pg));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!jU(r,this.active)||a?o=bo.build(r,n,this.id,o,i,a):o&&o.disabled&&!r.some(l=>l.isPending)&&(o=null),!o&&r.every(l=>!l.isPending)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new ii(l.source,0):l));for(let l of e.effects)l.is(wT)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new $O(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?BU:GU}}function jU(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const FU=[];function xT(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(vg);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ii{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=xT(e,n),s=this;(i&8||i&16&&this.touches(e))&&(s=new ii(s.source,0)),i&4&&s.state==0&&(s=new ii(this.source,1)),s=s.updateFor(e,i);for(let r of e.effects)if(r.is(gO))s=new ii(s.source,1,r.value);else if(r.is(Al))s=new ii(s.source,0);else if(r.is(Pg))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(zr(e.state))}}class Ao extends ii{constructor(e,n,i,s,r,o){super(e,3,n),this.limit=i,this.result=s,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=zr(e.state);if(a>o||!s||n&2&&(zr(e.startState)==this.from||an.map(e))}}),wT=Xe.define(),kn=Bt.define({create(){return $O.start()},update(t,e){return t.update(e)},provide:t=>[og.from(t,e=>e.tooltip),Oe.contentAttributes.from(t,e=>e.attrs)]});function xg(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(kn).active.find(s=>s.source==e.source);return i instanceof Ao?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},zU(t.state,n,i.from,i.to)),{annotations:vg.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}const KU=DU(kn,xg);function tu(t,e="option"){return n=>{let i=n.state.field(kn,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:wT.of(a)}),!0}}const JU=t=>{let e=t.state.field(kn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(kn,!1)?(t.dispatch({effects:gO.of(!0)}),!0):!1,eW=t=>{let e=t.state.field(kn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Al.of(null)}),!0)};class tW{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const nW=50,iW=1e3,sW=Xt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(kn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(kn),n=t.state.facet(jt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(kn)==e)return;let i=t.transactions.some(r=>{let o=xT(r,n);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;rnW&&Date.now()-o.time>iW){for(let a of o.context.abortListeners)try{a()}catch(l){Xn(this.view.state,l)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(r=>r.effects.some(o=>o.is(gO)))&&(this.pendingStart=!0);let s=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.isPending&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of t.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(kn);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(jt).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=zr(e),i=new ST(e,n,t.explicit,this.view),s=new tW(t,i);this.running.push(s),Promise.resolve(t.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Al.of(null)}),Xn(this.view.state,r)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(jt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(jt),i=this.view.state.field(kn);for(let s=0;sa.source==r.active.source);if(o&&o.isPending)if(r.done==null){let a=new ii(r.active.source,0);for(let l of r.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:Pg.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(kn,!1);if(e&&e.tooltip&&this.view.state.facet(jt).closeOnBlur){let n=e.open&&ow(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Al.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:gO.of(!1)}),20),this.composing=0}}}),rW=typeof navigator=="object"&&/Win/.test(navigator.platform),oW=$r.highest(Oe.domEventHandlers({keydown(t,e){let n=e.state.field(kn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(rW&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],s=n.active.find(o=>o.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(t.key)>-1&&xg(e,i),!1}})),TT=Oe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class aW{constructor(e,n,i,s){this.field=e,this.line=n,this.from=i,this.to=s}}class wg{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,en.TrackDel),i=e.mapPos(this.to,1,en.TrackDel);return n==null||i==null?null:new wg(this.field,n,i)}}class Tg{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],s=[n],r=e.doc.lineAt(n),o=/^\s*/.exec(r.text)[0];for(let l of this.lines){if(i.length){let c=o,u=/^\t*/.exec(l)[0].length;for(let O=0;Onew wg(l.field,s[l.line]+l.from,s[l.line]+l.to));return{text:i,ranges:a}}static parse(e){let n=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let a=r[1]?+r[1]:null,l=r[2]||r[3]||"",c=-1,u=l.replace(/\\[{}]/g,O=>O[1]);for(let O=0;O=c&&f.field++}s.push(new aW(c,i.length,r.index,r.index+u.length)),o=o.slice(0,r.index)+l+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(a,l,c)=>{for(let u of s)u.line==i.length&&u.from>c&&(u.from--,u.to--);return l}),i.push(o)}return new Tg(i,s)}}let lW=xe.widget({widget:new class extends es{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),cW=xe.mark({class:"cm-snippetField"});class pa{constructor(e,n){this.ranges=e,this.active=n,this.deco=xe.set(e.map(i=>(i.from==i.to?lW:cW).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;n.push(s)}return new pa(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const cc=Xe.define({map(t,e){return t&&t.map(e)}}),uW=Xe.define(),El=Bt.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(cc))return n.value;if(n.is(uW)&&t)return new pa(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Oe.decorations.from(t,e=>e?e.deco:xe.none)});function _g(t,e){return B.create(t.filter(n=>n.field==e).map(n=>B.range(n.from,n.to)))}function OW(t){let e=Tg.parse(t);return(n,i,s,r)=>{let{text:o,ranges:a}=e.instantiate(n.state,s),{main:l}=n.state.selection,c={changes:{from:s,to:r==l.from?l.to:r,insert:Be.of(o)},scrollIntoView:!0,annotations:i?[vg.of(i),Et.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=_g(a,0)),a.some(u=>u.field>0)){let u=new pa(a,0),O=c.effects=[cc.of(u)];n.state.field(El,!1)===void 0&&O.push(Xe.appendConfig.of([El,mW,gW,TT]))}n.dispatch(n.state.update(c))}}function _T(t){return({state:e,dispatch:n})=>{let i=e.field(El,!1);if(!i||t<0&&i.active==0)return!1;let s=i.active+t,r=t>0&&!i.ranges.some(o=>o.field==s+t);return n(e.update({selection:_g(i.ranges,s),effects:cc.of(r?null:new pa(i.ranges,s)),scrollIntoView:!0})),!0}}const fW=({state:t,dispatch:e})=>t.field(El,!1)?(e(t.update({effects:cc.of(null)})),!0):!1,dW=_T(1),hW=_T(-1),pW=[{key:"Tab",run:dW,shift:hW},{key:"Escape",run:fW}],Rb=pe.define({combine(t){return t.length?t[0]:pW}}),mW=$r.highest(nc.compute([Rb],t=>t.facet(Rb)));function Pn(t,e){return Object.assign(Object.assign({},e),{apply:OW(t)})}const gW=Oe.domEventHandlers({mousedown(t,e){let n=e.state.field(El,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let s=n.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==n.active?!1:(e.dispatch({selection:_g(n.ranges,s.field),effects:cc.of(n.ranges.some(r=>r.field>s.field)?new pa(n.ranges,s.field):null),scrollIntoView:!0}),!0)}}),Zl={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Xr=Xe.define({map(t,e){let n=e.mapPos(t,-1,en.TrackAfter);return n??void 0}}),kg=new class extends Ur{};kg.startSide=1;kg.endSide=-1;const kT=Bt.define({create(){return Ke.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(Xr)&&(t=t.update({add:[kg.range(n.value,n.value+1)]}));return t}});function $W(){return[yW,kT]}const Td="()[]{}<>«»»«[]{}";function RT(t){for(let e=0;e{if((QW?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let s=t.state.selection.main;if(i.length>2||i.length==2&&Ai(Tn(i,0))==1||e!=s.from||n!=s.to)return!1;let r=vW(t.state,i);return r?(t.dispatch(r),!0):!1}),bW=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=XT(t,t.selection.main.head).brackets||Zl.brackets,s=null,r=t.changeByRange(o=>{if(o.empty){let a=PW(t.doc,o.head);for(let l of i)if(l==a&&wf(t.doc,o.head)==RT(Tn(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:B.cursor(o.head-l.length)}}return{range:s=o}});return s||e(t.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},SW=[{key:"Backspace",run:bW}];function vW(t,e){let n=XT(t,t.selection.main.head),i=n.brackets||Zl.brackets;for(let s of i){let r=RT(Tn(s,0));if(e==s)return r==s?TW(t,s,i.indexOf(s+s+s)>-1,n):xW(t,s,r,n.before||Zl.before);if(e==r&&CT(t,t.selection.main.from))return wW(t,s,r)}return null}function CT(t,e){let n=!1;return t.field(kT).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function wf(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Ai(Tn(n,0)))}function PW(t,e){let n=t.sliceString(e-2,e);return Ai(Tn(n,0))==n.length?n:n.slice(1)}function xW(t,e,n,i){let s=null,r=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:Xr.of(o.to+e.length),range:B.range(o.anchor+e.length,o.head+e.length)};let a=wf(t.doc,o.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:Xr.of(o.head+e.length),range:B.cursor(o.head+e.length)}:{range:s=o}});return s?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function wW(t,e,n){let i=null,s=t.changeByRange(r=>r.empty&&wf(t.doc,r.head)==n?{changes:{from:r.head,to:r.head+n.length,insert:n},range:B.cursor(r.head+n.length)}:i={range:r});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function TW(t,e,n,i){let s=i.stringPrefixes||Zl.stringPrefixes,r=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Xr.of(a.to+e.length),range:B.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=wf(t.doc,l),u;if(c==e){if(Xb(t,l))return{changes:{insert:e+e,from:l},effects:Xr.of(l+e.length),range:B.cursor(l+e.length)};if(CT(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:B.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=Cb(t,l-2*e.length,s))>-1&&Xb(t,u))return{changes:{insert:e+e+e+e,from:l},effects:Xr.of(l+e.length),range:B.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=yt.Word&&Cb(t,l,s)>-1&&!_W(t,l,e,s))return{changes:{insert:e+e,from:l},effects:Xr.of(l+e.length),range:B.cursor(l+e.length)}}return{range:r=a}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Xb(t,e){let n=St(t).resolveInner(e+1);return n.parent&&n.from==e}function _W(t,e,n,i){let s=St(t).resolveInner(e,-1),r=i.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(s.from,Math.min(s.to,s.from+n.length+r)),l=a.indexOf(n);if(!l||l>-1&&i.indexOf(a.slice(0,l))>-1){let u=s.firstChild;for(;u&&u.from==s.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=s.to==e&&s.parent;if(!c)break;s=c}return!1}function Cb(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=yt.Word)return e;for(let s of n){let r=e-s.length;if(t.sliceDoc(r,e)==s&&i(t.sliceDoc(r-1,r))!=yt.Word)return r}return-1}function kW(t={}){return[oW,kn,jt.of(t),sW,RW,TT]}const VT=[{key:"Ctrl-Space",run:kb},{mac:"Alt-`",run:kb},{key:"Escape",run:eW},{key:"ArrowDown",run:tu(!0)},{key:"ArrowUp",run:tu(!1)},{key:"PageDown",run:tu(!0,"page")},{key:"PageUp",run:tu(!1,"page")},{key:"Enter",run:JU}],RW=$r.highest(nc.computeN([jt],t=>t.facet(jt).defaultKeymap?[VT]:[]));class Vb{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class wr{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let s=i.facet(zl).markerFilter;s&&(e=s(e,i));let r=e.slice().sort((u,O)=>u.from-O.from||u.to-O.to),o=new _s,a=[],l=0;for(let u=0;;){let O=u==r.length?null:r[u];if(!O&&!a.length)break;let f,d;for(a.length?(f=l,d=a.reduce((p,m)=>Math.min(p,m.to),O&&O.from>f?O.from:1e8)):(f=O.from,d=O.to,a.push(O),u++);up.from||p.to==f))a.push(p),u++,d=Math.min(p.to,d);else{d=Math.min(p.from,d);break}}let h=WW(a);if(a.some(p=>p.from==p.to||p.from==p.to-1&&i.doc.lineAt(p.from).to==p.from))o.add(f,f,xe.widget({widget:new MW(h),diagnostics:a.slice()}));else{let p=a.reduce((m,g)=>g.markClass?m+" "+g.markClass:m,"");o.add(f,d,xe.mark({class:"cm-lintRange cm-lintRange-"+h+p,diagnostics:a.slice(),inclusiveEnd:a.some(m=>m.to>d)}))}l=d;for(let p=0;p{if(!(e&&o.diagnostics.indexOf(e)<0))if(!i)i=new Vb(s,r,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new Vb(i.from,r,i.diagnostic)}}),i}function XW(t,e){let n=e.pos,i=e.end||n,s=t.state.facet(zl).hideOn(t,n,i);if(s!=null)return s;let r=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(AT))||t.changes.touchesRange(r.from,Math.max(r.to,i)))}function CW(t,e){return t.field(Dn,!1)?e:e.concat(Xe.appendConfig.of(DW))}const AT=Xe.define(),Rg=Xe.define(),ET=Xe.define(),Dn=Bt.define({create(){return new wr(xe.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,s=t.panel;if(t.selected){let r=e.changes.mapPos(t.selected.from,1);i=Ko(n,t.selected.diagnostic,r)||Ko(n,null,r)}!n.size&&s&&e.state.facet(zl).autoPanel&&(s=null),t=new wr(n,s,i)}for(let n of e.effects)if(n.is(AT)){let i=e.state.facet(zl).autoPanel?n.value.length?Yl.open:null:t.panel;t=wr.init(n.value,i,e.state)}else n.is(Rg)?t=new wr(t.diagnostics,n.value?Yl.open:null,t.selected):n.is(ET)&&(t=new wr(t.diagnostics,t.panel,n.value));return t},provide:t=>[kl.from(t,e=>e.panel),Oe.decorations.from(t,e=>e.diagnostics)]}),VW=xe.mark({class:"cm-lintRange cm-lintRange-active"});function AW(t,e,n){let{diagnostics:i}=t.state.field(Dn),s,r=-1,o=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(ezT(t,n,!1)))}const ZW=t=>{let e=t.state.field(Dn,!1);(!e||!e.panel)&&t.dispatch({effects:CW(t.state,[Rg.of(!0)])});let n=_l(t,Yl.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Ab=t=>{let e=t.state.field(Dn,!1);return!e||!e.panel?!1:(t.dispatch({effects:Rg.of(!1)}),!0)},zW=t=>{let e=t.state.field(Dn,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},YW=[{key:"Mod-Shift-m",run:ZW,preventDefault:!0},{key:"F8",run:zW}],zl=pe.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Ji(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function ZT(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;ir.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function zT(t,e,n){var i;let s=n?ZT(e.actions):[];return lt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},lt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,o)=>{let a=!1,l=f=>{if(f.preventDefault(),a)return;a=!0;let d=Ko(t.state.field(Dn).diagnostics,e);d&&r.apply(t,d.from,d.to)},{name:c}=r,u=s[o]?c.indexOf(s[o]):-1,O=u<0?c:[c.slice(0,u),lt("u",c.slice(u,u+1)),c.slice(u+1)];return lt("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${s[o]})"`}.`},O)}),e.source&<("div",{class:"cm-diagnosticSource"},e.source))}class MW extends es{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return lt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Eb{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=zT(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Yl{constructor(e){this.view=e,this.items=[];let n=s=>{if(s.keyCode==27)Ab(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=ZT(r.actions);for(let a=0;a{for(let r=0;rAb(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Dn).selected;if(!e)return-1;for(let n=0;n{for(let u of c.diagnostics){if(o.has(u))continue;o.add(u);let O=-1,f;for(let d=i;di&&(this.items.splice(i,O-i),s=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),r=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),i++}});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let c=l.height/this.list.offsetHeight;a.topl.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Dn),i=Ko(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:ET.of(i)})}static open(e){return new Yl(e)}}function qW(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function nu(t){return qW(``,'width="6" height="3"')}const IW=Oe.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:nu("#d11")},".cm-lintRange-warning":{backgroundImage:nu("orange")},".cm-lintRange-info":{backgroundImage:nu("#999")},".cm-lintRange-hint":{backgroundImage:nu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function UW(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function WW(t){let e="hint",n=1;for(let i of t){let s=UW(i.severity);s>n&&(n=s,e=i.severity)}return e}const DW=[Dn,Oe.decorations.compute([Dn],t=>{let{selected:e,panel:n}=t.field(Dn);return!e||!n||e.from==e.to?xe.none:xe.set([VW.range(e.from,e.to)])}),w4(AW,{hideOn:XW}),IW],LW=[z4(),q4(),t4(),rI(),C6(),Dq(),Gq(),Ie.allowMultipleSelections.of(!0),Q6(),A6(z6,{fallback:!0}),D6(),$W(),kW(),p4(),$4(),a4(),fU(),nc.of([...SW,...rU,...XU,...hI,..._6,...VT,...YW])];/*! * VueCodemirror v6.1.1 * Copyright (c) Surmon. All rights reserved. * Released under the MIT License. * Surmon -*/var Uz=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[Hz]}),jz=Symbol("vue-codemirror-global-config"),fn,qz=function(t){var e=t.onUpdate,n=t.onChange,i=t.onFocus,s=t.onBlur,r=function(o,l){var a={};for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&l.indexOf(c)<0&&(a[c]=o[c]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var u=0;for(c=Object.getOwnPropertySymbols(o);un%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let s=e.parser.context;return new Uu(e,[],n,i,i,0,[],0,s?new Pv(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[s])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(s,c)}storeNode(e,n,i,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(n==i)return;if(o.buffer[l-2]>=n){o.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,n,i,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>i;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=i,this.buffer[o+3]=s}}shift(e,n,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let r=e,{parser:o}=this.p;(s>this.pos||n<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,i),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,s,4)}else this.pos=s,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,s,4)}apply(e,n,i,s){e&65536?this.reduce(e):this.shift(e,n,i,s)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(n,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),s=e.bufferBase+n;for(;e&&s==e.bufferBase;)e=e.parent;return new Uu(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Qz(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let s=[];for(let r=0,o;ra&1&&l==o)||s.push(n[r],o)}n=s}let i=[];for(let s=0;s>19,s=n&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(s,r)=>{if(!n.includes(s))return n.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-r;if(l>1){let a=o&65535,c=this.stack.length-l*3;if(c>=0&&e.getGoto(this.stack[c],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,r+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Pv{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Qz{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=s}}class ju{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new ju(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new ju(this.stack,this.pos,this.index)}}function Pc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,s=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}n?n[s++]=r:n=new e(r)}return n}class Gc{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Mv=new Gc;class Zz{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Mv,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,s=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-i.to,i=o}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,s;if(n>=0&&n=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Mv,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let s of this.ranges){if(s.from>=n)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,n)))}return i}}class wo{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;eH(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}wo.prototype.contextual=wo.prototype.fallback=wo.prototype.extend=!1;wo.prototype.fallback=wo.prototype.extend=!1;class o_{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function eH(t,e,n,i,s,r){let o=0,l=1<0){let p=t[h];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||tH(p,e.token.value,s,r))){e.acceptToken(p);break}}let u=e.next,f=0,d=t[o+2];if(e.next<0&&d>f&&t[c+d*3-3]==65535){o=t[c+d*3-1];continue e}for(;f>1,p=c+h+(h<<1),m=t[p],y=t[p+1]||65536;if(u=y)f=h+1;else{o=t[p+2],e.advance();continue e}}break}}function Dv(t,e,n){for(let i=e,s;(s=t[i])!=65535;i++)if(s==n)return i-e;return-1}function tH(t,e,n,i){let s=Dv(n,i,e);return s<0||Dv(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class nH{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Rv(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Rv(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(r instanceof Pt){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+r.length}}}class iH{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Gc)}getActions(e){let n=0,i=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let c=0;cf.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let d=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(i=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Gc,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Gc,{pos:i,p:s}=e;return n.start=i,n.end=Math.min(i+1,s.stream.end),n.value=i==s.stream.end?s.parser.eofTerm:0,n}updateCachedToken(e,n,i){let s=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(s,e),i),e.value>-1){let{parser:r}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,n,i,s){for(let r=0;re.bufferLength*4?new nH(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;on)i.push(l);else{if(this.advanceStack(l,i,e))continue;{s||(s=[],r=[]),s.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let o=s&&lH(s);if(o)return Rn&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Rn&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(o)return Rn&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&c.buffer.length>500)if((l.score-c.score||l.buffer.length-c.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(Ne.contextHash)||0)==u))return e.useNode(f,d),Rn&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof Pt)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof Pt&&f.positions[0]==0)f=h;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Rn&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let c=0;cs?n.push(p):i.push(p)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Iv(e,n),!0}}runRecovery(e,n,i){let s=null,r=!1;for(let o=0;o ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Rn&&console.log(u+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),d=u;for(let h=0;f.forceReduce()&&h<10&&(Rn&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));h++)Rn&&(d=this.stackID(f)+" -> ");for(let h of l.recoverByInsert(a))Rn&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,i);this.stream.end>l.pos?(c==l.pos&&(c++,a=0),l.recoverByDelete(a,c),Rn&&console.log(u+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Iv(l,i)):(!s||s.scoret;class oH{constructor(e){this.start=e.start,this.shift=e.shift||Jd,this.reduce=e.reduce||Jd,this.reuse=e.reuse||Jd,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class da extends BO{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;le.topRules[l][1]),s=[];for(let l=0;l=0)r(u,a,l[c++]);else{let f=l[c+-u];for(let d=-u;d>0;d--)r(l[c++],a,f);c++}}}this.nodeSet=new hg(n.map((l,a)=>Tn.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:s[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=LO;let o=Pc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new wo(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let s=new sH(this,e,n,i);for(let r of this.wrappers)s=r(s,e,n,i);return s}getGoto(e,n,i=!1){let s=this.goto;if(n>=s[0])return-1;for(let r=s[n+1];;){let o=s[r++],l=o&1,a=s[r++];if(l&&i)return a;for(let c=r+(o>>1);r0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),s=i?n(i):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ji(this.data,r+2);else break;s=n(Ji(this.data,r+1))}return s}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Ji(this.data,i+2);else break;if((this.data[i+2]&1)==0){let s=this.data[i+1];n.some((r,o)=>o&1&&r==s)||n.push(this.data[i],s)}}return n}configure(e){let n=Object.assign(Object.create(da.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(r=>r.from==i);return s?s.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return n.specializers[s]=Lv(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let r of e.split(" ")){let o=n.indexOf(r);o>=0&&(i[o]=!0)}let s=null;for(let r=0;ri)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const aH=yg({String:ne.string,Number:ne.number,"True False":ne.bool,PropertyName:ne.propertyName,Null:ne.null,", :":ne.separator,"[ ]":ne.squareBracket,"{ }":ne.brace}),cH=da.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[aH],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),uH=ra.define({name:"json",parser:cH.configure({props:[vg.add({Object:Qb({except:/^\s*\}/}),Array:Qb({except:/^\s*\]/})}),xg.add({"Object Array":E3})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function fH(){return new HO(uH)}const dH={class:"p-4"},hH=H({__name:"JsonView",setup(t){const e=ni(),n=Q(()=>{try{const r=JSON.parse(e.json);return JSON.stringify(r,null,2)}catch{return"Invalid JSON in store"}}),i=[fH()],s={lineNumbers:!0,mode:"application/json",theme:"default"};return(r,o)=>(D(),ae("div",dH,[P(v(r_),{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=l=>n.value=l),options:s,extensions:i,disabled:""},null,8,["modelValue"])]))}}),Fp=1,pH=2,mH=3,gH=4,yH=5,bH=36,vH=37,wH=38,xH=11,SH=13;function kH(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function OH(t){return t==9||t==10||t==13||t==32}let Nv=null,$v=null,Vv=0;function Wp(t,e){let n=t.pos+e;if($v==t&&Vv==n)return Nv;for(;OH(t.peek(e));)e++;let i="";for(;;){let s=t.peek(e);if(!kH(s))break;i+=String.fromCharCode(s),e++}return $v=t,Vv=n,Nv=i||null}function Bv(t,e){this.name=t,this.parent=e}const CH=new oH({start:null,shift(t,e,n,i){return e==Fp?new Bv(Wp(i,1)||"",t):t},reduce(t,e){return e==xH&&t?t.parent:t},reuse(t,e,n,i){let s=e.type.id;return s==Fp||s==SH?new Bv(Wp(i,1)||"",t):t},strict:!1}),_H=new o_((t,e)=>{if(t.next==60){if(t.advance(),t.next==47){t.advance();let n=Wp(t,0);if(!n)return t.acceptToken(yH);if(e.context&&n==e.context.name)return t.acceptToken(pH);for(let i=e.context;i;i=i.parent)if(i.name==n)return t.acceptToken(mH,-2);t.acceptToken(gH)}else if(t.next!=33&&t.next!=63)return t.acceptToken(Fp)}},{contextual:!0});function Rg(t,e){return new o_(n=>{let i=0,s=e.charCodeAt(0);e:for(;!(n.next<0);n.advance(),i++)if(n.next==s){for(let r=1;r"),EH=Rg(vH,"?>"),TH=Rg(wH,"]]>"),PH=yg({Text:ne.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":ne.angleBracket,TagName:ne.tagName,"MismatchedCloseTag/TagName":[ne.tagName,ne.invalid],AttributeName:ne.attributeName,AttributeValue:ne.attributeValue,Is:ne.definitionOperator,"EntityReference CharacterReference":ne.character,Comment:ne.blockComment,ProcessingInst:ne.processingInstruction,DoctypeDecl:ne.documentMeta,Cdata:ne.special(ne.string)}),MH=da.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[_H,AH,EH,TH,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function Yc(t,e){let n=e&&e.getChild("TagName");return n?t.sliceString(n.from,n.to):""}function Qd(t,e){let n=e&&e.firstChild;return!n||n.name!="OpenTag"?"":Yc(t,n)}function DH(t,e,n){let i=e&&e.getChildren("Attribute").find(r=>r.from<=n&&r.to>=n),s=i&&i.getChild("AttributeName");return s?t.sliceString(s.from,s.to):""}function Zd(t){for(let e=t&&t.parent;e;e=e.parent)if(e.name=="Element")return e;return null}function RH(t,e){var n;let i=Ut(t).resolveInner(e,-1),s=null;for(let r=i;!s&&r.parent;r=r.parent)(r.name=="OpenTag"||r.name=="CloseTag"||r.name=="SelfClosingTag"||r.name=="MismatchedCloseTag")&&(s=r);if(s&&(s.to>e||s.lastChild.type.isError)){let r=s.parent;if(i.name=="TagName")return s.name=="CloseTag"||s.name=="MismatchedCloseTag"?{type:"closeTag",from:i.from,context:r}:{type:"openTag",from:i.from,context:Zd(r)};if(i.name=="AttributeName")return{type:"attrName",from:i.from,context:s};if(i.name=="AttributeValue")return{type:"attrValue",from:i.from,context:s};let o=i==s||i.name=="Attribute"?i.childBefore(e):i;return(o==null?void 0:o.name)=="StartTag"?{type:"openTag",from:e,context:Zd(r)}:(o==null?void 0:o.name)=="StartCloseTag"&&o.to<=e?{type:"closeTag",from:e,context:r}:(o==null?void 0:o.name)=="Is"?{type:"attrValue",from:e,context:s}:o?{type:"attrName",from:e,context:s}:null}else if(i.name=="StartCloseTag")return{type:"closeTag",from:e,context:i.parent};for(;i.parent&&i.to==e&&!(!((n=i.lastChild)===null||n===void 0)&&n.type.isError);)i=i.parent;return i.name=="Element"||i.name=="Text"||i.name=="Document"?{type:"tag",from:e,context:i.name=="Element"?i:Zd(i)}:null}let IH=class{constructor(e,n,i){this.attrs=n,this.attrValues=i,this.children=[],this.name=e.name,this.completion=Object.assign(Object.assign({type:"type"},e.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=e.textContent?e.textContent.map(s=>({label:s,type:"text"})):[]}};const eh=/^[:\-\.\w\u00b7-\uffff]*$/;function Fv(t){return Object.assign(Object.assign({type:"property"},t.completion||{}),{label:t.name})}function Wv(t){return typeof t=="string"?{label:`"${t}"`,type:"constant"}:/^"/.test(t.label)?t:Object.assign(Object.assign({},t),{label:`"${t.label}"`})}function LH(t,e){let n=[],i=[],s=Object.create(null);for(let a of e){let c=Fv(a);n.push(c),a.global&&i.push(c),a.values&&(s[a.name]=a.values.map(Wv))}let r=[],o=[],l=Object.create(null);for(let a of t){let c=i,u=s;a.attributes&&(c=c.concat(a.attributes.map(d=>typeof d=="string"?n.find(h=>h.label==d)||{label:d,type:"property"}:(d.values&&(u==s&&(u=Object.create(u)),u[d.name]=d.values.map(Wv)),Fv(d)))));let f=new IH(a,c,u);l[f.name]=f,r.push(f),a.top&&o.push(f)}o.length||(o=r);for(let a=0;a{var c;let{doc:u}=a.state,f=RH(a.state,a.pos);if(!f||f.type=="tag"&&!a.explicit)return null;let{type:d,from:h,context:p}=f;if(d=="openTag"){let m=o,y=Qd(u,p);if(y){let g=l[y];m=(g==null?void 0:g.children)||r}return{from:h,options:m.map(g=>g.completion),validFor:eh}}else if(d=="closeTag"){let m=Qd(u,p);return m?{from:h,to:a.pos+(u.sliceString(a.pos,a.pos+1)==">"?1:0),options:[((c=l[m])===null||c===void 0?void 0:c.closeNameCompletion)||{label:m+">",type:"type"}],validFor:eh}:null}else if(d=="attrName"){let m=l[Yc(u,p)];return{from:h,options:(m==null?void 0:m.attrs)||i,validFor:eh}}else if(d=="attrValue"){let m=DH(u,p,h);if(!m)return null;let y=l[Yc(u,p)],g=((y==null?void 0:y.attrValues)||s)[m];return!g||!g.length?null:{from:h,to:a.pos+(u.sliceString(a.pos,a.pos+1)=='"'?1:0),options:g,validFor:/^"[^"]*"?$/}}else if(d=="tag"){let m=Qd(u,p),y=l[m],g=[],x=p&&p.lastChild;m&&(!x||x.name!="CloseTag"||Yc(u,x)!=m)&&g.push(y?y.closeCompletion:{label:"",type:"type",boost:2});let b=g.concat(((y==null?void 0:y.children)||(p?r:o)).map(w=>w.openCompletion));if(p&&(y!=null&&y.text.length)){let w=p.firstChild;w.to>a.pos-20&&!/\S/.test(a.state.sliceDoc(w.to,a.pos))&&(b=b.concat(y.text))}return{from:h,options:b,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const zp=ra.define({name:"xml",parser:MH.configure({props:[vg.add({Element(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),xg.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),nC.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function NH(t={}){let e=[zp.data.of({autocomplete:LH(t.elements||[],t.attributes||[])})];return t.autoCloseTags!==!1&&e.push($H),new HO(zp,e)}function zv(t,e,n=t.length){if(!e)return"";let i=e.firstChild,s=i&&i.getChild("TagName");return s?t.sliceString(s.from,Math.min(s.to,n)):""}const $H=pe.inputHandler.of((t,e,n,i,s)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!zp.isActiveAt(t.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var c,u,f;let{head:d}=a,h=o.doc.sliceString(d-1,d)==i,p=Ut(o).resolveInner(d,-1),m;if(h&&i==">"&&p.name=="EndTag"){let y=p.parent;if(((u=(c=y.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(m=zv(o.doc,y.parent,d))){let g=d+(o.doc.sliceString(d,d+1)===">"?1:0),x=``;return{range:a,changes:{from:d,to:g,insert:x}}}}else if(h&&i=="/"&&p.name=="StartCloseTag"){let y=p.parent;if(p.from==d-2&&((f=y.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(m=zv(o.doc,y,d))){let g=d+(o.doc.sliceString(d,d+1)===">"?1:0),x=`${m}>`;return{range:J.cursor(d+x.length,-1),changes:{from:d,to:g,insert:x}}}}return{range:a}});return l.changes.empty?!1:(t.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function VH(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var yl={exports:{}},Mc={exports:{}},Hv;function BH(){return Hv||(Hv=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ParsingError=void 0;class n extends Error{constructor(w,S){super(w),this.cause=S}}e.ParsingError=n;let i;function s(){return a(!1)||d()||f()||u()||l(!1)}function r(){return m(/\s*/),a(!0)||f()||c()||l(!1)}function o(){const b=l(!0),w=[];let S,k=r();for(;k;){if(k.node.type==="Element"){if(S)throw new Error("Found multiple root nodes");S=k.node}k.excluded||w.push(k.node),k=r()}if(!S)throw new n("Failed to parse XML","Root Element not found");if(i.xml.length!==0)throw new n("Failed to parse XML","Not Well-Formed XML");return{declaration:b?b.node:null,root:S,children:w}}function l(b){const w=m(b?/^<\?(xml(-stylesheet)?)\s*/:/^<\?([\w-:.]+)\s*/);if(!w)return;const S={name:w[1],type:"ProcessingInstruction",attributes:{}};for(;!(y()||g("?>"));){const k=h();if(k)S.attributes[k.name]=k.value;else return}return m(/\?>/),{excluded:b?!1:i.options.filter(S)===!1,node:S}}function a(b){const w=m(/^<([^?!\s]+)\s*/);if(!w)return;const S={type:"Element",name:w[1],attributes:{},children:[]},k=b?!1:i.options.filter(S)===!1;for(;!(y()||g(">")||g("?>")||g("/>"));){const _=h();if(_)S.attributes[_.name]=_.value;else return}if(m(/^\s*\/>/))return S.children=null,{excluded:k,node:S};m(/\??>/);let O=s();for(;O;)O.excluded||S.children.push(O.node),O=s();if(i.options.strictMode){const _=``;if(i.xml.startsWith(_))i.xml=i.xml.slice(_.length);else throw new n("Failed to parse XML",`Closing tag not matching "${_}"`)}else m(/^<\/[\w-:.\u00C0-\u00FF]+\s*>/);return{excluded:k,node:S}}function c(){const b=m(/^]*>/)||m(/^]*>/)||m(/^/)||m(/^/);if(b){const w={type:"DocumentType",content:b[0]};return{excluded:i.options.filter(w)===!1,node:w}}}function u(){if(i.xml.startsWith("");if(b>-1){const w=b+3,S={type:"CDATA",content:i.xml.substring(0,w)};return i.xml=i.xml.slice(w),{excluded:i.options.filter(S)===!1,node:S}}}}function f(){const b=m(/^/);if(b){const w={type:"Comment",content:b[0]};return{excluded:i.options.filter(w)===!1,node:w}}}function d(){const b=m(/^([^<]+)/);if(b){const w={type:"Text",content:b[1]};return{excluded:i.options.filter(w)===!1,node:w}}}function h(){const b=m(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/);if(b)return{name:b[1].trim(),value:p(b[2].trim())}}function p(b){return b.replace(/^['"]|['"]$/g,"")}function m(b){const w=i.xml.match(b);if(w)return i.xml=i.xml.slice(w[0].length),w}function y(){return i.xml.length===0}function g(b){return i.xml.indexOf(b)===0}function x(b,w={}){b=b.trim();const S=w.filter||(()=>!0);return i={xml:b,options:Object.assign(Object.assign({},w),{filter:S,strictMode:w.strictMode===!0})},o()}t.exports=x,e.default=x}(Mc,Mc.exports)),Mc.exports}var Uv=yl.exports,jv;function FH(){return jv||(jv=1,function(t,e){var n=Uv&&Uv.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(BH());function s(p){if(!p.options.indentation&&!p.options.lineSeparator)return;p.content+=p.options.lineSeparator;let m;for(m=0;m0&&(!y&&m.content.length>0&&s(m),o(m,p))}function c(p,m){const y="/"+p.join("/"),g=p[p.length-1];return m.includes(g)||m.includes(y)}function u(p,m,y){if(m.path.push(p.name),!y&&m.content.length>0&&s(m),o(m,"<"+p.name),f(m,p.attributes),p.children===null||m.options.forceSelfClosingEmptyTag&&p.children.length===0){const g=m.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";o(m,g)}else if(p.children.length===0)o(m,">");else{const g=p.children;o(m,">"),m.level++;let x=p.attributes["xml:space"]==="preserve"||y,b=!1;if(!x&&m.options.ignoredPaths&&(b=c(m.path,m.options.ignoredPaths),x=b),!x&&m.options.collapseContent){let w=!1,S=!1,k=!1;g.forEach(function(O,_){O.type==="Text"?(O.content.includes(` -`)?(S=!0,O.content=O.content.trim()):(_===0||_===g.length-1)&&!y&&O.content.trim().length===0&&(O.content=""),(O.content.trim().length>0||g.length===1)&&(w=!0)):O.type==="CDATA"?w=!0:k=!0}),w&&(!k||!S)&&(x=!0)}g.forEach(function(w){l(w,m,y||x)}),m.level--,!y&&!x&&s(m),b&&r(m),o(m,"")}m.path.pop()}function f(p,m){Object.keys(m).forEach(function(y){const g=m[y].replace(/"/g,""");o(p," "+y+'="'+g+'"')})}function d(p,m){m.content.length>0&&s(m),o(m,"")}function h(p,m={}){m.indentation="indentation"in m?m.indentation:" ",m.collapseContent=m.collapseContent===!0,m.lineSeparator="lineSeparator"in m?m.lineSeparator:`\r -`,m.whiteSpaceAtEndOfSelfclosingTag=m.whiteSpaceAtEndOfSelfclosingTag===!0,m.throwOnFailure=m.throwOnFailure!==!1;try{const y=(0,i.default)(p,{filter:m.filter,strictMode:m.strictMode}),g={content:"",level:0,options:m,path:[]};return y.declaration&&d(y.declaration,g),y.children.forEach(function(x){l(x,g,!1)}),m.lineSeparator?g.content.replace(/\r\n/g,` -`).replace(/\n/g,m.lineSeparator):g.content}catch(y){if(m.throwOnFailure)throw y;return p}}h.minify=(p,m={})=>h(p,Object.assign(Object.assign({},m),{indentation:"",lineSeparator:""})),t.exports=h,e.default=h}(yl,yl.exports)),yl.exports}var WH=FH();const zH=VH(WH);function HH(t,e,n){var i,s,r;n===void 0&&(n={});var o=(i=n.isImmediate)!=null&&i,l=(s=n.callback)!=null&&s,a=n.maxWait,c=Date.now(),u=[];function f(){if(a!==void 0){var h=Date.now()-c;if(h+e>=a)return a-h}return e}var d=function(){var h=[].slice.call(arguments),p=this;return new Promise(function(m,y){var g=o&&r===void 0;if(r!==void 0&&clearTimeout(r),r=setTimeout(function(){if(r=void 0,c=Date.now(),!o){var b=t.apply(p,h);l&&l(b),u.forEach(function(w){return(0,w.resolve)(b)}),u=[]}},f()),g){var x=t.apply(p,h);return l&&l(x),m(x)}u.push({resolve:m,reject:y})})};return d.cancel=function(h){r!==void 0&&clearTimeout(r),u.forEach(function(p){return(0,p.reject)(h)}),u=[]},d}const UH={class:"p-4"},jH=H({__name:"XmlView",setup(t){const e=ni(),n=Q(()=>zH(e.xml)),i=[NH()],s={lineNumbers:!0,mode:"application/xml",theme:"default"},r=HH(l=>{console.log("Editor-Inhalt nach 500ms Inaktivität:",l)},500);function o(l){r(l)}return(l,a)=>(D(),ae("div",UH,[P(v(r_),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=c=>n.value=c),options:s,extensions:i,onChange:o},null,8,["modelValue"])]))}}),qH={class:"w-screen h-screen"},KH={class:"flex flex-col gap-2 h-full"},GH={class:"flex justify-center"},YH={class:"flex h-full p-6"},XH=H({__name:"Gui",setup(t){return(e,n)=>(D(),ae("div",qH,[P(v(aI),{id:"handle-demo-group-1",direction:"horizontal",class:"h-full w-full"},{default:V(()=>[P(v(ny),{id:"","default-size":15},{default:V(()=>[X("div",KH,[P(v(FL))])]),_:1}),P(v(lI),{id:"","with-handle":""}),P(v(ny),{id:"","default-size":85},{default:V(()=>[P(v(cI),{"default-value":"designer",class:"w-full h-full"},{default:V(()=>[X("div",GH,[P(v(uI),null,{default:V(()=>[P(v(ec),{value:"designer"},{default:V(()=>[je(oe(e.$t("designer")),1)]),_:1}),P(v(ec),{value:"preview"},{default:V(()=>[je(oe(e.$t("preview")),1)]),_:1}),P(v(ec),{value:"xml"},{default:V(()=>[je(oe(e.$t("xml_view")),1)]),_:1}),P(v(ec),{value:"json"},{default:V(()=>[je(oe(e.$t("json_view")),1)]),_:1})]),_:1})]),P(v(Za),{value:"designer",class:"h-full overflow-y-auto"},{default:V(()=>[X("div",YH,[P(v(_$))])]),_:1}),P(v(Za),{value:"preview",class:"h-full overflow-y-auto"},{default:V(()=>[P(X$)]),_:1}),P(v(Za),{value:"xml",class:"h-full overflow-y-auto"},{default:V(()=>[P(jH)]),_:1}),P(v(Za),{value:"json",class:"h-full overflow-y-auto"},{default:V(()=>[P(hH)]),_:1})]),_:1})]),_:1})]),_:1}),P(v(fN)),P(v(AN)),P(v(gN))]))}}),JH=H({__name:"App",setup(t){return St(()=>{const e=Ca(),n=ni(),s=new URLSearchParams(window.location.search).get("uuid");s&&(n.setProductUuid(s),n.loadConfigFromProductApi(s).then(r=>{e.parseJSON(r)}),n.loadFormulaAnalyserDataFromApi(s)),e.$subscribe((r,o)=>{n.saveDesign(e.loadJSON())})}),(e,n)=>(D(),j(XH))}}),QH="Designer",ZH="Kalkulations Analyse",e4="XML Ansicht",t4="JSON Ansicht",n4="Vorschau-Modus",i4="Überschrift",s4="Text",r4="Medien",o4="Textbereich",l4="Eingabefeld",a4="Auswahl",c4="Versteckt",u4="Zeile",f4="ID",d4="Name",h4="Variante",p4="Überschrift 1",m4="Überschrift 2",g4="Überschrift 3",y4="Überschrift 4",b4="Überschrift 5",v4="Überschrift 6",w4="Platzhalter",x4="Erforderlich",S4="Min",k4="Max",O4="Min Calc",C4="Max Calc",_4="Abhängigkeit hinzufügen",A4="Spalte hinzufügen",E4="Modus",T4="Normal",P4="PapierDB",M4="FarbDB",D4="Container",R4="Optionen bearbeiten",I4="Option hinzufügen",L4="Schließen",N4="Abhängigkeiten",$4="Optionen",V4="Einstellungen",B4={designer:QH,preview:ZH,xml_view:e4,json_view:t4,preview_mode:n4,headline:i4,text:s4,media:r4,textarea:o4,input:l4,select:a4,hidden:c4,row:u4,id:f4,default:"Standard",name:d4,variant:h4,headline1:p4,headline2:m4,headline3:g4,headline4:y4,headline5:b4,headline6:v4,placeholder:w4,required:x4,min:S4,max:k4,min_calc:O4,max_calc:C4,add_dependency:_4,add_column:A4,mode:E4,normal:T4,paperdb:P4,colordb:M4,container:D4,edit_options:R4,add_option:I4,close:L4,dependencies:N4,options:$4,settings:V4},F4="Designer",W4="Calculation Analysis",z4="XML View",H4="JSON View",U4="Preview Mode",j4="Headline",q4="Text",K4="Media",G4="Textarea",Y4="Input",X4="Select",J4="Hidden",Q4="Row",Z4="ID",eU="Name",tU="Variant",nU="Headline 1",iU="Headline 2",sU="Headline 3",rU="Headline 4",oU="Headline 5",lU="Headline 6",aU="Placeholder",cU="Required",uU="Min",fU="Max",dU="Min Calc",hU="Max Calc",pU="Add Dependency",mU="Add Column",gU="Mode",yU="Normal",bU="PaperDB",vU="ColorDB",wU="Container",xU="Edit Options",SU="Add Option",kU="Close",OU="Dependencies",CU="Options",_U="Settings",AU={designer:F4,preview:W4,xml_view:z4,json_view:H4,preview_mode:U4,headline:j4,text:q4,media:K4,textarea:G4,input:Y4,select:X4,hidden:J4,row:Q4,id:Z4,default:"Default",name:eU,variant:tU,headline1:nU,headline2:iU,headline3:sU,headline4:rU,headline5:oU,headline6:lU,placeholder:aU,required:cU,min:uU,max:fU,min_calc:dU,max_calc:hU,add_dependency:pU,add_column:mU,mode:gU,normal:yU,paperdb:bU,colordb:vU,container:wU,edit_options:xU,add_option:SU,close:kU,dependencies:OU,options:CU,settings:_U},EU=_L({legacy:!1,locale:"de",fallbackLocale:"en",messages:{de:B4,en:AU}}),Ig=fu(JH);Ig.use(DT());Ig.use(EU);Ig.mount("#app"); +*/var NW=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[LW]}),jW=Symbol("vue-codemirror-global-config"),mn,BW=function(t){var e=t.onUpdate,n=t.onChange,i=t.onFocus,s=t.onBlur,r=function(o,a){var l={};for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&a.indexOf(c)<0&&(l[c]=o[c]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function"){var u=0;for(c=Object.getOwnPropertySymbols(o);un%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let s=e.parser.context;return new QO(e,[],n,i,i,0,[],0,s?new Yb(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[s])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(s,c)}storeNode(e,n,i,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==i)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,n,i,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>i;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=i,this.buffer[o+3]=s}}shift(e,n,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let r=e,{parser:o}=this.p;(s>this.pos||n<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,i),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,s,4)}else this.pos=s,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,s,4)}apply(e,n,i,s){e&65536?this.reduce(e):this.shift(e,n,i,s)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(n,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),s=e.bufferBase+n;for(;e&&s==e.bufferBase;)e=e.parent;return new QO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new eD(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let s=[];for(let r=0,o;rl&1&&a==o)||s.push(n[r],o)}n=s}let i=[];for(let s=0;s>19,s=n&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(s,r)=>{if(!n.includes(s))return n.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-r;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=i(o,r+1);if(a!=null)return a}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Yb{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class eD{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=s}}class yO{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new yO(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new yO(this.stack,this.pos,this.index)}}function Ia(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,s=0;i=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),r+=l,a)break;r*=46}n?n[s++]=r:n=new e(r)}return n}class bu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Mb=new bu;class tD{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Mb,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,s=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-i.to,i=o}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,s;if(n>=0&&n=this.chunk2Pos&&ia.to&&(this.chunk2=this.chunk2.slice(0,a.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Mb,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let s of this.ranges){if(s.from>=n)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,n)))}return i}}class Eo{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;MT(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Eo.prototype.contextual=Eo.prototype.fallback=Eo.prototype.extend=!1;class bO{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Ia(e):e}token(e,n){let i=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(MT(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(i,e.token),e.acceptToken(this.elseToken,s))}}bO.prototype.contextual=Eo.prototype.fallback=Eo.prototype.extend=!1;class Lt{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function MT(t,e,n,i,s,r){let o=0,a=1<0){let h=t[d];if(l.allows(h)&&(e.token.value==-1||e.token.value==h||nD(h,e.token.value,s,r))){e.acceptToken(h);break}}let u=e.next,O=0,f=t[o+2];if(e.next<0&&f>O&&t[c+f*3-3]==65535){o=t[c+f*3-1];continue e}for(;O>1,h=c+d+(d<<1),p=t[h],m=t[h+1]||65536;if(u=m)O=d+1;else{o=t[h+2],e.advance();continue e}}break}}function qb(t,e,n){for(let i=e,s;(s=t[i])!=65535;i++)if(s==n)return i-e;return-1}function nD(t,e,n,i){let s=qb(n,i,e);return s<0||qb(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class iD{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ib(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ib(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(r instanceof vt){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+r.length}}}class sD{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new bu)}getActions(e){let n=0,i=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cO.end+25&&(l=Math.max(O.lookAhead,l)),O.value!=0)){let f=n;if(O.extended>-1&&(n=this.addActions(e,O.extended,O.end,n)),n=this.addActions(e,O.value,O.end,n),!u.extend&&(i=O,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!i&&e.pos==this.stream.end&&(i=new bu,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new bu,{pos:i,p:s}=e;return n.start=i,n.end=Math.min(i+1,s.stream.end),n.value=i==s.stream.end?s.parser.eofTerm:0,n}updateCachedToken(e,n,i){let s=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(s,e),i),e.value>-1){let{parser:r}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,n,i,s){for(let r=0;re.bufferLength*4?new iD(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;on)i.push(a);else{if(this.advanceStack(a,i,e))continue;{s||(s=[],r=[]),s.push(a);let l=this.tokens.getMainToken(a);r.push(l.value,l.end)}}break}}if(!i.length){let o=s&&aD(s);if(o)return Mn&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Mn&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(o)return Mn&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((a,l)=>l.score-a.score);i.length>o;)i.pop();i.some(a=>a.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)i.splice(l--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let O=this.fragments.nodeAt(s);O;){let f=this.parser.nodeSet.types[O.type.id]==O.type?r.getGoto(e.state,O.type.id):-1;if(f>-1&&O.length&&(!c||(O.prop(Ee.contextHash)||0)==u))return e.useNode(O,f),Mn&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(O.type.id)})`),!0;if(!(O instanceof vt)||O.children.length==0||O.positions[0]>0)break;let d=O.children[0];if(d instanceof vt&&O.positions[0]==0)O=d;else break}}let a=r.stateSlot(e.state,4);if(a>0)return e.reduce(a),Mn&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;cs?n.push(h):i.push(h)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Ub(e,n),!0}}runRecovery(e,n,i){let s=null,r=!1;for(let o=0;o ":"";if(a.deadEnd&&(r||(r=!0,a.restart(),Mn&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,i))))continue;let O=a.split(),f=u;for(let d=0;O.forceReduce()&&d<10&&(Mn&&console.log(f+this.stackID(O)+" (via force-reduce)"),!this.advanceFully(O,i));d++)Mn&&(f=this.stackID(O)+" -> ");for(let d of a.recoverByInsert(l))Mn&&console.log(u+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,i);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),Mn&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),Ub(a,i)):(!s||s.scoret;class Xg{constructor(e){this.start=e.start,this.shift=e.shift||kd,this.reduce=e.reduce||kd,this.reuse=e.reuse||kd,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class fr extends pw{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;ae.topRules[a][1]),s=[];for(let a=0;a=0)r(u,l,a[c++]);else{let O=a[c+-u];for(let f=-u;f>0;f--)r(a[c++],l,O);c++}}}this.nodeSet=new ag(n.map((a,l)=>Sn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:s[l],top:i.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=uw;let o=Ia(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new Eo(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let s=new rD(this,e,n,i);for(let r of this.wrappers)s=r(s,e,n,i);return s}getGoto(e,n,i=!1){let s=this.goto;if(n>=s[0])return-1;for(let r=s[n+1];;){let o=s[r++],a=o&1,l=s[r++];if(a&&i)return l;for(let c=r+(o>>1);r0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),s=i?n(i):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=ls(this.data,r+2);else break;s=n(ls(this.data,r+1))}return s}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=ls(this.data,i+2);else break;if((this.data[i+2]&1)==0){let s=this.data[i+1];n.some((r,o)=>o&1&&r==s)||n.push(this.data[i],s)}}return n}configure(e){let n=Object.assign(Object.create(fr.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(r=>r.from==i);return s?s.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=e.specializers.find(a=>a.from==i.external);if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return n.specializers[s]=Wb(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let r of e.split(" ")){let o=n.indexOf(r);o>=0&&(i[o]=!0)}let s=null;for(let r=0;ri)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}const kp=1,lD=2,cD=3,uD=4,OD=5,fD=36,dD=37,hD=38,pD=11,mD=13;function gD(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function $D(t){return t==9||t==10||t==13||t==32}let Db=null,Lb=null,Nb=0;function Rp(t,e){let n=t.pos+e;if(Lb==t&&Nb==n)return Db;for(;$D(t.peek(e));)e++;let i="";for(;;){let s=t.peek(e);if(!gD(s))break;i+=String.fromCharCode(s),e++}return Lb=t,Nb=n,Db=i||null}function jb(t,e){this.name=t,this.parent=e}const QD=new Xg({start:null,shift(t,e,n,i){return e==kp?new jb(Rp(i,1)||"",t):t},reduce(t,e){return e==pD&&t?t.parent:t},reuse(t,e,n,i){let s=e.type.id;return s==kp||s==mD?new jb(Rp(i,1)||"",t):t},strict:!1}),yD=new Lt((t,e)=>{if(t.next==60){if(t.advance(),t.next==47){t.advance();let n=Rp(t,0);if(!n)return t.acceptToken(OD);if(e.context&&n==e.context.name)return t.acceptToken(lD);for(let i=e.context;i;i=i.parent)if(i.name==n)return t.acceptToken(cD,-2);t.acceptToken(uD)}else if(t.next!=33&&t.next!=63)return t.acceptToken(kp)}},{contextual:!0});function Cg(t,e){return new Lt(n=>{let i=0,s=e.charCodeAt(0);e:for(;!(n.next<0);n.advance(),i++)if(n.next==s){for(let r=1;r"),SD=Cg(dD,"?>"),vD=Cg(hD,"]]>"),PD=ua({Text:_.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":_.angleBracket,TagName:_.tagName,"MismatchedCloseTag/TagName":[_.tagName,_.invalid],AttributeName:_.attributeName,AttributeValue:_.attributeValue,Is:_.definitionOperator,"EntityReference CharacterReference":_.character,Comment:_.blockComment,ProcessingInst:_.processingInstruction,DoctypeDecl:_.documentMeta,Cdata:_.special(_.string)}),xD=fr.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[yD,bD,SD,vD,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function Su(t,e){let n=e&&e.getChild("TagName");return n?t.sliceString(n.from,n.to):""}function Rd(t,e){let n=e&&e.firstChild;return!n||n.name!="OpenTag"?"":Su(t,n)}function wD(t,e,n){let i=e&&e.getChildren("Attribute").find(r=>r.from<=n&&r.to>=n),s=i&&i.getChild("AttributeName");return s?t.sliceString(s.from,s.to):""}function Xd(t){for(let e=t&&t.parent;e;e=e.parent)if(e.name=="Element")return e;return null}function TD(t,e){var n;let i=St(t).resolveInner(e,-1),s=null;for(let r=i;!s&&r.parent;r=r.parent)(r.name=="OpenTag"||r.name=="CloseTag"||r.name=="SelfClosingTag"||r.name=="MismatchedCloseTag")&&(s=r);if(s&&(s.to>e||s.lastChild.type.isError)){let r=s.parent;if(i.name=="TagName")return s.name=="CloseTag"||s.name=="MismatchedCloseTag"?{type:"closeTag",from:i.from,context:r}:{type:"openTag",from:i.from,context:Xd(r)};if(i.name=="AttributeName")return{type:"attrName",from:i.from,context:s};if(i.name=="AttributeValue")return{type:"attrValue",from:i.from,context:s};let o=i==s||i.name=="Attribute"?i.childBefore(e):i;return(o==null?void 0:o.name)=="StartTag"?{type:"openTag",from:e,context:Xd(r)}:(o==null?void 0:o.name)=="StartCloseTag"&&o.to<=e?{type:"closeTag",from:e,context:r}:(o==null?void 0:o.name)=="Is"?{type:"attrValue",from:e,context:s}:o?{type:"attrName",from:e,context:s}:null}else if(i.name=="StartCloseTag")return{type:"closeTag",from:e,context:i.parent};for(;i.parent&&i.to==e&&!(!((n=i.lastChild)===null||n===void 0)&&n.type.isError);)i=i.parent;return i.name=="Element"||i.name=="Text"||i.name=="Document"?{type:"tag",from:e,context:i.name=="Element"?i:Xd(i)}:null}let _D=class{constructor(e,n,i){this.attrs=n,this.attrValues=i,this.children=[],this.name=e.name,this.completion=Object.assign(Object.assign({type:"type"},e.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=e.textContent?e.textContent.map(s=>({label:s,type:"text"})):[]}};const Cd=/^[:\-\.\w\u00b7-\uffff]*$/;function Bb(t){return Object.assign(Object.assign({type:"property"},t.completion||{}),{label:t.name})}function Gb(t){return typeof t=="string"?{label:`"${t}"`,type:"constant"}:/^"/.test(t.label)?t:Object.assign(Object.assign({},t),{label:`"${t.label}"`})}function kD(t,e){let n=[],i=[],s=Object.create(null);for(let l of e){let c=Bb(l);n.push(c),l.global&&i.push(c),l.values&&(s[l.name]=l.values.map(Gb))}let r=[],o=[],a=Object.create(null);for(let l of t){let c=i,u=s;l.attributes&&(c=c.concat(l.attributes.map(f=>typeof f=="string"?n.find(d=>d.label==f)||{label:f,type:"property"}:(f.values&&(u==s&&(u=Object.create(u)),u[f.name]=f.values.map(Gb)),Bb(f)))));let O=new _D(l,c,u);a[O.name]=O,r.push(O),l.top&&o.push(O)}o.length||(o=r);for(let l=0;l{var c;let{doc:u}=l.state,O=TD(l.state,l.pos);if(!O||O.type=="tag"&&!l.explicit)return null;let{type:f,from:d,context:h}=O;if(f=="openTag"){let p=o,m=Rd(u,h);if(m){let g=a[m];p=(g==null?void 0:g.children)||r}return{from:d,options:p.map(g=>g.completion),validFor:Cd}}else if(f=="closeTag"){let p=Rd(u,h);return p?{from:d,to:l.pos+(u.sliceString(l.pos,l.pos+1)==">"?1:0),options:[((c=a[p])===null||c===void 0?void 0:c.closeNameCompletion)||{label:p+">",type:"type"}],validFor:Cd}:null}else if(f=="attrName"){let p=a[Su(u,h)];return{from:d,options:(p==null?void 0:p.attrs)||i,validFor:Cd}}else if(f=="attrValue"){let p=wD(u,h,d);if(!p)return null;let m=a[Su(u,h)],g=((m==null?void 0:m.attrValues)||s)[p];return!g||!g.length?null:{from:d,to:l.pos+(u.sliceString(l.pos,l.pos+1)=='"'?1:0),options:g,validFor:/^"[^"]*"?$/}}else if(f=="tag"){let p=Rd(u,h),m=a[p],g=[],b=h&&h.lastChild;p&&(!b||b.name!="CloseTag"||Su(u,b)!=p)&&g.push(m?m.closeCompletion:{label:"",type:"type",boost:2});let Q=g.concat(((m==null?void 0:m.children)||(h?r:o)).map(y=>y.openCompletion));if(h&&(m!=null&&m.text.length)){let y=h.firstChild;y.to>l.pos-20&&!/\S/.test(l.state.sliceDoc(y.to,l.pos))&&(Q=Q.concat(m.text))}return{from:d,options:Q,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}else return null}}const Xp=ur.define({name:"xml",parser:xD.configure({props:[Oa.add({Element(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),fa.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),pg.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function qT(t={}){let e=[Xp.data.of({autocomplete:kD(t.elements||[],t.attributes||[])})];return t.autoCloseTags!==!1&&e.push(RD),new sc(Xp,e)}function Fb(t,e,n=t.length){if(!e)return"";let i=e.firstChild,s=i&&i.getChild("TagName");return s?t.sliceString(s.from,Math.min(s.to,n)):""}const RD=Oe.inputHandler.of((t,e,n,i,s)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Xp.isActiveAt(t.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange(l=>{var c,u,O;let{head:f}=l,d=o.doc.sliceString(f-1,f)==i,h=St(o).resolveInner(f,-1),p;if(d&&i==">"&&h.name=="EndTag"){let m=h.parent;if(((u=(c=m.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=Fb(o.doc,m.parent,f))){let g=f+(o.doc.sliceString(f,f+1)===">"?1:0),b=``;return{range:l,changes:{from:f,to:g,insert:b}}}}else if(d&&i=="/"&&h.name=="StartCloseTag"){let m=h.parent;if(h.from==f-2&&((O=m.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(p=Fb(o.doc,m,f))){let g=f+(o.doc.sliceString(f,f+1)===">"?1:0),b=`${p}>`;return{range:B.cursor(f+b.length,-1),changes:{from:f,to:g,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function XD(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ua={exports:{}},su={exports:{}},Hb;function CD(){return Hb||(Hb=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ParsingError=void 0;class n extends Error{constructor(y,S){super(y),this.cause=S}}e.ParsingError=n;let i;function s(){return l(!1)||f()||O()||u()||a(!1)}function r(){return p(/\s*/),l(!0)||O()||c()||a(!1)}function o(){const Q=a(!0),y=[];let S,v=r();for(;v;){if(v.node.type==="Element"){if(S)throw new Error("Found multiple root nodes");S=v.node}v.excluded||y.push(v.node),v=r()}if(!S)throw new n("Failed to parse XML","Root Element not found");if(i.xml.length!==0)throw new n("Failed to parse XML","Not Well-Formed XML");return{declaration:Q?Q.node:null,root:S,children:y}}function a(Q){const y=p(Q?/^<\?(xml(-stylesheet)?)\s*/:/^<\?([\w-:.]+)\s*/);if(!y)return;const S={name:y[1],type:"ProcessingInstruction",attributes:{}};for(;!(m()||g("?>"));){const v=d();if(v)S.attributes[v.name]=v.value;else return}return p(/\?>/),{excluded:Q?!1:i.options.filter(S)===!1,node:S}}function l(Q){const y=p(/^<([^?!\s]+)\s*/);if(!y)return;const S={type:"Element",name:y[1],attributes:{},children:[]},v=Q?!1:i.options.filter(S)===!1;for(;!(m()||g(">")||g("?>")||g("/>"));){const w=d();if(w)S.attributes[w.name]=w.value;else return}if(p(/^\s*\/>/))return S.children=null,{excluded:v,node:S};p(/\??>/);let P=s();for(;P;)P.excluded||S.children.push(P.node),P=s();if(i.options.strictMode){const w=``;if(i.xml.startsWith(w))i.xml=i.xml.slice(w.length);else throw new n("Failed to parse XML",`Closing tag not matching "${w}"`)}else p(/^<\/[\w-:.\u00C0-\u00FF]+\s*>/);return{excluded:v,node:S}}function c(){const Q=p(/^]*>/)||p(/^]*>/)||p(/^/)||p(/^/);if(Q){const y={type:"DocumentType",content:Q[0]};return{excluded:i.options.filter(y)===!1,node:y}}}function u(){if(i.xml.startsWith("");if(Q>-1){const y=Q+3,S={type:"CDATA",content:i.xml.substring(0,y)};return i.xml=i.xml.slice(y),{excluded:i.options.filter(S)===!1,node:S}}}}function O(){const Q=p(/^/);if(Q){const y={type:"Comment",content:Q[0]};return{excluded:i.options.filter(y)===!1,node:y}}}function f(){const Q=p(/^([^<]+)/);if(Q){const y={type:"Text",content:Q[1]};return{excluded:i.options.filter(y)===!1,node:y}}}function d(){const Q=p(/([^=]+)\s*=\s*("[^"]*"|'[^']*'|[^>\s]+)\s*/);if(Q)return{name:Q[1].trim(),value:h(Q[2].trim())}}function h(Q){return Q.replace(/^['"]|['"]$/g,"")}function p(Q){const y=i.xml.match(Q);if(y)return i.xml=i.xml.slice(y[0].length),y}function m(){return i.xml.length===0}function g(Q){return i.xml.indexOf(Q)===0}function b(Q,y={}){Q=Q.trim();const S=y.filter||(()=>!0);return i={xml:Q,options:Object.assign(Object.assign({},y),{filter:S,strictMode:y.strictMode===!0})},o()}t.exports=b,e.default=b}(su,su.exports)),su.exports}var Kb=Ua.exports,Jb;function VD(){return Jb||(Jb=1,function(t,e){var n=Kb&&Kb.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(CD());function s(h){if(!h.options.indentation&&!h.options.lineSeparator)return;h.content+=h.options.lineSeparator;let p;for(p=0;p0&&(!m&&p.content.length>0&&s(p),o(p,h))}function c(h,p){const m="/"+h.join("/"),g=h[h.length-1];return p.includes(g)||p.includes(m)}function u(h,p,m){if(p.path.push(h.name),!m&&p.content.length>0&&s(p),o(p,"<"+h.name),O(p,h.attributes),h.children===null||p.options.forceSelfClosingEmptyTag&&h.children.length===0){const g=p.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";o(p,g)}else if(h.children.length===0)o(p,">");else{const g=h.children;o(p,">"),p.level++;let b=h.attributes["xml:space"]==="preserve"||m,Q=!1;if(!b&&p.options.ignoredPaths&&(Q=c(p.path,p.options.ignoredPaths),b=Q),!b&&p.options.collapseContent){let y=!1,S=!1,v=!1;g.forEach(function(P,w){P.type==="Text"?(P.content.includes(` +`)?(S=!0,P.content=P.content.trim()):(w===0||w===g.length-1)&&!m&&P.content.trim().length===0&&(P.content=""),(P.content.trim().length>0||g.length===1)&&(y=!0)):P.type==="CDATA"?y=!0:v=!0}),y&&(!v||!S)&&(b=!0)}g.forEach(function(y){a(y,p,m||b)}),p.level--,!m&&!b&&s(p),Q&&r(p),o(p,"")}p.path.pop()}function O(h,p){Object.keys(p).forEach(function(m){const g=p[m].replace(/"/g,""");o(h," "+m+'="'+g+'"')})}function f(h,p){p.content.length>0&&s(p),o(p,"")}function d(h,p={}){p.indentation="indentation"in p?p.indentation:" ",p.collapseContent=p.collapseContent===!0,p.lineSeparator="lineSeparator"in p?p.lineSeparator:`\r +`,p.whiteSpaceAtEndOfSelfclosingTag=p.whiteSpaceAtEndOfSelfclosingTag===!0,p.throwOnFailure=p.throwOnFailure!==!1;try{const m=(0,i.default)(h,{filter:p.filter,strictMode:p.strictMode}),g={content:"",level:0,options:p,path:[]};return m.declaration&&f(m.declaration,g),m.children.forEach(function(b){a(b,g,!1)}),p.lineSeparator?g.content.replace(/\r\n/g,` +`).replace(/\n/g,p.lineSeparator):g.content}catch(m){if(p.throwOnFailure)throw m;return h}}d.minify=(h,p={})=>d(h,Object.assign(Object.assign({},p),{indentation:"",lineSeparator:""})),t.exports=d,e.default=d}(Ua,Ua.exports)),Ua.exports}var AD=VD();const IT=XD(AD),ED={class:"p-4"},ZD=W({__name:"XmlView",setup(t){const e=sn(),n=te(IT(e.xml)),i=[qT()],s={lineNumbers:!0,mode:"application/xml",theme:"default"};_e(n,o=>{e.xml=o});function r(){e.manualSync()}return(o,a)=>(C(),re("div",ED,[X($(jn),{onClick:r,disabled:$(e).syncing},{default:z(()=>[Ae(ne($(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),X($(Tf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:s,extensions:i},null,8,["modelValue"])]))}}),zD=1,YD=2,MD=275,qD=3,ID=276,eS=277,UD=278,WD=4,DD=5,LD=6,ND=7,tS=8,jD=9,BD=10,GD=11,FD=12,HD=13,KD=14,JD=15,eL=16,tL=17,nL=18,iL=19,sL=20,rL=21,oL=22,aL=23,lL=24,cL=25,uL=26,OL=27,fL=28,dL=29,hL=30,pL=31,mL=32,gL=33,$L=34,QL=35,yL=36,bL=37,SL=38,vL=39,PL=40,xL=41,wL=42,TL=43,_L=44,kL=45,RL=46,XL=47,CL=48,VL=49,AL=50,EL=51,ZL=52,zL=53,YL=54,ML=55,qL=56,IL=57,UL=58,WL=59,DL=60,LL=61,NL=62,Vd=63,jL=64,BL=65,GL=66,FL={abstract:WD,and:DD,array:LD,as:ND,true:tS,false:tS,break:jD,case:BD,catch:GD,clone:FD,const:HD,continue:KD,declare:eL,default:JD,do:tL,echo:nL,else:iL,elseif:sL,enddeclare:rL,endfor:oL,endforeach:aL,endif:lL,endswitch:cL,endwhile:uL,enum:OL,extends:fL,final:dL,finally:hL,fn:pL,for:mL,foreach:gL,from:$L,function:QL,global:yL,goto:bL,if:SL,implements:vL,include:PL,include_once:xL,instanceof:wL,insteadof:TL,interface:_L,list:kL,match:RL,namespace:XL,new:CL,null:VL,or:AL,print:EL,readonly:ZL,require:zL,require_once:YL,return:ML,switch:qL,throw:IL,trait:UL,try:WL,unset:DL,use:LL,var:NL,public:Vd,private:Vd,protected:Vd,while:jL,xor:BL,yield:GL,__proto__:null};function nS(t){let e=FL[t.toLowerCase()];return e??-1}function iS(t){return t==9||t==10||t==13||t==32}function UT(t){return t>=97&&t<=122||t>=65&&t<=90}function nl(t){return t==95||t>=128||UT(t)}function Ad(t){return t>=48&&t<=55||t>=97&&t<=102||t>=65&&t<=70}const HL={int:!0,integer:!0,bool:!0,boolean:!0,float:!0,double:!0,real:!0,string:!0,array:!0,object:!0,unset:!0,__proto__:null},KL=new Lt(t=>{if(t.next==40){t.advance();let e=0;for(;iS(t.peek(e));)e++;let n="",i;for(;UT(i=t.peek(e));)n+=String.fromCharCode(i),e++;for(;iS(t.peek(e));)e++;t.peek(e)==41&&HL[n.toLowerCase()]&&t.acceptToken(zD)}else if(t.next==60&&t.peek(1)==60&&t.peek(2)==60){for(let i=0;i<3;i++)t.advance();for(;t.next==32||t.next==9;)t.advance();let e=t.next==39;if(e&&t.advance(),!nl(t.next))return;let n=String.fromCharCode(t.next);for(;t.advance(),!(!nl(t.next)&&!(t.next>=48&&t.next<=55));)n+=String.fromCharCode(t.next);if(e){if(t.next!=39)return;t.advance()}if(t.next!=10&&t.next!=13)return;for(;;){let i=t.next==10||t.next==13;if(t.advance(),t.next<0)return;if(i){for(;t.next==32||t.next==9;)t.advance();let s=!0;for(let r=0;r{t.next<0&&t.acceptToken(UD)}),e3=new Lt((t,e)=>{t.next==63&&e.canShift(eS)&&t.peek(1)==62&&t.acceptToken(eS)});function t3(t){let e=t.peek(1);if(e==110||e==114||e==116||e==118||e==101||e==102||e==92||e==36||e==34||e==123)return 2;if(e>=48&&e<=55){let n=2,i;for(;n<5&&(i=t.peek(n))>=48&&i<=55;)n++;return n}if(e==120&&Ad(t.peek(2)))return Ad(t.peek(3))?4:3;if(e==117&&t.peek(2)==123)for(let n=3;;n++){let i=t.peek(n);if(i==125)return n==2?0:n+1;if(!Ad(i))break}return 0}const n3=new Lt((t,e)=>{let n=!1;for(;!(t.next==34||t.next<0||t.next==36&&(nl(t.peek(1))||t.peek(1)==123)||t.next==123&&t.peek(1)==36);n=!0){if(t.next==92){let i=t3(t);if(i){if(n)break;return t.acceptToken(qD,i)}}else if(!n&&(t.next==91||t.next==45&&t.peek(1)==62&&nl(t.peek(2))||t.next==63&&t.peek(1)==45&&t.peek(2)==62&&nl(t.peek(3)))&&e.canShift(ID))break;t.advance()}n&&t.acceptToken(MD)}),i3=ua({"Visibility abstract final static":_.modifier,"for foreach while do if else elseif switch try catch finally return throw break continue default case":_.controlKeyword,"endif endfor endforeach endswitch endwhile declare enddeclare goto match":_.controlKeyword,"and or xor yield unset clone instanceof insteadof":_.operatorKeyword,"function fn class trait implements extends const enum global interface use var":_.definitionKeyword,"include include_once require require_once namespace":_.moduleKeyword,"new from echo print array list as":_.keyword,null:_.null,Boolean:_.bool,VariableName:_.variableName,"NamespaceName/...":_.namespace,"NamedType/...":_.typeName,Name:_.name,"CallExpression/Name":_.function(_.variableName),"LabelStatement/Name":_.labelName,"MemberExpression/Name":_.propertyName,"MemberExpression/VariableName":_.special(_.propertyName),"ScopedExpression/ClassMemberName/Name":_.propertyName,"ScopedExpression/ClassMemberName/VariableName":_.special(_.propertyName),"CallExpression/MemberExpression/Name":_.function(_.propertyName),"CallExpression/ScopedExpression/ClassMemberName/Name":_.function(_.propertyName),"MethodDeclaration/Name":_.function(_.definition(_.variableName)),"FunctionDefinition/Name":_.function(_.definition(_.variableName)),"ClassDeclaration/Name":_.definition(_.className),UpdateOp:_.updateOperator,ArithOp:_.arithmeticOperator,"LogicOp IntersectionType/&":_.logicOperator,BitOp:_.bitwiseOperator,CompareOp:_.compareOperator,ControlOp:_.controlOperator,AssignOp:_.definitionOperator,"$ ConcatOp":_.operator,LineComment:_.lineComment,BlockComment:_.blockComment,Integer:_.integer,Float:_.float,String:_.string,ShellExpression:_.special(_.string),"=> ->":_.punctuation,"( )":_.paren,"#[ [ ]":_.squareBracket,"${ { }":_.brace,"-> ?->":_.derefOperator,", ; :: : \\":_.separator,"PhpOpen PhpClose":_.processingInstruction}),s3={__proto__:null,static:325,STATIC:325,class:351,CLASS:351},r3=fr.deserialize({version:14,states:"%#[Q`OWOOQhQaOOP%oO`OOOOO#t'#Hh'#HhO%tO#|O'#DuOOO#u'#Dx'#DxQ&SOWO'#DxO&XO$VOOOOQ#u'#Dy'#DyO&lQaO'#D}O'[QdO'#EQO+QQdO'#IqO+_QdO'#ERO-RQaO'#EXO/bQ`O'#EUO/gQ`O'#E_O2UQaO'#E_O2]Q`O'#EgO2bQ`O'#EqO-RQaO'#EqO2mQpO'#FOO2rQ`O'#FOOOQS'#Iq'#IqO2wQ`O'#ExOOQS'#Ih'#IhO5SQdO'#IeO9UQeO'#F]O-RQaO'#FlO-RQaO'#FmO-RQaO'#FnO-RQaO'#FoO-RQaO'#FoO-RQaO'#FrOOQO'#Ir'#IrO9cQ`O'#FxOOQO'#Ht'#HtO9kQ`O'#HXO:VQ`O'#FsO:bQ`O'#HfO:mQ`O'#GPO:uQaO'#GQO-RQaO'#G`O-RQaO'#GcO;bOrO'#GfOOQS'#JP'#JPOOQS'#JO'#JOOOQS'#Ie'#IeO/bQ`O'#GmO/bQ`O'#GoO/bQ`O'#GtOhQaO'#GvO;iQ`O'#GwO;nQ`O'#GzO:]Q`O'#G}O;sQeO'#HOO;sQeO'#HPO;sQeO'#HQO;}Q`O'#HROhQ`O'#HVO:]Q`O'#HWO>mQ`O'#HWO;}Q`O'#HXO:]Q`O'#HZO:]Q`O'#H[O:]Q`O'#H]O>rQ`O'#H`O>}Q`O'#HaOQO!$dQ`O,5POOQ#u-E;h-E;hO!1QQ`O,5=tOOO#u,5:_,5:_O!1]O#|O,5:_OOO#u-E;g-E;gOOOO,5>|,5>|OOQ#y1G0T1G0TO!1eQ`O1G0YO-RQaO1G0YO!2wQ`O1G0qOOQS1G0q1G0qOOQS'#Eo'#EoOOQS'#Il'#IlO-RQaO'#IlOOQS1G0r1G0rO!4ZQ`O'#IoO!5pQ`O'#IqO!5}QaO'#EwOOQO'#Io'#IoO!6XQ`O'#InO!6aQ`O,5;aO-RQaO'#FXOOQS'#FW'#FWOOQS1G1[1G1[O!6fQdO1G1dO!8kQdO1G1dO!:WQdO1G1dO!;sQdO1G1dO!=`QdO1G1dO!>{QdO1G1dO!@hQdO1G1dO!BTQdO1G1dO!CpQdO1G1dO!E]QdO1G1dO!FxQdO1G1dO!HeQdO1G1dO!JQQdO1G1dO!KmQdO1G1dO!MYQdO1G1dO!NuQdO1G1dOOQT1G0_1G0_O!#[Q`O,5<_O#!bQaO'#EYOOQS1G0[1G0[O#!iQ`O,5:zOEdQaO,5:zO#!nQaO,5;OO#!uQdO,5:|O#$tQdO,5?UO#&sQaO'#HmO#'TQ`O,5?TOOQS1G0e1G0eO#']Q`O1G0eO#'bQ`O'#IkO#(zQ`O'#IkO#)SQ`O,5;SOG|QaO,5;SOOQS1G0w1G0wOOQO,5>^,5>^OOQO-E;p-E;pOOQS1G1U1G1UO#)pQdO'#FQO#+uQ`O'#HsOJ}QpO1G1UO2wQ`O'#HpO#+zQtO,5;eO2wQ`O'#HqO#,iQtO,5;gO#-WQaO1G1OOOQS,5;h,5;hO#/gQtO'#FQO#/tQdO1G0dO-RQaO1G0dO#1aQdO1G1aO#2|QdO1G1cOOQO,5X,5>XOOQO-E;k-E;kOOQS7+&P7+&PO!+iQaO,5;TO$$^QaO'#HnO$$hQ`O,5?VOOQS1G0n1G0nO$$pQ`O1G0nPOQO'#FQ'#FQOOQO,5>_,5>_OOQO-E;q-E;qOOQS7+&p7+&pOOQS,5>[,5>[OOQS-E;n-E;nO$$uQtO,5>]OOQS-E;o-E;oO$%dQdO7+&jO$'iQtO'#FQO$'vQdO7+&OOOQS1G0j1G0jOOQO,5>a,5>aOOQO-E;s-E;sOOQ#u7+(x7+(xO!$[QdO7+(xOOQ#u7+(}7+(}O#JfQ`O7+(}O#JkQ`O7+(}OOQ#u7+(z7+(zO!.]Q`O7+(zO!1TQ`O7+(zO!1QQ`O7+(zO$)cQ`O,5i,5>iOOQS-E;{-E;{O$.lQdO7+'qO$.|QpO7+'qO$/XQdO'#IxOOQO,5pOOQ#u,5>p,5>pOOQ#u-EoOOQS-EVQdO1G2^OOQS,5>h,5>hOOQS-E;z-E;zOOQ#u7+({7+({O$?oQ`O'#GXO:]Q`O'#H_OOQO'#IV'#IVO$@fQ`O,5=xOOQ#u,5=x,5=xO$AcQ!bO'#EQO$AzQ!bO7+(}O$BYQpO7+)RO#KRQpO7+)RO$BbQ`O'#HbO!$[QdO7+)RO$BpQdO,5>rOOQS-EVOOQS-E;i-E;iO$D{QdO<Z,5>ZOOQO-E;m-E;mOOQS1G1_1G1_O$8rQaO,5:uO$G}QaO'#HlO$H[Q`O,5?QOOQS1G0`1G0`OOQS7+&Q7+&QO$HdQ`O7+&UO$IyQ`O1G0oO$K`Q`O,5>YOOQO,5>Y,5>YOOQO-E;l-E;lOOQS7+&Y7+&YOOQS7+&U7+&UOOQ#u<c,5>cOOQO-E;u-E;uOOQS<lOOQ#u-EmOOQO-EW,5>WOOQO-E;j-E;jO!+iQaO,5;UOOQ#uANBTANBTO#JfQ`OANBTOOQ#uANBQANBQO!.]Q`OANBQO!+iQaO7+'hOOQO7+'l7+'lO%-bQ`O7+'hO%.wQ`O7+'hO%/SQ`O7+'lO!+iQaO7+'mOOQO7+'m7+'mO%/XQ`O'#F}OOQO'#Hv'#HvO%/dQ`O,5e,5>eOOQS-E;w-E;wOOQO1G2_1G2_O$1YQdO1G2_O$/jQpO1G2_O#JkQ`O1G2]O!.mQdO1G2aO%$dQ!bO1G2]O!$[QdO1G2]OOQO1G2a1G2aOOQO1G2]1G2]O%2oQaO'#G]OOQO1G2b1G2bOOQSAN@xAN@xO!.]Q`OAN@xOOOQ<]O%6lQ!bO'#FQO!$[QdOANBXOOQ#uANBXANBXO:]Q`O,5=}O%7QQ`O,5=}O%7]Q`O'#IXO%7qQ`O,5?rOOQS1G3h1G3hOOQS7+)x7+)xP%+OQpOANBXO%7yQ`O1G0pOOQ#uG27oG27oOOQ#uG27lG27lO%9`Q`O<d,5>dO%dOOQO-E;v-E;vO%bQ`O'#IqO%>lQ`O'#IhO!$[QdO'#IOO%@fQaO,5s,5>sOOQO-Ej,5>jOOQP-E;|-E;|OOQO1G2c1G2cOOQ#uLD,kLD,kOOQTG27[G27[O!$[QdOLD-RO!$[QdO<OO%EjQ`O,5>OPOQ#uLD-_LD-_OOQO7+'o7+'oO+_QdO7+'oOOQS!$( ]!$( ]OOQOAN@}AN@}OOQS1G2d1G2dOOQS1G2e1G2eO%EuQdO1G2eOOQ#u!$(!m!$(!mOOQOANBVANBVOOQO1G3j1G3jO:]Q`O1G3jOOQO<nQaO,5:xO'/pQaO,5;uO'/pQaO,5;wO'@mQdO,5SQdO,5<^O)@RQdO,5SQaO'#HkO*>^Q`O,5?ROfQdO7+%tO*@eQ`O1G0jO!+iQaO1G0jO*AzQdO7+&OOoO*G_Q`O,5>VO*HtQdO<|Q`O1G1dO+@cQ`O1G1dO+AxQ`O1G1dO+C_Q`O1G1dO+DtQ`O1G1dO+FZQ`O1G1dO+GpQ`O1G1dO+IVQ`O1G1dO+JlQ`O1G1dO+LRQ`O1G1dO+MhQ`O1G1dO+N}Q`O1G1dO,!dQ`O1G1dO,#yQ`O1G1dO,%`Q`O1G1dO,&uQ`O1G0dO!+iQaO1G0dO,([Q`O1G1aO,)qQ`O1G1cO,+WQ`O1G2VO$8rQaO,5UQdO,5uQdO'#IjO.B[Q`O'#IeO.BiQ`O'#GPO.BqQaO,5:nO.BxQ`O,5uOs#fOx7xOy7xO}aO!O^O!Q8OO!R}O!T7}O!V7yO!W7yO!Z8QO!d:QO!z]O#T#mO#V#lO#X`O#dhO#fbO#gcO#sdO$[7|O$d7{O$e7|O$hqO%T8PO%U!OO%W}O%X}O%`|O'WYO'u{O#Y']P~O#O#qO~P/lO!z#rO~O#d#tO#fbO#gcO~O'a#vO~O#s#zO~OU$OO!R$OO!w#}O#s3hO'W#{O~OT'XXz'XX!S'XX!c'XX!n'XX!w'XX!z'XX#T'XX#X'XX#a'XX#b'XX#y'XX$R'XX$S'XX$T'XX$U'XX$V'XX$X'XX$Y'XX$Z'XX$['XX$]'XX$^'XX$_'XX%T'XX'P'XX!y'XX!o'XX~O#|$QO$O$RO~P3YOP7wOQ|OU_OW}O[7zOo>uOs#fOx7xOy7xO}aO!O^O!Q8OO!R}O!T7}O!V7yO!W7yO!Z8QO!d:QO!z]O#X`O#dhO#fbO#gcO#sdO$[7|O$d7{O$e7|O$hqO%T8PO%U!OO%W}O%X}O%`|O'WYO'u{OT$PXz$PX!S$PX!c$PX!n$PX!w$PX#a$PX#b$PX#y$PX$R$PX$S$PX$T$PX$U$PX$V$PX$X$PX$Y$PX$Z$PX$]$PX$^$PX$_$PX'P$PX!y$PX!o$PX~Or$TO#T8eO#V8dO~P5^O#sdO'WYO~OS$fO]$aOk$dOm$fOs$`O!a$bO$krO$u$eO~O!z$hO#T$jO'W$gO~Oo$mOs$lO#d$nO~O!z$hO#T$rO~O!U$uO$u$tO~P-ROR${O!p$zO#d$yO#g$zO&}${O~O't$}O~P;PO!z%SO~O!z%UO~O!n#bO'P#bO~P-RO!pXO~O!z%`O~OP7wOQ|OU_OW}O[7zOo>uOs#fOx7xOy7xO}aO!O^O!Q8OO!R}O!T7}O!V7yO!W7yO!Z8QO!d:QO!z]O#X`O#dhO#fbO#gcO#sdO$[7|O$d7{O$e7|O$hqO%T8PO%U!OO%W}O%X}O%`|O'WYO'u{O~O!z%dO~O]$aO~O!pXO#sdO'WYO~O]%rOs%rO#s%nO'WYO~O!j%wO'Q%wO'TRO~O'Q%zO~PhO!o%{O~PhO!r%}O~PvO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y'cX#O'cX~P!%aO!r)yO!y'eX#O'eX~P)dO!y#kX#O#kX~P!+iO#O){O!y'bX~O!y)}O~O%T#cOT$Qiz$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi$^$Qi$_$Qi'P$Qi!y$Qi#O$Qi#P$Qi#Y$Qi!o$Qi!r$QiV$Qi#|$Qi$O$Qi!p$Qi~P!%aOz#QO#T#PO$R#RO$S#VO$T#WO$U#XO$V#YO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO!w!yO#T#PO$R#RO$S#VO$T#WO$U#XO$V#YO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi'P$Qi!y$Qi!o$Qi~P!%aOT#SOz#QO!c#UO!w!yO#T#PO$R#RO$S#VO$T#WO$U#XO$V#YO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cO!S$Qi!n$Qi'P$Qi!y$Qi!o$Qi~P!%aOT#SOz#QO!w!yO#T#PO$R#RO$S#VO$T#WO$U#XO$V#YO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cO!S$Qi!c$Qi!n$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO#T#PO$T#WO$U#XO$V#YO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi$R$Qi$S$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO#T#PO$U#XO$V#YO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi$R$Qi$S$Qi$T$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO#T#PO$V#YO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi$R$Qi$S$Qi$T$Qi$U$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO#T#PO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO$[#_O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$]$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO$Z#^O$[#_O$^#aO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$]$Qi'P$Qi!y$Qi!o$Qi~P!%aOz#QO$_#aO%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi$^$Qi'P$Qi!y$Qi!o$Qi~P!%aO_*PO~PxO$hqO$krO~P2wO#X+|O#a+{O#b+{O~O#d,OO%W,OO%^+}O'W$gO~O!o,PO~PCVOc%bXd%bXh%bXj%bXf%bXg%bXe%bX~PhOc,TOd,ROP%aiQ%aiS%aiU%aiW%aiX%ai[%ai]%ai^%ai`%aia%aib%aik%aim%aio%aip%aiq%ais%ait%aiu%aiv%aix%aiy%ai|%ai}%ai!O%ai!P%ai!Q%ai!R%ai!T%ai!V%ai!W%ai!X%ai!Y%ai!Z%ai![%ai!]%ai!^%ai!_%ai!a%ai!b%ai!d%ai!n%ai!p%ai!z%ai#X%ai#d%ai#f%ai#g%ai#s%ai$[%ai$d%ai$e%ai$h%ai$k%ai$u%ai%T%ai%U%ai%W%ai%X%ai%`%ai&|%ai'W%ai'u%ai'Q%ai!o%aih%aij%aif%aig%aiY%ai_%aii%aie%ai~Oc,XOd,UOh,WO~OY,YO_,ZO!o,^O~OY,YO_,ZOi%gX~Oi,`O~Oj,aO~O!n,cO~PxO$hqO$krO~P2wO!p)`O~OU$OO!R$OO!w3nO#s3iO'W,zO~O#s,|O~O!p-OO'a'UO~O#sdO'WYO!n&zX#O&zX'P&zX~O#O)gO!n'ya'P'ya~O#s-UO~O!n&_X#O&_X'P&_X#P&_X~PvO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y#ka#O#ka~P!%aO!y&cX#O&cX~P@aO#O){O!y'ba~O!o-_O~PCVO#P-`O~O#O-aO!o'YX~O!o-cO~O!y-dO~OT8TOz8RO!S8UO!c8VO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO#O#Wi#Y#Wi~P!%aO!y&bX#O&bX~PxO#n'XO~OS+kO].cOm+kOs$`O!U+kO!`+kO!a+kO#d>xO$hqO$krO~P2wOS+kO].cOm+kOs$`O!U+kO!`+kO!a+kO#d>xO$hqO~P2wO!n#bO!p-yO'P#bO~OS+kO]+nOm+kOs$`O!U+kO!_+qO!`+kO!a+kO!o.mO#d>xO$hqO$krO~P2wO#d.rO%W.rO%^+}O'W$gO~O%W.sO~O#Y.tO~Oc%bad%bah%baj%baf%bag%bae%ba~PhOc.wOd,ROP%aqQ%aqS%aqU%aqW%aqX%aq[%aq]%aq^%aq`%aqa%aqb%aqk%aqm%aqo%aqp%aqq%aqs%aqt%aqu%aqv%aqx%aqy%aq|%aq}%aq!O%aq!P%aq!Q%aq!R%aq!T%aq!V%aq!W%aq!X%aq!Y%aq!Z%aq![%aq!]%aq!^%aq!_%aq!a%aq!b%aq!d%aq!n%aq!p%aq!z%aq#X%aq#d%aq#f%aq#g%aq#s%aq$[%aq$d%aq$e%aq$h%aq$k%aq$u%aq%T%aq%U%aq%W%aq%X%aq%`%aq&|%aq'W%aq'u%aq'Q%aq!o%aqh%aqj%aqf%aqg%aqY%aq_%aqi%aqe%aq~Oc.|Od,UOh.{O~O!r(hO~OP7wOQ|OU_OW}O[xO$hqO$krO~P2wOS+kOY,vO]+nOm+kOs$`O!U+kO!_+qO!`+kO!a+kO!o/fO#d>xO$hqO$krO~P2wOw!tX!p!tX#T!tX#n!tX#s#vX#|!tX'W!tX~Ow(ZO!p)`O#T3tO#n3sO~O!p-OO'a&fa~O]/nOs/nO#sdO'WYO~OV/rO!n&za#O&za'P&za~O#O)gO!n'yi'P'yi~O#s/tO~OT8TOz8RO!S8UO!c8VO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO!n&_a#O&_a'P&_a#P&_a~P!%aOz#QO#T#PO$R#RO$S#VO$T#WO$U#XO$V#YO$X#[O$Y#]O$Z#^O$[#_O$]#`O$^#aO$_#aO%T#cOT!vy!S!vy!c!vy!n!vy!w!vy'P!vy!y!vy!o!vy~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y#ji#O#ji~P!%aO_*PO!o&`X#O&`X~PvO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y#]i#O#]i~P!%aOT8TOz8RO!S8UO!c8VO!w:_O#P/yO#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO!y&ba#O&ba~P!%aO#|0OO!y$ji#O$ji~O#d0PO~O#V0SO#d0RO~P2wOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$ji#O$ji~P!%aO!p-yO#|0TO!y$oi#O$oi~O!o0YO'W$gO~O#O0[O!y'kX~O#d0^O~O!y0_O~O!pXO!r0bO~O#T'ZO#n'XO!p'qy!n'qy'P'qy~O!n$sy'P$sy!y$sy!o$sy~PCVO#P0eO#T'ZO#n'XO~O#sdO'WYOw&mX!p&mX#O&mX!n&mX'P&mX~O#O.^Ow'la!p'la!n'la'P'la~OS+kO]0mOm+kOs$`O!U+kO!`+kO!a+kO#d>xO$hqO~P2wO#T3tO#n3sO'W$gO~O#|)XO#T'eX#n'eX'W'eX~O!n#bO!p0sO'P#bO~O#Y0wO~Oh0|O~OTvO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$jq#O$jq~P!%aO#|1kO!y$jq#O$jq~O#d1lO~O!pXO!z$hO#P1oO~O!o1rO'W$gO~OT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$oq#O$oq~P!%aO#T1tO#d1sO!y&lX#O&lX~O#O0[O!y'ka~O#T'ZO#n'XO!p'q!R!n'q!R'P'q!R~O!pXO!r1yO~O!n$s!R'P$s!R!y$s!R!o$s!R~PCVO#P1{O#T'ZO#n'XO~OP7wOU_O[:rOo?tOs#fOx:rOy:rO}aO!O^O!QvO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y#^i#O#^i~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$jy#O$jy~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$oy#O$oy~P!%aO!pXO#P2rO~O#d2sO~O#O0[O!y'ki~O!n$s!Z'P$s!Z!y$s!Z!o$s!Z~PCVOTvO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$j!R#O$j!R~P!%aO!n$s!c'P$s!c!y$s!c!o$s!c~PCVO!a3`O'W$gO~OV3dO!o&Wa#O&Wa~O'W$gO!n%Ri'P%Ri~O'a'_O~O'a/jO~O'a*iO~O'a1]O~OT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$ta#|$ta$O$ta'P$ta!y$ta!o$ta#O$ta~P!%aO#T3uO~P-RO#s3lO~O#s3mO~O!U$uO$u$tO~P#-WOT8TOz8RO!S8UO!c8VO!w:_O#P3pO#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO!n'^X'P'^X!y'^X!o'^X~P!%aOT6QOz6OO!S6RO!c6SO!w7oO#P5aO#T#PO$R6PO$S6TO$T6UO$U6VO$V6WO$X6YO$Y6ZO$Z6[O$[6]O$]6^O$^6_O$_6_O%T#cO#O'^X#Y'^X#|'^X$O'^X!n'^X'P'^X!r'^X!y'^X!o'^XV'^X!p'^X~P!%aO#T5OO~P#-WOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$`a#|$`a$O$`a'P$`a!y$`a!o$`a#O$`a~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$aa#|$aa$O$aa'P$aa!y$aa!o$aa#O$aa~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$ba#|$ba$O$ba'P$ba!y$ba!o$ba#O$ba~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$ca#|$ca$O$ca'P$ca!y$ca!o$ca#O$ca~P!%aOz3{O#|$ca$O$ca#O$ca~PMVOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$fa#|$fa$O$fa'P$fa!y$fa!o$fa#O$fa~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n%Va#|%Va$O%Va'P%Va!y%Va!o%Va#O%Va~P!%aOz3{O#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#|$Qi$O$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi#|$Qi$O$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOT3}Oz3{O!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!S$Qi!n$Qi#|$Qi$O$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOT3}Oz3{O!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!S$Qi!c$Qi!n$Qi#|$Qi$O$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O#T#PO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#|$Qi$O$Qi$R$Qi$S$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O#T#PO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O#T#PO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O#T#PO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O$[4YO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$]$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O$Z4XO$[4YO$^4[O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$]$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOz3{O$_4[O%T#cOT$Qi!S$Qi!c$Qi!n$Qi!w$Qi#T$Qi#|$Qi$O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi$^$Qi'P$Qi!y$Qi!o$Qi#O$Qi~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n#Ua#|#Ua$O#Ua'P#Ua!y#Ua!o#Ua#O#Ua~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n'^a#|'^a$O'^a'P'^a!y'^a!o'^a#O'^a~P!%aOz3{O!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT#Qi!S#Qi!c#Qi!n#Qi#|#Qi$O#Qi'P#Qi!y#Qi!o#Qi#O#Qi~P!%aOz3{O!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT#}i!S#}i!c#}i!n#}i#|#}i$O#}i'P#}i!y#}i!o#}i#O#}i~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$Pi#|$Pi$O$Pi'P$Pi!y$Pi!o$Pi#O$Pi~P!%aOz3{O#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT!vq!S!vq!c!vq!n!vq!w!vq#|!vq$O!vq'P!vq!y!vq!o!vq#O!vq~P!%aOz3{O!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT#Qq!S#Qq!c#Qq!n#Qq#|#Qq$O#Qq'P#Qq!y#Qq!o#Qq#O#Qq~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$sq#|$sq$O$sq'P$sq!y$sq!o$sq#O$sq~P!%aOz3{O#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cOT!vy!S!vy!c!vy!n!vy!w!vy#|!vy$O!vy'P!vy!y!vy!o!vy#O!vy~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$sy#|$sy$O$sy'P$sy!y$sy!o$sy#O$sy~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$s!R#|$s!R$O$s!R'P$s!R!y$s!R!o$s!R#O$s!R~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$s!Z#|$s!Z$O$s!Z'P$s!Z!y$s!Z!o$s!Z#O$s!Z~P!%aOT3}Oz3{O!S4OO!c4PO!w5rO#T#PO$R3|O$S4QO$T4RO$U4SO$V4TO$X4VO$Y4WO$Z4XO$[4YO$]4ZO$^4[O$_4[O%T#cO!n$s!c#|$s!c$O$s!c'P$s!c!y$s!c!o$s!c#O$s!c~P!%aOP7wOU_O[5kOo9xOs#fOx5gOy5gO}aO!O^O!Q5{O!T5qO!V5iO!W5iO!Z5}O!d5eO!z]O#T5bO#X`O#dhO#fbO#gcO#sdO$[5oO$d5mO$e5oO$hqO%T5|O%U!OO'WYO~P$vO#O9_O#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y'xX~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#O9aO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y'ZX~P!%aOz8RO#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#Y$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi#O$Qi#P$Qi#Y$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOT8TOz8RO!c8VO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO!S$Qi#O$Qi#P$Qi#Y$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOT8TOz8RO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO!S$Qi!c$Qi#O$Qi#P$Qi#Y$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO#T#PO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#Y$Qi$R$Qi$S$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO#T#PO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#Y$Qi$R$Qi$S$Qi$T$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO#T#PO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO#T#PO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#T$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#T$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#T$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO$[8`O$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#T$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$]$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#T$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO$Z8_O$[8`O$^8bO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#T$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$]$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aOz8RO$_8bO%T#cOT$Qi!S$Qi!c$Qi!w$Qi#O$Qi#P$Qi#T$Qi#Y$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi$^$Qi!n$Qi'P$Qi!r$Qi!y$Qi!o$QiV$Qi!p$Qi~P!%aO#T9fO~P!+iO!n#Ua'P#Ua!y#Ua!o#Ua~PCVO!n'^a'P'^a!y'^a!o'^a~PCVO#T=PO#V=OO!y&aX#O&aX~PvO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y#Wi#O#Wi~P!%aOz8RO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT#Qq!S#Qq!c#Qq#O#Qq#P#Qq#Y#Qq!n#Qq'P#Qq!r#Qq!y#Qq!o#QqV#Qq!p#Qq~P!%aOT8TOz8RO!S8UO!c8VO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO#O$sq#P$sq#Y$sq!n$sq'P$sq!r$sq!y$sq!o$sqV$sq!p$sq~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y&wa#O&wa~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y&_a#O&_a~P!%aOz8RO#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cOT!vy!S!vy!c!vy!w!vy#O!vy#P!vy#Y!vy!n!vy'P!vy!r!vy!y!vy!o!vyV!vy!p!vy~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y#Wq#O#Wq~P!%aOT8TOz8RO!S8UO!c8VO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO#O$sy#P$sy#Y$sy!n$sy'P$sy!r$sy!y$sy!o$syV$sy!p$sy~P!%aOT8TOz8RO!S8UO!c8VO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO#O$s!R#P$s!R#Y$s!R!n$s!R'P$s!R!r$s!R!y$s!R!o$s!RV$s!R!p$s!R~P!%aOT8TOz8RO!S8UO!c8VO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO#O$s!Z#P$s!Z#Y$s!Z!n$s!Z'P$s!Z!r$s!Z!y$s!Z!o$s!ZV$s!Z!p$s!Z~P!%aOT8TOz8RO!S8UO!c8VO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO#O$s!c#P$s!c#Y$s!c!n$s!c'P$s!c!r$s!c!y$s!c!o$s!cV$s!c!p$s!c~P!%aO#T9vO~PvO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$`a#O$`a~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$aa#O$aa~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$ba#O$ba~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$ca#O$ca~P!%aOz:`O%T#cOT$ca!S$ca!c$ca!w$ca!y$ca#O$ca#T$ca$R$ca$S$ca$T$ca$U$ca$V$ca$X$ca$Y$ca$Z$ca$[$ca$]$ca$^$ca$_$ca~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$fa#O$fa~P!%aO!r?SO#P9^O~OT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$ta#O$ta~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y%Va#O%Va~P!%aOT8TOz8RO!S8UO!c8VO!r9cO!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO~P!%aOz:`O#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi~P!%aOz:`O!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!y$Qi#O$Qi~P!%aOT:bOz:`O!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!S$Qi!y$Qi#O$Qi~P!%aOT:bOz:`O!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!S$Qi!c$Qi!y$Qi#O$Qi~P!%aOz:`O#T#PO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi$R$Qi$S$Qi~P!%aOz:`O#T#PO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi$R$Qi$S$Qi$T$Qi~P!%aOz:`O#T#PO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi$R$Qi$S$Qi$T$Qi$U$Qi~P!%aOz:`O#T#PO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi~P!%aOz:`O$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi~P!%aOz:`O$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi~P!%aOz:`O$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi~P!%aOz:`O$[:mO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$]$Qi~P!%aOz:`O$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi~P!%aOz:`O$Z:lO$[:mO$^:oO$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$]$Qi~P!%aOz:`O$_:oO%T#cOT$Qi!S$Qi!c$Qi!w$Qi!y$Qi#O$Qi#T$Qi$R$Qi$S$Qi$T$Qi$U$Qi$V$Qi$X$Qi$Y$Qi$Z$Qi$[$Qi$]$Qi$^$Qi~P!%aOz:`O!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT#Qi!S#Qi!c#Qi!y#Qi#O#Qi~P!%aOz:`O!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT#}i!S#}i!c#}i!y#}i#O#}i~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$Pi#O$Pi~P!%aO!r?TO#P9hO~Oz:`O#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT!vq!S!vq!c!vq!w!vq!y!vq#O!vq~P!%aOz:`O!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT#Qq!S#Qq!c#Qq!y#Qq#O#Qq~P!%aO!r?YO#P9oO~OT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$sq#O$sq~P!%aO#P9oO#T'ZO#n'XO~Oz:`O#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cOT!vy!S!vy!c!vy!w!vy!y!vy#O!vy~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$sy#O$sy~P!%aO#P9pO#T'ZO#n'XO~OT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$s!R#O$s!R~P!%aO#P9sO#T'ZO#n'XO~OT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$s!Z#O$s!Z~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y$s!c#O$s!c~P!%aO#T;}O~P!+iOT8TOz8RO!S8UO!c8VO!w:_O#P;|O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO!y'^X#O'^X~P!%aO!U$uO$u$tO~P$8rOP7wOU_O[:rOo?tOs#fOx:rOy:rO}aO!O^O!QVO~P$8rOP7wOU_O[:rOo?tOs#fOx:rOy:rO}aO!O^O!QWO#X`O#dhO#fbO#gcO#sdO$[vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y#Ua#O#Ua~P!%aOT:bOz:`O!S:cO!c:dO!w>vO#T#PO$R:aO$S:eO$T:fO$U:gO$V:hO$X:jO$Y:kO$Z:lO$[:mO$]:nO$^:oO$_:oO%T#cO!y'^a#O'^a~P!%aOz<]O!w?^O#T#PO$R<_O$SpO~P$8rOP7wOU_O[:rOo?tOs#fOx:rOy:rO}aO!O^O!QqO#X`O#dhO#fbO#gcO#sdO$[oO#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO~P!%aOT8TOz8RO!S8UO!c8VO!w:_O#P>nO#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO!n'^X!r'^X!o'^X#O'^X!p'^X'P'^X~P!%aOT'XXz'XX!S'XX!c'XX!w'XX!z'XX#O'XX#T'XX#X'XX#a'XX#b'XX#y'XX$R'XX$S'XX$T'XX$U'XX$V'XX$X'XX$Y'XX$Z'XX$['XX$]'XX$^'XX$_'XX%T'XX~O#|:uO$O:vO!y'XX~P.@kO!z$hO#T>zO~O!r;SO~PxO!n&qX!p&qX#O&qX'P&qX~O#O?QO!n'pa!p'pa'P'pa~O!r?rO#P;uO~OT[O~O!r?zO#P:rO~OT8TOz8RO!S8UO!c8VO!r>]O!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO~P!%aOT8TOz8RO!S8UO!c8VO!r>^O!w:_O#T#PO$R8SO$S8WO$T8XO$U8YO$V8ZO$X8]O$Y8^O$Z8_O$[8`O$]8aO$^8bO$_8bO%T#cO~P!%aO!r?{O#P>cO~O!r?|O#P>hO~O#P>hO#T'ZO#n'XO~O#P:rO#T'ZO#n'XO~O#P>iO#T'ZO#n'XO~O#P>lO#T'ZO#n'XO~O!z$hO#T?nO~Oo>wOs$lO~O!z$hO#T?oO~O#O?QO!n'pX!p'pX'P'pX~O!z$hO#T?vO~O!z$hO#T?wO~O!z$hO#T?xO~Oo?lOs$lO~Oo?uOs$lO~Oo?tOs$lO~O%X$]%W$k!e$^#d%`#g'u'W#f~",goto:"%0{'{PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP'|P(TPP(Z(^PPP(vP(^*o(^6cP6cPP>cFxF{PP6cGR! RP! UP! UPPGR! e! h! lGRGRPP! oP! rPPGR!)u!0q!0qGR!0uP!0u!0u!0u!2PP!;g!S#>Y#>h#>n#>x#?O#?U#?[#?b#?l#?v#?|#@S#@^PPPPPPPP#@d#@hP#A^$(h$(k$(u$1R$1_$1t$1zP$1}$2Q$2W$5[$?Y$Gr$Gu$G{$HO$K_$Kb$Kk$Ks$K}$Lf$L|$Mw%'zPP%/{%0P%0]%0r%0xQ!nQT!qV!rQUOR%x!mRVO}!hPVX!S!j!r!s!w%O%Q%T%V(h,Q,T.u.w/P0}1O1W2]|!hPVX!S!j!r!s!w%O%Q%T%V(h,Q,T.u.w/P0}1O1W2]Q%_!ZQ%h!aQ%m!eQ'k$cQ'x$iQ)d%lQ+W'{Q,k)QU.O+T+V+]Q.j+pQ/`,jS0a.T.UQ0q.dQ1n0VS1w0`0dQ2Q0nQ2q1pQ2t1xR3[2u|ZPVX!S!j!r!s!w%O%Q%T%V(h,Q,T.u.w/P0}1O1W2]2lf]`cgjklmnoprxyz!W!X!Y!]!e!f!g!y!z#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r#}$Q$R$T$h$z%S%U%d%r%}&S&W&[&q&t&u&x'P'X'Z']'a'e'p't'y(R(V(W(Y(Z([(t)T)X)`)c)g)n)u)y*V*Z*[*r*w*|+Q+X+[+^+_+j+m+q+t,Y,c,e,g,i,u,x-O-`-a-t-v-z.S.V.[.].^.b/X/n/y0O0T0b0e1R1S1b1k1o1y1{2k2r3n3p3s3t3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7i7j7k7o7w7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v9|9}:O:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?S?T?Y?^?_?p?q?r?y?z?{?|S$ku$`Q%W!V^%e!_$a'j)Y.f0o2OQ%i!bQ%j!cQ%k!dQ%v!kS&V!|){Q&]#OQ'l$dQ'm$eS'|$j'hQ)S%`Q*v'nQ+z(bQ,O(dQ-S)iU.g+n.c0mQ.q+{Q.r+|Q/d,vS0V-y0XQ1X/cQ1e/rS2T0s2WQ2h1`Q3U2iQ3^2zQ3_2{Q3c3VQ3f3`R3g3d0{!OPVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_0z!OPVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_Q#h^Q%O!PQ%P!QQ%Q!RQ,b(sQ.u,RR.y,UR&r#hQ*Q&qR/w-a0{hPVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_R#j_k#n`j#i#q&t&x5d5e9W:Q:R:S:TR#saT&}#r'PR-h*[R&R!{0zhPVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_R#tb-x!}[#e#k#u$U$V$W$X$Y$Z$v$w%X%Z%]%a%s%|&O&U&_&`&a&b&c&d&e&f&g&h&i&j&k&l&m&n&v&w&|'`'b'c(e(x)v)x)z*O*U*h*j+a+d,n,q-W-Y-[-e-f-g-w.Y/O/[/v0Q0Z0f1g1j1m1z2S2`2o2p2v3Z4]4^4d4e4f4g4h4i4j4l4m4n4o4p4q4r4s4t4u4v4w4x4y4z4{4|4}5P5Q5T5U5W5X5Y5]5^5`5t6e6f6g6h6i6j6k6m6n6o6p6q6r6s6t6u6v6w6x6y6z6{6|6}7O7Q7R7U7V7X7Y7Z7^7_7a7m7q8i8j8k8l8m8n8p8q8r8t8u8v8w8x8y8z8{8|8}9O9P9Q9R9S9U9V9Y9[9]9d9e9g9i9j9k9l9m9n9q9r9t9w:p:x:y:z:{:|:};Q;R;T;U;V;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;g;l;m;p;r;s;w;y;{O>P>Q>R>S>T>U>X>Y>Z>_>`>a>b>d>e>f>g>j>k>m>r>s>{>|>}?V?b?cQ'd$[Y(X$s8o;P=^=_S(]3o7lQ(`$tR+y(aT&X!|){#a$Pg#}$h'X'Z'p't'y(W([)`)c*r*w+Q+X+[+_+j+m+n+t,i,u,x-v.S.V.].b.c0b0m1y3n3s3t7i7j7k7w9|9}:O?S?T?Y?p?q?r?y?z?{?|3yfPVX]`cgjklmnoprxyz!S!W!X!Y!]!e!f!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r#}$Q$R$T$h$z%O%Q%S%T%U%V%d%r%}&S&W&[&q&t&u&x'P'X'Z']'a'e'p't'y(R(V(W(Y(Z([(h(t)T)X)`)c)g)n)u)y){*V*Z*[*r*w*|+Q+X+[+^+_+j+m+n+q+t,Q,T,Y,c,e,g,i,u,x-O-`-a-t-v-z.S.V.[.].^.b.c.u.w/P/X/n/y0O0T0b0e0m0s0}1O1R1S1W1b1k1o1y1{2W2]2k2r3n3p3s3t3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7i7j7k7o7w7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v9|9}:O:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?S?T?Y?^?_?p?q?r?y?z?{?|[#wd#x3h3i3j3kh'V#z'W)f,}-U/k/u1f3l3m3q3rQ)e%nR-T)kY#yd%n)k3h3iV'T#x3j3k1dePVX]`cjklmnoprxyz!S!W!X!Y!]!e!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a'e(R(V(Y(Z(h(t)T)X)g)n)u)y){*V*Z*[*|+^+q,Q,T,Y,c,e,g-O-`-a-t-z.[.^.u.w/P/X/n/y0O0T0e0s0}1O1R1S1W1b1k1o1{2W2]2k2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_Q%o!fQ)l%r#O3vg#}$h'X'Z'p't'y(W([)`*w+Q+X+[+_+j+m+t,i,u,x-v.S.V.].b0b1y7i7j7k7w9|9}:O?S?T?Y?p?q?r?y?z?{?|a3w)c*r+n.c0m3n3s3tY'T#z)f-U3l3mZ*c'W,}/u3q3r0vhPVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g-`-a-t-z.[.u.w/P/X/y0O0T0e0}1O1R1S1W1k1o1{2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_T2U0s2WR&^#OR&]#O!r#Z[#e#u$U$V$W$X$Z$s$w%X%Z%]&`&a&b&c&d&e&f&g'`'b'c(e)v)x*O*j+d-Y.Y0f1z2`2p2v3Z9U9V!Y4U3o4d4e4f4g4i4j4l4m4n4o4p4q4r4s4{4|4}5P5Q5T5U5W5X5Y5]5^5`!^6X4^6e6f6g6h6j6k6m6n6o6p6q6r6s6t6|6}7O7Q7R7U7V7X7Y7Z7^7_7a7l7m#b8[#k%a%s%|&O&v&w&|(x*U+a,n,q-W-e-g/[4]5t7q8i8j8k8l8n8o8p8t8u8v8w8x8y8z8{9Y9[9]9d9g9i9l9n9q9r9t9w:p;Rr>s>{?b?c!|:i&U)z-[-f-w0Q0Z1g1j1m2o8q8r9e9j9k9m:x:y:z:{:};P;Q;T;U;V;W;X;Y;Z;[;d;f;g;l;m;p;r;s;w;y;{>R>S!`T>X>Z>_>a>d>e>g>j>k>m>|>}?VoU>Y>`>b>fS$iu#fQ$qwU'{$j$l&pQ'}$kS(P$m$rQ+Z'|Q+](OQ+`(QQ1p0VQ5s7dS5v7f7gQ5w7hQ7p9xS7r9y9zQ7s9{Q;O>uS;h>w>zQ;o?PQ>y?jS?O?l?nQ?U?oQ?`?sS?a?t?wS?d?u?vR?e?xT'u$h+Q!csPVXt!S!j!r!s!w$h%O%Q%T%V'p([(h)`+Q+j+t,Q,T,u,x.u.w/P0}1O1W2]Q$]rR*l'eQ-{+PQ.i+oQ0U-xQ0j.`Q1|0kR2w1}T0W-y0XQ+V'zQ.U+YR0d.XQ(_$tQ)^%iQ)s%vQ*u'mS+x(`(aQ-q*vR.p+yQ(^$tQ)b%kQ)r%vQ*q'lS*t'm)sU+w(_(`(aS-p*u*vS.o+x+yQ/i,{Q/{-nQ/}-qR0v.pQ(]$tQ)]%iQ)_%jQ)q%vU*s'm)r)sW+v(^(_(`(aQ,t)^U-o*t*u*vU.n+w+x+yS/|-p-qS0u.o.pQ1i/}R2Y0vX+r([)`+t,xb%f!_$a'j+n.c.f0m0o2OR,r)YQ$ovS+b(S?Qg?m([)`+i+j+m+t,u,x.a.b0lR0t.kT2V0s2W0}|PVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g,m-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_T$y{$|Q,O(dR.r+|T${{$|Q(j%OQ(r%QQ(w%TQ(z%VQ.},XQ0z.yQ0{.|R2c1WR(m%PX,[(k(l,],_R(n%PX(p%Q%T%V1WR%T!T_%b!]%S(t,c,e/X1RR%V!UR/],gR,j)PQ)a%kS*p'l)bS-m*q,{S/z-n/iR1h/{T,w)`,xQ-P)fU/l,|,}-UU1^/k/t/uR2n1fR/o-OR2l1bSSO!mR!oSQ!rVR%y!rQ!jPS!sV!rQ!wX[%u!j!s!w,Q1O2]Q,Q(hQ1O/PR2]0}Q)o%sS-X)o9bR9b8rQ-b*QR/x-bQ&y#oS*X&y9XR9X:tS*]&|&}R-i*]Q)|&YR-^)|!j'Y#|'o*f*z+O+T+e+i.T.W.Z.a/_0`0c0g0l1x2u5x5y5z7e7t7u7v;q;t;x?W?X?Z?f?g?h?iS*e'Y/g]/g,{-n.f0o1[2O!h'[#|'o*z+O+T+e+i.T.W.Z.a/_0`0c0g0l1x2u5x5y5z7e7t7u7v;q;t;x?W?X?Z?f?g?h?iS*g'[/hZ/h,{-n.f0o2OU#xd%n)kU'S#x3j3kQ3j3hR3k3iQ'W#z^*b'W,}/k/u1f3q3rQ,})fQ/u-UQ3q3lR3r3m|tPVX!S!j!r!s!w%O%Q%T%V(h,Q,T.u.w/P0}1O1W2]W$_t'p+j,uS'p$h+QS+j([+tT,u)`,xQ'f$]R*m'fQ0X-yR1q0XQ+R'vR-}+RQ0].PS1u0]1vR1v0^Q._+fR0i._Q+t([R.l+tW+m([)`+t,xS.b+j,uT.e+m.bQ)Z%fR,s)ZQ(T$oS+c(T?RR?R?mQ2W0sR2}2WQ$|{R(f$|Q,S(iR.v,SQ,V(jR.z,VQ,](kQ,_(lT/Q,],_Q)U%aS,o)U9`R9`8qQ)R%_R,l)RQ,x)`R/e,xQ)h%pS-R)h/sR/s-SQ1c/oR2m1cT!uV!rj!iPVX!j!r!s!w(h,Q/P0}1O2]Q%R!SQ(i%OW(p%Q%T%V1WQ.x,TQ0x.uR0y.w|[PVX!S!j!r!s!w%O%Q%T%V(h,Q,T.u.w/P0}1O1W2]Q#e]U#k`#q&xQ#ucQ$UkQ$VlQ$WmQ$XnQ$YoQ$ZpQ$sx^$vy3y5|8P:]n>oQ+a(RQ+d(VQ,n)TQ,q)XQ-W)nQ-Y)uQ-[)yQ-e*VQ-f*ZQ-g*[^-k3u5b7c9v;}>p>qQ-w*|Q.Y+^Q/O,YQ/[,gQ/v-`Q0Q-tQ0Z-zQ0f.[Q1g/yQ1j0OQ1m0TQ1z0eU2S0s2W:rQ2`1SQ2o1kQ2p1oQ2v1{Q3Z2rQ3o3xQ4]jQ4^5eQ4d5fQ4e5hQ4f5jQ4g5lQ4h5nQ4i5pQ4j3zQ4l3|Q4m3}Q4n4OQ4o4PQ4p4QQ4q4RQ4r4SQ4s4TQ4t4UQ4u4VQ4v4WQ4w4XQ4x4YQ4y4ZQ4z4[Q4{4_Q4|4`Q4}4aQ5P4bQ5Q4cQ5T4kQ5U5OQ5W5RQ5X5SQ5Y5VQ5]5ZQ5^5[Q5`5_Q5t5rQ6e5gQ6f5iQ6g5kQ6h5mQ6i5oQ6j5qQ6k5}Q6m6PQ6n6QQ6o6RQ6p6SQ6q6TQ6r6UQ6s6VQ6t6WQ6u6XQ6v6YQ6w6ZQ6x6[Q6y6]Q6z6^Q6{6_Q6|6`Q6}6aQ7O6bQ7Q6cQ7R6dQ7U6lQ7V7PQ7X7SQ7Y7TQ7Z7WQ7^7[Q7_7]Q7a7`Q7l5{Q7m5dQ7q7oQ8i7xQ8j7yQ8k7zQ8l7{Q8m7|Q8n7}Q8o8OQ8p8QU8q,c/X1RQ8r%dQ8t8SQ8u8TQ8v8UQ8w8VQ8x8WQ8y8XQ8z8YQ8{8ZQ8|8[Q8}8]Q9O8^Q9P8_Q9Q8`Q9R8aQ9S8bQ9U8dQ9V8eQ9Y8fQ9[8gQ9]8hQ9d8sQ9e9TQ9g9ZQ9i9^Q9j9_Q9k9aQ9l9cQ9m9fQ9n9hQ9q9oQ9r9pQ9t9sQ9w:QU:p#i&t9WQ:x:UQ:y:VQ:z:WQ:{:XQ:|:YQ:}:ZQ;P:[Q;Q:^Q;R:_Q;T:aQ;U:bQ;V:cQ;W:dQ;X:eQ;Y:fQ;Z:gQ;[:hQ;]:iQ;^:jQ;_:kQ;`:lQ;a:mQ;b:nQ;c:oQ;d:uQ;f:vQ;g:wQ;l;SQ;m;eQ;p;jQ;r;kQ;s;nQ;w;uQ;y;vQ;{;zQOP<{Q>Q<|Q>R=OQ>S=PQ>T=QQ>U=RQ>X=SQ>Y=TQ>Z=UQ>_=aQ>`=bQ>a>VQ>b>WQ>d>[Q>e>]Q>f>^Q>g>cQ>j>hQ>k>iQ>m>lQ>r:SQ>s:RQ>{>vQ>|:qQ>}:sQ?V;iQ?b?^R?c?_R*R&qQ%t!gQ)W%dT*P&q-a$WiPVX]cklmnopxyz!S!W!X!Y!j!r!s!w#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a$Q$R$T$z%O%Q%T%V%}&S&['a(V(h)u+^,Q,T.[.u.w/P0e0}1O1S1W1o1{2]2r3p3u8d8e!t5c']3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5f5h5j5l5n5p7b7c!x7n5a5b5d5e5g5i5k5m5o5q5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`$`:P`j!]!g!y!z#i#l#m#q#r%S%U&q&t&u&x'P(R(t)T)X)n*V*[,e,g-a5r7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8f8g8h8s9W9Z9^9c9h9o9p9s9u9v:Q:R:S:T:_>v?^?_#l>t!|%d&W)y){*Z*|,c-t-z/X/y0O0T1R1k9T9_9a9f:U:V:W:X:Y:Z:[:]:^:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:u:v:w;S;e;j;k;n;u;v;z;|;}=O=P!x?[,Y-`:q:s;iV>[>]>c>h>i>l>n>p!]?]0s2W:rW>^>o>qQ#p`Q&s#iQ&{#qR*T&tS#o`#q^$Sj5d5e:Q:R:S:TS*W&x9WT:t#i&tQ'O#rR*_'PR&T!{R&Z!|Q&Y!|R-]){Q#|gS'^#}3nS'o$h+QS*d'X3sU*f'Z*w-vQ*z'pQ+O'tQ+T'yQ+e(WW+i([)`+t,xQ,{)cQ-n*rQ.T+XQ.W+[Q.Z+_U.a+j+m,uQ.f+nQ/_,iQ0`.SQ0c.VQ0g.]Q0l.bQ0o.cQ1[3tQ1x0bQ2O0mQ2u1yQ5x7iQ5y7jQ5z7kQ7e7wQ7t9|Q7u9}Q7v:OQ;q?SQ;t?TQ;x?YQ?W?pQ?X?qQ?Z?rQ?f?yQ?g?zQ?h?{R?i?|0z!OPVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_#`$Og#}$h'X'Z'p't'y(W([)`)c*r*w+Q+X+[+_+j+m+n+t,i,u,x-v.S.V.].b.c0b0m1y3n3s3t7i7j7k7w9|9}:O?S?T?Y?p?q?r?y?z?{?|S$[r'eQ%l!eS%p!f%rU+f(Y(Z+qQ-Q)gQ/m-OQ0h.^Q1a/nQ2j1bR3W2k|vPVX!S!j!r!s!w%O%Q%T%V(h,Q,T.u.w/P0}1O1W2]#Y#g]cklmnopxyz!W!X!Y#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a$Q$R$T$z%}&S&['a(V)u+^.[0e1S1o1{2r3p3u8d8e`+k([)`+j+m+t,u,x.b!t8c']3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5f5h5j5l5n5p7b7c!x<}5a5b5d5e5g5i5k5m5o5q5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`$`?k`j!]!g!y!z#i#l#m#q#r%S%U&q&t&u&x'P(R(t)T)X)n*V*[,e,g-a5r7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8f8g8h8s9W9Z9^9c9h9o9p9s9u9v:Q:R:S:T:_>v?^?_#l?}!|%d&W)y){*Z*|,c-t-z/X/y0O0T1R1k9T9_9a9f:U:V:W:X:Y:Z:[:]:^:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:u:v:w;S;e;j;k;n;u;v;z;|;}=O=P!x@O,Y-`:q:s;iV>[>]>c>h>i>l>n>p!]@P0s2W:rW>^>o>qR'w$hQ'v$hR-|+QR$^rQ#d[Q%Y!WQ%[!XQ%^!YQ(U$pQ({%WQ(|%XQ(}%ZQ)O%]Q)V%cQ)[%gQ)d%lQ)j%qQ)p%tQ*n'iQ-V)mQ-l*oQ.i+oQ.j+pQ.x,WQ/S,`Q/T,aQ/U,bQ/Z,fQ/^,hQ/b,pQ/q-PQ0j.`Q0q.dQ0r.hQ0t.kQ0y.{Q1Y/dQ1_/lQ1|0kQ2Q0nQ2R0pQ2[0|Q2d1XQ2g1^Q2w1}Q2y2PQ2|2VQ3P2ZQ3T2fQ3X2nQ3Y2pQ3]2xQ3a3RQ3b3SR3e3ZR.R+UQ+g(YQ+h(ZR.k+qS+s([+tT,w)`,xa+l([)`+j+m+t,u,x.bQ%g!_Q'i$aQ*o'jQ.h+nS0p.c.fS2P0m0oR2x2OQ$pvW+o([)`+t,xW.`+i+j+m,uS0k.a.bR1}0l|!aPVX!S!j!r!s!w%O%Q%T%V(h,Q,T.u.w/P0}1O1W2]Q$ctW+p([)`+t,xU.d+j+m,uR0n.b0z!OPVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_R/a,m0}}PVX]`cjklmnopxyz!S!W!X!Y!]!g!j!r!s!w!y!z!|#Q#R#S#T#U#V#W#X#Y#Z#[#]#^#_#`#a#i#l#m#q#r$Q$R$T$z%O%Q%S%T%U%V%d%}&S&W&[&q&t&u&x'P']'a(R(V(h(t)T)X)n)u)y){*V*Z*[*|+^,Q,T,Y,c,e,g,m-`-a-t-z.[.u.w/P/X/y0O0T0e0s0}1O1R1S1W1k1o1{2W2]2r3p3u3x3y3z3{3|3}4O4P4Q4R4S4T4U4V4W4X4Y4Z4[4_4`4a4b4c4k5O5R5S5V5Z5[5_5a5b5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5u5{5|5}6O6P6Q6R6S6T6U6V6W6X6Y6Z6[6]6^6_6`6a6b6c6d6l7P7S7T7W7[7]7`7b7c7o7x7y7z7{7|7}8O8P8Q8R8S8T8U8V8W8X8Y8Z8[8]8^8_8`8a8b8d8e8f8g8h8s9T9W9Z9^9_9a9c9f9h9o9p9s9u9v:Q:R:S:T:U:V:W:X:Y:Z:[:]:^:_:`:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:q:r:s:u:v:w;S;e;i;j;k;n;u;v;z;|;}V>W>[>]>^>c>h>i>l>n>o>p>q>v?^?_T$x{$|Q(q%QQ(v%TQ(y%VR2b1WQ%c!]Q(u%SQ,d(tQ/W,cQ/Y,eQ1Q/XR2_1RQ%q!fR)m%rR/p-O",nodeNames:"⚠ ( HeredocString EscapeSequence abstract LogicOp array as Boolean break case catch clone const continue default declare do echo else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final finally fn for foreach from function global goto if implements include include_once LogicOp insteadof interface list match namespace new null LogicOp print readonly require require_once return switch throw trait try unset use var Visibility while LogicOp yield LineComment BlockComment TextInterpolation PhpClose Text PhpOpen Template TextInterpolation EmptyStatement ; } { Block : LabelStatement Name ExpressionStatement ConditionalExpression LogicOp MatchExpression ) ( ParenthesizedExpression MatchBlock MatchArm , => AssignmentExpression ArrayExpression ValueList & VariadicUnpacking ... Pair [ ] ListExpression ValueList Pair Pair SubscriptExpression MemberExpression -> ?-> Name VariableName DynamicVariable $ ${ CallExpression ArgList NamedArgument SpreadArgument CastExpression UnionType LogicOp IntersectionType OptionalType NamedType QualifiedName \\ NamespaceName Name NamespaceName Name ScopedExpression :: ClassMemberName DynamicMemberName AssignOp UpdateExpression UpdateOp YieldExpression BinaryExpression LogicOp LogicOp LogicOp BitOp BitOp BitOp CompareOp CompareOp BitOp ArithOp ConcatOp ArithOp ArithOp IncludeExpression RequireExpression CloneExpression UnaryExpression ControlOp LogicOp PrintIntrinsic FunctionExpression static ParamList Parameter #[ Attributes Attribute VariadicParameter PropertyParameter PropertyHooks PropertyHook UseList ArrowFunction NewExpression class BaseClause ClassInterfaceClause DeclarationList ConstDeclaration VariableDeclarator PropertyDeclaration VariableDeclarator MethodDeclaration UseDeclaration UseList UseInsteadOfClause UseAsClause UpdateExpression ArithOp ShellExpression ThrowExpression Integer Float String MemberExpression SubscriptExpression UnaryExpression ArithOp Interpolation String IfStatement ColonBlock SwitchStatement Block CaseStatement DefaultStatement ColonBlock WhileStatement EmptyStatement DoStatement ForStatement ForSpec SequenceExpression ForeachStatement ForSpec Pair GotoStatement ContinueStatement BreakStatement ReturnStatement TryStatement CatchDeclarator DeclareStatement EchoStatement UnsetStatement ConstDeclaration FunctionDefinition ClassDeclaration InterfaceDeclaration TraitDeclaration EnumDeclaration EnumBody EnumCase NamespaceDefinition NamespaceUseDeclaration UseGroup UseClause UseClause GlobalDeclaration FunctionStaticDeclaration Program",maxTerm:318,nodeProps:[["group",-36,2,8,49,82,84,86,89,94,95,103,107,108,112,113,116,120,126,132,137,139,140,154,155,156,157,160,161,173,174,188,190,191,192,193,194,200,"Expression",-28,75,79,81,83,201,203,208,210,211,214,217,218,219,220,221,223,224,225,226,227,228,229,230,231,234,235,239,240,"Statement",-4,121,123,124,125,"Type"],["isolate",-4,67,68,71,200,""],["openedBy",70,"phpOpen",77,"{",87,"(",102,"#["],["closedBy",72,"phpClose",78,"}",88,")",165,"]"]],propSources:[i3],skippedNodes:[0],repeatNodeCount:32,tokenData:"!GQ_R!]OX$zXY&^YZ'sZ]$z]^&^^p$zpq&^qr)Rrs+Pst+otu2buv5evw6rwx8Vxy>]yz>yz{?g{|@}|}Bb}!OCO!O!PDh!P!QKT!Q!R!!o!R![!$q![!]!,P!]!^!-a!^!_!-}!_!`!1S!`!a!2d!a!b!3t!b!c!7^!c!d!7z!d!e!9Y!e!}!7z!}#O!;b#O#P!V<%lO8VR9WV'TP%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X<%lO9mQ9rV%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X<%lO9mQ:^O%`QQ:aRO;'S9m;'S;=`:j;=`O9mQ:oW%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X;=`<%l9m<%lO9mQ;[P;=`<%l9mR;fV'TP%`QOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zRV<%l~8V~O8V~~%fR=OW'TPOY8VYZ9PZ!^8V!^!_;{!_;'S8V;'S;=`=h;=`<%l9m<%lO8VR=mW%`QOw9mwx:Xx#O9m#O#P:^#P;'S9m;'S;=`;X;=`<%l8V<%lO9mR>YP;=`<%l8VR>dV!zQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zV?QV!yU'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR?nY'TP$^QOY$zYZ%fZz$zz{@^{!^$z!^!_%k!_!`6U!`;'S$z;'S;=`&W<%lO$zR@eW$_Q'TPOY$zYZ%fZ!^$z!^!_%k!_!`6U!`;'S$z;'S;=`&W<%lO$zRAUY$[Q'TPOY$zYZ%fZ{$z{|At|!^$z!^!_%k!_!`6U!`;'S$z;'S;=`&W<%lO$zRA{V%TQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zRBiV#OQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_CXZ$[Q%^W'TPOY$zYZ%fZ}$z}!OAt!O!^$z!^!_%k!_!`6U!`!aCz!a;'S$z;'S;=`&W<%lO$zVDRV#aU'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zVDo['TP$]QOY$zYZ%fZ!O$z!O!PEe!P!Q$z!Q![Fs![!^$z!^!_%k!_!`6U!`;'S$z;'S;=`&W<%lO$zVEjX'TPOY$zYZ%fZ!O$z!O!PFV!P!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zVF^V#VU'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zRFz_'TP%XQOY$zYZ%fZ!Q$z!Q![Fs![!^$z!^!_%k!_!g$z!g!hGy!h#R$z#R#SJc#S#X$z#X#YGy#Y;'S$z;'S;=`&W<%lO$zRHO]'TPOY$zYZ%fZ{$z{|Hw|}$z}!OHw!O!Q$z!Q![Ii![!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zRH|X'TPOY$zYZ%fZ!Q$z!Q![Ii![!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zRIpZ'TP%XQOY$zYZ%fZ!Q$z!Q![Ii![!^$z!^!_%k!_#R$z#R#SHw#S;'S$z;'S;=`&W<%lO$zRJhX'TPOY$zYZ%fZ!Q$z!Q![Fs![!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_K[['TP$^QOY$zYZ%fZz$zz{LQ{!P$z!P!Q,o!Q!^$z!^!_%k!_!`6U!`;'S$z;'S;=`&W<%lO$z_LVX'TPOYLQYZLrZzLQz{N_{!^LQ!^!_! s!_;'SLQ;'S;=`!!i<%lOLQ_LwT'TPOzMWz{Mj{;'SMW;'S;=`NX<%lOMW^MZTOzMWz{Mj{;'SMW;'S;=`NX<%lOMW^MmVOzMWz{Mj{!PMW!P!QNS!Q;'SMW;'S;=`NX<%lOMW^NXO!f^^N[P;=`<%lMW_NdZ'TPOYLQYZLrZzLQz{N_{!PLQ!P!Q! V!Q!^LQ!^!_! s!_;'SLQ;'S;=`!!i<%lOLQ_! ^V!f^'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_! vZOYLQYZLrZzLQz{N_{!aLQ!a!bMW!b;'SLQ;'S;=`!!i<%l~LQ~OLQ~~%f_!!lP;=`<%lLQZ!!vm'TP%WYOY$zYZ%fZ!O$z!O!PFs!P!Q$z!Q![!$q![!^$z!^!_%k!_!d$z!d!e!&o!e!g$z!g!hGy!h!q$z!q!r!(a!r!z$z!z!{!){!{#R$z#R#S!%}#S#U$z#U#V!&o#V#X$z#X#YGy#Y#c$z#c#d!(a#d#l$z#l#m!){#m;'S$z;'S;=`&W<%lO$zZ!$xa'TP%WYOY$zYZ%fZ!O$z!O!PFs!P!Q$z!Q![!$q![!^$z!^!_%k!_!g$z!g!hGy!h#R$z#R#S!%}#S#X$z#X#YGy#Y;'S$z;'S;=`&W<%lO$zZ!&SX'TPOY$zYZ%fZ!Q$z!Q![!$q![!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zZ!&tY'TPOY$zYZ%fZ!Q$z!Q!R!'d!R!S!'d!S!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zZ!'k['TP%WYOY$zYZ%fZ!Q$z!Q!R!'d!R!S!'d!S!^$z!^!_%k!_#R$z#R#S!&o#S;'S$z;'S;=`&W<%lO$zZ!(fX'TPOY$zYZ%fZ!Q$z!Q!Y!)R!Y!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zZ!)YZ'TP%WYOY$zYZ%fZ!Q$z!Q!Y!)R!Y!^$z!^!_%k!_#R$z#R#S!(a#S;'S$z;'S;=`&W<%lO$zZ!*Q]'TPOY$zYZ%fZ!Q$z!Q![!*y![!^$z!^!_%k!_!c$z!c!i!*y!i#T$z#T#Z!*y#Z;'S$z;'S;=`&W<%lO$zZ!+Q_'TP%WYOY$zYZ%fZ!Q$z!Q![!*y![!^$z!^!_%k!_!c$z!c!i!*y!i#R$z#R#S!){#S#T$z#T#Z!*y#Z;'S$z;'S;=`&W<%lO$zR!,WX!rQ'TPOY$zYZ%fZ![$z![!]!,s!]!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!,zV#yQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zV!-hV!nU'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!.S[$YQOY$zYZ%fZ!^$z!^!_!.x!_!`!/i!`!a*c!a!b!0]!b;'S$z;'S;=`&W<%l~$z~O$z~~%fR!/PW$ZQ'TPOY$zYZ%fZ!^$z!^!_%k!_!`6U!`;'S$z;'S;=`&W<%lO$zR!/pX$YQ'TPOY$zYZ%fZ!^$z!^!_%k!_!`$z!`!a*c!a;'S$z;'S;=`&W<%lO$zP!0bR!jP!_!`!0k!r!s!0p#d#e!0pP!0pO!jPP!0sQ!j!k!0y#[#]!0yP!0|Q!r!s!0k#d#e!0k_!1ZX#|Y'TPOY$zYZ%fZ!^$z!^!_%k!_!`)r!`!a!1v!a;'S$z;'S;=`&W<%lO$zV!1}V#PU'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!2kX$YQ'TPOY$zYZ%fZ!^$z!^!_%k!_!`!3W!`!a!.x!a;'S$z;'S;=`&W<%lO$zR!3_V$YQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_!3{[!wQ'TPOY$zYZ%fZ}$z}!O!4q!O!^$z!^!_%k!_!`$z!`!a!6P!a!b!6m!b;'S$z;'S;=`&W<%lO$zV!4vX'TPOY$zYZ%fZ!^$z!^!_%k!_!`$z!`!a!5c!a;'S$z;'S;=`&W<%lO$zV!5jV#bU'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_!6WV!h^'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!6tW$RQ'TPOY$zYZ%fZ!^$z!^!_%k!_!`6U!`;'S$z;'S;=`&W<%lO$zR!7eV$dQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_!8Ta'aS'TP'WYOY$zYZ%fZ!Q$z!Q![!7z![!^$z!^!_%k!_!c$z!c!}!7z!}#R$z#R#S!7z#S#T$z#T#o!7z#o$g$z$g&j!7z&j;'S$z;'S;=`&W<%lO$z_!9ce'aS'TP'WYOY$zYZ%fZr$zrs!:tsw$zwx8Vx!Q$z!Q![!7z![!^$z!^!_%k!_!c$z!c!}!7z!}#R$z#R#S!7z#S#T$z#T#o!7z#o$g$z$g&j!7z&j;'S$z;'S;=`&W<%lO$zR!:{V'TP'uQOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zV!;iV#XU'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_!OZ'TPOY!=yYZ!>qZ!^!=y!^!_!@y!_#O!=y#O#P!Au#P#S!=y#S#T!CP#T;'S!=y;'S;=`!Cm<%lO!=yR!>vV'TPO#O!?]#O#P!?u#P#S!?]#S#T!@n#T;'S!?];'S;=`!@s<%lO!?]Q!?`VO#O!?]#O#P!?u#P#S!?]#S#T!@n#T;'S!?];'S;=`!@s<%lO!?]Q!?xRO;'S!?];'S;=`!@R;=`O!?]Q!@UWO#O!?]#O#P!?u#P#S!?]#S#T!@n#T;'S!?];'S;=`!@s;=`<%l!?]<%lO!?]Q!@sO%UQQ!@vP;=`<%l!?]R!@|]OY!=yYZ!>qZ!a!=y!a!b!?]!b#O!=y#O#P!Au#P#S!=y#S#T!CP#T;'S!=y;'S;=`!Cm<%l~!=y~O!=y~~%fR!AzW'TPOY!=yYZ!>qZ!^!=y!^!_!@y!_;'S!=y;'S;=`!Bd;=`<%l!?]<%lO!=yR!BgWO#O!?]#O#P!?u#P#S!?]#S#T!@n#T;'S!?];'S;=`!@s;=`<%l!=y<%lO!?]R!CWV%UQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!CpP;=`<%l!=y_!CzV!p^'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z_!DjY$UQ#n['TPOY$zYZ%fZ!^$z!^!_%k!_!`6U!`#p$z#p#q!EY#q;'S$z;'S;=`&W<%lO$zR!EaV$SQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!E}V!oQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$zR!FkV$eQ'TPOY$zYZ%fZ!^$z!^!_%k!_;'S$z;'S;=`&W<%lO$z",tokenizers:[KL,n3,e3,0,1,2,3,JL],topRules:{Template:[0,73],Program:[1,241]},dynamicPrecedences:{298:1},specialized:[{term:284,get:(t,e)=>nS(t)<<1,external:nS},{term:284,get:t=>s3[t]||-1}],tokenPrec:29883}),o3=54,a3=1,l3=55,c3=2,u3=56,O3=3,sS=4,f3=5,SO=6,WT=7,DT=8,LT=9,NT=10,d3=11,h3=12,p3=13,Ed=57,m3=14,rS=58,jT=20,g3=22,BT=23,$3=24,Cp=26,GT=27,Q3=28,y3=31,b3=34,S3=36,v3=37,P3=0,x3=1,w3={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},T3={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},oS={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}};function _3(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function FT(t){return t==9||t==10||t==13||t==32}let aS=null,lS=null,cS=0;function Vp(t,e){let n=t.pos+e;if(cS==n&&lS==t)return aS;let i=t.peek(e);for(;FT(i);)i=t.peek(++e);let s="";for(;_3(i);)s+=String.fromCharCode(i),i=t.peek(++e);return lS=t,cS=n,aS=s?s.toLowerCase():i==k3||i==R3?void 0:null}const HT=60,vO=62,Vg=47,k3=63,R3=33,X3=45;function uS(t,e){this.name=t,this.parent=e}const C3=[SO,NT,WT,DT,LT],V3=new Xg({start:null,shift(t,e,n,i){return C3.indexOf(e)>-1?new uS(Vp(i,1)||"",t):t},reduce(t,e){return e==jT&&t?t.parent:t},reuse(t,e,n,i){let s=e.type.id;return s==SO||s==S3?new uS(Vp(i,1)||"",t):t},strict:!1}),A3=new Lt((t,e)=>{if(t.next!=HT){t.next<0&&e.context&&t.acceptToken(Ed);return}t.advance();let n=t.next==Vg;n&&t.advance();let i=Vp(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?m3:SO);let s=e.context?e.context.name:null;if(n){if(i==s)return t.acceptToken(d3);if(s&&T3[s])return t.acceptToken(Ed,-2);if(e.dialectEnabled(P3))return t.acceptToken(h3);for(let r=e.context;r;r=r.parent)if(r.name==i)return;t.acceptToken(p3)}else{if(i=="script")return t.acceptToken(WT);if(i=="style")return t.acceptToken(DT);if(i=="textarea")return t.acceptToken(LT);if(w3.hasOwnProperty(i))return t.acceptToken(NT);s&&oS[s]&&oS[s][i]?t.acceptToken(Ed,-1):t.acceptToken(SO)}},{contextual:!0}),E3=new Lt(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(rS);break}if(t.next==X3)e++;else if(t.next==vO&&e>=2){n>=3&&t.acceptToken(rS,-2);break}else e=0;t.advance()}});function Z3(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const z3=new Lt((t,e)=>{if(t.next==Vg&&t.peek(1)==vO){let n=e.dialectEnabled(x3)||Z3(e.context);t.acceptToken(n?f3:sS,2)}else t.next==vO&&t.acceptToken(sS,1)});function Ag(t,e,n){let i=2+t.length;return new Lt(s=>{for(let r=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(e);break}if(r==0&&s.next==HT||r==1&&s.next==Vg||r>=2&&ro?s.acceptToken(e,-o):s.acceptToken(n,-(o-2));break}else if((s.next==10||s.next==13)&&a){s.acceptToken(e,1);break}else r=o=0;s.advance()}})}const Y3=Ag("script",o3,a3),M3=Ag("style",l3,c3),q3=Ag("textarea",u3,O3),I3=ua({"Text RawText":_.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":_.angleBracket,TagName:_.tagName,"MismatchedCloseTag/TagName":[_.tagName,_.invalid],AttributeName:_.attributeName,"AttributeValue UnquotedAttributeValue":_.attributeValue,Is:_.definitionOperator,"EntityReference CharacterReference":_.character,Comment:_.blockComment,ProcessingInst:_.processingInstruction,DoctypeDecl:_.documentMeta}),U3=fr.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:V3,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[I3],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let c=a.type.id;if(c==Q3)return Zd(a,l,n);if(c==y3)return Zd(a,l,i);if(c==b3)return Zd(a,l,s);if(c==jT&&r.length){let u=a.node,O=u.firstChild,f=O&&OS(O,l),d;if(f){for(let h of r)if(h.tag==f&&(!h.attrs||h.attrs(d||(d=KT(O,l))))){let p=u.lastChild,m=p.type.id==v3?p.from:u.to;if(m>O.to)return{parser:h.parser,overlay:[{from:O.to,to:m}]}}}}if(o&&c==BT){let u=a.node,O;if(O=u.firstChild){let f=o[l.read(O.from,O.to)];if(f)for(let d of f){if(d.tagName&&d.tagName!=OS(u.parent,l))continue;let h=u.lastChild;if(h.type.id==Cp){let p=h.from+1,m=h.lastChild,g=h.to-(m&&m.isError?0:1);if(g>p)return{parser:d.parser,overlay:[{from:p,to:g}]}}else if(h.type.id==GT)return{parser:d.parser,overlay:[{from:h.from,to:h.to}]}}}}return null})}const W3=122,fS=1,D3=123,L3=124,e_=2,N3=125,j3=3,B3=4,t_=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],G3=58,F3=40,n_=95,H3=91,vu=45,K3=46,J3=35,e7=37,t7=38,n7=92,i7=10,s7=42;function Ml(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Eg(t){return t>=48&&t<=57}function dS(t){return Eg(t)||t>=97&&t<=102||t>=65&&t<=70}const i_=(t,e,n)=>(i,s)=>{for(let r=!1,o=0,a=0;;a++){let{next:l}=i;if(Ml(l)||l==vu||l==n_||r&&Eg(l))!r&&(l!=vu||a>0)&&(r=!0),o===a&&l==vu&&o++,i.advance();else if(l==n7&&i.peek(1)!=i7){if(i.advance(),dS(i.next)){do i.advance();while(dS(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();r=!0}else{r&&i.acceptToken(o==2&&s.canShift(e_)?e:l==F3?n:t);break}}},r7=new Lt(i_(D3,e_,L3)),o7=new Lt(i_(N3,j3,B3)),a7=new Lt(t=>{if(t_.includes(t.peek(-1))){let{next:e}=t;(Ml(e)||e==n_||e==J3||e==K3||e==s7||e==H3||e==G3&&Ml(t.peek(1))||e==vu||e==t7)&&t.acceptToken(W3)}}),l7=new Lt(t=>{if(!t_.includes(t.peek(-1))){let{next:e}=t;if(e==e7&&(t.advance(),t.acceptToken(fS)),Ml(e)){do t.advance();while(Ml(t.next)||Eg(t.next));t.acceptToken(fS)}}}),c7=ua({"AtKeyword import charset namespace keyframes media supports":_.definitionKeyword,"from to selector":_.keyword,NamespaceName:_.namespace,KeyframeName:_.labelName,KeyframeRangeName:_.operatorKeyword,TagName:_.tagName,ClassName:_.className,PseudoClassName:_.constant(_.className),IdName:_.labelName,"FeatureName PropertyName":_.propertyName,AttributeName:_.attributeName,NumberLiteral:_.number,KeywordQuery:_.keyword,UnaryQueryOp:_.operatorKeyword,"CallTag ValueName":_.atom,VariableName:_.variableName,Callee:_.operatorKeyword,Unit:_.unit,"UniversalSelector NestingSelector":_.definitionOperator,"MatchOp CompareOp":_.compareOperator,"ChildOp SiblingOp, LogicOp":_.logicOperator,BinOp:_.arithmeticOperator,Important:_.modifier,Comment:_.blockComment,ColorLiteral:_.color,"ParenthesizedContent StringLiteral":_.string,":":_.punctuation,"PseudoOp #":_.derefOperator,"; ,":_.separator,"( )":_.paren,"[ ]":_.squareBracket,"{ }":_.brace}),u7={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},O7={__proto__:null,or:98,and:98,not:106,only:106,layer:170},f7={__proto__:null,selector:112,layer:166},d7={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},h7={__proto__:null,to:207},p7=fr.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mOPQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!hO[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!hyS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!hu7[t]||-1},{term:125,get:t=>O7[t]||-1},{term:4,get:t=>f7[t]||-1},{term:25,get:t=>d7[t]||-1},{term:123,get:t=>h7[t]||-1}],tokenPrec:1963});let zd=null;function Yd(){if(!zd&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));zd=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return zd||[]}const hS=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),pS=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","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-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","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","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","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","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["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"].map(t=>({type:"constant",label:t}))),m7=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),g7=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),os=/^(\w[\w-]*|-\w[\w-]*|)$/,$7=/^-(-[\w-]*)?$/;function Q7(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const mS=new hw,y7=["Declaration"];function b7(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function s_(t,e,n){if(e.to-e.from>4096){let i=mS.get(e);if(i)return i;let s=[],r=new Set,o=e.cursor(ht.IncludeAnonymous);if(o.firstChild())do for(let a of s_(t,o.node,n))r.has(a.label)||(r.add(a.label),s.push(a));while(o.nextSibling());return mS.set(e,s),s}else{let i=[],s=new Set;return e.cursor().iterate(r=>{var o;if(n(r)&&r.matchContext(y7)&&((o=r.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(r.from,r.to);s.has(a)||(s.add(a),i.push({label:a,type:"variable"}))}}),i}}const S7=t=>e=>{let{state:n,pos:i}=e,s=St(n).resolveInner(i,-1),r=s.type.isError&&s.from==s.to-1&&n.doc.sliceString(s.from,s.to)=="-";if(s.name=="PropertyName"||(r||s.name=="TagName")&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:Yd(),validFor:os};if(s.name=="ValueName")return{from:s.from,options:pS,validFor:os};if(s.name=="PseudoClassName")return{from:s.from,options:hS,validFor:os};if(t(s)||(e.explicit||r)&&Q7(s,n.doc))return{from:t(s)||r?s.from:i,options:s_(n.doc,b7(s),t),validFor:$7};if(s.name=="TagName"){for(let{parent:l}=s;l;l=l.parent)if(l.name=="Block")return{from:s.from,options:Yd(),validFor:os};return{from:s.from,options:m7,validFor:os}}if(s.name=="AtKeyword")return{from:s.from,options:g7,validFor:os};if(!e.explicit)return null;let o=s.resolve(i),a=o.childBefore(i);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:hS,validFor:os}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:pS,validFor:os}:o.name=="Block"||o.name=="Styles"?{from:i,options:Yd(),validFor:os}:null},v7=S7(t=>t.name=="VariableName"),PO=ur.define({name:"css",parser:p7.configure({props:[Oa.add({Declaration:Zr()}),fa.add({"Block KeyframeList":hg})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function P7(){return new sc(PO,PO.data.of({autocomplete:v7}))}const x7=315,w7=316,gS=1,T7=2,_7=3,k7=4,R7=317,X7=319,C7=320,V7=5,A7=6,E7=0,Ap=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],r_=125,Z7=59,Ep=47,z7=42,Y7=43,M7=45,q7=60,I7=44,U7=63,W7=46,D7=91,L7=new Xg({start:!1,shift(t,e){return e==V7||e==A7||e==X7?t:e==C7},strict:!1}),N7=new Lt((t,e)=>{let{next:n}=t;(n==r_||n==-1||e.context)&&t.acceptToken(R7)},{contextual:!0,fallback:!0}),j7=new Lt((t,e)=>{let{next:n}=t,i;Ap.indexOf(n)>-1||n==Ep&&((i=t.peek(1))==Ep||i==z7)||n!=r_&&n!=Z7&&n!=-1&&!e.context&&t.acceptToken(x7)},{contextual:!0}),B7=new Lt((t,e)=>{t.next==D7&&!e.context&&t.acceptToken(w7)},{contextual:!0}),G7=new Lt((t,e)=>{let{next:n}=t;if(n==Y7||n==M7){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(gS);t.acceptToken(i?gS:T7)}}else n==U7&&t.peek(1)==W7&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(_7))},{contextual:!0});function Md(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const F7=new Lt((t,e)=>{if(t.next!=q7||!e.dialectEnabled(E7)||(t.advance(),t.next==Ep))return;let n=0;for(;Ap.indexOf(t.next)>-1;)t.advance(),n++;if(Md(t.next,!0)){for(t.advance(),n++;Md(t.next,!1);)t.advance(),n++;for(;Ap.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==I7)return;for(let i=0;;i++){if(i==7){if(!Md(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(k7,-n)}),H7=ua({"get set async static":_.modifier,"for while do if else switch try catch finally return throw break continue default case":_.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":_.operatorKeyword,"let var const using function class extends":_.definitionKeyword,"import export from":_.moduleKeyword,"with debugger new":_.keyword,TemplateString:_.special(_.string),super:_.atom,BooleanLiteral:_.bool,this:_.self,null:_.null,Star:_.modifier,VariableName:_.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":_.function(_.variableName),VariableDefinition:_.definition(_.variableName),Label:_.labelName,PropertyName:_.propertyName,PrivatePropertyName:_.special(_.propertyName),"CallExpression/MemberExpression/PropertyName":_.function(_.propertyName),"FunctionDeclaration/VariableDefinition":_.function(_.definition(_.variableName)),"ClassDeclaration/VariableDefinition":_.definition(_.className),"NewExpression/VariableName":_.className,PropertyDefinition:_.definition(_.propertyName),PrivatePropertyDefinition:_.definition(_.special(_.propertyName)),UpdateOp:_.updateOperator,"LineComment Hashbang":_.lineComment,BlockComment:_.blockComment,Number:_.number,String:_.string,Escape:_.escape,ArithOp:_.arithmeticOperator,LogicOp:_.logicOperator,BitOp:_.bitwiseOperator,CompareOp:_.compareOperator,RegExp:_.regexp,Equals:_.definitionOperator,Arrow:_.function(_.punctuation),": Spread":_.punctuation,"( )":_.paren,"[ ]":_.squareBracket,"{ }":_.brace,"InterpolationStart InterpolationEnd":_.special(_.brace),".":_.derefOperator,", ;":_.separator,"@":_.meta,TypeName:_.typeName,TypeDefinition:_.definition(_.typeName),"type enum interface implements namespace module declare":_.definitionKeyword,"abstract global Privacy readonly override":_.modifier,"is keyof unique infer asserts":_.operatorKeyword,JSXAttributeValue:_.attributeValue,JSXText:_.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":_.angleBracket,"JSXIdentifier JSXNameSpacedName":_.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":_.attributeName,"JSXBuiltin/JSXIdentifier":_.standard(_.tagName)}),K7={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,for:474,of:483,while:486,with:490,do:494,if:498,else:500,switch:504,case:510,try:516,catch:520,finally:524,return:528,throw:532,break:536,continue:540,debugger:544},J7={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},eN={__proto__:null,"<":193},tN=fr.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Ik'#IkO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JqO6[Q!0MxO'#JrO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO7eQMhO'#F|O9[Q`O'#F{OOQ!0Lf'#Jr'#JrOOQ!0Lb'#Jq'#JqO9aQ`O'#GwOOQ['#K^'#K^O9lQ`O'#IXO9qQ!0LrO'#IYOOQ['#J_'#J_OOQ['#I^'#I^Q`QlOOQ`QlOOO9yQ!L^O'#DvO:QQlO'#EOO:XQlO'#EQO9gQ`O'#GsO:`QMhO'#CoO:nQ`O'#EnO:yQ`O'#EyO;OQMhO'#FeO;mQ`O'#GsOOQO'#K_'#K_O;rQ`O'#K_O`Q`O'#CeO>pQ`O'#HbO>xQ`O'#HhO>xQ`O'#HjO`QlO'#HlO>xQ`O'#HnO>xQ`O'#HqO>}Q`O'#HwO?SQ!0LsO'#H}O%[QlO'#IPO?_Q!0LsO'#IRO?jQ!0LsO'#ITO9qQ!0LrO'#IVO?uQ!0MxO'#CiO@wQpO'#DlQOQ`OOO%[QlO'#EQOA_Q`O'#ETO:`QMhO'#EnOAjQ`O'#EnOAuQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Ju'#JuO%[QlO'#JuOOQO'#Jx'#JxOOQO'#Ig'#IgOBuQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J|'#J|OCqQ!0MSO'#EgOC{QpO'#EWOOQO'#Jw'#JwODaQpO'#JxOEnQpO'#EWOC{QpO'#EgPE{O&2DjO'#CbPOOO)CD|)CD|OOOO'#I_'#I_OFWO#tO,59UOOQ!0Lh,59U,59UOOOO'#I`'#I`OFfO&jO,59UOFtQ!L^O'#DcOOOO'#Ib'#IbOF{O#@ItO,59{OOQ!0Lf,59{,59{OGZQlO'#IcOGnQ`O'#JsOImQ!fO'#JsO+}QlO'#JsOItQ`O,5:ROJ[Q`O'#EpOJiQ`O'#KSOJtQ`O'#KROJtQ`O'#KROJ|Q`O,5;^OKRQ`O'#KQOOQ!0Ln,5:^,5:^OKYQlO,5:^OMWQ!0MxO,5:fOMwQ`O,5:nONbQ!0LrO'#KPONiQ`O'#KOO9aQ`O'#KOON}Q`O'#KOO! VQ`O,5;]O! [Q`O'#KOO!#aQ!fO'#JrOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$PQ!fO,5:sOOQS'#Jy'#JyOOQO-EsOOQ['#Jg'#JgOOQ[,5>t,5>tOOQ[-E<[-E<[O!nQ!0MxO,5:jO%[QlO,5:jO!AUQ!0MxO,5:lOOQO,5@y,5@yO!AuQMhO,5=_O!BTQ!0LrO'#JhO9[Q`O'#JhO!BfQ!0LrO,59ZO!BqQpO,59ZO!ByQMhO,59ZO:`QMhO,59ZO!CUQ`O,5;ZO!C^Q`O'#HaO!CrQ`O'#KcO%[QlO,5;}O!9xQpO,5}Q`O'#HWO9gQ`O'#HYO!EZQ`O'#HYO:`QMhO'#H[O!E`Q`O'#H[OOQ[,5=p,5=pO!EeQ`O'#H]O!EvQ`O'#CoO!E{Q`O,59PO!FVQ`O,59PO!H[QlO,59POOQ[,59P,59PO!HlQ!0LrO,59PO%[QlO,59PO!JwQlO'#HdOOQ['#He'#HeOOQ['#Hf'#HfO`QlO,5=|O!K_Q`O,5=|O`QlO,5>SO`QlO,5>UO!KdQ`O,5>WO`QlO,5>YO!KiQ`O,5>]O!KnQlO,5>cOOQ[,5>i,5>iO%[QlO,5>iO9qQ!0LrO,5>kOOQ[,5>m,5>mO# xQ`O,5>mOOQ[,5>o,5>oO# xQ`O,5>oOOQ[,5>q,5>qO#!fQpO'#D_O%[QlO'#JuO##XQpO'#JuO##cQpO'#DmO##tQpO'#DmO#&VQlO'#DmO#&^Q`O'#JtO#&fQ`O,5:WO#&kQ`O'#EtO#&yQ`O'#KTO#'RQ`O,5;_O#'WQpO'#DmO#'eQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#'lQ`O,5:oO>}Q`O,5;YO!BqQpO,5;YO!ByQMhO,5;YO:`QMhO,5;YO#'tQ`O,5@aO#'yQ07dO,5:sOOQO-E}O+}QlO,5>}OOQO,5?T,5?TO#+RQlO'#IcOOQO-EOO$5PQ`O,5>OOOQ[1G3h1G3hO`QlO1G3hOOQ[1G3n1G3nOOQ[1G3p1G3pO>xQ`O1G3rO$5UQlO1G3tO$9YQlO'#HsOOQ[1G3w1G3wO$9gQ`O'#HyO>}Q`O'#H{OOQ[1G3}1G3}O$9oQlO1G3}O9qQ!0LrO1G4TOOQ[1G4V1G4VOOQ!0Lb'#G_'#G_O9qQ!0LrO1G4XO9qQ!0LrO1G4ZO$=vQ`O,5@aO!)PQlO,5;`O9aQ`O,5;`O>}Q`O,5:XO!)PQlO,5:XO!BqQpO,5:XO$={Q?MtO,5:XOOQO,5;`,5;`O$>VQpO'#IdO$>mQ`O,5@`OOQ!0Lf1G/r1G/rO$>uQpO'#IjO$?PQ`O,5@oOOQ!0Lb1G0y1G0yO##tQpO,5:XOOQO'#If'#IfO$?XQpO,5:qOOQ!0Ln,5:q,5:qO#'oQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO>}Q`O1G0tO!BqQpO1G0tO!ByQMhO1G0tOOQ!0Lb1G5{1G5{O!BfQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$?`Q!0LrO1G0mO$?kQ!0LrO1G0mO!BqQpO1G0^OC{QpO1G0^O$?yQ!0LrO1G0mOOQO1G0^1G0^O$@_Q!0MxO1G0mPOOO-E}O$@{Q`O1G5yO$ATQ`O1G6XO$A]Q!fO1G6YO9aQ`O,5?TO$AgQ!0MxO1G6VO%[QlO1G6VO$AwQ!0LrO1G6VO$BYQ`O1G6UO$BYQ`O1G6UO9aQ`O1G6UO$BbQ`O,5?WO9aQ`O,5?WOOQO,5?W,5?WO$BvQ`O,5?WO$){Q`O,5?WOOQO-E_OOQ[,5>_,5>_O%[QlO'#HtO%>RQ`O'#HvOOQ[,5>e,5>eO9aQ`O,5>eOOQ[,5>g,5>gOOQ[7+)i7+)iOOQ[7+)o7+)oOOQ[7+)s7+)sOOQ[7+)u7+)uO%>WQpO1G5{O%>rQ?MtO1G0zO%>|Q`O1G0zOOQO1G/s1G/sO%?XQ?MtO1G/sO>}Q`O1G/sO!)PQlO'#DmOOQO,5?O,5?OOOQO-E}Q`O7+&`O!BqQpO7+&`OOQO7+%x7+%xO$@_Q!0MxO7+&XOOQO7+&X7+&XO%[QlO7+&XO%?cQ!0LrO7+&XO!BfQ!0LrO7+%xO!BqQpO7+%xO%?nQ!0LrO7+&XO%?|Q!0MxO7++qO%[QlO7++qO%@^Q`O7++pO%@^Q`O7++pOOQO1G4r1G4rO9aQ`O1G4rO%@fQ`O1G4rOOQS7+%}7+%}O#'oQ`O<`OOQ[,5>b,5>bO&=hQ`O1G4PO9aQ`O7+&fO!)PQlO7+&fOOQO7+%_7+%_O&=mQ?MtO1G6YO>}Q`O7+%_OOQ!0Lf<}Q`O<SQ!0MxO<= ]O&>dQ`O<= [OOQO7+*^7+*^O9aQ`O7+*^OOQ[ANAkANAkO&>lQ!fOANAkO!&oQMhOANAkO#'oQ`OANAkO4UQ!fOANAkO&>sQ`OANAkO%[QlOANAkO&>{Q!0MzO7+'zO&A^Q!0MzO,5?`O&CiQ!0MzO,5?bO&EtQ!0MzO7+'|O&HVQ!fO1G4kO&HaQ?MtO7+&aO&JeQ?MvO,5=XO&LlQ?MvO,5=ZO&L|Q?MvO,5=XO&M^Q?MvO,5=ZO&MnQ?MvO,59uO' tQ?MvO,5}Q`O7+)kO'-dQ`O<QPPP!>YHxPPPPPPPPP!AiP!BvPPHx!DXPHxPHxHxHxHxHxPHx!EkP!HuP!K{P!LP!LZ!L_!L_P!HrP!Lc!LcP# iP# mHxPHx# s#$xCW@zP@zP@z@zP#&V@z@z#(i@z#+a@z#-m@z@z#.]#0q#0q#0v#1P#0q#1[PP#0qP@z#1t@z#5s@z@z6bPPP#9xPPP#:c#:cP#:cP#:y#:cPP#;PP#:vP#:v#;d#:v#S#>Y#>d#>j#>t#>z#?[#?b#@S#@f#@l#@r#AQ#Ag#C[#Cj#Cq#E]#Ek#G]#Gk#Gq#Gw#G}#HX#H_#He#Ho#IR#IXPPPPPPPPPPP#I_PPPPPPP#JS#MZ#Ns#Nz$ SPPP$&nP$&w$)p$0Z$0^$0a$1`$1c$1j$1rP$1x$1{P$2i$2m$3e$4s$4x$5`PP$5e$5k$5o$5r$5v$5z$6v$7_$7v$7z$7}$8Q$8W$8Z$8_$8cR!|RoqOXst!Z#d%l&p&r&s&u,n,s2S2VY!vQ'^-`1g5qQ%svQ%{yQ&S|Q&h!VS'U!e-WQ'd!iS'j!r!yU*h$|*X*lQ+l%|Q+y&UQ,_&bQ-^']Q-h'eQ-p'kQ0U*nQ1q,`R < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:379,context:L7,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,236,242,244,246,248,251,257,263,265,267,269,271,273,274,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[H7],skippedNodes:[0,5,6,277],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(VpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(VpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Vp(Y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Vp(Y!b'{0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(W#S$i&j'|0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Vp(Y!b'|0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(U':f$i&j(Y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Y!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Vp(Y!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Y!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(VpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(VpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Vp(Y!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$i&j(Y!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Y!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Y!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Y!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Y!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Vp(Y!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-v$?V_!^(CdvBr$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Vp(Y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Vp(Y!b'{0/l$]#t(S,2j(d$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Vp(Y!b'|0/l$]#t(S,2j(d$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[j7,B7,G7,F7,2,3,4,5,6,7,8,9,10,11,12,13,14,N7,new bO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(b~~",141,339),new bO("j~RQYZXz{^~^O(P~~aP!P!Qd~iO(Q~~",25,322)],topRules:{Script:[0,7],SingleExpression:[1,275],SingleClassItem:[2,276]},dialects:{jsx:0,ts:15098},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:326,get:t=>K7[t]||-1},{term:342,get:t=>J7[t]||-1},{term:95,get:t=>eN[t]||-1}],tokenPrec:15124}),o_=[Pn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Pn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Pn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Pn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Pn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Pn(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Pn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Pn(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),Pn(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),Pn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Pn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],nN=o_.concat([Pn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Pn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Pn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),$S=new hw,a_=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Ra(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const iN=["FunctionDeclaration"],sN={FunctionDeclaration:Ra("function"),ClassDeclaration:Ra("class"),ClassExpression:()=>!0,EnumDeclaration:Ra("constant"),TypeAliasDeclaration:Ra("type"),NamespaceDeclaration:Ra("namespace"),VariableDefinition(t,e){t.matchContext(iN)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function l_(t,e){let n=$S.get(e);if(n)return n;let i=[],s=!0;function r(o,a){let l=t.sliceString(o.from,o.to);i.push({label:l,type:a})}return e.cursor(ht.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let a=sN[o.name];if(a&&a(o,r)||a_.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of l_(t,o.node))i.push(a);return!1}}),$S.set(e,i),i}const QS=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,c_=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function rN(t){let e=St(t.state).resolveInner(t.pos,-1);if(c_.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&QS.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let s=e;s;s=s.parent)a_.has(s.name)&&(i=i.concat(l_(t.state.doc,s)));return{options:i,from:n?e.from:t.pos,validFor:QS}}const Di=ur.define({name:"javascript",parser:tN.configure({props:[Oa.add({IfStatement:Zr({except:/^\s*({|else\b)/}),TryStatement:Zr({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:g6,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:Sw({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Zr({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),fa.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":hg,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),u_={test:t=>/^JSX/.test(t.name),facet:Qw({commentTokens:{block:{open:"{/*",close:"*/}"}}})},O_=Di.configure({dialect:"ts"},"typescript"),f_=Di.configure({dialect:"jsx",props:[Og.add(t=>t.isTop?[u_]:void 0)]}),d_=Di.configure({dialect:"jsx ts",props:[Og.add(t=>t.isTop?[u_]:void 0)]},"typescript");let h_=t=>({label:t,type:"keyword"});const p_="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(h_),oN=p_.concat(["declare","implements","private","protected","public"].map(h_));function aN(t={}){let e=t.jsx?t.typescript?d_:f_:t.typescript?O_:Di,n=t.typescript?nN.concat(oN):o_.concat(p_);return new sc(e,[Di.data.of({autocomplete:ZU(c_,vT(n))}),Di.data.of({autocomplete:rN}),t.jsx?uN:[]])}function lN(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function yS(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const cN=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),uN=Oe.inputHandler.of((t,e,n,i,s)=>{if((cN?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Di.isActiveAt(t.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange(l=>{var c;let{head:u}=l,O=St(o).resolveInner(u-1,-1),f;if(O.name=="JSXStartTag"&&(O=O.parent),!(o.doc.sliceString(u-1,u)!=i||O.name=="JSXAttributeValue"&&O.to>u)){if(i==">"&&O.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:""}};if(i=="/"&&O.name=="JSXStartCloseTag"){let d=O.parent,h=d.parent;if(h&&d.from==u-2&&((f=yS(o.doc,h.firstChild,u))||((c=h.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let p=`${f}>`;return{range:B.cursor(u+p.length,-1),changes:{from:u,insert:p}}}}else if(i==">"){let d=lN(O);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(f=yS(o.doc,d,u)))return{range:l,changes:{from:u,insert:``}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Xa=["_blank","_self","_top","_parent"],qd=["ascii","utf-8","utf-16","latin1","latin1"],Id=["get","post","put","delete"],Ud=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],qn=["true","false"],ve={},ON={a:{attrs:{href:null,ping:null,type:null,media:null,target:Xa,hreflang:null}},abbr:ve,address:ve,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ve,aside:ve,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ve,base:{attrs:{href:null,target:Xa}},bdi:ve,bdo:ve,blockquote:{attrs:{cite:null}},body:ve,br:ve,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Ud,formmethod:Id,formnovalidate:["novalidate"],formtarget:Xa,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ve,center:ve,cite:ve,code:ve,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:ve,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ve,div:ve,dl:ve,dt:ve,em:ve,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ve,figure:ve,footer:ve,form:{attrs:{action:null,name:null,"accept-charset":qd,autocomplete:["on","off"],enctype:Ud,method:Id,novalidate:["novalidate"],target:Xa}},h1:ve,h2:ve,h3:ve,h4:ve,h5:ve,h6:ve,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ve,hgroup:ve,hr:ve,html:{attrs:{manifest:null}},i:ve,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Ud,formmethod:Id,formnovalidate:["novalidate"],formtarget:Xa,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:ve,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ve,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:ve,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:qd,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:ve,noscript:ve,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:ve,param:{attrs:{name:null,value:null}},pre:ve,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ve,rt:ve,ruby:ve,samp:ve,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:qd}},section:ve,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ve,source:{attrs:{src:null,type:null,media:null}},span:ve,strong:ve,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ve,summary:ve,sup:ve,table:ve,tbody:ve,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ve,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:ve,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ve,time:{attrs:{datetime:null}},title:ve,tr:ve,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ve,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:ve},m_={accesskey:null,class:null,contenteditable:qn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:qn,autocorrect:qn,autocapitalize:qn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":qn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":qn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":qn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":qn,"aria-hidden":qn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":qn,"aria-multiselectable":qn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":qn,"aria-relevant":null,"aria-required":qn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},g_="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of g_)m_[t]=null;class xO{constructor(e,n){this.tags=Object.assign(Object.assign({},ON),e),this.globalAttrs=Object.assign(Object.assign({},m_),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}xO.default=new xO;function Jo(t,e,n=t.length){if(!e)return"";let i=e.firstChild,s=i&&i.getChild("TagName");return s?t.sliceString(s.from,Math.min(s.to,n)):""}function ea(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function $_(t,e,n){let i=n.tags[Jo(t,ea(e))];return(i==null?void 0:i.children)||n.allTags}function Zg(t,e){let n=[];for(let i=ea(e);i&&!i.type.isTop;i=ea(i.parent)){let s=Jo(t,i);if(s&&i.lastChild.name=="CloseTag")break;s&&n.indexOf(s)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(s)}return n}const Q_=/^[:\-\.\w\u00b7-\uffff]*$/;function bS(t,e,n,i,s){let r=/\s*>/.test(t.sliceDoc(s,s+5))?"":">",o=ea(n,!0);return{from:i,to:s,options:$_(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(Zg(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+r,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function SS(t,e,n,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:Zg(t.doc,e).map((r,o)=>({label:r,apply:r+s,type:"type",boost:99-o})),validFor:Q_}}function fN(t,e,n,i){let s=[],r=0;for(let o of $_(t.doc,n,e))s.push({label:"<"+o,type:"type"});for(let o of Zg(t.doc,n))s.push({label:"",type:"type",boost:99-r++});return{from:i,to:i,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function dN(t,e,n,i,s){let r=ea(n),o=r?e.tags[Jo(t.doc,r)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:s,options:l.map(c=>({label:c,type:"property"})),validFor:Q_}}function hN(t,e,n,i,s){var r;let o=(r=n.parent)===null||r===void 0?void 0:r.getChild("AttributeName"),a=[],l;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let O=ea(n),f=O?e.tags[Jo(t.doc,O)]:null;u=(f==null?void 0:f.attrs)&&f.attrs[c]}if(u){let O=t.sliceDoc(i,s).toLowerCase(),f='"',d='"';/^['"]/.test(O)?(l=O[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",d=t.sliceDoc(s,s+1)==O[0]?"":O[0],O=O.slice(1),i++):l=/^[^\s<>='"]*$/;for(let h of u)a.push({label:h,apply:f+h+d,type:"constant"})}}return{from:i,to:s,options:a,validFor:l}}function pN(t,e){let{state:n,pos:i}=e,s=St(n).resolveInner(i,-1),r=s.resolve(i);for(let o=i,a;r==s&&(a=s.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.frompN(i,s)}const gN=Di.parser.configure({top:"SingleExpression"}),y_=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:O_.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:f_.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:d_.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:gN},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Di.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:PO.parser}],b_=[{name:"style",parser:PO.parser.configure({top:"Styles"})}].concat(g_.map(t=>({name:t,parser:Di.parser}))),S_=ur.define({name:"html",parser:U3.configure({props:[Oa.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Pu=S_.configure({wrap:JT(y_,b_)});function $N(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=JT((t.nestedLanguages||[]).concat(y_),(t.nestedAttributes||[]).concat(b_)));let i=n?S_.configure({wrap:n,dialect:e}):e?Pu.configure({dialect:e}):Pu;return new sc(i,[Pu.data.of({autocomplete:mN(t)}),t.autoCloseTags!==!1?QN:[],aN().support,P7().support])}const vS=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),QN=Oe.inputHandler.of((t,e,n,i,s)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Pu.isActiveAt(t.state,e,-1))return!1;let r=s(),{state:o}=r,a=o.changeByRange(l=>{var c,u,O;let f=o.doc.sliceString(l.from-1,l.to)==i,{head:d}=l,h=St(o).resolveInner(d,-1),p;if(f&&i==">"&&h.name=="EndTag"){let m=h.parent;if(((u=(c=m.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(p=Jo(o.doc,m.parent,d))&&!vS.has(p)){let g=d+(o.doc.sliceString(d,d+1)===">"?1:0),b=``;return{range:l,changes:{from:d,to:g,insert:b}}}}else if(f&&i=="/"&&h.name=="IncompleteCloseTag"){let m=h.parent;if(h.from==d-2&&((O=m.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(p=Jo(o.doc,m,d))&&!vS.has(p)){let g=d+(o.doc.sliceString(d,d+1)===">"?1:0),b=`${p}>`;return{range:B.cursor(d+b.length,-1),changes:{from:d,to:g,insert:b}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([r,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),yN=ur.define({name:"php",parser:r3.configure({props:[Oa.add({IfStatement:Zr({except:/^\s*({|else\b|elseif\b|endif\b)/}),TryStatement:Zr({except:/^\s*({|catch\b|finally\b)/}),SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},ColonBlock:t=>t.baseIndent+t.unit,"Block EnumBody DeclarationList":Sw({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"String BlockComment":()=>null,Statement:Zr({except:/^({|end(for|foreach|switch|while)\b)/})}),fa.add({"Block EnumBody DeclarationList SwitchBody ArrayExpression ValueList":hg,ColonBlock(t){return{from:t.from+1,to:t.to}},BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*(?:case |default:|end(?:if|for(?:each)?|switch|while)|else(?:if)?|\{|\})$/,wordChars:"$",closeBrackets:{stringPrefixes:["b","B"]}}});function v_(t={}){let e=[],n;if(t.baseLanguage!==null)if(t.baseLanguage)n=t.baseLanguage;else{let i=$N({matchClosingTags:!1});e.push(i.support),n=i.language}return new sc(yN.configure({wrap:n&&mw(i=>i.type.isTop?{parser:n.parser,overlay:s=>s.name=="Text"}:null),top:t.plain?"Program":"Template"}),e)}const bN={class:"p-4"},SN=W({__name:"ParameterView",setup(t){const e=sn(),n=te(e.parameter),i=[v_({plain:!0})],s={lineNumbers:!0,mode:"application/xml",theme:"default"};_e(n,o=>{e.parameter=o});function r(){e.manualSync()}return(o,a)=>(C(),re("div",bN,[X($(jn),{onClick:r,disabled:$(e).syncing},{default:z(()=>[Ae(ne($(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),X($(Tf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:s,extensions:i},null,8,["modelValue"])]))}}),vN={class:"p-4"},PN=W({__name:"PaperDBView",setup(t){const e=sn(),n=te(IT(e.paperContainer)),i=[qT()],s={lineNumbers:!0,mode:"application/xml",theme:"default"};_e(n,o=>{e.paperContainer=o});function r(){e.manualSync()}return(o,a)=>(C(),re("div",vN,[X($(jn),{onClick:r,disabled:$(e).syncing},{default:z(()=>[Ae(ne($(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),X($(Tf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:s,extensions:i},null,8,["modelValue"])]))}}),xN={class:"p-4"},wN=W({__name:"FormelView",setup(t){const e=sn(),n=te(e.formulas),i=[v_({plain:!0})],s={lineNumbers:!0,mode:"application/xml",theme:"default"};_e(n,o=>{e.formulas=o});function r(){e.manualSync()}return(o,a)=>(C(),re("div",xN,[X($(jn),{onClick:r,disabled:$(e).syncing},{default:z(()=>[Ae(ne($(e).syncing?o.$t("syncing"):o.$t("sync")),1)]),_:1},8,["disabled"]),X($(Tf),{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),options:s,extensions:i},null,8,["modelValue"])]))}}),TN={class:"w-screen h-screen flex flex-col"},_N={class:"flex-grow w-full h-full"},kN={class:"flex flex-col gap-2 h-full"},RN={class:"flex justify-center"},XN={class:"flex h-full p-6"},CN=W({__name:"Gui",setup(t){const e=sn();return(n,i)=>(C(),re("div",TN,[N("div",_N,[X($(k8),{id:"handle-demo-group-1",direction:"horizontal",class:"h-full w-full"},{default:z(()=>[X($(sQ),{id:"","default-size":15},{default:z(()=>[N("div",kN,[X(hE),X($(QZ))])]),_:1}),X($(_8),{id:"","with-handle":""}),X($(sQ),{id:"","default-size":85},{default:z(()=>[X($(R8),{"default-value":$(e).currentTab,"onUpdate:modelValue":i[0]||(i[0]=s=>$(e).setCurrentTab(s)),class:"w-full h-full"},{default:z(()=>[N("div",RN,[X($(X8),null,{default:z(()=>[X($(oo),{value:"designer"},{default:z(()=>[Ae(ne(n.$t("designer")),1)]),_:1}),X($(oo),{value:"preview"},{default:z(()=>[Ae(ne(n.$t("preview")),1)]),_:1}),X($(oo),{value:"xml"},{default:z(()=>[Ae(ne(n.$t("xml_view")),1)]),_:1}),X($(oo),{value:"formel"},{default:z(()=>[Ae(ne(n.$t("formel_view")),1)]),_:1}),X($(oo),{value:"parameter"},{default:z(()=>[Ae(ne(n.$t("parameter_view")),1)]),_:1}),X($(oo),{value:"paperdb"},{default:z(()=>[Ae(ne(n.$t("paperdb_view")),1)]),_:1})]),_:1})]),X($(ro),{value:"designer",class:"h-full overflow-y-auto"},{default:z(()=>[N("div",XN,[X($(pY))])]),_:1}),X($(ro),{value:"preview",class:"h-full overflow-y-auto"},{default:z(()=>[X(MY)]),_:1}),X($(ro),{value:"xml",class:"h-full overflow-y-auto"},{default:z(()=>[X(ZD)]),_:1}),X($(ro),{value:"formel",class:"h-full overflow-y-auto"},{default:z(()=>[X(wN)]),_:1}),X($(ro),{value:"parameter",class:"h-full overflow-y-auto"},{default:z(()=>[X(SN)]),_:1}),X($(ro),{value:"paperdb",class:"h-full overflow-y-auto"},{default:z(()=>[X(PN)]),_:1})]),_:1},8,["default-value"])]),_:1})]),_:1}),X($(IZ)),X($(iz)),X($(NZ))])]))}}),VN=W({__name:"App",setup(t){return Pt(()=>{const e=la(),n=sn(),s=new URLSearchParams(window.location.search).get("uuid");s&&(n.setProductUuid(s),n.loadConfigFromProductApi(s).then(r=>{e.parseJSON(r)}),n.loadFormulaAnalyserDataFromApi(s)),e.$subscribe((r,o)=>{n.saveDesign(e.loadJSON())})}),(e,n)=>(C(),j(CN))}}),AN="Designer",EN="Kalkulations Analyse",ZN="XML Ansicht",zN="JSON Ansicht",YN="Vorschau-Modus",MN="Überschrift",qN="Text",IN="Medien",UN="Textbereich",WN="Eingabefeld",DN="Auswahl",LN="Versteckt",NN="Zeile",jN="ID",BN="Name",GN="Variante",FN="Überschrift 1",HN="Überschrift 2",KN="Überschrift 3",JN="Überschrift 4",ej="Überschrift 5",tj="Überschrift 6",nj="Platzhalter",ij="Erforderlich",sj="Min",rj="Max",oj="Min Calc",aj="Max Calc",lj="Abhängigkeit hinzufügen",cj="Spalte hinzufügen",uj="Modus",Oj="Normal",fj="PapierDB",dj="FarbDB",hj="Container",pj="Optionen bearbeiten",mj="Option hinzufügen",gj="Schließen",$j="Abhängigkeiten",Qj="Optionen",yj="Einstellungen",bj="Speichern",Sj="Speichern...",vj="Formel Ansicht",Pj="Parameter Ansicht",xj="PapierDB Ansicht",wj="Synchronisiere...",Tj="Synchronisieren",_j={designer:AN,preview:EN,xml_view:ZN,json_view:zN,preview_mode:YN,headline:MN,text:qN,media:IN,textarea:UN,input:WN,select:DN,hidden:LN,row:NN,id:jN,default:"Standard",name:BN,variant:GN,headline1:FN,headline2:HN,headline3:KN,headline4:JN,headline5:ej,headline6:tj,placeholder:nj,required:ij,min:sj,max:rj,min_calc:oj,max_calc:aj,add_dependency:lj,add_column:cj,mode:uj,normal:Oj,paperdb:fj,colordb:dj,container:hj,edit_options:pj,add_option:mj,close:gj,dependencies:$j,options:Qj,settings:yj,save:bj,saving:Sj,formel_view:vj,parameter_view:Pj,paperdb_view:xj,syncing:wj,sync:Tj},kj="Designer",Rj="Calculation Analysis",Xj="XML View",Cj="JSON View",Vj="Preview Mode",Aj="Headline",Ej="Text",Zj="Media",zj="Textarea",Yj="Input",Mj="Select",qj="Hidden",Ij="Row",Uj="ID",Wj="Name",Dj="Variant",Lj="Headline 1",Nj="Headline 2",jj="Headline 3",Bj="Headline 4",Gj="Headline 5",Fj="Headline 6",Hj="Placeholder",Kj="Required",Jj="Min",eB="Max",tB="Min Calc",nB="Max Calc",iB="Add Dependency",sB="Add Column",rB="Mode",oB="Normal",aB="PaperDB",lB="ColorDB",cB="Container",uB="Edit Options",OB="Add Option",fB="Close",dB="Dependencies",hB="Options",pB="Settings",mB="Save",gB="Saving...",$B="Formula View",QB="Parameter View",yB="PaperDB View",bB="Syncing...",SB="Sync",vB={designer:kj,preview:Rj,xml_view:Xj,json_view:Cj,preview_mode:Vj,headline:Aj,text:Ej,media:Zj,textarea:zj,input:Yj,select:Mj,hidden:qj,row:Ij,id:Uj,default:"Default",name:Wj,variant:Dj,headline1:Lj,headline2:Nj,headline3:jj,headline4:Bj,headline5:Gj,headline6:Fj,placeholder:Hj,required:Kj,min:Jj,max:eB,min_calc:tB,max_calc:nB,add_dependency:iB,add_column:sB,mode:rB,normal:oB,paperdb:aB,colordb:lB,container:cB,edit_options:uB,add_option:OB,close:fB,dependencies:dB,options:hB,settings:pB,save:mB,saving:gB,formel_view:$B,parameter_view:QB,paperdb_view:yB,syncing:bB,sync:SB},PB=sZ({legacy:!1,locale:"de",fallbackLocale:"en",messages:{de:_j,en:vB}}),zg=qu(VN);zg.use(GX());zg.use(PB);zg.mount("#app"); diff --git a/src/old/public/styles/vorlagen/bootstrap4_api/calc.js b/src/old/public/styles/vorlagen/bootstrap4_api/calc.js index 5346a4a42..24380c8c7 100755 --- a/src/old/public/styles/vorlagen/bootstrap4_api/calc.js +++ b/src/old/public/styles/vorlagen/bootstrap4_api/calc.js @@ -6,20 +6,20 @@ var delivery_date = ""; var delivery_info = ""; -$(function(){ +$(function() { $(".printOffer").click(function(event) { var formElements = $('#CALCFORM').serializeArray(); var formArray = {}; - $.each(formElements, function( index, value ) { + $.each(formElements, function(index, value) { var name = value.name; var val = value.value; - if(name != "xmlProduct") { + if (name != "xmlProduct") { formArray[name] = val; } }); var xmlProduct = ""; - if($('#CALCFORM select[name="xmlProduct"]').length > 0) { + if ($('#CALCFORM select[name="xmlProduct"]').length > 0) { xmlProduct = $('#CALCFORM select[name="xmlProduct"]').val(); } @@ -28,8 +28,8 @@ $(function(){ contentType: "application/json", dataType: 'json', method: 'post', - data: JSON.stringify({productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }), - success: function(result){ + data: JSON.stringify({ productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }), + success: function(result) { window.open('/apps/product/offer/' + productUUId); } }); @@ -38,55 +38,55 @@ $(function(){ $("#in_basket").click(function(event) { - - if(($('#upload_mode').val() == 'none' || $('#upload_mode').val() == '') && $('#myUpload .modal-body > div').length > 0 ) { + + if (($('#upload_mode').val() == 'none' || $('#upload_mode').val() == '') && $('#myUpload .modal-body > div').length > 0) { $('#myUpload').modal(); return; } var formElements = $('#CALCFORM').serializeArray(); var formArray = {}; - $.each(formElements, function( index, value ) { + $.each(formElements, function(index, value) { var name = value.name; var val = value.value; - if(name != "xmlProduct") { + if (name != "xmlProduct") { formArray[name] = val; } }); var xmlProduct = ""; - if($('#CALCFORM select[name="xmlProduct"]').length > 0) { + if ($('#CALCFORM select[name="xmlProduct"]').length > 0) { xmlProduct = $('#CALCFORM select[name="xmlProduct"]').val(); } - if(productLoaded === 1) { + if (productLoaded === 1) { $.ajax({ url: "/apps/api/basket/legacy/update", contentType: "application/json", dataType: 'json', method: 'post', - data: JSON.stringify({productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }), - success: function(result){ - document.location="/basket"; + data: JSON.stringify({ productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }), + success: function(result) { + document.location = "/basket"; } }); return false; - }else{ + } else { $.ajax({ url: "/apps/api/basket/legacy/add", contentType: "application/json", dataType: 'json', method: 'post', - data: JSON.stringify({productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }), - success: function(result){ - document.location="/basket"; + data: JSON.stringify({ productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }), + success: function(result) { + document.location = "/basket"; } }); return false; } }); - if(productLoaded === 1 || productReBuy === 1) { + if (productLoaded === 1 || productReBuy === 1) { loadCalc(productUUId, true); - }else{ + } else { loadCalc(productUUId); } }) @@ -96,12 +96,12 @@ function loadCalc(productUUId, firstLoad = false) { calcHasError = false; - if(firstLoad) { + if (firstLoad) { formArray = productValues; } $.each($('#CALCFORM select'), function(index, value) { - if(value.name != "xmlProduct") { + if (value.name != "xmlProduct") { formArray[value.name] = $(value).val(); } }); @@ -109,132 +109,132 @@ function loadCalc(productUUId, firstLoad = false) { formArray[value.name] = $(value).val(); }); $.each($('#CALCFORM input[type=checkbox]:checked'), function(index, value) { - if(!Array.isArray(formArray[value.name])) { + if (!Array.isArray(formArray[value.name])) { formArray[value.name] = Array.from($(value).val()); - }else{ + } else { formArray[value.name].push($(value).val()); } }); $.each($('#CALCFORM input[type=checkbox]'), function(index, value) { - if(!Array.isArray(formArray[value.name])) { + if (!Array.isArray(formArray[value.name])) { formArray[value.name] = []; } }); - + $('#CALCFORM .invalid-feedback').remove(); var xmlProduct = ""; - if($('#CALCFORM select[name="xmlProduct"]').length > 0) { + if ($('#CALCFORM select[name="xmlProduct"]').length > 0) { xmlProduct = $('#CALCFORM select[name="xmlProduct"]').val(); } $.ajax({ - url: "/apps/api/plugin/system/psc/xmlcalc/price", - contentType: "application/json", - dataType: 'json', - method: 'post', - data: JSON.stringify({product: productUUId, test: false, values : formArray, xmlProduct: xmlProduct}), - success: function(result){ + url: "/apps/api/plugin/system/psc/xmlcalc/price", + contentType: "application/json", + dataType: 'json', + method: 'post', + data: JSON.stringify({ product: productUUId, test: false, values: formArray, xmlProduct: xmlProduct }), + success: function(result) { - var validElements = []; - var groupsFound = []; + var validElements = []; + var groupsFound = []; - if(result.xmlProductTypes.length > 1) { - var $label = $('