Plugin Directory

Changeset 3490244


Ignore:
Timestamp:
03/24/2026 05:26:12 PM (4 days ago)
Author:
kbat82
Message:

Update to version 1.5.5 from GitHub

Location:
pattern-css
Files:
86 added
10 deleted
44 edited
1 copied

Legend:

Unmodified
Added
Removed
  • pattern-css/tags/1.5.5/.gitignore

    r3295651 r3490244  
    44Cargo.lock
    55
    6 cypress/screenshots/**/*
    7 !cypress/screenshots/**/.gitkeep
    8 cypress/videos/**/*
    9 !cypress/videos/**/.gitkeep
    10 cypress/downloads/**/*
    11 cypress/downloads/**/.gitkeep
     6playwright-report/
     7test-results/
    128
    139/vendor/
  • pattern-css/tags/1.5.5/README.md

    r3295651 r3490244  
    2525### Combines Rules
    2626
    27 <!-- prettier-ignore -->
    2827```css
    2928[block] {
     
    4039### Fixes redundant properties
    4140
    42 <!-- prettier-ignore -->
    4341```css
    4442[block] {
  • pattern-css/tags/1.5.5/build/index-rtl.css

    r3297727 r3490244  
    1 .pattern-css-editor{--tw-ring-inset:var(--tw-empty,    );--tw-ring-offset-width:0px;--tw-ring-offset-color:transparent;--tw-ring-color:var(--wp-admin-theme-color);--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.pattern-css-editor *,.pattern-css-editor :after,.pattern-css-editor :before{box-sizing:border-box!important}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pattern-css-editor .sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pattern-css-editor .fixed{position:fixed!important}.pattern-css-editor .absolute{position:absolute!important}.pattern-css-editor .relative{position:relative!important}.pattern-css-editor .-bottom-1{bottom:-.25rem!important}.pattern-css-editor .-right-1{left:-.25rem!important}.pattern-css-editor .bottom-px{bottom:1px!important}.pattern-css-editor .right-1{left:.25rem!important}.pattern-css-editor .z-10{z-index:10!important}.pattern-css-editor .z-50{z-index:50!important}.pattern-css-editor .z-high{z-index:99999!important}.pattern-css-editor .m-0{margin:0!important}.pattern-css-editor .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.pattern-css-editor .-mt-2{margin-top:-.5rem!important}.pattern-css-editor .mt-2{margin-top:.5rem!important}.pattern-css-editor .block{display:block!important}.pattern-css-editor .flex{display:flex!important}.pattern-css-editor .h-52{height:13rem!important}.pattern-css-editor .h-6{height:1.5rem!important}.pattern-css-editor .h-full{height:100%!important}.pattern-css-editor .min-h-0{min-height:0!important}.pattern-css-editor .min-h-52{min-height:13rem!important}.pattern-css-editor .w-6{width:1.5rem!important}.pattern-css-editor .flex-shrink-0{flex-shrink:0!important}.pattern-css-editor .flex-grow{flex-grow:1!important}.pattern-css-editor .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.pattern-css-editor .cursor-grab{cursor:grab!important}.pattern-css-editor .cursor-se-resize{cursor:sw-resize!important}.pattern-css-editor .flex-col{flex-direction:column!important}.pattern-css-editor .items-center{align-items:center!important}.pattern-css-editor .justify-end{justify-content:flex-end!important}.pattern-css-editor .justify-center{justify-content:center!important}.pattern-css-editor .justify-between{justify-content:space-between!important}.pattern-css-editor .gap-1{gap:.25rem!important}.pattern-css-editor .gap-2{gap:.5rem!important}.pattern-css-editor .overflow-y-auto{overflow-y:auto!important}.pattern-css-editor .overflow-x-hidden{overflow-x:hidden!important}.pattern-css-editor .border{border-width:1px!important}.pattern-css-editor .border-0{border-width:0!important}.pattern-css-editor .border-l-0{border-right-width:0!important}.pattern-css-editor .border-t-0{border-top-width:0!important}.pattern-css-editor .border-solid{border-style:solid!important}.pattern-css-editor .border-gray-300{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-gray-600{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-transparent{border-color:transparent!important}.pattern-css-editor .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white\/90{background-color:hsla(0,0%,100%,.9)!important}.pattern-css-editor .stroke-gray-700{stroke:#757575!important}.pattern-css-editor .p-0{padding:0!important}.pattern-css-editor .p-1{padding:.25rem!important}.pattern-css-editor .p-2{padding:.5rem!important}.pattern-css-editor .p-4{padding:1rem!important}.pattern-css-editor .px-4{padding-right:1rem!important;padding-left:1rem!important}.pattern-css-editor .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.pattern-css-editor .pb-4{padding-bottom:1rem!important}.pattern-css-editor .font-jetbrains-mono{font-family:pcss-jetbrains-mono,monospace!important}.pattern-css-editor .text-sm{font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .text-xs{font-size:.75rem!important;line-height:1rem!important}.pattern-css-editor .font-medium{font-weight:500!important}.pattern-css-editor .lowercase{text-transform:lowercase!important}.pattern-css-editor .text-gray-600{--tw-text-opacity:1;color:rgb(148 148 148/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-700{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-900{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}.pattern-css-editor .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.pattern-css-editor .blur{--tw-blur:blur(8px)}.pattern-css-editor .blur,.pattern-css-editor .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.pattern-css-editor .transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pattern-css-editor .duration-300{transition-duration:.3s!important}.pattern-css-editor pre,.pattern-css-editor pre *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.pattern-css-editor pre,.pattern-css-editor textarea{border-radius:0!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:right!important}.pattern-css-editor pre:focus,.pattern-css-editor textarea:focus{border-radius:0!important;outline:2px solid transparent!important;outline-offset:2px!important}.pattern-css-editor pre,.pattern-css-editor textarea{direction:rtl!important}.pattern-css-editor .code-preview code{background-color:transparent!important;direction:rtl!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:right!important;width:100%!important}.pattern-css-editor pre .line-error:after{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important;content:""!important;height:1.25rem!important;right:0!important;position:absolute!important;left:0!important;--tw-bg-opacity:0.3;font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .wp-focus:focus-within{border-color:var(
     1.pattern-css-editor{--tw-ring-inset:var(--tw-empty,    );--tw-ring-offset-width:0px;--tw-ring-offset-color:transparent;--tw-ring-color:var(--wp-admin-theme-color);--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.pattern-css-editor *,.pattern-css-editor :after,.pattern-css-editor :before{box-sizing:border-box!important}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pattern-css-editor .sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pattern-css-editor .fixed{position:fixed!important}.pattern-css-editor .absolute{position:absolute!important}.pattern-css-editor .relative{position:relative!important}.pattern-css-editor .-bottom-1{bottom:-.25rem!important}.pattern-css-editor .-right-1{left:-.25rem!important}.pattern-css-editor .bottom-px{bottom:1px!important}.pattern-css-editor .right-1{left:.25rem!important}.pattern-css-editor .z-10{z-index:10!important}.pattern-css-editor .z-50{z-index:50!important}.pattern-css-editor .z-high{z-index:99999!important}.pattern-css-editor .m-0{margin:0!important}.pattern-css-editor .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.pattern-css-editor .-mt-2{margin-top:-.5rem!important}.pattern-css-editor .mb-4{margin-bottom:1rem!important}.pattern-css-editor .mt-2{margin-top:.5rem!important}.pattern-css-editor .block{display:block!important}.pattern-css-editor .flex{display:flex!important}.pattern-css-editor .h-52{height:13rem!important}.pattern-css-editor .h-6{height:1.5rem!important}.pattern-css-editor .h-full{height:100%!important}.pattern-css-editor .min-h-0{min-height:0!important}.pattern-css-editor .min-h-52{min-height:13rem!important}.pattern-css-editor .w-6{width:1.5rem!important}.pattern-css-editor .flex-shrink-0{flex-shrink:0!important}.pattern-css-editor .flex-grow{flex-grow:1!important}.pattern-css-editor .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.pattern-css-editor .cursor-grab{cursor:grab!important}.pattern-css-editor .cursor-se-resize{cursor:sw-resize!important}.pattern-css-editor .flex-col{flex-direction:column!important}.pattern-css-editor .items-center{align-items:center!important}.pattern-css-editor .justify-end{justify-content:flex-end!important}.pattern-css-editor .justify-center{justify-content:center!important}.pattern-css-editor .justify-between{justify-content:space-between!important}.pattern-css-editor .gap-1{gap:.25rem!important}.pattern-css-editor .gap-2{gap:.5rem!important}.pattern-css-editor .overflow-y-auto{overflow-y:auto!important}.pattern-css-editor .overflow-x-hidden{overflow-x:hidden!important}.pattern-css-editor .border{border-width:1px!important}.pattern-css-editor .border-0{border-width:0!important}.pattern-css-editor .border-l-0{border-right-width:0!important}.pattern-css-editor .border-t-0{border-top-width:0!important}.pattern-css-editor .border-solid{border-style:solid!important}.pattern-css-editor .border-gray-300{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-gray-600{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-transparent{border-color:transparent!important}.pattern-css-editor .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white\/90{background-color:hsla(0,0%,100%,.9)!important}.pattern-css-editor .stroke-gray-700{stroke:#757575!important}.pattern-css-editor .p-0{padding:0!important}.pattern-css-editor .p-1{padding:.25rem!important}.pattern-css-editor .p-2{padding:.5rem!important}.pattern-css-editor .p-4{padding:1rem!important}.pattern-css-editor .px-4{padding-right:1rem!important;padding-left:1rem!important}.pattern-css-editor .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.pattern-css-editor .pb-4{padding-bottom:1rem!important}.pattern-css-editor .font-jetbrains-mono{font-family:pcss-jetbrains-mono,monospace!important}.pattern-css-editor .text-sm{font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .text-xs{font-size:.75rem!important;line-height:1rem!important}.pattern-css-editor .font-medium{font-weight:500!important}.pattern-css-editor .lowercase{text-transform:lowercase!important}.pattern-css-editor .text-gray-600{--tw-text-opacity:1;color:rgb(148 148 148/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-700{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-900{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}.pattern-css-editor .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.pattern-css-editor .blur{--tw-blur:blur(8px)}.pattern-css-editor .blur,.pattern-css-editor .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.pattern-css-editor .transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pattern-css-editor .duration-300{transition-duration:.3s!important}.pattern-css-editor pre,.pattern-css-editor pre *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.pattern-css-editor pre,.pattern-css-editor textarea{border-radius:0!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:right!important}.pattern-css-editor pre:focus,.pattern-css-editor textarea:focus{border-radius:0!important;outline:2px solid transparent!important;outline-offset:2px!important}.pattern-css-editor pre,.pattern-css-editor textarea{direction:rtl!important}.pattern-css-editor .code-preview code{background-color:transparent!important;direction:rtl!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:right!important;width:100%!important}.pattern-css-editor pre .line-error:after{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important;content:""!important;height:1.25rem!important;right:0!important;position:absolute!important;left:0!important;--tw-bg-opacity:0.3;font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .wp-focus:focus-within{border-color:var(
    22        --wp-components-color-accent,var(--wp-admin-theme-color,#007cba)
    33    )!important;box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#007cba))!important;outline:2px solid transparent!important}.pattern-css-editor [data-pcss-handle]:active,.pattern-css-editor [data-pcss-resize]:active{cursor:grabbing!important}.pattern-css-editor .disable-mb-checkbox>div{margin-bottom:0!important}@font-face{font-family:pcss-jetbrains-mono;src:url(fonts/pcss-jetbrains-mono.1e66c47a.woff2) format("woff2")}.pattern-css-editor .hover\:border-gray-600:hover{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .active\:border-gray-600:active{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}
  • pattern-css/tags/1.5.5/build/index.asset.php

    r3488380 r3490244  
    1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'ada640d79b5c675aeee6');
     1<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '5bd349c4b8c8d7e743b1');
  • pattern-css/tags/1.5.5/build/index.css

    r3297727 r3490244  
    1 .pattern-css-editor{--tw-ring-inset:var(--tw-empty,    );--tw-ring-offset-width:0px;--tw-ring-offset-color:transparent;--tw-ring-color:var(--wp-admin-theme-color);--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.pattern-css-editor *,.pattern-css-editor :after,.pattern-css-editor :before{box-sizing:border-box!important}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pattern-css-editor .sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pattern-css-editor .fixed{position:fixed!important}.pattern-css-editor .absolute{position:absolute!important}.pattern-css-editor .relative{position:relative!important}.pattern-css-editor .-bottom-1{bottom:-.25rem!important}.pattern-css-editor .-right-1{right:-.25rem!important}.pattern-css-editor .bottom-px{bottom:1px!important}.pattern-css-editor .right-1{right:.25rem!important}.pattern-css-editor .z-10{z-index:10!important}.pattern-css-editor .z-50{z-index:50!important}.pattern-css-editor .z-high{z-index:99999!important}.pattern-css-editor .m-0{margin:0!important}.pattern-css-editor .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.pattern-css-editor .-mt-2{margin-top:-.5rem!important}.pattern-css-editor .mt-2{margin-top:.5rem!important}.pattern-css-editor .block{display:block!important}.pattern-css-editor .flex{display:flex!important}.pattern-css-editor .h-52{height:13rem!important}.pattern-css-editor .h-6{height:1.5rem!important}.pattern-css-editor .h-full{height:100%!important}.pattern-css-editor .min-h-0{min-height:0!important}.pattern-css-editor .min-h-52{min-height:13rem!important}.pattern-css-editor .w-6{width:1.5rem!important}.pattern-css-editor .flex-shrink-0{flex-shrink:0!important}.pattern-css-editor .flex-grow{flex-grow:1!important}.pattern-css-editor .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.pattern-css-editor .cursor-grab{cursor:grab!important}.pattern-css-editor .cursor-se-resize{cursor:se-resize!important}.pattern-css-editor .flex-col{flex-direction:column!important}.pattern-css-editor .items-center{align-items:center!important}.pattern-css-editor .justify-end{justify-content:flex-end!important}.pattern-css-editor .justify-center{justify-content:center!important}.pattern-css-editor .justify-between{justify-content:space-between!important}.pattern-css-editor .gap-1{gap:.25rem!important}.pattern-css-editor .gap-2{gap:.5rem!important}.pattern-css-editor .overflow-y-auto{overflow-y:auto!important}.pattern-css-editor .overflow-x-hidden{overflow-x:hidden!important}.pattern-css-editor .border{border-width:1px!important}.pattern-css-editor .border-0{border-width:0!important}.pattern-css-editor .border-l-0{border-left-width:0!important}.pattern-css-editor .border-t-0{border-top-width:0!important}.pattern-css-editor .border-solid{border-style:solid!important}.pattern-css-editor .border-gray-300{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-gray-600{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-transparent{border-color:transparent!important}.pattern-css-editor .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white\/90{background-color:hsla(0,0%,100%,.9)!important}.pattern-css-editor .stroke-gray-700{stroke:#757575!important}.pattern-css-editor .p-0{padding:0!important}.pattern-css-editor .p-1{padding:.25rem!important}.pattern-css-editor .p-2{padding:.5rem!important}.pattern-css-editor .p-4{padding:1rem!important}.pattern-css-editor .px-4{padding-left:1rem!important;padding-right:1rem!important}.pattern-css-editor .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.pattern-css-editor .pb-4{padding-bottom:1rem!important}.pattern-css-editor .font-jetbrains-mono{font-family:pcss-jetbrains-mono,monospace!important}.pattern-css-editor .text-sm{font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .text-xs{font-size:.75rem!important;line-height:1rem!important}.pattern-css-editor .font-medium{font-weight:500!important}.pattern-css-editor .lowercase{text-transform:lowercase!important}.pattern-css-editor .text-gray-600{--tw-text-opacity:1;color:rgb(148 148 148/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-700{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-900{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}.pattern-css-editor .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.pattern-css-editor .blur{--tw-blur:blur(8px)}.pattern-css-editor .blur,.pattern-css-editor .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.pattern-css-editor .transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pattern-css-editor .duration-300{transition-duration:.3s!important}.pattern-css-editor pre,.pattern-css-editor pre *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.pattern-css-editor pre,.pattern-css-editor textarea{border-radius:0!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:left!important}.pattern-css-editor pre:focus,.pattern-css-editor textarea:focus{border-radius:0!important;outline:2px solid transparent!important;outline-offset:2px!important}.pattern-css-editor pre,.pattern-css-editor textarea{direction:ltr!important}.pattern-css-editor .code-preview code{background-color:transparent!important;direction:ltr!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:left!important;width:100%!important}.pattern-css-editor pre .line-error:after{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important;content:""!important;height:1.25rem!important;left:0!important;position:absolute!important;right:0!important;--tw-bg-opacity:0.3;font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .wp-focus:focus-within{border-color:var(
     1.pattern-css-editor{--tw-ring-inset:var(--tw-empty,    );--tw-ring-offset-width:0px;--tw-ring-offset-color:transparent;--tw-ring-color:var(--wp-admin-theme-color);--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.pattern-css-editor *,.pattern-css-editor :after,.pattern-css-editor :before{box-sizing:border-box!important}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pattern-css-editor .sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pattern-css-editor .fixed{position:fixed!important}.pattern-css-editor .absolute{position:absolute!important}.pattern-css-editor .relative{position:relative!important}.pattern-css-editor .-bottom-1{bottom:-.25rem!important}.pattern-css-editor .-right-1{right:-.25rem!important}.pattern-css-editor .bottom-px{bottom:1px!important}.pattern-css-editor .right-1{right:.25rem!important}.pattern-css-editor .z-10{z-index:10!important}.pattern-css-editor .z-50{z-index:50!important}.pattern-css-editor .z-high{z-index:99999!important}.pattern-css-editor .m-0{margin:0!important}.pattern-css-editor .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.pattern-css-editor .-mt-2{margin-top:-.5rem!important}.pattern-css-editor .mb-4{margin-bottom:1rem!important}.pattern-css-editor .mt-2{margin-top:.5rem!important}.pattern-css-editor .block{display:block!important}.pattern-css-editor .flex{display:flex!important}.pattern-css-editor .h-52{height:13rem!important}.pattern-css-editor .h-6{height:1.5rem!important}.pattern-css-editor .h-full{height:100%!important}.pattern-css-editor .min-h-0{min-height:0!important}.pattern-css-editor .min-h-52{min-height:13rem!important}.pattern-css-editor .w-6{width:1.5rem!important}.pattern-css-editor .flex-shrink-0{flex-shrink:0!important}.pattern-css-editor .flex-grow{flex-grow:1!important}.pattern-css-editor .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.pattern-css-editor .cursor-grab{cursor:grab!important}.pattern-css-editor .cursor-se-resize{cursor:se-resize!important}.pattern-css-editor .flex-col{flex-direction:column!important}.pattern-css-editor .items-center{align-items:center!important}.pattern-css-editor .justify-end{justify-content:flex-end!important}.pattern-css-editor .justify-center{justify-content:center!important}.pattern-css-editor .justify-between{justify-content:space-between!important}.pattern-css-editor .gap-1{gap:.25rem!important}.pattern-css-editor .gap-2{gap:.5rem!important}.pattern-css-editor .overflow-y-auto{overflow-y:auto!important}.pattern-css-editor .overflow-x-hidden{overflow-x:hidden!important}.pattern-css-editor .border{border-width:1px!important}.pattern-css-editor .border-0{border-width:0!important}.pattern-css-editor .border-l-0{border-left-width:0!important}.pattern-css-editor .border-t-0{border-top-width:0!important}.pattern-css-editor .border-solid{border-style:solid!important}.pattern-css-editor .border-gray-300{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-gray-600{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-transparent{border-color:transparent!important}.pattern-css-editor .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white\/90{background-color:hsla(0,0%,100%,.9)!important}.pattern-css-editor .stroke-gray-700{stroke:#757575!important}.pattern-css-editor .p-0{padding:0!important}.pattern-css-editor .p-1{padding:.25rem!important}.pattern-css-editor .p-2{padding:.5rem!important}.pattern-css-editor .p-4{padding:1rem!important}.pattern-css-editor .px-4{padding-left:1rem!important;padding-right:1rem!important}.pattern-css-editor .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.pattern-css-editor .pb-4{padding-bottom:1rem!important}.pattern-css-editor .font-jetbrains-mono{font-family:pcss-jetbrains-mono,monospace!important}.pattern-css-editor .text-sm{font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .text-xs{font-size:.75rem!important;line-height:1rem!important}.pattern-css-editor .font-medium{font-weight:500!important}.pattern-css-editor .lowercase{text-transform:lowercase!important}.pattern-css-editor .text-gray-600{--tw-text-opacity:1;color:rgb(148 148 148/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-700{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-900{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}.pattern-css-editor .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.pattern-css-editor .blur{--tw-blur:blur(8px)}.pattern-css-editor .blur,.pattern-css-editor .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.pattern-css-editor .transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pattern-css-editor .duration-300{transition-duration:.3s!important}.pattern-css-editor pre,.pattern-css-editor pre *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.pattern-css-editor pre,.pattern-css-editor textarea{border-radius:0!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:left!important}.pattern-css-editor pre:focus,.pattern-css-editor textarea:focus{border-radius:0!important;outline:2px solid transparent!important;outline-offset:2px!important}.pattern-css-editor pre,.pattern-css-editor textarea{direction:ltr!important}.pattern-css-editor .code-preview code{background-color:transparent!important;direction:ltr!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:left!important;width:100%!important}.pattern-css-editor pre .line-error:after{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important;content:""!important;height:1.25rem!important;left:0!important;position:absolute!important;right:0!important;--tw-bg-opacity:0.3;font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .wp-focus:focus-within{border-color:var(
    22        --wp-components-color-accent,var(--wp-admin-theme-color,#007cba)
    33    )!important;box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#007cba))!important;outline:2px solid transparent!important}.pattern-css-editor [data-pcss-handle]:active,.pattern-css-editor [data-pcss-resize]:active{cursor:grabbing!important}.pattern-css-editor .disable-mb-checkbox>div{margin-bottom:0!important}@font-face{font-family:pcss-jetbrains-mono;src:url(fonts/pcss-jetbrains-mono.1e66c47a.woff2) format("woff2")}.pattern-css-editor .hover\:border-gray-600:hover{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .active\:border-gray-600:active{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}
  • pattern-css/tags/1.5.5/build/index.js

    r3488380 r3490244  
    1 (()=>{var e,t,n,s,r={69:function(e,t,n){"use strict";var s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},i=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var l=o(n(609)),c="undefined"!=typeof window&&"navigator"in window&&/Win/i.test(navigator.platform),u="undefined"!=typeof window&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),p="npm__react-simple-code-editor__textarea",d="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(p,":empty {\n  -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n  /**\n    * IE doesn't support '-webkit-text-fill-color'\n    * So we use 'color: transparent' to make the text transparent on IE\n    * Unlike other browsers, it doesn't affect caret color in IE\n    */\n  .").concat(p," {\n    color: transparent !important;\n  }\n\n  .").concat(p,"::selection {\n    background-color: #accef7 !important;\n    color: transparent !important;\n  }\n}\n"),h=l.forwardRef((function(e,t){var n=e.autoFocus,r=e.disabled,a=e.form,o=e.highlight,h=e.ignoreTabKey,g=void 0!==h&&h,f=e.insertSpaces,y=void 0===f||f,_=e.maxLength,b=e.minLength,v=e.name,w=e.onBlur,k=e.onClick,S=e.onFocus,N=e.onKeyDown,x=e.onKeyUp,j=e.onValueChange,P=e.padding,C=void 0===P?0:P,L=e.placeholder,T=e.preClassName,A=e.readOnly,E=e.required,O=e.style,R=e.tabSize,I=void 0===R?2:R,B=e.textareaClassName,M=e.textareaId,D=e.value,G=i(e,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),F=l.useRef({stack:[],offset:-1}),$=l.useRef(null),W=l.useState(!0),U=W[0],V=W[1],z={paddingTop:"object"==typeof C?C.top:C,paddingRight:"object"==typeof C?C.right:C,paddingBottom:"object"==typeof C?C.bottom:C,paddingLeft:"object"==typeof C?C.left:C},q=o(D),H=function(e,t){return e.substring(0,t).split("\n")},K=l.useCallback((function(e,t){var n,r,a;void 0===t&&(t=!1);var o=F.current,i=o.stack,l=o.offset;if(i.length&&l>-1){F.current.stack=i.slice(0,l+1);var c=F.current.stack.length;if(c>100){var u=c-100;F.current.stack=i.slice(u,c),F.current.offset=Math.max(F.current.offset-u,0)}}var p=Date.now();if(t){var d=F.current.stack[F.current.offset];if(d&&p-d.timestamp<3e3){var h=/[^a-z0-9]([a-z0-9]+)$/i,m=null===(n=H(d.value,d.selectionStart).pop())||void 0===n?void 0:n.match(h),g=null===(r=H(e.value,e.selectionStart).pop())||void 0===r?void 0:r.match(h);if((null==m?void 0:m[1])&&(null===(a=null==g?void 0:g[1])||void 0===a?void 0:a.startsWith(m[1])))return void(F.current.stack[F.current.offset]=s(s({},e),{timestamp:p}))}}F.current.stack.push(s(s({},e),{timestamp:p})),F.current.offset++}),[]),J=l.useCallback((function(){var e=$.current;if(e){var t=e.value,n=e.selectionStart,s=e.selectionEnd;K({value:t,selectionStart:n,selectionEnd:s})}}),[K]),X=function(e){var t=$.current;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,null==j||j(e.value))},Q=function(e){var t=$.current,n=F.current.stack[F.current.offset];n&&t&&(F.current.stack[F.current.offset]=s(s({},n),{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),K(e),X(e)};return l.useEffect((function(){J()}),[J]),l.useImperativeHandle(t,(function(){return{get session(){return{history:F.current}},set session(e){F.current=e.history}}}),[]),l.createElement("div",s({},G,{style:s(s({},m.container),O)}),l.createElement("pre",s({className:T,"aria-hidden":"true",style:s(s(s({},m.editor),m.highlight),z)},"string"==typeof q?{dangerouslySetInnerHTML:{__html:q+"<br />"}}:{children:q})),l.createElement("textarea",{ref:function(e){return $.current=e},style:s(s(s({},m.editor),m.textarea),z),className:p+(B?" ".concat(B):""),id:M,value:D,onChange:function(e){var t=e.currentTarget,n=t.value,s=t.selectionStart,r=t.selectionEnd;K({value:n,selectionStart:s,selectionEnd:r},!0),j(n)},onKeyDown:function(e){if(!N||(N(e),!e.defaultPrevented)){"Escape"===e.key&&e.currentTarget.blur();var t=e.currentTarget,n=t.value,s=t.selectionStart,r=t.selectionEnd,a=(y?" ":"\t").repeat(I);if("Tab"===e.key&&!g&&U)if(e.preventDefault(),e.shiftKey){var o=(d=H(n,s)).length-1,i=H(n,r).length-1,l=n.split("\n").map((function(e,t){return t>=o&&t<=i&&e.startsWith(a)?e.substring(a.length):e})).join("\n");if(n!==l){var p=d[o];Q({value:l,selectionStart:(null==p?void 0:p.startsWith(a))?s-a.length:s,selectionEnd:r-(n.length-l.length)})}}else if(s!==r){var d,h=(d=H(n,s)).length-1,m=H(n,r).length-1;p=d[h],Q({value:n.split("\n").map((function(e,t){return t>=h&&t<=m?a+e:e})).join("\n"),selectionStart:p&&/\S/.test(p)?s+a.length:s,selectionEnd:r+a.length*(m-h+1)})}else{var f=s+a.length;Q({value:n.substring(0,s)+a+n.substring(r),selectionStart:f,selectionEnd:f})}else if("Backspace"===e.key){var _=s!==r;n.substring(0,s).endsWith(a)&&!_&&(e.preventDefault(),f=s-a.length,Q({value:n.substring(0,s-a.length)+n.substring(r),selectionStart:f,selectionEnd:f}))}else if("Enter"===e.key){if(s===r){var b=H(n,s).pop(),v=null==b?void 0:b.match(/^\s+/);if(null==v?void 0:v[0]){e.preventDefault();var w="\n"+v[0];f=s+w.length,Q({value:n.substring(0,s)+w+n.substring(r),selectionStart:f,selectionEnd:f})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var k=void 0;57===e.keyCode&&e.shiftKey?k=["(",")"]:219===e.keyCode?k=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?k=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(k=["`","`"]),s!==r&&k&&(e.preventDefault(),Q({value:n.substring(0,s)+k[0]+n.substring(s,r)+k[1]+n.substring(r),selectionStart:s,selectionEnd:r+2}))}else!(u?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(u?e.metaKey&&90===e.keyCode&&e.shiftKey:c?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),function(){var e=F.current,t=e.stack,n=e.offset,s=t[n+1];s&&(X(s),F.current.offset=Math.min(n+1,t.length-1))}()):77!==e.keyCode||!e.ctrlKey||u&&!e.shiftKey||(e.preventDefault(),V((function(e){return!e}))):(e.preventDefault(),function(){var e=F.current,t=e.stack,n=e.offset,s=t[n-1];s&&(X(s),F.current.offset=Math.max(n-1,0))}())}},onClick:k,onKeyUp:x,onFocus:S,onBlur:w,disabled:r,form:a,maxLength:_,minLength:b,name:v,placeholder:L,readOnly:A,required:E,autoFocus:n,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("style",{dangerouslySetInnerHTML:{__html:d}}))})),m={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};t.default=h},493:(e,t,n)=>{"use strict";var s=n(609),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=s.useState,o=s.useEffect,i=s.useLayoutEffect,l=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),s=a({inst:{value:n,getSnapshot:t}}),r=s[0].inst,u=s[1];return i((function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})}),[e,n,t]),o((function(){return c(r)&&u({inst:r}),e((function(){c(r)&&u({inst:r})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:u},888:(e,t,n)=>{"use strict";e.exports=n(493)},486:function(e){var t;t=()=>{return e={770:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;const r=s(n(418));let a=null,o=!1;class i{static _utf8ByteLength(e){let t=0;for(let n=0,s=e.length;n<s;n++){const r=e.charCodeAt(n);let a=r,o=!1;if(r>=55296&&r<=56319&&n+1<s){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=65536+(r-55296<<10)|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}constructor(e){const t=e.length,n=i._utf8ByteLength(e),s=n!==t,r=s?new Uint32Array(t+1):null;s&&(r[t]=n);const a=s?new Uint32Array(n+1):null;s&&(a[n]=t);const o=new Uint8Array(n);let l=0;for(let n=0;n<t;n++){const i=e.charCodeAt(n);let c=i,u=!1;if(i>=55296&&i<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(i-55296<<10)|t-56320,u=!0)}s&&(r[n]=l,u&&(r[n+1]=l),c<=127?a[l+0]=n:c<=2047?(a[l+0]=n,a[l+1]=n):c<=65535?(a[l+0]=n,a[l+1]=n,a[l+2]=n):(a[l+0]=n,a[l+1]=n,a[l+2]=n,a[l+3]=n)),c<=127?o[l++]=c:c<=2047?(o[l++]=192|(1984&c)>>>6,o[l++]=128|(63&c)>>>0):c<=65535?(o[l++]=224|(61440&c)>>>12,o[l++]=128|(4032&c)>>>6,o[l++]=128|(63&c)>>>0):(o[l++]=240|(1835008&c)>>>18,o[l++]=128|(258048&c)>>>12,o[l++]=128|(4032&c)>>>6,o[l++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=a}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class l{constructor(e){if(this.id=++l.LAST_ID,!a)throw new Error("Must invoke loadWASM first.");this._onigBinding=a,this.content=e;const t=new i(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!l._sharedPtrInUse?(l._sharedPtr||(l._sharedPtr=a._omalloc(1e4)),l._sharedPtrInUse=!0,a.HEAPU8.set(t.utf8Value,l._sharedPtr),this.ptr=l._sharedPtr):this.ptr=t.createString(a)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===l._sharedPtr?l._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=l,l.LAST_ID=0,l._sharedPtr=0,l._sharedPtrInUse=!1;class c{constructor(e){if(!a)throw new Error("Must invoke loadWASM first.");const t=[],n=[];for(let s=0,r=e.length;s<r;s++){const r=new i(e[s]);t[s]=r.createString(a),n[s]=r.utf8Length}const s=a._omalloc(4*e.length);a.HEAPU32.set(t,s/4);const r=a._omalloc(4*e.length);a.HEAPU32.set(n,r/4);const o=a._createOnigScanner(s,r,e.length);for(let n=0,s=e.length;n<s;n++)a._ofree(t[n]);a._ofree(r),a._ofree(s),0===o&&function(e){throw new Error(e.UTF8ToString(e._getLastOnigError()))}(a),this._onigBinding=a,this._ptr=o}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let s=o,r=0;if("number"==typeof n?(8&n&&(s=!0),r=n):"boolean"==typeof n&&(s=n),"string"==typeof e){e=new l(e);const n=this._findNextMatchSync(e,t,s,r);return e.dispose(),n}return this._findNextMatchSync(e,t,s,r)}_findNextMatchSync(e,t,n,s){const r=this._onigBinding;let a;if(a=n?r._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),s):r._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),s),0===a)return null;const o=r.HEAPU32;let i=a/4;const l=o[i++],c=o[i++];let u=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(o[i++]),s=e.convertUtf8OffsetToUtf16(o[i++]);u[t]={start:n,end:s,length:s-n}}return{index:l,captureIndices:u}}}t.OnigScanner=c;let u=!1,p=null;t.loadWASM=function(e){if(u)return p;let t,n,s,o;if(u=!0,function(e){return"function"==typeof e.instantiator}(e))t=e.instantiator,n=e.print;else{let s;!function(e){return void 0!==e.data}(e)?s=e:(s=e.data,n=e.print),t=function(e){return"undefined"!=typeof Response&&e instanceof Response}(s)?"function"==typeof WebAssembly.instantiateStreaming?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(s):function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(s):function(e){return t=>WebAssembly.instantiate(e,t)}(s)}return p=new Promise(((e,t)=>{s=e,o=t})),function(e,t,n,s){(0,r.default)({print:t,instantiateWasm:(t,n)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),s),{}}}).then((e=>{a=e,n()}))}(t,n,s,o),p},t.createOnigString=function(e){return new l(e)},t.createOnigScanner=function(e){return new c(e)},t.setDefaultDebugCall=function(e){o=e}},418:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n,s=void 0!==(e=e||{})?e:{};s.ready=new Promise((function(e,s){t=e,n=s}));var r,a=Object.assign({},s),o=[];r=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),function(e){e||C(void 0)}("object"==typeof t),t)},"undefined"!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var i,l,c=s.print||console.log.bind(console),u=s.printErr||console.warn.bind(console);Object.assign(s,a),a=null,s.arguments&&(o=s.arguments),s.thisProgram&&s.thisProgram,s.quit&&s.quit,s.wasmBinary&&(i=s.wasmBinary),s.noExitRuntime,"object"!=typeof WebAssembly&&C("no native wasm support detected");var p,d,h,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,n){for(var s=t+n,r=t;e[r]&&!(r>=s);)++r;if(r-t>16&&e.buffer&&g)return g.decode(e.subarray(t,r));for(var a="";t<r;){var o=e[t++];if(128&o){var i=63&e[t++];if(192!=(224&o)){var l=63&e[t++];if((o=224==(240&o)?(15&o)<<12|i<<6|l:(7&o)<<18|i<<12|l<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var c=o-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|i)}else a+=String.fromCharCode(o)}return a}function y(e){p=e,s.HEAP8=new Int8Array(e),s.HEAP16=new Int16Array(e),s.HEAP32=new Int32Array(e),s.HEAPU8=d=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAPU32=h=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e)}s.INITIAL_MEMORY;var _=[],b=[],v=[];function w(e){_.unshift(e)}function k(e){v.unshift(e)}var S,N,x=0,j=null,P=null;function C(e){s.onAbort&&s.onAbort(e),u(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function L(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){try{if(e==S&&i)return new Uint8Array(i);if(r)return r(e);throw"both async and sync fetching of the wasm failed"}catch(e){C(e)}}function A(e){for(;e.length>0;)e.shift()(s)}function E(e){try{return l.grow(e-p.byteLength+65535>>>16),y(l.buffer),1}catch(e){}}L(S="onig.wasm")||(S=function(e){return s.locateFile?s.locateFile(e,""):""+e}(S)),N="undefined"!=typeof dateNow?dateNow:()=>performance.now();var O=[null,[],[]];function R(e,t){var n=O[e];0===t||10===t?((1===e?c:u)(f(n,0)),n.length=0):n.push(t)}var I,B={emscripten_get_now:N,emscripten_memcpy_big:function(e,t,n){d.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n=d.length,s=2147483648;if((e>>>=0)>s)return!1;for(var r=1;r<=4;r*=2){var a=n*(1+.2/r);if(a=Math.min(a,e+100663296),E(Math.min(s,(t=Math.max(e,a))+(65536-t%65536)%65536)))return!0}return!1},fd_write:function(e,t,n,s){for(var r=0,a=0;a<n;a++){var o=h[t>>2],i=h[t+4>>2];t+=8;for(var l=0;l<i;l++)R(e,d[o+l]);r+=i}return h[s>>2]=r,0}};function M(e){function n(){I||(I=!0,s.calledRun=!0,m||(A(b),t(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),function(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)k(s.postRun.shift());A(v)}()))}e=e||o,x>0||(function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)w(s.preRun.shift());A(_)}(),x>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),n()}),1)):n()))}if(function(){var e={env:B,wasi_snapshot_preview1:B};function t(e,t){var n=e.exports;s.asm=n,y((l=s.asm.memory).buffer),s.asm.__indirect_function_table,function(e){b.unshift(e)}(s.asm.__wasm_call_ctors),function(){if(x--,s.monitorRunDependencies&&s.monitorRunDependencies(x),0==x&&(null!==j&&(clearInterval(j),j=null),P)){var e=P;P=null,e()}}()}function r(e){t(e.instance)}function a(t){return Promise.resolve().then((function(){return T(S)})).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){u("failed to asynchronously prepare wasm: "+e),C(e)}))}if(x++,s.monitorRunDependencies&&s.monitorRunDependencies(x),s.instantiateWasm)try{return s.instantiateWasm(e,t)}catch(e){u("Module.instantiateWasm callback failed with error: "+e),n(e)}(i||"function"!=typeof WebAssembly.instantiateStreaming||L(S)||"function"!=typeof fetch?a(r):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),a(r)}))}))).catch(n)}(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.__wasm_call_ctors).apply(null,arguments)},s.___errno_location=function(){return(s.___errno_location=s.asm.__errno_location).apply(null,arguments)},s._omalloc=function(){return(s._omalloc=s.asm.omalloc).apply(null,arguments)},s._ofree=function(){return(s._ofree=s.asm.ofree).apply(null,arguments)},s._getLastOnigError=function(){return(s._getLastOnigError=s.asm.getLastOnigError).apply(null,arguments)},s._createOnigScanner=function(){return(s._createOnigScanner=s.asm.createOnigScanner).apply(null,arguments)},s._freeOnigScanner=function(){return(s._freeOnigScanner=s.asm.freeOnigScanner).apply(null,arguments)},s._findNextOnigScannerMatch=function(){return(s._findNextOnigScannerMatch=s.asm.findNextOnigScannerMatch).apply(null,arguments)},s._findNextOnigScannerMatchDbg=function(){return(s._findNextOnigScannerMatchDbg=s.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},s.stackSave=function(){return(s.stackSave=s.asm.stackSave).apply(null,arguments)},s.stackRestore=function(){return(s.stackRestore=s.asm.stackRestore).apply(null,arguments)},s.stackAlloc=function(){return(s.stackAlloc=s.asm.stackAlloc).apply(null,arguments)},s.dynCall_jiji=function(){return(s.dynCall_jiji=s.asm.dynCall_jiji).apply(null,arguments)},s.UTF8ToString=function(e,t){return e?f(d,e,t):""},P=function e(){I||M(),I||(P=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return M(),e.ready});e.exports=t}},t={},function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s].call(a.exports,a,a.exports,n),a.exports}(770);var e,t},e.exports=t()},217:function(e){e.exports=(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},36:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=void 0,(n=t.EncodedTokenAttributes||(t.EncodedTokenAttributes={})).toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},n.print=function(e){const t=n.getLanguageId(e),s=n.getTokenType(e),r=n.getFontStyle(e),a=n.getForeground(e),o=n.getBackground(e);console.log({languageId:t,tokenType:s,fontStyle:r,foreground:a,background:o})},n.getLanguageId=function(e){return(255&e)>>>0},n.getTokenType=function(e){return(768&e)>>>8},n.containsBalancedBrackets=function(e){return!!(1024&e)},n.getFontStyle=function(e){return(30720&e)>>>11},n.getForeground=function(e){return(16744448&e)>>>15},n.getBackground=function(e){return(4278190080&e)>>>24},n.set=function(e,t,s,r,a,o,i){let l=n.getLanguageId(e),c=n.getTokenType(e),u=n.containsBalancedBrackets(e)?1:0,p=n.getFontStyle(e),d=n.getForeground(e),h=n.getBackground(e);return 0!==t&&(l=t),8!==s&&(c=s),null!==r&&(u=r?1:0),-1!==a&&(p=a),0!==o&&(d=o),0!==i&&(h=i),(l|c<<8|u<<10|p<<11|d<<15|h<<24)>>>0},t.toOptionalTokenType=function(e){return e}},996:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;const s=n(878);class r{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=r;class a{constructor(e,t){this._getBasicScopeAttributes=new s.CachedFn((e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new r(t,n)})),this._defaultAttributes=new r(e,8),this._embeddedLanguagesMatcher=new o(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?a._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(a.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}t.BasicScopeAttributesProvider=a,a._NULL_SCOPE_METADATA=new r(0,0),a.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class o{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>s.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},947:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LineTokens=t.BalancedBracketSelectors=t.StateStack=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;const s=n(350),r=n(36),a=n(736),o=n(44),i=n(792),l=n(583),c=n(878),u=n(996),p=n(47);function d(e,t,n,s,r){const o=a.createMatchers(t,h),l=i.RuleFactory.getCompiledRuleId(n,s,r.repository);for(const n of o)e.push({debugSelector:t,matcher:n.matcher,ruleId:l,grammar:r,priority:n.priority})}function h(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let s=n;s<t.length;s++)if(m(t[s],e))return n=s+1,!0;return!1}))}function m(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}t.createGrammar=function(e,t,n,s,r,a,o,i){return new g(e,t,n,s,r,a,o,i)};class g{constructor(e,t,n,s,r,o,i,l){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=f(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const e of Object.keys(r)){const t=a.createMatchers(e,h);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:r[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){const s=n.injections;if(s)for(let t in s)d(e,t,s[t],this,n);const r=this._grammarRepository.injections(t);r&&r.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&d(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),s.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(`  - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,n=e(i.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[i.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=f(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){let a;if(-1===this._rootId&&(this._rootId=i.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==_.NULL)a=!1,t.reset();else{a=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),s=r.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let i;i=o?y.createRootAndLookUpScopeName(o,s,this):y.createRoot("unknown",s),t=new _(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const l=this.createOnigString(e),c=l.content.length,u=new b(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=p._tokenizeString(this,l,a,0,t,u,!0,s);return o.disposeOnigString(l),{lineLength:c,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}}function f(e,t){return(e=c.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=g;class y{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static createRoot(e,t){return new y(null,new l.ScopeStack(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const s=n.getMetadataForScope(e),r=new l.ScopeStack(null,e),a=n.themeProvider.themeMatch(r),o=y.mergeAttributes(t,s,a);return new y(null,r,o)}get scopeName(){return this.scopePath.scopeName}equals(e){return y._equals(this,e)}static _equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let s=-1,a=0,o=0;return null!==n&&(s=n.fontStyle,a=n.foregroundId,o=n.backgroundId),r.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,s,a,o)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return y._pushAttributed(this,e,t);const n=e.split(/ /g);let s=this;for(const e of n)s=y._pushAttributed(s,e,t);return s}static _pushAttributed(e,t,n){const s=n.getMetadataForScope(t),r=e.scopePath.push(t),a=n.themeProvider.themeMatch(r),o=y.mergeAttributes(e.tokenAttributes,s,a);return new y(e,r,o)}getScopeNames(){return this.scopePath.getSegments()}}t.AttributedScopeStack=y;class _{constructor(e,t,n,s,r,a,o,i){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=i,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=s}equals(e){return null!==e&&_._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){_._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,s,r,a,o){return new _(this,e,t,n,s,r,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new _(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}}t.StateStack=_,_.NULL=new _(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):a.createMatchers(e,h).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>a.createMatchers(e,h).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class b{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,s.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e.tokenAttributes,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e.getScopeNames();for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=r.EncodedTokenAttributes.set(n,0,r.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(t))}if(a&&(n=r.EncodedTokenAttributes.set(n,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(s.DebugFlags.InDebugMode){const n=e.getScopeNames();console.log("  token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log("      * "+n[e])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}const n=e.getScopeNames();if(s.DebugFlags.InDebugMode){console.log("  token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log("      * "+n[e])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=b},965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;const s=n(878);class r{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=r;class a{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=a;class o{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function i(e,t,n,s){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof r?c({baseGrammar:o,selfGrammar:a},s):l(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},s);const i=n.injections(e.scopeName);if(i)for(const e of i)s.add(new r(e))}function l(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function c(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(const o of e){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);const e=o.repository?s.mergeObjects({},t.repository,o.repository):t.repository;Array.isArray(o.patterns)&&u(o.patterns,{...t,repository:e},n);const i=o.include;if(!i)continue;const p=f(i);switch(p.kind){case 0:c({...t,selfGrammar:t.baseGrammar},n);break;case 1:c(t,n);break;case 2:l(p.ruleName,{...t,repository:e},n);break;case 3:case 4:const s=p.scopeName===t.selfGrammar.scopeName?t.selfGrammar:p.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===p.kind?l(p.ruleName,r,n):c(r,n)}else 4===p.kind?n.add(new a(p.scopeName,p.ruleName)):n.add(new r(p.scopeName))}}}t.ExternalReferenceCollector=o,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new r(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new o;for(const n of e)i(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof r){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class p{constructor(){this.kind=0}}t.BaseReference=p;class d{constructor(){this.kind=1}}t.SelfReference=d;class h{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=h;class m{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=m;class g{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function f(e){if("$base"===e)return new p;if("$self"===e)return new d;const t=e.indexOf("#");if(-1===t)return new m(e);if(0===t)return new h(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new g(n,s)}}t.TopLevelRepositoryReference=g,t.parseInclude=f},391:function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(947),t)},47:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;const s=n(350),r=n(44),a=n(792),o=n(878);class i{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function l(e,t,n,r,l,p,h,m){const g=t.content.length;let f=!1,y=-1;if(h){const o=function(e,t,n,r,o,i){let l=o.beginRuleCapturedEOL?0:-1;const c=[];for(let t=o;t;t=t.pop()){const n=t.getRule(e);n instanceof a.BeginWhileRule&&c.push({rule:n,stack:t})}for(let p=c.pop();p;p=c.pop()){const{ruleScanner:c,findOptions:h}=u(p.rule,e,p.stack.endRule,n,r===l),m=c.findNextMatchSync(t,r,h);if(s.DebugFlags.InDebugMode&&(console.log("  scanning for while rule"),console.log(c.toString())),!m){s.DebugFlags.InDebugMode&&console.log("  popping "+p.rule.debugName+" - "+p.rule.debugWhileRegExp),o=p.stack.pop();break}if(m.ruleId!==a.whileRuleId){o=p.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(p.stack,m.captureIndices[0].start),d(e,t,n,p.stack,i,p.rule.whileCaptures,m.captureIndices),i.produce(p.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}return{stack:o,linePos:r,anchorPosition:l,isFirstLine:n}}(e,t,n,r,l,p);l=o.stack,r=o.linePos,n=o.isFirstLine,y=o.anchorPosition}const _=Date.now();for(;!f;){if(0!==m&&Date.now()-_>m)return new i(l,!0);b()}return new i(l,!1);function b(){s.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${r}: |${t.content.substr(r).replace(/\n$/,"\\n")}|`));const i=function(e,t,n,r,a,i){const l=function(e,t,n,r,a,i){const l=a.getRule(e),{ruleScanner:u,findOptions:p}=c(l,e,a.endRule,n,r===i);let d=0;s.DebugFlags.InDebugMode&&(d=o.performanceNow());const h=u.findNextMatchSync(t,r,p);if(s.DebugFlags.InDebugMode){const e=o.performanceNow()-d;e>5&&console.warn(`Rule ${l.debugName} (${l.id}) matching took ${e} against '${t}'`),console.log(`  scanning for (linePos: ${r}, anchorPosition: ${i})`),console.log(u.toString()),h&&console.log(`matched rule id: ${h.ruleId} from ${h.captureIndices[0].start} to ${h.captureIndices[0].end}`)}return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}(e,t,n,r,a,i),u=e.getInjections();if(0===u.length)return l;const p=function(e,t,n,r,a,o,i){let l,u=Number.MAX_VALUE,p=null,d=0;const h=o.contentNameScopesList.getScopeNames();for(let o=0,m=e.length;o<m;o++){const m=e[o];if(!m.matcher(h))continue;const g=t.getRule(m.ruleId),{ruleScanner:f,findOptions:y}=c(g,t,null,r,a===i),_=f.findNextMatchSync(n,a,y);if(!_)continue;s.DebugFlags.InDebugMode&&(console.log(`  matched injection: ${m.debugSelector}`),console.log(f.toString()));const b=_.captureIndices[0].start;if(!(b>=u)&&(u=b,p=_.captureIndices,l=_.ruleId,d=m.priority,u===a))break}return p?{priorityMatch:-1===d,captureIndices:p,matchedRuleId:l}:null}(u,e,t,n,r,a,i);if(!p)return l;if(!l)return p;const d=l.captureIndices[0].start,h=p.captureIndices[0].start;return h<d||p.priorityMatch&&h===d?p:l}(e,t,n,r,l,y);if(!i)return s.DebugFlags.InDebugMode&&console.log("  no more matches."),p.produce(l,g),void(f=!0);const u=i.captureIndices,h=i.matchedRuleId,m=!!(u&&u.length>0)&&u[0].end>r;if(h===a.endRuleId){const a=l.getRule(e);s.DebugFlags.InDebugMode&&console.log("  popping "+a.debugName+" - "+a.debugEndRegExp),p.produce(l,u[0].start),l=l.withContentNameScopesList(l.nameScopesList),d(e,t,n,l,p,a.endCaptures,u),p.produce(l,u[0].end);const o=l;if(l=l.parent,y=o.getAnchorPos(),!m&&o.getEnterPos()===r)return s.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),l=o,p.produce(l,g),void(f=!0)}else{const o=e.getRule(h);p.produce(l,u[0].start);const i=l,c=o.getName(t.content,u),_=l.contentNameScopesList.pushAttributed(c,e);if(l=l.push(h,r,y,u[0].end===g,null,_,_),o instanceof a.BeginEndRule){const r=o;s.DebugFlags.InDebugMode&&console.log("  pushing "+r.debugName+" - "+r.debugBeginRegExp),d(e,t,n,l,p,r.beginCaptures,u),p.produce(l,u[0].end),y=u[0].end;const a=r.getContentName(t.content,u),c=_.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),r.endHasBackReferences&&(l=l.withEndRule(r.getEndWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return s.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),p.produce(l,g),void(f=!0)}else if(o instanceof a.BeginWhileRule){const r=o;s.DebugFlags.InDebugMode&&console.log("  pushing "+r.debugName),d(e,t,n,l,p,r.beginCaptures,u),p.produce(l,u[0].end),y=u[0].end;const a=r.getContentName(t.content,u),c=_.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),r.whileHasBackReferences&&(l=l.withEndRule(r.getWhileWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return s.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),p.produce(l,g),void(f=!0)}else{const r=o;if(s.DebugFlags.InDebugMode&&console.log("  matched "+r.debugName+" - "+r.debugMatchRegExp),d(e,t,n,l,p,r.captures,u),p.produce(l,u[0].end),l=l.pop(),!m)return s.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),l=l.safePop(),p.produce(l,g),void(f=!0)}}u[0].end>r&&(r=u[0].end,n=!1)}}function c(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:p(r,a)}:{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function u(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:p(r,a)}:{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function p(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function d(e,t,n,s,a,o,i){if(0===o.length)return;const c=t.content,u=Math.min(o.length,i.length),p=[],d=i[0].end;for(let t=0;t<u;t++){const u=o[t];if(null===u)continue;const m=i[t];if(0===m.length)continue;if(m.start>d)break;for(;p.length>0&&p[p.length-1].endPos<=m.start;)a.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?a.produceFromScopes(p[p.length-1].scopes,m.start):a.produce(s,m.start),u.retokenizeCapturedWithRuleId){const t=u.getName(c,i),o=s.contentNameScopesList.pushAttributed(t,e),p=u.getContentName(c,i),d=o.pushAttributed(p,e),h=s.push(u.retokenizeCapturedWithRuleId,m.start,-1,!1,null,o,d),g=e.createOnigString(c.substring(0,m.end));l(e,g,n&&0===m.start,m.start,h,a,!1,0),r.disposeOnigString(g);continue}const g=u.getName(c,i);if(null!==g){const t=(p.length>0?p[p.length-1].scopes:s.contentNameScopesList).pushAttributed(g,e);p.push(new h(t,m.end))}}for(;p.length>0;)a.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}t._tokenizeString=l;class h{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=h},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,o){let i=new s(e),l=new r,c=0,u=null,p=[],d=[];function h(){p.push(c),d.push(u)}function m(){c=p.pop(),u=d.pop()}function g(e){n(i,e)}for(;a(i,l);){if(0===c){if(null!==u&&g("too many constructs in root"),3===l.type){u={},o&&(u.$vscodeTextmateLocation=l.toLocation(t)),h(),c=1;continue}if(2===l.type){u=[],h(),c=4;continue}g("unexpected token in root")}if(2===c){if(5===l.type){m();continue}if(7===l.type){c=3;continue}g("expected , or }")}if(1===c||3===c){if(1===c&&5===l.type){m();continue}if(1===l.type){let e=l.value;if(a(i,l)&&6===l.type||g("expected colon"),a(i,l)||g("expected value"),c=2,1===l.type){u[e]=l.value;continue}if(8===l.type){u[e]=null;continue}if(9===l.type){u[e]=!0;continue}if(10===l.type){u[e]=!1;continue}if(11===l.type){u[e]=parseFloat(l.value);continue}if(2===l.type){let t=[];u[e]=t,h(),c=4,u=t;continue}if(3===l.type){let n={};o&&(n.$vscodeTextmateLocation=l.toLocation(t)),u[e]=n,h(),c=1,u=n;continue}}g("unexpected token in dict")}if(5===c){if(4===l.type){m();continue}if(7===l.type){c=6;continue}g("expected , or ]")}if(4===c||6===c){if(4===c&&4===l.type){m();continue}if(c=5,1===l.type){u.push(l.value);continue}if(8===l.type){u.push(null);continue}if(9===l.type){u.push(!0);continue}if(10===l.type){u.push(!1);continue}if(11===l.type){u.push(parseFloat(l.value));continue}if(2===l.type){let e=[];u.push(e),h(),c=4,u=e;continue}if(3===l.type){let e={};o&&(e.$vscodeTextmateLocation=l.toLocation(t)),u.push(e),h(),c=1,u=e;continue}g("unexpected token in array")}g("unknown state")}return 0!==d.length&&g("unclosed constructs"),u};class s{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class r{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function a(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let s,r=e.source,a=e.pos,o=e.len,i=e.line,l=e.char;for(;;){if(a>=o)return!1;if(s=r.charCodeAt(a),32!==s&&9!==s&&13!==s){if(10!==s)break;a++,i++,l=0}else a++,l++}if(t.offset=a,t.line=i,t.char=l,34===s){for(t.type=1,a++,l++;;){if(a>=o)return!1;if(s=r.charCodeAt(a),a++,l++,92!==s){if(34===s)break}else a++,l++}t.value=r.substring(t.offset+1,a-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,s)=>{switch(s){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===s)t.type=2,a++,l++;else if(123===s)t.type=3,a++,l++;else if(93===s)t.type=4,a++,l++;else if(125===s)t.type=5,a++,l++;else if(58===s)t.type=6,a++,l++;else if(44===s)t.type=7,a++,l++;else if(110===s){if(t.type=8,a++,l++,s=r.charCodeAt(a),117!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;a++,l++}else if(116===s){if(t.type=9,a++,l++,s=r.charCodeAt(a),114!==s)return!1;if(a++,l++,s=r.charCodeAt(a),117!==s)return!1;if(a++,l++,s=r.charCodeAt(a),101!==s)return!1;a++,l++}else if(102===s){if(t.type=10,a++,l++,s=r.charCodeAt(a),97!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;if(a++,l++,s=r.charCodeAt(a),115!==s)return!1;if(a++,l++,s=r.charCodeAt(a),101!==s)return!1;a++,l++}else for(t.type=11;;){if(a>=o)return!1;if(s=r.charCodeAt(a),!(46===s||s>=48&&s<=57||101===s||69===s||45===s||43===s))break;a++,l++}return t.len=a-t.offset,null===t.value&&(t.value=r.substr(t.offset,t.len)),e.pos=a,e.line=i,e.char=l,!0}},787:function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;const a=n(391),o=n(50),i=n(652),l=n(583),c=n(965);r(n(44),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new i.SyncRegistry(l.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(l.Theme.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new a.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,s,r){const a=new c.ScopeDependencyProcessor(this._syncRegistry,e);for(;a.Q.length>0;)await Promise.all(a.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),a.processQueue();return this._grammarForScopeName(e,t,n,s,r)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,s=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,s)}_grammarForScopeName(e,t=0,n=null,s=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,s,r)}},t.INITIAL=a.StateStack.NULL,t.parseRawGrammar=o.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){const s=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}(e);let a=r.next();for(;null!==a;){let e=0;if(2===a.length&&":"===a.charAt(1)){switch(a.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let t=i();if(s.push({matcher:t,priority:e}),","!==a)break;a=r.next()}return s;function o(){if("-"===a){a=r.next();const e=o();return t=>!!e&&!e(t)}if("("===a){a=r.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===a||","===a);){do{a=r.next()}while("|"===a||","===a);t=i()}return t=>e.some((e=>e(t)))}();return")"===a&&(a=r.next()),e}if(n(a)){const e=[];do{e.push(a),a=r.next()}while(n(a));return n=>t(e,n)}return null}function i(){const e=[];let t=o();for(;t;)e.push(t),t=o();return t=>e.every((e=>e(t)))}}},44:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){"function"==typeof e.dispose&&e.dispose()}},50:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;const s=n(69),r=n(350),a=n(974);t.parseRawGrammar=function(e,t=null){return null!==t&&/\.json$/.test(t)?(n=e,o=t,r.DebugFlags.InDebugMode?a.parseJSON(n,o,!0):JSON.parse(n)):function(e,t){return r.DebugFlags.InDebugMode?s.parseWithLocation(e,t,"$vscodeTextmateLocation"):s.parsePLIST(e)}(e,t);var n,o}},69:(e,t)=>{function n(e,t,n){const s=e.length;let r=0,a=1,o=0;function i(t){if(null===n)r+=t;else for(;t>0;)10===e.charCodeAt(r)?(r++,a++,o=0):(r++,o++),t--}function l(e){null===n?r=e:i(e-r)}function c(){for(;r<s;){let t=e.charCodeAt(r);if(32!==t&&9!==t&&13!==t&&10!==t)break;i(1)}}function u(t){return e.substr(r,t.length)===t&&(i(t.length),!0)}function p(t){let n=e.indexOf(t,r);l(-1!==n?n+t.length:s)}function d(t){let n=e.indexOf(t,r);if(-1!==n){let s=e.substring(r,n);return l(n+t.length),s}{let t=e.substr(r);return l(s),t}}s>0&&65279===e.charCodeAt(0)&&(r=1);let h=0,m=null,g=[],f=[],y=null;function _(e,t){g.push(h),f.push(m),h=e,m=t}function b(){if(0===g.length)return v("illegal state stack");h=g.pop(),m=f.pop()}function v(t){throw new Error("Near offset "+r+": "+t+" ~~~"+e.substr(r,50)+"~~~")}const w=function(){if(null===y)return v("missing <key>");let e={};null!==n&&(e[n]={filename:t,line:a,char:o}),m[y]=e,y=null,_(1,e)},k=function(){if(null===y)return v("missing <key>");let e=[];m[y]=e,y=null,_(2,e)},S=function(){let e={};null!==n&&(e[n]={filename:t,line:a,char:o}),m.push(e),_(1,e)},N=function(){let e=[];m.push(e),_(2,e)};function x(){if(1!==h)return v("unexpected </dict>");b()}function j(){return 1===h||2!==h?v("unexpected </array>"):void b()}function P(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function C(e){if(isNaN(e))return v("cannot parse float");if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function L(e){if(isNaN(e))return v("cannot parse integer");if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function T(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function A(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function E(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function O(){let e=d(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function R(e){if(e.isClosed)return"";let t=d("</");return p(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return e}))}for(;r<s&&(c(),!(r>=s));){const l=e.charCodeAt(r);if(i(1),60!==l)return v("expected <");if(r>=s)return v("unexpected end of input");const d=e.charCodeAt(r);if(63===d){i(1),p("?>");continue}if(33===d){if(i(1),u("--")){p("--\x3e");continue}p(">");continue}if(47===d){if(i(1),c(),u("plist")){p(">");continue}if(u("dict")){p(">"),x();continue}if(u("array")){p(">"),j();continue}return v("unexpected closed tag")}let g=O();switch(g.name){case"dict":1===h?w():2===h?S():(m={},null!==n&&(m[n]={filename:t,line:a,char:o}),_(1,m)),g.isClosed&&x();continue;case"array":1===h?k():2===h?N():(m=[],_(2,m)),g.isClosed&&j();continue;case"key":I=R(g),1!==h?v("unexpected <key>"):null!==y?v("too many <key>"):y=I;continue;case"string":P(R(g));continue;case"real":C(parseFloat(R(g)));continue;case"integer":L(parseInt(R(g),10));continue;case"date":T(new Date(R(g)));continue;case"data":A(R(g));continue;case"true":R(g),E(!0);continue;case"false":R(g),E(!1);continue}if(!/^plist/.test(g.name))return v("unexpected opened tag "+g.name)}var I;return m}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,s){return n(e,t,s)},t.parsePLIST=function(e){return n(e,null,null)}},652:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;const s=n(391);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,s.createGrammar(e,o,t,n,r,a,this,await this._onigLibPromise))}return this._grammars.get(e)}}},792:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;const s=n(878),r=n(965),a=/\\(\d+)/,o=/\\(\d+)/g;Symbol("RuleId"),t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class i{constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=s.RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=s.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${s.basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?s.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?s.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=i;class l extends i{constructor(e,t,n,s,r){super(e,t,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,s){throw new Error("Not supported!")}}t.CaptureRule=l;class c extends i{constructor(e,t,n,s,r){super(e,t,n,null),this._match=new m(s,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=c;class u extends i{constructor(e,t,n,s,r){super(e,t,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class p extends i{constructor(e,t,n,s,r,a,o,i,l,c){super(e,t,n,s),this._begin=new m(r,this.id),this.beginCaptures=a,this._end=new m(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}t.BeginEndRule=p;class d extends i{constructor(e,n,s,r,a,o,i,l,c){super(e,n,s,r),this._begin=new m(a,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new m(i,t.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new g,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=d;class h{static createCaptureRule(e,t,n,s,r){return e.registerRule((e=>new l(t,e,n,s,r)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((r=>{if(e.id=r,e.match)return new c(e.$vscodeTextmateLocation,e.id,e.name,e.match,h._compileCaptures(e.captures,t,n));if(void 0===e.begin){e.repository&&(n=s.mergeObjects({},n,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,h._compilePatterns(r,t,n))}return e.while?new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,h._compileCaptures(e.whileCaptures||e.captures,t,n),h._compilePatterns(e.patterns,t,n)):new p(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,h._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,h._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let s=[];if(e){let r=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>r&&(r=e)}for(let e=0;e<=r;e++)s[e]=null;for(const r in e){if("$vscodeTextmateLocation"===r)continue;const a=parseInt(r,10);let o=0;e[r].patterns&&(o=h.getCompiledRuleId(e[r],t,n)),s[a]=h.createCaptureRule(t,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,o)}}return s}static _compilePatterns(e,t,n){let s=[];if(e)for(let a=0,o=e.length;a<o;a++){const o=e[a];let i=-1;if(o.include){const e=r.parseInclude(o.include);switch(e.kind){case 0:case 1:i=h.getCompiledRuleId(n[o.include],t,n);break;case 2:let s=n[e.ruleName];s&&(i=h.getCompiledRuleId(s,t,n));break;case 3:case 4:const r=e.scopeName,a=4===e.kind?e.ruleName:null,l=t.getExternalGrammar(r,n);if(l)if(a){let e=l.repository[a];e&&(i=h.getCompiledRuleId(e,t,l.repository))}else i=h.getCompiledRuleId(l.repository.$self,t,l.repository)}}else i=h.getCompiledRuleId(o,t,n);if(-1!==i){const e=t.getRule(i);let n=!1;if((e instanceof u||e instanceof p||e instanceof d)&&e.hasMissingPatterns&&0===e.patterns.length&&(n=!0),n)continue;s.push(i)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}}t.RuleFactory=h;class m{constructor(e,t){if(e){const t=e.length;let n=0,s=[],r=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(s.push(e.substring(n,a)),s.push("$(?!\\n)(?<!\\n)"),n=a+2):"A"!==t&&"G"!==t||(r=!0),a++}this.hasAnchor=r,0===n?this.source=e:(s.push(e.substring(n,t)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=a.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return o.lastIndex=0,this.source.replace(o,((e,t)=>s.escapeRegExpCharacters(n[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,n,s,r=[],a=[],o=[],i=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,a[e]=n,o[e]=n,i[e]=n,"\\"===n&&e+1<t&&(s=this.source.charAt(e+1),"A"===s?(r[e+1]="￿",a[e+1]="￿",o[e+1]="A",i[e+1]="A"):"G"===s?(r[e+1]="￿",a[e+1]="G",o[e+1]="￿",i[e+1]="G"):(r[e+1]=s,a[e+1]=s,o[e+1]=s,i[e+1]=s),e++);return{A0_G0:r.join(""),A0_G1:a.join(""),A1_G0:o.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=m;class g{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map((e=>e.source));this._cached=new f(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map((e=>e.resolveAnchors(t,n)));return new f(e,s,this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=g;class f{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push("   - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}}t.CompiledRule=f},583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;const s=n(878);class r{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new s.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(l(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=s.strcmp(e.scope,t.scope);return 0!==n?n:(n=s.strArrCmp(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)}));let n=0,a="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(a=t.foreground),null!==t.background&&(o=t.background)}let l=new u(t),c=new i(n,l.getId(a),l.getId(o)),h=new d(new p(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];h.insert(0,n.scope,n.parentScopes,n.fontStyle,l.getId(n.foreground),l.getId(n.background))}return new r(l,c,h)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(null===t)return!0;let n=0,s=t[n];for(;e;){if(o(e.scopeName,s)){if(n++,n===t.length)return!0;s=t[n]}e=e.parent}return!1}(e.parent,t.parentScopes)));return n?new i(n.fontStyle,n.foreground,n.background):null}}t.Theme=r;class a{constructor(e,t){this.parent=e,this.scopeName=t}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new a(t,e[n]);return t}push(e){return new a(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}}function o(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}t.ScopeStack=a;class i{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}}function l(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,a=t.length;e<a;e++){let a,o=t[e];if(!o.settings)continue;if("string"==typeof o.scope){let e=o.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),a=e.split(",")}else a=Array.isArray(o.scope)?o.scope:[""];let i=-1;if("string"==typeof o.settings.fontStyle){i=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}let l=null;"string"==typeof o.settings.foreground&&s.isValidHexColor(o.settings.foreground)&&(l=o.settings.foreground);let u=null;"string"==typeof o.settings.background&&s.isValidHexColor(o.settings.background)&&(u=o.settings.background);for(let t=0,s=a.length;t<s;t++){let s=a[t].trim().split(" "),o=s[s.length-1],p=null;s.length>1&&(p=s.slice(0,s.length-1),p.reverse()),n[r++]=new c(o,p,e,i,l,u)}}return n}t.StyleAttributes=i,t.parseTheme=l;class c{constructor(e,t,n,s,r,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=a}}t.ParsedThemeRule=c,t.fontStyleToString=function(e){if(-1===e)return"not set";let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),""===t&&(t="none"),t.trim()};class u{constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}}t.ColorMap=u;class p{constructor(e,t,n,s,r){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=s,this.background=r}clone(){return new p(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==s&&(this.background=s)}}t.ThemeTrieElementRule=p;class d{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const n=e.parentScopes,s=t.parentScopes;let r=null===n?0:n.length,a=null===s?0:s.length;if(r===a)for(let e=0;e<r;e++){const t=n[e].length,r=s[e].length;if(t!==r)return r-t}return a-r}return t.scopeDepth-e.scopeDepth}match(e){if(""===e)return d._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));let t,n,s=e.indexOf(".");return-1===s?(t=e,n=""):(t=e.substring(0,s),n=e.substring(s+1)),this._children.hasOwnProperty(t)?this._children[t].match(n):d._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))}insert(e,t,n,s,r,a){if(""===t)return void this._doInsertHere(e,n,s,r,a);let o,i,l,c=t.indexOf(".");-1===c?(o=t,i=""):(o=t.substring(0,c),i=t.substring(c+1)),this._children.hasOwnProperty(o)?l=this._children[o]:(l=new d(this._mainRule.clone(),p.cloneArr(this._rulesWithParentScopes)),this._children[o]=l),l.insert(e+1,i,n,s,r,a)}_doInsertHere(e,t,n,r,a){if(null!==t){for(let o=0,i=this._rulesWithParentScopes.length;o<i;o++){let i=this._rulesWithParentScopes[o];if(0===s.strArrCmp(i.parentScopes,t))return void i.acceptOverwrite(e,n,r,a)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===a&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new p(e,t,n,r,a))}else this._mainRule.acceptOverwrite(e,n,r,a)}}t.ThemeTrieElement=d},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s<r;s++)t[s]=n(e[s]);return t}(e):"object"==typeof e?function(e){let t={};for(let s in e)t[s]=n(e[s]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let s=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function r(e,t){return e<t?-1:e>t?1:0}t.RegexSource=class{static hasCaptures(e){return null!==e&&(s.lastIndex=0,s.test(e))}static replaceCaptures(e,t,n){return e.replace(s,((e,s,r,a)=>{let o=n[parseInt(s||r,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}},t.strcmp=r,t.strArrCmp=function(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let s=0;s<n;s++){let n=r(e[s],t[s]);if(0!==n)return n}return 0}return n-s},t.isValidHexColor=function(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()}}},t={};return function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s].call(a.exports,a,a.exports,n),a.exports}(787)})()},229:(e,t,n)=>{"use strict";e.exports=n.p+"015f9d709daff9eb9473.wasm"},609:e=>{"use strict";e.exports=window.React},673:()=>{},485:()=>{}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e].call(n.exports,n,n.exports,o),n.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);o.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&s&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(r,a),r},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,n)=>(o.f[n](e,t),t)),[])),o.u=e=>e+".js?ver=d43e1cd3952f43f28e34",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},s="pattern-css:",o.l=(e,t,r,a)=>{if(n[e])n[e].push(t);else{var i,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var p=c[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==s+r){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",s+r),i.src=e),n[e]=[t];var d=(t,s)=>{i.onerror=i.onload=null,clearTimeout(h);var r=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),r&&r.forEach((e=>e(s))),t)return t(s)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={57:0};o.f.j=(t,n)=>{var s=o.o(e,t)?e[t]:void 0;if(0!==s)if(s)n.push(s[2]);else{var r=new Promise(((n,r)=>s=e[t]=[n,r]));n.push(s[2]=r);var a=o.p+o.u(t),i=new Error;o.l(a,(n=>{if(o.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var r=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",i.name="ChunkLoadError",i.type=r,i.request=a,s[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var s,r,[a,i,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(s in i)o.o(i,s)&&(o.m[s]=i[s]);l&&l(o)}for(t&&t(n);c<a.length;c++)r=a[c],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=globalThis.webpackChunkpattern_css=globalThis.webpackChunkpattern_css||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";const e=window.wp.apiFetch;var t=o.n(e);const n=window.wp.hooks,s=window.wp.plugins,r=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],a=[];class i{scopes=[];referenceId=1;references=new Map;deferred=[null];wrappedObjects=new WeakMap;externalObjects=new WeakMap;buffers=new Map;instanceData=0;pendingException=null;constructor(e){this.id=a.length,a.push(this),this.instance=e,this.table=e.exports.__indirect_function_table,this.exports={},this.pushScope();let t=this.scopes[this.scopes.length-1],n=t.length;t.push(this.exports);try{this.instance.exports.napi_register_module_v1&&this.instance.exports.napi_register_module_v1(this.id,n),this.instance.exports.napi_register_wasm_v1&&this.instance.exports.napi_register_wasm_v1(this.id,n)}finally{if(this.popScope(),this.pendingException){let e=this.pendingException;throw this.pendingException=null,e}}}destroy(){a[this.id]=void 0}getString(e,t=function(e,t){let n=0;for(;0!==e[t];)n++,t++;return n}(this.memory,e)){return l.decode(this.memory.subarray(e,Math.max(0,e+t)))}pushScope(){let e=this.scopes.length;return this.scopes.push(e?[...this.scopes[e-1]]:[void 0,null,globalThis,!0,!1]),e}popScope(){this.scopes.pop();for(let[e,t]of this.buffers)e.byteLength&&t.byteLength&&e.set(t);this.buffers.clear()}get(e){return this.scopes[this.scopes.length-1][e]}set(e,t){this.scopes[this.scopes.length-1][e]=t}pushValue(e,t=this.scopes.length-1){let n=this.scopes[t],s=n.length;return n.push(e),s}createValue(e,t,n){if("boolean"==typeof e)return this.setPointer(t,e?3:4),0;if(void 0===e)return this.setPointer(t,0),0;if(null===e)return this.setPointer(t,1),0;if(e===globalThis)return this.setPointer(t,2),0;let s=this.pushValue(e,n);return this.setPointer(t,s),0}setPointer(e,t){return this.u32[e>>2]=t,0}_u32=new Uint32Array;get u32(){return 0===this._u32.byteLength&&(this._u32=new Uint32Array(this.instance.exports.memory.buffer)),this._u32}_i32=new Int32Array;get i32(){return 0===this._i32.byteLength&&(this._i32=new Int32Array(this.instance.exports.memory.buffer)),this._i32}_u16=new Uint16Array;get u16(){return 0===this._u16.byteLength&&(this._u16=new Uint16Array(this.instance.exports.memory.buffer)),this._u16}_u64=new BigUint64Array;get u64(){return 0===this._u64.byteLength&&(this._u64=new BigUint64Array(this.instance.exports.memory.buffer)),this._u64}_i64=new BigInt64Array;get i64(){return 0===this._i64.byteLength&&(this._i64=new BigInt64Array(this.instance.exports.memory.buffer)),this._i64}_f64=new Float64Array;get f64(){return 0===this._f64.byteLength&&(this._f64=new Float64Array(this.instance.exports.memory.buffer)),this._f64}_buf=new Uint8Array;get memory(){return 0===this._buf.byteLength&&(this._buf=new Uint8Array(this.instance.exports.memory.buffer)),this._buf}getBufferInfo(e,t){if(this.buffers.has(e)){let n=this.buffers.get(e);return this.setPointer(t,n.byteOffset),n.byteLength}if(e instanceof ArrayBuffer){let n=this.copyBuffer(new Uint8Array(e));return this.setPointer(t,n.byteOffset),n.byteLength}if(e.buffer===this.instance.exports.memory.buffer)return this.setPointer(t,e.byteOffset),e.byteLength;let n=this.copyBuffer(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));return this.setPointer(t,n.byteOffset),n.byteLength}copyBuffer(e){let t=this.instance.exports.napi_wasm_malloc(e.byteLength),n=this.memory;n.set(e,t);let s=n.subarray(t,t+e.byteLength);return h.register(s,new d(this.id,((e,t)=>{this.instance.exports.napi_wasm_free&&this.instance.exports.napi_wasm_free(t)}),0,t)),this.buffers.set(e,s),s}createFunction(e,t){let n=this,s=n.table.get(e);return function(...e){let r=n.pushScope();try{let a=n.scopes[r],o=a.length;a.push({thisArg:this,args:e,data:t,newTarget:new.target});let i=s(n.id,o);return n.get(i)}finally{if(n.popScope(),n.pendingException){let e=n.pendingException;throw n.pendingException=null,e}}}}readPropertyDescriptor(e){let t=this.u32,n=t[e++],s=t[e++],r=t[e++],a=t[e++],o=t[e++],i=t[e++],l=t[e++],c=t[e++],u=n?this.getString(n):this.get(s),p=Boolean(1&l),d=Boolean(2&l),h=Boolean(4&l),m=Boolean(1024&l),g=a?this.createFunction(a,c):void 0,f=o?this.createFunction(o,c):void 0,y=r?this.createFunction(r,c):i?this.get(i):void 0,_={name:u,static:m,configurable:h,enumerable:d};return g||f?(_.get=g,_.set=f):y&&(_.writable=p,_.value=y),_}}const l=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),c=new TextDecoder("latin1"),u=new TextDecoder("utf-16"),p=new TextEncoder;class d{constructor(e,t,n,s){this.env=e,this.finalize=t,this.hint=n,this.data=s}}const h=new FinalizationRegistry((e=>{e.finalize&&e.finalize(e.env,e.data,e.hint)}));class m{}const g=[];class f{constructor(e,t,n,s){this.env=e,this.fn=t,this.nativeFn=n,this.context=s,this.id=g.length,g.push(this)}}const y=[null];class _{constructor(e,t,n,s){this.env=e,this.execute=t,this.complete=n,this.data=s,this.id=y.length,y.push(this)}}const b={napi_open_handle_scope(e,t){let n=a[e],s=n.pushScope();return n.setPointer(t,s)},napi_close_handle_scope(e,t){let n=a[e];return t!==n.scopes.length-1?13:(n.popScope(),0)},napi_open_escapable_handle_scope(e,t){let n=a[e],s=n.pushScope();return n.setPointer(t,s)},napi_close_escapable_handle_scope(e,t){let n=a[e];return t!==n.scopes.length-1?13:(n.popScope(),0)},napi_escape_handle(e,t,n,s){let r=a[e],o=r.get(n);return r.createValue(o,s,t-1)},napi_create_object:(e,t)=>a[e].createValue({},t),napi_set_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n),l=r.get(s);return o[i]=l,0},napi_get_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.createValue(o[i],s)},napi_delete_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n),l=!1;try{l=delete o[i]}catch(e){}return s&&(r.memory[s]=l?1:0),0},napi_has_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=i in o?1:0,0},napi_has_own_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=o.hasOwnProperty(i)?1:0,0},napi_set_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(s);return o[r.getString(n)]=i,0},napi_get_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.getString(n);return r.createValue(o[i],s)},napi_has_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.getString(n);return r.memory[s]=i in o?1:0,0},napi_get_property_names(e,t,n){let s=a[e],r=s.get(t),o=Object.keys(r);return s.createValue(o,n)},napi_get_all_property_names(e,t,n,s,r,a){throw new Error("not implemented")},napi_define_properties(e,t,n,s){let r=a[e],o=r.get(t),i=s>>2;for(let e=0;e<n;e++){let e=r.readPropertyDescriptor(i);Object.defineProperty(o,e.name,e),i+=8}return 0},napi_object_freeze(e,t){let n=a[e].get(t);return Object.freeze(n),0},napi_object_seal(e,t){let n=a[e].get(t);return Object.seal(n),0},napi_get_prototype(e,t,n){let s=a[e],r=s.get(t);return s.createValue(Object.getPrototypeOf(r),n)},napi_define_class(e,t,n,s,r,o,i,l){let c=a[e],u=c.createFunction(s,r);Object.defineProperty(u,"name",{value:c.getString(t,n),configurable:!0});let p=i>>2;for(let e=0;e<o;e++){let e=c.readPropertyDescriptor(p);e.static?Object.defineProperty(u,e.name,e):Object.defineProperty(u.prototype,e.name,e),p+=8}return c.createValue(u,l)},napi_create_reference(e,t,n,s){let r=a[e],o=r.referenceId++;return r.references.set(o,{value:r.get(t),refcount:n}),r.setPointer(s,o)},napi_delete_reference:(e,t)=>(a[e].references.delete(t),0),napi_get_reference_value(e,t,n){let s=a[e],r=s.references.get(t);return s.createValue(r.value,n)},napi_reference_ref(e,t,n){let s=a[e],r=s.references.get(t);return r.refcount++,s.setPointer(n,r.refcount)},napi_reference_unref(e,t,n){let s=a[e],r=s.references.get(t);return 0===r.refcount?9:(r.refcount--,s.setPointer(n,r.refcount))},napi_add_env_cleanup_hook:()=>0,napi_remove_env_cleanup_hook:()=>0,napi_add_async_cleanup_hook:()=>0,napi_remove_async_cleanup_hook:()=>0,napi_set_instance_data:(e,t,n,s)=>(a[e].instanceData=t,0),napi_get_instance_data(e,t){let n=a[e];return n.setPointer(t,n.instanceData)},napi_get_boolean:(e,t,n)=>a[e].setPointer(n,t?3:4),napi_get_value_bool(e,t,n){let s=a[e],r=s.get(t);return"boolean"!=typeof r?7:(s.memory[n]=r?1:0,0)},napi_create_int32:(e,t,n)=>a[e].createValue(t,n),napi_get_value_int32(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.i32[n>>2]=r,0)},napi_create_uint32:(e,t,n)=>a[e].createValue(t,n),napi_get_value_uint32(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:s.setPointer(n,r)},napi_create_int64:(e,t,n)=>a[e].createValue(Number(t),n),napi_get_value_int64(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.i64[n>>3]=r,0)},napi_create_double:(e,t,n)=>a[e].createValue(t,n),napi_get_value_double(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.f64[n>>3]=r,0)},napi_create_bigint_int64:(e,t,n)=>a[e].createValue(BigInt.asIntN(64,t),n),napi_get_value_bigint_int64(e,t,n,s){let r=a[e],o=r.get(t);return"bigint"!=typeof o?17:(r.i64[n>>3]=o,s&&(r.memory[s]=BigInt.asIntN(64,o)===o?1:0),0)},napi_create_bigint_uint64:(e,t,n)=>a[e].createValue(BigInt.asUintN(64,t),n),napi_get_value_bigint_uint64(e,t,n,s){let r=a[e],o=r.get(t);return"bigint"!=typeof o?17:(r.u64[n>>3]=o,s&&(r.memory[s]=BigInt.asUintN(64,o)===o?1:0),0)},napi_create_bigint_words(e,t,n,s,r){let o=a[e],i=o.u64,l=s>>3,c=0n,u=0n;for(let e=0;e<n;e++)c+=i[l++]<<u,u+=64n;return c*=BigInt((-1)**t),o.createValue(c,r)},napi_get_value_bigint_words(e,t,n,s,r){let o=a[e],i=o.get(t);if("bigint"!=typeof i)return 17;let l=o.u32[s>>2];n&&(o.i32[n]=i<0n?1:0);let c=0;if(r){let e=(1n<<64n)-1n,t=o.u64,n=r>>3;for(i<0n&&(i=-i);c<l&&0n!==i;c++)t[n++]=i&e,i>>=64n}for(;i>0n;)c++,i>>=64n;return o.setPointer(s,c)},napi_get_null:(e,t)=>a[e].setPointer(t,1),napi_create_array:(e,t)=>a[e].createValue([],t),napi_create_array_with_length:(e,t,n)=>a[e].createValue(new Array(t),n),napi_set_element(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(s);return o[n]=i,0},napi_get_element(e,t,n,s){let r=a[e],o=r.get(t)[n];return r.createValue(o,s)},napi_has_element(e,t,n,s){let r=a[e],o=r.get(t);return r.memory[s]=o.hasOwnProperty(n)?1:0,0},napi_delete_element(e,t,n,s){let r=a[e],o=r.get(t),i=!1;try{i=delete o[n]}catch(e){}return s&&(r.memory[s]=i?1:0),0},napi_get_array_length(e,t,n){let s=a[e],r=s.get(t);return s.setPointer(n,r.length)},napi_get_undefined:(e,t)=>a[e].setPointer(t,0),napi_create_function(e,t,n,s,r,o){let i=a[e],l=i.createFunction(s,r);return Object.defineProperty(l,"name",{value:i.getString(t,n),configurable:!0}),i.createValue(l,o)},napi_call_function(e,t,n,s,r,o){let i=a[e],l=i.get(t),c=i.get(n),u=new Array(s),p=i.u32;for(let e=0;e<s;e++)u[e]=i.get(p[r>>2]),r+=4;try{let e=c.apply(l,u);return i.createValue(e,o)}catch(e){return i.pendingException=e,10}},napi_new_instance(e,t,n,s,r){let o=a[e],i=o.get(t),l=new Array(n),c=o.u32;for(let e=0;e<n;e++)l[e]=o.get(c[s>>2]),s+=4;try{let e=new i(...l);return o.createValue(e,r)}catch(e){return o.pendingException=e,10}},napi_get_cb_info(e,t,n,s,r,o){let i=a[e],l=i.get(t);i.setPointer(n,l.args.length);for(let e=0;e<l.args.length;e++)i.createValue(l.args[e],s),s+=4;return i.createValue(l.thisArg,r),i.setPointer(o,l.data),0},napi_get_new_target(e,t,n){let s=a[e],r=s.get(t);return s.createValue(r.newTarget,n)},napi_create_threadsafe_function(e,t,n,s,r,o,i,l,c,u,p){let m=a[e],g=t?m.get(t):void 0,y=u?m.table.get(u):void 0,_=new f(m,g,y,c);if(l){let t=m.table.get(l);h.register(_,new d(e,t,0,_.id))}return m.setPointer(p,_.id),0},napi_ref_threadsafe_function:()=>0,napi_unref_threadsafe_function:()=>0,napi_acquire_threadsafe_function:()=>0,napi_release_threadsafe_function:(e,t)=>(g[e]=void 0,0),napi_call_threadsafe_function(e,t,n){let s=g[e];s.env.pushScope();try{if(s.nativeFn){let e=s.fn?s.env.pushValue(s.fn):0;s.nativeFn(s.env.id,e,s.context,t)}else s.fn&&s.fn()}finally{s.env.popScope()}},napi_get_threadsafe_function_context(e,t){let n=g[e];return n.env.setPointer(t,n.context),0},napi_create_async_work(e,t,n,s,r,o,i){let l=a[e],c=s?l.table.get(s):void 0,u=r?l.table.get(r):void 0,p=new _(l,c,u,o);return l.setPointer(i,p.id),0},napi_delete_async_work:(e,t)=>(y[t]=void 0,0),napi_queue_async_work:(e,t)=>(queueMicrotask((()=>{let n=y[t];n&&(n.execute(e,n.data),n.complete(e,0,n.data))})),0),napi_cancel_async_work(){let e=y[work];return e.complete(env,11,e.data),y[work]=void 0,0},napi_throw(e,t){let n=a[e];return n.pendingException=n.get(t),0},napi_throw_error(e,t,n){let s=a[e],r=new Error(s.getString(n));return r.code=t,s.pendingException=r,0},napi_throw_type_error(e,t,n){let s=a[e],r=new TypeError(s.getString(n));return r.code=t,s.pendingException=r,0},napi_throw_range_error(e,t,n){let s=a[e],r=new RangeError(s.getString(n));return r.code=t,s.pendingException=r,0},napi_create_error(e,t,n,s){let r=a[e],o=new Error(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_create_type_error(e,t,n,s){let r=a[e],o=new TypeError(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_create_range_error(e,t,n,s){let r=a[e],o=new RangeError(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_get_and_clear_last_exception(e,t){let n=a[e],s=n.pendingException;return n.pendingException=null,n.createValue(s,t)},napi_is_exception_pending(e,t){let n=a[e];return n.memory[t]=n.pendingException?1:0,0},napi_fatal_exception(e,t){throw new Error("not implemented")},napi_fatal_error(e,t,n,s){throw new Error("not implemented")},napi_get_global:(e,t)=>a[e].setPointer(t,2),napi_create_buffer(e,t,n,s){let r=a[e],o=r.instance.exports.napi_wasm_malloc(t);n&&r.setPointer(n,o);let i=void 0!==globalThis.Buffer?globalThis.Buffer.from(r.memory.buffer,o,t):r.memory.subarray(o,o+t);return h.register(i,new d(e,((e,t)=>{r.instance.exports.napi_wasm_free&&r.instance.exports.napi_wasm_free(t)}),0,o)),r.createValue(i,s)},napi_create_buffer_copy(e,t,n,s,r){let o=a[e],i=o.instance.exports.napi_wasm_malloc(t);o.memory.set(o.memory.subarray(n,n+t),i),s&&o.setPointer(s,i);let l=void 0!==globalThis.Buffer?globalThis.Buffer.from(o.memory.buffer,i,t):o.memory.subarray(i,i+t);return h.register(buf,new d(e,((e,t)=>{o.instance.exports.napi_wasm_free&&o.instance.exports.napi_wasm_free(t)}),0,i)),o.createValue(l,r)},napi_create_external_buffer(e,t,n,s,r,o){let i=a[e],l=void 0!==globalThis.Buffer?globalThis.Buffer.from(i.memory.buffer,n,t):i.memory.subarray(n,n+t);if(s){let t=i.table.get(s);h.register(l,new d(e,t,r,n))}return i.createValue(l,o)},napi_get_buffer_info(e,t,n,s){let r=a[e],o=r.get(t),i=r.getBufferInfo(o,n);return r.setPointer(s,i)},napi_create_arraybuffer(e,t,n,s){let r=a[e],o=new ArrayBuffer(t);return n&&r.getBufferInfo(o,n),r.createValue(o,s)},napi_create_external_arraybuffer:(e,t,n,s,r,a)=>22,napi_get_arraybuffer_info(e,t,n,s){let r=a[e],o=r.getBufferInfo(r.get(t),n);return r.setPointer(s,o)},napi_detach_arraybuffer(e,t){let n=a[e].get(t);return"function"==typeof structuredClone&&structuredClone(n,{transfer:[n]}),0},napi_is_detached_arraybuffer(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=0===r.byteLength?1:0,0},napi_create_typedarray(e,t,n,s,o,i){let l=a[e],c=new(0,r[t])(l.get(s),o,n);return l.createValue(c,i)},napi_create_dataview(e,t,n,s,r){let o=a[e],i=o.get(n),l=new DataView(i,s,t);return o.createValue(l,r)},napi_get_typedarray_info(e,t,n,s,o,i,l){let c=a[e],u=c.get(t);return c.setPointer(n,r.findIndex((e=>u instanceof e))),c.setPointer(s,u.length),c.getBufferInfo(u,o),c.createValue(u.buffer,i),c.setPointer(l,u.byteOffset)},napi_get_dataview_info(e,t,n,s,r,o){let i=a[e],l=i.get(t);return i.setPointer(n,l.byteLength),i.getBufferInfo(l,s),i.createValue(l.buffer,r),i.setPointer(o,l.byteOffset)},napi_create_string_utf8(e,t,n,s){let r=a[e],o=l.decode(r.memory.subarray(t,t+n));return r.createValue(o,s)},napi_get_value_string_utf8(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,function(e){let t=0;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&n<e.length-1){let t=e.charCodeAt(++n);56320==(64512&t)?s=((1023&s)<<10)+(1023&t)+65536:n--}4294967168&s?4294965248&s?4294901760&s?4292870144&s||(t+=4):t+=3:t+=2:t++}return t}(i));let l=p.encodeInto(i,o.memory.subarray(n,n+s-1));return o.memory[n+l.written]=0,o.setPointer(r,l.written)},napi_create_string_latin1(e,t,n,s){let r=a[e],o=c.decode(r.memory.subarray(t,t+n));return r.createValue(o,s)},napi_get_value_string_latin1(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,i.length);let l=o.memory,c=Math.min(i.length,s-1);for(let e=0;e<c;e++){let t=i.charCodeAt(e);l[n++]=t}return l[n]=0,o.setPointer(r,c)},napi_create_string_utf16(e,t,n,s){let r=a[e],o=u.decode(r.memory.subarray(t,t+2*n));return r.createValue(o,s)},napi_get_value_string_utf16(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,i.length);let l=o.u16,c=n>>1,u=Math.min(i.length,s-1);for(let e=0;e<u;e++){let t=i.charCodeAt(e);l[c++]=t}return l[c]=0,o.setPointer(r,u)},napi_create_date:(e,t,n)=>a[e].createValue(new Date(t),n),napi_get_date_value(e,t,n){let s=a[e],r=s.get(t);s.f64[n>>3]=r.valueOf()},napi_create_symbol(e,t,n){let s=a[e],r=s.get(t);return s.createValue(Symbol(r),n)},napi_coerce_to_bool(e,t,n){let s=a[e];return s.createValue(Boolean(s.get(t)),n)},napi_coerce_to_number(e,t,n){let s=a[e];return s.createValue(Number(s.get(t)),n)},napi_coerce_to_object(e,t,n){let s=a[e];return s.createValue(Object(s.get(t)),n)},napi_coerce_to_string(e,t,n){let s=a[e];return s.createValue(String(s.get(t)),n)},napi_typeof(e,t,n){let s=a[e],r=s.get(t);return s.setPointer(n,(()=>{switch(typeof r){case"undefined":return 0;case"boolean":return 2;case"number":return 3;case"string":return 4;case"symbol":return 5;case"object":return null===r?1:r instanceof m?8:6;case"function":return 7;case"bigint":return 9}})())},napi_instanceof(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=o instanceof i?1:0,0},napi_is_array(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=Array.isArray(r)?1:0,0},napi_is_buffer(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=(void 0!==globalThis.Buffer?globalThis.Buffer.isBuffer(r):r instanceof Uint8Array)?1:0,0},napi_is_date(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Date?1:0,0},napi_is_error(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Error?1:0,0},napi_is_typedarray(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=!ArrayBuffer.isView(r)||r instanceof DataView?0:1,0},napi_is_dataview(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof DataView?1:0,0},napi_strict_equals(e,t,n,s){let r=a[e];return r.memory[s]=r.get(t)===r.get(n)?1:0,0},napi_wrap(e,t,n,s,r,o){let i=a[e],l=i.get(t);if(i.wrappedObjects.set(l,n),s){let t=i.table.get(s);h.register(l,new d(e,t,r,n))}return o?b.napi_create_reference(e,t,1,o):0},napi_unwrap(e,t,n){let s=a[e],r=s.get(t),o=s.wrappedObjects.get(r);return s.setPointer(n,o),0},napi_remove_wrap(e,t,n){let s=a[e],r=s.get(t),o=s.wrappedObjects.get(r);return h.unregister(r),s.wrappedObjects.delete(r),s.setPointer(n,o)},napi_type_tag_object(e,t,n){throw new Error("not implemented")},napi_check_object_type_tag(e,t,n){throw new Error("not implemented")},napi_add_finalizer(e,t,n,s,r,o){let i=a[e],l=i.get(t),c=i.table.get(s);return h.register(l,new d(e,c,r,n)),o?b.napi_create_reference(e,t,1,o):0},napi_create_promise(e,t,n){let s=a[e],r=new Promise(((e,n)=>{let r=s.deferred.length;s.deferred.push({resolve:e,reject:n}),s.setPointer(t,r)}));return s.createValue(r,n)},napi_resolve_deferred(e,t,n){let s=a[e],{resolve:r}=s.deferred[t];return r(s.get(n)),s.deferred[t]=void 0,0},napi_reject_deferred(e,t,n){let s=a[e],{reject:r}=s.deferred[t];return r(s.get(n)),s.deferred[t]=void 0,0},napi_is_promise(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Promise?1:0,0},napi_run_script(e,t,n){let s=a[e],r=s.get(t),o=(0,eval)(r);return s.createValue(o,n)},napi_create_external(e,t,n,s,r){let o=a[e],i=new m;if(o.externalObjects.set(i,t),n){let r=o.table.get(n);h.register(i,new d(e,r,s,t))}return o.createValue(i,r)},napi_get_value_external(e,t,n){let s=a[e],r=s.get(t),o=s.externalObjects.get(r);return o?s.setPointer(n,o):1},napi_adjust_external_memory:()=>0};let v;function w(e,t,n){v(e,t,n)}let k,S,N;function x(e){return function(e,t){if("function"==typeof t.visitor){let n=[];t.visitor=t.visitor({addDependency(e){n.push(e)}});let s=e(t);return s instanceof Promise?s=s.then((e=>(n.length&&(e.dependencies??=[],e.dependencies.push(...n)),e))):n.length&&(s.dependencies??=[],s.dependencies.push(...n)),s}return e(t)}(k.transform,e)}const j=window.wp.blockEditor,P=window.wp.components,C=window.wp.data,L=window.wp.editor,T=window.wp.element,A=window.wp.i18n,E=(e,t)=>[...new Set([...e.filter((e=>!e.startsWith("pcss-"))),t].filter(Boolean))].join(" "),O=e=>e.replace(/<\s*script\s*>/gi,"&lt;script&gt;").replace(/<\s*\/\s*script\s*>/gi,"&lt;/script&gt;").replace(/<\s*style\s*>/gi,"&lt;style&gt;").replace(/<\s*\/\s*style\s*>/gi,"&lt;/style&gt;");var R=o(609);const I=e=>{let t;const n=new Set,s=(e,s)=>{const r="function"==typeof e?e(t):e;if(!Object.is(r,t)){const e=t;t=(null!=s?s:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach((n=>n(t,e)))}},r=()=>t,a={setState:s,getState:r,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(s,r,a);return a},B=e=>e,M=e=>{const t=(e=>e?I(e):I)(e),n=e=>function(e,t=B){const n=R.useSyncExternalStore(e.subscribe,R.useCallback((()=>t(e.getState())),[e,t]),R.useCallback((()=>t(e.getInitialState())),[e,t]));return R.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},D=e=>e?M(e):M,G=e=>!!e.dispatchFromDevtools&&"function"==typeof e.dispatch,F=new Map,$=e=>{const t=F.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},W=e=>{var t,n;if(!e)return;const s=e.split("\n"),r=s.findIndex((e=>e.includes("api.setState")));if(r<0)return;const a=(null==(t=s[r+1])?void 0:t.trim())||"";return null==(n=/.+ (.+) .+/.exec(a))?void 0:n[1]},U=(e,t={})=>(n,s,r)=>{const{enabled:a,anonymousActionType:o,store:i,...l}=t;let c;try{c=(null==a||a)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return e(n,s,r);const{connection:u,...p}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const s=F.get(n.name);if(s)return{type:"tracked",store:e,...s};const r={connection:t.connect(n),stores:{}};return F.set(n.name,r),{type:"tracked",store:e,...r}})(i,c,l);let d=!0;r.setState=(e,t,a)=>{const c=n(e,t);if(!d)return c;const p=void 0===a?{type:o||W((new Error).stack)||"anonymous"}:"string"==typeof a?{type:a}:a;return void 0===i?(null==u||u.send(p,s()),c):(null==u||u.send({...p,type:`${i}/${p.type}`},{...$(l.name),[i]:r.getState()}),c)},r.devtools={cleanup:()=>{u&&"function"==typeof u.unsubscribe&&u.unsubscribe(),((e,t)=>{if(void 0===t)return;const n=F.get(e);n&&(delete n.stores[t],0===Object.keys(n.stores).length&&F.delete(e))})(l.name,i)}};const h=(...e)=>{const t=d;d=!1,n(...e),d=t},m=e(r.setState,s,r);if("untracked"===p.type?null==u||u.init(m):(p.stores[p.store]=r,null==u||u.init(Object.fromEntries(Object.entries(p.stores).map((([e,t])=>[e,e===p.store?m:t.getState()]))))),G(r)){let e=!1;const t=r.dispatch;r.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):V(e.payload,(e=>{if("__setState"!==e.type)G(r)&&r.dispatch(e);else{if(void 0===i)return void h(e.state);1!==Object.keys(e.state).length&&console.error('\n                    [zustand devtools middleware] Unsupported __setState action format.\n                    When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n                    and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n                    ');const t=e.state[i];if(null==t)return;JSON.stringify(r.getState())!==JSON.stringify(t)&&h(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return h(m),void 0===i?null==u?void 0:u.init(r.getState()):null==u?void 0:u.init($(l.name));case"COMMIT":return void 0===i?void(null==u||u.init(r.getState())):null==u?void 0:u.init($(l.name));case"ROLLBACK":return V(e.state,(e=>{if(void 0===i)return h(e),void(null==u||u.init(r.getState()));h(e[i]),null==u||u.init($(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return V(e.state,(e=>{void 0!==i?JSON.stringify(r.getState())!==JSON.stringify(e[i])&&h(e[i]):h(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,s=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!s)return;return h(void 0===i?s:s[i]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return d=!d}return}})),m},V=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function z(e,t){let n;try{n=e()}catch(e){return}const s={getItem:e=>{var s;const r=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(s=n.getItem(e))?s:null;return a instanceof Promise?a.then(r):r(a)},setItem:(e,s)=>n.setItem(e,JSON.stringify(s,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)};return s}const q=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>q(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>q(t)(e)}}},H=(e,t)=>(n,s,r)=>{let a={storage:z((()=>window.localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,i=0;const l=new Set,c=new Set;let u=a.storage;if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),s,r);const p=()=>{const e=a.partialize({...s()});return u.setItem(a.name,{state:e,version:a.version})},d=r.setState;r.setState=(e,t)=>(d(e,t),p());const h=e(((...e)=>(n(...e),p())),s,r);let m;r.getInitialState=()=>h;const g=()=>{var e,t;if(!u)return;const r=++i;o=!1,l.forEach((e=>{var t;return e(null!=(t=s())?t:h)}));const d=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=s())?e:h))||void 0;return q(u.getItem.bind(u))(a.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];if(a.migrate){const t=a.migrate(e.state,e.version);return t instanceof Promise?t.then((e=>[!0,e])):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]})).then((e=>{var t;if(r!==i)return;const[o,l]=e;return m=a.merge(l,null!=(t=s())?t:h),n(m,!0),o?p():void 0})).then((()=>{r===i&&(null==d||d(s(),void 0),m=s(),o=!0,c.forEach((e=>e(m))))})).catch((e=>{r===i&&(null==d||d(void 0,e))}))};return r.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||g(),m||h},K=D()(H(U((e=>({open:!1,transparent:!1,x:"20",y:"20",width:"400",height:"600",setTransparent:t=>e({transparent:t}),setOpen:t=>e({open:t}),setSize:(t,n)=>e({width:t,height:n}),setPosition:(t,n)=>e({x:t,y:n})})),{name:"PCSS Global Editor Store"}),{name:"pcss-global-editor-store"})),J=D()(H(U((e=>({open:!1,transparent:!0,x:"20",y:"20",width:"400",height:"600",setTransparent:t=>e({transparent:t}),setOpen:t=>e({open:t}),setSize:(t,n)=>e({width:t,height:n}),setPosition:(t,n)=>e({x:t,y:n})})),{name:"PCSS Popout Store"}),{name:"pcss-popout-store"})),X=window.wp.htmlEntities;var Q=o(69),Y=o.n(Q),Z=o(486),ee=o(217);const te=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",displayName:"ABAP",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",displayName:"ActionScript",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",displayName:"Ada",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json",displayName:"Apache Conf",samplePath:"apache.sample"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",displayName:"Apex",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",displayName:"APL",samplePath:"apl.sample",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",displayName:"AppleScript",samplePath:"applescript.sample"},{id:"ara",scopeName:"source.ara",path:"ara.tmLanguage.json",displayName:"Ara",samplePath:"ara.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",displayName:"Assembly",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",displayName:"Astro",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","stylus","sass","css","scss","less","postcss","tsx"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",displayName:"AWK",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",displayName:"Ballerina",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",displayName:"Batch",samplePath:"bat.sample",aliases:["batch"]},{id:"beancount",scopeName:"text.beancount",path:"beancount.tmLanguage.json",displayName:"Beancount",samplePath:"beancount.sample"},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",displayName:"Berry",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json",displayName:"BibTeX",samplePath:"bibtex.sample"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",displayName:"Bicep",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",displayName:"Blade",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",displayName:"C",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",displayName:"Cadence",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",displayName:"Clarity",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",displayName:"Clojure",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",displayName:"CMake",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",displayName:"COBOL",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",displayName:"CodeQL",samplePath:"codeql.sample",aliases:["ql"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",displayName:"CoffeeScript",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",displayName:"C++",samplePath:"cpp.sample",aliases:["c++"],embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",displayName:"Crystal",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",displayName:"C#",samplePath:"csharp.sample",aliases:["c#","cs"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",displayName:"CSS",samplePath:"css.sample"},{id:"csv",scopeName:"text.csv",path:"csv.tmLanguage.json",displayName:"csv syntax",samplePath:"csv.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",displayName:"CUE",samplePath:"cue.sample"},{id:"cypher",scopeName:"source.cypher",path:"cypher.tmLanguage.json",displayName:"Cypher",samplePath:"cypher.sample",aliases:["cql"]},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",displayName:"D",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",displayName:"Dart",samplePath:"dart.sample"},{id:"dax",scopeName:"source.dax",path:"dax.tmLanguage.json",displayName:"DAX",samplePath:"dax.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",displayName:"Diff",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",displayName:"Docker",samplePath:"docker.sample",aliases:["dockerfile"]},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json",displayName:"Dream Maker",samplePath:"dream-maker.sample"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",displayName:"Elixir",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",displayName:"Elm",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",displayName:"ERB",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",displayName:"Erlang",samplePath:"erlang.sample",aliases:["erl"]},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",displayName:"Fish",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",displayName:"F#",samplePath:"fsharp.sample",aliases:["f#","fs"],embeddedLangs:["markdown"]},{id:"gdresource",scopeName:"source.gdresource",path:"gdresource.tmLanguage.json",displayName:"GDResource",samplePath:"gdresource.sample",embeddedLangs:["gdshader","gdscript"]},{id:"gdscript",scopeName:"source.gdscript",path:"gdscript.tmLanguage.json",displayName:"GDScript",samplePath:"gdscript.sample"},{id:"gdshader",scopeName:"source.gdshader",path:"gdshader.tmLanguage.json",displayName:"GDShader",samplePath:"gdshader.sample"},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json",displayName:"Gherkin",samplePath:"gherkin.sample"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",displayName:"Git Commit Message",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",displayName:"Git Rebase Message",embeddedLangs:["shellscript"]},{id:"glimmer-js",scopeName:"source.gjs",path:"glimmer-js.tmLanguage.json",displayName:"Glimmer JS",aliases:["gjs"],embeddedLangs:["javascript","handlebars"]},{id:"glimmer-ts",scopeName:"source.gts",path:"glimmer-ts.tmLanguage.json",displayName:"Glimmer TS",aliases:["gts"],embeddedLangs:["typescript","handlebars"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",displayName:"GLSL",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json",displayName:"Gnuplot",samplePath:"gnuplot.sample"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",displayName:"Go",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",displayName:"GraphQL",samplePath:"graphql.sample",aliases:["gql"],embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json",displayName:"Groovy",samplePath:"groovy.sample"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",displayName:"Hack",samplePath:"hack.sample",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",displayName:"Ruby Haml",samplePath:"haml.sample",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",displayName:"Handlebars",samplePath:"handlebars.sample",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json",displayName:"Haskell",samplePath:"haskell.sample",aliases:["hs"]},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json",displayName:"HashiCorp HCL",samplePath:"hcl.sample"},{id:"hjson",scopeName:"source.hjson",path:"hjson.tmLanguage.json",displayName:"Hjson",samplePath:"hjson.sample"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json",displayName:"HLSL",samplePath:"hlsl.sample"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",displayName:"HTML",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"http",scopeName:"source.http",path:"http.tmLanguage.json",displayName:"HTTP",samplePath:"http.sample",embeddedLangs:["shellscript","json","xml","graphql"]},{id:"imba",scopeName:"source.imba",path:"imba.tmLanguage.json",displayName:"Imba",samplePath:"imba.sample"},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json",displayName:"INI",samplePath:"ini.sample",aliases:["properties"]},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",displayName:"Java",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",displayName:"JavaScript",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",displayName:"Jinja",samplePath:"jinja-html.sample",embeddedLangs:["html"]},{id:"jison",scopeName:"source.jison",path:"jison.tmLanguage.json",displayName:"Jison",samplePath:"jison.sample",embeddedLangs:["javascript"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json",displayName:"JSON",samplePath:"json.sample"},{id:"json5",scopeName:"source.json5",path:"json5.tmLanguage.json",displayName:"JSON5",samplePath:"json5.sample"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json",displayName:"JSON with Comments",samplePath:"jsonc.sample"},{id:"jsonl",scopeName:"source.json.lines",path:"jsonl.tmLanguage.json",displayName:"JSON Lines",samplePath:"jsonl.sample"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json",displayName:"Jsonnet",samplePath:"jsonnet.sample"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",displayName:"JSSM",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json",displayName:"JSX",samplePath:"jsx.sample"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",displayName:"Julia",samplePath:"julia.sample",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json",displayName:"Kotlin",samplePath:"kotlin.sample",aliases:["kt","kts"]},{id:"kusto",scopeName:"source.kusto",path:"kusto.tmLanguage.json",displayName:"Kusto",samplePath:"kusto.sample",aliases:["kql"]},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",displayName:"LaTeX",samplePath:"latex.sample",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",displayName:"Less",samplePath:"less.sample"},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",displayName:"Liquid",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json",displayName:"Lisp",samplePath:"lisp.sample"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json",displayName:"Logo",samplePath:"logo.sample"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",displayName:"Lua",samplePath:"lua.sample",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",displayName:"Makefile",samplePath:"make.sample",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",displayName:"Markdown",samplePath:"markdown.sample",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",displayName:"Marko",samplePath:"marko.sample",embeddedLangs:["css","less","scss","javascript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json",displayName:"MATLAB",samplePath:"matlab.sample"},{id:"mdc",scopeName:"text.markdown.mdc",path:"mdc.tmLanguage.json",displayName:"mdc",samplePath:"mdc.sample",embeddedLangs:["markdown","yaml"]},{id:"mdx",scopeName:"source.mdx",path:"mdx.tmLanguage.json",displayName:"MDX",samplePath:"mdx.sample",embeddedLangs:["tsx","toml","yaml","c","clojure","coffee","cpp","csharp","css","diff","docker","elixir","elm","erlang","go","graphql","haskell","html","ini","java","javascript","json","julia","kotlin","less","lua","make","markdown","objective-c","perl","python","r","ruby","rust","scala","scss","shellscript","shellsession","sql","xml","swift","typescript"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json",displayName:"Mermaid",samplePath:"mermaid.sample"},{id:"mojo",scopeName:"source.mojo",path:"mojo.tmLanguage.json",displayName:"MagicPython",samplePath:"mojo.sample"},{id:"narrat",scopeName:"source.narrat",path:"narrat.tmLanguage.json",displayName:"Narrat Language",samplePath:"narrat.sample",aliases:["nar"]},{id:"nextflow",scopeName:"source.nextflow",path:"nextflow.tmLanguage.json",displayName:"Nextflow",samplePath:"nextflow.sample",aliases:["nf"]},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",displayName:"Nginx",samplePath:"nginx.sample",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",displayName:"Nim",samplePath:"nim.sample",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json",displayName:"Nix",samplePath:"nix.sample"},{id:"nushell",scopeName:"source.nushell",path:"nushell.tmLanguage.json",displayName:"nushell",samplePath:"nushell.sample",aliases:["nu"]},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",displayName:"Objective-C",samplePath:"objective-c.sample",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json",displayName:"Objective-C++",samplePath:"objective-cpp.sample"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json",displayName:"OCaml",samplePath:"ocaml.sample"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json",displayName:"Pascal",samplePath:"pascal.sample"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",displayName:"Perl",samplePath:"perl.sample",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",displayName:"PHP",samplePath:"php.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json",displayName:"PL/SQL",samplePath:"plsql.sample"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json",displayName:"PostCSS",samplePath:"postcss.sample"},{id:"powerquery",scopeName:"source.powerquery",path:"powerquery.tmLanguage.json",displayName:"PowerQuery",samplePath:"powerquery.sample"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",displayName:"PowerShell",samplePath:"powershell.sample",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",displayName:"Prisma",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json",displayName:"Prolog",samplePath:"prolog.sample"},{id:"proto",scopeName:"source.proto",path:"proto.tmLanguage.json",displayName:"Protocol Buffer 3",samplePath:"proto.sample"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",displayName:"Pug",samplePath:"pug.sample",aliases:["jade"],embeddedLangs:["javascript","css","sass","scss","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json",displayName:"Puppet",samplePath:"puppet.sample"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json",displayName:"PureScript",samplePath:"purescript.sample"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",displayName:"Python",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json",displayName:"R",samplePath:"r.sample"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",displayName:"Raku",samplePath:"raku.sample",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",displayName:"ASP.NET Razor",samplePath:"razor.sample",embeddedLangs:["html","csharp"]},{id:"reg",scopeName:"source.reg",path:"reg.tmLanguage.json",displayName:"Windows Registry Script",samplePath:"reg.sample"},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",displayName:"Rel",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json",displayName:"RISC-V",samplePath:"riscv.sample"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",displayName:"reStructuredText",samplePath:"rst.sample",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",displayName:"Ruby",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",displayName:"Rust",samplePath:"rust.sample",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",displayName:"SAS",samplePath:"sas.sample",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json",displayName:"Sass",samplePath:"sass.sample"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json",displayName:"Scala",samplePath:"scala.sample"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json",displayName:"Scheme",samplePath:"scheme.sample"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",displayName:"SCSS",samplePath:"scss.sample",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",displayName:"ShaderLab",samplePath:"shaderlab.sample",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",displayName:"Shell",samplePath:"shellscript.sample",aliases:["bash","sh","shell","zsh"]},{id:"shellsession",scopeName:"text.shell-session",path:"shellsession.tmLanguage.json",displayName:"Shell Session",samplePath:"shellsession.sample",aliases:["console"],embeddedLangs:["shellscript"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json",displayName:"Smalltalk",samplePath:"smalltalk.sample"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json",displayName:"Solidity",samplePath:"solidity.sample"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",displayName:"SPARQL",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"splunk",scopeName:"source.splunk_search",path:"splunk.tmLanguage.json",displayName:"Splunk Query Language",samplePath:"splunk.sample",aliases:["spl"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json",displayName:"SQL",samplePath:"sql.sample"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json",displayName:"SSH Config",samplePath:"ssh-config.sample"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",displayName:"Stata",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",displayName:"Stylus",samplePath:"stylus.sample",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",displayName:"Svelte",samplePath:"svelte.sample",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json",displayName:"Swift",samplePath:"swift.sample"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json",displayName:"SystemVerilog",samplePath:"system-verilog.sample"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",displayName:"Tasl",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json",displayName:"Tcl",samplePath:"tcl.sample"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",displayName:"TeX",samplePath:"tex.sample",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json",displayName:"TOML",samplePath:"toml.sample"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",displayName:"TSX",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",displayName:"Turtle",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",displayName:"Twig",samplePath:"twig.sample",embeddedLangs:["css","javascript","scss","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",displayName:"TypeScript",samplePath:"typescript.sample",aliases:["ts"]},{id:"v",scopeName:"source.v",path:"v.tmLanguage.json",displayName:"V",samplePath:"v.sample"},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",displayName:"Visual Basic",samplePath:"vb.sample",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json",displayName:"Verilog",samplePath:"verilog.sample"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json",displayName:"VHDL",samplePath:"vhdl.sample"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",displayName:"Vim Script",samplePath:"viml.sample",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",displayName:"Vue HTML",samplePath:"vue-html.sample",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",displayName:"Vue",samplePath:"vue.sample",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql"]},{id:"vyper",scopeName:"source.vyper",path:"vyper.tmLanguage.json",displayName:"Vyper",samplePath:"vyper.sample",aliases:["vy"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json",displayName:"WebAssembly",samplePath:"wasm.sample"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",displayName:"Wenyan",samplePath:"wenyan.sample",aliases:["文言"]},{id:"wgsl",scopeName:"source.wgsl",path:"wgsl.tmLanguage.json",displayName:"WGSL",samplePath:"wgsl.sample"},{id:"wolfram",scopeName:"source.wolfram",path:"wolfram.tmLanguage.json",displayName:"Wolfram",samplePath:"wolfram.sample",aliases:["wl"]},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",displayName:"XML",samplePath:"xml.sample",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",displayName:"XSL",samplePath:"xsl.sample",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json",displayName:"YAML",samplePath:"yaml.sample",aliases:["yml"]},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",displayName:"ZenScript",samplePath:"zenscript.sample"},{id:"zig",scopeName:"source.zig",path:"zig.tmLanguage.json",displayName:"zig",samplePath:"zig.sample"}];var ne,se,re,ae,oe=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(oe||{});class ie{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t}static printMetadata(e){let t=ie.getLanguageId(e),n=ie.getTokenType(e),s=ie.getFontStyle(e),r=ie.getForeground(e),a=ie.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:s,foreground:r,background:a})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>15}static getBackground(e){return(4286578688&e)>>>24}static containsBalancedBrackets(e){return!!(1024&e)}static set(e,t,n,s,r,a){let o=ie.getLanguageId(e),i=ie.getTokenType(e),l=ie.getFontStyle(e),c=ie.getForeground(e),u=ie.getBackground(e);return 0!==t&&(o=t),0!==n&&(i=8===n?0:n),-1!==s&&(l=s),0!==r&&(c=r),0!==a&&(u=a),(o|i<<8|l<<11|(ie.containsBalancedBrackets(e)?1:0)<<10|c<<15|u<<24)>>>0}}function le(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function ce(e){return e.startsWith("./")?e.slice(2):e}function ue(e){const t=e.split(/[\/\\]/g);return t.slice(0,t.length-1)}function pe(...e){return e.map(le).map(ce).join("/")}function de(e){return 32===e||9===e}function he(e){return 10===e||13===e}function me(e){return e>=48&&e<=57}!function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(ne||(ne={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(se||(se={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(re||(re={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(ae||(ae={}));const ge=function(e,t=[],n=se.DEFAULT){let s=null,r=[];const a=[];function o(e){Array.isArray(r)?r.push(e):null!==s&&(r[s]=e)}return function(e,t,n=se.DEFAULT){const s=function(e,t=!1){const n=e.length;let s=0,r="",a=0,o=16,i=0,l=0,c=0,u=0,p=0;function d(t,n){let r=0,a=0;for(;r<t||!n;){let t=e.charCodeAt(s);if(t>=48&&t<=57)a=16*a+t-48;else if(t>=65&&t<=70)a=16*a+t-65+10;else{if(!(t>=97&&t<=102))break;a=16*a+t-97+10}s++,r++}return r<t&&(a=-1),a}function h(){if(r="",p=0,a=s,l=i,u=c,s>=n)return a=n,o=17;let t=e.charCodeAt(s);if(de(t)){do{s++,r+=String.fromCharCode(t),t=e.charCodeAt(s)}while(de(t));return o=15}if(he(t))return s++,r+=String.fromCharCode(t),13===t&&10===e.charCodeAt(s)&&(s++,r+="\n"),i++,c=s,o=14;switch(t){case 123:return s++,o=1;case 125:return s++,o=2;case 91:return s++,o=3;case 93:return s++,o=4;case 58:return s++,o=6;case 44:return s++,o=5;case 34:return s++,r=function(){let t="",r=s;for(;;){if(s>=n){t+=e.substring(r,s),p=2;break}const a=e.charCodeAt(s);if(34===a){t+=e.substring(r,s),s++;break}if(92!==a){if(a>=0&&a<=31){if(he(a)){t+=e.substring(r,s),p=2;break}p=6}s++}else{if(t+=e.substring(r,s),s++,s>=n){p=2;break}switch(e.charCodeAt(s++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=d(4,!0);e>=0?t+=String.fromCharCode(e):p=4;break;default:p=5}r=s}}return t}(),o=10;case 47:const l=s-1;if(47===e.charCodeAt(s+1)){for(s+=2;s<n&&!he(e.charCodeAt(s));)s++;return r=e.substring(l,s),o=12}if(42===e.charCodeAt(s+1)){s+=2;const t=n-1;let a=!1;for(;s<t;){const t=e.charCodeAt(s);if(42===t&&47===e.charCodeAt(s+1)){s+=2,a=!0;break}s++,he(t)&&(13===t&&10===e.charCodeAt(s)&&s++,i++,c=s)}return a||(s++,p=1),r=e.substring(l,s),o=13}return r+=String.fromCharCode(t),s++,o=16;case 45:if(r+=String.fromCharCode(t),s++,s===n||!me(e.charCodeAt(s)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=function(){let t=s;if(48===e.charCodeAt(s))s++;else for(s++;s<e.length&&me(e.charCodeAt(s));)s++;if(s<e.length&&46===e.charCodeAt(s)){if(s++,!(s<e.length&&me(e.charCodeAt(s))))return p=3,e.substring(t,s);for(s++;s<e.length&&me(e.charCodeAt(s));)s++}let n=s;if(s<e.length&&(69===e.charCodeAt(s)||101===e.charCodeAt(s)))if(s++,(s<e.length&&43===e.charCodeAt(s)||45===e.charCodeAt(s))&&s++,s<e.length&&me(e.charCodeAt(s))){for(s++;s<e.length&&me(e.charCodeAt(s));)s++;n=s}else p=3;return e.substring(t,n)}(),o=11;default:for(;s<n&&m(t);)s++,t=e.charCodeAt(s);if(a!==s){switch(r=e.substring(a,s),r){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return r+=String.fromCharCode(t),s++,o=16}}function m(e){if(de(e)||he(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){s=e,r="",a=0,o=16,p=0},getPosition:()=>s,scan:t?function(){let e;do{e=h()}while(e>=12&&e<=15);return e}:h,getToken:()=>o,getTokenValue:()=>r,getTokenOffset:()=>a,getTokenLength:()=>s-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-u,getTokenError:()=>p}}(e,!1),r=[];function a(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function o(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>r.slice())):()=>!0}function i(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>r.slice())):()=>!0}const c=o(t.onObjectBegin),u=l(t.onObjectProperty),p=a(t.onObjectEnd),d=o(t.onArrayBegin),h=a(t.onArrayEnd),m=l(t.onLiteralValue),g=i(t.onSeparator),f=a(t.onComment),y=i(t.onError),_=n&&n.disallowComments,b=n&&n.allowTrailingComma;function v(){for(;;){const e=s.scan();switch(s.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:_||w(11);break;case 2:w(12);break;case 6:w(16)}switch(e){case 12:case 13:_?w(10):f();break;case 16:w(1);break;case 15:case 14:break;default:return e}}}function w(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=s.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){v();break}if(-1!==n.indexOf(e))break;e=v()}}}function k(e){const t=s.getTokenValue();return e?m(t):(u(t),r.push(t)),v(),!0}function S(){switch(s.getToken()){case 3:return function(){d(),v();let e=!0,t=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(t||w(4,[],[]),g(","),v(),4===s.getToken()&&b)break}else t&&w(6,[],[]);e?(r.push(0),e=!1):r[r.length-1]++,S()||w(4,[],[4,5]),t=!0}return h(),e||r.pop(),4!==s.getToken()?w(8,[4],[]):v(),!0}();case 1:return function(){c(),v();let e=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(e||w(4,[],[]),g(","),v(),2===s.getToken()&&b)break}else e&&w(6,[],[]);(10!==s.getToken()?(w(3,[],[2,5]),!1):(k(!1),6===s.getToken()?(g(":"),v(),S()||w(4,[],[2,5])):w(5,[],[2,5]),r.pop(),!0))||w(4,[],[2,5]),e=!0}return p(),2!==s.getToken()?w(7,[2],[]):v(),!0}();case 10:return k(!0);default:return function(){switch(s.getToken()){case 11:const e=s.getTokenValue();let t=Number(e);isNaN(t)&&(w(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return v(),!0}()}}v(),17===s.getToken()?!!n.allowEmptyContent||w(4,[],[]):S()?17!==s.getToken()&&w(9,[],[]):w(4,[],[])}(e,{onObjectBegin:()=>{const e={};o(e),a.push(r),r=e,s=null},onObjectProperty:e=>{s=e},onObjectEnd:()=>{r=a.pop()},onArrayBegin:()=>{const e=[];o(e),a.push(r),r=e,s=null},onArrayEnd:()=>{r=a.pop()},onLiteralValue:o,onError:(e,n,s)=>{t.push({error:e,offset:n,length:s})}},n),r[0]};var fe;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(fe||(fe={}));const ye="undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,_e="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"node"===process.release.name,be="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"bun"===process.release.name,ve=ye||!_e&&!be;let we="",ke="";let Se=null;function Ne(e){if(ve)return`${we}${e}`;{const t=o(485);return t.isAbsolute(e)?e:t.resolve("/","..",e)}}async function xe(e){const t=[],n=await async function(e){const t=Ne(e);if(ve)return await fetch(t).then((e=>e.text()));{const e=o(673);return await e.promises.readFile(t,"utf-8")}}(e);let s;try{s=JSON.parse(n)}catch(e){if(s=ge(n,t,{allowTrailingComma:!0}),t.length)throw t[0]}return s}async function je(e){const t=Pe(await xe(e));if(t.include){const n=await je(pe(...ue(e),t.include));n.settings&&(t.settings=n.settings.concat(t.settings)),n.bg&&!t.bg&&(t.bg=n.bg),n.colors&&(t.colors={...n.colors,...t.colors}),delete t.include}return t}function Pe(e){const t=e.type||"dark",n={name:e.name,type:t,...e,...Te(e)};var s;return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors,delete n.tokenColors),(s=n).settings||(s.settings=[]),s.settings[0]&&s.settings[0].settings&&!s.settings[0].scope||s.settings.unshift({settings:{foreground:s.fg,background:s.bg}}),n}const Ce={light:"#333333",dark:"#bbbbbb"},Le={light:"#fffffe",dark:"#1e1e1e"};function Te(e){let t,n,s=e.settings?e.settings:e.tokenColors;const r=s?s.find((e=>!e.name&&!e.scope)):void 0;return r?.settings?.foreground&&(t=r.settings.foreground),r?.settings?.background&&(n=r.settings.background),!t&&e?.colors?.["editor.foreground"]&&(t=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),t||(t="light"===e.type?Ce.light:Ce.dark),n||(n="light"===e.type?Le.light:Le.dark),{fg:t,bg:n}}class Ae{constructor(e,t){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=e,this._onigLibName=t}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(e){return this.languageMap[e]}async loadGrammar(e){const t=this.scopeToLangMap[e];if(!t)return null;if(t.grammar)return t.grammar;const n=await async function(e){return await xe(e)}(te.includes(t)?`${this.languagesPath}${t.path}`:t.path);return t.grammar=n,n}addLanguage(e){this.languageMap[e.id]=e,e.aliases&&e.aliases.forEach((t=>{this.languageMap[t]=e})),this.scopeToLangMap[e.scopeName]=e}}function Ee(e,t){let n=[];for(let s=0,r=t.length;s<r;s++){let r=t.slice(0,s),a=t[s];n[s]={scopeName:a,themeMatches:Ie(e,a,r)}}return n}function Oe(e,t){let n=e+".";return e===t||t.substring(0,n.length)===n}function Re(e,t,n,s){if(!Oe(e,n))return!1;let r=t.length-1,a=s.length-1;for(;r>=0&&a>=0;)Oe(t[r],s[a])&&r--,a--;return-1===r}function Ie(e,t,n){let s=[],r=0;for(let a=0,o=e.settings.length;a<o;a++){let o,i=e.settings[a];if("string"==typeof i.scope)o=i.scope.split(/,/).map((e=>e.trim()));else{if(!Array.isArray(i.scope))continue;o=i.scope}for(let e=0,a=o.length;e<a;e++){let l=o[e].split(/ /);Re(l[l.length-1],l.slice(0,l.length-1),t,n)&&(s[r++]=i,e=a)}}return s}var Be=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Me={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function De(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function Ge(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map((e=>Number.parseInt(e)));if(3!==t.length||t.some((e=>Number.isNaN(e))))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function Fe(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(0===s)t.push({type:"resetAll"});else if(s<=9)Me[s]&&t.push({type:"setDecoration",value:Me[s]});else if(s<=29){const e=Me[s-20];e&&t.push({type:"resetDecoration",value:e})}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Be[s-30]}});else if(38===s){const n=Ge(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===s)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Be[s-40]}});else if(48===s){const n=Ge(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===s?t.push({type:"resetBackgroundColor"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Be[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Be[s-100+8]}})}return t}var $e={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function We(e=$e){function t(t){return e[t]}function n(e){return`#${e.map((e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0"))).join("")}`}let s;return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return r=e.index,function(){if(s)return s;s=[];for(let e=0;e<Be.length;e++)s.push(t(Be[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let r=0;r<6;r++)for(let a=0;a<6;a++)s.push(n([e[t],e[r],e[a]]));let r=8;for(let e=0;e<24;e++,r+=10)s.push(n([r,r,r]));return s}()[r]}var r}}}const Ue={pre:({className:e,style:t,children:n})=>`<pre class="${e}" style="${t}" tabindex="0">${n}</pre>`,code:({children:e})=>`<code>${e}</code>`,line:({className:e,children:t})=>`<span class="${e}">${t}</span>`,token:({style:e,children:t})=>`<span style="${e}">${t}</span>`};function Ve(e,t={}){const n=t.bg||"#fff",s=function(e){const t=new Map;for(const n of e){const e=n.line;t.has(e)?t.get(e).push(n):t.set(e,[n])}return t}(t.lineOptions??[]),r=t.elements||{};function a(e="",t={},n){const s=r[e]||Ue[e];return s?(n=n.filter(Boolean),s({...t,children:"code"===e?n.join("\n"):n.join("")})):""}return a("pre",{className:"shiki "+(t.themeName||""),style:`background-color: ${n}`},[t.langId?`<div class="language-id">${t.langId}</div>`:"",a("code",{},e.map(((n,r)=>{const o=r+1;return a("line",{className:function(e){const t=new Set(["line"]);for(const n of e)for(const e of n.classes??[])t.add(e);return Array.from(t)}(s.get(o)??[]).join(" "),lines:e,line:n,index:r},n.map(((e,s)=>{const r=[`color: ${e.color||t.fg}`];return e.fontStyle&oe.Italic&&r.push("font-style: italic"),e.fontStyle&oe.Bold&&r.push("font-weight: bold"),e.fontStyle&oe.Underline&&r.push("text-decoration: underline"),a("token",{style:r.join("; "),tokens:n,token:e,index:s},[(o=e.content,o.replace(/[&<>"']/g,(e=>ze[e])))]);var o})))})))])}const ze={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};class qe extends ee.Registry{constructor(e){super(e),this._resolver=e,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={},this._langGraph=new Map,this._langMap=te.reduce(((e,t)=>(e[t.id]=t,e)),{})}getTheme(e){return"string"==typeof e?this._resolvedThemes[e]:e}async loadTheme(e){return"string"==typeof e?(this._resolvedThemes[e]||(this._resolvedThemes[e]=await je(`${this.themesPath}${e}.json`)),this._resolvedThemes[e]):((e=Pe(e)).name&&(this._resolvedThemes[e.name]=e),e)}async loadThemes(e){return await Promise.all(e.map((e=>this.loadTheme(e))))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(e){return this._resolvedGrammars[e]}async loadLanguage(e){const t=e.embeddedLangs?.reduce((async(e,t,n)=>{if(!this.getLoadedLanguages().includes(t)&&this._resolver.getLangRegistration(t))return await this._resolver.loadGrammar(this._resolver.getLangRegistration(t).scopeName),e[this._resolver.getLangRegistration(t).scopeName]=n+2,e}),{}),n={embeddedLanguages:t,balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]},s=await this.loadGrammarWithConfiguration(e.scopeName,1,n);this._resolvedGrammars[e.id]=s,e.aliases&&e.aliases.forEach((e=>{this._resolvedGrammars[e]=s}))}async loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.values());for(const e of t)this._resolver.addLanguage(e);for(const e of t)await this.loadLanguage(e)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}resolveEmbeddedLanguages(e){if(this._langGraph.has(e.id)||this._langGraph.set(e.id,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}function He(e){return"string"==typeof e?te.find((t=>t.id===e||t.aliases?.includes(e))):e}async function Ke(e){const{_languages:t,_themes:n,_wasmPath:s}=function(e){let t=te,n=e.themes||[],s=e.paths?.wasm?e.paths.wasm.endsWith("/")?e.paths.wasm:e.paths.wasm+"/":"dist/";return e.langs&&(t=e.langs.map(He)),e.theme&&n.unshift(e.theme),n.length||(n=["nord"]),{_languages:t,_themes:n,_wasmPath:s}}(e),r=new Ae(async function(e){if(!Se){let t;if(ve)t="string"==typeof ke?(0,Z.loadWASM)({data:await fetch(Ne(pe(...ue(e),"onig.wasm")))}):(0,Z.loadWASM)({data:ke});else{const e=o(485).join(486,"../onig.wasm"),n=o(673).readFileSync(e).buffer;t=(0,Z.loadWASM)(n)}Se=t.then((()=>({createOnigScanner:e=>(0,Z.createOnigScanner)(e),createOnigString:e=>(0,Z.createOnigString)(e)})))}return Se}(s),"vscode-oniguruma"),a=new qe(r);e.paths?.themes&&(a.themesPath=e.paths.themes.endsWith("/")?e.paths.themes:e.paths.themes+"/"),e.paths?.languages&&(r.languagesPath=e.paths.languages.endsWith("/")?e.paths.languages:e.paths.languages+"/");const i=(await a.loadThemes(n))[0];let l;await a.loadLanguages(t);let c=function(){const e={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};for(let t=0;t<Be.length;t++){const n=`#A${t.toString().padStart(5,"0")}`,s=Be[t].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e[n]=`var(--shiki-color-ansi-${s})`}return e}();function u(e){const t=e?a.getTheme(e):i;if(!t)throw Error(`No theme registration for ${e}`);l&&l.name===t.name||(a.setTheme(t),l=t);const n=a.getColorMap();return"css"===t.type&&function(e,t){e.bg=c[e.bg]||e.bg,e.fg=c[e.fg]||e.fg,Object.entries(e.colors).forEach((([t,n])=>{e.colors[t]=c[n]||n})),t.forEach(((e,n)=>{t[n]=c[e]||e}))}(t,n),{_theme:t,_colorMap:n}}function p(e,t="text",n,s={includeExplanation:!0}){if(function(e){return!e||["plaintext","txt","text"].includes(e)}(t))return[...e.split(/\r\n|\r|\n/).map((e=>[{content:e}]))];const{_grammar:r}=function(e){const t=a.getGrammar(e);if(!t)throw Error(`No language registration for ${e}`);return{_grammar:t}}(t),{_theme:o,_colorMap:i}=u(n);return function(e,t,n,s,r){let a=n.split(/\r\n|\r|\n/),o=ee.INITIAL,i=[],l=[];for(let n=0,c=a.length;n<c;n++){let c,u,p,d=a[n];if(""===d){i=[],l.push([]);continue}r.includeExplanation&&(c=s.tokenizeLine(d,o),u=c.tokens,p=0);let h=s.tokenizeLine2(d,o),m=h.tokens.length/2;for(let n=0;n<m;n++){let s=h.tokens[2*n],a=n+1<m?h.tokens[2*n+2]:d.length;if(s===a)continue;let o=h.tokens[2*n+1],l=t[ie.getForeground(o)],c=ie.getFontStyle(o),g=[];if(r.includeExplanation){let t=0;for(;s+t<a;){let n=u[p],s=d.substring(n.startIndex,n.endIndex);t+=s.length,g.push({content:s,scopes:Ee(e,n.scopes)}),p++}}i.push({content:d.substring(s,a),color:l,fontStyle:c,explanation:g})}l.push(i),i=[],o=h.ruleStack}return l}(o,i,e,r,s)}function d(e,t){const{_theme:n}=u(t);return function(e,t){const n=t.split(/\r?\n/),s=We(Object.fromEntries(Be.map((t=>[t,e.colors[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]])))),r=function(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let a=0;do{const o=De(s,a),i=o.sequence?s.substring(a,o.startPosition):s.substring(a);if(i.length>0&&r.push({value:i,foreground:e,background:t,decorations:new Set(n)}),o.sequence){const s=Fe(o.sequence);for(const r of s)"resetAll"===r.type?(e=null,t=null,n.clear()):"resetForegroundColor"===r.type?e=null:"resetBackgroundColor"===r.type?t=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of s)"setForegroundColor"===r.type?e=r.value:"setBackgroundColor"===r.type?t=r.value:"setDecoration"===r.type&&n.add(r.value)}a=o.position}while(a<s.length);return r}}}();return n.map((t=>r.parse(t).map((t=>{let n;n=t.decorations.has("reverse")?t.background?s.value(t.background):e.bg:t.foreground?s.value(t.foreground):e.fg,t.decorations.has("dim")&&(n=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map((e=>`${e}${e}`)).join("")}80`}const n=e.match(/var\((--shiki-color-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(n));let r=oe.None;return t.decorations.has("bold")&&(r|=oe.Bold),t.decorations.has("italic")&&(r|=oe.Italic),t.decorations.has("underline")&&(r|=oe.Underline),{content:t.value,color:n,fontStyle:r}}))))}(n,e)}return{codeToThemedTokens:p,codeToHtml:function(e,t="text",n){let s;s="object"==typeof t?t:{lang:t,theme:n};const r=p(e,s.lang,s.theme,{includeExplanation:!1}),{_theme:a}=u(s.theme);return Ve(r,{fg:a.fg,bg:a.bg,lineOptions:s?.lineOptions,themeName:a.name})},ansiToThemedTokens:d,ansiToHtml:function(e,t){const n=d(e,t?.theme),{_theme:s}=u(t?.theme);return Ve(n,{fg:s.fg,bg:s.bg,lineOptions:t?.lineOptions,themeName:s.name})},getTheme:e=>u(e)._theme,loadTheme:async function(e){await a.loadTheme(e)},loadLanguage:async function(e){const t=He(e);r.addLanguage(t),await a.loadLanguage(t)},getBackgroundColor:function(e){const{_theme:t}=u(e);return t.bg},getForegroundColor:function(e){const{_theme:t}=u(e);return t.fg},getLoadedThemes:function(){return a.getLoadedThemes()},getLoadedLanguages:function(){return a.getLoadedLanguages()},setColorReplacements:function(e){c=e}}}var Je=o(888),Xe=Object.prototype.hasOwnProperty;const Qe=new WeakMap,Ye=()=>{},Ze=Ye(),et=Object,tt=e=>e===Ze,nt=e=>"function"==typeof e,st=(e,t)=>({...e,...t}),rt=e=>nt(e.then),at={},ot={},it="undefined",lt=typeof window!=it,ct=typeof document!=it,ut=lt&&"Deno"in window,pt=(e,t)=>{const n=Qe.get(e);return[()=>!tt(t)&&e.get(t)||at,s=>{if(!tt(t)){const r=e.get(t);t in ot||(ot[t]=r),n[5](t,st(r,s),r||at)}},n[6],()=>!tt(t)&&t in ot?ot[t]:!tt(t)&&e.get(t)||at]};let dt=!0;const[ht,mt]=lt&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ye,Ye],gt={isOnline:()=>dt,isVisible:()=>{const e=ct&&document.visibilityState;return tt(e)||"hidden"!==e}},ft={initFocus:e=>(ct&&document.addEventListener("visibilitychange",e),ht("focus",e),()=>{ct&&document.removeEventListener("visibilitychange",e),mt("focus",e)}),initReconnect:e=>{const t=()=>{dt=!0,e()},n=()=>{dt=!1};return ht("online",t),ht("offline",n),()=>{mt("online",t),mt("offline",n)}}},yt=!R.useId,_t=!lt||ut,bt=_t?R.useEffect:R.useLayoutEffect,vt="undefined"!=typeof navigator&&navigator.connection,wt=!_t&&vt&&(["slow-2g","2g"].includes(vt.effectiveType)||vt.saveData),kt=new WeakMap,St=(e,t)=>e===`[object ${t}]`;let Nt=0;const xt=e=>{const t=typeof e,n=(s=e,et.prototype.toString.call(s));var s;const r=St(n,"Date"),a=St(n,"RegExp"),o=St(n,"Object");let i,l;if(et(e)!==e||r||a)i=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(i=kt.get(e),i)return i;if(i=++Nt+"~",kt.set(e,i),Array.isArray(e)){for(i="@",l=0;l<e.length;l++)i+=xt(e[l])+",";kt.set(e,i)}if(o){i="#";const t=et.keys(e).sort();for(;!tt(l=t.pop());)tt(e[l])||(i+=l+":"+xt(e[l])+",");kt.set(e,i)}}return i},jt=e=>{if(nt(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?xt(e):"",t]};let Pt=0;const Ct=()=>++Pt;async function Lt(...e){const[t,n,s,r]=e,a=st({populateCache:!0,throwOnError:!0},"boolean"==typeof r?{revalidate:r}:r||{});let o=a.populateCache;const i=a.rollbackOnError;let l=a.optimisticData;const c=a.throwOnError;if(nt(n)){const e=n,s=[],r=t.keys();for(const n of r)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&s.push(n);return Promise.all(s.map(u))}return u(n);async function u(n){const[r]=jt(n);if(!r)return;const[u,p]=pt(t,r),[d,h,m,g]=Qe.get(t),f=()=>{const e=d[r];return(nt(a.revalidate)?a.revalidate(u().data,n):!1!==a.revalidate)&&(delete m[r],delete g[r],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return f();let y,_=s,b=!1;const v=Ct();h[r]=[v,0];const w=!tt(l),k=u(),S=k.data,N=k._c,x=tt(N)?S:N;if(w&&(l=nt(l)?l(x,S):l,p({data:l,_c:x})),nt(_))try{_=_(x)}catch(e){y=e,b=!0}if(_&&rt(_)){if(_=await _.catch((e=>{y=e,b=!0})),v!==h[r][0]){if(b)throw y;return _}b&&w&&(e=>"function"==typeof i?i(e):!1!==i)(y)&&(o=!0,p({data:x,_c:Ze}))}if(o&&!b)if(nt(o)){const e=o(_,x);p({data:e,error:Ze,_c:Ze})}else p({data:_,error:Ze,_c:Ze});if(h[r][1]=Ct(),Promise.resolve(f()).then((()=>{p({_c:Ze})})),!b)return _;if(c)throw y}}const Tt=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},At=(e,t)=>{if(!Qe.has(e)){const n=st(ft,t),s=Object.create(null),r=Lt.bind(Ze,e);let a=Ye;const o=Object.create(null),i=(e,t)=>{const n=o[e]||[];return o[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,s)=>{e.set(t,n);const r=o[t];if(r)for(const e of r)e(n,s)},c=()=>{if(!Qe.has(e)&&(Qe.set(e,[s,Object.create(null),Object.create(null),Object.create(null),r,l,i]),!_t)){const t=n.initFocus(setTimeout.bind(Ze,Tt.bind(Ze,s,0))),r=n.initReconnect(setTimeout.bind(Ze,Tt.bind(Ze,s,1)));a=()=>{t&&t(),r&&r(),Qe.delete(e)}}};return c(),[e,r,c,a]}return[e,Qe.get(e)[4]]},[Et,Ot]=At(new Map),Rt=st({onLoadingSlow:Ye,onSuccess:Ye,onError:Ye,onErrorRetry:(e,__,t,n,s)=>{const r=t.errorRetryCount,a=s.retryCount,o=~~((Math.random()+.5)*(1<<(a<8?a:8)))*t.errorRetryInterval;!tt(r)&&a>r||setTimeout(n,o,s)},onDiscarded:Ye,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:wt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:wt?5e3:3e3,compare:function e(t,n){var s,r;if(t===n)return!0;if(t&&n&&(s=t.constructor)===n.constructor){if(s===Date)return t.getTime()===n.getTime();if(s===RegExp)return t.toString()===n.toString();if(s===Array){if((r=t.length)===n.length)for(;r--&&e(t[r],n[r]););return-1===r}if(!s||"object"==typeof t){for(s in r=0,t){if(Xe.call(t,s)&&++r&&!Xe.call(n,s))return!1;if(!(s in n)||!e(t[s],n[s]))return!1}return Object.keys(n).length===r}}return t!=t&&n!=n},isPaused:()=>!1,cache:Et,mutate:Ot,fallback:{}},gt),It=(e,t)=>{const n=st(e,t);if(t){const{use:s,fallback:r}=e,{use:a,fallback:o}=t;s&&a&&(n.use=s.concat(a)),r&&o&&(n.fallback=st(r,o))}return n},Bt=(0,R.createContext)({}),Mt=lt&&window.__SWR_DEVTOOLS_USE__,Dt=Mt?window.__SWR_DEVTOOLS_USE__:[],Gt=e=>nt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Ft=Dt.concat((e=>(t,n,s)=>e(t,n&&((...e)=>{const[s]=jt(t),[,,,r]=Qe.get(Et);if(s.startsWith("$inf$"))return n(...e);const a=r[s];return tt(a)?n(...e):(delete r[s],a)}),s)));Mt&&(window.__SWR_DEVTOOLS_REACT__=R);const $t=()=>{};$t(),new WeakMap;const Wt=R.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e}}),Ut={dedupe:!0},Vt=Promise.resolve(Ze),zt=()=>Ye,qt=(et.defineProperty((e=>{const{value:t}=e,n=(0,R.useContext)(Bt),s=nt(t),r=(0,R.useMemo)((()=>s?t(n):t),[s,n,t]),a=(0,R.useMemo)((()=>s?r:It(n,r)),[s,n,r]),o=r&&r.provider,i=(0,R.useRef)(Ze);o&&!i.current&&(i.current=At(o(a.cache||Et),r));const l=i.current;return l&&(a.cache=l[0],a.mutate=l[1]),bt((()=>{if(l)return l[2]&&l[2](),l[3]}),[]),(0,R.createElement)(Bt.Provider,st(e,{value:a}))}),"defaultValue",{value:Rt}),Ht=(e,t,n)=>{const{cache:s,compare:r,suspense:a,fallbackData:o,revalidateOnMount:i,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:p,keepPreviousData:d,strictServerPrefetchWarning:h}=n,[m,g,f,y]=Qe.get(s),[_,b]=jt(e),v=(0,R.useRef)(!1),w=(0,R.useRef)(!1),k=(0,R.useRef)(_),S=(0,R.useRef)(t),N=(0,R.useRef)(n),x=()=>N.current,j=()=>x().isVisible()&&x().isOnline(),[P,C,L,T]=pt(s,_),A=(0,R.useRef)({}).current,E=tt(o)?tt(n.fallback)?Ze:n.fallback[_]:o,O=(e,t)=>{for(const n in A){const s=n;if("data"===s){if(!r(e[s],t[s])){if(!tt(e[s]))return!1;if(!r(U,t[s]))return!1}}else if(t[s]!==e[s])return!1}return!0},I=!v.current,B=(0,R.useMemo)((()=>{const e=P(),n=T(),s=e=>{const n=st(e);delete n._k;const s=(()=>{if(!_)return!1;if(!t)return!1;if(x().isPaused())return!1;if(I&&!tt(i))return i;const e=tt(E)?n.data:E;return tt(e)||l})();return s?{isValidating:!0,isLoading:!0,...n}:n},r=s(e),a=e===n?r:s(n);let o=r;return[()=>{const e=s(P());return O(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]}),[s,_]),M=(0,Je.useSyncExternalStore)((0,R.useCallback)((e=>L(_,((t,n)=>{O(n,t)||e()}))),[s,_]),B[0],B[1]),D=m[_]&&m[_].length>0,G=M.data,F=tt(G)?E&&rt(E)?Wt(E):E:G,$=M.error,W=(0,R.useRef)(F),U=d?tt(G)?tt(W.current)?F:W.current:G:F,V=_&&tt(F),z=(0,R.useRef)(null);!_t&&(0,Je.useSyncExternalStore)(zt,(()=>(z.current=!1,z)),(()=>(z.current=!0,z)));const q=z.current;h&&q&&!a&&V&&console.warn(`Missing pre-initiated data for serialized key "${_}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const H=!(!_||!t)&&!x().isPaused()&&!(D&&!tt($))&&(I&&!tt(i)?i:a?!tt(F)&&l:tt(F)||l),K=I&&H,J=tt(M.isValidating)?K:M.isValidating,X=tt(M.isLoading)?K:M.isLoading,Q=(0,R.useCallback)((async e=>{const t=S.current;if(!_||!t||w.current||x().isPaused())return!1;let s,a,o=!0;const i=e||{},l=!f[_]||!i.dedupe,c=()=>yt?!w.current&&_===k.current&&v.current:_===k.current,u={isValidating:!1,isLoading:!1},p=()=>{C(u)},d=()=>{const e=f[_];e&&e[1]===a&&delete f[_]},h={isValidating:!0};tt(P().data)&&(h.isLoading=!0);try{if(l&&(C(h),n.loadingTimeout&&tt(P().data)&&setTimeout((()=>{o&&c()&&x().onLoadingSlow(_,n)}),n.loadingTimeout),f[_]=[t(b),Ct()]),[s,a]=f[_],s=await s,l&&setTimeout(d,n.dedupingInterval),!f[_]||f[_][1]!==a)return l&&c()&&x().onDiscarded(_),!1;u.error=Ze;const e=g[_];if(!tt(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return p(),l&&c()&&x().onDiscarded(_),!1;const i=P().data;u.data=r(i,s)?i:s,l&&c()&&x().onSuccess(s,_,n)}catch(e){d();const t=x(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,_,t),(!0===n||nt(n)&&n(e))&&(x().revalidateOnFocus&&x().revalidateOnReconnect&&!j()||t.onErrorRetry(e,_,t,(e=>{const t=m[_];t&&t[0]&&t[0](3,e)}),{retryCount:(i.retryCount||0)+1,dedupe:!0}))))}return o=!1,p(),!0}),[_,s]),Y=(0,R.useCallback)(((...e)=>Lt(s,k.current,...e)),[]);if(bt((()=>{S.current=t,N.current=n,tt(G)||(W.current=G)})),bt((()=>{if(!_)return;const e=Q.bind(Ze,Ut);let t=0;if(x().revalidateOnFocus){const e=Date.now();t=e+x().focusThrottleInterval}const n=((e,t,n)=>{const s=t[e]||(t[e]=[]);return s.push(n),()=>{const e=s.indexOf(n);e>=0&&(s[e]=s[s.length-1],s.pop())}})(_,m,((n,s={})=>{if(0==n){const n=Date.now();x().revalidateOnFocus&&n>t&&j()&&(t=n+x().focusThrottleInterval,e())}else if(1==n)x().revalidateOnReconnect&&j()&&e();else{if(2==n)return Q();if(3==n)return Q(s)}}));return w.current=!1,k.current=_,v.current=!0,C({_k:b}),H&&(f[_]||(tt(F)||_t?e():(s=e,lt&&typeof window.requestAnimationFrame!=it?window.requestAnimationFrame(s):setTimeout(s,1)))),()=>{w.current=!0,n()};var s}),[_]),bt((()=>{let e;function t(){const t=nt(c)?c(P().data):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){P().error||!u&&!x().isVisible()||!p&&!x().isOnline()?t():Q(Ut).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[c,u,p,_]),(0,R.useDebugValue)(U),a){if(!yt&&_t&&V)throw new Error("Fallback data is required when using Suspense in SSR.");V&&(S.current=t,N.current=n,w.current=!1);const e=y[_],s=!tt(e)&&V?Y(e):Vt;if(Wt(s),!tt($)&&V)throw $;const r=V?Q(Ut):Vt;!tt(U)&&V&&(r.status="fulfilled",r.value=!0),Wt(r)}return{mutate:Y,get data(){return A.data=!0,U},get error(){return A.error=!0,$},get isValidating(){return A.isValidating=!0,J},get isLoading(){return A.isLoading=!0,X}}},function(...e){const t=(()=>{const e=(0,R.useContext)(Bt);return(0,R.useMemo)((()=>st(Rt,e)),[e])})(),[n,s,r]=Gt(e),a=It(t,r);let o=Ht;const{use:i}=a,l=(i||[]).concat(Ft);for(let e=l.length;e--;)o=l[e](o);return o(n,s||a.fetcher||null,a)});var Ht;const Kt=((e,t)=>(...n)=>{const[s,r,a]=Gt(n),o=(a.use||[]).concat(t);return e(s,r,{...a,use:o})})(qt,(e=>(t,n,s)=>(s.revalidateOnFocus=!1,s.revalidateIfStale=!1,s.revalidateOnReconnect=!1,s.refreshInterval=0,e(t,n,s)))),Jt=({theme:e,lang:t,ready:n})=>{if(!n)throw new Error;return Ke({langs:[t],theme:e})};let Xt=!1;const Qt=({theme:e,lang:t,ready:n=!0})=>{const[s,r]=(0,T.useState)(!1);var a;Xt||(Xt=!0,a=window.patternCss?.pluginUrl+"build/shiki/",we=a.endsWith("/")?a:a+"/");const{data:o,error:i}=Kt({theme:e,lang:t,ready:n&&s},Jt);return(0,T.useEffect)((()=>{const e=window.patternCss?.pluginUrl+"build/shiki/";fetch(e+"dist/onig.wasm").then((e=>e.arrayBuffer())).then((e=>{ke=e,r(!0)}))}),[]),{highlighter:o,error:i,loading:!o&&!i||!s}},Yt=window.ReactJSXRuntime,Zt=(0,T.forwardRef)(((e,t)=>{const n=(0,T.useRef)(null),{value:s,onChange:r,onFocus:a,onBlur:o,lineOptions:i=[],...l}=e,{highlighter:c,error:u,loading:p}=Qt({theme:"light-plus",lang:"css"});return p?(0,Yt.jsx)("div",{className:"flex h-full min-h-52 items-center justify-center p-4 text-gray-900",children:"Loading..."}):u?(0,Yt.jsx)("p",{children:u.message}):(0,Yt.jsx)("div",{ref:n,className:"",children:(0,Yt.jsx)(Y(),{ref:t,value:(0,X.decodeEntities)(s),className:"h-full font-jetbrains-mono",onValueChange:r,...l,padding:{top:6,bottom:6,left:8,right:8},style:{minHeight:300,backgroundColor:"none",color:c?.getForegroundColor()??"#000"},onKeyDown:e=>"Tab"===e.key&&n.current?.querySelector("textarea")?.focus(),onFocus:a,onBlur:o,highlight:e=>c?.codeToHtml((0,X.decodeEntities)(e),{lang:"css",lineOptions:i})?.replace(/<\/?[pre|code][^>]*>/g,"")})})})),en=({handleChange:e,popoutOpen:t,setPopoutOpen:n,globalEditorOpen:s,setGlobalEditorOpen:r,editorWrapperRef:a})=>{const[o,i]=(0,T.useState)(!1),{getSelectedBlockClientId:l}=(0,C.useSelect)((e=>e(j.store)),[]),{toggleBlockHighlight:c}=(0,C.useDispatch)(j.store),u=l();return(0,T.useEffect)((()=>{const e=setTimeout((()=>{c(u,!1).then((()=>{i(!1)}))}),1e3);return()=>{clearTimeout(e),o&&c(u,!1)}}),[o,c,u]),(0,Yt.jsxs)("div",{className:"flex justify-between border border-t-0 border-solid border-gray-600 text-xs text-gray-900",children:[s?(0,Yt.jsx)("div",{}):(0,Yt.jsx)(P.Tooltip,{text:(0,A.__)("Open Global Styles Editor","pattern-css"),children:(0,Yt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>r(!0),className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
     1(()=>{var e,t,n,s,r={69:function(e,t,n){"use strict";var s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},i=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var l=o(n(609)),c="undefined"!=typeof window&&"navigator"in window&&/Win/i.test(navigator.platform),u="undefined"!=typeof window&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),p="npm__react-simple-code-editor__textarea",d="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(p,":empty {\n  -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n  /**\n    * IE doesn't support '-webkit-text-fill-color'\n    * So we use 'color: transparent' to make the text transparent on IE\n    * Unlike other browsers, it doesn't affect caret color in IE\n    */\n  .").concat(p," {\n    color: transparent !important;\n  }\n\n  .").concat(p,"::selection {\n    background-color: #accef7 !important;\n    color: transparent !important;\n  }\n}\n"),h=l.forwardRef((function(e,t){var n=e.autoFocus,r=e.disabled,a=e.form,o=e.highlight,h=e.ignoreTabKey,g=void 0!==h&&h,f=e.insertSpaces,y=void 0===f||f,_=e.maxLength,b=e.minLength,v=e.name,w=e.onBlur,k=e.onClick,S=e.onFocus,N=e.onKeyDown,x=e.onKeyUp,j=e.onValueChange,P=e.padding,C=void 0===P?0:P,L=e.placeholder,T=e.preClassName,A=e.readOnly,E=e.required,O=e.style,R=e.tabSize,I=void 0===R?2:R,B=e.textareaClassName,M=e.textareaId,D=e.value,G=i(e,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),F=l.useRef({stack:[],offset:-1}),$=l.useRef(null),W=l.useState(!0),U=W[0],V=W[1],z={paddingTop:"object"==typeof C?C.top:C,paddingRight:"object"==typeof C?C.right:C,paddingBottom:"object"==typeof C?C.bottom:C,paddingLeft:"object"==typeof C?C.left:C},q=o(D),H=function(e,t){return e.substring(0,t).split("\n")},K=l.useCallback((function(e,t){var n,r,a;void 0===t&&(t=!1);var o=F.current,i=o.stack,l=o.offset;if(i.length&&l>-1){F.current.stack=i.slice(0,l+1);var c=F.current.stack.length;if(c>100){var u=c-100;F.current.stack=i.slice(u,c),F.current.offset=Math.max(F.current.offset-u,0)}}var p=Date.now();if(t){var d=F.current.stack[F.current.offset];if(d&&p-d.timestamp<3e3){var h=/[^a-z0-9]([a-z0-9]+)$/i,m=null===(n=H(d.value,d.selectionStart).pop())||void 0===n?void 0:n.match(h),g=null===(r=H(e.value,e.selectionStart).pop())||void 0===r?void 0:r.match(h);if((null==m?void 0:m[1])&&(null===(a=null==g?void 0:g[1])||void 0===a?void 0:a.startsWith(m[1])))return void(F.current.stack[F.current.offset]=s(s({},e),{timestamp:p}))}}F.current.stack.push(s(s({},e),{timestamp:p})),F.current.offset++}),[]),J=l.useCallback((function(){var e=$.current;if(e){var t=e.value,n=e.selectionStart,s=e.selectionEnd;K({value:t,selectionStart:n,selectionEnd:s})}}),[K]),X=function(e){var t=$.current;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,null==j||j(e.value))},Q=function(e){var t=$.current,n=F.current.stack[F.current.offset];n&&t&&(F.current.stack[F.current.offset]=s(s({},n),{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),K(e),X(e)};return l.useEffect((function(){J()}),[J]),l.useImperativeHandle(t,(function(){return{get session(){return{history:F.current}},set session(e){F.current=e.history}}}),[]),l.createElement("div",s({},G,{style:s(s({},m.container),O)}),l.createElement("pre",s({className:T,"aria-hidden":"true",style:s(s(s({},m.editor),m.highlight),z)},"string"==typeof q?{dangerouslySetInnerHTML:{__html:q+"<br />"}}:{children:q})),l.createElement("textarea",{ref:function(e){return $.current=e},style:s(s(s({},m.editor),m.textarea),z),className:p+(B?" ".concat(B):""),id:M,value:D,onChange:function(e){var t=e.currentTarget,n=t.value,s=t.selectionStart,r=t.selectionEnd;K({value:n,selectionStart:s,selectionEnd:r},!0),j(n)},onKeyDown:function(e){if(!N||(N(e),!e.defaultPrevented)){"Escape"===e.key&&e.currentTarget.blur();var t=e.currentTarget,n=t.value,s=t.selectionStart,r=t.selectionEnd,a=(y?" ":"\t").repeat(I);if("Tab"===e.key&&!g&&U)if(e.preventDefault(),e.shiftKey){var o=(d=H(n,s)).length-1,i=H(n,r).length-1,l=n.split("\n").map((function(e,t){return t>=o&&t<=i&&e.startsWith(a)?e.substring(a.length):e})).join("\n");if(n!==l){var p=d[o];Q({value:l,selectionStart:(null==p?void 0:p.startsWith(a))?s-a.length:s,selectionEnd:r-(n.length-l.length)})}}else if(s!==r){var d,h=(d=H(n,s)).length-1,m=H(n,r).length-1;p=d[h],Q({value:n.split("\n").map((function(e,t){return t>=h&&t<=m?a+e:e})).join("\n"),selectionStart:p&&/\S/.test(p)?s+a.length:s,selectionEnd:r+a.length*(m-h+1)})}else{var f=s+a.length;Q({value:n.substring(0,s)+a+n.substring(r),selectionStart:f,selectionEnd:f})}else if("Backspace"===e.key){var _=s!==r;n.substring(0,s).endsWith(a)&&!_&&(e.preventDefault(),f=s-a.length,Q({value:n.substring(0,s-a.length)+n.substring(r),selectionStart:f,selectionEnd:f}))}else if("Enter"===e.key){if(s===r){var b=H(n,s).pop(),v=null==b?void 0:b.match(/^\s+/);if(null==v?void 0:v[0]){e.preventDefault();var w="\n"+v[0];f=s+w.length,Q({value:n.substring(0,s)+w+n.substring(r),selectionStart:f,selectionEnd:f})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var k=void 0;57===e.keyCode&&e.shiftKey?k=["(",")"]:219===e.keyCode?k=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?k=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(k=["`","`"]),s!==r&&k&&(e.preventDefault(),Q({value:n.substring(0,s)+k[0]+n.substring(s,r)+k[1]+n.substring(r),selectionStart:s,selectionEnd:r+2}))}else!(u?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(u?e.metaKey&&90===e.keyCode&&e.shiftKey:c?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),function(){var e=F.current,t=e.stack,n=e.offset,s=t[n+1];s&&(X(s),F.current.offset=Math.min(n+1,t.length-1))}()):77!==e.keyCode||!e.ctrlKey||u&&!e.shiftKey||(e.preventDefault(),V((function(e){return!e}))):(e.preventDefault(),function(){var e=F.current,t=e.stack,n=e.offset,s=t[n-1];s&&(X(s),F.current.offset=Math.max(n-1,0))}())}},onClick:k,onKeyUp:x,onFocus:S,onBlur:w,disabled:r,form:a,maxLength:_,minLength:b,name:v,placeholder:L,readOnly:A,required:E,autoFocus:n,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("style",{dangerouslySetInnerHTML:{__html:d}}))})),m={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};t.default=h},493:(e,t,n)=>{"use strict";var s=n(609),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=s.useState,o=s.useEffect,i=s.useLayoutEffect,l=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),s=a({inst:{value:n,getSnapshot:t}}),r=s[0].inst,u=s[1];return i((function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})}),[e,n,t]),o((function(){return c(r)&&u({inst:r}),e((function(){c(r)&&u({inst:r})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:u},888:(e,t,n)=>{"use strict";e.exports=n(493)},486:function(e){var t;t=()=>{return e={770:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;const r=s(n(418));let a=null,o=!1;class i{static _utf8ByteLength(e){let t=0;for(let n=0,s=e.length;n<s;n++){const r=e.charCodeAt(n);let a=r,o=!1;if(r>=55296&&r<=56319&&n+1<s){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=65536+(r-55296<<10)|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}constructor(e){const t=e.length,n=i._utf8ByteLength(e),s=n!==t,r=s?new Uint32Array(t+1):null;s&&(r[t]=n);const a=s?new Uint32Array(n+1):null;s&&(a[n]=t);const o=new Uint8Array(n);let l=0;for(let n=0;n<t;n++){const i=e.charCodeAt(n);let c=i,u=!1;if(i>=55296&&i<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(i-55296<<10)|t-56320,u=!0)}s&&(r[n]=l,u&&(r[n+1]=l),c<=127?a[l+0]=n:c<=2047?(a[l+0]=n,a[l+1]=n):c<=65535?(a[l+0]=n,a[l+1]=n,a[l+2]=n):(a[l+0]=n,a[l+1]=n,a[l+2]=n,a[l+3]=n)),c<=127?o[l++]=c:c<=2047?(o[l++]=192|(1984&c)>>>6,o[l++]=128|(63&c)>>>0):c<=65535?(o[l++]=224|(61440&c)>>>12,o[l++]=128|(4032&c)>>>6,o[l++]=128|(63&c)>>>0):(o[l++]=240|(1835008&c)>>>18,o[l++]=128|(258048&c)>>>12,o[l++]=128|(4032&c)>>>6,o[l++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=a}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class l{constructor(e){if(this.id=++l.LAST_ID,!a)throw new Error("Must invoke loadWASM first.");this._onigBinding=a,this.content=e;const t=new i(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!l._sharedPtrInUse?(l._sharedPtr||(l._sharedPtr=a._omalloc(1e4)),l._sharedPtrInUse=!0,a.HEAPU8.set(t.utf8Value,l._sharedPtr),this.ptr=l._sharedPtr):this.ptr=t.createString(a)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===l._sharedPtr?l._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=l,l.LAST_ID=0,l._sharedPtr=0,l._sharedPtrInUse=!1;class c{constructor(e){if(!a)throw new Error("Must invoke loadWASM first.");const t=[],n=[];for(let s=0,r=e.length;s<r;s++){const r=new i(e[s]);t[s]=r.createString(a),n[s]=r.utf8Length}const s=a._omalloc(4*e.length);a.HEAPU32.set(t,s/4);const r=a._omalloc(4*e.length);a.HEAPU32.set(n,r/4);const o=a._createOnigScanner(s,r,e.length);for(let n=0,s=e.length;n<s;n++)a._ofree(t[n]);a._ofree(r),a._ofree(s),0===o&&function(e){throw new Error(e.UTF8ToString(e._getLastOnigError()))}(a),this._onigBinding=a,this._ptr=o}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let s=o,r=0;if("number"==typeof n?(8&n&&(s=!0),r=n):"boolean"==typeof n&&(s=n),"string"==typeof e){e=new l(e);const n=this._findNextMatchSync(e,t,s,r);return e.dispose(),n}return this._findNextMatchSync(e,t,s,r)}_findNextMatchSync(e,t,n,s){const r=this._onigBinding;let a;if(a=n?r._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),s):r._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),s),0===a)return null;const o=r.HEAPU32;let i=a/4;const l=o[i++],c=o[i++];let u=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(o[i++]),s=e.convertUtf8OffsetToUtf16(o[i++]);u[t]={start:n,end:s,length:s-n}}return{index:l,captureIndices:u}}}t.OnigScanner=c;let u=!1,p=null;t.loadWASM=function(e){if(u)return p;let t,n,s,o;if(u=!0,function(e){return"function"==typeof e.instantiator}(e))t=e.instantiator,n=e.print;else{let s;!function(e){return void 0!==e.data}(e)?s=e:(s=e.data,n=e.print),t=function(e){return"undefined"!=typeof Response&&e instanceof Response}(s)?"function"==typeof WebAssembly.instantiateStreaming?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(s):function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(s):function(e){return t=>WebAssembly.instantiate(e,t)}(s)}return p=new Promise(((e,t)=>{s=e,o=t})),function(e,t,n,s){(0,r.default)({print:t,instantiateWasm:(t,n)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),s),{}}}).then((e=>{a=e,n()}))}(t,n,s,o),p},t.createOnigString=function(e){return new l(e)},t.createOnigScanner=function(e){return new c(e)},t.setDefaultDebugCall=function(e){o=e}},418:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n,s=void 0!==(e=e||{})?e:{};s.ready=new Promise((function(e,s){t=e,n=s}));var r,a=Object.assign({},s),o=[];r=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),function(e){e||C(void 0)}("object"==typeof t),t)},"undefined"!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var i,l,c=s.print||console.log.bind(console),u=s.printErr||console.warn.bind(console);Object.assign(s,a),a=null,s.arguments&&(o=s.arguments),s.thisProgram&&s.thisProgram,s.quit&&s.quit,s.wasmBinary&&(i=s.wasmBinary),s.noExitRuntime,"object"!=typeof WebAssembly&&C("no native wasm support detected");var p,d,h,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,n){for(var s=t+n,r=t;e[r]&&!(r>=s);)++r;if(r-t>16&&e.buffer&&g)return g.decode(e.subarray(t,r));for(var a="";t<r;){var o=e[t++];if(128&o){var i=63&e[t++];if(192!=(224&o)){var l=63&e[t++];if((o=224==(240&o)?(15&o)<<12|i<<6|l:(7&o)<<18|i<<12|l<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var c=o-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|i)}else a+=String.fromCharCode(o)}return a}function y(e){p=e,s.HEAP8=new Int8Array(e),s.HEAP16=new Int16Array(e),s.HEAP32=new Int32Array(e),s.HEAPU8=d=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAPU32=h=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e)}s.INITIAL_MEMORY;var _=[],b=[],v=[];function w(e){_.unshift(e)}function k(e){v.unshift(e)}var S,N,x=0,j=null,P=null;function C(e){s.onAbort&&s.onAbort(e),u(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function L(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){try{if(e==S&&i)return new Uint8Array(i);if(r)return r(e);throw"both async and sync fetching of the wasm failed"}catch(e){C(e)}}function A(e){for(;e.length>0;)e.shift()(s)}function E(e){try{return l.grow(e-p.byteLength+65535>>>16),y(l.buffer),1}catch(e){}}L(S="onig.wasm")||(S=function(e){return s.locateFile?s.locateFile(e,""):""+e}(S)),N="undefined"!=typeof dateNow?dateNow:()=>performance.now();var O=[null,[],[]];function R(e,t){var n=O[e];0===t||10===t?((1===e?c:u)(f(n,0)),n.length=0):n.push(t)}var I,B={emscripten_get_now:N,emscripten_memcpy_big:function(e,t,n){d.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n=d.length,s=2147483648;if((e>>>=0)>s)return!1;for(var r=1;r<=4;r*=2){var a=n*(1+.2/r);if(a=Math.min(a,e+100663296),E(Math.min(s,(t=Math.max(e,a))+(65536-t%65536)%65536)))return!0}return!1},fd_write:function(e,t,n,s){for(var r=0,a=0;a<n;a++){var o=h[t>>2],i=h[t+4>>2];t+=8;for(var l=0;l<i;l++)R(e,d[o+l]);r+=i}return h[s>>2]=r,0}};function M(e){function n(){I||(I=!0,s.calledRun=!0,m||(A(b),t(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),function(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)k(s.postRun.shift());A(v)}()))}e=e||o,x>0||(function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)w(s.preRun.shift());A(_)}(),x>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),n()}),1)):n()))}if(function(){var e={env:B,wasi_snapshot_preview1:B};function t(e,t){var n=e.exports;s.asm=n,y((l=s.asm.memory).buffer),s.asm.__indirect_function_table,function(e){b.unshift(e)}(s.asm.__wasm_call_ctors),function(){if(x--,s.monitorRunDependencies&&s.monitorRunDependencies(x),0==x&&(null!==j&&(clearInterval(j),j=null),P)){var e=P;P=null,e()}}()}function r(e){t(e.instance)}function a(t){return Promise.resolve().then((function(){return T(S)})).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){u("failed to asynchronously prepare wasm: "+e),C(e)}))}if(x++,s.monitorRunDependencies&&s.monitorRunDependencies(x),s.instantiateWasm)try{return s.instantiateWasm(e,t)}catch(e){u("Module.instantiateWasm callback failed with error: "+e),n(e)}(i||"function"!=typeof WebAssembly.instantiateStreaming||L(S)||"function"!=typeof fetch?a(r):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),a(r)}))}))).catch(n)}(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.__wasm_call_ctors).apply(null,arguments)},s.___errno_location=function(){return(s.___errno_location=s.asm.__errno_location).apply(null,arguments)},s._omalloc=function(){return(s._omalloc=s.asm.omalloc).apply(null,arguments)},s._ofree=function(){return(s._ofree=s.asm.ofree).apply(null,arguments)},s._getLastOnigError=function(){return(s._getLastOnigError=s.asm.getLastOnigError).apply(null,arguments)},s._createOnigScanner=function(){return(s._createOnigScanner=s.asm.createOnigScanner).apply(null,arguments)},s._freeOnigScanner=function(){return(s._freeOnigScanner=s.asm.freeOnigScanner).apply(null,arguments)},s._findNextOnigScannerMatch=function(){return(s._findNextOnigScannerMatch=s.asm.findNextOnigScannerMatch).apply(null,arguments)},s._findNextOnigScannerMatchDbg=function(){return(s._findNextOnigScannerMatchDbg=s.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},s.stackSave=function(){return(s.stackSave=s.asm.stackSave).apply(null,arguments)},s.stackRestore=function(){return(s.stackRestore=s.asm.stackRestore).apply(null,arguments)},s.stackAlloc=function(){return(s.stackAlloc=s.asm.stackAlloc).apply(null,arguments)},s.dynCall_jiji=function(){return(s.dynCall_jiji=s.asm.dynCall_jiji).apply(null,arguments)},s.UTF8ToString=function(e,t){return e?f(d,e,t):""},P=function e(){I||M(),I||(P=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return M(),e.ready});e.exports=t}},t={},function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s].call(a.exports,a,a.exports,n),a.exports}(770);var e,t},e.exports=t()},217:function(e){e.exports=(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},36:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=void 0,(n=t.EncodedTokenAttributes||(t.EncodedTokenAttributes={})).toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},n.print=function(e){const t=n.getLanguageId(e),s=n.getTokenType(e),r=n.getFontStyle(e),a=n.getForeground(e),o=n.getBackground(e);console.log({languageId:t,tokenType:s,fontStyle:r,foreground:a,background:o})},n.getLanguageId=function(e){return(255&e)>>>0},n.getTokenType=function(e){return(768&e)>>>8},n.containsBalancedBrackets=function(e){return!!(1024&e)},n.getFontStyle=function(e){return(30720&e)>>>11},n.getForeground=function(e){return(16744448&e)>>>15},n.getBackground=function(e){return(4278190080&e)>>>24},n.set=function(e,t,s,r,a,o,i){let l=n.getLanguageId(e),c=n.getTokenType(e),u=n.containsBalancedBrackets(e)?1:0,p=n.getFontStyle(e),d=n.getForeground(e),h=n.getBackground(e);return 0!==t&&(l=t),8!==s&&(c=s),null!==r&&(u=r?1:0),-1!==a&&(p=a),0!==o&&(d=o),0!==i&&(h=i),(l|c<<8|u<<10|p<<11|d<<15|h<<24)>>>0},t.toOptionalTokenType=function(e){return e}},996:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;const s=n(878);class r{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=r;class a{constructor(e,t){this._getBasicScopeAttributes=new s.CachedFn((e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new r(t,n)})),this._defaultAttributes=new r(e,8),this._embeddedLanguagesMatcher=new o(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?a._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(a.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}t.BasicScopeAttributesProvider=a,a._NULL_SCOPE_METADATA=new r(0,0),a.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class o{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>s.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},947:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LineTokens=t.BalancedBracketSelectors=t.StateStack=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;const s=n(350),r=n(36),a=n(736),o=n(44),i=n(792),l=n(583),c=n(878),u=n(996),p=n(47);function d(e,t,n,s,r){const o=a.createMatchers(t,h),l=i.RuleFactory.getCompiledRuleId(n,s,r.repository);for(const n of o)e.push({debugSelector:t,matcher:n.matcher,ruleId:l,grammar:r,priority:n.priority})}function h(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let s=n;s<t.length;s++)if(m(t[s],e))return n=s+1,!0;return!1}))}function m(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}t.createGrammar=function(e,t,n,s,r,a,o,i){return new g(e,t,n,s,r,a,o,i)};class g{constructor(e,t,n,s,r,o,i,l){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=f(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const e of Object.keys(r)){const t=a.createMatchers(e,h);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:r[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){const s=n.injections;if(s)for(let t in s)d(e,t,s[t],this,n);const r=this._grammarRepository.injections(t);r&&r.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&d(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),s.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(`  - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,n=e(i.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[i.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=f(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){let a;if(-1===this._rootId&&(this._rootId=i.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==_.NULL)a=!1,t.reset();else{a=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),s=r.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let i;i=o?y.createRootAndLookUpScopeName(o,s,this):y.createRoot("unknown",s),t=new _(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const l=this.createOnigString(e),c=l.content.length,u=new b(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=p._tokenizeString(this,l,a,0,t,u,!0,s);return o.disposeOnigString(l),{lineLength:c,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}}function f(e,t){return(e=c.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=g;class y{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static createRoot(e,t){return new y(null,new l.ScopeStack(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const s=n.getMetadataForScope(e),r=new l.ScopeStack(null,e),a=n.themeProvider.themeMatch(r),o=y.mergeAttributes(t,s,a);return new y(null,r,o)}get scopeName(){return this.scopePath.scopeName}equals(e){return y._equals(this,e)}static _equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let s=-1,a=0,o=0;return null!==n&&(s=n.fontStyle,a=n.foregroundId,o=n.backgroundId),r.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,s,a,o)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return y._pushAttributed(this,e,t);const n=e.split(/ /g);let s=this;for(const e of n)s=y._pushAttributed(s,e,t);return s}static _pushAttributed(e,t,n){const s=n.getMetadataForScope(t),r=e.scopePath.push(t),a=n.themeProvider.themeMatch(r),o=y.mergeAttributes(e.tokenAttributes,s,a);return new y(e,r,o)}getScopeNames(){return this.scopePath.getSegments()}}t.AttributedScopeStack=y;class _{constructor(e,t,n,s,r,a,o,i){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=i,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=s}equals(e){return null!==e&&_._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){_._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,s,r,a,o){return new _(this,e,t,n,s,r,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new _(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}}t.StateStack=_,_.NULL=new _(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):a.createMatchers(e,h).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>a.createMatchers(e,h).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class b{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,s.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e.tokenAttributes,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e.getScopeNames();for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=r.EncodedTokenAttributes.set(n,0,r.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(t))}if(a&&(n=r.EncodedTokenAttributes.set(n,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(s.DebugFlags.InDebugMode){const n=e.getScopeNames();console.log("  token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log("      * "+n[e])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}const n=e.getScopeNames();if(s.DebugFlags.InDebugMode){console.log("  token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log("      * "+n[e])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=b},965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;const s=n(878);class r{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=r;class a{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=a;class o{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function i(e,t,n,s){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof r?c({baseGrammar:o,selfGrammar:a},s):l(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},s);const i=n.injections(e.scopeName);if(i)for(const e of i)s.add(new r(e))}function l(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function c(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(const o of e){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);const e=o.repository?s.mergeObjects({},t.repository,o.repository):t.repository;Array.isArray(o.patterns)&&u(o.patterns,{...t,repository:e},n);const i=o.include;if(!i)continue;const p=f(i);switch(p.kind){case 0:c({...t,selfGrammar:t.baseGrammar},n);break;case 1:c(t,n);break;case 2:l(p.ruleName,{...t,repository:e},n);break;case 3:case 4:const s=p.scopeName===t.selfGrammar.scopeName?t.selfGrammar:p.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===p.kind?l(p.ruleName,r,n):c(r,n)}else 4===p.kind?n.add(new a(p.scopeName,p.ruleName)):n.add(new r(p.scopeName))}}}t.ExternalReferenceCollector=o,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new r(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new o;for(const n of e)i(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof r){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class p{constructor(){this.kind=0}}t.BaseReference=p;class d{constructor(){this.kind=1}}t.SelfReference=d;class h{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=h;class m{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=m;class g{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function f(e){if("$base"===e)return new p;if("$self"===e)return new d;const t=e.indexOf("#");if(-1===t)return new m(e);if(0===t)return new h(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new g(n,s)}}t.TopLevelRepositoryReference=g,t.parseInclude=f},391:function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(947),t)},47:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;const s=n(350),r=n(44),a=n(792),o=n(878);class i{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function l(e,t,n,r,l,p,h,m){const g=t.content.length;let f=!1,y=-1;if(h){const o=function(e,t,n,r,o,i){let l=o.beginRuleCapturedEOL?0:-1;const c=[];for(let t=o;t;t=t.pop()){const n=t.getRule(e);n instanceof a.BeginWhileRule&&c.push({rule:n,stack:t})}for(let p=c.pop();p;p=c.pop()){const{ruleScanner:c,findOptions:h}=u(p.rule,e,p.stack.endRule,n,r===l),m=c.findNextMatchSync(t,r,h);if(s.DebugFlags.InDebugMode&&(console.log("  scanning for while rule"),console.log(c.toString())),!m){s.DebugFlags.InDebugMode&&console.log("  popping "+p.rule.debugName+" - "+p.rule.debugWhileRegExp),o=p.stack.pop();break}if(m.ruleId!==a.whileRuleId){o=p.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(p.stack,m.captureIndices[0].start),d(e,t,n,p.stack,i,p.rule.whileCaptures,m.captureIndices),i.produce(p.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}return{stack:o,linePos:r,anchorPosition:l,isFirstLine:n}}(e,t,n,r,l,p);l=o.stack,r=o.linePos,n=o.isFirstLine,y=o.anchorPosition}const _=Date.now();for(;!f;){if(0!==m&&Date.now()-_>m)return new i(l,!0);b()}return new i(l,!1);function b(){s.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${r}: |${t.content.substr(r).replace(/\n$/,"\\n")}|`));const i=function(e,t,n,r,a,i){const l=function(e,t,n,r,a,i){const l=a.getRule(e),{ruleScanner:u,findOptions:p}=c(l,e,a.endRule,n,r===i);let d=0;s.DebugFlags.InDebugMode&&(d=o.performanceNow());const h=u.findNextMatchSync(t,r,p);if(s.DebugFlags.InDebugMode){const e=o.performanceNow()-d;e>5&&console.warn(`Rule ${l.debugName} (${l.id}) matching took ${e} against '${t}'`),console.log(`  scanning for (linePos: ${r}, anchorPosition: ${i})`),console.log(u.toString()),h&&console.log(`matched rule id: ${h.ruleId} from ${h.captureIndices[0].start} to ${h.captureIndices[0].end}`)}return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}(e,t,n,r,a,i),u=e.getInjections();if(0===u.length)return l;const p=function(e,t,n,r,a,o,i){let l,u=Number.MAX_VALUE,p=null,d=0;const h=o.contentNameScopesList.getScopeNames();for(let o=0,m=e.length;o<m;o++){const m=e[o];if(!m.matcher(h))continue;const g=t.getRule(m.ruleId),{ruleScanner:f,findOptions:y}=c(g,t,null,r,a===i),_=f.findNextMatchSync(n,a,y);if(!_)continue;s.DebugFlags.InDebugMode&&(console.log(`  matched injection: ${m.debugSelector}`),console.log(f.toString()));const b=_.captureIndices[0].start;if(!(b>=u)&&(u=b,p=_.captureIndices,l=_.ruleId,d=m.priority,u===a))break}return p?{priorityMatch:-1===d,captureIndices:p,matchedRuleId:l}:null}(u,e,t,n,r,a,i);if(!p)return l;if(!l)return p;const d=l.captureIndices[0].start,h=p.captureIndices[0].start;return h<d||p.priorityMatch&&h===d?p:l}(e,t,n,r,l,y);if(!i)return s.DebugFlags.InDebugMode&&console.log("  no more matches."),p.produce(l,g),void(f=!0);const u=i.captureIndices,h=i.matchedRuleId,m=!!(u&&u.length>0)&&u[0].end>r;if(h===a.endRuleId){const a=l.getRule(e);s.DebugFlags.InDebugMode&&console.log("  popping "+a.debugName+" - "+a.debugEndRegExp),p.produce(l,u[0].start),l=l.withContentNameScopesList(l.nameScopesList),d(e,t,n,l,p,a.endCaptures,u),p.produce(l,u[0].end);const o=l;if(l=l.parent,y=o.getAnchorPos(),!m&&o.getEnterPos()===r)return s.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),l=o,p.produce(l,g),void(f=!0)}else{const o=e.getRule(h);p.produce(l,u[0].start);const i=l,c=o.getName(t.content,u),_=l.contentNameScopesList.pushAttributed(c,e);if(l=l.push(h,r,y,u[0].end===g,null,_,_),o instanceof a.BeginEndRule){const r=o;s.DebugFlags.InDebugMode&&console.log("  pushing "+r.debugName+" - "+r.debugBeginRegExp),d(e,t,n,l,p,r.beginCaptures,u),p.produce(l,u[0].end),y=u[0].end;const a=r.getContentName(t.content,u),c=_.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),r.endHasBackReferences&&(l=l.withEndRule(r.getEndWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return s.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),p.produce(l,g),void(f=!0)}else if(o instanceof a.BeginWhileRule){const r=o;s.DebugFlags.InDebugMode&&console.log("  pushing "+r.debugName),d(e,t,n,l,p,r.beginCaptures,u),p.produce(l,u[0].end),y=u[0].end;const a=r.getContentName(t.content,u),c=_.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),r.whileHasBackReferences&&(l=l.withEndRule(r.getWhileWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return s.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),p.produce(l,g),void(f=!0)}else{const r=o;if(s.DebugFlags.InDebugMode&&console.log("  matched "+r.debugName+" - "+r.debugMatchRegExp),d(e,t,n,l,p,r.captures,u),p.produce(l,u[0].end),l=l.pop(),!m)return s.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),l=l.safePop(),p.produce(l,g),void(f=!0)}}u[0].end>r&&(r=u[0].end,n=!1)}}function c(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:p(r,a)}:{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function u(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:p(r,a)}:{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function p(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function d(e,t,n,s,a,o,i){if(0===o.length)return;const c=t.content,u=Math.min(o.length,i.length),p=[],d=i[0].end;for(let t=0;t<u;t++){const u=o[t];if(null===u)continue;const m=i[t];if(0===m.length)continue;if(m.start>d)break;for(;p.length>0&&p[p.length-1].endPos<=m.start;)a.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?a.produceFromScopes(p[p.length-1].scopes,m.start):a.produce(s,m.start),u.retokenizeCapturedWithRuleId){const t=u.getName(c,i),o=s.contentNameScopesList.pushAttributed(t,e),p=u.getContentName(c,i),d=o.pushAttributed(p,e),h=s.push(u.retokenizeCapturedWithRuleId,m.start,-1,!1,null,o,d),g=e.createOnigString(c.substring(0,m.end));l(e,g,n&&0===m.start,m.start,h,a,!1,0),r.disposeOnigString(g);continue}const g=u.getName(c,i);if(null!==g){const t=(p.length>0?p[p.length-1].scopes:s.contentNameScopesList).pushAttributed(g,e);p.push(new h(t,m.end))}}for(;p.length>0;)a.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}t._tokenizeString=l;class h{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=h},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,o){let i=new s(e),l=new r,c=0,u=null,p=[],d=[];function h(){p.push(c),d.push(u)}function m(){c=p.pop(),u=d.pop()}function g(e){n(i,e)}for(;a(i,l);){if(0===c){if(null!==u&&g("too many constructs in root"),3===l.type){u={},o&&(u.$vscodeTextmateLocation=l.toLocation(t)),h(),c=1;continue}if(2===l.type){u=[],h(),c=4;continue}g("unexpected token in root")}if(2===c){if(5===l.type){m();continue}if(7===l.type){c=3;continue}g("expected , or }")}if(1===c||3===c){if(1===c&&5===l.type){m();continue}if(1===l.type){let e=l.value;if(a(i,l)&&6===l.type||g("expected colon"),a(i,l)||g("expected value"),c=2,1===l.type){u[e]=l.value;continue}if(8===l.type){u[e]=null;continue}if(9===l.type){u[e]=!0;continue}if(10===l.type){u[e]=!1;continue}if(11===l.type){u[e]=parseFloat(l.value);continue}if(2===l.type){let t=[];u[e]=t,h(),c=4,u=t;continue}if(3===l.type){let n={};o&&(n.$vscodeTextmateLocation=l.toLocation(t)),u[e]=n,h(),c=1,u=n;continue}}g("unexpected token in dict")}if(5===c){if(4===l.type){m();continue}if(7===l.type){c=6;continue}g("expected , or ]")}if(4===c||6===c){if(4===c&&4===l.type){m();continue}if(c=5,1===l.type){u.push(l.value);continue}if(8===l.type){u.push(null);continue}if(9===l.type){u.push(!0);continue}if(10===l.type){u.push(!1);continue}if(11===l.type){u.push(parseFloat(l.value));continue}if(2===l.type){let e=[];u.push(e),h(),c=4,u=e;continue}if(3===l.type){let e={};o&&(e.$vscodeTextmateLocation=l.toLocation(t)),u.push(e),h(),c=1,u=e;continue}g("unexpected token in array")}g("unknown state")}return 0!==d.length&&g("unclosed constructs"),u};class s{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class r{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function a(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let s,r=e.source,a=e.pos,o=e.len,i=e.line,l=e.char;for(;;){if(a>=o)return!1;if(s=r.charCodeAt(a),32!==s&&9!==s&&13!==s){if(10!==s)break;a++,i++,l=0}else a++,l++}if(t.offset=a,t.line=i,t.char=l,34===s){for(t.type=1,a++,l++;;){if(a>=o)return!1;if(s=r.charCodeAt(a),a++,l++,92!==s){if(34===s)break}else a++,l++}t.value=r.substring(t.offset+1,a-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,s)=>{switch(s){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===s)t.type=2,a++,l++;else if(123===s)t.type=3,a++,l++;else if(93===s)t.type=4,a++,l++;else if(125===s)t.type=5,a++,l++;else if(58===s)t.type=6,a++,l++;else if(44===s)t.type=7,a++,l++;else if(110===s){if(t.type=8,a++,l++,s=r.charCodeAt(a),117!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;a++,l++}else if(116===s){if(t.type=9,a++,l++,s=r.charCodeAt(a),114!==s)return!1;if(a++,l++,s=r.charCodeAt(a),117!==s)return!1;if(a++,l++,s=r.charCodeAt(a),101!==s)return!1;a++,l++}else if(102===s){if(t.type=10,a++,l++,s=r.charCodeAt(a),97!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;if(a++,l++,s=r.charCodeAt(a),115!==s)return!1;if(a++,l++,s=r.charCodeAt(a),101!==s)return!1;a++,l++}else for(t.type=11;;){if(a>=o)return!1;if(s=r.charCodeAt(a),!(46===s||s>=48&&s<=57||101===s||69===s||45===s||43===s))break;a++,l++}return t.len=a-t.offset,null===t.value&&(t.value=r.substr(t.offset,t.len)),e.pos=a,e.line=i,e.char=l,!0}},787:function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;const a=n(391),o=n(50),i=n(652),l=n(583),c=n(965);r(n(44),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new i.SyncRegistry(l.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(l.Theme.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new a.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,s,r){const a=new c.ScopeDependencyProcessor(this._syncRegistry,e);for(;a.Q.length>0;)await Promise.all(a.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),a.processQueue();return this._grammarForScopeName(e,t,n,s,r)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,s=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,s)}_grammarForScopeName(e,t=0,n=null,s=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,s,r)}},t.INITIAL=a.StateStack.NULL,t.parseRawGrammar=o.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){const s=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}(e);let a=r.next();for(;null!==a;){let e=0;if(2===a.length&&":"===a.charAt(1)){switch(a.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let t=i();if(s.push({matcher:t,priority:e}),","!==a)break;a=r.next()}return s;function o(){if("-"===a){a=r.next();const e=o();return t=>!!e&&!e(t)}if("("===a){a=r.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===a||","===a);){do{a=r.next()}while("|"===a||","===a);t=i()}return t=>e.some((e=>e(t)))}();return")"===a&&(a=r.next()),e}if(n(a)){const e=[];do{e.push(a),a=r.next()}while(n(a));return n=>t(e,n)}return null}function i(){const e=[];let t=o();for(;t;)e.push(t),t=o();return t=>e.every((e=>e(t)))}}},44:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){"function"==typeof e.dispose&&e.dispose()}},50:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;const s=n(69),r=n(350),a=n(974);t.parseRawGrammar=function(e,t=null){return null!==t&&/\.json$/.test(t)?(n=e,o=t,r.DebugFlags.InDebugMode?a.parseJSON(n,o,!0):JSON.parse(n)):function(e,t){return r.DebugFlags.InDebugMode?s.parseWithLocation(e,t,"$vscodeTextmateLocation"):s.parsePLIST(e)}(e,t);var n,o}},69:(e,t)=>{function n(e,t,n){const s=e.length;let r=0,a=1,o=0;function i(t){if(null===n)r+=t;else for(;t>0;)10===e.charCodeAt(r)?(r++,a++,o=0):(r++,o++),t--}function l(e){null===n?r=e:i(e-r)}function c(){for(;r<s;){let t=e.charCodeAt(r);if(32!==t&&9!==t&&13!==t&&10!==t)break;i(1)}}function u(t){return e.substr(r,t.length)===t&&(i(t.length),!0)}function p(t){let n=e.indexOf(t,r);l(-1!==n?n+t.length:s)}function d(t){let n=e.indexOf(t,r);if(-1!==n){let s=e.substring(r,n);return l(n+t.length),s}{let t=e.substr(r);return l(s),t}}s>0&&65279===e.charCodeAt(0)&&(r=1);let h=0,m=null,g=[],f=[],y=null;function _(e,t){g.push(h),f.push(m),h=e,m=t}function b(){if(0===g.length)return v("illegal state stack");h=g.pop(),m=f.pop()}function v(t){throw new Error("Near offset "+r+": "+t+" ~~~"+e.substr(r,50)+"~~~")}const w=function(){if(null===y)return v("missing <key>");let e={};null!==n&&(e[n]={filename:t,line:a,char:o}),m[y]=e,y=null,_(1,e)},k=function(){if(null===y)return v("missing <key>");let e=[];m[y]=e,y=null,_(2,e)},S=function(){let e={};null!==n&&(e[n]={filename:t,line:a,char:o}),m.push(e),_(1,e)},N=function(){let e=[];m.push(e),_(2,e)};function x(){if(1!==h)return v("unexpected </dict>");b()}function j(){return 1===h||2!==h?v("unexpected </array>"):void b()}function P(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function C(e){if(isNaN(e))return v("cannot parse float");if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function L(e){if(isNaN(e))return v("cannot parse integer");if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function T(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function A(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function E(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function O(){let e=d(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function R(e){if(e.isClosed)return"";let t=d("</");return p(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return e}))}for(;r<s&&(c(),!(r>=s));){const l=e.charCodeAt(r);if(i(1),60!==l)return v("expected <");if(r>=s)return v("unexpected end of input");const d=e.charCodeAt(r);if(63===d){i(1),p("?>");continue}if(33===d){if(i(1),u("--")){p("--\x3e");continue}p(">");continue}if(47===d){if(i(1),c(),u("plist")){p(">");continue}if(u("dict")){p(">"),x();continue}if(u("array")){p(">"),j();continue}return v("unexpected closed tag")}let g=O();switch(g.name){case"dict":1===h?w():2===h?S():(m={},null!==n&&(m[n]={filename:t,line:a,char:o}),_(1,m)),g.isClosed&&x();continue;case"array":1===h?k():2===h?N():(m=[],_(2,m)),g.isClosed&&j();continue;case"key":I=R(g),1!==h?v("unexpected <key>"):null!==y?v("too many <key>"):y=I;continue;case"string":P(R(g));continue;case"real":C(parseFloat(R(g)));continue;case"integer":L(parseInt(R(g),10));continue;case"date":T(new Date(R(g)));continue;case"data":A(R(g));continue;case"true":R(g),E(!0);continue;case"false":R(g),E(!1);continue}if(!/^plist/.test(g.name))return v("unexpected opened tag "+g.name)}var I;return m}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,s){return n(e,t,s)},t.parsePLIST=function(e){return n(e,null,null)}},652:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;const s=n(391);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,s.createGrammar(e,o,t,n,r,a,this,await this._onigLibPromise))}return this._grammars.get(e)}}},792:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;const s=n(878),r=n(965),a=/\\(\d+)/,o=/\\(\d+)/g;Symbol("RuleId"),t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class i{constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=s.RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=s.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${s.basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?s.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?s.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=i;class l extends i{constructor(e,t,n,s,r){super(e,t,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,s){throw new Error("Not supported!")}}t.CaptureRule=l;class c extends i{constructor(e,t,n,s,r){super(e,t,n,null),this._match=new m(s,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=c;class u extends i{constructor(e,t,n,s,r){super(e,t,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class p extends i{constructor(e,t,n,s,r,a,o,i,l,c){super(e,t,n,s),this._begin=new m(r,this.id),this.beginCaptures=a,this._end=new m(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}t.BeginEndRule=p;class d extends i{constructor(e,n,s,r,a,o,i,l,c){super(e,n,s,r),this._begin=new m(a,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new m(i,t.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new g,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=d;class h{static createCaptureRule(e,t,n,s,r){return e.registerRule((e=>new l(t,e,n,s,r)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((r=>{if(e.id=r,e.match)return new c(e.$vscodeTextmateLocation,e.id,e.name,e.match,h._compileCaptures(e.captures,t,n));if(void 0===e.begin){e.repository&&(n=s.mergeObjects({},n,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,h._compilePatterns(r,t,n))}return e.while?new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,h._compileCaptures(e.whileCaptures||e.captures,t,n),h._compilePatterns(e.patterns,t,n)):new p(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,h._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,h._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let s=[];if(e){let r=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>r&&(r=e)}for(let e=0;e<=r;e++)s[e]=null;for(const r in e){if("$vscodeTextmateLocation"===r)continue;const a=parseInt(r,10);let o=0;e[r].patterns&&(o=h.getCompiledRuleId(e[r],t,n)),s[a]=h.createCaptureRule(t,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,o)}}return s}static _compilePatterns(e,t,n){let s=[];if(e)for(let a=0,o=e.length;a<o;a++){const o=e[a];let i=-1;if(o.include){const e=r.parseInclude(o.include);switch(e.kind){case 0:case 1:i=h.getCompiledRuleId(n[o.include],t,n);break;case 2:let s=n[e.ruleName];s&&(i=h.getCompiledRuleId(s,t,n));break;case 3:case 4:const r=e.scopeName,a=4===e.kind?e.ruleName:null,l=t.getExternalGrammar(r,n);if(l)if(a){let e=l.repository[a];e&&(i=h.getCompiledRuleId(e,t,l.repository))}else i=h.getCompiledRuleId(l.repository.$self,t,l.repository)}}else i=h.getCompiledRuleId(o,t,n);if(-1!==i){const e=t.getRule(i);let n=!1;if((e instanceof u||e instanceof p||e instanceof d)&&e.hasMissingPatterns&&0===e.patterns.length&&(n=!0),n)continue;s.push(i)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}}t.RuleFactory=h;class m{constructor(e,t){if(e){const t=e.length;let n=0,s=[],r=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(s.push(e.substring(n,a)),s.push("$(?!\\n)(?<!\\n)"),n=a+2):"A"!==t&&"G"!==t||(r=!0),a++}this.hasAnchor=r,0===n?this.source=e:(s.push(e.substring(n,t)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=a.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return o.lastIndex=0,this.source.replace(o,((e,t)=>s.escapeRegExpCharacters(n[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,n,s,r=[],a=[],o=[],i=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,a[e]=n,o[e]=n,i[e]=n,"\\"===n&&e+1<t&&(s=this.source.charAt(e+1),"A"===s?(r[e+1]="￿",a[e+1]="￿",o[e+1]="A",i[e+1]="A"):"G"===s?(r[e+1]="￿",a[e+1]="G",o[e+1]="￿",i[e+1]="G"):(r[e+1]=s,a[e+1]=s,o[e+1]=s,i[e+1]=s),e++);return{A0_G0:r.join(""),A0_G1:a.join(""),A1_G0:o.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=m;class g{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map((e=>e.source));this._cached=new f(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map((e=>e.resolveAnchors(t,n)));return new f(e,s,this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=g;class f{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push("   - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}}t.CompiledRule=f},583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;const s=n(878);class r{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new s.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(l(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=s.strcmp(e.scope,t.scope);return 0!==n?n:(n=s.strArrCmp(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)}));let n=0,a="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(a=t.foreground),null!==t.background&&(o=t.background)}let l=new u(t),c=new i(n,l.getId(a),l.getId(o)),h=new d(new p(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];h.insert(0,n.scope,n.parentScopes,n.fontStyle,l.getId(n.foreground),l.getId(n.background))}return new r(l,c,h)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(null===t)return!0;let n=0,s=t[n];for(;e;){if(o(e.scopeName,s)){if(n++,n===t.length)return!0;s=t[n]}e=e.parent}return!1}(e.parent,t.parentScopes)));return n?new i(n.fontStyle,n.foreground,n.background):null}}t.Theme=r;class a{constructor(e,t){this.parent=e,this.scopeName=t}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new a(t,e[n]);return t}push(e){return new a(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}}function o(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}t.ScopeStack=a;class i{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}}function l(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,a=t.length;e<a;e++){let a,o=t[e];if(!o.settings)continue;if("string"==typeof o.scope){let e=o.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),a=e.split(",")}else a=Array.isArray(o.scope)?o.scope:[""];let i=-1;if("string"==typeof o.settings.fontStyle){i=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}let l=null;"string"==typeof o.settings.foreground&&s.isValidHexColor(o.settings.foreground)&&(l=o.settings.foreground);let u=null;"string"==typeof o.settings.background&&s.isValidHexColor(o.settings.background)&&(u=o.settings.background);for(let t=0,s=a.length;t<s;t++){let s=a[t].trim().split(" "),o=s[s.length-1],p=null;s.length>1&&(p=s.slice(0,s.length-1),p.reverse()),n[r++]=new c(o,p,e,i,l,u)}}return n}t.StyleAttributes=i,t.parseTheme=l;class c{constructor(e,t,n,s,r,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=a}}t.ParsedThemeRule=c,t.fontStyleToString=function(e){if(-1===e)return"not set";let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),""===t&&(t="none"),t.trim()};class u{constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}}t.ColorMap=u;class p{constructor(e,t,n,s,r){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=s,this.background=r}clone(){return new p(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==s&&(this.background=s)}}t.ThemeTrieElementRule=p;class d{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const n=e.parentScopes,s=t.parentScopes;let r=null===n?0:n.length,a=null===s?0:s.length;if(r===a)for(let e=0;e<r;e++){const t=n[e].length,r=s[e].length;if(t!==r)return r-t}return a-r}return t.scopeDepth-e.scopeDepth}match(e){if(""===e)return d._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));let t,n,s=e.indexOf(".");return-1===s?(t=e,n=""):(t=e.substring(0,s),n=e.substring(s+1)),this._children.hasOwnProperty(t)?this._children[t].match(n):d._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))}insert(e,t,n,s,r,a){if(""===t)return void this._doInsertHere(e,n,s,r,a);let o,i,l,c=t.indexOf(".");-1===c?(o=t,i=""):(o=t.substring(0,c),i=t.substring(c+1)),this._children.hasOwnProperty(o)?l=this._children[o]:(l=new d(this._mainRule.clone(),p.cloneArr(this._rulesWithParentScopes)),this._children[o]=l),l.insert(e+1,i,n,s,r,a)}_doInsertHere(e,t,n,r,a){if(null!==t){for(let o=0,i=this._rulesWithParentScopes.length;o<i;o++){let i=this._rulesWithParentScopes[o];if(0===s.strArrCmp(i.parentScopes,t))return void i.acceptOverwrite(e,n,r,a)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===a&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new p(e,t,n,r,a))}else this._mainRule.acceptOverwrite(e,n,r,a)}}t.ThemeTrieElement=d},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s<r;s++)t[s]=n(e[s]);return t}(e):"object"==typeof e?function(e){let t={};for(let s in e)t[s]=n(e[s]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let s=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function r(e,t){return e<t?-1:e>t?1:0}t.RegexSource=class{static hasCaptures(e){return null!==e&&(s.lastIndex=0,s.test(e))}static replaceCaptures(e,t,n){return e.replace(s,((e,s,r,a)=>{let o=n[parseInt(s||r,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}},t.strcmp=r,t.strArrCmp=function(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let s=0;s<n;s++){let n=r(e[s],t[s]);if(0!==n)return n}return 0}return n-s},t.isValidHexColor=function(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()}}},t={};return function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s].call(a.exports,a,a.exports,n),a.exports}(787)})()},229:(e,t,n)=>{"use strict";e.exports=n.p+"015f9d709daff9eb9473.wasm"},609:e=>{"use strict";e.exports=window.React},673:()=>{},485:()=>{}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e].call(n.exports,n,n.exports,o),n.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);o.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&s&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(r,a),r},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,n)=>(o.f[n](e,t),t)),[])),o.u=e=>e+".js?ver=d43e1cd3952f43f28e34",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},s="pattern-css:",o.l=(e,t,r,a)=>{if(n[e])n[e].push(t);else{var i,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var p=c[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==s+r){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",s+r),i.src=e),n[e]=[t];var d=(t,s)=>{i.onerror=i.onload=null,clearTimeout(h);var r=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),r&&r.forEach((e=>e(s))),t)return t(s)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={57:0};o.f.j=(t,n)=>{var s=o.o(e,t)?e[t]:void 0;if(0!==s)if(s)n.push(s[2]);else{var r=new Promise(((n,r)=>s=e[t]=[n,r]));n.push(s[2]=r);var a=o.p+o.u(t),i=new Error;o.l(a,(n=>{if(o.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var r=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",i.name="ChunkLoadError",i.type=r,i.request=a,s[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var s,r,[a,i,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(s in i)o.o(i,s)&&(o.m[s]=i[s]);l&&l(o)}for(t&&t(n);c<a.length;c++)r=a[c],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=globalThis.webpackChunkpattern_css=globalThis.webpackChunkpattern_css||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";const e=window.wp.apiFetch;var t=o.n(e);const n=window.wp.hooks,s=window.wp.plugins,r=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],a=[];class i{scopes=[];referenceId=1;references=new Map;deferred=[null];wrappedObjects=new WeakMap;externalObjects=new WeakMap;buffers=new Map;instanceData=0;pendingException=null;constructor(e){this.id=a.length,a.push(this),this.instance=e,this.table=e.exports.__indirect_function_table,this.exports={},this.pushScope();let t=this.scopes[this.scopes.length-1],n=t.length;t.push(this.exports);try{this.instance.exports.napi_register_module_v1&&this.instance.exports.napi_register_module_v1(this.id,n),this.instance.exports.napi_register_wasm_v1&&this.instance.exports.napi_register_wasm_v1(this.id,n)}finally{if(this.popScope(),this.pendingException){let e=this.pendingException;throw this.pendingException=null,e}}}destroy(){a[this.id]=void 0}getString(e,t=function(e,t){let n=0;for(;0!==e[t];)n++,t++;return n}(this.memory,e)){return l.decode(this.memory.subarray(e,Math.max(0,e+t)))}pushScope(){let e=this.scopes.length;return this.scopes.push(e?[...this.scopes[e-1]]:[void 0,null,globalThis,!0,!1]),e}popScope(){this.scopes.pop();for(let[e,t]of this.buffers)e.byteLength&&t.byteLength&&e.set(t);this.buffers.clear()}get(e){return this.scopes[this.scopes.length-1][e]}set(e,t){this.scopes[this.scopes.length-1][e]=t}pushValue(e,t=this.scopes.length-1){let n=this.scopes[t],s=n.length;return n.push(e),s}createValue(e,t,n){if("boolean"==typeof e)return this.setPointer(t,e?3:4),0;if(void 0===e)return this.setPointer(t,0),0;if(null===e)return this.setPointer(t,1),0;if(e===globalThis)return this.setPointer(t,2),0;let s=this.pushValue(e,n);return this.setPointer(t,s),0}setPointer(e,t){return this.u32[e>>2]=t,0}_u32=new Uint32Array;get u32(){return 0===this._u32.byteLength&&(this._u32=new Uint32Array(this.instance.exports.memory.buffer)),this._u32}_i32=new Int32Array;get i32(){return 0===this._i32.byteLength&&(this._i32=new Int32Array(this.instance.exports.memory.buffer)),this._i32}_u16=new Uint16Array;get u16(){return 0===this._u16.byteLength&&(this._u16=new Uint16Array(this.instance.exports.memory.buffer)),this._u16}_u64=new BigUint64Array;get u64(){return 0===this._u64.byteLength&&(this._u64=new BigUint64Array(this.instance.exports.memory.buffer)),this._u64}_i64=new BigInt64Array;get i64(){return 0===this._i64.byteLength&&(this._i64=new BigInt64Array(this.instance.exports.memory.buffer)),this._i64}_f64=new Float64Array;get f64(){return 0===this._f64.byteLength&&(this._f64=new Float64Array(this.instance.exports.memory.buffer)),this._f64}_buf=new Uint8Array;get memory(){return 0===this._buf.byteLength&&(this._buf=new Uint8Array(this.instance.exports.memory.buffer)),this._buf}getBufferInfo(e,t){if(this.buffers.has(e)){let n=this.buffers.get(e);return this.setPointer(t,n.byteOffset),n.byteLength}if(e instanceof ArrayBuffer){let n=this.copyBuffer(new Uint8Array(e));return this.setPointer(t,n.byteOffset),n.byteLength}if(e.buffer===this.instance.exports.memory.buffer)return this.setPointer(t,e.byteOffset),e.byteLength;let n=this.copyBuffer(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));return this.setPointer(t,n.byteOffset),n.byteLength}copyBuffer(e){let t=this.instance.exports.napi_wasm_malloc(e.byteLength),n=this.memory;n.set(e,t);let s=n.subarray(t,t+e.byteLength);return h.register(s,new d(this.id,((e,t)=>{this.instance.exports.napi_wasm_free&&this.instance.exports.napi_wasm_free(t)}),0,t)),this.buffers.set(e,s),s}createFunction(e,t){let n=this,s=n.table.get(e);return function(...e){let r=n.pushScope();try{let a=n.scopes[r],o=a.length;a.push({thisArg:this,args:e,data:t,newTarget:new.target});let i=s(n.id,o);return n.get(i)}finally{if(n.popScope(),n.pendingException){let e=n.pendingException;throw n.pendingException=null,e}}}}readPropertyDescriptor(e){let t=this.u32,n=t[e++],s=t[e++],r=t[e++],a=t[e++],o=t[e++],i=t[e++],l=t[e++],c=t[e++],u=n?this.getString(n):this.get(s),p=Boolean(1&l),d=Boolean(2&l),h=Boolean(4&l),m=Boolean(1024&l),g=a?this.createFunction(a,c):void 0,f=o?this.createFunction(o,c):void 0,y=r?this.createFunction(r,c):i?this.get(i):void 0,_={name:u,static:m,configurable:h,enumerable:d};return g||f?(_.get=g,_.set=f):y&&(_.writable=p,_.value=y),_}}const l=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),c=new TextDecoder("latin1"),u=new TextDecoder("utf-16"),p=new TextEncoder;class d{constructor(e,t,n,s){this.env=e,this.finalize=t,this.hint=n,this.data=s}}const h=new FinalizationRegistry((e=>{e.finalize&&e.finalize(e.env,e.data,e.hint)}));class m{}const g=[];class f{constructor(e,t,n,s){this.env=e,this.fn=t,this.nativeFn=n,this.context=s,this.id=g.length,g.push(this)}}const y=[null];class _{constructor(e,t,n,s){this.env=e,this.execute=t,this.complete=n,this.data=s,this.id=y.length,y.push(this)}}const b={napi_open_handle_scope(e,t){let n=a[e],s=n.pushScope();return n.setPointer(t,s)},napi_close_handle_scope(e,t){let n=a[e];return t!==n.scopes.length-1?13:(n.popScope(),0)},napi_open_escapable_handle_scope(e,t){let n=a[e],s=n.pushScope();return n.setPointer(t,s)},napi_close_escapable_handle_scope(e,t){let n=a[e];return t!==n.scopes.length-1?13:(n.popScope(),0)},napi_escape_handle(e,t,n,s){let r=a[e],o=r.get(n);return r.createValue(o,s,t-1)},napi_create_object:(e,t)=>a[e].createValue({},t),napi_set_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n),l=r.get(s);return o[i]=l,0},napi_get_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.createValue(o[i],s)},napi_delete_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n),l=!1;try{l=delete o[i]}catch(e){}return s&&(r.memory[s]=l?1:0),0},napi_has_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=i in o?1:0,0},napi_has_own_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=o.hasOwnProperty(i)?1:0,0},napi_set_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(s);return o[r.getString(n)]=i,0},napi_get_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.getString(n);return r.createValue(o[i],s)},napi_has_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.getString(n);return r.memory[s]=i in o?1:0,0},napi_get_property_names(e,t,n){let s=a[e],r=s.get(t),o=Object.keys(r);return s.createValue(o,n)},napi_get_all_property_names(e,t,n,s,r,a){throw new Error("not implemented")},napi_define_properties(e,t,n,s){let r=a[e],o=r.get(t),i=s>>2;for(let e=0;e<n;e++){let e=r.readPropertyDescriptor(i);Object.defineProperty(o,e.name,e),i+=8}return 0},napi_object_freeze(e,t){let n=a[e].get(t);return Object.freeze(n),0},napi_object_seal(e,t){let n=a[e].get(t);return Object.seal(n),0},napi_get_prototype(e,t,n){let s=a[e],r=s.get(t);return s.createValue(Object.getPrototypeOf(r),n)},napi_define_class(e,t,n,s,r,o,i,l){let c=a[e],u=c.createFunction(s,r);Object.defineProperty(u,"name",{value:c.getString(t,n),configurable:!0});let p=i>>2;for(let e=0;e<o;e++){let e=c.readPropertyDescriptor(p);e.static?Object.defineProperty(u,e.name,e):Object.defineProperty(u.prototype,e.name,e),p+=8}return c.createValue(u,l)},napi_create_reference(e,t,n,s){let r=a[e],o=r.referenceId++;return r.references.set(o,{value:r.get(t),refcount:n}),r.setPointer(s,o)},napi_delete_reference:(e,t)=>(a[e].references.delete(t),0),napi_get_reference_value(e,t,n){let s=a[e],r=s.references.get(t);return s.createValue(r.value,n)},napi_reference_ref(e,t,n){let s=a[e],r=s.references.get(t);return r.refcount++,s.setPointer(n,r.refcount)},napi_reference_unref(e,t,n){let s=a[e],r=s.references.get(t);return 0===r.refcount?9:(r.refcount--,s.setPointer(n,r.refcount))},napi_add_env_cleanup_hook:()=>0,napi_remove_env_cleanup_hook:()=>0,napi_add_async_cleanup_hook:()=>0,napi_remove_async_cleanup_hook:()=>0,napi_set_instance_data:(e,t,n,s)=>(a[e].instanceData=t,0),napi_get_instance_data(e,t){let n=a[e];return n.setPointer(t,n.instanceData)},napi_get_boolean:(e,t,n)=>a[e].setPointer(n,t?3:4),napi_get_value_bool(e,t,n){let s=a[e],r=s.get(t);return"boolean"!=typeof r?7:(s.memory[n]=r?1:0,0)},napi_create_int32:(e,t,n)=>a[e].createValue(t,n),napi_get_value_int32(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.i32[n>>2]=r,0)},napi_create_uint32:(e,t,n)=>a[e].createValue(t,n),napi_get_value_uint32(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:s.setPointer(n,r)},napi_create_int64:(e,t,n)=>a[e].createValue(Number(t),n),napi_get_value_int64(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.i64[n>>3]=r,0)},napi_create_double:(e,t,n)=>a[e].createValue(t,n),napi_get_value_double(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.f64[n>>3]=r,0)},napi_create_bigint_int64:(e,t,n)=>a[e].createValue(BigInt.asIntN(64,t),n),napi_get_value_bigint_int64(e,t,n,s){let r=a[e],o=r.get(t);return"bigint"!=typeof o?17:(r.i64[n>>3]=o,s&&(r.memory[s]=BigInt.asIntN(64,o)===o?1:0),0)},napi_create_bigint_uint64:(e,t,n)=>a[e].createValue(BigInt.asUintN(64,t),n),napi_get_value_bigint_uint64(e,t,n,s){let r=a[e],o=r.get(t);return"bigint"!=typeof o?17:(r.u64[n>>3]=o,s&&(r.memory[s]=BigInt.asUintN(64,o)===o?1:0),0)},napi_create_bigint_words(e,t,n,s,r){let o=a[e],i=o.u64,l=s>>3,c=0n,u=0n;for(let e=0;e<n;e++)c+=i[l++]<<u,u+=64n;return c*=BigInt((-1)**t),o.createValue(c,r)},napi_get_value_bigint_words(e,t,n,s,r){let o=a[e],i=o.get(t);if("bigint"!=typeof i)return 17;let l=o.u32[s>>2];n&&(o.i32[n]=i<0n?1:0);let c=0;if(r){let e=(1n<<64n)-1n,t=o.u64,n=r>>3;for(i<0n&&(i=-i);c<l&&0n!==i;c++)t[n++]=i&e,i>>=64n}for(;i>0n;)c++,i>>=64n;return o.setPointer(s,c)},napi_get_null:(e,t)=>a[e].setPointer(t,1),napi_create_array:(e,t)=>a[e].createValue([],t),napi_create_array_with_length:(e,t,n)=>a[e].createValue(new Array(t),n),napi_set_element(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(s);return o[n]=i,0},napi_get_element(e,t,n,s){let r=a[e],o=r.get(t)[n];return r.createValue(o,s)},napi_has_element(e,t,n,s){let r=a[e],o=r.get(t);return r.memory[s]=o.hasOwnProperty(n)?1:0,0},napi_delete_element(e,t,n,s){let r=a[e],o=r.get(t),i=!1;try{i=delete o[n]}catch(e){}return s&&(r.memory[s]=i?1:0),0},napi_get_array_length(e,t,n){let s=a[e],r=s.get(t);return s.setPointer(n,r.length)},napi_get_undefined:(e,t)=>a[e].setPointer(t,0),napi_create_function(e,t,n,s,r,o){let i=a[e],l=i.createFunction(s,r);return Object.defineProperty(l,"name",{value:i.getString(t,n),configurable:!0}),i.createValue(l,o)},napi_call_function(e,t,n,s,r,o){let i=a[e],l=i.get(t),c=i.get(n),u=new Array(s),p=i.u32;for(let e=0;e<s;e++)u[e]=i.get(p[r>>2]),r+=4;try{let e=c.apply(l,u);return i.createValue(e,o)}catch(e){return i.pendingException=e,10}},napi_new_instance(e,t,n,s,r){let o=a[e],i=o.get(t),l=new Array(n),c=o.u32;for(let e=0;e<n;e++)l[e]=o.get(c[s>>2]),s+=4;try{let e=new i(...l);return o.createValue(e,r)}catch(e){return o.pendingException=e,10}},napi_get_cb_info(e,t,n,s,r,o){let i=a[e],l=i.get(t);i.setPointer(n,l.args.length);for(let e=0;e<l.args.length;e++)i.createValue(l.args[e],s),s+=4;return i.createValue(l.thisArg,r),i.setPointer(o,l.data),0},napi_get_new_target(e,t,n){let s=a[e],r=s.get(t);return s.createValue(r.newTarget,n)},napi_create_threadsafe_function(e,t,n,s,r,o,i,l,c,u,p){let m=a[e],g=t?m.get(t):void 0,y=u?m.table.get(u):void 0,_=new f(m,g,y,c);if(l){let t=m.table.get(l);h.register(_,new d(e,t,0,_.id))}return m.setPointer(p,_.id),0},napi_ref_threadsafe_function:()=>0,napi_unref_threadsafe_function:()=>0,napi_acquire_threadsafe_function:()=>0,napi_release_threadsafe_function:(e,t)=>(g[e]=void 0,0),napi_call_threadsafe_function(e,t,n){let s=g[e];s.env.pushScope();try{if(s.nativeFn){let e=s.fn?s.env.pushValue(s.fn):0;s.nativeFn(s.env.id,e,s.context,t)}else s.fn&&s.fn()}finally{s.env.popScope()}},napi_get_threadsafe_function_context(e,t){let n=g[e];return n.env.setPointer(t,n.context),0},napi_create_async_work(e,t,n,s,r,o,i){let l=a[e],c=s?l.table.get(s):void 0,u=r?l.table.get(r):void 0,p=new _(l,c,u,o);return l.setPointer(i,p.id),0},napi_delete_async_work:(e,t)=>(y[t]=void 0,0),napi_queue_async_work:(e,t)=>(queueMicrotask((()=>{let n=y[t];n&&(n.execute(e,n.data),n.complete(e,0,n.data))})),0),napi_cancel_async_work(){let e=y[work];return e.complete(env,11,e.data),y[work]=void 0,0},napi_throw(e,t){let n=a[e];return n.pendingException=n.get(t),0},napi_throw_error(e,t,n){let s=a[e],r=new Error(s.getString(n));return r.code=t,s.pendingException=r,0},napi_throw_type_error(e,t,n){let s=a[e],r=new TypeError(s.getString(n));return r.code=t,s.pendingException=r,0},napi_throw_range_error(e,t,n){let s=a[e],r=new RangeError(s.getString(n));return r.code=t,s.pendingException=r,0},napi_create_error(e,t,n,s){let r=a[e],o=new Error(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_create_type_error(e,t,n,s){let r=a[e],o=new TypeError(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_create_range_error(e,t,n,s){let r=a[e],o=new RangeError(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_get_and_clear_last_exception(e,t){let n=a[e],s=n.pendingException;return n.pendingException=null,n.createValue(s,t)},napi_is_exception_pending(e,t){let n=a[e];return n.memory[t]=n.pendingException?1:0,0},napi_fatal_exception(e,t){throw new Error("not implemented")},napi_fatal_error(e,t,n,s){throw new Error("not implemented")},napi_get_global:(e,t)=>a[e].setPointer(t,2),napi_create_buffer(e,t,n,s){let r=a[e],o=r.instance.exports.napi_wasm_malloc(t);n&&r.setPointer(n,o);let i=void 0!==globalThis.Buffer?globalThis.Buffer.from(r.memory.buffer,o,t):r.memory.subarray(o,o+t);return h.register(i,new d(e,((e,t)=>{r.instance.exports.napi_wasm_free&&r.instance.exports.napi_wasm_free(t)}),0,o)),r.createValue(i,s)},napi_create_buffer_copy(e,t,n,s,r){let o=a[e],i=o.instance.exports.napi_wasm_malloc(t);o.memory.set(o.memory.subarray(n,n+t),i),s&&o.setPointer(s,i);let l=void 0!==globalThis.Buffer?globalThis.Buffer.from(o.memory.buffer,i,t):o.memory.subarray(i,i+t);return h.register(buf,new d(e,((e,t)=>{o.instance.exports.napi_wasm_free&&o.instance.exports.napi_wasm_free(t)}),0,i)),o.createValue(l,r)},napi_create_external_buffer(e,t,n,s,r,o){let i=a[e],l=void 0!==globalThis.Buffer?globalThis.Buffer.from(i.memory.buffer,n,t):i.memory.subarray(n,n+t);if(s){let t=i.table.get(s);h.register(l,new d(e,t,r,n))}return i.createValue(l,o)},napi_get_buffer_info(e,t,n,s){let r=a[e],o=r.get(t),i=r.getBufferInfo(o,n);return r.setPointer(s,i)},napi_create_arraybuffer(e,t,n,s){let r=a[e],o=new ArrayBuffer(t);return n&&r.getBufferInfo(o,n),r.createValue(o,s)},napi_create_external_arraybuffer:(e,t,n,s,r,a)=>22,napi_get_arraybuffer_info(e,t,n,s){let r=a[e],o=r.getBufferInfo(r.get(t),n);return r.setPointer(s,o)},napi_detach_arraybuffer(e,t){let n=a[e].get(t);return"function"==typeof structuredClone&&structuredClone(n,{transfer:[n]}),0},napi_is_detached_arraybuffer(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=0===r.byteLength?1:0,0},napi_create_typedarray(e,t,n,s,o,i){let l=a[e],c=new(0,r[t])(l.get(s),o,n);return l.createValue(c,i)},napi_create_dataview(e,t,n,s,r){let o=a[e],i=o.get(n),l=new DataView(i,s,t);return o.createValue(l,r)},napi_get_typedarray_info(e,t,n,s,o,i,l){let c=a[e],u=c.get(t);return c.setPointer(n,r.findIndex((e=>u instanceof e))),c.setPointer(s,u.length),c.getBufferInfo(u,o),c.createValue(u.buffer,i),c.setPointer(l,u.byteOffset)},napi_get_dataview_info(e,t,n,s,r,o){let i=a[e],l=i.get(t);return i.setPointer(n,l.byteLength),i.getBufferInfo(l,s),i.createValue(l.buffer,r),i.setPointer(o,l.byteOffset)},napi_create_string_utf8(e,t,n,s){let r=a[e],o=l.decode(r.memory.subarray(t,t+n));return r.createValue(o,s)},napi_get_value_string_utf8(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,function(e){let t=0;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&n<e.length-1){let t=e.charCodeAt(++n);56320==(64512&t)?s=((1023&s)<<10)+(1023&t)+65536:n--}4294967168&s?4294965248&s?4294901760&s?4292870144&s||(t+=4):t+=3:t+=2:t++}return t}(i));let l=p.encodeInto(i,o.memory.subarray(n,n+s-1));return o.memory[n+l.written]=0,o.setPointer(r,l.written)},napi_create_string_latin1(e,t,n,s){let r=a[e],o=c.decode(r.memory.subarray(t,t+n));return r.createValue(o,s)},napi_get_value_string_latin1(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,i.length);let l=o.memory,c=Math.min(i.length,s-1);for(let e=0;e<c;e++){let t=i.charCodeAt(e);l[n++]=t}return l[n]=0,o.setPointer(r,c)},napi_create_string_utf16(e,t,n,s){let r=a[e],o=u.decode(r.memory.subarray(t,t+2*n));return r.createValue(o,s)},napi_get_value_string_utf16(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,i.length);let l=o.u16,c=n>>1,u=Math.min(i.length,s-1);for(let e=0;e<u;e++){let t=i.charCodeAt(e);l[c++]=t}return l[c]=0,o.setPointer(r,u)},napi_create_date:(e,t,n)=>a[e].createValue(new Date(t),n),napi_get_date_value(e,t,n){let s=a[e],r=s.get(t);s.f64[n>>3]=r.valueOf()},napi_create_symbol(e,t,n){let s=a[e],r=s.get(t);return s.createValue(Symbol(r),n)},napi_coerce_to_bool(e,t,n){let s=a[e];return s.createValue(Boolean(s.get(t)),n)},napi_coerce_to_number(e,t,n){let s=a[e];return s.createValue(Number(s.get(t)),n)},napi_coerce_to_object(e,t,n){let s=a[e];return s.createValue(Object(s.get(t)),n)},napi_coerce_to_string(e,t,n){let s=a[e];return s.createValue(String(s.get(t)),n)},napi_typeof(e,t,n){let s=a[e],r=s.get(t);return s.setPointer(n,(()=>{switch(typeof r){case"undefined":return 0;case"boolean":return 2;case"number":return 3;case"string":return 4;case"symbol":return 5;case"object":return null===r?1:r instanceof m?8:6;case"function":return 7;case"bigint":return 9}})())},napi_instanceof(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=o instanceof i?1:0,0},napi_is_array(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=Array.isArray(r)?1:0,0},napi_is_buffer(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=(void 0!==globalThis.Buffer?globalThis.Buffer.isBuffer(r):r instanceof Uint8Array)?1:0,0},napi_is_date(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Date?1:0,0},napi_is_error(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Error?1:0,0},napi_is_typedarray(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=!ArrayBuffer.isView(r)||r instanceof DataView?0:1,0},napi_is_dataview(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof DataView?1:0,0},napi_strict_equals(e,t,n,s){let r=a[e];return r.memory[s]=r.get(t)===r.get(n)?1:0,0},napi_wrap(e,t,n,s,r,o){let i=a[e],l=i.get(t);if(i.wrappedObjects.set(l,n),s){let t=i.table.get(s);h.register(l,new d(e,t,r,n))}return o?b.napi_create_reference(e,t,1,o):0},napi_unwrap(e,t,n){let s=a[e],r=s.get(t),o=s.wrappedObjects.get(r);return s.setPointer(n,o),0},napi_remove_wrap(e,t,n){let s=a[e],r=s.get(t),o=s.wrappedObjects.get(r);return h.unregister(r),s.wrappedObjects.delete(r),s.setPointer(n,o)},napi_type_tag_object(e,t,n){throw new Error("not implemented")},napi_check_object_type_tag(e,t,n){throw new Error("not implemented")},napi_add_finalizer(e,t,n,s,r,o){let i=a[e],l=i.get(t),c=i.table.get(s);return h.register(l,new d(e,c,r,n)),o?b.napi_create_reference(e,t,1,o):0},napi_create_promise(e,t,n){let s=a[e],r=new Promise(((e,n)=>{let r=s.deferred.length;s.deferred.push({resolve:e,reject:n}),s.setPointer(t,r)}));return s.createValue(r,n)},napi_resolve_deferred(e,t,n){let s=a[e],{resolve:r}=s.deferred[t];return r(s.get(n)),s.deferred[t]=void 0,0},napi_reject_deferred(e,t,n){let s=a[e],{reject:r}=s.deferred[t];return r(s.get(n)),s.deferred[t]=void 0,0},napi_is_promise(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Promise?1:0,0},napi_run_script(e,t,n){let s=a[e],r=s.get(t),o=(0,eval)(r);return s.createValue(o,n)},napi_create_external(e,t,n,s,r){let o=a[e],i=new m;if(o.externalObjects.set(i,t),n){let r=o.table.get(n);h.register(i,new d(e,r,s,t))}return o.createValue(i,r)},napi_get_value_external(e,t,n){let s=a[e],r=s.get(t),o=s.externalObjects.get(r);return o?s.setPointer(n,o):1},napi_adjust_external_memory:()=>0};let v;function w(e,t,n){v(e,t,n)}let k,S,N;function x(e){return function(e,t){if("function"==typeof t.visitor){let n=[];t.visitor=t.visitor({addDependency(e){n.push(e)}});let s=e(t);return s instanceof Promise?s=s.then((e=>(n.length&&(e.dependencies??=[],e.dependencies.push(...n)),e))):n.length&&(s.dependencies??=[],s.dependencies.push(...n)),s}return e(t)}(k.transform,e)}const j=window.wp.blockEditor,P=window.wp.components,C=window.wp.data,L=window.wp.editor,T=window.wp.element,A=window.wp.i18n,E=window.wp.url,O=(e,t)=>[...new Set([...e.filter((e=>!e.startsWith("pcss-"))),t].filter(Boolean))].join(" "),R=e=>e.replace(/<\s*script\s*>/gi,"&lt;script&gt;").replace(/<\s*\/\s*script\s*>/gi,"&lt;/script&gt;").replace(/<\s*style\s*>/gi,"&lt;style&gt;").replace(/<\s*\/\s*style\s*>/gi,"&lt;/style&gt;");var I=o(609);const B=e=>{let t;const n=new Set,s=(e,s)=>{const r="function"==typeof e?e(t):e;if(!Object.is(r,t)){const e=t;t=(null!=s?s:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach((n=>n(t,e)))}},r=()=>t,a={setState:s,getState:r,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(s,r,a);return a},M=e=>e,D=e=>{const t=(e=>e?B(e):B)(e),n=e=>function(e,t=M){const n=I.useSyncExternalStore(e.subscribe,I.useCallback((()=>t(e.getState())),[e,t]),I.useCallback((()=>t(e.getInitialState())),[e,t]));return I.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},G=e=>e?D(e):D,F=e=>!!e.dispatchFromDevtools&&"function"==typeof e.dispatch,$=new Map,W=e=>{const t=$.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},U=e=>{var t,n;if(!e)return;const s=e.split("\n"),r=s.findIndex((e=>e.includes("api.setState")));if(r<0)return;const a=(null==(t=s[r+1])?void 0:t.trim())||"";return null==(n=/.+ (.+) .+/.exec(a))?void 0:n[1]},V=(e,t={})=>(n,s,r)=>{const{enabled:a,anonymousActionType:o,store:i,...l}=t;let c;try{c=(null==a||a)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return e(n,s,r);const{connection:u,...p}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const s=$.get(n.name);if(s)return{type:"tracked",store:e,...s};const r={connection:t.connect(n),stores:{}};return $.set(n.name,r),{type:"tracked",store:e,...r}})(i,c,l);let d=!0;r.setState=(e,t,a)=>{const c=n(e,t);if(!d)return c;const p=void 0===a?{type:o||U((new Error).stack)||"anonymous"}:"string"==typeof a?{type:a}:a;return void 0===i?(null==u||u.send(p,s()),c):(null==u||u.send({...p,type:`${i}/${p.type}`},{...W(l.name),[i]:r.getState()}),c)},r.devtools={cleanup:()=>{u&&"function"==typeof u.unsubscribe&&u.unsubscribe(),((e,t)=>{if(void 0===t)return;const n=$.get(e);n&&(delete n.stores[t],0===Object.keys(n.stores).length&&$.delete(e))})(l.name,i)}};const h=(...e)=>{const t=d;d=!1,n(...e),d=t},m=e(r.setState,s,r);if("untracked"===p.type?null==u||u.init(m):(p.stores[p.store]=r,null==u||u.init(Object.fromEntries(Object.entries(p.stores).map((([e,t])=>[e,e===p.store?m:t.getState()]))))),F(r)){let e=!1;const t=r.dispatch;r.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):z(e.payload,(e=>{if("__setState"!==e.type)F(r)&&r.dispatch(e);else{if(void 0===i)return void h(e.state);1!==Object.keys(e.state).length&&console.error('\n                    [zustand devtools middleware] Unsupported __setState action format.\n                    When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n                    and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n                    ');const t=e.state[i];if(null==t)return;JSON.stringify(r.getState())!==JSON.stringify(t)&&h(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return h(m),void 0===i?null==u?void 0:u.init(r.getState()):null==u?void 0:u.init(W(l.name));case"COMMIT":return void 0===i?void(null==u||u.init(r.getState())):null==u?void 0:u.init(W(l.name));case"ROLLBACK":return z(e.state,(e=>{if(void 0===i)return h(e),void(null==u||u.init(r.getState()));h(e[i]),null==u||u.init(W(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return z(e.state,(e=>{void 0!==i?JSON.stringify(r.getState())!==JSON.stringify(e[i])&&h(e[i]):h(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,s=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!s)return;return h(void 0===i?s:s[i]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return d=!d}return}})),m},z=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function q(e,t){let n;try{n=e()}catch(e){return}const s={getItem:e=>{var s;const r=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(s=n.getItem(e))?s:null;return a instanceof Promise?a.then(r):r(a)},setItem:(e,s)=>n.setItem(e,JSON.stringify(s,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)};return s}const H=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>H(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>H(t)(e)}}},K=(e,t)=>(n,s,r)=>{let a={storage:q((()=>window.localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,i=0;const l=new Set,c=new Set;let u=a.storage;if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),s,r);const p=()=>{const e=a.partialize({...s()});return u.setItem(a.name,{state:e,version:a.version})},d=r.setState;r.setState=(e,t)=>(d(e,t),p());const h=e(((...e)=>(n(...e),p())),s,r);let m;r.getInitialState=()=>h;const g=()=>{var e,t;if(!u)return;const r=++i;o=!1,l.forEach((e=>{var t;return e(null!=(t=s())?t:h)}));const d=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=s())?e:h))||void 0;return H(u.getItem.bind(u))(a.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];if(a.migrate){const t=a.migrate(e.state,e.version);return t instanceof Promise?t.then((e=>[!0,e])):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]})).then((e=>{var t;if(r!==i)return;const[o,l]=e;return m=a.merge(l,null!=(t=s())?t:h),n(m,!0),o?p():void 0})).then((()=>{r===i&&(null==d||d(s(),void 0),m=s(),o=!0,c.forEach((e=>e(m))))})).catch((e=>{r===i&&(null==d||d(void 0,e))}))};return r.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||g(),m||h},J=G()(K(V((e=>({open:!1,transparent:!1,x:"20",y:"20",width:"400",height:"600",setTransparent:t=>e({transparent:t}),setOpen:t=>e({open:t}),setSize:(t,n)=>e({width:t,height:n}),setPosition:(t,n)=>e({x:t,y:n})})),{name:"PCSS Global Editor Store"}),{name:"pcss-global-editor-store"})),X=G()(K(V((e=>({open:!1,transparent:!0,x:"20",y:"20",width:"400",height:"600",setTransparent:t=>e({transparent:t}),setOpen:t=>e({open:t}),setSize:(t,n)=>e({width:t,height:n}),setPosition:(t,n)=>e({x:t,y:n})})),{name:"PCSS Popout Store"}),{name:"pcss-popout-store"})),Q=window.wp.htmlEntities;var Y=o(69),Z=o.n(Y),ee=o(486),te=o(217);const ne=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",displayName:"ABAP",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",displayName:"ActionScript",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",displayName:"Ada",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json",displayName:"Apache Conf",samplePath:"apache.sample"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",displayName:"Apex",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",displayName:"APL",samplePath:"apl.sample",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",displayName:"AppleScript",samplePath:"applescript.sample"},{id:"ara",scopeName:"source.ara",path:"ara.tmLanguage.json",displayName:"Ara",samplePath:"ara.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",displayName:"Assembly",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",displayName:"Astro",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","stylus","sass","css","scss","less","postcss","tsx"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",displayName:"AWK",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",displayName:"Ballerina",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",displayName:"Batch",samplePath:"bat.sample",aliases:["batch"]},{id:"beancount",scopeName:"text.beancount",path:"beancount.tmLanguage.json",displayName:"Beancount",samplePath:"beancount.sample"},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",displayName:"Berry",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json",displayName:"BibTeX",samplePath:"bibtex.sample"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",displayName:"Bicep",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",displayName:"Blade",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",displayName:"C",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",displayName:"Cadence",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",displayName:"Clarity",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",displayName:"Clojure",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",displayName:"CMake",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",displayName:"COBOL",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",displayName:"CodeQL",samplePath:"codeql.sample",aliases:["ql"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",displayName:"CoffeeScript",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",displayName:"C++",samplePath:"cpp.sample",aliases:["c++"],embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",displayName:"Crystal",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",displayName:"C#",samplePath:"csharp.sample",aliases:["c#","cs"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",displayName:"CSS",samplePath:"css.sample"},{id:"csv",scopeName:"text.csv",path:"csv.tmLanguage.json",displayName:"csv syntax",samplePath:"csv.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",displayName:"CUE",samplePath:"cue.sample"},{id:"cypher",scopeName:"source.cypher",path:"cypher.tmLanguage.json",displayName:"Cypher",samplePath:"cypher.sample",aliases:["cql"]},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",displayName:"D",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",displayName:"Dart",samplePath:"dart.sample"},{id:"dax",scopeName:"source.dax",path:"dax.tmLanguage.json",displayName:"DAX",samplePath:"dax.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",displayName:"Diff",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",displayName:"Docker",samplePath:"docker.sample",aliases:["dockerfile"]},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json",displayName:"Dream Maker",samplePath:"dream-maker.sample"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",displayName:"Elixir",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",displayName:"Elm",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",displayName:"ERB",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",displayName:"Erlang",samplePath:"erlang.sample",aliases:["erl"]},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",displayName:"Fish",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",displayName:"F#",samplePath:"fsharp.sample",aliases:["f#","fs"],embeddedLangs:["markdown"]},{id:"gdresource",scopeName:"source.gdresource",path:"gdresource.tmLanguage.json",displayName:"GDResource",samplePath:"gdresource.sample",embeddedLangs:["gdshader","gdscript"]},{id:"gdscript",scopeName:"source.gdscript",path:"gdscript.tmLanguage.json",displayName:"GDScript",samplePath:"gdscript.sample"},{id:"gdshader",scopeName:"source.gdshader",path:"gdshader.tmLanguage.json",displayName:"GDShader",samplePath:"gdshader.sample"},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json",displayName:"Gherkin",samplePath:"gherkin.sample"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",displayName:"Git Commit Message",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",displayName:"Git Rebase Message",embeddedLangs:["shellscript"]},{id:"glimmer-js",scopeName:"source.gjs",path:"glimmer-js.tmLanguage.json",displayName:"Glimmer JS",aliases:["gjs"],embeddedLangs:["javascript","handlebars"]},{id:"glimmer-ts",scopeName:"source.gts",path:"glimmer-ts.tmLanguage.json",displayName:"Glimmer TS",aliases:["gts"],embeddedLangs:["typescript","handlebars"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",displayName:"GLSL",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json",displayName:"Gnuplot",samplePath:"gnuplot.sample"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",displayName:"Go",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",displayName:"GraphQL",samplePath:"graphql.sample",aliases:["gql"],embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json",displayName:"Groovy",samplePath:"groovy.sample"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",displayName:"Hack",samplePath:"hack.sample",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",displayName:"Ruby Haml",samplePath:"haml.sample",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",displayName:"Handlebars",samplePath:"handlebars.sample",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json",displayName:"Haskell",samplePath:"haskell.sample",aliases:["hs"]},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json",displayName:"HashiCorp HCL",samplePath:"hcl.sample"},{id:"hjson",scopeName:"source.hjson",path:"hjson.tmLanguage.json",displayName:"Hjson",samplePath:"hjson.sample"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json",displayName:"HLSL",samplePath:"hlsl.sample"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",displayName:"HTML",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"http",scopeName:"source.http",path:"http.tmLanguage.json",displayName:"HTTP",samplePath:"http.sample",embeddedLangs:["shellscript","json","xml","graphql"]},{id:"imba",scopeName:"source.imba",path:"imba.tmLanguage.json",displayName:"Imba",samplePath:"imba.sample"},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json",displayName:"INI",samplePath:"ini.sample",aliases:["properties"]},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",displayName:"Java",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",displayName:"JavaScript",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",displayName:"Jinja",samplePath:"jinja-html.sample",embeddedLangs:["html"]},{id:"jison",scopeName:"source.jison",path:"jison.tmLanguage.json",displayName:"Jison",samplePath:"jison.sample",embeddedLangs:["javascript"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json",displayName:"JSON",samplePath:"json.sample"},{id:"json5",scopeName:"source.json5",path:"json5.tmLanguage.json",displayName:"JSON5",samplePath:"json5.sample"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json",displayName:"JSON with Comments",samplePath:"jsonc.sample"},{id:"jsonl",scopeName:"source.json.lines",path:"jsonl.tmLanguage.json",displayName:"JSON Lines",samplePath:"jsonl.sample"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json",displayName:"Jsonnet",samplePath:"jsonnet.sample"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",displayName:"JSSM",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json",displayName:"JSX",samplePath:"jsx.sample"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",displayName:"Julia",samplePath:"julia.sample",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json",displayName:"Kotlin",samplePath:"kotlin.sample",aliases:["kt","kts"]},{id:"kusto",scopeName:"source.kusto",path:"kusto.tmLanguage.json",displayName:"Kusto",samplePath:"kusto.sample",aliases:["kql"]},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",displayName:"LaTeX",samplePath:"latex.sample",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",displayName:"Less",samplePath:"less.sample"},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",displayName:"Liquid",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json",displayName:"Lisp",samplePath:"lisp.sample"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json",displayName:"Logo",samplePath:"logo.sample"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",displayName:"Lua",samplePath:"lua.sample",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",displayName:"Makefile",samplePath:"make.sample",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",displayName:"Markdown",samplePath:"markdown.sample",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",displayName:"Marko",samplePath:"marko.sample",embeddedLangs:["css","less","scss","javascript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json",displayName:"MATLAB",samplePath:"matlab.sample"},{id:"mdc",scopeName:"text.markdown.mdc",path:"mdc.tmLanguage.json",displayName:"mdc",samplePath:"mdc.sample",embeddedLangs:["markdown","yaml"]},{id:"mdx",scopeName:"source.mdx",path:"mdx.tmLanguage.json",displayName:"MDX",samplePath:"mdx.sample",embeddedLangs:["tsx","toml","yaml","c","clojure","coffee","cpp","csharp","css","diff","docker","elixir","elm","erlang","go","graphql","haskell","html","ini","java","javascript","json","julia","kotlin","less","lua","make","markdown","objective-c","perl","python","r","ruby","rust","scala","scss","shellscript","shellsession","sql","xml","swift","typescript"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json",displayName:"Mermaid",samplePath:"mermaid.sample"},{id:"mojo",scopeName:"source.mojo",path:"mojo.tmLanguage.json",displayName:"MagicPython",samplePath:"mojo.sample"},{id:"narrat",scopeName:"source.narrat",path:"narrat.tmLanguage.json",displayName:"Narrat Language",samplePath:"narrat.sample",aliases:["nar"]},{id:"nextflow",scopeName:"source.nextflow",path:"nextflow.tmLanguage.json",displayName:"Nextflow",samplePath:"nextflow.sample",aliases:["nf"]},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",displayName:"Nginx",samplePath:"nginx.sample",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",displayName:"Nim",samplePath:"nim.sample",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json",displayName:"Nix",samplePath:"nix.sample"},{id:"nushell",scopeName:"source.nushell",path:"nushell.tmLanguage.json",displayName:"nushell",samplePath:"nushell.sample",aliases:["nu"]},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",displayName:"Objective-C",samplePath:"objective-c.sample",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json",displayName:"Objective-C++",samplePath:"objective-cpp.sample"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json",displayName:"OCaml",samplePath:"ocaml.sample"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json",displayName:"Pascal",samplePath:"pascal.sample"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",displayName:"Perl",samplePath:"perl.sample",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",displayName:"PHP",samplePath:"php.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json",displayName:"PL/SQL",samplePath:"plsql.sample"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json",displayName:"PostCSS",samplePath:"postcss.sample"},{id:"powerquery",scopeName:"source.powerquery",path:"powerquery.tmLanguage.json",displayName:"PowerQuery",samplePath:"powerquery.sample"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",displayName:"PowerShell",samplePath:"powershell.sample",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",displayName:"Prisma",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json",displayName:"Prolog",samplePath:"prolog.sample"},{id:"proto",scopeName:"source.proto",path:"proto.tmLanguage.json",displayName:"Protocol Buffer 3",samplePath:"proto.sample"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",displayName:"Pug",samplePath:"pug.sample",aliases:["jade"],embeddedLangs:["javascript","css","sass","scss","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json",displayName:"Puppet",samplePath:"puppet.sample"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json",displayName:"PureScript",samplePath:"purescript.sample"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",displayName:"Python",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json",displayName:"R",samplePath:"r.sample"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",displayName:"Raku",samplePath:"raku.sample",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",displayName:"ASP.NET Razor",samplePath:"razor.sample",embeddedLangs:["html","csharp"]},{id:"reg",scopeName:"source.reg",path:"reg.tmLanguage.json",displayName:"Windows Registry Script",samplePath:"reg.sample"},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",displayName:"Rel",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json",displayName:"RISC-V",samplePath:"riscv.sample"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",displayName:"reStructuredText",samplePath:"rst.sample",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",displayName:"Ruby",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",displayName:"Rust",samplePath:"rust.sample",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",displayName:"SAS",samplePath:"sas.sample",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json",displayName:"Sass",samplePath:"sass.sample"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json",displayName:"Scala",samplePath:"scala.sample"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json",displayName:"Scheme",samplePath:"scheme.sample"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",displayName:"SCSS",samplePath:"scss.sample",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",displayName:"ShaderLab",samplePath:"shaderlab.sample",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",displayName:"Shell",samplePath:"shellscript.sample",aliases:["bash","sh","shell","zsh"]},{id:"shellsession",scopeName:"text.shell-session",path:"shellsession.tmLanguage.json",displayName:"Shell Session",samplePath:"shellsession.sample",aliases:["console"],embeddedLangs:["shellscript"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json",displayName:"Smalltalk",samplePath:"smalltalk.sample"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json",displayName:"Solidity",samplePath:"solidity.sample"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",displayName:"SPARQL",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"splunk",scopeName:"source.splunk_search",path:"splunk.tmLanguage.json",displayName:"Splunk Query Language",samplePath:"splunk.sample",aliases:["spl"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json",displayName:"SQL",samplePath:"sql.sample"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json",displayName:"SSH Config",samplePath:"ssh-config.sample"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",displayName:"Stata",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",displayName:"Stylus",samplePath:"stylus.sample",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",displayName:"Svelte",samplePath:"svelte.sample",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json",displayName:"Swift",samplePath:"swift.sample"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json",displayName:"SystemVerilog",samplePath:"system-verilog.sample"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",displayName:"Tasl",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json",displayName:"Tcl",samplePath:"tcl.sample"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",displayName:"TeX",samplePath:"tex.sample",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json",displayName:"TOML",samplePath:"toml.sample"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",displayName:"TSX",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",displayName:"Turtle",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",displayName:"Twig",samplePath:"twig.sample",embeddedLangs:["css","javascript","scss","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",displayName:"TypeScript",samplePath:"typescript.sample",aliases:["ts"]},{id:"v",scopeName:"source.v",path:"v.tmLanguage.json",displayName:"V",samplePath:"v.sample"},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",displayName:"Visual Basic",samplePath:"vb.sample",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json",displayName:"Verilog",samplePath:"verilog.sample"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json",displayName:"VHDL",samplePath:"vhdl.sample"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",displayName:"Vim Script",samplePath:"viml.sample",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",displayName:"Vue HTML",samplePath:"vue-html.sample",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",displayName:"Vue",samplePath:"vue.sample",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql"]},{id:"vyper",scopeName:"source.vyper",path:"vyper.tmLanguage.json",displayName:"Vyper",samplePath:"vyper.sample",aliases:["vy"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json",displayName:"WebAssembly",samplePath:"wasm.sample"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",displayName:"Wenyan",samplePath:"wenyan.sample",aliases:["文言"]},{id:"wgsl",scopeName:"source.wgsl",path:"wgsl.tmLanguage.json",displayName:"WGSL",samplePath:"wgsl.sample"},{id:"wolfram",scopeName:"source.wolfram",path:"wolfram.tmLanguage.json",displayName:"Wolfram",samplePath:"wolfram.sample",aliases:["wl"]},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",displayName:"XML",samplePath:"xml.sample",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",displayName:"XSL",samplePath:"xsl.sample",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json",displayName:"YAML",samplePath:"yaml.sample",aliases:["yml"]},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",displayName:"ZenScript",samplePath:"zenscript.sample"},{id:"zig",scopeName:"source.zig",path:"zig.tmLanguage.json",displayName:"zig",samplePath:"zig.sample"}];var se,re,ae,oe,ie=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(ie||{});class le{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t}static printMetadata(e){let t=le.getLanguageId(e),n=le.getTokenType(e),s=le.getFontStyle(e),r=le.getForeground(e),a=le.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:s,foreground:r,background:a})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>15}static getBackground(e){return(4286578688&e)>>>24}static containsBalancedBrackets(e){return!!(1024&e)}static set(e,t,n,s,r,a){let o=le.getLanguageId(e),i=le.getTokenType(e),l=le.getFontStyle(e),c=le.getForeground(e),u=le.getBackground(e);return 0!==t&&(o=t),0!==n&&(i=8===n?0:n),-1!==s&&(l=s),0!==r&&(c=r),0!==a&&(u=a),(o|i<<8|l<<11|(le.containsBalancedBrackets(e)?1:0)<<10|c<<15|u<<24)>>>0}}function ce(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function ue(e){return e.startsWith("./")?e.slice(2):e}function pe(e){const t=e.split(/[\/\\]/g);return t.slice(0,t.length-1)}function de(...e){return e.map(ce).map(ue).join("/")}function he(e){return 32===e||9===e}function me(e){return 10===e||13===e}function ge(e){return e>=48&&e<=57}!function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(se||(se={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(re||(re={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(ae||(ae={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(oe||(oe={}));const fe=function(e,t=[],n=re.DEFAULT){let s=null,r=[];const a=[];function o(e){Array.isArray(r)?r.push(e):null!==s&&(r[s]=e)}return function(e,t,n=re.DEFAULT){const s=function(e,t=!1){const n=e.length;let s=0,r="",a=0,o=16,i=0,l=0,c=0,u=0,p=0;function d(t,n){let r=0,a=0;for(;r<t||!n;){let t=e.charCodeAt(s);if(t>=48&&t<=57)a=16*a+t-48;else if(t>=65&&t<=70)a=16*a+t-65+10;else{if(!(t>=97&&t<=102))break;a=16*a+t-97+10}s++,r++}return r<t&&(a=-1),a}function h(){if(r="",p=0,a=s,l=i,u=c,s>=n)return a=n,o=17;let t=e.charCodeAt(s);if(he(t)){do{s++,r+=String.fromCharCode(t),t=e.charCodeAt(s)}while(he(t));return o=15}if(me(t))return s++,r+=String.fromCharCode(t),13===t&&10===e.charCodeAt(s)&&(s++,r+="\n"),i++,c=s,o=14;switch(t){case 123:return s++,o=1;case 125:return s++,o=2;case 91:return s++,o=3;case 93:return s++,o=4;case 58:return s++,o=6;case 44:return s++,o=5;case 34:return s++,r=function(){let t="",r=s;for(;;){if(s>=n){t+=e.substring(r,s),p=2;break}const a=e.charCodeAt(s);if(34===a){t+=e.substring(r,s),s++;break}if(92!==a){if(a>=0&&a<=31){if(me(a)){t+=e.substring(r,s),p=2;break}p=6}s++}else{if(t+=e.substring(r,s),s++,s>=n){p=2;break}switch(e.charCodeAt(s++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=d(4,!0);e>=0?t+=String.fromCharCode(e):p=4;break;default:p=5}r=s}}return t}(),o=10;case 47:const l=s-1;if(47===e.charCodeAt(s+1)){for(s+=2;s<n&&!me(e.charCodeAt(s));)s++;return r=e.substring(l,s),o=12}if(42===e.charCodeAt(s+1)){s+=2;const t=n-1;let a=!1;for(;s<t;){const t=e.charCodeAt(s);if(42===t&&47===e.charCodeAt(s+1)){s+=2,a=!0;break}s++,me(t)&&(13===t&&10===e.charCodeAt(s)&&s++,i++,c=s)}return a||(s++,p=1),r=e.substring(l,s),o=13}return r+=String.fromCharCode(t),s++,o=16;case 45:if(r+=String.fromCharCode(t),s++,s===n||!ge(e.charCodeAt(s)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=function(){let t=s;if(48===e.charCodeAt(s))s++;else for(s++;s<e.length&&ge(e.charCodeAt(s));)s++;if(s<e.length&&46===e.charCodeAt(s)){if(s++,!(s<e.length&&ge(e.charCodeAt(s))))return p=3,e.substring(t,s);for(s++;s<e.length&&ge(e.charCodeAt(s));)s++}let n=s;if(s<e.length&&(69===e.charCodeAt(s)||101===e.charCodeAt(s)))if(s++,(s<e.length&&43===e.charCodeAt(s)||45===e.charCodeAt(s))&&s++,s<e.length&&ge(e.charCodeAt(s))){for(s++;s<e.length&&ge(e.charCodeAt(s));)s++;n=s}else p=3;return e.substring(t,n)}(),o=11;default:for(;s<n&&m(t);)s++,t=e.charCodeAt(s);if(a!==s){switch(r=e.substring(a,s),r){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return r+=String.fromCharCode(t),s++,o=16}}function m(e){if(he(e)||me(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){s=e,r="",a=0,o=16,p=0},getPosition:()=>s,scan:t?function(){let e;do{e=h()}while(e>=12&&e<=15);return e}:h,getToken:()=>o,getTokenValue:()=>r,getTokenOffset:()=>a,getTokenLength:()=>s-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-u,getTokenError:()=>p}}(e,!1),r=[];function a(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function o(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>r.slice())):()=>!0}function i(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>r.slice())):()=>!0}const c=o(t.onObjectBegin),u=l(t.onObjectProperty),p=a(t.onObjectEnd),d=o(t.onArrayBegin),h=a(t.onArrayEnd),m=l(t.onLiteralValue),g=i(t.onSeparator),f=a(t.onComment),y=i(t.onError),_=n&&n.disallowComments,b=n&&n.allowTrailingComma;function v(){for(;;){const e=s.scan();switch(s.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:_||w(11);break;case 2:w(12);break;case 6:w(16)}switch(e){case 12:case 13:_?w(10):f();break;case 16:w(1);break;case 15:case 14:break;default:return e}}}function w(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=s.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){v();break}if(-1!==n.indexOf(e))break;e=v()}}}function k(e){const t=s.getTokenValue();return e?m(t):(u(t),r.push(t)),v(),!0}function S(){switch(s.getToken()){case 3:return function(){d(),v();let e=!0,t=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(t||w(4,[],[]),g(","),v(),4===s.getToken()&&b)break}else t&&w(6,[],[]);e?(r.push(0),e=!1):r[r.length-1]++,S()||w(4,[],[4,5]),t=!0}return h(),e||r.pop(),4!==s.getToken()?w(8,[4],[]):v(),!0}();case 1:return function(){c(),v();let e=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(e||w(4,[],[]),g(","),v(),2===s.getToken()&&b)break}else e&&w(6,[],[]);(10!==s.getToken()?(w(3,[],[2,5]),!1):(k(!1),6===s.getToken()?(g(":"),v(),S()||w(4,[],[2,5])):w(5,[],[2,5]),r.pop(),!0))||w(4,[],[2,5]),e=!0}return p(),2!==s.getToken()?w(7,[2],[]):v(),!0}();case 10:return k(!0);default:return function(){switch(s.getToken()){case 11:const e=s.getTokenValue();let t=Number(e);isNaN(t)&&(w(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return v(),!0}()}}v(),17===s.getToken()?!!n.allowEmptyContent||w(4,[],[]):S()?17!==s.getToken()&&w(9,[],[]):w(4,[],[])}(e,{onObjectBegin:()=>{const e={};o(e),a.push(r),r=e,s=null},onObjectProperty:e=>{s=e},onObjectEnd:()=>{r=a.pop()},onArrayBegin:()=>{const e=[];o(e),a.push(r),r=e,s=null},onArrayEnd:()=>{r=a.pop()},onLiteralValue:o,onError:(e,n,s)=>{t.push({error:e,offset:n,length:s})}},n),r[0]};var ye;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(ye||(ye={}));const _e="undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,be="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"node"===process.release.name,ve="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"bun"===process.release.name,we=_e||!be&&!ve;let ke="",Se="";let Ne=null;function xe(e){if(we)return`${ke}${e}`;{const t=o(485);return t.isAbsolute(e)?e:t.resolve("/","..",e)}}async function je(e){const t=[],n=await async function(e){const t=xe(e);if(we)return await fetch(t).then((e=>e.text()));{const e=o(673);return await e.promises.readFile(t,"utf-8")}}(e);let s;try{s=JSON.parse(n)}catch(e){if(s=fe(n,t,{allowTrailingComma:!0}),t.length)throw t[0]}return s}async function Pe(e){const t=Ce(await je(e));if(t.include){const n=await Pe(de(...pe(e),t.include));n.settings&&(t.settings=n.settings.concat(t.settings)),n.bg&&!t.bg&&(t.bg=n.bg),n.colors&&(t.colors={...n.colors,...t.colors}),delete t.include}return t}function Ce(e){const t=e.type||"dark",n={name:e.name,type:t,...e,...Ae(e)};var s;return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors,delete n.tokenColors),(s=n).settings||(s.settings=[]),s.settings[0]&&s.settings[0].settings&&!s.settings[0].scope||s.settings.unshift({settings:{foreground:s.fg,background:s.bg}}),n}const Le={light:"#333333",dark:"#bbbbbb"},Te={light:"#fffffe",dark:"#1e1e1e"};function Ae(e){let t,n,s=e.settings?e.settings:e.tokenColors;const r=s?s.find((e=>!e.name&&!e.scope)):void 0;return r?.settings?.foreground&&(t=r.settings.foreground),r?.settings?.background&&(n=r.settings.background),!t&&e?.colors?.["editor.foreground"]&&(t=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),t||(t="light"===e.type?Le.light:Le.dark),n||(n="light"===e.type?Te.light:Te.dark),{fg:t,bg:n}}class Ee{constructor(e,t){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=e,this._onigLibName=t}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(e){return this.languageMap[e]}async loadGrammar(e){const t=this.scopeToLangMap[e];if(!t)return null;if(t.grammar)return t.grammar;const n=await async function(e){return await je(e)}(ne.includes(t)?`${this.languagesPath}${t.path}`:t.path);return t.grammar=n,n}addLanguage(e){this.languageMap[e.id]=e,e.aliases&&e.aliases.forEach((t=>{this.languageMap[t]=e})),this.scopeToLangMap[e.scopeName]=e}}function Oe(e,t){let n=[];for(let s=0,r=t.length;s<r;s++){let r=t.slice(0,s),a=t[s];n[s]={scopeName:a,themeMatches:Be(e,a,r)}}return n}function Re(e,t){let n=e+".";return e===t||t.substring(0,n.length)===n}function Ie(e,t,n,s){if(!Re(e,n))return!1;let r=t.length-1,a=s.length-1;for(;r>=0&&a>=0;)Re(t[r],s[a])&&r--,a--;return-1===r}function Be(e,t,n){let s=[],r=0;for(let a=0,o=e.settings.length;a<o;a++){let o,i=e.settings[a];if("string"==typeof i.scope)o=i.scope.split(/,/).map((e=>e.trim()));else{if(!Array.isArray(i.scope))continue;o=i.scope}for(let e=0,a=o.length;e<a;e++){let l=o[e].split(/ /);Ie(l[l.length-1],l.slice(0,l.length-1),t,n)&&(s[r++]=i,e=a)}}return s}var Me=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],De={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Ge(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function Fe(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map((e=>Number.parseInt(e)));if(3!==t.length||t.some((e=>Number.isNaN(e))))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function $e(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(0===s)t.push({type:"resetAll"});else if(s<=9)De[s]&&t.push({type:"setDecoration",value:De[s]});else if(s<=29){const e=De[s-20];e&&t.push({type:"resetDecoration",value:e})}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Me[s-30]}});else if(38===s){const n=Fe(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===s)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Me[s-40]}});else if(48===s){const n=Fe(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===s?t.push({type:"resetBackgroundColor"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Me[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Me[s-100+8]}})}return t}var We={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Ue(e=We){function t(t){return e[t]}function n(e){return`#${e.map((e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0"))).join("")}`}let s;return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return r=e.index,function(){if(s)return s;s=[];for(let e=0;e<Me.length;e++)s.push(t(Me[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let r=0;r<6;r++)for(let a=0;a<6;a++)s.push(n([e[t],e[r],e[a]]));let r=8;for(let e=0;e<24;e++,r+=10)s.push(n([r,r,r]));return s}()[r]}var r}}}const Ve={pre:({className:e,style:t,children:n})=>`<pre class="${e}" style="${t}" tabindex="0">${n}</pre>`,code:({children:e})=>`<code>${e}</code>`,line:({className:e,children:t})=>`<span class="${e}">${t}</span>`,token:({style:e,children:t})=>`<span style="${e}">${t}</span>`};function ze(e,t={}){const n=t.bg||"#fff",s=function(e){const t=new Map;for(const n of e){const e=n.line;t.has(e)?t.get(e).push(n):t.set(e,[n])}return t}(t.lineOptions??[]),r=t.elements||{};function a(e="",t={},n){const s=r[e]||Ve[e];return s?(n=n.filter(Boolean),s({...t,children:"code"===e?n.join("\n"):n.join("")})):""}return a("pre",{className:"shiki "+(t.themeName||""),style:`background-color: ${n}`},[t.langId?`<div class="language-id">${t.langId}</div>`:"",a("code",{},e.map(((n,r)=>{const o=r+1;return a("line",{className:function(e){const t=new Set(["line"]);for(const n of e)for(const e of n.classes??[])t.add(e);return Array.from(t)}(s.get(o)??[]).join(" "),lines:e,line:n,index:r},n.map(((e,s)=>{const r=[`color: ${e.color||t.fg}`];return e.fontStyle&ie.Italic&&r.push("font-style: italic"),e.fontStyle&ie.Bold&&r.push("font-weight: bold"),e.fontStyle&ie.Underline&&r.push("text-decoration: underline"),a("token",{style:r.join("; "),tokens:n,token:e,index:s},[(o=e.content,o.replace(/[&<>"']/g,(e=>qe[e])))]);var o})))})))])}const qe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};class He extends te.Registry{constructor(e){super(e),this._resolver=e,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={},this._langGraph=new Map,this._langMap=ne.reduce(((e,t)=>(e[t.id]=t,e)),{})}getTheme(e){return"string"==typeof e?this._resolvedThemes[e]:e}async loadTheme(e){return"string"==typeof e?(this._resolvedThemes[e]||(this._resolvedThemes[e]=await Pe(`${this.themesPath}${e}.json`)),this._resolvedThemes[e]):((e=Ce(e)).name&&(this._resolvedThemes[e.name]=e),e)}async loadThemes(e){return await Promise.all(e.map((e=>this.loadTheme(e))))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(e){return this._resolvedGrammars[e]}async loadLanguage(e){const t=e.embeddedLangs?.reduce((async(e,t,n)=>{if(!this.getLoadedLanguages().includes(t)&&this._resolver.getLangRegistration(t))return await this._resolver.loadGrammar(this._resolver.getLangRegistration(t).scopeName),e[this._resolver.getLangRegistration(t).scopeName]=n+2,e}),{}),n={embeddedLanguages:t,balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]},s=await this.loadGrammarWithConfiguration(e.scopeName,1,n);this._resolvedGrammars[e.id]=s,e.aliases&&e.aliases.forEach((e=>{this._resolvedGrammars[e]=s}))}async loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.values());for(const e of t)this._resolver.addLanguage(e);for(const e of t)await this.loadLanguage(e)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}resolveEmbeddedLanguages(e){if(this._langGraph.has(e.id)||this._langGraph.set(e.id,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}function Ke(e){return"string"==typeof e?ne.find((t=>t.id===e||t.aliases?.includes(e))):e}async function Je(e){const{_languages:t,_themes:n,_wasmPath:s}=function(e){let t=ne,n=e.themes||[],s=e.paths?.wasm?e.paths.wasm.endsWith("/")?e.paths.wasm:e.paths.wasm+"/":"dist/";return e.langs&&(t=e.langs.map(Ke)),e.theme&&n.unshift(e.theme),n.length||(n=["nord"]),{_languages:t,_themes:n,_wasmPath:s}}(e),r=new Ee(async function(e){if(!Ne){let t;if(we)t="string"==typeof Se?(0,ee.loadWASM)({data:await fetch(xe(de(...pe(e),"onig.wasm")))}):(0,ee.loadWASM)({data:Se});else{const e=o(485).join(486,"../onig.wasm"),n=o(673).readFileSync(e).buffer;t=(0,ee.loadWASM)(n)}Ne=t.then((()=>({createOnigScanner:e=>(0,ee.createOnigScanner)(e),createOnigString:e=>(0,ee.createOnigString)(e)})))}return Ne}(s),"vscode-oniguruma"),a=new He(r);e.paths?.themes&&(a.themesPath=e.paths.themes.endsWith("/")?e.paths.themes:e.paths.themes+"/"),e.paths?.languages&&(r.languagesPath=e.paths.languages.endsWith("/")?e.paths.languages:e.paths.languages+"/");const i=(await a.loadThemes(n))[0];let l;await a.loadLanguages(t);let c=function(){const e={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};for(let t=0;t<Me.length;t++){const n=`#A${t.toString().padStart(5,"0")}`,s=Me[t].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e[n]=`var(--shiki-color-ansi-${s})`}return e}();function u(e){const t=e?a.getTheme(e):i;if(!t)throw Error(`No theme registration for ${e}`);l&&l.name===t.name||(a.setTheme(t),l=t);const n=a.getColorMap();return"css"===t.type&&function(e,t){e.bg=c[e.bg]||e.bg,e.fg=c[e.fg]||e.fg,Object.entries(e.colors).forEach((([t,n])=>{e.colors[t]=c[n]||n})),t.forEach(((e,n)=>{t[n]=c[e]||e}))}(t,n),{_theme:t,_colorMap:n}}function p(e,t="text",n,s={includeExplanation:!0}){if(function(e){return!e||["plaintext","txt","text"].includes(e)}(t))return[...e.split(/\r\n|\r|\n/).map((e=>[{content:e}]))];const{_grammar:r}=function(e){const t=a.getGrammar(e);if(!t)throw Error(`No language registration for ${e}`);return{_grammar:t}}(t),{_theme:o,_colorMap:i}=u(n);return function(e,t,n,s,r){let a=n.split(/\r\n|\r|\n/),o=te.INITIAL,i=[],l=[];for(let n=0,c=a.length;n<c;n++){let c,u,p,d=a[n];if(""===d){i=[],l.push([]);continue}r.includeExplanation&&(c=s.tokenizeLine(d,o),u=c.tokens,p=0);let h=s.tokenizeLine2(d,o),m=h.tokens.length/2;for(let n=0;n<m;n++){let s=h.tokens[2*n],a=n+1<m?h.tokens[2*n+2]:d.length;if(s===a)continue;let o=h.tokens[2*n+1],l=t[le.getForeground(o)],c=le.getFontStyle(o),g=[];if(r.includeExplanation){let t=0;for(;s+t<a;){let n=u[p],s=d.substring(n.startIndex,n.endIndex);t+=s.length,g.push({content:s,scopes:Oe(e,n.scopes)}),p++}}i.push({content:d.substring(s,a),color:l,fontStyle:c,explanation:g})}l.push(i),i=[],o=h.ruleStack}return l}(o,i,e,r,s)}function d(e,t){const{_theme:n}=u(t);return function(e,t){const n=t.split(/\r?\n/),s=Ue(Object.fromEntries(Me.map((t=>[t,e.colors[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]])))),r=function(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let a=0;do{const o=Ge(s,a),i=o.sequence?s.substring(a,o.startPosition):s.substring(a);if(i.length>0&&r.push({value:i,foreground:e,background:t,decorations:new Set(n)}),o.sequence){const s=$e(o.sequence);for(const r of s)"resetAll"===r.type?(e=null,t=null,n.clear()):"resetForegroundColor"===r.type?e=null:"resetBackgroundColor"===r.type?t=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of s)"setForegroundColor"===r.type?e=r.value:"setBackgroundColor"===r.type?t=r.value:"setDecoration"===r.type&&n.add(r.value)}a=o.position}while(a<s.length);return r}}}();return n.map((t=>r.parse(t).map((t=>{let n;n=t.decorations.has("reverse")?t.background?s.value(t.background):e.bg:t.foreground?s.value(t.foreground):e.fg,t.decorations.has("dim")&&(n=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map((e=>`${e}${e}`)).join("")}80`}const n=e.match(/var\((--shiki-color-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(n));let r=ie.None;return t.decorations.has("bold")&&(r|=ie.Bold),t.decorations.has("italic")&&(r|=ie.Italic),t.decorations.has("underline")&&(r|=ie.Underline),{content:t.value,color:n,fontStyle:r}}))))}(n,e)}return{codeToThemedTokens:p,codeToHtml:function(e,t="text",n){let s;s="object"==typeof t?t:{lang:t,theme:n};const r=p(e,s.lang,s.theme,{includeExplanation:!1}),{_theme:a}=u(s.theme);return ze(r,{fg:a.fg,bg:a.bg,lineOptions:s?.lineOptions,themeName:a.name})},ansiToThemedTokens:d,ansiToHtml:function(e,t){const n=d(e,t?.theme),{_theme:s}=u(t?.theme);return ze(n,{fg:s.fg,bg:s.bg,lineOptions:t?.lineOptions,themeName:s.name})},getTheme:e=>u(e)._theme,loadTheme:async function(e){await a.loadTheme(e)},loadLanguage:async function(e){const t=Ke(e);r.addLanguage(t),await a.loadLanguage(t)},getBackgroundColor:function(e){const{_theme:t}=u(e);return t.bg},getForegroundColor:function(e){const{_theme:t}=u(e);return t.fg},getLoadedThemes:function(){return a.getLoadedThemes()},getLoadedLanguages:function(){return a.getLoadedLanguages()},setColorReplacements:function(e){c=e}}}var Xe=o(888),Qe=Object.prototype.hasOwnProperty;const Ye=new WeakMap,Ze=()=>{},et=Ze(),tt=Object,nt=e=>e===et,st=e=>"function"==typeof e,rt=(e,t)=>({...e,...t}),at=e=>st(e.then),ot={},it={},lt="undefined",ct=typeof window!=lt,ut=typeof document!=lt,pt=ct&&"Deno"in window,dt=(e,t)=>{const n=Ye.get(e);return[()=>!nt(t)&&e.get(t)||ot,s=>{if(!nt(t)){const r=e.get(t);t in it||(it[t]=r),n[5](t,rt(r,s),r||ot)}},n[6],()=>!nt(t)&&t in it?it[t]:!nt(t)&&e.get(t)||ot]};let ht=!0;const[mt,gt]=ct&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ze,Ze],ft={isOnline:()=>ht,isVisible:()=>{const e=ut&&document.visibilityState;return nt(e)||"hidden"!==e}},yt={initFocus:e=>(ut&&document.addEventListener("visibilitychange",e),mt("focus",e),()=>{ut&&document.removeEventListener("visibilitychange",e),gt("focus",e)}),initReconnect:e=>{const t=()=>{ht=!0,e()},n=()=>{ht=!1};return mt("online",t),mt("offline",n),()=>{gt("online",t),gt("offline",n)}}},_t=!I.useId,bt=!ct||pt,vt=bt?I.useEffect:I.useLayoutEffect,wt="undefined"!=typeof navigator&&navigator.connection,kt=!bt&&wt&&(["slow-2g","2g"].includes(wt.effectiveType)||wt.saveData),St=new WeakMap,Nt=(e,t)=>e===`[object ${t}]`;let xt=0;const jt=e=>{const t=typeof e,n=(s=e,tt.prototype.toString.call(s));var s;const r=Nt(n,"Date"),a=Nt(n,"RegExp"),o=Nt(n,"Object");let i,l;if(tt(e)!==e||r||a)i=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(i=St.get(e),i)return i;if(i=++xt+"~",St.set(e,i),Array.isArray(e)){for(i="@",l=0;l<e.length;l++)i+=jt(e[l])+",";St.set(e,i)}if(o){i="#";const t=tt.keys(e).sort();for(;!nt(l=t.pop());)nt(e[l])||(i+=l+":"+jt(e[l])+",");St.set(e,i)}}return i},Pt=e=>{if(st(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?jt(e):"",t]};let Ct=0;const Lt=()=>++Ct;async function Tt(...e){const[t,n,s,r]=e,a=rt({populateCache:!0,throwOnError:!0},"boolean"==typeof r?{revalidate:r}:r||{});let o=a.populateCache;const i=a.rollbackOnError;let l=a.optimisticData;const c=a.throwOnError;if(st(n)){const e=n,s=[],r=t.keys();for(const n of r)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&s.push(n);return Promise.all(s.map(u))}return u(n);async function u(n){const[r]=Pt(n);if(!r)return;const[u,p]=dt(t,r),[d,h,m,g]=Ye.get(t),f=()=>{const e=d[r];return(st(a.revalidate)?a.revalidate(u().data,n):!1!==a.revalidate)&&(delete m[r],delete g[r],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return f();let y,_=s,b=!1;const v=Lt();h[r]=[v,0];const w=!nt(l),k=u(),S=k.data,N=k._c,x=nt(N)?S:N;if(w&&(l=st(l)?l(x,S):l,p({data:l,_c:x})),st(_))try{_=_(x)}catch(e){y=e,b=!0}if(_&&at(_)){if(_=await _.catch((e=>{y=e,b=!0})),v!==h[r][0]){if(b)throw y;return _}b&&w&&(e=>"function"==typeof i?i(e):!1!==i)(y)&&(o=!0,p({data:x,_c:et}))}if(o&&!b)if(st(o)){const e=o(_,x);p({data:e,error:et,_c:et})}else p({data:_,error:et,_c:et});if(h[r][1]=Lt(),Promise.resolve(f()).then((()=>{p({_c:et})})),!b)return _;if(c)throw y}}const At=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Et=(e,t)=>{if(!Ye.has(e)){const n=rt(yt,t),s=Object.create(null),r=Tt.bind(et,e);let a=Ze;const o=Object.create(null),i=(e,t)=>{const n=o[e]||[];return o[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,s)=>{e.set(t,n);const r=o[t];if(r)for(const e of r)e(n,s)},c=()=>{if(!Ye.has(e)&&(Ye.set(e,[s,Object.create(null),Object.create(null),Object.create(null),r,l,i]),!bt)){const t=n.initFocus(setTimeout.bind(et,At.bind(et,s,0))),r=n.initReconnect(setTimeout.bind(et,At.bind(et,s,1)));a=()=>{t&&t(),r&&r(),Ye.delete(e)}}};return c(),[e,r,c,a]}return[e,Ye.get(e)[4]]},[Ot,Rt]=Et(new Map),It=rt({onLoadingSlow:Ze,onSuccess:Ze,onError:Ze,onErrorRetry:(e,__,t,n,s)=>{const r=t.errorRetryCount,a=s.retryCount,o=~~((Math.random()+.5)*(1<<(a<8?a:8)))*t.errorRetryInterval;!nt(r)&&a>r||setTimeout(n,o,s)},onDiscarded:Ze,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:kt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:kt?5e3:3e3,compare:function e(t,n){var s,r;if(t===n)return!0;if(t&&n&&(s=t.constructor)===n.constructor){if(s===Date)return t.getTime()===n.getTime();if(s===RegExp)return t.toString()===n.toString();if(s===Array){if((r=t.length)===n.length)for(;r--&&e(t[r],n[r]););return-1===r}if(!s||"object"==typeof t){for(s in r=0,t){if(Qe.call(t,s)&&++r&&!Qe.call(n,s))return!1;if(!(s in n)||!e(t[s],n[s]))return!1}return Object.keys(n).length===r}}return t!=t&&n!=n},isPaused:()=>!1,cache:Ot,mutate:Rt,fallback:{}},ft),Bt=(e,t)=>{const n=rt(e,t);if(t){const{use:s,fallback:r}=e,{use:a,fallback:o}=t;s&&a&&(n.use=s.concat(a)),r&&o&&(n.fallback=rt(r,o))}return n},Mt=(0,I.createContext)({}),Dt=ct&&window.__SWR_DEVTOOLS_USE__,Gt=Dt?window.__SWR_DEVTOOLS_USE__:[],Ft=e=>st(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],$t=Gt.concat((e=>(t,n,s)=>e(t,n&&((...e)=>{const[s]=Pt(t),[,,,r]=Ye.get(Ot);if(s.startsWith("$inf$"))return n(...e);const a=r[s];return nt(a)?n(...e):(delete r[s],a)}),s)));Dt&&(window.__SWR_DEVTOOLS_REACT__=I);const Wt=()=>{};Wt(),new WeakMap;const Ut=I.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e}}),Vt={dedupe:!0},zt=Promise.resolve(et),qt=()=>Ze,Ht=(tt.defineProperty((e=>{const{value:t}=e,n=(0,I.useContext)(Mt),s=st(t),r=(0,I.useMemo)((()=>s?t(n):t),[s,n,t]),a=(0,I.useMemo)((()=>s?r:Bt(n,r)),[s,n,r]),o=r&&r.provider,i=(0,I.useRef)(et);o&&!i.current&&(i.current=Et(o(a.cache||Ot),r));const l=i.current;return l&&(a.cache=l[0],a.mutate=l[1]),vt((()=>{if(l)return l[2]&&l[2](),l[3]}),[]),(0,I.createElement)(Mt.Provider,rt(e,{value:a}))}),"defaultValue",{value:It}),Kt=(e,t,n)=>{const{cache:s,compare:r,suspense:a,fallbackData:o,revalidateOnMount:i,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:p,keepPreviousData:d,strictServerPrefetchWarning:h}=n,[m,g,f,y]=Ye.get(s),[_,b]=Pt(e),v=(0,I.useRef)(!1),w=(0,I.useRef)(!1),k=(0,I.useRef)(_),S=(0,I.useRef)(t),N=(0,I.useRef)(n),x=()=>N.current,j=()=>x().isVisible()&&x().isOnline(),[P,C,L,T]=dt(s,_),A=(0,I.useRef)({}).current,E=nt(o)?nt(n.fallback)?et:n.fallback[_]:o,O=(e,t)=>{for(const n in A){const s=n;if("data"===s){if(!r(e[s],t[s])){if(!nt(e[s]))return!1;if(!r(U,t[s]))return!1}}else if(t[s]!==e[s])return!1}return!0},R=!v.current,B=(0,I.useMemo)((()=>{const e=P(),n=T(),s=e=>{const n=rt(e);delete n._k;const s=(()=>{if(!_)return!1;if(!t)return!1;if(x().isPaused())return!1;if(R&&!nt(i))return i;const e=nt(E)?n.data:E;return nt(e)||l})();return s?{isValidating:!0,isLoading:!0,...n}:n},r=s(e),a=e===n?r:s(n);let o=r;return[()=>{const e=s(P());return O(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]}),[s,_]),M=(0,Xe.useSyncExternalStore)((0,I.useCallback)((e=>L(_,((t,n)=>{O(n,t)||e()}))),[s,_]),B[0],B[1]),D=m[_]&&m[_].length>0,G=M.data,F=nt(G)?E&&at(E)?Ut(E):E:G,$=M.error,W=(0,I.useRef)(F),U=d?nt(G)?nt(W.current)?F:W.current:G:F,V=_&&nt(F),z=(0,I.useRef)(null);!bt&&(0,Xe.useSyncExternalStore)(qt,(()=>(z.current=!1,z)),(()=>(z.current=!0,z)));const q=z.current;h&&q&&!a&&V&&console.warn(`Missing pre-initiated data for serialized key "${_}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const H=!(!_||!t)&&!x().isPaused()&&!(D&&!nt($))&&(R&&!nt(i)?i:a?!nt(F)&&l:nt(F)||l),K=R&&H,J=nt(M.isValidating)?K:M.isValidating,X=nt(M.isLoading)?K:M.isLoading,Q=(0,I.useCallback)((async e=>{const t=S.current;if(!_||!t||w.current||x().isPaused())return!1;let s,a,o=!0;const i=e||{},l=!f[_]||!i.dedupe,c=()=>_t?!w.current&&_===k.current&&v.current:_===k.current,u={isValidating:!1,isLoading:!1},p=()=>{C(u)},d=()=>{const e=f[_];e&&e[1]===a&&delete f[_]},h={isValidating:!0};nt(P().data)&&(h.isLoading=!0);try{if(l&&(C(h),n.loadingTimeout&&nt(P().data)&&setTimeout((()=>{o&&c()&&x().onLoadingSlow(_,n)}),n.loadingTimeout),f[_]=[t(b),Lt()]),[s,a]=f[_],s=await s,l&&setTimeout(d,n.dedupingInterval),!f[_]||f[_][1]!==a)return l&&c()&&x().onDiscarded(_),!1;u.error=et;const e=g[_];if(!nt(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return p(),l&&c()&&x().onDiscarded(_),!1;const i=P().data;u.data=r(i,s)?i:s,l&&c()&&x().onSuccess(s,_,n)}catch(e){d();const t=x(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,_,t),(!0===n||st(n)&&n(e))&&(x().revalidateOnFocus&&x().revalidateOnReconnect&&!j()||t.onErrorRetry(e,_,t,(e=>{const t=m[_];t&&t[0]&&t[0](3,e)}),{retryCount:(i.retryCount||0)+1,dedupe:!0}))))}return o=!1,p(),!0}),[_,s]),Y=(0,I.useCallback)(((...e)=>Tt(s,k.current,...e)),[]);if(vt((()=>{S.current=t,N.current=n,nt(G)||(W.current=G)})),vt((()=>{if(!_)return;const e=Q.bind(et,Vt);let t=0;if(x().revalidateOnFocus){const e=Date.now();t=e+x().focusThrottleInterval}const n=((e,t,n)=>{const s=t[e]||(t[e]=[]);return s.push(n),()=>{const e=s.indexOf(n);e>=0&&(s[e]=s[s.length-1],s.pop())}})(_,m,((n,s={})=>{if(0==n){const n=Date.now();x().revalidateOnFocus&&n>t&&j()&&(t=n+x().focusThrottleInterval,e())}else if(1==n)x().revalidateOnReconnect&&j()&&e();else{if(2==n)return Q();if(3==n)return Q(s)}}));return w.current=!1,k.current=_,v.current=!0,C({_k:b}),H&&(f[_]||(nt(F)||bt?e():(s=e,ct&&typeof window.requestAnimationFrame!=lt?window.requestAnimationFrame(s):setTimeout(s,1)))),()=>{w.current=!0,n()};var s}),[_]),vt((()=>{let e;function t(){const t=st(c)?c(P().data):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){P().error||!u&&!x().isVisible()||!p&&!x().isOnline()?t():Q(Vt).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[c,u,p,_]),(0,I.useDebugValue)(U),a){if(!_t&&bt&&V)throw new Error("Fallback data is required when using Suspense in SSR.");V&&(S.current=t,N.current=n,w.current=!1);const e=y[_],s=!nt(e)&&V?Y(e):zt;if(Ut(s),!nt($)&&V)throw $;const r=V?Q(Vt):zt;!nt(U)&&V&&(r.status="fulfilled",r.value=!0),Ut(r)}return{mutate:Y,get data(){return A.data=!0,U},get error(){return A.error=!0,$},get isValidating(){return A.isValidating=!0,J},get isLoading(){return A.isLoading=!0,X}}},function(...e){const t=(()=>{const e=(0,I.useContext)(Mt);return(0,I.useMemo)((()=>rt(It,e)),[e])})(),[n,s,r]=Ft(e),a=Bt(t,r);let o=Kt;const{use:i}=a,l=(i||[]).concat($t);for(let e=l.length;e--;)o=l[e](o);return o(n,s||a.fetcher||null,a)});var Kt;const Jt=((e,t)=>(...n)=>{const[s,r,a]=Ft(n),o=(a.use||[]).concat(t);return e(s,r,{...a,use:o})})(Ht,(e=>(t,n,s)=>(s.revalidateOnFocus=!1,s.revalidateIfStale=!1,s.revalidateOnReconnect=!1,s.refreshInterval=0,e(t,n,s)))),Xt=({theme:e,lang:t,ready:n})=>{if(!n)throw new Error;return Je({langs:[t],theme:e})};let Qt=!1;const Yt=({theme:e,lang:t,ready:n=!0})=>{const[s,r]=(0,T.useState)(!1);var a;Qt||(Qt=!0,a=`${window.patternCss?.pluginUrl}build/shiki/`,ke=a.endsWith("/")?a:a+"/");const{data:o,error:i}=Jt({theme:e,lang:t,ready:n&&s},Xt);return(0,T.useEffect)((()=>{const e=`${window.patternCss?.pluginUrl}build/shiki/`;fetch(`${e}dist/onig.wasm`).then((e=>e.arrayBuffer())).then((e=>{Se=e,r(!0)}))}),[]),{highlighter:o,error:i,loading:!o&&!i||!s}},Zt=window.ReactJSXRuntime,en=(0,T.forwardRef)(((e,t)=>{const n=(0,T.useRef)(null),{value:s,onChange:r,onFocus:a,onBlur:o,lineOptions:i=[],...l}=e,{highlighter:c,error:u,loading:p}=Yt({theme:"light-plus",lang:"css"});return p?(0,Zt.jsx)("div",{className:"flex h-full min-h-52 items-center justify-center p-4 text-gray-900",children:"Loading..."}):u?(0,Zt.jsx)("p",{children:u.message}):(0,Zt.jsx)("div",{ref:n,className:"",children:(0,Zt.jsx)(Z(),{ref:t,value:(0,Q.decodeEntities)(s),className:"h-full font-jetbrains-mono",onValueChange:r,...l,padding:{top:6,bottom:6,left:8,right:8},style:{minHeight:300,backgroundColor:"none",color:c?.getForegroundColor()??"#000"},onKeyDown:e=>"Tab"===e.key&&n.current?.querySelector("textarea")?.focus(),onFocus:a,onBlur:o,highlight:e=>c?.codeToHtml((0,Q.decodeEntities)(e),{lang:"css",lineOptions:i})?.replace(/<\/?[pre|code][^>]*>/g,"")})})})),tn=({handleChange:e,popoutOpen:t,setPopoutOpen:n,globalEditorOpen:s,setGlobalEditorOpen:r,editorWrapperRef:a})=>{const[o,i]=(0,T.useState)(!1),{getSelectedBlockClientId:l}=(0,C.useSelect)((e=>e(j.store)),[]),{toggleBlockHighlight:c}=(0,C.useDispatch)(j.store),u=l();return(0,T.useEffect)((()=>{const e=setTimeout((()=>{c(u,!1).then((()=>{i(!1)}))}),1e3);return()=>{clearTimeout(e),o&&c(u,!1)}}),[o,c,u]),(0,Zt.jsxs)("div",{className:"flex justify-between border border-t-0 border-solid border-gray-600 text-xs text-gray-900",children:[s?(0,Zt.jsx)("div",{}):(0,Zt.jsx)(P.Tooltip,{text:(0,A.__)("Open Global Styles Editor","pattern-css"),children:(0,Zt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>r(!0),className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
    22// translators: Popout as in Popout the editor
    33// translators: Popout as in Popout the editor
    4 (0,A.__)("Global","pattern-css")})}),(0,Yt.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[t?null:(0,Yt.jsx)(P.Tooltip,{text:(0,A.__)("Popout Editor","pattern-css"),children:(0,Yt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>n(!0),className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
     4(0,A.__)("Global","pattern-css")})}),(0,Zt.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[t?null:(0,Zt.jsx)(P.Tooltip,{text:(0,A.__)("Popout Editor","pattern-css"),children:(0,Zt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>n(!0),className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
    55// translators: Popout as in Popout the editor
    66// translators: Popout as in Popout the editor
    7 (0,A.__)("Popout","pattern-css")})}),t?(0,Yt.jsx)(P.Tooltip,{text:(0,A.__)("Highlight the current block","pattern-css"),children:(0,Yt.jsx)(P.Button,{size:"small",variant:"tertiary",disabled:o,onClick:()=>{o||(i(!0),c(u,!0))},className:"lowercase hover:bg-gray-100 hover:text-gray-900 "+(o?"bg-gray-100":""),children:(0,A.__)("Highlight","pattern-css")})}):null,(0,Yt.jsx)(P.Tooltip,{text:(0,A.__)("Clear CSS","pattern-css"),children:(0,Yt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>{e(""),a.current?.querySelector("textarea")?.focus()},className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
     7(0,A.__)("Popout","pattern-css")})}),t?(0,Zt.jsx)(P.Tooltip,{text:(0,A.__)("Highlight the current block","pattern-css"),children:(0,Zt.jsx)(P.Button,{size:"small",variant:"tertiary",disabled:o,onClick:()=>{o||(i(!0),c(u,!0))},className:"lowercase hover:bg-gray-100 hover:text-gray-900 "+(o?"bg-gray-100":""),children:(0,A.__)("Highlight","pattern-css")})}):null,(0,Zt.jsx)(P.Tooltip,{text:(0,A.__)("Clear CSS","pattern-css"),children:(0,Zt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>{e(""),a.current?.querySelector("textarea")?.focus()},className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
    88// translators: Clear as in Clear the editor
    99// translators: Clear as in Clear the editor
    10 (0,A.__)("Clear","pattern-css")})})]})]})},tn=(e,t,n)=>Math.max(t,Math.min(e,n)),nn=()=>{const e=document.querySelectorAll(".pattern-css-floating-window");return Math.max(...Array.from(e).map((e=>{const t=window.getComputedStyle(e).zIndex;return"auto"===t?0:parseInt(t,10)})))},sn=({ref:e,open:t,initialPosition:n,onDragEnd:s})=>{const r=(0,T.useRef)({x:0,y:0}),a=(0,T.useRef)(null),o=(0,T.useRef)({x:n.x,y:n.y});(0,T.useLayoutEffect)((()=>{const n=e.current;if(!n||!t)return;const s=window.innerWidth-n.offsetWidth,r=window.innerHeight-n.offsetHeight,a=parseFloat(n.style.left)||0,o=parseFloat(n.style.top)||0,i=tn(a,0,s),l=tn(o,0,r);a===i&&o===l||(n.style.left=`${i}px`,n.style.top=`${l}px`)}),[e,t]),(0,T.useLayoutEffect)((()=>{const i=e.current,l=document.getElementById("wpwrap");if(!i||!t||!l)return;const c=i.querySelector("[data-pcss-handle]");if(!(c instanceof HTMLElement))return;i.style.position="fixed",i.style.left=`${n.x}px`,i.style.top=`${n.y}px`;const u=e=>{if(e.preventDefault(),e.stopPropagation(),l.style.pointerEvents="none",null!==a.current)return;const t=nn();i.style.setProperty("z-index",`${t+1}`,"important"),a.current=e.pointerId,c.setPointerCapture(e.pointerId),r.current={x:e.clientX-i.offsetLeft,y:e.clientY-i.offsetTop},document.addEventListener("pointermove",p),document.addEventListener("pointerup",d)},p=e=>{const t=window.innerWidth-c.offsetWidth,n=window.innerHeight-c.offsetHeight,s=tn(e.clientX-r.current.x,0,t),a=tn(e.clientY-r.current.y,0,n);i.style.left=`${s}px`,i.style.top=`${a}px`,o.current={x:s,y:a}},d=e=>{l.style.pointerEvents="auto",a.current===e.pointerId&&(a.current=null,c.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d),s(o.current.x,o.current.y))},h=()=>d(new PointerEvent("pointerup")),m=e=>(e.preventDefault(),e.stopPropagation(),!1);return c.addEventListener("pointerdown",u),c.addEventListener("contextmenu",m),c.addEventListener("blur",h),()=>{c.removeEventListener("pointerdown",u),c.removeEventListener("blur",h),c.removeEventListener("contextmenu",m),document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d),l.style.pointerEvents="auto",null!==a.current&&(c.releasePointerCapture(a.current),a.current=null)}}),[e,t,n.x,n.y,s])},rn=e=>{const[t,n]=(0,T.useState)(null);return(0,T.useEffect)((()=>{let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.appendChild(t)),n(t),()=>t.remove()}),[e]),t},an=({ref:e,open:t,initialSize:n,onResizeEnd:s,minWidth:r=250,minHeight:a=400,maxWidth:o=window.innerWidth,maxHeight:i=window.innerHeight})=>{const l=(0,T.useRef)({x:0,y:0,width:0,height:0}),c=(0,T.useRef)(null);(0,T.useLayoutEffect)((()=>{const u=e.current,p=document.getElementById("wpwrap");if(!u||!t||!p)return;u.style.width=`${n.width}px`,u.style.height=`${n.height}px`;const d=u.querySelector("[data-pcss-resize]");if(!(d instanceof HTMLElement))return;const h=e=>{if(e.preventDefault(),e.stopPropagation(),p.style.pointerEvents="none",null!==c.current)return;const t=nn();u.style.setProperty("z-index",`${t+1}`,"important"),c.current=e.pointerId,d.setPointerCapture(e.pointerId),l.current={x:e.clientX,y:e.clientY,width:u.offsetWidth,height:u.offsetHeight},document.addEventListener("pointermove",m),document.addEventListener("pointerup",g)},m=e=>{const t=u.getBoundingClientRect(),n=Math.min(o,window.innerWidth-t.left),s=Math.min(i,window.innerHeight-t.top),c=tn(l.current.width+(e.clientX-l.current.x),r,n),p=tn(l.current.height+(e.clientY-l.current.y),a,s);u.style.width=`${c}px`,u.style.height=`${p}px`},g=e=>{if(p.style.pointerEvents="auto",c.current!==e.pointerId)return;c.current=null,d.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g);const t=u.getBoundingClientRect(),n=Math.min(o,window.innerWidth-t.left),h=Math.min(i,window.innerHeight-t.top),f=tn(l.current.width+(e.clientX-l.current.x),r,n),y=tn(l.current.height+(e.clientY-l.current.y),a,h);s(f,y)};return d.addEventListener("pointerdown",h),()=>{d.removeEventListener("pointerdown",h),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g),p.style.pointerEvents="auto",null!==c.current&&(d.releasePointerCapture(c.current),c.current=null)}}),[e,t,n.width,n.height,s,r,a,o,i])},on=(0,T.forwardRef)((({icon:e,size:t=24,...n},s)=>(0,T.cloneElement)(e,{width:t,height:t,...n,ref:s}))),ln=window.wp.primitives,cn=(0,Yt.jsx)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Yt.jsx)(ln.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),un=(0,Yt.jsx)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Yt.jsx)(ln.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})}),pn=(0,T.forwardRef)((({label:e,transparent:t,top:n,left:s,width:r,height:a,setOpen:o,children:i,mountNode:l},c)=>((0,T.useLayoutEffect)((()=>{const e=c.current;if(!e)return;const t=nn();e.style.setProperty("z-index",`${t+1}`,"important")}),[c]),(0,T.createPortal)((0,Yt.jsx)("div",{className:"pattern-css-editor",children:(0,Yt.jsx)("div",{className:"pattern-css-floating-window fixed z-high flex flex-col border border-solid border-gray-300 font-jetbrains-mono shadow-2xl "+(t?"bg-white/90":"bg-white"),style:{top:n,left:s,width:r,height:a},ref:c,children:(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsxs)("div",{className:"flex flex-shrink-0 items-center justify-between",children:[(0,Yt.jsxs)("div",{"data-pcss-handle":!0,draggable:!0,className:"flex flex-grow cursor-grab items-center justify-between gap-1 p-2 py-3",children:[(0,Yt.jsx)(dn,{}),(0,Yt.jsx)("h2",{className:"m-0 h-full flex-grow p-0 text-sm font-medium text-gray-900",children:e})]}),(0,Yt.jsx)(P.Button,{className:"relative z-10 border-0 p-2",onClick:()=>o(!1),icon:(0,Yt.jsx)(on,{icon:cn,size:12}),label:(0,A.__)("Close Modal","pattern-css"),showTooltip:!1})]}),(0,Yt.jsx)("div",{className:"relative z-50 flex min-h-0 flex-grow flex-col px-4 pb-4",children:i}),(0,Yt.jsx)("div",{"data-pcss-resize":!0,className:"absolute -bottom-1 -right-1 z-high h-6 w-6",children:(0,Yt.jsx)("div",{className:"h-6 w-6 cursor-se-resize border border-l-0 border-t-0 border-solid border-transparent transition-colors duration-300 hover:border-gray-600 active:border-gray-600"})})]})})}),l)))),dn=e=>(0,Yt.jsxs)("div",{style:{userSelect:"none"},className:"relative flex text-gray-900 hover:text-gray-700",...e,children:[(0,Yt.jsx)(on,{icon:un,size:24}),(0,Yt.jsx)("span",{className:"sr-only",children:(0,A.__)("Drag to move","pattern-css")})]}),hn=({children:e})=>{const t=rn("pcss-popout-mount"),n=(0,T.useRef)(null),{open:s,transparent:r,x:a,y:o,width:i,height:l,setOpen:c,setSize:u,setPosition:p}=J();return sn({ref:n,open:s,initialPosition:{x:a,y:o},onDragEnd:(e,t)=>{p(e,t)}}),an({ref:n,open:s,initialSize:{width:i,height:l},onResizeEnd:(e,t)=>{u(e,t)}}),t&&s?(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(mn,{}),(0,Yt.jsx)(pn,{label:"Pattern CSS",transparent:r,top:a,left:o,width:i,height:l,setOpen:c,mountNode:t,ref:n,children:e})]}):e},mn=()=>{const{setSize:e,setPosition:t,transparent:n,setTransparent:s}=J();return(0,Yt.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Yt.jsx)("div",{className:"flex h-52 items-center justify-center bg-gray-100 p-4 text-gray-900",children:(0,A.__)("Popout is open","pattern-css")}),(0,Yt.jsxs)(P.BaseControl,{id:"pcss-enable-transparency",children:[(0,Yt.jsx)(P.CheckboxControl,{label:(0,A.__)("Transparent background","pattern-css"),checked:n,onChange:e=>{s(e)}}),(0,Yt.jsx)(P.Button,{variant:"secondary",onClick:()=>{t(20,20),e(250,400)},children:(0,A.__)("Reset Position","pattern-css")})]})]})},gn=(0,Yt.jsx)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Yt.jsx)(ln.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),fn=()=>{const e=rn("pcss-popout-global-mount"),t=(0,T.useRef)(null),[n,s]=(0,T.useState)(window.patternCss?.globalCssCompiled||"");(0,j.useStyleOverride)({id:"pcss-styles-global",css:n});const{open:r,transparent:a,x:o,y:i,width:l,height:c,setOpen:u,setSize:p,setTransparent:d,setPosition:h}=K();sn({ref:t,open:r,initialPosition:{x:o,y:i},onDragEnd:(e,t)=>{h(e,t)}}),an({ref:t,open:r,initialSize:{width:l,height:c},onResizeEnd:(e,t)=>{p(e,t)}});const m=e&&r;return(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(L.PluginMoreMenuItem,{"data-cy":"global-css-editor-btn",icon:"tool",onClick:()=>u(!0),children:(0,A.__)("Add Global CSS (Pattern CSS)","pattern-css")}),m?(0,Yt.jsxs)(pn,{label:(0,A.sprintf)((0,A.__)("%s (Global)","pattern-css"),"Pattern CSS"),transparent:a,top:o,left:i,width:l,height:c,setOpen:u,mountNode:e,ref:t,children:[(0,Yt.jsx)(yn,{initialCss:window.patternCss?.globalCss||"",compiledCss:n,setCompiled:s}),(0,Yt.jsx)(P.CheckboxControl,{label:(0,A.__)("Transparent background","pattern-css"),className:"disable-mb-checkbox mt-2",checked:a,onChange:e=>{d(e)}})]}):null]})},yn=({initialCss:e,compiledCss:n,setCompiled:s})=>{const r=(0,T.useRef)(null),[a,o]=(0,T.useState)([]),[i,l]=(0,T.useState)(e),[c,u]=(0,T.useState)(),[p,d]=(0,T.useState)("idle"),h=(0,T.useCallback)((e=>{if(o([]),l(O(e)),!window.patternCss?.transform)return;const t=window.patternCss.transform({filename:"raw.css",code:(new TextEncoder).encode(e),minify:!0,errorRecovery:!0});t.warnings.length>0?o(t.warnings):u(t.code)}),[]);return(0,T.useEffect)((()=>{e&&h(e)}),[h,e]),(0,T.useEffect)((()=>{void 0!==c&&s((new TextDecoder).decode(c))}),[c,s]),(0,T.useEffect)((()=>{window.patternCss.globalCss=i,window.patternCss.globalCssCompiled=n,d("saving");const e=setTimeout((()=>{t()({path:"/pattern-css/v1/global-css",method:"POST",data:{global_css:i,global_css_compiled:n}}).then((()=>d("saved")))}),750);return()=>clearTimeout(e)}),[n,i]),(0,T.useEffect)((()=>{if("saved"!==p)return;const e=setTimeout((()=>d("idle")),1500);return()=>clearTimeout(e)}),[p]),(0,Yt.jsxs)("div",{className:"relative flex min-h-0 flex-grow flex-col",children:[(0,Yt.jsx)("div",{className:"min-h-0 flex-grow overflow-y-auto overflow-x-hidden border border-solid border-gray-600",ref:r,children:(0,Yt.jsx)(Zt,{value:i,onChange:h,lineOptions:a.map((({loc:e})=>({line:e.line,classes:["line-error"]})))})}),"saving"===p&&(0,Yt.jsx)("div",{className:"absolute bottom-px right-1 z-10 flex items-center justify-center bg-white p-1",children:(0,Yt.jsx)("span",{className:"text-sm text-gray-700",children:(0,A.__)("Saving...","pattern-css")})}),"saved"===p&&(0,Yt.jsxs)("div",{className:"absolute bottom-px right-1 z-10 flex items-center justify-center bg-white p-1",children:[(0,Yt.jsx)(on,{icon:gn,size:20,className:"stroke-gray-700",color:"currentColor"}),(0,Yt.jsx)("span",{className:"text-sm text-gray-700",children:(0,A.__)("Saved!","pattern-css")})]})]})},bn={pcssAdditionalCss:{type:"string"},pcssAdditionalCssCompiled:{type:"string",default:""},pcssClassId:{type:"string",default:""}},vn=Object.keys(bn);(async function(e){if(k)return;if(S)return void await S;let t;("string"==typeof(e=e??new URL(o(229),o.b))||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=async function(e){try{return(await o.e(996).then(o.t.bind(o,996,19))).readFileSync(e)}catch{return fetch(e)}}(e)),S=e.then((e=>async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(e,{env:{...b,await_promise_sync:w,__getrandom_v03_custom:(e,n)=>{let s=t.memory.subarray(e,e+n);crypto.getRandomValues(s)}}}))).then((({instance:e})=>{e.exports.register_module(),t=new i(e),N=function(e){let t,n,s,{instance:r,exports:a}=e,{asyncify_get_state:o,asyncify_start_unwind:i,asyncify_stop_unwind:l,asyncify_start_rewind:c,asyncify_stop_rewind:u}=r.exports,p=r.exports.napi_wasm_malloc(4104),d=p+8,h=p+8+4096;function m(){if(0!==o())throw new Error(`Invalid async state ${o()}, expected 0.`)}return new Int32Array(e.memory.buffer,p).set([d,h]),v=(r,a,l)=>{if(2===o())return u(),null!=n&&e.createValue(n,a),null!=s&&e.createValue(s,l),void(t=n=s=null);m(),t=e.get(r),i(p)},async function(e){m();let r=a.bundle(e);for(;1===o();){l();try{n=await t}catch(e){s=e}m(),c(p),r=a.bundle(e)}return m(),r}}(t),k=t.exports})),await S})().then((()=>{window.patternCss.transform=x})),t().use(((e,t)=>{if(e.path?.includes("wp/v2/block-renderer")){let{data:n,body:s}=e;const[r,a=""]=e.path.split("?"),o=new URLSearchParams(a);vn.forEach((e=>o.delete(`attributes[${e}]`)));const i=`${r}?${o.toString()}`;if(n?.attributes){const{...e}=n.attributes;vn.forEach((t=>delete e[t])),n={...n,attributes:e}}if("string"==typeof s)try{const e=JSON.parse(s);e?.attributes&&(vn.forEach((t=>delete e.attributes[t])),s=JSON.stringify(e))}catch{}return t({...e,path:i,data:n,body:s})}return t(e)}));const wn=(e,t,n)=>{const s=new Set([e.className?.split(" "),n.className?.split(" ")].flat().filter(Boolean)),{pcssClassId:r}=n;return!r||s.has(r)?e:(s.add(r),{...e,className:[...s].join(" ")})};(0,n.addFilter)("blocks.registerBlockType","kevinbatdorf/pcss-block-settings",(e=>{const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{const n=t?.(e)??{};return wn(n,0,e)},{...e,attributes:{...e?.attributes??{},...bn}}})),(0,n.addFilter)("editor.BlockEdit","kevinbatdorf/pcss-block-control",(e=>t=>((e,t)=>{const n=(0,T.useRef)(null),[s,r]=(0,T.useState)([]),a=(0,C.useSelect)((e=>{const{isSavingPost:t,isAutosavingPost:n}=e(L.store);return t()||n()}),[]),{open:o,setOpen:i}=J(),{open:l,setOpen:c}=K(),{attributes:u,setAttributes:p,clientId:d}=t,{pcssClassId:h,pcssAdditionalCss:m,pcssAdditionalCssCompiled:g,className:f}=u,[y,_]=(0,T.useState)(m),[b,v]=(0,T.useState)(),[w,k]=(0,T.useState)(g||"");(0,j.useStyleOverride)({id:`pcss-styles-block-${h}`,css:w});const S="[block] {\n  \n}",N=(0,T.useCallback)((e=>{if(void 0===e)return void _(void 0);if(r([]),_(O(e)),!window.patternCss?.transform)return;const t=window.patternCss.transform({filename:"raw.css",code:(new TextEncoder).encode(e),minify:!0,errorRecovery:!0,visitor:{Rule:{import:()=>[],"font-face":()=>[],keyframes:()=>[],page:()=>[],"counter-style":()=>[],"view-transition":()=>[],namespace:()=>[]},Selector(e){const{name:t,type:n}=e[0],{name:s,type:r}=window.patternCss.selectorOverride||{};return"attribute"===n&&"block"===t||n===r&&t===s?[{...e[0],type:"class",name:h},...e.slice(1)]:"nesting"===e[0].type?e:[{type:"class",name:h},{type:"combinator",value:"descendant"},...e]}}});t.warnings.length>0?r(t.warnings):v(t.code)}),[h]);return(0,T.useEffect)((()=>{m&&N(m)}),[N,m]),(0,T.useEffect)((()=>{void 0!==b&&k((new TextDecoder).decode(b))}),[b]),(0,T.useEffect)((()=>{if(void 0===y)return;p({pcssAdditionalCss:y,pcssClassId:h||`pcss-${d?.split("-")[0]}`});const e=f?.split(" ")||[];e?.includes(h)||p({className:E(e,h)})}),[y,p,h,d,f]),(0,T.useEffect)((()=>{if(!h||!a)return;const e=f?.split(" ")||[];if(e?.find((e=>e.startsWith(h))))return;const t=E(e,h);p({className:t})}),[a,f,h,p]),(0,T.useEffect)((()=>{w!==g&&p({pcssAdditionalCssCompiled:w})}),[w,p,g]),(0,Yt.jsxs)(Yt.Fragment,{children:[e&&(0,Yt.jsx)(e,{...t}),(0,Yt.jsx)(j.InspectorControls,{children:(0,Yt.jsxs)(P.PanelBody,{title:"Pattern CSS",initialOpen:!1,className:"pattern-css-editor",children:[(0,Yt.jsx)(hn,{children:(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)("div",{className:"overfow-x-hidden relative flex-grow overflow-y-auto border border-solid border-gray-600",ref:n,children:(0,Yt.jsx)(Zt,{value:y??S,"data-cy":"pcss-editor-block",onChange:N,onFocus:e=>{e.target.value===S&&(e=>{const t=e.value.split("\n"),n=t[0].length+t[1].length+1;requestAnimationFrame((()=>{e.focus(),e.setSelectionRange(n,n)}))})(e.target)},lineOptions:s.map((({loc:e})=>({line:e.line,classes:["line-error"]})))})}),(0,Yt.jsx)("div",{children:(0,Yt.jsx)(en,{handleChange:N,popoutOpen:o,setPopoutOpen:i,globalEditorOpen:l,setGlobalEditorOpen:c,editorWrapperRef:n})})]})}),(0,Yt.jsx)("p",{className:"m-0 my-2 text-xs text-gray-700",dangerouslySetInnerHTML:{__html:(0,A.sprintf)(
     10(0,A.__)("Clear","pattern-css")})})]})]})},nn=(e,t,n)=>Math.max(t,Math.min(e,n)),sn=()=>{const e=document.querySelectorAll(".pattern-css-floating-window");return Math.max(...Array.from(e).map((e=>{const t=window.getComputedStyle(e).zIndex;return"auto"===t?0:parseInt(t,10)})))},rn=({ref:e,open:t,initialPosition:n,onDragEnd:s})=>{const r=(0,T.useRef)({x:0,y:0}),a=(0,T.useRef)(null),o=(0,T.useRef)({x:n.x,y:n.y});(0,T.useLayoutEffect)((()=>{const n=e.current;if(!n||!t)return;const s=window.innerWidth-n.offsetWidth,r=window.innerHeight-n.offsetHeight,a=parseFloat(n.style.left)||0,o=parseFloat(n.style.top)||0,i=nn(a,0,s),l=nn(o,0,r);a===i&&o===l||(n.style.left=`${i}px`,n.style.top=`${l}px`)}),[e,t]),(0,T.useLayoutEffect)((()=>{const i=e.current,l=document.getElementById("wpwrap");if(!i||!t||!l)return;const c=i.querySelector("[data-pcss-handle]");if(!(c instanceof HTMLElement))return;i.style.position="fixed",i.style.left=`${n.x}px`,i.style.top=`${n.y}px`;const u=e=>{if(e.preventDefault(),e.stopPropagation(),l.style.pointerEvents="none",null!==a.current)return;const t=sn();i.style.setProperty("z-index",`${t+1}`,"important"),a.current=e.pointerId,c.setPointerCapture(e.pointerId),r.current={x:e.clientX-i.offsetLeft,y:e.clientY-i.offsetTop},document.addEventListener("pointermove",p),document.addEventListener("pointerup",d)},p=e=>{const t=window.innerWidth-c.offsetWidth,n=window.innerHeight-c.offsetHeight,s=nn(e.clientX-r.current.x,0,t),a=nn(e.clientY-r.current.y,0,n);i.style.left=`${s}px`,i.style.top=`${a}px`,o.current={x:s,y:a}},d=e=>{l.style.pointerEvents="auto",a.current===e.pointerId&&(a.current=null,c.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d),s(o.current.x,o.current.y))},h=()=>d(new PointerEvent("pointerup")),m=e=>(e.preventDefault(),e.stopPropagation(),!1);return c.addEventListener("pointerdown",u),c.addEventListener("contextmenu",m),c.addEventListener("blur",h),()=>{c.removeEventListener("pointerdown",u),c.removeEventListener("blur",h),c.removeEventListener("contextmenu",m),document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d),l.style.pointerEvents="auto",null!==a.current&&(c.releasePointerCapture(a.current),a.current=null)}}),[e,t,n.x,n.y,s])},an=e=>{const[t,n]=(0,T.useState)(null);return(0,T.useEffect)((()=>{let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.appendChild(t)),n(t),()=>t.remove()}),[e]),t},on=({ref:e,open:t,initialSize:n,onResizeEnd:s,minWidth:r=250,minHeight:a=400,maxWidth:o=window.innerWidth,maxHeight:i=window.innerHeight})=>{const l=(0,T.useRef)({x:0,y:0,width:0,height:0}),c=(0,T.useRef)(null);(0,T.useLayoutEffect)((()=>{const u=e.current,p=document.getElementById("wpwrap");if(!u||!t||!p)return;u.style.width=`${n.width}px`,u.style.height=`${n.height}px`;const d=u.querySelector("[data-pcss-resize]");if(!(d instanceof HTMLElement))return;const h=e=>{if(e.preventDefault(),e.stopPropagation(),p.style.pointerEvents="none",null!==c.current)return;const t=sn();u.style.setProperty("z-index",`${t+1}`,"important"),c.current=e.pointerId,d.setPointerCapture(e.pointerId),l.current={x:e.clientX,y:e.clientY,width:u.offsetWidth,height:u.offsetHeight},document.addEventListener("pointermove",m),document.addEventListener("pointerup",g)},m=e=>{const t=u.getBoundingClientRect(),n=Math.min(o,window.innerWidth-t.left),s=Math.min(i,window.innerHeight-t.top),c=nn(l.current.width+(e.clientX-l.current.x),r,n),p=nn(l.current.height+(e.clientY-l.current.y),a,s);u.style.width=`${c}px`,u.style.height=`${p}px`},g=e=>{if(p.style.pointerEvents="auto",c.current!==e.pointerId)return;c.current=null,d.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g);const t=u.getBoundingClientRect(),n=Math.min(o,window.innerWidth-t.left),h=Math.min(i,window.innerHeight-t.top),f=nn(l.current.width+(e.clientX-l.current.x),r,n),y=nn(l.current.height+(e.clientY-l.current.y),a,h);s(f,y)};return d.addEventListener("pointerdown",h),()=>{d.removeEventListener("pointerdown",h),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g),p.style.pointerEvents="auto",null!==c.current&&(d.releasePointerCapture(c.current),c.current=null)}}),[e,t,n.width,n.height,s,r,a,o,i])},ln=(0,T.forwardRef)((({icon:e,size:t=24,...n},s)=>(0,T.cloneElement)(e,{width:t,height:t,...n,ref:s}))),cn=window.wp.primitives,un=(0,Zt.jsx)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Zt.jsx)(cn.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),pn=(0,Zt.jsx)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Zt.jsx)(cn.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})}),dn=(0,T.forwardRef)((({label:e,transparent:t,top:n,left:s,width:r,height:a,setOpen:o,children:i,mountNode:l},c)=>((0,T.useLayoutEffect)((()=>{const e=c.current;if(!e)return;const t=sn();e.style.setProperty("z-index",`${t+1}`,"important")}),[c]),(0,T.createPortal)((0,Zt.jsx)("div",{className:"pattern-css-editor",children:(0,Zt.jsxs)("div",{className:"pattern-css-floating-window fixed z-high flex flex-col border border-solid border-gray-300 font-jetbrains-mono shadow-2xl "+(t?"bg-white/90":"bg-white"),style:{top:n,left:s,width:r,height:a},ref:c,children:[(0,Zt.jsxs)("div",{className:"flex flex-shrink-0 items-center justify-between",children:[(0,Zt.jsxs)("div",{"data-pcss-handle":!0,draggable:!0,className:"flex flex-grow cursor-grab items-center justify-between gap-1 p-2 py-3",children:[(0,Zt.jsx)(hn,{}),(0,Zt.jsx)("h2",{className:"m-0 h-full flex-grow p-0 text-sm font-medium text-gray-900",children:e})]}),(0,Zt.jsx)(P.Button,{className:"relative z-10 border-0 p-2",onClick:()=>o(!1),icon:(0,Zt.jsx)(ln,{icon:un,size:12}),label:(0,A.__)("Close Modal","pattern-css"),showTooltip:!1})]}),(0,Zt.jsx)("div",{className:"relative z-50 flex min-h-0 flex-grow flex-col px-4 pb-4",children:i}),(0,Zt.jsx)("div",{"data-pcss-resize":!0,className:"absolute -bottom-1 -right-1 z-high h-6 w-6",children:(0,Zt.jsx)("div",{className:"h-6 w-6 cursor-se-resize border border-l-0 border-t-0 border-solid border-transparent transition-colors duration-300 hover:border-gray-600 active:border-gray-600"})})]})}),l)))),hn=e=>(0,Zt.jsxs)("div",{style:{userSelect:"none"},className:"relative flex text-gray-900 hover:text-gray-700",...e,children:[(0,Zt.jsx)(ln,{icon:pn,size:24}),(0,Zt.jsx)("span",{className:"sr-only",children:(0,A.__)("Drag to move","pattern-css")})]}),mn=({children:e})=>{const t=an("pcss-popout-mount"),n=(0,T.useRef)(null),{open:s,transparent:r,x:a,y:o,width:i,height:l,setOpen:c,setSize:u,setPosition:p}=X();return rn({ref:n,open:s,initialPosition:{x:a,y:o},onDragEnd:(e,t)=>{p(e,t)}}),on({ref:n,open:s,initialSize:{width:i,height:l},onResizeEnd:(e,t)=>{u(e,t)}}),t&&s?(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(gn,{}),(0,Zt.jsx)(dn,{label:"Pattern CSS",transparent:r,top:a,left:o,width:i,height:l,setOpen:c,mountNode:t,ref:n,children:e})]}):e},gn=()=>{const{setSize:e,setPosition:t,transparent:n,setTransparent:s}=X();return(0,Zt.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Zt.jsx)("div",{className:"flex h-52 items-center justify-center bg-gray-100 p-4 text-gray-900",children:(0,A.__)("Popout is open","pattern-css")}),(0,Zt.jsxs)(P.BaseControl,{id:"pcss-enable-transparency",children:[(0,Zt.jsx)(P.CheckboxControl,{label:(0,A.__)("Transparent background","pattern-css"),checked:n,onChange:e=>{s(e)}}),(0,Zt.jsx)(P.Button,{variant:"secondary",onClick:()=>{t(20,20),e(250,400)},children:(0,A.__)("Reset Position","pattern-css")})]})]})},fn=(0,Zt.jsx)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Zt.jsx)(cn.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),yn=()=>{const e=an("pcss-popout-global-mount"),t=(0,T.useRef)(null),[n,s]=(0,T.useState)(window.patternCss?.globalCssCompiled||"");(0,j.useStyleOverride)({id:"pcss-styles-global",css:n});const{open:r,transparent:a,x:o,y:i,width:l,height:c,setOpen:u,setSize:p,setTransparent:d,setPosition:h}=J();rn({ref:t,open:r,initialPosition:{x:o,y:i},onDragEnd:(e,t)=>{h(e,t)}}),on({ref:t,open:r,initialSize:{width:l,height:c},onResizeEnd:(e,t)=>{p(e,t)}});const m=e&&r;return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(L.PluginMoreMenuItem,{"data-cy":"global-css-editor-btn",icon:"tool",onClick:()=>u(!0),children:(0,A.__)("Add Global CSS (Pattern CSS)","pattern-css")}),m?(0,Zt.jsxs)(dn,{label:(0,A.sprintf)((0,A.__)("%s (Global)","pattern-css"),"Pattern CSS"),transparent:a,top:o,left:i,width:l,height:c,setOpen:u,mountNode:e,ref:t,children:[(0,Zt.jsx)(bn,{initialCss:window.patternCss?.globalCss||"",compiledCss:n,setCompiled:s}),(0,Zt.jsx)(P.CheckboxControl,{label:(0,A.__)("Transparent background","pattern-css"),className:"disable-mb-checkbox mt-2",checked:a,onChange:e=>{d(e)}})]}):null]})},bn=({initialCss:e,compiledCss:n,setCompiled:s})=>{const r=(0,T.useRef)(null),[a,o]=(0,T.useState)([]),[i,l]=(0,T.useState)(e),[c,u]=(0,T.useState)(),[p,d]=(0,T.useState)("idle"),h=(0,T.useCallback)((e=>{if(o([]),l(R(e)),!window.patternCss?.transform)return;const t=window.patternCss.transform({filename:"raw.css",code:(new TextEncoder).encode(e),minify:!0,errorRecovery:!0});t.warnings.length>0?o(t.warnings):u(t.code)}),[]);return(0,T.useEffect)((()=>{e&&h(e)}),[h,e]),(0,T.useEffect)((()=>{void 0!==c&&s((new TextDecoder).decode(c))}),[c,s]),(0,T.useEffect)((()=>{window.patternCss.globalCss=i,window.patternCss.globalCssCompiled=n,d("saving");const e=setTimeout((()=>{t()({path:"/pattern-css/v1/global-css",method:"POST",data:{global_css:i,global_css_compiled:n}}).then((()=>d("saved")))}),750);return()=>clearTimeout(e)}),[n,i]),(0,T.useEffect)((()=>{if("saved"!==p)return;const e=setTimeout((()=>d("idle")),1500);return()=>clearTimeout(e)}),[p]),(0,Zt.jsxs)("div",{className:"relative flex min-h-0 flex-grow flex-col",children:[(0,Zt.jsx)("div",{className:"min-h-0 flex-grow overflow-y-auto overflow-x-hidden border border-solid border-gray-600",ref:r,children:(0,Zt.jsx)(en,{value:i,onChange:h,lineOptions:a.map((({loc:e})=>({line:e.line,classes:["line-error"]})))})}),"saving"===p&&(0,Zt.jsx)("div",{className:"absolute bottom-px right-1 z-10 flex items-center justify-center bg-white p-1",children:(0,Zt.jsx)("span",{className:"text-sm text-gray-700",children:(0,A.__)("Saving...","pattern-css")})}),"saved"===p&&(0,Zt.jsxs)("div",{className:"absolute bottom-px right-1 z-10 flex items-center justify-center bg-white p-1",children:[(0,Zt.jsx)(ln,{icon:fn,size:20,className:"stroke-gray-700",color:"currentColor"}),(0,Zt.jsx)("span",{className:"text-sm text-gray-700",children:(0,A.__)("Saved!","pattern-css")})]})]})},vn={pcssAdditionalCss:{type:"string"},pcssAdditionalCssCompiled:{type:"string",default:""},pcssClassId:{type:"string",default:""}},wn=Object.keys(vn);(async function(e){if(k)return;if(S)return void await S;let t;("string"==typeof(e=e??new URL(o(229),o.b))||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=async function(e){try{return(await o.e(996).then(o.t.bind(o,996,19))).readFileSync(e)}catch{return fetch(e)}}(e)),S=e.then((e=>async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(e,{env:{...b,await_promise_sync:w,__getrandom_v03_custom:(e,n)=>{let s=t.memory.subarray(e,e+n);crypto.getRandomValues(s)}}}))).then((({instance:e})=>{e.exports.register_module(),t=new i(e),N=function(e){let t,n,s,{instance:r,exports:a}=e,{asyncify_get_state:o,asyncify_start_unwind:i,asyncify_stop_unwind:l,asyncify_start_rewind:c,asyncify_stop_rewind:u}=r.exports,p=r.exports.napi_wasm_malloc(4104),d=p+8,h=p+8+4096;function m(){if(0!==o())throw new Error(`Invalid async state ${o()}, expected 0.`)}return new Int32Array(e.memory.buffer,p).set([d,h]),v=(r,a,l)=>{if(2===o())return u(),null!=n&&e.createValue(n,a),null!=s&&e.createValue(s,l),void(t=n=s=null);m(),t=e.get(r),i(p)},async function(e){m();let r=a.bundle(e);for(;1===o();){l();try{n=await t}catch(e){s=e}m(),c(p),r=a.bundle(e)}return m(),r}}(t),k=t.exports})),await S})().then((()=>{window.patternCss.transform=x})),t().use(((e,t)=>{if(e.path?.includes("wp/v2/block-renderer")){let{data:n,body:s}=e;const[r,a=""]=e.path.split("?"),o=new URLSearchParams(a);for(const e of wn)o.delete(`attributes[${e}]`);const i=`${r}?${o.toString()}`;if(n?.attributes){const{...e}=n.attributes;for(const t of wn)delete e[t];n={...n,attributes:e}}if("string"==typeof s)try{const e=JSON.parse(s);if(e?.attributes){for(const t of wn)delete e.attributes[t];s=JSON.stringify(e)}}catch{}return t({...e,path:i,data:n,body:s})}return t(e)}));const kn=(e,t,n)=>{const s="string"==typeof e.className?e.className:"",r="string"==typeof n.className?n.className:"",a=new Set([...s.split(" "),...r.split(" ")].filter(Boolean)),o=n.pcssClassId;return"string"!=typeof o||!o||a.has(o)?e:(a.add(o),{...e,className:[...a].join(" ")})};(0,n.addFilter)("blocks.registerBlockType","kevinbatdorf/pcss-block-settings",(e=>{const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{const n=t?.(e)??{};return kn(n,0,e)},{...e,attributes:{...e?.attributes??{},...vn}}})),(0,n.addFilter)("editor.BlockEdit","kevinbatdorf/pcss-block-control",(e=>t=>((e,t)=>{const n=(0,T.useRef)(null),[s,r]=(0,T.useState)([]),a=(0,C.useSelect)((e=>{const{isSavingPost:t,isAutosavingPost:n}=e(L.store);return t()||n()}),[]),{open:o,setOpen:i}=X(),{open:l,setOpen:c}=J(),{attributes:u,setAttributes:p,clientId:d}=t,h=u.pcssClassId,m=u.pcssAdditionalCss,g=u.pcssAdditionalCssCompiled,f=u.className,y=(0,C.useSelect)((e=>{if(!h)return!1;const{getClientIdsWithDescendants:t,getBlockAttributes:n}=e(j.store);return t().some((e=>e!==d&&n(e)?.pcssClassId===h))}),[h,d]),_=(0,T.useCallback)((()=>{const e=`pcss-${Math.random().toString(36).substring(2,10)}`,t=f?.split(" ")||[],n=[...new Set([...t.filter((e=>e!==h&&!e.startsWith("pcss-"))),e].filter(Boolean))].join(" ");p({pcssClassId:e,className:n}),v(e)}),[f,p]),[b,v]=(0,T.useState)(h??""),[w,k]=(0,T.useState)(m),[S,N]=(0,T.useState)(),[x,I]=(0,T.useState)(g||"");(0,j.useStyleOverride)({id:`pcss-styles-block-${d}`,css:x});const B="[block] {\n  \n}",M=(0,T.useCallback)((e=>{if(void 0===e)return void k(void 0);if(r([]),k(R(e)),!window.patternCss?.transform)return;const t=window.patternCss.transform({filename:"raw.css",code:(new TextEncoder).encode(e),minify:!0,errorRecovery:!0,visitor:{Rule:{import:()=>[],"font-face":()=>[],keyframes:()=>[],page:()=>[],"counter-style":()=>[],"view-transition":()=>[],namespace:()=>[]},Selector(e){const{name:t,type:n}=e[0],{name:s,type:r}=window.patternCss.selectorOverride||{};return"attribute"===n&&"block"===t||n===r&&t===s?[{...e[0],type:"class",name:h},...e.slice(1)]:"nesting"===e[0].type?e:[{type:"class",name:h},{type:"combinator",value:"descendant"},...e]}}});t.warnings.length>0?r(t.warnings):N(t.code)}),[h]);(0,T.useEffect)((()=>{m&&M(m)}),[M,m]),(0,T.useEffect)((()=>{void 0!==S&&I((new TextDecoder).decode(S))}),[S]),(0,T.useEffect)((()=>{if(void 0===w)return;p({pcssAdditionalCss:w,pcssClassId:h||`pcss-${d?.split("-")[0]}`});const e=f?.split(" ")||[];h&&!e?.includes(h)&&p({className:O(e,h)})}),[w,p,h,d,f]),(0,T.useEffect)((()=>{if(!h||!a)return;const e=f?.split(" ")??[];if(e.find((e=>e.startsWith(h))))return;const t=O(e,h);p({className:t})}),[a,f,h,p]),(0,T.useEffect)((()=>{x!==g&&p({pcssAdditionalCssCompiled:x})}),[x,p,g]);const D=e;return(0,Zt.jsxs)(Zt.Fragment,{children:[D&&(0,Zt.jsx)(D,{...t}),(0,Zt.jsx)(j.InspectorControls,{children:(0,Zt.jsxs)(P.PanelBody,{title:"Pattern CSS",initialOpen:!1,className:"pattern-css-editor",children:[y&&(0,Zt.jsxs)(P.Notice,{status:"warning",isDismissible:!1,className:"mb-4",children:[(0,Zt.jsx)("p",{style:{margin:"0 0 8px"},children:(0,A.sprintf)((0,A.__)("Another block on this page is using the same ID (%s). Styles may conflict or be duplicated on the frontend.","pattern-css"),h??"")}),(0,Zt.jsx)(P.Button,{variant:"secondary",size:"small",onClick:_,children:(0,A.__)("Generate New ID","pattern-css")})]}),(0,Zt.jsxs)(mn,{children:[(0,Zt.jsx)("div",{className:"overfow-x-hidden relative flex-grow overflow-y-auto border border-solid border-gray-600",ref:n,children:(0,Zt.jsx)(en,{value:w??B,"data-cy":"pcss-editor-block",onChange:M,onFocus:e=>{const t=e;t.target.value===B&&(e=>{const t=e.value.split("\n"),n=t[0].length+t[1].length+1;requestAnimationFrame((()=>{e.focus(),e.setSelectionRange(n,n)}))})(t.target)},lineOptions:s.map((({loc:e})=>({line:e.line,classes:["line-error"]})))})}),(0,Zt.jsx)("div",{children:(0,Zt.jsx)(tn,{handleChange:M,popoutOpen:o,setPopoutOpen:i,globalEditorOpen:l,setGlobalEditorOpen:c,editorWrapperRef:n})})]}),(0,Zt.jsx)("p",{className:"m-0 my-2 text-xs text-gray-700",dangerouslySetInnerHTML:{__html:(0,A.sprintf)(
    1111// translators: %1$s = opening <a> tag, %2$s = closing </a> tag.
    1212// translators: %1$s = opening <a> tag, %2$s = closing </a> tag.
    13 (0,A.__)("See the %1$splugin readme%2$s for examples.","pattern-css"),'<a href="https://wordpress.org/plugins/pattern-css#opens-in-a-new-tab" target="_blank" rel="noreferrer noopener" class="text-wp-theme-500">',"</a>")}})]})}),(0,Yt.jsx)(j.InspectorAdvancedControls,{children:(0,Yt.jsxs)(P.BaseControl,{id:"pcss-css-id-setting",className:"pattern-css-editor",children:[(0,Yt.jsx)(P.TextControl,{spellCheck:!1,autoComplete:"off","data-cy":"class-id",type:"text",label:(0,A.sprintf)((0,A.__)("%s ID","pattern-css"),"Pattern CSS"),disabled:!0,onChange:()=>{},value:h}),(0,Yt.jsx)(P.Button,{variant:"secondary",className:"-mt-2",onClick:()=>{const e=`pcss-${Math.random().toString(36).substring(2,10)}`,t=f?.split(" ")||[],n=[...new Set([...t.filter((e=>!e.startsWith("pcss-"))),e].filter(Boolean))].join(" ");p({pcssClassId:e,className:n})},children:(0,A.__)("Generate New ID","pattern-css")}),(0,Yt.jsx)("p",{className:"text-md mt-2 text-gray-600",children:(0,A.__)("If there's a styling conflict with another block you can generate a new ID.","pattern-css")})]})})]})})(e,t)),Number.MAX_SAFE_INTEGER),(0,n.addFilter)("blocks.getSaveContent.extraProps","kevinbatdorf/pcss-add-save-props",wn),(0,s.registerPlugin)("pcss-global-editor",{render:()=>(0,Yt.jsx)(fn,{})})})()})();
     13(0,A.__)("See the %1$splugin readme%2$s for examples.","pattern-css"),'<a href="https://wordpress.org/plugins/pattern-css#opens-in-a-new-tab" target="_blank" rel="noreferrer noopener" class="text-wp-theme-500">',"</a>")}})]})}),(0,Zt.jsx)(j.InspectorAdvancedControls,{children:(0,Zt.jsxs)(P.BaseControl,{id:"pcss-css-id-setting",className:"pattern-css-editor",children:[(0,Zt.jsx)(P.TextControl,{spellCheck:!1,autoComplete:"off","data-cy":"class-id",type:"text",label:(0,A.sprintf)((0,A.__)("%s ID","pattern-css"),"Pattern CSS"),disabled:!window.patternCss?.allowManualOverride,onChange:e=>{v(e)},value:b}),(0,Zt.jsxs)("div",{className:"-mt-2 flex gap-2",children:[window.patternCss?.allowManualOverride&&b!==h&&(0,Zt.jsx)(P.Button,{variant:"primary",size:"small",onClick:()=>{const e=(0,E.cleanForSlug)(b);v(e);const t=f?.split(" ")||[],n=[...new Set([...t.filter((e=>e!==h)),e].filter(Boolean))].join(" ");p({pcssClassId:e,className:n})},children:(0,A.__)("Apply","pattern-css")}),(0,Zt.jsx)(P.Button,{variant:"secondary",size:"small",onClick:_,children:(0,A.__)("Generate New ID","pattern-css")})]}),(0,Zt.jsx)("p",{className:"text-md mt-2 text-gray-600",children:(0,A.__)("If there's a styling conflict with another block you can generate a new ID.","pattern-css")})]})})]})})(e,t)),Number.MAX_SAFE_INTEGER),(0,n.addFilter)("blocks.getSaveContent.extraProps","kevinbatdorf/pcss-add-save-props",kn),(0,s.registerPlugin)("pcss-global-editor",{render:()=>(0,Zt.jsx)(yn,{})})})()})();
  • pattern-css/tags/1.5.5/package.json

    r3488380 r3490244  
    88    "scripts": {
    99        "build": "wp-scripts build",
    10         "format": "wp-scripts format",
    11         "lint:css": "wp-scripts lint-style",
    12         "lint:js": "wp-scripts lint-js",
     10        "format": "biome format --write .",
     11        "lint": "biome check .",
     12        "lint:fix": "biome check --fix .",
    1313        "packages-update": "ncu -u --reject shiki,tailwindcss && ncu -u --target minor '/^tailwind/'",
    1414        "plugin-zip": "wp-scripts plugin-zip",
    1515        "start": "wp-scripts start",
     16        "test:e2e": "npx playwright test",
     17        "test:e2e:ui": "npx playwright test --ui",
    1618        "eject": "node scripts/eject.mjs",
    1719        "rename": "node scripts/rename.mjs"
    1820    },
    1921    "devDependencies": {
    20         "@trivago/prettier-plugin-sort-imports": "^6.0.2",
     22        "@biomejs/biome": "^2.4.8",
    2123        "@types/wordpress__block-editor": "^15.0.5",
    2224        "@types/wordpress__blocks": "^15.10.2",
     
    2426        "@types/wordpress__editor": "^14.12.0",
    2527        "@types/wordpress__plugins": "^6.0.0",
    26         "@typescript-eslint/eslint-plugin": "^8.44.1",
    27         "@typescript-eslint/parser": "^8.44.1",
    2828        "@wordpress/block-editor": "^15.15.0",
    29         "@wordpress/env": "^11.2.0",
     29        "@playwright/test": "^1.58.2",
     30        "@wordpress/e2e-test-utils-playwright": "^1.42.0",
    3031        "@wordpress/scripts": "^31.7.0",
    3132        "@wordpress/url": "^4.42.0",
     33        "@wp-playground/cli": "^3.1.13",
    3234        "autoprefixer": "^10.4.27",
    33         "cypress": "^15.12.0",
    34         "cypress-wait-until": "^3.0.2",
    35         "eslint": "^8.57.1",
    36         "eslint-config-prettier": "^9.1.0",
    37         "eslint-plugin-cypress": "^3.6.0",
    38         "eslint-plugin-no-only-tests": "^3.3.0",
    39         "eslint-plugin-prettier": "^5.2.3",
    40         "eslint-plugin-react": "^7.37.4",
    41         "eslint-plugin-react-hooks": "^4.6.2",
    4235        "fast-glob": "^3.3.3",
    4336        "glob": "^13.0.6",
    4437        "postcss-import": "^16.1.1",
    4538        "postcss-safe-important": "^2.0.1",
    46         "prettier": "^3.8.1",
    47         "prettier-plugin-tailwindcss": "^0.7.2",
    4839        "replace-in-file": "^8.4.0",
    4940        "tailwindcss": "^3.4.19",
    50         "typescript": "^5.9.3"
     41        "typescript": "^6.0.2"
    5142    },
    5243    "dependencies": {
  • pattern-css/tags/1.5.5/pattern-css.php

    r3488380 r3490244  
    66 * Requires at least: 6.7
    77 * Requires PHP:      7.0
    8  * Version:           1.5.4
     8 * Version:           1.5.5
    99 * Author:            Kevin Batdorf
    1010 * Author URI:        https://twitter.com/kevinbatdorf
     
    4343            'globalCss' => get_option('pcss_global_css', ''),
    4444            'globalCssCompiled' => get_option('pcss_global_css_compiled', ''),
     45            'allowManualOverride' => defined('PATTERN_CSS_ALLOW_MANUAL_OVERRIDE'),
    4546        ]) . ';',
    4647        'before'
     
    7172
    7273    if (empty($pcss_block_id) || empty($pcss_additional_css)) return $pre_render;
     74    // Skip if already registered (e.g. same block in a Query Loop)
     75    if (wp_style_is("pcss-block-{$pcss_block_id}", 'registered')) return $pre_render;
    7376
    7477    wp_register_style("pcss-block-{$pcss_block_id}", false, [], null);
  • pattern-css/tags/1.5.5/readme.txt

    r3488380 r3490244  
    33Tags:              block, css, styles, inline, editor
    44Tested up to:      7.0
    5 Stable tag:        1.5.4
     5Stable tag:        1.5.5
    66License:           GPL-2.0-or-later
    77License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     
    133133`define('PATTERN_CSS_SELECTOR_OVERRIDE', ['name' => 'foo', 'type' => 'type']);`
    134134
     135= Can I manually set the class ID? =
     136
     137By default, class IDs are auto-generated. If you need to manually set or change a block's class ID (e.g. to match an existing class), you can enable this by adding the following constant to wp-config.php or functions.php:
     138
     139`define('PATTERN_CSS_ALLOW_MANUAL_OVERRIDE', true);`
     140
     141Once enabled, the ID field in the Advanced panel becomes editable. Type your desired class name and press "Apply" to save it. The value will be slugified automatically.
     142
    135143== Screenshots ==
    136144
     
    141149
    142150== Changelog ==
     151
     152= 1.5.5 - 2026-03-24 =
     153- Added manual class ID override (opt-in via constant)
     154- Warns when duplicate class IDs are detected in the editor
     155- Prevents duplicate inline styles on the frontend
     156- Switched to Biome for linting and formatting
     157- Switched to Playwright and WP Playground for testing
    143158
    144159= 1.5.4 - 2026-03-23 =
  • pattern-css/tags/1.5.5/src/components/BlockControl.tsx

    r3488380 r3490244  
    11import {
     2    store as blockEditorStore,
    23    InspectorAdvancedControls,
    34    InspectorControls,
     5    // @ts-expect-error -- outdated types
     6    useStyleOverride,
    47} from '@wordpress/block-editor';
    5 import { useStyleOverride } from '@wordpress/block-editor';
    68import {
     9    BaseControl,
     10    Button,
     11    Notice,
    712    PanelBody,
    8     BaseControl,
    913    TextControl,
    10     Button,
    1114} from '@wordpress/components';
    1215import { useSelect } from '@wordpress/data';
    1316import { store as coreStore } from '@wordpress/editor';
    14 import { useEffect, useState, useCallback, useRef } from '@wordpress/element';
    15 import { sprintf, __ } from '@wordpress/i18n';
    16 import { Warning as CssWarning } from 'lightningcss-wasm';
     17import { useCallback, useEffect, useRef, useState } from '@wordpress/element';
     18import { __, sprintf } from '@wordpress/i18n';
     19import { cleanForSlug } from '@wordpress/url';
     20import type { Warning as CssWarning } from 'lightningcss-wasm';
    1721import { addToClassList } from '../lib/classes';
    1822import { focusAtEndOfLine2 } from '../lib/dom';
     
    2428import { PopoutEditor } from './PopoutEditor';
    2529
     30export interface BlockControlProps {
     31    attributes: Record<string, unknown>;
     32    setAttributes: (attrs: Record<string, unknown>) => void;
     33    clientId: string;
     34}
     35
    2636export const BlockControl = (
    27     // eslint-disable-next-line
    28     CurrentMenuItems: any,
    29     // eslint-disable-next-line
    30     props: any,
     37    CurrentMenuItems: unknown,
     38    props: BlockControlProps,
    3139) => {
    3240    const editorWrapperRef = useRef<HTMLDivElement>(null);
    3341    const [warnings, setWarnings] = useState<CssWarning[]>([]);
    3442    const isSaving = useSelect((select) => {
    35         // eslint-disable-next-line
    36         // @ts-ignore-next-line
    3743        const { isSavingPost, isAutosavingPost } = select(coreStore);
    3844        return isSavingPost() || isAutosavingPost();
     
    4248        useGlobalEditorStore();
    4349    const { attributes, setAttributes, clientId: blockId } = props;
    44     const {
    45         pcssClassId,
    46         pcssAdditionalCss: initialCss,
    47         pcssAdditionalCssCompiled: compiledCss,
    48         className: existingClasses,
    49     } = attributes;
    50 
     50    const pcssClassId = attributes.pcssClassId as string | undefined;
     51    const initialCss = attributes.pcssAdditionalCss as string | undefined;
     52    const compiledCss = attributes.pcssAdditionalCssCompiled as
     53        | string
     54        | undefined;
     55    const existingClasses = attributes.className as string | undefined;
     56
     57    const isDuplicateId = useSelect(
     58        (select) => {
     59            if (!pcssClassId) return false;
     60            const { getClientIdsWithDescendants, getBlockAttributes } =
     61                select(blockEditorStore);
     62            return getClientIdsWithDescendants().some(
     63                (id: string) =>
     64                    id !== blockId &&
     65                    getBlockAttributes(id)?.pcssClassId === pcssClassId,
     66            );
     67        },
     68        [pcssClassId, blockId],
     69    );
     70
     71    const generateNewId = useCallback(() => {
     72        const newId = `pcss-${Math.random().toString(36).substring(2, 10)}`;
     73        const existing = existingClasses?.split(' ') || [];
     74        const className = [
     75            ...new Set(
     76                [
     77                    ...existing.filter((c: string) => c !== pcssClassId && !c.startsWith('pcss-')),
     78                    newId,
     79                ].filter(Boolean),
     80            ),
     81        ].join(' ');
     82        setAttributes({ pcssClassId: newId, className });
     83        setManualClassId(newId);
     84    }, [existingClasses, setAttributes]);
     85
     86    const [manualClassId, setManualClassId] = useState(pcssClassId ?? '');
    5187    const [css, setCss] = useState(initialCss);
    5288    const [transformed, setTransformed] = useState<Uint8Array>();
    5389    const [compiled, setCompiled] = useState(compiledCss || '');
    54     useStyleOverride({ id: `pcss-styles-block-${pcssClassId}`, css: compiled });
     90    useStyleOverride({ id: `pcss-styles-block-${blockId}`, css: compiled });
    5591    const defaultCssExample = '[block] {\n  \n}';
    5692
     
    96132                        },
    97133                    },
     134                    // @ts-expect-error -- lightningcss visitor return types are overly strict
    98135                    Selector(selector) {
    99136                        const { name, type } = selector[0] as {
     
    113150                                    ...selector[0],
    114151                                    type: 'class',
    115                                     // eslint-disable-next-line
    116152                                    name: pcssClassId,
    117153                                },
     
    125161                            {
    126162                                type: 'class',
    127                                 // eslint-disable-next-line
    128163                                name: pcssClassId,
    129164                            },
     
    161196        // If they are editing and our class isnt in the list then add it
    162197        const existing = existingClasses?.split(' ') || [];
    163         if (existing?.includes(pcssClassId)) return;
     198        if (!pcssClassId || existing?.includes(pcssClassId)) return;
    164199        setAttributes({ className: addToClassList(existing, pcssClassId) });
    165200    }, [css, setAttributes, pcssClassId, blockId, existingClasses]);
     
    169204    useEffect(() => {
    170205        if (!pcssClassId || !isSaving) return;
    171         const existing = existingClasses?.split(' ') || [];
    172         if (existing?.find((c: string) => c.startsWith(pcssClassId))) return;
     206        const existing = existingClasses?.split(' ') ?? [];
     207        if (existing.find((c: string) => c.startsWith(pcssClassId))) return;
    173208        const className = addToClassList(existing, pcssClassId);
    174209        setAttributes({ className });
     
    180215    }, [compiled, setAttributes, compiledCss]);
    181216
     217    const MenuItems =
     218        CurrentMenuItems as React.ComponentType<BlockControlProps>;
    182219    return (
    183220        <>
    184             {CurrentMenuItems && <CurrentMenuItems {...props} />}
     221            {MenuItems && <MenuItems {...props} />}
    185222            <InspectorControls>
    186223                <PanelBody
    187224                    title="Pattern CSS"
    188225                    initialOpen={false}
    189                     className="pattern-css-editor">
     226                    className="pattern-css-editor"
     227                >
     228                    {isDuplicateId && (
     229                        <Notice
     230                            status="warning"
     231                            isDismissible={false}
     232                            className="mb-4"
     233                        >
     234                            <p style={{ margin: '0 0 8px' }}>
     235                                {sprintf(
     236                                    __(
     237                                        'Another block on this page is using the same ID (%s). Styles may conflict or be duplicated on the frontend.',
     238                                        'pattern-css',
     239                                    ),
     240                                    pcssClassId ?? '',
     241                                )}
     242                            </p>
     243                            <Button
     244                                variant="secondary"
     245                                size="small"
     246                                onClick={generateNewId}
     247                            >
     248                                {__('Generate New ID', 'pattern-css')}
     249                            </Button>
     250                        </Notice>
     251                    )}
    190252                    <PopoutEditor>
    191                         <>
    192                             <div
    193                                 className="overfow-x-hidden relative flex-grow overflow-y-auto border border-solid border-gray-600"
    194                                 ref={editorWrapperRef}>
    195                                 <CodeEditor
    196                                     value={css ?? defaultCssExample}
    197                                     data-cy="pcss-editor-block"
    198                                     onChange={handleChange}
    199                                     onFocus={(e) => {
    200                                         const v = e.target.value;
    201                                         if (v === defaultCssExample) {
    202                                             focusAtEndOfLine2(e.target);
    203                                         }
    204                                     }}
    205                                     lineOptions={warnings.map(({ loc }) => ({
    206                                         line: loc.line,
    207                                         classes: ['line-error'],
    208                                     }))}
    209                                 />
    210                             </div>
    211                             <div>
    212                                 <EditorControls
    213                                     handleChange={handleChange}
    214                                     popoutOpen={popoutOpen}
    215                                     setPopoutOpen={setPopoutOpen}
    216                                     globalEditorOpen={globalEditorOpen}
    217                                     setGlobalEditorOpen={setglobalEditorOpen}
    218                                     editorWrapperRef={editorWrapperRef}
    219                                 />
    220                             </div>
    221                         </>
     253                        <div
     254                            className="overfow-x-hidden relative flex-grow overflow-y-auto border border-solid border-gray-600"
     255                            ref={editorWrapperRef}
     256                        >
     257                            <CodeEditor
     258                                value={css ?? defaultCssExample}
     259                                data-cy="pcss-editor-block"
     260                                onChange={handleChange}
     261                                onFocus={(e: unknown) => {
     262                                    const event =
     263                                        e as React.FocusEvent<HTMLTextAreaElement>;
     264                                    if (
     265                                        event.target.value === defaultCssExample
     266                                    ) {
     267                                        focusAtEndOfLine2(event.target);
     268                                    }
     269                                }}
     270                                lineOptions={warnings.map(({ loc }) => ({
     271                                    line: loc.line,
     272                                    classes: ['line-error'],
     273                                }))}
     274                            />
     275                        </div>
     276                        <div>
     277                            <EditorControls
     278                                handleChange={handleChange}
     279                                popoutOpen={popoutOpen}
     280                                setPopoutOpen={setPopoutOpen}
     281                                globalEditorOpen={globalEditorOpen}
     282                                setGlobalEditorOpen={setglobalEditorOpen}
     283                                editorWrapperRef={editorWrapperRef}
     284                            />
     285                        </div>
    222286                    </PopoutEditor>
    223287                    <p
     
    240304                <BaseControl
    241305                    id="pcss-css-id-setting"
    242                     className="pattern-css-editor">
     306                    className="pattern-css-editor"
     307                >
    243308                    <TextControl
    244309                        spellCheck={false}
     
    251316                            'Pattern CSS',
    252317                        )}
    253                         disabled
    254                         onChange={() => undefined}
    255                         value={pcssClassId}
     318                        disabled={!window.patternCss?.allowManualOverride}
     319                        onChange={(value: string) => {
     320                            setManualClassId(value);
     321                        }}
     322                        value={manualClassId}
    256323                    />
    257                     <Button
    258                         variant="secondary"
    259                         className="-mt-2"
    260                         onClick={() => {
    261                             const pcssClassId = `pcss-${Math.random()
    262                                 .toString(36)
    263                                 .substring(2, 10)}`;
    264                             const existing = existingClasses?.split(' ') || [];
    265                             const className = [
    266                                 ...new Set(
    267                                     [
    268                                         // Remove any existing pcss- classes
    269                                         ...existing.filter(
    270                                             (c: string) =>
    271                                                 !c.startsWith('pcss-'),
     324                    <div className="-mt-2 flex gap-2">
     325                        {window.patternCss?.allowManualOverride && manualClassId !== pcssClassId && (
     326                            <Button
     327                                variant="primary"
     328                                size="small"
     329                                onClick={() => {
     330                                    const slug = cleanForSlug(manualClassId);
     331                                    setManualClassId(slug);
     332                                    const existing = existingClasses?.split(' ') || [];
     333                                    const className = [
     334                                        ...new Set(
     335                                            [
     336                                                ...existing.filter((c: string) => c !== pcssClassId),
     337                                                slug,
     338                                            ].filter(Boolean),
    272339                                        ),
    273                                         pcssClassId,
    274                                     ].filter(Boolean),
    275                                 ),
    276                             ].join(' ');
    277                             setAttributes({ pcssClassId, className });
    278                         }}>
    279                         {__('Generate New ID', 'pattern-css')}
    280                     </Button>
     340                                    ].join(' ');
     341                                    setAttributes({ pcssClassId: slug, className });
     342                                }}
     343                            >
     344                                {__('Apply', 'pattern-css')}
     345                            </Button>
     346                        )}
     347                        <Button
     348                            variant="secondary"
     349                            size="small"
     350                            onClick={generateNewId}
     351                        >
     352                            {__('Generate New ID', 'pattern-css')}
     353                        </Button>
     354                    </div>
    281355                    <p className="text-md mt-2 text-gray-600">
    282356                        {__(
  • pattern-css/tags/1.5.5/src/components/CodeEditor.tsx

    r3297727 r3490244  
    88    value: string;
    99    onChange: (value: string) => void;
    10     // eslint-disable-next-line
    11     onFocus?: (event: any) => void;
    12     // eslint-disable-next-line
    13     onBlur?: (event: any) => void;
     10    onFocus?: (event: unknown) => void;
     11    onBlur?: (event: unknown) => void;
    1412    lineOptions: LineOption[];
    1513};
     
    4442        <div ref={textAreaRef} className="">
    4543            <Editor
    46                 // eslint-disable-next-line
    47                 // @ts-ignore-next-line
     44                // @ts-expect-error-next-line
    4845                ref={ref}
    4946                value={decodeEntities(value)}
     
    6259                    color: highlighter?.getForegroundColor() ?? '#000',
    6360                }}
    64                 // eslint-disable-next-line
    65                 onKeyDown={(e: any) =>
     61                onKeyDown={(e: React.KeyboardEvent) =>
    6662                    e.key === 'Tab' &&
    6763                    // Tab lock here. Pressing Escape will unlock.
  • pattern-css/tags/1.5.5/src/components/EditorControls.tsx

    r3297727 r3490244  
    2121}) => {
    2222    const [isHighlighted, setIsHighlighted] = useState(false);
    23     // eslint-disable-next-line
    24     // @ts-ignore-next-line
    2523    const { getSelectedBlockClientId } = useSelect(
    2624        (select) => select(blockEditorStore),
    2725        [],
    2826    );
     27    // @ts-expect-error -- outdated types
    2928    const { toggleBlockHighlight } = useDispatch(blockEditorStore);
    3029    const currentBlockId = getSelectedBlockClientId();
     
    5453                        variant="tertiary"
    5554                        onClick={() => setGlobalEditorOpen(true)}
    56                         className="lowercase hover:bg-gray-100 hover:text-gray-900">
     55                        className="lowercase hover:bg-gray-100 hover:text-gray-900"
     56                    >
    5757                        {
    5858                            // translators: Popout as in Popout the editor
     
    6969                            variant="tertiary"
    7070                            onClick={() => setPopoutOpen(true)}
    71                             className="lowercase hover:bg-gray-100 hover:text-gray-900">
     71                            className="lowercase hover:bg-gray-100 hover:text-gray-900"
     72                        >
    7273                            {
    7374                                // translators: Popout as in Popout the editor
     
    7980                {popoutOpen ? (
    8081                    <Tooltip
    81                         text={__('Highlight the current block', 'pattern-css')}>
     82                        text={__('Highlight the current block', 'pattern-css')}
     83                    >
    8284                        <Button
    8385                            size="small"
     
    9193                            className={`lowercase hover:bg-gray-100 hover:text-gray-900 ${
    9294                                isHighlighted ? 'bg-gray-100' : ''
    93                             }`}>
     95                            }`}
     96                        >
    9497                            {__('Highlight', 'pattern-css')}
    9598                        </Button>
     
    107110                                ?.focus();
    108111                        }}
    109                         className="lowercase hover:bg-gray-100 hover:text-gray-900">
     112                        className="lowercase hover:bg-gray-100 hover:text-gray-900"
     113                    >
    110114                        {
    111115                            // translators: Clear as in Clear the editor
  • pattern-css/tags/1.5.5/src/components/FloatingWindow.tsx

    r3297727 r3490244  
    33    createPortal,
    44    forwardRef,
    5     RefObject,
     5    type RefObject,
    66    useLayoutEffect,
    77} from '@wordpress/element';
    88import { __ } from '@wordpress/i18n';
    9 import { Icon, close, dragHandle } from '@wordpress/icons';
     9import { close, dragHandle, Icon } from '@wordpress/icons';
    1010import { getHighestZIndex } from '../lib/util';
    1111
     
    5454                    className={`pattern-css-floating-window fixed z-high flex flex-col border border-solid border-gray-300 font-jetbrains-mono shadow-2xl ${transparent ? 'bg-white/90' : 'bg-white'}`}
    5555                    style={{ top, left, width, height }}
    56                     ref={ref}>
    57                     <>
    58                         <div className="flex flex-shrink-0 items-center justify-between">
    59                             <div
    60                                 data-pcss-handle
    61                                 draggable
    62                                 className="flex flex-grow cursor-grab items-center justify-between gap-1 p-2 py-3">
    63                                 <DragButton />
    64                                 <h2 className="m-0 h-full flex-grow p-0 text-sm font-medium text-gray-900">
    65                                     {label}
    66                                 </h2>
    67                             </div>
    68                             <Button
    69                                 className="relative z-10 border-0 p-2"
    70                                 onClick={() => setOpen(false)}
    71                                 icon={<Icon icon={close} size={12} />}
    72                                 label={__('Close Modal', 'pattern-css')}
    73                                 showTooltip={false}
    74                             />
     56                    ref={ref}
     57                >
     58                    <div className="flex flex-shrink-0 items-center justify-between">
     59                        <div
     60                            data-pcss-handle
     61                            draggable
     62                            className="flex flex-grow cursor-grab items-center justify-between gap-1 p-2 py-3"
     63                        >
     64                            <DragButton />
     65                            <h2 className="m-0 h-full flex-grow p-0 text-sm font-medium text-gray-900">
     66                                {label}
     67                            </h2>
    7568                        </div>
    76                         <div className="relative z-50 flex min-h-0 flex-grow flex-col px-4 pb-4">
    77                             {children}
    78                         </div>
    79                         <div
    80                             data-pcss-resize
    81                             className="absolute -bottom-1 -right-1 z-high h-6 w-6">
    82                             <div className="h-6 w-6 cursor-se-resize border border-l-0 border-t-0 border-solid border-transparent transition-colors duration-300 hover:border-gray-600 active:border-gray-600" />
    83                         </div>
    84                     </>
     69                        <Button
     70                            className="relative z-10 border-0 p-2"
     71                            onClick={() => setOpen(false)}
     72                            icon={<Icon icon={close} size={12} />}
     73                            label={__('Close Modal', 'pattern-css')}
     74                            showTooltip={false}
     75                        />
     76                    </div>
     77                    <div className="relative z-50 flex min-h-0 flex-grow flex-col px-4 pb-4">
     78                        {children}
     79                    </div>
     80                    <div
     81                        data-pcss-resize
     82                        className="absolute -bottom-1 -right-1 z-high h-6 w-6"
     83                    >
     84                        <div className="h-6 w-6 cursor-se-resize border border-l-0 border-t-0 border-solid border-transparent transition-colors duration-300 hover:border-gray-600 active:border-gray-600" />
     85                    </div>
    8586                </div>
    8687            </div>,
     
    9495        style={{ userSelect: 'none' }}
    9596        className="relative flex text-gray-900 hover:text-gray-700"
    96         {...props}>
     97        {...props}
     98    >
    9799        <Icon icon={dragHandle} size={24} />
    98100        <span className="sr-only">{__('Drag to move', 'pattern-css')}</span>
  • pattern-css/tags/1.5.5/src/components/GlobalEditor.tsx

    r3297727 r3490244  
    11import apiFetch from '@wordpress/api-fetch';
     2// @ts-expect-error -- outdated types
    23import { useStyleOverride } from '@wordpress/block-editor';
    34import { CheckboxControl } from '@wordpress/components';
     
    56import { useCallback, useEffect, useRef, useState } from '@wordpress/element';
    67import { __, sprintf } from '@wordpress/i18n';
    7 import { Icon, check } from '@wordpress/icons';
    8 import { Warning as CssWarning } from 'lightningcss-wasm';
     8import { check, Icon } from '@wordpress/icons';
     9import type { Warning as CssWarning } from 'lightningcss-wasm';
    910import { useDraggable } from '../hooks/useDraggable';
    1011import { usePortal } from '../hooks/usePortal';
     
    5859                data-cy="global-css-editor-btn"
    5960                icon="tool"
    60                 onClick={() => setOpen(true)}>
     61                onClick={() => setOpen(true)}
     62            >
    6163                {__('Add Global CSS (Pattern CSS)', 'pattern-css')}
    6264            </PluginMoreMenuItem>
     
    7577                    setOpen={setOpen}
    7678                    mountNode={mountNode}
    77                     ref={ref}>
     79                    ref={ref}
     80                >
    7881                    <TheEditor
    7982                        initialCss={window.patternCss?.globalCss || ''}
     
    168171            <div
    169172                className="min-h-0 flex-grow overflow-y-auto overflow-x-hidden border border-solid border-gray-600"
    170                 ref={editorWrapperRef}>
     173                ref={editorWrapperRef}
     174            >
    171175                <CodeEditor
    172176                    value={css}
  • pattern-css/tags/1.5.5/src/components/PopoutEditor.tsx

    r3295651 r3490244  
    5252                setOpen={setOpen}
    5353                mountNode={mountNode}
    54                 ref={ref}>
     54                ref={ref}
     55            >
    5556                {children}
    5657            </FloatingWindow>
     
    8182                        setPosition(20, 20);
    8283                        setSize(250, 400);
    83                     }}>
     84                    }}
     85                >
    8486                    {__('Reset Position', 'pattern-css')}
    8587                </Button>
  • pattern-css/tags/1.5.5/src/hooks/useTheme.ts

    r2988734 r3490244  
    11import { useEffect, useState } from '@wordpress/element';
    2 import { getHighlighter, Lang, setCDN, Theme, setWasm } from 'shiki';
     2import { getHighlighter, type Lang, setCDN, setWasm, type Theme } from 'shiki';
    33import useSWRImmutable from 'swr/immutable';
    44
     
    1515    if (!once) {
    1616        once = true;
    17         setCDN(window.patternCss?.pluginUrl + 'build/shiki/');
     17        setCDN(`${window.patternCss?.pluginUrl}build/shiki/`);
    1818    }
    1919    const { data: highlighter, error } = useSWRImmutable(
     
    2222    );
    2323    useEffect(() => {
    24         const assetDir = window.patternCss?.pluginUrl + 'build/shiki/';
    25         fetch(assetDir + 'dist/onig.wasm')
     24        const assetDir = `${window.patternCss?.pluginUrl}build/shiki/`;
     25        fetch(`${assetDir}dist/onig.wasm`)
    2626            .then((res) => res.arrayBuffer())
    2727            .then((wasmBuffer) => {
  • pattern-css/tags/1.5.5/src/index.tsx

    r3488380 r3490244  
    33import { registerPlugin } from '@wordpress/plugins';
    44import init, { transform } from 'lightningcss-wasm';
    5 import { BlockControl } from './components/BlockControl';
     5import {
     6    BlockControl,
     7    type BlockControlProps,
     8} from './components/BlockControl';
    69import { GlobalEditor } from './components/GlobalEditor';
    710import './editor.css';
     
    2730        const [base, query = ''] = options.path.split('?');
    2831        const params = new URLSearchParams(query);
    29         pcssAttributeKeys.forEach((key) => params.delete(`attributes[${key}]`));
     32        for (const key of pcssAttributeKeys)
     33            params.delete(`attributes[${key}]`);
    3034        const path = `${base}?${params.toString()}`;
    3135
     
    3337        if (data?.attributes) {
    3438            const { ...attrs } = data.attributes;
    35             pcssAttributeKeys.forEach((key) => delete attrs[key]);
     39            for (const key of pcssAttributeKeys) delete attrs[key];
    3640            data = { ...data, attributes: attrs };
    3741        }
     
    4145                const parsed = JSON.parse(body);
    4246                if (parsed?.attributes) {
    43                     pcssAttributeKeys.forEach((key) => delete parsed.attributes[key]);
     47                    for (const key of pcssAttributeKeys)
     48                        delete parsed.attributes[key];
    4449                    body = JSON.stringify(parsed);
    4550                }
     
    5459});
    5560
    56 // Both are unexpected objects with any properties types
    57 // eslint-disable-next-line
    58 const addSaveProps = (props: any, _blockType: null, attributes: any) => {
     61const addSaveProps = (
     62    props: Record<string, unknown>,
     63    _blockType: null,
     64    attributes: Record<string, unknown>,
     65) => {
     66    const propsClass =
     67        typeof props.className === 'string' ? props.className : '';
     68    const attrsClass =
     69        typeof attributes.className === 'string' ? attributes.className : '';
    5970    const classes = new Set(
    60         [props.className?.split(' '), attributes.className?.split(' ')]
    61             .flat()
    62             .filter(Boolean),
     71        [...propsClass.split(' '), ...attrsClass.split(' ')].filter(Boolean),
    6372    );
    64     const { pcssClassId } = attributes;
     73    const pcssClassId = attributes.pcssClassId;
    6574
    66     if (!pcssClassId || classes.has(pcssClassId)) return props;
     75    if (
     76        typeof pcssClassId !== 'string' ||
     77        !pcssClassId ||
     78        classes.has(pcssClassId)
     79    )
     80        return props;
    6781    classes.add(pcssClassId);
    6882    return {
     
    7892        // This pattern is found in the Gutenberg source code
    7993        const existingGetEditWrapperProps = settings.getEditWrapperProps;
    80         // eslint-disable-next-line
    81         settings.getEditWrapperProps = (attributes: { [key: string]: any }) => {
    82             const props = existingGetEditWrapperProps?.(attributes) ?? {};
     94        settings.getEditWrapperProps = (
     95            attributes: Record<string, unknown>,
     96        ) => {
     97            const props = (existingGetEditWrapperProps?.(attributes) ??
     98                {}) as Record<string, unknown>;
    8399            return addSaveProps(props, null, attributes);
    84100        };
     
    92108    'editor.BlockEdit',
    93109    'kevinbatdorf/pcss-block-control',
    94     (CurrentMenuItems) =>
    95         // Not sure how to type these incoming props
    96         // eslint-disable-next-line
    97         (props: any) =>
    98             BlockControl(CurrentMenuItems, props),
     110    (CurrentMenuItems) => (props: BlockControlProps) =>
     111        BlockControl(CurrentMenuItems, props),
    99112    // Force it at the very bottom
    100113    Number.MAX_SAFE_INTEGER,
  • pattern-css/tags/1.5.5/src/state/global-editor.ts

    r3295651 r3490244  
    11import { create } from 'zustand';
    2 import { persist, devtools } from 'zustand/middleware';
     2import { devtools, persist } from 'zustand/middleware';
    33
    44type GlobalEditorState = {
  • pattern-css/tags/1.5.5/src/state/popout.ts

    r3291638 r3490244  
    11import { create } from 'zustand';
    2 import { persist, devtools } from 'zustand/middleware';
     2import { devtools, persist } from 'zustand/middleware';
    33
    44type PopoutState = {
  • pattern-css/tags/1.5.5/src/types.ts

    r3295651 r3490244  
    1 import { transform } from 'lightningcss-wasm';
    2 
    3 export {};
     1import type { transform } from 'lightningcss-wasm';
    42
    53declare global {
     
    1210                name: string;
    1311            };
     12            allowManualOverride?: boolean;
    1413            globalCss: string;
    1514            globalCssCompiled: string;
  • pattern-css/tags/1.5.5/tailwind.config.js

    r2988734 r3490244  
    11const colors = require('tailwindcss/colors');
    2 delete colors['lightBlue'];
    3 delete colors['warmGray'];
    4 delete colors['trueGray'];
    5 delete colors['coolGray'];
    6 delete colors['blueGray'];
     2delete colors.lightBlue;
     3delete colors.warmGray;
     4delete colors.trueGray;
     5delete colors.coolGray;
     6delete colors.blueGray;
    77
    88// See postcss.config.js for more parsing options.
  • pattern-css/tags/1.5.5/tsconfig.json

    r2988734 r3490244  
    1414        "isolatedModules": true,
    1515        "jsx": "preserve",
    16         "incremental": true
     16        "incremental": true,
     17        "types": [
     18            "wordpress__block-editor",
     19            "wordpress__blocks",
     20            "wordpress__edit-post"
     21        ]
    1722    },
    1823    "include": ["src/**/*.ts", "src/**/*.tsx"],
  • pattern-css/trunk/.gitignore

    r3295651 r3490244  
    44Cargo.lock
    55
    6 cypress/screenshots/**/*
    7 !cypress/screenshots/**/.gitkeep
    8 cypress/videos/**/*
    9 !cypress/videos/**/.gitkeep
    10 cypress/downloads/**/*
    11 cypress/downloads/**/.gitkeep
     6playwright-report/
     7test-results/
    128
    139/vendor/
  • pattern-css/trunk/README.md

    r3295651 r3490244  
    2525### Combines Rules
    2626
    27 <!-- prettier-ignore -->
    2827```css
    2928[block] {
     
    4039### Fixes redundant properties
    4140
    42 <!-- prettier-ignore -->
    4341```css
    4442[block] {
  • pattern-css/trunk/build/index-rtl.css

    r3297727 r3490244  
    1 .pattern-css-editor{--tw-ring-inset:var(--tw-empty,    );--tw-ring-offset-width:0px;--tw-ring-offset-color:transparent;--tw-ring-color:var(--wp-admin-theme-color);--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.pattern-css-editor *,.pattern-css-editor :after,.pattern-css-editor :before{box-sizing:border-box!important}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pattern-css-editor .sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pattern-css-editor .fixed{position:fixed!important}.pattern-css-editor .absolute{position:absolute!important}.pattern-css-editor .relative{position:relative!important}.pattern-css-editor .-bottom-1{bottom:-.25rem!important}.pattern-css-editor .-right-1{left:-.25rem!important}.pattern-css-editor .bottom-px{bottom:1px!important}.pattern-css-editor .right-1{left:.25rem!important}.pattern-css-editor .z-10{z-index:10!important}.pattern-css-editor .z-50{z-index:50!important}.pattern-css-editor .z-high{z-index:99999!important}.pattern-css-editor .m-0{margin:0!important}.pattern-css-editor .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.pattern-css-editor .-mt-2{margin-top:-.5rem!important}.pattern-css-editor .mt-2{margin-top:.5rem!important}.pattern-css-editor .block{display:block!important}.pattern-css-editor .flex{display:flex!important}.pattern-css-editor .h-52{height:13rem!important}.pattern-css-editor .h-6{height:1.5rem!important}.pattern-css-editor .h-full{height:100%!important}.pattern-css-editor .min-h-0{min-height:0!important}.pattern-css-editor .min-h-52{min-height:13rem!important}.pattern-css-editor .w-6{width:1.5rem!important}.pattern-css-editor .flex-shrink-0{flex-shrink:0!important}.pattern-css-editor .flex-grow{flex-grow:1!important}.pattern-css-editor .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.pattern-css-editor .cursor-grab{cursor:grab!important}.pattern-css-editor .cursor-se-resize{cursor:sw-resize!important}.pattern-css-editor .flex-col{flex-direction:column!important}.pattern-css-editor .items-center{align-items:center!important}.pattern-css-editor .justify-end{justify-content:flex-end!important}.pattern-css-editor .justify-center{justify-content:center!important}.pattern-css-editor .justify-between{justify-content:space-between!important}.pattern-css-editor .gap-1{gap:.25rem!important}.pattern-css-editor .gap-2{gap:.5rem!important}.pattern-css-editor .overflow-y-auto{overflow-y:auto!important}.pattern-css-editor .overflow-x-hidden{overflow-x:hidden!important}.pattern-css-editor .border{border-width:1px!important}.pattern-css-editor .border-0{border-width:0!important}.pattern-css-editor .border-l-0{border-right-width:0!important}.pattern-css-editor .border-t-0{border-top-width:0!important}.pattern-css-editor .border-solid{border-style:solid!important}.pattern-css-editor .border-gray-300{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-gray-600{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-transparent{border-color:transparent!important}.pattern-css-editor .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white\/90{background-color:hsla(0,0%,100%,.9)!important}.pattern-css-editor .stroke-gray-700{stroke:#757575!important}.pattern-css-editor .p-0{padding:0!important}.pattern-css-editor .p-1{padding:.25rem!important}.pattern-css-editor .p-2{padding:.5rem!important}.pattern-css-editor .p-4{padding:1rem!important}.pattern-css-editor .px-4{padding-right:1rem!important;padding-left:1rem!important}.pattern-css-editor .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.pattern-css-editor .pb-4{padding-bottom:1rem!important}.pattern-css-editor .font-jetbrains-mono{font-family:pcss-jetbrains-mono,monospace!important}.pattern-css-editor .text-sm{font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .text-xs{font-size:.75rem!important;line-height:1rem!important}.pattern-css-editor .font-medium{font-weight:500!important}.pattern-css-editor .lowercase{text-transform:lowercase!important}.pattern-css-editor .text-gray-600{--tw-text-opacity:1;color:rgb(148 148 148/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-700{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-900{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}.pattern-css-editor .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.pattern-css-editor .blur{--tw-blur:blur(8px)}.pattern-css-editor .blur,.pattern-css-editor .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.pattern-css-editor .transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pattern-css-editor .duration-300{transition-duration:.3s!important}.pattern-css-editor pre,.pattern-css-editor pre *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.pattern-css-editor pre,.pattern-css-editor textarea{border-radius:0!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:right!important}.pattern-css-editor pre:focus,.pattern-css-editor textarea:focus{border-radius:0!important;outline:2px solid transparent!important;outline-offset:2px!important}.pattern-css-editor pre,.pattern-css-editor textarea{direction:rtl!important}.pattern-css-editor .code-preview code{background-color:transparent!important;direction:rtl!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:right!important;width:100%!important}.pattern-css-editor pre .line-error:after{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important;content:""!important;height:1.25rem!important;right:0!important;position:absolute!important;left:0!important;--tw-bg-opacity:0.3;font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .wp-focus:focus-within{border-color:var(
     1.pattern-css-editor{--tw-ring-inset:var(--tw-empty,    );--tw-ring-offset-width:0px;--tw-ring-offset-color:transparent;--tw-ring-color:var(--wp-admin-theme-color);--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.pattern-css-editor *,.pattern-css-editor :after,.pattern-css-editor :before{box-sizing:border-box!important}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pattern-css-editor .sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pattern-css-editor .fixed{position:fixed!important}.pattern-css-editor .absolute{position:absolute!important}.pattern-css-editor .relative{position:relative!important}.pattern-css-editor .-bottom-1{bottom:-.25rem!important}.pattern-css-editor .-right-1{left:-.25rem!important}.pattern-css-editor .bottom-px{bottom:1px!important}.pattern-css-editor .right-1{left:.25rem!important}.pattern-css-editor .z-10{z-index:10!important}.pattern-css-editor .z-50{z-index:50!important}.pattern-css-editor .z-high{z-index:99999!important}.pattern-css-editor .m-0{margin:0!important}.pattern-css-editor .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.pattern-css-editor .-mt-2{margin-top:-.5rem!important}.pattern-css-editor .mb-4{margin-bottom:1rem!important}.pattern-css-editor .mt-2{margin-top:.5rem!important}.pattern-css-editor .block{display:block!important}.pattern-css-editor .flex{display:flex!important}.pattern-css-editor .h-52{height:13rem!important}.pattern-css-editor .h-6{height:1.5rem!important}.pattern-css-editor .h-full{height:100%!important}.pattern-css-editor .min-h-0{min-height:0!important}.pattern-css-editor .min-h-52{min-height:13rem!important}.pattern-css-editor .w-6{width:1.5rem!important}.pattern-css-editor .flex-shrink-0{flex-shrink:0!important}.pattern-css-editor .flex-grow{flex-grow:1!important}.pattern-css-editor .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.pattern-css-editor .cursor-grab{cursor:grab!important}.pattern-css-editor .cursor-se-resize{cursor:sw-resize!important}.pattern-css-editor .flex-col{flex-direction:column!important}.pattern-css-editor .items-center{align-items:center!important}.pattern-css-editor .justify-end{justify-content:flex-end!important}.pattern-css-editor .justify-center{justify-content:center!important}.pattern-css-editor .justify-between{justify-content:space-between!important}.pattern-css-editor .gap-1{gap:.25rem!important}.pattern-css-editor .gap-2{gap:.5rem!important}.pattern-css-editor .overflow-y-auto{overflow-y:auto!important}.pattern-css-editor .overflow-x-hidden{overflow-x:hidden!important}.pattern-css-editor .border{border-width:1px!important}.pattern-css-editor .border-0{border-width:0!important}.pattern-css-editor .border-l-0{border-right-width:0!important}.pattern-css-editor .border-t-0{border-top-width:0!important}.pattern-css-editor .border-solid{border-style:solid!important}.pattern-css-editor .border-gray-300{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-gray-600{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-transparent{border-color:transparent!important}.pattern-css-editor .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white\/90{background-color:hsla(0,0%,100%,.9)!important}.pattern-css-editor .stroke-gray-700{stroke:#757575!important}.pattern-css-editor .p-0{padding:0!important}.pattern-css-editor .p-1{padding:.25rem!important}.pattern-css-editor .p-2{padding:.5rem!important}.pattern-css-editor .p-4{padding:1rem!important}.pattern-css-editor .px-4{padding-right:1rem!important;padding-left:1rem!important}.pattern-css-editor .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.pattern-css-editor .pb-4{padding-bottom:1rem!important}.pattern-css-editor .font-jetbrains-mono{font-family:pcss-jetbrains-mono,monospace!important}.pattern-css-editor .text-sm{font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .text-xs{font-size:.75rem!important;line-height:1rem!important}.pattern-css-editor .font-medium{font-weight:500!important}.pattern-css-editor .lowercase{text-transform:lowercase!important}.pattern-css-editor .text-gray-600{--tw-text-opacity:1;color:rgb(148 148 148/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-700{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-900{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}.pattern-css-editor .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.pattern-css-editor .blur{--tw-blur:blur(8px)}.pattern-css-editor .blur,.pattern-css-editor .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.pattern-css-editor .transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pattern-css-editor .duration-300{transition-duration:.3s!important}.pattern-css-editor pre,.pattern-css-editor pre *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.pattern-css-editor pre,.pattern-css-editor textarea{border-radius:0!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:right!important}.pattern-css-editor pre:focus,.pattern-css-editor textarea:focus{border-radius:0!important;outline:2px solid transparent!important;outline-offset:2px!important}.pattern-css-editor pre,.pattern-css-editor textarea{direction:rtl!important}.pattern-css-editor .code-preview code{background-color:transparent!important;direction:rtl!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:right!important;width:100%!important}.pattern-css-editor pre .line-error:after{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important;content:""!important;height:1.25rem!important;right:0!important;position:absolute!important;left:0!important;--tw-bg-opacity:0.3;font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .wp-focus:focus-within{border-color:var(
    22        --wp-components-color-accent,var(--wp-admin-theme-color,#007cba)
    33    )!important;box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#007cba))!important;outline:2px solid transparent!important}.pattern-css-editor [data-pcss-handle]:active,.pattern-css-editor [data-pcss-resize]:active{cursor:grabbing!important}.pattern-css-editor .disable-mb-checkbox>div{margin-bottom:0!important}@font-face{font-family:pcss-jetbrains-mono;src:url(fonts/pcss-jetbrains-mono.1e66c47a.woff2) format("woff2")}.pattern-css-editor .hover\:border-gray-600:hover{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .active\:border-gray-600:active{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}
  • pattern-css/trunk/build/index.asset.php

    r3488380 r3490244  
    1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'ada640d79b5c675aeee6');
     1<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '5bd349c4b8c8d7e743b1');
  • pattern-css/trunk/build/index.css

    r3297727 r3490244  
    1 .pattern-css-editor{--tw-ring-inset:var(--tw-empty,    );--tw-ring-offset-width:0px;--tw-ring-offset-color:transparent;--tw-ring-color:var(--wp-admin-theme-color);--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.pattern-css-editor *,.pattern-css-editor :after,.pattern-css-editor :before{box-sizing:border-box!important}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pattern-css-editor .sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pattern-css-editor .fixed{position:fixed!important}.pattern-css-editor .absolute{position:absolute!important}.pattern-css-editor .relative{position:relative!important}.pattern-css-editor .-bottom-1{bottom:-.25rem!important}.pattern-css-editor .-right-1{right:-.25rem!important}.pattern-css-editor .bottom-px{bottom:1px!important}.pattern-css-editor .right-1{right:.25rem!important}.pattern-css-editor .z-10{z-index:10!important}.pattern-css-editor .z-50{z-index:50!important}.pattern-css-editor .z-high{z-index:99999!important}.pattern-css-editor .m-0{margin:0!important}.pattern-css-editor .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.pattern-css-editor .-mt-2{margin-top:-.5rem!important}.pattern-css-editor .mt-2{margin-top:.5rem!important}.pattern-css-editor .block{display:block!important}.pattern-css-editor .flex{display:flex!important}.pattern-css-editor .h-52{height:13rem!important}.pattern-css-editor .h-6{height:1.5rem!important}.pattern-css-editor .h-full{height:100%!important}.pattern-css-editor .min-h-0{min-height:0!important}.pattern-css-editor .min-h-52{min-height:13rem!important}.pattern-css-editor .w-6{width:1.5rem!important}.pattern-css-editor .flex-shrink-0{flex-shrink:0!important}.pattern-css-editor .flex-grow{flex-grow:1!important}.pattern-css-editor .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.pattern-css-editor .cursor-grab{cursor:grab!important}.pattern-css-editor .cursor-se-resize{cursor:se-resize!important}.pattern-css-editor .flex-col{flex-direction:column!important}.pattern-css-editor .items-center{align-items:center!important}.pattern-css-editor .justify-end{justify-content:flex-end!important}.pattern-css-editor .justify-center{justify-content:center!important}.pattern-css-editor .justify-between{justify-content:space-between!important}.pattern-css-editor .gap-1{gap:.25rem!important}.pattern-css-editor .gap-2{gap:.5rem!important}.pattern-css-editor .overflow-y-auto{overflow-y:auto!important}.pattern-css-editor .overflow-x-hidden{overflow-x:hidden!important}.pattern-css-editor .border{border-width:1px!important}.pattern-css-editor .border-0{border-width:0!important}.pattern-css-editor .border-l-0{border-left-width:0!important}.pattern-css-editor .border-t-0{border-top-width:0!important}.pattern-css-editor .border-solid{border-style:solid!important}.pattern-css-editor .border-gray-300{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-gray-600{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-transparent{border-color:transparent!important}.pattern-css-editor .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white\/90{background-color:hsla(0,0%,100%,.9)!important}.pattern-css-editor .stroke-gray-700{stroke:#757575!important}.pattern-css-editor .p-0{padding:0!important}.pattern-css-editor .p-1{padding:.25rem!important}.pattern-css-editor .p-2{padding:.5rem!important}.pattern-css-editor .p-4{padding:1rem!important}.pattern-css-editor .px-4{padding-left:1rem!important;padding-right:1rem!important}.pattern-css-editor .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.pattern-css-editor .pb-4{padding-bottom:1rem!important}.pattern-css-editor .font-jetbrains-mono{font-family:pcss-jetbrains-mono,monospace!important}.pattern-css-editor .text-sm{font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .text-xs{font-size:.75rem!important;line-height:1rem!important}.pattern-css-editor .font-medium{font-weight:500!important}.pattern-css-editor .lowercase{text-transform:lowercase!important}.pattern-css-editor .text-gray-600{--tw-text-opacity:1;color:rgb(148 148 148/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-700{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-900{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}.pattern-css-editor .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.pattern-css-editor .blur{--tw-blur:blur(8px)}.pattern-css-editor .blur,.pattern-css-editor .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.pattern-css-editor .transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pattern-css-editor .duration-300{transition-duration:.3s!important}.pattern-css-editor pre,.pattern-css-editor pre *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.pattern-css-editor pre,.pattern-css-editor textarea{border-radius:0!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:left!important}.pattern-css-editor pre:focus,.pattern-css-editor textarea:focus{border-radius:0!important;outline:2px solid transparent!important;outline-offset:2px!important}.pattern-css-editor pre,.pattern-css-editor textarea{direction:ltr!important}.pattern-css-editor .code-preview code{background-color:transparent!important;direction:ltr!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:left!important;width:100%!important}.pattern-css-editor pre .line-error:after{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important;content:""!important;height:1.25rem!important;left:0!important;position:absolute!important;right:0!important;--tw-bg-opacity:0.3;font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .wp-focus:focus-within{border-color:var(
     1.pattern-css-editor{--tw-ring-inset:var(--tw-empty,    );--tw-ring-offset-width:0px;--tw-ring-offset-color:transparent;--tw-ring-color:var(--wp-admin-theme-color);--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.pattern-css-editor *,.pattern-css-editor :after,.pattern-css-editor :before{box-sizing:border-box!important}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.pattern-css-editor .sr-only{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border-width:0!important;white-space:nowrap!important}.pattern-css-editor .fixed{position:fixed!important}.pattern-css-editor .absolute{position:absolute!important}.pattern-css-editor .relative{position:relative!important}.pattern-css-editor .-bottom-1{bottom:-.25rem!important}.pattern-css-editor .-right-1{right:-.25rem!important}.pattern-css-editor .bottom-px{bottom:1px!important}.pattern-css-editor .right-1{right:.25rem!important}.pattern-css-editor .z-10{z-index:10!important}.pattern-css-editor .z-50{z-index:50!important}.pattern-css-editor .z-high{z-index:99999!important}.pattern-css-editor .m-0{margin:0!important}.pattern-css-editor .my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.pattern-css-editor .-mt-2{margin-top:-.5rem!important}.pattern-css-editor .mb-4{margin-bottom:1rem!important}.pattern-css-editor .mt-2{margin-top:.5rem!important}.pattern-css-editor .block{display:block!important}.pattern-css-editor .flex{display:flex!important}.pattern-css-editor .h-52{height:13rem!important}.pattern-css-editor .h-6{height:1.5rem!important}.pattern-css-editor .h-full{height:100%!important}.pattern-css-editor .min-h-0{min-height:0!important}.pattern-css-editor .min-h-52{min-height:13rem!important}.pattern-css-editor .w-6{width:1.5rem!important}.pattern-css-editor .flex-shrink-0{flex-shrink:0!important}.pattern-css-editor .flex-grow{flex-grow:1!important}.pattern-css-editor .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.pattern-css-editor .cursor-grab{cursor:grab!important}.pattern-css-editor .cursor-se-resize{cursor:se-resize!important}.pattern-css-editor .flex-col{flex-direction:column!important}.pattern-css-editor .items-center{align-items:center!important}.pattern-css-editor .justify-end{justify-content:flex-end!important}.pattern-css-editor .justify-center{justify-content:center!important}.pattern-css-editor .justify-between{justify-content:space-between!important}.pattern-css-editor .gap-1{gap:.25rem!important}.pattern-css-editor .gap-2{gap:.5rem!important}.pattern-css-editor .overflow-y-auto{overflow-y:auto!important}.pattern-css-editor .overflow-x-hidden{overflow-x:hidden!important}.pattern-css-editor .border{border-width:1px!important}.pattern-css-editor .border-0{border-width:0!important}.pattern-css-editor .border-l-0{border-left-width:0!important}.pattern-css-editor .border-t-0{border-top-width:0!important}.pattern-css-editor .border-solid{border-style:solid!important}.pattern-css-editor .border-gray-300{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-gray-600{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .border-transparent{border-color:transparent!important}.pattern-css-editor .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.pattern-css-editor .bg-white\/90{background-color:hsla(0,0%,100%,.9)!important}.pattern-css-editor .stroke-gray-700{stroke:#757575!important}.pattern-css-editor .p-0{padding:0!important}.pattern-css-editor .p-1{padding:.25rem!important}.pattern-css-editor .p-2{padding:.5rem!important}.pattern-css-editor .p-4{padding:1rem!important}.pattern-css-editor .px-4{padding-left:1rem!important;padding-right:1rem!important}.pattern-css-editor .py-3{padding-bottom:.75rem!important;padding-top:.75rem!important}.pattern-css-editor .pb-4{padding-bottom:1rem!important}.pattern-css-editor .font-jetbrains-mono{font-family:pcss-jetbrains-mono,monospace!important}.pattern-css-editor .text-sm{font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .text-xs{font-size:.75rem!important;line-height:1rem!important}.pattern-css-editor .font-medium{font-weight:500!important}.pattern-css-editor .lowercase{text-transform:lowercase!important}.pattern-css-editor .text-gray-600{--tw-text-opacity:1;color:rgb(148 148 148/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-700{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-gray-900{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .text-wp-theme-500{color:var(--wp-admin-theme-color)!important}.pattern-css-editor .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.pattern-css-editor .blur{--tw-blur:blur(8px)}.pattern-css-editor .blur,.pattern-css-editor .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.pattern-css-editor .transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pattern-css-editor .duration-300{transition-duration:.3s!important}.pattern-css-editor pre,.pattern-css-editor pre *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.pattern-css-editor pre,.pattern-css-editor textarea{border-radius:0!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:left!important}.pattern-css-editor pre:focus,.pattern-css-editor textarea:focus{border-radius:0!important;outline:2px solid transparent!important;outline-offset:2px!important}.pattern-css-editor pre,.pattern-css-editor textarea{direction:ltr!important}.pattern-css-editor .code-preview code{background-color:transparent!important;direction:ltr!important;font-size:.875rem!important;line-height:1.25rem!important;margin:0!important;text-align:left!important;width:100%!important}.pattern-css-editor pre .line-error:after{background-color:rgb(239 68 68/var(--tw-bg-opacity,1))!important;content:""!important;height:1.25rem!important;left:0!important;position:absolute!important;right:0!important;--tw-bg-opacity:0.3;font-size:.875rem!important;line-height:1.25rem!important}.pattern-css-editor .wp-focus:focus-within{border-color:var(
    22        --wp-components-color-accent,var(--wp-admin-theme-color,#007cba)
    33    )!important;box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#007cba))!important;outline:2px solid transparent!important}.pattern-css-editor [data-pcss-handle]:active,.pattern-css-editor [data-pcss-resize]:active{cursor:grabbing!important}.pattern-css-editor .disable-mb-checkbox>div{margin-bottom:0!important}@font-face{font-family:pcss-jetbrains-mono;src:url(fonts/pcss-jetbrains-mono.1e66c47a.woff2) format("woff2")}.pattern-css-editor .hover\:border-gray-600:hover{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}.pattern-css-editor .hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(240 240 240/var(--tw-bg-opacity,1))!important}.pattern-css-editor .hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity,1))!important}.pattern-css-editor .hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity,1))!important}.pattern-css-editor .active\:border-gray-600:active{--tw-border-opacity:1;border-color:rgb(148 148 148/var(--tw-border-opacity,1))!important}
  • pattern-css/trunk/build/index.js

    r3488380 r3490244  
    1 (()=>{var e,t,n,s,r={69:function(e,t,n){"use strict";var s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},i=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var l=o(n(609)),c="undefined"!=typeof window&&"navigator"in window&&/Win/i.test(navigator.platform),u="undefined"!=typeof window&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),p="npm__react-simple-code-editor__textarea",d="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(p,":empty {\n  -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n  /**\n    * IE doesn't support '-webkit-text-fill-color'\n    * So we use 'color: transparent' to make the text transparent on IE\n    * Unlike other browsers, it doesn't affect caret color in IE\n    */\n  .").concat(p," {\n    color: transparent !important;\n  }\n\n  .").concat(p,"::selection {\n    background-color: #accef7 !important;\n    color: transparent !important;\n  }\n}\n"),h=l.forwardRef((function(e,t){var n=e.autoFocus,r=e.disabled,a=e.form,o=e.highlight,h=e.ignoreTabKey,g=void 0!==h&&h,f=e.insertSpaces,y=void 0===f||f,_=e.maxLength,b=e.minLength,v=e.name,w=e.onBlur,k=e.onClick,S=e.onFocus,N=e.onKeyDown,x=e.onKeyUp,j=e.onValueChange,P=e.padding,C=void 0===P?0:P,L=e.placeholder,T=e.preClassName,A=e.readOnly,E=e.required,O=e.style,R=e.tabSize,I=void 0===R?2:R,B=e.textareaClassName,M=e.textareaId,D=e.value,G=i(e,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),F=l.useRef({stack:[],offset:-1}),$=l.useRef(null),W=l.useState(!0),U=W[0],V=W[1],z={paddingTop:"object"==typeof C?C.top:C,paddingRight:"object"==typeof C?C.right:C,paddingBottom:"object"==typeof C?C.bottom:C,paddingLeft:"object"==typeof C?C.left:C},q=o(D),H=function(e,t){return e.substring(0,t).split("\n")},K=l.useCallback((function(e,t){var n,r,a;void 0===t&&(t=!1);var o=F.current,i=o.stack,l=o.offset;if(i.length&&l>-1){F.current.stack=i.slice(0,l+1);var c=F.current.stack.length;if(c>100){var u=c-100;F.current.stack=i.slice(u,c),F.current.offset=Math.max(F.current.offset-u,0)}}var p=Date.now();if(t){var d=F.current.stack[F.current.offset];if(d&&p-d.timestamp<3e3){var h=/[^a-z0-9]([a-z0-9]+)$/i,m=null===(n=H(d.value,d.selectionStart).pop())||void 0===n?void 0:n.match(h),g=null===(r=H(e.value,e.selectionStart).pop())||void 0===r?void 0:r.match(h);if((null==m?void 0:m[1])&&(null===(a=null==g?void 0:g[1])||void 0===a?void 0:a.startsWith(m[1])))return void(F.current.stack[F.current.offset]=s(s({},e),{timestamp:p}))}}F.current.stack.push(s(s({},e),{timestamp:p})),F.current.offset++}),[]),J=l.useCallback((function(){var e=$.current;if(e){var t=e.value,n=e.selectionStart,s=e.selectionEnd;K({value:t,selectionStart:n,selectionEnd:s})}}),[K]),X=function(e){var t=$.current;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,null==j||j(e.value))},Q=function(e){var t=$.current,n=F.current.stack[F.current.offset];n&&t&&(F.current.stack[F.current.offset]=s(s({},n),{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),K(e),X(e)};return l.useEffect((function(){J()}),[J]),l.useImperativeHandle(t,(function(){return{get session(){return{history:F.current}},set session(e){F.current=e.history}}}),[]),l.createElement("div",s({},G,{style:s(s({},m.container),O)}),l.createElement("pre",s({className:T,"aria-hidden":"true",style:s(s(s({},m.editor),m.highlight),z)},"string"==typeof q?{dangerouslySetInnerHTML:{__html:q+"<br />"}}:{children:q})),l.createElement("textarea",{ref:function(e){return $.current=e},style:s(s(s({},m.editor),m.textarea),z),className:p+(B?" ".concat(B):""),id:M,value:D,onChange:function(e){var t=e.currentTarget,n=t.value,s=t.selectionStart,r=t.selectionEnd;K({value:n,selectionStart:s,selectionEnd:r},!0),j(n)},onKeyDown:function(e){if(!N||(N(e),!e.defaultPrevented)){"Escape"===e.key&&e.currentTarget.blur();var t=e.currentTarget,n=t.value,s=t.selectionStart,r=t.selectionEnd,a=(y?" ":"\t").repeat(I);if("Tab"===e.key&&!g&&U)if(e.preventDefault(),e.shiftKey){var o=(d=H(n,s)).length-1,i=H(n,r).length-1,l=n.split("\n").map((function(e,t){return t>=o&&t<=i&&e.startsWith(a)?e.substring(a.length):e})).join("\n");if(n!==l){var p=d[o];Q({value:l,selectionStart:(null==p?void 0:p.startsWith(a))?s-a.length:s,selectionEnd:r-(n.length-l.length)})}}else if(s!==r){var d,h=(d=H(n,s)).length-1,m=H(n,r).length-1;p=d[h],Q({value:n.split("\n").map((function(e,t){return t>=h&&t<=m?a+e:e})).join("\n"),selectionStart:p&&/\S/.test(p)?s+a.length:s,selectionEnd:r+a.length*(m-h+1)})}else{var f=s+a.length;Q({value:n.substring(0,s)+a+n.substring(r),selectionStart:f,selectionEnd:f})}else if("Backspace"===e.key){var _=s!==r;n.substring(0,s).endsWith(a)&&!_&&(e.preventDefault(),f=s-a.length,Q({value:n.substring(0,s-a.length)+n.substring(r),selectionStart:f,selectionEnd:f}))}else if("Enter"===e.key){if(s===r){var b=H(n,s).pop(),v=null==b?void 0:b.match(/^\s+/);if(null==v?void 0:v[0]){e.preventDefault();var w="\n"+v[0];f=s+w.length,Q({value:n.substring(0,s)+w+n.substring(r),selectionStart:f,selectionEnd:f})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var k=void 0;57===e.keyCode&&e.shiftKey?k=["(",")"]:219===e.keyCode?k=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?k=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(k=["`","`"]),s!==r&&k&&(e.preventDefault(),Q({value:n.substring(0,s)+k[0]+n.substring(s,r)+k[1]+n.substring(r),selectionStart:s,selectionEnd:r+2}))}else!(u?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(u?e.metaKey&&90===e.keyCode&&e.shiftKey:c?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),function(){var e=F.current,t=e.stack,n=e.offset,s=t[n+1];s&&(X(s),F.current.offset=Math.min(n+1,t.length-1))}()):77!==e.keyCode||!e.ctrlKey||u&&!e.shiftKey||(e.preventDefault(),V((function(e){return!e}))):(e.preventDefault(),function(){var e=F.current,t=e.stack,n=e.offset,s=t[n-1];s&&(X(s),F.current.offset=Math.max(n-1,0))}())}},onClick:k,onKeyUp:x,onFocus:S,onBlur:w,disabled:r,form:a,maxLength:_,minLength:b,name:v,placeholder:L,readOnly:A,required:E,autoFocus:n,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("style",{dangerouslySetInnerHTML:{__html:d}}))})),m={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};t.default=h},493:(e,t,n)=>{"use strict";var s=n(609),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=s.useState,o=s.useEffect,i=s.useLayoutEffect,l=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),s=a({inst:{value:n,getSnapshot:t}}),r=s[0].inst,u=s[1];return i((function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})}),[e,n,t]),o((function(){return c(r)&&u({inst:r}),e((function(){c(r)&&u({inst:r})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:u},888:(e,t,n)=>{"use strict";e.exports=n(493)},486:function(e){var t;t=()=>{return e={770:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;const r=s(n(418));let a=null,o=!1;class i{static _utf8ByteLength(e){let t=0;for(let n=0,s=e.length;n<s;n++){const r=e.charCodeAt(n);let a=r,o=!1;if(r>=55296&&r<=56319&&n+1<s){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=65536+(r-55296<<10)|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}constructor(e){const t=e.length,n=i._utf8ByteLength(e),s=n!==t,r=s?new Uint32Array(t+1):null;s&&(r[t]=n);const a=s?new Uint32Array(n+1):null;s&&(a[n]=t);const o=new Uint8Array(n);let l=0;for(let n=0;n<t;n++){const i=e.charCodeAt(n);let c=i,u=!1;if(i>=55296&&i<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(i-55296<<10)|t-56320,u=!0)}s&&(r[n]=l,u&&(r[n+1]=l),c<=127?a[l+0]=n:c<=2047?(a[l+0]=n,a[l+1]=n):c<=65535?(a[l+0]=n,a[l+1]=n,a[l+2]=n):(a[l+0]=n,a[l+1]=n,a[l+2]=n,a[l+3]=n)),c<=127?o[l++]=c:c<=2047?(o[l++]=192|(1984&c)>>>6,o[l++]=128|(63&c)>>>0):c<=65535?(o[l++]=224|(61440&c)>>>12,o[l++]=128|(4032&c)>>>6,o[l++]=128|(63&c)>>>0):(o[l++]=240|(1835008&c)>>>18,o[l++]=128|(258048&c)>>>12,o[l++]=128|(4032&c)>>>6,o[l++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=a}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class l{constructor(e){if(this.id=++l.LAST_ID,!a)throw new Error("Must invoke loadWASM first.");this._onigBinding=a,this.content=e;const t=new i(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!l._sharedPtrInUse?(l._sharedPtr||(l._sharedPtr=a._omalloc(1e4)),l._sharedPtrInUse=!0,a.HEAPU8.set(t.utf8Value,l._sharedPtr),this.ptr=l._sharedPtr):this.ptr=t.createString(a)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===l._sharedPtr?l._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=l,l.LAST_ID=0,l._sharedPtr=0,l._sharedPtrInUse=!1;class c{constructor(e){if(!a)throw new Error("Must invoke loadWASM first.");const t=[],n=[];for(let s=0,r=e.length;s<r;s++){const r=new i(e[s]);t[s]=r.createString(a),n[s]=r.utf8Length}const s=a._omalloc(4*e.length);a.HEAPU32.set(t,s/4);const r=a._omalloc(4*e.length);a.HEAPU32.set(n,r/4);const o=a._createOnigScanner(s,r,e.length);for(let n=0,s=e.length;n<s;n++)a._ofree(t[n]);a._ofree(r),a._ofree(s),0===o&&function(e){throw new Error(e.UTF8ToString(e._getLastOnigError()))}(a),this._onigBinding=a,this._ptr=o}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let s=o,r=0;if("number"==typeof n?(8&n&&(s=!0),r=n):"boolean"==typeof n&&(s=n),"string"==typeof e){e=new l(e);const n=this._findNextMatchSync(e,t,s,r);return e.dispose(),n}return this._findNextMatchSync(e,t,s,r)}_findNextMatchSync(e,t,n,s){const r=this._onigBinding;let a;if(a=n?r._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),s):r._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),s),0===a)return null;const o=r.HEAPU32;let i=a/4;const l=o[i++],c=o[i++];let u=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(o[i++]),s=e.convertUtf8OffsetToUtf16(o[i++]);u[t]={start:n,end:s,length:s-n}}return{index:l,captureIndices:u}}}t.OnigScanner=c;let u=!1,p=null;t.loadWASM=function(e){if(u)return p;let t,n,s,o;if(u=!0,function(e){return"function"==typeof e.instantiator}(e))t=e.instantiator,n=e.print;else{let s;!function(e){return void 0!==e.data}(e)?s=e:(s=e.data,n=e.print),t=function(e){return"undefined"!=typeof Response&&e instanceof Response}(s)?"function"==typeof WebAssembly.instantiateStreaming?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(s):function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(s):function(e){return t=>WebAssembly.instantiate(e,t)}(s)}return p=new Promise(((e,t)=>{s=e,o=t})),function(e,t,n,s){(0,r.default)({print:t,instantiateWasm:(t,n)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),s),{}}}).then((e=>{a=e,n()}))}(t,n,s,o),p},t.createOnigString=function(e){return new l(e)},t.createOnigScanner=function(e){return new c(e)},t.setDefaultDebugCall=function(e){o=e}},418:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n,s=void 0!==(e=e||{})?e:{};s.ready=new Promise((function(e,s){t=e,n=s}));var r,a=Object.assign({},s),o=[];r=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),function(e){e||C(void 0)}("object"==typeof t),t)},"undefined"!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var i,l,c=s.print||console.log.bind(console),u=s.printErr||console.warn.bind(console);Object.assign(s,a),a=null,s.arguments&&(o=s.arguments),s.thisProgram&&s.thisProgram,s.quit&&s.quit,s.wasmBinary&&(i=s.wasmBinary),s.noExitRuntime,"object"!=typeof WebAssembly&&C("no native wasm support detected");var p,d,h,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,n){for(var s=t+n,r=t;e[r]&&!(r>=s);)++r;if(r-t>16&&e.buffer&&g)return g.decode(e.subarray(t,r));for(var a="";t<r;){var o=e[t++];if(128&o){var i=63&e[t++];if(192!=(224&o)){var l=63&e[t++];if((o=224==(240&o)?(15&o)<<12|i<<6|l:(7&o)<<18|i<<12|l<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var c=o-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|i)}else a+=String.fromCharCode(o)}return a}function y(e){p=e,s.HEAP8=new Int8Array(e),s.HEAP16=new Int16Array(e),s.HEAP32=new Int32Array(e),s.HEAPU8=d=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAPU32=h=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e)}s.INITIAL_MEMORY;var _=[],b=[],v=[];function w(e){_.unshift(e)}function k(e){v.unshift(e)}var S,N,x=0,j=null,P=null;function C(e){s.onAbort&&s.onAbort(e),u(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function L(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){try{if(e==S&&i)return new Uint8Array(i);if(r)return r(e);throw"both async and sync fetching of the wasm failed"}catch(e){C(e)}}function A(e){for(;e.length>0;)e.shift()(s)}function E(e){try{return l.grow(e-p.byteLength+65535>>>16),y(l.buffer),1}catch(e){}}L(S="onig.wasm")||(S=function(e){return s.locateFile?s.locateFile(e,""):""+e}(S)),N="undefined"!=typeof dateNow?dateNow:()=>performance.now();var O=[null,[],[]];function R(e,t){var n=O[e];0===t||10===t?((1===e?c:u)(f(n,0)),n.length=0):n.push(t)}var I,B={emscripten_get_now:N,emscripten_memcpy_big:function(e,t,n){d.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n=d.length,s=2147483648;if((e>>>=0)>s)return!1;for(var r=1;r<=4;r*=2){var a=n*(1+.2/r);if(a=Math.min(a,e+100663296),E(Math.min(s,(t=Math.max(e,a))+(65536-t%65536)%65536)))return!0}return!1},fd_write:function(e,t,n,s){for(var r=0,a=0;a<n;a++){var o=h[t>>2],i=h[t+4>>2];t+=8;for(var l=0;l<i;l++)R(e,d[o+l]);r+=i}return h[s>>2]=r,0}};function M(e){function n(){I||(I=!0,s.calledRun=!0,m||(A(b),t(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),function(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)k(s.postRun.shift());A(v)}()))}e=e||o,x>0||(function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)w(s.preRun.shift());A(_)}(),x>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),n()}),1)):n()))}if(function(){var e={env:B,wasi_snapshot_preview1:B};function t(e,t){var n=e.exports;s.asm=n,y((l=s.asm.memory).buffer),s.asm.__indirect_function_table,function(e){b.unshift(e)}(s.asm.__wasm_call_ctors),function(){if(x--,s.monitorRunDependencies&&s.monitorRunDependencies(x),0==x&&(null!==j&&(clearInterval(j),j=null),P)){var e=P;P=null,e()}}()}function r(e){t(e.instance)}function a(t){return Promise.resolve().then((function(){return T(S)})).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){u("failed to asynchronously prepare wasm: "+e),C(e)}))}if(x++,s.monitorRunDependencies&&s.monitorRunDependencies(x),s.instantiateWasm)try{return s.instantiateWasm(e,t)}catch(e){u("Module.instantiateWasm callback failed with error: "+e),n(e)}(i||"function"!=typeof WebAssembly.instantiateStreaming||L(S)||"function"!=typeof fetch?a(r):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),a(r)}))}))).catch(n)}(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.__wasm_call_ctors).apply(null,arguments)},s.___errno_location=function(){return(s.___errno_location=s.asm.__errno_location).apply(null,arguments)},s._omalloc=function(){return(s._omalloc=s.asm.omalloc).apply(null,arguments)},s._ofree=function(){return(s._ofree=s.asm.ofree).apply(null,arguments)},s._getLastOnigError=function(){return(s._getLastOnigError=s.asm.getLastOnigError).apply(null,arguments)},s._createOnigScanner=function(){return(s._createOnigScanner=s.asm.createOnigScanner).apply(null,arguments)},s._freeOnigScanner=function(){return(s._freeOnigScanner=s.asm.freeOnigScanner).apply(null,arguments)},s._findNextOnigScannerMatch=function(){return(s._findNextOnigScannerMatch=s.asm.findNextOnigScannerMatch).apply(null,arguments)},s._findNextOnigScannerMatchDbg=function(){return(s._findNextOnigScannerMatchDbg=s.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},s.stackSave=function(){return(s.stackSave=s.asm.stackSave).apply(null,arguments)},s.stackRestore=function(){return(s.stackRestore=s.asm.stackRestore).apply(null,arguments)},s.stackAlloc=function(){return(s.stackAlloc=s.asm.stackAlloc).apply(null,arguments)},s.dynCall_jiji=function(){return(s.dynCall_jiji=s.asm.dynCall_jiji).apply(null,arguments)},s.UTF8ToString=function(e,t){return e?f(d,e,t):""},P=function e(){I||M(),I||(P=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return M(),e.ready});e.exports=t}},t={},function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s].call(a.exports,a,a.exports,n),a.exports}(770);var e,t},e.exports=t()},217:function(e){e.exports=(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},36:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=void 0,(n=t.EncodedTokenAttributes||(t.EncodedTokenAttributes={})).toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},n.print=function(e){const t=n.getLanguageId(e),s=n.getTokenType(e),r=n.getFontStyle(e),a=n.getForeground(e),o=n.getBackground(e);console.log({languageId:t,tokenType:s,fontStyle:r,foreground:a,background:o})},n.getLanguageId=function(e){return(255&e)>>>0},n.getTokenType=function(e){return(768&e)>>>8},n.containsBalancedBrackets=function(e){return!!(1024&e)},n.getFontStyle=function(e){return(30720&e)>>>11},n.getForeground=function(e){return(16744448&e)>>>15},n.getBackground=function(e){return(4278190080&e)>>>24},n.set=function(e,t,s,r,a,o,i){let l=n.getLanguageId(e),c=n.getTokenType(e),u=n.containsBalancedBrackets(e)?1:0,p=n.getFontStyle(e),d=n.getForeground(e),h=n.getBackground(e);return 0!==t&&(l=t),8!==s&&(c=s),null!==r&&(u=r?1:0),-1!==a&&(p=a),0!==o&&(d=o),0!==i&&(h=i),(l|c<<8|u<<10|p<<11|d<<15|h<<24)>>>0},t.toOptionalTokenType=function(e){return e}},996:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;const s=n(878);class r{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=r;class a{constructor(e,t){this._getBasicScopeAttributes=new s.CachedFn((e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new r(t,n)})),this._defaultAttributes=new r(e,8),this._embeddedLanguagesMatcher=new o(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?a._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(a.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}t.BasicScopeAttributesProvider=a,a._NULL_SCOPE_METADATA=new r(0,0),a.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class o{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>s.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},947:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LineTokens=t.BalancedBracketSelectors=t.StateStack=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;const s=n(350),r=n(36),a=n(736),o=n(44),i=n(792),l=n(583),c=n(878),u=n(996),p=n(47);function d(e,t,n,s,r){const o=a.createMatchers(t,h),l=i.RuleFactory.getCompiledRuleId(n,s,r.repository);for(const n of o)e.push({debugSelector:t,matcher:n.matcher,ruleId:l,grammar:r,priority:n.priority})}function h(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let s=n;s<t.length;s++)if(m(t[s],e))return n=s+1,!0;return!1}))}function m(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}t.createGrammar=function(e,t,n,s,r,a,o,i){return new g(e,t,n,s,r,a,o,i)};class g{constructor(e,t,n,s,r,o,i,l){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=f(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const e of Object.keys(r)){const t=a.createMatchers(e,h);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:r[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){const s=n.injections;if(s)for(let t in s)d(e,t,s[t],this,n);const r=this._grammarRepository.injections(t);r&&r.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&d(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),s.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(`  - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,n=e(i.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[i.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=f(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){let a;if(-1===this._rootId&&(this._rootId=i.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==_.NULL)a=!1,t.reset();else{a=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),s=r.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let i;i=o?y.createRootAndLookUpScopeName(o,s,this):y.createRoot("unknown",s),t=new _(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const l=this.createOnigString(e),c=l.content.length,u=new b(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=p._tokenizeString(this,l,a,0,t,u,!0,s);return o.disposeOnigString(l),{lineLength:c,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}}function f(e,t){return(e=c.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=g;class y{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static createRoot(e,t){return new y(null,new l.ScopeStack(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const s=n.getMetadataForScope(e),r=new l.ScopeStack(null,e),a=n.themeProvider.themeMatch(r),o=y.mergeAttributes(t,s,a);return new y(null,r,o)}get scopeName(){return this.scopePath.scopeName}equals(e){return y._equals(this,e)}static _equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let s=-1,a=0,o=0;return null!==n&&(s=n.fontStyle,a=n.foregroundId,o=n.backgroundId),r.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,s,a,o)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return y._pushAttributed(this,e,t);const n=e.split(/ /g);let s=this;for(const e of n)s=y._pushAttributed(s,e,t);return s}static _pushAttributed(e,t,n){const s=n.getMetadataForScope(t),r=e.scopePath.push(t),a=n.themeProvider.themeMatch(r),o=y.mergeAttributes(e.tokenAttributes,s,a);return new y(e,r,o)}getScopeNames(){return this.scopePath.getSegments()}}t.AttributedScopeStack=y;class _{constructor(e,t,n,s,r,a,o,i){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=i,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=s}equals(e){return null!==e&&_._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){_._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,s,r,a,o){return new _(this,e,t,n,s,r,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new _(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}}t.StateStack=_,_.NULL=new _(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):a.createMatchers(e,h).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>a.createMatchers(e,h).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class b{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,s.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e.tokenAttributes,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e.getScopeNames();for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=r.EncodedTokenAttributes.set(n,0,r.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(t))}if(a&&(n=r.EncodedTokenAttributes.set(n,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(s.DebugFlags.InDebugMode){const n=e.getScopeNames();console.log("  token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log("      * "+n[e])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}const n=e.getScopeNames();if(s.DebugFlags.InDebugMode){console.log("  token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log("      * "+n[e])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=b},965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;const s=n(878);class r{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=r;class a{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=a;class o{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function i(e,t,n,s){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof r?c({baseGrammar:o,selfGrammar:a},s):l(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},s);const i=n.injections(e.scopeName);if(i)for(const e of i)s.add(new r(e))}function l(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function c(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(const o of e){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);const e=o.repository?s.mergeObjects({},t.repository,o.repository):t.repository;Array.isArray(o.patterns)&&u(o.patterns,{...t,repository:e},n);const i=o.include;if(!i)continue;const p=f(i);switch(p.kind){case 0:c({...t,selfGrammar:t.baseGrammar},n);break;case 1:c(t,n);break;case 2:l(p.ruleName,{...t,repository:e},n);break;case 3:case 4:const s=p.scopeName===t.selfGrammar.scopeName?t.selfGrammar:p.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===p.kind?l(p.ruleName,r,n):c(r,n)}else 4===p.kind?n.add(new a(p.scopeName,p.ruleName)):n.add(new r(p.scopeName))}}}t.ExternalReferenceCollector=o,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new r(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new o;for(const n of e)i(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof r){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class p{constructor(){this.kind=0}}t.BaseReference=p;class d{constructor(){this.kind=1}}t.SelfReference=d;class h{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=h;class m{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=m;class g{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function f(e){if("$base"===e)return new p;if("$self"===e)return new d;const t=e.indexOf("#");if(-1===t)return new m(e);if(0===t)return new h(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new g(n,s)}}t.TopLevelRepositoryReference=g,t.parseInclude=f},391:function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(947),t)},47:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;const s=n(350),r=n(44),a=n(792),o=n(878);class i{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function l(e,t,n,r,l,p,h,m){const g=t.content.length;let f=!1,y=-1;if(h){const o=function(e,t,n,r,o,i){let l=o.beginRuleCapturedEOL?0:-1;const c=[];for(let t=o;t;t=t.pop()){const n=t.getRule(e);n instanceof a.BeginWhileRule&&c.push({rule:n,stack:t})}for(let p=c.pop();p;p=c.pop()){const{ruleScanner:c,findOptions:h}=u(p.rule,e,p.stack.endRule,n,r===l),m=c.findNextMatchSync(t,r,h);if(s.DebugFlags.InDebugMode&&(console.log("  scanning for while rule"),console.log(c.toString())),!m){s.DebugFlags.InDebugMode&&console.log("  popping "+p.rule.debugName+" - "+p.rule.debugWhileRegExp),o=p.stack.pop();break}if(m.ruleId!==a.whileRuleId){o=p.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(p.stack,m.captureIndices[0].start),d(e,t,n,p.stack,i,p.rule.whileCaptures,m.captureIndices),i.produce(p.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}return{stack:o,linePos:r,anchorPosition:l,isFirstLine:n}}(e,t,n,r,l,p);l=o.stack,r=o.linePos,n=o.isFirstLine,y=o.anchorPosition}const _=Date.now();for(;!f;){if(0!==m&&Date.now()-_>m)return new i(l,!0);b()}return new i(l,!1);function b(){s.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${r}: |${t.content.substr(r).replace(/\n$/,"\\n")}|`));const i=function(e,t,n,r,a,i){const l=function(e,t,n,r,a,i){const l=a.getRule(e),{ruleScanner:u,findOptions:p}=c(l,e,a.endRule,n,r===i);let d=0;s.DebugFlags.InDebugMode&&(d=o.performanceNow());const h=u.findNextMatchSync(t,r,p);if(s.DebugFlags.InDebugMode){const e=o.performanceNow()-d;e>5&&console.warn(`Rule ${l.debugName} (${l.id}) matching took ${e} against '${t}'`),console.log(`  scanning for (linePos: ${r}, anchorPosition: ${i})`),console.log(u.toString()),h&&console.log(`matched rule id: ${h.ruleId} from ${h.captureIndices[0].start} to ${h.captureIndices[0].end}`)}return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}(e,t,n,r,a,i),u=e.getInjections();if(0===u.length)return l;const p=function(e,t,n,r,a,o,i){let l,u=Number.MAX_VALUE,p=null,d=0;const h=o.contentNameScopesList.getScopeNames();for(let o=0,m=e.length;o<m;o++){const m=e[o];if(!m.matcher(h))continue;const g=t.getRule(m.ruleId),{ruleScanner:f,findOptions:y}=c(g,t,null,r,a===i),_=f.findNextMatchSync(n,a,y);if(!_)continue;s.DebugFlags.InDebugMode&&(console.log(`  matched injection: ${m.debugSelector}`),console.log(f.toString()));const b=_.captureIndices[0].start;if(!(b>=u)&&(u=b,p=_.captureIndices,l=_.ruleId,d=m.priority,u===a))break}return p?{priorityMatch:-1===d,captureIndices:p,matchedRuleId:l}:null}(u,e,t,n,r,a,i);if(!p)return l;if(!l)return p;const d=l.captureIndices[0].start,h=p.captureIndices[0].start;return h<d||p.priorityMatch&&h===d?p:l}(e,t,n,r,l,y);if(!i)return s.DebugFlags.InDebugMode&&console.log("  no more matches."),p.produce(l,g),void(f=!0);const u=i.captureIndices,h=i.matchedRuleId,m=!!(u&&u.length>0)&&u[0].end>r;if(h===a.endRuleId){const a=l.getRule(e);s.DebugFlags.InDebugMode&&console.log("  popping "+a.debugName+" - "+a.debugEndRegExp),p.produce(l,u[0].start),l=l.withContentNameScopesList(l.nameScopesList),d(e,t,n,l,p,a.endCaptures,u),p.produce(l,u[0].end);const o=l;if(l=l.parent,y=o.getAnchorPos(),!m&&o.getEnterPos()===r)return s.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),l=o,p.produce(l,g),void(f=!0)}else{const o=e.getRule(h);p.produce(l,u[0].start);const i=l,c=o.getName(t.content,u),_=l.contentNameScopesList.pushAttributed(c,e);if(l=l.push(h,r,y,u[0].end===g,null,_,_),o instanceof a.BeginEndRule){const r=o;s.DebugFlags.InDebugMode&&console.log("  pushing "+r.debugName+" - "+r.debugBeginRegExp),d(e,t,n,l,p,r.beginCaptures,u),p.produce(l,u[0].end),y=u[0].end;const a=r.getContentName(t.content,u),c=_.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),r.endHasBackReferences&&(l=l.withEndRule(r.getEndWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return s.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),p.produce(l,g),void(f=!0)}else if(o instanceof a.BeginWhileRule){const r=o;s.DebugFlags.InDebugMode&&console.log("  pushing "+r.debugName),d(e,t,n,l,p,r.beginCaptures,u),p.produce(l,u[0].end),y=u[0].end;const a=r.getContentName(t.content,u),c=_.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),r.whileHasBackReferences&&(l=l.withEndRule(r.getWhileWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return s.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),p.produce(l,g),void(f=!0)}else{const r=o;if(s.DebugFlags.InDebugMode&&console.log("  matched "+r.debugName+" - "+r.debugMatchRegExp),d(e,t,n,l,p,r.captures,u),p.produce(l,u[0].end),l=l.pop(),!m)return s.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),l=l.safePop(),p.produce(l,g),void(f=!0)}}u[0].end>r&&(r=u[0].end,n=!1)}}function c(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:p(r,a)}:{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function u(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:p(r,a)}:{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function p(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function d(e,t,n,s,a,o,i){if(0===o.length)return;const c=t.content,u=Math.min(o.length,i.length),p=[],d=i[0].end;for(let t=0;t<u;t++){const u=o[t];if(null===u)continue;const m=i[t];if(0===m.length)continue;if(m.start>d)break;for(;p.length>0&&p[p.length-1].endPos<=m.start;)a.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?a.produceFromScopes(p[p.length-1].scopes,m.start):a.produce(s,m.start),u.retokenizeCapturedWithRuleId){const t=u.getName(c,i),o=s.contentNameScopesList.pushAttributed(t,e),p=u.getContentName(c,i),d=o.pushAttributed(p,e),h=s.push(u.retokenizeCapturedWithRuleId,m.start,-1,!1,null,o,d),g=e.createOnigString(c.substring(0,m.end));l(e,g,n&&0===m.start,m.start,h,a,!1,0),r.disposeOnigString(g);continue}const g=u.getName(c,i);if(null!==g){const t=(p.length>0?p[p.length-1].scopes:s.contentNameScopesList).pushAttributed(g,e);p.push(new h(t,m.end))}}for(;p.length>0;)a.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}t._tokenizeString=l;class h{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=h},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,o){let i=new s(e),l=new r,c=0,u=null,p=[],d=[];function h(){p.push(c),d.push(u)}function m(){c=p.pop(),u=d.pop()}function g(e){n(i,e)}for(;a(i,l);){if(0===c){if(null!==u&&g("too many constructs in root"),3===l.type){u={},o&&(u.$vscodeTextmateLocation=l.toLocation(t)),h(),c=1;continue}if(2===l.type){u=[],h(),c=4;continue}g("unexpected token in root")}if(2===c){if(5===l.type){m();continue}if(7===l.type){c=3;continue}g("expected , or }")}if(1===c||3===c){if(1===c&&5===l.type){m();continue}if(1===l.type){let e=l.value;if(a(i,l)&&6===l.type||g("expected colon"),a(i,l)||g("expected value"),c=2,1===l.type){u[e]=l.value;continue}if(8===l.type){u[e]=null;continue}if(9===l.type){u[e]=!0;continue}if(10===l.type){u[e]=!1;continue}if(11===l.type){u[e]=parseFloat(l.value);continue}if(2===l.type){let t=[];u[e]=t,h(),c=4,u=t;continue}if(3===l.type){let n={};o&&(n.$vscodeTextmateLocation=l.toLocation(t)),u[e]=n,h(),c=1,u=n;continue}}g("unexpected token in dict")}if(5===c){if(4===l.type){m();continue}if(7===l.type){c=6;continue}g("expected , or ]")}if(4===c||6===c){if(4===c&&4===l.type){m();continue}if(c=5,1===l.type){u.push(l.value);continue}if(8===l.type){u.push(null);continue}if(9===l.type){u.push(!0);continue}if(10===l.type){u.push(!1);continue}if(11===l.type){u.push(parseFloat(l.value));continue}if(2===l.type){let e=[];u.push(e),h(),c=4,u=e;continue}if(3===l.type){let e={};o&&(e.$vscodeTextmateLocation=l.toLocation(t)),u.push(e),h(),c=1,u=e;continue}g("unexpected token in array")}g("unknown state")}return 0!==d.length&&g("unclosed constructs"),u};class s{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class r{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function a(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let s,r=e.source,a=e.pos,o=e.len,i=e.line,l=e.char;for(;;){if(a>=o)return!1;if(s=r.charCodeAt(a),32!==s&&9!==s&&13!==s){if(10!==s)break;a++,i++,l=0}else a++,l++}if(t.offset=a,t.line=i,t.char=l,34===s){for(t.type=1,a++,l++;;){if(a>=o)return!1;if(s=r.charCodeAt(a),a++,l++,92!==s){if(34===s)break}else a++,l++}t.value=r.substring(t.offset+1,a-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,s)=>{switch(s){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===s)t.type=2,a++,l++;else if(123===s)t.type=3,a++,l++;else if(93===s)t.type=4,a++,l++;else if(125===s)t.type=5,a++,l++;else if(58===s)t.type=6,a++,l++;else if(44===s)t.type=7,a++,l++;else if(110===s){if(t.type=8,a++,l++,s=r.charCodeAt(a),117!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;a++,l++}else if(116===s){if(t.type=9,a++,l++,s=r.charCodeAt(a),114!==s)return!1;if(a++,l++,s=r.charCodeAt(a),117!==s)return!1;if(a++,l++,s=r.charCodeAt(a),101!==s)return!1;a++,l++}else if(102===s){if(t.type=10,a++,l++,s=r.charCodeAt(a),97!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;if(a++,l++,s=r.charCodeAt(a),115!==s)return!1;if(a++,l++,s=r.charCodeAt(a),101!==s)return!1;a++,l++}else for(t.type=11;;){if(a>=o)return!1;if(s=r.charCodeAt(a),!(46===s||s>=48&&s<=57||101===s||69===s||45===s||43===s))break;a++,l++}return t.len=a-t.offset,null===t.value&&(t.value=r.substr(t.offset,t.len)),e.pos=a,e.line=i,e.char=l,!0}},787:function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;const a=n(391),o=n(50),i=n(652),l=n(583),c=n(965);r(n(44),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new i.SyncRegistry(l.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(l.Theme.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new a.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,s,r){const a=new c.ScopeDependencyProcessor(this._syncRegistry,e);for(;a.Q.length>0;)await Promise.all(a.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),a.processQueue();return this._grammarForScopeName(e,t,n,s,r)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,s=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,s)}_grammarForScopeName(e,t=0,n=null,s=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,s,r)}},t.INITIAL=a.StateStack.NULL,t.parseRawGrammar=o.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){const s=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}(e);let a=r.next();for(;null!==a;){let e=0;if(2===a.length&&":"===a.charAt(1)){switch(a.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let t=i();if(s.push({matcher:t,priority:e}),","!==a)break;a=r.next()}return s;function o(){if("-"===a){a=r.next();const e=o();return t=>!!e&&!e(t)}if("("===a){a=r.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===a||","===a);){do{a=r.next()}while("|"===a||","===a);t=i()}return t=>e.some((e=>e(t)))}();return")"===a&&(a=r.next()),e}if(n(a)){const e=[];do{e.push(a),a=r.next()}while(n(a));return n=>t(e,n)}return null}function i(){const e=[];let t=o();for(;t;)e.push(t),t=o();return t=>e.every((e=>e(t)))}}},44:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){"function"==typeof e.dispose&&e.dispose()}},50:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;const s=n(69),r=n(350),a=n(974);t.parseRawGrammar=function(e,t=null){return null!==t&&/\.json$/.test(t)?(n=e,o=t,r.DebugFlags.InDebugMode?a.parseJSON(n,o,!0):JSON.parse(n)):function(e,t){return r.DebugFlags.InDebugMode?s.parseWithLocation(e,t,"$vscodeTextmateLocation"):s.parsePLIST(e)}(e,t);var n,o}},69:(e,t)=>{function n(e,t,n){const s=e.length;let r=0,a=1,o=0;function i(t){if(null===n)r+=t;else for(;t>0;)10===e.charCodeAt(r)?(r++,a++,o=0):(r++,o++),t--}function l(e){null===n?r=e:i(e-r)}function c(){for(;r<s;){let t=e.charCodeAt(r);if(32!==t&&9!==t&&13!==t&&10!==t)break;i(1)}}function u(t){return e.substr(r,t.length)===t&&(i(t.length),!0)}function p(t){let n=e.indexOf(t,r);l(-1!==n?n+t.length:s)}function d(t){let n=e.indexOf(t,r);if(-1!==n){let s=e.substring(r,n);return l(n+t.length),s}{let t=e.substr(r);return l(s),t}}s>0&&65279===e.charCodeAt(0)&&(r=1);let h=0,m=null,g=[],f=[],y=null;function _(e,t){g.push(h),f.push(m),h=e,m=t}function b(){if(0===g.length)return v("illegal state stack");h=g.pop(),m=f.pop()}function v(t){throw new Error("Near offset "+r+": "+t+" ~~~"+e.substr(r,50)+"~~~")}const w=function(){if(null===y)return v("missing <key>");let e={};null!==n&&(e[n]={filename:t,line:a,char:o}),m[y]=e,y=null,_(1,e)},k=function(){if(null===y)return v("missing <key>");let e=[];m[y]=e,y=null,_(2,e)},S=function(){let e={};null!==n&&(e[n]={filename:t,line:a,char:o}),m.push(e),_(1,e)},N=function(){let e=[];m.push(e),_(2,e)};function x(){if(1!==h)return v("unexpected </dict>");b()}function j(){return 1===h||2!==h?v("unexpected </array>"):void b()}function P(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function C(e){if(isNaN(e))return v("cannot parse float");if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function L(e){if(isNaN(e))return v("cannot parse integer");if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function T(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function A(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function E(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function O(){let e=d(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function R(e){if(e.isClosed)return"";let t=d("</");return p(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return e}))}for(;r<s&&(c(),!(r>=s));){const l=e.charCodeAt(r);if(i(1),60!==l)return v("expected <");if(r>=s)return v("unexpected end of input");const d=e.charCodeAt(r);if(63===d){i(1),p("?>");continue}if(33===d){if(i(1),u("--")){p("--\x3e");continue}p(">");continue}if(47===d){if(i(1),c(),u("plist")){p(">");continue}if(u("dict")){p(">"),x();continue}if(u("array")){p(">"),j();continue}return v("unexpected closed tag")}let g=O();switch(g.name){case"dict":1===h?w():2===h?S():(m={},null!==n&&(m[n]={filename:t,line:a,char:o}),_(1,m)),g.isClosed&&x();continue;case"array":1===h?k():2===h?N():(m=[],_(2,m)),g.isClosed&&j();continue;case"key":I=R(g),1!==h?v("unexpected <key>"):null!==y?v("too many <key>"):y=I;continue;case"string":P(R(g));continue;case"real":C(parseFloat(R(g)));continue;case"integer":L(parseInt(R(g),10));continue;case"date":T(new Date(R(g)));continue;case"data":A(R(g));continue;case"true":R(g),E(!0);continue;case"false":R(g),E(!1);continue}if(!/^plist/.test(g.name))return v("unexpected opened tag "+g.name)}var I;return m}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,s){return n(e,t,s)},t.parsePLIST=function(e){return n(e,null,null)}},652:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;const s=n(391);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,s.createGrammar(e,o,t,n,r,a,this,await this._onigLibPromise))}return this._grammars.get(e)}}},792:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;const s=n(878),r=n(965),a=/\\(\d+)/,o=/\\(\d+)/g;Symbol("RuleId"),t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class i{constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=s.RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=s.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${s.basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?s.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?s.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=i;class l extends i{constructor(e,t,n,s,r){super(e,t,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,s){throw new Error("Not supported!")}}t.CaptureRule=l;class c extends i{constructor(e,t,n,s,r){super(e,t,n,null),this._match=new m(s,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=c;class u extends i{constructor(e,t,n,s,r){super(e,t,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class p extends i{constructor(e,t,n,s,r,a,o,i,l,c){super(e,t,n,s),this._begin=new m(r,this.id),this.beginCaptures=a,this._end=new m(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}t.BeginEndRule=p;class d extends i{constructor(e,n,s,r,a,o,i,l,c){super(e,n,s,r),this._begin=new m(a,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new m(i,t.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new g,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=d;class h{static createCaptureRule(e,t,n,s,r){return e.registerRule((e=>new l(t,e,n,s,r)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((r=>{if(e.id=r,e.match)return new c(e.$vscodeTextmateLocation,e.id,e.name,e.match,h._compileCaptures(e.captures,t,n));if(void 0===e.begin){e.repository&&(n=s.mergeObjects({},n,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,h._compilePatterns(r,t,n))}return e.while?new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,h._compileCaptures(e.whileCaptures||e.captures,t,n),h._compilePatterns(e.patterns,t,n)):new p(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,h._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,h._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let s=[];if(e){let r=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>r&&(r=e)}for(let e=0;e<=r;e++)s[e]=null;for(const r in e){if("$vscodeTextmateLocation"===r)continue;const a=parseInt(r,10);let o=0;e[r].patterns&&(o=h.getCompiledRuleId(e[r],t,n)),s[a]=h.createCaptureRule(t,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,o)}}return s}static _compilePatterns(e,t,n){let s=[];if(e)for(let a=0,o=e.length;a<o;a++){const o=e[a];let i=-1;if(o.include){const e=r.parseInclude(o.include);switch(e.kind){case 0:case 1:i=h.getCompiledRuleId(n[o.include],t,n);break;case 2:let s=n[e.ruleName];s&&(i=h.getCompiledRuleId(s,t,n));break;case 3:case 4:const r=e.scopeName,a=4===e.kind?e.ruleName:null,l=t.getExternalGrammar(r,n);if(l)if(a){let e=l.repository[a];e&&(i=h.getCompiledRuleId(e,t,l.repository))}else i=h.getCompiledRuleId(l.repository.$self,t,l.repository)}}else i=h.getCompiledRuleId(o,t,n);if(-1!==i){const e=t.getRule(i);let n=!1;if((e instanceof u||e instanceof p||e instanceof d)&&e.hasMissingPatterns&&0===e.patterns.length&&(n=!0),n)continue;s.push(i)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}}t.RuleFactory=h;class m{constructor(e,t){if(e){const t=e.length;let n=0,s=[],r=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(s.push(e.substring(n,a)),s.push("$(?!\\n)(?<!\\n)"),n=a+2):"A"!==t&&"G"!==t||(r=!0),a++}this.hasAnchor=r,0===n?this.source=e:(s.push(e.substring(n,t)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=a.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return o.lastIndex=0,this.source.replace(o,((e,t)=>s.escapeRegExpCharacters(n[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,n,s,r=[],a=[],o=[],i=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,a[e]=n,o[e]=n,i[e]=n,"\\"===n&&e+1<t&&(s=this.source.charAt(e+1),"A"===s?(r[e+1]="￿",a[e+1]="￿",o[e+1]="A",i[e+1]="A"):"G"===s?(r[e+1]="￿",a[e+1]="G",o[e+1]="￿",i[e+1]="G"):(r[e+1]=s,a[e+1]=s,o[e+1]=s,i[e+1]=s),e++);return{A0_G0:r.join(""),A0_G1:a.join(""),A1_G0:o.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=m;class g{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map((e=>e.source));this._cached=new f(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map((e=>e.resolveAnchors(t,n)));return new f(e,s,this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=g;class f{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push("   - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}}t.CompiledRule=f},583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;const s=n(878);class r{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new s.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(l(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=s.strcmp(e.scope,t.scope);return 0!==n?n:(n=s.strArrCmp(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)}));let n=0,a="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(a=t.foreground),null!==t.background&&(o=t.background)}let l=new u(t),c=new i(n,l.getId(a),l.getId(o)),h=new d(new p(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];h.insert(0,n.scope,n.parentScopes,n.fontStyle,l.getId(n.foreground),l.getId(n.background))}return new r(l,c,h)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(null===t)return!0;let n=0,s=t[n];for(;e;){if(o(e.scopeName,s)){if(n++,n===t.length)return!0;s=t[n]}e=e.parent}return!1}(e.parent,t.parentScopes)));return n?new i(n.fontStyle,n.foreground,n.background):null}}t.Theme=r;class a{constructor(e,t){this.parent=e,this.scopeName=t}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new a(t,e[n]);return t}push(e){return new a(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}}function o(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}t.ScopeStack=a;class i{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}}function l(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,a=t.length;e<a;e++){let a,o=t[e];if(!o.settings)continue;if("string"==typeof o.scope){let e=o.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),a=e.split(",")}else a=Array.isArray(o.scope)?o.scope:[""];let i=-1;if("string"==typeof o.settings.fontStyle){i=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}let l=null;"string"==typeof o.settings.foreground&&s.isValidHexColor(o.settings.foreground)&&(l=o.settings.foreground);let u=null;"string"==typeof o.settings.background&&s.isValidHexColor(o.settings.background)&&(u=o.settings.background);for(let t=0,s=a.length;t<s;t++){let s=a[t].trim().split(" "),o=s[s.length-1],p=null;s.length>1&&(p=s.slice(0,s.length-1),p.reverse()),n[r++]=new c(o,p,e,i,l,u)}}return n}t.StyleAttributes=i,t.parseTheme=l;class c{constructor(e,t,n,s,r,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=a}}t.ParsedThemeRule=c,t.fontStyleToString=function(e){if(-1===e)return"not set";let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),""===t&&(t="none"),t.trim()};class u{constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}}t.ColorMap=u;class p{constructor(e,t,n,s,r){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=s,this.background=r}clone(){return new p(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==s&&(this.background=s)}}t.ThemeTrieElementRule=p;class d{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const n=e.parentScopes,s=t.parentScopes;let r=null===n?0:n.length,a=null===s?0:s.length;if(r===a)for(let e=0;e<r;e++){const t=n[e].length,r=s[e].length;if(t!==r)return r-t}return a-r}return t.scopeDepth-e.scopeDepth}match(e){if(""===e)return d._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));let t,n,s=e.indexOf(".");return-1===s?(t=e,n=""):(t=e.substring(0,s),n=e.substring(s+1)),this._children.hasOwnProperty(t)?this._children[t].match(n):d._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))}insert(e,t,n,s,r,a){if(""===t)return void this._doInsertHere(e,n,s,r,a);let o,i,l,c=t.indexOf(".");-1===c?(o=t,i=""):(o=t.substring(0,c),i=t.substring(c+1)),this._children.hasOwnProperty(o)?l=this._children[o]:(l=new d(this._mainRule.clone(),p.cloneArr(this._rulesWithParentScopes)),this._children[o]=l),l.insert(e+1,i,n,s,r,a)}_doInsertHere(e,t,n,r,a){if(null!==t){for(let o=0,i=this._rulesWithParentScopes.length;o<i;o++){let i=this._rulesWithParentScopes[o];if(0===s.strArrCmp(i.parentScopes,t))return void i.acceptOverwrite(e,n,r,a)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===a&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new p(e,t,n,r,a))}else this._mainRule.acceptOverwrite(e,n,r,a)}}t.ThemeTrieElement=d},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s<r;s++)t[s]=n(e[s]);return t}(e):"object"==typeof e?function(e){let t={};for(let s in e)t[s]=n(e[s]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let s=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function r(e,t){return e<t?-1:e>t?1:0}t.RegexSource=class{static hasCaptures(e){return null!==e&&(s.lastIndex=0,s.test(e))}static replaceCaptures(e,t,n){return e.replace(s,((e,s,r,a)=>{let o=n[parseInt(s||r,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}},t.strcmp=r,t.strArrCmp=function(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let s=0;s<n;s++){let n=r(e[s],t[s]);if(0!==n)return n}return 0}return n-s},t.isValidHexColor=function(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()}}},t={};return function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s].call(a.exports,a,a.exports,n),a.exports}(787)})()},229:(e,t,n)=>{"use strict";e.exports=n.p+"015f9d709daff9eb9473.wasm"},609:e=>{"use strict";e.exports=window.React},673:()=>{},485:()=>{}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e].call(n.exports,n,n.exports,o),n.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);o.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&s&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(r,a),r},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,n)=>(o.f[n](e,t),t)),[])),o.u=e=>e+".js?ver=d43e1cd3952f43f28e34",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},s="pattern-css:",o.l=(e,t,r,a)=>{if(n[e])n[e].push(t);else{var i,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var p=c[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==s+r){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",s+r),i.src=e),n[e]=[t];var d=(t,s)=>{i.onerror=i.onload=null,clearTimeout(h);var r=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),r&&r.forEach((e=>e(s))),t)return t(s)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={57:0};o.f.j=(t,n)=>{var s=o.o(e,t)?e[t]:void 0;if(0!==s)if(s)n.push(s[2]);else{var r=new Promise(((n,r)=>s=e[t]=[n,r]));n.push(s[2]=r);var a=o.p+o.u(t),i=new Error;o.l(a,(n=>{if(o.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var r=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",i.name="ChunkLoadError",i.type=r,i.request=a,s[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var s,r,[a,i,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(s in i)o.o(i,s)&&(o.m[s]=i[s]);l&&l(o)}for(t&&t(n);c<a.length;c++)r=a[c],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=globalThis.webpackChunkpattern_css=globalThis.webpackChunkpattern_css||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";const e=window.wp.apiFetch;var t=o.n(e);const n=window.wp.hooks,s=window.wp.plugins,r=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],a=[];class i{scopes=[];referenceId=1;references=new Map;deferred=[null];wrappedObjects=new WeakMap;externalObjects=new WeakMap;buffers=new Map;instanceData=0;pendingException=null;constructor(e){this.id=a.length,a.push(this),this.instance=e,this.table=e.exports.__indirect_function_table,this.exports={},this.pushScope();let t=this.scopes[this.scopes.length-1],n=t.length;t.push(this.exports);try{this.instance.exports.napi_register_module_v1&&this.instance.exports.napi_register_module_v1(this.id,n),this.instance.exports.napi_register_wasm_v1&&this.instance.exports.napi_register_wasm_v1(this.id,n)}finally{if(this.popScope(),this.pendingException){let e=this.pendingException;throw this.pendingException=null,e}}}destroy(){a[this.id]=void 0}getString(e,t=function(e,t){let n=0;for(;0!==e[t];)n++,t++;return n}(this.memory,e)){return l.decode(this.memory.subarray(e,Math.max(0,e+t)))}pushScope(){let e=this.scopes.length;return this.scopes.push(e?[...this.scopes[e-1]]:[void 0,null,globalThis,!0,!1]),e}popScope(){this.scopes.pop();for(let[e,t]of this.buffers)e.byteLength&&t.byteLength&&e.set(t);this.buffers.clear()}get(e){return this.scopes[this.scopes.length-1][e]}set(e,t){this.scopes[this.scopes.length-1][e]=t}pushValue(e,t=this.scopes.length-1){let n=this.scopes[t],s=n.length;return n.push(e),s}createValue(e,t,n){if("boolean"==typeof e)return this.setPointer(t,e?3:4),0;if(void 0===e)return this.setPointer(t,0),0;if(null===e)return this.setPointer(t,1),0;if(e===globalThis)return this.setPointer(t,2),0;let s=this.pushValue(e,n);return this.setPointer(t,s),0}setPointer(e,t){return this.u32[e>>2]=t,0}_u32=new Uint32Array;get u32(){return 0===this._u32.byteLength&&(this._u32=new Uint32Array(this.instance.exports.memory.buffer)),this._u32}_i32=new Int32Array;get i32(){return 0===this._i32.byteLength&&(this._i32=new Int32Array(this.instance.exports.memory.buffer)),this._i32}_u16=new Uint16Array;get u16(){return 0===this._u16.byteLength&&(this._u16=new Uint16Array(this.instance.exports.memory.buffer)),this._u16}_u64=new BigUint64Array;get u64(){return 0===this._u64.byteLength&&(this._u64=new BigUint64Array(this.instance.exports.memory.buffer)),this._u64}_i64=new BigInt64Array;get i64(){return 0===this._i64.byteLength&&(this._i64=new BigInt64Array(this.instance.exports.memory.buffer)),this._i64}_f64=new Float64Array;get f64(){return 0===this._f64.byteLength&&(this._f64=new Float64Array(this.instance.exports.memory.buffer)),this._f64}_buf=new Uint8Array;get memory(){return 0===this._buf.byteLength&&(this._buf=new Uint8Array(this.instance.exports.memory.buffer)),this._buf}getBufferInfo(e,t){if(this.buffers.has(e)){let n=this.buffers.get(e);return this.setPointer(t,n.byteOffset),n.byteLength}if(e instanceof ArrayBuffer){let n=this.copyBuffer(new Uint8Array(e));return this.setPointer(t,n.byteOffset),n.byteLength}if(e.buffer===this.instance.exports.memory.buffer)return this.setPointer(t,e.byteOffset),e.byteLength;let n=this.copyBuffer(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));return this.setPointer(t,n.byteOffset),n.byteLength}copyBuffer(e){let t=this.instance.exports.napi_wasm_malloc(e.byteLength),n=this.memory;n.set(e,t);let s=n.subarray(t,t+e.byteLength);return h.register(s,new d(this.id,((e,t)=>{this.instance.exports.napi_wasm_free&&this.instance.exports.napi_wasm_free(t)}),0,t)),this.buffers.set(e,s),s}createFunction(e,t){let n=this,s=n.table.get(e);return function(...e){let r=n.pushScope();try{let a=n.scopes[r],o=a.length;a.push({thisArg:this,args:e,data:t,newTarget:new.target});let i=s(n.id,o);return n.get(i)}finally{if(n.popScope(),n.pendingException){let e=n.pendingException;throw n.pendingException=null,e}}}}readPropertyDescriptor(e){let t=this.u32,n=t[e++],s=t[e++],r=t[e++],a=t[e++],o=t[e++],i=t[e++],l=t[e++],c=t[e++],u=n?this.getString(n):this.get(s),p=Boolean(1&l),d=Boolean(2&l),h=Boolean(4&l),m=Boolean(1024&l),g=a?this.createFunction(a,c):void 0,f=o?this.createFunction(o,c):void 0,y=r?this.createFunction(r,c):i?this.get(i):void 0,_={name:u,static:m,configurable:h,enumerable:d};return g||f?(_.get=g,_.set=f):y&&(_.writable=p,_.value=y),_}}const l=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),c=new TextDecoder("latin1"),u=new TextDecoder("utf-16"),p=new TextEncoder;class d{constructor(e,t,n,s){this.env=e,this.finalize=t,this.hint=n,this.data=s}}const h=new FinalizationRegistry((e=>{e.finalize&&e.finalize(e.env,e.data,e.hint)}));class m{}const g=[];class f{constructor(e,t,n,s){this.env=e,this.fn=t,this.nativeFn=n,this.context=s,this.id=g.length,g.push(this)}}const y=[null];class _{constructor(e,t,n,s){this.env=e,this.execute=t,this.complete=n,this.data=s,this.id=y.length,y.push(this)}}const b={napi_open_handle_scope(e,t){let n=a[e],s=n.pushScope();return n.setPointer(t,s)},napi_close_handle_scope(e,t){let n=a[e];return t!==n.scopes.length-1?13:(n.popScope(),0)},napi_open_escapable_handle_scope(e,t){let n=a[e],s=n.pushScope();return n.setPointer(t,s)},napi_close_escapable_handle_scope(e,t){let n=a[e];return t!==n.scopes.length-1?13:(n.popScope(),0)},napi_escape_handle(e,t,n,s){let r=a[e],o=r.get(n);return r.createValue(o,s,t-1)},napi_create_object:(e,t)=>a[e].createValue({},t),napi_set_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n),l=r.get(s);return o[i]=l,0},napi_get_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.createValue(o[i],s)},napi_delete_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n),l=!1;try{l=delete o[i]}catch(e){}return s&&(r.memory[s]=l?1:0),0},napi_has_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=i in o?1:0,0},napi_has_own_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=o.hasOwnProperty(i)?1:0,0},napi_set_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(s);return o[r.getString(n)]=i,0},napi_get_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.getString(n);return r.createValue(o[i],s)},napi_has_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.getString(n);return r.memory[s]=i in o?1:0,0},napi_get_property_names(e,t,n){let s=a[e],r=s.get(t),o=Object.keys(r);return s.createValue(o,n)},napi_get_all_property_names(e,t,n,s,r,a){throw new Error("not implemented")},napi_define_properties(e,t,n,s){let r=a[e],o=r.get(t),i=s>>2;for(let e=0;e<n;e++){let e=r.readPropertyDescriptor(i);Object.defineProperty(o,e.name,e),i+=8}return 0},napi_object_freeze(e,t){let n=a[e].get(t);return Object.freeze(n),0},napi_object_seal(e,t){let n=a[e].get(t);return Object.seal(n),0},napi_get_prototype(e,t,n){let s=a[e],r=s.get(t);return s.createValue(Object.getPrototypeOf(r),n)},napi_define_class(e,t,n,s,r,o,i,l){let c=a[e],u=c.createFunction(s,r);Object.defineProperty(u,"name",{value:c.getString(t,n),configurable:!0});let p=i>>2;for(let e=0;e<o;e++){let e=c.readPropertyDescriptor(p);e.static?Object.defineProperty(u,e.name,e):Object.defineProperty(u.prototype,e.name,e),p+=8}return c.createValue(u,l)},napi_create_reference(e,t,n,s){let r=a[e],o=r.referenceId++;return r.references.set(o,{value:r.get(t),refcount:n}),r.setPointer(s,o)},napi_delete_reference:(e,t)=>(a[e].references.delete(t),0),napi_get_reference_value(e,t,n){let s=a[e],r=s.references.get(t);return s.createValue(r.value,n)},napi_reference_ref(e,t,n){let s=a[e],r=s.references.get(t);return r.refcount++,s.setPointer(n,r.refcount)},napi_reference_unref(e,t,n){let s=a[e],r=s.references.get(t);return 0===r.refcount?9:(r.refcount--,s.setPointer(n,r.refcount))},napi_add_env_cleanup_hook:()=>0,napi_remove_env_cleanup_hook:()=>0,napi_add_async_cleanup_hook:()=>0,napi_remove_async_cleanup_hook:()=>0,napi_set_instance_data:(e,t,n,s)=>(a[e].instanceData=t,0),napi_get_instance_data(e,t){let n=a[e];return n.setPointer(t,n.instanceData)},napi_get_boolean:(e,t,n)=>a[e].setPointer(n,t?3:4),napi_get_value_bool(e,t,n){let s=a[e],r=s.get(t);return"boolean"!=typeof r?7:(s.memory[n]=r?1:0,0)},napi_create_int32:(e,t,n)=>a[e].createValue(t,n),napi_get_value_int32(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.i32[n>>2]=r,0)},napi_create_uint32:(e,t,n)=>a[e].createValue(t,n),napi_get_value_uint32(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:s.setPointer(n,r)},napi_create_int64:(e,t,n)=>a[e].createValue(Number(t),n),napi_get_value_int64(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.i64[n>>3]=r,0)},napi_create_double:(e,t,n)=>a[e].createValue(t,n),napi_get_value_double(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.f64[n>>3]=r,0)},napi_create_bigint_int64:(e,t,n)=>a[e].createValue(BigInt.asIntN(64,t),n),napi_get_value_bigint_int64(e,t,n,s){let r=a[e],o=r.get(t);return"bigint"!=typeof o?17:(r.i64[n>>3]=o,s&&(r.memory[s]=BigInt.asIntN(64,o)===o?1:0),0)},napi_create_bigint_uint64:(e,t,n)=>a[e].createValue(BigInt.asUintN(64,t),n),napi_get_value_bigint_uint64(e,t,n,s){let r=a[e],o=r.get(t);return"bigint"!=typeof o?17:(r.u64[n>>3]=o,s&&(r.memory[s]=BigInt.asUintN(64,o)===o?1:0),0)},napi_create_bigint_words(e,t,n,s,r){let o=a[e],i=o.u64,l=s>>3,c=0n,u=0n;for(let e=0;e<n;e++)c+=i[l++]<<u,u+=64n;return c*=BigInt((-1)**t),o.createValue(c,r)},napi_get_value_bigint_words(e,t,n,s,r){let o=a[e],i=o.get(t);if("bigint"!=typeof i)return 17;let l=o.u32[s>>2];n&&(o.i32[n]=i<0n?1:0);let c=0;if(r){let e=(1n<<64n)-1n,t=o.u64,n=r>>3;for(i<0n&&(i=-i);c<l&&0n!==i;c++)t[n++]=i&e,i>>=64n}for(;i>0n;)c++,i>>=64n;return o.setPointer(s,c)},napi_get_null:(e,t)=>a[e].setPointer(t,1),napi_create_array:(e,t)=>a[e].createValue([],t),napi_create_array_with_length:(e,t,n)=>a[e].createValue(new Array(t),n),napi_set_element(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(s);return o[n]=i,0},napi_get_element(e,t,n,s){let r=a[e],o=r.get(t)[n];return r.createValue(o,s)},napi_has_element(e,t,n,s){let r=a[e],o=r.get(t);return r.memory[s]=o.hasOwnProperty(n)?1:0,0},napi_delete_element(e,t,n,s){let r=a[e],o=r.get(t),i=!1;try{i=delete o[n]}catch(e){}return s&&(r.memory[s]=i?1:0),0},napi_get_array_length(e,t,n){let s=a[e],r=s.get(t);return s.setPointer(n,r.length)},napi_get_undefined:(e,t)=>a[e].setPointer(t,0),napi_create_function(e,t,n,s,r,o){let i=a[e],l=i.createFunction(s,r);return Object.defineProperty(l,"name",{value:i.getString(t,n),configurable:!0}),i.createValue(l,o)},napi_call_function(e,t,n,s,r,o){let i=a[e],l=i.get(t),c=i.get(n),u=new Array(s),p=i.u32;for(let e=0;e<s;e++)u[e]=i.get(p[r>>2]),r+=4;try{let e=c.apply(l,u);return i.createValue(e,o)}catch(e){return i.pendingException=e,10}},napi_new_instance(e,t,n,s,r){let o=a[e],i=o.get(t),l=new Array(n),c=o.u32;for(let e=0;e<n;e++)l[e]=o.get(c[s>>2]),s+=4;try{let e=new i(...l);return o.createValue(e,r)}catch(e){return o.pendingException=e,10}},napi_get_cb_info(e,t,n,s,r,o){let i=a[e],l=i.get(t);i.setPointer(n,l.args.length);for(let e=0;e<l.args.length;e++)i.createValue(l.args[e],s),s+=4;return i.createValue(l.thisArg,r),i.setPointer(o,l.data),0},napi_get_new_target(e,t,n){let s=a[e],r=s.get(t);return s.createValue(r.newTarget,n)},napi_create_threadsafe_function(e,t,n,s,r,o,i,l,c,u,p){let m=a[e],g=t?m.get(t):void 0,y=u?m.table.get(u):void 0,_=new f(m,g,y,c);if(l){let t=m.table.get(l);h.register(_,new d(e,t,0,_.id))}return m.setPointer(p,_.id),0},napi_ref_threadsafe_function:()=>0,napi_unref_threadsafe_function:()=>0,napi_acquire_threadsafe_function:()=>0,napi_release_threadsafe_function:(e,t)=>(g[e]=void 0,0),napi_call_threadsafe_function(e,t,n){let s=g[e];s.env.pushScope();try{if(s.nativeFn){let e=s.fn?s.env.pushValue(s.fn):0;s.nativeFn(s.env.id,e,s.context,t)}else s.fn&&s.fn()}finally{s.env.popScope()}},napi_get_threadsafe_function_context(e,t){let n=g[e];return n.env.setPointer(t,n.context),0},napi_create_async_work(e,t,n,s,r,o,i){let l=a[e],c=s?l.table.get(s):void 0,u=r?l.table.get(r):void 0,p=new _(l,c,u,o);return l.setPointer(i,p.id),0},napi_delete_async_work:(e,t)=>(y[t]=void 0,0),napi_queue_async_work:(e,t)=>(queueMicrotask((()=>{let n=y[t];n&&(n.execute(e,n.data),n.complete(e,0,n.data))})),0),napi_cancel_async_work(){let e=y[work];return e.complete(env,11,e.data),y[work]=void 0,0},napi_throw(e,t){let n=a[e];return n.pendingException=n.get(t),0},napi_throw_error(e,t,n){let s=a[e],r=new Error(s.getString(n));return r.code=t,s.pendingException=r,0},napi_throw_type_error(e,t,n){let s=a[e],r=new TypeError(s.getString(n));return r.code=t,s.pendingException=r,0},napi_throw_range_error(e,t,n){let s=a[e],r=new RangeError(s.getString(n));return r.code=t,s.pendingException=r,0},napi_create_error(e,t,n,s){let r=a[e],o=new Error(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_create_type_error(e,t,n,s){let r=a[e],o=new TypeError(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_create_range_error(e,t,n,s){let r=a[e],o=new RangeError(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_get_and_clear_last_exception(e,t){let n=a[e],s=n.pendingException;return n.pendingException=null,n.createValue(s,t)},napi_is_exception_pending(e,t){let n=a[e];return n.memory[t]=n.pendingException?1:0,0},napi_fatal_exception(e,t){throw new Error("not implemented")},napi_fatal_error(e,t,n,s){throw new Error("not implemented")},napi_get_global:(e,t)=>a[e].setPointer(t,2),napi_create_buffer(e,t,n,s){let r=a[e],o=r.instance.exports.napi_wasm_malloc(t);n&&r.setPointer(n,o);let i=void 0!==globalThis.Buffer?globalThis.Buffer.from(r.memory.buffer,o,t):r.memory.subarray(o,o+t);return h.register(i,new d(e,((e,t)=>{r.instance.exports.napi_wasm_free&&r.instance.exports.napi_wasm_free(t)}),0,o)),r.createValue(i,s)},napi_create_buffer_copy(e,t,n,s,r){let o=a[e],i=o.instance.exports.napi_wasm_malloc(t);o.memory.set(o.memory.subarray(n,n+t),i),s&&o.setPointer(s,i);let l=void 0!==globalThis.Buffer?globalThis.Buffer.from(o.memory.buffer,i,t):o.memory.subarray(i,i+t);return h.register(buf,new d(e,((e,t)=>{o.instance.exports.napi_wasm_free&&o.instance.exports.napi_wasm_free(t)}),0,i)),o.createValue(l,r)},napi_create_external_buffer(e,t,n,s,r,o){let i=a[e],l=void 0!==globalThis.Buffer?globalThis.Buffer.from(i.memory.buffer,n,t):i.memory.subarray(n,n+t);if(s){let t=i.table.get(s);h.register(l,new d(e,t,r,n))}return i.createValue(l,o)},napi_get_buffer_info(e,t,n,s){let r=a[e],o=r.get(t),i=r.getBufferInfo(o,n);return r.setPointer(s,i)},napi_create_arraybuffer(e,t,n,s){let r=a[e],o=new ArrayBuffer(t);return n&&r.getBufferInfo(o,n),r.createValue(o,s)},napi_create_external_arraybuffer:(e,t,n,s,r,a)=>22,napi_get_arraybuffer_info(e,t,n,s){let r=a[e],o=r.getBufferInfo(r.get(t),n);return r.setPointer(s,o)},napi_detach_arraybuffer(e,t){let n=a[e].get(t);return"function"==typeof structuredClone&&structuredClone(n,{transfer:[n]}),0},napi_is_detached_arraybuffer(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=0===r.byteLength?1:0,0},napi_create_typedarray(e,t,n,s,o,i){let l=a[e],c=new(0,r[t])(l.get(s),o,n);return l.createValue(c,i)},napi_create_dataview(e,t,n,s,r){let o=a[e],i=o.get(n),l=new DataView(i,s,t);return o.createValue(l,r)},napi_get_typedarray_info(e,t,n,s,o,i,l){let c=a[e],u=c.get(t);return c.setPointer(n,r.findIndex((e=>u instanceof e))),c.setPointer(s,u.length),c.getBufferInfo(u,o),c.createValue(u.buffer,i),c.setPointer(l,u.byteOffset)},napi_get_dataview_info(e,t,n,s,r,o){let i=a[e],l=i.get(t);return i.setPointer(n,l.byteLength),i.getBufferInfo(l,s),i.createValue(l.buffer,r),i.setPointer(o,l.byteOffset)},napi_create_string_utf8(e,t,n,s){let r=a[e],o=l.decode(r.memory.subarray(t,t+n));return r.createValue(o,s)},napi_get_value_string_utf8(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,function(e){let t=0;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&n<e.length-1){let t=e.charCodeAt(++n);56320==(64512&t)?s=((1023&s)<<10)+(1023&t)+65536:n--}4294967168&s?4294965248&s?4294901760&s?4292870144&s||(t+=4):t+=3:t+=2:t++}return t}(i));let l=p.encodeInto(i,o.memory.subarray(n,n+s-1));return o.memory[n+l.written]=0,o.setPointer(r,l.written)},napi_create_string_latin1(e,t,n,s){let r=a[e],o=c.decode(r.memory.subarray(t,t+n));return r.createValue(o,s)},napi_get_value_string_latin1(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,i.length);let l=o.memory,c=Math.min(i.length,s-1);for(let e=0;e<c;e++){let t=i.charCodeAt(e);l[n++]=t}return l[n]=0,o.setPointer(r,c)},napi_create_string_utf16(e,t,n,s){let r=a[e],o=u.decode(r.memory.subarray(t,t+2*n));return r.createValue(o,s)},napi_get_value_string_utf16(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,i.length);let l=o.u16,c=n>>1,u=Math.min(i.length,s-1);for(let e=0;e<u;e++){let t=i.charCodeAt(e);l[c++]=t}return l[c]=0,o.setPointer(r,u)},napi_create_date:(e,t,n)=>a[e].createValue(new Date(t),n),napi_get_date_value(e,t,n){let s=a[e],r=s.get(t);s.f64[n>>3]=r.valueOf()},napi_create_symbol(e,t,n){let s=a[e],r=s.get(t);return s.createValue(Symbol(r),n)},napi_coerce_to_bool(e,t,n){let s=a[e];return s.createValue(Boolean(s.get(t)),n)},napi_coerce_to_number(e,t,n){let s=a[e];return s.createValue(Number(s.get(t)),n)},napi_coerce_to_object(e,t,n){let s=a[e];return s.createValue(Object(s.get(t)),n)},napi_coerce_to_string(e,t,n){let s=a[e];return s.createValue(String(s.get(t)),n)},napi_typeof(e,t,n){let s=a[e],r=s.get(t);return s.setPointer(n,(()=>{switch(typeof r){case"undefined":return 0;case"boolean":return 2;case"number":return 3;case"string":return 4;case"symbol":return 5;case"object":return null===r?1:r instanceof m?8:6;case"function":return 7;case"bigint":return 9}})())},napi_instanceof(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=o instanceof i?1:0,0},napi_is_array(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=Array.isArray(r)?1:0,0},napi_is_buffer(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=(void 0!==globalThis.Buffer?globalThis.Buffer.isBuffer(r):r instanceof Uint8Array)?1:0,0},napi_is_date(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Date?1:0,0},napi_is_error(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Error?1:0,0},napi_is_typedarray(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=!ArrayBuffer.isView(r)||r instanceof DataView?0:1,0},napi_is_dataview(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof DataView?1:0,0},napi_strict_equals(e,t,n,s){let r=a[e];return r.memory[s]=r.get(t)===r.get(n)?1:0,0},napi_wrap(e,t,n,s,r,o){let i=a[e],l=i.get(t);if(i.wrappedObjects.set(l,n),s){let t=i.table.get(s);h.register(l,new d(e,t,r,n))}return o?b.napi_create_reference(e,t,1,o):0},napi_unwrap(e,t,n){let s=a[e],r=s.get(t),o=s.wrappedObjects.get(r);return s.setPointer(n,o),0},napi_remove_wrap(e,t,n){let s=a[e],r=s.get(t),o=s.wrappedObjects.get(r);return h.unregister(r),s.wrappedObjects.delete(r),s.setPointer(n,o)},napi_type_tag_object(e,t,n){throw new Error("not implemented")},napi_check_object_type_tag(e,t,n){throw new Error("not implemented")},napi_add_finalizer(e,t,n,s,r,o){let i=a[e],l=i.get(t),c=i.table.get(s);return h.register(l,new d(e,c,r,n)),o?b.napi_create_reference(e,t,1,o):0},napi_create_promise(e,t,n){let s=a[e],r=new Promise(((e,n)=>{let r=s.deferred.length;s.deferred.push({resolve:e,reject:n}),s.setPointer(t,r)}));return s.createValue(r,n)},napi_resolve_deferred(e,t,n){let s=a[e],{resolve:r}=s.deferred[t];return r(s.get(n)),s.deferred[t]=void 0,0},napi_reject_deferred(e,t,n){let s=a[e],{reject:r}=s.deferred[t];return r(s.get(n)),s.deferred[t]=void 0,0},napi_is_promise(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Promise?1:0,0},napi_run_script(e,t,n){let s=a[e],r=s.get(t),o=(0,eval)(r);return s.createValue(o,n)},napi_create_external(e,t,n,s,r){let o=a[e],i=new m;if(o.externalObjects.set(i,t),n){let r=o.table.get(n);h.register(i,new d(e,r,s,t))}return o.createValue(i,r)},napi_get_value_external(e,t,n){let s=a[e],r=s.get(t),o=s.externalObjects.get(r);return o?s.setPointer(n,o):1},napi_adjust_external_memory:()=>0};let v;function w(e,t,n){v(e,t,n)}let k,S,N;function x(e){return function(e,t){if("function"==typeof t.visitor){let n=[];t.visitor=t.visitor({addDependency(e){n.push(e)}});let s=e(t);return s instanceof Promise?s=s.then((e=>(n.length&&(e.dependencies??=[],e.dependencies.push(...n)),e))):n.length&&(s.dependencies??=[],s.dependencies.push(...n)),s}return e(t)}(k.transform,e)}const j=window.wp.blockEditor,P=window.wp.components,C=window.wp.data,L=window.wp.editor,T=window.wp.element,A=window.wp.i18n,E=(e,t)=>[...new Set([...e.filter((e=>!e.startsWith("pcss-"))),t].filter(Boolean))].join(" "),O=e=>e.replace(/<\s*script\s*>/gi,"&lt;script&gt;").replace(/<\s*\/\s*script\s*>/gi,"&lt;/script&gt;").replace(/<\s*style\s*>/gi,"&lt;style&gt;").replace(/<\s*\/\s*style\s*>/gi,"&lt;/style&gt;");var R=o(609);const I=e=>{let t;const n=new Set,s=(e,s)=>{const r="function"==typeof e?e(t):e;if(!Object.is(r,t)){const e=t;t=(null!=s?s:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach((n=>n(t,e)))}},r=()=>t,a={setState:s,getState:r,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(s,r,a);return a},B=e=>e,M=e=>{const t=(e=>e?I(e):I)(e),n=e=>function(e,t=B){const n=R.useSyncExternalStore(e.subscribe,R.useCallback((()=>t(e.getState())),[e,t]),R.useCallback((()=>t(e.getInitialState())),[e,t]));return R.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},D=e=>e?M(e):M,G=e=>!!e.dispatchFromDevtools&&"function"==typeof e.dispatch,F=new Map,$=e=>{const t=F.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},W=e=>{var t,n;if(!e)return;const s=e.split("\n"),r=s.findIndex((e=>e.includes("api.setState")));if(r<0)return;const a=(null==(t=s[r+1])?void 0:t.trim())||"";return null==(n=/.+ (.+) .+/.exec(a))?void 0:n[1]},U=(e,t={})=>(n,s,r)=>{const{enabled:a,anonymousActionType:o,store:i,...l}=t;let c;try{c=(null==a||a)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return e(n,s,r);const{connection:u,...p}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const s=F.get(n.name);if(s)return{type:"tracked",store:e,...s};const r={connection:t.connect(n),stores:{}};return F.set(n.name,r),{type:"tracked",store:e,...r}})(i,c,l);let d=!0;r.setState=(e,t,a)=>{const c=n(e,t);if(!d)return c;const p=void 0===a?{type:o||W((new Error).stack)||"anonymous"}:"string"==typeof a?{type:a}:a;return void 0===i?(null==u||u.send(p,s()),c):(null==u||u.send({...p,type:`${i}/${p.type}`},{...$(l.name),[i]:r.getState()}),c)},r.devtools={cleanup:()=>{u&&"function"==typeof u.unsubscribe&&u.unsubscribe(),((e,t)=>{if(void 0===t)return;const n=F.get(e);n&&(delete n.stores[t],0===Object.keys(n.stores).length&&F.delete(e))})(l.name,i)}};const h=(...e)=>{const t=d;d=!1,n(...e),d=t},m=e(r.setState,s,r);if("untracked"===p.type?null==u||u.init(m):(p.stores[p.store]=r,null==u||u.init(Object.fromEntries(Object.entries(p.stores).map((([e,t])=>[e,e===p.store?m:t.getState()]))))),G(r)){let e=!1;const t=r.dispatch;r.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):V(e.payload,(e=>{if("__setState"!==e.type)G(r)&&r.dispatch(e);else{if(void 0===i)return void h(e.state);1!==Object.keys(e.state).length&&console.error('\n                    [zustand devtools middleware] Unsupported __setState action format.\n                    When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n                    and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n                    ');const t=e.state[i];if(null==t)return;JSON.stringify(r.getState())!==JSON.stringify(t)&&h(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return h(m),void 0===i?null==u?void 0:u.init(r.getState()):null==u?void 0:u.init($(l.name));case"COMMIT":return void 0===i?void(null==u||u.init(r.getState())):null==u?void 0:u.init($(l.name));case"ROLLBACK":return V(e.state,(e=>{if(void 0===i)return h(e),void(null==u||u.init(r.getState()));h(e[i]),null==u||u.init($(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return V(e.state,(e=>{void 0!==i?JSON.stringify(r.getState())!==JSON.stringify(e[i])&&h(e[i]):h(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,s=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!s)return;return h(void 0===i?s:s[i]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return d=!d}return}})),m},V=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function z(e,t){let n;try{n=e()}catch(e){return}const s={getItem:e=>{var s;const r=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(s=n.getItem(e))?s:null;return a instanceof Promise?a.then(r):r(a)},setItem:(e,s)=>n.setItem(e,JSON.stringify(s,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)};return s}const q=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>q(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>q(t)(e)}}},H=(e,t)=>(n,s,r)=>{let a={storage:z((()=>window.localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,i=0;const l=new Set,c=new Set;let u=a.storage;if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),s,r);const p=()=>{const e=a.partialize({...s()});return u.setItem(a.name,{state:e,version:a.version})},d=r.setState;r.setState=(e,t)=>(d(e,t),p());const h=e(((...e)=>(n(...e),p())),s,r);let m;r.getInitialState=()=>h;const g=()=>{var e,t;if(!u)return;const r=++i;o=!1,l.forEach((e=>{var t;return e(null!=(t=s())?t:h)}));const d=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=s())?e:h))||void 0;return q(u.getItem.bind(u))(a.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];if(a.migrate){const t=a.migrate(e.state,e.version);return t instanceof Promise?t.then((e=>[!0,e])):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]})).then((e=>{var t;if(r!==i)return;const[o,l]=e;return m=a.merge(l,null!=(t=s())?t:h),n(m,!0),o?p():void 0})).then((()=>{r===i&&(null==d||d(s(),void 0),m=s(),o=!0,c.forEach((e=>e(m))))})).catch((e=>{r===i&&(null==d||d(void 0,e))}))};return r.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||g(),m||h},K=D()(H(U((e=>({open:!1,transparent:!1,x:"20",y:"20",width:"400",height:"600",setTransparent:t=>e({transparent:t}),setOpen:t=>e({open:t}),setSize:(t,n)=>e({width:t,height:n}),setPosition:(t,n)=>e({x:t,y:n})})),{name:"PCSS Global Editor Store"}),{name:"pcss-global-editor-store"})),J=D()(H(U((e=>({open:!1,transparent:!0,x:"20",y:"20",width:"400",height:"600",setTransparent:t=>e({transparent:t}),setOpen:t=>e({open:t}),setSize:(t,n)=>e({width:t,height:n}),setPosition:(t,n)=>e({x:t,y:n})})),{name:"PCSS Popout Store"}),{name:"pcss-popout-store"})),X=window.wp.htmlEntities;var Q=o(69),Y=o.n(Q),Z=o(486),ee=o(217);const te=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",displayName:"ABAP",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",displayName:"ActionScript",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",displayName:"Ada",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json",displayName:"Apache Conf",samplePath:"apache.sample"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",displayName:"Apex",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",displayName:"APL",samplePath:"apl.sample",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",displayName:"AppleScript",samplePath:"applescript.sample"},{id:"ara",scopeName:"source.ara",path:"ara.tmLanguage.json",displayName:"Ara",samplePath:"ara.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",displayName:"Assembly",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",displayName:"Astro",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","stylus","sass","css","scss","less","postcss","tsx"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",displayName:"AWK",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",displayName:"Ballerina",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",displayName:"Batch",samplePath:"bat.sample",aliases:["batch"]},{id:"beancount",scopeName:"text.beancount",path:"beancount.tmLanguage.json",displayName:"Beancount",samplePath:"beancount.sample"},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",displayName:"Berry",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json",displayName:"BibTeX",samplePath:"bibtex.sample"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",displayName:"Bicep",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",displayName:"Blade",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",displayName:"C",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",displayName:"Cadence",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",displayName:"Clarity",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",displayName:"Clojure",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",displayName:"CMake",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",displayName:"COBOL",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",displayName:"CodeQL",samplePath:"codeql.sample",aliases:["ql"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",displayName:"CoffeeScript",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",displayName:"C++",samplePath:"cpp.sample",aliases:["c++"],embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",displayName:"Crystal",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",displayName:"C#",samplePath:"csharp.sample",aliases:["c#","cs"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",displayName:"CSS",samplePath:"css.sample"},{id:"csv",scopeName:"text.csv",path:"csv.tmLanguage.json",displayName:"csv syntax",samplePath:"csv.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",displayName:"CUE",samplePath:"cue.sample"},{id:"cypher",scopeName:"source.cypher",path:"cypher.tmLanguage.json",displayName:"Cypher",samplePath:"cypher.sample",aliases:["cql"]},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",displayName:"D",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",displayName:"Dart",samplePath:"dart.sample"},{id:"dax",scopeName:"source.dax",path:"dax.tmLanguage.json",displayName:"DAX",samplePath:"dax.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",displayName:"Diff",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",displayName:"Docker",samplePath:"docker.sample",aliases:["dockerfile"]},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json",displayName:"Dream Maker",samplePath:"dream-maker.sample"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",displayName:"Elixir",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",displayName:"Elm",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",displayName:"ERB",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",displayName:"Erlang",samplePath:"erlang.sample",aliases:["erl"]},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",displayName:"Fish",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",displayName:"F#",samplePath:"fsharp.sample",aliases:["f#","fs"],embeddedLangs:["markdown"]},{id:"gdresource",scopeName:"source.gdresource",path:"gdresource.tmLanguage.json",displayName:"GDResource",samplePath:"gdresource.sample",embeddedLangs:["gdshader","gdscript"]},{id:"gdscript",scopeName:"source.gdscript",path:"gdscript.tmLanguage.json",displayName:"GDScript",samplePath:"gdscript.sample"},{id:"gdshader",scopeName:"source.gdshader",path:"gdshader.tmLanguage.json",displayName:"GDShader",samplePath:"gdshader.sample"},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json",displayName:"Gherkin",samplePath:"gherkin.sample"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",displayName:"Git Commit Message",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",displayName:"Git Rebase Message",embeddedLangs:["shellscript"]},{id:"glimmer-js",scopeName:"source.gjs",path:"glimmer-js.tmLanguage.json",displayName:"Glimmer JS",aliases:["gjs"],embeddedLangs:["javascript","handlebars"]},{id:"glimmer-ts",scopeName:"source.gts",path:"glimmer-ts.tmLanguage.json",displayName:"Glimmer TS",aliases:["gts"],embeddedLangs:["typescript","handlebars"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",displayName:"GLSL",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json",displayName:"Gnuplot",samplePath:"gnuplot.sample"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",displayName:"Go",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",displayName:"GraphQL",samplePath:"graphql.sample",aliases:["gql"],embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json",displayName:"Groovy",samplePath:"groovy.sample"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",displayName:"Hack",samplePath:"hack.sample",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",displayName:"Ruby Haml",samplePath:"haml.sample",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",displayName:"Handlebars",samplePath:"handlebars.sample",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json",displayName:"Haskell",samplePath:"haskell.sample",aliases:["hs"]},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json",displayName:"HashiCorp HCL",samplePath:"hcl.sample"},{id:"hjson",scopeName:"source.hjson",path:"hjson.tmLanguage.json",displayName:"Hjson",samplePath:"hjson.sample"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json",displayName:"HLSL",samplePath:"hlsl.sample"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",displayName:"HTML",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"http",scopeName:"source.http",path:"http.tmLanguage.json",displayName:"HTTP",samplePath:"http.sample",embeddedLangs:["shellscript","json","xml","graphql"]},{id:"imba",scopeName:"source.imba",path:"imba.tmLanguage.json",displayName:"Imba",samplePath:"imba.sample"},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json",displayName:"INI",samplePath:"ini.sample",aliases:["properties"]},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",displayName:"Java",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",displayName:"JavaScript",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",displayName:"Jinja",samplePath:"jinja-html.sample",embeddedLangs:["html"]},{id:"jison",scopeName:"source.jison",path:"jison.tmLanguage.json",displayName:"Jison",samplePath:"jison.sample",embeddedLangs:["javascript"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json",displayName:"JSON",samplePath:"json.sample"},{id:"json5",scopeName:"source.json5",path:"json5.tmLanguage.json",displayName:"JSON5",samplePath:"json5.sample"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json",displayName:"JSON with Comments",samplePath:"jsonc.sample"},{id:"jsonl",scopeName:"source.json.lines",path:"jsonl.tmLanguage.json",displayName:"JSON Lines",samplePath:"jsonl.sample"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json",displayName:"Jsonnet",samplePath:"jsonnet.sample"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",displayName:"JSSM",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json",displayName:"JSX",samplePath:"jsx.sample"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",displayName:"Julia",samplePath:"julia.sample",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json",displayName:"Kotlin",samplePath:"kotlin.sample",aliases:["kt","kts"]},{id:"kusto",scopeName:"source.kusto",path:"kusto.tmLanguage.json",displayName:"Kusto",samplePath:"kusto.sample",aliases:["kql"]},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",displayName:"LaTeX",samplePath:"latex.sample",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",displayName:"Less",samplePath:"less.sample"},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",displayName:"Liquid",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json",displayName:"Lisp",samplePath:"lisp.sample"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json",displayName:"Logo",samplePath:"logo.sample"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",displayName:"Lua",samplePath:"lua.sample",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",displayName:"Makefile",samplePath:"make.sample",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",displayName:"Markdown",samplePath:"markdown.sample",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",displayName:"Marko",samplePath:"marko.sample",embeddedLangs:["css","less","scss","javascript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json",displayName:"MATLAB",samplePath:"matlab.sample"},{id:"mdc",scopeName:"text.markdown.mdc",path:"mdc.tmLanguage.json",displayName:"mdc",samplePath:"mdc.sample",embeddedLangs:["markdown","yaml"]},{id:"mdx",scopeName:"source.mdx",path:"mdx.tmLanguage.json",displayName:"MDX",samplePath:"mdx.sample",embeddedLangs:["tsx","toml","yaml","c","clojure","coffee","cpp","csharp","css","diff","docker","elixir","elm","erlang","go","graphql","haskell","html","ini","java","javascript","json","julia","kotlin","less","lua","make","markdown","objective-c","perl","python","r","ruby","rust","scala","scss","shellscript","shellsession","sql","xml","swift","typescript"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json",displayName:"Mermaid",samplePath:"mermaid.sample"},{id:"mojo",scopeName:"source.mojo",path:"mojo.tmLanguage.json",displayName:"MagicPython",samplePath:"mojo.sample"},{id:"narrat",scopeName:"source.narrat",path:"narrat.tmLanguage.json",displayName:"Narrat Language",samplePath:"narrat.sample",aliases:["nar"]},{id:"nextflow",scopeName:"source.nextflow",path:"nextflow.tmLanguage.json",displayName:"Nextflow",samplePath:"nextflow.sample",aliases:["nf"]},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",displayName:"Nginx",samplePath:"nginx.sample",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",displayName:"Nim",samplePath:"nim.sample",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json",displayName:"Nix",samplePath:"nix.sample"},{id:"nushell",scopeName:"source.nushell",path:"nushell.tmLanguage.json",displayName:"nushell",samplePath:"nushell.sample",aliases:["nu"]},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",displayName:"Objective-C",samplePath:"objective-c.sample",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json",displayName:"Objective-C++",samplePath:"objective-cpp.sample"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json",displayName:"OCaml",samplePath:"ocaml.sample"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json",displayName:"Pascal",samplePath:"pascal.sample"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",displayName:"Perl",samplePath:"perl.sample",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",displayName:"PHP",samplePath:"php.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json",displayName:"PL/SQL",samplePath:"plsql.sample"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json",displayName:"PostCSS",samplePath:"postcss.sample"},{id:"powerquery",scopeName:"source.powerquery",path:"powerquery.tmLanguage.json",displayName:"PowerQuery",samplePath:"powerquery.sample"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",displayName:"PowerShell",samplePath:"powershell.sample",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",displayName:"Prisma",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json",displayName:"Prolog",samplePath:"prolog.sample"},{id:"proto",scopeName:"source.proto",path:"proto.tmLanguage.json",displayName:"Protocol Buffer 3",samplePath:"proto.sample"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",displayName:"Pug",samplePath:"pug.sample",aliases:["jade"],embeddedLangs:["javascript","css","sass","scss","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json",displayName:"Puppet",samplePath:"puppet.sample"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json",displayName:"PureScript",samplePath:"purescript.sample"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",displayName:"Python",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json",displayName:"R",samplePath:"r.sample"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",displayName:"Raku",samplePath:"raku.sample",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",displayName:"ASP.NET Razor",samplePath:"razor.sample",embeddedLangs:["html","csharp"]},{id:"reg",scopeName:"source.reg",path:"reg.tmLanguage.json",displayName:"Windows Registry Script",samplePath:"reg.sample"},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",displayName:"Rel",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json",displayName:"RISC-V",samplePath:"riscv.sample"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",displayName:"reStructuredText",samplePath:"rst.sample",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",displayName:"Ruby",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",displayName:"Rust",samplePath:"rust.sample",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",displayName:"SAS",samplePath:"sas.sample",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json",displayName:"Sass",samplePath:"sass.sample"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json",displayName:"Scala",samplePath:"scala.sample"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json",displayName:"Scheme",samplePath:"scheme.sample"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",displayName:"SCSS",samplePath:"scss.sample",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",displayName:"ShaderLab",samplePath:"shaderlab.sample",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",displayName:"Shell",samplePath:"shellscript.sample",aliases:["bash","sh","shell","zsh"]},{id:"shellsession",scopeName:"text.shell-session",path:"shellsession.tmLanguage.json",displayName:"Shell Session",samplePath:"shellsession.sample",aliases:["console"],embeddedLangs:["shellscript"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json",displayName:"Smalltalk",samplePath:"smalltalk.sample"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json",displayName:"Solidity",samplePath:"solidity.sample"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",displayName:"SPARQL",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"splunk",scopeName:"source.splunk_search",path:"splunk.tmLanguage.json",displayName:"Splunk Query Language",samplePath:"splunk.sample",aliases:["spl"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json",displayName:"SQL",samplePath:"sql.sample"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json",displayName:"SSH Config",samplePath:"ssh-config.sample"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",displayName:"Stata",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",displayName:"Stylus",samplePath:"stylus.sample",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",displayName:"Svelte",samplePath:"svelte.sample",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json",displayName:"Swift",samplePath:"swift.sample"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json",displayName:"SystemVerilog",samplePath:"system-verilog.sample"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",displayName:"Tasl",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json",displayName:"Tcl",samplePath:"tcl.sample"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",displayName:"TeX",samplePath:"tex.sample",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json",displayName:"TOML",samplePath:"toml.sample"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",displayName:"TSX",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",displayName:"Turtle",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",displayName:"Twig",samplePath:"twig.sample",embeddedLangs:["css","javascript","scss","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",displayName:"TypeScript",samplePath:"typescript.sample",aliases:["ts"]},{id:"v",scopeName:"source.v",path:"v.tmLanguage.json",displayName:"V",samplePath:"v.sample"},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",displayName:"Visual Basic",samplePath:"vb.sample",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json",displayName:"Verilog",samplePath:"verilog.sample"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json",displayName:"VHDL",samplePath:"vhdl.sample"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",displayName:"Vim Script",samplePath:"viml.sample",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",displayName:"Vue HTML",samplePath:"vue-html.sample",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",displayName:"Vue",samplePath:"vue.sample",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql"]},{id:"vyper",scopeName:"source.vyper",path:"vyper.tmLanguage.json",displayName:"Vyper",samplePath:"vyper.sample",aliases:["vy"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json",displayName:"WebAssembly",samplePath:"wasm.sample"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",displayName:"Wenyan",samplePath:"wenyan.sample",aliases:["文言"]},{id:"wgsl",scopeName:"source.wgsl",path:"wgsl.tmLanguage.json",displayName:"WGSL",samplePath:"wgsl.sample"},{id:"wolfram",scopeName:"source.wolfram",path:"wolfram.tmLanguage.json",displayName:"Wolfram",samplePath:"wolfram.sample",aliases:["wl"]},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",displayName:"XML",samplePath:"xml.sample",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",displayName:"XSL",samplePath:"xsl.sample",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json",displayName:"YAML",samplePath:"yaml.sample",aliases:["yml"]},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",displayName:"ZenScript",samplePath:"zenscript.sample"},{id:"zig",scopeName:"source.zig",path:"zig.tmLanguage.json",displayName:"zig",samplePath:"zig.sample"}];var ne,se,re,ae,oe=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(oe||{});class ie{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t}static printMetadata(e){let t=ie.getLanguageId(e),n=ie.getTokenType(e),s=ie.getFontStyle(e),r=ie.getForeground(e),a=ie.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:s,foreground:r,background:a})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>15}static getBackground(e){return(4286578688&e)>>>24}static containsBalancedBrackets(e){return!!(1024&e)}static set(e,t,n,s,r,a){let o=ie.getLanguageId(e),i=ie.getTokenType(e),l=ie.getFontStyle(e),c=ie.getForeground(e),u=ie.getBackground(e);return 0!==t&&(o=t),0!==n&&(i=8===n?0:n),-1!==s&&(l=s),0!==r&&(c=r),0!==a&&(u=a),(o|i<<8|l<<11|(ie.containsBalancedBrackets(e)?1:0)<<10|c<<15|u<<24)>>>0}}function le(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function ce(e){return e.startsWith("./")?e.slice(2):e}function ue(e){const t=e.split(/[\/\\]/g);return t.slice(0,t.length-1)}function pe(...e){return e.map(le).map(ce).join("/")}function de(e){return 32===e||9===e}function he(e){return 10===e||13===e}function me(e){return e>=48&&e<=57}!function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(ne||(ne={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(se||(se={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(re||(re={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(ae||(ae={}));const ge=function(e,t=[],n=se.DEFAULT){let s=null,r=[];const a=[];function o(e){Array.isArray(r)?r.push(e):null!==s&&(r[s]=e)}return function(e,t,n=se.DEFAULT){const s=function(e,t=!1){const n=e.length;let s=0,r="",a=0,o=16,i=0,l=0,c=0,u=0,p=0;function d(t,n){let r=0,a=0;for(;r<t||!n;){let t=e.charCodeAt(s);if(t>=48&&t<=57)a=16*a+t-48;else if(t>=65&&t<=70)a=16*a+t-65+10;else{if(!(t>=97&&t<=102))break;a=16*a+t-97+10}s++,r++}return r<t&&(a=-1),a}function h(){if(r="",p=0,a=s,l=i,u=c,s>=n)return a=n,o=17;let t=e.charCodeAt(s);if(de(t)){do{s++,r+=String.fromCharCode(t),t=e.charCodeAt(s)}while(de(t));return o=15}if(he(t))return s++,r+=String.fromCharCode(t),13===t&&10===e.charCodeAt(s)&&(s++,r+="\n"),i++,c=s,o=14;switch(t){case 123:return s++,o=1;case 125:return s++,o=2;case 91:return s++,o=3;case 93:return s++,o=4;case 58:return s++,o=6;case 44:return s++,o=5;case 34:return s++,r=function(){let t="",r=s;for(;;){if(s>=n){t+=e.substring(r,s),p=2;break}const a=e.charCodeAt(s);if(34===a){t+=e.substring(r,s),s++;break}if(92!==a){if(a>=0&&a<=31){if(he(a)){t+=e.substring(r,s),p=2;break}p=6}s++}else{if(t+=e.substring(r,s),s++,s>=n){p=2;break}switch(e.charCodeAt(s++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=d(4,!0);e>=0?t+=String.fromCharCode(e):p=4;break;default:p=5}r=s}}return t}(),o=10;case 47:const l=s-1;if(47===e.charCodeAt(s+1)){for(s+=2;s<n&&!he(e.charCodeAt(s));)s++;return r=e.substring(l,s),o=12}if(42===e.charCodeAt(s+1)){s+=2;const t=n-1;let a=!1;for(;s<t;){const t=e.charCodeAt(s);if(42===t&&47===e.charCodeAt(s+1)){s+=2,a=!0;break}s++,he(t)&&(13===t&&10===e.charCodeAt(s)&&s++,i++,c=s)}return a||(s++,p=1),r=e.substring(l,s),o=13}return r+=String.fromCharCode(t),s++,o=16;case 45:if(r+=String.fromCharCode(t),s++,s===n||!me(e.charCodeAt(s)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=function(){let t=s;if(48===e.charCodeAt(s))s++;else for(s++;s<e.length&&me(e.charCodeAt(s));)s++;if(s<e.length&&46===e.charCodeAt(s)){if(s++,!(s<e.length&&me(e.charCodeAt(s))))return p=3,e.substring(t,s);for(s++;s<e.length&&me(e.charCodeAt(s));)s++}let n=s;if(s<e.length&&(69===e.charCodeAt(s)||101===e.charCodeAt(s)))if(s++,(s<e.length&&43===e.charCodeAt(s)||45===e.charCodeAt(s))&&s++,s<e.length&&me(e.charCodeAt(s))){for(s++;s<e.length&&me(e.charCodeAt(s));)s++;n=s}else p=3;return e.substring(t,n)}(),o=11;default:for(;s<n&&m(t);)s++,t=e.charCodeAt(s);if(a!==s){switch(r=e.substring(a,s),r){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return r+=String.fromCharCode(t),s++,o=16}}function m(e){if(de(e)||he(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){s=e,r="",a=0,o=16,p=0},getPosition:()=>s,scan:t?function(){let e;do{e=h()}while(e>=12&&e<=15);return e}:h,getToken:()=>o,getTokenValue:()=>r,getTokenOffset:()=>a,getTokenLength:()=>s-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-u,getTokenError:()=>p}}(e,!1),r=[];function a(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function o(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>r.slice())):()=>!0}function i(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>r.slice())):()=>!0}const c=o(t.onObjectBegin),u=l(t.onObjectProperty),p=a(t.onObjectEnd),d=o(t.onArrayBegin),h=a(t.onArrayEnd),m=l(t.onLiteralValue),g=i(t.onSeparator),f=a(t.onComment),y=i(t.onError),_=n&&n.disallowComments,b=n&&n.allowTrailingComma;function v(){for(;;){const e=s.scan();switch(s.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:_||w(11);break;case 2:w(12);break;case 6:w(16)}switch(e){case 12:case 13:_?w(10):f();break;case 16:w(1);break;case 15:case 14:break;default:return e}}}function w(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=s.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){v();break}if(-1!==n.indexOf(e))break;e=v()}}}function k(e){const t=s.getTokenValue();return e?m(t):(u(t),r.push(t)),v(),!0}function S(){switch(s.getToken()){case 3:return function(){d(),v();let e=!0,t=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(t||w(4,[],[]),g(","),v(),4===s.getToken()&&b)break}else t&&w(6,[],[]);e?(r.push(0),e=!1):r[r.length-1]++,S()||w(4,[],[4,5]),t=!0}return h(),e||r.pop(),4!==s.getToken()?w(8,[4],[]):v(),!0}();case 1:return function(){c(),v();let e=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(e||w(4,[],[]),g(","),v(),2===s.getToken()&&b)break}else e&&w(6,[],[]);(10!==s.getToken()?(w(3,[],[2,5]),!1):(k(!1),6===s.getToken()?(g(":"),v(),S()||w(4,[],[2,5])):w(5,[],[2,5]),r.pop(),!0))||w(4,[],[2,5]),e=!0}return p(),2!==s.getToken()?w(7,[2],[]):v(),!0}();case 10:return k(!0);default:return function(){switch(s.getToken()){case 11:const e=s.getTokenValue();let t=Number(e);isNaN(t)&&(w(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return v(),!0}()}}v(),17===s.getToken()?!!n.allowEmptyContent||w(4,[],[]):S()?17!==s.getToken()&&w(9,[],[]):w(4,[],[])}(e,{onObjectBegin:()=>{const e={};o(e),a.push(r),r=e,s=null},onObjectProperty:e=>{s=e},onObjectEnd:()=>{r=a.pop()},onArrayBegin:()=>{const e=[];o(e),a.push(r),r=e,s=null},onArrayEnd:()=>{r=a.pop()},onLiteralValue:o,onError:(e,n,s)=>{t.push({error:e,offset:n,length:s})}},n),r[0]};var fe;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(fe||(fe={}));const ye="undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,_e="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"node"===process.release.name,be="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"bun"===process.release.name,ve=ye||!_e&&!be;let we="",ke="";let Se=null;function Ne(e){if(ve)return`${we}${e}`;{const t=o(485);return t.isAbsolute(e)?e:t.resolve("/","..",e)}}async function xe(e){const t=[],n=await async function(e){const t=Ne(e);if(ve)return await fetch(t).then((e=>e.text()));{const e=o(673);return await e.promises.readFile(t,"utf-8")}}(e);let s;try{s=JSON.parse(n)}catch(e){if(s=ge(n,t,{allowTrailingComma:!0}),t.length)throw t[0]}return s}async function je(e){const t=Pe(await xe(e));if(t.include){const n=await je(pe(...ue(e),t.include));n.settings&&(t.settings=n.settings.concat(t.settings)),n.bg&&!t.bg&&(t.bg=n.bg),n.colors&&(t.colors={...n.colors,...t.colors}),delete t.include}return t}function Pe(e){const t=e.type||"dark",n={name:e.name,type:t,...e,...Te(e)};var s;return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors,delete n.tokenColors),(s=n).settings||(s.settings=[]),s.settings[0]&&s.settings[0].settings&&!s.settings[0].scope||s.settings.unshift({settings:{foreground:s.fg,background:s.bg}}),n}const Ce={light:"#333333",dark:"#bbbbbb"},Le={light:"#fffffe",dark:"#1e1e1e"};function Te(e){let t,n,s=e.settings?e.settings:e.tokenColors;const r=s?s.find((e=>!e.name&&!e.scope)):void 0;return r?.settings?.foreground&&(t=r.settings.foreground),r?.settings?.background&&(n=r.settings.background),!t&&e?.colors?.["editor.foreground"]&&(t=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),t||(t="light"===e.type?Ce.light:Ce.dark),n||(n="light"===e.type?Le.light:Le.dark),{fg:t,bg:n}}class Ae{constructor(e,t){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=e,this._onigLibName=t}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(e){return this.languageMap[e]}async loadGrammar(e){const t=this.scopeToLangMap[e];if(!t)return null;if(t.grammar)return t.grammar;const n=await async function(e){return await xe(e)}(te.includes(t)?`${this.languagesPath}${t.path}`:t.path);return t.grammar=n,n}addLanguage(e){this.languageMap[e.id]=e,e.aliases&&e.aliases.forEach((t=>{this.languageMap[t]=e})),this.scopeToLangMap[e.scopeName]=e}}function Ee(e,t){let n=[];for(let s=0,r=t.length;s<r;s++){let r=t.slice(0,s),a=t[s];n[s]={scopeName:a,themeMatches:Ie(e,a,r)}}return n}function Oe(e,t){let n=e+".";return e===t||t.substring(0,n.length)===n}function Re(e,t,n,s){if(!Oe(e,n))return!1;let r=t.length-1,a=s.length-1;for(;r>=0&&a>=0;)Oe(t[r],s[a])&&r--,a--;return-1===r}function Ie(e,t,n){let s=[],r=0;for(let a=0,o=e.settings.length;a<o;a++){let o,i=e.settings[a];if("string"==typeof i.scope)o=i.scope.split(/,/).map((e=>e.trim()));else{if(!Array.isArray(i.scope))continue;o=i.scope}for(let e=0,a=o.length;e<a;e++){let l=o[e].split(/ /);Re(l[l.length-1],l.slice(0,l.length-1),t,n)&&(s[r++]=i,e=a)}}return s}var Be=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Me={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function De(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function Ge(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map((e=>Number.parseInt(e)));if(3!==t.length||t.some((e=>Number.isNaN(e))))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function Fe(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(0===s)t.push({type:"resetAll"});else if(s<=9)Me[s]&&t.push({type:"setDecoration",value:Me[s]});else if(s<=29){const e=Me[s-20];e&&t.push({type:"resetDecoration",value:e})}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Be[s-30]}});else if(38===s){const n=Ge(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===s)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Be[s-40]}});else if(48===s){const n=Ge(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===s?t.push({type:"resetBackgroundColor"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Be[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Be[s-100+8]}})}return t}var $e={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function We(e=$e){function t(t){return e[t]}function n(e){return`#${e.map((e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0"))).join("")}`}let s;return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return r=e.index,function(){if(s)return s;s=[];for(let e=0;e<Be.length;e++)s.push(t(Be[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let r=0;r<6;r++)for(let a=0;a<6;a++)s.push(n([e[t],e[r],e[a]]));let r=8;for(let e=0;e<24;e++,r+=10)s.push(n([r,r,r]));return s}()[r]}var r}}}const Ue={pre:({className:e,style:t,children:n})=>`<pre class="${e}" style="${t}" tabindex="0">${n}</pre>`,code:({children:e})=>`<code>${e}</code>`,line:({className:e,children:t})=>`<span class="${e}">${t}</span>`,token:({style:e,children:t})=>`<span style="${e}">${t}</span>`};function Ve(e,t={}){const n=t.bg||"#fff",s=function(e){const t=new Map;for(const n of e){const e=n.line;t.has(e)?t.get(e).push(n):t.set(e,[n])}return t}(t.lineOptions??[]),r=t.elements||{};function a(e="",t={},n){const s=r[e]||Ue[e];return s?(n=n.filter(Boolean),s({...t,children:"code"===e?n.join("\n"):n.join("")})):""}return a("pre",{className:"shiki "+(t.themeName||""),style:`background-color: ${n}`},[t.langId?`<div class="language-id">${t.langId}</div>`:"",a("code",{},e.map(((n,r)=>{const o=r+1;return a("line",{className:function(e){const t=new Set(["line"]);for(const n of e)for(const e of n.classes??[])t.add(e);return Array.from(t)}(s.get(o)??[]).join(" "),lines:e,line:n,index:r},n.map(((e,s)=>{const r=[`color: ${e.color||t.fg}`];return e.fontStyle&oe.Italic&&r.push("font-style: italic"),e.fontStyle&oe.Bold&&r.push("font-weight: bold"),e.fontStyle&oe.Underline&&r.push("text-decoration: underline"),a("token",{style:r.join("; "),tokens:n,token:e,index:s},[(o=e.content,o.replace(/[&<>"']/g,(e=>ze[e])))]);var o})))})))])}const ze={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};class qe extends ee.Registry{constructor(e){super(e),this._resolver=e,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={},this._langGraph=new Map,this._langMap=te.reduce(((e,t)=>(e[t.id]=t,e)),{})}getTheme(e){return"string"==typeof e?this._resolvedThemes[e]:e}async loadTheme(e){return"string"==typeof e?(this._resolvedThemes[e]||(this._resolvedThemes[e]=await je(`${this.themesPath}${e}.json`)),this._resolvedThemes[e]):((e=Pe(e)).name&&(this._resolvedThemes[e.name]=e),e)}async loadThemes(e){return await Promise.all(e.map((e=>this.loadTheme(e))))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(e){return this._resolvedGrammars[e]}async loadLanguage(e){const t=e.embeddedLangs?.reduce((async(e,t,n)=>{if(!this.getLoadedLanguages().includes(t)&&this._resolver.getLangRegistration(t))return await this._resolver.loadGrammar(this._resolver.getLangRegistration(t).scopeName),e[this._resolver.getLangRegistration(t).scopeName]=n+2,e}),{}),n={embeddedLanguages:t,balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]},s=await this.loadGrammarWithConfiguration(e.scopeName,1,n);this._resolvedGrammars[e.id]=s,e.aliases&&e.aliases.forEach((e=>{this._resolvedGrammars[e]=s}))}async loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.values());for(const e of t)this._resolver.addLanguage(e);for(const e of t)await this.loadLanguage(e)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}resolveEmbeddedLanguages(e){if(this._langGraph.has(e.id)||this._langGraph.set(e.id,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}function He(e){return"string"==typeof e?te.find((t=>t.id===e||t.aliases?.includes(e))):e}async function Ke(e){const{_languages:t,_themes:n,_wasmPath:s}=function(e){let t=te,n=e.themes||[],s=e.paths?.wasm?e.paths.wasm.endsWith("/")?e.paths.wasm:e.paths.wasm+"/":"dist/";return e.langs&&(t=e.langs.map(He)),e.theme&&n.unshift(e.theme),n.length||(n=["nord"]),{_languages:t,_themes:n,_wasmPath:s}}(e),r=new Ae(async function(e){if(!Se){let t;if(ve)t="string"==typeof ke?(0,Z.loadWASM)({data:await fetch(Ne(pe(...ue(e),"onig.wasm")))}):(0,Z.loadWASM)({data:ke});else{const e=o(485).join(486,"../onig.wasm"),n=o(673).readFileSync(e).buffer;t=(0,Z.loadWASM)(n)}Se=t.then((()=>({createOnigScanner:e=>(0,Z.createOnigScanner)(e),createOnigString:e=>(0,Z.createOnigString)(e)})))}return Se}(s),"vscode-oniguruma"),a=new qe(r);e.paths?.themes&&(a.themesPath=e.paths.themes.endsWith("/")?e.paths.themes:e.paths.themes+"/"),e.paths?.languages&&(r.languagesPath=e.paths.languages.endsWith("/")?e.paths.languages:e.paths.languages+"/");const i=(await a.loadThemes(n))[0];let l;await a.loadLanguages(t);let c=function(){const e={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};for(let t=0;t<Be.length;t++){const n=`#A${t.toString().padStart(5,"0")}`,s=Be[t].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e[n]=`var(--shiki-color-ansi-${s})`}return e}();function u(e){const t=e?a.getTheme(e):i;if(!t)throw Error(`No theme registration for ${e}`);l&&l.name===t.name||(a.setTheme(t),l=t);const n=a.getColorMap();return"css"===t.type&&function(e,t){e.bg=c[e.bg]||e.bg,e.fg=c[e.fg]||e.fg,Object.entries(e.colors).forEach((([t,n])=>{e.colors[t]=c[n]||n})),t.forEach(((e,n)=>{t[n]=c[e]||e}))}(t,n),{_theme:t,_colorMap:n}}function p(e,t="text",n,s={includeExplanation:!0}){if(function(e){return!e||["plaintext","txt","text"].includes(e)}(t))return[...e.split(/\r\n|\r|\n/).map((e=>[{content:e}]))];const{_grammar:r}=function(e){const t=a.getGrammar(e);if(!t)throw Error(`No language registration for ${e}`);return{_grammar:t}}(t),{_theme:o,_colorMap:i}=u(n);return function(e,t,n,s,r){let a=n.split(/\r\n|\r|\n/),o=ee.INITIAL,i=[],l=[];for(let n=0,c=a.length;n<c;n++){let c,u,p,d=a[n];if(""===d){i=[],l.push([]);continue}r.includeExplanation&&(c=s.tokenizeLine(d,o),u=c.tokens,p=0);let h=s.tokenizeLine2(d,o),m=h.tokens.length/2;for(let n=0;n<m;n++){let s=h.tokens[2*n],a=n+1<m?h.tokens[2*n+2]:d.length;if(s===a)continue;let o=h.tokens[2*n+1],l=t[ie.getForeground(o)],c=ie.getFontStyle(o),g=[];if(r.includeExplanation){let t=0;for(;s+t<a;){let n=u[p],s=d.substring(n.startIndex,n.endIndex);t+=s.length,g.push({content:s,scopes:Ee(e,n.scopes)}),p++}}i.push({content:d.substring(s,a),color:l,fontStyle:c,explanation:g})}l.push(i),i=[],o=h.ruleStack}return l}(o,i,e,r,s)}function d(e,t){const{_theme:n}=u(t);return function(e,t){const n=t.split(/\r?\n/),s=We(Object.fromEntries(Be.map((t=>[t,e.colors[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]])))),r=function(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let a=0;do{const o=De(s,a),i=o.sequence?s.substring(a,o.startPosition):s.substring(a);if(i.length>0&&r.push({value:i,foreground:e,background:t,decorations:new Set(n)}),o.sequence){const s=Fe(o.sequence);for(const r of s)"resetAll"===r.type?(e=null,t=null,n.clear()):"resetForegroundColor"===r.type?e=null:"resetBackgroundColor"===r.type?t=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of s)"setForegroundColor"===r.type?e=r.value:"setBackgroundColor"===r.type?t=r.value:"setDecoration"===r.type&&n.add(r.value)}a=o.position}while(a<s.length);return r}}}();return n.map((t=>r.parse(t).map((t=>{let n;n=t.decorations.has("reverse")?t.background?s.value(t.background):e.bg:t.foreground?s.value(t.foreground):e.fg,t.decorations.has("dim")&&(n=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map((e=>`${e}${e}`)).join("")}80`}const n=e.match(/var\((--shiki-color-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(n));let r=oe.None;return t.decorations.has("bold")&&(r|=oe.Bold),t.decorations.has("italic")&&(r|=oe.Italic),t.decorations.has("underline")&&(r|=oe.Underline),{content:t.value,color:n,fontStyle:r}}))))}(n,e)}return{codeToThemedTokens:p,codeToHtml:function(e,t="text",n){let s;s="object"==typeof t?t:{lang:t,theme:n};const r=p(e,s.lang,s.theme,{includeExplanation:!1}),{_theme:a}=u(s.theme);return Ve(r,{fg:a.fg,bg:a.bg,lineOptions:s?.lineOptions,themeName:a.name})},ansiToThemedTokens:d,ansiToHtml:function(e,t){const n=d(e,t?.theme),{_theme:s}=u(t?.theme);return Ve(n,{fg:s.fg,bg:s.bg,lineOptions:t?.lineOptions,themeName:s.name})},getTheme:e=>u(e)._theme,loadTheme:async function(e){await a.loadTheme(e)},loadLanguage:async function(e){const t=He(e);r.addLanguage(t),await a.loadLanguage(t)},getBackgroundColor:function(e){const{_theme:t}=u(e);return t.bg},getForegroundColor:function(e){const{_theme:t}=u(e);return t.fg},getLoadedThemes:function(){return a.getLoadedThemes()},getLoadedLanguages:function(){return a.getLoadedLanguages()},setColorReplacements:function(e){c=e}}}var Je=o(888),Xe=Object.prototype.hasOwnProperty;const Qe=new WeakMap,Ye=()=>{},Ze=Ye(),et=Object,tt=e=>e===Ze,nt=e=>"function"==typeof e,st=(e,t)=>({...e,...t}),rt=e=>nt(e.then),at={},ot={},it="undefined",lt=typeof window!=it,ct=typeof document!=it,ut=lt&&"Deno"in window,pt=(e,t)=>{const n=Qe.get(e);return[()=>!tt(t)&&e.get(t)||at,s=>{if(!tt(t)){const r=e.get(t);t in ot||(ot[t]=r),n[5](t,st(r,s),r||at)}},n[6],()=>!tt(t)&&t in ot?ot[t]:!tt(t)&&e.get(t)||at]};let dt=!0;const[ht,mt]=lt&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ye,Ye],gt={isOnline:()=>dt,isVisible:()=>{const e=ct&&document.visibilityState;return tt(e)||"hidden"!==e}},ft={initFocus:e=>(ct&&document.addEventListener("visibilitychange",e),ht("focus",e),()=>{ct&&document.removeEventListener("visibilitychange",e),mt("focus",e)}),initReconnect:e=>{const t=()=>{dt=!0,e()},n=()=>{dt=!1};return ht("online",t),ht("offline",n),()=>{mt("online",t),mt("offline",n)}}},yt=!R.useId,_t=!lt||ut,bt=_t?R.useEffect:R.useLayoutEffect,vt="undefined"!=typeof navigator&&navigator.connection,wt=!_t&&vt&&(["slow-2g","2g"].includes(vt.effectiveType)||vt.saveData),kt=new WeakMap,St=(e,t)=>e===`[object ${t}]`;let Nt=0;const xt=e=>{const t=typeof e,n=(s=e,et.prototype.toString.call(s));var s;const r=St(n,"Date"),a=St(n,"RegExp"),o=St(n,"Object");let i,l;if(et(e)!==e||r||a)i=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(i=kt.get(e),i)return i;if(i=++Nt+"~",kt.set(e,i),Array.isArray(e)){for(i="@",l=0;l<e.length;l++)i+=xt(e[l])+",";kt.set(e,i)}if(o){i="#";const t=et.keys(e).sort();for(;!tt(l=t.pop());)tt(e[l])||(i+=l+":"+xt(e[l])+",");kt.set(e,i)}}return i},jt=e=>{if(nt(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?xt(e):"",t]};let Pt=0;const Ct=()=>++Pt;async function Lt(...e){const[t,n,s,r]=e,a=st({populateCache:!0,throwOnError:!0},"boolean"==typeof r?{revalidate:r}:r||{});let o=a.populateCache;const i=a.rollbackOnError;let l=a.optimisticData;const c=a.throwOnError;if(nt(n)){const e=n,s=[],r=t.keys();for(const n of r)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&s.push(n);return Promise.all(s.map(u))}return u(n);async function u(n){const[r]=jt(n);if(!r)return;const[u,p]=pt(t,r),[d,h,m,g]=Qe.get(t),f=()=>{const e=d[r];return(nt(a.revalidate)?a.revalidate(u().data,n):!1!==a.revalidate)&&(delete m[r],delete g[r],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return f();let y,_=s,b=!1;const v=Ct();h[r]=[v,0];const w=!tt(l),k=u(),S=k.data,N=k._c,x=tt(N)?S:N;if(w&&(l=nt(l)?l(x,S):l,p({data:l,_c:x})),nt(_))try{_=_(x)}catch(e){y=e,b=!0}if(_&&rt(_)){if(_=await _.catch((e=>{y=e,b=!0})),v!==h[r][0]){if(b)throw y;return _}b&&w&&(e=>"function"==typeof i?i(e):!1!==i)(y)&&(o=!0,p({data:x,_c:Ze}))}if(o&&!b)if(nt(o)){const e=o(_,x);p({data:e,error:Ze,_c:Ze})}else p({data:_,error:Ze,_c:Ze});if(h[r][1]=Ct(),Promise.resolve(f()).then((()=>{p({_c:Ze})})),!b)return _;if(c)throw y}}const Tt=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},At=(e,t)=>{if(!Qe.has(e)){const n=st(ft,t),s=Object.create(null),r=Lt.bind(Ze,e);let a=Ye;const o=Object.create(null),i=(e,t)=>{const n=o[e]||[];return o[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,s)=>{e.set(t,n);const r=o[t];if(r)for(const e of r)e(n,s)},c=()=>{if(!Qe.has(e)&&(Qe.set(e,[s,Object.create(null),Object.create(null),Object.create(null),r,l,i]),!_t)){const t=n.initFocus(setTimeout.bind(Ze,Tt.bind(Ze,s,0))),r=n.initReconnect(setTimeout.bind(Ze,Tt.bind(Ze,s,1)));a=()=>{t&&t(),r&&r(),Qe.delete(e)}}};return c(),[e,r,c,a]}return[e,Qe.get(e)[4]]},[Et,Ot]=At(new Map),Rt=st({onLoadingSlow:Ye,onSuccess:Ye,onError:Ye,onErrorRetry:(e,__,t,n,s)=>{const r=t.errorRetryCount,a=s.retryCount,o=~~((Math.random()+.5)*(1<<(a<8?a:8)))*t.errorRetryInterval;!tt(r)&&a>r||setTimeout(n,o,s)},onDiscarded:Ye,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:wt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:wt?5e3:3e3,compare:function e(t,n){var s,r;if(t===n)return!0;if(t&&n&&(s=t.constructor)===n.constructor){if(s===Date)return t.getTime()===n.getTime();if(s===RegExp)return t.toString()===n.toString();if(s===Array){if((r=t.length)===n.length)for(;r--&&e(t[r],n[r]););return-1===r}if(!s||"object"==typeof t){for(s in r=0,t){if(Xe.call(t,s)&&++r&&!Xe.call(n,s))return!1;if(!(s in n)||!e(t[s],n[s]))return!1}return Object.keys(n).length===r}}return t!=t&&n!=n},isPaused:()=>!1,cache:Et,mutate:Ot,fallback:{}},gt),It=(e,t)=>{const n=st(e,t);if(t){const{use:s,fallback:r}=e,{use:a,fallback:o}=t;s&&a&&(n.use=s.concat(a)),r&&o&&(n.fallback=st(r,o))}return n},Bt=(0,R.createContext)({}),Mt=lt&&window.__SWR_DEVTOOLS_USE__,Dt=Mt?window.__SWR_DEVTOOLS_USE__:[],Gt=e=>nt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Ft=Dt.concat((e=>(t,n,s)=>e(t,n&&((...e)=>{const[s]=jt(t),[,,,r]=Qe.get(Et);if(s.startsWith("$inf$"))return n(...e);const a=r[s];return tt(a)?n(...e):(delete r[s],a)}),s)));Mt&&(window.__SWR_DEVTOOLS_REACT__=R);const $t=()=>{};$t(),new WeakMap;const Wt=R.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e}}),Ut={dedupe:!0},Vt=Promise.resolve(Ze),zt=()=>Ye,qt=(et.defineProperty((e=>{const{value:t}=e,n=(0,R.useContext)(Bt),s=nt(t),r=(0,R.useMemo)((()=>s?t(n):t),[s,n,t]),a=(0,R.useMemo)((()=>s?r:It(n,r)),[s,n,r]),o=r&&r.provider,i=(0,R.useRef)(Ze);o&&!i.current&&(i.current=At(o(a.cache||Et),r));const l=i.current;return l&&(a.cache=l[0],a.mutate=l[1]),bt((()=>{if(l)return l[2]&&l[2](),l[3]}),[]),(0,R.createElement)(Bt.Provider,st(e,{value:a}))}),"defaultValue",{value:Rt}),Ht=(e,t,n)=>{const{cache:s,compare:r,suspense:a,fallbackData:o,revalidateOnMount:i,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:p,keepPreviousData:d,strictServerPrefetchWarning:h}=n,[m,g,f,y]=Qe.get(s),[_,b]=jt(e),v=(0,R.useRef)(!1),w=(0,R.useRef)(!1),k=(0,R.useRef)(_),S=(0,R.useRef)(t),N=(0,R.useRef)(n),x=()=>N.current,j=()=>x().isVisible()&&x().isOnline(),[P,C,L,T]=pt(s,_),A=(0,R.useRef)({}).current,E=tt(o)?tt(n.fallback)?Ze:n.fallback[_]:o,O=(e,t)=>{for(const n in A){const s=n;if("data"===s){if(!r(e[s],t[s])){if(!tt(e[s]))return!1;if(!r(U,t[s]))return!1}}else if(t[s]!==e[s])return!1}return!0},I=!v.current,B=(0,R.useMemo)((()=>{const e=P(),n=T(),s=e=>{const n=st(e);delete n._k;const s=(()=>{if(!_)return!1;if(!t)return!1;if(x().isPaused())return!1;if(I&&!tt(i))return i;const e=tt(E)?n.data:E;return tt(e)||l})();return s?{isValidating:!0,isLoading:!0,...n}:n},r=s(e),a=e===n?r:s(n);let o=r;return[()=>{const e=s(P());return O(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]}),[s,_]),M=(0,Je.useSyncExternalStore)((0,R.useCallback)((e=>L(_,((t,n)=>{O(n,t)||e()}))),[s,_]),B[0],B[1]),D=m[_]&&m[_].length>0,G=M.data,F=tt(G)?E&&rt(E)?Wt(E):E:G,$=M.error,W=(0,R.useRef)(F),U=d?tt(G)?tt(W.current)?F:W.current:G:F,V=_&&tt(F),z=(0,R.useRef)(null);!_t&&(0,Je.useSyncExternalStore)(zt,(()=>(z.current=!1,z)),(()=>(z.current=!0,z)));const q=z.current;h&&q&&!a&&V&&console.warn(`Missing pre-initiated data for serialized key "${_}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const H=!(!_||!t)&&!x().isPaused()&&!(D&&!tt($))&&(I&&!tt(i)?i:a?!tt(F)&&l:tt(F)||l),K=I&&H,J=tt(M.isValidating)?K:M.isValidating,X=tt(M.isLoading)?K:M.isLoading,Q=(0,R.useCallback)((async e=>{const t=S.current;if(!_||!t||w.current||x().isPaused())return!1;let s,a,o=!0;const i=e||{},l=!f[_]||!i.dedupe,c=()=>yt?!w.current&&_===k.current&&v.current:_===k.current,u={isValidating:!1,isLoading:!1},p=()=>{C(u)},d=()=>{const e=f[_];e&&e[1]===a&&delete f[_]},h={isValidating:!0};tt(P().data)&&(h.isLoading=!0);try{if(l&&(C(h),n.loadingTimeout&&tt(P().data)&&setTimeout((()=>{o&&c()&&x().onLoadingSlow(_,n)}),n.loadingTimeout),f[_]=[t(b),Ct()]),[s,a]=f[_],s=await s,l&&setTimeout(d,n.dedupingInterval),!f[_]||f[_][1]!==a)return l&&c()&&x().onDiscarded(_),!1;u.error=Ze;const e=g[_];if(!tt(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return p(),l&&c()&&x().onDiscarded(_),!1;const i=P().data;u.data=r(i,s)?i:s,l&&c()&&x().onSuccess(s,_,n)}catch(e){d();const t=x(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,_,t),(!0===n||nt(n)&&n(e))&&(x().revalidateOnFocus&&x().revalidateOnReconnect&&!j()||t.onErrorRetry(e,_,t,(e=>{const t=m[_];t&&t[0]&&t[0](3,e)}),{retryCount:(i.retryCount||0)+1,dedupe:!0}))))}return o=!1,p(),!0}),[_,s]),Y=(0,R.useCallback)(((...e)=>Lt(s,k.current,...e)),[]);if(bt((()=>{S.current=t,N.current=n,tt(G)||(W.current=G)})),bt((()=>{if(!_)return;const e=Q.bind(Ze,Ut);let t=0;if(x().revalidateOnFocus){const e=Date.now();t=e+x().focusThrottleInterval}const n=((e,t,n)=>{const s=t[e]||(t[e]=[]);return s.push(n),()=>{const e=s.indexOf(n);e>=0&&(s[e]=s[s.length-1],s.pop())}})(_,m,((n,s={})=>{if(0==n){const n=Date.now();x().revalidateOnFocus&&n>t&&j()&&(t=n+x().focusThrottleInterval,e())}else if(1==n)x().revalidateOnReconnect&&j()&&e();else{if(2==n)return Q();if(3==n)return Q(s)}}));return w.current=!1,k.current=_,v.current=!0,C({_k:b}),H&&(f[_]||(tt(F)||_t?e():(s=e,lt&&typeof window.requestAnimationFrame!=it?window.requestAnimationFrame(s):setTimeout(s,1)))),()=>{w.current=!0,n()};var s}),[_]),bt((()=>{let e;function t(){const t=nt(c)?c(P().data):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){P().error||!u&&!x().isVisible()||!p&&!x().isOnline()?t():Q(Ut).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[c,u,p,_]),(0,R.useDebugValue)(U),a){if(!yt&&_t&&V)throw new Error("Fallback data is required when using Suspense in SSR.");V&&(S.current=t,N.current=n,w.current=!1);const e=y[_],s=!tt(e)&&V?Y(e):Vt;if(Wt(s),!tt($)&&V)throw $;const r=V?Q(Ut):Vt;!tt(U)&&V&&(r.status="fulfilled",r.value=!0),Wt(r)}return{mutate:Y,get data(){return A.data=!0,U},get error(){return A.error=!0,$},get isValidating(){return A.isValidating=!0,J},get isLoading(){return A.isLoading=!0,X}}},function(...e){const t=(()=>{const e=(0,R.useContext)(Bt);return(0,R.useMemo)((()=>st(Rt,e)),[e])})(),[n,s,r]=Gt(e),a=It(t,r);let o=Ht;const{use:i}=a,l=(i||[]).concat(Ft);for(let e=l.length;e--;)o=l[e](o);return o(n,s||a.fetcher||null,a)});var Ht;const Kt=((e,t)=>(...n)=>{const[s,r,a]=Gt(n),o=(a.use||[]).concat(t);return e(s,r,{...a,use:o})})(qt,(e=>(t,n,s)=>(s.revalidateOnFocus=!1,s.revalidateIfStale=!1,s.revalidateOnReconnect=!1,s.refreshInterval=0,e(t,n,s)))),Jt=({theme:e,lang:t,ready:n})=>{if(!n)throw new Error;return Ke({langs:[t],theme:e})};let Xt=!1;const Qt=({theme:e,lang:t,ready:n=!0})=>{const[s,r]=(0,T.useState)(!1);var a;Xt||(Xt=!0,a=window.patternCss?.pluginUrl+"build/shiki/",we=a.endsWith("/")?a:a+"/");const{data:o,error:i}=Kt({theme:e,lang:t,ready:n&&s},Jt);return(0,T.useEffect)((()=>{const e=window.patternCss?.pluginUrl+"build/shiki/";fetch(e+"dist/onig.wasm").then((e=>e.arrayBuffer())).then((e=>{ke=e,r(!0)}))}),[]),{highlighter:o,error:i,loading:!o&&!i||!s}},Yt=window.ReactJSXRuntime,Zt=(0,T.forwardRef)(((e,t)=>{const n=(0,T.useRef)(null),{value:s,onChange:r,onFocus:a,onBlur:o,lineOptions:i=[],...l}=e,{highlighter:c,error:u,loading:p}=Qt({theme:"light-plus",lang:"css"});return p?(0,Yt.jsx)("div",{className:"flex h-full min-h-52 items-center justify-center p-4 text-gray-900",children:"Loading..."}):u?(0,Yt.jsx)("p",{children:u.message}):(0,Yt.jsx)("div",{ref:n,className:"",children:(0,Yt.jsx)(Y(),{ref:t,value:(0,X.decodeEntities)(s),className:"h-full font-jetbrains-mono",onValueChange:r,...l,padding:{top:6,bottom:6,left:8,right:8},style:{minHeight:300,backgroundColor:"none",color:c?.getForegroundColor()??"#000"},onKeyDown:e=>"Tab"===e.key&&n.current?.querySelector("textarea")?.focus(),onFocus:a,onBlur:o,highlight:e=>c?.codeToHtml((0,X.decodeEntities)(e),{lang:"css",lineOptions:i})?.replace(/<\/?[pre|code][^>]*>/g,"")})})})),en=({handleChange:e,popoutOpen:t,setPopoutOpen:n,globalEditorOpen:s,setGlobalEditorOpen:r,editorWrapperRef:a})=>{const[o,i]=(0,T.useState)(!1),{getSelectedBlockClientId:l}=(0,C.useSelect)((e=>e(j.store)),[]),{toggleBlockHighlight:c}=(0,C.useDispatch)(j.store),u=l();return(0,T.useEffect)((()=>{const e=setTimeout((()=>{c(u,!1).then((()=>{i(!1)}))}),1e3);return()=>{clearTimeout(e),o&&c(u,!1)}}),[o,c,u]),(0,Yt.jsxs)("div",{className:"flex justify-between border border-t-0 border-solid border-gray-600 text-xs text-gray-900",children:[s?(0,Yt.jsx)("div",{}):(0,Yt.jsx)(P.Tooltip,{text:(0,A.__)("Open Global Styles Editor","pattern-css"),children:(0,Yt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>r(!0),className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
     1(()=>{var e,t,n,s,r={69:function(e,t,n){"use strict";var s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},i=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var l=o(n(609)),c="undefined"!=typeof window&&"navigator"in window&&/Win/i.test(navigator.platform),u="undefined"!=typeof window&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),p="npm__react-simple-code-editor__textarea",d="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(p,":empty {\n  -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n  /**\n    * IE doesn't support '-webkit-text-fill-color'\n    * So we use 'color: transparent' to make the text transparent on IE\n    * Unlike other browsers, it doesn't affect caret color in IE\n    */\n  .").concat(p," {\n    color: transparent !important;\n  }\n\n  .").concat(p,"::selection {\n    background-color: #accef7 !important;\n    color: transparent !important;\n  }\n}\n"),h=l.forwardRef((function(e,t){var n=e.autoFocus,r=e.disabled,a=e.form,o=e.highlight,h=e.ignoreTabKey,g=void 0!==h&&h,f=e.insertSpaces,y=void 0===f||f,_=e.maxLength,b=e.minLength,v=e.name,w=e.onBlur,k=e.onClick,S=e.onFocus,N=e.onKeyDown,x=e.onKeyUp,j=e.onValueChange,P=e.padding,C=void 0===P?0:P,L=e.placeholder,T=e.preClassName,A=e.readOnly,E=e.required,O=e.style,R=e.tabSize,I=void 0===R?2:R,B=e.textareaClassName,M=e.textareaId,D=e.value,G=i(e,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),F=l.useRef({stack:[],offset:-1}),$=l.useRef(null),W=l.useState(!0),U=W[0],V=W[1],z={paddingTop:"object"==typeof C?C.top:C,paddingRight:"object"==typeof C?C.right:C,paddingBottom:"object"==typeof C?C.bottom:C,paddingLeft:"object"==typeof C?C.left:C},q=o(D),H=function(e,t){return e.substring(0,t).split("\n")},K=l.useCallback((function(e,t){var n,r,a;void 0===t&&(t=!1);var o=F.current,i=o.stack,l=o.offset;if(i.length&&l>-1){F.current.stack=i.slice(0,l+1);var c=F.current.stack.length;if(c>100){var u=c-100;F.current.stack=i.slice(u,c),F.current.offset=Math.max(F.current.offset-u,0)}}var p=Date.now();if(t){var d=F.current.stack[F.current.offset];if(d&&p-d.timestamp<3e3){var h=/[^a-z0-9]([a-z0-9]+)$/i,m=null===(n=H(d.value,d.selectionStart).pop())||void 0===n?void 0:n.match(h),g=null===(r=H(e.value,e.selectionStart).pop())||void 0===r?void 0:r.match(h);if((null==m?void 0:m[1])&&(null===(a=null==g?void 0:g[1])||void 0===a?void 0:a.startsWith(m[1])))return void(F.current.stack[F.current.offset]=s(s({},e),{timestamp:p}))}}F.current.stack.push(s(s({},e),{timestamp:p})),F.current.offset++}),[]),J=l.useCallback((function(){var e=$.current;if(e){var t=e.value,n=e.selectionStart,s=e.selectionEnd;K({value:t,selectionStart:n,selectionEnd:s})}}),[K]),X=function(e){var t=$.current;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,null==j||j(e.value))},Q=function(e){var t=$.current,n=F.current.stack[F.current.offset];n&&t&&(F.current.stack[F.current.offset]=s(s({},n),{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),K(e),X(e)};return l.useEffect((function(){J()}),[J]),l.useImperativeHandle(t,(function(){return{get session(){return{history:F.current}},set session(e){F.current=e.history}}}),[]),l.createElement("div",s({},G,{style:s(s({},m.container),O)}),l.createElement("pre",s({className:T,"aria-hidden":"true",style:s(s(s({},m.editor),m.highlight),z)},"string"==typeof q?{dangerouslySetInnerHTML:{__html:q+"<br />"}}:{children:q})),l.createElement("textarea",{ref:function(e){return $.current=e},style:s(s(s({},m.editor),m.textarea),z),className:p+(B?" ".concat(B):""),id:M,value:D,onChange:function(e){var t=e.currentTarget,n=t.value,s=t.selectionStart,r=t.selectionEnd;K({value:n,selectionStart:s,selectionEnd:r},!0),j(n)},onKeyDown:function(e){if(!N||(N(e),!e.defaultPrevented)){"Escape"===e.key&&e.currentTarget.blur();var t=e.currentTarget,n=t.value,s=t.selectionStart,r=t.selectionEnd,a=(y?" ":"\t").repeat(I);if("Tab"===e.key&&!g&&U)if(e.preventDefault(),e.shiftKey){var o=(d=H(n,s)).length-1,i=H(n,r).length-1,l=n.split("\n").map((function(e,t){return t>=o&&t<=i&&e.startsWith(a)?e.substring(a.length):e})).join("\n");if(n!==l){var p=d[o];Q({value:l,selectionStart:(null==p?void 0:p.startsWith(a))?s-a.length:s,selectionEnd:r-(n.length-l.length)})}}else if(s!==r){var d,h=(d=H(n,s)).length-1,m=H(n,r).length-1;p=d[h],Q({value:n.split("\n").map((function(e,t){return t>=h&&t<=m?a+e:e})).join("\n"),selectionStart:p&&/\S/.test(p)?s+a.length:s,selectionEnd:r+a.length*(m-h+1)})}else{var f=s+a.length;Q({value:n.substring(0,s)+a+n.substring(r),selectionStart:f,selectionEnd:f})}else if("Backspace"===e.key){var _=s!==r;n.substring(0,s).endsWith(a)&&!_&&(e.preventDefault(),f=s-a.length,Q({value:n.substring(0,s-a.length)+n.substring(r),selectionStart:f,selectionEnd:f}))}else if("Enter"===e.key){if(s===r){var b=H(n,s).pop(),v=null==b?void 0:b.match(/^\s+/);if(null==v?void 0:v[0]){e.preventDefault();var w="\n"+v[0];f=s+w.length,Q({value:n.substring(0,s)+w+n.substring(r),selectionStart:f,selectionEnd:f})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var k=void 0;57===e.keyCode&&e.shiftKey?k=["(",")"]:219===e.keyCode?k=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?k=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(k=["`","`"]),s!==r&&k&&(e.preventDefault(),Q({value:n.substring(0,s)+k[0]+n.substring(s,r)+k[1]+n.substring(r),selectionStart:s,selectionEnd:r+2}))}else!(u?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(u?e.metaKey&&90===e.keyCode&&e.shiftKey:c?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),function(){var e=F.current,t=e.stack,n=e.offset,s=t[n+1];s&&(X(s),F.current.offset=Math.min(n+1,t.length-1))}()):77!==e.keyCode||!e.ctrlKey||u&&!e.shiftKey||(e.preventDefault(),V((function(e){return!e}))):(e.preventDefault(),function(){var e=F.current,t=e.stack,n=e.offset,s=t[n-1];s&&(X(s),F.current.offset=Math.max(n-1,0))}())}},onClick:k,onKeyUp:x,onFocus:S,onBlur:w,disabled:r,form:a,maxLength:_,minLength:b,name:v,placeholder:L,readOnly:A,required:E,autoFocus:n,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("style",{dangerouslySetInnerHTML:{__html:d}}))})),m={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};t.default=h},493:(e,t,n)=>{"use strict";var s=n(609),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=s.useState,o=s.useEffect,i=s.useLayoutEffect,l=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),s=a({inst:{value:n,getSnapshot:t}}),r=s[0].inst,u=s[1];return i((function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})}),[e,n,t]),o((function(){return c(r)&&u({inst:r}),e((function(){c(r)&&u({inst:r})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:u},888:(e,t,n)=>{"use strict";e.exports=n(493)},486:function(e){var t;t=()=>{return e={770:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;const r=s(n(418));let a=null,o=!1;class i{static _utf8ByteLength(e){let t=0;for(let n=0,s=e.length;n<s;n++){const r=e.charCodeAt(n);let a=r,o=!1;if(r>=55296&&r<=56319&&n+1<s){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=65536+(r-55296<<10)|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}constructor(e){const t=e.length,n=i._utf8ByteLength(e),s=n!==t,r=s?new Uint32Array(t+1):null;s&&(r[t]=n);const a=s?new Uint32Array(n+1):null;s&&(a[n]=t);const o=new Uint8Array(n);let l=0;for(let n=0;n<t;n++){const i=e.charCodeAt(n);let c=i,u=!1;if(i>=55296&&i<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(i-55296<<10)|t-56320,u=!0)}s&&(r[n]=l,u&&(r[n+1]=l),c<=127?a[l+0]=n:c<=2047?(a[l+0]=n,a[l+1]=n):c<=65535?(a[l+0]=n,a[l+1]=n,a[l+2]=n):(a[l+0]=n,a[l+1]=n,a[l+2]=n,a[l+3]=n)),c<=127?o[l++]=c:c<=2047?(o[l++]=192|(1984&c)>>>6,o[l++]=128|(63&c)>>>0):c<=65535?(o[l++]=224|(61440&c)>>>12,o[l++]=128|(4032&c)>>>6,o[l++]=128|(63&c)>>>0):(o[l++]=240|(1835008&c)>>>18,o[l++]=128|(258048&c)>>>12,o[l++]=128|(4032&c)>>>6,o[l++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=a}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class l{constructor(e){if(this.id=++l.LAST_ID,!a)throw new Error("Must invoke loadWASM first.");this._onigBinding=a,this.content=e;const t=new i(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!l._sharedPtrInUse?(l._sharedPtr||(l._sharedPtr=a._omalloc(1e4)),l._sharedPtrInUse=!0,a.HEAPU8.set(t.utf8Value,l._sharedPtr),this.ptr=l._sharedPtr):this.ptr=t.createString(a)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===l._sharedPtr?l._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=l,l.LAST_ID=0,l._sharedPtr=0,l._sharedPtrInUse=!1;class c{constructor(e){if(!a)throw new Error("Must invoke loadWASM first.");const t=[],n=[];for(let s=0,r=e.length;s<r;s++){const r=new i(e[s]);t[s]=r.createString(a),n[s]=r.utf8Length}const s=a._omalloc(4*e.length);a.HEAPU32.set(t,s/4);const r=a._omalloc(4*e.length);a.HEAPU32.set(n,r/4);const o=a._createOnigScanner(s,r,e.length);for(let n=0,s=e.length;n<s;n++)a._ofree(t[n]);a._ofree(r),a._ofree(s),0===o&&function(e){throw new Error(e.UTF8ToString(e._getLastOnigError()))}(a),this._onigBinding=a,this._ptr=o}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let s=o,r=0;if("number"==typeof n?(8&n&&(s=!0),r=n):"boolean"==typeof n&&(s=n),"string"==typeof e){e=new l(e);const n=this._findNextMatchSync(e,t,s,r);return e.dispose(),n}return this._findNextMatchSync(e,t,s,r)}_findNextMatchSync(e,t,n,s){const r=this._onigBinding;let a;if(a=n?r._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),s):r._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),s),0===a)return null;const o=r.HEAPU32;let i=a/4;const l=o[i++],c=o[i++];let u=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(o[i++]),s=e.convertUtf8OffsetToUtf16(o[i++]);u[t]={start:n,end:s,length:s-n}}return{index:l,captureIndices:u}}}t.OnigScanner=c;let u=!1,p=null;t.loadWASM=function(e){if(u)return p;let t,n,s,o;if(u=!0,function(e){return"function"==typeof e.instantiator}(e))t=e.instantiator,n=e.print;else{let s;!function(e){return void 0!==e.data}(e)?s=e:(s=e.data,n=e.print),t=function(e){return"undefined"!=typeof Response&&e instanceof Response}(s)?"function"==typeof WebAssembly.instantiateStreaming?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(s):function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(s):function(e){return t=>WebAssembly.instantiate(e,t)}(s)}return p=new Promise(((e,t)=>{s=e,o=t})),function(e,t,n,s){(0,r.default)({print:t,instantiateWasm:(t,n)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),s),{}}}).then((e=>{a=e,n()}))}(t,n,s,o),p},t.createOnigString=function(e){return new l(e)},t.createOnigScanner=function(e){return new c(e)},t.setDefaultDebugCall=function(e){o=e}},418:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n,s=void 0!==(e=e||{})?e:{};s.ready=new Promise((function(e,s){t=e,n=s}));var r,a=Object.assign({},s),o=[];r=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),function(e){e||C(void 0)}("object"==typeof t),t)},"undefined"!=typeof scriptArgs?o=scriptArgs:void 0!==arguments&&(o=arguments),"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var i,l,c=s.print||console.log.bind(console),u=s.printErr||console.warn.bind(console);Object.assign(s,a),a=null,s.arguments&&(o=s.arguments),s.thisProgram&&s.thisProgram,s.quit&&s.quit,s.wasmBinary&&(i=s.wasmBinary),s.noExitRuntime,"object"!=typeof WebAssembly&&C("no native wasm support detected");var p,d,h,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,n){for(var s=t+n,r=t;e[r]&&!(r>=s);)++r;if(r-t>16&&e.buffer&&g)return g.decode(e.subarray(t,r));for(var a="";t<r;){var o=e[t++];if(128&o){var i=63&e[t++];if(192!=(224&o)){var l=63&e[t++];if((o=224==(240&o)?(15&o)<<12|i<<6|l:(7&o)<<18|i<<12|l<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var c=o-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|i)}else a+=String.fromCharCode(o)}return a}function y(e){p=e,s.HEAP8=new Int8Array(e),s.HEAP16=new Int16Array(e),s.HEAP32=new Int32Array(e),s.HEAPU8=d=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAPU32=h=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e)}s.INITIAL_MEMORY;var _=[],b=[],v=[];function w(e){_.unshift(e)}function k(e){v.unshift(e)}var S,N,x=0,j=null,P=null;function C(e){s.onAbort&&s.onAbort(e),u(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function L(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){try{if(e==S&&i)return new Uint8Array(i);if(r)return r(e);throw"both async and sync fetching of the wasm failed"}catch(e){C(e)}}function A(e){for(;e.length>0;)e.shift()(s)}function E(e){try{return l.grow(e-p.byteLength+65535>>>16),y(l.buffer),1}catch(e){}}L(S="onig.wasm")||(S=function(e){return s.locateFile?s.locateFile(e,""):""+e}(S)),N="undefined"!=typeof dateNow?dateNow:()=>performance.now();var O=[null,[],[]];function R(e,t){var n=O[e];0===t||10===t?((1===e?c:u)(f(n,0)),n.length=0):n.push(t)}var I,B={emscripten_get_now:N,emscripten_memcpy_big:function(e,t,n){d.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n=d.length,s=2147483648;if((e>>>=0)>s)return!1;for(var r=1;r<=4;r*=2){var a=n*(1+.2/r);if(a=Math.min(a,e+100663296),E(Math.min(s,(t=Math.max(e,a))+(65536-t%65536)%65536)))return!0}return!1},fd_write:function(e,t,n,s){for(var r=0,a=0;a<n;a++){var o=h[t>>2],i=h[t+4>>2];t+=8;for(var l=0;l<i;l++)R(e,d[o+l]);r+=i}return h[s>>2]=r,0}};function M(e){function n(){I||(I=!0,s.calledRun=!0,m||(A(b),t(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),function(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)k(s.postRun.shift());A(v)}()))}e=e||o,x>0||(function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)w(s.preRun.shift());A(_)}(),x>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),n()}),1)):n()))}if(function(){var e={env:B,wasi_snapshot_preview1:B};function t(e,t){var n=e.exports;s.asm=n,y((l=s.asm.memory).buffer),s.asm.__indirect_function_table,function(e){b.unshift(e)}(s.asm.__wasm_call_ctors),function(){if(x--,s.monitorRunDependencies&&s.monitorRunDependencies(x),0==x&&(null!==j&&(clearInterval(j),j=null),P)){var e=P;P=null,e()}}()}function r(e){t(e.instance)}function a(t){return Promise.resolve().then((function(){return T(S)})).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){u("failed to asynchronously prepare wasm: "+e),C(e)}))}if(x++,s.monitorRunDependencies&&s.monitorRunDependencies(x),s.instantiateWasm)try{return s.instantiateWasm(e,t)}catch(e){u("Module.instantiateWasm callback failed with error: "+e),n(e)}(i||"function"!=typeof WebAssembly.instantiateStreaming||L(S)||"function"!=typeof fetch?a(r):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),a(r)}))}))).catch(n)}(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.__wasm_call_ctors).apply(null,arguments)},s.___errno_location=function(){return(s.___errno_location=s.asm.__errno_location).apply(null,arguments)},s._omalloc=function(){return(s._omalloc=s.asm.omalloc).apply(null,arguments)},s._ofree=function(){return(s._ofree=s.asm.ofree).apply(null,arguments)},s._getLastOnigError=function(){return(s._getLastOnigError=s.asm.getLastOnigError).apply(null,arguments)},s._createOnigScanner=function(){return(s._createOnigScanner=s.asm.createOnigScanner).apply(null,arguments)},s._freeOnigScanner=function(){return(s._freeOnigScanner=s.asm.freeOnigScanner).apply(null,arguments)},s._findNextOnigScannerMatch=function(){return(s._findNextOnigScannerMatch=s.asm.findNextOnigScannerMatch).apply(null,arguments)},s._findNextOnigScannerMatchDbg=function(){return(s._findNextOnigScannerMatchDbg=s.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},s.stackSave=function(){return(s.stackSave=s.asm.stackSave).apply(null,arguments)},s.stackRestore=function(){return(s.stackRestore=s.asm.stackRestore).apply(null,arguments)},s.stackAlloc=function(){return(s.stackAlloc=s.asm.stackAlloc).apply(null,arguments)},s.dynCall_jiji=function(){return(s.dynCall_jiji=s.asm.dynCall_jiji).apply(null,arguments)},s.UTF8ToString=function(e,t){return e?f(d,e,t):""},P=function e(){I||M(),I||(P=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return M(),e.ready});e.exports=t}},t={},function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s].call(a.exports,a,a.exports,n),a.exports}(770);var e,t},e.exports=t()},217:function(e){e.exports=(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},36:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=void 0,(n=t.EncodedTokenAttributes||(t.EncodedTokenAttributes={})).toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},n.print=function(e){const t=n.getLanguageId(e),s=n.getTokenType(e),r=n.getFontStyle(e),a=n.getForeground(e),o=n.getBackground(e);console.log({languageId:t,tokenType:s,fontStyle:r,foreground:a,background:o})},n.getLanguageId=function(e){return(255&e)>>>0},n.getTokenType=function(e){return(768&e)>>>8},n.containsBalancedBrackets=function(e){return!!(1024&e)},n.getFontStyle=function(e){return(30720&e)>>>11},n.getForeground=function(e){return(16744448&e)>>>15},n.getBackground=function(e){return(4278190080&e)>>>24},n.set=function(e,t,s,r,a,o,i){let l=n.getLanguageId(e),c=n.getTokenType(e),u=n.containsBalancedBrackets(e)?1:0,p=n.getFontStyle(e),d=n.getForeground(e),h=n.getBackground(e);return 0!==t&&(l=t),8!==s&&(c=s),null!==r&&(u=r?1:0),-1!==a&&(p=a),0!==o&&(d=o),0!==i&&(h=i),(l|c<<8|u<<10|p<<11|d<<15|h<<24)>>>0},t.toOptionalTokenType=function(e){return e}},996:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;const s=n(878);class r{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=r;class a{constructor(e,t){this._getBasicScopeAttributes=new s.CachedFn((e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new r(t,n)})),this._defaultAttributes=new r(e,8),this._embeddedLanguagesMatcher=new o(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?a._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(a.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}t.BasicScopeAttributesProvider=a,a._NULL_SCOPE_METADATA=new r(0,0),a.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class o{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>s.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},947:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LineTokens=t.BalancedBracketSelectors=t.StateStack=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;const s=n(350),r=n(36),a=n(736),o=n(44),i=n(792),l=n(583),c=n(878),u=n(996),p=n(47);function d(e,t,n,s,r){const o=a.createMatchers(t,h),l=i.RuleFactory.getCompiledRuleId(n,s,r.repository);for(const n of o)e.push({debugSelector:t,matcher:n.matcher,ruleId:l,grammar:r,priority:n.priority})}function h(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let s=n;s<t.length;s++)if(m(t[s],e))return n=s+1,!0;return!1}))}function m(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}t.createGrammar=function(e,t,n,s,r,a,o,i){return new g(e,t,n,s,r,a,o,i)};class g{constructor(e,t,n,s,r,o,i,l){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=f(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const e of Object.keys(r)){const t=a.createMatchers(e,h);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:r[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){const s=n.injections;if(s)for(let t in s)d(e,t,s[t],this,n);const r=this._grammarRepository.injections(t);r&&r.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&d(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),s.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(`  - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,n=e(i.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[i.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=f(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){let a;if(-1===this._rootId&&(this._rootId=i.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==_.NULL)a=!1,t.reset();else{a=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),s=r.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let i;i=o?y.createRootAndLookUpScopeName(o,s,this):y.createRoot("unknown",s),t=new _(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const l=this.createOnigString(e),c=l.content.length,u=new b(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),d=p._tokenizeString(this,l,a,0,t,u,!0,s);return o.disposeOnigString(l),{lineLength:c,lineTokens:u,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}}function f(e,t){return(e=c.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=g;class y{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static createRoot(e,t){return new y(null,new l.ScopeStack(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const s=n.getMetadataForScope(e),r=new l.ScopeStack(null,e),a=n.themeProvider.themeMatch(r),o=y.mergeAttributes(t,s,a);return new y(null,r,o)}get scopeName(){return this.scopePath.scopeName}equals(e){return y._equals(this,e)}static _equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let s=-1,a=0,o=0;return null!==n&&(s=n.fontStyle,a=n.foregroundId,o=n.backgroundId),r.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,s,a,o)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return y._pushAttributed(this,e,t);const n=e.split(/ /g);let s=this;for(const e of n)s=y._pushAttributed(s,e,t);return s}static _pushAttributed(e,t,n){const s=n.getMetadataForScope(t),r=e.scopePath.push(t),a=n.themeProvider.themeMatch(r),o=y.mergeAttributes(e.tokenAttributes,s,a);return new y(e,r,o)}getScopeNames(){return this.scopePath.getSegments()}}t.AttributedScopeStack=y;class _{constructor(e,t,n,s,r,a,o,i){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=i,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=s}equals(e){return null!==e&&_._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){_._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,s,r,a,o){return new _(this,e,t,n,s,r,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new _(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}}t.StateStack=_,_.NULL=new _(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):a.createMatchers(e,h).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>a.createMatchers(e,h).map((e=>e.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class b{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,s.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e.tokenAttributes,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e.getScopeNames();for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=r.EncodedTokenAttributes.set(n,0,r.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(t))}if(a&&(n=r.EncodedTokenAttributes.set(n,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(s.DebugFlags.InDebugMode){const n=e.getScopeNames();console.log("  token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log("      * "+n[e])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}const n=e.getScopeNames();if(s.DebugFlags.InDebugMode){console.log("  token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log("      * "+n[e])}this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=b},965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;const s=n(878);class r{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=r;class a{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=a;class o{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function i(e,t,n,s){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof r?c({baseGrammar:o,selfGrammar:a},s):l(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},s);const i=n.injections(e.scopeName);if(i)for(const e of i)s.add(new r(e))}function l(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function c(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(const o of e){if(n.visitedRule.has(o))continue;n.visitedRule.add(o);const e=o.repository?s.mergeObjects({},t.repository,o.repository):t.repository;Array.isArray(o.patterns)&&u(o.patterns,{...t,repository:e},n);const i=o.include;if(!i)continue;const p=f(i);switch(p.kind){case 0:c({...t,selfGrammar:t.baseGrammar},n);break;case 1:c(t,n);break;case 2:l(p.ruleName,{...t,repository:e},n);break;case 3:case 4:const s=p.scopeName===t.selfGrammar.scopeName?t.selfGrammar:p.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===p.kind?l(p.ruleName,r,n):c(r,n)}else 4===p.kind?n.add(new a(p.scopeName,p.ruleName)):n.add(new r(p.scopeName))}}}t.ExternalReferenceCollector=o,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new r(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new o;for(const n of e)i(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof r){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class p{constructor(){this.kind=0}}t.BaseReference=p;class d{constructor(){this.kind=1}}t.SelfReference=d;class h{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=h;class m{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=m;class g{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function f(e){if("$base"===e)return new p;if("$self"===e)return new d;const t=e.indexOf("#");if(-1===t)return new m(e);if(0===t)return new h(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new g(n,s)}}t.TopLevelRepositoryReference=g,t.parseInclude=f},391:function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(947),t)},47:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;const s=n(350),r=n(44),a=n(792),o=n(878);class i{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function l(e,t,n,r,l,p,h,m){const g=t.content.length;let f=!1,y=-1;if(h){const o=function(e,t,n,r,o,i){let l=o.beginRuleCapturedEOL?0:-1;const c=[];for(let t=o;t;t=t.pop()){const n=t.getRule(e);n instanceof a.BeginWhileRule&&c.push({rule:n,stack:t})}for(let p=c.pop();p;p=c.pop()){const{ruleScanner:c,findOptions:h}=u(p.rule,e,p.stack.endRule,n,r===l),m=c.findNextMatchSync(t,r,h);if(s.DebugFlags.InDebugMode&&(console.log("  scanning for while rule"),console.log(c.toString())),!m){s.DebugFlags.InDebugMode&&console.log("  popping "+p.rule.debugName+" - "+p.rule.debugWhileRegExp),o=p.stack.pop();break}if(m.ruleId!==a.whileRuleId){o=p.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(p.stack,m.captureIndices[0].start),d(e,t,n,p.stack,i,p.rule.whileCaptures,m.captureIndices),i.produce(p.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}return{stack:o,linePos:r,anchorPosition:l,isFirstLine:n}}(e,t,n,r,l,p);l=o.stack,r=o.linePos,n=o.isFirstLine,y=o.anchorPosition}const _=Date.now();for(;!f;){if(0!==m&&Date.now()-_>m)return new i(l,!0);b()}return new i(l,!1);function b(){s.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${r}: |${t.content.substr(r).replace(/\n$/,"\\n")}|`));const i=function(e,t,n,r,a,i){const l=function(e,t,n,r,a,i){const l=a.getRule(e),{ruleScanner:u,findOptions:p}=c(l,e,a.endRule,n,r===i);let d=0;s.DebugFlags.InDebugMode&&(d=o.performanceNow());const h=u.findNextMatchSync(t,r,p);if(s.DebugFlags.InDebugMode){const e=o.performanceNow()-d;e>5&&console.warn(`Rule ${l.debugName} (${l.id}) matching took ${e} against '${t}'`),console.log(`  scanning for (linePos: ${r}, anchorPosition: ${i})`),console.log(u.toString()),h&&console.log(`matched rule id: ${h.ruleId} from ${h.captureIndices[0].start} to ${h.captureIndices[0].end}`)}return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}(e,t,n,r,a,i),u=e.getInjections();if(0===u.length)return l;const p=function(e,t,n,r,a,o,i){let l,u=Number.MAX_VALUE,p=null,d=0;const h=o.contentNameScopesList.getScopeNames();for(let o=0,m=e.length;o<m;o++){const m=e[o];if(!m.matcher(h))continue;const g=t.getRule(m.ruleId),{ruleScanner:f,findOptions:y}=c(g,t,null,r,a===i),_=f.findNextMatchSync(n,a,y);if(!_)continue;s.DebugFlags.InDebugMode&&(console.log(`  matched injection: ${m.debugSelector}`),console.log(f.toString()));const b=_.captureIndices[0].start;if(!(b>=u)&&(u=b,p=_.captureIndices,l=_.ruleId,d=m.priority,u===a))break}return p?{priorityMatch:-1===d,captureIndices:p,matchedRuleId:l}:null}(u,e,t,n,r,a,i);if(!p)return l;if(!l)return p;const d=l.captureIndices[0].start,h=p.captureIndices[0].start;return h<d||p.priorityMatch&&h===d?p:l}(e,t,n,r,l,y);if(!i)return s.DebugFlags.InDebugMode&&console.log("  no more matches."),p.produce(l,g),void(f=!0);const u=i.captureIndices,h=i.matchedRuleId,m=!!(u&&u.length>0)&&u[0].end>r;if(h===a.endRuleId){const a=l.getRule(e);s.DebugFlags.InDebugMode&&console.log("  popping "+a.debugName+" - "+a.debugEndRegExp),p.produce(l,u[0].start),l=l.withContentNameScopesList(l.nameScopesList),d(e,t,n,l,p,a.endCaptures,u),p.produce(l,u[0].end);const o=l;if(l=l.parent,y=o.getAnchorPos(),!m&&o.getEnterPos()===r)return s.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),l=o,p.produce(l,g),void(f=!0)}else{const o=e.getRule(h);p.produce(l,u[0].start);const i=l,c=o.getName(t.content,u),_=l.contentNameScopesList.pushAttributed(c,e);if(l=l.push(h,r,y,u[0].end===g,null,_,_),o instanceof a.BeginEndRule){const r=o;s.DebugFlags.InDebugMode&&console.log("  pushing "+r.debugName+" - "+r.debugBeginRegExp),d(e,t,n,l,p,r.beginCaptures,u),p.produce(l,u[0].end),y=u[0].end;const a=r.getContentName(t.content,u),c=_.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),r.endHasBackReferences&&(l=l.withEndRule(r.getEndWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return s.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),p.produce(l,g),void(f=!0)}else if(o instanceof a.BeginWhileRule){const r=o;s.DebugFlags.InDebugMode&&console.log("  pushing "+r.debugName),d(e,t,n,l,p,r.beginCaptures,u),p.produce(l,u[0].end),y=u[0].end;const a=r.getContentName(t.content,u),c=_.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),r.whileHasBackReferences&&(l=l.withEndRule(r.getWhileWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return s.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),p.produce(l,g),void(f=!0)}else{const r=o;if(s.DebugFlags.InDebugMode&&console.log("  matched "+r.debugName+" - "+r.debugMatchRegExp),d(e,t,n,l,p,r.captures,u),p.produce(l,u[0].end),l=l.pop(),!m)return s.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),l=l.safePop(),p.produce(l,g),void(f=!0)}}u[0].end>r&&(r=u[0].end,n=!1)}}function c(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:p(r,a)}:{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function u(e,t,n,r,a){return s.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:p(r,a)}:{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function p(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function d(e,t,n,s,a,o,i){if(0===o.length)return;const c=t.content,u=Math.min(o.length,i.length),p=[],d=i[0].end;for(let t=0;t<u;t++){const u=o[t];if(null===u)continue;const m=i[t];if(0===m.length)continue;if(m.start>d)break;for(;p.length>0&&p[p.length-1].endPos<=m.start;)a.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?a.produceFromScopes(p[p.length-1].scopes,m.start):a.produce(s,m.start),u.retokenizeCapturedWithRuleId){const t=u.getName(c,i),o=s.contentNameScopesList.pushAttributed(t,e),p=u.getContentName(c,i),d=o.pushAttributed(p,e),h=s.push(u.retokenizeCapturedWithRuleId,m.start,-1,!1,null,o,d),g=e.createOnigString(c.substring(0,m.end));l(e,g,n&&0===m.start,m.start,h,a,!1,0),r.disposeOnigString(g);continue}const g=u.getName(c,i);if(null!==g){const t=(p.length>0?p[p.length-1].scopes:s.contentNameScopesList).pushAttributed(g,e);p.push(new h(t,m.end))}}for(;p.length>0;)a.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}t._tokenizeString=l;class h{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=h},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,o){let i=new s(e),l=new r,c=0,u=null,p=[],d=[];function h(){p.push(c),d.push(u)}function m(){c=p.pop(),u=d.pop()}function g(e){n(i,e)}for(;a(i,l);){if(0===c){if(null!==u&&g("too many constructs in root"),3===l.type){u={},o&&(u.$vscodeTextmateLocation=l.toLocation(t)),h(),c=1;continue}if(2===l.type){u=[],h(),c=4;continue}g("unexpected token in root")}if(2===c){if(5===l.type){m();continue}if(7===l.type){c=3;continue}g("expected , or }")}if(1===c||3===c){if(1===c&&5===l.type){m();continue}if(1===l.type){let e=l.value;if(a(i,l)&&6===l.type||g("expected colon"),a(i,l)||g("expected value"),c=2,1===l.type){u[e]=l.value;continue}if(8===l.type){u[e]=null;continue}if(9===l.type){u[e]=!0;continue}if(10===l.type){u[e]=!1;continue}if(11===l.type){u[e]=parseFloat(l.value);continue}if(2===l.type){let t=[];u[e]=t,h(),c=4,u=t;continue}if(3===l.type){let n={};o&&(n.$vscodeTextmateLocation=l.toLocation(t)),u[e]=n,h(),c=1,u=n;continue}}g("unexpected token in dict")}if(5===c){if(4===l.type){m();continue}if(7===l.type){c=6;continue}g("expected , or ]")}if(4===c||6===c){if(4===c&&4===l.type){m();continue}if(c=5,1===l.type){u.push(l.value);continue}if(8===l.type){u.push(null);continue}if(9===l.type){u.push(!0);continue}if(10===l.type){u.push(!1);continue}if(11===l.type){u.push(parseFloat(l.value));continue}if(2===l.type){let e=[];u.push(e),h(),c=4,u=e;continue}if(3===l.type){let e={};o&&(e.$vscodeTextmateLocation=l.toLocation(t)),u.push(e),h(),c=1,u=e;continue}g("unexpected token in array")}g("unknown state")}return 0!==d.length&&g("unclosed constructs"),u};class s{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class r{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function a(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let s,r=e.source,a=e.pos,o=e.len,i=e.line,l=e.char;for(;;){if(a>=o)return!1;if(s=r.charCodeAt(a),32!==s&&9!==s&&13!==s){if(10!==s)break;a++,i++,l=0}else a++,l++}if(t.offset=a,t.line=i,t.char=l,34===s){for(t.type=1,a++,l++;;){if(a>=o)return!1;if(s=r.charCodeAt(a),a++,l++,92!==s){if(34===s)break}else a++,l++}t.value=r.substring(t.offset+1,a-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,s)=>{switch(s){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===s)t.type=2,a++,l++;else if(123===s)t.type=3,a++,l++;else if(93===s)t.type=4,a++,l++;else if(125===s)t.type=5,a++,l++;else if(58===s)t.type=6,a++,l++;else if(44===s)t.type=7,a++,l++;else if(110===s){if(t.type=8,a++,l++,s=r.charCodeAt(a),117!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;a++,l++}else if(116===s){if(t.type=9,a++,l++,s=r.charCodeAt(a),114!==s)return!1;if(a++,l++,s=r.charCodeAt(a),117!==s)return!1;if(a++,l++,s=r.charCodeAt(a),101!==s)return!1;a++,l++}else if(102===s){if(t.type=10,a++,l++,s=r.charCodeAt(a),97!==s)return!1;if(a++,l++,s=r.charCodeAt(a),108!==s)return!1;if(a++,l++,s=r.charCodeAt(a),115!==s)return!1;if(a++,l++,s=r.charCodeAt(a),101!==s)return!1;a++,l++}else for(t.type=11;;){if(a>=o)return!1;if(s=r.charCodeAt(a),!(46===s||s>=48&&s<=57||101===s||69===s||45===s||43===s))break;a++,l++}return t.len=a-t.offset,null===t.value&&(t.value=r.substr(t.offset,t.len)),e.pos=a,e.line=i,e.char=l,!0}},787:function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;const a=n(391),o=n(50),i=n(652),l=n(583),c=n(965);r(n(44),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new i.SyncRegistry(l.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(l.Theme.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new a.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,s,r){const a=new c.ScopeDependencyProcessor(this._syncRegistry,e);for(;a.Q.length>0;)await Promise.all(a.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),a.processQueue();return this._grammarForScopeName(e,t,n,s,r)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,s=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,s)}_grammarForScopeName(e,t=0,n=null,s=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,s,r)}},t.INITIAL=a.StateStack.NULL,t.parseRawGrammar=o.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){const s=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}(e);let a=r.next();for(;null!==a;){let e=0;if(2===a.length&&":"===a.charAt(1)){switch(a.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let t=i();if(s.push({matcher:t,priority:e}),","!==a)break;a=r.next()}return s;function o(){if("-"===a){a=r.next();const e=o();return t=>!!e&&!e(t)}if("("===a){a=r.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===a||","===a);){do{a=r.next()}while("|"===a||","===a);t=i()}return t=>e.some((e=>e(t)))}();return")"===a&&(a=r.next()),e}if(n(a)){const e=[];do{e.push(a),a=r.next()}while(n(a));return n=>t(e,n)}return null}function i(){const e=[];let t=o();for(;t;)e.push(t),t=o();return t=>e.every((e=>e(t)))}}},44:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){"function"==typeof e.dispose&&e.dispose()}},50:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;const s=n(69),r=n(350),a=n(974);t.parseRawGrammar=function(e,t=null){return null!==t&&/\.json$/.test(t)?(n=e,o=t,r.DebugFlags.InDebugMode?a.parseJSON(n,o,!0):JSON.parse(n)):function(e,t){return r.DebugFlags.InDebugMode?s.parseWithLocation(e,t,"$vscodeTextmateLocation"):s.parsePLIST(e)}(e,t);var n,o}},69:(e,t)=>{function n(e,t,n){const s=e.length;let r=0,a=1,o=0;function i(t){if(null===n)r+=t;else for(;t>0;)10===e.charCodeAt(r)?(r++,a++,o=0):(r++,o++),t--}function l(e){null===n?r=e:i(e-r)}function c(){for(;r<s;){let t=e.charCodeAt(r);if(32!==t&&9!==t&&13!==t&&10!==t)break;i(1)}}function u(t){return e.substr(r,t.length)===t&&(i(t.length),!0)}function p(t){let n=e.indexOf(t,r);l(-1!==n?n+t.length:s)}function d(t){let n=e.indexOf(t,r);if(-1!==n){let s=e.substring(r,n);return l(n+t.length),s}{let t=e.substr(r);return l(s),t}}s>0&&65279===e.charCodeAt(0)&&(r=1);let h=0,m=null,g=[],f=[],y=null;function _(e,t){g.push(h),f.push(m),h=e,m=t}function b(){if(0===g.length)return v("illegal state stack");h=g.pop(),m=f.pop()}function v(t){throw new Error("Near offset "+r+": "+t+" ~~~"+e.substr(r,50)+"~~~")}const w=function(){if(null===y)return v("missing <key>");let e={};null!==n&&(e[n]={filename:t,line:a,char:o}),m[y]=e,y=null,_(1,e)},k=function(){if(null===y)return v("missing <key>");let e=[];m[y]=e,y=null,_(2,e)},S=function(){let e={};null!==n&&(e[n]={filename:t,line:a,char:o}),m.push(e),_(1,e)},N=function(){let e=[];m.push(e),_(2,e)};function x(){if(1!==h)return v("unexpected </dict>");b()}function j(){return 1===h||2!==h?v("unexpected </array>"):void b()}function P(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function C(e){if(isNaN(e))return v("cannot parse float");if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function L(e){if(isNaN(e))return v("cannot parse integer");if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function T(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function A(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function E(e){if(1===h){if(null===y)return v("missing <key>");m[y]=e,y=null}else 2===h?m.push(e):m=e}function O(){let e=d(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function R(e){if(e.isClosed)return"";let t=d("</");return p(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return e}))}for(;r<s&&(c(),!(r>=s));){const l=e.charCodeAt(r);if(i(1),60!==l)return v("expected <");if(r>=s)return v("unexpected end of input");const d=e.charCodeAt(r);if(63===d){i(1),p("?>");continue}if(33===d){if(i(1),u("--")){p("--\x3e");continue}p(">");continue}if(47===d){if(i(1),c(),u("plist")){p(">");continue}if(u("dict")){p(">"),x();continue}if(u("array")){p(">"),j();continue}return v("unexpected closed tag")}let g=O();switch(g.name){case"dict":1===h?w():2===h?S():(m={},null!==n&&(m[n]={filename:t,line:a,char:o}),_(1,m)),g.isClosed&&x();continue;case"array":1===h?k():2===h?N():(m=[],_(2,m)),g.isClosed&&j();continue;case"key":I=R(g),1!==h?v("unexpected <key>"):null!==y?v("too many <key>"):y=I;continue;case"string":P(R(g));continue;case"real":C(parseFloat(R(g)));continue;case"integer":L(parseInt(R(g),10));continue;case"date":T(new Date(R(g)));continue;case"data":A(R(g));continue;case"true":R(g),E(!0);continue;case"false":R(g),E(!1);continue}if(!/^plist/.test(g.name))return v("unexpected opened tag "+g.name)}var I;return m}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,s){return n(e,t,s)},t.parsePLIST=function(e){return n(e,null,null)}},652:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;const s=n(391);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}async grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,s.createGrammar(e,o,t,n,r,a,this,await this._onigLibPromise))}return this._grammars.get(e)}}},792:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;const s=n(878),r=n(965),a=/\\(\d+)/,o=/\\(\d+)/g;Symbol("RuleId"),t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class i{constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=s.RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=s.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${s.basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?s.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?s.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=i;class l extends i{constructor(e,t,n,s,r){super(e,t,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,s){throw new Error("Not supported!")}}t.CaptureRule=l;class c extends i{constructor(e,t,n,s,r){super(e,t,n,null),this._match=new m(s,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=c;class u extends i{constructor(e,t,n,s,r){super(e,t,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class p extends i{constructor(e,t,n,s,r,a,o,i,l,c){super(e,t,n,s),this._begin=new m(r,this.id),this.beginCaptures=a,this._end=new m(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}t.BeginEndRule=p;class d extends i{constructor(e,n,s,r,a,o,i,l,c){super(e,n,s,r),this._begin=new m(a,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new m(i,t.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new g,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=d;class h{static createCaptureRule(e,t,n,s,r){return e.registerRule((e=>new l(t,e,n,s,r)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((r=>{if(e.id=r,e.match)return new c(e.$vscodeTextmateLocation,e.id,e.name,e.match,h._compileCaptures(e.captures,t,n));if(void 0===e.begin){e.repository&&(n=s.mergeObjects({},n,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,h._compilePatterns(r,t,n))}return e.while?new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,h._compileCaptures(e.whileCaptures||e.captures,t,n),h._compilePatterns(e.patterns,t,n)):new p(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,h._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,h._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let s=[];if(e){let r=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>r&&(r=e)}for(let e=0;e<=r;e++)s[e]=null;for(const r in e){if("$vscodeTextmateLocation"===r)continue;const a=parseInt(r,10);let o=0;e[r].patterns&&(o=h.getCompiledRuleId(e[r],t,n)),s[a]=h.createCaptureRule(t,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,o)}}return s}static _compilePatterns(e,t,n){let s=[];if(e)for(let a=0,o=e.length;a<o;a++){const o=e[a];let i=-1;if(o.include){const e=r.parseInclude(o.include);switch(e.kind){case 0:case 1:i=h.getCompiledRuleId(n[o.include],t,n);break;case 2:let s=n[e.ruleName];s&&(i=h.getCompiledRuleId(s,t,n));break;case 3:case 4:const r=e.scopeName,a=4===e.kind?e.ruleName:null,l=t.getExternalGrammar(r,n);if(l)if(a){let e=l.repository[a];e&&(i=h.getCompiledRuleId(e,t,l.repository))}else i=h.getCompiledRuleId(l.repository.$self,t,l.repository)}}else i=h.getCompiledRuleId(o,t,n);if(-1!==i){const e=t.getRule(i);let n=!1;if((e instanceof u||e instanceof p||e instanceof d)&&e.hasMissingPatterns&&0===e.patterns.length&&(n=!0),n)continue;s.push(i)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}}t.RuleFactory=h;class m{constructor(e,t){if(e){const t=e.length;let n=0,s=[],r=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(s.push(e.substring(n,a)),s.push("$(?!\\n)(?<!\\n)"),n=a+2):"A"!==t&&"G"!==t||(r=!0),a++}this.hasAnchor=r,0===n?this.source=e:(s.push(e.substring(n,t)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=a.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return o.lastIndex=0,this.source.replace(o,((e,t)=>s.escapeRegExpCharacters(n[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,n,s,r=[],a=[],o=[],i=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,a[e]=n,o[e]=n,i[e]=n,"\\"===n&&e+1<t&&(s=this.source.charAt(e+1),"A"===s?(r[e+1]="￿",a[e+1]="￿",o[e+1]="A",i[e+1]="A"):"G"===s?(r[e+1]="￿",a[e+1]="G",o[e+1]="￿",i[e+1]="G"):(r[e+1]=s,a[e+1]=s,o[e+1]=s,i[e+1]=s),e++);return{A0_G0:r.join(""),A0_G1:a.join(""),A1_G0:o.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=m;class g{constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map((e=>e.source));this._cached=new f(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map((e=>e.resolveAnchors(t,n)));return new f(e,s,this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=g;class f{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push("   - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}}t.CompiledRule=f},583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;const s=n(878);class r{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new s.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(l(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=s.strcmp(e.scope,t.scope);return 0!==n?n:(n=s.strArrCmp(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)}));let n=0,a="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(a=t.foreground),null!==t.background&&(o=t.background)}let l=new u(t),c=new i(n,l.getId(a),l.getId(o)),h=new d(new p(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];h.insert(0,n.scope,n.parentScopes,n.fontStyle,l.getId(n.foreground),l.getId(n.background))}return new r(l,c,h)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(null===t)return!0;let n=0,s=t[n];for(;e;){if(o(e.scopeName,s)){if(n++,n===t.length)return!0;s=t[n]}e=e.parent}return!1}(e.parent,t.parentScopes)));return n?new i(n.fontStyle,n.foreground,n.background):null}}t.Theme=r;class a{constructor(e,t){this.parent=e,this.scopeName=t}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new a(t,e[n]);return t}push(e){return new a(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}}function o(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}t.ScopeStack=a;class i{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}}function l(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,a=t.length;e<a;e++){let a,o=t[e];if(!o.settings)continue;if("string"==typeof o.scope){let e=o.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),a=e.split(",")}else a=Array.isArray(o.scope)?o.scope:[""];let i=-1;if("string"==typeof o.settings.fontStyle){i=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}let l=null;"string"==typeof o.settings.foreground&&s.isValidHexColor(o.settings.foreground)&&(l=o.settings.foreground);let u=null;"string"==typeof o.settings.background&&s.isValidHexColor(o.settings.background)&&(u=o.settings.background);for(let t=0,s=a.length;t<s;t++){let s=a[t].trim().split(" "),o=s[s.length-1],p=null;s.length>1&&(p=s.slice(0,s.length-1),p.reverse()),n[r++]=new c(o,p,e,i,l,u)}}return n}t.StyleAttributes=i,t.parseTheme=l;class c{constructor(e,t,n,s,r,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=a}}t.ParsedThemeRule=c,t.fontStyleToString=function(e){if(-1===e)return"not set";let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),""===t&&(t="none"),t.trim()};class u{constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}}t.ColorMap=u;class p{constructor(e,t,n,s,r){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=s,this.background=r}clone(){return new p(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==s&&(this.background=s)}}t.ThemeTrieElementRule=p;class d{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const n=e.parentScopes,s=t.parentScopes;let r=null===n?0:n.length,a=null===s?0:s.length;if(r===a)for(let e=0;e<r;e++){const t=n[e].length,r=s[e].length;if(t!==r)return r-t}return a-r}return t.scopeDepth-e.scopeDepth}match(e){if(""===e)return d._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));let t,n,s=e.indexOf(".");return-1===s?(t=e,n=""):(t=e.substring(0,s),n=e.substring(s+1)),this._children.hasOwnProperty(t)?this._children[t].match(n):d._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))}insert(e,t,n,s,r,a){if(""===t)return void this._doInsertHere(e,n,s,r,a);let o,i,l,c=t.indexOf(".");-1===c?(o=t,i=""):(o=t.substring(0,c),i=t.substring(c+1)),this._children.hasOwnProperty(o)?l=this._children[o]:(l=new d(this._mainRule.clone(),p.cloneArr(this._rulesWithParentScopes)),this._children[o]=l),l.insert(e+1,i,n,s,r,a)}_doInsertHere(e,t,n,r,a){if(null!==t){for(let o=0,i=this._rulesWithParentScopes.length;o<i;o++){let i=this._rulesWithParentScopes[o];if(0===s.strArrCmp(i.parentScopes,t))return void i.acceptOverwrite(e,n,r,a)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===a&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new p(e,t,n,r,a))}else this._mainRule.acceptOverwrite(e,n,r,a)}}t.ThemeTrieElement=d},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s<r;s++)t[s]=n(e[s]);return t}(e):"object"==typeof e?function(e){let t={};for(let s in e)t[s]=n(e[s]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let s=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function r(e,t){return e<t?-1:e>t?1:0}t.RegexSource=class{static hasCaptures(e){return null!==e&&(s.lastIndex=0,s.test(e))}static replaceCaptures(e,t,n){return e.replace(s,((e,s,r,a)=>{let o=n[parseInt(s||r,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}},t.strcmp=r,t.strArrCmp=function(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let s=0;s<n;s++){let n=r(e[s],t[s]);if(0!==n)return n}return 0}return n-s},t.isValidHexColor=function(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()}}},t={};return function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s].call(a.exports,a,a.exports,n),a.exports}(787)})()},229:(e,t,n)=>{"use strict";e.exports=n.p+"015f9d709daff9eb9473.wasm"},609:e=>{"use strict";e.exports=window.React},673:()=>{},485:()=>{}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e].call(n.exports,n,n.exports,o),n.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);o.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&s&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(r,a),r},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,n)=>(o.f[n](e,t),t)),[])),o.u=e=>e+".js?ver=d43e1cd3952f43f28e34",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},s="pattern-css:",o.l=(e,t,r,a)=>{if(n[e])n[e].push(t);else{var i,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var p=c[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==s+r){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",s+r),i.src=e),n[e]=[t];var d=(t,s)=>{i.onerror=i.onload=null,clearTimeout(h);var r=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),r&&r.forEach((e=>e(s))),t)return t(s)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={57:0};o.f.j=(t,n)=>{var s=o.o(e,t)?e[t]:void 0;if(0!==s)if(s)n.push(s[2]);else{var r=new Promise(((n,r)=>s=e[t]=[n,r]));n.push(s[2]=r);var a=o.p+o.u(t),i=new Error;o.l(a,(n=>{if(o.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var r=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",i.name="ChunkLoadError",i.type=r,i.request=a,s[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var s,r,[a,i,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(s in i)o.o(i,s)&&(o.m[s]=i[s]);l&&l(o)}for(t&&t(n);c<a.length;c++)r=a[c],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=globalThis.webpackChunkpattern_css=globalThis.webpackChunkpattern_css||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";const e=window.wp.apiFetch;var t=o.n(e);const n=window.wp.hooks,s=window.wp.plugins,r=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],a=[];class i{scopes=[];referenceId=1;references=new Map;deferred=[null];wrappedObjects=new WeakMap;externalObjects=new WeakMap;buffers=new Map;instanceData=0;pendingException=null;constructor(e){this.id=a.length,a.push(this),this.instance=e,this.table=e.exports.__indirect_function_table,this.exports={},this.pushScope();let t=this.scopes[this.scopes.length-1],n=t.length;t.push(this.exports);try{this.instance.exports.napi_register_module_v1&&this.instance.exports.napi_register_module_v1(this.id,n),this.instance.exports.napi_register_wasm_v1&&this.instance.exports.napi_register_wasm_v1(this.id,n)}finally{if(this.popScope(),this.pendingException){let e=this.pendingException;throw this.pendingException=null,e}}}destroy(){a[this.id]=void 0}getString(e,t=function(e,t){let n=0;for(;0!==e[t];)n++,t++;return n}(this.memory,e)){return l.decode(this.memory.subarray(e,Math.max(0,e+t)))}pushScope(){let e=this.scopes.length;return this.scopes.push(e?[...this.scopes[e-1]]:[void 0,null,globalThis,!0,!1]),e}popScope(){this.scopes.pop();for(let[e,t]of this.buffers)e.byteLength&&t.byteLength&&e.set(t);this.buffers.clear()}get(e){return this.scopes[this.scopes.length-1][e]}set(e,t){this.scopes[this.scopes.length-1][e]=t}pushValue(e,t=this.scopes.length-1){let n=this.scopes[t],s=n.length;return n.push(e),s}createValue(e,t,n){if("boolean"==typeof e)return this.setPointer(t,e?3:4),0;if(void 0===e)return this.setPointer(t,0),0;if(null===e)return this.setPointer(t,1),0;if(e===globalThis)return this.setPointer(t,2),0;let s=this.pushValue(e,n);return this.setPointer(t,s),0}setPointer(e,t){return this.u32[e>>2]=t,0}_u32=new Uint32Array;get u32(){return 0===this._u32.byteLength&&(this._u32=new Uint32Array(this.instance.exports.memory.buffer)),this._u32}_i32=new Int32Array;get i32(){return 0===this._i32.byteLength&&(this._i32=new Int32Array(this.instance.exports.memory.buffer)),this._i32}_u16=new Uint16Array;get u16(){return 0===this._u16.byteLength&&(this._u16=new Uint16Array(this.instance.exports.memory.buffer)),this._u16}_u64=new BigUint64Array;get u64(){return 0===this._u64.byteLength&&(this._u64=new BigUint64Array(this.instance.exports.memory.buffer)),this._u64}_i64=new BigInt64Array;get i64(){return 0===this._i64.byteLength&&(this._i64=new BigInt64Array(this.instance.exports.memory.buffer)),this._i64}_f64=new Float64Array;get f64(){return 0===this._f64.byteLength&&(this._f64=new Float64Array(this.instance.exports.memory.buffer)),this._f64}_buf=new Uint8Array;get memory(){return 0===this._buf.byteLength&&(this._buf=new Uint8Array(this.instance.exports.memory.buffer)),this._buf}getBufferInfo(e,t){if(this.buffers.has(e)){let n=this.buffers.get(e);return this.setPointer(t,n.byteOffset),n.byteLength}if(e instanceof ArrayBuffer){let n=this.copyBuffer(new Uint8Array(e));return this.setPointer(t,n.byteOffset),n.byteLength}if(e.buffer===this.instance.exports.memory.buffer)return this.setPointer(t,e.byteOffset),e.byteLength;let n=this.copyBuffer(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));return this.setPointer(t,n.byteOffset),n.byteLength}copyBuffer(e){let t=this.instance.exports.napi_wasm_malloc(e.byteLength),n=this.memory;n.set(e,t);let s=n.subarray(t,t+e.byteLength);return h.register(s,new d(this.id,((e,t)=>{this.instance.exports.napi_wasm_free&&this.instance.exports.napi_wasm_free(t)}),0,t)),this.buffers.set(e,s),s}createFunction(e,t){let n=this,s=n.table.get(e);return function(...e){let r=n.pushScope();try{let a=n.scopes[r],o=a.length;a.push({thisArg:this,args:e,data:t,newTarget:new.target});let i=s(n.id,o);return n.get(i)}finally{if(n.popScope(),n.pendingException){let e=n.pendingException;throw n.pendingException=null,e}}}}readPropertyDescriptor(e){let t=this.u32,n=t[e++],s=t[e++],r=t[e++],a=t[e++],o=t[e++],i=t[e++],l=t[e++],c=t[e++],u=n?this.getString(n):this.get(s),p=Boolean(1&l),d=Boolean(2&l),h=Boolean(4&l),m=Boolean(1024&l),g=a?this.createFunction(a,c):void 0,f=o?this.createFunction(o,c):void 0,y=r?this.createFunction(r,c):i?this.get(i):void 0,_={name:u,static:m,configurable:h,enumerable:d};return g||f?(_.get=g,_.set=f):y&&(_.writable=p,_.value=y),_}}const l=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),c=new TextDecoder("latin1"),u=new TextDecoder("utf-16"),p=new TextEncoder;class d{constructor(e,t,n,s){this.env=e,this.finalize=t,this.hint=n,this.data=s}}const h=new FinalizationRegistry((e=>{e.finalize&&e.finalize(e.env,e.data,e.hint)}));class m{}const g=[];class f{constructor(e,t,n,s){this.env=e,this.fn=t,this.nativeFn=n,this.context=s,this.id=g.length,g.push(this)}}const y=[null];class _{constructor(e,t,n,s){this.env=e,this.execute=t,this.complete=n,this.data=s,this.id=y.length,y.push(this)}}const b={napi_open_handle_scope(e,t){let n=a[e],s=n.pushScope();return n.setPointer(t,s)},napi_close_handle_scope(e,t){let n=a[e];return t!==n.scopes.length-1?13:(n.popScope(),0)},napi_open_escapable_handle_scope(e,t){let n=a[e],s=n.pushScope();return n.setPointer(t,s)},napi_close_escapable_handle_scope(e,t){let n=a[e];return t!==n.scopes.length-1?13:(n.popScope(),0)},napi_escape_handle(e,t,n,s){let r=a[e],o=r.get(n);return r.createValue(o,s,t-1)},napi_create_object:(e,t)=>a[e].createValue({},t),napi_set_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n),l=r.get(s);return o[i]=l,0},napi_get_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.createValue(o[i],s)},napi_delete_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n),l=!1;try{l=delete o[i]}catch(e){}return s&&(r.memory[s]=l?1:0),0},napi_has_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=i in o?1:0,0},napi_has_own_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=o.hasOwnProperty(i)?1:0,0},napi_set_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(s);return o[r.getString(n)]=i,0},napi_get_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.getString(n);return r.createValue(o[i],s)},napi_has_named_property(e,t,n,s){let r=a[e],o=r.get(t),i=r.getString(n);return r.memory[s]=i in o?1:0,0},napi_get_property_names(e,t,n){let s=a[e],r=s.get(t),o=Object.keys(r);return s.createValue(o,n)},napi_get_all_property_names(e,t,n,s,r,a){throw new Error("not implemented")},napi_define_properties(e,t,n,s){let r=a[e],o=r.get(t),i=s>>2;for(let e=0;e<n;e++){let e=r.readPropertyDescriptor(i);Object.defineProperty(o,e.name,e),i+=8}return 0},napi_object_freeze(e,t){let n=a[e].get(t);return Object.freeze(n),0},napi_object_seal(e,t){let n=a[e].get(t);return Object.seal(n),0},napi_get_prototype(e,t,n){let s=a[e],r=s.get(t);return s.createValue(Object.getPrototypeOf(r),n)},napi_define_class(e,t,n,s,r,o,i,l){let c=a[e],u=c.createFunction(s,r);Object.defineProperty(u,"name",{value:c.getString(t,n),configurable:!0});let p=i>>2;for(let e=0;e<o;e++){let e=c.readPropertyDescriptor(p);e.static?Object.defineProperty(u,e.name,e):Object.defineProperty(u.prototype,e.name,e),p+=8}return c.createValue(u,l)},napi_create_reference(e,t,n,s){let r=a[e],o=r.referenceId++;return r.references.set(o,{value:r.get(t),refcount:n}),r.setPointer(s,o)},napi_delete_reference:(e,t)=>(a[e].references.delete(t),0),napi_get_reference_value(e,t,n){let s=a[e],r=s.references.get(t);return s.createValue(r.value,n)},napi_reference_ref(e,t,n){let s=a[e],r=s.references.get(t);return r.refcount++,s.setPointer(n,r.refcount)},napi_reference_unref(e,t,n){let s=a[e],r=s.references.get(t);return 0===r.refcount?9:(r.refcount--,s.setPointer(n,r.refcount))},napi_add_env_cleanup_hook:()=>0,napi_remove_env_cleanup_hook:()=>0,napi_add_async_cleanup_hook:()=>0,napi_remove_async_cleanup_hook:()=>0,napi_set_instance_data:(e,t,n,s)=>(a[e].instanceData=t,0),napi_get_instance_data(e,t){let n=a[e];return n.setPointer(t,n.instanceData)},napi_get_boolean:(e,t,n)=>a[e].setPointer(n,t?3:4),napi_get_value_bool(e,t,n){let s=a[e],r=s.get(t);return"boolean"!=typeof r?7:(s.memory[n]=r?1:0,0)},napi_create_int32:(e,t,n)=>a[e].createValue(t,n),napi_get_value_int32(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.i32[n>>2]=r,0)},napi_create_uint32:(e,t,n)=>a[e].createValue(t,n),napi_get_value_uint32(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:s.setPointer(n,r)},napi_create_int64:(e,t,n)=>a[e].createValue(Number(t),n),napi_get_value_int64(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.i64[n>>3]=r,0)},napi_create_double:(e,t,n)=>a[e].createValue(t,n),napi_get_value_double(e,t,n){let s=a[e],r=s.get(t);return"number"!=typeof r?6:(s.f64[n>>3]=r,0)},napi_create_bigint_int64:(e,t,n)=>a[e].createValue(BigInt.asIntN(64,t),n),napi_get_value_bigint_int64(e,t,n,s){let r=a[e],o=r.get(t);return"bigint"!=typeof o?17:(r.i64[n>>3]=o,s&&(r.memory[s]=BigInt.asIntN(64,o)===o?1:0),0)},napi_create_bigint_uint64:(e,t,n)=>a[e].createValue(BigInt.asUintN(64,t),n),napi_get_value_bigint_uint64(e,t,n,s){let r=a[e],o=r.get(t);return"bigint"!=typeof o?17:(r.u64[n>>3]=o,s&&(r.memory[s]=BigInt.asUintN(64,o)===o?1:0),0)},napi_create_bigint_words(e,t,n,s,r){let o=a[e],i=o.u64,l=s>>3,c=0n,u=0n;for(let e=0;e<n;e++)c+=i[l++]<<u,u+=64n;return c*=BigInt((-1)**t),o.createValue(c,r)},napi_get_value_bigint_words(e,t,n,s,r){let o=a[e],i=o.get(t);if("bigint"!=typeof i)return 17;let l=o.u32[s>>2];n&&(o.i32[n]=i<0n?1:0);let c=0;if(r){let e=(1n<<64n)-1n,t=o.u64,n=r>>3;for(i<0n&&(i=-i);c<l&&0n!==i;c++)t[n++]=i&e,i>>=64n}for(;i>0n;)c++,i>>=64n;return o.setPointer(s,c)},napi_get_null:(e,t)=>a[e].setPointer(t,1),napi_create_array:(e,t)=>a[e].createValue([],t),napi_create_array_with_length:(e,t,n)=>a[e].createValue(new Array(t),n),napi_set_element(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(s);return o[n]=i,0},napi_get_element(e,t,n,s){let r=a[e],o=r.get(t)[n];return r.createValue(o,s)},napi_has_element(e,t,n,s){let r=a[e],o=r.get(t);return r.memory[s]=o.hasOwnProperty(n)?1:0,0},napi_delete_element(e,t,n,s){let r=a[e],o=r.get(t),i=!1;try{i=delete o[n]}catch(e){}return s&&(r.memory[s]=i?1:0),0},napi_get_array_length(e,t,n){let s=a[e],r=s.get(t);return s.setPointer(n,r.length)},napi_get_undefined:(e,t)=>a[e].setPointer(t,0),napi_create_function(e,t,n,s,r,o){let i=a[e],l=i.createFunction(s,r);return Object.defineProperty(l,"name",{value:i.getString(t,n),configurable:!0}),i.createValue(l,o)},napi_call_function(e,t,n,s,r,o){let i=a[e],l=i.get(t),c=i.get(n),u=new Array(s),p=i.u32;for(let e=0;e<s;e++)u[e]=i.get(p[r>>2]),r+=4;try{let e=c.apply(l,u);return i.createValue(e,o)}catch(e){return i.pendingException=e,10}},napi_new_instance(e,t,n,s,r){let o=a[e],i=o.get(t),l=new Array(n),c=o.u32;for(let e=0;e<n;e++)l[e]=o.get(c[s>>2]),s+=4;try{let e=new i(...l);return o.createValue(e,r)}catch(e){return o.pendingException=e,10}},napi_get_cb_info(e,t,n,s,r,o){let i=a[e],l=i.get(t);i.setPointer(n,l.args.length);for(let e=0;e<l.args.length;e++)i.createValue(l.args[e],s),s+=4;return i.createValue(l.thisArg,r),i.setPointer(o,l.data),0},napi_get_new_target(e,t,n){let s=a[e],r=s.get(t);return s.createValue(r.newTarget,n)},napi_create_threadsafe_function(e,t,n,s,r,o,i,l,c,u,p){let m=a[e],g=t?m.get(t):void 0,y=u?m.table.get(u):void 0,_=new f(m,g,y,c);if(l){let t=m.table.get(l);h.register(_,new d(e,t,0,_.id))}return m.setPointer(p,_.id),0},napi_ref_threadsafe_function:()=>0,napi_unref_threadsafe_function:()=>0,napi_acquire_threadsafe_function:()=>0,napi_release_threadsafe_function:(e,t)=>(g[e]=void 0,0),napi_call_threadsafe_function(e,t,n){let s=g[e];s.env.pushScope();try{if(s.nativeFn){let e=s.fn?s.env.pushValue(s.fn):0;s.nativeFn(s.env.id,e,s.context,t)}else s.fn&&s.fn()}finally{s.env.popScope()}},napi_get_threadsafe_function_context(e,t){let n=g[e];return n.env.setPointer(t,n.context),0},napi_create_async_work(e,t,n,s,r,o,i){let l=a[e],c=s?l.table.get(s):void 0,u=r?l.table.get(r):void 0,p=new _(l,c,u,o);return l.setPointer(i,p.id),0},napi_delete_async_work:(e,t)=>(y[t]=void 0,0),napi_queue_async_work:(e,t)=>(queueMicrotask((()=>{let n=y[t];n&&(n.execute(e,n.data),n.complete(e,0,n.data))})),0),napi_cancel_async_work(){let e=y[work];return e.complete(env,11,e.data),y[work]=void 0,0},napi_throw(e,t){let n=a[e];return n.pendingException=n.get(t),0},napi_throw_error(e,t,n){let s=a[e],r=new Error(s.getString(n));return r.code=t,s.pendingException=r,0},napi_throw_type_error(e,t,n){let s=a[e],r=new TypeError(s.getString(n));return r.code=t,s.pendingException=r,0},napi_throw_range_error(e,t,n){let s=a[e],r=new RangeError(s.getString(n));return r.code=t,s.pendingException=r,0},napi_create_error(e,t,n,s){let r=a[e],o=new Error(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_create_type_error(e,t,n,s){let r=a[e],o=new TypeError(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_create_range_error(e,t,n,s){let r=a[e],o=new RangeError(r.get(n));return o.code=r.get(t),r.createValue(o,s)},napi_get_and_clear_last_exception(e,t){let n=a[e],s=n.pendingException;return n.pendingException=null,n.createValue(s,t)},napi_is_exception_pending(e,t){let n=a[e];return n.memory[t]=n.pendingException?1:0,0},napi_fatal_exception(e,t){throw new Error("not implemented")},napi_fatal_error(e,t,n,s){throw new Error("not implemented")},napi_get_global:(e,t)=>a[e].setPointer(t,2),napi_create_buffer(e,t,n,s){let r=a[e],o=r.instance.exports.napi_wasm_malloc(t);n&&r.setPointer(n,o);let i=void 0!==globalThis.Buffer?globalThis.Buffer.from(r.memory.buffer,o,t):r.memory.subarray(o,o+t);return h.register(i,new d(e,((e,t)=>{r.instance.exports.napi_wasm_free&&r.instance.exports.napi_wasm_free(t)}),0,o)),r.createValue(i,s)},napi_create_buffer_copy(e,t,n,s,r){let o=a[e],i=o.instance.exports.napi_wasm_malloc(t);o.memory.set(o.memory.subarray(n,n+t),i),s&&o.setPointer(s,i);let l=void 0!==globalThis.Buffer?globalThis.Buffer.from(o.memory.buffer,i,t):o.memory.subarray(i,i+t);return h.register(buf,new d(e,((e,t)=>{o.instance.exports.napi_wasm_free&&o.instance.exports.napi_wasm_free(t)}),0,i)),o.createValue(l,r)},napi_create_external_buffer(e,t,n,s,r,o){let i=a[e],l=void 0!==globalThis.Buffer?globalThis.Buffer.from(i.memory.buffer,n,t):i.memory.subarray(n,n+t);if(s){let t=i.table.get(s);h.register(l,new d(e,t,r,n))}return i.createValue(l,o)},napi_get_buffer_info(e,t,n,s){let r=a[e],o=r.get(t),i=r.getBufferInfo(o,n);return r.setPointer(s,i)},napi_create_arraybuffer(e,t,n,s){let r=a[e],o=new ArrayBuffer(t);return n&&r.getBufferInfo(o,n),r.createValue(o,s)},napi_create_external_arraybuffer:(e,t,n,s,r,a)=>22,napi_get_arraybuffer_info(e,t,n,s){let r=a[e],o=r.getBufferInfo(r.get(t),n);return r.setPointer(s,o)},napi_detach_arraybuffer(e,t){let n=a[e].get(t);return"function"==typeof structuredClone&&structuredClone(n,{transfer:[n]}),0},napi_is_detached_arraybuffer(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=0===r.byteLength?1:0,0},napi_create_typedarray(e,t,n,s,o,i){let l=a[e],c=new(0,r[t])(l.get(s),o,n);return l.createValue(c,i)},napi_create_dataview(e,t,n,s,r){let o=a[e],i=o.get(n),l=new DataView(i,s,t);return o.createValue(l,r)},napi_get_typedarray_info(e,t,n,s,o,i,l){let c=a[e],u=c.get(t);return c.setPointer(n,r.findIndex((e=>u instanceof e))),c.setPointer(s,u.length),c.getBufferInfo(u,o),c.createValue(u.buffer,i),c.setPointer(l,u.byteOffset)},napi_get_dataview_info(e,t,n,s,r,o){let i=a[e],l=i.get(t);return i.setPointer(n,l.byteLength),i.getBufferInfo(l,s),i.createValue(l.buffer,r),i.setPointer(o,l.byteOffset)},napi_create_string_utf8(e,t,n,s){let r=a[e],o=l.decode(r.memory.subarray(t,t+n));return r.createValue(o,s)},napi_get_value_string_utf8(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,function(e){let t=0;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s>=55296&&s<=56319&&n<e.length-1){let t=e.charCodeAt(++n);56320==(64512&t)?s=((1023&s)<<10)+(1023&t)+65536:n--}4294967168&s?4294965248&s?4294901760&s?4292870144&s||(t+=4):t+=3:t+=2:t++}return t}(i));let l=p.encodeInto(i,o.memory.subarray(n,n+s-1));return o.memory[n+l.written]=0,o.setPointer(r,l.written)},napi_create_string_latin1(e,t,n,s){let r=a[e],o=c.decode(r.memory.subarray(t,t+n));return r.createValue(o,s)},napi_get_value_string_latin1(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,i.length);let l=o.memory,c=Math.min(i.length,s-1);for(let e=0;e<c;e++){let t=i.charCodeAt(e);l[n++]=t}return l[n]=0,o.setPointer(r,c)},napi_create_string_utf16(e,t,n,s){let r=a[e],o=u.decode(r.memory.subarray(t,t+2*n));return r.createValue(o,s)},napi_get_value_string_utf16(e,t,n,s,r){let o=a[e],i=o.get(t);if("string"!=typeof i)return 3;if(0==n)return o.setPointer(r,i.length);let l=o.u16,c=n>>1,u=Math.min(i.length,s-1);for(let e=0;e<u;e++){let t=i.charCodeAt(e);l[c++]=t}return l[c]=0,o.setPointer(r,u)},napi_create_date:(e,t,n)=>a[e].createValue(new Date(t),n),napi_get_date_value(e,t,n){let s=a[e],r=s.get(t);s.f64[n>>3]=r.valueOf()},napi_create_symbol(e,t,n){let s=a[e],r=s.get(t);return s.createValue(Symbol(r),n)},napi_coerce_to_bool(e,t,n){let s=a[e];return s.createValue(Boolean(s.get(t)),n)},napi_coerce_to_number(e,t,n){let s=a[e];return s.createValue(Number(s.get(t)),n)},napi_coerce_to_object(e,t,n){let s=a[e];return s.createValue(Object(s.get(t)),n)},napi_coerce_to_string(e,t,n){let s=a[e];return s.createValue(String(s.get(t)),n)},napi_typeof(e,t,n){let s=a[e],r=s.get(t);return s.setPointer(n,(()=>{switch(typeof r){case"undefined":return 0;case"boolean":return 2;case"number":return 3;case"string":return 4;case"symbol":return 5;case"object":return null===r?1:r instanceof m?8:6;case"function":return 7;case"bigint":return 9}})())},napi_instanceof(e,t,n,s){let r=a[e],o=r.get(t),i=r.get(n);return r.memory[s]=o instanceof i?1:0,0},napi_is_array(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=Array.isArray(r)?1:0,0},napi_is_buffer(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=(void 0!==globalThis.Buffer?globalThis.Buffer.isBuffer(r):r instanceof Uint8Array)?1:0,0},napi_is_date(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Date?1:0,0},napi_is_error(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Error?1:0,0},napi_is_typedarray(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=!ArrayBuffer.isView(r)||r instanceof DataView?0:1,0},napi_is_dataview(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof DataView?1:0,0},napi_strict_equals(e,t,n,s){let r=a[e];return r.memory[s]=r.get(t)===r.get(n)?1:0,0},napi_wrap(e,t,n,s,r,o){let i=a[e],l=i.get(t);if(i.wrappedObjects.set(l,n),s){let t=i.table.get(s);h.register(l,new d(e,t,r,n))}return o?b.napi_create_reference(e,t,1,o):0},napi_unwrap(e,t,n){let s=a[e],r=s.get(t),o=s.wrappedObjects.get(r);return s.setPointer(n,o),0},napi_remove_wrap(e,t,n){let s=a[e],r=s.get(t),o=s.wrappedObjects.get(r);return h.unregister(r),s.wrappedObjects.delete(r),s.setPointer(n,o)},napi_type_tag_object(e,t,n){throw new Error("not implemented")},napi_check_object_type_tag(e,t,n){throw new Error("not implemented")},napi_add_finalizer(e,t,n,s,r,o){let i=a[e],l=i.get(t),c=i.table.get(s);return h.register(l,new d(e,c,r,n)),o?b.napi_create_reference(e,t,1,o):0},napi_create_promise(e,t,n){let s=a[e],r=new Promise(((e,n)=>{let r=s.deferred.length;s.deferred.push({resolve:e,reject:n}),s.setPointer(t,r)}));return s.createValue(r,n)},napi_resolve_deferred(e,t,n){let s=a[e],{resolve:r}=s.deferred[t];return r(s.get(n)),s.deferred[t]=void 0,0},napi_reject_deferred(e,t,n){let s=a[e],{reject:r}=s.deferred[t];return r(s.get(n)),s.deferred[t]=void 0,0},napi_is_promise(e,t,n){let s=a[e],r=s.get(t);return s.memory[n]=r instanceof Promise?1:0,0},napi_run_script(e,t,n){let s=a[e],r=s.get(t),o=(0,eval)(r);return s.createValue(o,n)},napi_create_external(e,t,n,s,r){let o=a[e],i=new m;if(o.externalObjects.set(i,t),n){let r=o.table.get(n);h.register(i,new d(e,r,s,t))}return o.createValue(i,r)},napi_get_value_external(e,t,n){let s=a[e],r=s.get(t),o=s.externalObjects.get(r);return o?s.setPointer(n,o):1},napi_adjust_external_memory:()=>0};let v;function w(e,t,n){v(e,t,n)}let k,S,N;function x(e){return function(e,t){if("function"==typeof t.visitor){let n=[];t.visitor=t.visitor({addDependency(e){n.push(e)}});let s=e(t);return s instanceof Promise?s=s.then((e=>(n.length&&(e.dependencies??=[],e.dependencies.push(...n)),e))):n.length&&(s.dependencies??=[],s.dependencies.push(...n)),s}return e(t)}(k.transform,e)}const j=window.wp.blockEditor,P=window.wp.components,C=window.wp.data,L=window.wp.editor,T=window.wp.element,A=window.wp.i18n,E=window.wp.url,O=(e,t)=>[...new Set([...e.filter((e=>!e.startsWith("pcss-"))),t].filter(Boolean))].join(" "),R=e=>e.replace(/<\s*script\s*>/gi,"&lt;script&gt;").replace(/<\s*\/\s*script\s*>/gi,"&lt;/script&gt;").replace(/<\s*style\s*>/gi,"&lt;style&gt;").replace(/<\s*\/\s*style\s*>/gi,"&lt;/style&gt;");var I=o(609);const B=e=>{let t;const n=new Set,s=(e,s)=>{const r="function"==typeof e?e(t):e;if(!Object.is(r,t)){const e=t;t=(null!=s?s:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach((n=>n(t,e)))}},r=()=>t,a={setState:s,getState:r,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(s,r,a);return a},M=e=>e,D=e=>{const t=(e=>e?B(e):B)(e),n=e=>function(e,t=M){const n=I.useSyncExternalStore(e.subscribe,I.useCallback((()=>t(e.getState())),[e,t]),I.useCallback((()=>t(e.getInitialState())),[e,t]));return I.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},G=e=>e?D(e):D,F=e=>!!e.dispatchFromDevtools&&"function"==typeof e.dispatch,$=new Map,W=e=>{const t=$.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},U=e=>{var t,n;if(!e)return;const s=e.split("\n"),r=s.findIndex((e=>e.includes("api.setState")));if(r<0)return;const a=(null==(t=s[r+1])?void 0:t.trim())||"";return null==(n=/.+ (.+) .+/.exec(a))?void 0:n[1]},V=(e,t={})=>(n,s,r)=>{const{enabled:a,anonymousActionType:o,store:i,...l}=t;let c;try{c=(null==a||a)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return e(n,s,r);const{connection:u,...p}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const s=$.get(n.name);if(s)return{type:"tracked",store:e,...s};const r={connection:t.connect(n),stores:{}};return $.set(n.name,r),{type:"tracked",store:e,...r}})(i,c,l);let d=!0;r.setState=(e,t,a)=>{const c=n(e,t);if(!d)return c;const p=void 0===a?{type:o||U((new Error).stack)||"anonymous"}:"string"==typeof a?{type:a}:a;return void 0===i?(null==u||u.send(p,s()),c):(null==u||u.send({...p,type:`${i}/${p.type}`},{...W(l.name),[i]:r.getState()}),c)},r.devtools={cleanup:()=>{u&&"function"==typeof u.unsubscribe&&u.unsubscribe(),((e,t)=>{if(void 0===t)return;const n=$.get(e);n&&(delete n.stores[t],0===Object.keys(n.stores).length&&$.delete(e))})(l.name,i)}};const h=(...e)=>{const t=d;d=!1,n(...e),d=t},m=e(r.setState,s,r);if("untracked"===p.type?null==u||u.init(m):(p.stores[p.store]=r,null==u||u.init(Object.fromEntries(Object.entries(p.stores).map((([e,t])=>[e,e===p.store?m:t.getState()]))))),F(r)){let e=!1;const t=r.dispatch;r.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):z(e.payload,(e=>{if("__setState"!==e.type)F(r)&&r.dispatch(e);else{if(void 0===i)return void h(e.state);1!==Object.keys(e.state).length&&console.error('\n                    [zustand devtools middleware] Unsupported __setState action format.\n                    When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n                    and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n                    ');const t=e.state[i];if(null==t)return;JSON.stringify(r.getState())!==JSON.stringify(t)&&h(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return h(m),void 0===i?null==u?void 0:u.init(r.getState()):null==u?void 0:u.init(W(l.name));case"COMMIT":return void 0===i?void(null==u||u.init(r.getState())):null==u?void 0:u.init(W(l.name));case"ROLLBACK":return z(e.state,(e=>{if(void 0===i)return h(e),void(null==u||u.init(r.getState()));h(e[i]),null==u||u.init(W(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return z(e.state,(e=>{void 0!==i?JSON.stringify(r.getState())!==JSON.stringify(e[i])&&h(e[i]):h(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,s=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!s)return;return h(void 0===i?s:s[i]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return d=!d}return}})),m},z=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function q(e,t){let n;try{n=e()}catch(e){return}const s={getItem:e=>{var s;const r=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),a=null!=(s=n.getItem(e))?s:null;return a instanceof Promise?a.then(r):r(a)},setItem:(e,s)=>n.setItem(e,JSON.stringify(s,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)};return s}const H=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>H(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>H(t)(e)}}},K=(e,t)=>(n,s,r)=>{let a={storage:q((()=>window.localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,i=0;const l=new Set,c=new Set;let u=a.storage;if(!u)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),s,r);const p=()=>{const e=a.partialize({...s()});return u.setItem(a.name,{state:e,version:a.version})},d=r.setState;r.setState=(e,t)=>(d(e,t),p());const h=e(((...e)=>(n(...e),p())),s,r);let m;r.getInitialState=()=>h;const g=()=>{var e,t;if(!u)return;const r=++i;o=!1,l.forEach((e=>{var t;return e(null!=(t=s())?t:h)}));const d=(null==(t=a.onRehydrateStorage)?void 0:t.call(a,null!=(e=s())?e:h))||void 0;return H(u.getItem.bind(u))(a.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return[!1,e.state];if(a.migrate){const t=a.migrate(e.state,e.version);return t instanceof Promise?t.then((e=>[!0,e])):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]})).then((e=>{var t;if(r!==i)return;const[o,l]=e;return m=a.merge(l,null!=(t=s())?t:h),n(m,!0),o?p():void 0})).then((()=>{r===i&&(null==d||d(s(),void 0),m=s(),o=!0,c.forEach((e=>e(m))))})).catch((e=>{r===i&&(null==d||d(void 0,e))}))};return r.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},a.skipHydration||g(),m||h},J=G()(K(V((e=>({open:!1,transparent:!1,x:"20",y:"20",width:"400",height:"600",setTransparent:t=>e({transparent:t}),setOpen:t=>e({open:t}),setSize:(t,n)=>e({width:t,height:n}),setPosition:(t,n)=>e({x:t,y:n})})),{name:"PCSS Global Editor Store"}),{name:"pcss-global-editor-store"})),X=G()(K(V((e=>({open:!1,transparent:!0,x:"20",y:"20",width:"400",height:"600",setTransparent:t=>e({transparent:t}),setOpen:t=>e({open:t}),setSize:(t,n)=>e({width:t,height:n}),setPosition:(t,n)=>e({x:t,y:n})})),{name:"PCSS Popout Store"}),{name:"pcss-popout-store"})),Q=window.wp.htmlEntities;var Y=o(69),Z=o.n(Y),ee=o(486),te=o(217);const ne=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",displayName:"ABAP",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",displayName:"ActionScript",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",displayName:"Ada",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json",displayName:"Apache Conf",samplePath:"apache.sample"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",displayName:"Apex",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",displayName:"APL",samplePath:"apl.sample",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",displayName:"AppleScript",samplePath:"applescript.sample"},{id:"ara",scopeName:"source.ara",path:"ara.tmLanguage.json",displayName:"Ara",samplePath:"ara.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",displayName:"Assembly",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",displayName:"Astro",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","stylus","sass","css","scss","less","postcss","tsx"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",displayName:"AWK",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",displayName:"Ballerina",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",displayName:"Batch",samplePath:"bat.sample",aliases:["batch"]},{id:"beancount",scopeName:"text.beancount",path:"beancount.tmLanguage.json",displayName:"Beancount",samplePath:"beancount.sample"},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",displayName:"Berry",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json",displayName:"BibTeX",samplePath:"bibtex.sample"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",displayName:"Bicep",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",displayName:"Blade",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",displayName:"C",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",displayName:"Cadence",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",displayName:"Clarity",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",displayName:"Clojure",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",displayName:"CMake",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",displayName:"COBOL",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",displayName:"CodeQL",samplePath:"codeql.sample",aliases:["ql"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",displayName:"CoffeeScript",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",displayName:"C++",samplePath:"cpp.sample",aliases:["c++"],embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",displayName:"Crystal",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",displayName:"C#",samplePath:"csharp.sample",aliases:["c#","cs"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",displayName:"CSS",samplePath:"css.sample"},{id:"csv",scopeName:"text.csv",path:"csv.tmLanguage.json",displayName:"csv syntax",samplePath:"csv.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",displayName:"CUE",samplePath:"cue.sample"},{id:"cypher",scopeName:"source.cypher",path:"cypher.tmLanguage.json",displayName:"Cypher",samplePath:"cypher.sample",aliases:["cql"]},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",displayName:"D",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",displayName:"Dart",samplePath:"dart.sample"},{id:"dax",scopeName:"source.dax",path:"dax.tmLanguage.json",displayName:"DAX",samplePath:"dax.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",displayName:"Diff",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",displayName:"Docker",samplePath:"docker.sample",aliases:["dockerfile"]},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json",displayName:"Dream Maker",samplePath:"dream-maker.sample"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",displayName:"Elixir",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",displayName:"Elm",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",displayName:"ERB",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",displayName:"Erlang",samplePath:"erlang.sample",aliases:["erl"]},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",displayName:"Fish",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",displayName:"F#",samplePath:"fsharp.sample",aliases:["f#","fs"],embeddedLangs:["markdown"]},{id:"gdresource",scopeName:"source.gdresource",path:"gdresource.tmLanguage.json",displayName:"GDResource",samplePath:"gdresource.sample",embeddedLangs:["gdshader","gdscript"]},{id:"gdscript",scopeName:"source.gdscript",path:"gdscript.tmLanguage.json",displayName:"GDScript",samplePath:"gdscript.sample"},{id:"gdshader",scopeName:"source.gdshader",path:"gdshader.tmLanguage.json",displayName:"GDShader",samplePath:"gdshader.sample"},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json",displayName:"Gherkin",samplePath:"gherkin.sample"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",displayName:"Git Commit Message",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",displayName:"Git Rebase Message",embeddedLangs:["shellscript"]},{id:"glimmer-js",scopeName:"source.gjs",path:"glimmer-js.tmLanguage.json",displayName:"Glimmer JS",aliases:["gjs"],embeddedLangs:["javascript","handlebars"]},{id:"glimmer-ts",scopeName:"source.gts",path:"glimmer-ts.tmLanguage.json",displayName:"Glimmer TS",aliases:["gts"],embeddedLangs:["typescript","handlebars"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",displayName:"GLSL",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json",displayName:"Gnuplot",samplePath:"gnuplot.sample"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",displayName:"Go",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",displayName:"GraphQL",samplePath:"graphql.sample",aliases:["gql"],embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json",displayName:"Groovy",samplePath:"groovy.sample"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",displayName:"Hack",samplePath:"hack.sample",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",displayName:"Ruby Haml",samplePath:"haml.sample",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",displayName:"Handlebars",samplePath:"handlebars.sample",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json",displayName:"Haskell",samplePath:"haskell.sample",aliases:["hs"]},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json",displayName:"HashiCorp HCL",samplePath:"hcl.sample"},{id:"hjson",scopeName:"source.hjson",path:"hjson.tmLanguage.json",displayName:"Hjson",samplePath:"hjson.sample"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json",displayName:"HLSL",samplePath:"hlsl.sample"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",displayName:"HTML",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"http",scopeName:"source.http",path:"http.tmLanguage.json",displayName:"HTTP",samplePath:"http.sample",embeddedLangs:["shellscript","json","xml","graphql"]},{id:"imba",scopeName:"source.imba",path:"imba.tmLanguage.json",displayName:"Imba",samplePath:"imba.sample"},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json",displayName:"INI",samplePath:"ini.sample",aliases:["properties"]},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",displayName:"Java",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",displayName:"JavaScript",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",displayName:"Jinja",samplePath:"jinja-html.sample",embeddedLangs:["html"]},{id:"jison",scopeName:"source.jison",path:"jison.tmLanguage.json",displayName:"Jison",samplePath:"jison.sample",embeddedLangs:["javascript"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json",displayName:"JSON",samplePath:"json.sample"},{id:"json5",scopeName:"source.json5",path:"json5.tmLanguage.json",displayName:"JSON5",samplePath:"json5.sample"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json",displayName:"JSON with Comments",samplePath:"jsonc.sample"},{id:"jsonl",scopeName:"source.json.lines",path:"jsonl.tmLanguage.json",displayName:"JSON Lines",samplePath:"jsonl.sample"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json",displayName:"Jsonnet",samplePath:"jsonnet.sample"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",displayName:"JSSM",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json",displayName:"JSX",samplePath:"jsx.sample"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",displayName:"Julia",samplePath:"julia.sample",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json",displayName:"Kotlin",samplePath:"kotlin.sample",aliases:["kt","kts"]},{id:"kusto",scopeName:"source.kusto",path:"kusto.tmLanguage.json",displayName:"Kusto",samplePath:"kusto.sample",aliases:["kql"]},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",displayName:"LaTeX",samplePath:"latex.sample",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",displayName:"Less",samplePath:"less.sample"},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",displayName:"Liquid",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json",displayName:"Lisp",samplePath:"lisp.sample"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json",displayName:"Logo",samplePath:"logo.sample"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",displayName:"Lua",samplePath:"lua.sample",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",displayName:"Makefile",samplePath:"make.sample",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",displayName:"Markdown",samplePath:"markdown.sample",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",displayName:"Marko",samplePath:"marko.sample",embeddedLangs:["css","less","scss","javascript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json",displayName:"MATLAB",samplePath:"matlab.sample"},{id:"mdc",scopeName:"text.markdown.mdc",path:"mdc.tmLanguage.json",displayName:"mdc",samplePath:"mdc.sample",embeddedLangs:["markdown","yaml"]},{id:"mdx",scopeName:"source.mdx",path:"mdx.tmLanguage.json",displayName:"MDX",samplePath:"mdx.sample",embeddedLangs:["tsx","toml","yaml","c","clojure","coffee","cpp","csharp","css","diff","docker","elixir","elm","erlang","go","graphql","haskell","html","ini","java","javascript","json","julia","kotlin","less","lua","make","markdown","objective-c","perl","python","r","ruby","rust","scala","scss","shellscript","shellsession","sql","xml","swift","typescript"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json",displayName:"Mermaid",samplePath:"mermaid.sample"},{id:"mojo",scopeName:"source.mojo",path:"mojo.tmLanguage.json",displayName:"MagicPython",samplePath:"mojo.sample"},{id:"narrat",scopeName:"source.narrat",path:"narrat.tmLanguage.json",displayName:"Narrat Language",samplePath:"narrat.sample",aliases:["nar"]},{id:"nextflow",scopeName:"source.nextflow",path:"nextflow.tmLanguage.json",displayName:"Nextflow",samplePath:"nextflow.sample",aliases:["nf"]},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",displayName:"Nginx",samplePath:"nginx.sample",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",displayName:"Nim",samplePath:"nim.sample",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json",displayName:"Nix",samplePath:"nix.sample"},{id:"nushell",scopeName:"source.nushell",path:"nushell.tmLanguage.json",displayName:"nushell",samplePath:"nushell.sample",aliases:["nu"]},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",displayName:"Objective-C",samplePath:"objective-c.sample",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json",displayName:"Objective-C++",samplePath:"objective-cpp.sample"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json",displayName:"OCaml",samplePath:"ocaml.sample"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json",displayName:"Pascal",samplePath:"pascal.sample"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",displayName:"Perl",samplePath:"perl.sample",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",displayName:"PHP",samplePath:"php.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json",displayName:"PL/SQL",samplePath:"plsql.sample"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json",displayName:"PostCSS",samplePath:"postcss.sample"},{id:"powerquery",scopeName:"source.powerquery",path:"powerquery.tmLanguage.json",displayName:"PowerQuery",samplePath:"powerquery.sample"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",displayName:"PowerShell",samplePath:"powershell.sample",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",displayName:"Prisma",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json",displayName:"Prolog",samplePath:"prolog.sample"},{id:"proto",scopeName:"source.proto",path:"proto.tmLanguage.json",displayName:"Protocol Buffer 3",samplePath:"proto.sample"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",displayName:"Pug",samplePath:"pug.sample",aliases:["jade"],embeddedLangs:["javascript","css","sass","scss","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json",displayName:"Puppet",samplePath:"puppet.sample"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json",displayName:"PureScript",samplePath:"purescript.sample"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",displayName:"Python",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json",displayName:"R",samplePath:"r.sample"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",displayName:"Raku",samplePath:"raku.sample",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",displayName:"ASP.NET Razor",samplePath:"razor.sample",embeddedLangs:["html","csharp"]},{id:"reg",scopeName:"source.reg",path:"reg.tmLanguage.json",displayName:"Windows Registry Script",samplePath:"reg.sample"},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",displayName:"Rel",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json",displayName:"RISC-V",samplePath:"riscv.sample"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",displayName:"reStructuredText",samplePath:"rst.sample",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",displayName:"Ruby",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",displayName:"Rust",samplePath:"rust.sample",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",displayName:"SAS",samplePath:"sas.sample",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json",displayName:"Sass",samplePath:"sass.sample"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json",displayName:"Scala",samplePath:"scala.sample"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json",displayName:"Scheme",samplePath:"scheme.sample"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",displayName:"SCSS",samplePath:"scss.sample",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",displayName:"ShaderLab",samplePath:"shaderlab.sample",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",displayName:"Shell",samplePath:"shellscript.sample",aliases:["bash","sh","shell","zsh"]},{id:"shellsession",scopeName:"text.shell-session",path:"shellsession.tmLanguage.json",displayName:"Shell Session",samplePath:"shellsession.sample",aliases:["console"],embeddedLangs:["shellscript"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json",displayName:"Smalltalk",samplePath:"smalltalk.sample"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json",displayName:"Solidity",samplePath:"solidity.sample"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",displayName:"SPARQL",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"splunk",scopeName:"source.splunk_search",path:"splunk.tmLanguage.json",displayName:"Splunk Query Language",samplePath:"splunk.sample",aliases:["spl"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json",displayName:"SQL",samplePath:"sql.sample"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json",displayName:"SSH Config",samplePath:"ssh-config.sample"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",displayName:"Stata",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",displayName:"Stylus",samplePath:"stylus.sample",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",displayName:"Svelte",samplePath:"svelte.sample",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json",displayName:"Swift",samplePath:"swift.sample"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json",displayName:"SystemVerilog",samplePath:"system-verilog.sample"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",displayName:"Tasl",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json",displayName:"Tcl",samplePath:"tcl.sample"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",displayName:"TeX",samplePath:"tex.sample",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json",displayName:"TOML",samplePath:"toml.sample"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",displayName:"TSX",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",displayName:"Turtle",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",displayName:"Twig",samplePath:"twig.sample",embeddedLangs:["css","javascript","scss","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",displayName:"TypeScript",samplePath:"typescript.sample",aliases:["ts"]},{id:"v",scopeName:"source.v",path:"v.tmLanguage.json",displayName:"V",samplePath:"v.sample"},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",displayName:"Visual Basic",samplePath:"vb.sample",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json",displayName:"Verilog",samplePath:"verilog.sample"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json",displayName:"VHDL",samplePath:"vhdl.sample"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",displayName:"Vim Script",samplePath:"viml.sample",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",displayName:"Vue HTML",samplePath:"vue-html.sample",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",displayName:"Vue",samplePath:"vue.sample",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql"]},{id:"vyper",scopeName:"source.vyper",path:"vyper.tmLanguage.json",displayName:"Vyper",samplePath:"vyper.sample",aliases:["vy"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json",displayName:"WebAssembly",samplePath:"wasm.sample"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",displayName:"Wenyan",samplePath:"wenyan.sample",aliases:["文言"]},{id:"wgsl",scopeName:"source.wgsl",path:"wgsl.tmLanguage.json",displayName:"WGSL",samplePath:"wgsl.sample"},{id:"wolfram",scopeName:"source.wolfram",path:"wolfram.tmLanguage.json",displayName:"Wolfram",samplePath:"wolfram.sample",aliases:["wl"]},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",displayName:"XML",samplePath:"xml.sample",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",displayName:"XSL",samplePath:"xsl.sample",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json",displayName:"YAML",samplePath:"yaml.sample",aliases:["yml"]},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",displayName:"ZenScript",samplePath:"zenscript.sample"},{id:"zig",scopeName:"source.zig",path:"zig.tmLanguage.json",displayName:"zig",samplePath:"zig.sample"}];var se,re,ae,oe,ie=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(ie||{});class le{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t}static printMetadata(e){let t=le.getLanguageId(e),n=le.getTokenType(e),s=le.getFontStyle(e),r=le.getForeground(e),a=le.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:s,foreground:r,background:a})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>15}static getBackground(e){return(4286578688&e)>>>24}static containsBalancedBrackets(e){return!!(1024&e)}static set(e,t,n,s,r,a){let o=le.getLanguageId(e),i=le.getTokenType(e),l=le.getFontStyle(e),c=le.getForeground(e),u=le.getBackground(e);return 0!==t&&(o=t),0!==n&&(i=8===n?0:n),-1!==s&&(l=s),0!==r&&(c=r),0!==a&&(u=a),(o|i<<8|l<<11|(le.containsBalancedBrackets(e)?1:0)<<10|c<<15|u<<24)>>>0}}function ce(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function ue(e){return e.startsWith("./")?e.slice(2):e}function pe(e){const t=e.split(/[\/\\]/g);return t.slice(0,t.length-1)}function de(...e){return e.map(ce).map(ue).join("/")}function he(e){return 32===e||9===e}function me(e){return 10===e||13===e}function ge(e){return e>=48&&e<=57}!function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(se||(se={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(re||(re={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(ae||(ae={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(oe||(oe={}));const fe=function(e,t=[],n=re.DEFAULT){let s=null,r=[];const a=[];function o(e){Array.isArray(r)?r.push(e):null!==s&&(r[s]=e)}return function(e,t,n=re.DEFAULT){const s=function(e,t=!1){const n=e.length;let s=0,r="",a=0,o=16,i=0,l=0,c=0,u=0,p=0;function d(t,n){let r=0,a=0;for(;r<t||!n;){let t=e.charCodeAt(s);if(t>=48&&t<=57)a=16*a+t-48;else if(t>=65&&t<=70)a=16*a+t-65+10;else{if(!(t>=97&&t<=102))break;a=16*a+t-97+10}s++,r++}return r<t&&(a=-1),a}function h(){if(r="",p=0,a=s,l=i,u=c,s>=n)return a=n,o=17;let t=e.charCodeAt(s);if(he(t)){do{s++,r+=String.fromCharCode(t),t=e.charCodeAt(s)}while(he(t));return o=15}if(me(t))return s++,r+=String.fromCharCode(t),13===t&&10===e.charCodeAt(s)&&(s++,r+="\n"),i++,c=s,o=14;switch(t){case 123:return s++,o=1;case 125:return s++,o=2;case 91:return s++,o=3;case 93:return s++,o=4;case 58:return s++,o=6;case 44:return s++,o=5;case 34:return s++,r=function(){let t="",r=s;for(;;){if(s>=n){t+=e.substring(r,s),p=2;break}const a=e.charCodeAt(s);if(34===a){t+=e.substring(r,s),s++;break}if(92!==a){if(a>=0&&a<=31){if(me(a)){t+=e.substring(r,s),p=2;break}p=6}s++}else{if(t+=e.substring(r,s),s++,s>=n){p=2;break}switch(e.charCodeAt(s++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=d(4,!0);e>=0?t+=String.fromCharCode(e):p=4;break;default:p=5}r=s}}return t}(),o=10;case 47:const l=s-1;if(47===e.charCodeAt(s+1)){for(s+=2;s<n&&!me(e.charCodeAt(s));)s++;return r=e.substring(l,s),o=12}if(42===e.charCodeAt(s+1)){s+=2;const t=n-1;let a=!1;for(;s<t;){const t=e.charCodeAt(s);if(42===t&&47===e.charCodeAt(s+1)){s+=2,a=!0;break}s++,me(t)&&(13===t&&10===e.charCodeAt(s)&&s++,i++,c=s)}return a||(s++,p=1),r=e.substring(l,s),o=13}return r+=String.fromCharCode(t),s++,o=16;case 45:if(r+=String.fromCharCode(t),s++,s===n||!ge(e.charCodeAt(s)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=function(){let t=s;if(48===e.charCodeAt(s))s++;else for(s++;s<e.length&&ge(e.charCodeAt(s));)s++;if(s<e.length&&46===e.charCodeAt(s)){if(s++,!(s<e.length&&ge(e.charCodeAt(s))))return p=3,e.substring(t,s);for(s++;s<e.length&&ge(e.charCodeAt(s));)s++}let n=s;if(s<e.length&&(69===e.charCodeAt(s)||101===e.charCodeAt(s)))if(s++,(s<e.length&&43===e.charCodeAt(s)||45===e.charCodeAt(s))&&s++,s<e.length&&ge(e.charCodeAt(s))){for(s++;s<e.length&&ge(e.charCodeAt(s));)s++;n=s}else p=3;return e.substring(t,n)}(),o=11;default:for(;s<n&&m(t);)s++,t=e.charCodeAt(s);if(a!==s){switch(r=e.substring(a,s),r){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return r+=String.fromCharCode(t),s++,o=16}}function m(e){if(he(e)||me(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){s=e,r="",a=0,o=16,p=0},getPosition:()=>s,scan:t?function(){let e;do{e=h()}while(e>=12&&e<=15);return e}:h,getToken:()=>o,getTokenValue:()=>r,getTokenOffset:()=>a,getTokenLength:()=>s-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-u,getTokenError:()=>p}}(e,!1),r=[];function a(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function o(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>r.slice())):()=>!0}function i(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength(),s.getTokenStartLine(),s.getTokenStartCharacter(),(()=>r.slice())):()=>!0}const c=o(t.onObjectBegin),u=l(t.onObjectProperty),p=a(t.onObjectEnd),d=o(t.onArrayBegin),h=a(t.onArrayEnd),m=l(t.onLiteralValue),g=i(t.onSeparator),f=a(t.onComment),y=i(t.onError),_=n&&n.disallowComments,b=n&&n.allowTrailingComma;function v(){for(;;){const e=s.scan();switch(s.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:_||w(11);break;case 2:w(12);break;case 6:w(16)}switch(e){case 12:case 13:_?w(10):f();break;case 16:w(1);break;case 15:case 14:break;default:return e}}}function w(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=s.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){v();break}if(-1!==n.indexOf(e))break;e=v()}}}function k(e){const t=s.getTokenValue();return e?m(t):(u(t),r.push(t)),v(),!0}function S(){switch(s.getToken()){case 3:return function(){d(),v();let e=!0,t=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(t||w(4,[],[]),g(","),v(),4===s.getToken()&&b)break}else t&&w(6,[],[]);e?(r.push(0),e=!1):r[r.length-1]++,S()||w(4,[],[4,5]),t=!0}return h(),e||r.pop(),4!==s.getToken()?w(8,[4],[]):v(),!0}();case 1:return function(){c(),v();let e=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(e||w(4,[],[]),g(","),v(),2===s.getToken()&&b)break}else e&&w(6,[],[]);(10!==s.getToken()?(w(3,[],[2,5]),!1):(k(!1),6===s.getToken()?(g(":"),v(),S()||w(4,[],[2,5])):w(5,[],[2,5]),r.pop(),!0))||w(4,[],[2,5]),e=!0}return p(),2!==s.getToken()?w(7,[2],[]):v(),!0}();case 10:return k(!0);default:return function(){switch(s.getToken()){case 11:const e=s.getTokenValue();let t=Number(e);isNaN(t)&&(w(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return v(),!0}()}}v(),17===s.getToken()?!!n.allowEmptyContent||w(4,[],[]):S()?17!==s.getToken()&&w(9,[],[]):w(4,[],[])}(e,{onObjectBegin:()=>{const e={};o(e),a.push(r),r=e,s=null},onObjectProperty:e=>{s=e},onObjectEnd:()=>{r=a.pop()},onArrayBegin:()=>{const e=[];o(e),a.push(r),r=e,s=null},onArrayEnd:()=>{r=a.pop()},onLiteralValue:o,onError:(e,n,s)=>{t.push({error:e,offset:n,length:s})}},n),r[0]};var ye;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(ye||(ye={}));const _e="undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,be="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"node"===process.release.name,ve="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"bun"===process.release.name,we=_e||!be&&!ve;let ke="",Se="";let Ne=null;function xe(e){if(we)return`${ke}${e}`;{const t=o(485);return t.isAbsolute(e)?e:t.resolve("/","..",e)}}async function je(e){const t=[],n=await async function(e){const t=xe(e);if(we)return await fetch(t).then((e=>e.text()));{const e=o(673);return await e.promises.readFile(t,"utf-8")}}(e);let s;try{s=JSON.parse(n)}catch(e){if(s=fe(n,t,{allowTrailingComma:!0}),t.length)throw t[0]}return s}async function Pe(e){const t=Ce(await je(e));if(t.include){const n=await Pe(de(...pe(e),t.include));n.settings&&(t.settings=n.settings.concat(t.settings)),n.bg&&!t.bg&&(t.bg=n.bg),n.colors&&(t.colors={...n.colors,...t.colors}),delete t.include}return t}function Ce(e){const t=e.type||"dark",n={name:e.name,type:t,...e,...Ae(e)};var s;return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors,delete n.tokenColors),(s=n).settings||(s.settings=[]),s.settings[0]&&s.settings[0].settings&&!s.settings[0].scope||s.settings.unshift({settings:{foreground:s.fg,background:s.bg}}),n}const Le={light:"#333333",dark:"#bbbbbb"},Te={light:"#fffffe",dark:"#1e1e1e"};function Ae(e){let t,n,s=e.settings?e.settings:e.tokenColors;const r=s?s.find((e=>!e.name&&!e.scope)):void 0;return r?.settings?.foreground&&(t=r.settings.foreground),r?.settings?.background&&(n=r.settings.background),!t&&e?.colors?.["editor.foreground"]&&(t=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),t||(t="light"===e.type?Le.light:Le.dark),n||(n="light"===e.type?Te.light:Te.dark),{fg:t,bg:n}}class Ee{constructor(e,t){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=e,this._onigLibName=t}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(e){return this.languageMap[e]}async loadGrammar(e){const t=this.scopeToLangMap[e];if(!t)return null;if(t.grammar)return t.grammar;const n=await async function(e){return await je(e)}(ne.includes(t)?`${this.languagesPath}${t.path}`:t.path);return t.grammar=n,n}addLanguage(e){this.languageMap[e.id]=e,e.aliases&&e.aliases.forEach((t=>{this.languageMap[t]=e})),this.scopeToLangMap[e.scopeName]=e}}function Oe(e,t){let n=[];for(let s=0,r=t.length;s<r;s++){let r=t.slice(0,s),a=t[s];n[s]={scopeName:a,themeMatches:Be(e,a,r)}}return n}function Re(e,t){let n=e+".";return e===t||t.substring(0,n.length)===n}function Ie(e,t,n,s){if(!Re(e,n))return!1;let r=t.length-1,a=s.length-1;for(;r>=0&&a>=0;)Re(t[r],s[a])&&r--,a--;return-1===r}function Be(e,t,n){let s=[],r=0;for(let a=0,o=e.settings.length;a<o;a++){let o,i=e.settings[a];if("string"==typeof i.scope)o=i.scope.split(/,/).map((e=>e.trim()));else{if(!Array.isArray(i.scope))continue;o=i.scope}for(let e=0,a=o.length;e<a;e++){let l=o[e].split(/ /);Ie(l[l.length-1],l.slice(0,l.length-1),t,n)&&(s[r++]=i,e=a)}}return s}var Me=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],De={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Ge(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function Fe(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map((e=>Number.parseInt(e)));if(3!==t.length||t.some((e=>Number.isNaN(e))))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function $e(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(0===s)t.push({type:"resetAll"});else if(s<=9)De[s]&&t.push({type:"setDecoration",value:De[s]});else if(s<=29){const e=De[s-20];e&&t.push({type:"resetDecoration",value:e})}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Me[s-30]}});else if(38===s){const n=Fe(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===s)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Me[s-40]}});else if(48===s){const n=Fe(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===s?t.push({type:"resetBackgroundColor"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Me[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Me[s-100+8]}})}return t}var We={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Ue(e=We){function t(t){return e[t]}function n(e){return`#${e.map((e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0"))).join("")}`}let s;return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return r=e.index,function(){if(s)return s;s=[];for(let e=0;e<Me.length;e++)s.push(t(Me[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let r=0;r<6;r++)for(let a=0;a<6;a++)s.push(n([e[t],e[r],e[a]]));let r=8;for(let e=0;e<24;e++,r+=10)s.push(n([r,r,r]));return s}()[r]}var r}}}const Ve={pre:({className:e,style:t,children:n})=>`<pre class="${e}" style="${t}" tabindex="0">${n}</pre>`,code:({children:e})=>`<code>${e}</code>`,line:({className:e,children:t})=>`<span class="${e}">${t}</span>`,token:({style:e,children:t})=>`<span style="${e}">${t}</span>`};function ze(e,t={}){const n=t.bg||"#fff",s=function(e){const t=new Map;for(const n of e){const e=n.line;t.has(e)?t.get(e).push(n):t.set(e,[n])}return t}(t.lineOptions??[]),r=t.elements||{};function a(e="",t={},n){const s=r[e]||Ve[e];return s?(n=n.filter(Boolean),s({...t,children:"code"===e?n.join("\n"):n.join("")})):""}return a("pre",{className:"shiki "+(t.themeName||""),style:`background-color: ${n}`},[t.langId?`<div class="language-id">${t.langId}</div>`:"",a("code",{},e.map(((n,r)=>{const o=r+1;return a("line",{className:function(e){const t=new Set(["line"]);for(const n of e)for(const e of n.classes??[])t.add(e);return Array.from(t)}(s.get(o)??[]).join(" "),lines:e,line:n,index:r},n.map(((e,s)=>{const r=[`color: ${e.color||t.fg}`];return e.fontStyle&ie.Italic&&r.push("font-style: italic"),e.fontStyle&ie.Bold&&r.push("font-weight: bold"),e.fontStyle&ie.Underline&&r.push("text-decoration: underline"),a("token",{style:r.join("; "),tokens:n,token:e,index:s},[(o=e.content,o.replace(/[&<>"']/g,(e=>qe[e])))]);var o})))})))])}const qe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};class He extends te.Registry{constructor(e){super(e),this._resolver=e,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={},this._langGraph=new Map,this._langMap=ne.reduce(((e,t)=>(e[t.id]=t,e)),{})}getTheme(e){return"string"==typeof e?this._resolvedThemes[e]:e}async loadTheme(e){return"string"==typeof e?(this._resolvedThemes[e]||(this._resolvedThemes[e]=await Pe(`${this.themesPath}${e}.json`)),this._resolvedThemes[e]):((e=Ce(e)).name&&(this._resolvedThemes[e.name]=e),e)}async loadThemes(e){return await Promise.all(e.map((e=>this.loadTheme(e))))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(e){return this._resolvedGrammars[e]}async loadLanguage(e){const t=e.embeddedLangs?.reduce((async(e,t,n)=>{if(!this.getLoadedLanguages().includes(t)&&this._resolver.getLangRegistration(t))return await this._resolver.loadGrammar(this._resolver.getLangRegistration(t).scopeName),e[this._resolver.getLangRegistration(t).scopeName]=n+2,e}),{}),n={embeddedLanguages:t,balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]},s=await this.loadGrammarWithConfiguration(e.scopeName,1,n);this._resolvedGrammars[e.id]=s,e.aliases&&e.aliases.forEach((e=>{this._resolvedGrammars[e]=s}))}async loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.values());for(const e of t)this._resolver.addLanguage(e);for(const e of t)await this.loadLanguage(e)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}resolveEmbeddedLanguages(e){if(this._langGraph.has(e.id)||this._langGraph.set(e.id,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}function Ke(e){return"string"==typeof e?ne.find((t=>t.id===e||t.aliases?.includes(e))):e}async function Je(e){const{_languages:t,_themes:n,_wasmPath:s}=function(e){let t=ne,n=e.themes||[],s=e.paths?.wasm?e.paths.wasm.endsWith("/")?e.paths.wasm:e.paths.wasm+"/":"dist/";return e.langs&&(t=e.langs.map(Ke)),e.theme&&n.unshift(e.theme),n.length||(n=["nord"]),{_languages:t,_themes:n,_wasmPath:s}}(e),r=new Ee(async function(e){if(!Ne){let t;if(we)t="string"==typeof Se?(0,ee.loadWASM)({data:await fetch(xe(de(...pe(e),"onig.wasm")))}):(0,ee.loadWASM)({data:Se});else{const e=o(485).join(486,"../onig.wasm"),n=o(673).readFileSync(e).buffer;t=(0,ee.loadWASM)(n)}Ne=t.then((()=>({createOnigScanner:e=>(0,ee.createOnigScanner)(e),createOnigString:e=>(0,ee.createOnigString)(e)})))}return Ne}(s),"vscode-oniguruma"),a=new He(r);e.paths?.themes&&(a.themesPath=e.paths.themes.endsWith("/")?e.paths.themes:e.paths.themes+"/"),e.paths?.languages&&(r.languagesPath=e.paths.languages.endsWith("/")?e.paths.languages:e.paths.languages+"/");const i=(await a.loadThemes(n))[0];let l;await a.loadLanguages(t);let c=function(){const e={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};for(let t=0;t<Me.length;t++){const n=`#A${t.toString().padStart(5,"0")}`,s=Me[t].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e[n]=`var(--shiki-color-ansi-${s})`}return e}();function u(e){const t=e?a.getTheme(e):i;if(!t)throw Error(`No theme registration for ${e}`);l&&l.name===t.name||(a.setTheme(t),l=t);const n=a.getColorMap();return"css"===t.type&&function(e,t){e.bg=c[e.bg]||e.bg,e.fg=c[e.fg]||e.fg,Object.entries(e.colors).forEach((([t,n])=>{e.colors[t]=c[n]||n})),t.forEach(((e,n)=>{t[n]=c[e]||e}))}(t,n),{_theme:t,_colorMap:n}}function p(e,t="text",n,s={includeExplanation:!0}){if(function(e){return!e||["plaintext","txt","text"].includes(e)}(t))return[...e.split(/\r\n|\r|\n/).map((e=>[{content:e}]))];const{_grammar:r}=function(e){const t=a.getGrammar(e);if(!t)throw Error(`No language registration for ${e}`);return{_grammar:t}}(t),{_theme:o,_colorMap:i}=u(n);return function(e,t,n,s,r){let a=n.split(/\r\n|\r|\n/),o=te.INITIAL,i=[],l=[];for(let n=0,c=a.length;n<c;n++){let c,u,p,d=a[n];if(""===d){i=[],l.push([]);continue}r.includeExplanation&&(c=s.tokenizeLine(d,o),u=c.tokens,p=0);let h=s.tokenizeLine2(d,o),m=h.tokens.length/2;for(let n=0;n<m;n++){let s=h.tokens[2*n],a=n+1<m?h.tokens[2*n+2]:d.length;if(s===a)continue;let o=h.tokens[2*n+1],l=t[le.getForeground(o)],c=le.getFontStyle(o),g=[];if(r.includeExplanation){let t=0;for(;s+t<a;){let n=u[p],s=d.substring(n.startIndex,n.endIndex);t+=s.length,g.push({content:s,scopes:Oe(e,n.scopes)}),p++}}i.push({content:d.substring(s,a),color:l,fontStyle:c,explanation:g})}l.push(i),i=[],o=h.ruleStack}return l}(o,i,e,r,s)}function d(e,t){const{_theme:n}=u(t);return function(e,t){const n=t.split(/\r?\n/),s=Ue(Object.fromEntries(Me.map((t=>[t,e.colors[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]])))),r=function(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let a=0;do{const o=Ge(s,a),i=o.sequence?s.substring(a,o.startPosition):s.substring(a);if(i.length>0&&r.push({value:i,foreground:e,background:t,decorations:new Set(n)}),o.sequence){const s=$e(o.sequence);for(const r of s)"resetAll"===r.type?(e=null,t=null,n.clear()):"resetForegroundColor"===r.type?e=null:"resetBackgroundColor"===r.type?t=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of s)"setForegroundColor"===r.type?e=r.value:"setBackgroundColor"===r.type?t=r.value:"setDecoration"===r.type&&n.add(r.value)}a=o.position}while(a<s.length);return r}}}();return n.map((t=>r.parse(t).map((t=>{let n;n=t.decorations.has("reverse")?t.background?s.value(t.background):e.bg:t.foreground?s.value(t.foreground):e.fg,t.decorations.has("dim")&&(n=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map((e=>`${e}${e}`)).join("")}80`}const n=e.match(/var\((--shiki-color-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(n));let r=ie.None;return t.decorations.has("bold")&&(r|=ie.Bold),t.decorations.has("italic")&&(r|=ie.Italic),t.decorations.has("underline")&&(r|=ie.Underline),{content:t.value,color:n,fontStyle:r}}))))}(n,e)}return{codeToThemedTokens:p,codeToHtml:function(e,t="text",n){let s;s="object"==typeof t?t:{lang:t,theme:n};const r=p(e,s.lang,s.theme,{includeExplanation:!1}),{_theme:a}=u(s.theme);return ze(r,{fg:a.fg,bg:a.bg,lineOptions:s?.lineOptions,themeName:a.name})},ansiToThemedTokens:d,ansiToHtml:function(e,t){const n=d(e,t?.theme),{_theme:s}=u(t?.theme);return ze(n,{fg:s.fg,bg:s.bg,lineOptions:t?.lineOptions,themeName:s.name})},getTheme:e=>u(e)._theme,loadTheme:async function(e){await a.loadTheme(e)},loadLanguage:async function(e){const t=Ke(e);r.addLanguage(t),await a.loadLanguage(t)},getBackgroundColor:function(e){const{_theme:t}=u(e);return t.bg},getForegroundColor:function(e){const{_theme:t}=u(e);return t.fg},getLoadedThemes:function(){return a.getLoadedThemes()},getLoadedLanguages:function(){return a.getLoadedLanguages()},setColorReplacements:function(e){c=e}}}var Xe=o(888),Qe=Object.prototype.hasOwnProperty;const Ye=new WeakMap,Ze=()=>{},et=Ze(),tt=Object,nt=e=>e===et,st=e=>"function"==typeof e,rt=(e,t)=>({...e,...t}),at=e=>st(e.then),ot={},it={},lt="undefined",ct=typeof window!=lt,ut=typeof document!=lt,pt=ct&&"Deno"in window,dt=(e,t)=>{const n=Ye.get(e);return[()=>!nt(t)&&e.get(t)||ot,s=>{if(!nt(t)){const r=e.get(t);t in it||(it[t]=r),n[5](t,rt(r,s),r||ot)}},n[6],()=>!nt(t)&&t in it?it[t]:!nt(t)&&e.get(t)||ot]};let ht=!0;const[mt,gt]=ct&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Ze,Ze],ft={isOnline:()=>ht,isVisible:()=>{const e=ut&&document.visibilityState;return nt(e)||"hidden"!==e}},yt={initFocus:e=>(ut&&document.addEventListener("visibilitychange",e),mt("focus",e),()=>{ut&&document.removeEventListener("visibilitychange",e),gt("focus",e)}),initReconnect:e=>{const t=()=>{ht=!0,e()},n=()=>{ht=!1};return mt("online",t),mt("offline",n),()=>{gt("online",t),gt("offline",n)}}},_t=!I.useId,bt=!ct||pt,vt=bt?I.useEffect:I.useLayoutEffect,wt="undefined"!=typeof navigator&&navigator.connection,kt=!bt&&wt&&(["slow-2g","2g"].includes(wt.effectiveType)||wt.saveData),St=new WeakMap,Nt=(e,t)=>e===`[object ${t}]`;let xt=0;const jt=e=>{const t=typeof e,n=(s=e,tt.prototype.toString.call(s));var s;const r=Nt(n,"Date"),a=Nt(n,"RegExp"),o=Nt(n,"Object");let i,l;if(tt(e)!==e||r||a)i=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(i=St.get(e),i)return i;if(i=++xt+"~",St.set(e,i),Array.isArray(e)){for(i="@",l=0;l<e.length;l++)i+=jt(e[l])+",";St.set(e,i)}if(o){i="#";const t=tt.keys(e).sort();for(;!nt(l=t.pop());)nt(e[l])||(i+=l+":"+jt(e[l])+",");St.set(e,i)}}return i},Pt=e=>{if(st(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?jt(e):"",t]};let Ct=0;const Lt=()=>++Ct;async function Tt(...e){const[t,n,s,r]=e,a=rt({populateCache:!0,throwOnError:!0},"boolean"==typeof r?{revalidate:r}:r||{});let o=a.populateCache;const i=a.rollbackOnError;let l=a.optimisticData;const c=a.throwOnError;if(st(n)){const e=n,s=[],r=t.keys();for(const n of r)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&s.push(n);return Promise.all(s.map(u))}return u(n);async function u(n){const[r]=Pt(n);if(!r)return;const[u,p]=dt(t,r),[d,h,m,g]=Ye.get(t),f=()=>{const e=d[r];return(st(a.revalidate)?a.revalidate(u().data,n):!1!==a.revalidate)&&(delete m[r],delete g[r],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return f();let y,_=s,b=!1;const v=Lt();h[r]=[v,0];const w=!nt(l),k=u(),S=k.data,N=k._c,x=nt(N)?S:N;if(w&&(l=st(l)?l(x,S):l,p({data:l,_c:x})),st(_))try{_=_(x)}catch(e){y=e,b=!0}if(_&&at(_)){if(_=await _.catch((e=>{y=e,b=!0})),v!==h[r][0]){if(b)throw y;return _}b&&w&&(e=>"function"==typeof i?i(e):!1!==i)(y)&&(o=!0,p({data:x,_c:et}))}if(o&&!b)if(st(o)){const e=o(_,x);p({data:e,error:et,_c:et})}else p({data:_,error:et,_c:et});if(h[r][1]=Lt(),Promise.resolve(f()).then((()=>{p({_c:et})})),!b)return _;if(c)throw y}}const At=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Et=(e,t)=>{if(!Ye.has(e)){const n=rt(yt,t),s=Object.create(null),r=Tt.bind(et,e);let a=Ze;const o=Object.create(null),i=(e,t)=>{const n=o[e]||[];return o[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,s)=>{e.set(t,n);const r=o[t];if(r)for(const e of r)e(n,s)},c=()=>{if(!Ye.has(e)&&(Ye.set(e,[s,Object.create(null),Object.create(null),Object.create(null),r,l,i]),!bt)){const t=n.initFocus(setTimeout.bind(et,At.bind(et,s,0))),r=n.initReconnect(setTimeout.bind(et,At.bind(et,s,1)));a=()=>{t&&t(),r&&r(),Ye.delete(e)}}};return c(),[e,r,c,a]}return[e,Ye.get(e)[4]]},[Ot,Rt]=Et(new Map),It=rt({onLoadingSlow:Ze,onSuccess:Ze,onError:Ze,onErrorRetry:(e,__,t,n,s)=>{const r=t.errorRetryCount,a=s.retryCount,o=~~((Math.random()+.5)*(1<<(a<8?a:8)))*t.errorRetryInterval;!nt(r)&&a>r||setTimeout(n,o,s)},onDiscarded:Ze,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:kt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:kt?5e3:3e3,compare:function e(t,n){var s,r;if(t===n)return!0;if(t&&n&&(s=t.constructor)===n.constructor){if(s===Date)return t.getTime()===n.getTime();if(s===RegExp)return t.toString()===n.toString();if(s===Array){if((r=t.length)===n.length)for(;r--&&e(t[r],n[r]););return-1===r}if(!s||"object"==typeof t){for(s in r=0,t){if(Qe.call(t,s)&&++r&&!Qe.call(n,s))return!1;if(!(s in n)||!e(t[s],n[s]))return!1}return Object.keys(n).length===r}}return t!=t&&n!=n},isPaused:()=>!1,cache:Ot,mutate:Rt,fallback:{}},ft),Bt=(e,t)=>{const n=rt(e,t);if(t){const{use:s,fallback:r}=e,{use:a,fallback:o}=t;s&&a&&(n.use=s.concat(a)),r&&o&&(n.fallback=rt(r,o))}return n},Mt=(0,I.createContext)({}),Dt=ct&&window.__SWR_DEVTOOLS_USE__,Gt=Dt?window.__SWR_DEVTOOLS_USE__:[],Ft=e=>st(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],$t=Gt.concat((e=>(t,n,s)=>e(t,n&&((...e)=>{const[s]=Pt(t),[,,,r]=Ye.get(Ot);if(s.startsWith("$inf$"))return n(...e);const a=r[s];return nt(a)?n(...e):(delete r[s],a)}),s)));Dt&&(window.__SWR_DEVTOOLS_REACT__=I);const Wt=()=>{};Wt(),new WeakMap;const Ut=I.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e}}),Vt={dedupe:!0},zt=Promise.resolve(et),qt=()=>Ze,Ht=(tt.defineProperty((e=>{const{value:t}=e,n=(0,I.useContext)(Mt),s=st(t),r=(0,I.useMemo)((()=>s?t(n):t),[s,n,t]),a=(0,I.useMemo)((()=>s?r:Bt(n,r)),[s,n,r]),o=r&&r.provider,i=(0,I.useRef)(et);o&&!i.current&&(i.current=Et(o(a.cache||Ot),r));const l=i.current;return l&&(a.cache=l[0],a.mutate=l[1]),vt((()=>{if(l)return l[2]&&l[2](),l[3]}),[]),(0,I.createElement)(Mt.Provider,rt(e,{value:a}))}),"defaultValue",{value:It}),Kt=(e,t,n)=>{const{cache:s,compare:r,suspense:a,fallbackData:o,revalidateOnMount:i,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:p,keepPreviousData:d,strictServerPrefetchWarning:h}=n,[m,g,f,y]=Ye.get(s),[_,b]=Pt(e),v=(0,I.useRef)(!1),w=(0,I.useRef)(!1),k=(0,I.useRef)(_),S=(0,I.useRef)(t),N=(0,I.useRef)(n),x=()=>N.current,j=()=>x().isVisible()&&x().isOnline(),[P,C,L,T]=dt(s,_),A=(0,I.useRef)({}).current,E=nt(o)?nt(n.fallback)?et:n.fallback[_]:o,O=(e,t)=>{for(const n in A){const s=n;if("data"===s){if(!r(e[s],t[s])){if(!nt(e[s]))return!1;if(!r(U,t[s]))return!1}}else if(t[s]!==e[s])return!1}return!0},R=!v.current,B=(0,I.useMemo)((()=>{const e=P(),n=T(),s=e=>{const n=rt(e);delete n._k;const s=(()=>{if(!_)return!1;if(!t)return!1;if(x().isPaused())return!1;if(R&&!nt(i))return i;const e=nt(E)?n.data:E;return nt(e)||l})();return s?{isValidating:!0,isLoading:!0,...n}:n},r=s(e),a=e===n?r:s(n);let o=r;return[()=>{const e=s(P());return O(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]}),[s,_]),M=(0,Xe.useSyncExternalStore)((0,I.useCallback)((e=>L(_,((t,n)=>{O(n,t)||e()}))),[s,_]),B[0],B[1]),D=m[_]&&m[_].length>0,G=M.data,F=nt(G)?E&&at(E)?Ut(E):E:G,$=M.error,W=(0,I.useRef)(F),U=d?nt(G)?nt(W.current)?F:W.current:G:F,V=_&&nt(F),z=(0,I.useRef)(null);!bt&&(0,Xe.useSyncExternalStore)(qt,(()=>(z.current=!1,z)),(()=>(z.current=!0,z)));const q=z.current;h&&q&&!a&&V&&console.warn(`Missing pre-initiated data for serialized key "${_}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const H=!(!_||!t)&&!x().isPaused()&&!(D&&!nt($))&&(R&&!nt(i)?i:a?!nt(F)&&l:nt(F)||l),K=R&&H,J=nt(M.isValidating)?K:M.isValidating,X=nt(M.isLoading)?K:M.isLoading,Q=(0,I.useCallback)((async e=>{const t=S.current;if(!_||!t||w.current||x().isPaused())return!1;let s,a,o=!0;const i=e||{},l=!f[_]||!i.dedupe,c=()=>_t?!w.current&&_===k.current&&v.current:_===k.current,u={isValidating:!1,isLoading:!1},p=()=>{C(u)},d=()=>{const e=f[_];e&&e[1]===a&&delete f[_]},h={isValidating:!0};nt(P().data)&&(h.isLoading=!0);try{if(l&&(C(h),n.loadingTimeout&&nt(P().data)&&setTimeout((()=>{o&&c()&&x().onLoadingSlow(_,n)}),n.loadingTimeout),f[_]=[t(b),Lt()]),[s,a]=f[_],s=await s,l&&setTimeout(d,n.dedupingInterval),!f[_]||f[_][1]!==a)return l&&c()&&x().onDiscarded(_),!1;u.error=et;const e=g[_];if(!nt(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return p(),l&&c()&&x().onDiscarded(_),!1;const i=P().data;u.data=r(i,s)?i:s,l&&c()&&x().onSuccess(s,_,n)}catch(e){d();const t=x(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,_,t),(!0===n||st(n)&&n(e))&&(x().revalidateOnFocus&&x().revalidateOnReconnect&&!j()||t.onErrorRetry(e,_,t,(e=>{const t=m[_];t&&t[0]&&t[0](3,e)}),{retryCount:(i.retryCount||0)+1,dedupe:!0}))))}return o=!1,p(),!0}),[_,s]),Y=(0,I.useCallback)(((...e)=>Tt(s,k.current,...e)),[]);if(vt((()=>{S.current=t,N.current=n,nt(G)||(W.current=G)})),vt((()=>{if(!_)return;const e=Q.bind(et,Vt);let t=0;if(x().revalidateOnFocus){const e=Date.now();t=e+x().focusThrottleInterval}const n=((e,t,n)=>{const s=t[e]||(t[e]=[]);return s.push(n),()=>{const e=s.indexOf(n);e>=0&&(s[e]=s[s.length-1],s.pop())}})(_,m,((n,s={})=>{if(0==n){const n=Date.now();x().revalidateOnFocus&&n>t&&j()&&(t=n+x().focusThrottleInterval,e())}else if(1==n)x().revalidateOnReconnect&&j()&&e();else{if(2==n)return Q();if(3==n)return Q(s)}}));return w.current=!1,k.current=_,v.current=!0,C({_k:b}),H&&(f[_]||(nt(F)||bt?e():(s=e,ct&&typeof window.requestAnimationFrame!=lt?window.requestAnimationFrame(s):setTimeout(s,1)))),()=>{w.current=!0,n()};var s}),[_]),vt((()=>{let e;function t(){const t=st(c)?c(P().data):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){P().error||!u&&!x().isVisible()||!p&&!x().isOnline()?t():Q(Vt).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[c,u,p,_]),(0,I.useDebugValue)(U),a){if(!_t&&bt&&V)throw new Error("Fallback data is required when using Suspense in SSR.");V&&(S.current=t,N.current=n,w.current=!1);const e=y[_],s=!nt(e)&&V?Y(e):zt;if(Ut(s),!nt($)&&V)throw $;const r=V?Q(Vt):zt;!nt(U)&&V&&(r.status="fulfilled",r.value=!0),Ut(r)}return{mutate:Y,get data(){return A.data=!0,U},get error(){return A.error=!0,$},get isValidating(){return A.isValidating=!0,J},get isLoading(){return A.isLoading=!0,X}}},function(...e){const t=(()=>{const e=(0,I.useContext)(Mt);return(0,I.useMemo)((()=>rt(It,e)),[e])})(),[n,s,r]=Ft(e),a=Bt(t,r);let o=Kt;const{use:i}=a,l=(i||[]).concat($t);for(let e=l.length;e--;)o=l[e](o);return o(n,s||a.fetcher||null,a)});var Kt;const Jt=((e,t)=>(...n)=>{const[s,r,a]=Ft(n),o=(a.use||[]).concat(t);return e(s,r,{...a,use:o})})(Ht,(e=>(t,n,s)=>(s.revalidateOnFocus=!1,s.revalidateIfStale=!1,s.revalidateOnReconnect=!1,s.refreshInterval=0,e(t,n,s)))),Xt=({theme:e,lang:t,ready:n})=>{if(!n)throw new Error;return Je({langs:[t],theme:e})};let Qt=!1;const Yt=({theme:e,lang:t,ready:n=!0})=>{const[s,r]=(0,T.useState)(!1);var a;Qt||(Qt=!0,a=`${window.patternCss?.pluginUrl}build/shiki/`,ke=a.endsWith("/")?a:a+"/");const{data:o,error:i}=Jt({theme:e,lang:t,ready:n&&s},Xt);return(0,T.useEffect)((()=>{const e=`${window.patternCss?.pluginUrl}build/shiki/`;fetch(`${e}dist/onig.wasm`).then((e=>e.arrayBuffer())).then((e=>{Se=e,r(!0)}))}),[]),{highlighter:o,error:i,loading:!o&&!i||!s}},Zt=window.ReactJSXRuntime,en=(0,T.forwardRef)(((e,t)=>{const n=(0,T.useRef)(null),{value:s,onChange:r,onFocus:a,onBlur:o,lineOptions:i=[],...l}=e,{highlighter:c,error:u,loading:p}=Yt({theme:"light-plus",lang:"css"});return p?(0,Zt.jsx)("div",{className:"flex h-full min-h-52 items-center justify-center p-4 text-gray-900",children:"Loading..."}):u?(0,Zt.jsx)("p",{children:u.message}):(0,Zt.jsx)("div",{ref:n,className:"",children:(0,Zt.jsx)(Z(),{ref:t,value:(0,Q.decodeEntities)(s),className:"h-full font-jetbrains-mono",onValueChange:r,...l,padding:{top:6,bottom:6,left:8,right:8},style:{minHeight:300,backgroundColor:"none",color:c?.getForegroundColor()??"#000"},onKeyDown:e=>"Tab"===e.key&&n.current?.querySelector("textarea")?.focus(),onFocus:a,onBlur:o,highlight:e=>c?.codeToHtml((0,Q.decodeEntities)(e),{lang:"css",lineOptions:i})?.replace(/<\/?[pre|code][^>]*>/g,"")})})})),tn=({handleChange:e,popoutOpen:t,setPopoutOpen:n,globalEditorOpen:s,setGlobalEditorOpen:r,editorWrapperRef:a})=>{const[o,i]=(0,T.useState)(!1),{getSelectedBlockClientId:l}=(0,C.useSelect)((e=>e(j.store)),[]),{toggleBlockHighlight:c}=(0,C.useDispatch)(j.store),u=l();return(0,T.useEffect)((()=>{const e=setTimeout((()=>{c(u,!1).then((()=>{i(!1)}))}),1e3);return()=>{clearTimeout(e),o&&c(u,!1)}}),[o,c,u]),(0,Zt.jsxs)("div",{className:"flex justify-between border border-t-0 border-solid border-gray-600 text-xs text-gray-900",children:[s?(0,Zt.jsx)("div",{}):(0,Zt.jsx)(P.Tooltip,{text:(0,A.__)("Open Global Styles Editor","pattern-css"),children:(0,Zt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>r(!0),className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
    22// translators: Popout as in Popout the editor
    33// translators: Popout as in Popout the editor
    4 (0,A.__)("Global","pattern-css")})}),(0,Yt.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[t?null:(0,Yt.jsx)(P.Tooltip,{text:(0,A.__)("Popout Editor","pattern-css"),children:(0,Yt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>n(!0),className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
     4(0,A.__)("Global","pattern-css")})}),(0,Zt.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[t?null:(0,Zt.jsx)(P.Tooltip,{text:(0,A.__)("Popout Editor","pattern-css"),children:(0,Zt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>n(!0),className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
    55// translators: Popout as in Popout the editor
    66// translators: Popout as in Popout the editor
    7 (0,A.__)("Popout","pattern-css")})}),t?(0,Yt.jsx)(P.Tooltip,{text:(0,A.__)("Highlight the current block","pattern-css"),children:(0,Yt.jsx)(P.Button,{size:"small",variant:"tertiary",disabled:o,onClick:()=>{o||(i(!0),c(u,!0))},className:"lowercase hover:bg-gray-100 hover:text-gray-900 "+(o?"bg-gray-100":""),children:(0,A.__)("Highlight","pattern-css")})}):null,(0,Yt.jsx)(P.Tooltip,{text:(0,A.__)("Clear CSS","pattern-css"),children:(0,Yt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>{e(""),a.current?.querySelector("textarea")?.focus()},className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
     7(0,A.__)("Popout","pattern-css")})}),t?(0,Zt.jsx)(P.Tooltip,{text:(0,A.__)("Highlight the current block","pattern-css"),children:(0,Zt.jsx)(P.Button,{size:"small",variant:"tertiary",disabled:o,onClick:()=>{o||(i(!0),c(u,!0))},className:"lowercase hover:bg-gray-100 hover:text-gray-900 "+(o?"bg-gray-100":""),children:(0,A.__)("Highlight","pattern-css")})}):null,(0,Zt.jsx)(P.Tooltip,{text:(0,A.__)("Clear CSS","pattern-css"),children:(0,Zt.jsx)(P.Button,{size:"small",variant:"tertiary",onClick:()=>{e(""),a.current?.querySelector("textarea")?.focus()},className:"lowercase hover:bg-gray-100 hover:text-gray-900",children:
    88// translators: Clear as in Clear the editor
    99// translators: Clear as in Clear the editor
    10 (0,A.__)("Clear","pattern-css")})})]})]})},tn=(e,t,n)=>Math.max(t,Math.min(e,n)),nn=()=>{const e=document.querySelectorAll(".pattern-css-floating-window");return Math.max(...Array.from(e).map((e=>{const t=window.getComputedStyle(e).zIndex;return"auto"===t?0:parseInt(t,10)})))},sn=({ref:e,open:t,initialPosition:n,onDragEnd:s})=>{const r=(0,T.useRef)({x:0,y:0}),a=(0,T.useRef)(null),o=(0,T.useRef)({x:n.x,y:n.y});(0,T.useLayoutEffect)((()=>{const n=e.current;if(!n||!t)return;const s=window.innerWidth-n.offsetWidth,r=window.innerHeight-n.offsetHeight,a=parseFloat(n.style.left)||0,o=parseFloat(n.style.top)||0,i=tn(a,0,s),l=tn(o,0,r);a===i&&o===l||(n.style.left=`${i}px`,n.style.top=`${l}px`)}),[e,t]),(0,T.useLayoutEffect)((()=>{const i=e.current,l=document.getElementById("wpwrap");if(!i||!t||!l)return;const c=i.querySelector("[data-pcss-handle]");if(!(c instanceof HTMLElement))return;i.style.position="fixed",i.style.left=`${n.x}px`,i.style.top=`${n.y}px`;const u=e=>{if(e.preventDefault(),e.stopPropagation(),l.style.pointerEvents="none",null!==a.current)return;const t=nn();i.style.setProperty("z-index",`${t+1}`,"important"),a.current=e.pointerId,c.setPointerCapture(e.pointerId),r.current={x:e.clientX-i.offsetLeft,y:e.clientY-i.offsetTop},document.addEventListener("pointermove",p),document.addEventListener("pointerup",d)},p=e=>{const t=window.innerWidth-c.offsetWidth,n=window.innerHeight-c.offsetHeight,s=tn(e.clientX-r.current.x,0,t),a=tn(e.clientY-r.current.y,0,n);i.style.left=`${s}px`,i.style.top=`${a}px`,o.current={x:s,y:a}},d=e=>{l.style.pointerEvents="auto",a.current===e.pointerId&&(a.current=null,c.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d),s(o.current.x,o.current.y))},h=()=>d(new PointerEvent("pointerup")),m=e=>(e.preventDefault(),e.stopPropagation(),!1);return c.addEventListener("pointerdown",u),c.addEventListener("contextmenu",m),c.addEventListener("blur",h),()=>{c.removeEventListener("pointerdown",u),c.removeEventListener("blur",h),c.removeEventListener("contextmenu",m),document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d),l.style.pointerEvents="auto",null!==a.current&&(c.releasePointerCapture(a.current),a.current=null)}}),[e,t,n.x,n.y,s])},rn=e=>{const[t,n]=(0,T.useState)(null);return(0,T.useEffect)((()=>{let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.appendChild(t)),n(t),()=>t.remove()}),[e]),t},an=({ref:e,open:t,initialSize:n,onResizeEnd:s,minWidth:r=250,minHeight:a=400,maxWidth:o=window.innerWidth,maxHeight:i=window.innerHeight})=>{const l=(0,T.useRef)({x:0,y:0,width:0,height:0}),c=(0,T.useRef)(null);(0,T.useLayoutEffect)((()=>{const u=e.current,p=document.getElementById("wpwrap");if(!u||!t||!p)return;u.style.width=`${n.width}px`,u.style.height=`${n.height}px`;const d=u.querySelector("[data-pcss-resize]");if(!(d instanceof HTMLElement))return;const h=e=>{if(e.preventDefault(),e.stopPropagation(),p.style.pointerEvents="none",null!==c.current)return;const t=nn();u.style.setProperty("z-index",`${t+1}`,"important"),c.current=e.pointerId,d.setPointerCapture(e.pointerId),l.current={x:e.clientX,y:e.clientY,width:u.offsetWidth,height:u.offsetHeight},document.addEventListener("pointermove",m),document.addEventListener("pointerup",g)},m=e=>{const t=u.getBoundingClientRect(),n=Math.min(o,window.innerWidth-t.left),s=Math.min(i,window.innerHeight-t.top),c=tn(l.current.width+(e.clientX-l.current.x),r,n),p=tn(l.current.height+(e.clientY-l.current.y),a,s);u.style.width=`${c}px`,u.style.height=`${p}px`},g=e=>{if(p.style.pointerEvents="auto",c.current!==e.pointerId)return;c.current=null,d.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g);const t=u.getBoundingClientRect(),n=Math.min(o,window.innerWidth-t.left),h=Math.min(i,window.innerHeight-t.top),f=tn(l.current.width+(e.clientX-l.current.x),r,n),y=tn(l.current.height+(e.clientY-l.current.y),a,h);s(f,y)};return d.addEventListener("pointerdown",h),()=>{d.removeEventListener("pointerdown",h),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g),p.style.pointerEvents="auto",null!==c.current&&(d.releasePointerCapture(c.current),c.current=null)}}),[e,t,n.width,n.height,s,r,a,o,i])},on=(0,T.forwardRef)((({icon:e,size:t=24,...n},s)=>(0,T.cloneElement)(e,{width:t,height:t,...n,ref:s}))),ln=window.wp.primitives,cn=(0,Yt.jsx)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Yt.jsx)(ln.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),un=(0,Yt.jsx)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Yt.jsx)(ln.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})}),pn=(0,T.forwardRef)((({label:e,transparent:t,top:n,left:s,width:r,height:a,setOpen:o,children:i,mountNode:l},c)=>((0,T.useLayoutEffect)((()=>{const e=c.current;if(!e)return;const t=nn();e.style.setProperty("z-index",`${t+1}`,"important")}),[c]),(0,T.createPortal)((0,Yt.jsx)("div",{className:"pattern-css-editor",children:(0,Yt.jsx)("div",{className:"pattern-css-floating-window fixed z-high flex flex-col border border-solid border-gray-300 font-jetbrains-mono shadow-2xl "+(t?"bg-white/90":"bg-white"),style:{top:n,left:s,width:r,height:a},ref:c,children:(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsxs)("div",{className:"flex flex-shrink-0 items-center justify-between",children:[(0,Yt.jsxs)("div",{"data-pcss-handle":!0,draggable:!0,className:"flex flex-grow cursor-grab items-center justify-between gap-1 p-2 py-3",children:[(0,Yt.jsx)(dn,{}),(0,Yt.jsx)("h2",{className:"m-0 h-full flex-grow p-0 text-sm font-medium text-gray-900",children:e})]}),(0,Yt.jsx)(P.Button,{className:"relative z-10 border-0 p-2",onClick:()=>o(!1),icon:(0,Yt.jsx)(on,{icon:cn,size:12}),label:(0,A.__)("Close Modal","pattern-css"),showTooltip:!1})]}),(0,Yt.jsx)("div",{className:"relative z-50 flex min-h-0 flex-grow flex-col px-4 pb-4",children:i}),(0,Yt.jsx)("div",{"data-pcss-resize":!0,className:"absolute -bottom-1 -right-1 z-high h-6 w-6",children:(0,Yt.jsx)("div",{className:"h-6 w-6 cursor-se-resize border border-l-0 border-t-0 border-solid border-transparent transition-colors duration-300 hover:border-gray-600 active:border-gray-600"})})]})})}),l)))),dn=e=>(0,Yt.jsxs)("div",{style:{userSelect:"none"},className:"relative flex text-gray-900 hover:text-gray-700",...e,children:[(0,Yt.jsx)(on,{icon:un,size:24}),(0,Yt.jsx)("span",{className:"sr-only",children:(0,A.__)("Drag to move","pattern-css")})]}),hn=({children:e})=>{const t=rn("pcss-popout-mount"),n=(0,T.useRef)(null),{open:s,transparent:r,x:a,y:o,width:i,height:l,setOpen:c,setSize:u,setPosition:p}=J();return sn({ref:n,open:s,initialPosition:{x:a,y:o},onDragEnd:(e,t)=>{p(e,t)}}),an({ref:n,open:s,initialSize:{width:i,height:l},onResizeEnd:(e,t)=>{u(e,t)}}),t&&s?(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(mn,{}),(0,Yt.jsx)(pn,{label:"Pattern CSS",transparent:r,top:a,left:o,width:i,height:l,setOpen:c,mountNode:t,ref:n,children:e})]}):e},mn=()=>{const{setSize:e,setPosition:t,transparent:n,setTransparent:s}=J();return(0,Yt.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Yt.jsx)("div",{className:"flex h-52 items-center justify-center bg-gray-100 p-4 text-gray-900",children:(0,A.__)("Popout is open","pattern-css")}),(0,Yt.jsxs)(P.BaseControl,{id:"pcss-enable-transparency",children:[(0,Yt.jsx)(P.CheckboxControl,{label:(0,A.__)("Transparent background","pattern-css"),checked:n,onChange:e=>{s(e)}}),(0,Yt.jsx)(P.Button,{variant:"secondary",onClick:()=>{t(20,20),e(250,400)},children:(0,A.__)("Reset Position","pattern-css")})]})]})},gn=(0,Yt.jsx)(ln.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Yt.jsx)(ln.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),fn=()=>{const e=rn("pcss-popout-global-mount"),t=(0,T.useRef)(null),[n,s]=(0,T.useState)(window.patternCss?.globalCssCompiled||"");(0,j.useStyleOverride)({id:"pcss-styles-global",css:n});const{open:r,transparent:a,x:o,y:i,width:l,height:c,setOpen:u,setSize:p,setTransparent:d,setPosition:h}=K();sn({ref:t,open:r,initialPosition:{x:o,y:i},onDragEnd:(e,t)=>{h(e,t)}}),an({ref:t,open:r,initialSize:{width:l,height:c},onResizeEnd:(e,t)=>{p(e,t)}});const m=e&&r;return(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(L.PluginMoreMenuItem,{"data-cy":"global-css-editor-btn",icon:"tool",onClick:()=>u(!0),children:(0,A.__)("Add Global CSS (Pattern CSS)","pattern-css")}),m?(0,Yt.jsxs)(pn,{label:(0,A.sprintf)((0,A.__)("%s (Global)","pattern-css"),"Pattern CSS"),transparent:a,top:o,left:i,width:l,height:c,setOpen:u,mountNode:e,ref:t,children:[(0,Yt.jsx)(yn,{initialCss:window.patternCss?.globalCss||"",compiledCss:n,setCompiled:s}),(0,Yt.jsx)(P.CheckboxControl,{label:(0,A.__)("Transparent background","pattern-css"),className:"disable-mb-checkbox mt-2",checked:a,onChange:e=>{d(e)}})]}):null]})},yn=({initialCss:e,compiledCss:n,setCompiled:s})=>{const r=(0,T.useRef)(null),[a,o]=(0,T.useState)([]),[i,l]=(0,T.useState)(e),[c,u]=(0,T.useState)(),[p,d]=(0,T.useState)("idle"),h=(0,T.useCallback)((e=>{if(o([]),l(O(e)),!window.patternCss?.transform)return;const t=window.patternCss.transform({filename:"raw.css",code:(new TextEncoder).encode(e),minify:!0,errorRecovery:!0});t.warnings.length>0?o(t.warnings):u(t.code)}),[]);return(0,T.useEffect)((()=>{e&&h(e)}),[h,e]),(0,T.useEffect)((()=>{void 0!==c&&s((new TextDecoder).decode(c))}),[c,s]),(0,T.useEffect)((()=>{window.patternCss.globalCss=i,window.patternCss.globalCssCompiled=n,d("saving");const e=setTimeout((()=>{t()({path:"/pattern-css/v1/global-css",method:"POST",data:{global_css:i,global_css_compiled:n}}).then((()=>d("saved")))}),750);return()=>clearTimeout(e)}),[n,i]),(0,T.useEffect)((()=>{if("saved"!==p)return;const e=setTimeout((()=>d("idle")),1500);return()=>clearTimeout(e)}),[p]),(0,Yt.jsxs)("div",{className:"relative flex min-h-0 flex-grow flex-col",children:[(0,Yt.jsx)("div",{className:"min-h-0 flex-grow overflow-y-auto overflow-x-hidden border border-solid border-gray-600",ref:r,children:(0,Yt.jsx)(Zt,{value:i,onChange:h,lineOptions:a.map((({loc:e})=>({line:e.line,classes:["line-error"]})))})}),"saving"===p&&(0,Yt.jsx)("div",{className:"absolute bottom-px right-1 z-10 flex items-center justify-center bg-white p-1",children:(0,Yt.jsx)("span",{className:"text-sm text-gray-700",children:(0,A.__)("Saving...","pattern-css")})}),"saved"===p&&(0,Yt.jsxs)("div",{className:"absolute bottom-px right-1 z-10 flex items-center justify-center bg-white p-1",children:[(0,Yt.jsx)(on,{icon:gn,size:20,className:"stroke-gray-700",color:"currentColor"}),(0,Yt.jsx)("span",{className:"text-sm text-gray-700",children:(0,A.__)("Saved!","pattern-css")})]})]})},bn={pcssAdditionalCss:{type:"string"},pcssAdditionalCssCompiled:{type:"string",default:""},pcssClassId:{type:"string",default:""}},vn=Object.keys(bn);(async function(e){if(k)return;if(S)return void await S;let t;("string"==typeof(e=e??new URL(o(229),o.b))||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=async function(e){try{return(await o.e(996).then(o.t.bind(o,996,19))).readFileSync(e)}catch{return fetch(e)}}(e)),S=e.then((e=>async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(e,{env:{...b,await_promise_sync:w,__getrandom_v03_custom:(e,n)=>{let s=t.memory.subarray(e,e+n);crypto.getRandomValues(s)}}}))).then((({instance:e})=>{e.exports.register_module(),t=new i(e),N=function(e){let t,n,s,{instance:r,exports:a}=e,{asyncify_get_state:o,asyncify_start_unwind:i,asyncify_stop_unwind:l,asyncify_start_rewind:c,asyncify_stop_rewind:u}=r.exports,p=r.exports.napi_wasm_malloc(4104),d=p+8,h=p+8+4096;function m(){if(0!==o())throw new Error(`Invalid async state ${o()}, expected 0.`)}return new Int32Array(e.memory.buffer,p).set([d,h]),v=(r,a,l)=>{if(2===o())return u(),null!=n&&e.createValue(n,a),null!=s&&e.createValue(s,l),void(t=n=s=null);m(),t=e.get(r),i(p)},async function(e){m();let r=a.bundle(e);for(;1===o();){l();try{n=await t}catch(e){s=e}m(),c(p),r=a.bundle(e)}return m(),r}}(t),k=t.exports})),await S})().then((()=>{window.patternCss.transform=x})),t().use(((e,t)=>{if(e.path?.includes("wp/v2/block-renderer")){let{data:n,body:s}=e;const[r,a=""]=e.path.split("?"),o=new URLSearchParams(a);vn.forEach((e=>o.delete(`attributes[${e}]`)));const i=`${r}?${o.toString()}`;if(n?.attributes){const{...e}=n.attributes;vn.forEach((t=>delete e[t])),n={...n,attributes:e}}if("string"==typeof s)try{const e=JSON.parse(s);e?.attributes&&(vn.forEach((t=>delete e.attributes[t])),s=JSON.stringify(e))}catch{}return t({...e,path:i,data:n,body:s})}return t(e)}));const wn=(e,t,n)=>{const s=new Set([e.className?.split(" "),n.className?.split(" ")].flat().filter(Boolean)),{pcssClassId:r}=n;return!r||s.has(r)?e:(s.add(r),{...e,className:[...s].join(" ")})};(0,n.addFilter)("blocks.registerBlockType","kevinbatdorf/pcss-block-settings",(e=>{const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{const n=t?.(e)??{};return wn(n,0,e)},{...e,attributes:{...e?.attributes??{},...bn}}})),(0,n.addFilter)("editor.BlockEdit","kevinbatdorf/pcss-block-control",(e=>t=>((e,t)=>{const n=(0,T.useRef)(null),[s,r]=(0,T.useState)([]),a=(0,C.useSelect)((e=>{const{isSavingPost:t,isAutosavingPost:n}=e(L.store);return t()||n()}),[]),{open:o,setOpen:i}=J(),{open:l,setOpen:c}=K(),{attributes:u,setAttributes:p,clientId:d}=t,{pcssClassId:h,pcssAdditionalCss:m,pcssAdditionalCssCompiled:g,className:f}=u,[y,_]=(0,T.useState)(m),[b,v]=(0,T.useState)(),[w,k]=(0,T.useState)(g||"");(0,j.useStyleOverride)({id:`pcss-styles-block-${h}`,css:w});const S="[block] {\n  \n}",N=(0,T.useCallback)((e=>{if(void 0===e)return void _(void 0);if(r([]),_(O(e)),!window.patternCss?.transform)return;const t=window.patternCss.transform({filename:"raw.css",code:(new TextEncoder).encode(e),minify:!0,errorRecovery:!0,visitor:{Rule:{import:()=>[],"font-face":()=>[],keyframes:()=>[],page:()=>[],"counter-style":()=>[],"view-transition":()=>[],namespace:()=>[]},Selector(e){const{name:t,type:n}=e[0],{name:s,type:r}=window.patternCss.selectorOverride||{};return"attribute"===n&&"block"===t||n===r&&t===s?[{...e[0],type:"class",name:h},...e.slice(1)]:"nesting"===e[0].type?e:[{type:"class",name:h},{type:"combinator",value:"descendant"},...e]}}});t.warnings.length>0?r(t.warnings):v(t.code)}),[h]);return(0,T.useEffect)((()=>{m&&N(m)}),[N,m]),(0,T.useEffect)((()=>{void 0!==b&&k((new TextDecoder).decode(b))}),[b]),(0,T.useEffect)((()=>{if(void 0===y)return;p({pcssAdditionalCss:y,pcssClassId:h||`pcss-${d?.split("-")[0]}`});const e=f?.split(" ")||[];e?.includes(h)||p({className:E(e,h)})}),[y,p,h,d,f]),(0,T.useEffect)((()=>{if(!h||!a)return;const e=f?.split(" ")||[];if(e?.find((e=>e.startsWith(h))))return;const t=E(e,h);p({className:t})}),[a,f,h,p]),(0,T.useEffect)((()=>{w!==g&&p({pcssAdditionalCssCompiled:w})}),[w,p,g]),(0,Yt.jsxs)(Yt.Fragment,{children:[e&&(0,Yt.jsx)(e,{...t}),(0,Yt.jsx)(j.InspectorControls,{children:(0,Yt.jsxs)(P.PanelBody,{title:"Pattern CSS",initialOpen:!1,className:"pattern-css-editor",children:[(0,Yt.jsx)(hn,{children:(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)("div",{className:"overfow-x-hidden relative flex-grow overflow-y-auto border border-solid border-gray-600",ref:n,children:(0,Yt.jsx)(Zt,{value:y??S,"data-cy":"pcss-editor-block",onChange:N,onFocus:e=>{e.target.value===S&&(e=>{const t=e.value.split("\n"),n=t[0].length+t[1].length+1;requestAnimationFrame((()=>{e.focus(),e.setSelectionRange(n,n)}))})(e.target)},lineOptions:s.map((({loc:e})=>({line:e.line,classes:["line-error"]})))})}),(0,Yt.jsx)("div",{children:(0,Yt.jsx)(en,{handleChange:N,popoutOpen:o,setPopoutOpen:i,globalEditorOpen:l,setGlobalEditorOpen:c,editorWrapperRef:n})})]})}),(0,Yt.jsx)("p",{className:"m-0 my-2 text-xs text-gray-700",dangerouslySetInnerHTML:{__html:(0,A.sprintf)(
     10(0,A.__)("Clear","pattern-css")})})]})]})},nn=(e,t,n)=>Math.max(t,Math.min(e,n)),sn=()=>{const e=document.querySelectorAll(".pattern-css-floating-window");return Math.max(...Array.from(e).map((e=>{const t=window.getComputedStyle(e).zIndex;return"auto"===t?0:parseInt(t,10)})))},rn=({ref:e,open:t,initialPosition:n,onDragEnd:s})=>{const r=(0,T.useRef)({x:0,y:0}),a=(0,T.useRef)(null),o=(0,T.useRef)({x:n.x,y:n.y});(0,T.useLayoutEffect)((()=>{const n=e.current;if(!n||!t)return;const s=window.innerWidth-n.offsetWidth,r=window.innerHeight-n.offsetHeight,a=parseFloat(n.style.left)||0,o=parseFloat(n.style.top)||0,i=nn(a,0,s),l=nn(o,0,r);a===i&&o===l||(n.style.left=`${i}px`,n.style.top=`${l}px`)}),[e,t]),(0,T.useLayoutEffect)((()=>{const i=e.current,l=document.getElementById("wpwrap");if(!i||!t||!l)return;const c=i.querySelector("[data-pcss-handle]");if(!(c instanceof HTMLElement))return;i.style.position="fixed",i.style.left=`${n.x}px`,i.style.top=`${n.y}px`;const u=e=>{if(e.preventDefault(),e.stopPropagation(),l.style.pointerEvents="none",null!==a.current)return;const t=sn();i.style.setProperty("z-index",`${t+1}`,"important"),a.current=e.pointerId,c.setPointerCapture(e.pointerId),r.current={x:e.clientX-i.offsetLeft,y:e.clientY-i.offsetTop},document.addEventListener("pointermove",p),document.addEventListener("pointerup",d)},p=e=>{const t=window.innerWidth-c.offsetWidth,n=window.innerHeight-c.offsetHeight,s=nn(e.clientX-r.current.x,0,t),a=nn(e.clientY-r.current.y,0,n);i.style.left=`${s}px`,i.style.top=`${a}px`,o.current={x:s,y:a}},d=e=>{l.style.pointerEvents="auto",a.current===e.pointerId&&(a.current=null,c.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d),s(o.current.x,o.current.y))},h=()=>d(new PointerEvent("pointerup")),m=e=>(e.preventDefault(),e.stopPropagation(),!1);return c.addEventListener("pointerdown",u),c.addEventListener("contextmenu",m),c.addEventListener("blur",h),()=>{c.removeEventListener("pointerdown",u),c.removeEventListener("blur",h),c.removeEventListener("contextmenu",m),document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d),l.style.pointerEvents="auto",null!==a.current&&(c.releasePointerCapture(a.current),a.current=null)}}),[e,t,n.x,n.y,s])},an=e=>{const[t,n]=(0,T.useState)(null);return(0,T.useEffect)((()=>{let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.appendChild(t)),n(t),()=>t.remove()}),[e]),t},on=({ref:e,open:t,initialSize:n,onResizeEnd:s,minWidth:r=250,minHeight:a=400,maxWidth:o=window.innerWidth,maxHeight:i=window.innerHeight})=>{const l=(0,T.useRef)({x:0,y:0,width:0,height:0}),c=(0,T.useRef)(null);(0,T.useLayoutEffect)((()=>{const u=e.current,p=document.getElementById("wpwrap");if(!u||!t||!p)return;u.style.width=`${n.width}px`,u.style.height=`${n.height}px`;const d=u.querySelector("[data-pcss-resize]");if(!(d instanceof HTMLElement))return;const h=e=>{if(e.preventDefault(),e.stopPropagation(),p.style.pointerEvents="none",null!==c.current)return;const t=sn();u.style.setProperty("z-index",`${t+1}`,"important"),c.current=e.pointerId,d.setPointerCapture(e.pointerId),l.current={x:e.clientX,y:e.clientY,width:u.offsetWidth,height:u.offsetHeight},document.addEventListener("pointermove",m),document.addEventListener("pointerup",g)},m=e=>{const t=u.getBoundingClientRect(),n=Math.min(o,window.innerWidth-t.left),s=Math.min(i,window.innerHeight-t.top),c=nn(l.current.width+(e.clientX-l.current.x),r,n),p=nn(l.current.height+(e.clientY-l.current.y),a,s);u.style.width=`${c}px`,u.style.height=`${p}px`},g=e=>{if(p.style.pointerEvents="auto",c.current!==e.pointerId)return;c.current=null,d.releasePointerCapture(e.pointerId),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g);const t=u.getBoundingClientRect(),n=Math.min(o,window.innerWidth-t.left),h=Math.min(i,window.innerHeight-t.top),f=nn(l.current.width+(e.clientX-l.current.x),r,n),y=nn(l.current.height+(e.clientY-l.current.y),a,h);s(f,y)};return d.addEventListener("pointerdown",h),()=>{d.removeEventListener("pointerdown",h),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g),p.style.pointerEvents="auto",null!==c.current&&(d.releasePointerCapture(c.current),c.current=null)}}),[e,t,n.width,n.height,s,r,a,o,i])},ln=(0,T.forwardRef)((({icon:e,size:t=24,...n},s)=>(0,T.cloneElement)(e,{width:t,height:t,...n,ref:s}))),cn=window.wp.primitives,un=(0,Zt.jsx)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Zt.jsx)(cn.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),pn=(0,Zt.jsx)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Zt.jsx)(cn.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})}),dn=(0,T.forwardRef)((({label:e,transparent:t,top:n,left:s,width:r,height:a,setOpen:o,children:i,mountNode:l},c)=>((0,T.useLayoutEffect)((()=>{const e=c.current;if(!e)return;const t=sn();e.style.setProperty("z-index",`${t+1}`,"important")}),[c]),(0,T.createPortal)((0,Zt.jsx)("div",{className:"pattern-css-editor",children:(0,Zt.jsxs)("div",{className:"pattern-css-floating-window fixed z-high flex flex-col border border-solid border-gray-300 font-jetbrains-mono shadow-2xl "+(t?"bg-white/90":"bg-white"),style:{top:n,left:s,width:r,height:a},ref:c,children:[(0,Zt.jsxs)("div",{className:"flex flex-shrink-0 items-center justify-between",children:[(0,Zt.jsxs)("div",{"data-pcss-handle":!0,draggable:!0,className:"flex flex-grow cursor-grab items-center justify-between gap-1 p-2 py-3",children:[(0,Zt.jsx)(hn,{}),(0,Zt.jsx)("h2",{className:"m-0 h-full flex-grow p-0 text-sm font-medium text-gray-900",children:e})]}),(0,Zt.jsx)(P.Button,{className:"relative z-10 border-0 p-2",onClick:()=>o(!1),icon:(0,Zt.jsx)(ln,{icon:un,size:12}),label:(0,A.__)("Close Modal","pattern-css"),showTooltip:!1})]}),(0,Zt.jsx)("div",{className:"relative z-50 flex min-h-0 flex-grow flex-col px-4 pb-4",children:i}),(0,Zt.jsx)("div",{"data-pcss-resize":!0,className:"absolute -bottom-1 -right-1 z-high h-6 w-6",children:(0,Zt.jsx)("div",{className:"h-6 w-6 cursor-se-resize border border-l-0 border-t-0 border-solid border-transparent transition-colors duration-300 hover:border-gray-600 active:border-gray-600"})})]})}),l)))),hn=e=>(0,Zt.jsxs)("div",{style:{userSelect:"none"},className:"relative flex text-gray-900 hover:text-gray-700",...e,children:[(0,Zt.jsx)(ln,{icon:pn,size:24}),(0,Zt.jsx)("span",{className:"sr-only",children:(0,A.__)("Drag to move","pattern-css")})]}),mn=({children:e})=>{const t=an("pcss-popout-mount"),n=(0,T.useRef)(null),{open:s,transparent:r,x:a,y:o,width:i,height:l,setOpen:c,setSize:u,setPosition:p}=X();return rn({ref:n,open:s,initialPosition:{x:a,y:o},onDragEnd:(e,t)=>{p(e,t)}}),on({ref:n,open:s,initialSize:{width:i,height:l},onResizeEnd:(e,t)=>{u(e,t)}}),t&&s?(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(gn,{}),(0,Zt.jsx)(dn,{label:"Pattern CSS",transparent:r,top:a,left:o,width:i,height:l,setOpen:c,mountNode:t,ref:n,children:e})]}):e},gn=()=>{const{setSize:e,setPosition:t,transparent:n,setTransparent:s}=X();return(0,Zt.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,Zt.jsx)("div",{className:"flex h-52 items-center justify-center bg-gray-100 p-4 text-gray-900",children:(0,A.__)("Popout is open","pattern-css")}),(0,Zt.jsxs)(P.BaseControl,{id:"pcss-enable-transparency",children:[(0,Zt.jsx)(P.CheckboxControl,{label:(0,A.__)("Transparent background","pattern-css"),checked:n,onChange:e=>{s(e)}}),(0,Zt.jsx)(P.Button,{variant:"secondary",onClick:()=>{t(20,20),e(250,400)},children:(0,A.__)("Reset Position","pattern-css")})]})]})},fn=(0,Zt.jsx)(cn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Zt.jsx)(cn.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),yn=()=>{const e=an("pcss-popout-global-mount"),t=(0,T.useRef)(null),[n,s]=(0,T.useState)(window.patternCss?.globalCssCompiled||"");(0,j.useStyleOverride)({id:"pcss-styles-global",css:n});const{open:r,transparent:a,x:o,y:i,width:l,height:c,setOpen:u,setSize:p,setTransparent:d,setPosition:h}=J();rn({ref:t,open:r,initialPosition:{x:o,y:i},onDragEnd:(e,t)=>{h(e,t)}}),on({ref:t,open:r,initialSize:{width:l,height:c},onResizeEnd:(e,t)=>{p(e,t)}});const m=e&&r;return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(L.PluginMoreMenuItem,{"data-cy":"global-css-editor-btn",icon:"tool",onClick:()=>u(!0),children:(0,A.__)("Add Global CSS (Pattern CSS)","pattern-css")}),m?(0,Zt.jsxs)(dn,{label:(0,A.sprintf)((0,A.__)("%s (Global)","pattern-css"),"Pattern CSS"),transparent:a,top:o,left:i,width:l,height:c,setOpen:u,mountNode:e,ref:t,children:[(0,Zt.jsx)(bn,{initialCss:window.patternCss?.globalCss||"",compiledCss:n,setCompiled:s}),(0,Zt.jsx)(P.CheckboxControl,{label:(0,A.__)("Transparent background","pattern-css"),className:"disable-mb-checkbox mt-2",checked:a,onChange:e=>{d(e)}})]}):null]})},bn=({initialCss:e,compiledCss:n,setCompiled:s})=>{const r=(0,T.useRef)(null),[a,o]=(0,T.useState)([]),[i,l]=(0,T.useState)(e),[c,u]=(0,T.useState)(),[p,d]=(0,T.useState)("idle"),h=(0,T.useCallback)((e=>{if(o([]),l(R(e)),!window.patternCss?.transform)return;const t=window.patternCss.transform({filename:"raw.css",code:(new TextEncoder).encode(e),minify:!0,errorRecovery:!0});t.warnings.length>0?o(t.warnings):u(t.code)}),[]);return(0,T.useEffect)((()=>{e&&h(e)}),[h,e]),(0,T.useEffect)((()=>{void 0!==c&&s((new TextDecoder).decode(c))}),[c,s]),(0,T.useEffect)((()=>{window.patternCss.globalCss=i,window.patternCss.globalCssCompiled=n,d("saving");const e=setTimeout((()=>{t()({path:"/pattern-css/v1/global-css",method:"POST",data:{global_css:i,global_css_compiled:n}}).then((()=>d("saved")))}),750);return()=>clearTimeout(e)}),[n,i]),(0,T.useEffect)((()=>{if("saved"!==p)return;const e=setTimeout((()=>d("idle")),1500);return()=>clearTimeout(e)}),[p]),(0,Zt.jsxs)("div",{className:"relative flex min-h-0 flex-grow flex-col",children:[(0,Zt.jsx)("div",{className:"min-h-0 flex-grow overflow-y-auto overflow-x-hidden border border-solid border-gray-600",ref:r,children:(0,Zt.jsx)(en,{value:i,onChange:h,lineOptions:a.map((({loc:e})=>({line:e.line,classes:["line-error"]})))})}),"saving"===p&&(0,Zt.jsx)("div",{className:"absolute bottom-px right-1 z-10 flex items-center justify-center bg-white p-1",children:(0,Zt.jsx)("span",{className:"text-sm text-gray-700",children:(0,A.__)("Saving...","pattern-css")})}),"saved"===p&&(0,Zt.jsxs)("div",{className:"absolute bottom-px right-1 z-10 flex items-center justify-center bg-white p-1",children:[(0,Zt.jsx)(ln,{icon:fn,size:20,className:"stroke-gray-700",color:"currentColor"}),(0,Zt.jsx)("span",{className:"text-sm text-gray-700",children:(0,A.__)("Saved!","pattern-css")})]})]})},vn={pcssAdditionalCss:{type:"string"},pcssAdditionalCssCompiled:{type:"string",default:""},pcssClassId:{type:"string",default:""}},wn=Object.keys(vn);(async function(e){if(k)return;if(S)return void await S;let t;("string"==typeof(e=e??new URL(o(229),o.b))||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=async function(e){try{return(await o.e(996).then(o.t.bind(o,996,19))).readFileSync(e)}catch{return fetch(e)}}(e)),S=e.then((e=>async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(e,{env:{...b,await_promise_sync:w,__getrandom_v03_custom:(e,n)=>{let s=t.memory.subarray(e,e+n);crypto.getRandomValues(s)}}}))).then((({instance:e})=>{e.exports.register_module(),t=new i(e),N=function(e){let t,n,s,{instance:r,exports:a}=e,{asyncify_get_state:o,asyncify_start_unwind:i,asyncify_stop_unwind:l,asyncify_start_rewind:c,asyncify_stop_rewind:u}=r.exports,p=r.exports.napi_wasm_malloc(4104),d=p+8,h=p+8+4096;function m(){if(0!==o())throw new Error(`Invalid async state ${o()}, expected 0.`)}return new Int32Array(e.memory.buffer,p).set([d,h]),v=(r,a,l)=>{if(2===o())return u(),null!=n&&e.createValue(n,a),null!=s&&e.createValue(s,l),void(t=n=s=null);m(),t=e.get(r),i(p)},async function(e){m();let r=a.bundle(e);for(;1===o();){l();try{n=await t}catch(e){s=e}m(),c(p),r=a.bundle(e)}return m(),r}}(t),k=t.exports})),await S})().then((()=>{window.patternCss.transform=x})),t().use(((e,t)=>{if(e.path?.includes("wp/v2/block-renderer")){let{data:n,body:s}=e;const[r,a=""]=e.path.split("?"),o=new URLSearchParams(a);for(const e of wn)o.delete(`attributes[${e}]`);const i=`${r}?${o.toString()}`;if(n?.attributes){const{...e}=n.attributes;for(const t of wn)delete e[t];n={...n,attributes:e}}if("string"==typeof s)try{const e=JSON.parse(s);if(e?.attributes){for(const t of wn)delete e.attributes[t];s=JSON.stringify(e)}}catch{}return t({...e,path:i,data:n,body:s})}return t(e)}));const kn=(e,t,n)=>{const s="string"==typeof e.className?e.className:"",r="string"==typeof n.className?n.className:"",a=new Set([...s.split(" "),...r.split(" ")].filter(Boolean)),o=n.pcssClassId;return"string"!=typeof o||!o||a.has(o)?e:(a.add(o),{...e,className:[...a].join(" ")})};(0,n.addFilter)("blocks.registerBlockType","kevinbatdorf/pcss-block-settings",(e=>{const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{const n=t?.(e)??{};return kn(n,0,e)},{...e,attributes:{...e?.attributes??{},...vn}}})),(0,n.addFilter)("editor.BlockEdit","kevinbatdorf/pcss-block-control",(e=>t=>((e,t)=>{const n=(0,T.useRef)(null),[s,r]=(0,T.useState)([]),a=(0,C.useSelect)((e=>{const{isSavingPost:t,isAutosavingPost:n}=e(L.store);return t()||n()}),[]),{open:o,setOpen:i}=X(),{open:l,setOpen:c}=J(),{attributes:u,setAttributes:p,clientId:d}=t,h=u.pcssClassId,m=u.pcssAdditionalCss,g=u.pcssAdditionalCssCompiled,f=u.className,y=(0,C.useSelect)((e=>{if(!h)return!1;const{getClientIdsWithDescendants:t,getBlockAttributes:n}=e(j.store);return t().some((e=>e!==d&&n(e)?.pcssClassId===h))}),[h,d]),_=(0,T.useCallback)((()=>{const e=`pcss-${Math.random().toString(36).substring(2,10)}`,t=f?.split(" ")||[],n=[...new Set([...t.filter((e=>e!==h&&!e.startsWith("pcss-"))),e].filter(Boolean))].join(" ");p({pcssClassId:e,className:n}),v(e)}),[f,p]),[b,v]=(0,T.useState)(h??""),[w,k]=(0,T.useState)(m),[S,N]=(0,T.useState)(),[x,I]=(0,T.useState)(g||"");(0,j.useStyleOverride)({id:`pcss-styles-block-${d}`,css:x});const B="[block] {\n  \n}",M=(0,T.useCallback)((e=>{if(void 0===e)return void k(void 0);if(r([]),k(R(e)),!window.patternCss?.transform)return;const t=window.patternCss.transform({filename:"raw.css",code:(new TextEncoder).encode(e),minify:!0,errorRecovery:!0,visitor:{Rule:{import:()=>[],"font-face":()=>[],keyframes:()=>[],page:()=>[],"counter-style":()=>[],"view-transition":()=>[],namespace:()=>[]},Selector(e){const{name:t,type:n}=e[0],{name:s,type:r}=window.patternCss.selectorOverride||{};return"attribute"===n&&"block"===t||n===r&&t===s?[{...e[0],type:"class",name:h},...e.slice(1)]:"nesting"===e[0].type?e:[{type:"class",name:h},{type:"combinator",value:"descendant"},...e]}}});t.warnings.length>0?r(t.warnings):N(t.code)}),[h]);(0,T.useEffect)((()=>{m&&M(m)}),[M,m]),(0,T.useEffect)((()=>{void 0!==S&&I((new TextDecoder).decode(S))}),[S]),(0,T.useEffect)((()=>{if(void 0===w)return;p({pcssAdditionalCss:w,pcssClassId:h||`pcss-${d?.split("-")[0]}`});const e=f?.split(" ")||[];h&&!e?.includes(h)&&p({className:O(e,h)})}),[w,p,h,d,f]),(0,T.useEffect)((()=>{if(!h||!a)return;const e=f?.split(" ")??[];if(e.find((e=>e.startsWith(h))))return;const t=O(e,h);p({className:t})}),[a,f,h,p]),(0,T.useEffect)((()=>{x!==g&&p({pcssAdditionalCssCompiled:x})}),[x,p,g]);const D=e;return(0,Zt.jsxs)(Zt.Fragment,{children:[D&&(0,Zt.jsx)(D,{...t}),(0,Zt.jsx)(j.InspectorControls,{children:(0,Zt.jsxs)(P.PanelBody,{title:"Pattern CSS",initialOpen:!1,className:"pattern-css-editor",children:[y&&(0,Zt.jsxs)(P.Notice,{status:"warning",isDismissible:!1,className:"mb-4",children:[(0,Zt.jsx)("p",{style:{margin:"0 0 8px"},children:(0,A.sprintf)((0,A.__)("Another block on this page is using the same ID (%s). Styles may conflict or be duplicated on the frontend.","pattern-css"),h??"")}),(0,Zt.jsx)(P.Button,{variant:"secondary",size:"small",onClick:_,children:(0,A.__)("Generate New ID","pattern-css")})]}),(0,Zt.jsxs)(mn,{children:[(0,Zt.jsx)("div",{className:"overfow-x-hidden relative flex-grow overflow-y-auto border border-solid border-gray-600",ref:n,children:(0,Zt.jsx)(en,{value:w??B,"data-cy":"pcss-editor-block",onChange:M,onFocus:e=>{const t=e;t.target.value===B&&(e=>{const t=e.value.split("\n"),n=t[0].length+t[1].length+1;requestAnimationFrame((()=>{e.focus(),e.setSelectionRange(n,n)}))})(t.target)},lineOptions:s.map((({loc:e})=>({line:e.line,classes:["line-error"]})))})}),(0,Zt.jsx)("div",{children:(0,Zt.jsx)(tn,{handleChange:M,popoutOpen:o,setPopoutOpen:i,globalEditorOpen:l,setGlobalEditorOpen:c,editorWrapperRef:n})})]}),(0,Zt.jsx)("p",{className:"m-0 my-2 text-xs text-gray-700",dangerouslySetInnerHTML:{__html:(0,A.sprintf)(
    1111// translators: %1$s = opening <a> tag, %2$s = closing </a> tag.
    1212// translators: %1$s = opening <a> tag, %2$s = closing </a> tag.
    13 (0,A.__)("See the %1$splugin readme%2$s for examples.","pattern-css"),'<a href="https://wordpress.org/plugins/pattern-css#opens-in-a-new-tab" target="_blank" rel="noreferrer noopener" class="text-wp-theme-500">',"</a>")}})]})}),(0,Yt.jsx)(j.InspectorAdvancedControls,{children:(0,Yt.jsxs)(P.BaseControl,{id:"pcss-css-id-setting",className:"pattern-css-editor",children:[(0,Yt.jsx)(P.TextControl,{spellCheck:!1,autoComplete:"off","data-cy":"class-id",type:"text",label:(0,A.sprintf)((0,A.__)("%s ID","pattern-css"),"Pattern CSS"),disabled:!0,onChange:()=>{},value:h}),(0,Yt.jsx)(P.Button,{variant:"secondary",className:"-mt-2",onClick:()=>{const e=`pcss-${Math.random().toString(36).substring(2,10)}`,t=f?.split(" ")||[],n=[...new Set([...t.filter((e=>!e.startsWith("pcss-"))),e].filter(Boolean))].join(" ");p({pcssClassId:e,className:n})},children:(0,A.__)("Generate New ID","pattern-css")}),(0,Yt.jsx)("p",{className:"text-md mt-2 text-gray-600",children:(0,A.__)("If there's a styling conflict with another block you can generate a new ID.","pattern-css")})]})})]})})(e,t)),Number.MAX_SAFE_INTEGER),(0,n.addFilter)("blocks.getSaveContent.extraProps","kevinbatdorf/pcss-add-save-props",wn),(0,s.registerPlugin)("pcss-global-editor",{render:()=>(0,Yt.jsx)(fn,{})})})()})();
     13(0,A.__)("See the %1$splugin readme%2$s for examples.","pattern-css"),'<a href="https://wordpress.org/plugins/pattern-css#opens-in-a-new-tab" target="_blank" rel="noreferrer noopener" class="text-wp-theme-500">',"</a>")}})]})}),(0,Zt.jsx)(j.InspectorAdvancedControls,{children:(0,Zt.jsxs)(P.BaseControl,{id:"pcss-css-id-setting",className:"pattern-css-editor",children:[(0,Zt.jsx)(P.TextControl,{spellCheck:!1,autoComplete:"off","data-cy":"class-id",type:"text",label:(0,A.sprintf)((0,A.__)("%s ID","pattern-css"),"Pattern CSS"),disabled:!window.patternCss?.allowManualOverride,onChange:e=>{v(e)},value:b}),(0,Zt.jsxs)("div",{className:"-mt-2 flex gap-2",children:[window.patternCss?.allowManualOverride&&b!==h&&(0,Zt.jsx)(P.Button,{variant:"primary",size:"small",onClick:()=>{const e=(0,E.cleanForSlug)(b);v(e);const t=f?.split(" ")||[],n=[...new Set([...t.filter((e=>e!==h)),e].filter(Boolean))].join(" ");p({pcssClassId:e,className:n})},children:(0,A.__)("Apply","pattern-css")}),(0,Zt.jsx)(P.Button,{variant:"secondary",size:"small",onClick:_,children:(0,A.__)("Generate New ID","pattern-css")})]}),(0,Zt.jsx)("p",{className:"text-md mt-2 text-gray-600",children:(0,A.__)("If there's a styling conflict with another block you can generate a new ID.","pattern-css")})]})})]})})(e,t)),Number.MAX_SAFE_INTEGER),(0,n.addFilter)("blocks.getSaveContent.extraProps","kevinbatdorf/pcss-add-save-props",kn),(0,s.registerPlugin)("pcss-global-editor",{render:()=>(0,Zt.jsx)(yn,{})})})()})();
  • pattern-css/trunk/package.json

    r3488380 r3490244  
    88    "scripts": {
    99        "build": "wp-scripts build",
    10         "format": "wp-scripts format",
    11         "lint:css": "wp-scripts lint-style",
    12         "lint:js": "wp-scripts lint-js",
     10        "format": "biome format --write .",
     11        "lint": "biome check .",
     12        "lint:fix": "biome check --fix .",
    1313        "packages-update": "ncu -u --reject shiki,tailwindcss && ncu -u --target minor '/^tailwind/'",
    1414        "plugin-zip": "wp-scripts plugin-zip",
    1515        "start": "wp-scripts start",
     16        "test:e2e": "npx playwright test",
     17        "test:e2e:ui": "npx playwright test --ui",
    1618        "eject": "node scripts/eject.mjs",
    1719        "rename": "node scripts/rename.mjs"
    1820    },
    1921    "devDependencies": {
    20         "@trivago/prettier-plugin-sort-imports": "^6.0.2",
     22        "@biomejs/biome": "^2.4.8",
    2123        "@types/wordpress__block-editor": "^15.0.5",
    2224        "@types/wordpress__blocks": "^15.10.2",
     
    2426        "@types/wordpress__editor": "^14.12.0",
    2527        "@types/wordpress__plugins": "^6.0.0",
    26         "@typescript-eslint/eslint-plugin": "^8.44.1",
    27         "@typescript-eslint/parser": "^8.44.1",
    2828        "@wordpress/block-editor": "^15.15.0",
    29         "@wordpress/env": "^11.2.0",
     29        "@playwright/test": "^1.58.2",
     30        "@wordpress/e2e-test-utils-playwright": "^1.42.0",
    3031        "@wordpress/scripts": "^31.7.0",
    3132        "@wordpress/url": "^4.42.0",
     33        "@wp-playground/cli": "^3.1.13",
    3234        "autoprefixer": "^10.4.27",
    33         "cypress": "^15.12.0",
    34         "cypress-wait-until": "^3.0.2",
    35         "eslint": "^8.57.1",
    36         "eslint-config-prettier": "^9.1.0",
    37         "eslint-plugin-cypress": "^3.6.0",
    38         "eslint-plugin-no-only-tests": "^3.3.0",
    39         "eslint-plugin-prettier": "^5.2.3",
    40         "eslint-plugin-react": "^7.37.4",
    41         "eslint-plugin-react-hooks": "^4.6.2",
    4235        "fast-glob": "^3.3.3",
    4336        "glob": "^13.0.6",
    4437        "postcss-import": "^16.1.1",
    4538        "postcss-safe-important": "^2.0.1",
    46         "prettier": "^3.8.1",
    47         "prettier-plugin-tailwindcss": "^0.7.2",
    4839        "replace-in-file": "^8.4.0",
    4940        "tailwindcss": "^3.4.19",
    50         "typescript": "^5.9.3"
     41        "typescript": "^6.0.2"
    5142    },
    5243    "dependencies": {
  • pattern-css/trunk/pattern-css.php

    r3488380 r3490244  
    66 * Requires at least: 6.7
    77 * Requires PHP:      7.0
    8  * Version:           1.5.4
     8 * Version:           1.5.5
    99 * Author:            Kevin Batdorf
    1010 * Author URI:        https://twitter.com/kevinbatdorf
     
    4343            'globalCss' => get_option('pcss_global_css', ''),
    4444            'globalCssCompiled' => get_option('pcss_global_css_compiled', ''),
     45            'allowManualOverride' => defined('PATTERN_CSS_ALLOW_MANUAL_OVERRIDE'),
    4546        ]) . ';',
    4647        'before'
     
    7172
    7273    if (empty($pcss_block_id) || empty($pcss_additional_css)) return $pre_render;
     74    // Skip if already registered (e.g. same block in a Query Loop)
     75    if (wp_style_is("pcss-block-{$pcss_block_id}", 'registered')) return $pre_render;
    7376
    7477    wp_register_style("pcss-block-{$pcss_block_id}", false, [], null);
  • pattern-css/trunk/readme.txt

    r3488380 r3490244  
    33Tags:              block, css, styles, inline, editor
    44Tested up to:      7.0
    5 Stable tag:        1.5.4
     5Stable tag:        1.5.5
    66License:           GPL-2.0-or-later
    77License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     
    133133`define('PATTERN_CSS_SELECTOR_OVERRIDE', ['name' => 'foo', 'type' => 'type']);`
    134134
     135= Can I manually set the class ID? =
     136
     137By default, class IDs are auto-generated. If you need to manually set or change a block's class ID (e.g. to match an existing class), you can enable this by adding the following constant to wp-config.php or functions.php:
     138
     139`define('PATTERN_CSS_ALLOW_MANUAL_OVERRIDE', true);`
     140
     141Once enabled, the ID field in the Advanced panel becomes editable. Type your desired class name and press "Apply" to save it. The value will be slugified automatically.
     142
    135143== Screenshots ==
    136144
     
    141149
    142150== Changelog ==
     151
     152= 1.5.5 - 2026-03-24 =
     153- Added manual class ID override (opt-in via constant)
     154- Warns when duplicate class IDs are detected in the editor
     155- Prevents duplicate inline styles on the frontend
     156- Switched to Biome for linting and formatting
     157- Switched to Playwright and WP Playground for testing
    143158
    144159= 1.5.4 - 2026-03-23 =
  • pattern-css/trunk/src/components/BlockControl.tsx

    r3488380 r3490244  
    11import {
     2    store as blockEditorStore,
    23    InspectorAdvancedControls,
    34    InspectorControls,
     5    // @ts-expect-error -- outdated types
     6    useStyleOverride,
    47} from '@wordpress/block-editor';
    5 import { useStyleOverride } from '@wordpress/block-editor';
    68import {
     9    BaseControl,
     10    Button,
     11    Notice,
    712    PanelBody,
    8     BaseControl,
    913    TextControl,
    10     Button,
    1114} from '@wordpress/components';
    1215import { useSelect } from '@wordpress/data';
    1316import { store as coreStore } from '@wordpress/editor';
    14 import { useEffect, useState, useCallback, useRef } from '@wordpress/element';
    15 import { sprintf, __ } from '@wordpress/i18n';
    16 import { Warning as CssWarning } from 'lightningcss-wasm';
     17import { useCallback, useEffect, useRef, useState } from '@wordpress/element';
     18import { __, sprintf } from '@wordpress/i18n';
     19import { cleanForSlug } from '@wordpress/url';
     20import type { Warning as CssWarning } from 'lightningcss-wasm';
    1721import { addToClassList } from '../lib/classes';
    1822import { focusAtEndOfLine2 } from '../lib/dom';
     
    2428import { PopoutEditor } from './PopoutEditor';
    2529
     30export interface BlockControlProps {
     31    attributes: Record<string, unknown>;
     32    setAttributes: (attrs: Record<string, unknown>) => void;
     33    clientId: string;
     34}
     35
    2636export const BlockControl = (
    27     // eslint-disable-next-line
    28     CurrentMenuItems: any,
    29     // eslint-disable-next-line
    30     props: any,
     37    CurrentMenuItems: unknown,
     38    props: BlockControlProps,
    3139) => {
    3240    const editorWrapperRef = useRef<HTMLDivElement>(null);
    3341    const [warnings, setWarnings] = useState<CssWarning[]>([]);
    3442    const isSaving = useSelect((select) => {
    35         // eslint-disable-next-line
    36         // @ts-ignore-next-line
    3743        const { isSavingPost, isAutosavingPost } = select(coreStore);
    3844        return isSavingPost() || isAutosavingPost();
     
    4248        useGlobalEditorStore();
    4349    const { attributes, setAttributes, clientId: blockId } = props;
    44     const {
    45         pcssClassId,
    46         pcssAdditionalCss: initialCss,
    47         pcssAdditionalCssCompiled: compiledCss,
    48         className: existingClasses,
    49     } = attributes;
    50 
     50    const pcssClassId = attributes.pcssClassId as string | undefined;
     51    const initialCss = attributes.pcssAdditionalCss as string | undefined;
     52    const compiledCss = attributes.pcssAdditionalCssCompiled as
     53        | string
     54        | undefined;
     55    const existingClasses = attributes.className as string | undefined;
     56
     57    const isDuplicateId = useSelect(
     58        (select) => {
     59            if (!pcssClassId) return false;
     60            const { getClientIdsWithDescendants, getBlockAttributes } =
     61                select(blockEditorStore);
     62            return getClientIdsWithDescendants().some(
     63                (id: string) =>
     64                    id !== blockId &&
     65                    getBlockAttributes(id)?.pcssClassId === pcssClassId,
     66            );
     67        },
     68        [pcssClassId, blockId],
     69    );
     70
     71    const generateNewId = useCallback(() => {
     72        const newId = `pcss-${Math.random().toString(36).substring(2, 10)}`;
     73        const existing = existingClasses?.split(' ') || [];
     74        const className = [
     75            ...new Set(
     76                [
     77                    ...existing.filter((c: string) => c !== pcssClassId && !c.startsWith('pcss-')),
     78                    newId,
     79                ].filter(Boolean),
     80            ),
     81        ].join(' ');
     82        setAttributes({ pcssClassId: newId, className });
     83        setManualClassId(newId);
     84    }, [existingClasses, setAttributes]);
     85
     86    const [manualClassId, setManualClassId] = useState(pcssClassId ?? '');
    5187    const [css, setCss] = useState(initialCss);
    5288    const [transformed, setTransformed] = useState<Uint8Array>();
    5389    const [compiled, setCompiled] = useState(compiledCss || '');
    54     useStyleOverride({ id: `pcss-styles-block-${pcssClassId}`, css: compiled });
     90    useStyleOverride({ id: `pcss-styles-block-${blockId}`, css: compiled });
    5591    const defaultCssExample = '[block] {\n  \n}';
    5692
     
    96132                        },
    97133                    },
     134                    // @ts-expect-error -- lightningcss visitor return types are overly strict
    98135                    Selector(selector) {
    99136                        const { name, type } = selector[0] as {
     
    113150                                    ...selector[0],
    114151                                    type: 'class',
    115                                     // eslint-disable-next-line
    116152                                    name: pcssClassId,
    117153                                },
     
    125161                            {
    126162                                type: 'class',
    127                                 // eslint-disable-next-line
    128163                                name: pcssClassId,
    129164                            },
     
    161196        // If they are editing and our class isnt in the list then add it
    162197        const existing = existingClasses?.split(' ') || [];
    163         if (existing?.includes(pcssClassId)) return;
     198        if (!pcssClassId || existing?.includes(pcssClassId)) return;
    164199        setAttributes({ className: addToClassList(existing, pcssClassId) });
    165200    }, [css, setAttributes, pcssClassId, blockId, existingClasses]);
     
    169204    useEffect(() => {
    170205        if (!pcssClassId || !isSaving) return;
    171         const existing = existingClasses?.split(' ') || [];
    172         if (existing?.find((c: string) => c.startsWith(pcssClassId))) return;
     206        const existing = existingClasses?.split(' ') ?? [];
     207        if (existing.find((c: string) => c.startsWith(pcssClassId))) return;
    173208        const className = addToClassList(existing, pcssClassId);
    174209        setAttributes({ className });
     
    180215    }, [compiled, setAttributes, compiledCss]);
    181216
     217    const MenuItems =
     218        CurrentMenuItems as React.ComponentType<BlockControlProps>;
    182219    return (
    183220        <>
    184             {CurrentMenuItems && <CurrentMenuItems {...props} />}
     221            {MenuItems && <MenuItems {...props} />}
    185222            <InspectorControls>
    186223                <PanelBody
    187224                    title="Pattern CSS"
    188225                    initialOpen={false}
    189                     className="pattern-css-editor">
     226                    className="pattern-css-editor"
     227                >
     228                    {isDuplicateId && (
     229                        <Notice
     230                            status="warning"
     231                            isDismissible={false}
     232                            className="mb-4"
     233                        >
     234                            <p style={{ margin: '0 0 8px' }}>
     235                                {sprintf(
     236                                    __(
     237                                        'Another block on this page is using the same ID (%s). Styles may conflict or be duplicated on the frontend.',
     238                                        'pattern-css',
     239                                    ),
     240                                    pcssClassId ?? '',
     241                                )}
     242                            </p>
     243                            <Button
     244                                variant="secondary"
     245                                size="small"
     246                                onClick={generateNewId}
     247                            >
     248                                {__('Generate New ID', 'pattern-css')}
     249                            </Button>
     250                        </Notice>
     251                    )}
    190252                    <PopoutEditor>
    191                         <>
    192                             <div
    193                                 className="overfow-x-hidden relative flex-grow overflow-y-auto border border-solid border-gray-600"
    194                                 ref={editorWrapperRef}>
    195                                 <CodeEditor
    196                                     value={css ?? defaultCssExample}
    197                                     data-cy="pcss-editor-block"
    198                                     onChange={handleChange}
    199                                     onFocus={(e) => {
    200                                         const v = e.target.value;
    201                                         if (v === defaultCssExample) {
    202                                             focusAtEndOfLine2(e.target);
    203                                         }
    204                                     }}
    205                                     lineOptions={warnings.map(({ loc }) => ({
    206                                         line: loc.line,
    207                                         classes: ['line-error'],
    208                                     }))}
    209                                 />
    210                             </div>
    211                             <div>
    212                                 <EditorControls
    213                                     handleChange={handleChange}
    214                                     popoutOpen={popoutOpen}
    215                                     setPopoutOpen={setPopoutOpen}
    216                                     globalEditorOpen={globalEditorOpen}
    217                                     setGlobalEditorOpen={setglobalEditorOpen}
    218                                     editorWrapperRef={editorWrapperRef}
    219                                 />
    220                             </div>
    221                         </>
     253                        <div
     254                            className="overfow-x-hidden relative flex-grow overflow-y-auto border border-solid border-gray-600"
     255                            ref={editorWrapperRef}
     256                        >
     257                            <CodeEditor
     258                                value={css ?? defaultCssExample}
     259                                data-cy="pcss-editor-block"
     260                                onChange={handleChange}
     261                                onFocus={(e: unknown) => {
     262                                    const event =
     263                                        e as React.FocusEvent<HTMLTextAreaElement>;
     264                                    if (
     265                                        event.target.value === defaultCssExample
     266                                    ) {
     267                                        focusAtEndOfLine2(event.target);
     268                                    }
     269                                }}
     270                                lineOptions={warnings.map(({ loc }) => ({
     271                                    line: loc.line,
     272                                    classes: ['line-error'],
     273                                }))}
     274                            />
     275                        </div>
     276                        <div>
     277                            <EditorControls
     278                                handleChange={handleChange}
     279                                popoutOpen={popoutOpen}
     280                                setPopoutOpen={setPopoutOpen}
     281                                globalEditorOpen={globalEditorOpen}
     282                                setGlobalEditorOpen={setglobalEditorOpen}
     283                                editorWrapperRef={editorWrapperRef}
     284                            />
     285                        </div>
    222286                    </PopoutEditor>
    223287                    <p
     
    240304                <BaseControl
    241305                    id="pcss-css-id-setting"
    242                     className="pattern-css-editor">
     306                    className="pattern-css-editor"
     307                >
    243308                    <TextControl
    244309                        spellCheck={false}
     
    251316                            'Pattern CSS',
    252317                        )}
    253                         disabled
    254                         onChange={() => undefined}
    255                         value={pcssClassId}
     318                        disabled={!window.patternCss?.allowManualOverride}
     319                        onChange={(value: string) => {
     320                            setManualClassId(value);
     321                        }}
     322                        value={manualClassId}
    256323                    />
    257                     <Button
    258                         variant="secondary"
    259                         className="-mt-2"
    260                         onClick={() => {
    261                             const pcssClassId = `pcss-${Math.random()
    262                                 .toString(36)
    263                                 .substring(2, 10)}`;
    264                             const existing = existingClasses?.split(' ') || [];
    265                             const className = [
    266                                 ...new Set(
    267                                     [
    268                                         // Remove any existing pcss- classes
    269                                         ...existing.filter(
    270                                             (c: string) =>
    271                                                 !c.startsWith('pcss-'),
     324                    <div className="-mt-2 flex gap-2">
     325                        {window.patternCss?.allowManualOverride && manualClassId !== pcssClassId && (
     326                            <Button
     327                                variant="primary"
     328                                size="small"
     329                                onClick={() => {
     330                                    const slug = cleanForSlug(manualClassId);
     331                                    setManualClassId(slug);
     332                                    const existing = existingClasses?.split(' ') || [];
     333                                    const className = [
     334                                        ...new Set(
     335                                            [
     336                                                ...existing.filter((c: string) => c !== pcssClassId),
     337                                                slug,
     338                                            ].filter(Boolean),
    272339                                        ),
    273                                         pcssClassId,
    274                                     ].filter(Boolean),
    275                                 ),
    276                             ].join(' ');
    277                             setAttributes({ pcssClassId, className });
    278                         }}>
    279                         {__('Generate New ID', 'pattern-css')}
    280                     </Button>
     340                                    ].join(' ');
     341                                    setAttributes({ pcssClassId: slug, className });
     342                                }}
     343                            >
     344                                {__('Apply', 'pattern-css')}
     345                            </Button>
     346                        )}
     347                        <Button
     348                            variant="secondary"
     349                            size="small"
     350                            onClick={generateNewId}
     351                        >
     352                            {__('Generate New ID', 'pattern-css')}
     353                        </Button>
     354                    </div>
    281355                    <p className="text-md mt-2 text-gray-600">
    282356                        {__(
  • pattern-css/trunk/src/components/CodeEditor.tsx

    r3297727 r3490244  
    88    value: string;
    99    onChange: (value: string) => void;
    10     // eslint-disable-next-line
    11     onFocus?: (event: any) => void;
    12     // eslint-disable-next-line
    13     onBlur?: (event: any) => void;
     10    onFocus?: (event: unknown) => void;
     11    onBlur?: (event: unknown) => void;
    1412    lineOptions: LineOption[];
    1513};
     
    4442        <div ref={textAreaRef} className="">
    4543            <Editor
    46                 // eslint-disable-next-line
    47                 // @ts-ignore-next-line
     44                // @ts-expect-error-next-line
    4845                ref={ref}
    4946                value={decodeEntities(value)}
     
    6259                    color: highlighter?.getForegroundColor() ?? '#000',
    6360                }}
    64                 // eslint-disable-next-line
    65                 onKeyDown={(e: any) =>
     61                onKeyDown={(e: React.KeyboardEvent) =>
    6662                    e.key === 'Tab' &&
    6763                    // Tab lock here. Pressing Escape will unlock.
  • pattern-css/trunk/src/components/EditorControls.tsx

    r3297727 r3490244  
    2121}) => {
    2222    const [isHighlighted, setIsHighlighted] = useState(false);
    23     // eslint-disable-next-line
    24     // @ts-ignore-next-line
    2523    const { getSelectedBlockClientId } = useSelect(
    2624        (select) => select(blockEditorStore),
    2725        [],
    2826    );
     27    // @ts-expect-error -- outdated types
    2928    const { toggleBlockHighlight } = useDispatch(blockEditorStore);
    3029    const currentBlockId = getSelectedBlockClientId();
     
    5453                        variant="tertiary"
    5554                        onClick={() => setGlobalEditorOpen(true)}
    56                         className="lowercase hover:bg-gray-100 hover:text-gray-900">
     55                        className="lowercase hover:bg-gray-100 hover:text-gray-900"
     56                    >
    5757                        {
    5858                            // translators: Popout as in Popout the editor
     
    6969                            variant="tertiary"
    7070                            onClick={() => setPopoutOpen(true)}
    71                             className="lowercase hover:bg-gray-100 hover:text-gray-900">
     71                            className="lowercase hover:bg-gray-100 hover:text-gray-900"
     72                        >
    7273                            {
    7374                                // translators: Popout as in Popout the editor
     
    7980                {popoutOpen ? (
    8081                    <Tooltip
    81                         text={__('Highlight the current block', 'pattern-css')}>
     82                        text={__('Highlight the current block', 'pattern-css')}
     83                    >
    8284                        <Button
    8385                            size="small"
     
    9193                            className={`lowercase hover:bg-gray-100 hover:text-gray-900 ${
    9294                                isHighlighted ? 'bg-gray-100' : ''
    93                             }`}>
     95                            }`}
     96                        >
    9497                            {__('Highlight', 'pattern-css')}
    9598                        </Button>
     
    107110                                ?.focus();
    108111                        }}
    109                         className="lowercase hover:bg-gray-100 hover:text-gray-900">
     112                        className="lowercase hover:bg-gray-100 hover:text-gray-900"
     113                    >
    110114                        {
    111115                            // translators: Clear as in Clear the editor
  • pattern-css/trunk/src/components/FloatingWindow.tsx

    r3297727 r3490244  
    33    createPortal,
    44    forwardRef,
    5     RefObject,
     5    type RefObject,
    66    useLayoutEffect,
    77} from '@wordpress/element';
    88import { __ } from '@wordpress/i18n';
    9 import { Icon, close, dragHandle } from '@wordpress/icons';
     9import { close, dragHandle, Icon } from '@wordpress/icons';
    1010import { getHighestZIndex } from '../lib/util';
    1111
     
    5454                    className={`pattern-css-floating-window fixed z-high flex flex-col border border-solid border-gray-300 font-jetbrains-mono shadow-2xl ${transparent ? 'bg-white/90' : 'bg-white'}`}
    5555                    style={{ top, left, width, height }}
    56                     ref={ref}>
    57                     <>
    58                         <div className="flex flex-shrink-0 items-center justify-between">
    59                             <div
    60                                 data-pcss-handle
    61                                 draggable
    62                                 className="flex flex-grow cursor-grab items-center justify-between gap-1 p-2 py-3">
    63                                 <DragButton />
    64                                 <h2 className="m-0 h-full flex-grow p-0 text-sm font-medium text-gray-900">
    65                                     {label}
    66                                 </h2>
    67                             </div>
    68                             <Button
    69                                 className="relative z-10 border-0 p-2"
    70                                 onClick={() => setOpen(false)}
    71                                 icon={<Icon icon={close} size={12} />}
    72                                 label={__('Close Modal', 'pattern-css')}
    73                                 showTooltip={false}
    74                             />
     56                    ref={ref}
     57                >
     58                    <div className="flex flex-shrink-0 items-center justify-between">
     59                        <div
     60                            data-pcss-handle
     61                            draggable
     62                            className="flex flex-grow cursor-grab items-center justify-between gap-1 p-2 py-3"
     63                        >
     64                            <DragButton />
     65                            <h2 className="m-0 h-full flex-grow p-0 text-sm font-medium text-gray-900">
     66                                {label}
     67                            </h2>
    7568                        </div>
    76                         <div className="relative z-50 flex min-h-0 flex-grow flex-col px-4 pb-4">
    77                             {children}
    78                         </div>
    79                         <div
    80                             data-pcss-resize
    81                             className="absolute -bottom-1 -right-1 z-high h-6 w-6">
    82                             <div className="h-6 w-6 cursor-se-resize border border-l-0 border-t-0 border-solid border-transparent transition-colors duration-300 hover:border-gray-600 active:border-gray-600" />
    83                         </div>
    84                     </>
     69                        <Button
     70                            className="relative z-10 border-0 p-2"
     71                            onClick={() => setOpen(false)}
     72                            icon={<Icon icon={close} size={12} />}
     73                            label={__('Close Modal', 'pattern-css')}
     74                            showTooltip={false}
     75                        />
     76                    </div>
     77                    <div className="relative z-50 flex min-h-0 flex-grow flex-col px-4 pb-4">
     78                        {children}
     79                    </div>
     80                    <div
     81                        data-pcss-resize
     82                        className="absolute -bottom-1 -right-1 z-high h-6 w-6"
     83                    >
     84                        <div className="h-6 w-6 cursor-se-resize border border-l-0 border-t-0 border-solid border-transparent transition-colors duration-300 hover:border-gray-600 active:border-gray-600" />
     85                    </div>
    8586                </div>
    8687            </div>,
     
    9495        style={{ userSelect: 'none' }}
    9596        className="relative flex text-gray-900 hover:text-gray-700"
    96         {...props}>
     97        {...props}
     98    >
    9799        <Icon icon={dragHandle} size={24} />
    98100        <span className="sr-only">{__('Drag to move', 'pattern-css')}</span>
  • pattern-css/trunk/src/components/GlobalEditor.tsx

    r3297727 r3490244  
    11import apiFetch from '@wordpress/api-fetch';
     2// @ts-expect-error -- outdated types
    23import { useStyleOverride } from '@wordpress/block-editor';
    34import { CheckboxControl } from '@wordpress/components';
     
    56import { useCallback, useEffect, useRef, useState } from '@wordpress/element';
    67import { __, sprintf } from '@wordpress/i18n';
    7 import { Icon, check } from '@wordpress/icons';
    8 import { Warning as CssWarning } from 'lightningcss-wasm';
     8import { check, Icon } from '@wordpress/icons';
     9import type { Warning as CssWarning } from 'lightningcss-wasm';
    910import { useDraggable } from '../hooks/useDraggable';
    1011import { usePortal } from '../hooks/usePortal';
     
    5859                data-cy="global-css-editor-btn"
    5960                icon="tool"
    60                 onClick={() => setOpen(true)}>
     61                onClick={() => setOpen(true)}
     62            >
    6163                {__('Add Global CSS (Pattern CSS)', 'pattern-css')}
    6264            </PluginMoreMenuItem>
     
    7577                    setOpen={setOpen}
    7678                    mountNode={mountNode}
    77                     ref={ref}>
     79                    ref={ref}
     80                >
    7881                    <TheEditor
    7982                        initialCss={window.patternCss?.globalCss || ''}
     
    168171            <div
    169172                className="min-h-0 flex-grow overflow-y-auto overflow-x-hidden border border-solid border-gray-600"
    170                 ref={editorWrapperRef}>
     173                ref={editorWrapperRef}
     174            >
    171175                <CodeEditor
    172176                    value={css}
  • pattern-css/trunk/src/components/PopoutEditor.tsx

    r3295651 r3490244  
    5252                setOpen={setOpen}
    5353                mountNode={mountNode}
    54                 ref={ref}>
     54                ref={ref}
     55            >
    5556                {children}
    5657            </FloatingWindow>
     
    8182                        setPosition(20, 20);
    8283                        setSize(250, 400);
    83                     }}>
     84                    }}
     85                >
    8486                    {__('Reset Position', 'pattern-css')}
    8587                </Button>
  • pattern-css/trunk/src/hooks/useTheme.ts

    r2988734 r3490244  
    11import { useEffect, useState } from '@wordpress/element';
    2 import { getHighlighter, Lang, setCDN, Theme, setWasm } from 'shiki';
     2import { getHighlighter, type Lang, setCDN, setWasm, type Theme } from 'shiki';
    33import useSWRImmutable from 'swr/immutable';
    44
     
    1515    if (!once) {
    1616        once = true;
    17         setCDN(window.patternCss?.pluginUrl + 'build/shiki/');
     17        setCDN(`${window.patternCss?.pluginUrl}build/shiki/`);
    1818    }
    1919    const { data: highlighter, error } = useSWRImmutable(
     
    2222    );
    2323    useEffect(() => {
    24         const assetDir = window.patternCss?.pluginUrl + 'build/shiki/';
    25         fetch(assetDir + 'dist/onig.wasm')
     24        const assetDir = `${window.patternCss?.pluginUrl}build/shiki/`;
     25        fetch(`${assetDir}dist/onig.wasm`)
    2626            .then((res) => res.arrayBuffer())
    2727            .then((wasmBuffer) => {
  • pattern-css/trunk/src/index.tsx

    r3488380 r3490244  
    33import { registerPlugin } from '@wordpress/plugins';
    44import init, { transform } from 'lightningcss-wasm';
    5 import { BlockControl } from './components/BlockControl';
     5import {
     6    BlockControl,
     7    type BlockControlProps,
     8} from './components/BlockControl';
    69import { GlobalEditor } from './components/GlobalEditor';
    710import './editor.css';
     
    2730        const [base, query = ''] = options.path.split('?');
    2831        const params = new URLSearchParams(query);
    29         pcssAttributeKeys.forEach((key) => params.delete(`attributes[${key}]`));
     32        for (const key of pcssAttributeKeys)
     33            params.delete(`attributes[${key}]`);
    3034        const path = `${base}?${params.toString()}`;
    3135
     
    3337        if (data?.attributes) {
    3438            const { ...attrs } = data.attributes;
    35             pcssAttributeKeys.forEach((key) => delete attrs[key]);
     39            for (const key of pcssAttributeKeys) delete attrs[key];
    3640            data = { ...data, attributes: attrs };
    3741        }
     
    4145                const parsed = JSON.parse(body);
    4246                if (parsed?.attributes) {
    43                     pcssAttributeKeys.forEach((key) => delete parsed.attributes[key]);
     47                    for (const key of pcssAttributeKeys)
     48                        delete parsed.attributes[key];
    4449                    body = JSON.stringify(parsed);
    4550                }
     
    5459});
    5560
    56 // Both are unexpected objects with any properties types
    57 // eslint-disable-next-line
    58 const addSaveProps = (props: any, _blockType: null, attributes: any) => {
     61const addSaveProps = (
     62    props: Record<string, unknown>,
     63    _blockType: null,
     64    attributes: Record<string, unknown>,
     65) => {
     66    const propsClass =
     67        typeof props.className === 'string' ? props.className : '';
     68    const attrsClass =
     69        typeof attributes.className === 'string' ? attributes.className : '';
    5970    const classes = new Set(
    60         [props.className?.split(' '), attributes.className?.split(' ')]
    61             .flat()
    62             .filter(Boolean),
     71        [...propsClass.split(' '), ...attrsClass.split(' ')].filter(Boolean),
    6372    );
    64     const { pcssClassId } = attributes;
     73    const pcssClassId = attributes.pcssClassId;
    6574
    66     if (!pcssClassId || classes.has(pcssClassId)) return props;
     75    if (
     76        typeof pcssClassId !== 'string' ||
     77        !pcssClassId ||
     78        classes.has(pcssClassId)
     79    )
     80        return props;
    6781    classes.add(pcssClassId);
    6882    return {
     
    7892        // This pattern is found in the Gutenberg source code
    7993        const existingGetEditWrapperProps = settings.getEditWrapperProps;
    80         // eslint-disable-next-line
    81         settings.getEditWrapperProps = (attributes: { [key: string]: any }) => {
    82             const props = existingGetEditWrapperProps?.(attributes) ?? {};
     94        settings.getEditWrapperProps = (
     95            attributes: Record<string, unknown>,
     96        ) => {
     97            const props = (existingGetEditWrapperProps?.(attributes) ??
     98                {}) as Record<string, unknown>;
    8399            return addSaveProps(props, null, attributes);
    84100        };
     
    92108    'editor.BlockEdit',
    93109    'kevinbatdorf/pcss-block-control',
    94     (CurrentMenuItems) =>
    95         // Not sure how to type these incoming props
    96         // eslint-disable-next-line
    97         (props: any) =>
    98             BlockControl(CurrentMenuItems, props),
     110    (CurrentMenuItems) => (props: BlockControlProps) =>
     111        BlockControl(CurrentMenuItems, props),
    99112    // Force it at the very bottom
    100113    Number.MAX_SAFE_INTEGER,
  • pattern-css/trunk/src/state/global-editor.ts

    r3295651 r3490244  
    11import { create } from 'zustand';
    2 import { persist, devtools } from 'zustand/middleware';
     2import { devtools, persist } from 'zustand/middleware';
    33
    44type GlobalEditorState = {
  • pattern-css/trunk/src/state/popout.ts

    r3291638 r3490244  
    11import { create } from 'zustand';
    2 import { persist, devtools } from 'zustand/middleware';
     2import { devtools, persist } from 'zustand/middleware';
    33
    44type PopoutState = {
  • pattern-css/trunk/src/types.ts

    r3295651 r3490244  
    1 import { transform } from 'lightningcss-wasm';
    2 
    3 export {};
     1import type { transform } from 'lightningcss-wasm';
    42
    53declare global {
     
    1210                name: string;
    1311            };
     12            allowManualOverride?: boolean;
    1413            globalCss: string;
    1514            globalCssCompiled: string;
  • pattern-css/trunk/tailwind.config.js

    r2988734 r3490244  
    11const colors = require('tailwindcss/colors');
    2 delete colors['lightBlue'];
    3 delete colors['warmGray'];
    4 delete colors['trueGray'];
    5 delete colors['coolGray'];
    6 delete colors['blueGray'];
     2delete colors.lightBlue;
     3delete colors.warmGray;
     4delete colors.trueGray;
     5delete colors.coolGray;
     6delete colors.blueGray;
    77
    88// See postcss.config.js for more parsing options.
  • pattern-css/trunk/tsconfig.json

    r2988734 r3490244  
    1414        "isolatedModules": true,
    1515        "jsx": "preserve",
    16         "incremental": true
     16        "incremental": true,
     17        "types": [
     18            "wordpress__block-editor",
     19            "wordpress__blocks",
     20            "wordpress__edit-post"
     21        ]
    1722    },
    1823    "include": ["src/**/*.ts", "src/**/*.tsx"],
Note: See TracChangeset for help on using the changeset viewer.