Fix permissions script to chown entire project directory and use chmod -R

This commit is contained in:
root committed 2026-06-10 12:15:06 +02:00
1 parent 5288dbd917
commit 3b3551d48c
16 files changed
+214 -213

No files matched your search

Regular → Executable
View File
File mode changed.
Generated
+94 -94
View File
@@ -1377,16 +1377,16 @@
},
{
"name": "filament/actions",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/actions.git",
"reference": "eb0f973dd88864c3ea7be5e999bf420ccbd62e14"
"reference": "4697f9e6dab1f023b2ea21b0e449c3fd204fb3d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/actions/zipball/eb0f973dd88864c3ea7be5e999bf420ccbd62e14",
"reference": "eb0f973dd88864c3ea7be5e999bf420ccbd62e14",
"url": "https://api.github.com/repos/filamentphp/actions/zipball/4697f9e6dab1f023b2ea21b0e449c3fd204fb3d9",
"reference": "4697f9e6dab1f023b2ea21b0e449c3fd204fb3d9",
"shasum": ""
},
"require": {
@@ -1421,20 +1421,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-27T16:17:39+00:00"
"time": "2026-06-08T09:27:06+00:00"
},
{
"name": "filament/filament",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/panels.git",
"reference": "fdb789aaa29ff418e0609927a683b099df2d5f55"
"reference": "2b6bfa9888e0bcba8c2a7dfbdfe913cab72cfe6a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/panels/zipball/fdb789aaa29ff418e0609927a683b099df2d5f55",
"reference": "fdb789aaa29ff418e0609927a683b099df2d5f55",
"url": "https://api.github.com/repos/filamentphp/panels/zipball/2b6bfa9888e0bcba8c2a7dfbdfe913cab72cfe6a",
"reference": "2b6bfa9888e0bcba8c2a7dfbdfe913cab72cfe6a",
"shasum": ""
},
"require": {
@@ -1478,20 +1478,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-27T16:17:24+00:00"
"time": "2026-06-08T09:24:15+00:00"
},
{
"name": "filament/forms",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/forms.git",
"reference": "e4dc9e2add4b563822d1014e35c8e16bf812aa8d"
"reference": "f7b5e8701982408f84e1b12fcca75eadad47905b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/forms/zipball/e4dc9e2add4b563822d1014e35c8e16bf812aa8d",
"reference": "e4dc9e2add4b563822d1014e35c8e16bf812aa8d",
"url": "https://api.github.com/repos/filamentphp/forms/zipball/f7b5e8701982408f84e1b12fcca75eadad47905b",
"reference": "f7b5e8701982408f84e1b12fcca75eadad47905b",
"shasum": ""
},
"require": {
@@ -1528,20 +1528,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-27T16:11:48+00:00"
"time": "2026-06-08T09:27:44+00:00"
},
{
"name": "filament/infolists",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/infolists.git",
"reference": "37a2484d6c65b5908e6549302001161530a88c2c"
"reference": "0b87686a37160bf7f8bccae1eedc733bbf928dc9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/37a2484d6c65b5908e6549302001161530a88c2c",
"reference": "37a2484d6c65b5908e6549302001161530a88c2c",
"url": "https://api.github.com/repos/filamentphp/infolists/zipball/0b87686a37160bf7f8bccae1eedc733bbf928dc9",
"reference": "0b87686a37160bf7f8bccae1eedc733bbf928dc9",
"shasum": ""
},
"require": {
@@ -1573,20 +1573,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-22T07:42:24+00:00"
"time": "2026-06-08T09:28:23+00:00"
},
{
"name": "filament/notifications",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/notifications.git",
"reference": "d4d1bef688dd85086229fcad6f1a157d47f6c336"
"reference": "28ce63bf4e378a4e38efac7b1f0519a5fed4b352"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/notifications/zipball/d4d1bef688dd85086229fcad6f1a157d47f6c336",
"reference": "d4d1bef688dd85086229fcad6f1a157d47f6c336",
"url": "https://api.github.com/repos/filamentphp/notifications/zipball/28ce63bf4e378a4e38efac7b1f0519a5fed4b352",
"reference": "28ce63bf4e378a4e38efac7b1f0519a5fed4b352",
"shasum": ""
},
"require": {
@@ -1620,11 +1620,11 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-20T17:23:54+00:00"
"time": "2026-06-08T09:27:42+00:00"
},
{
"name": "filament/query-builder",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/query-builder.git",
@@ -1670,16 +1670,16 @@
},
{
"name": "filament/schemas",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/schemas.git",
"reference": "1b23f15af79252591fd72f17ad4bc536cc32d47b"
"reference": "c3ecdfe73a215927caaf7b28bc5ae2b3891e805b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/1b23f15af79252591fd72f17ad4bc536cc32d47b",
"reference": "1b23f15af79252591fd72f17ad4bc536cc32d47b",
"url": "https://api.github.com/repos/filamentphp/schemas/zipball/c3ecdfe73a215927caaf7b28bc5ae2b3891e805b",
"reference": "c3ecdfe73a215927caaf7b28bc5ae2b3891e805b",
"shasum": ""
},
"require": {
@@ -1711,20 +1711,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-27T16:16:01+00:00"
"time": "2026-06-08T09:28:03+00:00"
},
{
"name": "filament/support",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/support.git",
"reference": "2d79214157790e89b35a00911a5d7fc5da647b87"
"reference": "caa2bf186de5b32a789d3c7167bc63db153386a1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/support/zipball/2d79214157790e89b35a00911a5d7fc5da647b87",
"reference": "2d79214157790e89b35a00911a5d7fc5da647b87",
"url": "https://api.github.com/repos/filamentphp/support/zipball/caa2bf186de5b32a789d3c7167bc63db153386a1",
"reference": "caa2bf186de5b32a789d3c7167bc63db153386a1",
"shasum": ""
},
"require": {
@@ -1769,20 +1769,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-27T16:12:42+00:00"
"time": "2026-06-08T09:28:36+00:00"
},
{
"name": "filament/tables",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/tables.git",
"reference": "b67ef735bb000cf9e11bf9f71450e9faef2c5052"
"reference": "bb98022d73347eeb090976ae0730147289135ffb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/tables/zipball/b67ef735bb000cf9e11bf9f71450e9faef2c5052",
"reference": "b67ef735bb000cf9e11bf9f71450e9faef2c5052",
"url": "https://api.github.com/repos/filamentphp/tables/zipball/bb98022d73347eeb090976ae0730147289135ffb",
"reference": "bb98022d73347eeb090976ae0730147289135ffb",
"shasum": ""
},
"require": {
@@ -1815,20 +1815,20 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-27T16:17:31+00:00"
"time": "2026-06-08T09:28:26+00:00"
},
{
"name": "filament/widgets",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/widgets.git",
"reference": "fdec7f94e32b1c43199221363382e47b8a6a9816"
"reference": "8c6411e0331aab124ffdf6c49d1161b1ecfbc9bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filamentphp/widgets/zipball/fdec7f94e32b1c43199221363382e47b8a6a9816",
"reference": "fdec7f94e32b1c43199221363382e47b8a6a9816",
"url": "https://api.github.com/repos/filamentphp/widgets/zipball/8c6411e0331aab124ffdf6c49d1161b1ecfbc9bc",
"reference": "8c6411e0331aab124ffdf6c49d1161b1ecfbc9bc",
"shasum": ""
},
"require": {
@@ -1859,7 +1859,7 @@
"issues": "https://github.com/filamentphp/filament/issues",
"source": "https://github.com/filamentphp/filament"
},
"time": "2026-05-27T16:16:29+00:00"
"time": "2026-06-08T09:28:17+00:00"
},
{
"name": "firebase/php-jwt",
@@ -2126,16 +2126,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "7.11.0",
"version": "7.11.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "c987f8ce84b8434fa430795eca0f3430663da72b"
"reference": "5af96f374e0ab4ebd747b8310888c99d3adb0a8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/c987f8ce84b8434fa430795eca0f3430663da72b",
"reference": "c987f8ce84b8434fa430795eca0f3430663da72b",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/5af96f374e0ab4ebd747b8310888c99d3adb0a8c",
"reference": "5af96f374e0ab4ebd747b8310888c99d3adb0a8c",
"shasum": ""
},
"require": {
@@ -2154,7 +2154,7 @@
"bamarni/composer-bin-plugin": "^1.8.2",
"ext-curl": "*",
"guzzle/client-integration-tests": "3.0.2",
"guzzlehttp/test-server": "^0.4",
"guzzlehttp/test-server": "^0.5",
"php-http/message-factory": "^1.1",
"phpunit/phpunit": "^8.5.52 || ^9.6.34",
"psr/log": "^1.1 || ^2.0 || ^3.0"
@@ -2234,7 +2234,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.11.0"
"source": "https://github.com/guzzle/guzzle/tree/7.11.1"
},
"funding": [
{
@@ -2250,7 +2250,7 @@
"type": "tidelift"
}
],
"time": "2026-06-02T12:40:51+00:00"
"time": "2026-06-07T22:54:06+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -2831,16 +2831,16 @@
},
{
"name": "laravel/framework",
"version": "v13.14.0",
"version": "v13.15.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "e60b1c817a9ef7da319e4007de6cfda5301a58c0"
"reference": "7e23b2aa4e1133a43835c93a810b4bedc40e425b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/e60b1c817a9ef7da319e4007de6cfda5301a58c0",
"reference": "e60b1c817a9ef7da319e4007de6cfda5301a58c0",
"url": "https://api.github.com/repos/laravel/framework/zipball/7e23b2aa4e1133a43835c93a810b4bedc40e425b",
"reference": "7e23b2aa4e1133a43835c93a810b4bedc40e425b",
"shasum": ""
},
"require": {
@@ -3051,20 +3051,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2026-06-04T18:46:35+00:00"
"time": "2026-06-09T13:45:51+00:00"
},
{
"name": "laravel/octane",
"version": "v2.17.4",
"version": "v2.17.5",
"source": {
"type": "git",
"url": "https://github.com/laravel/octane.git",
"reference": "ffeac11324accc6edf8df426ba4541f3171d494e"
"reference": "058ae4d7109eed40836dc42960f9388b9bf71f73"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/octane/zipball/ffeac11324accc6edf8df426ba4541f3171d494e",
"reference": "ffeac11324accc6edf8df426ba4541f3171d494e",
"url": "https://api.github.com/repos/laravel/octane/zipball/058ae4d7109eed40836dc42960f9388b9bf71f73",
"reference": "058ae4d7109eed40836dc42960f9388b9bf71f73",
"shasum": ""
},
"require": {
@@ -3140,7 +3140,7 @@
"issues": "https://github.com/laravel/octane/issues",
"source": "https://github.com/laravel/octane"
},
"time": "2026-05-22T11:30:06+00:00"
"time": "2026-06-04T09:05:08+00:00"
},
{
"name": "laravel/passkeys",
@@ -5611,16 +5611,16 @@
},
{
"name": "phpseclib/phpseclib",
"version": "3.0.52",
"version": "3.0.53",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "2adaefc83df2ec548558307690f376dd7d4f4fce"
"reference": "511ddc8e352d5d1f1e33bea468b6f4ef48438cf9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2adaefc83df2ec548558307690f376dd7d4f4fce",
"reference": "2adaefc83df2ec548558307690f376dd7d4f4fce",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/511ddc8e352d5d1f1e33bea468b6f4ef48438cf9",
"reference": "511ddc8e352d5d1f1e33bea468b6f4ef48438cf9",
"shasum": ""
},
"require": {
@@ -5701,7 +5701,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.52"
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.53"
},
"funding": [
{
@@ -5717,7 +5717,7 @@
"type": "tidelift"
}
],
"time": "2026-04-27T07:02:15+00:00"
"time": "2026-06-09T18:08:26+00:00"
},
{
"name": "phpstan/phpdoc-parser",
@@ -10036,16 +10036,16 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.38.1",
"version": "v1.38.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92"
"reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/14c5439eec4ccff081ac14eca2dc57feb2a66d92",
"reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6",
"reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6",
"shasum": ""
},
"require": {
@@ -10097,7 +10097,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.1"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.2"
},
"funding": [
{
@@ -10117,7 +10117,7 @@
"type": "tidelift"
}
],
"time": "2026-05-26T12:51:13+00:00"
"time": "2026-05-27T06:59:30+00:00"
},
{
"name": "symfony/polyfill-php80",
@@ -10205,16 +10205,16 @@
},
{
"name": "symfony/polyfill-php83",
"version": "v1.38.1",
"version": "v1.38.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php83.git",
"reference": "8339098cae28673c15cce00d80734af0453054e2"
"reference": "796a26abb75ce49f3a84433cd81bf1009d73d5f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/8339098cae28673c15cce00d80734af0453054e2",
"reference": "8339098cae28673c15cce00d80734af0453054e2",
"url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/796a26abb75ce49f3a84433cd81bf1009d73d5f8",
"reference": "796a26abb75ce49f3a84433cd81bf1009d73d5f8",
"shasum": ""
},
"require": {
@@ -10261,7 +10261,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php83/tree/v1.38.1"
"source": "https://github.com/symfony/polyfill-php83/tree/v1.38.2"
},
"funding": [
{
@@ -10281,7 +10281,7 @@
"type": "tidelift"
}
],
"time": "2026-05-26T12:51:13+00:00"
"time": "2026-05-27T06:51:48+00:00"
},
{
"name": "symfony/polyfill-php84",
@@ -12650,7 +12650,7 @@
},
{
"name": "filament/upgrade",
"version": "v5.6.6",
"version": "v5.6.7",
"source": {
"type": "git",
"url": "https://github.com/filamentphp/upgrade.git",
@@ -13050,16 +13050,16 @@
},
{
"name": "laravel/boost",
"version": "v2.4.9",
"version": "v2.4.10",
"source": {
"type": "git",
"url": "https://github.com/laravel/boost.git",
"reference": "f0359e55f6c3782023a35baf1d3df817053d69e8"
"reference": "080189f51c8d27c0792a03483a70adc7770f6eeb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/boost/zipball/f0359e55f6c3782023a35baf1d3df817053d69e8",
"reference": "f0359e55f6c3782023a35baf1d3df817053d69e8",
"url": "https://api.github.com/repos/laravel/boost/zipball/080189f51c8d27c0792a03483a70adc7770f6eeb",
"reference": "080189f51c8d27c0792a03483a70adc7770f6eeb",
"shasum": ""
},
"require": {
@@ -13068,7 +13068,7 @@
"illuminate/contracts": "^11.45.3|^12.41.1|^13.0",
"illuminate/routing": "^11.45.3|^12.41.1|^13.0",
"illuminate/support": "^11.45.3|^12.41.1|^13.0",
"laravel/mcp": "^0.7.1",
"laravel/mcp": "^0.7.1|^0.8.0",
"laravel/prompts": "^0.3.10",
"laravel/roster": "^0.5.0",
"php": "^8.2"
@@ -13112,20 +13112,20 @@
"issues": "https://github.com/laravel/boost/issues",
"source": "https://github.com/laravel/boost"
},
"time": "2026-06-04T10:33:57+00:00"
"time": "2026-06-09T10:21:08+00:00"
},
{
"name": "laravel/mcp",
"version": "v0.7.2",
"version": "v0.8.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/mcp.git",
"reference": "08962a276357f89164f78b38407c08187ab26cfe"
"reference": "18221a07093d84153883bc956e5e213999549a4b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/mcp/zipball/08962a276357f89164f78b38407c08187ab26cfe",
"reference": "08962a276357f89164f78b38407c08187ab26cfe",
"url": "https://api.github.com/repos/laravel/mcp/zipball/18221a07093d84153883bc956e5e213999549a4b",
"reference": "18221a07093d84153883bc956e5e213999549a4b",
"shasum": ""
},
"require": {
@@ -13153,7 +13153,7 @@
"extra": {
"laravel": {
"aliases": {
"Mcp": "Laravel\\Mcp\\Server\\Facades\\Mcp"
"Mcp": "Laravel\\Mcp\\Facades\\Mcp"
},
"providers": [
"Laravel\\Mcp\\Server\\McpServiceProvider"
@@ -13186,7 +13186,7 @@
"issues": "https://github.com/laravel/mcp/issues",
"source": "https://github.com/laravel/mcp"
},
"time": "2026-05-22T11:45:29+00:00"
"time": "2026-06-08T13:48:51+00:00"
},
{
"name": "laravel/pint",
+3 -4
View File
@@ -9,11 +9,10 @@ echo "Fixing permissions..."
# Fix ownership (only if running as root/sudo, skip otherwise)
if [ "$(id -u)" -eq 0 ]; then
chown -R "$WEB_USER":"$WEB_USER" storage bootstrap/cache 2>/dev/null || true
chown -R "$WEB_USER":"$WEB_USER" "$PROJECT_DIR" 2>/dev/null || true
fi
# Fix directory permissions
find storage bootstrap/cache -type d -exec chmod 775 {} + 2>/dev/null || true
find storage bootstrap/cache -type f -exec chmod 664 {} + 2>/dev/null || true
# Fix directory permissions for writable paths
chmod -R 775 storage bootstrap/cache 2>/dev/null || true
echo "Permissions fixed."
+2 -2
View File
@@ -111,7 +111,7 @@
"src": "public/assets/images/profile/profile-bg.png"
},
"resources/css/global.css": {
"file": "assets/global-CfixNq9d.css",
"file": "assets/global-DmKtm1TC.css",
"name": "global",
"names": [
"global.css"
@@ -166,7 +166,7 @@
]
},
"resources/themes/atom/css/app.css": {
"file": "assets/app-RokO-SZl.css",
"file": "assets/app-DtTGSxkD.css",
"name": "app",
"names": [
"app.css"
+2 -2
View File
@@ -1,2 +1,2 @@
/*! tailwindcss v4.1.18 | 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-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-tracking:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-ease:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-content:"";--tw-outline-style:solid;--tw-space-x-reverse:0}}}@layer theme{:root,:host{--font-mono:var(--mono-font-family),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-sky-400:oklch(74.6% .16 232.661);--color-gray-100:var(--gray-100);--color-gray-200:var(--gray-200);--color-gray-300:var(--gray-300);--color-gray-400:var(--gray-400);--color-gray-500:var(--gray-500);--color-gray-600:var(--gray-600);--color-gray-700:var(--gray-700);--color-gray-900:var(--gray-900);--color-gray-950:var(--gray-950);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--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:calc(1.5/1);--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:calc(2.25/1.875);--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--leading-loose:2;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--default-mono-font-family:var(--mono-font-family),ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-primary-400:var(--primary-400)}}@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%;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;-webkit-text-decoration: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,vLine truncated
/*! tailwindcss v4.3.0 | 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-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-tracking:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-ease:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-content:"";--tw-outline-style:solid;--tw-space-x-reverse:0}}}@layer theme{:root,:host{--font-mono:var(--mono-font-family), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-sky-400:oklch(74.6% .16 232.661);--color-gray-100:var(--gray-100);--color-gray-200:var(--gray-200);--color-gray-300:var(--gray-300);--color-gray-400:var(--gray-400);--color-gray-500:var(--gray-500);--color-gray-600:var(--gray-600);--color-gray-700:var(--gray-700);--color-gray-900:var(--gray-900);--color-gray-950:var(--gray-950);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--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:calc(1.5 / 1);--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:calc(2.25 / 1.875);--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--leading-loose:2;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-family), ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--default-mono-font-family:var(--mono-font-family), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-primary-400:var(--primary-400)}}@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%;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;-webkit-text-decoration: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,aLine truncated
+1 -1
View File
@@ -1 +1 @@
(()=>{var n=({livewireId:e})=>({actionNestingIndex:null,init(){window.addEventListener("sync-action-modals",t=>{t.detail.id===e&&this.syncActionModals(t.detail.newActionNestingIndex,t.detail.shouldOverlayParentActions??!1)})},syncActionModals(t,i=!1){if(this.actionNestingIndex===t){this.actionNestingIndex!==null&&this.$nextTick(()=>this.openModal());return}let s=this.actionNestingIndex!==null&&t!==null&&t>this.actionNestingIndex;if(this.actionNestingIndex!==null&&!(i&&s)&&this.closeModal(),this.actionNestingIndex=t,this.actionNestingIndex!==null){if(!this.$el.querySelector(`#${this.generateModalId(t)}`)){this.$nextTick(()=>this.openModal());return}this.openModal()}},generateModalId(t){return`fi-${e}-action-`+t},openModal(){let t=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("open-modal",{bubbles:!0,composed:!0,detail:{id:t}}))},closeModal(){let t=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("close-modal-quietly",{bubbles:!0,composed:!0,detail:{id:t}}))}});document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentActionModals",n)});})();
(()=>{var s=({livewireId:i})=>({actionNestingIndex:null,closedActionNestingIndexes:[],init(){window.addEventListener("sync-action-modals",t=>{t.detail.id===i&&this.syncActionModals(t.detail.newActionNestingIndex,t.detail.shouldOverlayParentActions??!1)}),window.addEventListener("modal-closed",t=>{let e=this.getActionNestingIndexFromModalId(t.detail.id);e!==null&&this.closedActionNestingIndexes.push(e)})},syncActionModals(t,e=!1){if(this.actionNestingIndex===t){this.actionNestingIndex!==null&&this.$nextTick(()=>this.openModal());return}let n=this.actionNestingIndex!==null&&t!==null&&t>this.actionNestingIndex;if(this.actionNestingIndex!==null&&!(e&&n)&&this.closeModal(),this.actionNestingIndex=t,this.actionNestingIndex===null){this.closedActionNestingIndexes=[];return}if(this.closedActionNestingIndexes=this.closedActionNestingIndexes.filter(o=>o<=this.actionNestingIndex),!this.closedActionNestingIndexes.includes(this.actionNestingIndex)){if(!this.$el.querySelector(`#${this.generateModalId(t)}`)){this.$nextTick(()=>this.openModal());return}this.openModal()}},generateModalId(t){return`fi-${i}-action-`+t},getActionNestingIndexFromModalId(t){let e=`fi-${i}-action-`;if(!t?.startsWith(e))return null;let n=Number(t.slice(e.length));return Number.isInteger(n)?n:null},openModal(){let t=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("open-modal",{bubbles:!0,composed:!0,detail:{id:t}}))},closeModal(){let t=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("close-modal-quietly",{bubbles:!0,composed:!0,detail:{id:t}}))}});document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentActionModals",s)});})();
@@ -1,38 +1,38 @@
var Ms=[],Xh=[];(()=>{let O="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,t=0;e<O.length;e++)(e%2?Xh:Ms).push(t=t+O[e])})();function zg(O){if(O<768)return!1;for(let e=0,t=Ms.length;;){let i=e+t>>1;if(O<Ms[i])t=i;else if(O>=Xh[i])e=i+1;else return!0;if(e==t)return!1}}function gh(O){return O>=127462&&O<=127487}var Ph=8205;function Th(O,e,t=!0,i=!0){return(t?bh:Ug)(O,e,i)}function bh(O,e,t){if(e==O.length)return e;e&&yh(O.charCodeAt(e))&&xh(O.charCodeAt(e-1))&&e--;let i=Ls(O,e);for(e+=Sh(i);e<O.length;){let r=Ls(O,e);if(i==Ph||r==Ph||t&&zg(r))e+=Sh(r),i=r;else if(gh(r)){let n=0,s=e-2;for(;s>=0&&gh(Ls(O,s));)n++,s-=2;if(n%2==0)break;e+=2}else break}return e}function Ug(O,e,t){for(;e>0;){let i=bh(O,e-2,t);if(i<e)return i;e--}return 0}function Ls(O,e){let t=O.charCodeAt(e);if(!xh(t)||e+1==O.length)return t;let i=O.charCodeAt(e+1);return yh(i)?(t-55296<<10)+(i-56320)+65536:t}function yh(O){return O>=56320&&O<57344}function xh(O){return O>=55296&&O<56320}function Sh(O){return O<65536?1:2}var E=class O{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,t,i){[e,t]=NO(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),DO.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=NO(this,e,t);let i=[];return this.decompose(e,t,i,0),DO.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new $O(this),n=new $O(e);for(let s=t,a=t;;){if(r.next(s),n.next(s),s=0,r.lineBreak!=n.lineBreak||r.done!=n.done||r.value!=n.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new $O(this,e)}iterRange(e,t=this.length){return new Dr(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Ir(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]?O.empty:e.length<=32?new Ae(e):DO.from(Ae.split(e,[]))}},Ae=class O extends E{constructor(e,t=Wg(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let n=0;;n++){let s=this.text[n],a=r+s.length;if((t?i:a)>=e)return new Is(r,a,i,s);r=a+1,i++}}decompose(e,t,i,r){let n=e<=0&&t>=this.length?this:new O(kh(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let s=i.pop(),a=Mr(n.text,s.text.slice(),0,n.length);if(a.length<=32)i.push(new O(a,s.length+n.length));else{let o=a.length>>1;i.push(new O(a.slice(0,o)),new O(a.slice(o)))}}else i.push(n)}replace(e,t,i){if(!(i instanceof O))return super.replace(e,t,i);[e,t]=NO(this,e,t);let r=Mr(this.text,Mr(i.text,kh(this.text,0,e)),t),n=this.length+i.length-(t-e);return r.length<=32?new O(r,n):DO.from(O.split(r,[]),n)}sliceString(e,t=this.length,i=`
`){[e,t]=NO(this,e,t);let r="";for(let n=0,s=0;n<=t&&s<this.text.length;s++){let a=this.text[s],o=n+a.length;n>e&&s&&(r+=i),e<o&&t>n&&(r+=a.slice(Math.max(0,e-n),t-n)),n=o+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let n of e)i.push(n),r+=n.length+1,i.length==32&&(t.push(new O(i,r)),i=[],r=-1);return r>-1&&t.push(new O(i,r)),t}},DO=class O extends E{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let n=0;;n++){let s=this.children[n],a=r+s.length,o=i+s.lines-1;if((t?o:a)>=e)return s.lineInner(e,t,i,r);r=a+1,i=o+1}}decompose(e,t,i,r){for(let n=0,s=0;s<=t&&n<this.children.length;n++){let a=this.children[n],o=s+a.length;if(e<=o&&t>=s){let l=r&((s<=e?1:0)|(o>=t?2:0));s>=e&&o<=t&&!l?i.push(a):a.decompose(e-s,t-s,i,l)}s=o+1}}replace(e,t,i){if([e,t]=NO(this,e,t),i.lines<this.lines)for(let r=0,n=0;r<this.children.length;r++){let s=this.children[r],a=n+s.length;if(e>=n&&t<=a){let o=s.replace(e-n,t-n,i),l=this.lines-s.lines+o.lines;if(o.lines<l>>4&&o.lines>l>>6){let c=this.children.slice();return c[r]=o,new O(c,this.length-(t-e)+i.length)}return super.replace(n,a,o)}n=a+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
`){[e,t]=NO(this,e,t);let r="";for(let n=0,s=0;n<this.children.length&&s<=t;n++){let a=this.children[n],o=s+a.length;s>e&&n&&(r+=i),e<o&&t>s&&(r+=a.sliceString(e-s,t-s,i)),s=o+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof O))return 0;let i=0,[r,n,s,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,n+=t){if(r==s||n==a)return i;let o=this.children[r],l=e.children[n];if(o!=l)return i+o.scanIdentical(l,t);i+=o.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let u of e)i+=u.lines;if(i<32){let u=[];for(let Q of e)Q.flatten(u);return new Ae(u,t)}let r=Math.max(32,i>>5),n=r<<1,s=r>>1,a=[],o=0,l=-1,c=[];function h(u){let Q;if(u.lines>n&&u instanceof O)for(let $ of u.children)h($);else u.lines>s&&(o>s||!o)?(f(),a.push(u)):u instanceof Ae&&o&&(Q=c[c.length-1])instanceof Ae&&u.lines+Q.lines<=32?(o+=u.lines,l+=u.length+1,c[c.length-1]=new Ae(Q.text.concat(u.text),Q.length+1+u.length)):(o+u.lines>r&&f(),o+=u.lines,l+=u.length+1,c.push(u))}function f(){o!=0&&(a.push(c.length==1?c[0]:O.from(c,l)),l=-1,o=c.length=0)}for(let u of e)h(u);return f(),a.length==1?a[0]:new O(a,t)}};E.empty=new Ae([""],0);function Wg(O){let e=-1;for(let t of O)e+=t.length+1;return e}function Mr(O,e,t=0,i=1e9){for(let r=0,n=0,s=!0;n<O.length&&r<=i;n++){let a=O[n],o=r+a.length;o>=t&&(o>i&&(a=a.slice(0,i-r)),r<t&&(a=a.slice(t-r)),s?(e[e.length-1]+=a,s=!1):e.push(a)),r=o+1}return e}function kh(O,e,t){return Mr(O,[""],e,t)}var $O=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Ae?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],n=this.offsets[i],s=n>>1,a=r instanceof Ae?r.text.length:r.children.length;if(s==(t>0?a:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((n&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(r instanceof Ae){let o=r.text[s+(t<0?-1:0)];if(this.offsets[i]+=t,o.length>Math.max(0,e))return this.value=e==0?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=r.children[s+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof Ae?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Dr=class{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new $O(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.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!=""}},Ir=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=function(){return this.iter()},$O.prototype[Symbol.iterator]=Dr.prototype[Symbol.iterator]=Ir.prototype[Symbol.iterator]=function(){return this});var Is=class{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}};function NO(O,e,t){return e=Math.max(0,Math.min(O.length,e)),[e,Math.max(e,Math.min(O.length,t))]}function fe(O,e,t=!0,i=!0){return Th(O,e,t,i)}function jg(O){return O>=56320&&O<57344}function Cg(O){return O>=55296&&O<56320}function Se(O,e){let t=O.charCodeAt(e);if(!Cg(t)||e+1==O.length)return t;let i=O.charCodeAt(e+1);return jg(i)?(t-55296<<10)+(i-56320)+65536:t}function Ri(O){return O<=65535?String.fromCharCode(O):(O-=65536,String.fromCharCode((O>>10)+55296,(O&1023)+56320))}function Me(O){return O<65536?1:2}var Bs=/\r\n?|\n/,pe=(function(O){return O[O.Simple=0]="Simple",O[O.TrackDel=1]="TrackDel",O[O.TrackBefore=2]="TrackBefore",O[O.TrackAfter=3]="TrackAfter",O})(pe||(pe={})),vt=class O{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?(e(i,r,n),r+=n):r+=s,i+=n}}iterChangedRanges(e,t=!1){Ns(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new O(e)}composeDesc(e){return this.empty?e:e.empty?this:_h(this,e)}mapDesc(e,t=!1){return e.empty?this:Fs(this,e,t)}mapPos(e,t=-1,i=pe.Simple){let r=0,n=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],o=this.sections[s++],l=r+a;if(o<0){if(l>e)return n+(e-r);n+=a}else{if(i!=pe.Simple&&l>=e&&(i==pe.TrackDel&&r<e&&l>e||i==pe.TrackBefore&&r<e||i==pe.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?n:n+o;n+=o}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return n}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let n=this.sections[i++],s=this.sections[i++],a=r+n;if(s>=0&&r<=t&&a>=e)return r<e&&a>t?"cover":!0;r=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new O(e)}static create(e){return new O(e)}},Ze=class O extends vt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ns(this,(t,i,r,n,s)=>e=e.replace(r,r+(i-t),s),!1),e}mapDesc(e,t=!1){return Fs(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,n=0;r<t.length;r+=2){let s=t[r],a=t[r+1];if(a>=0){t[r]=a,t[r+1]=s;let o=r>>1;for(;i.length<o;)i.push(E.empty);i.push(s?e.slice(n,n+s):E.empty)}n+=s}return new O(t,i)}compose(e){return this.empty?e:e.empty?this:_h(this,e,!0)}map(e,t=!1){return e.empty?this:Fs(this,e,t,!0)}iterChanges(e,t=!1){Ns(this,e,t)}get desc(){return vt Line truncated
`}get readOnly(){return this.facet(jh)}phrase(e,...t){for(let i of this.facet(O.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let n=+(r||1);return!n||n>t.length?i:t[n-1]})),e}languageDataAt(e,t,i=-1){let r=[];for(let n of this.facet(Vh))for(let s of n(this,t,i))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return Ng(t.length?t[0]:"")}wordAt(e){let{text:t,from:i,length:r}=this.doc.lineAt(e),n=this.charCategorizer(e),s=e-i,a=e-i;for(;s>0;){let o=fe(t,s,!1);if(n(t.slice(o,s))!=ee.Word)break;s=o}for(;a<r;){let o=fe(t,a);if(n(t.slice(a,o))!=ee.Word)break;a=o}return s==a?null:S.range(s+i,a+i)}};I.allowMultipleSelections=Ks;I.tabSize=Z.define({combine:O=>O.length?O[0]:4});I.lineSeparator=qh;I.readOnly=jh;I.phrases=Z.define({compare(O,e){let t=Object.keys(O),i=Object.keys(e);return t.length==i.length&&t.every(r=>O[r]==e[r])}});I.languageData=Vh;I.changeFilter=zh;I.transactionFilter=Uh;I.transactionExtender=Wh;FO.reconfigure=V.define();function xe(O,e,t={}){let i={};for(let r of O)for(let n of Object.keys(r)){let s=r[n],a=i[n];if(a===void 0)i[n]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(t,n))i[n]=t[n](a,s);else throw new Error("Config merge conflict for field "+n)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}var tt=class{eq(e){return this==e}range(e,t=e){return Yi.create(e,t,this)}};tt.prototype.startSide=tt.prototype.endSide=0;tt.prototype.point=!1;tt.prototype.mapMode=pe.TrackDel;function oa(O,e){return O==e||O.constructor==e.constructor&&O.eq(e)}var Yi=class O{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new O(e,t,i)}};function ia(O,e){return O.from-e.from||O.value.startSide-e.value.startSide}var ra=class O{constructor(e,t,i,r){this.from=e,this.to=t,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,r=0){let n=i?this.to:this.from;for(let s=r,a=n.length;;){if(s==a)return s;let o=s+a>>1,l=n[o]-e||(i?this.value[o].endSide:this.value[o].startSide)-t;if(o==s)return l>=0?s:a;l>=0?a=o:s=o+1}}between(e,t,i,r){for(let n=this.findIndex(t,-1e9,!0),s=this.findIndex(i,1e9,!1,n);n<s;n++)if(r(this.from[n]+e,this.to[n]+e,this.value[n])===!1)return!1}map(e,t){let i=[],r=[],n=[],s=-1,a=-1;for(let o=0;o<this.value.length;o++){let l=this.value[o],c=this.from[o]+e,h=this.to[o]+e,f,u;if(c==h){let Q=t.mapPos(c,l.startSide,l.mapMode);if(Q==null||(f=u=Q,l.startSide!=l.endSide&&(u=t.mapPos(c,l.endSide),u<f)))continue}else if(f=t.mapPos(c,l.startSide),u=t.mapPos(h,l.endSide),f>u||f==u&&l.startSide>0&&l.endSide<=0)continue;(u-f||l.endSide-l.startSide)<0||(s<0&&(s=f),l.point&&(a=Math.max(a,u-f)),i.push(l),r.push(f-s),n.push(u-s))}return{mapped:i.length?new O(r,n,i,a):null,pos:s}}},M=class O{constructor(e,t,i,r){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=r}static create(e,t,i,r){return new O(e,t,i,r)}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 t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:r=0,filterTo:n=this.length}=e,s=e.filter;if(t.length==0&&!s)return this;if(i&&(t=t.slice().sort(ia)),this.isEmpty)return t.length?O.of(t):this;let a=new Hr(this,null,-1).goto(0),o=0,l=[],c=new Le;for(;a.value||o<t.length;)if(o<t.length&&(a.from-t[o].from||a.startSide-t[o].value.startSide)>=0){let h=t[o++];c.addInner(h.from,h.to,h.value)||l.push(h)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(o==t.length||this.chunkEnd(a.chunkIndex)<t[o].from)&&(!s||r>this.chunkEnd(a.chunkIndex)||n<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||r>a.to||n<a.from||s(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||l.push(Yi.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?O.empty:this.nextLayer.update({add:l,filter:s,filterFrom:r,filterTo:n}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],r=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],o=this.chunk[s],l=e.touchesRange(a,a+o.length);if(l===!1)r=Math.max(r,o.maxPoint),t.push(o),i.push(e.mapPos(a));else if(l===!0){let{mapped:c,pos:h}=o.map(a,e);c&&(r=Math.max(r,c.maxPoint),t.push(c),i.push(h))}}let n=this.nextLayer.map(e);return t.length==0?n:new O(i,t,n||O.empty,r)}between(e,t,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let n=this.chunkPos[r],s=this.chunk[r];if(t>=n&&e<=n+s.length&&s.between(n,e-n,t-n,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return _i.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return _i.from(e).goto(t)}static compare(e,t,i,r,n=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxP Line truncated
`)}static newName(){let e=Ah[Eh]||1;return Ah[Eh]=e+1,"\u037C"+e.toString(36)}static mount(e,t,i){let r=e[la],n=i&&i.nonce;r?n&&r.setNonce(n):r=new ca(e,n),r.mount(Array.isArray(t)?t:[t],e)}},Lh=new Map,ca=class{constructor(e,t){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let n=Lh.get(i);if(n)return e[la]=n;this.sheet=new r.CSSStyleSheet,Lh.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[la]=this}mount(e,t){let i=this.sheet,r=0,n=0;for(let s=0;s<e.length;s++){let a=e[s],o=this.modules.indexOf(a);if(o<n&&o>-1&&(this.modules.splice(o,1),n--,o=-1),o==-1){if(this.modules.splice(n++,0,a),i)for(let l=0;l<a.rules.length;l++)i.insertRule(a.rules[l],r++)}else{for(;n<o;)r+=this.modules[n++].rules.length;r+=a.rules.length,n++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let s="";for(let o=0;o<this.modules.length;o++)s+=this.modules[o].getRules()+`
`;this.styleTag.textContent=s;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};var Yt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},HO={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Hg=typeof navigator<"u"&&/Mac/.test(navigator.platform),Kg=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for($e=0;$e<10;$e++)Yt[48+$e]=Yt[96+$e]=String($e);var $e;for($e=1;$e<=24;$e++)Yt[$e+111]="F"+$e;var $e;for($e=65;$e<=90;$e++)Yt[$e]=String.fromCharCode($e+32),HO[$e]=String.fromCharCode($e);var $e;for(Jr in Yt)HO.hasOwnProperty(Jr)||(HO[Jr]=Yt[Jr]);var Jr;function Mh(O){var e=Hg&&O.metaKey&&O.shiftKey&&!O.ctrlKey&&!O.altKey||Kg&&O.shiftKey&&O.key&&O.key.length==1||O.key=="Unidentified",t=!e&&O.key||(O.shiftKey?HO:Yt)[O.keyCode]||O.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function N(){var O=arguments[0];typeof O=="string"&&(O=document.createElement(O));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];typeof r=="string"?O.setAttribute(i,r):r!=null&&(O[i]=r)}e++}for(;e<arguments.length;e++)Dh(O,arguments[e]);return O}function Dh(O,e){if(typeof e=="string")O.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)O.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Dh(O,e[t]);else throw new RangeError("Unsupported child node: "+e)}var Ye=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},ga=typeof document<"u"?document:{documentElement:{style:{}}},Pa=/Edge\/(\d+)/.exec(Ye.userAgent),_f=/MSIE \d/.test(Ye.userAgent),Sa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ye.userAgent),Rn=!!(_f||Sa||Pa),Ih=!Rn&&/gecko\/(\d+)/i.test(Ye.userAgent),ha=!Rn&&/Chrome\/(\d+)/.exec(Ye.userAgent),Bh="webkitFontSmoothing"in ga.documentElement.style,Xa=!Rn&&/Apple Computer/.test(Ye.vendor),Nh=Xa&&(/Mobile\/\w+/.test(Ye.userAgent)||Ye.maxTouchPoints>2),v={mac:Nh||/Mac/.test(Ye.platform),windows:/Win/.test(Ye.platform),linux:/Linux|X11/.test(Ye.platform),ie:Rn,ie_version:_f?ga.documentMode||6:Sa?+Sa[1]:Pa?+Pa[1]:0,gecko:Ih,gecko_version:Ih?+(/Firefox\/(\d+)/.exec(Ye.userAgent)||[0,0])[1]:0,chrome:!!ha,chrome_version:ha?+ha[1]:0,ios:Nh,android:/Android\b/.test(Ye.userAgent),webkit:Bh,webkit_version:Bh?+(/\bAppleWebKit\/(\d+)/.exec(Ye.userAgent)||[0,0])[1]:0,safari:Xa,safari_version:Xa?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Ye.userAgent)||[0,0])[1]:0,tabSize:ga.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function uo(O,e){for(let t in O)t=="class"&&e.class?e.class+=" "+O.class:t=="style"&&e.style?e.style+=";"+O.style:e[t]=O[t];return e}var $n=Object.create(null);function Qo(O,e,t){if(O==e)return!0;O||(O=$n),e||(e=$n);let i=Object.keys(O),r=Object.keys(e);if(i.length-(t&&i.indexOf(t)>-1?1:0)!=r.length-(t&&r.indexOf(t)>-1?1:0))return!1;for(let n of i)if(n!=t&&(r.indexOf(n)==-1||O[n]!==e[n]))return!1;return!0}function Jg(O,e){for(let t=O.attributes.length-1;t>=0;t--){let i=O.attributes[t].name;e[i]==null&&O.removeAttribute(i)}for(let t in e){let i=e[t];t=="style"?O.style.cssText=i:O.getAttribute(t)!=i&&O.setAttribute(t,i)}}function Fh(O,e,t){let i=!1;if(e)for(let r in e)t&&r in t||(i=!0,r=="style"?O.style.cssText="":O.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(i=!0,r=="style"?O.style.cssText=t[r]:O.setAttribute(r,t[r]));return i}function eP(O){let e=Object.create(null);for(let t=0;t<O.attributes.length;t++){let i=O.attributes[t];e[i.name]=i.value}return e}var _e=class{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},Te=(function(O){return O[O.Text=0]="Text",O[O.WidgetBefore=1]="WidgetBefore",O[O.WidgetAfter=2]="WidgetAfter",O[O.WidgetRange=3]="WidgetRange",O})(Te||(Te={})),Y=class extends tt{constructor(e,t,i,r){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=r}get heiLine truncated
`,r=O.state.doc.line(r.number+(t?1:-1)),n=O.bidiSpans(r),l=O.visualLineSide(r,!t)}if(o){if(!o(c))return a}else{if(!i)return l;o=i(c)}a=l}}function VP(O,e,t){let i=O.state.charCategorizer(e),r=i(t);return n=>{let s=i(n);return r==ee.Space&&(r=s),r==s}}function qP(O,e,t,i){let r=e.head,n=t?1:-1;if(r==(t?O.state.doc.length:0))return S.cursor(r,e.assoc);let s=e.goalColumn,a,o=O.contentDOM.getBoundingClientRect(),l=O.coordsAtPos(r,e.assoc||-1),c=O.documentTop;if(l)s==null&&(s=l.left-o.left),a=n<0?l.top:l.bottom;else{let u=O.viewState.lineBlockAt(r);s==null&&(s=Math.min(o.right-o.left,O.defaultCharacterWidth*(r-u.from))),a=(n<0?u.top:u.bottom)+c}let h=o.left+s,f=i??O.viewState.heightOracle.textHeight>>1;for(let u=0;;u+=10){let Q=a+(f+u)*n,$=Wa(O,{x:h,y:Q},!1,n);return S.cursor($.pos,$.assoc,void 0,s)}}function Ei(O,e,t){for(;;){let i=0;for(let r of O)r.between(e-1,e+1,(n,s,a)=>{if(e>n&&e<s){let o=i||t||(e-n<s-e?-1:1);e=o<0?n:s,i=o}});if(!i)return e}}function ad(O,e){let t=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],n=null;if(r.empty){let s=Ei(O,r.from,0);s!=r.from&&(n=S.cursor(s,-1))}else{let s=Ei(O,r.from,-1),a=Ei(O,r.to,1);(s!=r.from||a!=r.to)&&(n=S.range(r.from==r.anchor?s:a,r.from==r.head?s:a))}n&&(t||(t=e.ranges.slice()),t[i]=n)}return t?S.create(t,e.mainIndex):e}function ua(O,e,t){let i=Ei(O.state.facet(Ji).map(r=>r(O)),t.from,e.head>t.from?-1:1);return i==t.from?t:S.cursor(i,i<t.from?1:-1)}var rt=class{constructor(e,t){this.pos=e,this.assoc=t}};function Wa(O,e,t,i){let r=O.contentDOM.getBoundingClientRect(),n=r.top+O.viewState.paddingTop,{x:s,y:a}=e,o=a-n,l;for(;;){if(o<0)return new rt(0,1);if(o>O.viewState.docHeight)return new rt(O.state.doc.length,-1);if(l=O.elementAtHeight(o),i==null)break;if(l.type==Te.Text){let f=O.docView.coordsAt(i<0?l.from:l.to,i);if(f&&(i<0?f.top<=o+n:f.bottom>=o+n))break}let h=O.viewState.heightOracle.textHeight/2;o=i>0?l.bottom+h:l.top-h}if(O.viewport.from>=l.to||O.viewport.to<=l.from){if(t)return null;if(l.type==Te.Text){let h=_P(O,r,l,s,a);return new rt(h,h==l.from?1:-1)}}if(l.type!=Te.Text)return o<(l.top+l.bottom)/2?new rt(l.from,1):new rt(l.to,-1);let c=O.docView.lineAt(l.from,2);return(!c||c.length!=l.length)&&(c=O.docView.lineAt(l.from,-2)),od(O,c,l.from,s,a)}function od(O,e,t,i,r){let n=-1,s=null,a=1e9,o=1e9,l=r,c=r,h=(f,u)=>{for(let Q=0;Q<f.length;Q++){let $=f[Q];if($.top==$.bottom)continue;let p=$.left>i?$.left-i:$.right<i?i-$.right:0,m=$.top>r?$.top-r:$.bottom<r?r-$.bottom:0;$.top<=c&&$.bottom>=l&&(l=Math.min($.top,l),c=Math.max($.bottom,c),m=0),(n<0||(m-o||p-a)<0)&&(n>=0&&o&&a<p&&s.top<=c-2&&s.bottom>=l+2?o=0:(n=u,a=p,o=m,s=$))}};if(e.isText()){for(let u=0;u<e.length;){let Q=fe(e.text,u);if(h(Ni(e.dom,u,Q).getClientRects(),u),!a&&!o)break;u=Q}return i>(s.left+s.right)/2==(rf(O,n+t)==H.LTR)?new rt(t+fe(e.text,n),-1):new rt(t+n,1)}else{if(!e.length)return new rt(t,1);for(let $=0;$<e.children.length;$++){let p=e.children[$];if(p.flags&48)continue;let m=(p.dom.nodeType==1?p.dom:Ni(p.dom,0,p.length)).getClientRects();if(h(m,$),!a&&!o)break}let f=e.children[n],u=e.posBefore(f,t);return f.isComposite()||f.isText()?od(O,f,u,Math.max(s.left,Math.min(s.right,i)),r):i>(s.left+s.right)/2==(rf(O,n+t)==H.LTR)?new rt(u+f.length,-1):new rt(u,1)}}function rf(O,e){let t=O.state.doc.lineAt(e);return O.bidiSpans(t)[ct.find(O.bidiSpans(t),e-t.from,-1,1)].dir}var qi="\uFFFF",ja=class{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(I.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=qi}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let n=this.text.length;this.readNode(r);let s=de.get(r),a=r.nextSibling;if(a==t){s?.breakAfter&&!a&&i!=this.view.contentDOM&&this.lineBreak();break}let o=de.get(a);(s&&o?s.breakAfter:(s?s.breakAfter:mn(r))||mn(a)&&(r.nodeName!="BR"||s?.isWidget())&&this.text.length>n)&&!UP(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let n=-1,s=1,a;if(this.lineSeparator?(n=t.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(a=r.exec(t))&&(n=a.index,s=a[0].length),this.append(t.slice(i,n<0?t.length:n)),n<0)break;if(this.lineBreak(),s>1)for(let o of this.points)o.node==e&&o.pos>this.text.length&&(o.pos-=s-1);i=n+s}}readNode(e){let t=de.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.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,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(zP(e,i.node,i.offs Line truncated
`&&O.lineWrapping&&(i&&(i=S.single(i.main.anchor-1,i.main.head-1)),t={from:r.from,to:r.to,insert:E.of([" "])}),t)return So(O,t,i,n);if(i&&!i.main.eq(r)){let s=!1,a="select";return O.inputState.lastSelectionTime>Date.now()-50&&(O.inputState.lastSelectionOrigin=="select"&&(s=!0),a=O.inputState.lastSelectionOrigin,a=="select.pointer"&&(i=ad(O.state.facet(Ji).map(o=>o(O)),i))),O.dispatch({selection:i,scrollIntoView:s,userEvent:a}),!0}else return!1}function So(O,e,t,i=-1){if(v.ios&&O.inputState.flushIOSKey(e))return!0;let r=O.state.selection.main;if(v.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&O.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ii(O.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&ii(O.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&ii(O.contentDOM,"Delete",46)))return!0;let n=e.insert.toString();O.inputState.composing>=0&&O.inputState.composing++;let s,a=()=>s||(s=WP(O,e,t));return O.state.facet(Bf).some(o=>o(O,e.from,e.to,n,a))||O.dispatch(a()),!0}function WP(O,e,t){let i,r=O.state,n=r.selection.main,s=-1;if(e.from==e.to&&e.from<n.from||e.from>n.to){let o=e.from<n.from?-1:1,l=o<0?n.from:n.to,c=Ei(r.facet(Ji).map(h=>h(O)),l,o);e.from==c&&(s=c)}if(s>-1)i={changes:e,selection:S.cursor(e.from+e.insert.length,-1)};else if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&O.inputState.composing<0){let o=n.from<e.from?r.sliceDoc(n.from,e.from):"",l=n.to>e.to?r.sliceDoc(e.to,n.to):"";i=r.replaceSelection(O.state.toText(o+e.insert.sliceString(0,void 0,O.state.lineBreak)+l))}else{let o=r.changes(e),l=t&&t.main.to<=o.newLength?t.main:void 0;if(r.selection.ranges.length>1&&(O.inputState.composing>=0||O.inputState.compositionPendingChange)&&e.to<=n.to+10&&e.to>=n.to-10){let c=O.state.sliceDoc(e.from,e.to),h,f=t&&sd(O,t.main.head);if(f){let Q=e.insert.length-(e.to-e.from);h={from:f.from,to:f.to-Q}}else h=O.state.doc.lineAt(n.head);let u=n.to-e.to;i=r.changeByRange(Q=>{if(Q.from==n.from&&Q.to==n.to)return{changes:o,range:l||Q.map(o)};let $=Q.to-u,p=$-c.length;if(O.state.sliceDoc(p,$)!=c||$>=h.from&&p<=h.to)return{range:Q};let m=r.changes({from:p,to:$,insert:e.insert}),g=Q.to-n.to;return{changes:m,range:l?S.range(Math.max(0,l.anchor+g),Math.max(0,l.head+g)):Q.map(m)}})}else i={changes:o,selection:l&&r.selection.replaceRange(l)}}let a="input.type";return(O.composing||O.inputState.compositionPendingChange&&O.inputState.compositionEndedAt>Date.now()-50)&&(O.inputState.compositionPendingChange=!1,a+=".compose",O.inputState.compositionFirstChange&&(a+=".start",O.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}function hd(O,e,t,i){let r=Math.min(O.length,e.length),n=0;for(;n<r&&O.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==r&&O.length==e.length)return null;let s=O.length,a=e.length;for(;s>0&&a>0&&O.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(i=="end"){let o=Math.max(0,n-Math.min(s,a));t-=s+o-n}if(s<n&&O.length<e.length){let o=t<=n&&t>=s?n-t:0;n-=o,a=n+(a-s),s=n}else if(a<n){let o=t<=n&&t>=a?n-t:0;n-=o,s=n+(s-a),a=n}return{from:n,toA:s,toB:a}}function jP(O){let e=[];if(O.root.activeElement!=O.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:n}=O.observer.selectionRange;return t&&(e.push(new Tn(t,i)),(r!=t||n!=i)&&e.push(new Tn(r,n))),e}function CP(O,e){if(O.length==0)return null;let t=O[0].pos,i=O.length==2?O[1].pos:t;return t>-1&&i>-1?S.single(t+e,i+e):null}var Ga=class{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.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,v.safari&&e.contentDOM.addEventListener("input",()=>null),v.gecko&&eS(e.contentDOM.ownerDocument)}handleEvent(e){!IP(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,t){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,t);for(let r of i.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=GP(e),i=this.handlers,r=this.view.contentDOM;for(let n in t)if(n!="scroll"){let s=!t[n].handlers.length,a=i[n];a&&s!=!a.handlers.length&&(r.removeEventListen Line truncated
`))};if((v.mac||v.android)&&h.from==s-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:o,insert:E.of([i.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let f=this.to-this.from+(h.to-h.from+h.insert.length);So(e,h,S.single(this.toEditorPos(i.selectionStart,f),this.toEditorPos(i.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),h.from<h.to&&!h.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],n=null;for(let s=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);s<a;s++){let o=e.coordsForChar(s);n=o&&new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top)||n||new DOMRect,r.push(n)}t.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let n of i.getTextFormats()){let s=n.underlineStyle,a=n.underlineThickness;if(!/none/i.test(s)&&!/none/i.test(a)){let o=this.toEditorPos(n.rangeStart),l=this.toEditorPos(n.rangeEnd);if(o<l){let c=`text-decoration: underline ${/^[a-z]/.test(s)?s+" ":s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;r.push(Y.mark({attributes:{style:c}}).range(o,l))}}}e.dispatch({effects:Jf.of(Y.set(r))})},this.handlers.compositionstart=()=>{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)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=Bi(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((n,s,a,o,l)=>{if(i)return;let c=l.length-(s-n);if(r&&s>=r.to)if(r.from==n&&r.to==s&&r.insert.eq(l)){r=this.pendingContextChange=null,t+=c,this.to+=c;return}else r=null,this.revertPending(e.state);if(n+=t,s+=t,s<=this.from)this.from+=c,this.to+=c;else if(n<this.to){if(n<this.from||s>this.to||this.to-this.from+l.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(n),this.toContextPos(s),l.toString()),this.to+=c}t+=c}),r&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.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||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+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 t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},T=class O{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 t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRe Line truncated
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,no),xS={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"},$a=null;function kS(){var O;if($a==null&&typeof document<"u"&&document.body){let e=document.body.style;$a=((O=e.tabSize)!==null&&O!==void 0?O:e.MozTabSize)!=null}return $a||!1}var un=Z.define({combine(O){let e=xe(O,{render:null,specialChars:yS,addSpecialChars:null});return(e.replaceTabs=!kS())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,no)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,no)),e}});function _d(O={}){return[un.of(O),wS()]}var bf=null;function wS(){return bf||(bf=he.fromClass(class{constructor(O){this.view=O,this.decorations=Y.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(O.state.facet(un)),this.decorations=this.decorator.createDeco(O)}makeDecorator(O){return new ro({regexp:O.specialChars,decoration:(e,t,i)=>{let{doc:r}=t.state,n=Se(e[0],0);if(n==9){let s=r.lineAt(i),a=t.state.tabSize,o=ve(s.text,a,i-s.from);return Y.replace({widget:new ao((a-o%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[n]||(this.decorationCache[n]=Y.replace({widget:new so(O,n)}))},boundary:O.replaceTabs?void 0:/[^]/})}update(O){let e=O.state.facet(un);O.startState.facet(un)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(O.view)):this.decorations=this.decorator.updateDeco(O,this.decorations)}},{decorations:O=>O.decorations}))}var ZS="\u2022";function vS(O){return O>=32?ZS:O==10?"\u2424":String.fromCharCode(9216+O)}var so=class extends _e{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=vS(this.code),i=e.state.phrase("Control character")+" "+(xS[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,t);if(r)return r;let n=document.createElement("span");return n.textContent=t,n.title=i,n.setAttribute("aria-label",i),n.className="cm-specialChar",n}ignoreEvent(){return!1}},ao=class extends _e{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 Rd(){return _S}var YS=Y.line({class:"cm-activeLine"}),_S=he.fromClass(class{constructor(O){this.decorations=this.getDeco(O)}update(O){(O.docChanged||O.selectionSet)&&(this.decorations=this.getDeco(O.view))}getDeco(O){let e=-1,t=[];for(let i of O.state.selection.ranges){let r=O.lineBlockAt(i.head);r.from>e&&(t.push(YS.range(r.from)),e=r.from)}return Y.set(t)}},{decorations:O=>O.decorations});var oo=2e3;function RS(O,e,t){let i=Math.min(e.line,t.line),r=Math.max(e.line,t.line),n=[];if(e.off>oo||t.off>oo||e.col<0||t.col<0){let s=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let o=i;o<=r;o++){let l=O.doc.line(o);l.length<=a&&n.push(S.range(l.from+s,l.to+a))}}else{let s=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let o=i;o<=r;o++){let l=O.doc.line(o),c=Kr(l.text,s,O.tabSize,!0);if(c<0)n.push(S.cursor(l.to));else{let h=Kr(l.text,a,O.tabSize);n.push(S.range(l.from+c,l.from+h))}}}return n}function VS(O,e){let t=O.coordsAtPos(O.viewport.from);return t?Math.round(Math.abs((t.left-e)/O.defaultCharacterWidth)):-1}function yf(O,e){let t=O.posAtCoords({x:e.clientX,y:e.clientY},!1),i=O.state.doc.lineAt(t),r=t-i.from,n=r>oo?-1:r==i.length?VS(O,e.clientX):ve(i.text,O.state.tabSize,t-i.from);return{line:i.number,col:n,off:r}}function qS(O,e){let t=yf(O,e),i=O.state.selection;return t?{update(r){if(r.docChanged){let n=r.changes.mapPos(r.startState.doc.line(t.line).from),s=r.state.doc.lineAt(n);t={line:s.number,col:t.col,off:Math.min(t.off,s.length)},i=i.map(r.changes)}},get(r,n,s){let a=yf(O,r);if(!a)return i;let o=RS(O.state,t,a);return o.length?s?S.create(o.concat(i.ranges)):S.create(o):i}}:null}function Vd(O){let e=O?.eventFilter||(t=>t.altKey&&t.button==0);return T.mouseSelectionStyle.of((t,i)=>e(i)?qS(t,i):null)}var zS={Alt:[18,O=>!!O.altKey],Control:[17,O=>!!O.ctrlKey],Shift:[16,O=>!!O.shiftKey],Meta:[91,O=>!!O.metaKey]},US={style:"cursor: crosshair"};function qd(O={}){let[e,t]=zS[O.key||"Alt"],i=he.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||t(r))},keyup(r){(r.keyCode==e||!t(r))&&this.set(!1)},mousemove(r){this.set(t(r))}}});return[i,T.contentAttributes.o Line truncated
`: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 cl(this):new ll(this)}getCursor(e,t=0,i){let r=e.doc?e:I.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?ui(this,r,t,i):di(this,r,t,i)}},ls=class{constructor(e){this.spec=e}};function di(O,e,t,i){return new lO(e.doc,O.unquoted,t,i,O.caseSensitive?void 0:r=>r.toLowerCase(),O.wholeWord?h1(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function h1(O,e){return(t,i,r,n)=>((n>t||n+r.length<i)&&(n=Math.max(0,t-2),r=O.sliceString(n,Math.min(O.length,i+2))),(e(cs(r,t-n))!=ee.Word||e(hs(r,t-n))!=ee.Word)&&(e(hs(r,i-n))!=ee.Word||e(cs(r,i-n))!=ee.Word))}var ll=class extends ls{constructor(e){super(e)}nextMatch(e,t,i){let r=di(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=di(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==i?null:r.value}prevMatchInRange(e,t,i){for(let r=i;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),s=di(this.spec,e,n,r),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,i){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=di(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let n=di(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!n.next().done;)r(n.value.from,n.value.to)}};function ui(O,e,t,i){return new rs(e.doc,O.search,{ignoreCase:!O.caseSensitive,test:O.wholeWord?f1(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function cs(O,e){return O.slice(fe(O,e,!1),e)}function hs(O,e){return O.slice(e,fe(O,e))}function f1(O){return(e,t,i)=>!i[0].length||(O(cs(i.input,i.index))!=ee.Word||O(hs(i.input,i.index))!=ee.Word)&&(O(hs(i.input,i.index+i[0].length))!=ee.Word||O(cs(i.input,i.index+i[0].length))!=ee.Word)}var cl=class extends ls{nextMatch(e,t,i){let r=ui(this.spec,e,i,e.doc.length).next();return r.done&&(r=ui(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,i){for(let r=1;;r++){let n=Math.max(t,i-r*1e4),s=ui(this.spec,e,n,i),a=null;for(;!s.next().done;)a=s.value;if(a&&(n==t||a.from>n+10))return a;if(n==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let n=+i.slice(0,r);if(n>0&&n<e.match.length)return e.match[n]+i.slice(r)}return t})}matchAll(e,t){let i=ui(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let n=ui(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!n.next().done;)r(n.value.from,n.value.to)}},$r=V.define(),ul=V.define(),oO=ce.define({create(O){return new Qr(hl(O).create(),null)},update(O,e){for(let t of e.effects)t.is($r)?O=new Qr(t.value.create(),O.panel):t.is(ul)&&(O=new Qr(O.query,t.value?Ql:null));return O},provide:O=>TO.from(O,e=>e.panel)});var Qr=class{constructor(e,t){this.query=e,this.panel=t}},d1=Y.mark({class:"cm-searchMatch"}),u1=Y.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Q1=he.fromClass(class{constructor(O){this.view=O,this.decorations=this.highlight(O.state.field(oO))}update(O){let e=O.state.field(oO);(e!=O.startState.field(oO)||O.docChanged||O.selectionSet||O.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:O,panel:e}){if(!e||!O.spec.valid)return Y.none;let{view:t}=this,i=new Le;for(let r=0,n=t.visibleRanges,s=n.length;r<s;r++){let{from:a,to:o}=n[r];for(;r<s-1&&o>n[r+1].from-500;)o=n[++r].to;O.highlight(t.state,a,o,(l,c)=>{let h=t.state.selection.ranges.some(f=>f.from==l&&f.to==c);i.add(l,c,h?u1:d1)})}return i.finish()}},{decorations:O=>O.decorations});function pr(O){return e=>{let t=e.state.field(oO,!1);return t&&t.query.spec.valid?O(e,t):yQ(e)}}var fs=pr((O,{query:e})=>{let{to:t}=O.state.selection.main,i=e.nextMatch(O.state,t,t);if(!i)return!1;let r=S.single(i.from,i.to),n=O.state.facet(Qi);return O.dispatch({selection:r,effects:[$l(O,i),n.scrollToMatch(r.main,O)],userEvent:"select.search"}),bQ(O),!0}),ds=pr((O,{query:e})=>{let{state:t}=O,{from:i}=t.selection.main,r=e.prevMatch(t,i,i);if(!r)return!1;let n=S.single(r.from,r.to),s=O.state.facet(Qi);return O.dispatch({selection:n,effects:[$l(O,r),s.scrollToMatch(n.main,O)],userEvent:"select.search"}),bQ(O),!0}),$1=pr((O,{query:e})=>{let t=e.matchAll(O.state,1e3);return!t||!t.length?!1:(O.dispatch({selection:S.create(t.map(i=>S.range(i.from Line truncated
var Ms=[],bh=[];(()=>{let O="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,t=0;e<O.length;e++)(e%2?bh:Ms).push(t=t+O[e])})();function Ag(O){if(O<768)return!1;for(let e=0,t=Ms.length;;){let i=e+t>>1;if(O<Ms[i])t=i;else if(O>=bh[i])e=i+1;else return!0;if(e==t)return!1}}function Xh(O){return O>=127462&&O<=127487}var Th=8205;function xh(O,e,t=!0,i=!0){return(t?wh:Lg)(O,e,i)}function wh(O,e,t){if(e==O.length)return e;e&&kh(O.charCodeAt(e))&&vh(O.charCodeAt(e-1))&&e--;let i=Ls(O,e);for(e+=yh(i);e<O.length;){let r=Ls(O,e);if(i==Th||r==Th||t&&Ag(r))e+=yh(r),i=r;else if(Xh(r)){let n=0,s=e-2;for(;s>=0&&Xh(Ls(O,s));)n++,s-=2;if(n%2==0)break;e+=2}else break}return e}function Lg(O,e,t){for(;e>0;){let i=wh(O,e-2,t);if(i<e)return i;e--}return 0}function Ls(O,e){let t=O.charCodeAt(e);if(!vh(t)||e+1==O.length)return t;let i=O.charCodeAt(e+1);return kh(i)?(t-55296<<10)+(i-56320)+65536:t}function kh(O){return O>=56320&&O<57344}function vh(O){return O>=55296&&O<56320}function yh(O){return O<65536?1:2}var E=class O{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,t,i){[e,t]=FO(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),IO.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=FO(this,e,t);let i=[];return this.decompose(e,t,i,0),IO.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new pO(this),n=new pO(e);for(let s=t,a=t;;){if(r.next(s),n.next(s),s=0,r.lineBreak!=n.lineBreak||r.done!=n.done||r.value!=n.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new pO(this,e)}iterRange(e,t=this.length){return new Mr(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Dr(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]?O.empty:e.length<=32?new Le(e):IO.from(Le.split(e,[]))}},Le=class O extends E{constructor(e,t=Mg(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let n=0;;n++){let s=this.text[n],a=r+s.length;if((t?i:a)>=e)return new Is(r,a,i,s);r=a+1,i++}}decompose(e,t,i,r){let n=e<=0&&t>=this.length?this:new O(Yh(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let s=i.pop(),a=Lr(n.text,s.text.slice(),0,n.length);if(a.length<=32)i.push(new O(a,s.length+n.length));else{let o=a.length>>1;i.push(new O(a.slice(0,o)),new O(a.slice(o)))}}else i.push(n)}replace(e,t,i){if(!(i instanceof O))return super.replace(e,t,i);[e,t]=FO(this,e,t);let r=Lr(this.text,Lr(i.text,Yh(this.text,0,e)),t),n=this.length+i.length-(t-e);return r.length<=32?new O(r,n):IO.from(O.split(r,[]),n)}sliceString(e,t=this.length,i=`
`){[e,t]=FO(this,e,t);let r="";for(let n=0,s=0;n<=t&&s<this.text.length;s++){let a=this.text[s],o=n+a.length;n>e&&s&&(r+=i),e<o&&t>n&&(r+=a.slice(Math.max(0,e-n),t-n)),n=o+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let n of e)i.push(n),r+=n.length+1,i.length==32&&(t.push(new O(i,r)),i=[],r=-1);return r>-1&&t.push(new O(i,r)),t}},IO=class O extends E{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let n=0;;n++){let s=this.children[n],a=r+s.length,o=i+s.lines-1;if((t?o:a)>=e)return s.lineInner(e,t,i,r);r=a+1,i=o+1}}decompose(e,t,i,r){for(let n=0,s=0;s<=t&&n<this.children.length;n++){let a=this.children[n],o=s+a.length;if(e<=o&&t>=s){let l=r&((s<=e?1:0)|(o>=t?2:0));s>=e&&o<=t&&!l?i.push(a):a.decompose(e-s,t-s,i,l)}s=o+1}}replace(e,t,i){if([e,t]=FO(this,e,t),i.lines<this.lines)for(let r=0,n=0;r<this.children.length;r++){let s=this.children[r],a=n+s.length;if(e>=n&&t<=a){let o=s.replace(e-n,t-n,i),l=this.lines-s.lines+o.lines;if(o.lines<l>>4&&o.lines>l>>6){let c=this.children.slice();return c[r]=o,new O(c,this.length-(t-e)+i.length)}return super.replace(n,a,o)}n=a+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
`){[e,t]=FO(this,e,t);let r="";for(let n=0,s=0;n<this.children.length&&s<=t;n++){let a=this.children[n],o=s+a.length;s>e&&n&&(r+=i),e<o&&t>s&&(r+=a.sliceString(e-s,t-s,i)),s=o+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof O))return 0;let i=0,[r,n,s,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,n+=t){if(r==s||n==a)return i;let o=this.children[r],l=e.children[n];if(o!=l)return i+o.scanIdentical(l,t);i+=o.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let u of e)i+=u.lines;if(i<32){let u=[];for(let $ of e)$.flatten(u);return new Le(u,t)}let r=Math.max(32,i>>5),n=r<<1,s=r>>1,a=[],o=0,l=-1,c=[];function h(u){let $;if(u.lines>n&&u instanceof O)for(let Q of u.children)h(Q);else u.lines>s&&(o>s||!o)?(f(),a.push(u)):u instanceof Le&&o&&($=c[c.length-1])instanceof Le&&u.lines+$.lines<=32?(o+=u.lines,l+=u.length+1,c[c.length-1]=new Le($.text.concat(u.text),$.length+1+u.length)):(o+u.lines>r&&f(),o+=u.lines,l+=u.length+1,c.push(u))}function f(){o!=0&&(a.push(c.length==1?c[0]:O.from(c,l)),l=-1,o=c.length=0)}for(let u of e)h(u);return f(),a.length==1?a[0]:new O(a,t)}};E.empty=new Le([""],0);function Mg(O){let e=-1;for(let t of O)e+=t.length+1;return e}function Lr(O,e,t=0,i=1e9){for(let r=0,n=0,s=!0;n<O.length&&r<=i;n++){let a=O[n],o=r+a.length;o>=t&&(o>i&&(a=a.slice(0,i-r)),r<t&&(a=a.slice(t-r)),s?(e[e.length-1]+=a,s=!1):e.push(a)),r=o+1}return e}function Yh(O,e,t){return Lr(O,[""],e,t)}var pO=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Le?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],n=this.offsets[i],s=n>>1,a=r instanceof Le?r.text.length:r.children.length;if(s==(t>0?a:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((n&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(r instanceof Le){let o=r.text[s+(t<0?-1:0)];if(this.offsets[i]+=t,o.length>Math.max(0,e))return this.value=e==0?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=r.children[s+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof Le?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Mr=class{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new pO(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.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!=""}},Dr=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=function(){return this.iter()},pO.prototype[Symbol.iterator]=Mr.prototype[Symbol.iterator]=Dr.prototype[Symbol.iterator]=function(){return this});var Is=class{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}};function FO(O,e,t){return e=Math.max(0,Math.min(O.length,e)),[e,Math.max(e,Math.min(O.length,t))]}function ue(O,e,t=!0,i=!0){return xh(O,e,t,i)}function Dg(O){return O>=56320&&O<57344}function Ig(O){return O>=55296&&O<56320}function Se(O,e){let t=O.charCodeAt(e);if(!Ig(t)||e+1==O.length)return t;let i=O.charCodeAt(e+1);return Dg(i)?(t-55296<<10)+(i-56320)+65536:t}function Ui(O){return O<=65535?String.fromCharCode(O):(O-=65536,String.fromCharCode((O>>10)+55296,(O&1023)+56320))}function De(O){return O<65536?1:2}var Bs=/\r\n?|\n/,pe=(function(O){return O[O.Simple=0]="Simple",O[O.TrackDel=1]="TrackDel",O[O.TrackBefore=2]="TrackBefore",O[O.TrackAfter=3]="TrackAfter",O})(pe||(pe={})),Yt=class O{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?(e(i,r,n),r+=n):r+=s,i+=n}}iterChangedRanges(e,t=!1){Ns(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new O(e)}composeDesc(e){return this.empty?e:e.empty?this:Uh(this,e)}mapDesc(e,t=!1){return e.empty?this:Fs(this,e,t)}mapPos(e,t=-1,i=pe.Simple){let r=0,n=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],o=this.sections[s++],l=r+a;if(o<0){if(l>e)return n+(e-r);n+=a}else{if(i!=pe.Simple&&l>=e&&(i==pe.TrackDel&&r<e&&l>e||i==pe.TrackBefore&&r<e||i==pe.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?n:n+o;n+=o}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return n}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let n=this.sections[i++],s=this.sections[i++],a=r+n;if(s>=0&&r<=t&&a>=e)return r<e&&a>t?"cover":!0;r=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new O(e)}static create(e){return new O(e)}},ve=class O extends Yt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ns(this,(t,i,r,n,s)=>e=e.replace(r,r+(i-t),s),!1),e}mapDesc(e,t=!1){return Fs(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,n=0;r<t.length;r+=2){let s=t[r],a=t[r+1];if(a>=0){t[r]=a,t[r+1]=s;let o=r>>1;for(;i.length<o;)i.push(E.empty);i.push(s?e.slice(n,n+s):E.empty)}n+=s}return new O(t,i)}compose(e){return this.empty?e:e.empty?this:Uh(this,e,!0)}map(e,t=!1){return e.empty?this:Fs(this,e,t,!0)}iterChanges(e,t=!1){Ns(this,e,t)}get desc(){return Yt Line truncated
`}get readOnly(){return this.facet(Eh)}phrase(e,...t){for(let i of this.facet(O.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let n=+(r||1);return!n||n>t.length?i:t[n-1]})),e}languageDataAt(e,t,i=-1){let r=[];for(let n of this.facet(zh))for(let s of n(this,t,i))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return OP(t.length?t[0]:"")}wordAt(e){let{text:t,from:i,length:r}=this.doc.lineAt(e),n=this.charCategorizer(e),s=e-i,a=e-i;for(;s>0;){let o=ue(t,s,!1);if(n(t.slice(o,s))!=ee.Word)break;s=o}for(;a<r;){let o=ue(t,a);if(n(t.slice(a,o))!=ee.Word)break;a=o}return s==a?null:S.range(s+i,a+i)}};I.allowMultipleSelections=Ks;I.tabSize=k.define({combine:O=>O.length?O[0]:4});I.lineSeparator=Wh;I.readOnly=Eh;I.phrases=k.define({compare(O,e){let t=Object.keys(O),i=Object.keys(e);return t.length==i.length&&t.every(r=>O[r]==e[r])}});I.languageData=zh;I.changeFilter=jh;I.transactionFilter=Ch;I.transactionExtender=Gh;HO.reconfigure=V.define();function xe(O,e,t={}){let i={};for(let r of O)for(let n of Object.keys(r)){let s=r[n],a=i[n];if(a===void 0)i[n]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(t,n))i[n]=t[n](a,s);else throw new Error("Config merge conflict for field "+n)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}var Ot=class{eq(e){return this==e}range(e,t=e){return Ri.create(e,t,this)}};Ot.prototype.startSide=Ot.prototype.endSide=0;Ot.prototype.point=!1;Ot.prototype.mapMode=pe.TrackDel;function oa(O,e){return O==e||O.constructor==e.constructor&&O.eq(e)}var Ri=class O{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new O(e,t,i)}};function ia(O,e){return O.from-e.from||O.value.startSide-e.value.startSide}var ra=class O{constructor(e,t,i,r){this.from=e,this.to=t,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,r=0){let n=i?this.to:this.from;for(let s=r,a=n.length;;){if(s==a)return s;let o=s+a>>1,l=n[o]-e||(i?this.value[o].endSide:this.value[o].startSide)-t;if(o==s)return l>=0?s:a;l>=0?a=o:s=o+1}}between(e,t,i,r){for(let n=this.findIndex(t,-1e9,!0),s=this.findIndex(i,1e9,!1,n);n<s;n++)if(r(this.from[n]+e,this.to[n]+e,this.value[n])===!1)return!1}map(e,t){let i=[],r=[],n=[],s=-1,a=-1;for(let o=0;o<this.value.length;o++){let l=this.value[o],c=this.from[o]+e,h=this.to[o]+e,f,u;if(c==h){let $=t.mapPos(c,l.startSide,l.mapMode);if($==null||(f=u=$,l.startSide!=l.endSide&&(u=t.mapPos(c,l.endSide),u<f)))continue}else if(f=t.mapPos(c,l.startSide),u=t.mapPos(h,l.endSide),f>u||f==u&&l.startSide>0&&l.endSide<=0)continue;(u-f||l.endSide-l.startSide)<0||(s<0&&(s=f),l.point&&(a=Math.max(a,u-f)),i.push(l),r.push(f-s),n.push(u-s))}return{mapped:i.length?new O(r,n,i,a):null,pos:s}}},L=class O{constructor(e,t,i,r){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=r}static create(e,t,i,r){return new O(e,t,i,r)}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 t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:r=0,filterTo:n=this.length}=e,s=e.filter;if(t.length==0&&!s)return this;if(i&&(t=t.slice().sort(ia)),this.isEmpty)return t.length?O.of(t):this;let a=new Fr(this,null,-1).goto(0),o=0,l=[],c=new Me;for(;a.value||o<t.length;)if(o<t.length&&(a.from-t[o].from||a.startSide-t[o].value.startSide)>=0){let h=t[o++];c.addInner(h.from,h.to,h.value)||l.push(h)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(o==t.length||this.chunkEnd(a.chunkIndex)<t[o].from)&&(!s||r>this.chunkEnd(a.chunkIndex)||n<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||r>a.to||n<a.from||s(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||l.push(Ri.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?O.empty:this.nextLayer.update({add:l,filter:s,filterFrom:r,filterTo:n}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],r=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],o=this.chunk[s],l=e.touchesRange(a,a+o.length);if(l===!1)r=Math.max(r,o.maxPoint),t.push(o),i.push(e.mapPos(a));else if(l===!0){let{mapped:c,pos:h}=o.map(a,e);c&&(r=Math.max(r,c.maxPoint),t.push(c),i.push(h))}}let n=this.nextLayer.map(e);return t.length==0?n:new O(i,t,n||O.empty,r)}between(e,t,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let n=this.chunkPos[r],s=this.chunk[r];if(t>=n&&e<=n+s.length&&s.between(n,e-n,t-n,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Vi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Vi.from(e).goto(t)}static compare(e,t,i,r,n=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxP Line truncated
`)}static newName(){let e=Dh[Mh]||1;return Dh[Mh]=e+1,"\u037C"+e.toString(36)}static mount(e,t,i){let r=e[la],n=i&&i.nonce;r?n&&r.setNonce(n):r=new ca(e,n),r.mount(Array.isArray(t)?t:[t],e)}},Ih=new Map,ca=class{constructor(e,t){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let n=Ih.get(i);if(n)return e[la]=n;this.sheet=new r.CSSStyleSheet,Ih.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[la]=this}mount(e,t){let i=this.sheet,r=0,n=0;for(let s=0;s<e.length;s++){let a=e[s],o=this.modules.indexOf(a);if(o<n&&o>-1&&(this.modules.splice(o,1),n--,o=-1),o==-1){if(this.modules.splice(n++,0,a),i)for(let l=0;l<a.rules.length;l++)i.insertRule(a.rules[l],r++)}else{for(;n<o;)r+=this.modules[n++].rules.length;r+=a.rules.length,n++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let s="";for(let o=0;o<this.modules.length;o++)s+=this.modules[o].getRules()+`
`;this.styleTag.textContent=s;let a=t.head||t;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};var _t={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},KO={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rP=typeof navigator<"u"&&/Mac/.test(navigator.platform),nP=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Qe=0;Qe<10;Qe++)_t[48+Qe]=_t[96+Qe]=String(Qe);var Qe;for(Qe=1;Qe<=24;Qe++)_t[Qe+111]="F"+Qe;var Qe;for(Qe=65;Qe<=90;Qe++)_t[Qe]=String.fromCharCode(Qe+32),KO[Qe]=String.fromCharCode(Qe);var Qe;for(Kr in _t)KO.hasOwnProperty(Kr)||(KO[Kr]=_t[Kr]);var Kr;function Bh(O){var e=rP&&O.metaKey&&O.shiftKey&&!O.ctrlKey&&!O.altKey||nP&&O.shiftKey&&O.key&&O.key.length==1||O.key=="Unidentified",t=!e&&O.key||(O.shiftKey?KO:_t)[O.keyCode]||O.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function B(){var O=arguments[0];typeof O=="string"&&(O=document.createElement(O));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];typeof r=="string"?O.setAttribute(i,r):r!=null&&(O[i]=r)}e++}for(;e<arguments.length;e++)Nh(O,arguments[e]);return O}function Nh(O,e){if(typeof e=="string")O.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)O.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Nh(O,e[t]);else throw new RangeError("Unsupported child node: "+e)}var _e=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Pa=typeof document<"u"?document:{documentElement:{style:{}}},Sa=/Edge\/(\d+)/.exec(_e.userAgent),Uf=/MSIE \d/.test(_e.userAgent),Xa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(_e.userAgent),Zn=!!(Uf||Xa||Sa),Fh=!Zn&&/gecko\/(\d+)/i.test(_e.userAgent),ha=!Zn&&/Chrome\/(\d+)/.exec(_e.userAgent),Hh="webkitFontSmoothing"in Pa.documentElement.style,Ta=!Zn&&/Apple Computer/.test(_e.vendor),Kh=Ta&&(/Mobile\/\w+/.test(_e.userAgent)||_e.maxTouchPoints>2),Y={mac:Kh||/Mac/.test(_e.platform),windows:/Win/.test(_e.platform),linux:/Linux|X11/.test(_e.platform),ie:Zn,ie_version:Uf?Pa.documentMode||6:Xa?+Xa[1]:Sa?+Sa[1]:0,gecko:Fh,gecko_version:Fh?+(/Firefox\/(\d+)/.exec(_e.userAgent)||[0,0])[1]:0,chrome:!!ha,chrome_version:ha?+ha[1]:0,ios:Kh,android:/Android\b/.test(_e.userAgent),webkit:Hh,webkit_version:Hh?+(/\bAppleWebKit\/(\d+)/.exec(_e.userAgent)||[0,0])[1]:0,safari:Ta,safari_version:Ta?+(/\bVersion\/(\d+(\.\d+)?)/.exec(_e.userAgent)||[0,0])[1]:0,tabSize:Pa.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Qo(O,e){for(let t in O)t=="class"&&e.class?e.class+=" "+O.class:t=="style"&&e.style?e.style+=";"+O.style:e[t]=O[t];return e}var un=Object.create(null);function po(O,e,t){if(O==e)return!0;O||(O=un),e||(e=un);let i=Object.keys(O),r=Object.keys(e);if(i.length-(t&&i.indexOf(t)>-1?1:0)!=r.length-(t&&r.indexOf(t)>-1?1:0))return!1;for(let n of i)if(n!=t&&(r.indexOf(n)==-1||O[n]!==e[n]))return!1;return!0}function sP(O,e){for(let t=O.attributes.length-1;t>=0;t--){let i=O.attributes[t].name;e[i]==null&&O.removeAttribute(i)}for(let t in e){let i=e[t];t=="style"?O.style.cssText=i:O.getAttribute(t)!=i&&O.setAttribute(t,i)}}function Jh(O,e,t){let i=!1;if(e)for(let r in e)t&&r in t||(i=!0,r=="style"?O.style.cssText="":O.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(i=!0,r=="style"?O.style.cssText=t[r]:O.setAttribute(r,t[r]));return i}function aP(O){let e=Object.create(null);for(let t=0;t<O.attributes.length;t++){let i=O.attributes[t];e[i.name]=i.value}return e}var Ze=class{eq(e){return!1}updateDOM(e,t,i){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},Te=(function(O){return O[O.Text=0]="Text",O[O.WidgetBefore=1]="WidgetBefore",O[O.WidgetAfter=2]="WidgetAfter",O[O.WidgetRange=3]="WidgetRange",O})(Te||(Te={})),_=class extends Ot{constructor(e,t,i,r){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=r}get hLine truncated
`,r=O.state.doc.line(r.number+(t?1:-1)),n=O.bidiSpans(r),l=O.visualLineSide(r,!t)}if(o){if(!o(c))return a}else{if(!i)return l;o=i(c)}a=l}}function CP(O,e,t){let i=O.state.charCategorizer(e),r=i(t);return n=>{let s=i(n);return r==ee.Space&&(r=s),r==s}}function GP(O,e,t,i){let r=e.head,n=t?1:-1;if(r==(t?O.state.doc.length:0))return S.cursor(r,e.assoc);let s=e.goalColumn,a,o=O.contentDOM.getBoundingClientRect(),l=O.coordsAtPos(r,e.assoc||((e.empty?t:e.head==e.from)?1:-1)),c=O.documentTop;if(l)s==null&&(s=l.left-o.left),a=n<0?l.top:l.bottom;else{let $=O.viewState.lineBlockAt(r);s==null&&(s=Math.min(o.right-o.left,O.defaultCharacterWidth*(r-$.from))),a=(n<0?$.top:$.bottom)+c}let h=o.left+s,f=O.viewState.heightOracle.textHeight>>1,u=i??f;for(let $=0;;$+=f){let Q=a+(u+$)*n,p=ja(O,{x:h,y:Q},!1,n);if(t?Q>o.bottom:Q<o.top)return S.cursor(p.pos,p.assoc);let m=O.coordsAtPos(p.pos,p.assoc),g=m?(m.top+m.bottom)/2:0;if(!m||(t?g>a:g<a))return S.cursor(p.pos,p.assoc,void 0,s)}}function Li(O,e,t){for(;;){let i=0;for(let r of O)r.between(e-1,e+1,(n,s,a)=>{if(e>n&&e<s){let o=i||t||(e-n<s-e?-1:1);e=o<0?n:s,i=o}});if(!i)return e}}function cd(O,e){let t=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],n=null;if(r.empty){let s=Li(O,r.from,0);s!=r.from&&(n=S.cursor(s,-1))}else{let s=Li(O,r.from,-1),a=Li(O,r.to,1);(s!=r.from||a!=r.to)&&(n=S.range(r.from==r.anchor?s:a,r.from==r.head?s:a))}n&&(t||(t=e.ranges.slice()),t[i]=n)}return t?S.create(t,e.mainIndex):e}function ua(O,e,t){let i=Li(O.state.facet(Ki).map(r=>r(O)),t.from,e.head>t.from?-1:1);return i==t.from?t:S.cursor(i,i<t.from?1:-1)}var nt=class{constructor(e,t){this.pos=e,this.assoc=t}};function ja(O,e,t,i){let r=O.contentDOM.getBoundingClientRect(),n=r.top+O.viewState.paddingTop,{x:s,y:a}=e,o=a-n,l;for(;;){if(o<0)return new nt(0,1);if(o>O.viewState.docHeight)return new nt(O.state.doc.length,-1);if(l=O.elementAtHeight(o),i==null)break;if(l.type==Te.Text){if(i<0?l.to<O.viewport.from:l.from>O.viewport.to)break;let f=O.docView.coordsAt(i<0?l.from:l.to,i>0?-1:1);if(f&&(i<0?f.top<=o+n:f.bottom>=o+n))break}let h=O.viewState.heightOracle.textHeight/2;o=i>0?l.bottom+h:l.top-h}if(O.viewport.from>=l.to||O.viewport.to<=l.from){if(t)return null;if(l.type==Te.Text){let h=WP(O,r,l,s,a);return new nt(h,h==l.from?1:-1)}}if(l.type!=Te.Text)return o<(l.top+l.bottom)/2?new nt(l.from,1):new nt(l.to,-1);let c=O.docView.lineAt(l.from,2);return(!c||c.length!=l.length)&&(c=O.docView.lineAt(l.from,-2)),new Ca(O,s,a,O.textDirectionAt(l.from)).scanTile(c,l.from)}var Ca=class{constructor(e,t,i,r){this.view=e,this.x=t,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:i,spans:r}=this.bidiSpansAt(e);return r[st.find(r,e-i.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:i,spans:r}=this.bidiSpansAt(e);return r[st.find(r,e-i.from,-1,t)].dir}bidiIn(e,t){let{spans:i,line:r}=this.bidiSpansAt(e);return i.length>1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from<t)}scan(e,t,i=!1){let r=0,n=e.length-1,s=new Set,a=this.bidiIn(e[0],e[n]),o,l,c=-1,h=1e9,f;e:for(;r<n;){let $=n-r,Q=r+n>>1;t:if(s.has(Q)){let m=r+Math.floor(Math.random()*$);for(let g=0;g<$;g++){if(!s.has(m)){Q=m;break t}m++,m==n&&(m=r)}break e}s.add(Q);let p=t(Q);if(p)for(let m=0;m<p.length;m++){let g=p[m],P=0;if(!(g.width==0&&p.length>1)){if(g.bottom<this.y)(!o||o.bottom<g.bottom)&&(o=g),P=1;else if(g.top>this.y)(!l||l.top>g.top)&&(l=g),P=-1;else{let x=g.left>this.x?this.x-g.left:g.right<this.x?this.x-g.right:0,X=Math.abs(x);X<h&&(c=Q,h=X,f=g),x&&(P=x<0==(this.baseDir==H.LTR)?-1:1)}P==-1&&(!a||this.baseDirAt(e[Q],1))?n=Q:P==1&&(!a||this.baseDirAt(e[Q+1],-1))&&(r=Q+1)}}}if(!f){let $=o&&(!l||this.y-o.bottom<l.top-this.y)?o:l;return this.y=($.top+$.bottom)/2,this.scan(e,t,!0)}if(h&&!i){let{top:$,bottom:Q}=f;if(o&&o.bottom>($+$+Q)/3)return this.y=o.bottom-1,this.scan(e,t,!0);if(l&&l.top<($+Q+Q)/3)return this.y=l.top+1,this.scan(e,t,!0)}let u=(a?this.dirAt(e[c],1):this.baseDir)==H.LTR;return{i:c,after:this.x>(f.left+f.right)/2==u}}scanText(e,t){let i=[];for(let n=0;n<e.length;n=ue(e.text,n))i.push(t+n);i.push(t+e.length);let r=this.scan(i,n=>{let s=i[n]-t,a=i[n+1]-t;return Hi(e.dom,s,a).getClientRects()});return r.after?new nt(i[r.i+1],-1):new nt(i[r.i],1)}scanTile(e,t){if(!e.length)return new nt(t,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,t);if(a.isComposite())return this.scanTile(a,t)}let i=[t];for(let a=0,o=t;a<e.children.length;a++)i.push(o+=e.children[a].length);let r=this.scan(i,a=>{let o=e.children[a];return o.flags&48?null:(o.dom.nodeType==1?o.dom:Hi(o.dom,0,o.length)).getClientRects()}),n=e.children[r.i],s=i[r.i];return n.isText()?this.scanText(n,s):n.isComposite()?this.scanTile(n,s):r.after?new nt(i[r.i+1],-1):new nt(s,1)}},JO="\uFFFF",Ga=class{constructor(e,t){this.points=e,this.view=t,this.text="",this.line Line truncated
`&&O.lineWrapping&&(i&&(i=S.single(i.main.anchor-1,i.main.head-1)),t={from:n.from,to:n.to,insert:E.of([" "])}),t)return yo(O,t,i,s);if(i&&!Xn(i,n)){let a=!1,o="select";return O.inputState.lastSelectionTime>Date.now()-50&&(O.inputState.lastSelectionOrigin=="select"&&(a=!0),o=O.inputState.lastSelectionOrigin,o=="select.pointer"&&(i=cd(r.facet(Ki).map(l=>l(O)),i))),O.dispatch({selection:i,scrollIntoView:a,userEvent:o}),!0}else return!1}function yo(O,e,t,i=-1){if(Y.ios&&O.inputState.flushIOSKey(e))return!0;let r=O.state.selection.main;if(Y.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&O.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ni(O.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&ni(O.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&ni(O.contentDOM,"Delete",46)))return!0;let n=e.insert.toString();O.inputState.composing>=0&&O.inputState.composing++;let s,a=()=>s||(s=LP(O,e,t));return O.state.facet(Kf).some(o=>o(O,e.from,e.to,n,a))||O.dispatch(a()),!0}function LP(O,e,t){let i,r=O.state,n=r.selection.main,s=-1;if(e.from==e.to&&e.from<n.from||e.from>n.to){let o=e.from<n.from?-1:1,l=o<0?n.from:n.to,c=Li(r.facet(Ki).map(h=>h(O)),l,o);e.from==c&&(s=c)}if(s>-1)i={changes:e,selection:S.cursor(e.from+e.insert.length,-1)};else if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&O.inputState.composing<0){let o=n.from<e.from?r.sliceDoc(n.from,e.from):"",l=n.to>e.to?r.sliceDoc(e.to,n.to):"";i=r.replaceSelection(O.state.toText(o+e.insert.sliceString(0,void 0,O.state.lineBreak)+l))}else{let o=r.changes(e),l=t&&t.main.to<=o.newLength?t.main:void 0;if(r.selection.ranges.length>1&&(O.inputState.composing>=0||O.inputState.compositionPendingChange)&&e.to<=n.to+10&&e.to>=n.to-10){let c=O.state.sliceDoc(e.from,e.to),h,f=t&&ld(O,t.main.head);if(f){let $=e.insert.length-(e.to-e.from);h={from:f.from,to:f.to-$}}else h=O.state.doc.lineAt(n.head);let u=n.to-e.to;i=r.changeByRange($=>{if($.from==n.from&&$.to==n.to)return{changes:o,range:l||$.map(o)};let Q=$.to-u,p=Q-c.length;if(O.state.sliceDoc(p,Q)!=c||Q>=h.from&&p<=h.to)return{range:$};let m=r.changes({from:p,to:Q,insert:e.insert}),g=$.to-n.to;return{changes:m,range:l?S.range(Math.max(0,l.anchor+g),Math.max(0,l.head+g)):$.map(m)}})}else i={changes:o,selection:l&&r.selection.replaceRange(l)}}let a="input.type";return(O.composing||O.inputState.compositionPendingChange&&O.inputState.compositionEndedAt>Date.now()-50)&&(O.inputState.compositionPendingChange=!1,a+=".compose",O.inputState.compositionFirstChange&&(a+=".start",O.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}function dd(O,e,t,i){let r=Math.min(O.length,e.length),n=0;for(;n<r&&O.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==r&&O.length==e.length)return null;let s=O.length,a=e.length;for(;s>0&&a>0&&O.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(i=="end"){let o=Math.max(0,n-Math.min(s,a));t-=s+o-n}if(s<n&&O.length<e.length){let o=t<=n&&t>=s?n-t:0;n-=o,a=n+(a-s),s=n}else if(a<n){let o=t<=n&&t>=a?n-t:0;n-=o,s=n+(s-a),a=n}return{from:n,toA:s,toB:a}}function MP(O){let e=[];if(O.root.activeElement!=O.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:n}=O.observer.selectionRange;return t&&(e.push(new Sn(t,i)),(r!=t||n!=i)&&e.push(new Sn(r,n))),e}function DP(O,e){if(O.length==0)return null;let t=O[0].pos,i=O.length==2?O[1].pos:t;return t>-1&&i>-1?S.single(t+e,i+e):null}function Xn(O,e){return e.head==O.main.head&&e.anchor==O.main.anchor}var Aa=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=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.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Y.safari&&e.contentDOM.addEventListener("input",()=>null),Y.gecko&&sS(e.contentDOM.ownerDocument)}handleEvent(e){!JP(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,t){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,t);for(let r of i.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=IP(e),i=this.handlers,r=this.view.content Line truncated
`))};if((Y.mac||Y.android)&&h.from==s-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:o,insert:E.of([i.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let f=this.to-this.from+(h.to-h.from+h.insert.length);yo(e,h,S.single(this.toEditorPos(i.selectionStart,f),this.toEditorPos(i.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),h.from<h.to&&!h.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],n=null;for(let s=this.toEditorPos(i.rangeStart),a=this.toEditorPos(i.rangeEnd);s<a;s++){let o=e.coordsForChar(s);n=o&&new DOMRect(o.left,o.top,o.right-o.left,o.bottom-o.top)||n||new DOMRect,r.push(n)}t.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let n of i.getTextFormats()){let s=n.underlineStyle,a=n.underlineThickness;if(!/none/i.test(s)&&!/none/i.test(a)){let o=this.toEditorPos(n.rangeStart),l=this.toEditorPos(n.rangeEnd);if(o<l){let c=`text-decoration: underline ${/^[a-z]/.test(s)?s+" ":s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;r.push(_.mark({attributes:{style:c}}).range(o,l))}}}e.dispatch({effects:id.of(_.set(r))})},this.handlers.compositionstart=()=>{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)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=Fi(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((n,s,a,o,l)=>{if(i)return;let c=l.length-(s-n);if(r&&s>=r.to)if(r.from==n&&r.to==s&&r.insert.eq(l)){r=this.pendingContextChange=null,t+=c,this.to+=c;return}else r=null,this.revertPending(e.state);if(n+=t,s+=t,s<=this.from)this.from+=c,this.to+=c;else if(n<this.to){if(n<this.from||s>this.to||this.to-this.from+l.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(n),this.toContextPos(s),l.toString()),this.to+=c}t+=c}),r&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.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||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+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 t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},T=class O{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 t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRe Line truncated
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,ao),ZS={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"},Qa=null;function RS(){var O;if(Qa==null&&typeof document<"u"&&document.body){let e=document.body.style;Qa=((O=e.tabSize)!==null&&O!==void 0?O:e.MozTabSize)!=null}return Qa||!1}var fn=k.define({combine(O){let e=xe(O,{render:null,specialChars:_S,addSpecialChars:null});return(e.replaceTabs=!RS())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,ao)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,ao)),e}});function Vd(O={}){return[fn.of(O),VS()]}var wf=null;function VS(){return wf||(wf=he.fromClass(class{constructor(O){this.view=O,this.decorations=_.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(O.state.facet(fn)),this.decorations=this.decorator.createDeco(O)}makeDecorator(O){return new so({regexp:O.specialChars,decoration:(e,t,i)=>{let{doc:r}=t.state,n=Se(e[0],0);if(n==9){let s=r.lineAt(i),a=t.state.tabSize,o=Ye(s.text,a,i-s.from);return _.replace({widget:new lo((a-o%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[n]||(this.decorationCache[n]=_.replace({widget:new oo(O,n)}))},boundary:O.replaceTabs?void 0:/[^]/})}update(O){let e=O.state.facet(fn);O.startState.facet(fn)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(O.view)):this.decorations=this.decorator.updateDeco(O,this.decorations)}},{decorations:O=>O.decorations}))}var US="\u2022";function qS(O){return O>=32?US:O==10?"\u2424":String.fromCharCode(9216+O)}var oo=class extends Ze{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=qS(this.code),i=e.state.phrase("Control character")+" "+(ZS[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,t);if(r)return r;let n=document.createElement("span");return n.textContent=t,n.title=i,n.setAttribute("aria-label",i),n.className="cm-specialChar",n}ignoreEvent(){return!1}},lo=class extends Ze{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 Ud(){return WS}var zS=_.line({class:"cm-activeLine"}),WS=he.fromClass(class{constructor(O){this.decorations=this.getDeco(O)}update(O){(O.docChanged||O.selectionSet)&&(this.decorations=this.getDeco(O.view))}getDeco(O){let e=-1,t=[];for(let i of O.state.selection.ranges){let r=O.lineBlockAt(i.head);r.from>e&&(t.push(zS.range(r.from)),e=r.from)}return _.set(t)}},{decorations:O=>O.decorations});var co=2e3;function jS(O,e,t){let i=Math.min(e.line,t.line),r=Math.max(e.line,t.line),n=[];if(e.off>co||t.off>co||e.col<0||t.col<0){let s=Math.min(e.off,t.off),a=Math.max(e.off,t.off);for(let o=i;o<=r;o++){let l=O.doc.line(o);l.length<=a&&n.push(S.range(l.from+s,l.to+a))}}else{let s=Math.min(e.col,t.col),a=Math.max(e.col,t.col);for(let o=i;o<=r;o++){let l=O.doc.line(o),c=Hr(l.text,s,O.tabSize,!0);if(c<0)n.push(S.cursor(l.to));else{let h=Hr(l.text,a,O.tabSize);n.push(S.range(l.from+c,l.from+h))}}}return n}function CS(O,e){let t=O.coordsAtPos(O.viewport.from);return t?Math.round(Math.abs((t.left-e)/O.defaultCharacterWidth)):-1}function kf(O,e){let t=O.posAtCoords({x:e.clientX,y:e.clientY},!1),i=O.state.doc.lineAt(t),r=t-i.from,n=r>co?-1:r==i.length?CS(O,e.clientX):Ye(i.text,O.state.tabSize,t-i.from);return{line:i.number,col:n,off:r}}function GS(O,e){let t=kf(O,e),i=O.state.selection;return t?{update(r){if(r.docChanged){let n=r.changes.mapPos(r.startState.doc.line(t.line).from),s=r.state.doc.lineAt(n);t={line:s.number,col:t.col,off:Math.min(t.off,s.length)},i=i.map(r.changes)}},get(r,n,s){let a=kf(O,r);if(!a)return i;let o=jS(O.state,t,a);return o.length?s?S.create(o.concat(i.ranges)):S.create(o):i}}:null}function qd(O){let e=O?.eventFilter||(t=>t.altKey&&t.button==0);return T.mouseSelectionStyle.of((t,i)=>e(i)?GS(t,i):null)}var ES={Alt:[18,O=>!!O.altKey],Control:[17,O=>!!O.ctrlKey],Shift:[16,O=>!!O.shiftKey],Meta:[91,O=>!!O.metaKey]},AS={style:"cursor: crosshair"};function zd(O={}){let[e,t]=ES[O.key||"Alt"],i=he.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||t(r))},keyup(r){(r.keyCode==e||!t(r))&&this.set(!1)},mousemove(r){this.set(t(r))}}});return[i,T.contentAttributes.o Line truncated
`: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&&this.test==e.test}create(){return this.regexp?new fl(this):new hl(this)}getCursor(e,t=0,i){let r=e.doc?e:I.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?pi(this,r,t,i):Qi(this,r,t,i)}},ls=class{constructor(e){this.spec=e}};function pT(O,e,t){return(i,r,n,s)=>{if(t&&!t(i,r,n,s))return!1;let a=i>=s&&r<=s+n.length?n.slice(i-s,r-s):e.doc.sliceString(i,r);return O(a,e,i,r)}}function Qi(O,e,t,i){let r;return O.wholeWord&&(r=mT(e.doc,e.charCategorizer(e.selection.main.head))),O.test&&(r=pT(O.test,e,r)),new lO(e.doc,O.unquoted,t,i,O.caseSensitive?void 0:n=>n.toLowerCase(),r)}function mT(O,e){return(t,i,r,n)=>((n>t||n+r.length<i)&&(n=Math.max(0,t-2),r=O.sliceString(n,Math.min(O.length,i+2))),(e(cs(r,t-n))!=ee.Word||e(hs(r,t-n))!=ee.Word)&&(e(hs(r,i-n))!=ee.Word||e(cs(r,i-n))!=ee.Word))}var hl=class extends ls{constructor(e){super(e)}nextMatch(e,t,i){let r=Qi(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Qi(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==i?null:r.value}prevMatchInRange(e,t,i){for(let r=i;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),s=Qi(this.spec,e,n,r),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,i){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=Qi(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let n=Qi(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!n.next().done;)r(n.value.from,n.value.to)}};function gT(O,e,t){return(i,r,n)=>(!t||t(i,r,n))&&O(n[0],e,i,r)}function pi(O,e,t,i){let r;return O.wholeWord&&(r=PT(e.charCategorizer(e.selection.main.head))),O.test&&(r=gT(O.test,e,r)),new rs(e.doc,O.search,{ignoreCase:!O.caseSensitive,test:r},t,i)}function cs(O,e){return O.slice(ue(O,e,!1),e)}function hs(O,e){return O.slice(e,ue(O,e))}function PT(O){return(e,t,i)=>!i[0].length||(O(cs(i.input,i.index))!=ee.Word||O(hs(i.input,i.index))!=ee.Word)&&(O(hs(i.input,i.index+i[0].length))!=ee.Word||O(cs(i.input,i.index+i[0].length))!=ee.Word)}var fl=class extends ls{nextMatch(e,t,i){let r=pi(this.spec,e,i,e.doc.length).next();return r.done&&(r=pi(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,i){for(let r=1;;r++){let n=Math.max(t,i-r*1e4),s=pi(this.spec,e,n,i),a=null;for(;!s.next().done;)a=s.value;if(a&&(n==t||a.from>n+10))return a;if(n==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let n=+i.slice(0,r);if(n>0&&n<e.match.length)return e.match[n]+i.slice(r)}return t})}matchAll(e,t){let i=pi(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let n=pi(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!n.next().done;)r(n.value.from,n.value.to)}},$r=V.define(),Ql=V.define(),oO=fe.define({create(O){return new ur(dl(O).create(),null)},update(O,e){for(let t of e.effects)t.is($r)?O=new ur(t.value.create(),O.panel):t.is(Ql)&&(O=new ur(O.query,t.value?pl:null));return O},provide:O=>bO.from(O,e=>e.panel)});var ur=class{constructor(e,t){this.query=e,this.panel=t}},ST=_.mark({class:"cm-searchMatch"}),XT=_.mark({class:"cm-searchMatch cm-searchMatch-selected"}),TT=he.fromClass(class{constructor(O){this.view=O,this.decorations=this.highlight(O.state.field(oO))}update(O){let e=O.state.field(oO);(e!=O.startState.field(oO)||O.docChanged||O.selectionSet||O.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:O,panel:e}){if(!e||!O.spec.valid)return _.none;let{view:t}=this,i=new Me;for(let r=0,n=t.visibleRanges,s=n.length;r<s;r++){let{from:a,to:o}=n[r];for(;r<s-1&&o>n[r+1].from-500;)o=n[++r].to;O.highlight(t.state,a,o,(l,c)=>{let h=t.state.selection.ranges.some(f=>f.from==l&&f.to==c);i.add(l,c,h?XT:ST)})}return i.finish()}},{decorations:O=>O.decorations});function Qr(O){return e=>{let t=e.state.field(oO,!1);return t&&t.query.spec.valid?O(e,t):Z$(e)}}var fs=Qr((O,{query:e})=>{let{to:t}=O.state.selection.main,i=e.nextMatch(O.state,t,t);if(!i)return!1;let r=S.single(i.from,i.to),n=O.state.facet(mi);return O.dispatch({selection:r,effects:[ml(O,i),n.scrollToMatch(r.main,O)],userEvent:"select.search"}),_$(O),!0}),ds=Qr((O,{query:e})=>{let{state:t}=O,{from:i}=t.selection.main,r=e.prevMatch(t,i,i);if(!r)ret Line truncated
\${}
}`,{label:"select",detail:"statement",type:"keyword"}),W("case ${}:\n${}",{label:"case",type:"keyword"}),W("switch ${} {\n ${}\n}",{label:"switch",detail:"statement",type:"keyword"}),W("switch ${}.(${type}) {\n ${}\n}",{label:"switch",detail:"type statement",type:"keyword"}),W("if ${} {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),W(`if \${} {
}`,{label:"select",detail:"statement",type:"keyword"}),j("case ${}:\n${}",{label:"case",type:"keyword"}),j("switch ${} {\n ${}\n}",{label:"switch",detail:"statement",type:"keyword"}),j("switch ${}.(${type}) {\n ${}\n}",{label:"switch",detail:"type statement",type:"keyword"}),j("if ${} {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),j(`if \${} {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),W('import ${name} "${module}"\n${}',{label:"import",detail:"declaration",type:"keyword"})],R$=new Tt,q$=new Set(["SourceFile","Block","FunctionDecl","MethodDecl","FunctionLiteral","ForStatement","SwitchStatement","TypeSwitchStatement","IfStatement"]);function Pi(O,e){return(t,i)=>{e:for(let r=t.node.firstChild,n=0,s=null;;){for(;!r;){if(!n)break e;n--,r=s.nextSibling,s=s.parent}e&&r.name==e||r.name=="SpecList"?(n++,s=r,r=r.firstChild):(r.name=="DefName"&&i(r,O),r=r.nextSibling)}return!0}}var sy={FunctionDecl:Pi("function"),VarDecl:Pi("var","VarSpec"),ConstDecl:Pi("constant","ConstSpec"),TypeDecl:Pi("type","TypeSpec"),ImportDecl:Pi("constant","ImportSpec"),Parameter:Pi("var"),__proto__:null};function z$(O,e){let t=R$.get(e);if(t)return t;let i=[],r=!0;function n(s,a){let o=O.sliceString(s.from,s.to);i.push({label:o,type:a})}return e.cursor(C.IncludeAnonymous).iterate(s=>{if(r)r=!1;else if(s.name){let a=sy[s.name];if(a&&a(s,n)||q$.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of z$(O,s.node))i.push(a);return!1}}),R$.set(e,i),i}var V$=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,U$=["String","LineComment","BlockComment","DefName","LabelName","FieldName",".","?."],ay=O=>{let e=U(O.state).resolveInner(O.pos,-1);if(U$.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&V$.test(O.state.sliceDoc(e.from,e.to));if(!t&&!O.explicit)return null;let i=[];for(let r=e;r;r=r.parent)q$.has(r.name)&&(i=i.concat(z$(O.state.doc,r)));return{options:i,from:t?e.from:O.pos,validFor:V$}},Jl=ne.define({name:"go",parser:_$.configure({props:[se.add({IfStatement:le({except:/^\s*({|else\b)/}),LabeledStatement:sO,"SwitchBlock SelectBlock":O=>{let e=O.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return O.baseIndent+(t||i?0:O.unit)},Block:be({closing:"}"}),BlockComment:()=>null,Statement:le({except:/^{/})}),te.add({"Block SwitchBlock SelectBlock LiteralValue InterfaceType StructType SpecList":me,BlockComment(O){return{from:O.from+2,to:O.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case\b|default\b|\})$/}}),oy=O=>({label:O,type:"keyword"}),ly="interface struct chan map package go return break continue goto fallthrough else defer range true false nil".split(" ").map(oy);function W$(){let O=ny.concat(ly);return new J(Jl,[Jl.data.of({autocomplete:cO(U$,zt(O))}),Jl.data.of({autocomplete:ay})])}var cy=55,hy=1,fy=56,dy=2,uy=57,Qy=3,j$=4,$y=5,rc=6,I$=7,B$=8,N$=9,F$=10,py=11,my=12,gy=13,ec=58,Py=14,Sy=15,C$=59,H$=21,Xy=23,K$=24,Ty=25,Oc=27,J$=28,by=29,yy=32,xy=35,ky=37,wy=38,Zy=0,vy=1,Yy={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},_y={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},G$={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 Ry(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}var E$=null,A$=null,L$=0;function ic(O,e){let t=O.pos+e;if(L$==t&&A$==O)return E$;let i=O.peek(e),r="";for(;Ry(i);)r+=String.fromCharCode(i),i=O.peek(++e);return A$=O,L$=t,E$=r?r.toLowerCase():i==Vy||i==qy?void 0:null}var ep=60,xs=62,nc=47,Vy=63,qy=33,zy=45;function M$(O,e){this.name=O,this.parent=e}var Uy=[rc,F$,I$,B$,N$],Wy=new Ge({start:null,shift(O,e,t,i){return Uy.indexOf(e)>-1?new M$(ic(i,1)||"",O):O},reduce(O,e){return e==H$&&O?O.parent:O},reuse(O,e,t,i){let r=e.type.id;return r==rc||r==ky?new M$(ic(i,1)||"",O):O},strict:!1}),jy=new z((O,e)=>{if(O.next!=ep){O.next<0&&e.context&&O.acceptToken(ec);return}O.advance();let t=O.next==nc;t&&O.advance();let i=ic(O,0);if(i===void 0)return;if(!i)return O.acceptToken(t?Sy:Py);let r=e.context?e.context.name:null;if(t){if(i==r)return O.acceptToken(py);if(r&&_y[r])return O.acceptToken(ec,-2);if(e.dialectEnabled(Zy))return O.acceptToken(my);for(let n=e.context;n;n=n.parent)if(n.name==i)return;O.acceptToken(gy)}else{if(i=="script")return O.acceptToken(I$);if(i=="style")return O.acceptToken(B$);if(i=="textarea")return O.acceptToken(N$);if(Yy.hasOwnProperty(i))return O.acceptToken(F$);r&&G$[r]&&G$[r][i]?O.acceptToken(ec,-1):O.acceptToken(rc)}},{contextual:!0}),Cy=new z(O=>{for(let e=0,t=0;;t++){if(O.next<0){t&&O.acceptToken(C$);break}if(O.next==zy)e++;else if(O.next==xs&&e>=2){t>=3&&O.acceptToken(C$,-2);break}else e=0;O.advance()}});function Gy(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}var Ey=new z(( Line truncated
}`,{label:"if",detail:"/ else block",type:"keyword"}),j('import ${name} "${module}"\n${}',{label:"import",detail:"declaration",type:"keyword"})],CQ=new yt,EQ=new Set(["SourceFile","Block","FunctionDecl","MethodDecl","FunctionLiteral","ForStatement","SwitchStatement","TypeSwitchStatement","IfStatement"]);function Xi(O,e){return(t,i)=>{e:for(let r=t.node.firstChild,n=0,s=null;;){for(;!r;){if(!n)break e;n--,r=s.nextSibling,s=s.parent}e&&r.name==e||r.name=="SpecList"?(n++,s=r,r=r.firstChild):(r.name=="DefName"&&i(r,O),r=r.nextSibling)}return!0}}var ub={FunctionDecl:Xi("function"),VarDecl:Xi("var","VarSpec"),ConstDecl:Xi("constant","ConstSpec"),TypeDecl:Xi("type","TypeSpec"),ImportDecl:Xi("constant","ImportSpec"),Parameter:Xi("var"),__proto__:null};function AQ(O,e){let t=CQ.get(e);if(t)return t;let i=[],r=!0;function n(s,a){let o=O.sliceString(s.from,s.to);i.push({label:o,type:a})}return e.cursor(C.IncludeAnonymous).iterate(s=>{if(r)r=!1;else if(s.name){let a=ub[s.name];if(a&&a(s,n)||EQ.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of AQ(O,s.node))i.push(a);return!1}}),CQ.set(e,i),i}var GQ=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,LQ=["String","LineComment","BlockComment","DefName","LabelName","FieldName",".","?."],$b=O=>{let e=W(O.state).resolveInner(O.pos,-1);if(LQ.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&GQ.test(O.state.sliceDoc(e.from,e.to));if(!t&&!O.explicit)return null;let i=[];for(let r=e;r;r=r.parent)EQ.has(r.name)&&(i=i.concat(AQ(O.state.doc,r)));return{options:i,from:t?e.from:O.pos,validFor:GQ}},Oc=ne.define({name:"go",parser:jQ.configure({props:[se.add({IfStatement:le({except:/^\s*({|else\b)/}),LabeledStatement:sO,"SwitchBlock SelectBlock":O=>{let e=O.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return O.baseIndent+(t||i?0:O.unit)},Block:ye({closing:"}"}),BlockComment:()=>null,Statement:le({except:/^{/})}),te.add({"Block SwitchBlock SelectBlock LiteralValue InterfaceType StructType SpecList":me,BlockComment(O){return{from:O.from+2,to:O.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case\b|default\b|\})$/}}),Qb=O=>({label:O,type:"keyword"}),pb="interface struct chan map package go return break continue goto fallthrough else defer range true false nil".split(" ").map(Qb);function MQ(){let O=db.concat(pb);return new J(Oc,[Oc.data.of({autocomplete:cO(LQ,zt(O))}),Oc.data.of({autocomplete:$b})])}var mb=55,gb=1,Pb=56,Sb=2,Xb=57,Tb=3,DQ=4,yb=5,ac=6,ep=7,tp=8,Op=9,ip=10,bb=11,xb=12,wb=13,ic=58,kb=14,vb=15,IQ=59,rp=21,Yb=23,np=24,_b=25,nc=27,sp=28,Zb=29,Rb=32,Vb=35,Ub=37,qb=38,zb=0,Wb=1,jb={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},Cb={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},BQ={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 Gb(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}var NQ=null,FQ=null,HQ=0;function sc(O,e){let t=O.pos+e;if(HQ==t&&FQ==O)return NQ;let i=O.peek(e),r="";for(;Gb(i);)r+=String.fromCharCode(i),i=O.peek(++e);return FQ=O,HQ=t,NQ=r?r.toLowerCase():i==Eb||i==Ab?void 0:null}var ap=60,xs=62,oc=47,Eb=63,Ab=33,Lb=45;function KQ(O,e){this.name=O,this.parent=e}var Mb=[ac,ip,ep,tp,Op],Db=new Ee({start:null,shift(O,e,t,i){return Mb.indexOf(e)>-1?new KQ(sc(i,1)||"",O):O},reduce(O,e){return e==rp&&O?O.parent:O},reuse(O,e,t,i){let r=e.type.id;return r==ac||r==Ub?new KQ(sc(i,1)||"",O):O},strict:!1}),Ib=new q((O,e)=>{if(O.next!=ap){O.next<0&&e.context&&O.acceptToken(ic);return}O.advance();let t=O.next==oc;t&&O.advance();let i=sc(O,0);if(i===void 0)return;if(!i)return O.acceptToken(t?vb:kb);let r=e.context?e.context.name:null;if(t){if(i==r)return O.acceptToken(bb);if(r&&Cb[r])return O.acceptToken(ic,-2);if(e.dialectEnabled(zb))return O.acceptToken(xb);for(let n=e.context;n;n=n.parent)if(n.name==i)return;O.acceptToken(wb)}else{if(i=="script")return O.acceptToken(ep);if(i=="style")return O.acceptToken(tp);if(i=="textarea")return O.acceptToken(Op);if(jb.hasOwnProperty(i))return O.acceptToken(ip);r&&BQ[r]&&BQ[r][i]?O.acceptToken(ic,-1):O.acceptToken(ac)}},{contextual:!0}),Bb=new q(O=>{for(let e=0,t=0;;t++){if(O.next<0){t&&O.acceptToken(IQ);break}if(O.next==Lb)e++;else if(O.next==xs&&e>=2){t>=3&&O.acceptToken(IQ,-2);break}else e=0;O.advance()}});function Nb(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}var Fb=new q(( Line truncated
\${}
} catch (\${error}) {
\${}
}`,{label:"try",detail:"/ catch block",type:"keyword"}),W("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),W(`if (\${}) {
}`,{label:"try",detail:"/ catch block",type:"keyword"}),j("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),j(`if (\${}) {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),W(`class \${name} {
}`,{label:"if",detail:"/ else block",type:"keyword"}),j(`class \${name} {
constructor(\${params}) {
\${}
}
}`,{label:"class",detail:"definition",type:"keyword"}),W('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),W('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Tx=lp.concat([W("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),W("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),W("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),sp=new Tt,cp=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function kr(O){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,O),!0}}var bx=["FunctionDeclaration"],yx={FunctionDeclaration:kr("function"),ClassDeclaration:kr("class"),ClassExpression:()=>!0,EnumDeclaration:kr("constant"),TypeAliasDeclaration:kr("type"),NamespaceDeclaration:kr("namespace"),VariableDefinition(O,e){O.matchContext(bx)||e(O,"variable")},TypeDefinition(O,e){e(O,"type")},__proto__:null};function hp(O,e){let t=sp.get(e);if(t)return t;let i=[],r=!0;function n(s,a){let o=O.sliceString(s.from,s.to);i.push({label:o,type:a})}return e.cursor(C.IncludeAnonymous).iterate(s=>{if(r)r=!1;else if(s.name){let a=yx[s.name];if(a&&a(s,n)||cp.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of hp(O,s.node))i.push(a);return!1}}),sp.set(e,i),i}var ap=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,fp=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function xx(O){let e=U(O.state).resolveInner(O.pos,-1);if(fp.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&ap.test(O.state.sliceDoc(e.from,e.to));if(!t&&!O.explicit)return null;let i=[];for(let r=e;r;r=r.parent)cp.has(r.name)&&(i=i.concat(hp(O.state.doc,r)));return{options:i,from:t?e.from:O.pos,validFor:ap}}var pt=ne.define({name:"javascript",parser:np.configure({props:[se.add({IfStatement:le({except:/^\s*({|else\b)/}),TryStatement:le({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:sO,SwitchBody:O=>{let e=O.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return O.baseIndent+(t?0:i?1:2)*O.unit},Block:be({closing:"}"}),ArrowFunction:O=>O.baseIndent+O.unit,"TemplateString BlockComment":()=>null,"Statement Property":le({except:/^\s*{/}),JSXElement(O){let e=/^\s*<\//.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},JSXEscape(O){let e=/\s*\}/.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},"JSXOpenTag JSXSelfClosingTag"(O){return O.column(O.node.from)+O.unit}}),te.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":me,BlockComment(O){return{from:O.from+2,to:O.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),dp={test:O=>/^JSX/.test(O.name),facet:or({commentTokens:{block:{open:"{/*",close:"*/}"}}})},hc=pt.configure({dialect:"ts"},"typescript"),fc=pt.configure({dialect:"jsx",props:[Dn.add(O=>O.isTop?[dp]:void 0)]}),dc=pt.configure({dialect:"jsx ts",props:[Dn.add(O=>O.isTop?[dp]:void 0)]},"typescript"),up=O=>({label:O,type:"keyword"}),Qp="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(up),kx=Qp.concat(["declare","implements","private","protected","public"].map(up));function ks(O={}){let e=O.jsx?O.typescript?dc:fc:O.typescript?hc:pt,t=O.typescript?Tx.concat(kx):lp.concat(Qp);return new J(e,[pt.data.of({autocomplete:cO(fp,zt(t))}),pt.data.of({autocomplete:xx}),O.jsx?vx:[]])}function wx(O){for(;;){if(O.name=="JSXOpenTag"||O.name=="JSXSelfClosingTag"||O.name=="JSXFragmentTag")return O;if(O.name=="JSXEscape"||!O.parent)return null;O=O.parent}}function op(O,e,t=O.length){for(let i=e?.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return O.sliceString(i.from,Math.min(i.to,t));return""}var Zx=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vx=T.inputHandler.of((O,e,t,i,r)=>{if((Zx?O.composing:O.compositionStarted)||O.state.readOnly||e!=t||i!=">"&&i!="/"||!pt.isActiveAt(O.state,e,-1))return!1;let n=r(),{state:s}=n,a=s.changeByRange(o=>{var l;let{head:c}=o,h=U(s).resolveInner(c-1,-1),f;if(h.name=="JSXStartTag"&&(h=h.parent),!(s.doc.sliceString(c-1,c)!=i||h.name=="JSXAttributeValue"&&h.to>c)){if(i==">"&&h.name=="JSXFragmentTag")return{range:o,changes:{from:c,insert:"</>"}};if(i=="/"&&h.name=="JSXStartCloseTag"){let u=h.parent,Q=u.parent;if(Q&&u.from==c-2&&((f=op(s.doc,Q.firstChild,c))||((l=Q.firstChild)===null||l===void 0? Line truncated
`+t.scrub(),n=this.advance(r);return n>-1&&n<r.length?this.complete(e,i,n):!1}finish(e,t){return(this.stage==2||this.stage==3)&&vr(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,i){return e.addLeafElement(t,L(b.LinkReference,this.start,this.start+i,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(nm(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(L(b.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(im(e,vr(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=vr(e,this.pos),i=0;if(t>this.pos){let r=rm(e,t,this.start);if(r){let n=mc(e,r.to-this.start);n>0&&(this.nextStage(r),i=n)}}return i||(i=mc(e,this.pos)),i>0&&i<e.length?i:-1}else return mc(e,this.pos)}}};function mc(O,e){for(;e<O.length;e++){let t=O.charCodeAt(e);if(t==10)break;if(!ot(t))return-1}return e}var yc=class{nextLine(e,t,i){let r=t.depth<e.stack.length?-1:Bp(t),n=t.next;if(r<0)return!1;let s=L(b.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(i,L(n==61?b.SetextHeading1:b.SetextHeading2,i.start,e.prevLineEnd(),[...e.parser.parseInline(i.content,i.start),s])),!0}finish(){return!1}},Kp={LinkReference(O,e){return e.content.charCodeAt(0)==91?new bc(e):null},SetextHeading(){return new yc}},Ax=[(O,e)=>Ip(e)>=0,(O,e)=>Lp(e)>=0,(O,e)=>Mp(e)>=0,(O,e)=>_c(e,O,!0)>=0,(O,e)=>Rc(e,O,!0)>=0,(O,e)=>Yc(e,O,!0)>=0,(O,e)=>Hp(e,O,!0)>=0],Lx={text:"",end:0},xc=class{constructor(e,t,i,r){this.parser=e,this.input=t,this.ranges=r,this.line=new Sc,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=Ys.create(b.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=i.length?new Zc(i,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let i=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;i<e.markers.length&&(!r||e.markers[i].from<r.end);){let n=e.markers[i++];this.addNode(n.type,n.from,n.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let i of this.parser.blockParsers)if(i){let r=i(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let t=new Pc(this.lineStart+e.pos,e.text.slice(e.pos));for(let i of this.parser.leafBlockParsers)if(i){let r=i(this,t);r&&t.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let i of this.parser.endLeafBlock)if(i(this,e,t))break e}for(let i of t.parsers)if(i.nextLine(this,e,t))return null;t.content+=`
`+e.scrub();for(let i of e.markers)t.marks.push(i)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=sm(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=Lx;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let i=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let n=this.ranges[r].from,s=this.lineChunkAt(n);t.end=n+s.length,t.text=t.text.slice(0,this.ranges[r-1].to-i)+s,i=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:i}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=i,e.reset(t);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],n=this.parser.skipContextMarkup[r.type];if(!n)throw new Error("Unhandled block context "+b[r.type]);let s=this.line.markers.length;if(!n(r,this,e)){this.line.markers.length>s&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),i;if(this.input.lineChunks)i=t==`
}`,{label:"class",detail:"definition",type:"keyword"}),j('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),j('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],_x=Qp.concat([j("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),j("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),j("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),dp=new yt,pp=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function xr(O){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,O),!0}}var Zx=["FunctionDeclaration"],Rx={FunctionDeclaration:xr("function"),ClassDeclaration:xr("class"),ClassExpression:()=>!0,EnumDeclaration:xr("constant"),TypeAliasDeclaration:xr("type"),NamespaceDeclaration:xr("namespace"),VariableDefinition(O,e){O.matchContext(Zx)||e(O,"variable")},TypeDefinition(O,e){e(O,"type")},__proto__:null};function mp(O,e){let t=dp.get(e);if(t)return t;let i=[],r=!0;function n(s,a){let o=O.sliceString(s.from,s.to);i.push({label:o,type:a})}return e.cursor(C.IncludeAnonymous).iterate(s=>{if(r)r=!1;else if(s.name){let a=Rx[s.name];if(a&&a(s,n)||pp.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of mp(O,s.node))i.push(a);return!1}}),dp.set(e,i),i}var up=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,gp=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Vx(O){let e=W(O.state).resolveInner(O.pos,-1);if(gp.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&up.test(O.state.sliceDoc(e.from,e.to));if(!t&&!O.explicit)return null;let i=[];for(let r=e;r;r=r.parent)pp.has(r.name)&&(i=i.concat(mp(O.state.doc,r)));return{options:i,from:t?e.from:O.pos,validFor:up}}var mt=ne.define({name:"javascript",parser:fp.configure({props:[se.add({IfStatement:le({except:/^\s*({|else\b)/}),TryStatement:le({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:sO,SwitchBody:O=>{let e=O.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return O.baseIndent+(t?0:i?1:2)*O.unit},Block:ye({closing:"}"}),ArrowFunction:O=>O.baseIndent+O.unit,"TemplateString BlockComment":()=>null,"Statement Property":le({except:/^\s*{/}),JSXElement(O){let e=/^\s*<\//.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},JSXEscape(O){let e=/\s*\}/.test(O.textAfter);return O.lineIndent(O.node.from)+(e?0:O.unit)},"JSXOpenTag JSXSelfClosingTag"(O){return O.column(O.node.from)+O.unit}}),te.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":me,BlockComment(O){return{from:O.from+2,to:O.to-2}},JSXElement(O){let e=O.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=O.lastChild;return{from:e.to,to:t.type.isError?O.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(O){var e;let t=(e=O.firstChild)===null||e===void 0?void 0:e.nextSibling,i=O.lastChild;return!t||t.type.isError?null:{from:t.to,to:i.type.isError?O.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Pp={test:O=>/^JSX/.test(O.name),facet:or({commentTokens:{block:{open:"{/*",close:"*/}"}}})},uc=mt.configure({dialect:"ts"},"typescript"),$c=mt.configure({dialect:"jsx",props:[Dn.add(O=>O.isTop?[Pp]:void 0)]}),Qc=mt.configure({dialect:"jsx ts",props:[Dn.add(O=>O.isTop?[Pp]:void 0)]},"typescript"),Sp=O=>({label:O,type:"keyword"}),Xp="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(Sp),Ux=Xp.concat(["declare","implements","private","protected","public"].map(Sp));function ws(O={}){let e=O.jsx?O.typescript?Qc:$c:O.typescript?uc:mt,t=O.typescript?_x.concat(Ux):Qp.concat(Xp);return new J(e,[mt.data.of({autocomplete:cO(gp,zt(t))}),mt.data.of({autocomplete:Vx}),O.jsx?Wx:[]])}function qx(O){for(;;){if(O.name=="JSXOpenTag"||O.name=="JSXSelfClosingTag"||O.name=="JSXFragmentTag")return O;if(O.name=="JSXEscape"||!O.parent)return null;O=O.parent}}function $p(O,e,t=O.length){for(let i=e?.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return O.sliceString(i.from,Math.min(i.to,t));return""}var zx=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Wx=T.inputHandler.of((O,e,t,i,r)=>{if((zx?O.composing:O.compositionStarted)||O.state.readOnly||e!=t||i!=">"&&i!="/"||!mt.isActiveAt(O.state,e,-1))return!1;let n=r(),{state:s}=n,a=s.changeByRange(o=>{var l;let{head:c}=o,h=W(s).resolveInner(c-1,-1),f;if(h. Line truncated
`+t.scrub(),n=this.advance(r);return n>-1&&n<r.length?this.complete(e,i,n):!1}finish(e,t){return(this.stage==2||this.stage==3)&&vr(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,i){return e.addLeafElement(t,M(y.LinkReference,this.start,this.start+i,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(fm(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(M(y.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(cm(e,vr(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=vr(e,this.pos),i=0;if(t>this.pos){let r=hm(e,t,this.start);if(r){let n=Sc(e,r.to-this.start);n>0&&(this.nextStage(r),i=n)}}return i||(i=Sc(e,this.pos)),i>0&&i<e.length?i:-1}else return Sc(e,this.pos)}}};function Sc(O,e){for(;e<O.length;e++){let t=O.charCodeAt(e);if(t==10)break;if(!ct(t))return-1}return e}var kc=class{nextLine(e,t,i){let r=t.depth<e.stack.length?-1:tm(t),n=t.next;if(r<0)return!1;let s=M(y.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(i,M(n==61?y.SetextHeading1:y.SetextHeading2,i.start,e.prevLineEnd(),[...e.parser.parseInline(i.content,i.start),s])),!0}finish(){return!1}},nm={LinkReference(O,e){return e.content.charCodeAt(0)==91?new wc(e):null},SetextHeading(){return new kc}},Hx=[(O,e)=>em(e)>=0,(O,e)=>Hp(e)>=0,(O,e)=>Kp(e)>=0,(O,e)=>Uc(e,O,!0)>=0,(O,e)=>qc(e,O,!0)>=0,(O,e)=>Vc(e,O,!0)>=0,(O,e)=>rm(e,O,!0)>=0],Kx={text:"",end:0},vc=class{constructor(e,t,i,r){this.parser=e,this.input=t,this.ranges=r,this.line=new yc,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=_s.create(y.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=i.length?new Zc(i,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let i=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;i<e.markers.length&&(!r||e.markers[i].from<r.end);){let n=e.markers[i++];this.addNode(n.type,n.from,n.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let i of this.parser.blockParsers)if(i){let r=i(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let t=new Tc(this.lineStart+e.pos,e.text.slice(e.pos));for(let i of this.parser.leafBlockParsers)if(i){let r=i(this,t);r&&t.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let i of this.parser.endLeafBlock)if(i(this,e,t))break e}for(let i of t.parsers)if(i.nextLine(this,e,t))return null;t.content+=`
`+e.scrub();for(let i of e.markers)t.marks.push(i)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=dm(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=Kx;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let i=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let n=this.ranges[r].from,s=this.lineChunkAt(n);t.end=n+s.length,t.text=t.text.slice(0,this.ranges[r-1].to-i)+s,i=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:i}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=i,e.reset(t);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],n=this.parser.skipContextMarkup[r.type];if(!n)throw new Error("Unhandled block context "+y[r.type]);let s=this.line.markers.length;if(!n(r,this,e)){this.line.markers.length>s&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),i;if(this.input.lineChunks)i=t==`
`?"":t;else{let r=t.indexOf(`
`);i=r<0?t:t.slice(0,r)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,i=0){this.block=Ys.create(e,i,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,i=0){this.startContext(this.parser.getNodeType(e),t,i)}addNode(e,t,i){typeof e=="number"&&(e=new D(this.parser.nodeSet.types[e],bi,bi,(i??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(wc(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?Jp(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let t=wc(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(b.Paragraph,e.content.length),e.start)}elt(e,t,i,r){return typeof e=="string"?L(this.parser.getNodeType(e),t,i,r):new Rs(e,t)}get buffer(){return new _s(this.parser.nodeSet)}};function Jp(O,e,t,i,r){let n=O[e].to,s=[],a=[],o=t.from+i;function l(c,h){for(;h?c>=n:c>n;){let f=O[e+1].from-n;i+=f,c+=f,e++,n=O[e].to}}for(let c=t.firstChild;c;c=c.nextSibling){l(c.from+i,!0);let h=c.from+i,f,u=r.get(c.tree);u?f=u:c.to+i>n?(f=Jp(O,e,c,i,r),l(c.to+i,!1)):f=c.toTree(),s.push(f),a.push(h-o)}return l(t.to+i,!1),new D(t.type,s,a,t.to+i-o,t.tree?t.tree.propValues:void 0)}var _r=class O extends eO{constructor(e,t,i,r,n,s,a,o,l){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=n,this.skipContextMarkup=s,this.inlineParsers=a,this.inlineNames=o,this.wrappers=l,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,t,i){let r=new xc(this,e,t,i);for(let n of this.wrappers)r=n(r,e,t,i);return r}configure(e){let t=kc(e);if(!t)return this;let{nodeSet:i,skipContextMarkup:r}=this,n=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),a=this.blockNames.slice(),o=this.inlineParsers.slice(),l=this.inlineNames.slice(),c=this.endLeafBlock.slice(),h=this.wrappers;if(Zr(t.defineNodes)){r=Object.assign({},r);let f=i.types.slice(),u;for(let Q of t.defineNodes){let{name:$,block:p,composite:m,style:g}=typeof Q=="string"?{name:Q}:Q;if(f.some(X=>X.name==$))continue;m&&(r[f.length]=(X,x,k)=>m(x,k,X.value));let P=f.length,y=m?["Block","BlockContext"]:p?P>=b.ATXHeading1&&P<=b.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;f.push(ue.define({id:P,name:$,props:y&&[[R.group,y]]})),g&&(u||(u={}),Array.isArray(g)||g instanceof Be?u[$]=g:Object.assign(u,g))}i=new Kt(f),u&&(i=i.extend(F(u)))}if(Zr(t.props)&&(i=i.extend(...t.props)),Zr(t.remove))for(let f of t.remove){let u=this.blockNames.indexOf(f),Q=this.inlineNames.indexOf(f);u>-1&&(n[u]=s[u]=void 0),Q>-1&&(o[Q]=void 0)}if(Zr(t.parseBlock))for(let f of t.parseBlock){let u=a.indexOf(f.name);if(u>-1)n[u]=f.parse,s[u]=f.leaf;else{let Q=f.before?vs(a,f.before):f.after?vs(a,f.after)+1:a.length-1;n.splice(Q,0,f.parse),s.splice(Q,0,f.leaf),a.splice(Q,0,f.name)}f.endLeaf&&c.push(f.endLeaf)}if(Zr(t.parseInline))for(let f of t.parseInline){let u=l.indexOf(f.name);if(u>-1)o[u]=f.parse;else{let Q=f.before?vs(l,f.before):f.after?vs(l,f.after)+1:l.length-1;o.splice(Q,0,f.parse),l.splice(Q,0,f.name)}}return t.wrap&&(h=h.concat(t.wrap)),new O(i,n,s,a,c,r,o,l,h)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let i=new Vr(this,e,t);e:for(let r=t;r<i.end;){let n=i.char(r);for(let s of this.inlineParsers)if(s){let a=s(i,n,r);if(a>=0){r=a;continue e}}r++}return i.resolveMarkers(0)}};function Zr(O){return O!=null&&O.length>0}function kc(O){if(!Array.isArray(O))return O;if(O.length==0)return null;let e=kc(O[0]);if(O.length==1)return e;let t=kc(O.slice(1));if(!t||!e)return e||t;let i=(s,a)=>(s||bi).concat(a||bi),r=e.wrap,n=t.wrap;return{props:i(e.props,t.props),defineNodes:i(e.defineNodes,t.defineNodes),parseBlock:i(e.parseBlock,t.parseBlock),parseInline:i(e.parseInline,t.parseInline),remove:i(e.remove,t.remove),wrap:r?n?(s,a,o,l)=>r(n(s,a,o,l),a,o,l):r:n}}function vs(O,e){let t=O.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}var em=[ue.none];for(let O=1,e;e=b[O];O++)em[O]=ue.define({id:O,name:e,props:O>=b.Escape?[]:[[R.group,O in Ap?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});var bi=[],_s=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,i,r=0){return t Line truncated
`;)n--;this.fragmentEnd=n?n-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=t;if(!i.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(R.contextHash)==e}takeNodes(e){let t=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),n=e.absoluteLineStart,s=n,a=e.block.children.length,o=s,l=a;for(;;){if(t.to-i>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let c=sm(t.from-i,e.ranges);if(t.to-i<=e.ranges[e.rangeI].to)e.addNode(t.tree,c);else{let h=new D(e.parser.nodeSet.types[b.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(h,t.tree),e.addNode(h,c)}if(t.type.is("Block")&&(Dx.indexOf(t.type.id)<0?(s=t.to-i,a=e.block.children.length):(s=o,a=l,o=t.to-i,l=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return s-n}};function sm(O,e){let t=O;for(let i=1;i<e.length;i++){let r=e[i-1].to,n=e[i].from;r<O&&(t-=n-r)}return t}var Ix=F({"Blockquote/...":d.quote,HorizontalRule:d.contentSeparator,"ATXHeading1/... SetextHeading1/...":d.heading1,"ATXHeading2/... SetextHeading2/...":d.heading2,"ATXHeading3/...":d.heading3,"ATXHeading4/...":d.heading4,"ATXHeading5/...":d.heading5,"ATXHeading6/...":d.heading6,"Comment CommentBlock":d.comment,Escape:d.escape,Entity:d.character,"Emphasis/...":d.emphasis,"StrongEmphasis/...":d.strong,"Link/... Image/...":d.link,"OrderedList/... BulletList/...":d.list,"BlockQuote/...":d.quote,"InlineCode CodeText":d.monospace,"URL Autolink":d.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":d.processingInstruction,"CodeInfo LinkLabel":d.labelName,LinkTitle:d.string,Paragraph:d.content}),am=new _r(new Kt(em).extend(Ix),Object.keys(Zs).map(O=>Zs[O]),Object.keys(Zs).map(O=>Kp[O]),Object.keys(Zs),Ax,Ap,Object.keys(gc).map(O=>gc[O]),Object.keys(gc),[]);function Bx(O,e,t){let i=[];for(let r=O.firstChild,n=e;;r=r.nextSibling){let s=r?r.from:t;if(s>n&&i.push({from:n,to:s}),!r)break;n=r.to}return i}function om(O){let{codeParser:e,htmlParser:t}=O;return{wrap:xO((r,n)=>{let s=r.type.id;if(e&&(s==b.CodeBlock||s==b.FencedCode)){let a="";if(s==b.FencedCode){let l=r.node.getChild(b.CodeInfo);l&&(a=n.read(l.from,l.to))}let o=e(a);if(o)return{parser:o,overlay:l=>l.type.id==b.CodeText,bracketed:s==b.FencedCode}}else if(t&&(s==b.HTMLBlock||s==b.HTMLTag||s==b.CommentBlock))return{parser:t,overlay:Bx(r.node,r.from,r.to)};return null})}}var Nx={resolve:"Strikethrough",mark:"StrikethroughMark"},Fx={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":d.strikethrough}},{name:"StrikethroughMark",style:d.processingInstruction}],parseInline:[{name:"Strikethrough",parse(O,e,t){if(e!=126||O.char(t+1)!=126||O.char(t+2)==126)return-1;let i=O.slice(t-1,t),r=O.slice(t+2,t+3),n=/\s|^$/.test(i),s=/\s|^$/.test(r),a=Rr.test(i),o=Rr.test(r);return O.addDelimiter(Nx,t,t+2,!s&&(!o||n||a),!n&&(!a||s||o))},after:"Emphasis"}]};function Yr(O,e,t=0,i,r=0){let n=0,s=!0,a=-1,o=-1,l=!1,c=()=>{i.push(O.elt("TableCell",r+a,r+o,O.parser.parseInline(e.slice(a,o),r+a)))};for(let h=t;h<e.length;h++){let f=e.charCodeAt(h);f==124&&!l?((!s||a>-1)&&n++,s=!1,i&&(a>-1&&c(),i.push(O.elt("TableDelimiter",h+r,h+r+1))),a=o=-1):(l||f!=32&&f!=9)&&(a<0&&(a=h),o=h+1),l=!l&&f==92}return a>-1&&(n++,i&&c()),n}function zp(O,e){for(let t=e;t<O.length;t++){let i=O.charCodeAt(t);if(i==124)return!0;i==92&&t++}return!1}var lm=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,qs=class{constructor(){this.rows=null}nextLine(e,t,i){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&lm.test(r=t.text.slice(t.pos))){let n=[];Yr(e,i.content,0,n,i.start)==Yr(e,r,t.pos)&&(this.rows=[e.elt("TableHeader",i.start,i.start+i.content.length,n),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];Yr(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}},Hx={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":d.heading}},"TableRow",{name:"TableCell",style:d.content},{name:"TableDelimiter",style:d.processingInstruction}],parseBlock:[{name:"Table",leaf(O,e){return zp(e.content,0)?new qs:null},endLeaf(O,e,t){if(t.parsers.some(r=>r instanceof qs)||!zp(e.text,e.basePos))return!1;let i=O.peekLine();return lm.test(i)&&Yr(O,e.text,e.basePos)==Yr(O,i,e.basePos)},before:"SetextHeading"}]},vc=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},Kx={defineNodes:[{name:"Task",block:!0,style:d.list},{name:"TaskMarker",style:d.atom}],parseBlock:[{name Line truncated
`);i=r<0?t:t.slice(0,r)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,i=0){this.block=_s.create(e,i,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,i=0){this.startContext(this.parser.getNodeType(e),t,i)}addNode(e,t,i){typeof e=="number"&&(e=new D(this.parser.nodeSet.types[e],xi,xi,(i??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(_c(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?sm(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let t=_c(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(y.Paragraph,e.content.length),e.start)}elt(e,t,i,r){return typeof e=="string"?M(this.parser.getNodeType(e),t,i,r):new Rs(e,t)}get buffer(){return new Zs(this.parser.nodeSet)}};function sm(O,e,t,i,r){let n=O[e].to,s=[],a=[],o=t.from+i;function l(c,h){for(;h?c>=n:c>n;){let f=O[e+1].from-n;i+=f,c+=f,e++,n=O[e].to}}for(let c=t.firstChild;c;c=c.nextSibling){l(c.from+i,!0);let h=c.from+i,f,u=r.get(c.tree);u?f=u:c.to+i>n?(f=sm(O,e,c,i,r),l(c.to+i,!1)):f=c.toTree(),s.push(f),a.push(h-o)}return l(t.to+i,!1),new D(t.type,s,a,t.to+i-o,t.tree?t.tree.propValues:void 0)}var _r=class O extends eO{constructor(e,t,i,r,n,s,a,o,l){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=n,this.skipContextMarkup=s,this.inlineParsers=a,this.inlineNames=o,this.wrappers=l,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,t,i){let r=new vc(this,e,t,i);for(let n of this.wrappers)r=n(r,e,t,i);return r}configure(e){let t=Yc(e);if(!t)return this;let{nodeSet:i,skipContextMarkup:r}=this,n=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),a=this.blockNames.slice(),o=this.inlineParsers.slice(),l=this.inlineNames.slice(),c=this.endLeafBlock.slice(),h=this.wrappers;if(kr(t.defineNodes)){r=Object.assign({},r);let f=i.types.slice(),u;for(let $ of t.defineNodes){let{name:Q,block:p,composite:m,style:g}=typeof $=="string"?{name:$}:$;if(f.some(X=>X.name==Q))continue;m&&(r[f.length]=(X,b,w)=>m(b,w,X.value));let P=f.length,x=m?["Block","BlockContext"]:p?P>=y.ATXHeading1&&P<=y.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;f.push(de.define({id:P,name:Q,props:x&&[[R.group,x]]})),g&&(u||(u={}),Array.isArray(g)||g instanceof Ne?u[Q]=g:Object.assign(u,g))}i=new Kt(f),u&&(i=i.extend(F(u)))}if(kr(t.props)&&(i=i.extend(...t.props)),kr(t.remove))for(let f of t.remove){let u=this.blockNames.indexOf(f),$=this.inlineNames.indexOf(f);u>-1&&(n[u]=s[u]=void 0),$>-1&&(o[$]=void 0)}if(kr(t.parseBlock))for(let f of t.parseBlock){let u=a.indexOf(f.name);if(u>-1)n[u]=f.parse,s[u]=f.leaf;else{let $=f.before?Ys(a,f.before):f.after?Ys(a,f.after)+1:a.length-1;n.splice($,0,f.parse),s.splice($,0,f.leaf),a.splice($,0,f.name)}f.endLeaf&&c.push(f.endLeaf)}if(kr(t.parseInline))for(let f of t.parseInline){let u=l.indexOf(f.name);if(u>-1)o[u]=f.parse;else{let $=f.before?Ys(l,f.before):f.after?Ys(l,f.after)+1:l.length-1;o.splice($,0,f.parse),l.splice($,0,f.name)}}return t.wrap&&(h=h.concat(t.wrap)),new O(i,n,s,a,c,r,o,l,h)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let i=new Rr(this,e,t);e:for(let r=t;r<i.end;){let n=i.char(r);for(let s of this.inlineParsers)if(s){let a=s(i,n,r);if(a>=0){r=a;continue e}}r++}return i.resolveMarkers(0)}};function kr(O){return O!=null&&O.length>0}function Yc(O){if(!Array.isArray(O))return O;if(O.length==0)return null;let e=Yc(O[0]);if(O.length==1)return e;let t=Yc(O.slice(1));if(!t||!e)return e||t;let i=(s,a)=>(s||xi).concat(a||xi),r=e.wrap,n=t.wrap;return{props:i(e.props,t.props),defineNodes:i(e.defineNodes,t.defineNodes),parseBlock:i(e.parseBlock,t.parseBlock),parseInline:i(e.parseInline,t.parseInline),remove:i(e.remove,t.remove),wrap:r?n?(s,a,o,l)=>r(n(s,a,o,l),a,o,l):r:n}}function Ys(O,e){let t=O.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}var am=[de.none];for(let O=1,e;e=y[O];O++)am[O]=de.define({id:O,name:e,props:O>=y.Escape?[]:[[R.group,O in Fp?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});var xi=[],Zs=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,i,r=0){return t Line truncated
`;)n--;this.fragmentEnd=n?n-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=t;if(!i.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(R.contextHash)==e}takeNodes(e){let t=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),n=e.absoluteLineStart,s=n,a=e.block.children.length,o=s,l=a;for(;;){if(t.to-i>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let c=dm(t.from-i,e.ranges);if(t.to-i<=e.ranges[e.rangeI].to)e.addNode(t.tree,c);else{let h=new D(e.parser.nodeSet.types[y.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(h,t.tree),e.addNode(h,c)}if(t.type.is("Block")&&(ew.indexOf(t.type.id)<0?(s=t.to-i,a=e.block.children.length):(s=o,a=l),o=t.to-i,l=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return s-n}};function dm(O,e){let t=O;for(let i=1;i<e.length;i++){let r=e[i-1].to,n=e[i].from;r<O&&(t-=n-r)}return t}var tw=F({"Blockquote/...":d.quote,HorizontalRule:d.contentSeparator,"ATXHeading1/... SetextHeading1/...":d.heading1,"ATXHeading2/... SetextHeading2/...":d.heading2,"ATXHeading3/...":d.heading3,"ATXHeading4/...":d.heading4,"ATXHeading5/...":d.heading5,"ATXHeading6/...":d.heading6,"Comment CommentBlock":d.comment,Escape:d.escape,Entity:d.character,"Emphasis/...":d.emphasis,"StrongEmphasis/...":d.strong,"Link/... Image/...":d.link,"OrderedList/... BulletList/...":d.list,"BlockQuote/...":d.quote,"InlineCode CodeText":d.monospace,"URL Autolink":d.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":d.processingInstruction,"CodeInfo LinkLabel":d.labelName,LinkTitle:d.string,Paragraph:d.content}),um=new _r(new Kt(am).extend(tw),Object.keys(vs).map(O=>vs[O]),Object.keys(vs).map(O=>nm[O]),Object.keys(vs),Hx,Fp,Object.keys(Xc).map(O=>Xc[O]),Object.keys(Xc),[]);function Ow(O,e,t){let i=[];for(let r=O.firstChild,n=e;;r=r.nextSibling){let s=r?r.from:t;if(s>n&&i.push({from:n,to:s}),!r)break;n=r.to}return i}function $m(O){let{codeParser:e,htmlParser:t}=O;return{wrap:wO((r,n)=>{let s=r.type.id;if(e&&(s==y.CodeBlock||s==y.FencedCode)){let a="";if(s==y.FencedCode){let l=r.node.getChild(y.CodeInfo);l&&(a=n.read(l.from,l.to))}let o=e(a);if(o)return{parser:o,overlay:l=>l.type.id==y.CodeText,bracketed:s==y.FencedCode}}else if(t&&(s==y.HTMLBlock||s==y.HTMLTag||s==y.CommentBlock))return{parser:t,overlay:Ow(r.node,r.from,r.to)};return null})}}var iw={resolve:"Strikethrough",mark:"StrikethroughMark"},rw={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":d.strikethrough}},{name:"StrikethroughMark",style:d.processingInstruction}],parseInline:[{name:"Strikethrough",parse(O,e,t){if(e!=126||O.char(t+1)!=126||O.char(t+2)==126)return-1;let i=O.slice(t-1,t),r=O.slice(t+2,t+3),n=/\s|^$/.test(i),s=/\s|^$/.test(r),a=Zr.test(i),o=Zr.test(r);return O.addDelimiter(iw,t,t+2,!s&&(!o||n||a),!n&&(!a||s||o))},after:"Emphasis"}]};function Yr(O,e,t=0,i,r=0){let n=0,s=!0,a=-1,o=-1,l=!1,c=()=>{i.push(O.elt("TableCell",r+a,r+o,O.parser.parseInline(e.slice(a,o),r+a)))};for(let h=t;h<e.length;h++){let f=e.charCodeAt(h);f==124&&!l?((!s||a>-1)&&n++,s=!1,i&&(a>-1&&c(),i.push(O.elt("TableDelimiter",h+r,h+r+1))),a=o=-1):(l||f!=32&&f!=9)&&(a<0&&(a=h),o=h+1),l=!l&&f==92}return a>-1&&(n++,i&&c()),n}function Ap(O,e){for(let t=e;t<O.length;t++){let i=O.charCodeAt(t);if(i==124)return!0;i==92&&t++}return!1}var Qm=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Us=class{constructor(){this.rows=null}nextLine(e,t,i){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&Qm.test(r=t.text.slice(t.pos))){let n=[];Yr(e,i.content,0,n,i.start)==Yr(e,r,t.pos)&&(this.rows=[e.elt("TableHeader",i.start,i.start+i.content.length,n),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];Yr(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}},nw={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":d.heading}},"TableRow",{name:"TableCell",style:d.content},{name:"TableDelimiter",style:d.processingInstruction}],parseBlock:[{name:"Table",leaf(O,e){return Ap(e.content,0)?new Us:null},endLeaf(O,e,t){if(t.parsers.some(r=>r instanceof Us)||!Ap(e.text,e.basePos))return!1;let i=O.peekLine();return Qm.test(i)&&Yr(O,e.text,e.basePos)==Yr(O,i,e.basePos)},before:"SetextHeading"}]},Rc=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},sw={defineNodes:[{name:"Task",block:!0,style:d.list},{name:"TaskMarker",style:d.atom}],parseBlock:[{name Line truncated
`,{label:"if",detail:"block",type:"keyword"}),W("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),W("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),W("import ${module}",{label:"import",detail:"statement",type:"keyword"}),W("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],ev=cO(Bm,zt(KZ.concat(JZ)));function Dc(O){let{node:e,pos:t}=O,i=O.lineIndent(t,-1),r=null;for(;;){let n=e.childBefore(t);if(n)if(n.name=="Comment")t=n.from;else if(n.name=="Body"||n.name=="MatchBody")O.baseIndentFor(n)+O.unit<=i&&(r=n),e=n;else if(n.name=="MatchClause")e=n;else if(n.type.is("Statement"))e=n;else break;else break}return r}function Ic(O,e){let t=O.baseIndentFor(e),i=O.lineAt(O.pos,-1),r=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&O.node.to<r+100&&!/\S/.test(O.state.sliceDoc(r,O.node.to))&&O.lineIndent(O.pos,-1)<=t||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(O.textAfter)&&O.lineIndent(O.pos,-1)>t?null:t+O.unit}var Bc=ne.define({name:"python",parser:Am.configure({props:[se.add({Body:O=>{var e;let t=/^\s*(#|$)/.test(O.textAfter)&&Dc(O)||O.node;return(e=Ic(O,t))!==null&&e!==void 0?e:O.continue()},MatchBody:O=>{var e;let t=Dc(O);return(e=Ic(O,t||O.node))!==null&&e!==void 0?e:O.continue()},IfStatement:O=>/^\s*(else:|elif )/.test(O.textAfter)?O.baseIndent:O.continue(),"ForStatement WhileStatement":O=>/^\s*else:/.test(O.textAfter)?O.baseIndent:O.continue(),TryStatement:O=>/^\s*(except[ :]|finally:|else:)/.test(O.textAfter)?O.baseIndent:O.continue(),MatchStatement:O=>/^\s*case /.test(O.textAfter)?O.baseIndent+O.unit:O.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":be({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":be({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":be({closing:"]"}),MemberExpression:O=>O.baseIndent+O.unit,"String FormatString":()=>null,Script:O=>{var e;let t=Dc(O);return(e=t&&Ic(O,t))!==null&&e!==void 0?e:O.continue()}}),te.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":me,Body:(O,e)=>({from:O.from+1,to:O.to-(O.to==e.doc.length?0:1)}),"String FormatString":(O,e)=>({from:e.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Nm(){return new J(Bc,[Bc.data.of({autocomplete:HZ}),Bc.data.of({autocomplete:ev})])}var tv=36,Fm=1,Ov=2,yi=3,Nc=4,iv=5,rv=6,nv=7,sv=8,av=9,ov=10,lv=11,cv=12,hv=13,fv=14,dv=15,uv=16,Qv=17,Hm=18,$v=19,ng=20,sg=21,Km=22,pv=23,mv=24;function Hc(O){return O>=65&&O<=90||O>=97&&O<=122||O>=48&&O<=57}function gv(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function CO(O,e,t){for(let i=!1;;){if(O.next<0)return;if(O.next==e&&!i){O.advance();return}i=t&&!i&&O.next==92,O.advance()}}function Pv(O,e){e:for(;;){if(O.next<0)return;if(O.next==36){O.advance();for(let t=0;t<e.length;t++){if(O.next!=e.charCodeAt(t))continue e;O.advance()}if(O.next==36){O.advance();return}}else O.advance()}}function Sv(O,e){let t="[{<(".indexOf(String.fromCharCode(e)),i=t<0?e:"]}>)".charCodeAt(t);for(;;){if(O.next<0)return;if(O.next==i&&O.peek(1)==39){O.advance(2);return}O.advance()}}function Kc(O,e){for(;!(O.next!=95&&!Hc(O.next));)e!=null&&(e+=String.fromCharCode(O.next)),O.advance();return e}function Xv(O){if(O.next==39||O.next==34||O.next==96){let e=O.next;O.advance(),CO(O,e,!1)}else Kc(O)}function Jm(O,e){for(;O.next==48||O.next==49;)O.advance();e&&O.next==e&&O.advance()}function eg(O,e){for(;;){if(O.next==46){if(e)break;e=!0}else if(O.next<48||O.next>57)break;O.advance()}if(O.next==69||O.next==101)for(O.advance(),(O.next==43||O.next==45)&&O.advance();O.next>=48&&O.next<=57;)O.advance()}function tg(O){for(;!(O.next<0||O.next==10);)O.advance()}function jO(O,e){for(let t=0;t<e.length;t++)if(e.charCodeAt(t)==O)return!0;return!1}var Fc=` \r
`;function ag(O,e,t){let i=Object.create(null);i.true=i.false=iv,i.null=i.unknown=rv;for(let r of O.split(" "))r&&(i[r]=ng);for(let r of e.split(" "))r&&(i[r]=sg);for(let r of(t||"").split(" "))r&&(i[r]=mv);return i}var GO="array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ",EO="absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ",Jc={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:ag(EO,GO)};function Tv(O,e,t,i){let r={};for(let n in Jc)r[n]=(O.hasOwnProperty(n)?O:Jc)[n];return e&&(r.words=ag(e,t||"",i)),r}function og(O){return new z(e=>{var t;let{next:i}=e;if(e.advance(),jO(i,Fc)){for(;jO(e.next,Fc);)e.advance();e.acceptToken(tv)}else if(i==36&&O.doubleDollarQuotedStrings){let r=Kc(e,"");e.next==36&&(e.advance(),Pv(e,r),e.acceptToken(yi))}else if(i==39||i==34&&O.doubleQuotedStrings)CO(e,i,O.backslashEscapes),e.acceptToken(yi);else if(i==35&&O.hashComments||i==47&&e.next==47&&O.slashComments)tg(e),e.acceptToken(Fm);else if(i==45&&e.next==45&&(!O.spaceAfterDashes||e.peek(1)==32))tg(e),e.acceptToken(Fm);else if(i==47&&e.next==42){e.advance();for(let r=1;;){let n=e.next;if(e.next<0)break;if(e.advance(),n==42&&e.next==47){if(r--,e.advance(),!r)break}else n==47&&e.next==42&&(r++,e.advance())}e.acceptToken(Ov)}else if((i==101||i==69)&&e.next==39)e.advance(),CO(e,39,!0),e.acceptToken(yi);else if((i==110||i==78)&&e.next==39&&O.charSetCasts)e.advance(),CO(e,39,O.backslashEscapes),e.acceptToken(yi);else if(i==95&&O.charSetCasts)for(let r=0;;r++){if(e.next==39&&r>1){e.advance(),CO(e,39,O.backslashEscapes),e.acceptToken(yi);break}if(!Hc(e.next))break;e.advance()}else if(O.plsqlQuotingMechanism&&(i==113||i==81)&&e.next==39&&e.peek(1)>0&&!jO(e.peek(1),Fc)){let r=e.peek(1);e.advance(2),Sv(e,r),e.acceptToken(yi)}else if(jO(i,O.identifierQuotes)){let r=i==91?93:i;CO(e,r,!1),e.acceptToken($v)}else if(i==40)e.acceptToken(nv);else if(i==41)e.acceptToken(sv);else if(i==123)e.acceptToken(av);else if(i==125)e.acceptToken(ov);else if(i==91)e.acceptToken(lv);else if(i==93)e.acceptToken(cv);else if(i==59)e.acceptToken(hv);else if(O.unquotedBitLiterals&&i==48&&e.next==98)e.advance(),Jm(e),e.acceptToken(Km);else if((i==98||i==66)&&(e.next==39||e.next==34)){let r=e.next;e.advance(),O.treatBitsAsBytes?(CO(e,r,O.backslashEscapes),e.acceptToken(pv)):(Jm(e,r),e.acceptToken(Km))}else if(i==48&&(e.next==120||e.next==88)||(i==120||i==88)&&e.next==39){let r=e.next==39;for(e.advance();gv(e.next);)e.advance();r&&e.next==39&&e.advance(),e.acceptToken(Nc)}else if(i==46&&e.next>=48&&e.next<=57)eg(e,!0),e.acceptToken(Nc);else if(i==46)e.acceptToken(fv);else if(i>=48&&i<=57)eg(e,!1),e.acceptToken(Nc);else if(jO(i,O.operatorChars)){for(;jO(e.next,O.operatorChars);)e.advance();e.acceptToken(dv Line truncated
`,{label:"if",detail:"block",type:"keyword"}),j("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),j("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),j("import ${module}",{label:"import",detail:"statement",type:"keyword"}),j("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],oY=cO(tg,zt(sY.concat(aY)));function Nc(O){let{node:e,pos:t}=O,i=O.lineIndent(t,-1),r=null;for(;;){let n=e.childBefore(t);if(n)if(n.name=="Comment")t=n.from;else if(n.name=="Body"||n.name=="MatchBody")O.baseIndentFor(n)+O.unit<=i&&(r=n),e=n;else if(n.name=="MatchClause")e=n;else if(n.type.is("Statement"))e=n;else break;else break}return r}function Fc(O,e){let t=O.baseIndentFor(e),i=O.lineAt(O.pos,-1),r=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&O.node.to<r+100&&!/\S/.test(O.state.sliceDoc(r,O.node.to))&&O.lineIndent(O.pos,-1)<=t||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(O.textAfter)&&O.lineIndent(O.pos,-1)>t?null:t+O.unit}var Hc=ne.define({name:"python",parser:Fm.configure({props:[se.add({Body:O=>{var e;let t=/^\s*(#|$)/.test(O.textAfter)&&Nc(O)||O.node;return(e=Fc(O,t))!==null&&e!==void 0?e:O.continue()},MatchBody:O=>{var e;let t=Nc(O);return(e=Fc(O,t||O.node))!==null&&e!==void 0?e:O.continue()},IfStatement:O=>/^\s*(else:|elif )/.test(O.textAfter)?O.baseIndent:O.continue(),"ForStatement WhileStatement":O=>/^\s*else:/.test(O.textAfter)?O.baseIndent:O.continue(),TryStatement:O=>/^\s*(except[ :]|finally:|else:)/.test(O.textAfter)?O.baseIndent:O.continue(),MatchStatement:O=>/^\s*case /.test(O.textAfter)?O.baseIndent+O.unit:O.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":ye({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":ye({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":ye({closing:"]"}),MemberExpression:O=>O.baseIndent+O.unit,"String FormatString":()=>null,Script:O=>{var e;let t=Nc(O);return(e=t&&Fc(O,t))!==null&&e!==void 0?e:O.continue()}}),te.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":me,Body:(O,e)=>({from:O.from+1,to:O.to-(O.to==e.doc.length?0:1)}),"String FormatString":(O,e)=>({from:e.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Og(){return new J(Hc,[Hc.data.of({autocomplete:nY}),Hc.data.of({autocomplete:oY})])}var lY=36,ig=1,cY=2,wi=3,Kc=4,hY=5,fY=6,dY=7,uY=8,$Y=9,QY=10,pY=11,mY=12,gY=13,PY=14,SY=15,XY=16,TY=17,rg=18,yY=19,fg=20,dg=21,ng=22,bY=23,xY=24;function eh(O){return O>=65&&O<=90||O>=97&&O<=122||O>=48&&O<=57}function wY(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function GO(O,e,t){for(let i=!1;;){if(O.next<0)return;if(O.next==e&&!i){O.advance();return}i=t&&!i&&O.next==92,O.advance()}}function kY(O,e){e:for(;;){if(O.next<0)return;if(O.next==36){O.advance();for(let t=0;t<e.length;t++){if(O.next!=e.charCodeAt(t))continue e;O.advance()}if(O.next==36){O.advance();return}}else O.advance()}}function vY(O,e){let t="[{<(".indexOf(String.fromCharCode(e)),i=t<0?e:"]}>)".charCodeAt(t);for(;;){if(O.next<0)return;if(O.next==i&&O.peek(1)==39){O.advance(2);return}O.advance()}}function th(O,e){for(;!(O.next!=95&&!eh(O.next));)e!=null&&(e+=String.fromCharCode(O.next)),O.advance();return e}function YY(O){if(O.next==39||O.next==34||O.next==96){let e=O.next;O.advance(),GO(O,e,!1)}else th(O)}function sg(O,e){for(;O.next==48||O.next==49;)O.advance();e&&O.next==e&&O.advance()}function ag(O,e){for(;;){if(O.next==46){if(e)break;e=!0}else if(O.next<48||O.next>57)break;O.advance()}if(O.next==69||O.next==101)for(O.advance(),(O.next==43||O.next==45)&&O.advance();O.next>=48&&O.next<=57;)O.advance()}function og(O){for(;!(O.next<0||O.next==10);)O.advance()}function CO(O,e){for(let t=0;t<e.length;t++)if(e.charCodeAt(t)==O)return!0;return!1}var Jc=` \r
`;function ug(O,e,t){let i=Object.create(null);i.true=i.false=hY,i.null=i.unknown=fY;for(let r of O.split(" "))r&&(i[r]=fg);for(let r of e.split(" "))r&&(i[r]=dg);for(let r of(t||"").split(" "))r&&(i[r]=xY);return i}var EO="array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ",AO="absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ",Oh={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:ug(AO,EO)};function _Y(O,e,t,i){let r={};for(let n in Oh)r[n]=(O.hasOwnProperty(n)?O:Oh)[n];return e&&(r.words=ug(e,t||"",i)),r}function $g(O){return new q(e=>{var t;let{next:i}=e;if(e.advance(),CO(i,Jc)){for(;CO(e.next,Jc);)e.advance();e.acceptToken(lY)}else if(i==36&&O.doubleDollarQuotedStrings){let r=th(e,"");e.next==36&&(e.advance(),kY(e,r),e.acceptToken(wi))}else if(i==39||i==34&&O.doubleQuotedStrings)GO(e,i,O.backslashEscapes),e.acceptToken(wi);else if(i==35&&O.hashComments||i==47&&e.next==47&&O.slashComments)og(e),e.acceptToken(ig);else if(i==45&&e.next==45&&(!O.spaceAfterDashes||e.peek(1)==32))og(e),e.acceptToken(ig);else if(i==47&&e.next==42){e.advance();for(let r=1;;){let n=e.next;if(e.next<0)break;if(e.advance(),n==42&&e.next==47){if(r--,e.advance(),!r)break}else n==47&&e.next==42&&(r++,e.advance())}e.acceptToken(cY)}else if((i==101||i==69)&&e.next==39)e.advance(),GO(e,39,!0),e.acceptToken(wi);else if((i==110||i==78)&&e.next==39&&O.charSetCasts)e.advance(),GO(e,39,O.backslashEscapes),e.acceptToken(wi);else if(i==95&&O.charSetCasts)for(let r=0;;r++){if(e.next==39&&r>1){e.advance(),GO(e,39,O.backslashEscapes),e.acceptToken(wi);break}if(!eh(e.next))break;e.advance()}else if(O.plsqlQuotingMechanism&&(i==113||i==81)&&e.next==39&&e.peek(1)>0&&!CO(e.peek(1),Jc)){let r=e.peek(1);e.advance(2),vY(e,r),e.acceptToken(wi)}else if(CO(i,O.identifierQuotes)){let r=i==91?93:i;GO(e,r,!1),e.acceptToken(yY)}else if(i==40)e.acceptToken(dY);else if(i==41)e.acceptToken(uY);else if(i==123)e.acceptToken($Y);else if(i==125)e.acceptToken(QY);else if(i==91)e.acceptToken(pY);else if(i==93)e.acceptToken(mY);else if(i==59)e.acceptToken(gY);else if(O.unquotedBitLiterals&&i==48&&e.next==98)e.advance(),sg(e),e.acceptToken(ng);else if((i==98||i==66)&&(e.next==39||e.next==34)){let r=e.next;e.advance(),O.treatBitsAsBytes?(GO(e,r,O.backslashEscapes),e.acceptToken(bY)):(sg(e,r),e.acceptToken(ng))}else if(i==48&&(e.next==120||e.next==88)||(i==120||i==88)&&e.next==39){let r=e.next==39;for(e.advance();wY(e.next);)e.advance();r&&e.next==39&&e.advance(),e.acceptToken(Kc)}else if(i==46&&e.next>=48&&e.next<=57)ag(e,!0),e.acceptToken(Kc);else if(i==46)e.acceptToken(PY);else if(i>=48&&i<=57)ag(e,!1),e.acceptToken(Kc);else if(CO(i,O.operatorChars)){for(;CO(e.next,O.operatorChars);)e.advance();e.acceptToken(SY Line truncated
@@ -1 +1 @@
var Vi=Object.create;var Hn=Object.defineProperty;var Gi=Object.getOwnPropertyDescriptor;var Ri=Object.getOwnPropertyNames;var Zi=Object.getPrototypeOf,Ki=Object.prototype.hasOwnProperty;var v=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Qi=(n,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of Ri(t))!Ki.call(n,e)&&e!==a&&Hn(n,e,{get:()=>t[e],enumerable:!(i=Gi(t,e))||i.enumerable});return n};var oe=(n,t,a)=>(a=n!=null?Vi(Zi(n)):{},Qi(t||!n||!n.__esModule?Hn(a,"default",{value:n,enumerable:!0}):a,n));var En=v((He,je)=>{(function(n,t){typeof He=="object"&&typeof je<"u"?je.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_advancedFormat=t()})(He,(function(){"use strict";return function(n,t){var a=t.prototype,i=a.format;a.format=function(e){var r=this,s=this.$locale();if(!this.isValid())return i.bind(this)(e);var _=this.$utils(),d=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(u){switch(u){case"Q":return Math.ceil((r.$M+1)/3);case"Do":return s.ordinal(r.$D);case"gggg":return r.weekYear();case"GGGG":return r.isoWeekYear();case"wo":return s.ordinal(r.week(),"W");case"w":case"ww":return _.s(r.week(),u==="w"?1:2,"0");case"W":case"WW":return _.s(r.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return _.s(String(r.$H===0?24:r.$H),u==="k"?1:2,"0");case"X":return Math.floor(r.$d.getTime()/1e3);case"x":return r.$d.getTime();case"z":return"["+r.offsetName()+"]";case"zzz":return"["+r.offsetName("long")+"]";default:return u}}));return i.bind(this)(d)}}}))});var Jn=v((Te,we)=>{(function(n,t){typeof Te=="object"&&typeof we<"u"?we.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_customParseFormat=t()})(Te,(function(){"use strict";var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,i=/\d\d/,e=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,s={},_=function(c){return(c=+c)+(c>68?1900:2e3)},d=function(c){return function(y){this[c]=+y}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(c){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var D=y.match(/([+-]|\d\d)/g),L=60*D[1]+(+D[2]||0);return L===0?0:D[0]==="+"?-L:L})(c)}],o=function(c){var y=s[c];return y&&(y.indexOf?y:y.s.concat(y.f))},f=function(c,y){var D,L=s.meridiem;if(L){for(var w=1;w<=24;w+=1)if(c.indexOf(L(w,0,y))>-1){D=w>12;break}}else D=c===(y?"pm":"PM");return D},l={A:[r,function(c){this.afternoon=f(c,!1)}],a:[r,function(c){this.afternoon=f(c,!0)}],Q:[a,function(c){this.month=3*(c-1)+1}],S:[a,function(c){this.milliseconds=100*+c}],SS:[i,function(c){this.milliseconds=10*+c}],SSS:[/\d{3}/,function(c){this.milliseconds=+c}],s:[e,d("seconds")],ss:[e,d("seconds")],m:[e,d("minutes")],mm:[e,d("minutes")],H:[e,d("hours")],h:[e,d("hours")],HH:[e,d("hours")],hh:[e,d("hours")],D:[e,d("day")],DD:[i,d("day")],Do:[r,function(c){var y=s.ordinal,D=c.match(/\d+/);if(this.day=D[0],y)for(var L=1;L<=31;L+=1)y(L).replace(/\[|\]/g,"")===c&&(this.day=L)}],w:[e,d("week")],ww:[i,d("week")],M:[e,d("month")],MM:[i,d("month")],MMM:[r,function(c){var y=o("months"),D=(o("monthsShort")||y.map((function(L){return L.slice(0,3)}))).indexOf(c)+1;if(D<1)throw new Error;this.month=D%12||D}],MMMM:[r,function(c){var y=o("months").indexOf(c)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,d("year")],YY:[i,function(c){this.year=_(c)}],YYYY:[/\d{4}/,d("year")],Z:u,ZZ:u};function m(c){var y,D;y=c,D=s&&s.formats;for(var L=(c=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function($,j,U){var W=U&&U.toUpperCase();return j||D[U]||n[U]||D[W].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(g,M,h){return M||h.slice(1)}))}))).match(t),w=L.length,b=0;b<w;b+=1){var C=L[b],A=l[C],I=A&&A[0],x=A&&A[1];L[b]=x?{regex:I,parser:x}:C.replace(/^\[|\]$/g,"")}return function($){for(var j={},U=0,W=0;U<w;U+=1){var g=L[U];if(typeof g=="string")W+=g.length;else{var M=g.regex,h=g.parser,p=$.slice(W),Y=M.exec(p)[0];h.call(j,Y),$=$.replace(Y,"")}}return(function(S){var H=S.afternoon;if(H!==void 0){var T=S.hours;H?T<12&&(S.hours+=12):T===12&&(S.hours=0),delete S.afternoon}})(j),j}}return function(c,y,D){D.p.customParseFormat=!0,c&&c.parseTwoDigitYear&&(_=c.parseTwoDigitYear);var L=y.prototype,w=L.parse;L.parse=function(b){var C=b.date,A=b.utc,I=b.args;this.$u=A;var x=I[1];if(typeof x=="string"){var $=I[2]===!0,j=I[3]===!0,U=$||j,W=I[2];j&&(W=I[2]),s=this.$locale(),!$&&W&&(s=D.Ls[W]),this.$d=(function(p,Y,S,H){try{if(["x","X"].indexOf(Y)>-1)return new Date((Y==="X"?1e3:1)*p);var T=m(Y)(p),q=T.year,N=T.month,F=T.day,P=T.hours,B=T.minutes,Q=T.seconds,ae=T.milliseconds,R=T.zone,J=T.week,G=new Date,X=F||(q||N?1:G.getDate()),ee=q||G.getFullYear(),fe=0;q&&!N||(fe=N>0?N-1:G.getMonth());var me,pe=P||0,Le=B||0,De=Q||0,ve=ae||0;return R?new DaLine truncated
var Vi=Object.create;var Hn=Object.defineProperty;var Gi=Object.getOwnPropertyDescriptor;var Ri=Object.getOwnPropertyNames;var Zi=Object.getPrototypeOf,Ki=Object.prototype.hasOwnProperty;var v=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Qi=(n,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of Ri(t))!Ki.call(n,e)&&e!==a&&Hn(n,e,{get:()=>t[e],enumerable:!(i=Gi(t,e))||i.enumerable});return n};var oe=(n,t,a)=>(a=n!=null?Vi(Zi(n)):{},Qi(t||!n||!n.__esModule?Hn(a,"default",{value:n,enumerable:!0}):a,n));var En=v((He,je)=>{(function(n,t){typeof He=="object"&&typeof je<"u"?je.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_advancedFormat=t()})(He,(function(){"use strict";return function(n,t){var a=t.prototype,i=a.format;a.format=function(e){var r=this,s=this.$locale();if(!this.isValid())return i.bind(this)(e);var _=this.$utils(),d=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(u){switch(u){case"Q":return Math.ceil((r.$M+1)/3);case"Do":return s.ordinal(r.$D);case"gggg":return r.weekYear();case"GGGG":return r.isoWeekYear();case"wo":return s.ordinal(r.week(),"W");case"w":case"ww":return _.s(r.week(),u==="w"?1:2,"0");case"W":case"WW":return _.s(r.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return _.s(String(r.$H===0?24:r.$H),u==="k"?1:2,"0");case"X":return Math.floor(r.$d.getTime()/1e3);case"x":return r.$d.getTime();case"z":return"["+r.offsetName()+"]";case"zzz":return"["+r.offsetName("long")+"]";default:return u}}));return i.bind(this)(d)}}}))});var Jn=v((Te,we)=>{(function(n,t){typeof Te=="object"&&typeof we<"u"?we.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_customParseFormat=t()})(Te,(function(){"use strict";var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,i=/\d\d/,e=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,s={},_=function(c){return(c=+c)+(c>68?1900:2e3)},d=function(c){return function(y){this[c]=+y}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(c){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var D=y.match(/([+-]|\d\d)/g),L=60*D[1]+(+D[2]||0);return L===0?0:D[0]==="+"?-L:L})(c)}],o=function(c){var y=s[c];return y&&(y.indexOf?y:y.s.concat(y.f))},f=function(c,y){var D,L=s.meridiem;if(L){for(var w=1;w<=24;w+=1)if(c.indexOf(L(w,0,y))>-1){D=w>12;break}}else D=c===(y?"pm":"PM");return D},l={A:[r,function(c){this.afternoon=f(c,!1)}],a:[r,function(c){this.afternoon=f(c,!0)}],Q:[a,function(c){this.month=3*(c-1)+1}],S:[a,function(c){this.milliseconds=100*+c}],SS:[i,function(c){this.milliseconds=10*+c}],SSS:[/\d{3}/,function(c){this.milliseconds=+c}],s:[e,d("seconds")],ss:[e,d("seconds")],m:[e,d("minutes")],mm:[e,d("minutes")],H:[e,d("hours")],h:[e,d("hours")],HH:[e,d("hours")],hh:[e,d("hours")],D:[e,d("day")],DD:[i,d("day")],Do:[r,function(c){var y=s.ordinal,D=c.match(/\d+/);if(this.day=D[0],y)for(var L=1;L<=31;L+=1)y(L).replace(/\[|\]/g,"")===c&&(this.day=L)}],w:[e,d("week")],ww:[i,d("week")],M:[e,d("month")],MM:[i,d("month")],MMM:[r,function(c){var y=o("months"),D=(o("monthsShort")||y.map((function(L){return L.slice(0,3)}))).indexOf(c)+1;if(D<1)throw new Error;this.month=D%12||D}],MMMM:[r,function(c){var y=o("months").indexOf(c)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,d("year")],YY:[i,function(c){this.year=_(c)}],YYYY:[/\d{4}/,d("year")],Z:u,ZZ:u};function m(c){var y,D;y=c,D=s&&s.formats;for(var L=(c=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function($,j,U){var W=U&&U.toUpperCase();return j||D[U]||n[U]||D[W].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(g,M,h){return M||h.slice(1)}))}))).match(t),w=L.length,b=0;b<w;b+=1){var C=L[b],A=l[C],I=A&&A[0],x=A&&A[1];L[b]=x?{regex:I,parser:x}:C.replace(/^\[|\]$/g,"")}return function($){for(var j={},U=0,W=0;U<w;U+=1){var g=L[U];if(typeof g=="string")W+=g.length;else{var M=g.regex,h=g.parser,p=$.slice(W),Y=M.exec(p)[0];h.call(j,Y),$=$.replace(Y,"")}}return(function(S){var H=S.afternoon;if(H!==void 0){var T=S.hours;H?T<12&&(S.hours+=12):T===12&&(S.hours=0),delete S.afternoon}})(j),j}}return function(c,y,D){D.p.customParseFormat=!0,c&&c.parseTwoDigitYear&&(_=c.parseTwoDigitYear);var L=y.prototype,w=L.parse;L.parse=function(b){var C=b.date,A=b.utc,I=b.args;this.$u=A;var x=I[1];if(typeof x=="string"){var $=I[2]===!0,j=I[3]===!0,U=$||j,W=I[2];j&&(W=I[2]),s=this.$locale(),!$&&W&&(s=D.Ls[W]),this.$d=(function(p,Y,S,H){try{if(["x","X"].indexOf(Y)>-1)return new Date((Y==="X"?1e3:1)*p);var T=m(Y)(p),q=T.year,N=T.month,F=T.day,P=T.hours,B=T.minutes,Q=T.seconds,ae=T.milliseconds,R=T.zone,J=T.week,G=new Date,X=F||(q||N?1:G.getDate()),ee=q||G.getFullYear(),fe=0;q&&!N||(fe=N>0?N-1:G.getMonth());var me,pe=P||0,Le=B||0,De=Q||0,ve=ae||0;return R?new DaLine truncated
@@ -1,5 +1,5 @@
var yr=Object.defineProperty;var Rr=(e,t)=>{for(var i in t)yr(e,i,{get:t[i],enumerable:!0})};var na={};Rr(na,{FileOrigin:()=>Bt,FileStatus:()=>Tt,OptionTypes:()=>Gi,Status:()=>ll,create:()=>ft,destroy:()=>ht,find:()=>Hi,getOptions:()=>Wi,parse:()=>Ui,registerPlugin:()=>Ie,setOptions:()=>Dt,supported:()=>Vi});var Sr=e=>e instanceof HTMLElement,_r=(e,t=[],i=[])=>{let a={...e},n=[],l=[],o=()=>({...a}),r=()=>{let g=[...n];return n.length=0,g},s=()=>{let g=[...l];l.length=0,g.forEach(({type:f,data:b})=>{p(f,b)})},p=(g,f,b)=>{if(b&&!document.hidden){l.push({type:g,data:f});return}u[g]&&u[g](f),n.push({type:g,data:f})},c=(g,...f)=>m[g]?m[g](...f):null,d={getState:o,processActionQueue:r,processDispatchQueue:s,dispatch:p,query:c},m={};t.forEach(g=>{m={...g(a),...m}});let u={};return i.forEach(g=>{u={...g(p,c,a),...u}}),d},wr=(e,t,i)=>{if(typeof i=="function"){e[t]=i;return}Object.defineProperty(e,t,{...i})},te=(e,t)=>{for(let i in e)e.hasOwnProperty(i)&&t(i,e[i])},We=e=>{let t={};return te(e,i=>{wr(t,i,e[i])}),t},se=(e,t,i=null)=>{if(i===null)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,i)},Lr="http://www.w3.org/2000/svg",Mr=["svg","path"],za=e=>Mr.includes(e),li=(e,t,i={})=>{typeof t=="object"&&(i=t,t=null);let a=za(e)?document.createElementNS(Lr,e):document.createElement(e);return t&&(za(e)?se(a,"class",t):a.className=t),te(i,(n,l)=>{se(a,n,l)}),a},Ar=e=>(t,i)=>{typeof i<"u"&&e.children[i]?e.insertBefore(t,e.children[i]):e.appendChild(t)},Pr=(e,t)=>(i,a)=>(typeof a<"u"?t.splice(a,0,i):t.push(i),i),zr=(e,t)=>i=>(t.splice(t.indexOf(i),1),i.element.parentNode&&e.removeChild(i.element),i),Fr=typeof window<"u"&&typeof window.document<"u",En=()=>Fr,Or=En()?li("svg"):{},Dr="children"in Or?e=>e.children.length:e=>e.childNodes.length,Tn=(e,t,i,a)=>{let n=i[0]||e.left,l=i[1]||e.top,o=n+e.width,r=l+e.height*(a[1]||1),s={element:{...e},inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:n,top:l,right:o,bottom:r}};return t.filter(p=>!p.isRectIgnored()).map(p=>p.rect).forEach(p=>{Fa(s.inner,{...p.inner}),Fa(s.outer,{...p.outer})}),Oa(s.inner),s.outer.bottom+=s.element.marginBottom,s.outer.right+=s.element.marginRight,Oa(s.outer),s},Fa=(e,t)=>{t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},Oa=e=>{e.width=e.right-e.left,e.height=e.bottom-e.top},Xe=e=>typeof e=="number",Cr=(e,t,i,a=.001)=>Math.abs(e-t)<a&&Math.abs(i)<a,Br=({stiffness:e=.5,damping:t=.75,mass:i=10}={})=>{let a=null,n=null,l=0,o=!1,p=We({interpolate:(c,d)=>{if(o)return;if(!(Xe(a)&&Xe(n))){o=!0,l=0;return}let m=-(n-a)*e;l+=m/i,n+=l,l*=t,Cr(n,a,l)||d?(n=a,l=0,o=!0,p.onupdate(n),p.oncomplete(n)):p.onupdate(n)},target:{set:c=>{if(Xe(c)&&!Xe(n)&&(n=c),a===null&&(a=c,n=c),a=c,n===a||typeof a>"u"){o=!0,l=0,p.onupdate(n),p.oncomplete(n);return}o=!1},get:()=>a},resting:{get:()=>o},onupdate:c=>{},oncomplete:c=>{}});return p};var kr=e=>e<.5?2*e*e:-1+(4-2*e)*e,Nr=({duration:e=500,easing:t=kr,delay:i=0}={})=>{let a=null,n,l,o=!0,r=!1,s=null,c=We({interpolate:(d,m)=>{o||s===null||(a===null&&(a=d),!(d-a<i)&&(n=d-a-i,n>=e||m?(n=1,l=r?0:1,c.onupdate(l*s),c.oncomplete(l*s),o=!0):(l=n/e,c.onupdate((n>=0?t(r?1-l:l):0)*s))))},target:{get:()=>r?0:s,set:d=>{if(s===null){s=d,c.onupdate(d),c.oncomplete(d);return}d<s?(s=1,r=!0):(r=!1,s=d),o=!1,a=null}},resting:{get:()=>o},onupdate:d=>{},oncomplete:d=>{}});return c},Da={spring:Br,tween:Nr},Vr=(e,t,i)=>{let a=e[t]&&typeof e[t][i]=="object"?e[t][i]:e[t]||e,n=typeof a=="string"?a:a.type,l=typeof a=="object"?{...a}:{};return Da[n]?Da[n](l):null},ji=(e,t,i,a=!1)=>{t=Array.isArray(t)?t:[t],t.forEach(n=>{e.forEach(l=>{let o=l,r=()=>i[l],s=p=>i[l]=p;typeof l=="object"&&(o=l.key,r=l.getter||r,s=l.setter||s),!(n[o]&&!a)&&(n[o]={get:r,set:s})})})},Gr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a})=>{let n={...t},l=[];return te(e,(o,r)=>{let s=Vr(r);if(!s)return;s.onupdate=c=>{t[o]=c},s.target=n[o],ji([{key:o,setter:c=>{s.target!==c&&(s.target=c)},getter:()=>t[o]}],[i,a],t,!0),l.push(s)}),{write:o=>{let r=document.hidden,s=!0;return l.forEach(p=>{p.resting||(s=!1),p.interpolate(o,r)}),s},destroy:()=>{}}},Ur=e=>(t,i)=>{e.addEventListener(t,i)},Hr=e=>(t,i)=>{e.removeEventListener(t,i)},Wr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,viewState:n,view:l})=>{let o=[],r=Ur(l.element),s=Hr(l.element);return a.on=(p,c)=>{o.push({type:p,fn:c}),r(p,c)},a.off=(p,c)=>{o.splice(o.findIndex(d=>d.type===p&&d.fn===c),1),s(p,c)},{write:()=>!0,destroy:()=>{o.forEach(p=>{s(p.type,p.fn)})}}},jr=({mixinConfig:e,viewProps:t,viewExternalAPI:i})=>{ji(e,i,t)},ue=e=>e!=null,Yr={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},qr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,view:n})=>{let l={...t},o={};ji(e,[i,a],t);let r=()=>[t.translateX||0,t.translateY||0],s=()=>[t.scaleX||0,t.scaleY||0],p=()=>n.rect?Tn(n.rect,n.childViews,r(),s()):null;return i.Line truncated
`);for(let a of i){let n=Vs(a);if(n){t.name=n;continue}let l=Gs(a);if(l){t.size=l;continue}let o=Us(a);if(o){t.source=o;continue}}return t},Hs=e=>{let t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},i=()=>t.progress,a=()=>{t.request&&t.request.abort&&t.request.abort()},n=()=>{let r=t.source;o.fire("init",r),r instanceof File?o.fire("load",r):r instanceof Blob?o.fire("load",bt(r,r.name)):Fi(r)?o.fire("load",Ns(r)):l(r)},l=r=>{if(!e){o.fire("error",{type:"error",body:"Can't load URL",code:400});return}t.timestamp=Date.now(),t.request=e(r,s=>{t.duration=Date.now()-t.timestamp,t.complete=!0,s instanceof Blob&&(s=bt(s,s.name||Ct(r))),o.fire("load",s instanceof Blob?s:s?s.body:null)},s=>{o.fire("error",typeof s=="string"?{type:"error",code:0,body:s}:s)},(s,p,c)=>{if(c&&(t.size=c),t.duration=Date.now()-t.timestamp,!s){t.progress=null;return}t.progress=p/c,o.fire("progress",t.progress)},()=>{o.fire("abort")},s=>{let p=Xi(typeof s=="string"?s:s.headers);o.fire("meta",{size:t.size||p.size,filename:p.name,source:p.source})})},o={...mi(),setSource:r=>t.source=r,getProgress:i,abort:a,load:n};return o},Ha=e=>/GET|HEAD/.test(e),Qe=(e,t,i)=>{let a={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{n=!0,o.abort()}},n=!1,l=!1;i={method:"POST",headers:{},withCredentials:!1,...i},t=encodeURI(t),Ha(i.method)&&e&&(t=`${t}${encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))}`);let o=new XMLHttpRequest,r=Ha(i.method)?o:o.upload;return r.onprogress=s=>{n||a.onprogress(s.lengthComputable,s.loaded,s.total)},o.onreadystatechange=()=>{o.readyState<2||o.readyState===4&&o.status===0||l||(l=!0,a.onheaders(o))},o.onload=()=>{o.status>=200&&o.status<300?a.onload(o):a.onerror(o)},o.onerror=()=>a.onerror(o),o.onabort=()=>{n=!0,a.onabort()},o.ontimeout=()=>a.ontimeout(o),o.open(i.method,t,!0),Et(i.timeout)&&(o.timeout=i.timeout),Object.keys(i.headers).forEach(s=>{let p=unescape(encodeURIComponent(i.headers[s]));o.setRequestHeader(s,p)}),i.responseType&&(o.responseType=i.responseType),i.withCredentials&&(o.withCredentials=!0),o.send(e),a},ae=(e,t,i,a)=>({type:e,code:t,body:i,headers:a}),Je=e=>t=>{e(ae("error",0,"Timeout",t.getAllResponseHeaders()))},Wa=e=>/\?/.test(e),Ot=(...e)=>{let t="";return e.forEach(i=>{t+=Wa(t)&&Wa(i)?i.replace(/\?/,"&"):i}),t},_i=(e="",t)=>{if(typeof t=="function")return t;if(!t||!ge(t.url))return null;let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,l,o,r,s,p)=>{let c=Qe(n,Ot(e,t.url),{...t,responseType:"blob"});return c.onload=d=>{let m=d.getAllResponseHeaders(),u=Xi(m).name||Ct(n);l(ae("load",d.status,t.method==="HEAD"?null:bt(i(d.response),u),m))},c.onerror=d=>{o(ae("error",d.status,a(d.response)||d.statusText,d.getAllResponseHeaders()))},c.onheaders=d=>{p(ae("headers",d.status,null,d.getAllResponseHeaders()))},c.ontimeout=Je(o),c.onprogress=r,c.onabort=s,c}},ye={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},Ws=(e,t,i,a,n,l,o,r,s,p,c)=>{let d=[],{chunkTransferId:m,chunkServer:u,chunkSize:g,chunkRetryDelays:f}=c,b={serverId:m,aborted:!1},v=t.ondata||(w=>w),h=t.onload||((w,F)=>F==="HEAD"?w.getResponseHeader("Upload-Offset"):w.response),E=t.onerror||(w=>null),I=w=>{let F=new FormData;de(n)&&F.append(i,JSON.stringify(n));let S=typeof t.headers=="function"?t.headers(a,n):{...t.headers,"Upload-Length":a.size},L={...t,headers:S},D=Qe(v(F),Ot(e,t.url),L);D.onload=O=>w(h(O,L.method)),D.onerror=O=>o(ae("error",O.status,E(O.response)||O.statusText,O.getAllResponseHeaders())),D.ontimeout=Je(o)},y=w=>{let F=Ot(e,u.url,b.serverId),L={headers:typeof t.headers=="function"?t.headers(b.serverId):{...t.headers},method:"HEAD"},D=Qe(null,F,L);D.onload=O=>w(h(O,L.method)),D.onerror=O=>o(ae("error",O.status,E(O.response)||O.statusText,O.getAllResponseHeaders())),D.ontimeout=Je(o)},T=Math.floor(a.size/g);for(let w=0;w<=T;w++){let F=w*g,S=a.slice(F,F+g,"application/offset+octet-stream");d[w]={index:w,size:S.size,offset:F,data:S,file:a,progress:0,retries:[...f],status:ye.QUEUED,error:null,request:null,timeout:null}}let _=()=>l(b.serverId),x=w=>w.status===ye.QUEUED||w.status===ye.ERROR,R=w=>{if(b.aborted)return;if(w=w||d.find(x),!w){d.every(C=>C.status===ye.COMPLETE)&&_();return}w.status=ye.PROCESSING,w.progress=null;let F=u.ondata||(C=>C),S=u.onerror||(C=>null),L=u.onload||(()=>{}),D=Ot(e,u.url,b.serverId),O=typeof u.headers=="function"?u.headers(w):{...u.headers,"Content-Type":"application/offset+octet-stream","Upload-Offset":w.offset,"Upload-Length":a.size,"Upload-Name":a.name},U=w.request=Qe(F(w.data),D,{...u,headers:O});U.onload=C=>{L(C,w.index,d.length),w.status=ye.COMPLETE,w.request=null,A()},U.onprogress=(C,X,K)=>{w.progress=C?X:null,P()},U.onerror=C=>{w.status=ye.ERROR,w.request=null,w.error=S(C.response)||C.statusText,z(w)||o(ae("error",C.status,S(C.response)||C.statusText,C.getAllResponseHeaders()))},U.ontimeout=C=>{w.status=ye.ERROR,w.request=null,z(w)||Je(o)(C)},U.onabort=()=>{w.status=ye.QUEUED,w.request=null,s() Line truncated
var yr=Object.defineProperty;var Rr=(e,t)=>{for(var i in t)yr(e,i,{get:t[i],enumerable:!0})};var na={};Rr(na,{FileOrigin:()=>Bt,FileStatus:()=>Tt,OptionTypes:()=>Gi,Status:()=>ll,create:()=>ft,destroy:()=>ht,find:()=>Hi,getOptions:()=>Wi,parse:()=>Ui,registerPlugin:()=>Ie,setOptions:()=>Dt,supported:()=>Vi});var Sr=e=>e instanceof HTMLElement,_r=(e,t=[],i=[])=>{let a={...e},n=[],l=[],o=()=>({...a}),r=()=>{let g=[...n];return n.length=0,g},s=()=>{let g=[...l];l.length=0,g.forEach(({type:f,data:b})=>{p(f,b)})},p=(g,f,b)=>{if(b&&!document.hidden){l.push({type:g,data:f});return}u[g]&&u[g](f),n.push({type:g,data:f})},c=(g,...f)=>m[g]?m[g](...f):null,d={getState:o,processActionQueue:r,processDispatchQueue:s,dispatch:p,query:c},m={};t.forEach(g=>{m={...g(a),...m}});let u={};return i.forEach(g=>{u={...g(p,c,a),...u}}),d},wr=(e,t,i)=>{if(typeof i=="function"){e[t]=i;return}Object.defineProperty(e,t,{...i})},te=(e,t)=>{for(let i in e)e.hasOwnProperty(i)&&t(i,e[i])},We=e=>{let t={};return te(e,i=>{wr(t,i,e[i])}),t},se=(e,t,i=null)=>{if(i===null)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,i)},Lr="http://www.w3.org/2000/svg",Mr=["svg","path"],za=e=>Mr.includes(e),li=(e,t,i={})=>{typeof t=="object"&&(i=t,t=null);let a=za(e)?document.createElementNS(Lr,e):document.createElement(e);return t&&(za(e)?se(a,"class",t):a.className=t),te(i,(n,l)=>{se(a,n,l)}),a},Ar=e=>(t,i)=>{typeof i<"u"&&e.children[i]?e.insertBefore(t,e.children[i]):e.appendChild(t)},Pr=(e,t)=>(i,a)=>(typeof a<"u"?t.splice(a,0,i):t.push(i),i),zr=(e,t)=>i=>(t.splice(t.indexOf(i),1),i.element.parentNode&&e.removeChild(i.element),i),Fr=typeof window<"u"&&typeof window.document<"u",En=()=>Fr,Or=En()?li("svg"):{},Dr="children"in Or?e=>e.children.length:e=>e.childNodes.length,Tn=(e,t,i,a)=>{let n=i[0]||e.left,l=i[1]||e.top,o=n+e.width,r=l+e.height*(a[1]||1),s={element:{...e},inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:n,top:l,right:o,bottom:r}};return t.filter(p=>!p.isRectIgnored()).map(p=>p.rect).forEach(p=>{Fa(s.inner,{...p.inner}),Fa(s.outer,{...p.outer})}),Oa(s.inner),s.outer.bottom+=s.element.marginBottom,s.outer.right+=s.element.marginRight,Oa(s.outer),s},Fa=(e,t)=>{t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},Oa=e=>{e.width=e.right-e.left,e.height=e.bottom-e.top},Xe=e=>typeof e=="number",Cr=(e,t,i,a=.001)=>Math.abs(e-t)<a&&Math.abs(i)<a,Br=({stiffness:e=.5,damping:t=.75,mass:i=10}={})=>{let a=null,n=null,l=0,o=!1,p=We({interpolate:(c,d)=>{if(o)return;if(!(Xe(a)&&Xe(n))){o=!0,l=0;return}let m=-(n-a)*e;l+=m/i,n+=l,l*=t,Cr(n,a,l)||d?(n=a,l=0,o=!0,p.onupdate(n),p.oncomplete(n)):p.onupdate(n)},target:{set:c=>{if(Xe(c)&&!Xe(n)&&(n=c),a===null&&(a=c,n=c),a=c,n===a||typeof a>"u"){o=!0,l=0,p.onupdate(n),p.oncomplete(n);return}o=!1},get:()=>a},resting:{get:()=>o},onupdate:c=>{},oncomplete:c=>{}});return p};var kr=e=>e<.5?2*e*e:-1+(4-2*e)*e,Nr=({duration:e=500,easing:t=kr,delay:i=0}={})=>{let a=null,n,l,o=!0,r=!1,s=null,c=We({interpolate:(d,m)=>{o||s===null||(a===null&&(a=d),!(d-a<i)&&(n=d-a-i,n>=e||m?(n=1,l=r?0:1,c.onupdate(l*s),c.oncomplete(l*s),o=!0):(l=n/e,c.onupdate((n>=0?t(r?1-l:l):0)*s))))},target:{get:()=>r?0:s,set:d=>{if(s===null){s=d,c.onupdate(d),c.oncomplete(d);return}d<s?(s=1,r=!0):(r=!1,s=d),o=!1,a=null}},resting:{get:()=>o},onupdate:d=>{},oncomplete:d=>{}});return c},Da={spring:Br,tween:Nr},Vr=(e,t,i)=>{let a=e[t]&&typeof e[t][i]=="object"?e[t][i]:e[t]||e,n=typeof a=="string"?a:a.type,l=typeof a=="object"?{...a}:{};return Da[n]?Da[n](l):null},ji=(e,t,i,a=!1)=>{t=Array.isArray(t)?t:[t],t.forEach(n=>{e.forEach(l=>{let o=l,r=()=>i[l],s=p=>i[l]=p;typeof l=="object"&&(o=l.key,r=l.getter||r,s=l.setter||s),!(n[o]&&!a)&&(n[o]={get:r,set:s})})})},Gr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a})=>{let n={...t},l=[];return te(e,(o,r)=>{let s=Vr(r);if(!s)return;s.onupdate=c=>{t[o]=c},s.target=n[o],ji([{key:o,setter:c=>{s.target!==c&&(s.target=c)},getter:()=>t[o]}],[i,a],t,!0),l.push(s)}),{write:o=>{let r=document.hidden,s=!0;return l.forEach(p=>{p.resting||(s=!1),p.interpolate(o,r)}),s},destroy:()=>{}}},Ur=e=>(t,i)=>{e.addEventListener(t,i)},Hr=e=>(t,i)=>{e.removeEventListener(t,i)},Wr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,viewState:n,view:l})=>{let o=[],r=Ur(l.element),s=Hr(l.element);return a.on=(p,c)=>{o.push({type:p,fn:c}),r(p,c)},a.off=(p,c)=>{o.splice(o.findIndex(d=>d.type===p&&d.fn===c),1),s(p,c)},{write:()=>!0,destroy:()=>{o.forEach(p=>{s(p.type,p.fn)})}}},jr=({mixinConfig:e,viewProps:t,viewExternalAPI:i})=>{ji(e,i,t)},ue=e=>e!=null,Yr={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},qr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,view:n})=>{let l={...t},o={};ji(e,[i,a],t);let r=()=>[t.translateX||0,t.translateY||0],s=()=>[t.scaleX||0,t.scaleY||0],p=()=>n.rect?Tn(n.rect,n.childViews,r(),s()):null;return i.Line truncated
`);for(let a of i){let n=Vs(a);if(n){t.name=n;continue}let l=Gs(a);if(l){t.size=l;continue}let o=Us(a);if(o){t.source=o;continue}}return t},Hs=e=>{let t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},i=()=>t.progress,a=()=>{t.request&&t.request.abort&&t.request.abort()},n=()=>{let r=t.source;o.fire("init",r),r instanceof File?o.fire("load",r):r instanceof Blob?o.fire("load",bt(r,r.name)):Fi(r)?o.fire("load",Ns(r)):l(r)},l=r=>{if(!e){o.fire("error",{type:"error",body:"Can't load URL",code:400});return}t.timestamp=Date.now(),t.request=e(r,s=>{t.duration=Date.now()-t.timestamp,t.complete=!0,s instanceof Blob&&(s=bt(s,s.name||Ct(r))),o.fire("load",s instanceof Blob?s:s?s.body:null)},s=>{o.fire("error",typeof s=="string"?{type:"error",code:0,body:s}:s)},(s,p,c)=>{if(c&&(t.size=c),t.duration=Date.now()-t.timestamp,!s){t.progress=null;return}t.progress=p/c,o.fire("progress",t.progress)},()=>{o.fire("abort")},s=>{let p=Xi(typeof s=="string"?s:s.headers);o.fire("meta",{size:t.size||p.size,filename:p.name,source:p.source})})},o={...mi(),setSource:r=>t.source=r,getProgress:i,abort:a,load:n};return o},Ha=e=>/GET|HEAD/.test(e),Qe=(e,t,i)=>{let a={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{n=!0,o.abort()}},n=!1,l=!1;i={method:"POST",headers:{},withCredentials:!1,...i},t=encodeURI(t),Ha(i.method)&&e&&(t=`${t}${encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))}`);let o=new XMLHttpRequest,r=Ha(i.method)?o:o.upload;return r.onprogress=s=>{n||a.onprogress(s.lengthComputable,s.loaded,s.total)},o.onreadystatechange=()=>{o.readyState<2||o.readyState===4&&o.status===0||l||(l=!0,a.onheaders(o))},o.onload=()=>{o.status>=200&&o.status<300?a.onload(o):a.onerror(o)},o.onerror=()=>a.onerror(o),o.onabort=()=>{n=!0,a.onabort()},o.ontimeout=()=>a.ontimeout(o),o.open(i.method,t,!0),Et(i.timeout)&&(o.timeout=i.timeout),Object.keys(i.headers).forEach(s=>{let p=unescape(encodeURIComponent(i.headers[s]));o.setRequestHeader(s,p)}),i.responseType&&(o.responseType=i.responseType),i.withCredentials&&(o.withCredentials=!0),o.send(e),a},ae=(e,t,i,a)=>({type:e,code:t,body:i,headers:a}),Je=e=>t=>{e(ae("error",0,"Timeout",t.getAllResponseHeaders()))},Wa=e=>/\?/.test(e),Ot=(...e)=>{let t="";return e.forEach(i=>{t+=Wa(t)&&Wa(i)?i.replace(/\?/,"&"):i}),t},_i=(e="",t)=>{if(typeof t=="function")return t;if(!t||!ge(t.url))return null;let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,l,o,r,s,p)=>{let c=Qe(n,Ot(e,t.url),{...t,responseType:"blob"});return c.onload=d=>{let m=d.getAllResponseHeaders(),u=Xi(m).name||Ct(n);l(ae("load",d.status,t.method==="HEAD"?null:bt(i(d.response),u),m))},c.onerror=d=>{o(ae("error",d.status,a(d.response)||d.statusText,d.getAllResponseHeaders()))},c.onheaders=d=>{p(ae("headers",d.status,null,d.getAllResponseHeaders()))},c.ontimeout=Je(o),c.onprogress=r,c.onabort=s,c}},ye={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},Ws=(e,t,i,a,n,l,o,r,s,p,c)=>{let d=[],{chunkTransferId:m,chunkServer:u,chunkSize:g,chunkRetryDelays:f}=c,b={serverId:m,aborted:!1},v=t.ondata||(w=>w),h=t.onload||((w,F)=>F==="HEAD"?w.getResponseHeader("Upload-Offset"):w.response),E=t.onerror||(w=>null),I=w=>{let F=new FormData;de(n)&&F.append(i,JSON.stringify(n));let S=typeof t.headers=="function"?t.headers(a,n):{...t.headers,"Upload-Length":a.size},L={...t,headers:S},D=Qe(v(F),Ot(e,t.url),L);D.onload=O=>w(h(O,L.method)),D.onerror=O=>o(ae("error",O.status,E(O.response)||O.statusText,O.getAllResponseHeaders())),D.ontimeout=Je(o)},y=w=>{let F=Ot(e,u.url,b.serverId),L={headers:typeof t.headers=="function"?t.headers(b.serverId):{...t.headers},method:"HEAD"},D=Qe(null,F,L);D.onload=O=>w(h(O,L.method)),D.onerror=O=>o(ae("error",O.status,E(O.response)||O.statusText,O.getAllResponseHeaders())),D.ontimeout=Je(o)},T=Math.floor(a.size/g);for(let w=0;w<=T;w++){let F=w*g,S=a.slice(F,F+g,"application/offset+octet-stream");d[w]={index:w,size:S.size,offset:F,data:S,file:a,progress:0,retries:[...f],status:ye.QUEUED,error:null,request:null,timeout:null}}let _=()=>l(b.serverId),x=w=>w.status===ye.QUEUED||w.status===ye.ERROR,R=w=>{if(b.aborted)return;if(w=w||d.find(x),!w){d.every(C=>C.status===ye.COMPLETE)&&_();return}w.status=ye.PROCESSING,w.progress=null;let F=u.ondata||(C=>C),S=u.onerror||(C=>null),L=u.onload||(()=>{}),D=Ot(e,u.url,b.serverId),O=typeof u.headers=="function"?u.headers(w):{...u.headers,"Content-Type":"application/offset+octet-stream","Upload-Offset":w.offset,"Upload-Length":a.size,"Upload-Name":a.name},U=w.request=Qe(F(w.data),D,{...u,headers:O});U.onload=C=>{L(C,w.index,d.length),w.status=ye.COMPLETE,w.request=null,A()},U.onprogress=(C,X,K)=>{w.progress=C?X:null,P()},U.onerror=C=>{w.status=ye.ERROR,w.request=null,w.error=S(C.response)||C.statusText,z(w)||o(ae("error",C.status,S(C.response)||C.statusText,C.getAllResponseHeaders()))},U.ontimeout=C=>{w.status=ye.ERROR,w.request=null,z(w)||Je(o)(C)},U.onabort=()=>{w.status=ye.QUEUED,w.request=null,s() Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ti=typeof window<"u"&&typeof window.document<"u",Ce=Ti?window:{},ba=Ti&&Ce.document.documentElement?"ontouchstart"in Ce.document.documentElement:!1,Ea=Ti?"PointerEvent"in Ce:!1,Q="cropper",Ta="all",Sl="crop",_l="move",wl="zoom",nt="e",lt="w",vt="s",je="n",kt="ne",Nt="nw",Vt="se",Gt="sw",ca="".concat(Q,"-crop"),sl="".concat(Q,"-disabled"),Ee="".concat(Q,"-hidden"),cl="".concat(Q,"-hide"),kp="".concat(Q,"-invisible"),Ei="".concat(Q,"-modal"),da="".concat(Q,"-move"),Ht="".concat(Q,"Action"),hi="".concat(Q,"Preview"),va="crop",Ll="move",Ml="none",pa="crop",ma="cropend",ua="cropmove",ga="cropstart",dl="dblclick",Np=ba?"touchstart":"mousedown",Vp=ba?"touchmove":"mousemove",Gp=ba?"touchend touchcancel":"mouseup",pl=Ea?"pointerdown":Np,ml=Ea?"pointermove":Vp,ul=Ea?"pointerup pointercancel":Gp,gl="ready",fl="resize",hl="wheel",fa="zoom",bl="image/jpeg",Up=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Hp=/^data:/,Wp=/^data:image\/jpeg;base64,/,jp=/^img|canvas$/i,Al=200,Pl=100,El={viewMode:0,dragMode:va,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:Al,minContainerHeight:Pl,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Yp='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',qp=Number.isNaN||Ce.isNaN;function Y(e){return typeof e=="number"&&!qp(e)}var Tl=function(t){return t>0&&t<1/0};function la(e){return typeof e>"u"}function ot(e){return ra(e)==="object"&&e!==null}var $p=Object.prototype.hasOwnProperty;function It(e){if(!ot(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&$p.call(i,"isPrototypeOf")}catch{return!1}}function be(e){return typeof e=="function"}var Xp=Array.prototype.slice;function zl(e){return Array.from?Array.from(e):Xp.call(e)}function oe(e,t){return e&&be(t)&&(Array.isArray(e)||Y(e.length)?zl(e).forEach(function(i,a){t.call(e,i,a,e)}):ot(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)})),e}var J=Object.assign||function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];return ot(t)&&a.length>0&&a.forEach(function(l){ot(l)&&Object.keys(l).forEach(function(o){t[o]=l[o]})}),t},Kp=/\.\d*(?:0|9){12}\d*$/;function yt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Kp.test(e)?Math.round(e*t)/t:e}var Zp=/^width|height|left|top|marginLeft|marginTop$/;function Ye(e,t){var i=e.style;oe(t,function(a,n){Zp.test(n)&&Y(a)&&(a="".concat(a,"px")),i[n]=a})}function Qp(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function pe(e,t){if(t){if(Y(e.length)){oe(e,function(a){pe(a,t)});return}if(e.classList){e.classList.add(t);return}var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function De(e,t){if(t){if(Y(e.length)){oe(e,function(i){De(i,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function xt(e,t,i){if(t){if(Y(e.length)){oe(e,function(a){xt(a,t,i)});return}i?pe(e,t):De(e,t)}}var Jp=/([a-z\d])([A-Z])/g;function Ia(e){return e.replace(Jp,"$1-$2").toLowerCase()}function ha(e,t){return ot(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Ia(t)))}function Wt(e,t,i){ot(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(Ia(t)),i)}function em(e,t){if(ot(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{ Line truncated
<defs>
<radialGradient id="gradient-__UID__" cx=".5" cy="1.25" r="1.15">
@@ -42,7 +42,7 @@ ${p.outerHTML}${_}
filepond/dist/filepond.esm.js:
(*!
* FilePond 4.32.10
* FilePond 4.32.12
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*)
@@ -1,4 +1,4 @@
var ss=Object.defineProperty;var Sd=Object.getOwnPropertyDescriptor;var Td=Object.getOwnPropertyNames;var Ld=Object.prototype.hasOwnProperty;var Cd=(o,p)=>()=>(o&&(p=o(o=0)),p);var Ke=(o,p)=>()=>(p||o((p={exports:{}}).exports,p),p.exports);var Ed=(o,p,v,L)=>{if(p&&typeof p=="object"||typeof p=="function")for(let b of Td(p))!Ld.call(o,b)&&b!==v&&ss(o,b,{get:()=>p[b],enumerable:!(L=Sd(p,b))||L.enumerable});return o};var zd=o=>Ed(ss({},"__esModule",{value:!0}),o);var We=Ke((Yo,Qo)=>{(function(o,p){typeof Yo=="object"&&typeof Qo<"u"?Qo.exports=p():typeof define=="function"&&define.amd?define(p):(o=o||self,o.CodeMirror=p())})(Yo,(function(){"use strict";var o=navigator.userAgent,p=navigator.platform,v=/gecko\/\d/i.test(o),L=/MSIE \d/.test(o),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(o),S=/Edge\/(\d+)/.exec(o),s=L||b||S,h=s&&(L?document.documentMode||6:+(S||b)[1]),g=!S&&/WebKit\//.test(o),C=g&&/Qt\/\d+\.\d+/.test(o),k=!S&&/Chrome\/(\d+)/.exec(o),c=k&&+k[1],d=/Opera\//.test(o),x=/Apple Computer/.test(navigator.vendor),M=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(o),z=/PhantomJS/.test(o),w=x&&(/Mobile\/\w+/.test(o)||navigator.maxTouchPoints>2),W=/Android/.test(o),E=w||W||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(o),N=w||/Mac/.test(p),K=/\bCrOS\b/.test(o),V=/win/i.test(p),re=d&&o.match(/Version\/(\d*\.\d*)/);re&&(re=Number(re[1])),re&&re>=15&&(d=!1,g=!0);var q=N&&(C||d&&(re==null||re<12.11)),F=v||s&&h>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var n=e.className,r=D(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return j(e).appendChild(t)}function y(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function G(e,t,n,r){var i=y(e,t,n,r);return i.setAttribute("role","presentation"),i}var X;document.createRange?X=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:X=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function O(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function R(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function se(e,t){var n=e.className;D(t).test(n)||(e.className+=(n?" ":"")+t)}function _e(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!D(n[r]).test(t)&&(t+=" "+n[r]);return t}var I=function(e){e.select()};w?I=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(I=function(e){try{e.select()}catch{}});function T(e){return e.display.wrapper.ownerDocument}function he(e){return ze(e.display.wrapper)}function ze(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function de(e){return T(e).defaultView}function Ee(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ge(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Oe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,l=i||0;;){var u=e.indexOf(" ",a);if(u<0||u>=t)return l+(t-a);l+=u-a,l+=n-l%n,a=u+1}}var qe=function(){this.id=null,this.f=null,this.time=0,this.handler=Ee(this.onTimeout,this)};qe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},qe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function Se(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Be=50,Ze={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},Je={origin:"*mouse"},Re={origin:"+move"};function Ge(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(" ",r);a==-1&&(a=e.length);var l=a-r;if(a==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var U=[""];function Z(e){for(;U.length<=e;)U.push(ce(U)+" ");return U[e]}function ce(e){return e[e.length-1]}function He(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function te(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function fe(){}function oe(e,t){var n;return Object.create?n=Object.create(e):(fe.prototype=e,n=new fe),t&&ge(t,n),n}var Ue=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function we(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ue.test(e))}function Me(e,t){return t?t.source.indexOf("\\w")>-1&&we(e)?!Line truncated
var ss=Object.defineProperty;var Sd=Object.getOwnPropertyDescriptor;var Td=Object.getOwnPropertyNames;var Ld=Object.prototype.hasOwnProperty;var Cd=(o,p)=>()=>(o&&(p=o(o=0)),p);var Ke=(o,p)=>()=>(p||o((p={exports:{}}).exports,p),p.exports);var Ed=(o,p,v,L)=>{if(p&&typeof p=="object"||typeof p=="function")for(let b of Td(p))!Ld.call(o,b)&&b!==v&&ss(o,b,{get:()=>p[b],enumerable:!(L=Sd(p,b))||L.enumerable});return o};var zd=o=>Ed(ss({},"__esModule",{value:!0}),o);var We=Ke((Yo,Qo)=>{(function(o,p){typeof Yo=="object"&&typeof Qo<"u"?Qo.exports=p():typeof define=="function"&&define.amd?define(p):(o=o||self,o.CodeMirror=p())})(Yo,(function(){"use strict";var o=navigator.userAgent,p=navigator.platform,v=/gecko\/\d/i.test(o),L=/MSIE \d/.test(o),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(o),S=/Edge\/(\d+)/.exec(o),s=L||b||S,h=s&&(L?document.documentMode||6:+(S||b)[1]),g=!S&&/WebKit\//.test(o),C=g&&/Qt\/\d+\.\d+/.test(o),k=!S&&/Chrome\/(\d+)/.exec(o),c=k&&+k[1],d=/Opera\//.test(o),x=/Apple Computer/.test(navigator.vendor),M=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(o),z=/PhantomJS/.test(o),w=x&&(/Mobile\/\w+/.test(o)||navigator.maxTouchPoints>2),W=/Android/.test(o),E=w||W||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(o),N=w||/Mac/.test(p),K=/\bCrOS\b/.test(o),V=/win/i.test(p),re=d&&o.match(/Version\/(\d*\.\d*)/);re&&(re=Number(re[1])),re&&re>=15&&(d=!1,g=!0);var q=N&&(C||d&&(re==null||re<12.11)),F=v||s&&h>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var n=e.className,r=D(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return j(e).appendChild(t)}function y(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function G(e,t,n,r){var i=y(e,t,n,r);return i.setAttribute("role","presentation"),i}var X;document.createRange?X=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:X=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function O(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function R(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function se(e,t){var n=e.className;D(t).test(n)||(e.className+=(n?" ":"")+t)}function _e(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!D(n[r]).test(t)&&(t+=" "+n[r]);return t}var I=function(e){e.select()};w?I=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(I=function(e){try{e.select()}catch{}});function T(e){return e.display.wrapper.ownerDocument}function he(e){return ze(e.display.wrapper)}function ze(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function de(e){return T(e).defaultView}function Ee(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ge(e,t,n){t||(t={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n!==!1||!Object.prototype.hasOwnProperty.call(t,r))&&(t[r]=e[r]);return t}function Oe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,l=i||0;;){var u=e.indexOf(" ",a);if(u<0||u>=t)return l+(t-a);l+=u-a,l+=n-l%n,a=u+1}}var qe=function(){this.id=null,this.f=null,this.time=0,this.handler=Ee(this.onTimeout,this)};qe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},qe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function Se(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Be=50,Ze={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},Je={origin:"*mouse"},Re={origin:"+move"};function Ge(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(" ",r);a==-1&&(a=e.length);var l=a-r;if(a==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var U=[""];function Z(e){for(;U.length<=e;)U.push(ce(U)+" ");return U[e]}function ce(e){return e[e.length-1]}function He(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function te(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function fe(){}function oe(e,t){var n;return Object.create?n=Object.create(e):(fe.prototype=e,n=new fe),t&&ge(t,n),n}var Ue=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function we(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ue.test(e))}function Me(e,t){Line truncated
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=a.indexOf("\r");l!=-1?(n.push(a.slice(0,l)),t+=l+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},hr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ti=(function(){var e=y("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")})(),$t=null;function to(e){if($t!=null)return $t;var t=J(e,y("span","x")),n=t.getBoundingClientRect(),r=X(t,0,1).getBoundingClientRect();return $t=Math.abs(n.left-r.left)>1}var Wr={},Kt={};function Gt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wr[e]=t}function Cr(e,t){Kt[e]=t}function Ur(e){if(typeof e=="string"&&Kt.hasOwnProperty(e))e=Kt[e];else if(e&&typeof e.name=="string"&&Kt.hasOwnProperty(e.name)){var t=Kt[e.name];typeof t=="string"&&(t={name:t}),e=oe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ur("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ur("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function $r(e,t){t=Ur(t);var n=Wr[t.name];if(!n)return $r(e,"text/plain");var r=n(e,t);if(gr.hasOwnProperty(t.name)){var i=gr[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var gr={};function Kr(e,t){var n=gr.hasOwnProperty(e)?gr[e]:gr[e]={};ge(t,n)}function Vt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function _n(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Gr(e,t,n){return e.startState?e.startState(t,n):!0}var at=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},at.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},at.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Oe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Oe(this.string,this.lineStart,this.tabSize):0)},at.prototype.indentation=function(){return Oe(this.string,null,this.tabSize)-(this.lineStart?Oe(this.string,this.lineStart,this.tabSize):0)},at.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ae(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function ir(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(a){var l=a.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function kn(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Bt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function _(e){if(e.parent==null)return null;for(var t=e.parent,n=Se(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function P(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var Line truncated
@@ -21,7 +21,7 @@ b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},st.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},st.prototype.onKeyPress=function(){s&&h>=9&&(this.hasSelection=null),this.fastPoll()},st.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Mr(n,e),l=r.scroller.scrollTop;if(!a||d)return;var u=n.options.resetSelectionOnContextMenu;u&&n.doc.sel.contains(a)==-1&&gt(n,wt)(n.doc,yr(a),ke);var f=i.style.cssText,m=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+`px;
z-index: 1000; background: `+(s?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var B;g&&(B=i.ownerDocument.defaultView.scrollY),r.input.focus(),g&&i.ownerDocument.defaultView.scrollTo(null,B),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function ee(){if(i.selectionStart!=null){var ue=n.somethingSelected(),me="\u200B"+(ue?i.value:"");i.value="\u21DA",i.value=me,t.prevInput=ue?"":"\u200B",i.selectionStart=1,i.selectionEnd=me.length,r.selForContextMenu=n.doc.sel}}function Y(){if(t.contextMenuPending==Y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=f,s&&h<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!s||s&&h<9)&&ee();var ue=0,me=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?gt(n,Ll)(n):ue++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(s&&h>=9&&ee(),F){dr(e);var ie=function(){_t(window,"mouseup",ie),setTimeout(Y,20)};Ie(window,"mouseup",ie)}else setTimeout(Y,50)},st.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},st.prototype.setUneditable=function(){},st.prototype.needsContentAttribute=!1;function _d(e,t){if(t=t?ge(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=R(ze(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(Ie(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch{}}t.finishInit=function(f){f.save=r,f.getTextArea=function(){return e},f.toTextArea=function(){f.toTextArea=isNaN,r(),e.parentNode.removeChild(f.getWrapperElement()),e.style.display="",e.form&&(_t(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var u=tt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return u}function kd(e){e.off=_t,e.on=Ie,e.wheelEventPixels=zf,e.Doc=Mt,e.splitLines=Ht,e.countColumn=Oe,e.findColumn=Ge,e.isWordChar=we,e.Pass=Ze,e.signal=it,e.Line=Xr,e.changeEnd=xr,e.scrollbarModel=rl,e.Pos=ne,e.cmpPos=ye,e.modes=Wr,e.mimeModes=Kt,e.resolveMode=Ur,e.getMode=$r,e.modeExtensions=gr,e.extendMode=Kr,e.copyState=Vt,e.startState=Gr,e.innerMode=_n,e.commands=$n,e.keyMap=ur,e.keyName=Hl,e.isModifierKey=jl,e.lookupKey=un,e.normalizeKeyMap=Qf,e.StringStream=at,e.SharedTextMarker=Hn,e.TextMarker=kr,e.LineWidget=Rn,e.e_preventDefault=kt,e.e_stopPropagation=Rr,e.e_stop=dr,e.addClass=se,e.contains=O,e.rmClass=Q,e.keyNames=wr}pd(tt),vd(tt);var wd="iter insert remove copy getEditor constructor".split(" ");for(var Ai in Mt.prototype)Mt.prototype.hasOwnProperty(Ai)&&Se(wd,Ai)<0&&(tt.prototype[Ai]=(function(e){return function(){return e.apply(this.doc,arguments)}})(Mt.prototype[Ai]));return Wt(Mt),tt.inputStyles={textarea:st,contenteditable:Qe},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),Gt.apply(this,arguments)},tt.defineMIME=Cr,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){Mt.prototype[e]=t},tt.fromTextArea=_d,kd(tt),tt.version="5.65.20",tt}))});var Yn=Ke((us,cs)=>{(function(o){typeof us=="object"&&typeof cs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.overlayMode=function(p,v,L){return{startState:function(){return{base:o.startState(p),overlay:o.startState(v),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:o.copyState(p,b.base),overlay:o.copyState(v,b.overlay),basePos:b.basePos,baseCur:null,overlayPos:b.overlayPos,overlayCur:null}},token:function(b,S){return(b!=S.streamSeen||Math.min(S.basePos,S.overlayPos)<b.start)&&(S.streamSeen=b,S.basePos=S.overlayPos=b.start),b.start==S.basePos&&(S.baseCur=p.token(b,S.base),S.basePos=b.pos),b.start==S.overlayPos&&(b.pos=b.start,S.overlayCur=v.token(b,S.overlay),S.overlayPos=b.pos),b.pos=Math.min(S.basePos,S.overlayPos),S.overlayCur==null?S.baseCur:S.baseCur!=null&&S.overlay.combineTokens||L&&S.overlay.combineTokens==null?S.baseCur+" "+S.overlayCur:S.overlayCur},indent:p.indent&&function(b,S,s){return p.indent(b.base,S,s)},electricChars:p.electricChars,innerMode:function(b){return{state:b.base,mode:p}},blankLine:function(b){var S,s;return p.blankLine&&(S=p.blankLine(b.base)),v.blankLine&&(s=v.blankLine(b.overlay)),s==null?S:L&&S!=null?S+" "+s:s}}}})});var ps=Ke((fs,ds)=>{(function(o){typeof fs=="object"&&type Line truncated
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var B;g&&(B=i.ownerDocument.defaultView.scrollY),r.input.focus(),g&&i.ownerDocument.defaultView.scrollTo(null,B),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function ee(){if(i.selectionStart!=null){var ue=n.somethingSelected(),me="\u200B"+(ue?i.value:"");i.value="\u21DA",i.value=me,t.prevInput=ue?"":"\u200B",i.selectionStart=1,i.selectionEnd=me.length,r.selForContextMenu=n.doc.sel}}function Y(){if(t.contextMenuPending==Y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=f,s&&h<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!s||s&&h<9)&&ee();var ue=0,me=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?gt(n,Ll)(n):ue++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(s&&h>=9&&ee(),F){dr(e);var ie=function(){_t(window,"mouseup",ie),setTimeout(Y,20)};Ie(window,"mouseup",ie)}else setTimeout(Y,50)},st.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},st.prototype.setUneditable=function(){},st.prototype.needsContentAttribute=!1;function _d(e,t){if(t=t?ge(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=R(ze(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(Ie(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch{}}t.finishInit=function(f){f.save=r,f.getTextArea=function(){return e},f.toTextArea=function(){f.toTextArea=isNaN,r(),e.parentNode.removeChild(f.getWrapperElement()),e.style.display="",e.form&&(_t(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var u=tt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return u}function kd(e){e.off=_t,e.on=Ie,e.wheelEventPixels=zf,e.Doc=Mt,e.splitLines=Ht,e.countColumn=Oe,e.findColumn=Ge,e.isWordChar=we,e.Pass=Ze,e.signal=it,e.Line=Xr,e.changeEnd=xr,e.scrollbarModel=rl,e.Pos=ne,e.cmpPos=ye,e.modes=Wr,e.mimeModes=Kt,e.resolveMode=Ur,e.getMode=$r,e.modeExtensions=gr,e.extendMode=Kr,e.copyState=Vt,e.startState=Gr,e.innerMode=_n,e.commands=$n,e.keyMap=ur,e.keyName=Hl,e.isModifierKey=jl,e.lookupKey=un,e.normalizeKeyMap=Qf,e.StringStream=at,e.SharedTextMarker=Hn,e.TextMarker=kr,e.LineWidget=Rn,e.e_preventDefault=kt,e.e_stopPropagation=Rr,e.e_stop=dr,e.addClass=se,e.contains=O,e.rmClass=Q,e.keyNames=wr}pd(tt),vd(tt);var wd="iter insert remove copy getEditor constructor".split(" ");for(var Ai in Mt.prototype)Mt.prototype.hasOwnProperty(Ai)&&Se(wd,Ai)<0&&(tt.prototype[Ai]=(function(e){return function(){return e.apply(this.doc,arguments)}})(Mt.prototype[Ai]));return Wt(Mt),tt.inputStyles={textarea:st,contenteditable:Qe},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),Gt.apply(this,arguments)},tt.defineMIME=Cr,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){Mt.prototype[e]=t},tt.fromTextArea=_d,kd(tt),tt.version="5.65.21",tt}))});var Yn=Ke((us,cs)=>{(function(o){typeof us=="object"&&typeof cs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.overlayMode=function(p,v,L){return{startState:function(){return{base:o.startState(p),overlay:o.startState(v),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:o.copyState(p,b.base),overlay:o.copyState(v,b.overlay),basePos:b.basePos,baseCur:null,overlayPos:b.overlayPos,overlayCur:null}},token:function(b,S){return(b!=S.streamSeen||Math.min(S.basePos,S.overlayPos)<b.start)&&(S.streamSeen=b,S.basePos=S.overlayPos=b.start),b.start==S.basePos&&(S.baseCur=p.token(b,S.base),S.basePos=b.pos),b.start==S.overlayPos&&(b.pos=b.start,S.overlayCur=v.token(b,S.overlay),S.overlayPos=b.pos),b.pos=Math.min(S.basePos,S.overlayPos),S.overlayCur==null?S.baseCur:S.baseCur!=null&&S.overlay.combineTokens||L&&S.overlay.combineTokens==null?S.baseCur+" "+S.overlayCur:S.overlayCur},indent:p.indent&&function(b,S,s){return p.indent(b.base,S,s)},electricChars:p.electricChars,innerMode:function(b){return{state:b.base,mode:p}},blankLine:function(b){var S,s;return p.blankLine&&(S=p.blankLine(b.base)),v.blankLine&&(s=v.blankLine(b.overlay)),s==null?S:L&&S!=null?S+" "+s:s}}}})});var ps=Ke((fs,ds)=>{(function(o){typeof fs=="object"&&type Line truncated
`}else{var N=z[1],K=z[5],V=!(L.test(z[2])||z[2].indexOf(">")>=0),re=V?parseInt(z[3],10)+1+z[4]:z[2].replace("x"," ");h[g]=`
`+N+re+K,V&&b(S,C)}}S.replaceSelections(h)};function b(S,s){var h=s.line,g=0,C=0,k=p.exec(S.getLine(h)),c=k[1];do{g+=1;var d=h+g,x=S.getLine(d),M=p.exec(x);if(M){var z=M[1],w=parseInt(k[3],10)+g-C,W=parseInt(M[3],10),E=W;if(c===z&&!isNaN(W))w===W&&(E=W+1),w>W&&(E=w+1),S.replaceRange(x.replace(p,z+E+M[4]+M[5]),{line:d,ch:0},{line:d,ch:x.length});else{if(c.length>z.length||c.length<z.length&&g===1)return;C+=1}}}while(M)}})});var ms=Ke((hs,gs)=>{(function(o){typeof hs=="object"&&typeof gs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){o.defineOption("placeholder","",function(h,g,C){var k=C&&C!=o.Init;if(g&&!k)h.on("blur",b),h.on("change",S),h.on("swapDoc",S),o.on(h.getInputField(),"compositionupdate",h.state.placeholderCompose=function(){L(h)}),S(h);else if(!g&&k){h.off("blur",b),h.off("change",S),h.off("swapDoc",S),o.off(h.getInputField(),"compositionupdate",h.state.placeholderCompose),p(h);var c=h.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}g&&!h.hasFocus()&&b(h)});function p(h){h.state.placeholder&&(h.state.placeholder.parentNode.removeChild(h.state.placeholder),h.state.placeholder=null)}function v(h){p(h);var g=h.state.placeholder=document.createElement("pre");g.style.cssText="height: 0; overflow: visible",g.style.direction=h.getOption("direction"),g.className="CodeMirror-placeholder CodeMirror-line-like";var C=h.getOption("placeholder");typeof C=="string"&&(C=document.createTextNode(C)),g.appendChild(C),h.display.lineSpace.insertBefore(g,h.display.lineSpace.firstChild)}function L(h){setTimeout(function(){var g=!1;if(h.lineCount()==1){var C=h.getInputField();g=C.nodeName=="TEXTAREA"?!h.getLine(0).length:!/[^\u200b]/.test(C.querySelector(".CodeMirror-line").textContent)}g?v(h):p(h)},20)}function b(h){s(h)&&v(h)}function S(h){var g=h.getWrapperElement(),C=s(h);g.className=g.className.replace(" CodeMirror-empty","")+(C?" CodeMirror-empty":""),C?v(h):p(h)}function s(h){return h.lineCount()===1&&h.getLine(0)===""}})});var ys=Ke((vs,bs)=>{(function(o){typeof vs=="object"&&typeof bs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineOption("styleSelectedText",!1,function(k,c,d){var x=d&&d!=o.Init;c&&!x?(k.state.markedSelection=[],k.state.markedSelectionStyle=typeof c=="string"?c:"CodeMirror-selectedtext",g(k),k.on("cursorActivity",p),k.on("change",v)):!c&&x&&(k.off("cursorActivity",p),k.off("change",v),h(k),k.state.markedSelection=k.state.markedSelectionStyle=null)});function p(k){k.state.markedSelection&&k.operation(function(){C(k)})}function v(k){k.state.markedSelection&&k.state.markedSelection.length&&k.operation(function(){h(k)})}var L=8,b=o.Pos,S=o.cmpPos;function s(k,c,d,x){if(S(c,d)!=0)for(var M=k.state.markedSelection,z=k.state.markedSelectionStyle,w=c.line;;){var W=w==c.line?c:b(w,0),E=w+L,N=E>=d.line,K=N?d:b(E,0),V=k.markText(W,K,{className:z});if(x==null?M.push(V):M.splice(x++,0,V),N)break;w=E}}function h(k){for(var c=k.state.markedSelection,d=0;d<c.length;++d)c[d].clear();c.length=0}function g(k){h(k);for(var c=k.listSelections(),d=0;d<c.length;d++)s(k,c[d].from(),c[d].to())}function C(k){if(!k.somethingSelected())return h(k);if(k.listSelections().length>1)return g(k);var c=k.getCursor("start"),d=k.getCursor("end"),x=k.state.markedSelection;if(!x.length)return s(k,c,d);var M=x[0].find(),z=x[x.length-1].find();if(!M||!z||d.line-c.line<=L||S(c,z.to)>=0||S(d,M.from)<=0)return g(k);for(;S(c,M.from)>0;)x.shift().clear(),M=x[0].find();for(S(c,M.from)<0&&(M.to.line-c.line<L?(x.shift().clear(),s(k,c,M.to,0)):s(k,c,M.from,0));S(d,z.to)<0;)x.pop().clear(),z=x[x.length-1].find();S(d,z.to)>0&&(d.line-z.from.line<L?(x.pop().clear(),s(k,z.from,d)):s(k,z.to,d))}})});var ks=Ke((xs,_s)=>{(function(o){typeof xs=="object"&&typeof _s=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=o.Pos;function v(w){var W=w.flags;return W??(w.ignoreCase?"i":"")+(w.global?"g":"")+(w.multiline?"m":"")}function L(w,W){for(var E=v(w),N=E,K=0;K<W.length;K++)N.indexOf(W.charAt(K))==-1&&(N+=W.charAt(K));return E==N?w:new RegExp(w.source,N)}function b(w){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(w.source)}function S(w,W,E){W=L(W,"g");for(var N=E.line,K=E.ch,V=w.lastLine();N<=V;N++,K=0){W.lastIndex=K;var re=w.getLine(N),q=W.exec(re);if(q)return{from:p(N,q.index),to:p(N,q.index+q[0].length),match:q}}}function s(w,W,E){if(!b(W))return S(w,W,E);W=L(W,"gm");for(var N,K=1,V=E.line,re=w.lastLine();V<=re;){for(var q=0;q<K&&!(V>re);q++){var F=w.getLine(V++);N=N==null?F:N+`
`+F}K=K*2,W.lastIndex=E.ch;var D=W.exec(N);if(D){var Q=N.slice(0,D.index).split(`
@@ -29,7 +29,7 @@ b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.
`),J=E.line+Q.length-1,y=Q[Q.length-1].length;return{from:p(J,y),to:p(J+j.length-1,j.length==1?y+j[0].length:j[j.length-1].length),match:D}}}}function h(w,W,E){for(var N,K=0;K<=w.length;){W.lastIndex=K;var V=W.exec(w);if(!V)break;var re=V.index+V[0].length;if(re>w.length-E)break;(!N||re>N.index+N[0].length)&&(N=V),K=V.index+1}return N}function g(w,W,E){W=L(W,"g");for(var N=E.line,K=E.ch,V=w.firstLine();N>=V;N--,K=-1){var re=w.getLine(N),q=h(re,W,K<0?0:re.length-K);if(q)return{from:p(N,q.index),to:p(N,q.index+q[0].length),match:q}}}function C(w,W,E){if(!b(W))return g(w,W,E);W=L(W,"gm");for(var N,K=1,V=w.getLine(E.line).length-E.ch,re=E.line,q=w.firstLine();re>=q;){for(var F=0;F<K&&re>=q;F++){var D=w.getLine(re--);N=N==null?D:D+`
`+N}K*=2;var Q=h(N,W,V);if(Q){var j=N.slice(0,Q.index).split(`
`),J=Q[0].split(`
`),y=re+j.length,G=j[j.length-1].length;return{from:p(y,G),to:p(y+J.length-1,J.length==1?G+J[0].length:J[J.length-1].length),match:Q}}}}var k,c;String.prototype.normalize?(k=function(w){return w.normalize("NFD").toLowerCase()},c=function(w){return w.normalize("NFD")}):(k=function(w){return w.toLowerCase()},c=function(w){return w});function d(w,W,E,N){if(w.length==W.length)return E;for(var K=0,V=E+Math.max(0,w.length-W.length);;){if(K==V)return K;var re=K+V>>1,q=N(w.slice(0,re)).length;if(q==E)return re;q>E?V=re:K=re+1}}function x(w,W,E,N){if(!W.length)return null;var K=N?k:c,V=K(W).split(/\r|\n\r?/);e:for(var re=E.line,q=E.ch,F=w.lastLine()+1-V.length;re<=F;re++,q=0){var D=w.getLine(re).slice(q),Q=K(D);if(V.length==1){var j=Q.indexOf(V[0]);if(j==-1)continue e;var E=d(D,Q,j,K)+q;return{from:p(re,d(D,Q,j,K)+q),to:p(re,d(D,Q,j+V[0].length,K)+q)}}else{var J=Q.length-V[0].length;if(Q.slice(J)!=V[0])continue e;for(var y=1;y<V.length-1;y++)if(K(w.getLine(re+y))!=V[y])continue e;var G=w.getLine(re+V.length-1),X=K(G),O=V[V.length-1];if(X.slice(0,O.length)!=O)continue e;return{from:p(re,d(D,Q,J,K)+q),to:p(re+V.length-1,d(G,X,O.length,K))}}}}function M(w,W,E,N){if(!W.length)return null;var K=N?k:c,V=K(W).split(/\r|\n\r?/);e:for(var re=E.line,q=E.ch,F=w.firstLine()-1+V.length;re>=F;re--,q=-1){var D=w.getLine(re);q>-1&&(D=D.slice(0,q));var Q=K(D);if(V.length==1){var j=Q.lastIndexOf(V[0]);if(j==-1)continue e;return{from:p(re,d(D,Q,j,K)),to:p(re,d(D,Q,j+V[0].length,K))}}else{var J=V[V.length-1];if(Q.slice(0,J.length)!=J)continue e;for(var y=1,E=re-V.length+1;y<V.length-1;y++)if(K(w.getLine(E+y))!=V[y])continue e;var G=w.getLine(re+1-V.length),X=K(G);if(X.slice(X.length-V[0].length)!=V[0])continue e;return{from:p(re+1-V.length,d(G,X,G.length-V[0].length,K)),to:p(re,d(D,Q,J.length,K))}}}}function z(w,W,E,N){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=w,E=E?w.clipPos(E):p(0,0),this.pos={from:E,to:E};var K;typeof N=="object"?K=N.caseFold:(K=N,N=null),typeof W=="string"?(K==null&&(K=!1),this.matches=function(V,re){return(V?M:x)(w,W,re,K)}):(W=L(W,"gm"),!N||N.multiline!==!1?this.matches=function(V,re){return(V?C:s)(w,W,re)}:this.matches=function(V,re){return(V?g:S)(w,W,re)})}z.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(w){var W=this.doc.clipPos(w?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(W=p(W.line,W.ch),w?(W.ch--,W.ch<0&&(W.line--,W.ch=(this.doc.getLine(W.line)||"").length)):(W.ch++,W.ch>(this.doc.getLine(W.line)||"").length&&(W.ch=0,W.line++)),o.cmpPos(W,this.doc.clipPos(W))!=0))return this.atOccurrence=!1;var E=this.matches(w,W);if(this.afterEmptyMatch=E&&o.cmpPos(E.from,E.to)==0,E)return this.pos=E,this.atOccurrence=!0,this.pos.match||!0;var N=p(w?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:N,to:N},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(w,W){if(this.atOccurrence){var E=o.splitLines(w);this.doc.replaceRange(E,this.pos.from,this.pos.to,W),this.pos.to=p(this.pos.from.line+E.length-1,E[E.length-1].length+(E.length==1?this.pos.from.ch:0))}}},o.defineExtension("getSearchCursor",function(w,W,E){return new z(this.doc,w,W,E)}),o.defineDocExtension("getSearchCursor",function(w,W,E){return new z(this,w,W,E)}),o.defineExtension("selectMatches",function(w,W){for(var E=[],N=this.getSearchCursor(w,this.getCursor("from"),W);N.findNext()&&!(o.cmpPos(N.to(),this.getCursor("to"))>0);)E.push({anchor:N.from(),head:N.to()});E.length&&this.setSelections(E,0)})})});var Vo=Ke((ws,Ss)=>{(function(o){typeof ws=="object"&&typeof Ss=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(O,R,se,_e,I,T){this.indented=O,this.column=R,this.type=se,this.info=_e,this.align=I,this.prev=T}function v(O,R,se,_e){var I=O.indented;return O.context&&O.context.type=="statement"&&se!="statement"&&(I=O.context.indented),O.context=new p(I,R,se,_e,null,O.context)}function L(O){var R=O.context.type;return(R==")"||R=="]"||R=="}")&&(O.indented=O.context.indented),O.context=O.context.prev}function b(O,R,se){if(R.prevToken=="variable"||R.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(O.string.slice(0,se))||R.typeAtEndOfLine&&O.column()==O.indentation())return!0}function S(O){for(;;){if(!O||O.type=="top")return!0;if(O.type=="}"&&O.prev.info!="namespace")return!1;O=O.prev}}o.defineMode("clike",function(O,R){var se=O.indentUnit,_e=R.statementIndentUnit||se,I=R.dontAlignCalls,T=R.keywords||{},he=R.types||{},ze=R.builtin||{},de=R.blockKeywords||{},Ee=R.defKeywords||{},ge=R.atoms||{},Oe=R.hooks||{},qe=R.multiLineStrings,Se=R.indentStatements!==!1,Be=R.indentSwitch!==!1,Ze=R.namespaceSeparator,ke=R.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Je=R.numberStart||/[\d\.]/,Re=R.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f) Line truncated
`),y=re+j.length,G=j[j.length-1].length;return{from:p(y,G),to:p(y+J.length-1,J.length==1?G+J[0].length:J[J.length-1].length),match:Q}}}}var k,c;String.prototype.normalize?(k=function(w){return w.normalize("NFD").toLowerCase()},c=function(w){return w.normalize("NFD")}):(k=function(w){return w.toLowerCase()},c=function(w){return w});function d(w,W,E,N){if(w.length==W.length)return E;for(var K=0,V=E+Math.max(0,w.length-W.length);;){if(K==V)return K;var re=K+V>>1,q=N(w.slice(0,re)).length;if(q==E)return re;q>E?V=re:K=re+1}}function x(w,W,E,N){if(!W.length)return null;var K=N?k:c,V=K(W).split(/\r|\n\r?/);e:for(var re=E.line,q=E.ch,F=w.lastLine()+1-V.length;re<=F;re++,q=0){var D=w.getLine(re).slice(q),Q=K(D);if(V.length==1){var j=Q.indexOf(V[0]);if(j==-1)continue e;var E=d(D,Q,j,K)+q;return{from:p(re,d(D,Q,j,K)+q),to:p(re,d(D,Q,j+V[0].length,K)+q)}}else{var J=Q.length-V[0].length;if(Q.slice(J)!=V[0])continue e;for(var y=1;y<V.length-1;y++)if(K(w.getLine(re+y))!=V[y])continue e;var G=w.getLine(re+V.length-1),X=K(G),O=V[V.length-1];if(X.slice(0,O.length)!=O)continue e;return{from:p(re,d(D,Q,J,K)+q),to:p(re+V.length-1,d(G,X,O.length,K))}}}}function M(w,W,E,N){if(!W.length)return null;var K=N?k:c,V=K(W).split(/\r|\n\r?/);e:for(var re=E.line,q=E.ch,F=w.firstLine()-1+V.length;re>=F;re--,q=-1){var D=w.getLine(re);q>-1&&(D=D.slice(0,q));var Q=K(D);if(V.length==1){var j=Q.lastIndexOf(V[0]);if(j==-1)continue e;return{from:p(re,d(D,Q,j,K)),to:p(re,d(D,Q,j+V[0].length,K))}}else{var J=V[V.length-1];if(Q.slice(0,J.length)!=J)continue e;for(var y=1,E=re-V.length+1;y<V.length-1;y++)if(K(w.getLine(E+y))!=V[y])continue e;var G=w.getLine(re+1-V.length),X=K(G);if(X.slice(X.length-V[0].length)!=V[0])continue e;return{from:p(re+1-V.length,d(G,X,G.length-V[0].length,K)),to:p(re,d(D,Q,J.length,K))}}}}function z(w,W,E,N){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=w,E=E?w.clipPos(E):p(0,0),this.pos={from:E,to:E};var K;typeof N=="object"?K=N.caseFold:(K=N,N=null),typeof W=="string"?(K==null&&(K=!1),this.matches=function(V,re){return(V?M:x)(w,W,re,K)}):(W=L(W,"gm"),!N||N.multiline!==!1?this.matches=function(V,re){return(V?C:s)(w,W,re)}:this.matches=function(V,re){return(V?g:S)(w,W,re)})}z.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(w){var W=this.doc.clipPos(w?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(W=p(W.line,W.ch),w?(W.ch--,W.ch<0&&(W.line--,W.ch=(this.doc.getLine(W.line)||"").length)):(W.ch++,W.ch>(this.doc.getLine(W.line)||"").length&&(W.ch=0,W.line++)),o.cmpPos(W,this.doc.clipPos(W))!=0))return this.atOccurrence=!1;var E=this.matches(w,W);if(this.afterEmptyMatch=E&&o.cmpPos(E.from,E.to)==0,E)return this.pos=E,this.atOccurrence=!0,this.pos.match||!0;var N=p(w?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:N,to:N},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(w,W){if(this.atOccurrence){var E=o.splitLines(w);this.doc.replaceRange(E,this.pos.from,this.pos.to,W),this.pos.to=p(this.pos.from.line+E.length-1,E[E.length-1].length+(E.length==1?this.pos.from.ch:0))}}},o.defineExtension("getSearchCursor",function(w,W,E){return new z(this.doc,w,W,E)}),o.defineDocExtension("getSearchCursor",function(w,W,E){return new z(this,w,W,E)}),o.defineExtension("selectMatches",function(w,W){for(var E=[],N=this.getSearchCursor(w,this.getCursor("from"),W);N.findNext()&&!(o.cmpPos(N.to(),this.getCursor("to"))>0);)E.push({anchor:N.from(),head:N.to()});E.length&&this.setSelections(E,0)})})});var Vo=Ke((ws,Ss)=>{(function(o){typeof ws=="object"&&typeof Ss=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(O,R,se,_e,I,T){this.indented=O,this.column=R,this.type=se,this.info=_e,this.align=I,this.prev=T}function v(O,R,se,_e){var I=O.indented;return O.context&&O.context.type=="statement"&&se!="statement"&&(I=O.context.indented),O.context=new p(I,R,se,_e,null,O.context)}function L(O){var R=O.context.type;return(R==")"||R=="]"||R=="}")&&(O.indented=O.context.indented),O.context=O.context.prev}function b(O,R,se){if(R.prevToken=="variable"||R.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(O.string.slice(0,se))||R.typeAtEndOfLine&&O.column()==O.indentation())return!0}function S(O){for(;;){if(!O||O.type=="top")return!0;if(O.type=="}"&&O.prev.info!="namespace")return!1;O=O.prev}}o.defineMode("clike",function(O,R){var se=O.indentUnit,_e=R.statementIndentUnit||se,I=R.dontAlignCalls,T=R.keywords||{},he=R.types||{},ze=R.builtin||{},de=R.blockKeywords||{},Ee=R.defKeywords||{},ge=R.atoms||{},Oe=R.hooks||{},qe=R.multiLineStrings,Se=R.indentStatements!==!1,Be=R.indentSwitch!==!1,Ze=R.namespaceSeparator,ke=R.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Je=R.numberStart||/[\d\.]/,Re=R.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f) Line truncated
`&&(b.innerActive=b.inner=null);else for(var s=0;s<v.length;++s){var h=v[s];h.open===`
`&&(b.innerActive=h,b.inner=o.startState(h.mode,S.indent?S.indent(b.outer,"",""):0))}},electricChars:p.electricChars,innerMode:function(b){return b.inner?{state:b.inner,mode:b.innerActive.mode}:{state:b.outer,mode:p}}}}})});var lc=Ke((oc,ac)=>{(function(o){typeof oc=="object"&&typeof ac=="object"?o(We(),Di(),ic()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),o.defineMode("handlebars",function(p,v){var L=o.getMode(p,"handlebars-tags");return!v||!v.base?L:o.multiplexingMode(o.getMode(p,v.base),{open:"{{",close:/\}\}\}?/,mode:L,parseDelimiters:!0})}),o.defineMIME("text/x-handlebars-template","handlebars")})});var cc=Ke((sc,uc)=>{(function(o){"use strict";typeof sc=="object"&&typeof uc=="object"?o(We(),Yn(),mn(),vn(),Vu(),gn(),ea(),ta(),tc(),lc()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],o):o(CodeMirror)})(function(o){var p={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};o.defineMode("vue-template",function(v,L){var b={token:function(S){if(S.match(/^\{\{.*?\}\}/))return"meta mustache";for(;S.next()&&!S.match("{{",!1););return null}};return o.overlayMode(o.getMode(v,L.backdrop||"text/html"),b)}),o.defineMode("vue",function(v){return o.getMode(v,{name:"htmlmixed",tags:p})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),o.defineMIME("script/x-vue","vue"),o.defineMIME("text/x-vue","vue")})});var pc=Ke((fc,dc)=>{(function(o){typeof fc=="object"&&typeof dc=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("yaml",function(){var p=["true","false","on","off","yes","no"],v=new RegExp("\\b(("+p.join(")|(")+"))$","i");return{token:function(L,b){var S=L.peek(),s=b.escaped;if(b.escaped=!1,S=="#"&&(L.pos==0||/\s/.test(L.string.charAt(L.pos-1))))return L.skipToEnd(),"comment";if(L.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(b.literal&&L.indentation()>b.keyCol)return L.skipToEnd(),"string";if(b.literal&&(b.literal=!1),L.sol()){if(b.keyCol=0,b.pair=!1,b.pairStart=!1,L.match("---")||L.match("..."))return"def";if(L.match(/\s*-\s+/))return"meta"}if(L.match(/^(\{|\}|\[|\])/))return S=="{"?b.inlinePairs++:S=="}"?b.inlinePairs--:S=="["?b.inlineList++:b.inlineList--,"meta";if(b.inlineList>0&&!s&&S==",")return L.next(),"meta";if(b.inlinePairs>0&&!s&&S==",")return b.keyCol=0,b.pair=!1,b.pairStart=!1,L.next(),"meta";if(b.pairStart){if(L.match(/^\s*(\||\>)\s*/))return b.literal=!0,"meta";if(L.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(b.inlinePairs==0&&L.match(/^\s*-?[0-9\.\,]+\s?$/)||b.inlinePairs>0&&L.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(L.match(v))return"keyword"}return!b.pair&&L.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(b.pair=!0,b.keyCol=L.indentation(),"atom"):b.pair&&L.match(/^:\s*/)?(b.pairStart=!0,"meta"):(b.pairStart=!1,b.escaped=S=="\\",L.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),o.defineMIME(Line truncated
`,T=`
@@ -1,18 +1,18 @@
var zp=Object.defineProperty;var Jr=(t,e)=>{for(var n in e)zp(t,n,{get:e[n],enumerable:!0})};var qo={};Jr(qo,{CommandManager:()=>Cr,Editor:()=>Fb,Extendable:()=>Vo,Extension:()=>K,Fragment:()=>_b,InputRule:()=>Bn,MappablePosition:()=>Pl,Mark:()=>ee,MarkView:()=>Gb,Node:()=>$,NodePos:()=>qu,NodeView:()=>Xb,PasteRule:()=>_o,ResizableNodeView:()=>jo,ResizableNodeview:()=>Ub,Tracker:()=>Zb,callOrReturn:()=>J,canInsertNode:()=>zl,combineTransactionSteps:()=>Ro,commands:()=>kl,createAtomBlockMarkdownSpec:()=>Xu,createBlockMarkdownSpec:()=>Ht,createChainableState:()=>Sr,createDocument:()=>To,createElement:()=>Wb,createInlineMarkdownSpec:()=>Yu,createMappablePosition:()=>Eu,createNodeFromContent:()=>Dn,createStyleTag:()=>Ju,defaultBlockAt:()=>Pn,deleteProps:()=>gl,elementFromString:()=>Rn,escapeForRegEx:()=>Hl,extensions:()=>Pu,findChildren:()=>on,findChildrenInRange:()=>Ml,findDuplicates:()=>ku,findParentNode:()=>qe,findParentNodeClosestToPos:()=>Do,flattenExtensions:()=>Io,fromString:()=>xu,generateHTML:()=>lb,generateJSON:()=>ab,generateText:()=>cb,getAttributes:()=>Ho,getAttributesFromExtensions:()=>Al,getChangedRanges:()=>$o,getDebugJSON:()=>vu,getExtensionField:()=>B,getHTMLFromFragment:()=>Tr,getMarkAttributes:()=>vl,getMarkRange:()=>No,getMarkType:()=>ot,getMarksBetween:()=>Ar,getNodeAtPosition:()=>Rl,getNodeAttributes:()=>Su,getNodeType:()=>re,getRenderedAttributes:()=>kr,getSchema:()=>Bo,getSchemaByResolvedExtensions:()=>El,getSchemaTypeByName:()=>Mo,getSchemaTypeNameByName:()=>Mr,getSplittedAttributes:()=>wr,getText:()=>Ol,getTextBetween:()=>Nl,getTextContentFromNodes:()=>Mu,getTextSerializersFromSchema:()=>zo,getUpdatedPosition:()=>Au,h:()=>Wb,injectExtensionAttributesToParseRule:()=>yl,inputRulesPlugin:()=>Ou,isActive:()=>Fo,isAndroid:()=>Oo,isAtEndOfNode:()=>Dl,isAtStartOfNode:()=>Il,isEmptyObject:()=>wu,isExtensionRulesEnabled:()=>bl,isFunction:()=>Tl,isList:()=>wl,isMacOS:()=>Cl,isMarkActive:()=>Ao,isNodeActive:()=>Ke,isNodeEmpty:()=>Ln,isNodeSelection:()=>Er,isNumber:()=>Du,isPlainObject:()=>br,isRegExp:()=>Eo,isString:()=>Kb,isTextSelection:()=>vr,isiOS:()=>In,markInputRule:()=>De,markPasteRule:()=>Me,markdown:()=>Gu,mergeAttributes:()=>O,mergeDeep:()=>Bl,minMax:()=>rt,nodeInputRule:()=>Nr,nodePasteRule:()=>Yb,objectIncludes:()=>xr,parseAttributes:()=>Uo,parseIndentedBlocks:()=>Or,pasteRulesPlugin:()=>Iu,posToDOMRect:()=>Ll,removeDuplicates:()=>Cu,renderNestedMarkdownContent:()=>Hn,resolveExtensions:()=>Lo,resolveFocusPosition:()=>Sl,rewriteUnknownContent:()=>ub,selectionToInsertionEnd:()=>bu,serializeAttributes:()=>Ko,sortExtensions:()=>Po,splitExtensions:()=>rn,textInputRule:()=>Vb,textPasteRule:()=>Qb,textblockTypeInputRule:()=>zn,updateMarkViewAttributes:()=>$l,wrappingInputRule:()=>Je});function ge(t){this.content=t}ge.prototype={constructor:ge,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new ge(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new ge(n)},addToStart:function(t,e){return new ge([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ge(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new ge(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=ge.from(t),t.size?new ge(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=ge.from(t),t.size?new ge(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=ge.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};ge.from=function(t){if(t instanceof ge)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ge(e)};var Yi=ge;function tc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=tc(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function nc(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let c=0,d=Math.min(s.text.length,l.text.length);for(;c<d&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||l.Line truncated
`)}};Nt.empty=new Nt(!0);var rs=class{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function cc(t){let e=[];do e.push(_p(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function _p(t){let e=[];do e.push(Wp(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Wp(t){let e=Kp(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=jp(t,e);else break;return e}function qa(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function jp(t,e){let n=qa(t),r=n;return t.eat(",")&&(t.next!="}"?r=qa(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Up(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function Kp(t){if(t.eat("(")){let e=cc(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Up(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function qp(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=i(s.exprs[a],l);if(a==s.exprs.length-1)return c;o(c,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c<s.min;c++){let d=n();o(i(s.expr,a),d),a=d}if(s.max==-1)o(i(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let d=n();r(a,d),o(i(s.expr,a),d),a=d}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function dc(t,e){return e-t}function Ja(t,e){let n=[];return r(e),n.sort(dc);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:l,to:a}=i[s];!l&&n.indexOf(a)==-1&&r(a)}}}function Jp(t){let e=Object.create(null);return n(Ja(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let d=0;d<o.length;d++)o[d][0]==l&&(c=o[d][1]);Ja(t,a).forEach(d=>{c||o.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new Nt(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(dc);i.next.push({type:o[s][0],next:e[l.join(",")]||n(l)})}return i}}function Gp(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:a,next:c}=o.next[l];s.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function uc(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function fc(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function hc(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function pc(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new is(t,r,e[r]);return n}var Yn=class t{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=pc(e,r.attrs),this.defaultAttrs=uc(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Nt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.def Line truncated
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(s.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(s.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=o.content[o.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;gc.hasOwnProperty(s)&&this.parser.normalizeLists&&em(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Zp.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,d=this.needsBlock;if(mc.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let u=a&&a.skip?n:this.readStyles(e,n);u&&this.addAll(e,u),c&&this.sync(i),this.needsBlock=d}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let l=void 0;;){let a=this.parser.matchStyle(i,s,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(c=>!a.clearMark(c)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=o==null?null:e.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let a=this.nodes[s],c=a.findWrapping(e);if(c&&(!o||o.length>c.length+l)&&(o=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=G.none;for(let l of o.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):Qa(l.type,e.type))&&(s=l.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=Xa(e,i,s.options);s.options&Gn&&s.content.length==0&&(l|=Gn);let a=G.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Qa(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new mn(e,n,a,o,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Qn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let d=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function em(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&gc.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function tm(t,e){return(t.matches||t.msMatchesSelector||t.webkitM Line truncated
`))}})}function pm(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function mm(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new le(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new N(v.from(s),0,0),1,!0))}function Re(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=n-2;c>i;c--,d--){let u=o.node(c),f=o.index(c);if(u.type.spec.isolating)return!1;let h=u.content.cutByIndex(f,u.childCount),p=r&&r[d+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[d]||u;if(!u.canReplace(f+1,u.childCount)||!m.type.validContent(h))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function gm(t,e,n=1,r){let o=t.doc.resolve(e),i=v.empty,s=v.empty;for(let l=o.depth,a=o.depth-n,c=n-1;l>a;l--,c--){i=v.from(o.node(l).copy(i));let d=r&&r[c];s=v.from(d?d.type.create(d.attrs,s):o.node(l).copy(s))}t.step(new ye(e,e,new N(i.append(s),n,n),!0))}function Le(t,e){let n=t.resolve(e),r=n.index();return Tc(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ym(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function Tc(t,e){return!!(t&&e&&!t.isLeaf&&ym(t,e))}function Kt(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&Tc(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function bm(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let d=s.whitespace=="pre",u=!!s.contentMatch.matchType(o);d&&!u?r=!1:!d&&u&&(r=!0)}let l=t.steps.length;if(r===!1){let d=t.doc.resolve(e+n);Mc(t,d.node(),d.before(),l)}s.inlineContent&&hs(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=t.mapping.slice(l),c=a.map(e-n);if(t.step(new ye(c,a.map(e+n,-1),N.empty,!0)),r===!0){let d=t.doc.resolve(c);vc(t,d.node(),d.before(),t.steps.length)}return t}function wm(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function ro(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),d=!1;if(i==1)d=c.canReplace(a,a,o);else{let u=c.contentMatchAt(a).findWrapping(o.firstChild.type);d=u&&c.canReplaceWith(a,a,u[0])}if(d)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function ir(t,e,n=e,r=N.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return Ac(o,i,r)?new ye(e,n,r):new us(o,i,r).fit()}function Ac(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}var us=class{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=v.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=v.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new N(i,s,l);return e>-1?new le(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new ye(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++ Line truncated
`).scrollIntoView()),!0)};function Ms(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Ts=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Ms(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection(L.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},As=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof be||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Ms(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=t.tr.insert(s,i.createAndFill());l.setSelection(D.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Es=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Re(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&pt(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function Am(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof I&&e.selection.node.isBlock)return!r.parentOffset||!Re(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=Ms(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=t&&t(o.parent,a,r);i.unshift(m||(a&&l?{type:l}:null)),s=h;break}else{if(h==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof D||e.selection instanceof be)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=Re(d.doc,u,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Re(d.doc,u,i.length,i)),!f)return!1;if(d.split(u,i.length,i),!a&&c&&r.node(s).type!=l){let h=d.mapping.map(r.before(s)),p=d.doc.resolve(h);l&&r.node(s-1).canReplaceWith(p.index(),p.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(s)),l)}return n&&n(d.scrollIntoView()),!0}}var Em=Am();var Jc=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(I.create(t.doc,o))),!0)},Nm=(t,e)=>(e&&e(t.tr.setSelection(new be(t.doc))),!0);function Om(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Le(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Gc(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&Om(t,e,n))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let h=e.pos+i.nodeSize,p=v.empty;for(let y=s.length-1;y>=0;y--)p=v.from(s[y].create(null,p));p=v.from(o.copy(p));let m=t.tr.step(new le(e.pos-1,h,e.pos,h,new N(p,1,0),s.length,!0)),g=m.doc.resolve(h+2*s.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Le(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:L.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&pt(u);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(u,f).scrollIntoView()),!0;if(c&&kn(i,"start",!0)&&kn(o,"end")){let h=o,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let y=v.empty;for(let w=p.length-1;w>=0;w--)y=v.from(p[w].copy(y));let b=t.tr.step(new le(e.pos-p.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new N(y,p.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function Xc(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(D.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}var Ns=Xc(-1),Os=Xc(1);function Yc(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&wn(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Rs(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(s,l,(a,c)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)o=!0;else{let d=n.doc.resolve(c),u=d.index();o=d.parent.canReplaceWith(u,u+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[s];i.setBlockType(l,a,t,e)}r(i.scrollIntoView())}return!0}}function Ds(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var ys=Ds(lo,bs,ws),$c=Ds(lo,ks,Ss),Rt={Enter:Ds(vs,As,Es,Em),"Mod-Enter":Ts,Backspace:ys,"Mod- Line truncated
`),u&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:he(g)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=h.childNodes[p-1];u=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(He&&d.focusNode&&d.focusNode!=a.node&&d.focusNode.nodeType==1){let h=d.focusNode.childNodes[d.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||u&&xe)&&tn(l.node,l.offset,d.anchorNode,d.anchorOffset)&&tn(a.node,a.offset,d.focusNode,d.focusOffset))return;let f=!1;if((c.extend||e==n)&&!(u&&He)){c.collapse(l.node,l.offset);try{e!=n&&c.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>n){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+i.border,a=s-i.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?Xt:ad,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=nt:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Xt:nt}r=s}this.dirty=Xt}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Xt:ad;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},co=class extends nn{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==$e&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Ws=class extends nn{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},En=class t extends nn{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=et.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new t(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&nt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=nt&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=$e){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=$e}}slice(e,n,r){let o=t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=qs(i,n,s,r)),e>0&&(i=qs(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Bt=class t extends nn{constructor(e,n,r,o,i,s,l,a,c){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,n,r,o,i,s){let l=i.nodeViews[n.type.name],a,c=l&&l(n,i,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),d=c&&c.dom,u=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:u}=et.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!u&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let f=d;return d=Ud(d,r,n),c?a=new js(e,n,r,o,d,u||null,f,c,i,s+1):n.isText?new uo(e,n,r,o,d,f,i):new t(e,n,r,o,d,u||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;b Line truncated
var Zp=Object.defineProperty;var to=(t,e)=>{for(var n in e)Zp(t,n,{get:e[n],enumerable:!0})};var Qo={};to(Qo,{CommandManager:()=>Nr,Editor:()=>a0,Extendable:()=>Ko,Extension:()=>U,Fragment:()=>d0,InputRule:()=>Fn,MappablePosition:()=>Fl,Mark:()=>te,MarkView:()=>x0,Node:()=>V,NodePos:()=>lf,NodeView:()=>k0,PasteRule:()=>qo,ResizableNodeView:()=>Go,ResizableNodeview:()=>h0,Tracker:()=>v0,callOrReturn:()=>J,canInsertNode:()=>Wl,combineTransactionSteps:()=>zo,commands:()=>Al,createAtomBlockMarkdownSpec:()=>df,createBlockMarkdownSpec:()=>Ht,createChainableState:()=>Er,createDocument:()=>Io,createElement:()=>u0,createInlineMarkdownSpec:()=>uf,createMappablePosition:()=>_u,createNodeFromContent:()=>zn,createStyleTag:()=>af,decodeHtmlEntities:()=>p0,defaultBlockAt:()=>$n,deleteProps:()=>Cl,elementFromString:()=>Ln,encodeHtmlEntities:()=>m0,escapeForRegEx:()=>jl,extensions:()=>qu,findChildren:()=>sn,findChildrenInRange:()=>Rl,findDuplicates:()=>Pu,findParentNode:()=>Je,findParentNodeClosestToPos:()=>Ho,flattenExtensions:()=>$o,fromString:()=>Iu,generateHTML:()=>Ab,generateJSON:()=>Eb,generateText:()=>Nb,getAttributes:()=>Wo,getAttributesFromExtensions:()=>Il,getChangedRanges:()=>jo,getDebugJSON:()=>zu,getExtensionField:()=>$,getHTMLFromFragment:()=>Rr,getMarkAttributes:()=>Ol,getMarkRange:()=>Bo,getMarkType:()=>rt,getMarksBetween:()=>Dr,getNodeAtPosition:()=>zl,getNodeAttributes:()=>Lu,getNodeType:()=>oe,getRenderedAttributes:()=>on,getSchema:()=>_o,getSchemaByResolvedExtensions:()=>Pl,getSchemaTypeByName:()=>Pn,getSchemaTypeNameByName:()=>Or,getSplittedAttributes:()=>Mr,getStyleProperty:()=>Ul,getText:()=>Bl,getTextBetween:()=>Ll,getTextContentFromNodes:()=>Hu,getTextSerializersFromSchema:()=>Vo,getUpdatedPosition:()=>Fu,h:()=>u0,injectExtensionAttributesToParseRule:()=>vl,inputRulesPlugin:()=>Wu,isActive:()=>Uo,isAndroid:()=>Ar,isAtEndOfNode:()=>Hl,isAtStartOfNode:()=>$l,isEmptyObject:()=>Du,isExtensionRulesEnabled:()=>Ml,isFirefox:()=>g0,isFunction:()=>Dl,isList:()=>Do,isMacOS:()=>Nl,isMarkActive:()=>Po,isNodeActive:()=>qe,isNodeEmpty:()=>ln,isNodeSelection:()=>Ir,isNodeViewSelected:()=>Rb,isNumber:()=>Uu,isPlainObject:()=>Cr,isRegExp:()=>Lo,isSafari:()=>Nu,isString:()=>y0,isTextSelection:()=>Hn,isiOS:()=>nn,markInputRule:()=>De,markPasteRule:()=>Te,markdown:()=>cf,mergeAttributes:()=>N,mergeDeep:()=>Vl,minMax:()=>nt,nodeInputRule:()=>Pr,nodePasteRule:()=>S0,objectIncludes:()=>Tr,parseAttributes:()=>Xo,parseIndentedBlocks:()=>Lr,pasteRulesPlugin:()=>Ku,posToDOMRect:()=>_l,removeDuplicates:()=>Bu,renderNestedMarkdownContent:()=>Vn,resolveExtensions:()=>Fo,resolveFocusPosition:()=>El,rewriteUnknownContent:()=>Db,selectionToInsertionEnd:()=>Ru,serializeAttributes:()=>Yo,sortExtensions:()=>Bn,splitExtensions:()=>rn,textInputRule:()=>c0,textPasteRule:()=>C0,textblockTypeInputRule:()=>_n,updateMarkViewAttributes:()=>Kl,wrappingInputRule:()=>Ge});function we(t){this.content=t}we.prototype={constructor:we,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new we(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new we(n)},addToStart:function(t,e){return new we([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new we(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new we(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=we.from(t),t.size?new we(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=we.from(t),t.size?new we(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=we.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};we.from=function(t){if(t instanceof we)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new we(e)};var ss=we;function dc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=dc(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function uc(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){n-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let c=0,d=Math.min(s.text.Line truncated
`)}};Nt.empty=new Nt(!0);var us=class{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function bc(t){let e=[];do e.push(om(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function om(t){let e=[];do e.push(im(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function im(t){let e=am(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=sm(t,e);else break;return e}function nc(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function sm(t,e){let n=nc(t),r=n;return t.eat(",")&&(t.next!="}"?r=nc(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function lm(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function am(t){if(t.eat("(")){let e=bc(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=lm(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function cm(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=i(s.exprs[a],l);if(a==s.exprs.length-1)return c;o(c,l=n())}else if(s.type=="star"){let a=n();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c<s.min;c++){let d=n();o(i(s.expr,a),d),a=d}if(s.max==-1)o(i(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let d=n();r(a,d),o(i(s.expr,a),d),a=d}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function wc(t,e){return e-t}function rc(t,e){let n=[];return r(e),n.sort(wc);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:l,to:a}=i[s];!l&&n.indexOf(a)==-1&&r(a)}}}function dm(t){let e=Object.create(null);return n(rc(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let d=0;d<o.length;d++)o[d][0]==l&&(c=o[d][1]);rc(t,a).forEach(d=>{c||o.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new Nt(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(wc);i.next.push({type:o[s][0],next:e[l.join(",")]||n(l)})}return i}}function um(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:a,next:c}=o.next[l];s.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function xc(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function kc(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function Sc(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function Cc(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new fs(t,r,e[r]);return n}var nr=class t{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Cc(e,r.attrs),this.defaultAttrs=xc(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Nt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.def Line truncated
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(s.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(s.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=o.content[o.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;Mc.hasOwnProperty(s)&&this.parser.normalizeLists&&gm(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:mm.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,d=this.needsBlock;if(vc.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let u=a&&a.skip?n:this.readStyles(e,n);u&&this.addAll(e,u),c&&this.sync(i),this.needsBlock=d}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let l=void 0;;){let a=this.parser.matchStyle(i,s,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(c=>!a.clearMark(c)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=o==null?null:e.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let a=this.nodes[s],c=a.findWrapping(e);if(c&&(!o||o.length>c.length+l)&&(o=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=G.none;for(let l of o.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):lc(l.type,e.type))&&(s=l.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=ic(e,i,s.options);s.options&er&&s.content.length==0&&(l|=er);let a=G.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):lc(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new wn(e,n,a,o,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=rr)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let d=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function gm(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Mc.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function ym(t,e){return(t.matches||t.msMatchesSelector||t.webkitM Line truncated
`))}})}function Om(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function Rm(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new le(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new E(C.from(s),0,0),1,!0))}function Re(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=n-2;c>i;c--,d--){let u=o.node(c),f=o.index(c);if(u.type.spec.isolating)return!1;let h=u.content.cutByIndex(f,u.childCount),p=r&&r[d+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[d]||u;if(!u.canReplace(f+1,u.childCount)||!m.type.validContent(h))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function Dm(t,e,n=1,r){let o=t.doc.resolve(e),i=C.empty,s=C.empty;for(let l=o.depth,a=o.depth-n,c=n-1;l>a;l--,c--){i=C.from(o.node(l).copy(i));let d=r&&r[c];s=C.from(d?d.type.create(d.attrs,s):o.node(l).copy(s))}t.step(new pe(e,e,new E(i.append(s),n,n),!0))}function Le(t,e){let n=t.resolve(e),r=n.index();return Lc(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Im(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function Lc(t,e){return!!(t&&e&&!t.isLeaf&&Im(t,e))}function Ut(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&Lc(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function Pm(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let d=s.whitespace=="pre",u=!!s.contentMatch.matchType(o);d&&!u?r=!1:!d&&u&&(r=!0)}let l=t.steps.length;if(r===!1){let d=t.doc.resolve(e+n);Pc(t,d.node(),d.before(),l)}s.inlineContent&&xs(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=t.mapping.slice(l),c=a.map(e-n);if(t.step(new pe(c,a.map(e+n,-1),E.empty,!0)),r===!0){let d=t.doc.resolve(c);Ic(t,d.node(),d.before(),t.steps.length)}return t}function Lm(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function fo(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),d=!1;if(i==1)d=c.canReplace(a,a,o);else{let u=c.contentMatchAt(a).findWrapping(o.firstChild.type);d=u&&c.canReplaceWith(a,a,u[0])}if(d)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function dr(t,e,n=e,r=E.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return Bc(o,i,r)?new pe(e,n,r):new bs(o,i,r).fit()}function Bc(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}var bs=class{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=C.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=C.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new E(i,s,l);return e>-1?new le(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new pe(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++ Line truncated
`).scrollIntoView()),!0)};function Ds(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Is=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Ds(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,s.createAndFill());a.setSelection(z.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},Ps=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof xe||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Ds(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=t.tr.insert(s,i.createAndFill());l.setSelection(I.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Ls=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Re(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&mt(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function Wm(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof L&&e.selection.node.isBlock)return!r.parentOffset||!Re(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=Ds(r.node(h-1).contentMatchAt(r.indexAfter(h-1)));let m=t&&t(o.parent,a,r);i.unshift(m||(a&&l?{type:l}:null)),s=h;break}else{if(h==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof I||e.selection instanceof xe)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=Re(d.doc,u,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Re(d.doc,u,i.length,i)),!f)return!1;if(d.split(u,i.length,i),!a&&c&&r.node(s).type!=l){let h=d.mapping.map(r.before(s)),p=d.doc.resolve(h);l&&r.node(s-1).canReplaceWith(p.index(),p.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(s)),l)}return n&&n(d.scrollIntoView()),!0}}var jm=Wm();var od=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(L.create(t.doc,o))),!0)},Um=(t,e)=>(e&&e(t.tr.setSelection(new xe(t.doc))),!0);function Km(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Le(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function id(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&Km(t,e,n))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let h=e.pos+i.nodeSize,p=C.empty;for(let y=s.length-1;y>=0;y--)p=C.from(s[y].create(null,p));p=C.from(o.copy(p));let m=t.tr.step(new le(e.pos-1,h,e.pos,h,new E(p,1,0),s.length,!0)),g=m.doc.resolve(h+2*s.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Le(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:z.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&mt(u);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(u,f).scrollIntoView()),!0;if(c&&Mn(i,"start",!0)&&Mn(o,"end")){let h=o,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let y=C.empty;for(let b=p.length-1;b>=0;b--)y=C.from(p[b].copy(y));let w=t.tr.step(new le(e.pos-p.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new E(y,p.length,0),0,!0));n(w.scrollIntoView())}return!0}}return!1}function sd(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(I.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}var Bs=sd(-1),zs=sd(1);function ld(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&Cn(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Hs(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(s,l,(a,c)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)o=!0;else{let d=n.doc.resolve(c),u=d.index();o=d.parent.canReplaceWith(u,u+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[s];i.setBlockType(l,a,t,e)}r(i.scrollIntoView())}return!0}}function $s(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var vs=$s(Gc,Ms,Ts),Jc=$s(Gc,Es,Ns),Rt={Enter:$s(Rs,Ps,Ls,jm),"Mod-Enter":Is,Backspace:vs,"Mod- Line truncated
`),u&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:me(g)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=h.childNodes[p-1];u=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(He&&d.focusNode&&d.focusNode!=a.node&&d.focusNode.nodeType==1){let h=d.focusNode.childNodes[d.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||u&&Se)&&en(l.node,l.offset,d.anchorNode,d.anchorOffset)&&en(a.node,a.offset,d.focusNode,d.focusOffset))return;let f=!1;if((c.extend||e==n)&&!(u&&He)){c.collapse(l.node,l.offset);try{e!=n&&c.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>n){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+i.border,a=s-i.border;if(e>=l&&n<=a){this.dirty=e==r||n==s?Gt:bd,e==l&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=tt:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Gt:tt}r=s}this.dirty=Gt}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Gt:bd;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},yo=class extends tn{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==$e&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Xs=class extends tn{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},Dn=class t extends tn{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Ze.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new t(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&tt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=tt&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=$e){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=$e}}slice(e,n,r){let o=t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=el(i,n,s,r)),e>0&&(i=el(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Bt=class t extends tn{constructor(e,n,r,o,i,s,l,a,c){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,n,r,o,i,s){let l=i.nodeViews[n.type.name],a,c=l&&l(n,i,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),d=c&&c.dom,u=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:u}=Ze.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!u&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let f=d;return d=tu(d,r,n),c?a=new Ys(e,n,r,o,d,u||null,f,c,i,s+1):n.isText?new bo(e,n,r,o,d,f,i):new t(e,n,r,o,d,u||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;b Line truncated
`);return{dom:a,text:f,slice:e}}function ll(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let a=!!e&&(r||i||!n);if(a){if(t.someProp("transformPastedText",f=>{e=f(e,i||r,t)}),i)return l=new N(v.from(t.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0),t.someProp("transformPasted",f=>{l=f(l,t,!0)}),l;let u=t.someProp("clipboardTextParser",f=>f(e,o,r,t));if(u)l=u;else{let f=o.marks(),{schema:h}=t.state,p=et.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else t.someProp("transformPastedHTML",u=>{n=u(n,t)}),s=vg(n),gr&&Mg(s);let c=s&&s.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let u=+d[3];u>0;u--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Ae.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||d),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!kg.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=Tg(kd(l,+d[1],+d[2]),d[4]);else if(l=N.maxOpen(Sg(l.content,o),!0),l.openStart||l.openEnd){let u=0,f=0;for(let h=l.content.firstChild;u<l.openStart&&!h.type.spec.isolating;u++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=kd(l,u,f)}return t.someProp("transformPasted",u=>{l=u(l,t,a)}),l}var kg=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Sg(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&i.length&&Yd(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=Qd(s[s.length-1],i.length));let d=Xd(l,a);s.push(d),o=o.matchType(d.type),i=a}}),s)return v.from(s)}return t}function Xd(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,v.from(t));return t}function Yd(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=Yd(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(v.from(Xd(n,t,o+1))))}}function Qd(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Qd(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(v.empty,!0);return t.copy(n.append(r))}function Xs(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(i=0),o<r-1&&(l=Xs(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(v.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function kd(t,e,n){return e<t.openStart&&(t=new N(Xs(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new N(Xs(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var Zd={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Sd=null;function eu(){return Sd||(Sd=document.implementation.createHTMLDocument("title"))}var Bs=null;function Cg(t){let e=window.trustedTypes;return e?(Bs||(Bs=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Bs.createHTML(t)):t}function vg(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=eu().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Zd[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=Cg(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function Mg(t){let e=t.querySelectorAll(ue?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function Tg(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=v.from(a.create(r[l+1],o)),i++,s++}return new N(o,i,s)}var Ce={},ve={},Ag={touchstart:!0,touchmove:!0},Ys=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Eg(t){for(let e in Ce){let n=Ce[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Og(t,r)&&!al(t,r)&&(t.editable||!(r.type in ve))&&n(t,r)},Ag[e]?{passive: Line truncated
`);return{dom:a,text:f,slice:e}}function pl(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let a=!!e&&(r||i||!n);if(a){if(t.someProp("transformPastedText",f=>{e=f(e,i||r,t)}),i)return l=new E(C.from(t.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0),t.someProp("transformPasted",f=>{l=f(l,t,!0)}),l;let u=t.someProp("clipboardTextParser",f=>f(e,o,r,t));if(u)l=u;else{let f=o.marks(),{schema:h}=t.state,p=Ze.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else t.someProp("transformPastedHTML",u=>{n=u(n,t)}),s=Fg(n),kr&&_g(s);let c=s&&s.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let u=+d[3];u>0;u--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Ae.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||d),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!zg.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=Vg(Rd(l,+d[1],+d[2]),d[4]);else if(l=E.maxOpen(Hg(l.content,o),!0),l.openStart||l.openEnd){let u=0,f=0;for(let h=l.content.firstChild;u<l.openStart&&!h.type.spec.isolating;u++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=Rd(l,u,f)}return t.someProp("transformPasted",u=>{l=u(l,t,a)}),l}var zg=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Hg(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&i.length&&lu(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=au(s[s.length-1],i.length));let d=su(l,a);s.push(d),o=o.matchType(d.type),i=a}}),s)return C.from(s)}return t}function su(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,C.from(t));return t}function lu(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=lu(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(C.from(su(n,t,o+1))))}}function au(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,au(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(C.empty,!0);return t.copy(n.append(r))}function rl(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(i=0),o<r-1&&(l=rl(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(C.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function Rd(t,e,n){return e<t.openStart&&(t=new E(rl(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new E(rl(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var cu={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Dd=null;function du(){return Dd||(Dd=document.implementation.createHTMLDocument("title"))}var Ws=null;function $g(t){let e=window.trustedTypes;return e?(Ws||(Ws=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Ws.createHTML(t)):t}function Fg(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=du().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&cu[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=$g(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function _g(t){let e=t.querySelectorAll(ge?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function Vg(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=C.from(a.create(r[l+1],o)),i++,s++}return new E(o,i,s)}var ve={},Me={},Wg={touchstart:!0,touchmove:!0},ol=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function jg(t){for(let e in ve){let n=ve[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Kg(t,r)&&!ml(t,r)&&(t.editable||!(r.type in Line truncated
`,textSerializers:s={}}=n||{},l="";return t.nodesBetween(r,o,(a,c,d,u)=>{var f;a.isBlock&&c>r&&(l+=i);let h=s?.[a.type.name];if(h)return d&&(l+=h({node:a,pos:c,parent:d,index:u,range:e})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,c)-c,o-c))}),l}function Ol(t,e){let n={from:0,to:t.content.size};return Nl(t,n,e)}function zo(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function cb(t,e,n){let{blockSeparator:r=`
`,textSerializers:s={}}=n||{},l="";return t.nodesBetween(r,o,(a,c,d,u)=>{var f;a.isBlock&&c>r&&(l+=i);let h=s?.[a.type.name];if(h)return d&&(l+=h({node:a,pos:c,parent:d,index:u,range:e})),!1;a.isText&&(l+=(f=a?.text)==null?void 0:f.slice(Math.max(r,c)-c,o-c))}),l}function Bl(t,e){let n={from:0,to:t.content.size};return Ll(t,n,e)}function Vo(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function Nb(t,e,n){let{blockSeparator:r=`
`,textSerializers:o={}}=n||{},i=Bo(e),s=te.fromJSON(i,t);return Ol(s,{blockSeparator:r,textSerializers:{...zo(i),...o}})}function Su(t,e){let n=re(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function Ho(t,e){let n=Mr(typeof e=="string"?e:e.name,t.schema);return n==="node"?Su(t,e):n==="mark"?vl(t,e):{}}function Cu(t,e=JSON.stringify){let n={};return t.filter(r=>{let o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function db(t){let e=Cu(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function $o(t){let{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let c=e.slice(i).map(l,-1),d=e.slice(i).map(a),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),db(r)}function vu(t,e=0){let r=t.type===t.type.schema.topNodeType?0:1,o=e,i=o+t.nodeSize,s=t.marks.map(c=>{let d={type:c.type.name};return Object.keys(c.attrs).length&&(d.attrs={...c.attrs}),d}),l={...t.attrs},a={type:t.type.name,from:o,to:i};return Object.keys(l).length&&(a.attrs=l),s.length&&(a.marks=s),t.content.childCount&&(a.content=[],t.forEach((c,d)=>{var u;(u=a.content)==null||u.push(vu(c,e+d+r))})),t.text&&(a.text=t.text),a}function Ar(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(o=>{let i=n.resolve(t),s=No(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var Rl=(t,e,n,r=20)=>{let o=t.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===e?s=l:i-=1}return[s,i]};function Mo(t,e){return e.nodes[t]||e.marks[t]||null}function wr(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var Mu=(t,e=500)=>{let n="",r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;let d=((c=(a=o.type.spec).toText)==null?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),n};function Ao(t,e,n={}){let{empty:r,ranges:o}=t.selection,i=e?ot(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(u=>i?i.name===u.type.name:!0).find(u=>xr(u.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:u,$to:f})=>{let h=u.pos,p=f.pos;t.doc.nodesBetween(h,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),b=Math.min(p,g+m.nodeSize),w=b-y;s+=w,l.push(...m.marks.map(C=>({mark:C,from:y,to:b})))})}),s===0)return!1;let a=l.filter(u=>i?i.name===u.mark.type.name:!0).filter(u=>xr(u.mark.attrs,n,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=l.filter(u=>i?u.mark.type!==i&&u.mark.type.excludes(i):!0).reduce((u,f)=>u+f.to-f.from,0);return(a>0?a+c:a)>=s}function Fo(t,e,n={}){if(!e)return Ke(t,null,n)||Ao(t,null,n);let r=Mr(e,t.schema);return r==="node"?Ke(t,e,n):r==="mark"?Ao(t,e,n):!1}var Dl=(t,e)=>{let{$from:n,$to:r,$anchor:o}=t.selection;if(e){let i=qe(l=>l.type.name===e)(t.selection);if(!i)return!1;let s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Il=t=>{let{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function bl(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function wl(t,e){let{nodeExtensions:n}=rn(e),r=n.find(s=>s.name===t);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=J(B(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Ln(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(Ln(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function Er(t){return t instanceof I}var Pl=class Tu{constructor(e){this.position=e}static fromJSON(e){return new Tu(e.position)}toJSON(){return{position:this.position}}};function Au(t,e){let n=e.mapping.mapResult(t.position);return{position:new Pl(n.pos),mapResult:n}}function Eu(t){return new Pl(t)}function Ll(t,e,n){let o=t.state.doc.content.size,i=rt(e,0,o),s=rt(n,0,o),l=t.coordsAtPos(i),a=t.coordsAtPos(s,-1),c=Math.min(l.top,a.top),d=Math.max(l.bottom,a.bottom),u=Math.min(l.left,a.left),f=Math.max(l.right,a.right),h=f-u,p=d-c,y={top:c,bottom:d,left:u,right:f,width:h,height:p,x:u,y:c};return{...y,toJSON:()=>y}}function Nu({json:t,validMarks:e,validNo Line truncated
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Lb(t){return Object.prototype.toString.call(t).slice(8,-1)}function br(t){return Lb(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Bl(t,e){let n={...t};return br(t)&&br(e)&&Object.keys(e).forEach(r=>{br(e[r])&&br(t[r])?n[r]=Bl(t[r],e[r]):n[r]=e[r]}),n}var Vo=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...J(B(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...J(B(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){let e=this.extend({...this.config,addOptions:()=>Bl(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){let e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},ee=class Ru extends Vo{constructor(){super(...arguments),this.type="mark"}static create(e={}){let n=typeof e=="function"?e():e;return new Ru(n)}static handleExit({editor:e,mark:n}){let{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(c=>c?.type.name===n.name))return!1;let a=s.find(c=>c?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Du(t){return typeof t=="number"}var _o=class{constructor(t){this.find=t.find,this.handler=t.handler}},Bb=(t,e,n)=>{if(Eo(e))return[...t.matchAll(e)];let r=e(t,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function zb(t){let{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:a,chain:c,can:d}=new Cr({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,(h,p)=>{var m,g,y,b,w;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;let C=(w=(b=(y=h.content)==null?void 0:y.size)!=null?b:h.nodeSize)!=null?w:0,x=Math.max(r,p),S=Math.min(o,p+C);if(x>=S)return;let k=h.isText?h.text||"":h.textBetween(x-p,S-p,void 0,"\uFFFC");Bb(k,i.find,s).forEach(M=>{if(M.index===void 0)return;let A=x+M.index+1,z=A+M[0].length,j={from:n.tr.mapping.map(A),to:n.tr.mapping.map(z)},V=i.handler({state:n,range:j,match:M,commands:a,chain:c,can:d,pasteEvent:s,dropEvent:l});u.push(V)})}),u.every(h=>h!==null)}var vo=null,Hb=t=>{var e;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function Iu(t){let{editor:e,rules:n}=t,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:d,from:u,to:f,rule:h,pasteEvt:p})=>{let m=d.tr,g=Sr({state:d,transaction:m});if(!(!zb({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(d=>new P({view(u){let f=p=>{var m;r=(m=u.dom.parentElement)!=null&&m.contains(p.target)?u.dom.parentElement:null,r&&(vo=e)},h=()=>{vo&&(vo=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(i=r===u.dom.parentElement,l=f,!i){let h=vo;h?.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,f)=>{var h;let p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return s=f,o=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(u,f,h)=>{let p=u[0],m=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!i,y=p.getMeta("applyPasteRules"),b=!!y;if(!m&&!g&&!b)return;if(b){let{text:x}=y;typeof x=="string"?x=x:x=Tr(v.from(x),h.schema);let{from:S}=y,k=S+x.length,E=Hb(x);return a({rule:d,state:h,from:S,to:{b:k},pasteEvt:E})}let w=f.doc.content.findDiffStart(h.doc.content),C=f.doc.content.findDiffEnd(h.doc.content);if(!(!Du(w)||!C||w===C.b))return a({rule:d,state:h,from:w,to:C,pasteEvt:s})}}))}var Wo=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Lo(t),this.schema=El(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{let n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Mo(e.name,this.schema)},r=B(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){let{editor:t}=this;return Line truncated
`,textSerializers:o={}}=n||{},i=_o(e),s=ne.fromJSON(i,t);return Bl(s,{blockSeparator:r,textSerializers:{...Vo(i),...o}})}function Lu(t,e){let n=oe(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});let s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function Wo(t,e){let n=Or(typeof e=="string"?e:e.name,t.schema);return n==="node"?Lu(t,e):n==="mark"?Ol(t,e):{}}function Bu(t,e=JSON.stringify){let n={};return t.filter(r=>{let o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function Ob(t){let e=Bu(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function jo(t){let{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{let s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{let{from:l,to:a}=n[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{let c=e.slice(i).map(l,-1),d=e.slice(i).map(a),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),Ob(r)}function zu(t,e=0){let r=t.type===t.type.schema.topNodeType?0:1,o=e,i=o+t.nodeSize,s=t.marks.map(c=>{let d={type:c.type.name};return Object.keys(c.attrs).length&&(d.attrs={...c.attrs}),d}),l={...t.attrs},a={type:t.type.name,from:o,to:i};return Object.keys(l).length&&(a.attrs=l),s.length&&(a.marks=s),t.content.childCount&&(a.content=[],t.forEach((c,d)=>{var u;(u=a.content)==null||u.push(zu(c,e+d+r))})),t.text&&(a.text=t.text),a}function Dr(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(o=>{let i=n.resolve(t),s=Bo(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var zl=(t,e,n,r=20)=>{let o=t.doc.resolve(n),i=r,s=null;for(;i>0&&s===null;){let l=o.node(i);l?.type.name===e?s=l:i-=1}return[s,i]};function Pn(t,e){return e.nodes[t]||e.marks[t]||null}function Mr(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var Hu=(t,e=500)=>{let n="",r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;let d=((c=(a=o.type.spec).toText)==null?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-i))}),n};function Po(t,e,n={}){let{empty:r,ranges:o}=t.selection,i=e?rt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(u=>i?i.name===u.type.name:!0).find(u=>Tr(u.attrs,n,{strict:!1}));let s=0,l=[];if(o.forEach(({$from:u,$to:f})=>{let h=u.pos,p=f.pos;t.doc.nodesBetween(h,p,(m,g)=>{if(i&&m.inlineContent&&!m.type.allowsMarkType(i))return!1;if(!m.isText&&!m.marks.length)return;let y=Math.max(h,g),w=Math.min(p,g+m.nodeSize),b=w-y;s+=b,l.push(...m.marks.map(x=>({mark:x,from:y,to:w})))})}),s===0)return!1;let a=l.filter(u=>i?i.name===u.mark.type.name:!0).filter(u=>Tr(u.mark.attrs,n,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=l.filter(u=>i?u.mark.type!==i&&u.mark.type.excludes(i):!0).reduce((u,f)=>u+f.to-f.from,0);return(a>0?a+c:a)>=s}function Uo(t,e,n={}){if(!e)return qe(t,null,n)||Po(t,null,n);let r=Or(e,t.schema);return r==="node"?qe(t,e,n):r==="mark"?Po(t,e,n):!1}var Hl=(t,e)=>{let{$from:n,$to:r,$anchor:o}=t.selection;if(e){let i=Je(l=>l.type.name===e)(t.selection);if(!i)return!1;let s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},$l=t=>{let{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Ml(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Do(t,e){let{nodeExtensions:n}=rn(e),r=n.find(s=>s.name===t);if(!r)return!1;let o={name:r.name,options:r.options,storage:r.storage},i=J($(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ln(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(ln(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function Ir(t){return t instanceof L}function Rb({selection:t,pos:e,nodeSize:n,selectedOnTextSelection:r=!1}){let{from:o,to:i}=t;return!!(o<=e&&i>=e+n||r&&Hn(t)&&o>e&&i<e+n)}var Fl=class $u{constructor(e){this.position=e}static fromJSON(e){return new $u(e.position)}toJSON(){return{position:this.position}}};function Fu(t,e){let n=e.mapping.mapResult(t.position);return{position:new Fl(n.pos),mapResult:n}}function _u(t){return new Fl(t)}function _l(t,e,n){let o=t.state.doc.content.size,i=nt(e,0,o),s=nt(n,0,o),l=t.coordsAtPos(i),a=t.coordsAtPos(s,-1),c=Math.min(l.top,a.top),d=Math.max(l.bottom,a.bottom) Line truncated
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function r0(t){return Object.prototype.toString.call(t).slice(8,-1)}function Cr(t){return r0(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Vl(t,e){let n={...t};return Cr(t)&&Cr(e)&&Object.keys(e).forEach(r=>{Cr(e[r])&&Cr(t[r])?n[r]=Vl(t[r],e[r]):n[r]=e[r]}),n}var Ko=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...J($(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...J($(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){let e=this.extend({...this.config,addOptions:()=>Vl(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(t={}){let e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},te=class ju extends Ko{constructor(){super(...arguments),this.type="mark"}static create(e={}){let n=typeof e=="function"?e():e;return new ju(n)}static handleExit({editor:e,mark:n}){let{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){let s=o.marks();if(!!!s.find(c=>c?.type.name===n.name))return!1;let a=s.find(c=>c?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Uu(t){return typeof t=="number"}var qo=class{constructor(t){this.find=t.find,this.handler=t.handler}},o0=(t,e,n)=>{if(Lo(e))return[...t.matchAll(e)];let r=e(t,n);return r?r.map(o=>{let i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function i0(t){let{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:a,chain:c,can:d}=new Nr({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,(h,p)=>{var m,g,y,w,b;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;let x=(b=(w=(y=h.content)==null?void 0:y.size)!=null?w:h.nodeSize)!=null?b:0,k=Math.max(r,p),M=Math.min(o,p+x);if(k>=M)return;let S=h.isText?h.text||"":h.textBetween(k-p,M-p,void 0,"\uFFFC");o0(S,i.find,s).forEach(A=>{if(A.index===void 0)return;let v=k+A.index+1,R=v+A[0].length,j={from:n.tr.mapping.map(v),to:n.tr.mapping.map(R)},D=i.handler({state:n,range:j,match:A,commands:a,chain:c,can:d,pasteEvent:s,dropEvent:l});u.push(D)})}),u.every(h=>h!==null)}var Ro=null,s0=t=>{var e;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function Ku(t){let{editor:e,rules:n}=t,r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}let a=({state:d,from:u,to:f,rule:h,pasteEvt:p})=>{let m=d.tr,g=Er({state:d,transaction:m});if(!(!i0({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(d=>new B({view(u){let f=p=>{var m;r=(m=u.dom.parentElement)!=null&&m.contains(p.target)?u.dom.parentElement:null,r&&(Ro=e)},h=()=>{Ro&&(Ro=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(i=r===u.dom.parentElement,l=f,!i){let h=Ro;h?.isEditable&&setTimeout(()=>{let p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,f)=>{var h;let p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return s=f,o=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(u,f,h)=>{let p=u[0],m=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!i,y=p.getMeta("applyPasteRules"),w=!!y;if(!m&&!g&&!w)return;if(w){let{text:k}=y;typeof k=="string"?k=k:k=Rr(C.from(k),h.schema);let{from:M}=y,S=M+k.length,P=s0(k);return a({rule:d,state:h,from:M,to:{b:S},pasteEvt:P})}let b=f.doc.content.findDiffStart(h.doc.content),x=f.doc.content.findDiffEnd(h.doc.content);if(!(!Uu(b)||!x||b===x.b))return a({rule:d,state:h,from:b,to:x,pasteEvt:s})}}))}var Jo=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Fo(t),this.schema=Pl(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{let n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Pn(e.name,this.schema)},r=$(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){let{edito Line truncated
position: relative;
}
@@ -82,65 +82,67 @@ img.ProseMirror-separator {
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}`;function Ju(t,e,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}var Fb=class extends Ib{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Au,createMappablePosition:Eu},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let e=this.createDoc(),n=Sl(e,this.options.autofocus);this.editorState=lr.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Ju($b,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){let n=Tl(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;let e=this.state.plugins,n=e;if([].concat(t).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),e.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;let r=[...this.options.enabl Line truncated
}`;function af(t,e,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}var a0=class extends t0{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Fu,createMappablePosition:_u},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:i})=>this.options.onDrop(r,o,i)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);let e=this.createDoc(),n=El(e,this.options.autofocus);this.editorState=fr.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=af(l0,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){let n=Dl(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;let e=this.state.plugins,n=e;if([].concat(t).forEach(o=>{let i=typeof o=="string"?`${o}$`:o.key;n=n.filter(s=>!s.key.startsWith(i))}),e.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}creat Line truncated
`,textSerializers:n={}}=t||{};return Ol(this.state.doc,{blockSeparator:e,textSerializers:{...zo(this.schema),...n}})}get isEmpty(){return Ln(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){let e=this.state.doc.resolve(t);return new qu(e,this)}get $doc(){return this.$pos(0)}};function De(t){return new Bn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=J(t.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=e,s=r[r.length-1],l=r[0];if(s){let a=l.search(/\S/),c=n.from+l.indexOf(s),d=c+s.length;if(Ar(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===t.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;d<n.to&&i.delete(d,n.to),c>n.from&&i.delete(n.from+a,c);let f=n.from+a+s.length;i.addMark(n.from+a,f,t.type.create(o||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function Nr(t){return new Bn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=J(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from,l=n.to,a=t.type.create(o);if(r[1]){let c=r[0].lastIndexOf(r[1]),d=s+c;d>l?d=l:l=d+r[1].length;let u=r[0][r[0].length-1];i.insertText(u,s+r[0].length-1),i.replaceWith(d,l,a)}else if(r[0]){let c=t.type.isInline?s:s-1;i.insert(c,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:t.undoable})}function zn(t){return new Bn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=e.doc.resolve(n.from),i=J(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Vb(t){return new Bn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=t.replace,i=n.from,s=n.to;if(r[1]){let l=r[0].lastIndexOf(r[1]);o+=r[0].slice(l+r[1].length),i+=l;let a=i-s;a>0&&(o=r[0].slice(l-a,l)+o,i=s)}e.tr.insertText(o,i,s)},undoable:t.undoable})}function Je(t){return new Bn({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{let i=J(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),c=a&&wn(a,t.type,i);if(!c)return null;if(s.wrap(a,c),t.keepMarks&&t.editor){let{selection:u,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,p=f||u.$to.parentOffset&&u.$from.marks();if(p){let m=p.filter(g=>h.includes(g.type.name));s.ensureMarks(m)}}if(t.keepAttributes){let u=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(u,i).run()}let d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&Le(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)},undoable:t.undoable})}function _b(t){return t.children}var Wb=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);let{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},jb=t=>"touches"in t,jo=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.clientX-this.startX,c=l.clientY-this.startY;this.handleResize(a,c)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.touches[0];if(!a)return;let c=a.clientX-this.startX,d=a.clientY-this.startY;this.handleResize(c,d)},this.handleMouseUp=()=>{if(!this.isResizing)return;let l=this.element.offsetWidth,a=this.element.offsetHeight;this.onCommit(l,a),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,o,i,s;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t Line truncated
`,textSerializers:n={}}=t||{};return Bl(this.state.doc,{blockSeparator:e,textSerializers:{...Vo(this.schema),...n}})}get isEmpty(){return ln(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){let e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText?e.nodeAfter:null;return new lf(e,this,!1,n)}get $doc(){return this.$pos(0)}};function De(t){return new Fn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=J(t.getAttributes,void 0,r);if(o===!1||o===null)return null;let{tr:i}=e,s=r[r.length-1],l=r[0];if(s){let a=l.search(/\S/),c=n.from+l.indexOf(s),d=c+s.length;if(Dr(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===t.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;d<n.to&&i.delete(d,n.to),c>n.from&&i.delete(n.from+a,c);let f=n.from+a+s.length;i.addMark(n.from+a,f,t.type.create(o||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function Pr(t){return new Fn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=J(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from,l=n.to,a=t.type.create(o);if(r[1]){let c=r[0].lastIndexOf(r[1]),d=s+c;d>l?d=l:l=d+r[1].length;let u=r[0][r[0].length-1];i.insertText(u,s+r[0].length-1),i.replaceWith(d,l,a)}else if(r[0]){let c=t.type.isInline?s:s-1;i.insert(c,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:t.undoable})}function _n(t){return new Fn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=e.doc.resolve(n.from),i=J(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function c0(t){return new Fn({find:t.find,handler:({state:e,range:n,match:r})=>{let o=t.replace,i=n.from,s=n.to;if(r[1]){let l=r[0].lastIndexOf(r[1]);o+=r[0].slice(l+r[1].length),i+=l;let a=i-s;a>0&&(o=r[0].slice(l-a,l)+o,i=s)}e.tr.insertText(o,i,s)},undoable:t.undoable})}function Ge(t){return new Fn({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{let i=J(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),c=a&&Cn(a,t.type,i);if(!c)return null;if(s.wrap(a,c),t.keepMarks&&t.editor){let{selection:u,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,p=f||u.$to.parentOffset&&u.$from.marks();if(p){let m=p.filter(g=>h.includes(g.type.name));s.ensureMarks(m)}}if(t.keepAttributes){let u=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(u,i).run()}let d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&Le(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)},undoable:t.undoable})}function d0(t){return t.children}var u0=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);let{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},f0=t=>"touches"in t,Go=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.clientX-this.startX,c=l.clientY-this.startY;this.handleResize(a,c)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;let a=l.touches[0];if(!a)return;let c=a.clientX-this.startX,d=a.clientY-this.startY;this.handleResize(c,d)},this.handleMouseUp=()=>{if(!this.isResizing)return;let l=this.element.offsetWidth,a=this.element.offsetHeight;this.onCommit(l,a),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,o,i,s;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentE Line truncated
`);return`:::${c}${m}
${g}
:::`}}}function qb(t){if(!t.trim())return{};let e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(t);for(;r!==null;){let[,o,i,s]=r;e[o]=i||s,r=n.exec(t)}return e}function Jb(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function Yu(t){let{nodeName:e,name:n,getContent:r,parseAttributes:o=qb,serializeAttributes:i=Jb,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=t,c=n||e,d=f=>{if(!a)return f;let h={};return a.forEach(p=>{let m=typeof p=="string"?p:p.name,g=typeof p=="string"?void 0:p.skipIfDefault;if(m in f){let y=f[m];if(g!==void 0&&y===g)return;h[m]=y}}),h},u=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{let p={...s,...f.attributes};if(l)return h.createNode(e,p);let m=r?r(f):f.content||"";return m?h.createNode(e,p,[h.createTextNode(m)]):h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"inline",start(f){let h=l?new RegExp(`\\[${u}\\s*[^\\]]*\\]`):new RegExp(`\\[${u}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${u}\\]`),p=f.match(h),m=p?.index;return m!==void 0?m:-1},tokenize(f,h,p){let m=l?new RegExp(`^\\[${u}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${u}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${u}\\]`),g=f.match(m);if(!g)return;let y="",b="";if(l){let[,C]=g;b=C}else{let[,C,x]=g;b=C,y=x||""}let w=o(b.trim());return{type:e,raw:g[0],content:y.trim(),attributes:w}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(y=>y.type==="text").map(y=>y.text).join(""));let p=d(f.attrs||{}),m=i(p),g=m?` ${m}`:"";return l?`[${c}${g}]`:`[${c}${g}]${h}[/${c}]`}}}function Or(t,e,n){var r,o,i,s;let l=t.split(`
:::`}}}function b0(t){if(!t.trim())return{};let e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(t);for(;r!==null;){let[,o,i,s]=r;e[o]=i||s,r=n.exec(t)}return e}function w0(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function uf(t){let{nodeName:e,name:n,getContent:r,parseAttributes:o=b0,serializeAttributes:i=w0,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:a}=t,c=n||e,d=f=>{if(!a)return f;let h={};return a.forEach(p=>{let m=typeof p=="string"?p:p.name,g=typeof p=="string"?void 0:p.skipIfDefault;if(m in f){let y=f[m];if(g!==void 0&&y===g)return;h[m]=y}}),h},u=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{let p={...s,...f.attributes};if(l)return h.createNode(e,p);let m=r?r(f):f.content||"";return m?h.createNode(e,p,[h.createTextNode(m)]):h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"inline",start(f){let h=l?new RegExp(`\\[${u}\\s*[^\\]]*\\]`):new RegExp(`\\[${u}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${u}\\]`),p=f.match(h),m=p?.index;return m!==void 0?m:-1},tokenize(f,h,p){let m=l?new RegExp(`^\\[${u}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${u}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${u}\\]`),g=f.match(m);if(!g)return;let y="",w="";if(l){let[,x]=g;w=x}else{let[,x,k]=g;w=x,y=k||""}let b=o(w.trim());return{type:e,raw:g[0],content:y.trim(),attributes:b}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(y=>y.type==="text").map(y=>y.text).join(""));let p=d(f.attrs||{}),m=i(p),g=m?` ${m}`:"";return l?`[${c}${g}]`:`[${c}${g}]${h}[/${c}]`}}}function Lr(t,e,n){var r,o,i,s;let l=t.split(`
`),a=[],c="",d=0,u=e.baseIndentSize||2;for(;d<l.length;){let f=l[d],h=f.match(e.itemPattern);if(!h){if(a.length>0)break;if(f.trim()===""){d+=1,c=`${c}${f}
`;continue}else return}let p=e.extractItemData(h),{indentLevel:m,mainContent:g}=p;c=`${c}${f}
`;let y=[g];for(d+=1;d<l.length;){let x=l[d];if(x.trim()===""){let k=l.slice(d+1).findIndex(A=>A.trim()!=="");if(k===-1)break;if((((o=(r=l[d+1+k].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>m){y.push(x),c=`${c}${x}
`,d+=1;continue}else break}if((((s=(i=x.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>m)y.push(x),c=`${c}${x}
`,d+=1;else break}let b,w=y.slice(1);if(w.length>0){let x=w.map(S=>S.slice(m+u)).join(`
`);x.trim()&&(e.customNestedParser?b=e.customNestedParser(x):b=n.blockTokens(x))}let C=e.createToken(p,b);a.push(C)}if(a.length!==0)return{items:a,raw:c}}function Hn(t,e,n,r){if(!t||!Array.isArray(t.content))return"";let o=typeof n=="function"?n(r):n,[i,...s]=t.content,l=e.renderChildren([i]),a=[`${o}${l}`];return s&&s.length>0&&s.forEach(c=>{let d=e.renderChildren([c]);if(d){let u=d.split(`
`).map(f=>f?e.indent(f):"").join(`
`);a.push(u)}}),a.join(`
`)}function $l(t,e,n={}){let{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,a)=>{let c=i.mapping.map(a),d=i.mapping.map(a)+l.nodeSize,u=null;if(l.marks.forEach(h=>{if(h!==s)return!1;u=h}),!u)return;let f=!1;if(Object.keys(n).forEach(h=>{n[h]!==u.attrs[h]&&(f=!0)}),f){let h=t.type.create({...t.attrs,...n});i.removeMark(c,d,t.type),i.addMark(c,d,h)}}),i.docChanged&&e.view.dispatch(i)}var Gb=class{constructor(t,e,n){this.component=t,this.editor=e.editor,this.options={...n},this.mark=e.mark,this.HTMLAttributes=e.HTMLAttributes}get dom(){return this.editor.view.dom}get contentDOM(){return null}updateAttributes(t,e){$l(e||this.mark,this.editor,t)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(In()||Oo())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}},$=class Qu extends Vo{constructor(){super(...arguments),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new Qu(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}},Xb=class{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,r,o,i,s,l;let{view:a}=this.editor,c=t.target,d=c.nodeType===3?(e=c.parentElement)==null?void 0:e.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(c)||!d)return;let u=0,f=0;if(this.dom!==d){let b=this.dom.getBoundingClientRect(),w=d.getBoundingClientRect(),C=(o=t.offsetX)!=null?o:(r=t.nativeEvent)==null?void 0:r.offsetX,x=(s=t.offsetY)!=null?s:(i=t.nativeEvent)==null?void 0:i.offsetY;u=w.x-b.x+C,f=w.y-b.y+x}let h=this.dom.cloneNode(!0);try{let b=this.dom.getBoundingClientRect();h.style.width=`${Math.round(b.width)}px`,h.style.height=`${Math.round(b.height)}px`,h.style.boxSizing="border-box",h.style.pointerEvents="none"}catch{}let p=null;try{p=document.createElement("div"),p.style.position="absolute",p.style.top="-9999px",p.style.left="-9999px",p.style.pointerEvents="none",p.appendChild(h),document.body.appendChild(p),(l=t.dataTransfer)==null||l.setDragImage(h,u,f)}finally{p&&setTimeout(()=>{try{p?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let g=I.create(a.state.doc,m),y=a.state.tr.setSelection(g);a.dispatch(y)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});let n=t.target;if(!(this.dom.contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;let o=t.type.startsWith("drag"),i=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;let{isEditable:l}=this.editor,{isDragging:a}=this,c=!!this.node.type.spec.draggable,d=I.isSelectable(this.node),u=t.type==="copy",f=t.type==="paste",h=t.type==="cut",p=t.type==="mousedown";if(!c&&d&&o&&t.target===this.dom&&t.preventDefault(),c&&o&&!a&&t.target===this.dom)return t.preventDefault(),!1;if(c&&l&&!a&&p){let m=n.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(a||i||u||f||h||p&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(In()||Oo())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{let n=this.getPos();return typeof n!="number"?!1:(e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){let t=this.getPos();if(typeof t!="number")return;let e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};function Me(t){return new _o({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{let i=J(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=e,l=r[r.length-1],a=r[0],c=n.to;if(l){let d=a.search(/\S/),u=n.from+a.indexOf(l),f=u+l.length;if(Ar(n.from,n.to,e.d Line truncated
`).map(a=>a.trim()===""?n:`${n} ${a}`);r.push(l.join(`
`;let y=[g];for(d+=1;d<l.length;){let k=l[d];if(k.trim()===""){let S=l.slice(d+1).findIndex(v=>v.trim()!=="");if(S===-1)break;if((((o=(r=l[d+1+S].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>m){y.push(k),c=`${c}${k}
`,d+=1;continue}else break}if((((s=(i=k.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:s.length)||0)>m)y.push(k),c=`${c}${k}
`,d+=1;else break}let w,b=y.slice(1);if(b.length>0){let k=b.map(M=>M.slice(m+u)).join(`
`);k.trim()&&(e.customNestedParser?w=e.customNestedParser(k):w=n.blockTokens(k))}let x=e.createToken(p,w);a.push(x)}if(a.length!==0)return{items:a,raw:c}}function Vn(t,e,n,r){if(!t||!Array.isArray(t.content))return"";let o=typeof n=="function"?n(r):n,[i,...s]=t.content,l=e.renderChildren([i]),a=`${o}${l}`;return s&&s.length>0&&s.forEach((c,d)=>{var u,f;let h=(f=(u=e.renderChild)==null?void 0:u.call(e,c,d+1))!=null?f:e.renderChildren([c]);if(h!=null){let p=h.split(`
`).map(m=>m?e.indent(m):e.indent("")).join(`
`);a+=c.type==="paragraph"?`
${p}`:`
${p}`}}),a}function Kl(t,e,n={}){let{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,a)=>{let c=i.mapping.map(a),d=i.mapping.map(a)+l.nodeSize,u=null;if(l.marks.forEach(h=>{if(h!==s)return!1;u=h}),!u)return;let f=!1;if(Object.keys(n).forEach(h=>{n[h]!==u.attrs[h]&&(f=!0)}),f){let h=t.type.create({...t.attrs,...n});i.removeMark(c,d,t.type),i.addMark(c,d,h)}}),i.docChanged&&e.view.dispatch(i)}var x0=class{constructor(t,e,n){this.component=t,this.editor=e.editor,this.options={...n},this.mark=e.mark,this.HTMLAttributes=e.HTMLAttributes}get dom(){return this.editor.view.dom}get contentDOM(){return null}updateAttributes(t,e){Kl(e||this.mark,this.editor,t)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(nn()||Ar())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}},V=class ff extends Ko{constructor(){super(...arguments),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new ff(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}},k0=class{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,r,o,i,s,l;let{view:a}=this.editor,c=t.target,d=c.nodeType===3?(e=c.parentElement)==null?void 0:e.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(c)||!d)return;let u=0,f=0;if(this.dom!==d){let w=this.dom.getBoundingClientRect(),b=d.getBoundingClientRect(),x=(o=t.offsetX)!=null?o:(r=t.nativeEvent)==null?void 0:r.offsetX,k=(s=t.offsetY)!=null?s:(i=t.nativeEvent)==null?void 0:i.offsetY;u=b.x-w.x+x,f=b.y-w.y+k}let h=this.dom.cloneNode(!0);try{let w=this.dom.getBoundingClientRect();h.style.width=`${Math.round(w.width)}px`,h.style.height=`${Math.round(w.height)}px`,h.style.boxSizing="border-box",h.style.pointerEvents="none"}catch{}let p=null;try{p=document.createElement("div"),p.style.position="absolute",p.style.top="-9999px",p.style.left="-9999px",p.style.pointerEvents="none",p.appendChild(h),document.body.appendChild(p),(l=t.dataTransfer)==null||l.setDragImage(h,u,f)}finally{p&&setTimeout(()=>{try{p?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let g=L.create(a.state.doc,m),y=a.state.tr.setSelection(g);a.dispatch(y)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});let n=t.target;if(!(this.dom.contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;let o=t.type.startsWith("drag"),i=t.type==="dragover"||t.type==="dragenter",s=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!s&&!o)return!0;let{isEditable:a}=this.editor,{isDragging:c}=this,d=!!this.node.type.spec.draggable,u=L.isSelectable(this.node),f=t.type==="copy",h=t.type==="paste",p=t.type==="cut",m=t.type==="mousedown";if(!d&&u&&o&&t.target===this.dom&&t.preventDefault(),d&&o&&!c&&t.target===this.dom)return t.preventDefault(),!1;if(d&&a&&!c&&m){let g=n.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||i||s||f||h||p||m&&u)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(nn()||Ar())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{let n=this.getPos();return typeof n!="number"?!1:(e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){let t=this.getPos();if(typeof t!="number")return;let e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};function Te(t){return new qo({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{let i=J(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;let{tr:s}=e,l=r[r.length-1],a=r[0],c=n.to;if(l){let d=a.search(/\S/),u Line truncated
`).map(u=>u.trim()===""?n:`${n} ${u}`);r.push(d.join(`
`))}),r.join(`
${n}
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Je({find:p0,type:this.type})]}}),uf=m0;var g0=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,y0=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,b0=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,w0=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,x0=ee.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return $n("strong",{...O(this.options.HTMLAttributes,t),children:$n("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[De({find:g0,type:this.type}),De({find:b0,type:this.type})]},addPasteRules(){return[Me({find:y0,type:this.type}),Me({find:w0,type:this.type})]}}),ff=x0;var k0=/(^|[^`])`([^`]+)`(?!`)$/,S0=/(^|[^`])`([^`]+)`(?!`)/g,C0=ee.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",O(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[De({find:k0,type:this.type})]},addPasteRules(){return[Me({find:S0,type:this.type})]}}),hf=C0;var Jl=4,v0=/^```([a-z]+)?[\s\n]$/,M0=/^~~~([a-z]+)?[\s\n]$/,T0=$.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Jl,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",O(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="",o=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${o}`,e.renderChildren(t.content),"```"].join(`
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ge({find:K0,type:this.type})]}}),Tf=q0;var J0=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,G0=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,X0=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Y0=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Q0=te.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Wn("strong",{...N(this.options.HTMLAttributes,t),children:Wn("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[De({find:J0,type:this.type}),De({find:X0,type:this.type})]},addPasteRules(){return[Te({find:G0,type:this.type}),Te({find:Y0,type:this.type})]}}),Af=Q0;var Z0=/(^|[^`])`([^`]+)`(?!`)$/,ew=/(^|[^`])`([^`]+)`(?!`)/g,tw=te.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",N(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[De({find:Z0,type:this.type})]},addPasteRules(){return[Te({find:ew,type:this.type})]}}),Ef=tw;var ta=4,nw=/^```([a-z]+)?[\s\n]$/,rw=/^~~~([a-z]+)?[\s\n]$/,ow=V.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:ta,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",N(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="",o=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${o}`,e.renderChildren(t.content),"```"].join(`
`):r=`\`\`\`${o}
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=(e=this.options.tabSize)!=null?e:Jl,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let l=" ".repeat(n);return s?t.commands.insertContent(l):t.commands.command(({tr:a})=>{let{from:c,to:d}=o,h=r.doc.textBetween(c,d,`
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=(e=this.options.tabSize)!=null?e:ta,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;let l=" ".repeat(n);return s?t.commands.insertContent(l):t.commands.command(({tr:a})=>{let{from:c,to:d}=o,h=r.doc.textBetween(c,d,`
`,`
`).split(`
`).map(p=>l+p).join(`
`);return a.replaceWith(c,d,r.schema.text(h)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=(e=this.options.tabSize)!=null?e:Jl,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?t.commands.command(({tr:l})=>{var a;let{pos:c}=i,d=i.start(),u=i.end(),h=r.doc.textBetween(d,u,`
`);return a.replaceWith(c,d,r.schema.text(h)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=(e=this.options.tabSize)!=null?e:ta,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;return i.parent.type!==this.type?!1:s?t.commands.command(({tr:l})=>{var a;let{pos:c}=i,d=i.start(),u=i.end(),h=r.doc.textBetween(d,u,`
`,`
`).split(`
`),p=0,m=0,g=c-d;for(let S=0;S<h.length;S+=1){if(m+h[S].length>=g){p=S;break}m+=h[S].length+1}let b=((a=h[p].match(/^ */))==null?void 0:a[0])||"",w=Math.min(b.length,n);if(w===0)return!0;let C=d;for(let S=0;S<p;S+=1)C+=h[S].length+1;return l.delete(C,C+w),c-C<=w&&l.setSelection(D.create(l.doc,C)),!0}):t.commands.command(({tr:l})=>{let{from:a,to:c}=o,f=r.doc.textBetween(a,c,`
`),p=0,m=0,g=c-d;for(let M=0;M<h.length;M+=1){if(m+h[M].length>=g){p=M;break}m+=h[M].length+1}let w=((a=h[p].match(/^ */))==null?void 0:a[0])||"",b=Math.min(w.length,n);if(b===0)return!0;let x=d;for(let M=0;M<p;M+=1)x+=h[M].length+1;return l.delete(x,x+b),c-x<=b&&l.setSelection(I.create(l.doc,x)),!0}):t.commands.command(({tr:l})=>{let{from:a,to:c}=o,f=r.doc.textBetween(a,c,`
`,`
`).split(`
`).map(h=>{var p;let m=((p=h.match(/^ */))==null?void 0:p[0])||"",g=Math.min(m.length,n);return h.slice(g)}).join(`
`);return l.replaceWith(a,c,r.schema.text(f)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;let i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
`);return!i||!s?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let l=o.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:c})=>(c.setSelection(L.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[zn({find:v0,type:this.type,getAttributes:t=>({language:t[1]})}),zn({find:M0,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new P({key:new H("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:l}=t.state,a=l.text(n.replace(/\r\n?/g,`
`));return s.replaceSelectionWith(this.type.create({language:i},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(D.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),pf=T0;var mf=$.create({name:"customBlock",group:"block",atom:!0,defining:!0,draggable:!0,selectable:!0,isolating:!0,allowGapCursor:!0,inline:!1,addNodeView(){return({editor:t,node:e,getPos:n,HTMLAttributes:r,decorations:o,extension:i})=>{let s=document.createElement("div");s.setAttribute("data-config",JSON.stringify(e.attrs.config)),s.setAttribute("data-id",e.attrs.id),s.setAttribute("data-type","customBlock");let l=document.createElement("div");if(l.className="fi-fo-rich-editor-custom-block-header fi-not-prose",s.appendChild(l),t.isEditable&&typeof e.attrs.config=="object"&&e.attrs.config!==null&&Object.keys(e.attrs.config).length>0){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-edit-btn-ctn",l.appendChild(c);let d=document.createElement("button");d.className="fi-icon-btn",d.type="button",d.innerHTML=i.options.editCustomBlockButtonIconHtml,d.addEventListener("click",()=>i.options.editCustomBlockUsing(e.attrs.id,e.attrs.config)),c.appendChild(d)}let a=document.createElement("p");if(a.className="fi-fo-rich-editor-custom-block-heading",a.textContent=e.attrs.label,l.appendChild(a),t.isEditable){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-delete-btn-ctn",l.appendChild(c);let d=document.createElement("button");d.className="fi-icon-btn",d.type="button",d.innerHTML=i.options.deleteCustomBlockButtonIconHtml,d.addEventListener("click",()=>t.chain().setNodeSelection(n()).deleteSelection().run()),c.appendChild(d)}if(e.attrs.preview){let c=document.createElement("div"),d=["fi-fo-rich-editor-custom-block-preview"];e.attrs.shouldApplyProseStylingToPreview||d.push("fi-not-prose"),c.className=d.join(" "),c.innerHTML=new TextDecoder().decode(Uint8Array.from(atob(e.attrs.preview),u=>u.charCodeAt(0))),s.appendChild(c)}return{dom:s}}},addOptions(){return{deleteCustomBlockButtonIconHtml:null,editCustomBlockButtonIconHtml:null,editCustomBlockUsing:()=>{},insertCustomBlockUsing:()=>{}}},addAttributes(){return{config:{default:null,parseHTML:t=>JSON.parse(t.getAttribute("data-config")),renderHTML:t=>t.config?{"data-config":JSON.stringify(t.config)}:{}},id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),rendered:!1},preview:{default:null,parseHTML:t=>t.getAttribute("data-preview"),rendered:!1},shouldApplyProseStylingToPreview:{default:!1,rendered:!1}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["div",O({"data-type":"customBlock"},t)]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1,{selection:r}=e,{empty:o,anchor:i}=r;if(!o)return!1;let s=new te,l=0;return e.doc.nodesBetween(i-1,i,(a,c)=>{if(a.type.name===this.name)return n=!0,s=a,l=c,!1}),n})}},addProseMirrorPlugins(){let{insertCustomBlockUsing:t}=this.options;return[new P({props:{handleDrop(e,n){if(!n||(n.preventDefault(),!n.dataTransfer.getData("customBlock")))return!1;let r=n.dataTransfer.getData("customBlock");return t(r,e.posAtCoords({left:n.clientX,top:n.clientY}).pos),!1}}})]}});var Qo=(t,e)=>e.view.domAtPos(t).node.offsetParent!==null,A0=(t,e,n)=>{for(let r=t.depth;r>0;r-=1){let o=t.node(r),i=e(o),s=Qo(t.start(r),n);if(i&&s)return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:o}}},gf=(t,e)=>{let{state:n,view:r,extensionManager:o}=t,{schema:i,selection:s}=n,{empty:l,$anchor:a}=s,c=!!o.extensions.find(y=>y.name==="gapCursor");if(!l||a.parent.type!==i.nodes.detailsSummary||!c||e==="right"&&a.parentOffset!==a.parent.nodeSize-2)return!1;let d=qe(y=>y.type===i.nodes.details)(s);if(!d)return!1;let u=on(d.node,y=>y.type===i.nodes.detailsContent);if(!u.length||Qo(d.start+u[0].pos+1,t))return!1;let h=n.doc.resolve(d.pos+d.node.nodeSize),p=ce.findFrom(h,1,!1);if(!p)return!1;let{tr:m}=n,g=new ce(p);return m.setSelection(g),m.scrollIntoView(),r.dispatch(m),!0},yf=$.create({name:"details",content:"detailsSummary detailsContent",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,addOptions(){return{persist:!1,openClassName:"is-open",HTMLAttributes:{}}},addAttributes(){return this.options.persist?{open:{default:!1,parseHTML:t=>t.hasAttribute("open"),renderHTML:({open:t})=>t?{open:""}:{}}}:[]},parseHTML(){return[{tag:"details"}]},renderHTML({HTMLAttributes:t}){return["details",O(this.options.HTMLAttributes,t),0]},...Ht({nodeName:"details",content:"block"}),addNodeView(){return({editor:t,getPos:e,node:n,HTMLAttributes:r})=>{let o=document.createElement("div"),i=O(this.options.HTMLAttributes,r,{"data-type":this.name});Object.entries(i).forEach(([c,d])=>o.setAttribute(c,d));let s=document.createElement("button");s.type="button",o.append(s);let l=document.createElement("div");o.a Line truncated
`);return!i||!s?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;let l=o.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:c})=>(c.setSelection(z.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[_n({find:nw,type:this.type,getAttributes:t=>({language:t[1]})}),_n({find:rw,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new B({key:new _("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;let{tr:s,schema:l}=t.state,a=l.text(n.replace(/\r\n?/g,`
`));return s.replaceSelectionWith(this.type.create({language:i},a)),s.selection.$from.parent.type!==this.type&&s.setSelection(I.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),Nf=ow;var Of=V.create({name:"customBlock",group:"block",atom:!0,defining:!0,draggable:!0,selectable:!0,isolating:!0,allowGapCursor:!0,inline:!1,addNodeView(){return({editor:t,node:e,getPos:n,HTMLAttributes:r,decorations:o,extension:i})=>{let s=document.createElement("div");s.setAttribute("data-config",JSON.stringify(e.attrs.config)),s.setAttribute("data-id",e.attrs.id),s.setAttribute("data-type","customBlock");let l=document.createElement("div");if(l.className="fi-fo-rich-editor-custom-block-header fi-not-prose",s.appendChild(l),t.isEditable&&typeof e.attrs.config=="object"&&e.attrs.config!==null&&Object.keys(e.attrs.config).length>0){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-edit-btn-ctn",l.appendChild(c);let d=document.createElement("button");d.className="fi-icon-btn",d.type="button",d.innerHTML=i.options.editCustomBlockButtonIconHtml,d.addEventListener("click",()=>i.options.editCustomBlockUsing(e.attrs.id,e.attrs.config)),c.appendChild(d)}let a=document.createElement("p");if(a.className="fi-fo-rich-editor-custom-block-heading",a.textContent=e.attrs.label,l.appendChild(a),t.isEditable){let c=document.createElement("div");c.className="fi-fo-rich-editor-custom-block-delete-btn-ctn",l.appendChild(c);let d=document.createElement("button");d.className="fi-icon-btn",d.type="button",d.innerHTML=i.options.deleteCustomBlockButtonIconHtml,d.addEventListener("click",()=>t.chain().setNodeSelection(n()).deleteSelection().run()),c.appendChild(d)}if(e.attrs.preview){let c=document.createElement("div"),d=["fi-fo-rich-editor-custom-block-preview"];e.attrs.shouldApplyProseStylingToPreview||d.push("fi-not-prose"),c.className=d.join(" "),c.innerHTML=new TextDecoder().decode(Uint8Array.from(atob(e.attrs.preview),u=>u.charCodeAt(0))),s.appendChild(c)}return{dom:s}}},addOptions(){return{deleteCustomBlockButtonIconHtml:null,editCustomBlockButtonIconHtml:null,editCustomBlockUsing:()=>{},insertCustomBlockUsing:()=>{}}},addAttributes(){return{config:{default:null,parseHTML:t=>JSON.parse(t.getAttribute("data-config")),renderHTML:t=>t.config?{"data-config":JSON.stringify(t.config)}:{}},id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),rendered:!1},preview:{default:null,parseHTML:t=>t.getAttribute("data-preview"),rendered:!1},shouldApplyProseStylingToPreview:{default:!1,rendered:!1}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["div",N({"data-type":"customBlock"},t)]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1,{selection:r}=e,{empty:o,anchor:i}=r;if(!o)return!1;let s=new ne,l=0;return e.doc.nodesBetween(i-1,i,(a,c)=>{if(a.type.name===this.name)return n=!0,s=a,l=c,!1}),n})}},addProseMirrorPlugins(){let{insertCustomBlockUsing:t}=this.options;return[new B({props:{handleDrop(e,n){if(!n||(n.preventDefault(),!n.dataTransfer.getData("customBlock")))return!1;let r=n.dataTransfer.getData("customBlock");return t(r,e.posAtCoords({left:n.clientX,top:n.clientY}).pos),!1}}})]}});var ri=(t,e)=>e.view.domAtPos(t).node.offsetParent!==null,iw=(t,e,n)=>{for(let r=t.depth;r>0;r-=1){let o=t.node(r),i=e(o),s=ri(t.start(r),n);if(i&&s)return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:o}}},Rf=(t,e)=>{let{state:n,view:r,extensionManager:o}=t,{schema:i,selection:s}=n,{empty:l,$anchor:a}=s,c=!!o.extensions.find(y=>y.name==="gapCursor");if(!l||a.parent.type!==i.nodes.detailsSummary||!c||e==="right"&&a.parentOffset!==a.parent.nodeSize-2)return!1;let d=Je(y=>y.type===i.nodes.details)(s);if(!d)return!1;let u=sn(d.node,y=>y.type===i.nodes.detailsContent);if(!u.length||ri(d.start+u[0].pos+1,t))return!1;let h=n.doc.resolve(d.pos+d.node.nodeSize),p=de.findFrom(h,1,!1);if(!p)return!1;let{tr:m}=n,g=new de(p);return m.setSelection(g),m.scrollIntoView(),r.dispatch(m),!0},Df=V.create({name:"details",content:"detailsSummary detailsContent",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,addOptions(){return{persist:!1,openClassName:"is-open",HTMLAttributes:{},renderToggleButton:({element:t,isOpen:e})=>{t.setAttribute("aria-label",e?"Collapse details content":"Expand details content")}}},addAttributes(){return this.options.persist?{open:{default:!1,parseHTML:t=>t.hasAttribute("open"),renderHTML:({open:t})=>t?{open:""}:{}}}:[]},parseHTML(){return[{tag:"details"}]},renderHTML({HTMLAttributes:t}){return["details",N(this.options.HTMLAttributes,t),0]},...Ht({nodeName:"details",content:"block"}),addNodeView(){return({editor:t,getPos:e,node:n,HTMLAttributes:r})=>{let o=document.createElement("div"),i=N(this.options.HTMLAttributes,r,{"data-type":this.name});Object.entries(i).forEach(([d,u])= Line truncated
`):""}),xf=E0;var kf=$.create({name:"grid",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"gridColumn+",addOptions(){return{HTMLAttributes:{class:"grid-layout"}}},addAttributes(){return{"data-cols":{default:2,parseHTML:t=>t.getAttribute("data-cols")},"data-from-breakpoint":{default:"md",parseHTML:t=>t.getAttribute("data-from-breakpoint")},style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>({style:`grid-template-columns: repeat(${t["data-cols"]}, 1fr)`})}}},parseHTML(){return[{tag:"div",getAttrs:t=>t.classList.contains("grid-layout")&&null}]},renderHTML({HTMLAttributes:t}){return["div",O(this.options.HTMLAttributes,t),0]},addCommands(){return{insertGrid:({columns:t=[1,1],fromBreakpoint:e,coordinates:n=null}={})=>({tr:r,dispatch:o,editor:i})=>{let s=i.schema.nodes.gridColumn,l=Array.isArray(t)&&t.length?t:[1,1],a=[];for(let u=0;u<l.length;u+=1)a.push(s.createAndFill({"data-col-span":Number(l[u]??1)||1}));let c=l.map(u=>Number(u)||1).reduce((u,f)=>u+f,0),d=i.schema.nodes.grid.createChecked({"data-cols":c,"data-from-breakpoint":e},a);if(o){let u=r.selection.anchor+1;[null,void 0].includes(n?.from)?r.replaceSelectionWith(d).scrollIntoView().setSelection(D.near(r.doc.resolve(u))):r.replaceRangeWith(n.from,n.to,d).scrollIntoView().setSelection(D.near(r.doc.resolve(n.from)))}return!0}}}});var Sf=$.create({name:"gridColumn",content:"block+",isolating:!0,addOptions(){return{HTMLAttributes:{class:"grid-layout-col"}}},addAttributes(){return{"data-col-span":{default:1,parseHTML:t=>t.getAttribute("data-col-span"),renderHTML:t=>({"data-col-span":t["data-col-span"]??1})},style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>({style:`grid-column: span ${t["data-col-span"]??1};`})}}},parseHTML(){return[{tag:"div",getAttrs:t=>t.classList.contains("grid-layout-col")&&null}]},renderHTML({HTMLAttributes:t}){return["div",O(this.options.HTMLAttributes,t),0]}});var N0=$.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",O(this.options.HTMLAttributes,t)]},renderText(){return`
`):""}),Lf=sw;var Bf=V.create({name:"grid",group:"block",defining:!0,isolating:!0,allowGapCursor:!1,content:"gridColumn+",addOptions(){return{HTMLAttributes:{class:"grid-layout"}}},addAttributes(){return{"data-cols":{default:2,parseHTML:t=>t.getAttribute("data-cols")},"data-from-breakpoint":{default:"md",parseHTML:t=>t.getAttribute("data-from-breakpoint")},style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>({style:`grid-template-columns: repeat(${t["data-cols"]}, 1fr)`})}}},parseHTML(){return[{tag:"div",getAttrs:t=>t.classList.contains("grid-layout")&&null}]},renderHTML({HTMLAttributes:t}){return["div",N(this.options.HTMLAttributes,t),0]},addCommands(){return{insertGrid:({columns:t=[1,1],fromBreakpoint:e,coordinates:n=null}={})=>({tr:r,dispatch:o,editor:i})=>{let s=i.schema.nodes.gridColumn,l=Array.isArray(t)&&t.length?t:[1,1],a=[];for(let u=0;u<l.length;u+=1)a.push(s.createAndFill({"data-col-span":Number(l[u]??1)||1}));let c=l.map(u=>Number(u)||1).reduce((u,f)=>u+f,0),d=i.schema.nodes.grid.createChecked({"data-cols":c,"data-from-breakpoint":e},a);if(o){let u=r.selection.anchor+1;[null,void 0].includes(n?.from)?r.replaceSelectionWith(d).scrollIntoView().setSelection(I.near(r.doc.resolve(u))):r.replaceRangeWith(n.from,n.to,d).scrollIntoView().setSelection(I.near(r.doc.resolve(n.from)))}return!0}}}});var zf=V.create({name:"gridColumn",content:"block+",isolating:!0,addOptions(){return{HTMLAttributes:{class:"grid-layout-col"}}},addAttributes(){return{"data-col-span":{default:1,parseHTML:t=>t.getAttribute("data-col-span"),renderHTML:t=>({"data-col-span":t["data-col-span"]??1})},style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>({style:`grid-column: span ${t["data-col-span"]??1};`})}}},parseHTML(){return[{tag:"div",getAttrs:t=>t.classList.contains("grid-layout-col")&&null}]},renderHTML({HTMLAttributes:t}){return["div",N(this.options.HTMLAttributes,t),0]}});var lw=V.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",N(this.options.HTMLAttributes,t)]},renderText(){return`
`},renderMarkdown:()=>`
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&a&&s){let u=a.filter(f=>l.includes(f.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Cf=N0;var O0=$.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,O(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;let r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,o="#".repeat(r);return t.content?`${o} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>zn({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),vf=O0;var R0=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,D0=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,I0=ee.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",O(this.options.HTMLAttributes,t),0]},renderMarkdown:(t,e)=>`==${e.renderChildren(t)}==`,parseMarkdown:(t,e)=>e.applyMark("highlight",e.parseInline(t.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:t=>t.indexOf("=="),tokenize(t,e,n){let o=/^(==)([^=]+)(==)/.exec(t);if(o){let i=o[2].trim(),s=n.inlineTokens(i);return{type:"highlight",raw:o[0],text:i,tokens:s}}}},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[De({find:R0,type:this.type})]},addPasteRules(){return[Me({find:D0,type:this.type})]}}),Mf=I0;var P0=$.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",O(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!zl(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:r}=n,o=t();return Er(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){let{$to:a}=s.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?s.setSelection(D.create(s.doc,a.pos+1)):a.nodeAfter.isBlock?s.setSelection(I.create(s.doc,a.pos)):s.setSelection(D.create(s.doc,a.pos));else{let d=i.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,u=d?.create();u&&(s.insert(c,u),s.setSelection(D.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Nr({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Tf=P0;var L0=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,B0=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,z0=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,H0=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,$0=ee.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",O(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({comma Line truncated
`,J0="\uFE0F",G0="\u200D",Zl="\uFFFC",Zo=null,ei=null;function X0(t=[]){let e={};Ne.groups=e;let n=new Ne;Zo==null&&(Zo=If(_0)),ei==null&&(ei=If(W0)),T(n,"'",bi),T(n,"{",Pr),T(n,"}",Lr),T(n,"[",ri),T(n,"]",oi),T(n,"(",ii),T(n,")",si),T(n,"<",li),T(n,">",ai),T(n,"\uFF08",ci),T(n,"\uFF09",di),T(n,"\u300C",ui),T(n,"\u300D",fi),T(n,"\u300E",hi),T(n,"\u300F",pi),T(n,"\uFF1C",mi),T(n,"\uFF1E",gi),T(n,"&",yi),T(n,"*",wi),T(n,"@",Ft),T(n,"`",ki),T(n,"^",Si),T(n,":",Vt),T(n,",",ua),T(n,"$",Ci),T(n,".",lt),T(n,"=",vi),T(n,"!",fa),T(n,"-",Ve),T(n,"%",Br),T(n,"|",Mi),T(n,"+",Ti),T(n,"#",Ai),T(n,"?",zr),T(n,'"',ha),T(n,"/",at),T(n,";",pa),T(n,"~",Hr),T(n,"_",Ei),T(n,"\\",xi),T(n,"\u30FB",Ff);let r=ie(n,kt,ca,{[ta]:!0});ie(r,kt,r);let o=ie(r,xt,Hf,{[Ir]:!0}),i=ie(r,Rr,$f,{[Dr]:!0}),s=ie(n,xt,St,{[na]:!0});ie(s,kt,o),ie(s,xt,s),ie(o,kt,o),ie(o,xt,o);let l=ie(n,Rr,ia,{[ra]:!0});ie(l,xt),ie(l,kt,i),ie(l,Rr,l),ie(i,kt,i),ie(i,xt),ie(i,Rr,i);let a=T(n,Ql,da,{[Gl]:!0}),c=T(n,Df,aa,{[Gl]:!0}),d=ie(n,Yl,aa,{[Gl]:!0});T(n,Zl,d),T(c,Ql,a),T(c,Zl,d),ie(c,Yl,d),T(d,Df),T(d,Ql),ie(d,Yl,d),T(d,Zl,d);let u=ie(n,Xl,Vf,{[zf]:!0});T(u,"#"),ie(u,Xl,u),T(u,J0,u);let f=T(u,G0);T(f,"#"),ie(f,Xl,u);let h=[[xt,s],[kt,o]],p=[[xt,null],[Rr,l],[kt,i]];for(let m=0;m<Zo.length;m++)$t(n,Zo[m],sa,St,h);for(let m=0;m<ei.length;m++)$t(n,ei[m],la,ia,p);an(sa,{tld:!0,ascii:!0},e),an(la,{utld:!0,alpha:!0},e),$t(n,"file",ni,St,h),$t(n,"mailto",ni,St,h),$t(n,"http",Fn,St,h),$t(n,"https",Fn,St,h),$t(n,"ftp",Fn,St,h),$t(n,"ftps",Fn,St,h),an(ni,{scheme:!0,ascii:!0},e),an(Fn,{slashscheme:!0,ascii:!0},e),t=t.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<t.length;m++){let g=t[m][0],b=t[m][1]?{[j0]:!0}:{[U0]:!0};g.indexOf("-")>=0?b[oa]=!0:xt.test(g)?kt.test(g)?b[Ir]=!0:b[na]=!0:b[ta]=!0,Rf(n,g,g,b)}return Rf(n,"localhost",$r,{ascii:!0}),n.jd=new Ne(Ni),{start:n,tokens:Object.assign({groups:e},_f)}}function Wf(t,e){let n=Y0(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s<r;){let l=t,a=null,c=0,d=null,u=-1,f=-1;for(;s<r&&(a=l.go(n[s]));)l=a,l.accepts()?(u=0,f=0,d=l):u>=0&&(u+=n[s].length,f++),c+=n[s].length,i+=n[s].length,s++;i-=u,s-=f,c-=u,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}function Y0(t){let e=[],n=t.length,r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function $t(t,e,n,r,o){let i,s=e.length;for(let l=0;l<s-1;l++){let a=e[l];t.j[a]?i=t.j[a]:(i=new Ne(r),i.jr=o.slice(),t.j[a]=i),t=i}return i=new Ne(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function If(t){let e=[],n=[],r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}var Fr={defaultProtocol:"http",events:null,format:Pf,formatHref:Pf,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ma(t,e=null){let n=Object.assign({},Fr);t&&(n=Object.assign(n,t instanceof ma?t.o:t));let r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}ma.prototype={o:Fr,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=e!=null,o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:Fr[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){let e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Pf(t){return t}function jf(t,e){this.t="token",this.v=t,this.tk=e}jf.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){let e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Fr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),a=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),u=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),d&&Object.assign(s,d),{tagName:o,attributes:s,content:i,eventListeners:u}}};function Oi(t,e){class n extends jf{constructor(o,i){super(o,i),thLine truncated
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&a&&s){let u=a.filter(f=>l.includes(f.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Hf=lw;var aw=V.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,N(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;let r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,o="#".repeat(r);return t.content?`${o} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>_n({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),$f=aw;var cw=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,dw=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,uw=te.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||Ul(t,"background-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",N(this.options.HTMLAttributes,t),0]},renderMarkdown:(t,e)=>`==${e.renderChildren(t)}==`,parseMarkdown:(t,e)=>e.applyMark("highlight",e.parseInline(t.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:t=>t.indexOf("=="),tokenize(t,e,n){let o=/^(==)([^=]+)(==)/.exec(t);if(o){let i=o[2].trim(),s=n.inlineTokens(i);return{type:"highlight",raw:o[0],text:i,tokens:s}}}},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[De({find:cw,type:this.type})]},addPasteRules(){return[Te({find:dw,type:this.type})]}}),Ff=uw;var fw=V.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",N(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!Wl(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:r}=n,o=t();return Ir(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){let{$to:a}=s.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?s.setSelection(I.create(s.doc,a.pos+1)):a.nodeAfter.isBlock?s.setSelection(L.create(s.doc,a.pos)):s.setSelection(I.create(s.doc,a.pos));else{let d=i.schema.nodes[this.options.nextNodeType]||a.parent.type.contentMatch.defaultType,u=d?.create();u&&(s.insert(c,u),s.setSelection(I.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Pr({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),_f=fw;var hw=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,pw=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,mw=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,gw=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,yw=te.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",N(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.nam Line truncated
`,Tw="\uFE0F",Aw="\u200D",sa="\uFFFC",oi=null,ii=null;function Ew(t=[]){let e={};Ne.groups=e;let n=new Ne;oi==null&&(oi=Jf(xw)),ii==null&&(ii=Jf(kw)),T(n,"'",Ci),T(n,"{",Fr),T(n,"}",_r),T(n,"[",ai),T(n,"]",ci),T(n,"(",di),T(n,")",ui),T(n,"<",fi),T(n,">",hi),T(n,"\uFF08",pi),T(n,"\uFF09",mi),T(n,"\u300C",gi),T(n,"\u300D",yi),T(n,"\u300E",bi),T(n,"\u300F",wi),T(n,"\uFF1C",xi),T(n,"\uFF1E",ki),T(n,"&",Si),T(n,"*",vi),T(n,"@",Ft),T(n,"`",Ti),T(n,"^",Ai),T(n,":",un),T(n,",",ba),T(n,"$",Ei),T(n,".",st),T(n,"=",Ni),T(n,"!",wa),T(n,"-",_e),T(n,"%",Vr),T(n,"|",Oi),T(n,"+",Ri),T(n,"#",Di),T(n,"?",Wr),T(n,'"',xa),T(n,"/",lt),T(n,";",ka),T(n,"~",jr),T(n,"_",Ii),T(n,"\\",Mi),T(n,"\u30FB",eh);let r=ie(n,St,ga,{[aa]:!0});ie(r,St,r);let o=ie(r,kt,Qf,{[$r]:!0}),i=ie(r,zr,Zf,{[Hr]:!0}),s=ie(n,kt,Ct,{[ca]:!0});ie(s,St,o),ie(s,kt,s),ie(o,St,o),ie(o,kt,o);let l=ie(n,zr,fa,{[da]:!0});ie(l,kt),ie(l,St,i),ie(l,zr,l),ie(i,St,i),ie(i,kt),ie(i,zr,i);let a=T(n,ia,ya,{[na]:!0}),c=T(n,qf,ma,{[na]:!0}),d=ie(n,oa,ma,{[na]:!0});T(n,sa,d),T(c,ia,a),T(c,sa,d),ie(c,oa,d),T(d,qf),T(d,ia),ie(d,oa,d),T(d,sa,d);let u=ie(n,ra,th,{[Yf]:!0});T(u,"#"),ie(u,ra,u),T(u,Tw,u);let f=T(u,Aw);T(f,"#"),ie(f,ra,u);let h=[[kt,s],[St,o]],p=[[kt,null],[zr,l],[St,i]];for(let m=0;m<oi.length;m++)$t(n,oi[m],ha,Ct,h);for(let m=0;m<ii.length;m++)$t(n,ii[m],pa,fa,p);dn(ha,{tld:!0,ascii:!0},e),dn(pa,{utld:!0,alpha:!0},e),$t(n,"file",li,Ct,h),$t(n,"mailto",li,Ct,h),$t(n,"http",jn,Ct,h),$t(n,"https",jn,Ct,h),$t(n,"ftp",jn,Ct,h),$t(n,"ftps",jn,Ct,h),dn(li,{scheme:!0,ascii:!0},e),dn(jn,{slashscheme:!0,ascii:!0},e),t=t.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<t.length;m++){let g=t[m][0],w=t[m][1]?{[Sw]:!0}:{[Cw]:!0};g.indexOf("-")>=0?w[ua]=!0:kt.test(g)?St.test(g)?w[$r]=!0:w[ca]=!0:w[aa]=!0,Kf(n,g,g,w)}return Kf(n,"localhost",Ur,{ascii:!0}),n.jd=new Ne(Pi),{start:n,tokens:Object.assign({groups:e},nh)}}function rh(t,e){let n=Nw(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[],i=0,s=0;for(;s<r;){let l=t,a=null,c=0,d=null,u=-1,f=-1;for(;s<r&&(a=l.go(n[s]));)l=a,l.accepts()?(u=0,f=0,d=l):u>=0&&(u+=n[s].length,f++),c+=n[s].length,i+=n[s].length,s++;i-=u,s-=f,c-=u,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}function Nw(t){let e=[],n=t.length,r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function $t(t,e,n,r,o){let i,s=e.length;for(let l=0;l<s-1;l++){let a=e[l];t.j[a]?i=t.j[a]:(i=new Ne(r),i.jr=o.slice(),t.j[a]=i),t=i}return i=new Ne(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function Jf(t){let e=[],n=[],r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}var Kr={defaultProtocol:"http",events:null,format:Gf,formatHref:Gf,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Sa(t,e=null){let n=Object.assign({},Kr);t&&(n=Object.assign(n,t instanceof Sa?t.o:t));let r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Sa.prototype={o:Kr,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=e!=null,o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:Kr[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){let e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Gf(t){return t}function oh(t,e){this.t="token",this.v=t,this.tk=e}oh.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){let e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Kr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),a=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),u=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),d&&Object.assign(s,d),{tagName:o,attributes:s,content:i,eventListeners:u}}};function Li(t,e){class n extends oh{constructor(o,i){super(o,i),thLine truncated
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);Z.customSchemes.push([t,e])}function rw(){Z.scanner=X0(Z.customSchemes);for(let t=0;t<Z.tokenQueue.length;t++)Z.tokenQueue[t][1]({scanner:Z.scanner});Z.parser=Z0(Z.scanner.tokens);for(let t=0;t<Z.pluginQueue.length;t++)Z.pluginQueue[t][1]({scanner:Z.scanner,parser:Z.parser});return Z.initialized=!0,Z}function Ri(t){return Z.initialized||rw(),ew(Z.parser.start,t,Wf(Z.scanner.start,t))}Ri.scan=Wf;function Di(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new ma(n),o=Ri(t),i=[];for(let s=0;s<o.length;s++){let l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var ya="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",ow=new RegExp(ya),iw=new RegExp(`${ya}$`),sw=new RegExp(ya,"g");function lw(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function aw(t){return new P({key:new H("autolink"),appendTransaction:(e,n,r)=>{let o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=Ro(n.doc,[...e]);if($o(l).forEach(({newRange:c})=>{let d=Ml(r.doc,c,h=>h.isTextblock),u,f;if(d.length>1)u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(d.length){let h=r.doc.textBetween(c.from,c.to," "," ");if(!iw.test(h))return;u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")}if(u&&f){let h=f.split(ow).filter(Boolean);if(h.length<=0)return!1;let p=h[h.length-1],m=u.pos+f.lastIndexOf(p);if(!p)return!1;let g=Ri(p).map(y=>y.toObject(t.defaultProtocol));if(!lw(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>t.validate(y.value)).filter(y=>t.shouldAutoLink(y.value)).forEach(y=>{Ar(y.from,y.to,r.doc).some(b=>b.mark.type===t.type)||s.addMark(y.from,y.to,t.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function cw(t){return new P({key:new H("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=!1;if(t.enableClickSelection&&(s=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){let l=null;if(r.target instanceof HTMLAnchorElement)l=r.target;else{let u=r.target,f=[];for(;u.nodeName!=="DIV";)f.push(u),u=u.parentNode;l=f.find(h=>h.nodeName==="A")}if(!l)return s;let a=Ho(e.state,t.type.name),c=(o=l?.href)!=null?o:a.href,d=(i=l?.target)!=null?i:a.target;l&&c&&(window.open(c,d),s=!0)}return s}}})}function dw(t){return new P({key:new H("handlePasteLink"),props:{handlePaste:(e,n,r)=>{let{shouldAutoLink:o}=t,{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(d=>{a+=d.textContent});let c=Di(a,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===a);return!a||!c||o!==void 0&&!o(c.href)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function cn(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(sw,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var uw=ee.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){ga(t);return}ga(t.scheme,t.optionalSlashes)})},onDestroy(){Uf()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!cn(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!cn(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!cn(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",O(this.options.HTMLAttributes,t),0]:["a",O(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n;let r=((n=t.attrs)==null?void 0:n.href)||"";return`[${e.renderChildren(t)}](${rLine truncated
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(pw,this.editor.getAttributes(qf)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Je({find:Jf,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Je({find:Jf,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(qf),editor:this.editor})),[t]}}),ka=$.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",O(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(o=>o.type==="paragraph"))n=e.parseChildren(t.tokens);else{let o=t.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(o.tokens)}],t.tokens.length>1){let s=t.tokens.slice(1),l=e.parseChildren(s);n.push(...l)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>Hn(t,e,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),mw={};hw(mw,{findListItemPos:()=>Vr,getNextListDepth:()=>Sa,handleBackspace:()=>ba,handleDelete:()=>wa,hasListBefore:()=>Qf,hasListItemAfter:()=>gw,hasListItemBefore:()=>Zf,listItemHasSubList:()=>eh,nextListIsDeeper:()=>th,nextListIsHigher:()=>nh});var Vr=(t,e)=>{let{$from:n}=e.selection,r=re(t,e.schema),o=null,i=n.depth,s=n.pos,l=null;for(;i>0&&l===null;)o=n.node(i),o.type===r?l=i:(i-=1,s-=1);return l===null?null:{$pos:e.doc.resolve(s),depth:l}},Sa=(t,e)=>{let n=Vr(t,e);if(!n)return!1;let[,r]=Rl(e,t,n.$pos.pos+4);return r},Qf=(t,e,n)=>{let{$anchor:r}=t.selection,o=Math.max(0,r.pos-2),i=t.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},Zf=(t,e)=>{var n;let{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==t)},eh=(t,e,n)=>{if(!n)return!1;let r=re(t,e.schema),o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},ba=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Ke(t.state,e)&&Qf(t.state,e,n)){let{$anchor:l}=t.state.selection,a=t.state.doc.resolve(l.before()-1),c=[];a.node().descendants((f,h)=>{f.type.name===e&&c.push({node:f,pos:h})});let d=c.at(-1);if(!d)return!1;let u=t.state.doc.resolve(a.start()+d.pos+1);return t.chain().cut({from:l.start()-1,to:l.end()+1},u.end()).joinForward().run()}if(!Ke(t.state,e)||!Il(t.state))return!1;let r=Vr(e,t.state);if(!r)return!1;let i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=eh(e,t.state,i);return Zf(e,t.state)&&!s?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},th=(t,e)=>{let n=Sa(t,e),r=Vr(t,e);return!r||!n?!1:n>r.depth},nh=(t,e)=>{let n=Sa(t,e),r=Vr(t,e);return!r||!n?!1:n<r.depth},wa=(t,e)=>{if(!Ke(t.state,e)||!Dl(t.state,e))return!1;let{selection:n}=t.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:th(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():nh(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},gw=(t,e)=>{var n;let{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==t)},yw=K.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&wa(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&wa(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&ba(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&ba(t,n,r)&&(e=!0)}),e}}}}),Gf=/^(\s*)(\d+)\.\s+(.*)$/,bw=/^\s/;function ww(t){let e=[],n=0,r=0;for(;n<t.length;){let o=t[n],i=o.match(Gf);if(!i Line truncated
`,u+=1;else if(h.match(bw))f.push(h),d+=`
${h.slice(c+2)}`,u+=1;else break}e.push({indent:c,number:parseInt(l,10),content:d.trim(),raw:f.join(`
`)}),r=u,n=u}return[e,r]}function rh(t,e,n){var r;let o=[],i=0;for(;i<t.length;){let s=t[i];if(s.indent===e){let l=s.content.split(`
`),a=((r=l[0])==null?void 0:r.trim())||"",c=[];a&&c.push({type:"paragraph",raw:a,tokens:n.inlineTokens(a)});let d=l.slice(1).join(`
`).trim();if(d){let h=n.blockTokens(d);c.push(...h)}let u=i+1,f=[];for(;u<t.length&&t[u].indent>e;)f.push(t[u]),u+=1;if(f.length>0){let h=Math.min(...f.map(m=>m.indent)),p=rh(f,h,n);c.push({type:"list",ordered:!0,start:f[0].number,items:p,raw:f.map(m=>m.raw).join(`
`)})}o.push({type:"list_item",raw:s.raw,tokens:c}),i=u}else i+=1}return o}function xw(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...e.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=e.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=e.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var kw="listItem",Xf="textStyle",Yf=/^(\d+)\.\s$/,Ca=$.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){let{start:e,...n}=t;return e===1?["ol",O(this.options.HTMLAttributes,n),0]:["ol",O(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];let n=t.start||1,r=t.items?xw(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
3. "-" cannot repeat`);ee.customSchemes.push([t,e])}function Bw(){ee.scanner=Ew(ee.customSchemes);for(let t=0;t<ee.tokenQueue.length;t++)ee.tokenQueue[t][1]({scanner:ee.scanner});ee.parser=Dw(ee.scanner.tokens);for(let t=0;t<ee.pluginQueue.length;t++)ee.pluginQueue[t][1]({scanner:ee.scanner,parser:ee.parser});return ee.initialized=!0,ee}function Bi(t){return ee.initialized||Bw(),Iw(ee.parser.start,t,rh(ee.scanner.start,t))}Bi.scan=rh;function zi(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new Sa(n),o=Bi(t),i=[];for(let s=0;s<o.length;s++){let l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var va="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",zw=new RegExp(va),Hw=new RegExp(`${va}$`),$w=new RegExp(va,"g");function Fw(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function _w(t){return new B({key:new _("autolink"),appendTransaction:(e,n,r)=>{let o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;let{tr:s}=r,l=zo(n.doc,[...e]);if(jo(l).forEach(({newRange:c})=>{let d=Rl(r.doc,c,h=>h.isTextblock),u,f;if(d.length>1)u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(d.length){let h=r.doc.textBetween(c.from,c.to," "," ");if(!Hw.test(h))return;u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")}if(u&&f){let h=f.split(zw).filter(Boolean);if(h.length<=0)return!1;let p=h[h.length-1],m=u.pos+f.lastIndexOf(p);if(!p)return!1;let g=Bi(p).map(y=>y.toObject(t.defaultProtocol));if(!Fw(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>t.validate(y.value)).filter(y=>t.shouldAutoLink(y.value)).forEach(y=>{Dr(y.from,y.to,r.doc).some(w=>w.mark.type===t.type)||s.addMark(y.from,y.to,t.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function Vw(t){return new B({key:new _("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let a=r.target;if(!a)return!1;let c=t.editor.view.dom;s=a.closest("a"),s&&!c.contains(s)&&(s=null)}if(!s)return!1;let l=!1;if(t.enableClickSelection&&(l=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){let a=Wo(e.state,t.type.name),c=(o=s.href)!=null?o:a.href,d=(i=s.target)!=null?i:a.target;c&&(window.open(c,d),l=!0)}return l}}})}function Ww(t){return new B({key:new _("handlePasteLink"),props:{handlePaste:(e,n,r)=>{let{shouldAutoLink:o}=t,{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(d=>{a+=d.textContent});let c=zi(a,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===a);return!a||!c||o!==void 0&&!o(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function fn(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace($w,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var jw=te.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Ca(t);return}Ca(t.scheme,t.optionalSlashes)})},onDestroy(){ih()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!fn(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;let o=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||!/\./.test(o))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!fn(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!fn(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",N(this.options.HTMLAttributes,t),0]:["a",N(this.options.HTMLAttri Line truncated
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(qw,this.editor.getAttributes(lh)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Ge({find:ah,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ge({find:ah,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(lh),editor:this.editor})),[t]}});function Jw(t){var e,n;let r=(e=t.tokens)==null?void 0:e[0];return!!(t.text&&((n=t.tokens)==null?void 0:n.length)===1&&r?.type==="list"&&r.ordered&&r.raw===t.text)}function Gw(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var Ea=V.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",N(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];let r=(n=e.parseBlockChildren)!=null?n:e.parseChildren,o=[];if(t.tokens&&t.tokens.length>0){if(Jw(t))return{type:"listItem",content:[{type:"paragraph",content:Gw(t.text||"",e)}]};if(t.tokens.some(s=>s.type==="paragraph"))o=r(t.tokens);else{let s=t.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(o=[{type:"paragraph",content:e.parseInline(s.tokens)}],t.tokens.length>1){let a=t.tokens.slice(1),c=r(a);o.push(...c)}}else o=r(t.tokens)}}return o.length===0&&(o=[{type:"paragraph",content:[]}]),{type:"listItem",content:o}},renderMarkdown:(t,e,n)=>Vn(t,e,r=>{var o,i;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((i=(o=r.meta)==null?void 0:o.parentAttrs)==null?void 0:i.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Xw={};Kw(Xw,{findListItemPos:()=>qr,getNextListDepth:()=>Na,handleBackspace:()=>Ma,handleDelete:()=>Ta,hasListBefore:()=>fh,hasListItemAfter:()=>Yw,hasListItemBefore:()=>hh,listItemHasSubList:()=>ph,nextListIsDeeper:()=>mh,nextListIsHigher:()=>gh});var qr=(t,e)=>{let{$from:n}=e.selection,r=oe(t,e.schema),o=null,i=n.depth,s=n.pos,l=null;for(;i>0&&l===null;)o=n.node(i),o.type===r?l=i:(i-=1,s-=1);return l===null?null:{$pos:e.doc.resolve(s),depth:l}},Na=(t,e)=>{let n=qr(t,e);if(!n)return!1;let[,r]=zl(e,t,n.$pos.pos+4);return r},fh=(t,e,n)=>{let{$anchor:r}=t.selection,o=Math.max(0,r.pos-2),i=t.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},hh=(t,e)=>{var n;let{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==t)},ph=(t,e,n)=>{if(!n)return!1;let r=oe(t,e.schema),o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},Ma=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!qe(t.state,e)&&fh(t.state,e,n)){let{$anchor:l}=t.state.selection,a=t.state.doc.resolve(l.before()-1),c=[];a.node().descendants((f,h)=>{f.type.name===e&&c.push({node:f,pos:h})});let d=c.at(-1);if(!d)return!1;let u=t.state.doc.resolve(a.start()+d.pos+1);return t.chain().cut({from:l.start()-1,to:l.end()+1},u.end()).joinForward().run()}if(!qe(t.state,e)||!$l(t.state))return!1;let r=qr(e,t.state);if(!r)return!1;let i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=ph(e,t.state,i);return hh(e,t.state)&&!s?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},mh=(t,e)=>{let n=Na(t,e),r=qr(t,e);return!r||!n?!1:n>r.depth},gh=(t,e)=>{let n=Na(t,e),r=qr(t,e);return!r||!n?!1:n<r.depth},Ta=(t,e)=>{if(!qe(t.state,e)||!Hl(t.state,e))return!1;let{selection:n}=t.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:mh(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():gh(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},Yw=(t,e)=>{var n;let{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==t)},Qw=U.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Ta(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!== Line truncated
`).trim(),contentLines:d,raw:f.join(`
`)}),r=u,n=u}return[e,r]}function yh(t,e,n){let r=[],o=0;for(;o<t.length;){let i=t[o];if(i.indent===e){let{paragraphLines:s,blockLines:l}=tx(i.contentLines),a=s.join(`
`).trim(),c=[];a&&c.push({type:"paragraph",raw:a,tokens:n.inlineTokens(a)});let d=l.join(`
`).trim();if(d){let h=n.blockTokens(d);c.push(...h)}let u=o+1,f=[];for(;u<t.length&&t[u].indent>e;)f.push(t[u]),u+=1;if(f.length>0){let h=Math.min(...f.map(m=>m.indent)),p=yh(f,h,n);c.push({type:"list",ordered:!0,start:f[0].number,items:p,raw:f.map(m=>m.raw).join(`
`)})}r.push({type:"list_item",raw:i.raw,tokens:c}),o=u}else o+=1}return r}function rx(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...e.parseChildren([o]));else if(o.type==="text"&&o.tokens){let i=e.parseChildren([o]);r.push({type:"paragraph",content:i})}else{let i=e.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var ox="listItem",dh="textStyle",uh=/^(\d+)\.\s$/,Oa=V.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){let{start:e,...n}=t;return e===1?["ol",N(this.options.HTMLAttributes,n),0]:["ol",N(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];let n=t.start||1,r=t.items?rx(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{let e=t.match(/^(\s*)(\d+)\.\s+/),n=e?.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;let o=t.split(`
`),[i,s]=ww(o);if(i.length===0)return;let l=rh(i,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:o.slice(0,s).join(`
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(kw,this.editor.getAttributes(Xf)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Je({find:Yf,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Je({find:Yf,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Xf)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),Sw=/^\s*(\[([( |x])?\])\s$/,Cw=$.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{let e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",O(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{let n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){let r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;let o=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Hn(t,e,o)},addKeyboardShortcuts(){let t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),c=d=>{var u,f;l.ariaLabel=((f=(u=this.options.a11y)==null?void 0:u.checkboxLabel)==null?void 0:f.call(u,d,l.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};return c(t),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",d=>d.preventDefault()),l.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:u}=d.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let h=n();if(typeof h!="number")return!1;let p=f.doc.nodeAt(h);return f.setNodeMarkup(h,void 0,{...p?.attrs,checked:u}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,u)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,u])=>{o.setAttribute(d,u)}),o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,i.append(l,s),o.append(i,a),Object.entries(e).forEach(([d,u])=>{o.setAttribute(d,u)}),{dom:o,contentDOM:a,update:d=>d.type!==this.type?!1:(o.dataset.checked=d.attrs.checked,l.checked=d.attrs.checked,c(d),!0)}}},addInputRules(){return[Je({find:Sw,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),vw=$.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",O(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;let n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){let r=i=>{let s=Or(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=Or(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Hv=K.create({name:"listKit",addExtensions(){let t=[];return this.options.bulletList!==!1&&t.push(xa.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(ka.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(yw.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(Ca.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Cw.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(vw.configure(this.options.taskList)),t}});var Vn=(t,e,n={})=>{t.dom.closest("form")?.dispatchEvent(new CustomEvent(e,{composed:!0,cancelable:!0,detail:n}))},va=({files:t,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:r,maxSizeValidationMessage:o})=>{for(let i of t){if(e&&!e.includes(i.type))return n;if(r&&i.size>+r*1024)return o}return null},Ma=()=>("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)),Mw=({editor:t,acceptedTypes:e,acceptedTypesValidationMessage:n,get$WireUsing:r,key:o,maxSize:i,maxSizeValidationMessage:s,statePath:l,uploadingMessage:a})=>{let c=d=>Livewire.fireAction(r().__instance,"callSchemaComponentMethod",[o,"getUploadedFileAttachmentTemporaryUrl",{attachment:d}],{async:!0});return new P({key:new H("localFiles"),props:{handleDrop(d,u){if(!u.dataTransfer?.files.length)return!1;let f=Array.from(u.dataTransfer.files),h=va({files:f,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:i,maxSizeValidationMessage:s});if(h)return d.dom.dispatchEvent(new CustomEvent("rich-editor-file-validation-message",{bubbles:!0,detail:{key:o,livewireId:r().id,validationMessage:h}})),!1;if(!f.length)return!1;Vn(d,"form-processing-started",{message:a}),u.preventDefault(),u.stopPropagation();let p=d.posAtCoords({left:u.clientX,top:u.clientY});return f.forEach((m,g)=>{t.setEditable(!1),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploading-file",{bubbles:!0,detail:{key:o,livewireId:r().id}}));let y=Ma();r().upload(`componentFileAttachments.${l}.${y}`,m,()=>{c(y).then(b=>{b&&(t.chain().insertContentAt(p?.pos??0,{type:"image",attrs:{id:y,src:b}}).run(),t.setEditable(!0),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploaded-file",{bubbles:!0,detail:{key:o,livewireId:r().id}})),g===f.length-1&&Vn(d,"form-processing-finished"))})})}),!0},handlePaste(d,u){let f=u.clipboardData?.files?.length?Array.from(u.clipboardData.files):[],h=u.clipboardData?.getData("text")?.length>0,p=u.clipboardData?.getData("text/html")||"";if(f.length&&!h){let m=va({files:f,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:i,maxSizeValidationMessage:s});return m?(d.dom.dispatchEvent(new CustomEvent("rich-editor-file-validation-message",{bubbles:!0,detail:{key:o,livewireId:r().id,validationMessage:m}})),!1):(u.preventDefault(),u.stopPropagation(),Vn(d,"form-processing-started",{message:a}),f.forEach((g,y)=>{t.setEditable(!1),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploading-file",{bubbles:!0,detail:{key:o,livewireId:r().id}}));let b=Ma();r().upload(`componentFileAttachments.${l}.${b}`,g,()=>{c(b).then(w=>{w&&(t.chain().insertContentAt(t.state.selection.anchor,{type:"image",attrs:{id:b,src:w}}).run(),t.setEditable(!0),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploaded-file",{bubbles:!0,detail:{key:o,livewireId:r().id}})),y===f.length-1&&Vn(d,"form-processing-finished"))})})}),!0)}if(p){let g=new DOMParser().parseFromString(p,"text/html"),y=g.querySelectorAll("img[src]");if(y.length){u.stopPropagation();let{from:b,to:w}=t.state.selection;return Vn(d,"form-processing-started",{message:a}),t.setEditable(!1),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploading-file",{bubbles:!0,detail:{key:o,livewireId:r() Line truncated
`,f=new Array(s).fill(0).map((p,m)=>d&&c[m]&&c[m].text||"");return u+=`| ${f.map((p,m)=>a(p,l[m])).join(" | ")} |
`,u+=`| ${l.map(p=>"-".repeat(Math.max(3,p))).join(" | ")} |
`,(d?i.slice(1):i).forEach(p=>{u+=`| ${new Array(s).fill(0).map((m,g)=>a(p[g]&&p[g].text||"",l[g])).join(" | ")} |
`}),u}var hk=fk,pk=$.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:ik,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=sk(t,this.options.cellMinWidth),i=e.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let l=["table",O(this.options.HTMLAttributes,e,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(t,e)=>{let n=[];if(t.header){let r=[];t.header.forEach(o=>{r.push(e.createNode("tableHeader",{},[{type:"paragraph",content:e.parseInline(o.tokens)}]))}),n.push(e.createNode("tableRow",{},r))}return t.rows&&t.rows.forEach(r=>{let o=[];r.forEach(i=>{o.push(e.createNode("tableCell",{},[{type:"paragraph",content:e.parseInline(i.tokens)}]))}),n.push(e.createNode("tableRow",{},o))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>hk(t,e),addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=ak(i.schema,t,e,n);if(o){let l=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(D.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>hp(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>pp(t,e),deleteColumn:()=>({state:t,dispatch:e})=>mp(t,e),addRowBefore:()=>({state:t,dispatch:e})=>yp(t,e),addRowAfter:()=>({state:t,dispatch:e})=>bp(t,e),deleteRow:()=>({state:t,dispatch:e})=>wp(t,e),deleteTable:()=>({state:t,dispatch:e})=>Sp(t,e),mergeCells:()=>({state:t,dispatch:e})=>Fa(t,e),splitCell:()=>({state:t,dispatch:e})=>Va(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>qn("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>qn("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>kp(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Fa(t,e)?!0:Va(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>xp(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>_a(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>_a(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&$a(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){let r=Y.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Xi,"Mod-Backspace":Xi,Delete:Xi,"Mod-Delete":Xi}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[vp({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Tp({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){let e={name:t.name,options:t.options,storage:t.storage};return{tableRole:J(B(t,"tableRole",e))}}}),Np=K.create({name:"tableKit",addExtensions(){let t=[];return this.options.table!==!1&&t.push(pk.configure(this.options.table)),this.options.tableCell!==!1&&t.push(nk.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(rk.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(ok.configure(this.options.tableRow)),t}});var mk=$.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),Op=mk;var gk=K.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{let e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Rp=gk;var yk=ee.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",O(this.options.HTMLA Line truncated
`),[i,s]=nx(o);if(i.length===0)return;let l=yh(i,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:o.slice(0,s).join(`
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(ox,this.editor.getAttributes(dh)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Ge({find:uh,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ge({find:uh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(dh)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),ix=/^\s*(\[([( |x])?\])\s$/,sx=V.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{let e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",N(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{let n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){let r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;let o=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Vn(t,e,o)},addKeyboardShortcuts(){let t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{let o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),a=document.createElement("div"),c=u=>{var f,h;l.ariaLabel=((h=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:h.call(f,u,l.checked))||`Task item checkbox for ${u.textContent||"empty task item"}`};c(t),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",u=>u.preventDefault()),l.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:f}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{let p=n();if(typeof p!="number")return!1;let m=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...m?.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,f])=>{o.setAttribute(u,f)}),o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,i.append(l,s),o.append(i,a),Object.entries(e).forEach(([u,f])=>{o.setAttribute(u,f)});let d=new Set(Object.keys(e));return{dom:o,contentDOM:a,update:u=>{if(u.type!==this.type)return!1;o.dataset.checked=u.attrs.checked,l.checked=u.attrs.checked,c(u);let f=r.extensionManager.attributes,h=on(u,f),p=new Set(Object.keys(h)),m=this.options.HTMLAttributes;return d.forEach(g=>{p.has(g)||(g in m?o.setAttribute(g,m[g]):o.removeAttribute(g))}),Object.entries(h).forEach(([g,y])=>{y==null?g in m?o.setAttribute(g,m[g]):o.removeAttribute(g):o.setAttribute(g,y)}),d=p,!0}}}},addInputRules(){return[Ge({find:ix,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),lx=V.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",N(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;let n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){let r=i=>{let s=Lr(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,a)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:a}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=Lr(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),gM=U.create({name:"listKit",addExtensions(){let t=[];return this.options.bulletList!==!1&&t.push(Aa.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(Ea.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(Qw.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(Oa.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(sx.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(lx.configure(this.options.taskList)),t}});var Un=(t,e,n={})=>{t.dom.closest("form")?.dispatchEvent(new CustomEvent(e,{composed:!0,cancelable:!0,detail:n}))},Ra=({files:t,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:r,maxSizeValidationMessage:o})=>{for(let i of t){if(e&&!e.includes(i.type))return n;if(r&&i.size>+r*1024)return o}return null},Da=()=>("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)),ax=({editor:t,acceptedTypes:e,acceptedTypesValidationMessage:n,get$WireUsing:r,key:o,maxSize:i,maxSizeValidationMessage:s,statePath:l,uploadingMessage:a})=>{let c=d=>Livewire.fireAction(r().__instance,"callSchemaComponentMethod",[o,"getUploadedFileAttachmentTemporaryUrl",{attachment:d}],{async:!0});return new B({key:new _("localFiles"),props:{handleDrop(d,u){if(!u.dataTransfer?.files.length)return!1;let f=Array.from(u.dataTransfer.files),h=Ra({files:f,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:i,maxSizeValidationMessage:s});if(h)return d.dom.dispatchEvent(new CustomEvent("rich-editor-file-validation-message",{bubbles:!0,detail:{key:o,livewireId:r().id,validationMessage:h}})),!1;if(!f.length)return!1;Un(d,"form-processing-started",{message:a}),u.preventDefault(),u.stopPropagation();let p=d.posAtCoords({left:u.clientX,top:u.clientY});return f.forEach((m,g)=>{t.setEditable(!1),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploading-file",{bubbles:!0,detail:{key:o,livewireId:r().id}}));let y=Da();r().upload(`componentFileAttachments.${l}.${y}`,m,()=>{c(y).then(w=>{w&&(t.chain().insertContentAt(p?.pos??0,{type:"image",attrs:{id:y,src:w}}).run(),t.setEditable(!0),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploaded-file",{bubbles:!0,detail:{key:o,livewireId:r().id}})),g===f.length-1&&Un(d,"form-processing-finished"))})})}),!0},handlePaste(d,u){let f=u.clipboardData?.files?.length?Array.from(u.clipboardData.files):[],h=u.clipboardData?.getData("text")?.length>0,p=u.clipboardData?.getData("text/html")||"";if(f.length&&!h){let m=Ra({files:f,acceptedTypes:e,acceptedTypesValidationMessage:n,maxSize:i,maxSizeValidationMessage:s});return m?(d.dom.dispatchEvent(new CustomEvent("rich-editor-file-validation-message",{bubbles:!0,detail:{key:o,livewireId:r().id,validationMessage:m}})),!1):(u.preventDefault(),u.stopPropagation(),Un(d,"form-processing-started",{message:a}),f.forEach((g,y)=>{t.setEditable(!1),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploading-file",{bubbles:!0,detail:{key:o,livewireId:r().id}}));let w=Da();r().upload(`componentFileAttachments.${l}.${w}`,g,()=>{c(w).then(b=>{b&&(t.chain().insertContentAt(t.state.selection.anchor,{type:"image",attrs:{id:w,src:b}}).run(),t.setEditable(!0),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploaded-file",{bubbles:!0,detail:{key:o,livewireId:r().id}})),y===f.length-1&&Un(d,"form-processing-finished"))})})}),!0)}if(p){let g=new DOMParser().parseFromString(p,"text/html"),y=g.querySelectorAll("img[src]");if(y.length){u.stopPropagation();let{from:w,to:b}=t.state.selection;return Un(d,"form-processing-started",{message:a}),t.setEditable(!1),d.dom.dispatchEvent(new CustomEvent("rich-editor-uploading-file",{bubbles:!0,detail:{key:o,livewireId:r() Line truncated
`);return/\s/.test(r)}):!1}var ux=new _("suggestion");function fx({pluginKey:t=ux,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:l="span",decorationClass:a="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:u=()=>null,items:f=()=>[],render:h=()=>({}),allow:p=()=>!0,findSuggestionMatch:m=cx,shouldShow:g,shouldResetDismissed:y}){let w,b=h?.(),x=r&&!o,k=()=>{let v=e.state.selection.$anchor.pos,R=e.view.coordsAtPos(v),{top:j,right:D,bottom:O,left:H}=R;try{return new DOMRect(H,j,D-H,O-j)}catch{return null}},M=(v,R)=>R?()=>{let j=t.getState(e.state),D=j?.decorationId,O=v.dom.querySelector(`[data-decoration-id="${D}"]`);return O?.getBoundingClientRect()||null}:k,S=({match:v,dismissedRange:R,state:j,transaction:D})=>y?.({editor:e,state:j,range:R,match:v,transaction:D,allowSpaces:x})?!1:x?v.range.from===R.from:v.range.from===R.from&&!dx(D);function P(v,R){var j;try{let O=t.getState(v.state),H=O?.decorationId?v.dom.querySelector(`[data-decoration-id="${O.decorationId}"]`):null,W={editor:e,range:O?.range||{from:0,to:0},query:O?.query||null,text:O?.text||null,items:[],command:X=>u({editor:e,range:O?.range||{from:0,to:0},props:X}),decorationNode:H,clientRect:M(v,H)};(j=b?.onExit)==null||j.call(b,W)}catch{}let D=v.state.tr.setMeta(R,{exit:!0});v.dispatch(D)}let A=new B({key:t,view(){return{update:async(v,R)=>{var j,D,O,H,W,X,Y;let F=(j=this.key)==null?void 0:j.getState(R),ce=(D=this.key)==null?void 0:D.getState(v.state),fe=F.active&&ce.active&&F.range.from!==ce.range.from,q=!F.active&&ce.active,ft=F.active&&!ce.active,Ke=!q&&!ft&&F.query!==ce.query,Qn=q||fe&&Ke,eo=Ke||fe,is=ft||fe&&Ke;if(!Qn&&!eo&&!is)return;let bn=is&&!Qn?F:ce,ec=v.dom.querySelector(`[data-decoration-id="${bn.decorationId}"]`);w={editor:e,range:bn.range,query:bn.query,text:bn.text,items:[],command:Qp=>u({editor:e,range:bn.range,props:Qp}),decorationNode:ec,clientRect:M(v,ec)},Qn&&((O=b?.onBeforeStart)==null||O.call(b,w)),eo&&((H=b?.onBeforeUpdate)==null||H.call(b,w)),(eo||Qn)&&(w.items=await f({editor:e,query:bn.query})),is&&((W=b?.onExit)==null||W.call(b,w)),eo&&((X=b?.onUpdate)==null||X.call(b,w)),Qn&&((Y=b?.onStart)==null||Y.call(b,w))},destroy:()=>{var v;w&&((v=b?.onExit)==null||v.call(b,w))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(v,R,j,D){let{isEditable:O}=e,{composing:H}=e.view,{selection:W}=v,{empty:X,from:Y}=W,F={...R},ce=v.getMeta(t);if(ce&&ce.exit)return F.active=!1,F.decorationId=null,F.range={from:0,to:0},F.query=null,F.text=null,F.dismissedRange=R.active?{...R.range}:R.dismissedRange,F;if(F.composing=H,v.docChanged&&F.dismissedRange!==null&&(F.dismissedRange={from:v.mapping.map(F.dismissedRange.from),to:v.mapping.map(F.dismissedRange.to)}),O&&(X||e.view.composing)){(Y<R.range.from||Y>R.range.to)&&!H&&!R.composing&&(F.active=!1);let fe=m({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:W.$from}),q=`id_${Math.floor(Math.random()*4294967295)}`;fe&&p({editor:e,state:D,range:fe.range,isActive:R.active})&&(!g||g({editor:e,range:fe.range,query:fe.query,text:fe.text,transaction:v}))?(F.dismissedRange!==null&&!S({match:fe,dismissedRange:F.dismissedRange,state:D,transaction:v})&&(F.dismissedRange=null),F.dismissedRange===null?(F.active=!0,F.decorationId=R.decorationId?R.decorationId:q,F.range=fe.range,F.query=fe.query,F.text=fe.text):F.active=!1):(fe||(F.dismissedRange=null),F.active=!1)}else F.active=!1;return F.active||(F.decorationId=null,F.range={from:0,to:0},F.query=null,F.text=null),F}},props:{handleKeyDown(v,R){var j,D;let{active:O,range:H}=A.getState(v.state);if(!O)return!1;if(R.key==="Escape"||R.key==="Esc"){let X=A.getState(v.state);return(j=b?.onKeyDown)==null||j.call(b,{view:v,event:R,range:X.range}),P(v,t),!0}return((D=b?.onKeyDown)==null?void 0:D.call(b,{view:v,event:R,range:H}))||!1},decorations(v){let{active:R,range:j,decorationId:D,query:O}=A.getState(v);if(!R)return null;let H=!O?.length,W=[a];return H&&W.push(d),Z.create(v.doc,[re.inline(j.from,j.to,{nodeName:l,class:W.join(" "),"data-decoration-id":D,"data-decoration-content":c})])}}});return A}var Hi=fx;var hx=function({editor:t,overrideSuggestionOptions:e,extensionName:n}){let r=new _;return{editor:t,char:"{{",pluginKey:r,command:({editor:o,range:i,props:s})=>{o.view.state.selection.$to.nodeAfter?.text?.startsWith(" ")&&(i.to+=1),o.chain().focus().insertContentAt(i,[{type:n,attrs:{...s}},{type:"text",text:" "}]).run(),o.view.dom.ownerDocument.defaultView?.getSelection()?.collapseToEnd()},allow:({state:o,range:i})=>{let s=o.doc.resolve(i.from),l=o.schema.nodes[n];return!!s.parent.type.contentMatch.matchType(l)},...e}},wh=V.create({name:"mergeTag",priority:101,addStorage(){return{mergeTags:[],suggestions:[],getSuggestionFromChar:()=>null}},addOptions(){return{HTMLAttributes:{},renderText({node:t}){return`{{ ${this.mergeTags[t.attrs.id]} }}`},deleteTriggerWithBackspace:!1,rend Line truncated
`,h=new Array(s).fill(0).map((m,g)=>d&&c[g]&&c[g].text||"");return f+=`| ${h.map((m,g)=>a(m,l[g])).join(" | ")} |
`,f+=`| ${l.map((m,g)=>{let y=Math.max(3,m),w=u[g];return w==="left"?`:${"-".repeat(y)}`:w==="right"?`${"-".repeat(y)}:`:w==="center"?`:${"-".repeat(y)}:`:"-".repeat(y)}).join(" | ")} |
`,(d?i.slice(1):i).forEach(m=>{f+=`| ${new Array(s).fill(0).map((g,y)=>a(m[y]&&m[y].text||"",l[y])).join(" | ")} |
`}),f}var Kk=Uk,qk=V.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Hk,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){let{colgroup:n,tableWidth:r,tableMinWidth:o}=$k(t,this.options.cellMinWidth),i=e.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}let l=["table",N(this.options.HTMLAttributes,e,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(t,e)=>{let n=[],r=Array.isArray(t.align)?t.align:[];if(t.header){let o=[];t.header.forEach((i,s)=>{var l;let a=rs((l=r[s])!=null?l:i.align),c=a?{align:a}:{};o.push(e.createNode("tableHeader",c,[{type:"paragraph",content:e.parseInline(i.tokens)}]))}),n.push(e.createNode("tableRow",{},o))}return t.rows&&t.rows.forEach(o=>{let i=[];o.forEach((s,l)=>{var a;let c=rs((a=r[l])!=null?a:s.align),d=c?{align:c}:{};i.push(e.createNode("tableCell",d,[{type:"paragraph",content:e.parseInline(s.tokens)}]))}),n.push(e.createNode("tableRow",{},i))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>Kk(t,e),addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{let s=_k(i.schema,t,e,n);if(o){let l=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(I.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Ep(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Np(t,e),deleteColumn:()=>({state:t,dispatch:e})=>Op(t,e),addRowBefore:()=>({state:t,dispatch:e})=>Dp(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Ip(t,e),deleteRow:()=>({state:t,dispatch:e})=>Pp(t,e),deleteTable:()=>({state:t,dispatch:e})=>zp(t,e),mergeCells:()=>({state:t,dispatch:e})=>Ga(t,e),splitCell:()=>({state:t,dispatch:e})=>Xa(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Yn("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Yn("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Bp(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Ga(t,e)?!0:Xa(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>Lp(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>Ya(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>Ya(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Ja(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){let r=Q.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:ns,"Mod-Backspace":ns,Delete:ns,"Mod-Delete":ns}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[$p({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],_p({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){let t=this.options.resizable&&this.editor.isEditable,e=this.options.View;return t||!e?null:({node:n,view:r})=>new e(n,this.options.cellMinWidth,r)},extendNodeSchema(t){let e={name:t.name,options:t.options,storage:t.storage};return{tableRole:J($(t,"tableRole",e))}}}),Up=U.create({name:"tableKit",addExtensions(){let t=[];return this.options.table!==!1&&t.push(qk.configure(this.options.table)),this.options.tableCell!==!1&&t.push(Lk.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(Bk.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(zk.configure(this.options.tableRow)),t}});var Jk=V.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),Kp=Jk;var Gk=U.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{let e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"M Line truncated
@@ -1,9 +1,9 @@
var Ft=Math.min,vt=Math.max,Ht=Math.round;var st=n=>({x:n,y:n}),ji={left:"right",right:"left",bottom:"top",top:"bottom"},qi={start:"end",end:"start"};function De(n,t,e){return vt(n,Ft(t,e))}function Vt(n,t){return typeof n=="function"?n(t):n}function yt(n){return n.split("-")[0]}function Wt(n){return n.split("-")[1]}function Ae(n){return n==="x"?"y":"x"}function Ce(n){return n==="y"?"height":"width"}var Ji=new Set(["top","bottom"]);function ht(n){return Ji.has(yt(n))?"y":"x"}function Le(n){return Ae(ht(n))}function Je(n,t,e){e===void 0&&(e=!1);let i=Wt(n),o=Le(n),s=Ce(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Bt(r)),[r,Bt(r)]}function Qe(n){let t=Bt(n);return[ie(n),t,ie(t)]}function ie(n){return n.replace(/start|end/g,t=>qi[t])}var je=["left","right"],qe=["right","left"],Qi=["top","bottom"],Zi=["bottom","top"];function tn(n,t,e){switch(n){case"top":case"bottom":return e?t?qe:je:t?je:qe;case"left":case"right":return t?Qi:Zi;default:return[]}}function Ze(n,t,e,i){let o=Wt(n),s=tn(yt(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(ie)))),s}function Bt(n){return n.replace(/left|right|bottom|top/g,t=>ji[t])}function en(n){return{top:0,right:0,bottom:0,left:0,...n}}function ti(n){return typeof n!="number"?en(n):{top:n,right:n,bottom:n,left:n}}function Ot(n){let{x:t,y:e,width:i,height:o}=n;return{width:i,height:o,top:e,left:t,right:t+i,bottom:e+o,x:t,y:e}}function ei(n,t,e){let{reference:i,floating:o}=n,s=ht(t),r=Le(t),a=Ce(r),l=yt(t),c=s==="y",f=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,p=i[a]/2-o[a]/2,u;switch(l){case"top":u={x:f,y:i.y-o.height};break;case"bottom":u={x:f,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-o.width,y:d};break;default:u={x:i.x,y:i.y}}switch(Wt(t)){case"start":u[r]-=p*(e&&c?-1:1);break;case"end":u[r]+=p*(e&&c?-1:1);break}return u}var ii=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:f,y:d}=ei(c,i,l),p=i,u={},g=0;for(let m=0;m<a.length;m++){let{name:S,fn:E}=a[m],{x:w,y:D,data:A,reset:C}=await E({x:f,y:d,initialPlacement:i,placement:p,strategy:o,middlewareData:u,rects:c,platform:r,elements:{reference:n,floating:t}});f=w??f,d=D??d,u={...u,[S]:{...u[S],...A}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):C.rects),{x:f,y:d}=ei(c,p,l)),m=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:u}};async function Ie(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=Vt(t,n),g=ti(u),S=a[p?d==="floating"?"reference":"floating":d],E=Ot(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(S)))==null||e?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),w=d==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(D))?await(s.getScale==null?void 0:s.getScale(D))||{x:1,y:1}:{x:1,y:1},C=Ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:D,strategy:l}):w);return{top:(E.top-C.top+g.top)/A.y,bottom:(C.bottom-E.bottom+g.bottom)/A.y,left:(E.left-C.left+g.left)/A.x,right:(C.right-E.right+g.right)/A.x}}var ni=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...S}=Vt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let E=yt(o),w=ht(a),D=yt(a)===a,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=p||(D||!m?[Bt(a)]:Qe(a)),F=g!=="none";!p&&F&&C.push(...Ze(a,m,g,A));let q=[a,...C],J=await Ie(t,S),_=[],V=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&_.push(J[E]),d){let k=Je(o,r,A);_.push(J[k[0]],J[k[1]])}if(V=[...V,{placement:o,overflows:_}],!_.every(k=>k<=0)){var W,tt;let k=(((W=s.flip)==null?void 0:W.index)||0)+1,Y=q[k];if(Y&&(!(d==="alignment"?w!==ht(Y):!1)||V.every(L=>ht(L.placement)===w?L.overflows[0]>0:!0)))return{data:{index:k,overflows:V},reset:{placement:Y}};let B=(tt=V.filter(X=>X.overflows[0]<=0).sort((X,L)=>X.overflows[1]-L.overflows[1])[0])==null?void 0:tt.placement;if(!B)switch(u){case"bestFit":{var z;let X=(z=V.filter(L=>{if(F){let et=ht(L.placement);return et===w||et==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(et=>et>0).reduce(Line truncated
var Ht=Math.min,vt=Math.max,Wt=Math.round;var st=i=>({x:i,y:i}),Ji={left:"right",right:"left",bottom:"top",top:"bottom"};function De(i,t,e){return vt(i,Ht(t,e))}function Vt(i,t){return typeof i=="function"?i(t):i}function yt(i){return i.split("-")[0]}function zt(i){return i.split("-")[1]}function Ae(i){return i==="x"?"y":"x"}function Ce(i){return i==="y"?"height":"width"}function ht(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function Le(i){return Ae(ht(i))}function Qe(i,t,e){e===void 0&&(e=!1);let n=zt(i),o=Le(i),s=Ce(o),r=o==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Ft(r)),[r,Ft(r)]}function Ze(i){let t=Ft(i);return[ne(i),t,ne(t)]}function ne(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var qe=["left","right"],Je=["right","left"],Qi=["top","bottom"],Zi=["bottom","top"];function tn(i,t,e){switch(i){case"top":case"bottom":return e?t?Je:qe:t?qe:Je;case"left":case"right":return t?Qi:Zi;default:return[]}}function ti(i,t,e,n){let o=zt(i),s=tn(yt(i),e==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(ne)))),s}function Ft(i){let t=yt(i);return Ji[t]+i.slice(t.length)}function en(i){return{top:0,right:0,bottom:0,left:0,...i}}function ei(i){return typeof i!="number"?en(i):{top:i,right:i,bottom:i,left:i}}function Ot(i){let{x:t,y:e,width:n,height:o}=i;return{width:n,height:o,top:e,left:t,right:t+n,bottom:e+o,x:t,y:e}}function ii(i,t,e){let{reference:n,floating:o}=i,s=ht(t),r=Le(t),a=Ce(r),l=yt(t),c=s==="y",f=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,u=n[a]/2-o[a]/2,p;switch(l){case"top":p={x:f,y:n.y-o.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(zt(t)){case"start":p[r]-=u*(e&&c?-1:1);break;case"end":p[r]+=u*(e&&c?-1:1);break}return p}async function ni(i,t){var e;t===void 0&&(t={});let{x:n,y:o,platform:s,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:u=!1,padding:p=0}=Vt(t,i),g=ei(p),x=a[u?d==="floating"?"reference":"floating":d],D=Ot(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(x)))==null||e?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),w=d==="floating"?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},M=Ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:A,strategy:l}):w);return{top:(D.top-M.top+g.top)/E.y,bottom:(M.bottom-D.bottom+g.bottom)/E.y,left:(D.left-M.left+g.left)/E.x,right:(M.right-D.right+g.right)/E.x}}var nn=50,oi=async(i,t,e)=>{let{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ni},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:o}),{x:f,y:d}=ii(c,n,l),u=n,p=0,g={};for(let m=0;m<s.length;m++){let x=s[m];if(!x)continue;let{name:D,fn:w}=x,{x:A,y:E,data:M,reset:C}=await w({x:f,y:d,initialPlacement:n,placement:u,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:i,floating:t}});f=A??f,d=E??d,g[D]={...g[D],...M},C&&p<nn&&(p++,typeof C=="object"&&(C.placement&&(u=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:o}):C.rects),{x:f,y:d}=ii(c,u,l)),m=-1)}return{x:f,y:d,placement:u,strategy:o,middlewareData:g}};var si=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=Vt(i,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let D=yt(o),w=ht(a),A=yt(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=u||(A||!m?[Ft(a)]:Ze(a)),C=g!=="none";!u&&C&&M.push(...ti(a,m,g,E));let q=[a,...M],J=await l.detectOverflow(t,x),R=[],W=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&R.push(J[D]),d){let B=Qe(o,r,E);R.push(J[B[0]],J[B[1]])}if(W=[...W,{placement:o,overflows:R}],!R.every(B=>B<=0)){var V,tt;let B=(((V=s.flip)==null?void 0:V.index)||0)+1,Y=q[B];if(Y&&(!(d==="alignment"?w!==ht(Y):!1)||W.every(L=>ht(L.placement)===w?L.overflows[0]>0:!0)))return{data:{index:B,overflows:W},reset:{placement:Y}};let F=(tt=W.filter($=>$.overflows[0]<=0).sort(($,L)=>$.overflows[1]-L.overflows[1])[0])==null?void 0:tt.placement;if(!F)switch(p){case"bestFit":{var z;let $=(z=W.filter(L=>{if(C){let et=ht(L.placement);return et===w||et==="y"}return!0}).map(L=>[L.placemLine truncated
/*! Bundled license information:
sortablejs/modular/sortable.esm.js:
(**!
* Sortable 1.15.6
* Sortable 1.15.7
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
+6 -6
View File
@@ -1,17 +1,17 @@
(()=>{var qo=Object.create;var Ti=Object.defineProperty;var Go=Object.getOwnPropertyDescriptor;var Ko=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty;var Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Zo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ko(t))!Qo.call(e,i)&&i!==r&&Ti(e,i,{get:()=>t[i],enumerable:!(n=Go(t,i))||n.enumerable});return e};var ea=(e,t,r)=>(r=e!=null?qo(Jo(e)):{},Zo(t||!e||!e.__esModule?Ti(r,"default",{value:e,enumerable:!0}):r,e));var uo=Kr(()=>{});var po=Kr(()=>{});var ho=Kr((Hs,yr)=>{(function(){"use strict";var e="input is invalid type",t="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_MD5_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",o=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?n=global:i&&(n=self);var a=!n.JS_MD5_NO_COMMON_JS&&typeof yr=="object"&&yr.exports,c=typeof define=="function"&&define.amd,f=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),y=[128,32768,8388608,-2147483648],m=[0,8,16,24],O=["hex","array","digest","buffer","arrayBuffer","base64"],S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),x=[],M;if(f){var I=new ArrayBuffer(68);M=new Uint8Array(I),x=new Uint32Array(I)}var $=Array.isArray;(n.JS_MD5_NO_NODE_JS||!$)&&($=function(l){return Object.prototype.toString.call(l)==="[object Array]"});var A=ArrayBuffer.isView;f&&(n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!A)&&(A=function(l){return typeof l=="object"&&l.buffer&&l.buffer.constructor===ArrayBuffer});var N=function(l){var h=typeof l;if(h==="string")return[l,!0];if(h!=="object"||l===null)throw new Error(e);if(f&&l.constructor===ArrayBuffer)return[new Uint8Array(l),!1];if(!$(l)&&!A(l))throw new Error(e);return[l,!1]},Y=function(l){return function(h){return new X(!0).update(h)[l]()}},ne=function(){var l=Y("hex");o&&(l=J(l)),l.create=function(){return new X},l.update=function(p){return l.create().update(p)};for(var h=0;h<O.length;++h){var v=O[h];l[v]=Y(v)}return l},J=function(l){var h=uo(),v=po().Buffer,p;v.from&&!n.JS_MD5_NO_BUFFER_FROM?p=v.from:p=function(P){return new v(P)};var j=function(P){if(typeof P=="string")return h.createHash("md5").update(P,"utf8").digest("hex");if(P==null)throw new Error(e);return P.constructor===ArrayBuffer&&(P=new Uint8Array(P)),$(P)||A(P)||P.constructor===v?h.createHash("md5").update(p(P)).digest("hex"):l(P)};return j},V=function(l){return function(h,v){return new Q(h,!0).update(v)[l]()}},de=function(){var l=V("hex");l.create=function(p){return new Q(p)},l.update=function(p,j){return l.create(p).update(j)};for(var h=0;h<O.length;++h){var v=O[h];l[v]=V(v)}return l};function X(l){if(l)x[0]=x[16]=x[1]=x[2]=x[3]=x[4]=x[5]=x[6]=x[7]=x[8]=x[9]=x[10]=x[11]=x[12]=x[13]=x[14]=x[15]=0,this.blocks=x,this.buffer8=M;else if(f){var h=new ArrayBuffer(68);this.buffer8=new Uint8Array(h),this.blocks=new Uint32Array(h)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}X.prototype.update=function(l){if(this.finalized)throw new Error(t);var h=N(l);l=h[0];for(var v=h[1],p,j=0,P,R=l.length,Z=this.blocks,ze=this.buffer8;j<R;){if(this.hashed&&(this.hashed=!1,Z[0]=Z[16],Z[16]=Z[1]=Z[2]=Z[3]=Z[4]=Z[5]=Z[6]=Z[7]=Z[8]=Z[9]=Z[10]=Z[11]=Z[12]=Z[13]=Z[14]=Z[15]=0),v)if(f)for(P=this.start;j<R&&P<64;++j)p=l.charCodeAt(j),p<128?ze[P++]=p:p<2048?(ze[P++]=192|p>>>6,ze[P++]=128|p&63):p<55296||p>=57344?(ze[P++]=224|p>>>12,ze[P++]=128|p>>>6&63,ze[P++]=128|p&63):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),ze[P++]=240|p>>>18,ze[P++]=128|p>>>12&63,ze[P++]=128|p>>>6&63,ze[P++]=128|p&63);else for(P=this.start;j<R&&P<64;++j)p=l.charCodeAt(j),p<128?Z[P>>>2]|=p<<m[P++&3]:p<2048?(Z[P>>>2]|=(192|p>>>6)<<m[P++&3],Z[P>>>2]|=(128|p&63)<<m[P++&3]):p<55296||p>=57344?(Z[P>>>2]|=(224|p>>>12)<<m[P++&3],Z[P>>>2]|=(128|p>>>6&63)<<m[P++&3],Z[P>>>2]|=(128|p&63)<<m[P++&3]):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),Z[P>>>2]|=(240|p>>>18)<<m[P++&3],Z[P>>>2]|=(128|p>>>12&63)<<m[P++&3],Z[P>>>2]|=(128|p>>>6&63)<<m[P++&3],Z[P>>>2]|=(128|p&63)<<m[P++&3]);else if(f)for(P=this.start;j<R&&P<64;++j)ze[P++]=l[j];else for(P=this.start;j<R&&P<64;++j)Z[P>>>2]|=l[j]<<m[P++&3];this.lastByteIndex=P,this.bytes+=P-this.start,P>=64?(this.start=P-64,this.hash(),this.hashed=!0):this.start=P}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},X.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var l=this.blocks,h=this.lastByteIndex;l[h>>>2]|=y[h&3],h>=56&&(this.hashed||this.hash(),l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),l[14]=this.bytes<<3,l[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},X.prototype.hash=function(){var l,h,v,p,j,P,R=this.blocks;this.first?(l=R[0]-680876937,l=(l<<7|l>>>25)-271733879<<0,p=(-173Line truncated
(()=>{var qo=Object.create;var Ti=Object.defineProperty;var Go=Object.getOwnPropertyDescriptor;var Ko=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty;var Gr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Zo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ko(t))!Qo.call(e,i)&&i!==r&&Ti(e,i,{get:()=>t[i],enumerable:!(n=Go(t,i))||n.enumerable});return e};var ea=(e,t,r)=>(r=e!=null?qo(Jo(e)):{},Zo(t||!e||!e.__esModule?Ti(r,"default",{value:e,enumerable:!0}):r,e));var uo=Gr(()=>{});var po=Gr(()=>{});var ho=Gr((Ws,yr)=>{(function(){"use strict";var e="input is invalid type",t="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_MD5_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",o=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?n=global:i&&(n=self);var a=!n.JS_MD5_NO_COMMON_JS&&typeof yr=="object"&&yr.exports,c=typeof define=="function"&&define.amd,f=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),y=[128,32768,8388608,-2147483648],m=[0,8,16,24],O=["hex","array","digest","buffer","arrayBuffer","base64"],S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),x=[],M;if(f){var I=new ArrayBuffer(68);M=new Uint8Array(I),x=new Uint32Array(I)}var $=Array.isArray;(n.JS_MD5_NO_NODE_JS||!$)&&($=function(l){return Object.prototype.toString.call(l)==="[object Array]"});var A=ArrayBuffer.isView;f&&(n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!A)&&(A=function(l){return typeof l=="object"&&l.buffer&&l.buffer.constructor===ArrayBuffer});var N=function(l){var h=typeof l;if(h==="string")return[l,!0];if(h!=="object"||l===null)throw new Error(e);if(f&&l.constructor===ArrayBuffer)return[new Uint8Array(l),!1];if(!$(l)&&!A(l))throw new Error(e);return[l,!1]},Y=function(l){return function(h){return new X(!0).update(h)[l]()}},ne=function(){var l=Y("hex");o&&(l=J(l)),l.create=function(){return new X},l.update=function(p){return l.create().update(p)};for(var h=0;h<O.length;++h){var v=O[h];l[v]=Y(v)}return l},J=function(l){var h=uo(),v=po().Buffer,p;v.from&&!n.JS_MD5_NO_BUFFER_FROM?p=v.from:p=function(P){return new v(P)};var j=function(P){if(typeof P=="string")return h.createHash("md5").update(P,"utf8").digest("hex");if(P==null)throw new Error(e);return P.constructor===ArrayBuffer&&(P=new Uint8Array(P)),$(P)||A(P)||P.constructor===v?h.createHash("md5").update(p(P)).digest("hex"):l(P)};return j},V=function(l){return function(h,v){return new Q(h,!0).update(v)[l]()}},de=function(){var l=V("hex");l.create=function(p){return new Q(p)},l.update=function(p,j){return l.create(p).update(j)};for(var h=0;h<O.length;++h){var v=O[h];l[v]=V(v)}return l};function X(l){if(l)x[0]=x[16]=x[1]=x[2]=x[3]=x[4]=x[5]=x[6]=x[7]=x[8]=x[9]=x[10]=x[11]=x[12]=x[13]=x[14]=x[15]=0,this.blocks=x,this.buffer8=M;else if(f){var h=new ArrayBuffer(68);this.buffer8=new Uint8Array(h),this.blocks=new Uint32Array(h)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}X.prototype.update=function(l){if(this.finalized)throw new Error(t);var h=N(l);l=h[0];for(var v=h[1],p,j=0,P,R=l.length,Z=this.blocks,ze=this.buffer8;j<R;){if(this.hashed&&(this.hashed=!1,Z[0]=Z[16],Z[16]=Z[1]=Z[2]=Z[3]=Z[4]=Z[5]=Z[6]=Z[7]=Z[8]=Z[9]=Z[10]=Z[11]=Z[12]=Z[13]=Z[14]=Z[15]=0),v)if(f)for(P=this.start;j<R&&P<64;++j)p=l.charCodeAt(j),p<128?ze[P++]=p:p<2048?(ze[P++]=192|p>>>6,ze[P++]=128|p&63):p<55296||p>=57344?(ze[P++]=224|p>>>12,ze[P++]=128|p>>>6&63,ze[P++]=128|p&63):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),ze[P++]=240|p>>>18,ze[P++]=128|p>>>12&63,ze[P++]=128|p>>>6&63,ze[P++]=128|p&63);else for(P=this.start;j<R&&P<64;++j)p=l.charCodeAt(j),p<128?Z[P>>>2]|=p<<m[P++&3]:p<2048?(Z[P>>>2]|=(192|p>>>6)<<m[P++&3],Z[P>>>2]|=(128|p&63)<<m[P++&3]):p<55296||p>=57344?(Z[P>>>2]|=(224|p>>>12)<<m[P++&3],Z[P>>>2]|=(128|p>>>6&63)<<m[P++&3],Z[P>>>2]|=(128|p&63)<<m[P++&3]):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),Z[P>>>2]|=(240|p>>>18)<<m[P++&3],Z[P>>>2]|=(128|p>>>12&63)<<m[P++&3],Z[P>>>2]|=(128|p>>>6&63)<<m[P++&3],Z[P>>>2]|=(128|p&63)<<m[P++&3]);else if(f)for(P=this.start;j<R&&P<64;++j)ze[P++]=l[j];else for(P=this.start;j<R&&P<64;++j)Z[P>>>2]|=l[j]<<m[P++&3];this.lastByteIndex=P,this.bytes+=P-this.start,P>=64?(this.start=P-64,this.hash(),this.hashed=!0):this.start=P}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},X.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var l=this.blocks,h=this.lastByteIndex;l[h>>>2]|=y[h&3],h>=56&&(this.hashed||this.hash(),l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),l[14]=this.bytes<<3,l[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},X.prototype.hash=function(){var l,h,v,p,j,P,R=this.blocks;this.first?(l=R[0]-680876937,l=(l<<7|l>>>25)-271733879<<0,p=(-173Line truncated
`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var z={placement:ot(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:T};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Hn(Object.assign({},z,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:U,roundOffsets:G})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Hn(Object.assign({},z,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:G})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})}var w={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g,data:{}};function C(d){var s=d.state;Object.keys(s.elements).forEach(function(b){var _=s.styles[b]||{},T=s.attributes[b]||{},F=s.elements[b];!o(F)||!u(F)||(Object.assign(F.style,_),Object.keys(T).forEach(function(U){var H=T[U];H===!1?F.removeAttribute(U):F.setAttribute(U,H===!0?"":H)}))})}function L(d){var s=d.state,b={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,b.popper),s.styles=b,s.elements.arrow&&Object.assign(s.elements.arrow.style,b.arrow),function(){Object.keys(s.elements).forEach(function(_){var T=s.elements[_],F=s.attributes[_]||{},U=Object.keys(s.styles.hasOwnProperty(_)?s.styles[_]:b[_]),H=U.reduce(function(G,oe){return G[oe]="",G},{});!o(T)||!u(T)||(Object.assign(T.style,H),Object.keys(F).forEach(function(G){T.removeAttribute(G)}))})}}var q={name:"applyStyles",enabled:!0,phase:"write",fn:C,effect:L,requires:["computeStyles"]};function W(d,s,b){var _=ot(d),T=[Q,V].indexOf(_)>=0?-1:1,F=typeof b=="function"?b(Object.assign({},s,{placement:d})):b,U=F[0],H=F[1];return U=U||0,H=(H||0)*T,[Q,X].indexOf(_)>=0?{x:H,y:U}:{x:U,y:H}}function B(d){var s=d.state,b=d.options,_=d.name,T=b.offset,F=T===void 0?[0,0]:T,U=ze.reduce(function(z,De){return z[De]=W(De,s.rects,F),z},{}),H=U[s.placement],G=H.x,oe=H.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=G,s.modifiersData.popperOffsets.y+=oe),s.modifiersData[_]=U}var be={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:B},le={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(d){return d.replace(/left|right|bottom|top/g,function(s){return le[s]})}var ye={start:"end",end:"start"};function Te(d){return d.replace(/start|end/g,function(s){return ye[s]})}function je(d,s){s===void 0&&(s={});var b=s,_=b.placement,T=b.boundary,F=b.rootBoundary,U=b.padding,H=b.flipVariations,G=b.allowedAutoPlacements,oe=G===void 0?ze:G,z=cn(_),De=z?H?Z:Z.filter(function(xe){return cn(xe)===z}):l,Fe=De.filter(function(xe){return oe.indexOf(xe)>=0});Fe.length===0&&(Fe=De,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var Ce=Fe.reduce(function(xe,Me){return xe[Me]=qt(d,{placement:Me,boundary:T,rootBoundary:F,padding:U})[ot(Me)],xe},{});return Object.keys(Ce).sort(function(xe,Me){return Ce[xe]-Ce[Me]})}function Ae(d){if(ot(d)===me)return[];var s=pe(d);return[Te(d),s,Te(s)]}function Ie(d){var s=d.state,b=d.options,_=d.name;if(!s.modifiersData[_]._skip){for(var T=b.mainAxis,F=T===void 0?!0:T,U=b.altAxis,H=U===void 0?!0:U,G=b.fallbackPlacements,oe=b.padding,z=b.boundary,De=b.rootBoundary,Fe=b.altBoundary,Ce=b.flipVariations,xe=Ce===void 0?!0:Ce,Me=b.allowedAutoPlacements,Se=s.options.placement,Be=ot(Se),Re=Be===Se,He=G||(Re||!xe?[pe(Se)]:Ae(Se)),ce=[Se].concat(He).reduce(function(te,ge){return te.concat(ot(ge)===me?je(s,{placement:ge,boundary:z,rootBoundary:De,padding:oe,flipVariations:xe,allowedAutoPlacements:Me}):ge)},[]),Pe=s.rects.reference,_e=s.rects.popper,ke=new Map,Le=!0,Ye=ce[0],$e=0;$e<ce.length;$e++){var Ue=ce[$e],wt=ot(Ue),et=cn(Ue)===h,Ft=[V,de].indexOf(wt)>=0,dn=Ft?"width":"height",Qt=qt(s,{placement:Ue,boundary:z,rootBoundary:De,altBoundary:Fe,padding:oe}),kt=Ft?et?X:Q:et?de:V;Pe[dn]>_e[dn]&&(kt=pe(kt));var $n=pe(kt),Zt=[];if(F&&Zt.push(Qt[wt]<=0),H&&Zt.push(Qt[kt]<=0,Qt[$n]<=0),Zt.every(function(te){return te})){Ye=Ue,Le=!1;break}ke.set(Ue,Zt)}if(Le)for(var Sn=xe?3:1,Wn=function(ge){var we=ce.find(function(Ke){var Je=ke.get(Ke);if(Je)return Je.slice(0,ge).every(function(Dt){return Dt})});if(we)return Ye=we,"break"},D=Sn;D>0;D--){var K=Wn(D);if(K==="break")break}s.placement!==Ye&&(s.modifiersData[_]._skip=!0,s.placement=Ye,s.reset=!0)}}var re={name:"flip",enabled:!0,phase:"main",fn:Ie,requiresIfExists:["offset"],data:{_skip:!1}};function he(d){return d==="x"?"y":"x"}function ve(d,s,b){return gt(d,ln(s,b))}function ee(d){var s=d.state,b=d.options,_=d.name,T=b.mainAxis,F=T===void 0?!0:T,U=b.altAxis,H=U===v Line truncated
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var z={placement:ot(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:T};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Hn(Object.assign({},z,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:U,roundOffsets:G})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Hn(Object.assign({},z,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:G})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})}var w={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g,data:{}};function C(d){var s=d.state;Object.keys(s.elements).forEach(function(b){var _=s.styles[b]||{},T=s.attributes[b]||{},F=s.elements[b];!o(F)||!u(F)||(Object.assign(F.style,_),Object.keys(T).forEach(function(U){var H=T[U];H===!1?F.removeAttribute(U):F.setAttribute(U,H===!0?"":H)}))})}function L(d){var s=d.state,b={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,b.popper),s.styles=b,s.elements.arrow&&Object.assign(s.elements.arrow.style,b.arrow),function(){Object.keys(s.elements).forEach(function(_){var T=s.elements[_],F=s.attributes[_]||{},U=Object.keys(s.styles.hasOwnProperty(_)?s.styles[_]:b[_]),H=U.reduce(function(G,oe){return G[oe]="",G},{});!o(T)||!u(T)||(Object.assign(T.style,H),Object.keys(F).forEach(function(G){T.removeAttribute(G)}))})}}var q={name:"applyStyles",enabled:!0,phase:"write",fn:C,effect:L,requires:["computeStyles"]};function W(d,s,b){var _=ot(d),T=[Q,V].indexOf(_)>=0?-1:1,F=typeof b=="function"?b(Object.assign({},s,{placement:d})):b,U=F[0],H=F[1];return U=U||0,H=(H||0)*T,[Q,X].indexOf(_)>=0?{x:H,y:U}:{x:U,y:H}}function B(d){var s=d.state,b=d.options,_=d.name,T=b.offset,F=T===void 0?[0,0]:T,U=ze.reduce(function(z,De){return z[De]=W(De,s.rects,F),z},{}),H=U[s.placement],G=H.x,oe=H.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=G,s.modifiersData.popperOffsets.y+=oe),s.modifiersData[_]=U}var be={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:B},le={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(d){return d.replace(/left|right|bottom|top/g,function(s){return le[s]})}var ye={start:"end",end:"start"};function Te(d){return d.replace(/start|end/g,function(s){return ye[s]})}function je(d,s){s===void 0&&(s={});var b=s,_=b.placement,T=b.boundary,F=b.rootBoundary,U=b.padding,H=b.flipVariations,G=b.allowedAutoPlacements,oe=G===void 0?ze:G,z=cn(_),De=z?H?Z:Z.filter(function(xe){return cn(xe)===z}):l,Fe=De.filter(function(xe){return oe.indexOf(xe)>=0});Fe.length===0&&(Fe=De,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var Ce=Fe.reduce(function(xe,Me){return xe[Me]=qt(d,{placement:Me,boundary:T,rootBoundary:F,padding:U})[ot(Me)],xe},{});return Object.keys(Ce).sort(function(xe,Me){return Ce[xe]-Ce[Me]})}function Ae(d){if(ot(d)===me)return[];var s=pe(d);return[Te(d),s,Te(s)]}function Ie(d){var s=d.state,b=d.options,_=d.name;if(!s.modifiersData[_]._skip){for(var T=b.mainAxis,F=T===void 0?!0:T,U=b.altAxis,H=U===void 0?!0:U,G=b.fallbackPlacements,oe=b.padding,z=b.boundary,De=b.rootBoundary,Fe=b.altBoundary,Ce=b.flipVariations,xe=Ce===void 0?!0:Ce,Me=b.allowedAutoPlacements,Se=s.options.placement,Be=ot(Se),Re=Be===Se,He=G||(Re||!xe?[pe(Se)]:Ae(Se)),ce=[Se].concat(He).reduce(function(te,ge){return te.concat(ot(ge)===me?je(s,{placement:ge,boundary:z,rootBoundary:De,padding:oe,flipVariations:xe,allowedAutoPlacements:Me}):ge)},[]),Pe=s.rects.reference,_e=s.rects.popper,ke=new Map,Le=!0,Ye=ce[0],$e=0;$e<ce.length;$e++){var Ue=ce[$e],wt=ot(Ue),et=cn(Ue)===h,Ft=[V,de].indexOf(wt)>=0,dn=Ft?"width":"height",Qt=qt(s,{placement:Ue,boundary:z,rootBoundary:De,altBoundary:Fe,padding:oe}),kt=Ft?et?X:Q:et?de:V;Pe[dn]>_e[dn]&&(kt=pe(kt));var $n=pe(kt),Zt=[];if(F&&Zt.push(Qt[wt]<=0),H&&Zt.push(Qt[kt]<=0,Qt[$n]<=0),Zt.every(function(te){return te})){Ye=Ue,Le=!1;break}ke.set(Ue,Zt)}if(Le)for(var Sn=xe?3:1,Wn=function(ge){var we=ce.find(function(Ke){var Je=ke.get(Ke);if(Je)return Je.slice(0,ge).every(function(Dt){return Dt})});if(we)return Ye=we,"break"},D=Sn;D>0;D--){var K=Wn(D);if(K==="break")break}s.placement!==Ye&&(s.modifiersData[_]._skip=!0,s.placement=Ye,s.reset=!0)}}var re={name:"flip",enabled:!0,phase:"main",fn:Ie,requiresIfExists:["offset"],data:{_skip:!1}};function he(d){return d==="x"?"y":"x"}function ve(d,s,b){return gt(d,ln(s,b))}function ee(d){var s=d.state,b=d.options,_=d.name,T=b.mainAxis,F=T===void 0?!0:T,U=b.altAxis,H=U===v Line truncated
%ctippy.js
%c`+nr(g)+`
%c\u{1F477}\u200D This is a development-only message. It will be removed in production.
`)}function rr(g){return[jr(g),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var It;Br();function Br(){It=new Set}function mt(g,w){if(g&&!It.has(w)){var C;It.add(w),(C=console).warn.apply(C,rr(w))}}function zt(g,w){if(g&&!It.has(w)){var C;It.add(w),(C=console).error.apply(C,rr(w))}}function At(g){var w=!g,C=Object.prototype.toString.call(g)==="[object Object]"&&!g.addEventListener;zt(w,["tippy() was passed","`"+String(g)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),zt(C,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Ct={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Hr={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ze=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ct,{},Hr),$r=Object.keys(Ze),Wr=function(w){gt(w,[]);var C=Object.keys(w);C.forEach(function(L){Ze[L]=w[L]})};function ot(g){var w=g.plugins||[],C=w.reduce(function(L,q){var W=q.name,B=q.defaultValue;return W&&(L[W]=g[W]!==void 0?g[W]:B),L},{});return Object.assign({},g,{},C)}function Ur(g,w){var C=w?Object.keys(ot(Object.assign({},Ze,{plugins:w}))):$r,L=C.reduce(function(q,W){var B=(g.getAttribute("data-tippy-"+W)||"").trim();if(!B)return q;if(W==="content")q[W]=B;else try{q[W]=JSON.parse(B)}catch{q[W]=B}return q},{});return L}function ir(g,w){var C=Object.assign({},w,{content:O(w.content,[g])},w.ignoreAttributes?{}:Ur(g,w.plugins));return C.aria=Object.assign({},Ze.aria,{},C.aria),C.aria={expanded:C.aria.expanded==="auto"?w.interactive:C.aria.expanded,content:C.aria.content==="auto"?w.interactive?null:"describedby":C.aria.content},C}function gt(g,w){g===void 0&&(g={}),w===void 0&&(w=[]);var C=Object.keys(g);C.forEach(function(L){var q=x(Ze,Object.keys(Ct)),W=!u(q,L);W&&(W=w.filter(function(B){return B.name===L}).length===0),mt(W,["`"+L+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
`)}function rr(g){return[Nr(g),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var It;jr();function jr(){It=new Set}function mt(g,w){if(g&&!It.has(w)){var C;It.add(w),(C=console).warn.apply(C,rr(w))}}function zt(g,w){if(g&&!It.has(w)){var C;It.add(w),(C=console).error.apply(C,rr(w))}}function At(g){var w=!g,C=Object.prototype.toString.call(g)==="[object Object]"&&!g.addEventListener;zt(w,["tippy() was passed","`"+String(g)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),zt(C,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Ct={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Br={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ze=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ct,{},Br),Hr=Object.keys(Ze),$r=function(w){gt(w,[]);var C=Object.keys(w);C.forEach(function(L){Ze[L]=w[L]})};function ot(g){var w=g.plugins||[],C=w.reduce(function(L,q){var W=q.name,B=q.defaultValue;return W&&(L[W]=g[W]!==void 0?g[W]:B),L},{});return Object.assign({},g,{},C)}function Wr(g,w){var C=w?Object.keys(ot(Object.assign({},Ze,{plugins:w}))):Hr,L=C.reduce(function(q,W){var B=(g.getAttribute("data-tippy-"+W)||"").trim();if(!B)return q;if(W==="content")q[W]=B;else try{q[W]=JSON.parse(B)}catch{q[W]=B}return q},{});return L}function ir(g,w){var C=Object.assign({},w,{content:O(w.content,[g])},w.ignoreAttributes?{}:Wr(g,w.plugins));return C.aria=Object.assign({},Ze.aria,{},C.aria),C.aria={expanded:C.aria.expanded==="auto"?w.interactive:C.aria.expanded,content:C.aria.content==="auto"?w.interactive?null:"describedby":C.aria.content},C}function gt(g,w){g===void 0&&(g={}),w===void 0&&(w=[]);var C=Object.keys(g);C.forEach(function(L){var q=x(Ze,Object.keys(Ct)),W=!u(q,L);W&&(W=w.filter(function(B){return B.name===L}).length===0),mt(W,["`"+L+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var ln=function(){return"innerHTML"};function Yt(g,w){g[ln()]=w}function or(g){var w=J();return g===!0?w.className=a:(w.className=c,V(g)?w.appendChild(g):Yt(w,g)),w}function Nn(g,w){V(w.content)?(Yt(g,""),g.appendChild(w.content)):typeof w.content!="function"&&(w.allowHTML?Yt(g,w.content):g.textContent=w.content)}function Xt(g){var w=g.firstElementChild,C=Y(w.children);return{box:w,content:C.find(function(L){return L.classList.contains(i)}),arrow:C.find(function(L){return L.classList.contains(a)||L.classList.contains(c)}),backdrop:C.find(function(L){return L.classList.contains(o)})}}function ar(g){var w=J(),C=J();C.className=n,C.setAttribute("data-state","hidden"),C.setAttribute("tabindex","-1");var L=J();L.className=i,L.setAttribute("data-state","hidden"),Nn(L,g.props),w.appendChild(C),C.appendChild(L),q(g.props,g.props);function q(W,B){var be=Xt(w),le=be.box,pe=be.content,ye=be.arrow;B.theme?le.setAttribute("data-theme",B.theme):le.removeAttribute("data-theme"),typeof B.animation=="string"?le.setAttribute("data-animation",B.animation):le.removeAttribute("data-animation"),B.inertia?le.setAttribute("data-inertia",""):le.removeAttribute("data-inertia"),le.style.maxWidth=typeof B.maxWidth=="number"?B.maxWidth+"px":B.maxWidth,B.role?le.setAttribute("role",B.role):le.removeAttribute("role"),(W.content!==B.content||W.allowHTML!==B.allowHTML)&&Nn(pe,g.props),B.arrow?ye?W.arrow!==B.arrow&&(le.removeChild(ye),le.appendChild(or(B.arrow))):le.appendChild(or(B.arrow)):ye&&le.removeChild(ye)}return{popper:w,onUpdate:q}}ar.$$tippy=!0;var sr=1,yn=[],wn=[];function cn(g,w){var C=ir(g,Object.assign({},Ze,{},ot(ne(w)))),L,q,W,B=!1,be=!1,le=!1,pe=!1,ye,Te,je,Ae=[],Ie=S(Re,C.interactiveDebounce),re,he=sr++,ve=null,ee=A(C.plugins),ie={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},E={id:he,reference:g,popper:J(),popperInstance:ve,props:C,state:ie,plugins:ee,clearDelayTimeouts:Ft,setProps:dn,setContent:Qt,show:kt,hide:$n,hideWithInteractivity:Zt,enable:wt,disable:et,unmount:Sn,destroy:Wn};if(!C.render)return zt(!0,"render() function has not been supplied."),E;var Ge=C.render(E),fe=Ge.popper,Lt=Ge.onUpdate;fe.setAttribute("data-tippy-root",""),fe.id="tippy-"+E.id,E.popper=fe,g._tippy=E,fe._tippy=E;var bt=ee.map(function(D){return D.fn(E)}),Gt=g.hasAttribute("aria-expanded");return Me(),T(),s(),b("onCreate",[E]),C.showOnCreate&&$e(),fe.addEventListener("mouseenter",function(){E.props.interactive&&E.state.isVisible&&E.clearDelayTimeouts()}),fe.addEventListener("mouseleave",function(D){E.props.interactive&&E.props.trigger.indexOf("mouseenter")>=0&&(yt().addEventListener("mousemove",Ie),Ie(D))}),E;function Kt(){var D=E.props.touch;return Array.isArray(D)?D:[D,0]}function Jt(){return Kt()[0]==="hold"}function rt(){var D;return!!((D=E.props.render)!=null&&D.$$tippy)}function lt(){return re||g}function yt(){var D=lt().parentNode;return D?v(D):document}function un(){return Xt(fe)}function d(D){return E.state.isMounted&&!E.state.isVisible||P.isTouch||ye&&ye.type==="focus"?0:y(E.props.delay,D?0:1,Ze.delay)}function s(){fe.style.pointerEvents=E.props.interactive&&E.state.isVisible?"":"none",fe.style.zIndex=""+E.props.zIndex}function b(D,K,te){if(te===void 0&&(te=!0),bt.forEach(function(we){we[D]&&we[D].apply(void 0,K)}),te){var ge;(ge=E.props)[D].apply(ge,K)}}function _(){var D=E.props.aria;if(D.content){var K="aria-"+D.content,te=fe.id,ge=I(E.props.triggerTarget||g);ge.forEach(function(we){var Ke=we.getAttribute(K);if(E.state.isVisible)we.setAttribute(K,Ke?Ke+" "+te:te);else{var Je=Ke&&Ke.replace(te,"").trim();Je?we.setAttribute(K,Je):we.removeAttribute(K)}})}}function T(){if(!(Gt||!E.props.aria.expanded)){var D=I(E.props.triggerTarget||g);D.forEach(function(K){E.props.interactive?K.setAttribute("aria-expanded",E.state.isVisible&&K===lt()?"true":"false"):K.removeAttribute("aria-expanded")})}}function F(){yt().removeEventListener("mousemove",Ie),yn=yn.filter(function(D){return D!==Ie})}function U(D){if(!(P.isTouch&&(le||D.type==="mousedown"))&&!(E.props.interactive&&fe.contains(D.target))){if(lt().contains(D.target)){if(P.isTouch||E.state.isVisible&&E.props.trigger.indexOf("click")>=0)return}else b("onClickOutside",[E,D]);E.props.hideOnClick===!0&&(E.clearDelayTimeouts(),E.hide(),be=!0,setTimeout(function(){be=!1}),E.state.isMounted||z())}}function H(){le=!0}function G(){le=!1}function oe(){var D=yt();D.addEventListener("mousedown",U,!0),D.addEventListener("touchend",U,f),D.addEventListener("touchstart",G,f),D.addEventListener("touchmove",H,f)}function z(){var D=yt();D.removeEventListener("mousedown",U,!0),D.removeEventListener("touchend",U,f),D.removeEventListener("touchstart",G,f),D.removeEventListener("touchmove",H,f)}function De(D,K){Ce(D,function(){!E.state.isVisible&&fe.parentNode&&fe.parentNode.contains(fe)&&K()})}function Fe(D,K){Ce(D,K)}function Ce(D,K){var te=un().box;function ge(we){we.target===te&&(j(te,"remove",ge),K())}if(D===0)return Line truncated
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var ln=function(){return"innerHTML"};function Yt(g,w){g[ln()]=w}function or(g){var w=J();return g===!0?w.className=a:(w.className=c,V(g)?w.appendChild(g):Yt(w,g)),w}function Nn(g,w){V(w.content)?(Yt(g,""),g.appendChild(w.content)):typeof w.content!="function"&&(w.allowHTML?Yt(g,w.content):g.textContent=w.content)}function Xt(g){var w=g.firstElementChild,C=Y(w.children);return{box:w,content:C.find(function(L){return L.classList.contains(i)}),arrow:C.find(function(L){return L.classList.contains(a)||L.classList.contains(c)}),backdrop:C.find(function(L){return L.classList.contains(o)})}}function ar(g){var w=J(),C=J();C.className=n,C.setAttribute("data-state","hidden"),C.setAttribute("tabindex","-1");var L=J();L.className=i,L.setAttribute("data-state","hidden"),Nn(L,g.props),w.appendChild(C),C.appendChild(L),q(g.props,g.props);function q(W,B){var be=Xt(w),le=be.box,pe=be.content,ye=be.arrow;B.theme?le.setAttribute("data-theme",B.theme):le.removeAttribute("data-theme"),typeof B.animation=="string"?le.setAttribute("data-animation",B.animation):le.removeAttribute("data-animation"),B.inertia?le.setAttribute("data-inertia",""):le.removeAttribute("data-inertia"),le.style.maxWidth=typeof B.maxWidth=="number"?B.maxWidth+"px":B.maxWidth,B.role?le.setAttribute("role",B.role):le.removeAttribute("role"),(W.content!==B.content||W.allowHTML!==B.allowHTML)&&Nn(pe,g.props),B.arrow?ye?W.arrow!==B.arrow&&(le.removeChild(ye),le.appendChild(or(B.arrow))):le.appendChild(or(B.arrow)):ye&&le.removeChild(ye)}return{popper:w,onUpdate:q}}ar.$$tippy=!0;var sr=1,yn=[],wn=[];function cn(g,w){var C=ir(g,Object.assign({},Ze,{},ot(ne(w)))),L,q,W,B=!1,be=!1,le=!1,pe=!1,ye,Te,je,Ae=[],Ie=S(Re,C.interactiveDebounce),re,he=sr++,ve=null,ee=A(C.plugins),ie={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},E={id:he,reference:g,popper:J(),popperInstance:ve,props:C,state:ie,plugins:ee,clearDelayTimeouts:Ft,setProps:dn,setContent:Qt,show:kt,hide:$n,hideWithInteractivity:Zt,enable:wt,disable:et,unmount:Sn,destroy:Wn};if(!C.render)return zt(!0,"render() function has not been supplied."),E;var Ge=C.render(E),fe=Ge.popper,Lt=Ge.onUpdate;fe.setAttribute("data-tippy-root",""),fe.id="tippy-"+E.id,E.popper=fe,g._tippy=E,fe._tippy=E;var bt=ee.map(function(D){return D.fn(E)}),Gt=g.hasAttribute("aria-expanded");return Me(),T(),s(),b("onCreate",[E]),C.showOnCreate&&$e(),fe.addEventListener("mouseenter",function(){E.props.interactive&&E.state.isVisible&&E.clearDelayTimeouts()}),fe.addEventListener("mouseleave",function(D){E.props.interactive&&E.props.trigger.indexOf("mouseenter")>=0&&(yt().addEventListener("mousemove",Ie),Ie(D))}),E;function Kt(){var D=E.props.touch;return Array.isArray(D)?D:[D,0]}function Jt(){return Kt()[0]==="hold"}function rt(){var D;return!!((D=E.props.render)!=null&&D.$$tippy)}function lt(){return re||g}function yt(){var D=lt().parentNode;return D?v(D):document}function un(){return Xt(fe)}function d(D){return E.state.isMounted&&!E.state.isVisible||P.isTouch||ye&&ye.type==="focus"?0:y(E.props.delay,D?0:1,Ze.delay)}function s(){fe.style.pointerEvents=E.props.interactive&&E.state.isVisible?"":"none",fe.style.zIndex=""+E.props.zIndex}function b(D,K,te){if(te===void 0&&(te=!0),bt.forEach(function(we){we[D]&&we[D].apply(void 0,K)}),te){var ge;(ge=E.props)[D].apply(ge,K)}}function _(){var D=E.props.aria;if(D.content){var K="aria-"+D.content,te=fe.id,ge=I(E.props.triggerTarget||g);ge.forEach(function(we){var Ke=we.getAttribute(K);if(E.state.isVisible)we.setAttribute(K,Ke?Ke+" "+te:te);else{var Je=Ke&&Ke.replace(te,"").trim();Je?we.setAttribute(K,Je):we.removeAttribute(K)}})}}function T(){if(!(Gt||!E.props.aria.expanded)){var D=I(E.props.triggerTarget||g);D.forEach(function(K){E.props.interactive?K.setAttribute("aria-expanded",E.state.isVisible&&K===lt()?"true":"false"):K.removeAttribute("aria-expanded")})}}function F(){yt().removeEventListener("mousemove",Ie),yn=yn.filter(function(D){return D!==Ie})}function U(D){if(!(P.isTouch&&(le||D.type==="mousedown"))&&!(E.props.interactive&&fe.contains(D.target))){if(lt().contains(D.target)){if(P.isTouch||E.state.isVisible&&E.props.trigger.indexOf("click")>=0)return}else b("onClickOutside",[E,D]);E.props.hideOnClick===!0&&(E.clearDelayTimeouts(),E.hide(),be=!0,setTimeout(function(){be=!1}),E.state.isMounted||z())}}function H(){le=!0}function G(){le=!1}function oe(){var D=yt();D.addEventListener("mousedown",U,!0),D.addEventListener("touchend",U,f),D.addEventListener("touchstart",G,f),D.addEventListener("touchmove",H,f)}function z(){var D=yt();D.removeEventListener("mousedown",U,!0),D.removeEventListener("touchend",U,f),D.removeEventListener("touchstart",G,f),D.removeEventListener("touchmove",H,f)}function De(D,K){Ce(D,function(){!E.state.isVisible&&fe.parentNode&&fe.parentNode.contains(fe)&&K()})}function Fe(D,K){Ce(D,K)}function Ce(D,K){var te=un().box;function ge(we){we.target===te&&(j(te,"remove",ge),K())}if(D===0)return Line truncated
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
@@ -22,7 +22,7 @@
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
`,`1) content: element.innerHTML
`,"2) content: () => element.cloneNode(true)"].join(" "));var be=q.reduce(function(le,pe){var ye=pe&&cn(pe,L);return ye&&le.push(ye),le},[]);return V(g)?be[0]:be}dt.defaultProps=Ze,dt.setDefaultProps=Wr,dt.currentInput=P;var lr=function(w){var C=w===void 0?{}:w,L=C.exclude,q=C.duration;wn.forEach(function(W){var B=!1;if(L&&(B=Q(L)?W.reference===L:W.popper===L.popper),!B){var be=W.props.duration;W.setProps({duration:q}),W.hide(),W.state.isDestroyed||W.setProps({duration:be})}})},cr=Object.assign({},t.applyStyles,{effect:function(w){var C=w.state,L={popper:{position:C.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(C.elements.popper.style,L.popper),C.styles=L,C.elements.arrow&&Object.assign(C.elements.arrow.style,L.arrow)}}),fr=function(w,C){var L;C===void 0&&(C={}),zt(!Array.isArray(w),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(w)].join(" "));var q=w,W=[],B,be=C.overrides,le=[],pe=!1;function ye(){W=q.map(function(ee){return ee.reference})}function Te(ee){q.forEach(function(ie){ee?ie.enable():ie.disable()})}function je(ee){return q.map(function(ie){var E=ie.setProps;return ie.setProps=function(Ge){E(Ge),ie.reference===B&&ee.setProps(Ge)},function(){ie.setProps=E}})}function Ae(ee,ie){var E=W.indexOf(ie);if(ie!==B){B=ie;var Ge=(be||[]).concat("content").reduce(function(fe,Lt){return fe[Lt]=q[E].props[Lt],fe},{});ee.setProps(Object.assign({},Ge,{getReferenceClientRect:typeof Ge.getReferenceClientRect=="function"?Ge.getReferenceClientRect:function(){return ie.getBoundingClientRect()}}))}}Te(!1),ye();var Ie={fn:function(){return{onDestroy:function(){Te(!0)},onHidden:function(){B=null},onClickOutside:function(E){E.props.showOnCreate&&!pe&&(pe=!0,B=null)},onShow:function(E){E.props.showOnCreate&&!pe&&(pe=!0,Ae(E,W[0]))},onTrigger:function(E,Ge){Ae(E,Ge.currentTarget)}}}},re=dt(J(),Object.assign({},x(C,["overrides"]),{plugins:[Ie].concat(C.plugins||[]),triggerTarget:W,popperOptions:Object.assign({},C.popperOptions,{modifiers:[].concat(((L=C.popperOptions)==null?void 0:L.modifiers)||[],[cr])})})),he=re.show;re.show=function(ee){if(he(),!B&&ee==null)return Ae(re,W[0]);if(!(B&&ee==null)){if(typeof ee=="number")return W[ee]&&Ae(re,W[ee]);if(q.includes(ee)){var ie=ee.reference;return Ae(re,ie)}if(W.includes(ee))return Ae(re,ee)}},re.showNext=function(){var ee=W[0];if(!B)return re.show(0);var ie=W.indexOf(B);re.show(W[ie+1]||ee)},re.showPrevious=function(){var ee=W[W.length-1];if(!B)return re.show(ee);var ie=W.indexOf(B),E=W[ie-1]||ee;re.show(E)};var ve=re.setProps;return re.setProps=function(ee){be=ee.overrides||be,ve(ee)},re.setInstances=function(ee){Te(!0),le.forEach(function(ie){return ie()}),q=ee,Te(!1),ye(),je(re),re.setProps({triggerTarget:W})},le=je(re),re},ur={mouseover:"mouseenter",focusin:"focus",click:"click"};function qt(g,w){zt(!(w&&w.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var C=[],L=[],q=!1,W=w.target,B=x(w,["target"]),be=Object.assign({},B,{trigger:"manual",touch:!1}),le=Object.assign({},B,{showOnCreate:!0}),pe=dt(g,be),ye=I(pe);function Te(he){if(!(!he.target||q)){var ve=he.target.closest(W);if(ve){var ee=ve.getAttribute("data-tippy-trigger")||w.trigger||Ze.trigger;if(!ve._tippy&&!(he.type==="touchstart"&&typeof le.touch=="boolean")&&!(he.type!=="touchstart"&&ee.indexOf(ur[he.type])<0)){var ie=dt(ve,le);ie&&(L=L.concat(ie))}}}}function je(he,ve,ee,ie){ie===void 0&&(ie=!1),he.addEventListener(ve,ee,ie),C.push({node:he,eventType:ve,handler:ee,options:ie})}function Ae(he){var ve=he.reference;je(ve,"touchstart",Te,f),je(ve,"mouseover",Te),je(ve,"focusin",Te),je(ve,"click",Te)}function Ie(){C.forEach(function(he){var ve=he.node,ee=he.eventType,ie=he.handler,E=he.options;ve.removeEventListener(ee,ie,E)}),C=[]}function re(he){var ve=he.destroy,ee=he.enable,ie=he.disable;he.destroy=function(E){E===void 0&&(E=!0),E&&L.forEach(function(Ge){Ge.destroy()}),L=[],Ie(),ve()},he.enable=function(){ee(),L.forEach(function(E){return E.enable()}),q=!1},he.disable=function(){ie(),L.forEach(function(E){return E.disable()}),q=!0},Ae(he)}return ye.forEach(re),pe}var dr={name:"animateFill",defaultValue:!1,fn:function(w){var C;if(!((C=w.props.render)!=null&&C.$$tippy))return zt(w.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var L=Xt(w.popper),q=L.box,W=L.content,B=w.props.animateFill?Vr():null;return{onCreate:function(){B&&(q.insertBefore(B,q.firstElementChild),q.setAttribute("data-animatefill",""),q.style.overflow="hidden",w.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(B){var le=q.style.transitionDuration,pe=Number(le.replace("ms",""));W.style.transitionDelay=Math.round(pe/10)+"ms",B.style.transitionDuration=le,h([B],"visible")}},onShow:function(){B&&(B.style.transitionDuration="0ms")},onHide:function(){B&&h([B],"hidden")}}}};func Line truncated
`,"2) content: () => element.cloneNode(true)"].join(" "));var be=q.reduce(function(le,pe){var ye=pe&&cn(pe,L);return ye&&le.push(ye),le},[]);return V(g)?be[0]:be}dt.defaultProps=Ze,dt.setDefaultProps=$r,dt.currentInput=P;var lr=function(w){var C=w===void 0?{}:w,L=C.exclude,q=C.duration;wn.forEach(function(W){var B=!1;if(L&&(B=Q(L)?W.reference===L:W.popper===L.popper),!B){var be=W.props.duration;W.setProps({duration:q}),W.hide(),W.state.isDestroyed||W.setProps({duration:be})}})},cr=Object.assign({},t.applyStyles,{effect:function(w){var C=w.state,L={popper:{position:C.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(C.elements.popper.style,L.popper),C.styles=L,C.elements.arrow&&Object.assign(C.elements.arrow.style,L.arrow)}}),fr=function(w,C){var L;C===void 0&&(C={}),zt(!Array.isArray(w),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(w)].join(" "));var q=w,W=[],B,be=C.overrides,le=[],pe=!1;function ye(){W=q.map(function(ee){return ee.reference})}function Te(ee){q.forEach(function(ie){ee?ie.enable():ie.disable()})}function je(ee){return q.map(function(ie){var E=ie.setProps;return ie.setProps=function(Ge){E(Ge),ie.reference===B&&ee.setProps(Ge)},function(){ie.setProps=E}})}function Ae(ee,ie){var E=W.indexOf(ie);if(ie!==B){B=ie;var Ge=(be||[]).concat("content").reduce(function(fe,Lt){return fe[Lt]=q[E].props[Lt],fe},{});ee.setProps(Object.assign({},Ge,{getReferenceClientRect:typeof Ge.getReferenceClientRect=="function"?Ge.getReferenceClientRect:function(){return ie.getBoundingClientRect()}}))}}Te(!1),ye();var Ie={fn:function(){return{onDestroy:function(){Te(!0)},onHidden:function(){B=null},onClickOutside:function(E){E.props.showOnCreate&&!pe&&(pe=!0,B=null)},onShow:function(E){E.props.showOnCreate&&!pe&&(pe=!0,Ae(E,W[0]))},onTrigger:function(E,Ge){Ae(E,Ge.currentTarget)}}}},re=dt(J(),Object.assign({},x(C,["overrides"]),{plugins:[Ie].concat(C.plugins||[]),triggerTarget:W,popperOptions:Object.assign({},C.popperOptions,{modifiers:[].concat(((L=C.popperOptions)==null?void 0:L.modifiers)||[],[cr])})})),he=re.show;re.show=function(ee){if(he(),!B&&ee==null)return Ae(re,W[0]);if(!(B&&ee==null)){if(typeof ee=="number")return W[ee]&&Ae(re,W[ee]);if(q.includes(ee)){var ie=ee.reference;return Ae(re,ie)}if(W.includes(ee))return Ae(re,ee)}},re.showNext=function(){var ee=W[0];if(!B)return re.show(0);var ie=W.indexOf(B);re.show(W[ie+1]||ee)},re.showPrevious=function(){var ee=W[W.length-1];if(!B)return re.show(ee);var ie=W.indexOf(B),E=W[ie-1]||ee;re.show(E)};var ve=re.setProps;return re.setProps=function(ee){be=ee.overrides||be,ve(ee)},re.setInstances=function(ee){Te(!0),le.forEach(function(ie){return ie()}),q=ee,Te(!1),ye(),je(re),re.setProps({triggerTarget:W})},le=je(re),re},ur={mouseover:"mouseenter",focusin:"focus",click:"click"};function qt(g,w){zt(!(w&&w.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var C=[],L=[],q=!1,W=w.target,B=x(w,["target"]),be=Object.assign({},B,{trigger:"manual",touch:!1}),le=Object.assign({},B,{showOnCreate:!0}),pe=dt(g,be),ye=I(pe);function Te(he){if(!(!he.target||q)){var ve=he.target.closest(W);if(ve){var ee=ve.getAttribute("data-tippy-trigger")||w.trigger||Ze.trigger;if(!ve._tippy&&!(he.type==="touchstart"&&typeof le.touch=="boolean")&&!(he.type!=="touchstart"&&ee.indexOf(ur[he.type])<0)){var ie=dt(ve,le);ie&&(L=L.concat(ie))}}}}function je(he,ve,ee,ie){ie===void 0&&(ie=!1),he.addEventListener(ve,ee,ie),C.push({node:he,eventType:ve,handler:ee,options:ie})}function Ae(he){var ve=he.reference;je(ve,"touchstart",Te,f),je(ve,"mouseover",Te),je(ve,"focusin",Te),je(ve,"click",Te)}function Ie(){C.forEach(function(he){var ve=he.node,ee=he.eventType,ie=he.handler,E=he.options;ve.removeEventListener(ee,ie,E)}),C=[]}function re(he){var ve=he.destroy,ee=he.enable,ie=he.disable;he.destroy=function(E){E===void 0&&(E=!0),E&&L.forEach(function(Ge){Ge.destroy()}),L=[],Ie(),ve()},he.enable=function(){ee(),L.forEach(function(E){return E.enable()}),q=!1},he.disable=function(){ie(),L.forEach(function(E){return E.disable()}),q=!0},Ae(he)}return ye.forEach(re),pe}var dr={name:"animateFill",defaultValue:!1,fn:function(w){var C;if(!((C=w.props.render)!=null&&C.$$tippy))return zt(w.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var L=Xt(w.popper),q=L.box,W=L.content,B=w.props.animateFill?Ur():null;return{onCreate:function(){B&&(q.insertBefore(B,q.firstElementChild),q.setAttribute("data-animatefill",""),q.style.overflow="hidden",w.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(B){var le=q.style.transitionDuration,pe=Number(le.replace("ms",""));W.style.transitionDelay=Math.round(pe/10)+"ms",B.style.transitionDuration=le,h([B],"visible")}},onShow:function(){B&&(B.style.transitionDuration="0ms")},onHide:function(){B&&h([B],"hidden")}}}};func Line truncated
/*! Bundled license information:
js-md5/src/md5.js:
@@ -38,7 +38,7 @@ js-md5/src/md5.js:
sortablejs/modular/sortable.esm.js:
(**!
* Sortable 1.15.6
* Sortable 1.15.7
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
@@ -1,9 +1,9 @@
var Ft=Math.min,vt=Math.max,Ht=Math.round;var st=n=>({x:n,y:n}),ji={left:"right",right:"left",bottom:"top",top:"bottom"},qi={start:"end",end:"start"};function De(n,t,e){return vt(n,Ft(t,e))}function Vt(n,t){return typeof n=="function"?n(t):n}function wt(n){return n.split("-")[0]}function Wt(n){return n.split("-")[1]}function Ae(n){return n==="x"?"y":"x"}function Ce(n){return n==="y"?"height":"width"}var Ji=new Set(["top","bottom"]);function ht(n){return Ji.has(wt(n))?"y":"x"}function Le(n){return Ae(ht(n))}function Je(n,t,e){e===void 0&&(e=!1);let i=Wt(n),o=Le(n),s=Ce(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Bt(r)),[r,Bt(r)]}function Qe(n){let t=Bt(n);return[ie(n),t,ie(t)]}function ie(n){return n.replace(/start|end/g,t=>qi[t])}var je=["left","right"],qe=["right","left"],Qi=["top","bottom"],Zi=["bottom","top"];function tn(n,t,e){switch(n){case"top":case"bottom":return e?t?qe:je:t?je:qe;case"left":case"right":return t?Qi:Zi;default:return[]}}function Ze(n,t,e,i){let o=Wt(n),s=tn(wt(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(ie)))),s}function Bt(n){return n.replace(/left|right|bottom|top/g,t=>ji[t])}function en(n){return{top:0,right:0,bottom:0,left:0,...n}}function ti(n){return typeof n!="number"?en(n):{top:n,right:n,bottom:n,left:n}}function Ot(n){let{x:t,y:e,width:i,height:o}=n;return{width:i,height:o,top:e,left:t,right:t+i,bottom:e+o,x:t,y:e}}function ei(n,t,e){let{reference:i,floating:o}=n,s=ht(t),r=Le(t),a=Ce(r),l=wt(t),c=s==="y",f=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,p=i[a]/2-o[a]/2,u;switch(l){case"top":u={x:f,y:i.y-o.height};break;case"bottom":u={x:f,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:d};break;case"left":u={x:i.x-o.width,y:d};break;default:u={x:i.x,y:i.y}}switch(Wt(t)){case"start":u[r]-=p*(e&&c?-1:1);break;case"end":u[r]+=p*(e&&c?-1:1);break}return u}var ii=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:f,y:d}=ei(c,i,l),p=i,u={},g=0;for(let m=0;m<a.length;m++){let{name:S,fn:E}=a[m],{x:y,y:D,data:A,reset:C}=await E({x:f,y:d,initialPlacement:i,placement:p,strategy:o,middlewareData:u,rects:c,platform:r,elements:{reference:n,floating:t}});f=y??f,d=D??d,u={...u,[S]:{...u[S],...A}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):C.rects),{x:f,y:d}=ei(c,p,l)),m=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:u}};async function Ie(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:u=0}=Vt(t,n),g=ti(u),S=a[p?d==="floating"?"reference":"floating":d],E=Ot(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(S)))==null||e?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),y=d==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(D))?await(s.getScale==null?void 0:s.getScale(D))||{x:1,y:1}:{x:1,y:1},C=Ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:D,strategy:l}):y);return{top:(E.top-C.top+g.top)/A.y,bottom:(C.bottom-E.bottom+g.bottom)/A.y,left:(E.left-C.left+g.left)/A.x,right:(C.right-E.right+g.right)/A.x}}var ni=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...S}=Vt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let E=wt(o),y=ht(a),D=wt(a)===a,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=p||(D||!m?[Bt(a)]:Qe(a)),F=g!=="none";!p&&F&&C.push(...Ze(a,m,g,A));let q=[a,...C],J=await Ie(t,S),_=[],W=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&_.push(J[E]),d){let H=Je(o,r,A);_.push(J[H[0]],J[H[1]])}if(W=[...W,{placement:o,overflows:_}],!_.every(H=>H<=0)){var L,X;let H=(((L=s.flip)==null?void 0:L.index)||0)+1,tt=q[H];if(tt&&(!(d==="alignment"?y!==ht(tt):!1)||W.every(B=>ht(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:H,overflows:W},reset:{placement:tt}};let z=(X=W.filter(Y=>Y.overflows[0]<=0).sort((Y,B)=>Y.overflows[1]-B.overflows[1])[0])==null?void 0:X.placement;if(!z)switch(u){case"bestFit":{var M;let Y=(M=W.filter(B=>{if(F){let et=ht(B.placement);return et===y||et==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(et=>et>0).reduceLine truncated
var Ht=Math.min,vt=Math.max,Wt=Math.round;var st=i=>({x:i,y:i}),Ji={left:"right",right:"left",bottom:"top",top:"bottom"};function De(i,t,e){return vt(i,Ht(t,e))}function Vt(i,t){return typeof i=="function"?i(t):i}function yt(i){return i.split("-")[0]}function zt(i){return i.split("-")[1]}function Ae(i){return i==="x"?"y":"x"}function Ce(i){return i==="y"?"height":"width"}function ht(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function Le(i){return Ae(ht(i))}function Qe(i,t,e){e===void 0&&(e=!1);let n=zt(i),o=Le(i),s=Ce(o),r=o==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Ft(r)),[r,Ft(r)]}function Ze(i){let t=Ft(i);return[ne(i),t,ne(t)]}function ne(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var qe=["left","right"],Je=["right","left"],Qi=["top","bottom"],Zi=["bottom","top"];function tn(i,t,e){switch(i){case"top":case"bottom":return e?t?Je:qe:t?qe:Je;case"left":case"right":return t?Qi:Zi;default:return[]}}function ti(i,t,e,n){let o=zt(i),s=tn(yt(i),e==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(ne)))),s}function Ft(i){let t=yt(i);return Ji[t]+i.slice(t.length)}function en(i){return{top:0,right:0,bottom:0,left:0,...i}}function ei(i){return typeof i!="number"?en(i):{top:i,right:i,bottom:i,left:i}}function Ot(i){let{x:t,y:e,width:n,height:o}=i;return{width:n,height:o,top:e,left:t,right:t+n,bottom:e+o,x:t,y:e}}function ii(i,t,e){let{reference:n,floating:o}=i,s=ht(t),r=Le(t),a=Ce(r),l=yt(t),c=s==="y",f=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,u=n[a]/2-o[a]/2,p;switch(l){case"top":p={x:f,y:n.y-o.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(zt(t)){case"start":p[r]-=u*(e&&c?-1:1);break;case"end":p[r]+=u*(e&&c?-1:1);break}return p}async function ni(i,t){var e;t===void 0&&(t={});let{x:n,y:o,platform:s,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:u=!1,padding:p=0}=Vt(t,i),g=ei(p),x=a[u?d==="floating"?"reference":"floating":d],D=Ot(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(x)))==null||e?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),w=d==="floating"?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},M=Ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:A,strategy:l}):w);return{top:(D.top-M.top+g.top)/E.y,bottom:(M.bottom-D.bottom+g.bottom)/E.y,left:(D.left-M.left+g.left)/E.x,right:(M.right-D.right+g.right)/E.x}}var nn=50,oi=async(i,t,e)=>{let{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ni},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:o}),{x:f,y:d}=ii(c,n,l),u=n,p=0,g={};for(let m=0;m<s.length;m++){let x=s[m];if(!x)continue;let{name:D,fn:w}=x,{x:A,y:E,data:M,reset:C}=await w({x:f,y:d,initialPlacement:n,placement:u,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:i,floating:t}});f=A??f,d=E??d,g[D]={...g[D],...M},C&&p<nn&&(p++,typeof C=="object"&&(C.placement&&(u=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:o}):C.rects),{x:f,y:d}=ii(c,u,l)),m=-1)}return{x:f,y:d,placement:u,strategy:o,middlewareData:g}};var si=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=Vt(i,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let D=yt(o),w=ht(a),A=yt(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=u||(A||!m?[Ft(a)]:Ze(a)),C=g!=="none";!u&&C&&M.push(...ti(a,m,g,E));let q=[a,...M],J=await l.detectOverflow(t,x),R=[],V=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&R.push(J[D]),d){let H=Qe(o,r,E);R.push(J[H[0]],J[H[1]])}if(V=[...V,{placement:o,overflows:R}],!R.every(H=>H<=0)){var L,K;let H=(((L=s.flip)==null?void 0:L.index)||0)+1,tt=q[H];if(tt&&(!(d==="alignment"?w!==ht(tt):!1)||V.every(F=>ht(F.placement)===w?F.overflows[0]>0:!0)))return{data:{index:H,overflows:V},reset:{placement:tt}};let z=(K=V.filter(Y=>Y.overflows[0]<=0).sort((Y,F)=>Y.overflows[1]-F.overflows[1])[0])==null?void 0:K.placement;if(!z)switch(p){case"bestFit":{var N;let Y=(N=V.filter(F=>{if(C){let et=ht(F.placement);return et===w||et==="y"}return!0}).map(F=>[F.placeLine truncated
/*! Bundled license information:
sortablejs/modular/sortable.esm.js:
(**!
* Sortable 1.15.6
* Sortable 1.15.7
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
+1 -1
View File
@@ -1 +1 @@
(()=>{var M=Math.min,L=Math.max,B=Math.round,H=Math.floor,S=e=>({x:e,y:e});function q(e,t,i){return L(e,M(t,i))}function j(e,t){return typeof e=="function"?e(t):e}function W(e){return e.split("-")[0]}function Q(e){return e.split("-")[1]}function Z(e){return e==="x"?"y":"x"}function oe(e){return e==="y"?"height":"width"}var Pe=new Set(["top","bottom"]);function z(e){return Pe.has(W(e))?"y":"x"}function se(e){return Z(z(e))}function De(e){return{top:0,right:0,bottom:0,left:0,...e}}function re(e){return typeof e!="number"?De(e):{top:e,right:e,bottom:e,left:e}}function E(e){let{x:t,y:i,width:n,height:s}=e;return{width:n,height:s,top:i,left:t,right:t+n,bottom:i+s,x:t,y:i}}function le(e,t,i){let{reference:n,floating:s}=e,l=z(t),o=se(t),r=oe(o),c=W(t),a=l==="y",f=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,h=n[r]/2-s[r]/2,u;switch(c){case"top":u={x:f,y:n.y-s.height};break;case"bottom":u={x:f,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:d};break;case"left":u={x:n.x-s.width,y:d};break;default:u={x:n.x,y:n.y}}switch(Q(t)){case"start":u[o]-=h*(i&&a?-1:1);break;case"end":u[o]+=h*(i&&a?-1:1);break}return u}var ce=async(e,t,i)=>{let{placement:n="bottom",strategy:s="absolute",middleware:l=[],platform:o}=i,r=l.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),a=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:d}=le(a,n,c),h=n,u={},m=0;for(let p=0;p<r.length;p++){let{name:w,fn:g}=r[p],{x,y,data:A,reset:b}=await g({x:f,y:d,initialPlacement:n,placement:h,strategy:s,middlewareData:u,rects:a,platform:o,elements:{reference:e,floating:t}});f=x??f,d=y??d,u={...u,[w]:{...u[w],...A}},b&&m<=50&&(m++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(a=b.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):b.rects),{x:f,y:d}=le(a,h,c)),p=-1)}return{x:f,y:d,placement:h,strategy:s,middlewareData:u}};async function ae(e,t){var i;t===void 0&&(t={});let{x:n,y:s,platform:l,rects:o,elements:r,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:u=0}=j(t,e),m=re(u),w=r[h?d==="floating"?"reference":"floating":d],g=E(await l.getClippingRect({element:(i=await(l.isElement==null?void 0:l.isElement(w)))==null||i?w:w.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(r.floating)),boundary:a,rootBoundary:f,strategy:c})),x=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,y=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r.floating)),A=await(l.isElement==null?void 0:l.isElement(y))?await(l.getScale==null?void 0:l.getScale(y))||{x:1,y:1}:{x:1,y:1},b=E(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:x,offsetParent:y,strategy:c}):x);return{top:(g.top-b.top+m.top)/A.y,bottom:(b.bottom-g.bottom+m.bottom)/A.y,left:(g.left-b.left+m.left)/A.x,right:(b.right-g.right+m.right)/A.x}}var Fe=new Set(["left","top"]);async function Me(e,t){let{placement:i,platform:n,elements:s}=e,l=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=W(i),r=Q(i),c=z(i)==="y",a=Fe.has(o)?-1:1,f=l&&c?-1:1,d=j(t,e),{mainAxis:h,crossAxis:u,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return r&&typeof m=="number"&&(u=r==="end"?m*-1:m),c?{x:u*f,y:h*a}:{x:h*a,y:u*f}}var fe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,n;let{x:s,y:l,placement:o,middlewareData:r}=t,c=await Me(t,e);return o===((i=r.offset)==null?void 0:i.placement)&&(n=r.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:l+c.y,data:{...c,placement:o}}}}},de=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:i,y:n,placement:s}=t,{mainAxis:l=!0,crossAxis:o=!1,limiter:r={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...c}=j(e,t),a={x:i,y:n},f=await ae(t,c),d=z(W(s)),h=Z(d),u=a[h],m=a[d];if(l){let w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",x=u+f[w],y=u-f[g];u=q(x,u,y)}if(o){let w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=m+f[w],y=m-f[g];m=q(x,m,y)}let p=r.fn({...t,[h]:u,[d]:m});return{...p,data:{x:p.x-i,y:p.y-n,enabled:{[h]:l,[d]:o}}}}}};function X(){return typeof window<"u"}function P(e){return he(e)?(e.nodeName||"").toLowerCase():"#document"}function v(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function O(e){var t;return(t=(he(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function he(e){return X()?e instanceof Node||e instanceof v(e).Node:!1}function R(e){return X()?e instanceof Element||e instanceof v(e).Element:!1}function T(e){return X()?e instanceof HTMLElement||e instanceof v(e).HTMLElement:!1}function ue(e){return!X()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof v(e).ShadowRoot}var $e=new Set(["inline","contents"]);function N(e){let{overflow:t,overflowX:i,overflowY:Line truncated
(()=>{var N=Math.min,k=Math.max,H=Math.round,_=Math.floor,O=e=>({x:e,y:e});function Z(e,t,o){return k(e,N(t,o))}function j(e,t){return typeof e=="function"?e(t):e}function Y(e){return e.split("-")[0]}function ee(e){return e.split("-")[1]}function te(e){return e==="x"?"y":"x"}function re(e){return e==="y"?"height":"width"}function z(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function le(e){return te(z(e))}function Fe(e){return{top:0,right:0,bottom:0,left:0,...e}}function ce(e){return typeof e!="number"?Fe(e):{top:e,right:e,bottom:e,left:e}}function P(e){let{x:t,y:o,width:n,height:s}=e;return{width:n,height:s,top:o,left:t,right:t+n,bottom:o+s,x:t,y:o}}function ae(e,t,o){let{reference:n,floating:s}=e,l=z(t),i=le(t),r=re(i),c=Y(t),a=l==="y",d=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,h=n[r]/2-s[r]/2,f;switch(c){case"top":f={x:d,y:n.y-s.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-s.width,y:u};break;default:f={x:n.x,y:n.y}}switch(ee(t)){case"start":f[i]-=h*(o&&a?-1:1);break;case"end":f[i]+=h*(o&&a?-1:1);break}return f}async function fe(e,t){var o;t===void 0&&(t={});let{x:n,y:s,platform:l,rects:i,elements:r,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=j(t,e),m=ce(f),w=r[h?u==="floating"?"reference":"floating":u],g=P(await l.getClippingRect({element:(o=await(l.isElement==null?void 0:l.isElement(w)))==null||o?w:w.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(r.floating)),boundary:a,rootBoundary:d,strategy:c})),x=u==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,y=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r.floating)),b=await(l.isElement==null?void 0:l.isElement(y))?await(l.getScale==null?void 0:l.getScale(y))||{x:1,y:1}:{x:1,y:1},L=P(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:x,offsetParent:y,strategy:c}):x);return{top:(g.top-L.top+m.top)/b.y,bottom:(L.bottom-g.bottom+m.bottom)/b.y,left:(g.left-L.left+m.left)/b.x,right:(L.right-g.right+m.right)/b.x}}var Me=50,de=async(e,t,o)=>{let{placement:n="bottom",strategy:s="absolute",middleware:l=[],platform:i}=o,r=i.detectOverflow?i:{...i,detectOverflow:fe},c=await(i.isRTL==null?void 0:i.isRTL(t)),a=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:u}=ae(a,n,c),h=n,f=0,m={};for(let p=0;p<l.length;p++){let w=l[p];if(!w)continue;let{name:g,fn:x}=w,{x:y,y:b,data:L,reset:S}=await x({x:d,y:u,initialPlacement:n,placement:h,strategy:s,middlewareData:m,rects:a,platform:r,elements:{reference:e,floating:t}});d=y??d,u=b??u,m[g]={...m[g],...L},S&&f<Me&&(f++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(a=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:d,y:u}=ae(a,h,c)),p=-1)}return{x:d,y:u,placement:h,strategy:s,middlewareData:m}};var $e=new Set(["left","top"]);async function Ne(e,t){let{placement:o,platform:n,elements:s}=e,l=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=Y(o),r=ee(o),c=z(o)==="y",a=$e.has(i)?-1:1,d=l&&c?-1:1,u=j(t,e),{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return r&&typeof m=="number"&&(f=r==="end"?m*-1:m),c?{x:f*d,y:h*a}:{x:h*a,y:f*d}}var ue=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;let{x:s,y:l,placement:i,middlewareData:r}=t,c=await Ne(t,e);return i===((o=r.offset)==null?void 0:o.placement)&&(n=r.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:l+c.y,data:{...c,placement:i}}}}},he=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:s,platform:l}=t,{mainAxis:i=!0,crossAxis:r=!1,limiter:c={fn:g=>{let{x,y}=g;return{x,y}}},...a}=j(e,t),d={x:o,y:n},u=await l.detectOverflow(t,a),h=z(Y(s)),f=te(h),m=d[f],p=d[h];if(i){let g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=m+u[g],b=m-u[x];m=Z(y,m,b)}if(r){let g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=p+u[g],b=p-u[x];p=Z(y,p,b)}let w=c.fn({...t,[f]:m,[h]:p});return{...w,data:{x:w.x-o,y:w.y-n,enabled:{[f]:i,[h]:r}}}}}};function G(){return typeof window<"u"}function F(e){return ge(e)?(e.nodeName||"").toLowerCase():"#document"}function v(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function A(e){var t;return(t=(ge(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ge(e){return G()?e instanceof Node||e instanceof v(e).Node:!1}function R(e){return G()?e instanceof Element||e instanceof v(e).Element:!1}function T(e){return G()?e instanceof HTMLElement||e instanceof v(e).HTMLElement:!1}function me(e){return!G()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof v(e).ShadowRoot}function B(e){let{overflow:t,overfLine truncated
+22 -22
View File
@@ -3,7 +3,7 @@
# Strict mode: exit on any error, undefined var, or pipe failure
set -euo pipefail
# Laad .env bestand uit dezelfde directory als dit script
# Load .env from the same directory as this script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ -f "$SCRIPT_DIR/.env" ]; then
set -a
@@ -19,9 +19,9 @@ fi
exec 2>&1
# Trap for clean error messages
trap 'echo "=== ❌ FOUT: Update mislukt op regel $LINENO (commando: $BASH_COMMAND) ===" >&2; exit 1' ERR
trap 'echo "=== ❌ ERROR: Update failed at line $LINENO (command: $BASH_COMMAND) ===" >&2; exit 1' ERR
# --- CONFIGURATION (uit env vars, met defaults) ---
# --- CONFIGURATION (from env vars, with defaults) ---
DB_NAME="${NITRO_DB_NAME:-habbo}"
DB_HOST="${NITRO_DB_HOST:-127.0.0.1}"
DB_PORT="${NITRO_DB_PORT:-3306}"
@@ -36,7 +36,7 @@ BACKUP_DIR="${NITRO_BACKUP_DIR:-$EMULATOR_DIR/Database Updates/backups}"
NITRO_CLIENT="${NITRO_CLIENT_SRC:-/var/www/Nitro-V3}"
NITRO_RENDERER="${NITRO_RENDERER_SRC:-/var/www/Nitro_Render_V3}"
# Kritieke URLs voor catalog icons (uit env, met huidige server defaults)
# Critical URLs for catalog icons (from env, with current server defaults)
NITRO_IMAGE_LIBRARY_URL="${NITRO_IMAGE_LIBRARY_URL:-https://epicnabbo.nl/gamedata/c_images/}"
NITRO_HOF_FURNITURE_URL="${NITRO_HOF_FURNITURE_URL:-https://epicnabbo.nl/gamedata/icons}"
NITRO_API_URL="${NITRO_API_URL:-https://ws.epicnabbo.nl}"
@@ -53,7 +53,7 @@ if [ -n "$DB_PASS" ]; then
fi
# ---------------------
# Helper: verwijder node_modules geforceerd (met sudo fallback) en herstel directory-eigenaar
# Helper: forcefully remove node_modules (with sudo fallback) and restore directory owner
clean_node_modules() {
rm -rf node_modules 2>/dev/null || sudo rm -rf node_modules 2>/dev/null || true
if [ "$(stat -c '%U' .)" != "$(whoami)" ] && command -v sudo &> /dev/null; then
@@ -73,14 +73,14 @@ git stash --include-untracked || true && git pull
# --- Automatic Safe Database Backup ---
echo "--> Creating automatic database backup before update..."
mkdir -p "$BACKUP_DIR"
mariadb-dump $MYSQL_CRED --force --skip-lock-tables "$DB_NAME" > "$BACKUP_DIR/backup_$(date +%Y%m%d_%H%M%S).sql" || echo "--> Backup heeft ontbrekende tabellen (niet kritisch) — update gaat verder"
mariadb-dump $MYSQL_CRED --force --skip-lock-tables "$DB_NAME" > "$BACKUP_DIR/backup_$(date +%Y%m%d_%H%M%S).sql" || echo "--> Backup has missing tables (not critical) — update continues"
# --- Automatic SQL Import (exclusief backup dir) ---
echo "--> Checking for new SQL files..."
if [ -d "$SQL_DIR" ]; then
find "$SQL_DIR" -name "*.sql" -mmin -10 -not -path "$BACKUP_DIR/*" -print0 2>/dev/null | while IFS= read -r -d '' sql_file; do
echo "--> Importing new SQL file: $(basename "$sql_file")"
mariadb $MYSQL_CRED --force "$DB_NAME" < "$sql_file" || echo "--> Fout bij importeren $(basename "$sql_file"), naar volgende..."
mariadb $MYSQL_CRED --force "$DB_NAME" < "$sql_file" || echo "--> Error importing $(basename "$sql_file"), moving to next..."
done
else
echo "--> SQL directory not found, skipping SQL import."
@@ -94,7 +94,7 @@ JAR_PATTERN="target/Habbo-*-jar-with-dependencies.jar"
JAR_FILE=$(basename "$(ls -t $JAR_PATTERN 2>/dev/null | head -n 1)")
if [ -z "$JAR_FILE" ]; then
echo "=== ❌ Geen jar-bestand gevonden met pattern: $JAR_PATTERN ==="
echo "=== ❌ No jar file found with pattern: $JAR_PATTERN ==="
exit 1
fi
@@ -152,15 +152,15 @@ fi
# ----------------------------------------
# 4. Sync Configs & UITexts (.example logica)
# 4. Sync Configs & UITexts (.example logic)
# ----------------------------------------
echo "--> Synchronizing configurations..."
mkdir -p "$GAMEDATA_CONF_DIR"
MERGE_SCRIPT="$(dirname "$0")/scripts/merge-config.cjs"
# Fase 1: Merge .example met live configs in dezelfde public directory
# zodat de Nitro client zelf altijd 100% complete configs heeft
# Phase 1: Merge .example with live configs in the same public directory
# so the Nitro client always has 100% complete configs
echo "--> Merging .example files with live configs in $NITRO_SRC_DIR..."
for example_file in "$NITRO_SRC_DIR"/*.example; do
[ -f "$example_file" ] || continue
@@ -175,7 +175,7 @@ for example_file in "$NITRO_SRC_DIR"/*.example; do
node "$MERGE_SCRIPT" "$example_file" "$live_path"
done
# Fase 2: Daarna dezelfde merge naar Gamedata/config voor de website
# Phase 2: Then merge the same to Gamedata/config for the website
echo "--> Merging Nitro config examples into Gamedata/config..."
for example_file in "$NITRO_SRC_DIR"/*.example; do
[ -f "$example_file" ] || continue
@@ -190,7 +190,7 @@ for example_file in "$NITRO_SRC_DIR"/*.example; do
node "$MERGE_SCRIPT" "$example_file" "$target_path"
done
# Fase 3: Sync de gemergde configs naar dist/configuration voor de live client
# Phase 3: Sync merged configs to dist/configuration for the live client
NITRO_DIST_CONFIG_DIR="$NITRO_CLIENT/dist/configuration"
if [ -d "$NITRO_DIST_CONFIG_DIR" ]; then
echo "--> Syncing merged configs to dist/configuration/..."
@@ -209,8 +209,8 @@ if [ -d "$NITRO_DIST_CONFIG_DIR" ]; then
done
fi
# Fase 4: Herstel kritieke icon URLs in renderer-config en ui-config
# (voorkomt dat git pull de URLs overschrijft met voorbeeldwaarden)
# Phase 4: Restore critical icon URLs in renderer-config and ui-config
# (prevents git pull from overwriting URLs with example values)
echo "--> Ensuring critical catalog icon URLs are correct..."
FORCE_CONFIG_SCRIPT=$(cat << 'PYEOF'
import json, sys, os
@@ -236,18 +236,18 @@ for path in paths:
env_val = os.environ.get(f'NITRO_{key.upper().replace(".", "_")}')
if env_val:
data[key] = env_val
# Forceer /config/ pad voor radio en soundboard
# Force /config/ path for radio and soundboard
if 'gamedata.url' in data:
data['radio.url'] = data['gamedata.url'] + '/config/radio-stations.json5?t=%timestamp%'
data['soundboard.url'] = data['gamedata.url'] + '/config/soundboard-sounds.json5?t=%timestamp%'
# Zet Google Ads uit
# Disable Google Ads
if 'show.google.ads' in data:
data['show.google.ads'] = False
with open(path, 'w') as f:
json.dump(data, f, indent=(4 if 'dist' not in path else None), separators=(',', ':') if 'dist' in path else (',', ': '))
print(f'--> [OK] Hersteld: {os.path.basename(path)}')
print(f'--> [OK] Fixed: {os.path.basename(path)}')
print('--> [OK] Catalog icon URLs zijn correct ingesteld')
print('--> [OK] Catalog icon URLs are set correctly')
PYEOF
)
cd "$NITRO_CLIENT" && NITRO_SRC_DIR="$NITRO_SRC_DIR" NITRO_DIST_CONFIG_DIR="$NITRO_DIST_CONFIG_DIR" \
@@ -337,9 +337,9 @@ for dir in "$NITRO_CLIENT" "$NITRO_RENDERER" "$EMULATOR_DIR" "$GAMEDATA_CONF_DIR
if [ "$OWNER" = "www-data:www-data" ] || [ "$(id -u)" -ne 0 ]; then
echo "--> [OK] $dir ($OWNER)"
else
echo "--> [WARN] $dir heeft eigenaar $OWNER ipv www-data:www-data"
echo "--> [WARN] $dir has owner $OWNER instead of www-data:www-data"
sudo chown -R www-data:www-data "$dir" 2>/dev/null || true
echo " Hersteld naar www-data:www-data"
echo " Restored to www-data:www-data"
fi
fi
done
@@ -358,5 +358,5 @@ fi
if [ "$ERRORS" -eq 0 ]; then
echo "=== ✅ Update 100% successfully completed! ==="
else
echo "=== ⚠️ Update completed with $ERRORS warning(s) — check bovenstaande output ==="
echo "=== ⚠️ Update completed with $ERRORS warning(s) — check output above ==="
fi