@agent-dock/cli 0.3.22 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +118 -28
- package/dist/cli.js.map +3 -3
- package/package.json +1 -1
- package/public/agent-dock.svg +1 -12
- package/public/apple-touch-icon.png +0 -0
- package/public/assets/{ImageLightbox-DSVEjfab.js → ImageLightbox-BKUhp3sI.js} +1 -1
- package/public/assets/{PromptEditor-B6CITkrn.js → PromptEditor-CQDuytUZ.js} +1 -1
- package/public/assets/index-1CLUk_QC.js +41 -0
- package/public/assets/{index-3nnaeOjV.css → index-Dk9FCdsE.css} +1 -1
- package/public/assets/{main-Vf3EflnQ.js → main-RwBI9Vfa.js} +294 -274
- package/public/assets/sourcesRouter-CaFMVpIS.js +1 -0
- package/public/brand/kitten-mark.svg +1 -0
- package/public/brand/wordmark-dark.svg +1 -0
- package/public/brand/wordmark-light.svg +1 -0
- package/public/favicon-32.png +0 -0
- package/public/index.html +3 -3
- package/public/sources-router.html +3 -3
- package/public/assets/index-CWUiS-aC.js +0 -41
- package/public/assets/sourcesRouter-DCf9D_Rs.js +0 -1
package/package.json
CHANGED
package/public/agent-dock.svg
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
|
-
<defs>
|
|
3
|
-
<linearGradient id="bg" x1="8" y1="5" x2="57" y2="61" gradientUnits="userSpaceOnUse"><stop stop-color="#292b31"/><stop offset="1" stop-color="#090a0d"/></linearGradient>
|
|
4
|
-
<linearGradient id="beam" x1="18" y1="45" x2="48" y2="17" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"/><stop offset="1" stop-color="#b8b9c2"/></linearGradient>
|
|
5
|
-
<linearGradient id="pulse" x1="38" y1="20" x2="50" y2="31" gradientUnits="userSpaceOnUse"><stop stop-color="#c4b5fd"/><stop offset="1" stop-color="#7c3aed"/></linearGradient>
|
|
6
|
-
</defs>
|
|
7
|
-
<rect width="64" height="64" rx="16" fill="url(#bg)"/>
|
|
8
|
-
<path d="M42 17H29c-8.3 0-15 6.7-15 15s6.7 15 15 15h13" fill="none" stroke="url(#beam)" stroke-width="5" stroke-linecap="round"/>
|
|
9
|
-
<path d="M42 25H30a7 7 0 0 0 0 14h12" fill="none" stroke="#71717a" stroke-width="4" stroke-linecap="round"/>
|
|
10
|
-
<circle cx="45" cy="25" r="5" fill="url(#pulse)" stroke="#ddd6fe" stroke-width="1.5"/>
|
|
11
|
-
<circle cx="45" cy="39" r="3" fill="#f4f4f5"/>
|
|
12
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 65" shape-rendering="crispEdges"><path fill="#f0e6e3" d="M10 0h3v1h-3zM50 1h1v1h-1zM14 2h1v1h-1zM15 3h1v1h-1zM19 6h1v1h-1zM20 7h1v1h-1zM21 8h1v1h-1zM40 9h1v1h-1zM32 10h1v1h-1zM25 11h1v1h-1zM43 12h1v1h-1zM32 14h2v1h-2zM45 33h4v1h-4zM24 34h1v1h-1zM57 37h1v1h-1zM15 40h1v1h-1zM27 40h1v1h-1zM15 41h1v1h-1zM61 41h1v1h-1zM15 42h1v1h-1zM17 42h1v1h-1zM60 42h1v1h-1zM16 43h2v1h-2zM16 44h1v1h-1zM17 45h2v1h-2zM25 45h1v1h-1zM22 46h2v1h-2zM6 49h1v1h-1zM49 62h1v1h-1z"/><path fill="#cbbdc1" d="M50 0h4v1h-4zM9 1h1v1h-1zM54 2h1v1h-1zM44 5h1v1h-1zM20 6h1v1h-1zM23 9h1v1h-1zM33 9h2v1h-2zM33 10h1v1h-1zM38 11h1v1h-1zM26 12h1v1h-1zM36 12h1v1h-1zM26 13h1v1h-1zM41 17h1v1h-1zM52 18h1v1h-1zM6 19h1v1h-1zM58 23h1v1h-1zM14 31h1v1h-1zM16 34h1v1h-1zM6 36h1v1h-1zM26 37h1v1h-1zM6 39h1v1h-1zM15 39h1v1h-1zM58 40h1v1h-1zM60 41h1v1h-1zM4 42h1v1h-1zM61 42h1v1h-1zM0 44h1v1h-1zM2 46h1v1h-1zM4 47h1v1h-1zM6 48h1v1h-1zM4 51h1v1h-1zM56 51h3v1h-3zM9 54h1v1h-1zM12 54h1v1h-1zM54 54h1v1h-1zM10 55h1v1h-1zM16 55h1v1h-1z"/><path fill="#fce3d9" d="M10 1h1v1h-1zM12 1h1v1h-1zM51 1h2v1h-2zM10 2h4v1h-4zM49 2h3v1h-3zM13 3h1v1h-1zM46 5h2v1h-2zM45 6h2v1h-2zM19 7h1v1h-1zM47 7h1v1h-1zM19 8h2v1h-2zM41 9h1v1h-1zM32 11h1v1h-1zM42 11h5v1h-5zM12 12h2v1h-2zM24 12h1v1h-1zM32 12h1v1h-1zM42 12h1v1h-1zM44 12h2v1h-2zM13 13h2v1h-2zM32 13h1v1h-1zM13 14h1v1h-1zM28 30h1v1h-1zM47 31h1v1h-1zM14 32h2v1h-2zM22 32h1v1h-1zM41 32h2v1h-2zM46 32h2v1h-2zM23 33h2v1h-2zM10 34h1v1h-1zM52 36h2v1h-2zM56 37h1v1h-1zM27 38h1v1h-1zM27 39h1v1h-1zM50 42h2v1h-2zM13 43h1v1h-1zM50 43h2v1h-2zM49 46h1v1h-1zM57 46h1v1h-1zM18 53h2v1h-2zM42 53h3v1h-3zM20 62h1v1h-1z"/><path fill="#f3dfd7" d="M11 1h1v1h-1zM48 2h1v1h-1zM14 3h1v1h-1zM46 4h1v1h-1zM44 6h1v1h-1zM43 7h1v1h-1zM42 8h1v1h-1zM19 10h1v1h-1zM40 10h1v1h-1zM24 11h1v1h-1zM31 11h1v1h-1zM41 11h1v1h-1zM23 12h1v1h-1zM19 13h1v1h-1zM33 13h1v1h-1zM14 14h1v1h-1zM31 14h1v1h-1zM34 14h1v1h-1zM58 22h1v1h-1zM22 33h1v1h-1zM44 33h1v1h-1zM10 35h1v1h-1zM40 35h1v1h-1zM13 36h1v1h-1zM39 36h2v1h-2zM7 37h1v1h-1zM12 37h1v1h-1zM7 38h1v1h-1zM57 38h1v1h-1zM57 39h1v1h-1zM57 40h1v1h-1zM59 41h1v1h-1zM54 42h1v1h-1zM10 43h1v1h-1zM15 43h1v1h-1zM54 43h1v1h-1zM62 45h1v1h-1zM58 46h2v1h-2zM7 49h1v1h-1zM22 49h1v1h-1zM6 50h2v1h-2zM10 50h1v1h-1zM25 53h2v1h-2zM30 53h12v1h-12zM45 53h1v1h-1zM46 59h1v1h-1zM27 60h1v1h-1zM47 60h1v1h-1zM20 63h1v1h-1z"/><path fill="#ebd1d0" d="M13 1h1v1h-1zM53 1h1v1h-1zM9 2h1v1h-1zM47 2h1v1h-1zM9 3h1v1h-1zM18 4h1v1h-1zM28 12h2v1h-2zM4 21h1v1h-1zM57 21h1v1h-1zM59 21h1v1h-1zM5 22h2v1h-2zM59 22h1v1h-1zM4 26h1v1h-1zM38 27h1v1h-1zM31 28h1v1h-1zM25 31h1v1h-1zM52 31h1v1h-1zM40 32h1v1h-1zM20 33h1v1h-1zM43 34h1v1h-1zM50 34h1v1h-1zM57 34h1v1h-1zM7 39h1v1h-1zM6 40h2v1h-2zM63 42h1v1h-1zM8 51h3v1h-3zM54 51h2v1h-2zM15 53h1v1h-1zM20 54h2v1h-2zM47 54h1v1h-1zM28 60h1v1h-1zM29 61h1v1h-1zM44 61h1v1h-1zM30 62h1v1h-1zM21 64h4v1h-4z"/><path fill="#ad96a3" d="M14 1h1v1h-1zM16 2h1v1h-1zM19 5h1v1h-1zM25 12h1v1h-1zM57 12h1v1h-1zM45 13h1v1h-1zM13 15h1v1h-1zM46 15h1v1h-1zM46 16h3v1h-3zM50 17h2v1h-2zM12 19h1v1h-1zM42 19h1v1h-1zM52 19h1v1h-1zM42 20h1v1h-1zM8 21h1v1h-1zM42 21h1v1h-1zM53 21h1v1h-1zM12 22h1v1h-1zM42 22h5v1h-5zM53 22h1v1h-1zM7 23h1v1h-1zM12 23h1v1h-1zM45 23h4v1h-4zM53 23h1v1h-1zM12 24h1v1h-1zM49 24h1v1h-1zM51 24h1v1h-1zM4 25h1v1h-1zM10 26h1v1h-1zM41 28h2v1h-2zM11 30h1v1h-1zM16 30h1v1h-1zM56 30h1v1h-1zM1 32h1v1h-1zM9 32h1v1h-1zM24 35h1v1h-1zM14 36h1v1h-1zM51 36h1v1h-1zM62 36h1v1h-1zM1 40h1v1h-1zM14 40h1v1h-1zM5 41h1v1h-1zM14 41h1v1h-1zM62 44h1v1h-1zM63 45h1v1h-1zM58 48h1v1h-1zM59 49h1v1h-1zM53 53h1v1h-1zM45 54h1v1h-1zM15 55h1v1h-1zM17 56h2v1h-2zM22 58h3v1h-3zM46 58h1v1h-1zM16 59h1v1h-1zM45 59h1v1h-1zM19 60h1v1h-1zM44 60h1v1h-1zM43 61h1v1h-1zM42 62h1v1h-1zM41 63h1v1h-1zM48 63h1v1h-1zM17 64h1v1h-1zM19 64h1v1h-1zM39 64h9v1h-9z"/><path fill="#a08291" d="M49 1h1v1h-1zM8 2h1v1h-1zM22 8h1v1h-1zM39 10h1v1h-1zM21 13h5v1h-5zM44 13h1v1h-1zM47 13h1v1h-1zM57 13h1v1h-1zM57 14h1v1h-1zM20 15h3v1h-3zM51 15h1v1h-1zM12 16h1v1h-1zM16 16h2v1h-2zM25 16h1v1h-1zM42 16h2v1h-2zM49 16h1v1h-1zM25 17h1v1h-1zM42 17h1v1h-1zM12 18h1v1h-1zM42 18h1v1h-1zM53 19h1v1h-1zM12 20h1v1h-1zM53 20h1v1h-1zM12 21h1v1h-1zM41 21h1v1h-1zM54 22h1v1h-1zM57 22h1v1h-1zM43 23h2v1h-2zM49 23h2v1h-2zM54 23h1v1h-1zM13 24h1v1h-1zM33 24h4v1h-4zM50 24h1v1h-1zM52 24h2v1h-2zM38 26h1v1h-1zM25 28h1v1h-1zM19 29h1v1h-1zM47 29h1v1h-1zM50 30h1v1h-1zM54 30h1v1h-1zM8 33h1v1h-1zM13 37h1v1h-1zM51 38h1v1h-1zM0 39h1v1h-1zM51 39h1v1h-1zM60 39h1v1h-1zM61 43h1v1h-1zM59 47h1v1h-1zM5 49h1v1h-1zM55 52h1v1h-1zM25 58h1v1h-1zM18 61h1v1h-1zM30 61h1v1h-1zM41 62h1v1h-1zM17 63h1v1h-1zM18 64h1v1h-1zM32 64h1v1h-1zM35 64h1v1h-1z"/><path fill="#efdcd6" d="M15 2h1v1h-1zM45 5h1v1h-1zM43 6h1v1h-1zM21 7h1v1h-1zM57 10h1v1h-1zM57 11h1v1h-1zM27 13h1v1h-1zM57 15h1v1h-1zM57 16h1v1h-1zM57 17h1v1h-1zM57 18h1v1h-1zM57 19h1v1h-1zM21 33h1v1h-1zM49 33h1v1h-1zM12 38h1v1h-1zM12 39h1v1h-1zM27 41h1v1h-1zM14 42h1v1h-1zM1 45h1v1h-1zM18 46h4v1h-4zM24 46h1v1h-1zM26 48h1v1h-1zM47 59h1v1h-1zM48 61h1v1h-1zM48 62h1v1h-1z"/><path fill="#fbdbcb" d="M52 2h1v1h-1zM14 4h1v1h-1zM16 4h1v1h-1zM15 5h1v1h-1zM17 5h1v1h-1zM17 6h1v1h-1zM16 7h1v1h-1zM16 8h1v1h-1zM44 8h2v1h-2zM43 9h1v1h-1zM22 11h1v1h-1zM49 32h1v1h-1zM42 35h1v1h-1zM41 36h1v1h-1zM38 37h1v1h-1zM55 38h1v1h-1zM52 42h1v1h-1zM58 42h1v1h-1zM59 43h1v1h-1zM49 44h2v1h-2zM44 46h1v1h-1zM23 47h1v1h-1zM39 47h1v1h-1zM48 47h2v1h-2zM22 48h2v1h-2zM39 48h1v1h-1zM43 48h2v1h-2zM49 48h1v1h-1zM25 49h2v1h-2zM49 49h1v1h-1zM49 50h1v1h-1zM45 51h3v1h-3zM51 51h1v1h-1zM24 52h1v1h-1zM27 52h6v1h-6zM39 52h4v1h-4zM45 52h1v1h-1zM46 61h1v1h-1z"/><path fill="#fadbd1" d="M53 2h1v1h-1zM49 3h1v1h-1zM47 4h1v1h-1zM21 10h1v1h-1zM30 14h1v1h-1zM30 29h1v1h-1zM24 31h1v1h-1zM29 31h1v1h-1zM37 32h1v1h-1zM37 33h2v1h-2zM36 34h3v1h-3zM36 35h3v1h-3zM54 35h1v1h-1zM36 36h2v1h-2zM36 37h2v1h-2zM33 38h5v1h-5zM33 39h5v1h-5zM56 39h1v1h-1zM30 40h8v1h-8zM31 41h1v1h-1zM35 41h1v1h-1zM31 42h1v1h-1zM35 42h1v1h-1zM31 43h1v1h-1zM31 45h1v1h-1zM54 45h1v1h-1zM27 46h6v1h-6zM39 46h2v1h-2zM52 46h1v1h-1zM27 47h6v1h-6zM53 47h3v1h-3zM11 48h1v1h-1zM28 48h5v1h-5zM45 48h1v1h-1zM53 48h3v1h-3zM13 49h1v1h-1zM30 49h3v1h-3zM34 49h3v1h-3zM42 49h2v1h-2zM54 49h1v1h-1zM18 50h3v1h-3zM30 50h3v1h-3zM44 50h1v1h-1zM56 50h1v1h-1zM48 51h2v1h-2zM21 52h1v1h-1zM33 52h1v1h-1zM25 61h1v1h-1zM45 61h1v1h-1zM26 62h1v1h-1z"/><path fill="#877184" d="M8 3h1v1h-1zM42 6h1v1h-1zM48 14h1v1h-1zM18 15h1v1h-1zM23 15h3v1h-3zM28 15h1v1h-1zM47 15h1v1h-1zM50 16h1v1h-1zM14 17h1v1h-1zM26 17h1v1h-1zM48 17h1v1h-1zM25 18h2v1h-2zM25 19h2v1h-2zM26 20h1v1h-1zM52 20h1v1h-1zM25 21h1v1h-1zM54 21h1v1h-1zM25 22h1v1h-1zM47 22h1v1h-1zM13 23h1v1h-1zM19 23h6v1h-6zM42 23h1v1h-1zM14 24h3v1h-3zM18 24h2v1h-2zM30 24h2v1h-2zM37 24h1v1h-1zM48 24h1v1h-1zM14 25h2v1h-2zM24 28h1v1h-1zM48 29h1v1h-1zM10 30h1v1h-1zM55 31h1v1h-1zM2 34h1v1h-1zM7 34h1v1h-1zM17 34h1v1h-1zM49 34h1v1h-1zM58 34h1v1h-1zM58 35h1v1h-1zM0 36h1v1h-1zM16 36h1v1h-1zM43 36h1v1h-1zM58 36h1v1h-1zM51 37h1v1h-1zM58 37h1v1h-1zM60 37h1v1h-1zM58 38h1v1h-1zM14 39h1v1h-1zM58 39h1v1h-1zM59 40h1v1h-1zM56 52h1v1h-1zM22 55h1v1h-1zM46 55h1v1h-1zM19 56h1v1h-1zM20 59h1v1h-1zM31 62h1v1h-1zM40 63h1v1h-1zM33 64h1v1h-1z"/><path fill="#e7bfb6" d="M10 3h1v1h-1zM12 3h1v1h-1zM51 3h1v1h-1zM8 4h2v1h-2zM8 5h1v1h-1zM49 5h1v1h-1zM8 6h1v1h-1zM14 6h1v1h-1zM15 7h1v1h-1zM48 8h1v1h-1zM16 9h1v1h-1zM47 9h1v1h-1zM56 9h1v1h-1zM7 10h1v1h-1zM47 10h1v1h-1zM7 11h1v1h-1zM39 11h1v1h-1zM47 11h1v1h-1zM7 12h1v1h-1zM11 12h1v1h-1zM14 12h1v1h-1zM17 12h1v1h-1zM49 12h1v1h-1zM52 12h1v1h-1zM7 13h1v1h-1zM11 13h1v1h-1zM17 13h1v1h-1zM7 14h1v1h-1zM7 15h1v1h-1zM11 15h1v1h-1zM52 15h1v1h-1zM7 16h1v1h-1zM7 17h1v1h-1zM7 18h1v1h-1zM7 19h1v1h-1zM34 27h1v1h-1zM26 29h1v1h-1zM32 29h1v1h-1zM42 29h1v1h-1zM20 30h1v1h-1zM27 30h1v1h-1zM32 30h1v1h-1zM10 32h2v1h-2zM54 32h1v1h-1zM9 33h1v1h-1zM8 35h1v1h-1zM50 37h1v1h-1zM52 41h1v1h-1zM8 44h1v1h-1zM33 44h3v1h-3zM35 45h1v1h-1zM34 46h1v1h-1zM13 52h1v1h-1zM52 52h1v1h-1zM51 53h1v1h-1zM49 54h1v1h-1zM22 60h1v1h-1z"/><path fill="#e7ae9d" d="M11 3h1v1h-1zM53 3h1v1h-1zM9 5h1v1h-1zM13 5h1v1h-1zM50 5h1v1h-1zM49 6h1v1h-1zM49 7h2v1h-2zM15 8h1v1h-1zM49 8h1v1h-1zM16 10h1v1h-1zM9 11h3v1h-3zM13 11h4v1h-4zM50 11h5v1h-5zM9 12h2v1h-2zM15 12h1v1h-1zM53 12h2v1h-2zM9 13h2v1h-2zM48 13h1v1h-1zM52 13h2v1h-2zM9 14h1v1h-1zM9 16h2v1h-2zM55 16h2v1h-2zM9 17h2v1h-2zM54 17h3v1h-3zM55 18h1v1h-1zM8 19h1v1h-1zM49 36h1v1h-1zM52 40h1v1h-1zM51 41h1v1h-1zM33 45h2v1h-2z"/><path fill="#cba9af" d="M16 3h1v1h-1zM55 3h1v1h-1zM24 10h1v1h-1zM33 12h1v1h-1zM38 12h2v1h-2zM27 14h1v1h-1zM42 15h3v1h-3zM41 19h1v1h-1zM41 20h1v1h-1zM3 22h1v1h-1zM8 22h1v1h-1zM5 23h2v1h-2zM30 25h2v1h-2zM37 25h1v1h-1zM28 26h4v1h-4zM39 27h1v1h-1zM40 28h1v1h-1zM20 29h2v1h-2zM25 29h1v1h-1zM40 29h2v1h-2zM17 30h2v1h-2zM25 30h2v1h-2zM33 30h1v1h-1zM39 30h2v1h-2zM49 30h1v1h-1zM10 31h1v1h-1zM12 31h1v1h-1zM26 31h2v1h-2zM39 31h1v1h-1zM27 32h1v1h-1zM55 32h1v1h-1zM23 34h1v1h-1zM7 35h1v1h-1zM3 46h1v1h-1zM5 47h1v1h-1zM11 52h1v1h-1zM53 52h2v1h-2zM12 53h1v1h-1zM52 53h1v1h-1zM55 53h1v1h-1zM14 54h1v1h-1zM51 54h1v1h-1zM55 54h1v1h-1zM18 55h4v1h-4zM21 59h2v1h-2zM24 59h4v1h-4zM20 60h2v1h-2zM48 60h1v1h-1zM18 62h1v1h-1zM43 62h1v1h-1zM18 63h1v1h-1zM31 63h1v1h-1zM42 63h1v1h-1zM44 63h4v1h-4zM30 64h2v1h-2z"/><path fill="#d6c8cc" d="M46 3h1v1h-1zM45 4h1v1h-1zM43 5h1v1h-1zM41 8h1v1h-1zM6 9h1v1h-1zM22 9h1v1h-1zM31 10h1v1h-1zM27 12h1v1h-1zM34 12h2v1h-2zM6 20h1v1h-1zM5 21h1v1h-1zM4 22h1v1h-1zM31 27h1v1h-1zM26 28h1v1h-1zM47 30h1v1h-1zM15 31h1v1h-1zM41 31h1v1h-1zM53 31h1v1h-1zM15 35h1v1h-1zM25 35h1v1h-1zM6 37h1v1h-1zM16 37h1v1h-1zM6 38h1v1h-1zM15 38h2v1h-2zM16 39h1v1h-1zM62 41h2v1h-2zM13 42h1v1h-1zM62 42h1v1h-1zM3 43h1v1h-1zM26 44h1v1h-1zM60 46h3v1h-3zM58 47h1v1h-1zM7 48h1v1h-1zM5 50h1v1h-1zM59 50h1v1h-1zM59 51h2v1h-2zM23 54h1v1h-1zM46 54h1v1h-1zM9 55h1v1h-1zM47 55h1v1h-1zM49 55h1v1h-1zM49 61h1v1h-1zM19 62h1v1h-1zM20 64h1v1h-1zM25 64h3v1h-3z"/><path fill="#d6b5bb" d="M47 3h1v1h-1zM54 3h1v1h-1zM55 4h1v1h-1zM8 7h1v1h-1zM7 9h1v1h-1zM6 10h1v1h-1zM6 11h1v1h-1zM6 12h1v1h-1zM6 13h1v1h-1zM39 13h1v1h-1zM6 14h1v1h-1zM38 14h1v1h-1zM6 15h1v1h-1zM41 15h1v1h-1zM6 16h1v1h-1zM41 16h1v1h-1zM6 17h1v1h-1zM11 17h1v1h-1zM6 18h1v1h-1zM41 18h1v1h-1zM57 20h1v1h-1zM7 22h1v1h-1zM29 25h1v1h-1zM32 25h5v1h-5zM32 26h6v1h-6zM27 27h1v1h-1zM32 27h2v1h-2zM32 28h3v1h-3zM22 29h3v1h-3zM33 29h2v1h-2zM39 29h1v1h-1zM43 29h4v1h-4zM19 30h1v1h-1zM41 30h1v1h-1zM48 30h1v1h-1zM11 31h1v1h-1zM13 31h1v1h-1zM40 31h1v1h-1zM54 31h1v1h-1zM26 32h1v1h-1zM56 33h1v1h-1zM8 34h1v1h-1zM1 44h1v1h-1zM4 46h2v1h-2zM6 47h2v1h-2zM10 52h1v1h-1zM12 52h1v1h-1zM10 53h2v1h-2zM13 53h2v1h-2zM54 53h1v1h-1zM10 54h2v1h-2zM15 54h5v1h-5zM48 54h1v1h-1zM50 54h1v1h-1zM17 55h1v1h-1zM48 55h1v1h-1zM19 61h2v1h-2zM44 62h1v1h-1zM28 64h2v1h-2z"/><path fill="#f7dcd0" d="M48 3h1v1h-1zM15 4h1v1h-1zM44 7h1v1h-1zM46 8h1v1h-1zM46 9h1v1h-1zM20 10h1v1h-1zM18 11h1v1h-1zM22 12h1v1h-1zM22 31h2v1h-2zM30 31h1v1h-1zM21 32h1v1h-1zM45 32h1v1h-1zM40 33h2v1h-2zM43 33h1v1h-1zM40 34h2v1h-2zM13 35h1v1h-1zM12 36h1v1h-1zM38 36h1v1h-1zM8 37h1v1h-1zM11 37h1v1h-1zM39 37h1v1h-1zM8 38h1v1h-1zM38 38h1v1h-1zM38 39h1v1h-1zM38 40h1v1h-1zM56 42h1v1h-1zM59 42h1v1h-1zM37 43h1v1h-1zM55 43h1v1h-1zM37 44h2v1h-2zM59 44h1v1h-1zM61 44h1v1h-1zM58 45h1v1h-1zM60 45h1v1h-1zM42 46h2v1h-2zM56 46h1v1h-1zM33 47h6v1h-6zM40 47h4v1h-4zM47 47h1v1h-1zM56 47h2v1h-2zM25 48h1v1h-1zM34 48h5v1h-5zM40 48h1v1h-1zM46 48h2v1h-2zM10 49h2v1h-2zM23 49h2v1h-2zM27 49h3v1h-3zM39 49h1v1h-1zM21 50h2v1h-2zM33 50h3v1h-3zM42 50h1v1h-1zM55 50h1v1h-1zM57 50h2v1h-2zM17 51h4v1h-4zM50 51h1v1h-1zM22 53h3v1h-3zM26 60h1v1h-1zM21 63h2v1h-2z"/><path fill="#fbddd2" d="M50 3h1v1h-1zM47 6h1v1h-1zM18 7h1v1h-1zM46 7h1v1h-1zM47 8h1v1h-1zM17 9h5v1h-5zM42 9h1v1h-1zM17 10h2v1h-2zM41 10h6v1h-6zM23 11h1v1h-1zM31 12h1v1h-1zM51 12h1v1h-1zM12 13h1v1h-1zM18 13h1v1h-1zM31 13h1v1h-1zM34 13h1v1h-1zM50 13h1v1h-1zM11 14h2v1h-2zM50 14h1v1h-1zM35 27h1v1h-1zM28 28h1v1h-1zM28 29h2v1h-2zM31 29h1v1h-1zM23 30h1v1h-1zM30 30h2v1h-2zM42 30h1v1h-1zM31 31h1v1h-1zM42 31h1v1h-1zM44 31h3v1h-3zM48 31h1v1h-1zM23 32h1v1h-1zM25 33h1v1h-1zM39 33h1v1h-1zM53 34h1v1h-1zM9 35h1v1h-1zM11 35h2v1h-2zM10 36h2v1h-2zM54 36h1v1h-1zM53 37h3v1h-3zM56 38h1v1h-1zM39 39h1v1h-1zM56 40h1v1h-1zM50 41h1v1h-1zM53 41h1v1h-1zM56 41h3v1h-3zM53 42h1v1h-1zM32 43h3v1h-3zM52 43h2v1h-2zM31 44h1v1h-1zM51 44h1v1h-1zM60 44h1v1h-1zM27 45h1v1h-1zM50 45h2v1h-2zM59 45h1v1h-1zM13 48h1v1h-1zM8 50h1v1h-1zM39 50h2v1h-2zM36 51h6v1h-6zM18 52h2v1h-2zM35 52h4v1h-4zM48 52h2v1h-2zM16 53h2v1h-2zM26 61h1v1h-1zM28 61h1v1h-1zM47 61h1v1h-1zM27 62h2v1h-2zM46 62h1v1h-1z"/><path fill="#e6a395" d="M52 3h1v1h-1zM10 4h3v1h-3zM51 4h1v1h-1zM53 4h2v1h-2zM10 5h1v1h-1zM12 5h1v1h-1zM53 5h2v1h-2zM9 6h3v1h-3zM13 6h1v1h-1zM50 6h5v1h-5zM9 7h6v1h-6zM51 7h4v1h-4zM8 8h7v1h-7zM50 8h5v1h-5zM8 9h8v1h-8zM48 9h7v1h-7zM8 10h8v1h-8zM48 10h9v1h-9zM8 11h1v1h-1zM12 11h1v1h-1zM48 11h1v1h-1zM55 11h2v1h-2zM8 12h1v1h-1zM47 12h2v1h-2zM55 12h2v1h-2zM8 13h1v1h-1zM16 13h1v1h-1zM54 13h3v1h-3zM8 14h1v1h-1zM54 14h1v1h-1zM56 14h1v1h-1zM8 15h3v1h-3zM53 15h1v1h-1zM55 15h2v1h-2zM8 16h1v1h-1zM53 16h2v1h-2zM8 17h1v1h-1zM8 18h2v1h-2zM56 18h1v1h-1zM56 19h1v1h-1zM41 37h1v1h-1z"/><path fill="#f9d8c7" d="M13 4h1v1h-1zM17 4h1v1h-1zM14 5h1v1h-1zM15 6h2v1h-2zM18 12h1v1h-1zM50 12h1v1h-1zM52 14h1v1h-1zM36 29h2v1h-2zM36 30h2v1h-2zM50 32h1v1h-1zM51 33h1v1h-1zM14 34h1v1h-1zM27 34h1v1h-1zM42 34h1v1h-1zM56 35h1v1h-1zM10 38h2v1h-2zM40 38h1v1h-1zM11 39h1v1h-1zM11 40h1v1h-1zM50 40h1v1h-1zM11 41h1v1h-1zM11 42h1v1h-1zM38 42h1v1h-1zM38 43h3v1h-3zM58 43h1v1h-1zM3 44h1v1h-1zM39 44h2v1h-2zM41 45h2v1h-2zM48 45h1v1h-1zM26 46h1v1h-1zM33 46h1v1h-1zM45 46h3v1h-3zM21 47h2v1h-2zM19 48h2v1h-2zM44 52h1v1h-1zM24 60h1v1h-1z"/><path fill="#fad8cd" d="M48 4h1v1h-1zM16 5h1v1h-1zM17 7h1v1h-1zM48 7h1v1h-1zM17 8h1v1h-1zM43 8h1v1h-1zM44 9h1v1h-1zM22 10h1v1h-1zM19 12h1v1h-1zM30 13h1v1h-1zM36 28h2v1h-2zM30 32h1v1h-1zM32 32h1v1h-1zM51 32h1v1h-1zM14 33h1v1h-1zM28 33h5v1h-5zM52 33h1v1h-1zM13 34h1v1h-1zM26 34h1v1h-1zM28 34h5v1h-5zM27 35h6v1h-6zM27 36h3v1h-3zM56 36h1v1h-1zM28 37h2v1h-2zM40 37h1v1h-1zM10 39h1v1h-1zM55 39h1v1h-1zM10 40h1v1h-1zM53 40h1v1h-1zM39 41h1v1h-1zM39 42h1v1h-1zM57 42h1v1h-1zM6 43h1v1h-1zM57 43h1v1h-1zM4 44h2v1h-2zM36 44h1v1h-1zM56 44h3v1h-3zM36 45h1v1h-1zM40 45h1v1h-1zM35 46h4v1h-4zM16 47h3v1h-3zM45 47h1v1h-1zM9 48h1v1h-1zM16 48h3v1h-3zM21 48h1v1h-1zM24 48h1v1h-1zM50 48h1v1h-1zM50 49h1v1h-1zM52 49h2v1h-2zM56 49h2v1h-2zM12 50h3v1h-3zM48 50h1v1h-1zM54 50h1v1h-1zM14 51h2v1h-2zM44 51h1v1h-1zM22 52h2v1h-2zM25 60h1v1h-1zM46 60h1v1h-1zM22 62h4v1h-4zM28 63h1v1h-1z"/><path fill="#fbd9d1" d="M49 4h1v1h-1zM48 5h1v1h-1zM48 6h1v1h-1zM18 8h1v1h-1zM45 9h1v1h-1zM17 11h1v1h-1zM51 13h1v1h-1zM10 14h1v1h-1zM36 27h1v1h-1zM20 31h1v1h-1zM20 32h1v1h-1zM42 33h1v1h-1zM9 36h1v1h-1zM30 36h3v1h-3zM10 37h1v1h-1zM30 37h3v1h-3zM9 39h1v1h-1zM39 40h1v1h-1zM55 40h1v1h-1zM55 41h1v1h-1zM37 45h2v1h-2zM49 45h1v1h-1zM15 46h2v1h-2zM48 46h1v1h-1zM15 47h1v1h-1zM12 49h1v1h-1zM33 49h1v1h-1zM44 49h1v1h-1zM48 49h1v1h-1zM46 50h2v1h-2zM50 50h4v1h-4zM27 51h9v1h-9zM42 51h2v1h-2zM50 52h1v1h-1zM45 60h1v1h-1zM27 61h1v1h-1z"/><path fill="#f1cfc9" d="M50 4h1v1h-1zM40 12h1v1h-1zM15 13h1v1h-1zM37 13h2v1h-2zM37 14h1v1h-1zM53 14h1v1h-1zM11 16h1v1h-1zM7 20h1v1h-1zM6 21h2v1h-2zM58 21h1v1h-1zM28 27h3v1h-3zM39 28h1v1h-1zM34 30h1v1h-1zM38 30h1v1h-1zM46 30h1v1h-1zM33 31h1v1h-1zM38 31h1v1h-1zM28 32h1v1h-1zM39 32h1v1h-1zM18 33h2v1h-2zM55 33h1v1h-1zM51 35h1v1h-1zM50 39h1v1h-1zM8 40h1v1h-1zM8 43h1v1h-1zM60 43h1v1h-1zM2 44h1v1h-1zM9 44h1v1h-1zM32 44h1v1h-1zM32 45h1v1h-1zM12 46h2v1h-2zM54 46h1v1h-1zM10 47h1v1h-1zM12 47h1v1h-1zM11 51h1v1h-1zM52 51h2v1h-2zM14 52h1v1h-1zM51 52h1v1h-1zM49 53h2v1h-2zM23 60h1v1h-1zM29 63h2v1h-2z"/><path fill="#e69d8b" d="M52 4h1v1h-1zM11 5h1v1h-1zM51 5h2v1h-2zM12 6h1v1h-1zM55 9h1v1h-1zM16 12h1v1h-1zM55 14h1v1h-1zM54 15h1v1h-1zM42 36h1v1h-1zM46 36h3v1h-3zM42 37h1v1h-1zM46 37h4v1h-4zM41 38h2v1h-2zM46 38h4v1h-4zM41 39h2v1h-2zM46 39h4v1h-4zM41 40h2v1h-2zM41 41h3v1h-3zM44 42h2v1h-2z"/><path fill="#f2d9d4" d="M18 5h1v1h-1zM19 11h1v1h-1zM40 11h1v1h-1zM41 12h1v1h-1zM28 13h1v1h-1zM15 14h1v1h-1zM49 14h1v1h-1zM27 28h1v1h-1zM27 29h1v1h-1zM16 31h2v1h-2zM28 31h1v1h-1zM50 31h2v1h-2zM16 32h1v1h-1zM16 33h1v1h-1zM39 35h1v1h-1zM7 36h1v1h-1zM26 36h1v1h-1zM54 38h1v1h-1zM54 39h1v1h-1zM12 40h1v1h-1zM6 41h1v1h-1zM12 41h1v1h-1zM5 42h1v1h-1zM9 42h1v1h-1zM27 42h1v1h-1zM4 43h1v1h-1zM9 43h1v1h-1zM14 43h1v1h-1zM27 43h1v1h-1zM15 44h1v1h-1zM2 45h1v1h-1zM16 45h1v1h-1zM61 45h1v1h-1zM26 47h1v1h-1zM21 49h1v1h-1zM58 49h1v1h-1zM5 51h3v1h-3zM20 53h1v1h-1zM27 53h3v1h-3zM22 54h1v1h-1zM19 63h1v1h-1z"/><path fill="#c79b98" d="M55 5h1v1h-1zM55 6h1v1h-1zM55 7h1v1h-1zM55 8h1v1h-1zM49 11h1v1h-1zM30 12h1v1h-1zM20 13h1v1h-1zM46 13h1v1h-1zM45 15h1v1h-1zM53 17h1v1h-1zM10 18h1v1h-1zM9 19h1v1h-1zM8 20h1v1h-1zM56 20h1v1h-1zM50 35h1v1h-1zM52 37h1v1h-1zM52 38h1v1h-1zM52 39h1v1h-1zM51 40h1v1h-1zM23 59h1v1h-1zM43 63h1v1h-1z"/><path fill="#f8dad1" d="M18 6h1v1h-1zM21 11h1v1h-1zM12 15h1v1h-1zM29 28h1v1h-1zM49 31h1v1h-1zM17 32h1v1h-1zM25 32h1v1h-1zM52 32h1v1h-1zM36 33h1v1h-1zM12 34h1v1h-1zM35 34h1v1h-1zM33 35h3v1h-3zM33 36h3v1h-3zM57 36h1v1h-1zM9 37h1v1h-1zM33 37h3v1h-3zM28 38h1v1h-1zM28 39h1v1h-1zM30 39h3v1h-3zM28 40h1v1h-1zM54 40h1v1h-1zM29 41h2v1h-2zM36 41h2v1h-2zM54 41h1v1h-1zM29 42h2v1h-2zM36 42h2v1h-2zM30 43h1v1h-1zM27 44h4v1h-4zM55 44h1v1h-1zM53 45h1v1h-1zM55 45h1v1h-1zM17 46h1v1h-1zM25 46h1v1h-1zM50 46h1v1h-1zM13 47h1v1h-1zM24 47h2v1h-2zM50 47h3v1h-3zM12 48h1v1h-1zM33 48h1v1h-1zM41 48h1v1h-1zM57 48h1v1h-1zM14 49h1v1h-1zM40 49h1v1h-1zM47 49h1v1h-1zM55 49h1v1h-1zM9 50h1v1h-1zM11 50h1v1h-1zM17 50h1v1h-1zM24 50h2v1h-2zM27 50h1v1h-1zM29 50h1v1h-1zM43 50h1v1h-1zM26 51h1v1h-1zM16 52h1v1h-1zM47 62h1v1h-1z"/><path fill="#604d62" d="M42 7h1v1h-1zM17 14h2v1h-2zM26 14h1v1h-1zM16 15h1v1h-1zM26 15h1v1h-1zM48 15h1v1h-1zM21 16h3v1h-3zM39 17h1v1h-1zM52 17h1v1h-1zM39 18h1v1h-1zM40 19h1v1h-1zM26 21h1v1h-1zM56 21h1v1h-1zM41 22h1v1h-1zM11 23h1v1h-1zM11 24h1v1h-1zM21 24h2v1h-2zM51 25h2v1h-2zM12 26h1v1h-1zM11 27h1v1h-1zM20 28h2v1h-2zM44 28h3v1h-3zM55 30h1v1h-1zM2 32h1v1h-1zM1 33h1v1h-1zM3 33h1v1h-1zM57 33h1v1h-1zM3 34h1v1h-1zM1 35h1v1h-1zM3 36h1v1h-1zM0 37h2v1h-2zM3 37h1v1h-1zM2 42h2v1h-2zM2 43h1v1h-1zM21 56h1v1h-1zM21 58h1v1h-1zM18 59h1v1h-1zM32 59h1v1h-1zM29 60h1v1h-1zM17 61h1v1h-1zM34 61h1v1h-1zM36 61h2v1h-2zM17 62h1v1h-1zM37 62h1v1h-1zM35 63h4v1h-4z"/><path fill="#fadcd1" d="M45 7h1v1h-1zM29 30h1v1h-1zM44 32h1v1h-1zM48 32h1v1h-1zM39 34h1v1h-1zM41 35h1v1h-1zM55 36h1v1h-1zM39 38h1v1h-1zM32 41h3v1h-3zM32 42h3v1h-3zM55 42h1v1h-1zM11 43h1v1h-1zM35 43h1v1h-1zM52 44h3v1h-3zM28 45h3v1h-3zM56 45h2v1h-2zM51 46h1v1h-1zM14 47h1v1h-1zM44 47h1v1h-1zM14 48h1v1h-1zM27 48h1v1h-1zM42 48h1v1h-1zM48 48h1v1h-1zM8 49h1v1h-1zM37 49h2v1h-2zM23 50h1v1h-1zM36 50h3v1h-3zM41 50h1v1h-1zM17 52h1v1h-1zM20 52h1v1h-1zM34 52h1v1h-1zM43 52h1v1h-1zM46 52h1v1h-1z"/><path fill="#f7d8ce" d="M23 10h1v1h-1zM21 12h1v1h-1zM29 13h1v1h-1zM35 13h1v1h-1zM35 14h1v1h-1zM18 31h1v1h-1zM32 31h1v1h-1zM24 32h1v1h-1zM29 32h1v1h-1zM31 32h1v1h-1zM34 32h3v1h-3zM15 33h1v1h-1zM17 33h1v1h-1zM26 33h1v1h-1zM33 33h3v1h-3zM50 33h1v1h-1zM53 33h1v1h-1zM33 34h2v1h-2zM14 35h1v1h-1zM55 35h1v1h-1zM8 36h1v1h-1zM27 37h1v1h-1zM9 38h1v1h-1zM29 38h4v1h-4zM8 39h1v1h-1zM29 39h1v1h-1zM29 40h1v1h-1zM28 41h1v1h-1zM38 41h1v1h-1zM6 42h1v1h-1zM10 42h1v1h-1zM28 42h1v1h-1zM5 43h1v1h-1zM28 43h2v1h-2zM36 43h1v1h-1zM56 43h1v1h-1zM8 45h1v1h-1zM52 45h1v1h-1zM14 46h1v1h-1zM53 46h1v1h-1zM55 46h1v1h-1zM11 47h1v1h-1zM19 47h2v1h-2zM46 47h1v1h-1zM8 48h1v1h-1zM10 48h1v1h-1zM15 48h1v1h-1zM51 48h2v1h-2zM56 48h1v1h-1zM9 49h1v1h-1zM15 49h6v1h-6zM51 49h1v1h-1zM15 50h2v1h-2zM16 51h1v1h-1zM25 52h2v1h-2zM47 52h1v1h-1zM21 53h1v1h-1zM21 62h1v1h-1zM29 62h1v1h-1zM23 63h4v1h-4z"/><path fill="#f9d9d2" d="M20 11h1v1h-1zM37 27h1v1h-1zM30 28h1v1h-1zM35 28h1v1h-1zM38 28h1v1h-1zM35 29h1v1h-1zM22 30h1v1h-1zM24 30h1v1h-1zM21 31h1v1h-1zM43 31h1v1h-1zM12 32h2v1h-2zM38 32h1v1h-1zM43 32h1v1h-1zM11 33h1v1h-1zM54 33h1v1h-1zM11 34h1v1h-1zM25 34h1v1h-1zM52 34h1v1h-1zM54 34h2v1h-2zM52 35h2v1h-2zM8 42h1v1h-1zM12 43h1v1h-1zM10 44h5v1h-5zM7 45h1v1h-1zM9 45h7v1h-7zM26 45h1v1h-1zM39 45h1v1h-1zM41 46h1v1h-1zM41 49h1v1h-1zM45 49h2v1h-2zM26 50h1v1h-1zM28 50h1v1h-1zM45 50h1v1h-1zM21 51h5v1h-5zM15 52h1v1h-1zM46 53h3v1h-3zM45 62h1v1h-1z"/><path fill="#7e6169" d="M33 11h1v1h-1zM16 14h1v1h-1zM42 14h3v1h-3zM17 15h1v1h-1zM29 15h1v1h-1zM36 15h2v1h-2zM26 16h1v1h-1zM40 16h1v1h-1zM52 16h1v1h-1zM40 17h1v1h-1zM40 18h1v1h-1zM55 19h1v1h-1zM54 20h1v1h-1zM54 24h1v1h-1zM38 25h1v1h-1zM53 25h1v1h-1zM23 28h1v1h-1zM43 28h1v1h-1zM56 32h1v1h-1zM43 35h1v1h-1zM43 37h1v1h-1zM43 38h3v1h-3zM43 39h3v1h-3zM43 40h3v1h-3zM44 41h2v1h-2zM13 54h1v1h-1zM24 54h2v1h-2zM30 54h1v1h-1zM33 54h1v1h-1zM37 54h1v1h-1zM44 54h1v1h-1zM20 56h1v1h-1z"/><path fill="#f8d5ce" d="M20 12h1v1h-1zM46 12h1v1h-1zM36 13h1v1h-1zM49 13h1v1h-1zM28 14h2v1h-2zM36 14h1v1h-1zM51 14h1v1h-1zM38 29h1v1h-1zM21 30h1v1h-1zM35 30h1v1h-1zM43 30h3v1h-3zM19 31h1v1h-1zM34 31h4v1h-4zM18 32h2v1h-2zM33 32h1v1h-1zM53 32h1v1h-1zM10 33h1v1h-1zM12 33h2v1h-2zM27 33h1v1h-1zM9 34h1v1h-1zM15 34h1v1h-1zM51 34h1v1h-1zM56 34h1v1h-1zM26 35h1v1h-1zM57 35h1v1h-1zM50 38h1v1h-1zM53 38h1v1h-1zM53 39h1v1h-1zM9 40h1v1h-1zM7 41h4v1h-4zM7 42h1v1h-1zM12 42h1v1h-1zM7 43h1v1h-1zM6 44h2v1h-2zM3 45h4v1h-4zM6 46h6v1h-6zM8 47h2v1h-2zM12 51h2v1h-2zM21 61h4v1h-4zM27 63h1v1h-1z"/><path fill="#5b4353" d="M40 13h1v1h-1zM42 13h2v1h-2zM23 14h2v1h-2zM40 15h1v1h-1zM30 17h6v1h-6zM30 18h7v1h-7zM54 18h1v1h-1zM30 19h7v1h-7zM54 19h1v1h-1zM11 20h1v1h-1zM30 20h7v1h-7zM40 20h1v1h-1zM55 20h1v1h-1zM30 21h1v1h-1zM33 21h4v1h-4zM40 21h1v1h-1zM11 22h1v1h-1zM49 25h2v1h-2zM13 26h1v1h-1zM40 27h1v1h-1zM22 28h1v1h-1zM18 29h1v1h-1zM49 29h1v1h-1zM57 32h1v1h-1zM44 34h1v1h-1zM48 34h1v1h-1zM3 35h1v1h-1zM46 35h4v1h-4zM15 36h1v1h-1zM44 36h2v1h-2zM50 36h1v1h-1zM44 37h2v1h-2zM5 40h1v1h-1zM44 59h1v1h-1zM18 60h1v1h-1zM32 63h1v1h-1z"/><path fill="#3f3143" d="M41 13h1v1h-1zM20 14h1v1h-1zM25 14h1v1h-1zM40 14h1v1h-1zM45 14h1v1h-1zM15 15h1v1h-1zM27 15h1v1h-1zM49 15h2v1h-2zM51 16h1v1h-1zM36 17h1v1h-1zM10 19h1v1h-1zM9 20h1v1h-1zM29 20h1v1h-1zM37 20h1v1h-1zM29 21h1v1h-1zM37 21h1v1h-1zM24 24h1v1h-1zM38 24h1v1h-1zM40 24h1v1h-1zM42 24h2v1h-2zM21 25h1v1h-1zM23 25h3v1h-3zM28 25h1v1h-1zM40 25h1v1h-1zM16 26h2v1h-2zM21 26h1v1h-1zM39 26h1v1h-1zM42 26h1v1h-1zM47 26h1v1h-1zM12 27h1v1h-1zM14 27h1v1h-1zM16 27h2v1h-2zM49 27h2v1h-2zM52 27h2v1h-2zM12 28h1v1h-1zM47 28h1v1h-1zM11 29h1v1h-1zM51 30h1v1h-1zM53 30h1v1h-1zM21 34h1v1h-1zM45 34h1v1h-1zM44 35h2v1h-2zM5 36h1v1h-1zM13 38h1v1h-1zM23 55h1v1h-1zM20 58h1v1h-1zM26 58h2v1h-2zM43 59h1v1h-1zM41 61h1v1h-1z"/><path fill="#4f4058" d="M19 14h1v1h-1zM22 14h1v1h-1zM39 14h1v1h-1zM38 15h1v1h-1zM39 16h1v1h-1zM18 17h2v1h-2zM39 19h1v1h-1zM11 21h1v1h-1zM24 21h1v1h-1zM31 21h2v1h-2zM26 22h1v1h-1zM10 24h1v1h-1zM23 24h1v1h-1zM11 25h1v1h-1zM48 25h1v1h-1zM54 25h1v1h-1zM11 26h1v1h-1zM14 26h1v1h-1zM53 26h1v1h-1zM26 27h1v1h-1zM2 31h1v1h-1zM3 32h1v1h-1zM61 33h1v1h-1zM4 34h1v1h-1zM61 34h1v1h-1zM4 35h1v1h-1zM16 35h2v1h-2zM61 35h1v1h-1zM1 36h1v1h-1zM4 36h1v1h-1zM61 36h1v1h-1zM2 37h1v1h-1zM2 40h2v1h-2zM31 55h7v1h-7zM22 56h1v1h-1zM18 57h1v1h-1zM30 57h1v1h-1zM40 57h1v1h-1zM18 58h1v1h-1zM30 58h2v1h-2zM40 58h2v1h-2zM17 59h1v1h-1zM19 59h1v1h-1zM31 59h1v1h-1zM40 59h3v1h-3zM17 60h1v1h-1zM39 60h3v1h-3zM16 61h1v1h-1zM32 61h2v1h-2zM38 61h1v1h-1zM15 62h2v1h-2zM32 62h5v1h-5zM38 62h1v1h-1zM33 63h2v1h-2z"/><path fill="#41374c" d="M21 14h1v1h-1zM14 15h1v1h-1zM29 17h1v1h-1zM29 18h1v1h-1zM11 19h1v1h-1zM29 19h1v1h-1zM10 20h1v1h-1zM10 21h1v1h-1zM39 22h1v1h-1zM26 23h1v1h-1zM40 23h2v1h-2zM25 24h2v1h-2zM41 24h1v1h-1zM44 24h3v1h-3zM18 25h3v1h-3zM41 25h7v1h-7zM15 26h1v1h-1zM18 26h3v1h-3zM43 26h4v1h-4zM48 26h5v1h-5zM54 26h1v1h-1zM13 27h1v1h-1zM51 27h1v1h-1zM13 28h2v1h-2zM19 28h1v1h-1zM51 28h2v1h-2zM54 28h1v1h-1zM9 31h1v1h-1zM59 32h2v1h-2zM60 33h1v1h-1zM22 34h1v1h-1zM6 35h1v1h-1zM22 35h1v1h-1zM2 36h1v1h-1zM60 36h1v1h-1zM4 39h1v1h-1zM3 41h1v1h-1zM24 55h3v1h-3zM43 55h1v1h-1zM45 55h1v1h-1zM23 56h4v1h-4zM26 57h1v1h-1zM19 58h1v1h-1zM28 58h1v1h-1zM43 58h1v1h-1zM42 60h1v1h-1zM31 61h1v1h-1zM40 61h1v1h-1zM39 62h1v1h-1z"/><path fill="#69667d" d="M41 14h1v1h-1zM14 16h1v1h-1zM20 16h1v1h-1zM13 17h1v1h-1zM15 17h1v1h-1zM13 18h1v1h-1zM16 18h1v1h-1zM13 19h1v1h-1zM17 19h1v1h-1zM13 20h1v1h-1zM18 20h2v1h-2zM25 20h1v1h-1zM13 21h1v1h-1zM16 21h1v1h-1zM13 22h1v1h-1zM15 22h1v1h-1zM23 22h2v1h-2zM48 22h2v1h-2zM17 23h2v1h-2zM25 23h1v1h-1zM55 23h1v1h-1zM20 24h1v1h-1zM55 24h1v1h-1zM5 25h1v1h-1zM12 25h1v1h-1zM16 25h1v1h-1zM55 25h1v1h-1zM55 26h1v1h-1zM55 27h1v1h-1zM3 31h1v1h-1zM61 32h1v1h-1zM2 33h1v1h-1zM5 33h1v1h-1zM2 35h1v1h-1zM25 36h1v1h-1zM25 37h1v1h-1zM26 38h1v1h-1zM21 40h1v1h-1zM60 40h1v1h-1zM21 41h1v1h-1zM22 42h1v1h-1zM26 54h4v1h-4zM31 54h2v1h-2zM34 54h3v1h-3zM39 54h5v1h-5zM17 58h1v1h-1zM16 60h1v1h-1zM15 61h1v1h-1zM14 63h1v1h-1zM36 64h3v1h-3z"/><path fill="#2c2332" d="M46 14h2v1h-2zM13 16h1v1h-1zM27 16h4v1h-4zM34 16h5v1h-5zM12 17h1v1h-1zM27 17h2v1h-2zM37 17h2v1h-2zM11 18h1v1h-1zM27 20h1v1h-1zM9 21h1v1h-1zM27 21h2v1h-2zM38 21h1v1h-1zM55 21h1v1h-1zM9 22h1v1h-1zM27 22h7v1h-7zM37 22h2v1h-2zM27 23h12v1h-12zM6 24h1v1h-1zM27 24h1v1h-1zM39 24h1v1h-1zM27 25h1v1h-1zM39 25h1v1h-1zM26 26h2v1h-2zM40 26h1v1h-1zM21 27h5v1h-5zM41 27h4v1h-4zM54 27h1v1h-1zM17 28h2v1h-2zM48 28h2v1h-2zM15 29h3v1h-3zM50 29h1v1h-1zM9 30h1v1h-1zM12 30h4v1h-4zM52 30h1v1h-1zM6 33h2v1h-2zM58 33h2v1h-2zM6 34h1v1h-1zM18 34h3v1h-3zM46 34h2v1h-2zM59 34h1v1h-1zM59 35h1v1h-1zM59 36h1v1h-1zM59 37h1v1h-1zM5 38h1v1h-1zM59 38h1v1h-1zM5 39h1v1h-1zM59 39h1v1h-1zM13 40h1v1h-1zM13 41h1v1h-1z"/><path fill="#8a7d97" d="M19 15h1v1h-1zM15 16h1v1h-1zM18 16h2v1h-2zM44 16h2v1h-2zM43 17h5v1h-5zM49 17h1v1h-1zM43 18h9v1h-9zM43 19h4v1h-4zM51 19h1v1h-1zM43 20h6v1h-6zM51 20h1v1h-1zM43 21h7v1h-7zM51 21h2v1h-2zM50 22h3v1h-3zM9 23h1v1h-1zM51 23h2v1h-2zM4 24h1v1h-1zM17 24h1v1h-1zM29 24h1v1h-1zM32 24h1v1h-1zM13 25h1v1h-1zM10 28h1v1h-1zM8 31h1v1h-1zM0 34h1v1h-1zM62 34h1v1h-1zM0 35h1v1h-1zM62 35h1v1h-1zM15 37h1v1h-1zM0 38h1v1h-1zM14 38h1v1h-1zM62 43h1v1h-1zM15 63h1v1h-1zM34 64h1v1h-1z"/><path fill="#5f536a" d="M30 15h6v1h-6zM24 16h1v1h-1zM16 17h2v1h-2zM14 18h1v1h-1zM18 21h1v1h-1zM22 22h1v1h-1zM5 24h1v1h-1zM47 24h1v1h-1zM17 25h1v1h-1zM4 33h1v1h-1zM1 34h1v1h-1zM14 37h1v1h-1zM1 38h3v1h-3zM1 39h3v1h-3zM2 41h1v1h-1zM4 41h1v1h-1zM38 54h1v1h-1zM31 56h7v1h-7zM31 57h8v1h-8zM32 58h8v1h-8zM28 59h1v1h-1zM33 59h7v1h-7zM32 60h7v1h-7zM43 60h1v1h-1zM35 61h1v1h-1zM42 61h1v1h-1zM39 63h1v1h-1z"/><path fill="#332e3f" d="M39 15h1v1h-1zM31 16h3v1h-3zM27 18h2v1h-2zM37 18h2v1h-2zM53 18h1v1h-1zM27 19h2v1h-2zM37 19h2v1h-2zM28 20h1v1h-1zM38 20h1v1h-1zM34 22h3v1h-3zM39 23h1v1h-1zM28 24h1v1h-1zM22 25h1v1h-1zM26 25h1v1h-1zM22 26h4v1h-4zM41 26h1v1h-1zM15 27h1v1h-1zM18 27h3v1h-3zM45 27h4v1h-4zM11 28h1v1h-1zM15 28h2v1h-2zM50 28h1v1h-1zM53 28h1v1h-1zM10 29h1v1h-1zM12 29h3v1h-3zM51 29h4v1h-4zM56 31h1v1h-1zM8 32h1v1h-1zM5 34h1v1h-1zM5 35h1v1h-1zM5 37h1v1h-1zM13 39h1v1h-1zM4 40h1v1h-1zM19 57h7v1h-7zM44 58h1v1h-1zM40 62h1v1h-1z"/><path fill="#453e56" d="M20 17h1v1h-1zM39 20h1v1h-1zM39 21h1v1h-1zM10 22h1v1h-1zM40 22h1v1h-1zM55 22h1v1h-1zM10 23h1v1h-1zM10 25h1v1h-1zM60 34h1v1h-1zM21 35h1v1h-1zM60 35h1v1h-1zM4 37h1v1h-1zM4 38h1v1h-1zM27 55h4v1h-4zM38 55h5v1h-5zM44 55h1v1h-1zM27 56h3v1h-3zM39 56h6v1h-6zM27 57h3v1h-3zM41 57h4v1h-4zM29 58h1v1h-1zM42 58h1v1h-1zM45 58h1v1h-1zM29 59h2v1h-2zM30 60h1v1h-1zM39 61h1v1h-1z"/><path fill="#4f4b6b" d="M21 17h4v1h-4zM15 18h1v1h-1zM17 18h8v1h-8zM14 19h1v1h-1zM18 19h7v1h-7zM14 20h2v1h-2zM17 20h1v1h-1zM20 20h5v1h-5zM14 21h1v1h-1zM17 21h1v1h-1zM19 21h5v1h-5zM14 22h1v1h-1zM16 22h6v1h-6zM14 23h3v1h-3zM18 35h3v1h-3zM23 35h1v1h-1zM21 36h4v1h-4zM21 37h2v1h-2zM21 38h2v1h-2zM21 39h2v1h-2zM22 40h1v1h-1zM22 41h1v1h-1zM30 56h1v1h-1zM38 56h1v1h-1zM39 57h1v1h-1zM31 60h1v1h-1z"/><path fill="#8194b9" d="M15 19h1v1h-1zM47 19h4v1h-4zM16 20h1v1h-1zM49 20h2v1h-2zM50 21h1v1h-1zM18 36h3v1h-3zM17 37h4v1h-4zM23 37h2v1h-2zM17 38h4v1h-4zM25 38h1v1h-1zM17 39h4v1h-4zM23 39h4v1h-4zM23 40h4v1h-4zM23 41h4v1h-4zM26 42h1v1h-1z"/><path fill="#9dc2da" d="M16 19h1v1h-1zM15 21h1v1h-1zM17 36h1v1h-1zM23 38h2v1h-2zM17 40h4v1h-4zM17 41h4v1h-4zM18 42h4v1h-4zM23 42h3v1h-3zM18 43h9v1h-9zM18 44h8v1h-8zM19 45h6v1h-6z"/><path fill="#f6cd96" d="M40 39h1v1h-1zM40 40h1v1h-1zM46 40h4v1h-4zM40 41h1v1h-1zM46 41h4v1h-4zM40 42h4v1h-4zM46 42h4v1h-4zM41 43h9v1h-9zM41 44h8v1h-8zM43 45h5v1h-5z"/><path fill="#ffffff" d="M16 40h1v1h-1zM16 41h1v1h-1zM16 42h1v1h-1zM17 44h1v1h-1z"/></svg>
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as vn}from"./index-CWUiS-aC.js";import{r as n}from"./syntax-highlighter-d-DuIo_w.js";import{r as En}from"./main-Vf3EflnQ.js";const Nt="carousel",Tt="controller",xn="navigation",bn="no-scroll",qe="portal",wn="root",kt="toolbar",gt="zoom",Fe="loading",Ve="error",Ue="complete",Cn="placeholder",_n=e=>`active-slide-${e}`,Pn="fullsize",Qe="flex_center",Sn="no_scroll",Dt="no_scroll_padding",Je="slide",At="slide_wrapper",Mn="slide_wrapper_interactive",fe="prev",he="next",vt="swipe",Ee="close",Zt="onPointerDown",Wt="onPointerMove",$t="onPointerUp",zt="onPointerLeave",Ft="onPointerCancel",et="onKeyDown",Ln="onKeyUp",tt="onWheel",yn="Escape",In="ArrowLeft",On="ArrowRight",Rn="button",Be="icon",Vt="contain",Et="cover",Ut="Unknown action type",Xt="yarl__";function ie(...e){return e.filter(Boolean).join(" ")}function k(e){return`${Xt}${e}`}function q(e){return`--${Xt}${e}`}function Se(e,t){return`${e}${t?`_${t}`:""}`}function nt(e){return t=>Se(e,t)}function xe(e,t){var o;return(o=e==null?void 0:e[t])!==null&&o!==void 0?o:t}function Nn(e,t,o){return xe(e,"{index} of {total}").replace(/\{index}/g,`${st(o,t.length)+1}`).replace(/\{total}/g,`${t.length}`)}function ot(...e){return()=>{e.forEach(t=>{t()})}}function se(e,t,o){return()=>{const r=n.useContext(o);if(!r)throw new Error(`${e} must be used within a ${t}.Provider`);return r}}function rt(){return typeof window<"u"}function it(e,t=0){const o=10**t;return Math.round((e+Number.EPSILON)*o)/o}function me(e){return e.type===void 0||e.type==="image"}function ct(e,t){return e.imageFit===Et||e.imageFit!==Vt&&t===Et}function Ne(e){return typeof e=="string"?Number.parseInt(e,10):e}function Oe(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=Ne(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function Tn(e,t){const o=Oe(t),r=o.percent!==void 0?e.width/100*o.percent:o.pixel;return{width:Math.max(e.width-2*r,0),height:Math.max(e.height-2*r,0)}}function Yt(e){return Number.isFinite(e)?(Math.round(e/90)*90%360+360)%360:0}function kn(){return(rt()?window==null?void 0:window.devicePixelRatio:void 0)||1}function st(e,t){return t>0?(e%t+t)%t:0}function Ht(e){return e.length>0}function Bt(e,t){return e[st(t,e.length)]}function Ke(e,t){return Ht(e)?Bt(e,t):void 0}function Dn(e){return me(e)?e.src:void 0}function An(e,t,o){if(!o)return e;const{buttons:r,...i}=e,s=r.findIndex(l=>l===t),c=n.isValidElement(o)?n.cloneElement(o,{key:t},null):o;if(s>=0){const l=[...r];return l.splice(s,1,c),{buttons:l,...i}}return{buttons:[c,...r],...i}}function Zn(e,t,o=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),o))}const Wn=Number(n.version.split(".")[0])>=19;function $n(e){return{inert:Wn?e:e?"":void 0}}function zn(e){e.scrollTop}const je={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Ee]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Vt,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,closeOnEscape:!0,preventDefaultWheelX:!0,preventDefaultWheelY:!1,disableSwipeNavigation:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function ae(e,t){return{name:e,component:t}}function Y(e,t){return{module:e,children:t}}function Kt(e,t,o){return e.module.name===t?o(e):e.children?[Y(e.module,e.children.flatMap(r=>{var i;return(i=Kt(r,t,o))!==null&&i!==void 0?i:[]}))]:[e]}function ve(e,t,o){return e.flatMap(r=>{var i;return(i=Kt(r,t,o))!==null&&i!==void 0?i:[]})}function Fn(e,t=[],o=[]){let r=e;const i=p=>{const g=[...r];for(;g.length>0;){const u=g.pop();if((u==null?void 0:u.module.name)===p)return!0;u!=null&&u.children&&g.push(...u.children)}return!1},s=(p,g)=>{if(p===""){r=[Y(g,r)];return}r=ve(r,p,u=>[Y(g,[u])])},c=(p,g)=>{r=ve(r,p,u=>[Y(u.module,[Y(g,u.children)])])},l=(p,g,u)=>{r=ve(r,p,_=>{var x;return[Y(_.module,[...u?[Y(g)]:[],...(x=_.children)!==null&&x!==void 0?x:[],...u?[]:[Y(g)]])]})},d=(p,g,u)=>{r=ve(r,p,_=>[...u?[Y(g)]:[],_,...u?[]:[Y(g)]])},a=p=>{c(Tt,p)},m=(p,g)=>{r=ve(r,p,u=>[Y(g,u.children)])},f=p=>{r=ve(r,p,g=>g.children)},h=p=>{o.push(p)};return t.forEach(p=>{p({contains:i,addParent:s,append:c,addChild:l,addSibling:d,addModule:a,replace:m,remove:f,augment:h})}),{config:r,augmentation:p=>o.reduce((g,u)=>u(g),p)}}const jt=n.createContext(null),Gt=se("useA11yContext","A11yContext",jt);function Vn({children:e}){const[t,o]=n.useState(!1),[r,i]=n.useState(!1),s=n.useMemo(()=>({focusWithin:t,trackFocusWithin:(l,d)=>{const a=m=>f=>{var h;f.currentTarget.contains(f.relatedTarget)||o(m),(h=m?l:d)===null||h===void 0||h(f)};return{onFocus:a(!0),onBlur:a(!1)}},autoPlaying:r,setAutoPlaying:i}),[t,r]);return n.createElement(jt.Provider,{value:s},e)}const qt=n.createContext(null),Te=se("useDocument","DocumentContext",qt);function Un({nodeRef:e,children:t}){const o=n.useMemo(()=>{const r=s=>{var c;return((c=s||e.current)===null||c===void 0?void 0:c.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:s=>{var c;return((c=r(s))===null||c===void 0?void 0:c.defaultView)||window}}},[e]);return n.createElement(qt.Provider,{value:o},t)}const Qt=n.createContext(null),ke=se("useEvents","EventsContext",Qt);function Xn({children:e}){const[t]=n.useState({});n.useEffect(()=>()=>{Object.keys(t).forEach(r=>delete t[r])},[t]);const o=n.useMemo(()=>{const r=(c,l)=>{var d;(d=t[c])===null||d===void 0||d.splice(0,t[c].length,...t[c].filter(a=>a!==l))};return{publish:(...[c,l])=>{var d;(d=t[c])===null||d===void 0||d.forEach(a=>a(l))},subscribe:(c,l)=>(t[c]||(t[c]=[]),t[c].push(l),()=>r(c,l)),unsubscribe:r}},[t]);return n.createElement(Qt.Provider,{value:o},e)}const Jt=n.createContext(null),te=se("useLightboxProps","LightboxPropsContext",Jt);function Yn({children:e,...t}){return n.createElement(Jt.Provider,{value:t},e)}const en=n.createContext(null),ue=se("useLightboxState","LightboxStateContext",en),tn=n.createContext(null),Hn=se("useLightboxDispatch","LightboxDispatchContext",tn);function Bn(e,t){switch(t.type){case"swipe":{const{slides:o}=e,r=(t==null?void 0:t.increment)||0,i=e.globalIndex+r,s=st(i,o.length),c=Ke(o,s),l=r||t.duration!==void 0?{increment:r,duration:t.duration,easing:t.easing}:void 0;return{slides:o,currentIndex:s,globalIndex:i,currentSlide:c,animation:l}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:Ke(t.slides,t.index)}:e;default:throw new Error(Ut)}}function Kn({slides:e,index:t,children:o}){const[r,i]=n.useReducer(Bn,{slides:e,currentIndex:t,globalIndex:t,currentSlide:Ke(e,t)}),[s,c]=n.useState(e),[l,d]=n.useState(t);(e!==s||t!==l)&&(c(e),d(t),i({type:"update",slides:e,index:t}));const a=n.useMemo(()=>({...r,state:r,dispatch:i}),[r,i]);return n.createElement(tn.Provider,{value:i},n.createElement(en.Provider,{value:a},o))}const nn=n.createContext(null),jn=se("useRTLContext","RTLContext",nn);function Gn({isRTL:e,children:t}){const o=n.useMemo(()=>({isRTL:e}),[e]);return n.createElement(nn.Provider,{value:o},t)}const qn=n.createContext(null);function De(e){const t=n.useContext(qn);return e&&t?Yt(t(e)):0}const on=n.createContext(null),Ae=se("useTimeouts","TimeoutsContext",on);function Qn({children:e}){const[t]=n.useState([]);n.useEffect(()=>()=>{t.forEach(r=>window.clearTimeout(r)),t.splice(0,t.length)},[t]);const o=n.useMemo(()=>{const r=c=>{t.splice(0,t.length,...t.filter(l=>l!==c))};return{setTimeout:(c,l)=>{const d=window.setTimeout(()=>{r(d),c()},l);return t.push(d),d},clearTimeout:c=>{c!==void 0&&(r(c),window.clearTimeout(c))}}},[t]);return n.createElement(on.Provider,{value:o},e)}const lt=n.forwardRef(function({label:t,className:o,icon:r,renderIcon:i,onClick:s,style:c,...l},d){const{styles:a,labels:m}=te(),f=xe(m,t);return n.createElement("button",{ref:d,type:"button",title:f,"aria-label":f,className:ie(k(Rn),o),onClick:s,style:{...c,...a.button},...l},i?i():n.createElement(r,{className:k(Be),style:a.icon}))});function Jn(e,t){const o=r=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},t);return o.displayName=e,o}function pe(e,t){return Jn(e,n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}const eo=pe("Close",n.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),to=pe("Previous",n.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),no=pe("Next",n.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),oo=pe("Loading",n.createElement(n.Fragment,null,Array.from({length:8}).map((e,t,o)=>n.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/o.length*(t+1),transform:`rotate(${360/o.length*t}, 12, 12)`})))),ro=pe("Error",n.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),ce=rt()?n.useLayoutEffect:n.useEffect;function at(){const[e,t]=n.useState(!1);return n.useEffect(()=>{var o,r;const i=(o=window.matchMedia)===null||o===void 0?void 0:o.call(window,"(prefers-reduced-motion: reduce)");t(i==null?void 0:i.matches);const s=c=>t(c.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",s),()=>{var c;return(c=i==null?void 0:i.removeEventListener)===null||c===void 0?void 0:c.call(i,"change",s)}},[]),e}function io(e){let t=0,o=0,r=0;const s=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(s){const c=s[1].split(",").map(Ne);c.length===6?(t=c[4],o=c[5]):c.length===16&&(t=c[12],o=c[13],r=c[14])}return{x:t,y:o,z:r}}function xt(e,t){const o=n.useRef(void 0),r=n.useRef(void 0),i=at();return ce(()=>{var s,c,l;if(e.current&&o.current!==void 0&&!i){const{keyframes:d,duration:a,easing:m,onfinish:f}=t(o.current,e.current.getBoundingClientRect(),io(e.current))||{};if(d&&a){(s=r.current)===null||s===void 0||s.cancel(),r.current=void 0;try{r.current=(l=(c=e.current).animate)===null||l===void 0?void 0:l.call(c,d,{duration:a,easing:m})}catch(h){console.error(h)}r.current&&(r.current.onfinish=()=>{r.current=void 0,f==null||f()})}}o.current=void 0}),{prepareAnimation:s=>{o.current=s},isAnimationPlaying:()=>{var s;return((s=r.current)===null||s===void 0?void 0:s.playState)==="running"}}}function rn(){const e=n.useRef(null),t=n.useRef(void 0),[o,r]=n.useState();return{setContainerRef:n.useCallback(s=>{e.current=s,t.current&&(t.current.disconnect(),t.current=void 0);const c=()=>{if(s){const l=window.getComputedStyle(s),d=a=>parseFloat(a)||0;r({width:Math.round(s.clientWidth-d(l.paddingLeft)-d(l.paddingRight)),height:Math.round(s.clientHeight-d(l.paddingTop)-d(l.paddingBottom))})}else r(void 0)};c(),s&&typeof ResizeObserver<"u"&&(t.current=new ResizeObserver(c),t.current.observe(s))},[]),containerRef:e,containerRect:o}}function Ie(){const e=n.useRef(void 0),{setTimeout:t,clearTimeout:o}=Ae();return n.useCallback((r,i)=>{o(e.current),e.current=t(r,i>0?i:0)},[t,o])}function A(e){const t=n.useRef(e);return ce(()=>{t.current=e}),n.useCallback((...o)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...o)},[])}function bt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Ge(e,t){return n.useMemo(()=>e==null&&t==null?null:o=>{bt(e,o),bt(t,o)},[e,t])}function co(e,t=!1){const o=n.useRef(!1);ce(()=>{t&&o.current&&(o.current=!1,e())},[t,e]);const r=n.useCallback(()=>{o.current=!0},[]),i=n.useCallback(()=>{o.current=!1},[]);return{onFocus:r,onBlur:i}}function ut(){return jn().isRTL}function so(){const[e]=n.useState({}),t=n.useCallback((i,s)=>{var c;(c=e[i])===null||c===void 0||c.forEach(l=>{s.isPropagationStopped()||l(s)})},[e]),o=n.useMemo(()=>({onPointerDown:i=>t(Zt,i),onPointerMove:i=>t(Wt,i),onPointerUp:i=>t($t,i),onPointerLeave:i=>t(zt,i),onPointerCancel:i=>t(Ft,i),onKeyDown:i=>t(et,i),onKeyUp:i=>t(Ln,i),onWheel:i=>t(tt,i)}),[t]),r=n.useCallback((i,s)=>(e[i]||(e[i]=[]),e[i].unshift(s),()=>{const c=e[i];c&&c.splice(0,c.length,...c.filter(l=>l!==s))}),[e]);return{registerSensors:o,subscribeSensors:r}}function wt(e,t){const o=n.useRef(0),r=Ie(),i=A((...s)=>{o.current=Date.now(),e(...s)});return n.useCallback((...s)=>{r(()=>{i(...s)},t-(Date.now()-o.current))},[t,i,r])}const Xe=nt("slide"),Ye=nt("slide_image");function Re({slide:e,offset:t,render:o,rect:r,rotation:i=0,imageFit:s,imageProps:c,onClick:l,onLoad:d,onError:a,style:m}){var f,h,p,g,u,_,x,M;const[L,R]=n.useState(Fe),{publish:P}=ke(),{setTimeout:N}=Ae(),y=n.useRef(null);n.useEffect(()=>{t===0&&P(_n(L))},[t,L,P]);const T=A(W=>{("decode"in W?W.decode():Promise.resolve()).catch(()=>{}).then(()=>{W.parentNode&&(R(Ue),N(()=>{d==null||d(W)},0))})}),v=n.useCallback(W=>{y.current=W,W!=null&&W.complete&&T(W)},[T]),I=n.useCallback(W=>{T(W.currentTarget)},[T]),Z=A(()=>{R(Ve),a==null||a()}),U=ct(e,s),w=Yt(i),S=w%180!==0,b=r&&S?{width:r.height,height:r.width}:r,F=S&&b?`${b.width}px`:"100%",$=S&&b?`${b.height}px`:"100%",C=(W,ge)=>Number.isFinite(W)?W:ge,D=C(Math.max(...((h=(f=e.srcSet)===null||f===void 0?void 0:f.map(W=>W.width))!==null&&h!==void 0?h:[]).concat(e.width?[e.width]:[]).filter(Boolean)),((p=y.current)===null||p===void 0?void 0:p.naturalWidth)||0),O=C(Math.max(...((u=(g=e.srcSet)===null||g===void 0?void 0:g.map(W=>W.height))!==null&&u!==void 0?u:[]).concat(e.height?[e.height]:[]).filter(Boolean)),((_=y.current)===null||_===void 0?void 0:_.naturalHeight)||0),X=D&&O?{maxWidth:`min(${D}px, ${F})`,maxHeight:`min(${O}px, ${$})`}:{maxWidth:F,maxHeight:$},V=b&&D&&O?Math.min(b.width/D,b.height/O,1):0,H=S&&b?U?{width:b.width,height:b.height}:V?{width:D*V,height:O*V}:null:null,B=(x=e.srcSet)===null||x===void 0?void 0:x.slice().sort((W,ge)=>W.width-ge.width).map(W=>`${W.src} ${W.width}w`).join(", "),Q=(()=>{if(b)return!e.width||!e.height?b.width:(U?Math.max:Math.min)(b.height/e.height*e.width,b.width)})(),J=B&&Q!==void 0&&rt()?`${Math.round(Q)}px`:void 0,{style:be,className:Me,...we}=(typeof c=="function"?c(e):c)||{};return n.createElement(n.Fragment,null,n.createElement("img",{ref:v,onLoad:I,onError:Z,onClick:l,draggable:!1,className:ie(k(Ye()),U&&k(Ye("cover")),L!==Ue&&k(Ye("loading")),Me),style:{...X,...w?{rotate:`${w}deg`}:null,...S?{flexShrink:0}:null,...H,...m,...be},...we,alt:(M=e.alt)!==null&&M!==void 0?M:"",sizes:J,srcSet:B,src:e.src}),L!==Ue&&n.createElement("div",{className:k(Xe(Cn))},L===Fe&&(o!=null&&o.iconLoading?o.iconLoading():n.createElement(oo,{className:ie(k(Be),k(Xe(Fe)))})),L===Ve&&(o!=null&&o.iconError?o.iconError():n.createElement(ro,{className:ie(k(Be),k(Xe(Ve)))}))))}const lo=n.forwardRef(function({className:t,children:o,onFocus:r,onBlur:i,...s},c){const l=n.useRef(null),[d,a]=n.useState(!1),{trackFocusWithin:m}=Gt(),f=A(()=>{if(l.current){const h=window.getComputedStyle(l.current).direction==="rtl";h!==d&&a(h)}});return n.useEffect(f),n.createElement(Un,{nodeRef:l},n.createElement(Gn,{isRTL:d},n.createElement("div",{ref:Ge(c,l),className:ie(k("root"),t),...m(r,i),...s},o)))});var K;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"})(K||(K={}));function cn(e,t,o,r,i){n.useEffect(()=>i?()=>{}:ot(e(Zt,t),e(Wt,o),e($t,r),e(zt,r),e(Ft,r)),[e,t,o,r,i])}var ne;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"})(ne||(ne={}));const He=30;function ao({disableSwipeNavigation:e,closeOnBackdropClick:t},o,r,i,s,c,l,d,a,m,f,h,p,g,u,_){const x=n.useRef(0),M=n.useRef([]),L=n.useRef(void 0),R=n.useRef(0),P=n.useRef(ne.NONE),N=n.useCallback(w=>{L.current===w.pointerId&&(L.current=void 0,P.current=ne.NONE);const S=M.current;S.splice(0,S.length,...S.filter(b=>b.pointerId!==w.pointerId))},[]),y=n.useCallback(w=>{N(w),w.persist(),M.current.push(w)},[N]),T=n.useCallback(w=>M.current.find(({pointerId:S})=>w.pointerId===S),[]),v=A(w=>{y(w)}),I=(w,S)=>f&&w>S||m&&w<-S,Z=A(w=>{const S=T(w);if(S)if(L.current===w.pointerId){const b=Date.now()-R.current,F=x.current;P.current===ne.SWIPE?Math.abs(F)>.3*i||Math.abs(F)>5&&b<s?d(F,b):a(F):P.current===ne.PULL&&(I(F,2*He)?g(F,b):u(F)),x.current=0,P.current=ne.NONE}else{const{target:b}=w;t&&b instanceof HTMLElement&&b===S.target&&(b.classList.contains(k(Je))||b.classList.contains(k(At)))&&_()}N(w)}),U=A(w=>{const S=T(w);if(S){const b=L.current===w.pointerId;if(w.buttons===0){b&&x.current!==0?Z(w):N(S);return}const F=w.clientX-S.clientX,$=w.clientY-S.clientY;if(L.current===void 0){const C=D=>{y(w),L.current=w.pointerId,R.current=Date.now(),P.current=D};Math.abs(F)>Math.abs($)&&Math.abs(F)>He&&r(F)?e||(C(ne.SWIPE),c()):Math.abs($)>Math.abs(F)&&I($,He)&&(C(ne.PULL),h())}else b&&(P.current===ne.SWIPE?(x.current=F,l(F)):P.current===ne.PULL&&(x.current=$,p($)))}});cn(o,v,U,Z)}function uo({preventDefaultWheelX:e,preventDefaultWheelY:t}){const o=n.useRef(null),r=A(i=>{const s=Math.abs(i.deltaX)>Math.abs(i.deltaY);(s&&e||!s&&t||i.ctrlKey)&&i.preventDefault()});return n.useCallback(i=>{var s;i?i.addEventListener("wheel",r,{passive:!1}):(s=o.current)===null||s===void 0||s.removeEventListener("wheel",r),o.current=i},[r])}function fo(e,t,o,r,i,s,c,l,d){const a=n.useRef(0),m=n.useRef(0),f=n.useRef(void 0),h=n.useRef(void 0),p=n.useRef(0),g=n.useRef(void 0),u=n.useRef(0),{setTimeout:_,clearTimeout:x}=Ae(),M=n.useCallback(()=>{f.current&&(x(f.current),f.current=void 0)},[x]),L=n.useCallback(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),R=A(()=>{e!==K.SWIPE&&(a.current=0,u.current=0,M(),L())});n.useEffect(R,[e,R]);const P=A(y=>{h.current=void 0,a.current===y&&d(a.current)}),N=A(y=>{if(y.ctrlKey||Math.abs(y.deltaY)>Math.abs(y.deltaX))return;const T=v=>{p.current=v,x(g.current),g.current=v>0?_(()=>{p.current=0,g.current=void 0},300):void 0};if(e===K.NONE){if(Math.abs(y.deltaX)<=1.2*Math.abs(p.current)){T(y.deltaX);return}if(!o(-y.deltaX))return;if(m.current+=y.deltaX,M(),Math.abs(m.current)>30)m.current=0,T(0),u.current=Date.now(),s();else{const v=m.current;f.current=_(()=>{f.current=void 0,v===m.current&&(m.current=0)},i)}}else if(e===K.SWIPE){let v=a.current-y.deltaX;if(v=Math.min(Math.abs(v),r)*Math.sign(v),a.current=v,c(v),L(),Math.abs(v)>.2*r){T(y.deltaX),l(v,Date.now()-u.current);return}h.current=_(()=>P(v),2*i)}else T(y.deltaX)});n.useEffect(()=>t(tt,N),[t,N])}const Ct=nt("container"),sn=n.createContext(null),le=se("useController","ControllerContext",sn);function ho({children:e,...t}){var o;const{carousel:r,animation:i,controller:s,on:c,styles:l,render:d}=t,{closeOnPullUp:a,closeOnPullDown:m,preventDefaultWheelX:f,preventDefaultWheelY:h}=s,[p,g]=n.useState(),u=ue(),_=Hn(),[x,M]=n.useState(K.NONE),L=n.useRef(0),R=n.useRef(0),P=n.useRef(1),{registerSensors:N,subscribeSensors:y}=so(),{subscribe:T,publish:v}=ke(),I=Ie(),Z=Ie(),U=Ie(),{containerRef:w,setContainerRef:S,containerRect:b}=rn(),F=Ge(uo({preventDefaultWheelX:f,preventDefaultWheelY:h}),S),$=n.useRef(null),C=Ge($,void 0),{getOwnerDocument:D}=Te(),O=ut(),X=E=>(O?-1:1)*(typeof E=="number"?E:1),V=A(()=>{var E;return(E=w.current)===null||E===void 0?void 0:E.focus()}),H=A(()=>t),B=A(()=>u),G=n.useCallback(E=>v(fe,E),[v]),Q=n.useCallback(E=>v(he,E),[v]),J=n.useCallback(()=>v(Ee),[v]),be=E=>!(r.finite&&(X(E)>0&&u.currentIndex===0||X(E)<0&&u.currentIndex===u.slides.length-1)),Me=E=>{var z;L.current=E,(z=w.current)===null||z===void 0||z.style.setProperty(q("swipe_offset"),`${Math.round(E)}px`)},we=E=>{var z,j;R.current=E,P.current=(()=>{const _e=m&&E>0?E:a&&E<0?-E:0;return Math.min(Math.max(it(1-_e/60*(1-.5),2),.5),1)})(),(z=w.current)===null||z===void 0||z.style.setProperty(q("pull_offset"),`${Math.round(E)}px`),(j=w.current)===null||j===void 0||j.style.setProperty(q("pull_opacity"),`${P.current}`)},{prepareAnimation:W}=xt($,(E,z,j)=>{if($.current&&b)return{keyframes:[{transform:`translate(0, ${E.rect.y-z.y+j.y}px)`,opacity:E.opacity},{transform:"translate(0, 0)",opacity:1}],duration:E.duration,easing:i.easing.fade}}),ge=(E,z)=>{if(a||m){we(E);let j=0;$.current&&(j=i.fade*(z?2:1),W({rect:$.current.getBoundingClientRect(),opacity:P.current,duration:j})),U(()=>{we(0),M(K.NONE)},j),M(K.ANIMATION),z||J()}},{prepareAnimation:hn,isAnimationPlaying:mn}=xt($,(E,z,j)=>{var oe;if($.current&&b&&(!((oe=u.animation)===null||oe===void 0)&&oe.duration)){const ee=Oe(r.spacing),_e=(ee.percent?ee.percent*b.width/100:ee.pixel)||0;return{keyframes:[{transform:`translate(${X(u.globalIndex-E.index)*(b.width+_e)+E.rect.x-z.x+j.x}px, 0)`},{transform:"translate(0, 0)"}],duration:u.animation.duration,easing:u.animation.easing}}}),Ce=A(E=>{var z,j;const oe=E.offset||0,ee=oe?i.swipe:(z=i.navigation)!==null&&z!==void 0?z:i.swipe,_e=!oe&&!mn()?i.easing.navigation:i.easing.swipe;let{direction:Le}=E;const ye=(j=E.count)!==null&&j!==void 0?j:1;let We=K.ANIMATION,re=ee*ye;if(!Le){const Pe=b==null?void 0:b.width,pt=E.duration||0,ze=Pe?ee/Pe*Math.abs(oe):ee;ye!==0?(pt<ze?re=re/ze*Math.max(pt,ze/5):Pe&&(re=ee/Pe*(Pe-Math.abs(oe))),Le=X(oe)>0?fe:he):re=ee/2}let $e=0;Le===fe?be(X(1))?$e=-ye:(We=K.NONE,re=ee):Le===he&&(be(X(-1))?$e=ye:(We=K.NONE,re=ee)),re=Math.round(re),Z(()=>{Me(0),M(K.NONE)},re),$.current&&hn({rect:$.current.getBoundingClientRect(),index:u.globalIndex}),M(We),v(vt,{type:"swipe",increment:$e,duration:re,easing:_e})});n.useEffect(()=>{var E,z;!((E=u.animation)===null||E===void 0)&&E.increment&&(!((z=u.animation)===null||z===void 0)&&z.duration)&&I(()=>_({type:"swipe",increment:0}),u.animation.duration)},[u.animation,_,I]);const ft=[y,be,(b==null?void 0:b.width)||0,i.swipe,()=>M(K.SWIPE),E=>Me(E),(E,z)=>Ce({offset:E,duration:z,count:1}),E=>Ce({offset:E,count:0})],pn=[()=>{m&&M(K.PULL)},E=>we(E),E=>ge(E),E=>ge(E,!0)];ao(s,...ft,a,m,...pn,J),fo(x,...ft);const ht=A(()=>{s.focus&&D().querySelector(`.${k(qe)} .${k(Ct())}`)&&V()});n.useEffect(ht,[ht]);const mt=A(()=>{var E;(E=c.view)===null||E===void 0||E.call(c,{index:u.currentIndex})});n.useEffect(mt,[u.globalIndex,mt]),n.useEffect(()=>ot(T(fe,E=>Ce({direction:fe,...E})),T(he,E=>Ce({direction:he,...E})),T(vt,E=>_(E))),[T,Ce,_]);const gn=n.useMemo(()=>({prev:G,next:Q,close:J,focus:V,slideRect:b?Tn(b,r.padding):{width:0,height:0},containerRect:b||{width:0,height:0},subscribeSensors:y,containerRef:w,setCarouselRef:C,toolbarWidth:p,setToolbarWidth:g}),[G,Q,J,V,y,b,w,C,p,g,r.padding]);return n.useImperativeHandle(s.ref,()=>({prev:G,next:Q,close:J,focus:V,getLightboxProps:H,getLightboxState:B}),[G,Q,J,V,H,B]),n.createElement("div",{ref:F,className:ie(k(Ct()),k(Qe)),style:{...x===K.SWIPE?{[q("swipe_offset")]:`${Math.round(L.current)}px`}:null,...x===K.PULL?{[q("pull_offset")]:`${Math.round(R.current)}px`,[q("pull_opacity")]:`${P.current}`}:null,...s.touchAction!=="none"?{[q("controller_touch_action")]:s.touchAction}:null,...l.container},tabIndex:-1,...N},b&&n.createElement(sn.Provider,{value:gn},e,(o=d.controls)===null||o===void 0?void 0:o.call(d)))}const mo=ae(Tt,ho);function de(e){return Se(Nt,e)}function _t(e){return Se(Je,e)}function po({slide:e,offset:t}){const o=n.useRef(null),{currentIndex:r,slides:i}=ue(),{slideRect:s,focus:c}=le(),{render:l,carousel:{imageFit:d,imageProps:a},on:{click:m},styles:{slide:f},labels:h}=te(),{getOwnerDocument:p}=Te(),g=De(e),u=t!==0;n.useEffect(()=>{var x;u&&(!((x=o.current)===null||x===void 0)&&x.contains(p().activeElement))&&c()},[u,c,p]);const _=()=>{var x,M,L,R;let P=(x=l.slide)===null||x===void 0?void 0:x.call(l,{slide:e,offset:t,rect:s});return!P&&me(e)&&(P=n.createElement(Re,{slide:e,offset:t,render:l,rect:s,rotation:g,imageFit:d,imageProps:a,onClick:u?void 0:()=>m==null?void 0:m({index:r})})),P?n.createElement(n.Fragment,null,(M=l.slideHeader)===null||M===void 0?void 0:M.call(l,{slide:e}),((L=l.slideContainer)!==null&&L!==void 0?L:(({children:N})=>N))({slide:e,children:P}),(R=l.slideFooter)===null||R===void 0?void 0:R.call(l,{slide:e})):null};return n.createElement("div",{ref:o,className:ie(k(_t()),!u&&k(_t("current")),k(Qe)),...$n(u),style:f,role:"group","aria-roledescription":xe(h,"Slide"),"aria-label":Nn(h,i,r+t)},_())}function go(){const e=te().styles.slide;return n.createElement("div",{className:k(Je),style:e})}function vo({carousel:e,labels:t}){const{slides:o,currentIndex:r,globalIndex:i}=ue(),{setCarouselRef:s}=le(),{autoPlaying:c,focusWithin:l}=Gt(),d=Oe(e.spacing),a=Oe(e.padding),m=Zn(e,o,1),f=[];if(Ht(o))for(let h=r-m;h<=r+m;h+=1){const p=Bt(o,h),g=i-r+h,u=e.finite&&(h<0||h>o.length-1);f.push(u?{key:g}:{key:[`${g}`,Dn(p)].filter(Boolean).join("|"),offset:h-r,slide:p})}return n.createElement("div",{ref:s,className:ie(k(de()),f.length>0&&k(de("with_slides"))),style:{[`${q(de("slides_count"))}`]:f.length,[`${q(de("spacing_px"))}`]:d.pixel||0,[`${q(de("spacing_percent"))}`]:d.percent||0,[`${q(de("padding_px"))}`]:a.pixel||0,[`${q(de("padding_percent"))}`]:a.percent||0},role:"region","aria-live":c&&!l?"off":"polite","aria-roledescription":xe(t,"Carousel"),"aria-label":xe(t,"Photo gallery")},f.map(({key:h,slide:p,offset:g})=>p?n.createElement(po,{key:h,slide:p,offset:g}):n.createElement(go,{key:h})))}const Eo=ae(Nt,vo);function ln(){const{carousel:e}=te(),{slides:t,currentIndex:o}=ue(),r=t.length===0||e.finite&&o===0,i=t.length===0||e.finite&&o===t.length-1;return{prevDisabled:r,nextDisabled:i}}function xo(e){var t;const o=ut(),{publish:r}=ke(),{animation:i,controller:s}=te(),{prevDisabled:c,nextDisabled:l}=ln(),d=((t=i.navigation)!==null&&t!==void 0?t:i.swipe)/2,a=wt(()=>r(fe),d),m=wt(()=>r(he),d),f=A(h=>{switch(h.key){case yn:if(!s.closeOnEscape)return;r(Ee);break;case In:(o?l:c)||(o?m:a)();break;case On:(o?c:l)||(o?a:m)();break;default:return}h.stopPropagation()});n.useEffect(()=>e(et,f),[e,f])}function Pt({label:e,icon:t,renderIcon:o,action:r,onClick:i,disabled:s,style:c}){return n.createElement(lt,{label:e,icon:t,renderIcon:o,className:k(`navigation_${r}`),disabled:s,onClick:i,style:c,...co(le().focus,s)})}function bo({render:{buttonPrev:e,buttonNext:t,iconPrev:o,iconNext:r},styles:i}){const{prev:s,next:c,subscribeSensors:l}=le(),{prevDisabled:d,nextDisabled:a}=ln();return xo(l),n.createElement(n.Fragment,null,e?e():n.createElement(Pt,{label:"Previous",action:fe,icon:to,renderIcon:o,style:i.navigationPrev,disabled:d,onClick:s}),t?t():n.createElement(Pt,{label:"Next",action:he,icon:no,renderIcon:r,style:i.navigationNext,disabled:a,onClick:c}))}const wo=ae(xn,bo),St=k(Sn),Co=k(Dt);function _o(e){return"style"in e}function Mt(e,t,o){const r=window.getComputedStyle(e),i=o?"padding-left":"padding-right",s=o?r.paddingLeft:r.paddingRight,c=e.style.getPropertyValue(i);return e.style.setProperty(i,`${(Ne(s)||0)+t}px`),()=>{c?e.style.setProperty(i,c):e.style.removeProperty(i)}}function Po({noScroll:{disabled:e},children:t}){const o=ut(),{getOwnerDocument:r,getOwnerWindow:i}=Te();return n.useEffect(()=>{if(e)return()=>{};const s=[],c=i(),{body:l,documentElement:d}=r(),a=Math.round(c.innerWidth-d.clientWidth);if(a>0){s.push(Mt(l,a,o));const m=l.getElementsByTagName("*");for(let f=0;f<m.length;f+=1){const h=m[f];_o(h)&&c.getComputedStyle(h).getPropertyValue("position")==="fixed"&&!h.classList.contains(Co)&&s.push(Mt(h,a,o))}}return l.classList.add(St),()=>{l.classList.remove(St),s.forEach(m=>m())}},[o,e,r,i]),n.createElement(n.Fragment,null,t)}const So=ae(bn,Po);function Lt(e){return Se(qe,e)}function yt(e,t,o){const r=e.getAttribute(t);return e.setAttribute(t,o),()=>{r?e.setAttribute(t,r):e.removeAttribute(t)}}function Mo({portal:{root:e,container:{className:t,style:o,...r}={}},animation:i,styles:s,className:c,on:l,close:d,labels:a,children:m}){const[f,h]=n.useState(!1),[p,g]=n.useState(!1),u=n.useRef([]),_=n.useRef(null),{setTimeout:x}=Ae(),{subscribe:M}=ke(),R=at()?0:i.fade;n.useEffect(()=>(h(!0),()=>{h(!1),g(!1)}),[]);const P=A(()=>{u.current.forEach(v=>v()),u.current=[]}),N=A(()=>{var v;g(!1),P(),(v=l.exiting)===null||v===void 0||v.call(l),x(()=>{var I;(I=l.exited)===null||I===void 0||I.call(l),d()},R)});n.useEffect(()=>M(Ee,N),[M,N]);const y=A(v=>{var I,Z,U;zn(v),g(!0),(I=l.entering)===null||I===void 0||I.call(l);const w=(U=(Z=v.parentNode)===null||Z===void 0?void 0:Z.children)!==null&&U!==void 0?U:[];for(let S=0;S<w.length;S+=1){const b=w[S];["TEMPLATE","SCRIPT","STYLE"].indexOf(b.tagName)===-1&&b!==v&&(u.current.push(yt(b,"inert","")),u.current.push(yt(b,"aria-hidden","true")))}u.current.push(()=>{var S,b;(b=(S=_.current)===null||S===void 0?void 0:S.focus)===null||b===void 0||b.call(S)}),x(()=>{var S;(S=l.entered)===null||S===void 0||S.call(l)},R)}),T=n.useCallback(v=>{v?y(v):P()},[y,P]);return f?En.createPortal(n.createElement(lo,{ref:T,className:ie(c,t,k(Lt()),k(Dt),p&&k(Lt("open"))),"aria-modal":!0,role:"dialog","aria-label":xe(a,"Lightbox"),style:{...i.fade!==je.animation.fade?{[q("fade_animation_duration")]:`${R}ms`}:null,...i.easing.fade!==je.animation.easing.fade?{[q("fade_animation_timing_function")]:i.easing.fade}:null,...s.root,...o},onFocus:v=>{_.current||(_.current=v.relatedTarget)},...r},m),(typeof e=="function"?e():e)||document.body):null}const Lo=ae(qe,Mo);function yo({children:e}){return n.createElement(n.Fragment,null,e)}const Io=ae(wn,yo);function Oo(e){return Se(kt,e)}function Ro({toolbar:{buttons:e},render:{buttonClose:t,iconClose:o},styles:r}){const{close:i,setToolbarWidth:s}=le(),{setContainerRef:c,containerRect:l}=rn();ce(()=>{s(l==null?void 0:l.width)},[s,l==null?void 0:l.width]);const d=()=>t?t():n.createElement(lt,{key:Ee,label:"Close",icon:eo,renderIcon:o,onClick:i});return n.createElement("div",{ref:c,style:r.toolbar,className:k(Oo())},e==null?void 0:e.map(a=>a===Ee?d():a))}const No=ae(kt,Ro);function an(e,t){var o;return n.createElement(e.module.component,{key:e.module.name,...t},(o=e.children)===null||o===void 0?void 0:o.map(r=>an(r,t)))}function To(e,t={}){const{easing:o,...r}=e,{easing:i,...s}=t;return{easing:{...o,...i},...r,...s}}function ko({carousel:e,animation:t,render:o,toolbar:r,controller:i,noScroll:s,on:c,plugins:l,slides:d,index:a,...m}){const{animation:f,carousel:h,render:p,toolbar:g,controller:u,noScroll:_,on:x,slides:M,index:L,plugins:R,...P}=je,{config:N,augmentation:y}=Fn([Y(Lo,[Y(So,[Y(mo,[Y(Eo),Y(No),Y(wo)])])])],l||R),T=y({animation:To(f,t),carousel:{...h,...e},render:{...p,...o},toolbar:{...g,...r},controller:{...u,...i},noScroll:{..._,...s},on:{...x,...c},...P,...m});return T.open?n.createElement(Yn,{...T},n.createElement(Kn,{slides:d||M,index:Ne(a||L)},n.createElement(Qn,null,n.createElement(Xn,null,n.createElement(Vn,null,an(Y(Io,N),T)))))):null}const un={minZoom:1,maxZoomPixelRatio:1,zoomInMultiplier:2,doubleTapDelay:300,doubleClickDelay:500,doubleClickMaxStops:2,keyboardMoveDistance:50,wheelZoomDistanceFactor:100,pinchZoomDistanceFactor:100,pinchZoomV4:!1,scrollToZoom:!1,maxZoom:8};function Do(e){return Math.min(Math.max(e,Number.EPSILON),1)}function dn(e){const{minZoom:t,...o}={...un,...e};return{minZoom:Do(t),...o}}function Ao(e,t,o,r){const i=n.useRef(void 0),s=n.useRef(void 0),{zoom:c}=te().animation,l=at(),d=A(()=>{var a,m,f;if((a=i.current)===null||a===void 0||a.cancel(),i.current=void 0,s.current&&(r!=null&&r.current)){try{i.current=(f=(m=r.current).animate)===null||f===void 0?void 0:f.call(m,[{transform:s.current},{transform:`scale(${e}) translateX(${t}px) translateY(${o}px)`}],{duration:l?0:c??500,easing:i.current?"ease-out":"ease-in-out"})}catch(h){console.error(h)}s.current=void 0,i.current&&(i.current.onfinish=()=>{i.current=void 0})}});return ce(d,[e,t,o,d]),n.useCallback(()=>{s.current=r!=null&&r.current?window.getComputedStyle(r.current).transform:void 0},[r])}function Zo(e,t){const{on:o}=te(),r=A(()=>{var i;t||(i=o.zoom)===null||i===void 0||i.call(o,{zoom:e})});n.useEffect(r,[e,r])}function Ze(){const{zoom:e}=te();return dn(e)}function Wo(e,t){var o;const r=typeof e=="function"?(o=e(t))!==null&&o!==void 0?o:un.maxZoom:e;return Math.max(r,1)}function $o(e,t){var o,r;let i={width:0,height:0},s={width:0,height:0};const{currentSlide:c}=ue(),l=De(c),{imageFit:d}=te().carousel,{maxZoomPixelRatio:a,maxZoom:m}=Ze();if(e&&c){const h={...c,...t};if(me(h)){const p=ct(h,d),g=Math.max(...(((o=h.srcSet)===null||o===void 0?void 0:o.map(L=>L.width))||[]).concat(h.width?[h.width]:[])),u=Math.max(...(((r=h.srcSet)===null||r===void 0?void 0:r.map(L=>L.height))||[]).concat(h.height?[h.height]:[])),_=l%180!==0,x=_?u:g,M=_?g:u;x>0&&M>0&&e.width>0&&e.height>0&&(s=p?{width:Math.round(Math.min(x,e.width/e.height*M)),height:Math.round(Math.min(M,e.height/e.width*x))}:{width:x,height:M},s={width:s.width*a,height:s.height*a},i=p?{width:Math.min(e.width,s.width,x),height:Math.min(e.height,s.height,M)}:{width:Math.round(Math.min(e.width,e.height/M*x,x)),height:Math.round(Math.min(e.height,e.width/x*M,M))})}else e.width>0&&e.height>0&&(t&&t.width>0&&t.height>0?i={width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}:i={width:e.width,height:e.height})}const f=c&&i.width?me(c)?Math.max(it(s.width/i.width,5),1):Wo(m,c):1;return{imageRect:i,maxZoom:f}}function It(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function Ot(e,t,o=100,r=2){return e*Math.min(1+Math.abs(t/o),r)**Math.sign(t)}function zo(e,t,o,r,i,s,c,l,d){const a=n.useRef([]),m=n.useRef(0),f=n.useRef(void 0),{globalIndex:h}=ue(),{getOwnerWindow:p}=Te(),{containerRef:g,subscribeSensors:u}=le(),{keyboardMoveDistance:_,zoomInMultiplier:x,wheelZoomDistanceFactor:M,scrollToZoom:L,doubleTapDelay:R,doubleClickDelay:P,doubleClickMaxStops:N,pinchZoomDistanceFactor:y,pinchZoomV4:T}=Ze(),v=n.useCallback(C=>{if(g.current){const{pageX:D,pageY:O}=C,{scrollX:X,scrollY:V}=p(),{left:H,top:B,width:G,height:Q}=g.current.getBoundingClientRect();return[D-H-X-G/2,O-B-V-Q/2]}return[]},[g,p]),I=A(C=>{const D=e(),{key:O,metaKey:X,ctrlKey:V}=C,H=X||V,B=()=>{C.preventDefault(),C.stopPropagation()};if(D>1){const G=(Q,J)=>{B(),l(Q,J)};O==="ArrowDown"?G(0,_):O==="ArrowUp"?G(0,-_):O==="ArrowLeft"?G(-_,0):O==="ArrowRight"&&G(_,0)}O==="+"||H&&O==="="?(B(),i()):O==="-"||H&&O==="_"?(B(),s()):H&&O==="0"&&(B(),c(1))}),Z=A(C=>{const D=e();if((C.ctrlKey||L)&&Math.abs(C.deltaY)>Math.abs(C.deltaX)){C.stopPropagation(),c(Ot(D,-C.deltaY,M),!0,...v(C));return}D>1&&(C.stopPropagation(),L||l(C.deltaX,C.deltaY))}),U=n.useCallback(C=>{const D=a.current;D.splice(0,D.length,...D.filter(O=>O.pointerId!==C.pointerId))},[]),w=n.useCallback(C=>{U(C),C.persist(),a.current.push(C)},[U]),S=A(C=>{var D;const O=e(),X=a.current;if(C.pointerType==="mouse"&&C.buttons>1||!(!((D=d==null?void 0:d.current)===null||D===void 0)&&D.contains(C.target)))return;O>1&&C.stopPropagation();const{timeStamp:V}=C;if(X.length===0&&V-m.current<(C.pointerType==="touch"?R:P)){m.current=0;const H=O>=1?O!==o?O*Math.max(o**(1/N),x):1:O!==t?O/Math.max(t**(-1/N),x):1;c(H,!1,...v(C))}else m.current=V;if(w(C),X.length===2){const H=It(X[0],X[1]);f.current={previousDistance:H,initialDistance:Math.max(H,1),initialZoom:O}}}),b=A(C=>{const D=e(),O=a.current,X=O.find(V=>V.pointerId===C.pointerId);if(O.length===2&&f.current){C.stopPropagation(),w(C);const V=It(O[0],O[1]),H=T?f.current.initialZoom/f.current.initialDistance*V:Ot(D,V-f.current.previousDistance,y);c(H,!0,...O.map(B=>v(B)).reduce((B,G)=>G.map((Q,J)=>B[J]+Q/2))),f.current.previousDistance=V;return}D>1&&(C.stopPropagation(),X&&(O.length===1&&l((X.clientX-C.clientX)/D,(X.clientY-C.clientY)/D),w(C)))}),F=n.useCallback(C=>{const D=a.current;D.length===2&&D.find(O=>O.pointerId===C.pointerId)&&(f.current=void 0),U(C)},[U]),$=n.useCallback(()=>{const C=a.current;C.splice(0,C.length),m.current=0,f.current=void 0},[]);cn(u,S,b,F,r),n.useEffect($,[h,$]),n.useEffect(()=>r?()=>{}:ot($,u(et,I),u(tt,Z)),[r,u,$,I,Z])}function Fo(e,t,o){const[r,i]=n.useState(1),[s,c]=n.useState(0),[l,d]=n.useState(0),a=n.useRef({zoom:r,offsetX:s,offsetY:l}),m=Ao(r,s,l,o),{currentSlide:f,globalIndex:h}=ue(),{containerRect:p,slideRect:g}=le(),{minZoom:u,zoomInMultiplier:_}=Ze(),x=f&&me(f)?f.src:void 0,M=De(f),L=!(o!=null&&o.current);ce(()=>{a.current={zoom:1,offsetX:0,offsetY:0},i(1),c(0),d(0)},[h,x,M]);const R=n.useCallback((I,Z,U)=>{const w=U||a.current.zoom,S=a.current.offsetX-(I||0),b=a.current.offsetY-(Z||0),F=(e.width*w-g.width)/2/w,$=(e.height*w-g.height)/2/w;a.current.offsetX=Math.min(Math.abs(S),Math.max(F,0))*Math.sign(S),a.current.offsetY=Math.min(Math.abs(b),Math.max($,0))*Math.sign(b),c(a.current.offsetX),d(a.current.offsetY)},[g,e.width,e.height]),P=n.useCallback((I,Z,U,w)=>{const S=it(I+.01<t?I-.01>u?I:u:t,5);Z||m();const{zoom:b}=a.current;R(U?U*(1/b-1/S):0,w?w*(1/b-1/S):0,S),a.current.zoom=S,i(S)},[u,t,R,m]),N=n.useCallback(()=>a.current.zoom,[]),y=A(()=>{const I=N();I>1&&(I>t&&P(t,!0),R())});ce(y,[p.width,p.height,y]);const T=n.useCallback(()=>{const I=N(),Z=I*_;P(I<1&&Z>1?1:Z)},[_,N,P]),v=n.useCallback(()=>{const I=N(),Z=I/_;P(I>1&&Z<1?1:Z)},[_,N,P]);return{zoom:r,offsetX:s,offsetY:l,disabled:L,getZoom:N,changeOffsets:R,changeZoom:P,zoomIn:T,zoomOut:v}}const fn=n.createContext(null),dt=se("useZoom","ZoomControllerContext",fn);function Vo({children:e}){const[t,o]=n.useState(),{slideRect:r}=le(),{ref:i,minZoom:s}=Ze(),{imageRect:c,maxZoom:l}=$o(r,t==null?void 0:t.imageDimensions),{zoom:d,offsetX:a,offsetY:m,disabled:f,getZoom:h,changeZoom:p,changeOffsets:g,zoomIn:u,zoomOut:_}=Fo(c,l,t==null?void 0:t.zoomWrapperRef);Zo(d,f),zo(h,s,l,f,u,_,p,g,t==null?void 0:t.zoomWrapperRef);const x=n.useMemo(()=>({zoom:d,minZoom:s,maxZoom:l,offsetX:a,offsetY:m,disabled:f,zoomIn:u,zoomOut:_,changeZoom:p}),[d,s,l,a,m,f,u,_,p]);n.useImperativeHandle(i,()=>x,[x]);const M=n.useMemo(()=>({...x,setZoomWrapper:o}),[x,o]);return n.createElement(fn.Provider,{value:M},e)}const Uo=pe("ZoomIn",n.createElement(n.Fragment,null,n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),n.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"}))),Xo=pe("ZoomOut",n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})),Rt=n.forwardRef(function({zoomIn:t,onLoseFocus:o},r){const i=n.useRef(!1),s=n.useRef(!1),{zoom:c,minZoom:l,maxZoom:d,zoomIn:a,zoomOut:m,disabled:f}=dt(),{render:h}=te(),p=f||(t?c>=d:c<=l);return n.useEffect(()=>{p&&i.current&&s.current&&o(),p||(i.current=!0)},[p,o]),n.createElement(lt,{ref:r,disabled:p,label:t?"Zoom in":"Zoom out",icon:t?Uo:Xo,renderIcon:t?h.iconZoomIn:h.iconZoomOut,onClick:t?a:m,onFocus:()=>{s.current=!0},onBlur:()=>{s.current=!1}})});function Yo(){const e=n.useRef(null),t=n.useRef(null),{focus:o}=le(),r=n.useCallback(c=>{var l,d;!((l=c.current)===null||l===void 0)&&l.disabled?o():(d=c.current)===null||d===void 0||d.focus()},[o]),i=n.useCallback(()=>r(e),[r]),s=n.useCallback(()=>r(t),[r]);return n.createElement(n.Fragment,null,n.createElement(Rt,{zoomIn:!0,ref:e,onLoseFocus:s}),n.createElement(Rt,{ref:t,onLoseFocus:i}))}function Ho(){const{render:e}=te(),t=dt();return e.buttonZoom?n.createElement(n.Fragment,null,e.buttonZoom(t)):n.createElement(Yo,null)}function Bo(e){var t;return(((t=e.srcSet)===null||t===void 0?void 0:t.length)||0)>0}function Ko({current:e,preload:t},{type:o,source:r}){switch(o){case"fetch":return e?{current:e,preload:r}:{current:r};case"done":return r===t?{current:r}:{current:e,preload:t};default:throw new Error(Ut)}}function jo(e){var t,o;const[{current:r,preload:i},s]=n.useReducer(Ko,{}),{slide:c,rect:l,rotation:d=0,imageFit:a,render:m,interactive:f,zoom:h=1}=e,p=d%180!==0,g=p?{width:l.height,height:l.width}:l,u=c.srcSet.sort((v,I)=>v.width-I.width),_=(t=c.width)!==null&&t!==void 0?t:u[u.length-1].width,x=(o=c.height)!==null&&o!==void 0?o:u[u.length-1].height,M=ct(c,a),L=Math.max(...u.map(v=>v.width)),R=Math.min((M?Math.max:Math.min)(g.width,_*(g.height/x))*h,L),P=kn(),N=A(()=>{var v;const I=(v=u.find(Z=>Z.width>=R*P))!==null&&v!==void 0?v:u[u.length-1];(!r||u.findIndex(Z=>Z.src===r)<u.findIndex(Z=>Z===I))&&s({type:"fetch",source:I.src})});ce(N,[R,P,N]);const y=A(v=>s({type:"done",source:v})),T={WebkitTransform:f?"initial":"translateZ(0)"};return M||Object.assign(T,g.width/g.height<_/x?{width:p?`${g.width}px`:"100%",height:"auto"}:{width:"auto",height:p?`${g.height}px`:"100%"}),n.createElement(n.Fragment,null,i&&i!==r&&n.createElement(Re,{key:"preload",...e,offset:void 0,slide:{...c,src:i,srcSet:void 0},style:{position:"absolute",visibility:"hidden",...T},onLoad:()=>y(i),render:{...m,iconLoading:()=>null,iconError:()=>null}}),r&&n.createElement(Re,{key:"current",...e,slide:{...c,src:r,srcSet:void 0},style:T}))}function Go({render:e,slide:t,offset:o,rect:r}){var i;const[s,c]=n.useState(),l=n.useRef(null),d=me(t),a=De(t),{zoom:m,maxZoom:f,offsetX:h,offsetY:p,setZoomWrapper:g}=dt(),u=m>1,{carousel:_,on:x}=te(),{currentIndex:M}=ue();ce(()=>{if(o!==0||d||!l.current)return()=>{};const R=()=>{const N=l.current;if(!N)return;let y=0,T=0;for(const v of N.children)v instanceof HTMLElement&&(y=Math.max(y,v.offsetWidth),T=Math.max(T,v.offsetHeight));c(v=>v&&v.width===y&&v.height===T?v:{width:y,height:T})};if(R(),typeof ResizeObserver>"u")return()=>{};const P=new ResizeObserver(R);for(const N of l.current.children)P.observe(N);return()=>P.disconnect()},[o,d,r]),ce(()=>o===0?(g({zoomWrapperRef:l,imageDimensions:s}),()=>g(void 0)):()=>{},[o,s,g]);let L=(i=e.slide)===null||i===void 0?void 0:i.call(e,{slide:t,offset:o,rect:r,zoom:m,maxZoom:f});if(!L&&d){const R={slide:t,offset:o,rect:r,rotation:a,render:e,imageFit:_.imageFit,imageProps:_.imageProps,onClick:o===0?()=>{var P;return(P=x.click)===null||P===void 0?void 0:P.call(x,{index:M})}:void 0};L=Bo(t)?n.createElement(jo,{...R,slide:t,interactive:u,zoom:o===0?m:1}):n.createElement(Re,{onLoad:P=>c({width:P.naturalWidth,height:P.naturalHeight}),...R})}return L?n.createElement("div",{ref:l,className:ie(k(Pn),k(Qe),k(At),u&&k(Mn)),style:o===0?{transform:`scale(${m}) translateX(${h}px) translateY(${p}px)`}:void 0},L):null}const qo=({augment:e,addModule:t})=>{e(({zoom:o,toolbar:r,render:i,controller:s,...c})=>{const l=dn(o);return{zoom:l,toolbar:An(r,gt,n.createElement(Ho,null)),render:{...i,slide:d=>{var a,m;return me(d.slide)||d.slide.type!=null&&(!((a=l.supports)===null||a===void 0)&&a.includes(d.slide.type))?n.createElement(Go,{render:i,...d}):(m=i.slide)===null||m===void 0?void 0:m.call(i,d)}},controller:{...s,preventDefaultWheelY:l.scrollToZoom},...c}}),t(ae(gt,Vo))};function tr({src:e,alt:t,slides:o,index:r=0,open:i,onClose:s}){const c=o&&o.length>0?o:e?[{src:e,alt:t}]:[];return vn.jsx(ko,{open:i,close:s,index:r,slides:c,plugins:[qo],zoom:{scrollToZoom:!0,maxZoomPixelRatio:5},styles:{container:{backgroundColor:"rgba(0, 0, 0, 0.85)",backdropFilter:"blur(8px)"},toolbar:{background:"transparent",padding:"16px"},button:{backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:"9999px",color:"#fff",width:40,height:40},icon:{width:20,height:20}},animation:{fade:200}})}export{tr as default};
|
|
1
|
+
import{j as vn}from"./index-1CLUk_QC.js";import{r as n}from"./syntax-highlighter-d-DuIo_w.js";import{r as En}from"./main-RwBI9Vfa.js";const Nt="carousel",Tt="controller",xn="navigation",bn="no-scroll",qe="portal",wn="root",kt="toolbar",gt="zoom",Fe="loading",Ve="error",Ue="complete",Cn="placeholder",_n=e=>`active-slide-${e}`,Pn="fullsize",Qe="flex_center",Sn="no_scroll",Dt="no_scroll_padding",Je="slide",At="slide_wrapper",Mn="slide_wrapper_interactive",fe="prev",he="next",vt="swipe",Ee="close",Zt="onPointerDown",Wt="onPointerMove",$t="onPointerUp",zt="onPointerLeave",Ft="onPointerCancel",et="onKeyDown",Ln="onKeyUp",tt="onWheel",yn="Escape",In="ArrowLeft",On="ArrowRight",Rn="button",Be="icon",Vt="contain",Et="cover",Ut="Unknown action type",Xt="yarl__";function ie(...e){return e.filter(Boolean).join(" ")}function k(e){return`${Xt}${e}`}function q(e){return`--${Xt}${e}`}function Se(e,t){return`${e}${t?`_${t}`:""}`}function nt(e){return t=>Se(e,t)}function xe(e,t){var o;return(o=e==null?void 0:e[t])!==null&&o!==void 0?o:t}function Nn(e,t,o){return xe(e,"{index} of {total}").replace(/\{index}/g,`${st(o,t.length)+1}`).replace(/\{total}/g,`${t.length}`)}function ot(...e){return()=>{e.forEach(t=>{t()})}}function se(e,t,o){return()=>{const r=n.useContext(o);if(!r)throw new Error(`${e} must be used within a ${t}.Provider`);return r}}function rt(){return typeof window<"u"}function it(e,t=0){const o=10**t;return Math.round((e+Number.EPSILON)*o)/o}function me(e){return e.type===void 0||e.type==="image"}function ct(e,t){return e.imageFit===Et||e.imageFit!==Vt&&t===Et}function Ne(e){return typeof e=="string"?Number.parseInt(e,10):e}function Oe(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=Ne(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function Tn(e,t){const o=Oe(t),r=o.percent!==void 0?e.width/100*o.percent:o.pixel;return{width:Math.max(e.width-2*r,0),height:Math.max(e.height-2*r,0)}}function Yt(e){return Number.isFinite(e)?(Math.round(e/90)*90%360+360)%360:0}function kn(){return(rt()?window==null?void 0:window.devicePixelRatio:void 0)||1}function st(e,t){return t>0?(e%t+t)%t:0}function Ht(e){return e.length>0}function Bt(e,t){return e[st(t,e.length)]}function Ke(e,t){return Ht(e)?Bt(e,t):void 0}function Dn(e){return me(e)?e.src:void 0}function An(e,t,o){if(!o)return e;const{buttons:r,...i}=e,s=r.findIndex(l=>l===t),c=n.isValidElement(o)?n.cloneElement(o,{key:t},null):o;if(s>=0){const l=[...r];return l.splice(s,1,c),{buttons:l,...i}}return{buttons:[c,...r],...i}}function Zn(e,t,o=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),o))}const Wn=Number(n.version.split(".")[0])>=19;function $n(e){return{inert:Wn?e:e?"":void 0}}function zn(e){e.scrollTop}const je={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Ee]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Vt,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,closeOnEscape:!0,preventDefaultWheelX:!0,preventDefaultWheelY:!1,disableSwipeNavigation:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function ae(e,t){return{name:e,component:t}}function Y(e,t){return{module:e,children:t}}function Kt(e,t,o){return e.module.name===t?o(e):e.children?[Y(e.module,e.children.flatMap(r=>{var i;return(i=Kt(r,t,o))!==null&&i!==void 0?i:[]}))]:[e]}function ve(e,t,o){return e.flatMap(r=>{var i;return(i=Kt(r,t,o))!==null&&i!==void 0?i:[]})}function Fn(e,t=[],o=[]){let r=e;const i=p=>{const g=[...r];for(;g.length>0;){const u=g.pop();if((u==null?void 0:u.module.name)===p)return!0;u!=null&&u.children&&g.push(...u.children)}return!1},s=(p,g)=>{if(p===""){r=[Y(g,r)];return}r=ve(r,p,u=>[Y(g,[u])])},c=(p,g)=>{r=ve(r,p,u=>[Y(u.module,[Y(g,u.children)])])},l=(p,g,u)=>{r=ve(r,p,_=>{var x;return[Y(_.module,[...u?[Y(g)]:[],...(x=_.children)!==null&&x!==void 0?x:[],...u?[]:[Y(g)]])]})},d=(p,g,u)=>{r=ve(r,p,_=>[...u?[Y(g)]:[],_,...u?[]:[Y(g)]])},a=p=>{c(Tt,p)},m=(p,g)=>{r=ve(r,p,u=>[Y(g,u.children)])},f=p=>{r=ve(r,p,g=>g.children)},h=p=>{o.push(p)};return t.forEach(p=>{p({contains:i,addParent:s,append:c,addChild:l,addSibling:d,addModule:a,replace:m,remove:f,augment:h})}),{config:r,augmentation:p=>o.reduce((g,u)=>u(g),p)}}const jt=n.createContext(null),Gt=se("useA11yContext","A11yContext",jt);function Vn({children:e}){const[t,o]=n.useState(!1),[r,i]=n.useState(!1),s=n.useMemo(()=>({focusWithin:t,trackFocusWithin:(l,d)=>{const a=m=>f=>{var h;f.currentTarget.contains(f.relatedTarget)||o(m),(h=m?l:d)===null||h===void 0||h(f)};return{onFocus:a(!0),onBlur:a(!1)}},autoPlaying:r,setAutoPlaying:i}),[t,r]);return n.createElement(jt.Provider,{value:s},e)}const qt=n.createContext(null),Te=se("useDocument","DocumentContext",qt);function Un({nodeRef:e,children:t}){const o=n.useMemo(()=>{const r=s=>{var c;return((c=s||e.current)===null||c===void 0?void 0:c.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:s=>{var c;return((c=r(s))===null||c===void 0?void 0:c.defaultView)||window}}},[e]);return n.createElement(qt.Provider,{value:o},t)}const Qt=n.createContext(null),ke=se("useEvents","EventsContext",Qt);function Xn({children:e}){const[t]=n.useState({});n.useEffect(()=>()=>{Object.keys(t).forEach(r=>delete t[r])},[t]);const o=n.useMemo(()=>{const r=(c,l)=>{var d;(d=t[c])===null||d===void 0||d.splice(0,t[c].length,...t[c].filter(a=>a!==l))};return{publish:(...[c,l])=>{var d;(d=t[c])===null||d===void 0||d.forEach(a=>a(l))},subscribe:(c,l)=>(t[c]||(t[c]=[]),t[c].push(l),()=>r(c,l)),unsubscribe:r}},[t]);return n.createElement(Qt.Provider,{value:o},e)}const Jt=n.createContext(null),te=se("useLightboxProps","LightboxPropsContext",Jt);function Yn({children:e,...t}){return n.createElement(Jt.Provider,{value:t},e)}const en=n.createContext(null),ue=se("useLightboxState","LightboxStateContext",en),tn=n.createContext(null),Hn=se("useLightboxDispatch","LightboxDispatchContext",tn);function Bn(e,t){switch(t.type){case"swipe":{const{slides:o}=e,r=(t==null?void 0:t.increment)||0,i=e.globalIndex+r,s=st(i,o.length),c=Ke(o,s),l=r||t.duration!==void 0?{increment:r,duration:t.duration,easing:t.easing}:void 0;return{slides:o,currentIndex:s,globalIndex:i,currentSlide:c,animation:l}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:Ke(t.slides,t.index)}:e;default:throw new Error(Ut)}}function Kn({slides:e,index:t,children:o}){const[r,i]=n.useReducer(Bn,{slides:e,currentIndex:t,globalIndex:t,currentSlide:Ke(e,t)}),[s,c]=n.useState(e),[l,d]=n.useState(t);(e!==s||t!==l)&&(c(e),d(t),i({type:"update",slides:e,index:t}));const a=n.useMemo(()=>({...r,state:r,dispatch:i}),[r,i]);return n.createElement(tn.Provider,{value:i},n.createElement(en.Provider,{value:a},o))}const nn=n.createContext(null),jn=se("useRTLContext","RTLContext",nn);function Gn({isRTL:e,children:t}){const o=n.useMemo(()=>({isRTL:e}),[e]);return n.createElement(nn.Provider,{value:o},t)}const qn=n.createContext(null);function De(e){const t=n.useContext(qn);return e&&t?Yt(t(e)):0}const on=n.createContext(null),Ae=se("useTimeouts","TimeoutsContext",on);function Qn({children:e}){const[t]=n.useState([]);n.useEffect(()=>()=>{t.forEach(r=>window.clearTimeout(r)),t.splice(0,t.length)},[t]);const o=n.useMemo(()=>{const r=c=>{t.splice(0,t.length,...t.filter(l=>l!==c))};return{setTimeout:(c,l)=>{const d=window.setTimeout(()=>{r(d),c()},l);return t.push(d),d},clearTimeout:c=>{c!==void 0&&(r(c),window.clearTimeout(c))}}},[t]);return n.createElement(on.Provider,{value:o},e)}const lt=n.forwardRef(function({label:t,className:o,icon:r,renderIcon:i,onClick:s,style:c,...l},d){const{styles:a,labels:m}=te(),f=xe(m,t);return n.createElement("button",{ref:d,type:"button",title:f,"aria-label":f,className:ie(k(Rn),o),onClick:s,style:{...c,...a.button},...l},i?i():n.createElement(r,{className:k(Be),style:a.icon}))});function Jn(e,t){const o=r=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},t);return o.displayName=e,o}function pe(e,t){return Jn(e,n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}const eo=pe("Close",n.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),to=pe("Previous",n.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),no=pe("Next",n.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),oo=pe("Loading",n.createElement(n.Fragment,null,Array.from({length:8}).map((e,t,o)=>n.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/o.length*(t+1),transform:`rotate(${360/o.length*t}, 12, 12)`})))),ro=pe("Error",n.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),ce=rt()?n.useLayoutEffect:n.useEffect;function at(){const[e,t]=n.useState(!1);return n.useEffect(()=>{var o,r;const i=(o=window.matchMedia)===null||o===void 0?void 0:o.call(window,"(prefers-reduced-motion: reduce)");t(i==null?void 0:i.matches);const s=c=>t(c.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",s),()=>{var c;return(c=i==null?void 0:i.removeEventListener)===null||c===void 0?void 0:c.call(i,"change",s)}},[]),e}function io(e){let t=0,o=0,r=0;const s=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(s){const c=s[1].split(",").map(Ne);c.length===6?(t=c[4],o=c[5]):c.length===16&&(t=c[12],o=c[13],r=c[14])}return{x:t,y:o,z:r}}function xt(e,t){const o=n.useRef(void 0),r=n.useRef(void 0),i=at();return ce(()=>{var s,c,l;if(e.current&&o.current!==void 0&&!i){const{keyframes:d,duration:a,easing:m,onfinish:f}=t(o.current,e.current.getBoundingClientRect(),io(e.current))||{};if(d&&a){(s=r.current)===null||s===void 0||s.cancel(),r.current=void 0;try{r.current=(l=(c=e.current).animate)===null||l===void 0?void 0:l.call(c,d,{duration:a,easing:m})}catch(h){console.error(h)}r.current&&(r.current.onfinish=()=>{r.current=void 0,f==null||f()})}}o.current=void 0}),{prepareAnimation:s=>{o.current=s},isAnimationPlaying:()=>{var s;return((s=r.current)===null||s===void 0?void 0:s.playState)==="running"}}}function rn(){const e=n.useRef(null),t=n.useRef(void 0),[o,r]=n.useState();return{setContainerRef:n.useCallback(s=>{e.current=s,t.current&&(t.current.disconnect(),t.current=void 0);const c=()=>{if(s){const l=window.getComputedStyle(s),d=a=>parseFloat(a)||0;r({width:Math.round(s.clientWidth-d(l.paddingLeft)-d(l.paddingRight)),height:Math.round(s.clientHeight-d(l.paddingTop)-d(l.paddingBottom))})}else r(void 0)};c(),s&&typeof ResizeObserver<"u"&&(t.current=new ResizeObserver(c),t.current.observe(s))},[]),containerRef:e,containerRect:o}}function Ie(){const e=n.useRef(void 0),{setTimeout:t,clearTimeout:o}=Ae();return n.useCallback((r,i)=>{o(e.current),e.current=t(r,i>0?i:0)},[t,o])}function A(e){const t=n.useRef(e);return ce(()=>{t.current=e}),n.useCallback((...o)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...o)},[])}function bt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Ge(e,t){return n.useMemo(()=>e==null&&t==null?null:o=>{bt(e,o),bt(t,o)},[e,t])}function co(e,t=!1){const o=n.useRef(!1);ce(()=>{t&&o.current&&(o.current=!1,e())},[t,e]);const r=n.useCallback(()=>{o.current=!0},[]),i=n.useCallback(()=>{o.current=!1},[]);return{onFocus:r,onBlur:i}}function ut(){return jn().isRTL}function so(){const[e]=n.useState({}),t=n.useCallback((i,s)=>{var c;(c=e[i])===null||c===void 0||c.forEach(l=>{s.isPropagationStopped()||l(s)})},[e]),o=n.useMemo(()=>({onPointerDown:i=>t(Zt,i),onPointerMove:i=>t(Wt,i),onPointerUp:i=>t($t,i),onPointerLeave:i=>t(zt,i),onPointerCancel:i=>t(Ft,i),onKeyDown:i=>t(et,i),onKeyUp:i=>t(Ln,i),onWheel:i=>t(tt,i)}),[t]),r=n.useCallback((i,s)=>(e[i]||(e[i]=[]),e[i].unshift(s),()=>{const c=e[i];c&&c.splice(0,c.length,...c.filter(l=>l!==s))}),[e]);return{registerSensors:o,subscribeSensors:r}}function wt(e,t){const o=n.useRef(0),r=Ie(),i=A((...s)=>{o.current=Date.now(),e(...s)});return n.useCallback((...s)=>{r(()=>{i(...s)},t-(Date.now()-o.current))},[t,i,r])}const Xe=nt("slide"),Ye=nt("slide_image");function Re({slide:e,offset:t,render:o,rect:r,rotation:i=0,imageFit:s,imageProps:c,onClick:l,onLoad:d,onError:a,style:m}){var f,h,p,g,u,_,x,M;const[L,R]=n.useState(Fe),{publish:P}=ke(),{setTimeout:N}=Ae(),y=n.useRef(null);n.useEffect(()=>{t===0&&P(_n(L))},[t,L,P]);const T=A(W=>{("decode"in W?W.decode():Promise.resolve()).catch(()=>{}).then(()=>{W.parentNode&&(R(Ue),N(()=>{d==null||d(W)},0))})}),v=n.useCallback(W=>{y.current=W,W!=null&&W.complete&&T(W)},[T]),I=n.useCallback(W=>{T(W.currentTarget)},[T]),Z=A(()=>{R(Ve),a==null||a()}),U=ct(e,s),w=Yt(i),S=w%180!==0,b=r&&S?{width:r.height,height:r.width}:r,F=S&&b?`${b.width}px`:"100%",$=S&&b?`${b.height}px`:"100%",C=(W,ge)=>Number.isFinite(W)?W:ge,D=C(Math.max(...((h=(f=e.srcSet)===null||f===void 0?void 0:f.map(W=>W.width))!==null&&h!==void 0?h:[]).concat(e.width?[e.width]:[]).filter(Boolean)),((p=y.current)===null||p===void 0?void 0:p.naturalWidth)||0),O=C(Math.max(...((u=(g=e.srcSet)===null||g===void 0?void 0:g.map(W=>W.height))!==null&&u!==void 0?u:[]).concat(e.height?[e.height]:[]).filter(Boolean)),((_=y.current)===null||_===void 0?void 0:_.naturalHeight)||0),X=D&&O?{maxWidth:`min(${D}px, ${F})`,maxHeight:`min(${O}px, ${$})`}:{maxWidth:F,maxHeight:$},V=b&&D&&O?Math.min(b.width/D,b.height/O,1):0,H=S&&b?U?{width:b.width,height:b.height}:V?{width:D*V,height:O*V}:null:null,B=(x=e.srcSet)===null||x===void 0?void 0:x.slice().sort((W,ge)=>W.width-ge.width).map(W=>`${W.src} ${W.width}w`).join(", "),Q=(()=>{if(b)return!e.width||!e.height?b.width:(U?Math.max:Math.min)(b.height/e.height*e.width,b.width)})(),J=B&&Q!==void 0&&rt()?`${Math.round(Q)}px`:void 0,{style:be,className:Me,...we}=(typeof c=="function"?c(e):c)||{};return n.createElement(n.Fragment,null,n.createElement("img",{ref:v,onLoad:I,onError:Z,onClick:l,draggable:!1,className:ie(k(Ye()),U&&k(Ye("cover")),L!==Ue&&k(Ye("loading")),Me),style:{...X,...w?{rotate:`${w}deg`}:null,...S?{flexShrink:0}:null,...H,...m,...be},...we,alt:(M=e.alt)!==null&&M!==void 0?M:"",sizes:J,srcSet:B,src:e.src}),L!==Ue&&n.createElement("div",{className:k(Xe(Cn))},L===Fe&&(o!=null&&o.iconLoading?o.iconLoading():n.createElement(oo,{className:ie(k(Be),k(Xe(Fe)))})),L===Ve&&(o!=null&&o.iconError?o.iconError():n.createElement(ro,{className:ie(k(Be),k(Xe(Ve)))}))))}const lo=n.forwardRef(function({className:t,children:o,onFocus:r,onBlur:i,...s},c){const l=n.useRef(null),[d,a]=n.useState(!1),{trackFocusWithin:m}=Gt(),f=A(()=>{if(l.current){const h=window.getComputedStyle(l.current).direction==="rtl";h!==d&&a(h)}});return n.useEffect(f),n.createElement(Un,{nodeRef:l},n.createElement(Gn,{isRTL:d},n.createElement("div",{ref:Ge(c,l),className:ie(k("root"),t),...m(r,i),...s},o)))});var K;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"})(K||(K={}));function cn(e,t,o,r,i){n.useEffect(()=>i?()=>{}:ot(e(Zt,t),e(Wt,o),e($t,r),e(zt,r),e(Ft,r)),[e,t,o,r,i])}var ne;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"})(ne||(ne={}));const He=30;function ao({disableSwipeNavigation:e,closeOnBackdropClick:t},o,r,i,s,c,l,d,a,m,f,h,p,g,u,_){const x=n.useRef(0),M=n.useRef([]),L=n.useRef(void 0),R=n.useRef(0),P=n.useRef(ne.NONE),N=n.useCallback(w=>{L.current===w.pointerId&&(L.current=void 0,P.current=ne.NONE);const S=M.current;S.splice(0,S.length,...S.filter(b=>b.pointerId!==w.pointerId))},[]),y=n.useCallback(w=>{N(w),w.persist(),M.current.push(w)},[N]),T=n.useCallback(w=>M.current.find(({pointerId:S})=>w.pointerId===S),[]),v=A(w=>{y(w)}),I=(w,S)=>f&&w>S||m&&w<-S,Z=A(w=>{const S=T(w);if(S)if(L.current===w.pointerId){const b=Date.now()-R.current,F=x.current;P.current===ne.SWIPE?Math.abs(F)>.3*i||Math.abs(F)>5&&b<s?d(F,b):a(F):P.current===ne.PULL&&(I(F,2*He)?g(F,b):u(F)),x.current=0,P.current=ne.NONE}else{const{target:b}=w;t&&b instanceof HTMLElement&&b===S.target&&(b.classList.contains(k(Je))||b.classList.contains(k(At)))&&_()}N(w)}),U=A(w=>{const S=T(w);if(S){const b=L.current===w.pointerId;if(w.buttons===0){b&&x.current!==0?Z(w):N(S);return}const F=w.clientX-S.clientX,$=w.clientY-S.clientY;if(L.current===void 0){const C=D=>{y(w),L.current=w.pointerId,R.current=Date.now(),P.current=D};Math.abs(F)>Math.abs($)&&Math.abs(F)>He&&r(F)?e||(C(ne.SWIPE),c()):Math.abs($)>Math.abs(F)&&I($,He)&&(C(ne.PULL),h())}else b&&(P.current===ne.SWIPE?(x.current=F,l(F)):P.current===ne.PULL&&(x.current=$,p($)))}});cn(o,v,U,Z)}function uo({preventDefaultWheelX:e,preventDefaultWheelY:t}){const o=n.useRef(null),r=A(i=>{const s=Math.abs(i.deltaX)>Math.abs(i.deltaY);(s&&e||!s&&t||i.ctrlKey)&&i.preventDefault()});return n.useCallback(i=>{var s;i?i.addEventListener("wheel",r,{passive:!1}):(s=o.current)===null||s===void 0||s.removeEventListener("wheel",r),o.current=i},[r])}function fo(e,t,o,r,i,s,c,l,d){const a=n.useRef(0),m=n.useRef(0),f=n.useRef(void 0),h=n.useRef(void 0),p=n.useRef(0),g=n.useRef(void 0),u=n.useRef(0),{setTimeout:_,clearTimeout:x}=Ae(),M=n.useCallback(()=>{f.current&&(x(f.current),f.current=void 0)},[x]),L=n.useCallback(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),R=A(()=>{e!==K.SWIPE&&(a.current=0,u.current=0,M(),L())});n.useEffect(R,[e,R]);const P=A(y=>{h.current=void 0,a.current===y&&d(a.current)}),N=A(y=>{if(y.ctrlKey||Math.abs(y.deltaY)>Math.abs(y.deltaX))return;const T=v=>{p.current=v,x(g.current),g.current=v>0?_(()=>{p.current=0,g.current=void 0},300):void 0};if(e===K.NONE){if(Math.abs(y.deltaX)<=1.2*Math.abs(p.current)){T(y.deltaX);return}if(!o(-y.deltaX))return;if(m.current+=y.deltaX,M(),Math.abs(m.current)>30)m.current=0,T(0),u.current=Date.now(),s();else{const v=m.current;f.current=_(()=>{f.current=void 0,v===m.current&&(m.current=0)},i)}}else if(e===K.SWIPE){let v=a.current-y.deltaX;if(v=Math.min(Math.abs(v),r)*Math.sign(v),a.current=v,c(v),L(),Math.abs(v)>.2*r){T(y.deltaX),l(v,Date.now()-u.current);return}h.current=_(()=>P(v),2*i)}else T(y.deltaX)});n.useEffect(()=>t(tt,N),[t,N])}const Ct=nt("container"),sn=n.createContext(null),le=se("useController","ControllerContext",sn);function ho({children:e,...t}){var o;const{carousel:r,animation:i,controller:s,on:c,styles:l,render:d}=t,{closeOnPullUp:a,closeOnPullDown:m,preventDefaultWheelX:f,preventDefaultWheelY:h}=s,[p,g]=n.useState(),u=ue(),_=Hn(),[x,M]=n.useState(K.NONE),L=n.useRef(0),R=n.useRef(0),P=n.useRef(1),{registerSensors:N,subscribeSensors:y}=so(),{subscribe:T,publish:v}=ke(),I=Ie(),Z=Ie(),U=Ie(),{containerRef:w,setContainerRef:S,containerRect:b}=rn(),F=Ge(uo({preventDefaultWheelX:f,preventDefaultWheelY:h}),S),$=n.useRef(null),C=Ge($,void 0),{getOwnerDocument:D}=Te(),O=ut(),X=E=>(O?-1:1)*(typeof E=="number"?E:1),V=A(()=>{var E;return(E=w.current)===null||E===void 0?void 0:E.focus()}),H=A(()=>t),B=A(()=>u),G=n.useCallback(E=>v(fe,E),[v]),Q=n.useCallback(E=>v(he,E),[v]),J=n.useCallback(()=>v(Ee),[v]),be=E=>!(r.finite&&(X(E)>0&&u.currentIndex===0||X(E)<0&&u.currentIndex===u.slides.length-1)),Me=E=>{var z;L.current=E,(z=w.current)===null||z===void 0||z.style.setProperty(q("swipe_offset"),`${Math.round(E)}px`)},we=E=>{var z,j;R.current=E,P.current=(()=>{const _e=m&&E>0?E:a&&E<0?-E:0;return Math.min(Math.max(it(1-_e/60*(1-.5),2),.5),1)})(),(z=w.current)===null||z===void 0||z.style.setProperty(q("pull_offset"),`${Math.round(E)}px`),(j=w.current)===null||j===void 0||j.style.setProperty(q("pull_opacity"),`${P.current}`)},{prepareAnimation:W}=xt($,(E,z,j)=>{if($.current&&b)return{keyframes:[{transform:`translate(0, ${E.rect.y-z.y+j.y}px)`,opacity:E.opacity},{transform:"translate(0, 0)",opacity:1}],duration:E.duration,easing:i.easing.fade}}),ge=(E,z)=>{if(a||m){we(E);let j=0;$.current&&(j=i.fade*(z?2:1),W({rect:$.current.getBoundingClientRect(),opacity:P.current,duration:j})),U(()=>{we(0),M(K.NONE)},j),M(K.ANIMATION),z||J()}},{prepareAnimation:hn,isAnimationPlaying:mn}=xt($,(E,z,j)=>{var oe;if($.current&&b&&(!((oe=u.animation)===null||oe===void 0)&&oe.duration)){const ee=Oe(r.spacing),_e=(ee.percent?ee.percent*b.width/100:ee.pixel)||0;return{keyframes:[{transform:`translate(${X(u.globalIndex-E.index)*(b.width+_e)+E.rect.x-z.x+j.x}px, 0)`},{transform:"translate(0, 0)"}],duration:u.animation.duration,easing:u.animation.easing}}}),Ce=A(E=>{var z,j;const oe=E.offset||0,ee=oe?i.swipe:(z=i.navigation)!==null&&z!==void 0?z:i.swipe,_e=!oe&&!mn()?i.easing.navigation:i.easing.swipe;let{direction:Le}=E;const ye=(j=E.count)!==null&&j!==void 0?j:1;let We=K.ANIMATION,re=ee*ye;if(!Le){const Pe=b==null?void 0:b.width,pt=E.duration||0,ze=Pe?ee/Pe*Math.abs(oe):ee;ye!==0?(pt<ze?re=re/ze*Math.max(pt,ze/5):Pe&&(re=ee/Pe*(Pe-Math.abs(oe))),Le=X(oe)>0?fe:he):re=ee/2}let $e=0;Le===fe?be(X(1))?$e=-ye:(We=K.NONE,re=ee):Le===he&&(be(X(-1))?$e=ye:(We=K.NONE,re=ee)),re=Math.round(re),Z(()=>{Me(0),M(K.NONE)},re),$.current&&hn({rect:$.current.getBoundingClientRect(),index:u.globalIndex}),M(We),v(vt,{type:"swipe",increment:$e,duration:re,easing:_e})});n.useEffect(()=>{var E,z;!((E=u.animation)===null||E===void 0)&&E.increment&&(!((z=u.animation)===null||z===void 0)&&z.duration)&&I(()=>_({type:"swipe",increment:0}),u.animation.duration)},[u.animation,_,I]);const ft=[y,be,(b==null?void 0:b.width)||0,i.swipe,()=>M(K.SWIPE),E=>Me(E),(E,z)=>Ce({offset:E,duration:z,count:1}),E=>Ce({offset:E,count:0})],pn=[()=>{m&&M(K.PULL)},E=>we(E),E=>ge(E),E=>ge(E,!0)];ao(s,...ft,a,m,...pn,J),fo(x,...ft);const ht=A(()=>{s.focus&&D().querySelector(`.${k(qe)} .${k(Ct())}`)&&V()});n.useEffect(ht,[ht]);const mt=A(()=>{var E;(E=c.view)===null||E===void 0||E.call(c,{index:u.currentIndex})});n.useEffect(mt,[u.globalIndex,mt]),n.useEffect(()=>ot(T(fe,E=>Ce({direction:fe,...E})),T(he,E=>Ce({direction:he,...E})),T(vt,E=>_(E))),[T,Ce,_]);const gn=n.useMemo(()=>({prev:G,next:Q,close:J,focus:V,slideRect:b?Tn(b,r.padding):{width:0,height:0},containerRect:b||{width:0,height:0},subscribeSensors:y,containerRef:w,setCarouselRef:C,toolbarWidth:p,setToolbarWidth:g}),[G,Q,J,V,y,b,w,C,p,g,r.padding]);return n.useImperativeHandle(s.ref,()=>({prev:G,next:Q,close:J,focus:V,getLightboxProps:H,getLightboxState:B}),[G,Q,J,V,H,B]),n.createElement("div",{ref:F,className:ie(k(Ct()),k(Qe)),style:{...x===K.SWIPE?{[q("swipe_offset")]:`${Math.round(L.current)}px`}:null,...x===K.PULL?{[q("pull_offset")]:`${Math.round(R.current)}px`,[q("pull_opacity")]:`${P.current}`}:null,...s.touchAction!=="none"?{[q("controller_touch_action")]:s.touchAction}:null,...l.container},tabIndex:-1,...N},b&&n.createElement(sn.Provider,{value:gn},e,(o=d.controls)===null||o===void 0?void 0:o.call(d)))}const mo=ae(Tt,ho);function de(e){return Se(Nt,e)}function _t(e){return Se(Je,e)}function po({slide:e,offset:t}){const o=n.useRef(null),{currentIndex:r,slides:i}=ue(),{slideRect:s,focus:c}=le(),{render:l,carousel:{imageFit:d,imageProps:a},on:{click:m},styles:{slide:f},labels:h}=te(),{getOwnerDocument:p}=Te(),g=De(e),u=t!==0;n.useEffect(()=>{var x;u&&(!((x=o.current)===null||x===void 0)&&x.contains(p().activeElement))&&c()},[u,c,p]);const _=()=>{var x,M,L,R;let P=(x=l.slide)===null||x===void 0?void 0:x.call(l,{slide:e,offset:t,rect:s});return!P&&me(e)&&(P=n.createElement(Re,{slide:e,offset:t,render:l,rect:s,rotation:g,imageFit:d,imageProps:a,onClick:u?void 0:()=>m==null?void 0:m({index:r})})),P?n.createElement(n.Fragment,null,(M=l.slideHeader)===null||M===void 0?void 0:M.call(l,{slide:e}),((L=l.slideContainer)!==null&&L!==void 0?L:(({children:N})=>N))({slide:e,children:P}),(R=l.slideFooter)===null||R===void 0?void 0:R.call(l,{slide:e})):null};return n.createElement("div",{ref:o,className:ie(k(_t()),!u&&k(_t("current")),k(Qe)),...$n(u),style:f,role:"group","aria-roledescription":xe(h,"Slide"),"aria-label":Nn(h,i,r+t)},_())}function go(){const e=te().styles.slide;return n.createElement("div",{className:k(Je),style:e})}function vo({carousel:e,labels:t}){const{slides:o,currentIndex:r,globalIndex:i}=ue(),{setCarouselRef:s}=le(),{autoPlaying:c,focusWithin:l}=Gt(),d=Oe(e.spacing),a=Oe(e.padding),m=Zn(e,o,1),f=[];if(Ht(o))for(let h=r-m;h<=r+m;h+=1){const p=Bt(o,h),g=i-r+h,u=e.finite&&(h<0||h>o.length-1);f.push(u?{key:g}:{key:[`${g}`,Dn(p)].filter(Boolean).join("|"),offset:h-r,slide:p})}return n.createElement("div",{ref:s,className:ie(k(de()),f.length>0&&k(de("with_slides"))),style:{[`${q(de("slides_count"))}`]:f.length,[`${q(de("spacing_px"))}`]:d.pixel||0,[`${q(de("spacing_percent"))}`]:d.percent||0,[`${q(de("padding_px"))}`]:a.pixel||0,[`${q(de("padding_percent"))}`]:a.percent||0},role:"region","aria-live":c&&!l?"off":"polite","aria-roledescription":xe(t,"Carousel"),"aria-label":xe(t,"Photo gallery")},f.map(({key:h,slide:p,offset:g})=>p?n.createElement(po,{key:h,slide:p,offset:g}):n.createElement(go,{key:h})))}const Eo=ae(Nt,vo);function ln(){const{carousel:e}=te(),{slides:t,currentIndex:o}=ue(),r=t.length===0||e.finite&&o===0,i=t.length===0||e.finite&&o===t.length-1;return{prevDisabled:r,nextDisabled:i}}function xo(e){var t;const o=ut(),{publish:r}=ke(),{animation:i,controller:s}=te(),{prevDisabled:c,nextDisabled:l}=ln(),d=((t=i.navigation)!==null&&t!==void 0?t:i.swipe)/2,a=wt(()=>r(fe),d),m=wt(()=>r(he),d),f=A(h=>{switch(h.key){case yn:if(!s.closeOnEscape)return;r(Ee);break;case In:(o?l:c)||(o?m:a)();break;case On:(o?c:l)||(o?a:m)();break;default:return}h.stopPropagation()});n.useEffect(()=>e(et,f),[e,f])}function Pt({label:e,icon:t,renderIcon:o,action:r,onClick:i,disabled:s,style:c}){return n.createElement(lt,{label:e,icon:t,renderIcon:o,className:k(`navigation_${r}`),disabled:s,onClick:i,style:c,...co(le().focus,s)})}function bo({render:{buttonPrev:e,buttonNext:t,iconPrev:o,iconNext:r},styles:i}){const{prev:s,next:c,subscribeSensors:l}=le(),{prevDisabled:d,nextDisabled:a}=ln();return xo(l),n.createElement(n.Fragment,null,e?e():n.createElement(Pt,{label:"Previous",action:fe,icon:to,renderIcon:o,style:i.navigationPrev,disabled:d,onClick:s}),t?t():n.createElement(Pt,{label:"Next",action:he,icon:no,renderIcon:r,style:i.navigationNext,disabled:a,onClick:c}))}const wo=ae(xn,bo),St=k(Sn),Co=k(Dt);function _o(e){return"style"in e}function Mt(e,t,o){const r=window.getComputedStyle(e),i=o?"padding-left":"padding-right",s=o?r.paddingLeft:r.paddingRight,c=e.style.getPropertyValue(i);return e.style.setProperty(i,`${(Ne(s)||0)+t}px`),()=>{c?e.style.setProperty(i,c):e.style.removeProperty(i)}}function Po({noScroll:{disabled:e},children:t}){const o=ut(),{getOwnerDocument:r,getOwnerWindow:i}=Te();return n.useEffect(()=>{if(e)return()=>{};const s=[],c=i(),{body:l,documentElement:d}=r(),a=Math.round(c.innerWidth-d.clientWidth);if(a>0){s.push(Mt(l,a,o));const m=l.getElementsByTagName("*");for(let f=0;f<m.length;f+=1){const h=m[f];_o(h)&&c.getComputedStyle(h).getPropertyValue("position")==="fixed"&&!h.classList.contains(Co)&&s.push(Mt(h,a,o))}}return l.classList.add(St),()=>{l.classList.remove(St),s.forEach(m=>m())}},[o,e,r,i]),n.createElement(n.Fragment,null,t)}const So=ae(bn,Po);function Lt(e){return Se(qe,e)}function yt(e,t,o){const r=e.getAttribute(t);return e.setAttribute(t,o),()=>{r?e.setAttribute(t,r):e.removeAttribute(t)}}function Mo({portal:{root:e,container:{className:t,style:o,...r}={}},animation:i,styles:s,className:c,on:l,close:d,labels:a,children:m}){const[f,h]=n.useState(!1),[p,g]=n.useState(!1),u=n.useRef([]),_=n.useRef(null),{setTimeout:x}=Ae(),{subscribe:M}=ke(),R=at()?0:i.fade;n.useEffect(()=>(h(!0),()=>{h(!1),g(!1)}),[]);const P=A(()=>{u.current.forEach(v=>v()),u.current=[]}),N=A(()=>{var v;g(!1),P(),(v=l.exiting)===null||v===void 0||v.call(l),x(()=>{var I;(I=l.exited)===null||I===void 0||I.call(l),d()},R)});n.useEffect(()=>M(Ee,N),[M,N]);const y=A(v=>{var I,Z,U;zn(v),g(!0),(I=l.entering)===null||I===void 0||I.call(l);const w=(U=(Z=v.parentNode)===null||Z===void 0?void 0:Z.children)!==null&&U!==void 0?U:[];for(let S=0;S<w.length;S+=1){const b=w[S];["TEMPLATE","SCRIPT","STYLE"].indexOf(b.tagName)===-1&&b!==v&&(u.current.push(yt(b,"inert","")),u.current.push(yt(b,"aria-hidden","true")))}u.current.push(()=>{var S,b;(b=(S=_.current)===null||S===void 0?void 0:S.focus)===null||b===void 0||b.call(S)}),x(()=>{var S;(S=l.entered)===null||S===void 0||S.call(l)},R)}),T=n.useCallback(v=>{v?y(v):P()},[y,P]);return f?En.createPortal(n.createElement(lo,{ref:T,className:ie(c,t,k(Lt()),k(Dt),p&&k(Lt("open"))),"aria-modal":!0,role:"dialog","aria-label":xe(a,"Lightbox"),style:{...i.fade!==je.animation.fade?{[q("fade_animation_duration")]:`${R}ms`}:null,...i.easing.fade!==je.animation.easing.fade?{[q("fade_animation_timing_function")]:i.easing.fade}:null,...s.root,...o},onFocus:v=>{_.current||(_.current=v.relatedTarget)},...r},m),(typeof e=="function"?e():e)||document.body):null}const Lo=ae(qe,Mo);function yo({children:e}){return n.createElement(n.Fragment,null,e)}const Io=ae(wn,yo);function Oo(e){return Se(kt,e)}function Ro({toolbar:{buttons:e},render:{buttonClose:t,iconClose:o},styles:r}){const{close:i,setToolbarWidth:s}=le(),{setContainerRef:c,containerRect:l}=rn();ce(()=>{s(l==null?void 0:l.width)},[s,l==null?void 0:l.width]);const d=()=>t?t():n.createElement(lt,{key:Ee,label:"Close",icon:eo,renderIcon:o,onClick:i});return n.createElement("div",{ref:c,style:r.toolbar,className:k(Oo())},e==null?void 0:e.map(a=>a===Ee?d():a))}const No=ae(kt,Ro);function an(e,t){var o;return n.createElement(e.module.component,{key:e.module.name,...t},(o=e.children)===null||o===void 0?void 0:o.map(r=>an(r,t)))}function To(e,t={}){const{easing:o,...r}=e,{easing:i,...s}=t;return{easing:{...o,...i},...r,...s}}function ko({carousel:e,animation:t,render:o,toolbar:r,controller:i,noScroll:s,on:c,plugins:l,slides:d,index:a,...m}){const{animation:f,carousel:h,render:p,toolbar:g,controller:u,noScroll:_,on:x,slides:M,index:L,plugins:R,...P}=je,{config:N,augmentation:y}=Fn([Y(Lo,[Y(So,[Y(mo,[Y(Eo),Y(No),Y(wo)])])])],l||R),T=y({animation:To(f,t),carousel:{...h,...e},render:{...p,...o},toolbar:{...g,...r},controller:{...u,...i},noScroll:{..._,...s},on:{...x,...c},...P,...m});return T.open?n.createElement(Yn,{...T},n.createElement(Kn,{slides:d||M,index:Ne(a||L)},n.createElement(Qn,null,n.createElement(Xn,null,n.createElement(Vn,null,an(Y(Io,N),T)))))):null}const un={minZoom:1,maxZoomPixelRatio:1,zoomInMultiplier:2,doubleTapDelay:300,doubleClickDelay:500,doubleClickMaxStops:2,keyboardMoveDistance:50,wheelZoomDistanceFactor:100,pinchZoomDistanceFactor:100,pinchZoomV4:!1,scrollToZoom:!1,maxZoom:8};function Do(e){return Math.min(Math.max(e,Number.EPSILON),1)}function dn(e){const{minZoom:t,...o}={...un,...e};return{minZoom:Do(t),...o}}function Ao(e,t,o,r){const i=n.useRef(void 0),s=n.useRef(void 0),{zoom:c}=te().animation,l=at(),d=A(()=>{var a,m,f;if((a=i.current)===null||a===void 0||a.cancel(),i.current=void 0,s.current&&(r!=null&&r.current)){try{i.current=(f=(m=r.current).animate)===null||f===void 0?void 0:f.call(m,[{transform:s.current},{transform:`scale(${e}) translateX(${t}px) translateY(${o}px)`}],{duration:l?0:c??500,easing:i.current?"ease-out":"ease-in-out"})}catch(h){console.error(h)}s.current=void 0,i.current&&(i.current.onfinish=()=>{i.current=void 0})}});return ce(d,[e,t,o,d]),n.useCallback(()=>{s.current=r!=null&&r.current?window.getComputedStyle(r.current).transform:void 0},[r])}function Zo(e,t){const{on:o}=te(),r=A(()=>{var i;t||(i=o.zoom)===null||i===void 0||i.call(o,{zoom:e})});n.useEffect(r,[e,r])}function Ze(){const{zoom:e}=te();return dn(e)}function Wo(e,t){var o;const r=typeof e=="function"?(o=e(t))!==null&&o!==void 0?o:un.maxZoom:e;return Math.max(r,1)}function $o(e,t){var o,r;let i={width:0,height:0},s={width:0,height:0};const{currentSlide:c}=ue(),l=De(c),{imageFit:d}=te().carousel,{maxZoomPixelRatio:a,maxZoom:m}=Ze();if(e&&c){const h={...c,...t};if(me(h)){const p=ct(h,d),g=Math.max(...(((o=h.srcSet)===null||o===void 0?void 0:o.map(L=>L.width))||[]).concat(h.width?[h.width]:[])),u=Math.max(...(((r=h.srcSet)===null||r===void 0?void 0:r.map(L=>L.height))||[]).concat(h.height?[h.height]:[])),_=l%180!==0,x=_?u:g,M=_?g:u;x>0&&M>0&&e.width>0&&e.height>0&&(s=p?{width:Math.round(Math.min(x,e.width/e.height*M)),height:Math.round(Math.min(M,e.height/e.width*x))}:{width:x,height:M},s={width:s.width*a,height:s.height*a},i=p?{width:Math.min(e.width,s.width,x),height:Math.min(e.height,s.height,M)}:{width:Math.round(Math.min(e.width,e.height/M*x,x)),height:Math.round(Math.min(e.height,e.width/x*M,M))})}else e.width>0&&e.height>0&&(t&&t.width>0&&t.height>0?i={width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}:i={width:e.width,height:e.height})}const f=c&&i.width?me(c)?Math.max(it(s.width/i.width,5),1):Wo(m,c):1;return{imageRect:i,maxZoom:f}}function It(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function Ot(e,t,o=100,r=2){return e*Math.min(1+Math.abs(t/o),r)**Math.sign(t)}function zo(e,t,o,r,i,s,c,l,d){const a=n.useRef([]),m=n.useRef(0),f=n.useRef(void 0),{globalIndex:h}=ue(),{getOwnerWindow:p}=Te(),{containerRef:g,subscribeSensors:u}=le(),{keyboardMoveDistance:_,zoomInMultiplier:x,wheelZoomDistanceFactor:M,scrollToZoom:L,doubleTapDelay:R,doubleClickDelay:P,doubleClickMaxStops:N,pinchZoomDistanceFactor:y,pinchZoomV4:T}=Ze(),v=n.useCallback(C=>{if(g.current){const{pageX:D,pageY:O}=C,{scrollX:X,scrollY:V}=p(),{left:H,top:B,width:G,height:Q}=g.current.getBoundingClientRect();return[D-H-X-G/2,O-B-V-Q/2]}return[]},[g,p]),I=A(C=>{const D=e(),{key:O,metaKey:X,ctrlKey:V}=C,H=X||V,B=()=>{C.preventDefault(),C.stopPropagation()};if(D>1){const G=(Q,J)=>{B(),l(Q,J)};O==="ArrowDown"?G(0,_):O==="ArrowUp"?G(0,-_):O==="ArrowLeft"?G(-_,0):O==="ArrowRight"&&G(_,0)}O==="+"||H&&O==="="?(B(),i()):O==="-"||H&&O==="_"?(B(),s()):H&&O==="0"&&(B(),c(1))}),Z=A(C=>{const D=e();if((C.ctrlKey||L)&&Math.abs(C.deltaY)>Math.abs(C.deltaX)){C.stopPropagation(),c(Ot(D,-C.deltaY,M),!0,...v(C));return}D>1&&(C.stopPropagation(),L||l(C.deltaX,C.deltaY))}),U=n.useCallback(C=>{const D=a.current;D.splice(0,D.length,...D.filter(O=>O.pointerId!==C.pointerId))},[]),w=n.useCallback(C=>{U(C),C.persist(),a.current.push(C)},[U]),S=A(C=>{var D;const O=e(),X=a.current;if(C.pointerType==="mouse"&&C.buttons>1||!(!((D=d==null?void 0:d.current)===null||D===void 0)&&D.contains(C.target)))return;O>1&&C.stopPropagation();const{timeStamp:V}=C;if(X.length===0&&V-m.current<(C.pointerType==="touch"?R:P)){m.current=0;const H=O>=1?O!==o?O*Math.max(o**(1/N),x):1:O!==t?O/Math.max(t**(-1/N),x):1;c(H,!1,...v(C))}else m.current=V;if(w(C),X.length===2){const H=It(X[0],X[1]);f.current={previousDistance:H,initialDistance:Math.max(H,1),initialZoom:O}}}),b=A(C=>{const D=e(),O=a.current,X=O.find(V=>V.pointerId===C.pointerId);if(O.length===2&&f.current){C.stopPropagation(),w(C);const V=It(O[0],O[1]),H=T?f.current.initialZoom/f.current.initialDistance*V:Ot(D,V-f.current.previousDistance,y);c(H,!0,...O.map(B=>v(B)).reduce((B,G)=>G.map((Q,J)=>B[J]+Q/2))),f.current.previousDistance=V;return}D>1&&(C.stopPropagation(),X&&(O.length===1&&l((X.clientX-C.clientX)/D,(X.clientY-C.clientY)/D),w(C)))}),F=n.useCallback(C=>{const D=a.current;D.length===2&&D.find(O=>O.pointerId===C.pointerId)&&(f.current=void 0),U(C)},[U]),$=n.useCallback(()=>{const C=a.current;C.splice(0,C.length),m.current=0,f.current=void 0},[]);cn(u,S,b,F,r),n.useEffect($,[h,$]),n.useEffect(()=>r?()=>{}:ot($,u(et,I),u(tt,Z)),[r,u,$,I,Z])}function Fo(e,t,o){const[r,i]=n.useState(1),[s,c]=n.useState(0),[l,d]=n.useState(0),a=n.useRef({zoom:r,offsetX:s,offsetY:l}),m=Ao(r,s,l,o),{currentSlide:f,globalIndex:h}=ue(),{containerRect:p,slideRect:g}=le(),{minZoom:u,zoomInMultiplier:_}=Ze(),x=f&&me(f)?f.src:void 0,M=De(f),L=!(o!=null&&o.current);ce(()=>{a.current={zoom:1,offsetX:0,offsetY:0},i(1),c(0),d(0)},[h,x,M]);const R=n.useCallback((I,Z,U)=>{const w=U||a.current.zoom,S=a.current.offsetX-(I||0),b=a.current.offsetY-(Z||0),F=(e.width*w-g.width)/2/w,$=(e.height*w-g.height)/2/w;a.current.offsetX=Math.min(Math.abs(S),Math.max(F,0))*Math.sign(S),a.current.offsetY=Math.min(Math.abs(b),Math.max($,0))*Math.sign(b),c(a.current.offsetX),d(a.current.offsetY)},[g,e.width,e.height]),P=n.useCallback((I,Z,U,w)=>{const S=it(I+.01<t?I-.01>u?I:u:t,5);Z||m();const{zoom:b}=a.current;R(U?U*(1/b-1/S):0,w?w*(1/b-1/S):0,S),a.current.zoom=S,i(S)},[u,t,R,m]),N=n.useCallback(()=>a.current.zoom,[]),y=A(()=>{const I=N();I>1&&(I>t&&P(t,!0),R())});ce(y,[p.width,p.height,y]);const T=n.useCallback(()=>{const I=N(),Z=I*_;P(I<1&&Z>1?1:Z)},[_,N,P]),v=n.useCallback(()=>{const I=N(),Z=I/_;P(I>1&&Z<1?1:Z)},[_,N,P]);return{zoom:r,offsetX:s,offsetY:l,disabled:L,getZoom:N,changeOffsets:R,changeZoom:P,zoomIn:T,zoomOut:v}}const fn=n.createContext(null),dt=se("useZoom","ZoomControllerContext",fn);function Vo({children:e}){const[t,o]=n.useState(),{slideRect:r}=le(),{ref:i,minZoom:s}=Ze(),{imageRect:c,maxZoom:l}=$o(r,t==null?void 0:t.imageDimensions),{zoom:d,offsetX:a,offsetY:m,disabled:f,getZoom:h,changeZoom:p,changeOffsets:g,zoomIn:u,zoomOut:_}=Fo(c,l,t==null?void 0:t.zoomWrapperRef);Zo(d,f),zo(h,s,l,f,u,_,p,g,t==null?void 0:t.zoomWrapperRef);const x=n.useMemo(()=>({zoom:d,minZoom:s,maxZoom:l,offsetX:a,offsetY:m,disabled:f,zoomIn:u,zoomOut:_,changeZoom:p}),[d,s,l,a,m,f,u,_,p]);n.useImperativeHandle(i,()=>x,[x]);const M=n.useMemo(()=>({...x,setZoomWrapper:o}),[x,o]);return n.createElement(fn.Provider,{value:M},e)}const Uo=pe("ZoomIn",n.createElement(n.Fragment,null,n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),n.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"}))),Xo=pe("ZoomOut",n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})),Rt=n.forwardRef(function({zoomIn:t,onLoseFocus:o},r){const i=n.useRef(!1),s=n.useRef(!1),{zoom:c,minZoom:l,maxZoom:d,zoomIn:a,zoomOut:m,disabled:f}=dt(),{render:h}=te(),p=f||(t?c>=d:c<=l);return n.useEffect(()=>{p&&i.current&&s.current&&o(),p||(i.current=!0)},[p,o]),n.createElement(lt,{ref:r,disabled:p,label:t?"Zoom in":"Zoom out",icon:t?Uo:Xo,renderIcon:t?h.iconZoomIn:h.iconZoomOut,onClick:t?a:m,onFocus:()=>{s.current=!0},onBlur:()=>{s.current=!1}})});function Yo(){const e=n.useRef(null),t=n.useRef(null),{focus:o}=le(),r=n.useCallback(c=>{var l,d;!((l=c.current)===null||l===void 0)&&l.disabled?o():(d=c.current)===null||d===void 0||d.focus()},[o]),i=n.useCallback(()=>r(e),[r]),s=n.useCallback(()=>r(t),[r]);return n.createElement(n.Fragment,null,n.createElement(Rt,{zoomIn:!0,ref:e,onLoseFocus:s}),n.createElement(Rt,{ref:t,onLoseFocus:i}))}function Ho(){const{render:e}=te(),t=dt();return e.buttonZoom?n.createElement(n.Fragment,null,e.buttonZoom(t)):n.createElement(Yo,null)}function Bo(e){var t;return(((t=e.srcSet)===null||t===void 0?void 0:t.length)||0)>0}function Ko({current:e,preload:t},{type:o,source:r}){switch(o){case"fetch":return e?{current:e,preload:r}:{current:r};case"done":return r===t?{current:r}:{current:e,preload:t};default:throw new Error(Ut)}}function jo(e){var t,o;const[{current:r,preload:i},s]=n.useReducer(Ko,{}),{slide:c,rect:l,rotation:d=0,imageFit:a,render:m,interactive:f,zoom:h=1}=e,p=d%180!==0,g=p?{width:l.height,height:l.width}:l,u=c.srcSet.sort((v,I)=>v.width-I.width),_=(t=c.width)!==null&&t!==void 0?t:u[u.length-1].width,x=(o=c.height)!==null&&o!==void 0?o:u[u.length-1].height,M=ct(c,a),L=Math.max(...u.map(v=>v.width)),R=Math.min((M?Math.max:Math.min)(g.width,_*(g.height/x))*h,L),P=kn(),N=A(()=>{var v;const I=(v=u.find(Z=>Z.width>=R*P))!==null&&v!==void 0?v:u[u.length-1];(!r||u.findIndex(Z=>Z.src===r)<u.findIndex(Z=>Z===I))&&s({type:"fetch",source:I.src})});ce(N,[R,P,N]);const y=A(v=>s({type:"done",source:v})),T={WebkitTransform:f?"initial":"translateZ(0)"};return M||Object.assign(T,g.width/g.height<_/x?{width:p?`${g.width}px`:"100%",height:"auto"}:{width:"auto",height:p?`${g.height}px`:"100%"}),n.createElement(n.Fragment,null,i&&i!==r&&n.createElement(Re,{key:"preload",...e,offset:void 0,slide:{...c,src:i,srcSet:void 0},style:{position:"absolute",visibility:"hidden",...T},onLoad:()=>y(i),render:{...m,iconLoading:()=>null,iconError:()=>null}}),r&&n.createElement(Re,{key:"current",...e,slide:{...c,src:r,srcSet:void 0},style:T}))}function Go({render:e,slide:t,offset:o,rect:r}){var i;const[s,c]=n.useState(),l=n.useRef(null),d=me(t),a=De(t),{zoom:m,maxZoom:f,offsetX:h,offsetY:p,setZoomWrapper:g}=dt(),u=m>1,{carousel:_,on:x}=te(),{currentIndex:M}=ue();ce(()=>{if(o!==0||d||!l.current)return()=>{};const R=()=>{const N=l.current;if(!N)return;let y=0,T=0;for(const v of N.children)v instanceof HTMLElement&&(y=Math.max(y,v.offsetWidth),T=Math.max(T,v.offsetHeight));c(v=>v&&v.width===y&&v.height===T?v:{width:y,height:T})};if(R(),typeof ResizeObserver>"u")return()=>{};const P=new ResizeObserver(R);for(const N of l.current.children)P.observe(N);return()=>P.disconnect()},[o,d,r]),ce(()=>o===0?(g({zoomWrapperRef:l,imageDimensions:s}),()=>g(void 0)):()=>{},[o,s,g]);let L=(i=e.slide)===null||i===void 0?void 0:i.call(e,{slide:t,offset:o,rect:r,zoom:m,maxZoom:f});if(!L&&d){const R={slide:t,offset:o,rect:r,rotation:a,render:e,imageFit:_.imageFit,imageProps:_.imageProps,onClick:o===0?()=>{var P;return(P=x.click)===null||P===void 0?void 0:P.call(x,{index:M})}:void 0};L=Bo(t)?n.createElement(jo,{...R,slide:t,interactive:u,zoom:o===0?m:1}):n.createElement(Re,{onLoad:P=>c({width:P.naturalWidth,height:P.naturalHeight}),...R})}return L?n.createElement("div",{ref:l,className:ie(k(Pn),k(Qe),k(At),u&&k(Mn)),style:o===0?{transform:`scale(${m}) translateX(${h}px) translateY(${p}px)`}:void 0},L):null}const qo=({augment:e,addModule:t})=>{e(({zoom:o,toolbar:r,render:i,controller:s,...c})=>{const l=dn(o);return{zoom:l,toolbar:An(r,gt,n.createElement(Ho,null)),render:{...i,slide:d=>{var a,m;return me(d.slide)||d.slide.type!=null&&(!((a=l.supports)===null||a===void 0)&&a.includes(d.slide.type))?n.createElement(Go,{render:i,...d}):(m=i.slide)===null||m===void 0?void 0:m.call(i,d)}},controller:{...s,preventDefaultWheelY:l.scrollToZoom},...c}}),t(ae(gt,Vo))};function tr({src:e,alt:t,slides:o,index:r=0,open:i,onClose:s}){const c=o&&o.length>0?o:e?[{src:e,alt:t}]:[];return vn.jsx(ko,{open:i,close:s,index:r,slides:c,plugins:[qo],zoom:{scrollToZoom:!0,maxZoomPixelRatio:5},styles:{container:{backgroundColor:"rgba(0, 0, 0, 0.85)",backdropFilter:"blur(8px)"},toolbar:{background:"transparent",padding:"16px"},button:{backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:"9999px",color:"#fff",width:40,height:40},icon:{width:20,height:20}},animation:{fade:200}})}export{tr as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Q}from"./index-
|
|
1
|
+
import{j as Q}from"./index-1CLUk_QC.js";import{r as me}from"./syntax-highlighter-d-DuIo_w.js";import{k as Pd,b as Nd,s as Hd,P as Wd,E as Fd,S as zd,a as Vd,M as $d,c as qd}from"./main-RwBI9Vfa.js";function Yr(){return Yr=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Yr.apply(null,arguments)}function jd(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let Jr=[],nc=[];(()=>{let n="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,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?nc:Jr).push(t=t+n[e])})();function _d(n){if(n<768)return!1;for(let e=0,t=Jr.length;;){let i=e+t>>1;if(n<Jr[i])t=i;else if(n>=nc[i])e=i+1;else return!0;if(e==t)return!1}}function Ul(n){return n>=127462&&n<=127487}const Gl=8205;function Kd(n,e,t=!0,i=!0){return(t?sc:Ud)(n,e,i)}function sc(n,e,t){if(e==n.length)return e;e&&rc(n.charCodeAt(e))&&oc(n.charCodeAt(e-1))&&e--;let i=mr(n,e);for(e+=Xl(i);e<n.length;){let s=mr(n,e);if(i==Gl||s==Gl||t&&_d(s))e+=Xl(s),i=s;else if(Ul(s)){let r=0,o=e-2;for(;o>=0&&Ul(mr(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Ud(n,e,t){for(;e>1;){let i=sc(n,e-2,t);if(i<e)return i;e--}return 0}function mr(n,e){let t=n.charCodeAt(e);if(!oc(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return rc(i)?(t-55296<<10)+(i-56320)+65536:t}function rc(n){return n>=56320&&n<57344}function oc(n){return n>=55296&&n<56320}function Xl(n){return n<65536?1:2}class G{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]=Li(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),pt.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Li(this,e,t);let i=[];return this.decompose(e,t,i,0),pt.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),s=new Zi(this),r=new Zi(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zi(this,e)}iterRange(e,t=this.length){return new lc(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ac(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]?G.empty:e.length<=32?new fe(e):pt.from(fe.split(e,[]))}}class fe extends G{constructor(e,t=Gd(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Xd(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new fe(Yl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=us(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new fe(l,o.length+r.length));else{let a=l.length>>1;i.push(new fe(l.slice(0,a)),new fe(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof fe))return super.replace(e,t,i);[e,t]=Li(this,e,t);let s=us(this.text,us(i.text,Yl(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new fe(s,r):pt.from(fe.split(s,[]),r)}sliceString(e,t=this.length,i=`
|
|
2
2
|
`){[e,t]=Li(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],a=r+l.length;r>e&&o&&(s+=i),e<a&&t>r&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new fe(i,s)),i=[],s=-1);return s>-1&&t.push(new fe(i,s)),t}}class pt extends G{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,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],a=o+l.length;if(e<=a&&t>=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=Li(this,e,t),i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[s]=a,new pt(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
|
3
3
|
`){[e,t]=Li(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],a=o+l.length;o>e&&r&&(s+=i),e<a&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof pt))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new fe(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof pt)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof fe&&a&&(p=c[c.length-1])instanceof fe&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new fe(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:pt.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new pt(l,t)}}G.empty=new fe([""],0);function Gd(n){let e=-1;for(let t of n)e+=t.length+1;return e}function us(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],a=s+l.length;a>=t&&(a>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=a+1}return e}function Yl(n,e,t){return us(n,[""],e,t)}class Zi{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 fe?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof fe?s.text.length:s.children.length;if(o==(t>0?l: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((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;e--}else if(s instanceof fe){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof fe?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class lc{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Zi(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:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ac{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=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=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(G.prototype[Symbol.iterator]=function(){return this.iter()},Zi.prototype[Symbol.iterator]=lc.prototype[Symbol.iterator]=ac.prototype[Symbol.iterator]=function(){return this});let Xd=class{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}};function Li(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function ke(n,e,t=!0,i=!0){return Kd(n,e,t,i)}function Yd(n){return n>=56320&&n<57344}function Jd(n){return n>=55296&&n<56320}function Re(n,e){let t=n.charCodeAt(e);if(!Jd(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Yd(i)?(t-55296<<10)+(i-56320)+65536:t}function sl(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function mt(n){return n<65536?1:2}const Qr=/\r\n?|\n/;var Oe=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(Oe||(Oe={}));class kt{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,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Zr(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new kt(e)}composeDesc(e){return this.empty?e:e.empty?this:hc(this,e)}mapDesc(e,t=!1){return e.empty?this:eo(this,e,t)}mapPos(e,t=-1,i=Oe.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=s+l;if(a<0){if(h>e)return r+(e-s);r+=l}else{if(i!=Oe.Simple&&h>=e&&(i==Oe.TrackDel&&s<e&&h>e||i==Oe.TrackBefore&&s<e||i==Oe.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let r=this.sections[i++],o=this.sections[i++],l=s+r;if(o>=0&&s<=t&&l>=e)return s<e&&l>t?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}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 kt(e)}static create(e){return new kt(e)}}class be extends kt{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 Zr(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return eo(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],l=t[s+1];if(l>=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length<a;)i.push(G.empty);i.push(o?e.slice(r,r+o):G.empty)}r+=o}return new be(t,i)}compose(e){return this.empty?e:e.empty?this:hc(this,e,!0)}map(e,t=!1){return e.empty?this:eo(this,e,t,!0)}iterChanges(e,t=!1){Zr(this,e,t)}get desc(){return kt.create(this.sections)}filter(e){let t=[],i=[],s=[],r=new fn(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&r.len==0;){if(r.done)break e;let c=Math.min(r.len,a-l);Ae(s,c,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;Ae(t,c,f),f>0&&Wt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l<h;){if(r.done)break e;let c=Math.min(r.len,h-l);Ae(t,c,-1),Ae(s,c,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(c),l+=c}}return{changes:new be(t,i),filtered:kt.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],s=this.sections[t+1];s<0?e.push(i):s==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;o<t&&Ae(s,t-o,-1);let f=new be(s,r);l=l?l.compose(f.map(l)):f,s=[],r=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof be){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:d}=c;if(f>u||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?G.of(d.split(i||Qr)):d:G.empty,m=p.length;if(f==u&&m==0)return;f<o&&a(),f>o&&Ae(s,f-o,-1),Ae(s,u-f,m),Wt(r,s,p),o=u}}return h(e),a(!l),l}static empty(e){return new be(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;s<e.length;s++){let r=e[s];if(typeof r=="number")t.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length<s;)i.push(G.empty);i[s]=G.of(r.slice(1)),t.push(r[0],i[s].length)}}}return new be(t,i)}static createSet(e,t){return new be(e,t)}}function Ae(n,e,t,i=!1){if(e==0&&t<=0)return;let s=n.length-2;s>=0&&t<=0&&t==n[s+1]?n[s]+=e:s>=0&&e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Wt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(G.empty);n.push(t)}}function Zr(n,e,t){let i=n.inserted;for(let s=0,r=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)s+=l,r+=l;else{let h=s,c=r,f=G.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function eo(n,e,t,i=!1){let s=[],r=i?[]:null,o=new fn(n),l=new fn(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);Ae(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(Ae(s,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(Ae(s,0,o.ins),r&&Wt(r,s,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;Ae(s,h,a<o.i?o.ins:0),r&&a<o.i&&Wt(r,s,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return r?be.createSet(s,r):kt.create(s);throw new Error("Mismatched change set lengths")}}}function hc(n,e,t=!1){let i=[],s=t?[]:null,r=new fn(n),o=new fn(e);for(let l=!1;;){if(r.done&&o.done)return s?be.createSet(i,s):kt.create(i);if(r.ins==0)Ae(i,r.len,0,l),r.next();else if(o.len==0&&!o.done)Ae(i,0,o.ins,l),s&&Wt(s,i,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(r.len2,o.len),h=i.length;if(r.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;Ae(i,a,c,l),s&&c&&Wt(s,i,o.text)}else o.ins==-1?(Ae(i,r.off?0:r.len,a,l),s&&Wt(s,i,r.textBit(a))):(Ae(i,r.off?0:r.len,o.off?0:o.ins,l),s&&!o.off&&Wt(s,i,o.text));l=(r.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class fn{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?G.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?G.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Nt{constructor(e,t,i,s){this.from=e,this.to=t,this.flags=i,this.goalColumn=s}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new Nt(i,s,this.flags,this.goalColumn)}extend(e,t=e,i=0){if(e<=this.anchor&&t>=this.anchor)return w.range(e,t,void 0,void 0,i);let s=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return w.range(this.anchor,s,void 0,void 0,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return w.range(e.anchor,e.head)}static create(e,t,i,s){return new Nt(e,t,i,s)}}class w{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:w.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new w([this.main],0)}addRange(e,t=!0){return w.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,w.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new w(e.ranges.map(t=>Nt.fromJSON(t)),e.main)}static single(e,t=e){return new w([w.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<e.length;s++){let r=e[s];if(r.empty?r.from<=i:r.from<i)return w.normalized(e.slice(),t);i=r.to}return new w(e,t)}static cursor(e,t=0,i,s){return Nt.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i)),s)}static range(e,t,i,s,r){let o=s==null?7:Math.min(6,s);return!r&&e!=t&&(r=t<e?1:-1),r&&(o|=r<0?8:16),t<e?Nt.create(t,e,o|32,i):Nt.create(e,t,o,i)}static undirectionalRange(e,t){return Nt.create(e,t,64,void 0)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;s<e.length;s++){let r=e[s],o=e[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let l=o.from,a=Math.max(r.to,o.to);s<=t&&t--,e.splice(--s,2,r.anchor>r.head?w.range(a,l):w.range(l,a))}}return new w(e,t)}}function cc(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let rl=0;class R{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=rl++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new R(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:ol),!!e.static,e.enables)}of(e){return new ds([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ds(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ds(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function ol(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class ds{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=rl++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||to(f,c)){let d=i(f);if(l?!Jl(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,p=u.config.address[r];if(p!=null){let m=Cs(u,p);if(this.dependencies.every(g=>g instanceof R?u.facet(g)===f.facet(g):g instanceof Le?u.field(g,!1)==f.field(g,!1):!0)||(l?Jl(d=i(f),m,s):s(d=i(f),m)))return f.values[o]=m,0}else d=i(f);return f.values[o]=d,1}}}get extension(){return this}}function Jl(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function to(n,e){let t=!1;for(let i of e)en(n,i)&1&&(t=!0);return t}function Qd(n,e,t){let i=t.map(a=>n[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=Cs(a,i[c]);if(s[c]==2)for(let u of f)h.push(u);else h.push(f)}return e.combine(h)}return{create(a){for(let h of i)en(a,h);return a.values[o]=l(a),1},update(a,h){if(!to(a,r))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=to(a,i),f=h.config.facets[e.id],u=h.facet(e);if(f&&!c&&ol(t,f))return a.values[o]=u,0;let d=l(a);return e.compare(d,u)?(a.values[o]=u,0):(a.values[o]=d,1)}}}const Hn=R.define({static:!0});class Le{constructor(e,t,i,s,r){this.id=e,this.createF=t,this.updateF=i,this.compareF=s,this.spec=r,this.provides=void 0}static define(e){let t=new Le(rl++,e.create,e.update,e.compare||((i,s)=>i===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Hn).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>{let r=i.facet(Hn),o=s.facet(Hn),l;return(l=r.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[t]=l.create(i),1):s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,Hn.of({field:this,create:e})]}get extension(){return this}}const ei={lowest:4,low:3,default:2,high:1,highest:0};function $i(n){return e=>new fc(e,n)}const fi={highest:$i(ei.highest),high:$i(ei.high),default:$i(ei.default),low:$i(ei.low),lowest:$i(ei.lowest)};class fc{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class Ys{of(e){return new io(this,e)}reconfigure(e){return Ys.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class io{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class Ss{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of Zd(e,t,o))u instanceof Le?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,m=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[p.id]=a.length<<1|1,ol(m,d))a.push(i.facet(p));else{let g=p.combine(d.map(b=>b.value));a.push(i&&p.compare(g,i.facet(p))?i.facet(p):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(b=>g.dynamicSlot(b)));l[p.id]=h.length<<1,h.push(g=>Qd(g,p,d))}}let f=h.map(u=>u(l));return new Ss(e,o,f,l,a,r)}}function Zd(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof io&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof io){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof fc)r(o.inner,o.prec);else if(o instanceof Le)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof ds)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,ei.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}).`);if(h==o)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,ei.default),i.reduce((o,l)=>o.concat(l))}function en(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Cs(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const uc=R.define(),no=R.define({combine:n=>n.some(e=>e),static:!0}),dc=R.define({combine:n=>n.length?n[0]:void 0,static:!0}),pc=R.define(),mc=R.define(),gc=R.define(),bc=R.define({combine:n=>n.length?n[0]:!1});class St{constructor(e,t){this.type=e,this.value=t}static define(){return new ep}}class ep{of(e){return new St(this,e)}}class tp{constructor(e){this.map=e}of(e){return new $(this,e)}}class ${constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new $(this.type,t)}is(e){return this.type==e}static define(e={}){return new tp(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}$.reconfigure=$.define();$.appendConfig=$.define();class ye{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&cc(i,t.newLength),r.some(l=>l.type==ye.time)||(this.annotations=r.concat(ye.time.of(Date.now())))}static create(e,t,i,s,r,o){return new ye(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ye.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}ye.time=St.define();ye.userEvent=St.define();ye.addToHistory=St.define();ye.remote=St.define();function ip(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i<n.length&&(s==e.length||e[s]>=n[i]))r=n[i++],o=n[i++];else if(s<e.length)r=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function yc(n,e,t){var i;let s,r,o;return t?(s=e.changes,r=be.empty(e.changes.length),o=n.changes.compose(e.changes)):(s=e.changes.map(n.changes),r=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(r):(i=n.selection)===null||i===void 0?void 0:i.map(s),effects:$.mapEffects(n.effects,s).concat($.mapEffects(e.effects,r)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function so(n,e,t){let i=e.selection,s=wi(e.annotations);return e.userEvent&&(s=s.concat(ye.userEvent.of(e.userEvent))),{changes:e.changes instanceof be?e.changes:be.of(e.changes||[],t,n.facet(dc)),selection:i&&(i instanceof w?i:w.single(i.anchor,i.head)),effects:wi(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function xc(n,e,t){let i=so(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;i=yc(i,so(n,e[r],o?i.changes.newLength:n.doc.length),o)}let s=ye.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return sp(t?np(s):s)}function np(n){let e=n.startState,t=!0;for(let s of e.facet(pc)){let r=s(n);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:ip(t,r))}if(t!==!0){let s,r;if(t===!1)r=n.changes.invertedDesc,s=be.empty(e.doc.length);else{let o=n.changes.filter(t);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}n=ye.create(e,s,n.selection&&n.selection.map(r),$.mapEffects(n.effects,r),n.annotations,n.scrollIntoView)}let i=e.facet(mc);for(let s=i.length-1;s>=0;s--){let r=i[s](n);r instanceof ye?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof ye?n=r[0]:n=xc(e,wi(r),!1)}return n}function sp(n){let e=n.startState,t=e.facet(gc),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=yc(i,so(e,r,n.changes.newLength),!0))}return i==n?n:ye.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const rp=[];function wi(n){return n==null?rp:Array.isArray(n)?n:[n]}var le=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(le||(le={}));const op=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ro;try{ro=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function lp(n){if(ro)return ro.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||op.test(t)))return!0}return!1}function ap(n){return e=>{if(!/\S/.test(e))return le.Space;if(lp(e))return le.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return le.Word;return le.Other}}class _{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)en(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return en(this,i),Cs(this,i)}update(...e){return xc(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:s}=t;for(let l of e.effects)l.is(Ys.reconfigure)?(t&&(s=new Map,t.compartments.forEach((a,h)=>s.set(h,a)),t=null),s.set(l.value.compartment,l.value.extension)):l.is($.reconfigure)?(t=null,i=l.value):l.is($.appendConfig)&&(t=null,i=wi(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=Ss.resolve(i,s,this),r=new _(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(no)?e.newSelection:e.newSelection.asSingle();new _(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:w.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=wi(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),h=this.changes(a.changes),c=h.map(s);for(let u=0;u<l;u++)r[u]=r[u].map(c);let f=s.mapDesc(h,!0);r.push(a.range.map(f)),s=s.compose(c),o=$.mapEffects(o,c).concat($.mapEffects(wi(a.effects),f))}return{changes:s,selection:w.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof be?e:be.of(e,this.doc.length,this.facet(_.lineSeparator))}toText(e){return G.of(e.split(this.facet(_.lineSeparator)||Qr))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(en(this,t),Cs(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let s=e[i];s instanceof Le&&this.config.address[s.id]!=null&&(t[i]=s.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i){for(let r in i)if(Object.prototype.hasOwnProperty.call(e,r)){let o=i[r],l=e[r];s.push(o.init(a=>o.spec.fromJSON(l,a)))}}return _.create({doc:e.doc,selection:w.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Ss.resolve(e.extensions||[],new Map),i=e.doc instanceof G?e.doc:G.of((e.doc||"").split(t.staticFacet(_.lineSeparator)||Qr)),s=e.selection?e.selection instanceof w?e.selection:w.single(e.selection.anchor,e.selection.head):w.single(0);return cc(s,i.length),t.staticFacet(no)||(s=s.asSingle()),new _(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(_.tabSize)}get lineBreak(){return this.facet(_.lineSeparator)||`
|