@cas-smartdesign/button 7.0.2 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button.d.ts +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.mjs +3 -2
- package/dist/button.mjs.map +1 -1
- package/dist/docs/doc.mjs +96 -29
- package/package.json +3 -3
- package/readme.md +8 -2
- package/scss/_config.scss +50 -0
package/dist/button.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare global {
|
|
|
5
5
|
[Button.ID]: Button;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
export type ButtonVariant = "primary" | "outline" | "standard" | "ghost" | "outline-danger" | "ghost-danger" | "selection" | "custom";
|
|
8
|
+
export type ButtonVariant = "primary" | "outline" | "standard" | "ghost" | "outline-danger" | "ghost-danger" | "selection" | "custom" | "contrast";
|
|
9
9
|
export declare const BUTTON_VARIANTS: ButtonVariant[];
|
|
10
10
|
export declare class Button extends ElementBase {
|
|
11
11
|
static readonly ID = "sd-button";
|
package/dist/button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAK1D,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;KACvB;CACJ;AAED,MAAM,MAAM,aAAa,GACnB,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,GACP,gBAAgB,GAChB,cAAc,GACd,WAAW,GACX,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAK1D,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;KACvB;CACJ;AAED,MAAM,MAAM,aAAa,GACnB,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,GACP,gBAAgB,GAChB,cAAc,GACd,WAAW,GACX,QAAQ,GACR,UAAU,CAAC;AACjB,eAAO,MAAM,eAAe,EAAE,aAAa,EAU1C,CAAC;AAMF,qBAAa,MAAO,SAAQ,WAAW;IACnC,gBAAuB,EAAE,eAAe;IACxC,OAAc,aAAa,aAKzB;IAEF,MAAM,CAAC,UAAU,gBAAuB;IAMxC,OAAO,CAAC,MAAM,CAAC,CAAgC;IAC/C,OAAO,CAAC,sBAAsB,CAAS;IAEvC,IAAW,YAAY,8CAEtB;IAED,IAAW,IAAI,IAAI,MAAM,GAAG,SAAS,GAAG,IAAI,CAE3C;IAED,IAAW,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAS9C;IAED,IAAI,OAAO,IAAI,aAAa,CAG3B;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,IAAI,EAEtD;IAED,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED,IAAW,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAEpC;IAED,MAAM,KAAK,kBAAkB,aAE5B;IAEM,EAAE,IAAI,MAAM;IAInB,SAAS,CAAC,QAAQ,IAAI,mBAAmB;;IAiDzC,OAAO,CAAC,cAAc;IAWN,KAAK;IAML,iBAAiB;IAmBjB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAqBrF,OAAO,CAAC,UAAU;CAQrB"}
|
package/dist/button.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementBase as e } from "@cas-smartdesign/element-base";
|
|
2
2
|
import { ImageEmbed as t } from "@cas-smartdesign/image-embed";
|
|
3
3
|
//#region button.html?raw
|
|
4
|
-
var n = "<slot name=\"icon\">\n <sd-image-embed class=\"icon\" part=\"icon\" exportparts=\"img, svg\"></sd-image-embed>\n</slot>\n<div class=\"content\">\n <slot></slot>\n</div>\n", r = ":host{contain:content;box-sizing:border-box;vertical-align:middle;height:min-content;min-height:36px;padding:var(--spacing-x3,6px) var(--spacing-x4,8px);border-radius:var(--radius-s,4px);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:inline-flex}:host:focus-visible{outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}:host:is(:disabled,[disabled],[aria-disabled=true]){cursor:default}:host{background-color:var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4));color:var(--sd-button-color,var(--color-fg-action-neutral-default,#111))}:host:after{content:\"\";border:var(--sd-button-border,none);border-radius:inherit;position:absolute;inset:0}:host(:is(:focus,:hover)){background-color:var(--sd-button-background-color-hover,var(--color-bg-action-neutral-default-hover,#c6c6c6));color:var(--sd-button-color-hover,var(--color-fg-action-neutral-default-hover,#111))}:host(:is(:focus,:hover)):after{border-color:var(--sd-button-border-color-hover,transparent)}:host(:active){background-color:var(--sd-button-background-color-pressed,var(--color-bg-action-neutral-default-pressed,#b3b3b3));color:var(--sd-button-color-pressed,var(--color-fg-action-neutral-default-pressed,#111))}:host(:active):after{border-color:var(--sd-button-border-color-pressed,transparent)}:host(:is([aria-disabled=true],[disabled])){background-color:var(--sd-button-background-color-disabled,var(--color-bg-interaction-disabled,#e7e7e7));color:var(--sd-button-color-disabled,var(--color-fg-interaction-disabled,#999))}:host(:is([aria-disabled=true],[disabled])):after{border-color:var(--sd-button-border-color-disabled,transparent)}:host(:is([aria-disabled=true],[disabled])){cursor:default}:host(:focus-visible){outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}:host([variant=primary i]){--sd-button-background-color:var(--color-bg-action-accent-default,#1467ba);--sd-button-color:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-hover:var(--color-bg-action-accent-default-hover,#0f4d8b);--sd-button-color-hover:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-pressed:var(--color-bg-action-accent-default-pressed,#0b3a69);--sd-button-color-pressed:var(--color-fg-interaction-on-color,#fff)}:host([variant=outline i]){--sd-button-background-color:var(--color-bg-action-accent-weak,#e0ebf6);--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-border:1px solid var(--color-border-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weak-hover,#d5e4f3);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-border-color-hover:var(--color-border-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weak-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-border-color-pressed:var(--color-border-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=ghost i]){--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weakest-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weakest-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent}:host([variant=outline-danger i]){--sd-button-background-color:var(--color-bg-action-danger-default,#fbdde0);--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-border:1px solid var(--color-border-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-border-color-hover:var(--color-border-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-border-color-pressed:var(--color-border-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=ghost-danger i]){--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent}:host([variant=selection i]){--sd-button-background-color:var(--color-bg-selection-neutral-weakest,#fff);--sd-button-color:var(--color-fg-selection-neutral-default,#111);--sd-button-border:1px solid var(--color-border-selection-neutral-default,#999);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-hover:var(--color-border-selection-neutral-default,#999);--sd-button-background-color-pressed:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-color-pressed:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-pressed:var(--color-border-selection-accent-default,#1467ba);--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=custom i]){--sd-button-background-color-hover:color-mix(in oklab, var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4)), var(--color-fg-default,#111) 10%);--sd-button-color-hover:var(--sd-button-color,var(--color-fg-action-neutral-default,#111));--sd-button-background-color-pressed:color-mix(in oklab, var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4)), var(--color-fg-default,#111) 20%);--sd-button-color-pressed:var(--sd-button-color,var(--color-fg-action-neutral-default,#111))}:host([variant=selection i][aria-pressed=true]){--sd-button-background-color:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border:1px solid var(--color-border-selection-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border-color-hover:var(--color-border-selection-accent-default,#1467ba)}.icon:is(:not([src]),[src=\"\"],[src=\"data:,\"]){display:none}.content{align-items:center;min-width:0;display:flex}.content ::slotted(*){font:var(--text-body);margin-left:var(--sd-button-content-padding,8px)}.content ::slotted(:last-child){margin-right:var(--sd-button-content-padding,8px)}.icon{max-height:var(--sd-button-max-icon-size,24px);max-width:var(--sd-button-max-icon-size,24px);color:inherit}", i = [
|
|
4
|
+
var n = "<slot name=\"icon\">\n <sd-image-embed class=\"icon\" part=\"icon\" exportparts=\"img, svg\"></sd-image-embed>\n</slot>\n<div class=\"content\">\n <slot></slot>\n</div>\n", r = ":host{contain:content;box-sizing:border-box;vertical-align:middle;height:min-content;min-height:36px;padding:var(--spacing-x3,6px) var(--spacing-x4,8px);border-radius:var(--radius-s,4px);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:inline-flex}:host:focus-visible{outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}:host:is(:disabled,[disabled],[aria-disabled=true]){cursor:default}:host{background-color:var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4));color:var(--sd-button-color,var(--color-fg-action-neutral-default,#111))}:host:after{content:\"\";border:var(--sd-button-border,none);border-radius:inherit;position:absolute;inset:0}:host(:is(:focus,:hover)){background-color:var(--sd-button-background-color-hover,var(--color-bg-action-neutral-default-hover,#c6c6c6));color:var(--sd-button-color-hover,var(--color-fg-action-neutral-default-hover,#111))}:host(:is(:focus,:hover)):after{border-color:var(--sd-button-border-color-hover,transparent)}:host(:active){background-color:var(--sd-button-background-color-pressed,var(--color-bg-action-neutral-default-pressed,#b3b3b3));color:var(--sd-button-color-pressed,var(--color-fg-action-neutral-default-pressed,#111))}:host(:active):after{border-color:var(--sd-button-border-color-pressed,transparent)}:host(:is([aria-disabled=true],[disabled])){background-color:var(--sd-button-background-color-disabled,var(--color-bg-interaction-disabled,#e7e7e7));color:var(--sd-button-color-disabled,var(--color-fg-interaction-disabled,#999))}:host(:is([aria-disabled=true],[disabled])):after{border-color:var(--sd-button-border-color-disabled,transparent)}:host(:is([aria-disabled=true],[disabled])){cursor:default}:host(:focus-visible){outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}:host([variant=primary i]){--sd-button-background-color:var(--color-bg-action-accent-default,#1467ba);--sd-button-color:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-hover:var(--color-bg-action-accent-default-hover,#0f4d8b);--sd-button-color-hover:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-pressed:var(--color-bg-action-accent-default-pressed,#0b3a69);--sd-button-color-pressed:var(--color-fg-interaction-on-color,#fff)}:host([variant=outline i]){--sd-button-background-color:var(--color-bg-action-accent-weak,#e0ebf6);--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-border:1px solid var(--color-border-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weak-hover,#d5e4f3);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-border-color-hover:var(--color-border-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weak-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-border-color-pressed:var(--color-border-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=ghost i]){--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weakest-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weakest-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent}:host([variant=outline-danger i]){--sd-button-background-color:var(--color-bg-action-danger-default,#fbdde0);--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-border:1px solid var(--color-border-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-border-color-hover:var(--color-border-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-border-color-pressed:var(--color-border-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=ghost-danger i]){--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent}:host([variant=selection i]){--sd-button-background-color:var(--color-bg-selection-neutral-weakest,#fff);--sd-button-color:var(--color-fg-selection-neutral-default,#111);--sd-button-border:1px solid var(--color-border-selection-neutral-default,#999);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-hover:var(--color-border-selection-neutral-default,#999);--sd-button-background-color-pressed:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-color-pressed:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-pressed:var(--color-border-selection-accent-default,#1467ba);--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=custom i]){--sd-button-background-color-hover:color-mix(in oklab, var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4)), var(--color-fg-default,#111) 10%);--sd-button-color-hover:var(--sd-button-color,var(--color-fg-action-neutral-default,#111));--sd-button-background-color-pressed:color-mix(in oklab, var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4)), var(--color-fg-default,#111) 20%);--sd-button-color-pressed:var(--sd-button-color,var(--color-fg-action-neutral-default,#111))}:host([variant=contrast i]){--sd-button-contrast-color:color-mix(in oklab, color(from var(--sd-button-contrast-source,var(--color-bg-default,#fff)) xyz round(up, min(1, max(0, .18 - y)), 1) round(up, min(1, max(0, .18 - y)), 1) round(up, min(1, max(0, .18 - y)), 1)), #fff 17.6%);--sd-button-background-color:transparent;--sd-button-color:var(--sd-button-contrast-color);--sd-button-background-color-hover:oklab(from var(--sd-button-contrast-source,var(--color-bg-default,#fff)) calc(l + sign(.5 - l) * .1) a b);--sd-button-color-hover:var(--sd-button-contrast-color);--sd-button-background-color-pressed:oklab(from var(--sd-button-contrast-source,var(--color-bg-default,#fff)) calc(l + sign(.5 - l) * .2) a b);--sd-button-color-pressed:var(--sd-button-contrast-color);--sd-button-background-color-disabled:transparent}:host([variant=selection i][aria-pressed=true]){--sd-button-background-color:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border:1px solid var(--color-border-selection-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border-color-hover:var(--color-border-selection-accent-default,#1467ba)}.icon:is(:not([src]),[src=\"\"],[src=\"data:,\"]){display:none}.content{align-items:center;min-width:0;display:flex}.content ::slotted(*){font:var(--text-body);margin-left:var(--sd-button-content-padding,8px)}.content ::slotted(:last-child){margin-right:var(--sd-button-content-padding,8px)}.icon{max-height:var(--sd-button-max-icon-size,24px);max-width:var(--sd-button-max-icon-size,24px);color:inherit}", i = [
|
|
5
5
|
"primary",
|
|
6
6
|
"outline",
|
|
7
7
|
"standard",
|
|
@@ -9,7 +9,8 @@ var n = "<slot name=\"icon\">\n <sd-image-embed class=\"icon\" part=\"icon\" exp
|
|
|
9
9
|
"outline-danger",
|
|
10
10
|
"ghost-danger",
|
|
11
11
|
"selection",
|
|
12
|
-
"custom"
|
|
12
|
+
"custom",
|
|
13
|
+
"contrast"
|
|
13
14
|
], a = "standard";
|
|
14
15
|
function o(e) {
|
|
15
16
|
return i.includes(e);
|
package/dist/button.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.mjs","names":[],"sources":["../button.html?raw","../styles.scss?inline","../button.ts"],"sourcesContent":["export default \"<slot name=\\\"icon\\\">\\n\\t<sd-image-embed class=\\\"icon\\\" part=\\\"icon\\\" exportparts=\\\"img, svg\\\"></sd-image-embed>\\n</slot>\\n<div class=\\\"content\\\">\\n\\t<slot></slot>\\n</div>\\n\"","@use \"scss/config\";\n@use \"scss/button\";\n\n:host {\n\tcontain: content;\n\n\t@include button.base;\n\t@include config.state(\"base\");\n\t&::after {\n\t\tcontent: \"\";\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder: var(--sd-button-border, none);\n\t\tborder-radius: inherit;\n\t}\n}\n\n:host(:is(:focus, :hover)) {\n\t@include config.state(\"hover\");\n}\n\n:host(:active) {\n\t@include config.state(\"pressed\");\n}\n\n:host(:is([aria-disabled=\"true\"], [disabled])) {\n\t@include config.state(\"disabled\");\n\tcursor: default;\n}\n\n:host(:focus-visible) {\n\toutline: 1px solid var(--color-border-interaction-focus, #111);\n\toutline-offset: var(--spacing-x1, 2px);\n}\n\n@each $name, $props in config.$variants {\n\t:host([variant=\"#{$name}\" i]) {\n\t\t@include config.variant-vars($name);\n\t}\n}\n\n:host([variant=\"selection\" i][aria-pressed=\"true\"]) {\n\t@include config.selection-checked-vars;\n}\n\n.icon:is(:not([src]), [src=\"\"], [src=\"data:,\"]) {\n\tdisplay: none;\n}\n\n.content {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-width: 0px;\n}\n\n.content ::slotted(*) {\n\tfont: var(--text-body);\n\tmargin-left: var(--sd-button-content-padding, 8px);\n}\n\n.content ::slotted(*:last-child) {\n\tmargin-right: var(--sd-button-content-padding, 8px);\n}\n\n.icon {\n\tmax-height: var(--sd-button-max-icon-size, 24px);\n\tmax-width: var(--sd-button-max-icon-size, 24px);\n\tcolor: inherit;\n}\n","import { ElementBase } from \"@cas-smartdesign/element-base\";\nimport { ImageEmbed } from \"@cas-smartdesign/image-embed\";\n\nimport { default as htmlTemplate } from \"./button.html?raw\";\nimport { default as styles } from \"./styles.scss?inline\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [Button.ID]: Button;\n }\n}\n\nexport type ButtonVariant =\n | \"primary\"\n | \"outline\"\n | \"standard\"\n | \"ghost\"\n | \"outline-danger\"\n | \"ghost-danger\"\n | \"selection\"\n | \"custom\";\nexport const BUTTON_VARIANTS: ButtonVariant[] = [\n \"primary\",\n \"outline\",\n \"standard\",\n \"ghost\",\n \"outline-danger\",\n \"ghost-danger\",\n \"selection\",\n \"custom\",\n];\nconst DEFAULT_BUTTON_VARIANT: ButtonVariant = \"standard\";\nfunction isButtonVariant(value: string | null): value is ButtonVariant {\n return BUTTON_VARIANTS.includes(value as ButtonVariant);\n}\n\nexport class Button extends ElementBase {\n public static readonly ID = \"sd-button\";\n public static ensureDefined = () => {\n if (!customElements.get(Button.ID)) {\n customElements.define(Button.ID, Button);\n ImageEmbed.ensureDefined();\n }\n };\n\n static styleSheet = new CSSStyleSheet();\n\n static {\n this.styleSheet.replaceSync(styles);\n }\n\n private _image?: ImageEmbed | HTMLImageElement;\n private _isSpaceOrEnterKeyDown = false;\n\n public get imageElement() {\n return this._image;\n }\n\n public get icon(): string | undefined | null {\n return this.getAttribute(\"icon\");\n }\n\n public set icon(icon: string | undefined | null) {\n if (this.icon !== icon) {\n if (icon) {\n this.setAttribute(\"icon\", icon);\n } else {\n this.removeAttribute(\"icon\");\n }\n this.updateIcon();\n }\n }\n\n get variant(): ButtonVariant {\n const attr = this.getAttribute(\"variant\");\n return isButtonVariant(attr) ? attr : DEFAULT_BUTTON_VARIANT;\n }\n\n set variant(value: ButtonVariant | (string & {}) | null) {\n this.setAttribute(\"variant\", isButtonVariant(value) ? value : DEFAULT_BUTTON_VARIANT);\n }\n\n public get disabled(): boolean {\n return this.getAttribute(\"aria-disabled\") == \"true\";\n }\n\n public set disabled(disabled: boolean) {\n this.setAttribute(\"aria-disabled\", disabled.toString());\n }\n\n static get observedAttributes() {\n return [\"icon\", \"variant\"];\n }\n\n public is(): string {\n return Button.ID;\n }\n\n protected template(): HTMLTemplateElement {\n const template = document.createElement(\"template\");\n template.innerHTML = htmlTemplate;\n return template;\n }\n\n constructor() {\n super();\n this.addEventListener(\"keydown\", (e) => {\n if (this.isSpaceOrEnter(e)) {\n this._isSpaceOrEnterKeyDown = true;\n e.preventDefault(); // prevent potential scroll-down triggered by space\n }\n });\n this.addEventListener(\"keyup\", (e) => {\n if (this.isSpaceOrEnter(e) && this._isSpaceOrEnterKeyDown == true) {\n this._isSpaceOrEnterKeyDown = false;\n this.click();\n }\n });\n // As Button is not an input element, click is fired even in disabled state\n this.addEventListener(\n \"click\",\n (event) => {\n if (this.disabled || this.hasAttribute(\"disabled\")) {\n event.stopImmediatePropagation();\n return;\n }\n\n const type = this.getAttribute(\"type\")?.toLowerCase()?.trim();\n\n if (type !== \"submit\" && type !== \"reset\") {\n return;\n }\n\n const form = this.closest(\"form\");\n\n if (form && type === \"submit\") {\n form.requestSubmit();\n }\n\n if (form && type === \"reset\") {\n form.reset();\n }\n },\n { capture: true },\n );\n }\n\n private isSpaceOrEnter(event: KeyboardEvent): boolean {\n switch (event.key) {\n case \" \":\n case \"Space\":\n case \"Enter\":\n return true;\n default:\n return false;\n }\n }\n\n public override click() {\n if (!this.disabled && !this.hasAttribute(\"disabled\")) {\n super.click();\n }\n }\n\n public override connectedCallback() {\n const initStyles = this.shadowRoot == null;\n super.connectedCallback();\n if (initStyles) {\n this.shadowRoot!.adoptedStyleSheets = [Button.styleSheet];\n }\n\n if (!this.hasAttribute(\"tabIndex\")) {\n this.tabIndex = 0;\n }\n\n this._image = this.shadowRoot!.querySelector(\".icon\") as HTMLImageElement;\n\n this.updateIcon();\n if (!this.hasAttribute(\"role\")) {\n this.setAttribute(\"role\", \"button\");\n }\n }\n\n public override attributeChangedCallback(name: string, oldValue: string | null): void {\n switch (name) {\n case \"icon\": {\n this.updateIcon();\n break;\n }\n case \"variant\": {\n if (this.variant === \"selection\") {\n // Expose toggle semantics, but don't clobber an\n // aria-pressed value already managed by the consumer.\n if (!this.hasAttribute(\"aria-pressed\")) {\n this.setAttribute(\"aria-pressed\", \"false\");\n }\n } else if (oldValue?.toLowerCase() === \"selection\") {\n this.removeAttribute(\"aria-pressed\");\n }\n break;\n }\n }\n }\n\n private updateIcon() {\n if (this._image) {\n const iconSrc = this.getAttribute(\"icon\");\n if (iconSrc) {\n this._image.src = iconSrc;\n }\n }\n }\n}\nButton.ensureDefined();\n"],"mappings":";;;AAAA,IAAA,IAAe,o3OEqBF,IAAmC;CAC5C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACH,EACK,IAAwC;AAC9C,SAAS,EAAgB,GAA8C;AACnE,QAAO,EAAgB,SAAS,EAAuB;;AAG3D,IAAa,IAAb,MAAa,UAAe,EAAY;;YACR;;;6BACQ;AAChC,GAAK,eAAe,IAAI,EAAO,GAAG,KAC9B,eAAe,OAAO,EAAO,IAAI,EAAO,EACxC,EAAW,eAAe;;;;oBAId,IAAI,eAAe;;CAEvC;AACI,OAAK,WAAW,YAAY,EAAO;;CAMvC,IAAW,eAAe;AACtB,SAAO,KAAK;;CAGhB,IAAW,OAAkC;AACzC,SAAO,KAAK,aAAa,OAAO;;CAGpC,IAAW,KAAK,GAAiC;AAC7C,EAAI,KAAK,SAAS,MACV,IACA,KAAK,aAAa,QAAQ,EAAK,GAE/B,KAAK,gBAAgB,OAAO,EAEhC,KAAK,YAAY;;CAIzB,IAAI,UAAyB;EACzB,IAAM,IAAO,KAAK,aAAa,UAAU;AACzC,SAAO,EAAgB,EAAK,GAAG,IAAO;;CAG1C,IAAI,QAAQ,GAA6C;AACrD,OAAK,aAAa,WAAW,EAAgB,EAAM,GAAG,IAAQ,EAAuB;;CAGzF,IAAW,WAAoB;AAC3B,SAAO,KAAK,aAAa,gBAAgB,IAAI;;CAGjD,IAAW,SAAS,GAAmB;AACnC,OAAK,aAAa,iBAAiB,EAAS,UAAU,CAAC;;CAG3D,WAAW,qBAAqB;AAC5B,SAAO,CAAC,QAAQ,UAAU;;CAG9B,KAAoB;AAChB,SAAO,EAAO;;CAGlB,WAA0C;EACtC,IAAM,IAAW,SAAS,cAAc,WAAW;AAEnD,SADA,EAAS,YAAY,GACd;;CAGX,cAAc;AAeV,EAdA,OAAO,gCArDsB,IAsD7B,KAAK,iBAAiB,YAAY,MAAM;AACpC,GAAI,KAAK,eAAe,EAAE,KACtB,KAAK,yBAAyB,IAC9B,EAAE,gBAAgB;IAExB,EACF,KAAK,iBAAiB,UAAU,MAAM;AAClC,GAAI,KAAK,eAAe,EAAE,IAAI,KAAK,0BAA0B,MACzD,KAAK,yBAAyB,IAC9B,KAAK,OAAO;IAElB,EAEF,KAAK,iBACD,UACC,MAAU;AACP,OAAI,KAAK,YAAY,KAAK,aAAa,WAAW,EAAE;AAChD,MAAM,0BAA0B;AAChC;;GAGJ,IAAM,IAAO,KAAK,aAAa,OAAO,EAAE,aAAa,EAAE,MAAM;AAE7D,OAAI,MAAS,YAAY,MAAS,QAC9B;GAGJ,IAAM,IAAO,KAAK,QAAQ,OAAO;AAMjC,GAJI,KAAQ,MAAS,YACjB,EAAK,eAAe,EAGpB,KAAQ,MAAS,WACjB,EAAK,OAAO;KAGpB,EAAE,SAAS,IAAM,CACpB;;CAGL,eAAuB,GAA+B;AAClD,UAAQ,EAAM,KAAd;GACI,KAAK;GACL,KAAK;GACL,KAAK,QACD,QAAO;GACX,QACI,QAAO;;;CAInB,QAAwB;AACpB,EAAI,CAAC,KAAK,YAAY,CAAC,KAAK,aAAa,WAAW,IAChD,MAAM,OAAO;;CAIrB,oBAAoC;EAChC,IAAM,IAAa,KAAK,cAAc;AAatC,EAZA,MAAM,mBAAmB,EACrB,MACA,KAAK,WAAY,qBAAqB,CAAC,EAAO,WAAW,GAGxD,KAAK,aAAa,WAAW,KAC9B,KAAK,WAAW,IAGpB,KAAK,SAAS,KAAK,WAAY,cAAc,QAAQ,EAErD,KAAK,YAAY,EACZ,KAAK,aAAa,OAAO,IAC1B,KAAK,aAAa,QAAQ,SAAS;;CAI3C,yBAAyC,GAAc,GAA+B;AAClF,UAAQ,GAAR;GACI,KAAK;AACD,SAAK,YAAY;AACjB;GAEJ,KAAK;AACD,IAAI,KAAK,YAAY,cAGZ,KAAK,aAAa,eAAe,IAClC,KAAK,aAAa,gBAAgB,QAAQ,GAEvC,GAAU,aAAa,KAAK,eACnC,KAAK,gBAAgB,eAAe;AAExC;;;CAKZ,aAAqB;AACjB,MAAI,KAAK,QAAQ;GACb,IAAM,IAAU,KAAK,aAAa,OAAO;AACzC,GAAI,MACA,KAAK,OAAO,MAAM;;;;AAKlC,EAAO,eAAe"}
|
|
1
|
+
{"version":3,"file":"button.mjs","names":[],"sources":["../button.html?raw","../styles.scss?inline","../button.ts"],"sourcesContent":["export default \"<slot name=\\\"icon\\\">\\n\\t<sd-image-embed class=\\\"icon\\\" part=\\\"icon\\\" exportparts=\\\"img, svg\\\"></sd-image-embed>\\n</slot>\\n<div class=\\\"content\\\">\\n\\t<slot></slot>\\n</div>\\n\"","@use \"scss/config\";\n@use \"scss/button\";\n\n:host {\n\tcontain: content;\n\n\t@include button.base;\n\t@include config.state(\"base\");\n\t&::after {\n\t\tcontent: \"\";\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder: var(--sd-button-border, none);\n\t\tborder-radius: inherit;\n\t}\n}\n\n:host(:is(:focus, :hover)) {\n\t@include config.state(\"hover\");\n}\n\n:host(:active) {\n\t@include config.state(\"pressed\");\n}\n\n:host(:is([aria-disabled=\"true\"], [disabled])) {\n\t@include config.state(\"disabled\");\n\tcursor: default;\n}\n\n:host(:focus-visible) {\n\toutline: 1px solid var(--color-border-interaction-focus, #111);\n\toutline-offset: var(--spacing-x1, 2px);\n}\n\n@each $name, $props in config.$variants {\n\t:host([variant=\"#{$name}\" i]) {\n\t\t@include config.variant-vars($name);\n\t}\n}\n\n:host([variant=\"selection\" i][aria-pressed=\"true\"]) {\n\t@include config.selection-checked-vars;\n}\n\n.icon:is(:not([src]), [src=\"\"], [src=\"data:,\"]) {\n\tdisplay: none;\n}\n\n.content {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-width: 0px;\n}\n\n.content ::slotted(*) {\n\tfont: var(--text-body);\n\tmargin-left: var(--sd-button-content-padding, 8px);\n}\n\n.content ::slotted(*:last-child) {\n\tmargin-right: var(--sd-button-content-padding, 8px);\n}\n\n.icon {\n\tmax-height: var(--sd-button-max-icon-size, 24px);\n\tmax-width: var(--sd-button-max-icon-size, 24px);\n\tcolor: inherit;\n}\n","import { ElementBase } from \"@cas-smartdesign/element-base\";\nimport { ImageEmbed } from \"@cas-smartdesign/image-embed\";\n\nimport { default as htmlTemplate } from \"./button.html?raw\";\nimport { default as styles } from \"./styles.scss?inline\";\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [Button.ID]: Button;\n }\n}\n\nexport type ButtonVariant =\n | \"primary\"\n | \"outline\"\n | \"standard\"\n | \"ghost\"\n | \"outline-danger\"\n | \"ghost-danger\"\n | \"selection\"\n | \"custom\"\n | \"contrast\";\nexport const BUTTON_VARIANTS: ButtonVariant[] = [\n \"primary\",\n \"outline\",\n \"standard\",\n \"ghost\",\n \"outline-danger\",\n \"ghost-danger\",\n \"selection\",\n \"custom\",\n \"contrast\",\n];\nconst DEFAULT_BUTTON_VARIANT: ButtonVariant = \"standard\";\nfunction isButtonVariant(value: string | null): value is ButtonVariant {\n return BUTTON_VARIANTS.includes(value as ButtonVariant);\n}\n\nexport class Button extends ElementBase {\n public static readonly ID = \"sd-button\";\n public static ensureDefined = () => {\n if (!customElements.get(Button.ID)) {\n customElements.define(Button.ID, Button);\n ImageEmbed.ensureDefined();\n }\n };\n\n static styleSheet = new CSSStyleSheet();\n\n static {\n this.styleSheet.replaceSync(styles);\n }\n\n private _image?: ImageEmbed | HTMLImageElement;\n private _isSpaceOrEnterKeyDown = false;\n\n public get imageElement() {\n return this._image;\n }\n\n public get icon(): string | undefined | null {\n return this.getAttribute(\"icon\");\n }\n\n public set icon(icon: string | undefined | null) {\n if (this.icon !== icon) {\n if (icon) {\n this.setAttribute(\"icon\", icon);\n } else {\n this.removeAttribute(\"icon\");\n }\n this.updateIcon();\n }\n }\n\n get variant(): ButtonVariant {\n const attr = this.getAttribute(\"variant\");\n return isButtonVariant(attr) ? attr : DEFAULT_BUTTON_VARIANT;\n }\n\n set variant(value: ButtonVariant | (string & {}) | null) {\n this.setAttribute(\"variant\", isButtonVariant(value) ? value : DEFAULT_BUTTON_VARIANT);\n }\n\n public get disabled(): boolean {\n return this.getAttribute(\"aria-disabled\") == \"true\";\n }\n\n public set disabled(disabled: boolean) {\n this.setAttribute(\"aria-disabled\", disabled.toString());\n }\n\n static get observedAttributes() {\n return [\"icon\", \"variant\"];\n }\n\n public is(): string {\n return Button.ID;\n }\n\n protected template(): HTMLTemplateElement {\n const template = document.createElement(\"template\");\n template.innerHTML = htmlTemplate;\n return template;\n }\n\n constructor() {\n super();\n this.addEventListener(\"keydown\", (e) => {\n if (this.isSpaceOrEnter(e)) {\n this._isSpaceOrEnterKeyDown = true;\n e.preventDefault(); // prevent potential scroll-down triggered by space\n }\n });\n this.addEventListener(\"keyup\", (e) => {\n if (this.isSpaceOrEnter(e) && this._isSpaceOrEnterKeyDown == true) {\n this._isSpaceOrEnterKeyDown = false;\n this.click();\n }\n });\n // As Button is not an input element, click is fired even in disabled state\n this.addEventListener(\n \"click\",\n (event) => {\n if (this.disabled || this.hasAttribute(\"disabled\")) {\n event.stopImmediatePropagation();\n return;\n }\n\n const type = this.getAttribute(\"type\")?.toLowerCase()?.trim();\n\n if (type !== \"submit\" && type !== \"reset\") {\n return;\n }\n\n const form = this.closest(\"form\");\n\n if (form && type === \"submit\") {\n form.requestSubmit();\n }\n\n if (form && type === \"reset\") {\n form.reset();\n }\n },\n { capture: true },\n );\n }\n\n private isSpaceOrEnter(event: KeyboardEvent): boolean {\n switch (event.key) {\n case \" \":\n case \"Space\":\n case \"Enter\":\n return true;\n default:\n return false;\n }\n }\n\n public override click() {\n if (!this.disabled && !this.hasAttribute(\"disabled\")) {\n super.click();\n }\n }\n\n public override connectedCallback() {\n const initStyles = this.shadowRoot == null;\n super.connectedCallback();\n if (initStyles) {\n this.shadowRoot!.adoptedStyleSheets = [Button.styleSheet];\n }\n\n if (!this.hasAttribute(\"tabIndex\")) {\n this.tabIndex = 0;\n }\n\n this._image = this.shadowRoot!.querySelector(\".icon\") as HTMLImageElement;\n\n this.updateIcon();\n if (!this.hasAttribute(\"role\")) {\n this.setAttribute(\"role\", \"button\");\n }\n }\n\n public override attributeChangedCallback(name: string, oldValue: string | null): void {\n switch (name) {\n case \"icon\": {\n this.updateIcon();\n break;\n }\n case \"variant\": {\n if (this.variant === \"selection\") {\n // Expose toggle semantics, but don't clobber an\n // aria-pressed value already managed by the consumer.\n if (!this.hasAttribute(\"aria-pressed\")) {\n this.setAttribute(\"aria-pressed\", \"false\");\n }\n } else if (oldValue?.toLowerCase() === \"selection\") {\n this.removeAttribute(\"aria-pressed\");\n }\n break;\n }\n }\n }\n\n private updateIcon() {\n if (this._image) {\n const iconSrc = this.getAttribute(\"icon\");\n if (iconSrc) {\n this._image.src = iconSrc;\n }\n }\n }\n}\nButton.ensureDefined();\n"],"mappings":";;;AAAA,IAAA,IAAe,uqQEsBF,IAAmC;CAC5C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACH,EACK,IAAwC;AAC9C,SAAS,EAAgB,GAA8C;AACnE,QAAO,EAAgB,SAAS,EAAuB;;AAG3D,IAAa,IAAb,MAAa,UAAe,EAAY;;YACR;;;6BACQ;AAChC,GAAK,eAAe,IAAI,EAAO,GAAG,KAC9B,eAAe,OAAO,EAAO,IAAI,EAAO,EACxC,EAAW,eAAe;;;;oBAId,IAAI,eAAe;;CAEvC;AACI,OAAK,WAAW,YAAY,EAAO;;CAMvC,IAAW,eAAe;AACtB,SAAO,KAAK;;CAGhB,IAAW,OAAkC;AACzC,SAAO,KAAK,aAAa,OAAO;;CAGpC,IAAW,KAAK,GAAiC;AAC7C,EAAI,KAAK,SAAS,MACV,IACA,KAAK,aAAa,QAAQ,EAAK,GAE/B,KAAK,gBAAgB,OAAO,EAEhC,KAAK,YAAY;;CAIzB,IAAI,UAAyB;EACzB,IAAM,IAAO,KAAK,aAAa,UAAU;AACzC,SAAO,EAAgB,EAAK,GAAG,IAAO;;CAG1C,IAAI,QAAQ,GAA6C;AACrD,OAAK,aAAa,WAAW,EAAgB,EAAM,GAAG,IAAQ,EAAuB;;CAGzF,IAAW,WAAoB;AAC3B,SAAO,KAAK,aAAa,gBAAgB,IAAI;;CAGjD,IAAW,SAAS,GAAmB;AACnC,OAAK,aAAa,iBAAiB,EAAS,UAAU,CAAC;;CAG3D,WAAW,qBAAqB;AAC5B,SAAO,CAAC,QAAQ,UAAU;;CAG9B,KAAoB;AAChB,SAAO,EAAO;;CAGlB,WAA0C;EACtC,IAAM,IAAW,SAAS,cAAc,WAAW;AAEnD,SADA,EAAS,YAAY,GACd;;CAGX,cAAc;AAeV,EAdA,OAAO,gCArDsB,IAsD7B,KAAK,iBAAiB,YAAY,MAAM;AACpC,GAAI,KAAK,eAAe,EAAE,KACtB,KAAK,yBAAyB,IAC9B,EAAE,gBAAgB;IAExB,EACF,KAAK,iBAAiB,UAAU,MAAM;AAClC,GAAI,KAAK,eAAe,EAAE,IAAI,KAAK,0BAA0B,MACzD,KAAK,yBAAyB,IAC9B,KAAK,OAAO;IAElB,EAEF,KAAK,iBACD,UACC,MAAU;AACP,OAAI,KAAK,YAAY,KAAK,aAAa,WAAW,EAAE;AAChD,MAAM,0BAA0B;AAChC;;GAGJ,IAAM,IAAO,KAAK,aAAa,OAAO,EAAE,aAAa,EAAE,MAAM;AAE7D,OAAI,MAAS,YAAY,MAAS,QAC9B;GAGJ,IAAM,IAAO,KAAK,QAAQ,OAAO;AAMjC,GAJI,KAAQ,MAAS,YACjB,EAAK,eAAe,EAGpB,KAAQ,MAAS,WACjB,EAAK,OAAO;KAGpB,EAAE,SAAS,IAAM,CACpB;;CAGL,eAAuB,GAA+B;AAClD,UAAQ,EAAM,KAAd;GACI,KAAK;GACL,KAAK;GACL,KAAK,QACD,QAAO;GACX,QACI,QAAO;;;CAInB,QAAwB;AACpB,EAAI,CAAC,KAAK,YAAY,CAAC,KAAK,aAAa,WAAW,IAChD,MAAM,OAAO;;CAIrB,oBAAoC;EAChC,IAAM,IAAa,KAAK,cAAc;AAatC,EAZA,MAAM,mBAAmB,EACrB,MACA,KAAK,WAAY,qBAAqB,CAAC,EAAO,WAAW,GAGxD,KAAK,aAAa,WAAW,KAC9B,KAAK,WAAW,IAGpB,KAAK,SAAS,KAAK,WAAY,cAAc,QAAQ,EAErD,KAAK,YAAY,EACZ,KAAK,aAAa,OAAO,IAC1B,KAAK,aAAa,QAAQ,SAAS;;CAI3C,yBAAyC,GAAc,GAA+B;AAClF,UAAQ,GAAR;GACI,KAAK;AACD,SAAK,YAAY;AACjB;GAEJ,KAAK;AACD,IAAI,KAAK,YAAY,cAGZ,KAAK,aAAa,eAAe,IAClC,KAAK,aAAa,gBAAgB,QAAQ,GAEvC,GAAU,aAAa,KAAK,eACnC,KAAK,gBAAgB,eAAe;AAExC;;;CAKZ,aAAqB;AACjB,MAAI,KAAK,QAAQ;GACb,IAAM,IAAU,KAAK,aAAa,OAAO;AACzC,GAAI,MACA,KAAK,OAAO,MAAM;;;;AAKlC,EAAO,eAAe"}
|
package/dist/docs/doc.mjs
CHANGED
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=`<style>
|
|
2
|
+
.surfaces {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
gap: var(--spacing-x8, 16px);
|
|
6
|
+
}
|
|
7
|
+
.surface {
|
|
8
|
+
flex: 1 1 auto;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
padding: var(--spacing-x12, 24px);
|
|
12
|
+
border-radius: var(--radius-m, 8px);
|
|
13
|
+
}
|
|
14
|
+
.surface {
|
|
15
|
+
background: var(--sd-button-contrast-source);
|
|
16
|
+
}
|
|
17
|
+
.surface.light {
|
|
18
|
+
--sd-button-contrast-source: #f4f4f5;
|
|
19
|
+
}
|
|
20
|
+
.surface.dark {
|
|
21
|
+
--sd-button-contrast-source: #18181b;
|
|
22
|
+
}
|
|
23
|
+
.surface.accent {
|
|
24
|
+
--sd-button-contrast-source: #1467ba;
|
|
25
|
+
}
|
|
26
|
+
.surface.brand {
|
|
27
|
+
--sd-button-contrast-source: #e2001a;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
30
|
+
<div class="surfaces">
|
|
31
|
+
<div class="surface light">
|
|
32
|
+
<sd-button variant="contrast" icon="new.svg"><span>Light surface</span></sd-button>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="surface dark">
|
|
35
|
+
<sd-button variant="contrast" icon="new.svg"><span>Dark surface</span></sd-button>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="surface accent">
|
|
38
|
+
<sd-button variant="contrast" icon="new.svg"><span>Accent surface</span></sd-button>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="surface brand">
|
|
41
|
+
<sd-button variant="contrast" icon="new.svg"><span>Brand surface</span></sd-button>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
`,d='<h3 id="a-`contrast`-button-that-derives-its-color-from-the-surface-behind-it.">A `contrast` button that derives its color from the surface behind it.</h3>\n',f=s({default:()=>p}),p={mainContent:u,description:d,isolateMainContent:!0},m=`sd-button[variant="custom"] {
|
|
2
45
|
--sd-button-background-color: var(--color-rainbow-green-default, #8abd0c);
|
|
3
46
|
--sd-button-color: var(--color-fg-interaction-on-color, #ffffff);
|
|
4
47
|
}
|
|
5
|
-
`,
|
|
6
|
-
`,
|
|
48
|
+
`,h=`<h3 id="create-and-access-a-button-with-typescript-code.">Create and access a button with typescript code.</h3>
|
|
49
|
+
`,g=`import { Button, BUTTON_VARIANTS } from "@cas-smartdesign/button";
|
|
7
50
|
|
|
8
51
|
Button.ensureDefined();
|
|
9
52
|
|
|
@@ -34,7 +77,7 @@ export default function (root: HTMLElement) {
|
|
|
34
77
|
disabledButton.style.marginLeft = "8px";
|
|
35
78
|
root.shadowRoot?.appendChild(disabledButton);
|
|
36
79
|
}
|
|
37
|
-
`,
|
|
80
|
+
`,_=`modulepreload`,v=function(e,t){return new URL(e,t).href},y={},b=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=v(t,n),t in y)return;y[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:_,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},x=s({default:()=>S}),S={mainContent:``,description:h,css:m,initializer:{content:g,type:`typescript`,initialize:e=>b(()=>import(`./created_from_source.js`).then(t=>t.default(e)),[],import.meta.url)},isolateMainContent:!0},C=`<style>
|
|
38
81
|
sd-button.inverse-order {
|
|
39
82
|
flex-direction: row-reverse !important;
|
|
40
83
|
}
|
|
@@ -209,10 +252,25 @@ export default function (root: HTMLElement) {
|
|
|
209
252
|
<sd-button variant="custom" aria-disabled="true" icon="new.svg"><span>Button</span></sd-button>
|
|
210
253
|
</td>
|
|
211
254
|
</tr>
|
|
255
|
+
<tr>
|
|
256
|
+
<td class="variant-label">contrast</td>
|
|
257
|
+
<td class="button-cell">
|
|
258
|
+
<sd-button variant="contrast" icon="new.svg"><span>Button</span></sd-button>
|
|
259
|
+
</td>
|
|
260
|
+
<td class="button-cell">
|
|
261
|
+
<sd-button variant="contrast" icon="new.svg" class="inverse-order"><span>Button</span></sd-button>
|
|
262
|
+
</td>
|
|
263
|
+
<td class="button-cell">
|
|
264
|
+
<sd-button variant="contrast" icon="new.svg"></sd-button>
|
|
265
|
+
</td>
|
|
266
|
+
<td class="button-cell">
|
|
267
|
+
<sd-button variant="contrast" aria-disabled="true" icon="new.svg"><span>Button</span></sd-button>
|
|
268
|
+
</td>
|
|
269
|
+
</tr>
|
|
212
270
|
</tbody>
|
|
213
271
|
</table>
|
|
214
|
-
`,
|
|
215
|
-
`,
|
|
272
|
+
`,ee=`<h3 id="create-a-button-element-declaratively.">Create a button element declaratively.</h3>
|
|
273
|
+
`,w=s({default:()=>T}),T={mainContent:C,description:ee,css:m,isolateMainContent:!0},E=`<form method="get" style="padding: 2px">
|
|
216
274
|
<div><input type="text" name="input" value="Some input" /></div>
|
|
217
275
|
<div style="display: flex; gap: 8px; padding: 8px 0px">
|
|
218
276
|
<sd-button type="submit" variant="primary">Submit</sd-button>
|
|
@@ -221,8 +279,8 @@ export default function (root: HTMLElement) {
|
|
|
221
279
|
<sd-button type="reset" disabled>Reset</sd-button>
|
|
222
280
|
</div>
|
|
223
281
|
</form>
|
|
224
|
-
`,
|
|
225
|
-
`,
|
|
282
|
+
`,te=`<h3 id="create-a-button-element-and-use-it-in-a-html-form.">Create a button element and use it in a HTML form.</h3>
|
|
283
|
+
`,D=s({default:()=>O}),O={mainContent:E,description:te,isolateMainContent:!0},k=`<div style="display: flex; gap: 8px; flex-wrap: wrap; padding: 2px">
|
|
226
284
|
<button class="sd-btn sd-btn--primary">Primary</button>
|
|
227
285
|
<button class="sd-btn sd-btn--outline">Outline</button>
|
|
228
286
|
<button class="sd-btn">Standard</button>
|
|
@@ -245,8 +303,8 @@ export default function (root: HTMLElement) {
|
|
|
245
303
|
</button>
|
|
246
304
|
<button class="sd-btn sd-btn--primary" disabled>Disabled</button>
|
|
247
305
|
</div>
|
|
248
|
-
`,
|
|
249
|
-
`,
|
|
306
|
+
`,A=`<h3 id="apply-the-button-styling-to-a-native-<code><button></code>-via-the-scss-mixins.">Apply the button styling to a native <code><button></code> via the SCSS mixins.</h3>
|
|
307
|
+
`,j=`.sd-btn{box-sizing:border-box;vertical-align:middle;height:min-content;min-height:36px;padding:var(--spacing-x3,6px) var(--spacing-x4,8px);border-radius:var(--radius-s,4px);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:inline-flex}.sd-btn:focus-visible{outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}.sd-btn:is(:disabled,[disabled],[aria-disabled=true]){cursor:default}.sd-btn{background-color:var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4));color:var(--sd-button-color,var(--color-fg-action-neutral-default,#111));border:var(--sd-button-border,none)}.sd-btn:is(:focus,:hover){background-color:var(--sd-button-background-color-hover,var(--color-bg-action-neutral-default-hover,#c6c6c6));color:var(--sd-button-color-hover,var(--color-fg-action-neutral-default-hover,#111));border-color:var(--sd-button-border-color-hover,transparent)}.sd-btn:active{background-color:var(--sd-button-background-color-pressed,var(--color-bg-action-neutral-default-pressed,#b3b3b3));color:var(--sd-button-color-pressed,var(--color-fg-action-neutral-default-pressed,#111));border-color:var(--sd-button-border-color-pressed,transparent)}.sd-btn:is(:disabled,[disabled],[aria-disabled=true]){background-color:var(--sd-button-background-color-disabled,var(--color-bg-interaction-disabled,#e7e7e7));color:var(--sd-button-color-disabled,var(--color-fg-interaction-disabled,#999));border-color:var(--sd-button-border-color-disabled,transparent)}.sd-btn{font:var(--text-body)}.sd-btn--primary{--sd-button-background-color:var(--color-bg-action-accent-default,#1467ba);--sd-button-color:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-hover:var(--color-bg-action-accent-default-hover,#0f4d8b);--sd-button-color-hover:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-pressed:var(--color-bg-action-accent-default-pressed,#0b3a69);--sd-button-color-pressed:var(--color-fg-interaction-on-color,#fff)}.sd-btn--outline{--sd-button-background-color:var(--color-bg-action-accent-weak,#e0ebf6);--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-border:1px solid var(--color-border-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weak-hover,#d5e4f3);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-border-color-hover:var(--color-border-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weak-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-border-color-pressed:var(--color-border-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}.sd-btn--ghost{--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weakest-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weakest-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent}.sd-btn--outline-danger{--sd-button-background-color:var(--color-bg-action-danger-default,#fbdde0);--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-border:1px solid var(--color-border-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-border-color-hover:var(--color-border-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-border-color-pressed:var(--color-border-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}.sd-btn--ghost-danger{--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent}.sd-btn--selection{--sd-button-background-color:var(--color-bg-selection-neutral-weakest,#fff);--sd-button-color:var(--color-fg-selection-neutral-default,#111);--sd-button-border:1px solid var(--color-border-selection-neutral-default,#999);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-hover:var(--color-border-selection-neutral-default,#999);--sd-button-background-color-pressed:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-color-pressed:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-pressed:var(--color-border-selection-accent-default,#1467ba);--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}.sd-btn--selection[aria-pressed=true]{--sd-button-background-color:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border:1px solid var(--color-border-selection-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border-color-hover:var(--color-border-selection-accent-default,#1467ba)}`,M=`// Apply the SmartDesign button styling to your own elements — here a native <button>.
|
|
250
308
|
@use "../../../scss/button" as sd-button; /// @use "@cas-smartdesign/button/scss/button" as sd-button;
|
|
251
309
|
|
|
252
310
|
.sd-btn {
|
|
@@ -280,9 +338,9 @@ export default function (root: HTMLElement) {
|
|
|
280
338
|
// The selected look is applied on [aria-pressed="true"], managed by the app.
|
|
281
339
|
@include sd-button.selection-checked;
|
|
282
340
|
}
|
|
283
|
-
`,
|
|
284
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(e,t){return P(e)||F(e,t)||L(e,t)||te()}function L(e,t){if(e){if(typeof e==`string`)return N(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}var ne=Object.entries,re=Object.setPrototypeOf,R=Object.isFrozen,ie=Object.getPrototypeOf,z=Object.getOwnPropertyDescriptor,B=Object.freeze,V=Object.seal,ae=Object.create,oe=typeof Reflect<`u`&&Reflect,se=oe.apply,ce=oe.construct;B||=function(e){return e},V||=function(e){return e},se||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ce||=function(e){return new e(...[...arguments].slice(1))};var le=G(Array.prototype.forEach),ue=G(Array.prototype.lastIndexOf),de=G(Array.prototype.pop),fe=G(Array.prototype.push),pe=G(Array.prototype.splice),H=Array.isArray,me=G(String.prototype.toLowerCase),he=G(String.prototype.toString),ge=G(String.prototype.match),_e=G(String.prototype.replace),ve=G(String.prototype.indexOf),ye=G(String.prototype.trim),be=G(Number.prototype.toString),xe=G(Boolean.prototype.toString),Se=typeof BigInt>`u`?null:G(BigInt.prototype.toString),Ce=typeof Symbol>`u`?null:G(Symbol.prototype.toString),U=G(Object.prototype.hasOwnProperty),we=G(Object.prototype.toString),W=G(RegExp.prototype.test),Te=Ee(TypeError);function G(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return se(e,t,n)}}function Ee(e){return function(){return ce(e,[...arguments])}}function K(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:me;if(re&&re(e,null),!H(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(R(t)||(t[r]=e),i=e)}e[i]=!0}return e}function De(e){for(let t=0;t<e.length;t++)U(e,t)||(e[t]=null);return e}function q(e){let t=ae(null);for(let r of ne(e)){var n=I(r,2);let i=n[0],a=n[1];U(e,i)&&(H(a)?t[i]=De(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=q(a):t[i]=a)}return t}function Oe(e){switch(typeof e){case`string`:return e;case`number`:return be(e);case`boolean`:return xe(e);case`bigint`:return Se?Se(e):`0`;case`symbol`:return Ce?Ce(e):`Symbol()`;case`undefined`:return we(e);case`function`:case`object`:{if(e===null)return we(e);let t=e,n=J(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:we(e)}return we(e)}default:return we(e)}}function J(e,t){for(;e!==null;){let n=z(e,t);if(n){if(n.get)return G(n.get);if(typeof n.value==`function`)return G(n.value)}e=ie(e)}function n(){return null}return n}function ke(e){try{return W(e,``),!0}catch{return!1}}var Ae=B(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),je=B(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Me=B([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ne=B([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Pe=B(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Fe=B([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ie=B([`#text`]),Le=B(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Re=B(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),ze=B(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Be=B([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ve=V(/{{[\w\W]*|^[\w\W]*}}/g),He=V(/<%[\w\W]*|^[\w\W]*%>/g),Ue=V(/\${[\w\W]*/g),We=V(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ge=V(/^aria-[\-\w]+$/),Ke=V(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qe=V(/^(?:\w+script|data):/i),Je=V(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ye=V(/^html$/i),Xe=V(/^[a-z][.\w]*(-[.\w]+)+$/i),Ze={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Qe=function(){return typeof window>`u`?null:window},$e=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},et=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function tt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qe(),t=e=>tt(e);if(t.version=`3.4.7`,t.removed=[],!e||!e.document||e.document.nodeType!==Ze.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=J(d,`cloneNode`),p=J(d,`remove`),m=J(d,`nextSibling`),h=J(d,`childNodes`),g=J(d,`parentNode`),_=J(d,`shadowRoot`),v=J(d,`attributes`),y=o&&o.prototype?J(o.prototype,`nodeType`):null,b=o&&o.prototype?J(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C=n,w=C.implementation,T=C.createNodeIterator,E=C.createDocumentFragment,D=C.getElementsByTagName,ee=r.importNode,O=et();t.isSupported=typeof ne==`function`&&typeof g==`function`&&w&&w.createHTMLDocument!==void 0;let k=Ve,A=He,j=Ue,M=We,N=Ge,P=qe,F=Je,te=Xe,I=Ke,L=null,re=K({},[...Ae,...je,...Me,...Pe,...Ie]),R=null,ie=K({},[...Le,...Re,...ze,...Be]),z=Object.seal(ae(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,oe=null,se=Object.seal(ae(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ce=!0,be=!0,xe=!1,Se=!0,Ce=!1,we=!0,G=!1,Ee=!1,De=!1,nt=!1,rt=!1,it=!1,at=!0,ot=!1,st=`user-content-`,ct=!0,lt=!1,ut={},Y=null,dt=K({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),ft=null,pt=K({},[`audio`,`video`,`img`,`source`,`image`,`track`]),X=null,mt=K({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),ht=`http://www.w3.org/1998/Math/MathML`,gt=`http://www.w3.org/2000/svg`,Z=`http://www.w3.org/1999/xhtml`,_t=Z,vt=!1,yt=null,bt=K({},[ht,gt,Z],he),xt=K({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),St=K({},[`annotation-xml`]),Ct=K({},[`title`,`style`,`font`,`a`,`script`]),wt=null,Tt=[`application/xhtml+xml`,`text/html`],Q=null,Et=null,Dt=n.createElement(`form`),Ot=function(e){return e instanceof RegExp||e instanceof Function},kt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Et&&Et===e)return;(!e||typeof e!=`object`)&&(e={}),e=q(e),wt=Tt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Q=wt===`application/xhtml+xml`?he:me,L=U(e,`ALLOWED_TAGS`)&&H(e.ALLOWED_TAGS)?K({},e.ALLOWED_TAGS,Q):re,R=U(e,`ALLOWED_ATTR`)&&H(e.ALLOWED_ATTR)?K({},e.ALLOWED_ATTR,Q):ie,yt=U(e,`ALLOWED_NAMESPACES`)&&H(e.ALLOWED_NAMESPACES)?K({},e.ALLOWED_NAMESPACES,he):bt,X=U(e,`ADD_URI_SAFE_ATTR`)&&H(e.ADD_URI_SAFE_ATTR)?K(q(mt),e.ADD_URI_SAFE_ATTR,Q):mt,ft=U(e,`ADD_DATA_URI_TAGS`)&&H(e.ADD_DATA_URI_TAGS)?K(q(pt),e.ADD_DATA_URI_TAGS,Q):pt,Y=U(e,`FORBID_CONTENTS`)&&H(e.FORBID_CONTENTS)?K({},e.FORBID_CONTENTS,Q):dt,V=U(e,`FORBID_TAGS`)&&H(e.FORBID_TAGS)?K({},e.FORBID_TAGS,Q):q({}),oe=U(e,`FORBID_ATTR`)&&H(e.FORBID_ATTR)?K({},e.FORBID_ATTR,Q):q({}),ut=U(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?q(e.USE_PROFILES):e.USE_PROFILES:!1,ce=e.ALLOW_ARIA_ATTR!==!1,be=e.ALLOW_DATA_ATTR!==!1,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ce=e.SAFE_FOR_TEMPLATES||!1,we=e.SAFE_FOR_XML!==!1,G=e.WHOLE_DOCUMENT||!1,nt=e.RETURN_DOM||!1,rt=e.RETURN_DOM_FRAGMENT||!1,it=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,at=e.SANITIZE_DOM!==!1,ot=e.SANITIZE_NAMED_PROPS||!1,ct=e.KEEP_CONTENT!==!1,lt=e.IN_PLACE||!1,I=ke(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ke,_t=typeof e.NAMESPACE==`string`?e.NAMESPACE:Z,xt=U(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?q(e.MATHML_TEXT_INTEGRATION_POINTS):K({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),St=U(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?q(e.HTML_INTEGRATION_POINTS):K({},[`annotation-xml`]);let t=U(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?q(e.CUSTOM_ELEMENT_HANDLING):ae(null);if(z=ae(null),U(t,`tagNameCheck`)&&Ot(t.tagNameCheck)&&(z.tagNameCheck=t.tagNameCheck),U(t,`attributeNameCheck`)&&Ot(t.attributeNameCheck)&&(z.attributeNameCheck=t.attributeNameCheck),U(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Ce&&(be=!1),rt&&(nt=!0),ut&&(L=K({},Ie),R=ae(null),ut.html===!0&&(K(L,Ae),K(R,Le)),ut.svg===!0&&(K(L,je),K(R,Re),K(R,Be)),ut.svgFilters===!0&&(K(L,Me),K(R,Re),K(R,Be)),ut.mathMl===!0&&(K(L,Pe),K(R,ze),K(R,Be))),se.tagCheck=null,se.attributeCheck=null,U(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?se.tagCheck=e.ADD_TAGS:H(e.ADD_TAGS)&&(L===re&&(L=q(L)),K(L,e.ADD_TAGS,Q))),U(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?se.attributeCheck=e.ADD_ATTR:H(e.ADD_ATTR)&&(R===ie&&(R=q(R)),K(R,e.ADD_ATTR,Q))),U(e,`ADD_URI_SAFE_ATTR`)&&H(e.ADD_URI_SAFE_ATTR)&&K(X,e.ADD_URI_SAFE_ATTR,Q),U(e,`FORBID_CONTENTS`)&&H(e.FORBID_CONTENTS)&&(Y===dt&&(Y=q(Y)),K(Y,e.FORBID_CONTENTS,Q)),U(e,`ADD_FORBID_CONTENTS`)&&H(e.ADD_FORBID_CONTENTS)&&(Y===dt&&(Y=q(Y)),K(Y,e.ADD_FORBID_CONTENTS,Q)),ct&&(L[`#text`]=!0),G&&K(L,[`html`,`head`,`body`]),L.table&&(K(L,[`tbody`]),delete V.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Te(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Te(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);x=e.TRUSTED_TYPES_POLICY,S=x.createHTML(``)}else x===void 0&&(x=$e(u,i)),x!==null&&typeof S==`string`&&(S=x.createHTML(``));(O.uponSanitizeElement.length>0||O.uponSanitizeAttribute.length>0)&&L===re&&(L=q(L)),O.uponSanitizeAttribute.length>0&&R===ie&&(R=q(R)),B&&B(e),Et=e},At=K({},[...je,...Me,...Ne]),jt=K({},[...Pe,...Fe]),Mt=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:_t,tagName:`template`});let n=me(e.tagName),r=me(t.tagName);return yt[e.namespaceURI]?e.namespaceURI===gt?t.namespaceURI===Z?n===`svg`:t.namespaceURI===ht?n===`svg`&&(r===`annotation-xml`||xt[r]):!!At[n]:e.namespaceURI===ht?t.namespaceURI===Z?n===`math`:t.namespaceURI===gt?n===`math`&&St[r]:!!jt[n]:e.namespaceURI===Z?t.namespaceURI===gt&&!St[r]||t.namespaceURI===ht&&!xt[r]?!1:!jt[n]&&(Ct[n]||!At[n]):!!(wt===`application/xhtml+xml`&&yt[e.namespaceURI]):!1},Nt=function(e){fe(t.removed,{element:e});try{g(e).removeChild(e)}catch{p(e)}},Pt=function(e,n){try{fe(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{fe(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(nt||rt)try{Nt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ft=function(e){let t=null,r=null;if(De)e=`<remove></remove>`+e;else{let t=ge(e,/^[\r\n\t ]+/);r=t&&t[0]}wt===`application/xhtml+xml`&&_t===Z&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?x.createHTML(e):e;if(_t===Z)try{t=new l().parseFromString(i,wt)}catch{}if(!t||!t.documentElement){t=w.createDocument(_t,`template`,null);try{t.documentElement.innerHTML=vt?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),_t===Z?D.call(t,G?`html`:`body`)[0]:G?t.documentElement:a},It=function(e){return T.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Lt=function(e){e.normalize();let t=T.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;){let e=n.data;le([k,A,j],t=>{e=_e(e,t,` `)}),n.data=e,n=t.nextNode()}},Rt=function(e){let t=b?b(e):null;return typeof t!=`string`||Q(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},$=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===Ze.documentFragment}catch{return!1}},zt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Bt(e,n,r){le(e,e=>{e.call(t,n,r,Et)})}let Vt=function(e){let n=null;if(Bt(O.beforeSanitizeElements,e,null),Rt(e))return Nt(e),!0;let r=Q(e.nodeName);if(Bt(O.uponSanitizeElement,e,{tagName:r,allowedTags:L}),we&&e.hasChildNodes()&&!zt(e.firstElementChild)&&W(/<[/\w!]/g,e.innerHTML)&&W(/<[/\w!]/g,e.textContent)||we&&e.namespaceURI===Z&&r===`style`&&zt(e.firstElementChild)||e.nodeType===Ze.progressingInstruction||we&&e.nodeType===Ze.comment&&W(/<[/\w]/g,e.data))return Nt(e),!0;if(V[r]||!(se.tagCheck instanceof Function&&se.tagCheck(r))&&!L[r]){if(!V[r]&&Wt(r)&&(z.tagNameCheck instanceof RegExp&&W(z.tagNameCheck,r)||z.tagNameCheck instanceof Function&&z.tagNameCheck(r)))return!1;if(ct&&!Y[r]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=f(n[i],!0);t.insertBefore(r,m(e))}}}return Nt(e),!0}return(y?y(e):e.nodeType)===Ze.element&&!Mt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&W(/<\/no(script|embed|frames)/i,e.innerHTML)?(Nt(e),!0):(Ce&&e.nodeType===Ze.text&&(n=e.textContent,le([k,A,j],e=>{n=_e(n,e,` `)}),e.textContent!==n&&(fe(t.removed,{element:e.cloneNode()}),e.textContent=n)),Bt(O.afterSanitizeElements,e,null),!1)},Ht=function(e,t,r){if(oe[t]||at&&(t===`id`||t===`name`)&&(r in n||r in Dt))return!1;let i=R[t]||se.attributeCheck instanceof Function&&se.attributeCheck(t,e);if(!(be&&!oe[t]&&W(M,t))&&!(ce&&W(N,t))){if(!i||oe[t]){if(!(Wt(e)&&(z.tagNameCheck instanceof RegExp&&W(z.tagNameCheck,e)||z.tagNameCheck instanceof Function&&z.tagNameCheck(e))&&(z.attributeNameCheck instanceof RegExp&&W(z.attributeNameCheck,t)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(t,e))||t===`is`&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&W(z.tagNameCheck,r)||z.tagNameCheck instanceof Function&&z.tagNameCheck(r))))return!1}else if(!X[t]&&!W(I,_e(r,F,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ve(r,`data:`)===0&&ft[e])&&!(xe&&!W(P,_e(r,F,``)))&&r)return!1}return!0},Ut=K({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Wt=function(e){return!Ut[me(e)]&&W(te,e)},Gt=function(e){Bt(O.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||Rt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},i=n.length;for(;i--;){let a=n[i],o=a.name,s=a.namespaceURI,c=a.value,l=Q(o),d=c,f=o===`value`?d:ye(d);if(r.attrName=l,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,Bt(O.uponSanitizeAttribute,e,r),f=r.attrValue,ot&&(l===`id`||l===`name`)&&ve(f,st)!==0&&(Pt(o,e),f=st+f),we&&W(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Pt(o,e);continue}if(l===`attributename`&&ge(f,`href`)){Pt(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Pt(o,e);continue}if(!Se&&W(/\/>/i,f)){Pt(o,e);continue}Ce&&le([k,A,j],e=>{f=_e(f,e,` `)});let p=Q(e.nodeName);if(!Ht(p,l,f)){Pt(o,e);continue}if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!s)switch(u.getAttributeType(p,l)){case`TrustedHTML`:f=x.createHTML(f);break;case`TrustedScriptURL`:f=x.createScriptURL(f);break}if(f!==d)try{s?e.setAttributeNS(s,o,f):e.setAttribute(o,f),Rt(e)?Nt(e):de(t.removed)}catch{Pt(o,e)}}Bt(O.afterSanitizeAttributes,e,null)},Kt=function(e){let t=null,n=It(e);for(Bt(O.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Bt(O.uponSanitizeShadowNode,t,null),Vt(t),Gt(t),$(t.content)&&Kt(t.content),(y?y(t):t.nodeType)===Ze.element){let e=_?_(t):t.shadowRoot;$(e)&&(qt(e),Kt(e))}Bt(O.afterSanitizeShadowDOM,e,null)},qt=function(e){let t=y?y(e):e.nodeType;if(t===Ze.element){let t=_?_(e):e.shadowRoot;$(t)&&(qt(t),Kt(t))}let n=h?h(e):e.childNodes;if(!n)return;let r=[];le(n,e=>{fe(r,e)});for(let e of r)qt(e);if(t===Ze.element){let t=b?b(e):null;if(typeof t==`string`&&Q(t)===`template`){let t=e.content;$(t)&&qt(t)}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(vt=!e,vt&&(e=`<!-->`),typeof e!=`string`&&!zt(e)&&(e=Oe(e),typeof e!=`string`))throw Te(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(Ee||kt(n),t.removed=[],typeof e==`string`&&(lt=!1),lt){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=Q(t);if(!L[e]||V[e])throw Te(`root node is forbidden and cannot be sanitized in-place`)}if(Rt(e))throw Te(`root node is clobbered and cannot be sanitized in-place`);qt(e)}else if(zt(e))i=Ft(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Ze.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),qt(a);else{if(!nt&&!Ce&&!G&&e.indexOf(`<`)===-1)return x&&it?x.createHTML(e):e;if(i=Ft(e),!i)return nt?null:it?S:``}i&&De&&Nt(i.firstChild);let c=It(lt?e:i);for(;o=c.nextNode();)Vt(o),Gt(o),$(o.content)&&Kt(o.content);if(lt)return Ce&&Lt(e),e;if(nt){if(Ce&&Lt(i),rt)for(s=E.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(R.shadowroot||R.shadowrootmode)&&(s=ee.call(r,s,!0)),s}let l=G?i.outerHTML:i.innerHTML;return G&&L[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&W(Ye,i.ownerDocument.doctype.name)&&(l=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
285
|
-
`+l),
|
|
341
|
+
`,N=s({default:()=>P}),P={mainContent:k,description:A,css:{type:`css`,label:`Compiled CSS`,content:j},additionalSources:[{type:`source`,label:`SCSS`,language:`css`,content:M}],isolateMainContent:!0},ne=class e extends HTMLElement{static{this.TEMPLATE_CACHE={}}memoizedTemplate(){let t=this.is();if(e.TEMPLATE_CACHE[t])return e.TEMPLATE_CACHE[t];let n=this.template();return window.ShadyCSS&&window.ShadyCSS.prepareTemplate(n,this.is()),e.TEMPLATE_CACHE[t]=n,n}connectedCallback(){let e=this.memoizedTemplate();window.ShadyCSS&&window.ShadyCSS.styleElement(this),this.shadowRoot||(this.attachShadow({mode:`open`}).appendChild(document.importNode(e.content,!0)),requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent(`sd-element-ready`))))}disconnectedCallback(){}attributeChangedCallback(e,t,n){}adoptedCallback(){}connectedMoveCallback(){}whenReady(e){this.shadowRoot?e():this.addEventListener(`sd-element-ready`,()=>e())}};function F(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function I(e){if(Array.isArray(e))return e}function re(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function L(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
342
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ie(e,t){return I(e)||re(e,t)||R(e,t)||L()}function R(e,t){if(e){if(typeof e==`string`)return F(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}var ae=Object.entries,oe=Object.setPrototypeOf,se=Object.isFrozen,z=Object.getPrototypeOf,ce=Object.getOwnPropertyDescriptor,B=Object.freeze,V=Object.seal,le=Object.create,ue=typeof Reflect<`u`&&Reflect,de=ue.apply,fe=ue.construct;B||=function(e){return e},V||=function(e){return e},de||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},fe||=function(e){return new e(...[...arguments].slice(1))};var pe=q(Array.prototype.forEach),me=q(Array.prototype.lastIndexOf),he=q(Array.prototype.pop),ge=q(Array.prototype.push),_e=q(Array.prototype.splice),H=Array.isArray,U=q(String.prototype.toLowerCase),ve=q(String.prototype.toString),ye=q(String.prototype.match),be=q(String.prototype.replace),xe=q(String.prototype.indexOf),Se=q(String.prototype.trim),Ce=q(Number.prototype.toString),we=q(Boolean.prototype.toString),Te=typeof BigInt>`u`?null:q(BigInt.prototype.toString),Ee=typeof Symbol>`u`?null:q(Symbol.prototype.toString),W=q(Object.prototype.hasOwnProperty),G=q(Object.prototype.toString),K=q(RegExp.prototype.test),De=Oe(TypeError);function q(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return de(e,t,n)}}function Oe(e){return function(){return fe(e,[...arguments])}}function J(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U;if(oe&&oe(e,null),!H(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(se(t)||(t[r]=e),i=e)}e[i]=!0}return e}function ke(e){for(let t=0;t<e.length;t++)W(e,t)||(e[t]=null);return e}function Y(e){let t=le(null);for(let r of ae(e)){var n=ie(r,2);let i=n[0],a=n[1];W(e,i)&&(H(a)?t[i]=ke(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=Y(a):t[i]=a)}return t}function Ae(e){switch(typeof e){case`string`:return e;case`number`:return Ce(e);case`boolean`:return we(e);case`bigint`:return Te?Te(e):`0`;case`symbol`:return Ee?Ee(e):`Symbol()`;case`undefined`:return G(e);case`function`:case`object`:{if(e===null)return G(e);let t=e,n=je(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:G(e)}return G(e)}default:return G(e)}}function je(e,t){for(;e!==null;){let n=ce(e,t);if(n){if(n.get)return q(n.get);if(typeof n.value==`function`)return q(n.value)}e=z(e)}function n(){return null}return n}function Me(e){try{return K(e,``),!0}catch{return!1}}var Ne=B(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Pe=B(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Fe=B([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ie=B([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Le=B(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Re=B([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ze=B([`#text`]),Be=B(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ve=B(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),He=B(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ue=B([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),We=V(/{{[\w\W]*|^[\w\W]*}}/g),Ge=V(/<%[\w\W]*|^[\w\W]*%>/g),Ke=V(/\${[\w\W]*/g),qe=V(/^data-[\-\w.\u00B7-\uFFFF]+$/),Je=V(/^aria-[\-\w]+$/),Ye=V(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xe=V(/^(?:\w+script|data):/i),Ze=V(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qe=V(/^html$/i),$e=V(/^[a-z][.\w]*(-[.\w]+)+$/i),et={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},tt=function(){return typeof window>`u`?null:window},nt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},rt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function it(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt(),t=e=>it(e);if(t.version=`3.4.7`,t.removed=[],!e||!e.document||e.document.nodeType!==et.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=je(d,`cloneNode`),p=je(d,`remove`),m=je(d,`nextSibling`),h=je(d,`childNodes`),g=je(d,`parentNode`),_=je(d,`shadowRoot`),v=je(d,`attributes`),y=o&&o.prototype?je(o.prototype,`nodeType`):null,b=o&&o.prototype?je(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C=n,ee=C.implementation,w=C.createNodeIterator,T=C.createDocumentFragment,E=C.getElementsByTagName,te=r.importNode,D=rt();t.isSupported=typeof ae==`function`&&typeof g==`function`&&ee&&ee.createHTMLDocument!==void 0;let O=We,k=Ge,A=Ke,j=qe,M=Je,N=Xe,P=Ze,ne=$e,F=Ye,I=null,re=J({},[...Ne,...Pe,...Fe,...Le,...ze]),L=null,ie=J({},[...Be,...Ve,...He,...Ue]),R=Object.seal(le(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),oe=null,se=null,z=Object.seal(le(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ce=!0,V=!0,ue=!1,de=!0,fe=!1,Ce=!0,we=!1,Te=!1,Ee=!1,G=!1,q=!1,Oe=!1,ke=!0,at=!1,ot=`user-content-`,st=!0,ct=!1,lt={},X=null,ut=J({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),dt=null,ft=J({},[`audio`,`video`,`img`,`source`,`image`,`track`]),pt=null,mt=J({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),ht=`http://www.w3.org/1998/Math/MathML`,gt=`http://www.w3.org/2000/svg`,Z=`http://www.w3.org/1999/xhtml`,_t=Z,vt=!1,yt=null,bt=J({},[ht,gt,Z],ve),xt=J({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),St=J({},[`annotation-xml`]),Ct=J({},[`title`,`style`,`font`,`a`,`script`]),wt=null,Tt=[`application/xhtml+xml`,`text/html`],Q=null,Et=null,Dt=n.createElement(`form`),Ot=function(e){return e instanceof RegExp||e instanceof Function},kt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Et&&Et===e)return;(!e||typeof e!=`object`)&&(e={}),e=Y(e),wt=Tt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Q=wt===`application/xhtml+xml`?ve:U,I=W(e,`ALLOWED_TAGS`)&&H(e.ALLOWED_TAGS)?J({},e.ALLOWED_TAGS,Q):re,L=W(e,`ALLOWED_ATTR`)&&H(e.ALLOWED_ATTR)?J({},e.ALLOWED_ATTR,Q):ie,yt=W(e,`ALLOWED_NAMESPACES`)&&H(e.ALLOWED_NAMESPACES)?J({},e.ALLOWED_NAMESPACES,ve):bt,pt=W(e,`ADD_URI_SAFE_ATTR`)&&H(e.ADD_URI_SAFE_ATTR)?J(Y(mt),e.ADD_URI_SAFE_ATTR,Q):mt,dt=W(e,`ADD_DATA_URI_TAGS`)&&H(e.ADD_DATA_URI_TAGS)?J(Y(ft),e.ADD_DATA_URI_TAGS,Q):ft,X=W(e,`FORBID_CONTENTS`)&&H(e.FORBID_CONTENTS)?J({},e.FORBID_CONTENTS,Q):ut,oe=W(e,`FORBID_TAGS`)&&H(e.FORBID_TAGS)?J({},e.FORBID_TAGS,Q):Y({}),se=W(e,`FORBID_ATTR`)&&H(e.FORBID_ATTR)?J({},e.FORBID_ATTR,Q):Y({}),lt=W(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Y(e.USE_PROFILES):e.USE_PROFILES:!1,ce=e.ALLOW_ARIA_ATTR!==!1,V=e.ALLOW_DATA_ATTR!==!1,ue=e.ALLOW_UNKNOWN_PROTOCOLS||!1,de=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,fe=e.SAFE_FOR_TEMPLATES||!1,Ce=e.SAFE_FOR_XML!==!1,we=e.WHOLE_DOCUMENT||!1,G=e.RETURN_DOM||!1,q=e.RETURN_DOM_FRAGMENT||!1,Oe=e.RETURN_TRUSTED_TYPE||!1,Ee=e.FORCE_BODY||!1,ke=e.SANITIZE_DOM!==!1,at=e.SANITIZE_NAMED_PROPS||!1,st=e.KEEP_CONTENT!==!1,ct=e.IN_PLACE||!1,F=Me(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ye,_t=typeof e.NAMESPACE==`string`?e.NAMESPACE:Z,xt=W(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?Y(e.MATHML_TEXT_INTEGRATION_POINTS):J({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),St=W(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?Y(e.HTML_INTEGRATION_POINTS):J({},[`annotation-xml`]);let t=W(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?Y(e.CUSTOM_ELEMENT_HANDLING):le(null);if(R=le(null),W(t,`tagNameCheck`)&&Ot(t.tagNameCheck)&&(R.tagNameCheck=t.tagNameCheck),W(t,`attributeNameCheck`)&&Ot(t.attributeNameCheck)&&(R.attributeNameCheck=t.attributeNameCheck),W(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(R.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),fe&&(V=!1),q&&(G=!0),lt&&(I=J({},ze),L=le(null),lt.html===!0&&(J(I,Ne),J(L,Be)),lt.svg===!0&&(J(I,Pe),J(L,Ve),J(L,Ue)),lt.svgFilters===!0&&(J(I,Fe),J(L,Ve),J(L,Ue)),lt.mathMl===!0&&(J(I,Le),J(L,He),J(L,Ue))),z.tagCheck=null,z.attributeCheck=null,W(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?z.tagCheck=e.ADD_TAGS:H(e.ADD_TAGS)&&(I===re&&(I=Y(I)),J(I,e.ADD_TAGS,Q))),W(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?z.attributeCheck=e.ADD_ATTR:H(e.ADD_ATTR)&&(L===ie&&(L=Y(L)),J(L,e.ADD_ATTR,Q))),W(e,`ADD_URI_SAFE_ATTR`)&&H(e.ADD_URI_SAFE_ATTR)&&J(pt,e.ADD_URI_SAFE_ATTR,Q),W(e,`FORBID_CONTENTS`)&&H(e.FORBID_CONTENTS)&&(X===ut&&(X=Y(X)),J(X,e.FORBID_CONTENTS,Q)),W(e,`ADD_FORBID_CONTENTS`)&&H(e.ADD_FORBID_CONTENTS)&&(X===ut&&(X=Y(X)),J(X,e.ADD_FORBID_CONTENTS,Q)),st&&(I[`#text`]=!0),we&&J(I,[`html`,`head`,`body`]),I.table&&(J(I,[`tbody`]),delete oe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw De(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw De(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);x=e.TRUSTED_TYPES_POLICY,S=x.createHTML(``)}else x===void 0&&(x=nt(u,i)),x!==null&&typeof S==`string`&&(S=x.createHTML(``));(D.uponSanitizeElement.length>0||D.uponSanitizeAttribute.length>0)&&I===re&&(I=Y(I)),D.uponSanitizeAttribute.length>0&&L===ie&&(L=Y(L)),B&&B(e),Et=e},At=J({},[...Pe,...Fe,...Ie]),jt=J({},[...Le,...Re]),Mt=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:_t,tagName:`template`});let n=U(e.tagName),r=U(t.tagName);return yt[e.namespaceURI]?e.namespaceURI===gt?t.namespaceURI===Z?n===`svg`:t.namespaceURI===ht?n===`svg`&&(r===`annotation-xml`||xt[r]):!!At[n]:e.namespaceURI===ht?t.namespaceURI===Z?n===`math`:t.namespaceURI===gt?n===`math`&&St[r]:!!jt[n]:e.namespaceURI===Z?t.namespaceURI===gt&&!St[r]||t.namespaceURI===ht&&!xt[r]?!1:!jt[n]&&(Ct[n]||!At[n]):!!(wt===`application/xhtml+xml`&&yt[e.namespaceURI]):!1},Nt=function(e){ge(t.removed,{element:e});try{g(e).removeChild(e)}catch{p(e)}},Pt=function(e,n){try{ge(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ge(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(G||q)try{Nt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ft=function(e){let t=null,r=null;if(Ee)e=`<remove></remove>`+e;else{let t=ye(e,/^[\r\n\t ]+/);r=t&&t[0]}wt===`application/xhtml+xml`&&_t===Z&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?x.createHTML(e):e;if(_t===Z)try{t=new l().parseFromString(i,wt)}catch{}if(!t||!t.documentElement){t=ee.createDocument(_t,`template`,null);try{t.documentElement.innerHTML=vt?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),_t===Z?E.call(t,we?`html`:`body`)[0]:we?t.documentElement:a},It=function(e){return w.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Lt=function(e){e.normalize();let t=w.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;){let e=n.data;pe([O,k,A],t=>{e=be(e,t,` `)}),n.data=e,n=t.nextNode()}},Rt=function(e){let t=b?b(e):null;return typeof t!=`string`||Q(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},zt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===et.documentFragment}catch{return!1}},Bt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Vt(e,n,r){pe(e,e=>{e.call(t,n,r,Et)})}let Ht=function(e){let n=null;if(Vt(D.beforeSanitizeElements,e,null),Rt(e))return Nt(e),!0;let r=Q(e.nodeName);if(Vt(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),Ce&&e.hasChildNodes()&&!Bt(e.firstElementChild)&&K(/<[/\w!]/g,e.innerHTML)&&K(/<[/\w!]/g,e.textContent)||Ce&&e.namespaceURI===Z&&r===`style`&&Bt(e.firstElementChild)||e.nodeType===et.progressingInstruction||Ce&&e.nodeType===et.comment&&K(/<[/\w]/g,e.data))return Nt(e),!0;if(oe[r]||!(z.tagCheck instanceof Function&&z.tagCheck(r))&&!I[r]){if(!oe[r]&&Wt(r)&&(R.tagNameCheck instanceof RegExp&&K(R.tagNameCheck,r)||R.tagNameCheck instanceof Function&&R.tagNameCheck(r)))return!1;if(st&&!X[r]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=f(n[i],!0);t.insertBefore(r,m(e))}}}return Nt(e),!0}return(y?y(e):e.nodeType)===et.element&&!Mt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&K(/<\/no(script|embed|frames)/i,e.innerHTML)?(Nt(e),!0):(fe&&e.nodeType===et.text&&(n=e.textContent,pe([O,k,A],e=>{n=be(n,e,` `)}),e.textContent!==n&&(ge(t.removed,{element:e.cloneNode()}),e.textContent=n)),Vt(D.afterSanitizeElements,e,null),!1)},$=function(e,t,r){if(se[t]||ke&&(t===`id`||t===`name`)&&(r in n||r in Dt))return!1;let i=L[t]||z.attributeCheck instanceof Function&&z.attributeCheck(t,e);if(!(V&&!se[t]&&K(j,t))&&!(ce&&K(M,t))){if(!i||se[t]){if(!(Wt(e)&&(R.tagNameCheck instanceof RegExp&&K(R.tagNameCheck,e)||R.tagNameCheck instanceof Function&&R.tagNameCheck(e))&&(R.attributeNameCheck instanceof RegExp&&K(R.attributeNameCheck,t)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(t,e))||t===`is`&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&K(R.tagNameCheck,r)||R.tagNameCheck instanceof Function&&R.tagNameCheck(r))))return!1}else if(!pt[t]&&!K(F,be(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&xe(r,`data:`)===0&&dt[e])&&!(ue&&!K(N,be(r,P,``)))&&r)return!1}return!0},Ut=J({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Wt=function(e){return!Ut[U(e)]&&K(ne,e)},Gt=function(e){Vt(D.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||Rt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},i=n.length;for(;i--;){let a=n[i],o=a.name,s=a.namespaceURI,c=a.value,l=Q(o),d=c,f=o===`value`?d:Se(d);if(r.attrName=l,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,Vt(D.uponSanitizeAttribute,e,r),f=r.attrValue,at&&(l===`id`||l===`name`)&&xe(f,ot)!==0&&(Pt(o,e),f=ot+f),Ce&&K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Pt(o,e);continue}if(l===`attributename`&&ye(f,`href`)){Pt(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Pt(o,e);continue}if(!de&&K(/\/>/i,f)){Pt(o,e);continue}fe&&pe([O,k,A],e=>{f=be(f,e,` `)});let p=Q(e.nodeName);if(!$(p,l,f)){Pt(o,e);continue}if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!s)switch(u.getAttributeType(p,l)){case`TrustedHTML`:f=x.createHTML(f);break;case`TrustedScriptURL`:f=x.createScriptURL(f);break}if(f!==d)try{s?e.setAttributeNS(s,o,f):e.setAttribute(o,f),Rt(e)?Nt(e):he(t.removed)}catch{Pt(o,e)}}Vt(D.afterSanitizeAttributes,e,null)},Kt=function(e){let t=null,n=It(e);for(Vt(D.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Vt(D.uponSanitizeShadowNode,t,null),Ht(t),Gt(t),zt(t.content)&&Kt(t.content),(y?y(t):t.nodeType)===et.element){let e=_?_(t):t.shadowRoot;zt(e)&&(qt(e),Kt(e))}Vt(D.afterSanitizeShadowDOM,e,null)},qt=function(e){let t=y?y(e):e.nodeType;if(t===et.element){let t=_?_(e):e.shadowRoot;zt(t)&&(qt(t),Kt(t))}let n=h?h(e):e.childNodes;if(!n)return;let r=[];pe(n,e=>{ge(r,e)});for(let e of r)qt(e);if(t===et.element){let t=b?b(e):null;if(typeof t==`string`&&Q(t)===`template`){let t=e.content;zt(t)&&qt(t)}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(vt=!e,vt&&(e=`<!-->`),typeof e!=`string`&&!Bt(e)&&(e=Ae(e),typeof e!=`string`))throw De(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(Te||kt(n),t.removed=[],typeof e==`string`&&(ct=!1),ct){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=Q(t);if(!I[e]||oe[e])throw De(`root node is forbidden and cannot be sanitized in-place`)}if(Rt(e))throw De(`root node is clobbered and cannot be sanitized in-place`);qt(e)}else if(Bt(e))i=Ft(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===et.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),qt(a);else{if(!G&&!fe&&!we&&e.indexOf(`<`)===-1)return x&&Oe?x.createHTML(e):e;if(i=Ft(e),!i)return G?null:Oe?S:``}i&&Ee&&Nt(i.firstChild);let c=It(ct?e:i);for(;o=c.nextNode();)Ht(o),Gt(o),zt(o.content)&&Kt(o.content);if(ct)return fe&&Lt(e),e;if(G){if(fe&&Lt(i),q)for(s=T.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(L.shadowroot||L.shadowrootmode)&&(s=te.call(r,s,!0)),s}let l=we?i.outerHTML:i.innerHTML;return we&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&K(Qe,i.ownerDocument.doctype.name)&&(l=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
343
|
+
`+l),fe&&pe([O,k,A],e=>{l=be(l,e,` `)}),x&&Oe?x.createHTML(l):l},t.setConfig=function(){kt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Te=!0},t.clearConfig=function(){Et=null,Te=!1},t.isValidAttribute=function(e,t,n){return Et||kt({}),$(Q(e),Q(t),n)},t.addHook=function(e,t){typeof t==`function`&&ge(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=me(D[e],t);return n===-1?void 0:_e(D[e],n,1)[0]}return he(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=rt()},t}var at=it(),ot={USE_PROFILES:{svg:!0},FORBID_TAGS:[`script`,`use`],ADD_ATTR:[`from`,`to`,`calcmode`],RETURN_TRUSTED_TYPE:!0},st=/url\s*\(\s*['"]?\s*(javascript|data|vbscript)\s*:/gi,ct=[`fill`,`stroke`,`filter`,`clip-path`,`mask`,`marker-start`,`marker-mid`,`marker-end`];at.addHook(`afterSanitizeAttributes`,e=>{let t=e.getAttribute(`style`);t&&(st.lastIndex=0,st.test(t)&&e.removeAttribute(`style`));for(let t of ct){let n=e.getAttribute(t);n&&(st.lastIndex=0,st.test(n)&&e.removeAttribute(t))}});var lt=class{constructor(){this._internalPolicy=null}get trustedTypePolicy(){return this._internalPolicy===null?window.trustedTypes?.createPolicy?(this._internalPolicy=window.trustedTypes.createPolicy(X.ID,{createHTML(e){return at.sanitize(e,ot)}}),this._internalPolicy):null:this._internalPolicy}sanitize(e,t){if(e!=null)return e.createHTML(t);let n=this.trustedTypePolicy;return n==null?at.sanitize(t,ot):n.createHTML(t)}},X=class e extends HTMLElement{static{this.ID=`sd-image-embed`}static{this.ensureDefined=()=>{customElements.get(e.ID)||customElements.define(e.ID,e)}}static{this.styleSheet=new CSSStyleSheet}static{this.styleSheet.replaceSync(`
|
|
286
344
|
:host {
|
|
287
345
|
display: inline-flex;
|
|
288
346
|
align-items: center;
|
|
@@ -304,19 +362,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
304
362
|
height: 100%;
|
|
305
363
|
min-width: min(100%, var(--natural-width));
|
|
306
364
|
object-fit: scale-down;
|
|
307
|
-
}`)}static get observedAttributes(){return[`src`,`placeholder-src`]}constructor(){super(),this._loadPending=null,this._renderedPlaceholder=null,this._renderedSrc=null,this.trustedTypePolicy=null;let t=this.attachShadow({mode:`open`});this._privateStyleSheet=new CSSStyleSheet,t.adoptedStyleSheets=[e.styleSheet,this._privateStyleSheet],this._sanitizer=new
|
|
365
|
+
}`)}static get observedAttributes(){return[`src`,`placeholder-src`]}constructor(){super(),this._loadPending=null,this._renderedPlaceholder=null,this._renderedSrc=null,this.trustedTypePolicy=null;let t=this.attachShadow({mode:`open`});this._privateStyleSheet=new CSSStyleSheet,t.adoptedStyleSheets=[e.styleSheet,this._privateStyleSheet],this._sanitizer=new lt}connectedCallback(){this.svgContent&&this.inlineSVG(this.svgContent),this.role||=`img`,this.updateContentDependentStyle()}attributeChangedCallback(e,t,n){(e===`src`||e===`placeholder-src`)&&t!==n&&this._loadPending==null&&(this._loadPending=window.requestAnimationFrame(()=>{this._loadPending=null,this.loadSvg()}))}updateContentDependentStyle(){let e=!!this.src||!!this.placeholderSrc||this.shadowRoot?.querySelector(`svg`)!=null;this.classList.toggle(`no-image`,!e)}async loadSvg(){this.shadowRoot&&(this._renderedSrc===this.src&&this.shadowRoot.querySelector(`img:not(.placeholder),svg:not(.placeholder)`)!=null||(this.placeholderSrc!=this._renderedPlaceholder&&(this._renderedPlaceholder=this.placeholderSrc,this.placeholderSrc&&this.renderUrl(this.placeholderSrc,!0)),this.src!=this._renderedSrc&&(this._renderedSrc=this.src,this.src&&this.renderUrl(this.src,!1))))}async renderUrl(e,t){let n=new URL(e,document.baseURI);if(n.protocol===`data:`){this.renderDataUrl(e,t);return}n.protocol.startsWith(`http`)&&n.origin===new URL(document.baseURI).origin&&n.searchParams.set(`skip-token-processing`,``);try{let r=await fetch(n);if(!r.ok)if(r.status==404){this.updateContentDependentStyle();return}else throw Error();if(r.headers.get(`content-type`)?.includes(`image/svg+xml`)){let n=await r.text();this.isRelevantRendering(e,t)&&this.inlineSVG(n,t);return}r.status==204?this.updateContentDependentStyle():this.handleImageFallback(e,t,await r.blob())}catch{this.handleImageFallback(e,t)}}renderDataUrl(e,t){let n=/^data:([^,]*),(.*)$/s.exec(e);if(n&&/^image\/svg\+xml/i.test(n[1])){let r=/;base64/i.test(n[1])?atob(n[2]):decodeURIComponent(n[2]);this.isRelevantRendering(e,t)&&this.inlineSVG(r,t)}else this.handleImageFallback(e,t)}get src(){return this.getAttribute(`src`)}set src(e){e?this.setAttribute(`src`,e):this.removeAttribute(`src`)}get placeholderSrc(){return this.getAttribute(`placeholder-src`)}set placeholderSrc(e){e?this.setAttribute(`placeholder-src`,e):this.removeAttribute(`placeholder-src`)}get svgContent(){return this._svgContent}set svgContent(e){this.inlineSVG(e)}inlineSVG(e,t){if(this._svgContent=this.svgContent,!this.shadowRoot)return;this.initShadowRoot();let n=new DOMParser,r=(e?n.parseFromString(this._sanitizer.sanitize(this.trustedTypePolicy,e),`image/svg+xml`):void 0)?.querySelector(`svg`);if(r){let e=parseFloat(r.getAttribute(`width`)||`0`),n=parseFloat(r.getAttribute(`height`)||`0`),i=r.getAttribute(`viewBox`);if((!e||!n)&&i){let t=i.split(/\s+/);t.length===4&&(e||=parseFloat(t[2]),n||=parseFloat(t[3]))}e&&n&&(this.style.setProperty(`--image-aspect-ratio`,`${e} / ${n}`),this.style.setProperty(`--natural-width`,`${e}px`),this.style.maxWidth=`${e}px`),r.setAttribute(`preserveAspectRatio`,`xMidYMid meet`),r.removeAttribute(`width`),r.removeAttribute(`height`),(i==null||i.trim()==``&&e&&n)&&r.setAttribute(`viewBox`,`0 0 ${e} ${n}`);let a=r.getAttribute(`color`);r.removeAttribute(`color`),a?this._privateStyleSheet.replaceSync(`:host {color: var(--sd-image-embed-color, ${a})}`):this._privateStyleSheet.replaceSync(`:host {color: var(--sd-image-embed-color)}`),this.shadowRoot.appendChild(r),r.classList.toggle(`placeholder`,t),r.part=`svg`,this.dispatchEvent(new CustomEvent(`load`))}else this.dispatchEvent(new CustomEvent(`error`));this.updateContentDependentStyle()}handleImageFallback(e,t,n){if(this.shadowRoot&&(this.initShadowRoot(),this.isRelevantRendering(e,t))){if(!t){let e=this.shadowRoot.querySelector(`.placeholder`);e&&e.remove()}let r=document.createElement(`img`);r.classList.toggle(`placeholder`,t),r.src=n==null?e:URL.createObjectURL(n),r.part=`img`;let i=()=>{n!=null&&URL.revokeObjectURL(r.src)};r.onload=()=>{this.style.setProperty(`--image-aspect-ratio`,`${r.naturalWidth} / ${r.naturalHeight}`),this.style.maxWidth=`${r.naturalWidth}px`,this.style.setProperty(`--natural-width`,`${r.naturalWidth}px`),this.dispatchEvent(new CustomEvent(`load`)),i()},r.onerror=()=>{this.dispatchEvent(new CustomEvent(`error`)),i()},this.shadowRoot.appendChild(r),this.updateContentDependentStyle()}}isRelevantRendering(e,t){return this.shadowRoot?t?this.placeholderSrc==e&&this.shadowRoot.querySelector(`svg,img`)==null:this.src==e:!1}initShadowRoot(){this.shadowRoot&&(this.shadowRoot.innerHTML=``)}};X.ensureDefined();var ut=`<slot name="icon">
|
|
308
366
|
<sd-image-embed class="icon" part="icon" exportparts="img, svg"></sd-image-embed>
|
|
309
367
|
</slot>
|
|
310
368
|
<div class="content">
|
|
311
369
|
<slot></slot>
|
|
312
370
|
</div>
|
|
313
|
-
`,lt=`:host{contain:content;box-sizing:border-box;vertical-align:middle;height:min-content;min-height:36px;padding:var(--spacing-x3,6px) var(--spacing-x4,8px);border-radius:var(--radius-s,4px);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:inline-flex}:host:focus-visible{outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}:host:is(:disabled,[disabled],[aria-disabled=true]){cursor:default}:host{background-color:var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4));color:var(--sd-button-color,var(--color-fg-action-neutral-default,#111))}:host:after{content:"";border:var(--sd-button-border,none);border-radius:inherit;position:absolute;inset:0}:host(:is(:focus,:hover)){background-color:var(--sd-button-background-color-hover,var(--color-bg-action-neutral-default-hover,#c6c6c6));color:var(--sd-button-color-hover,var(--color-fg-action-neutral-default-hover,#111))}:host(:is(:focus,:hover)):after{border-color:var(--sd-button-border-color-hover,transparent)}:host(:active){background-color:var(--sd-button-background-color-pressed,var(--color-bg-action-neutral-default-pressed,#b3b3b3));color:var(--sd-button-color-pressed,var(--color-fg-action-neutral-default-pressed,#111))}:host(:active):after{border-color:var(--sd-button-border-color-pressed,transparent)}:host(:is([aria-disabled=true],[disabled])){background-color:var(--sd-button-background-color-disabled,var(--color-bg-interaction-disabled,#e7e7e7));color:var(--sd-button-color-disabled,var(--color-fg-interaction-disabled,#999))}:host(:is([aria-disabled=true],[disabled])):after{border-color:var(--sd-button-border-color-disabled,transparent)}:host(:is([aria-disabled=true],[disabled])){cursor:default}:host(:focus-visible){outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}:host([variant=primary i]){--sd-button-background-color:var(--color-bg-action-accent-default,#1467ba);--sd-button-color:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-hover:var(--color-bg-action-accent-default-hover,#0f4d8b);--sd-button-color-hover:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-pressed:var(--color-bg-action-accent-default-pressed,#0b3a69);--sd-button-color-pressed:var(--color-fg-interaction-on-color,#fff)}:host([variant=outline i]){--sd-button-background-color:var(--color-bg-action-accent-weak,#e0ebf6);--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-border:1px solid var(--color-border-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weak-hover,#d5e4f3);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-border-color-hover:var(--color-border-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weak-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-border-color-pressed:var(--color-border-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=ghost i]){--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weakest-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weakest-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent}:host([variant=outline-danger i]){--sd-button-background-color:var(--color-bg-action-danger-default,#fbdde0);--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-border:1px solid var(--color-border-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-border-color-hover:var(--color-border-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-border-color-pressed:var(--color-border-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=ghost-danger i]){--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent}:host([variant=selection i]){--sd-button-background-color:var(--color-bg-selection-neutral-weakest,#fff);--sd-button-color:var(--color-fg-selection-neutral-default,#111);--sd-button-border:1px solid var(--color-border-selection-neutral-default,#999);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-hover:var(--color-border-selection-neutral-default,#999);--sd-button-background-color-pressed:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-color-pressed:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-pressed:var(--color-border-selection-accent-default,#1467ba);--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=custom i]){--sd-button-background-color-hover:color-mix(in oklab, var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4)), var(--color-fg-default,#111) 10%);--sd-button-color-hover:var(--sd-button-color,var(--color-fg-action-neutral-default,#111));--sd-button-background-color-pressed:color-mix(in oklab, var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4)), var(--color-fg-default,#111) 20%);--sd-button-color-pressed:var(--sd-button-color,var(--color-fg-action-neutral-default,#111))}:host([variant=selection i][aria-pressed=true]){--sd-button-background-color:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border:1px solid var(--color-border-selection-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border-color-hover:var(--color-border-selection-accent-default,#1467ba)}.icon:is(:not([src]),[src=""],[src="data:,"]){display:none}.content{align-items:center;min-width:0;display:flex}.content ::slotted(*){font:var(--text-body);margin-left:var(--sd-button-content-padding,8px)}.content ::slotted(:last-child){margin-right:var(--sd-button-content-padding,8px)}.icon{max-height:var(--sd-button-max-icon-size,24px);max-width:var(--sd-button-max-icon-size,24px);color:inherit}`,ut=[`primary`,`outline`,`standard`,`ghost`,`outline-danger`,`ghost-danger`,`selection`,`custom`],Y=`standard`;function dt(e){return ut.includes(e)}var ft=class e extends M{static{this.ID=`sd-button`}static{this.ensureDefined=()=>{customElements.get(e.ID)||(customElements.define(e.ID,e),st.ensureDefined())}}static{this.styleSheet=new CSSStyleSheet}static{this.styleSheet.replaceSync(lt)}get imageElement(){return this._image}get icon(){return this.getAttribute(`icon`)}set icon(e){this.icon!==e&&(e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`),this.updateIcon())}get variant(){let e=this.getAttribute(`variant`);return dt(e)?e:Y}set variant(e){this.setAttribute(`variant`,dt(e)?e:Y)}get disabled(){return this.getAttribute(`aria-disabled`)==`true`}set disabled(e){this.setAttribute(`aria-disabled`,e.toString())}static get observedAttributes(){return[`icon`,`variant`]}is(){return e.ID}template(){let e=document.createElement(`template`);return e.innerHTML=ct,e}constructor(){super(),this._isSpaceOrEnterKeyDown=!1,this.addEventListener(`keydown`,e=>{this.isSpaceOrEnter(e)&&(this._isSpaceOrEnterKeyDown=!0,e.preventDefault())}),this.addEventListener(`keyup`,e=>{this.isSpaceOrEnter(e)&&this._isSpaceOrEnterKeyDown==1&&(this._isSpaceOrEnterKeyDown=!1,this.click())}),this.addEventListener(`click`,e=>{if(this.disabled||this.hasAttribute(`disabled`)){e.stopImmediatePropagation();return}let t=this.getAttribute(`type`)?.toLowerCase()?.trim();if(t!==`submit`&&t!==`reset`)return;let n=this.closest(`form`);n&&t===`submit`&&n.requestSubmit(),n&&t===`reset`&&n.reset()},{capture:!0})}isSpaceOrEnter(e){switch(e.key){case` `:case`Space`:case`Enter`:return!0;default:return!1}}click(){!this.disabled&&!this.hasAttribute(`disabled`)&&super.click()}connectedCallback(){let t=this.shadowRoot==null;super.connectedCallback(),t&&(this.shadowRoot.adoptedStyleSheets=[e.styleSheet]),this.hasAttribute(`tabIndex`)||(this.tabIndex=0),this._image=this.shadowRoot.querySelector(`.icon`),this.updateIcon(),this.hasAttribute(`role`)||this.setAttribute(`role`,`button`)}attributeChangedCallback(e,t){switch(e){case`icon`:this.updateIcon();break;case`variant`:this.variant===`selection`?this.hasAttribute(`aria-pressed`)||this.setAttribute(`aria-pressed`,`false`):t?.toLowerCase()===`selection`&&this.removeAttribute(`aria-pressed`);break}}updateIcon(){if(this._image){let e=this.getAttribute(`icon`);e&&(this._image.src=e)}}};ft.ensureDefined();var pt=o(((e,t)=>{var n=String,r=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n,blackBright:n,redBright:n,greenBright:n,yellowBright:n,blueBright:n,magentaBright:n,cyanBright:n,whiteBright:n,bgBlackBright:n,bgRedBright:n,bgGreenBright:n,bgYellowBright:n,bgBlueBright:n,bgMagentaBright:n,bgCyanBright:n,bgWhiteBright:n}};t.exports=r(),t.exports.createColors=r})),X=o(((e,t)=>{t.exports={}})),mt=o(((e,t)=>{var n=pt(),r=X(),i=class e extends Error{constructor(t,n,r,i,a,o){super(t),this.name=`CssSyntaxError`,this.reason=t,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),n!==void 0&&r!==void 0&&(typeof n==`number`?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(e){if(!this.source)return``;let t=this.source;e??=n.isColorSupported;let i=e=>e,a=e=>e,o=e=>e;if(e){let{bold:e,gray:t,red:s}=n.createColors(!0);a=t=>e(s(t)),i=e=>t(e),r&&(o=e=>r(e))}let s=t.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),u=String(l).length;return s.slice(c,l).map((e,t)=>{let n=c+1+t,r=` `+(` `+n).slice(-u)+` | `;if(n===this.line){if(e.length>160){let t=Math.max(0,this.column-20),n=Math.max(this.column+20,this.endColumn+20),s=e.slice(t,n),c=i(r.replace(/\d/g,` `))+e.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g,` `);return a(`>`)+i(r)+o(s)+`
|
|
371
|
+
`,dt=`:host{contain:content;box-sizing:border-box;vertical-align:middle;height:min-content;min-height:36px;padding:var(--spacing-x3,6px) var(--spacing-x4,8px);border-radius:var(--radius-s,4px);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:inline-flex}:host:focus-visible{outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}:host:is(:disabled,[disabled],[aria-disabled=true]){cursor:default}:host{background-color:var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4));color:var(--sd-button-color,var(--color-fg-action-neutral-default,#111))}:host:after{content:"";border:var(--sd-button-border,none);border-radius:inherit;position:absolute;inset:0}:host(:is(:focus,:hover)){background-color:var(--sd-button-background-color-hover,var(--color-bg-action-neutral-default-hover,#c6c6c6));color:var(--sd-button-color-hover,var(--color-fg-action-neutral-default-hover,#111))}:host(:is(:focus,:hover)):after{border-color:var(--sd-button-border-color-hover,transparent)}:host(:active){background-color:var(--sd-button-background-color-pressed,var(--color-bg-action-neutral-default-pressed,#b3b3b3));color:var(--sd-button-color-pressed,var(--color-fg-action-neutral-default-pressed,#111))}:host(:active):after{border-color:var(--sd-button-border-color-pressed,transparent)}:host(:is([aria-disabled=true],[disabled])){background-color:var(--sd-button-background-color-disabled,var(--color-bg-interaction-disabled,#e7e7e7));color:var(--sd-button-color-disabled,var(--color-fg-interaction-disabled,#999))}:host(:is([aria-disabled=true],[disabled])):after{border-color:var(--sd-button-border-color-disabled,transparent)}:host(:is([aria-disabled=true],[disabled])){cursor:default}:host(:focus-visible){outline:1px solid var(--color-border-interaction-focus,#111);outline-offset:var(--spacing-x1,2px)}:host([variant=primary i]){--sd-button-background-color:var(--color-bg-action-accent-default,#1467ba);--sd-button-color:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-hover:var(--color-bg-action-accent-default-hover,#0f4d8b);--sd-button-color-hover:var(--color-fg-interaction-on-color,#fff);--sd-button-background-color-pressed:var(--color-bg-action-accent-default-pressed,#0b3a69);--sd-button-color-pressed:var(--color-fg-interaction-on-color,#fff)}:host([variant=outline i]){--sd-button-background-color:var(--color-bg-action-accent-weak,#e0ebf6);--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-border:1px solid var(--color-border-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weak-hover,#d5e4f3);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-border-color-hover:var(--color-border-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weak-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-border-color-pressed:var(--color-border-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=ghost i]){--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-action-accent-weakest-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-action-accent-default-hover,#0f4d8b);--sd-button-background-color-pressed:var(--color-bg-action-accent-weakest-pressed,#c7dbef);--sd-button-color-pressed:var(--color-fg-action-accent-default-pressed,#0b3a69);--sd-button-background-color-disabled:transparent}:host([variant=outline-danger i]){--sd-button-background-color:var(--color-bg-action-danger-default,#fbdde0);--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-border:1px solid var(--color-border-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-border-color-hover:var(--color-border-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-border-color-pressed:var(--color-border-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent;--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=ghost-danger i]){--sd-button-background-color:transparent;--sd-button-color:var(--color-fg-action-danger-default,#a90014);--sd-button-background-color-hover:var(--color-bg-action-danger-default-hover,#fad2d6);--sd-button-color-hover:var(--color-fg-action-danger-default-hover,#7f000f);--sd-button-background-color-pressed:var(--color-bg-action-danger-default-pressed,#f8c3c9);--sd-button-color-pressed:var(--color-fg-action-danger-default-pressed,#5f000b);--sd-button-background-color-disabled:transparent}:host([variant=selection i]){--sd-button-background-color:var(--color-bg-selection-neutral-weakest,#fff);--sd-button-color:var(--color-fg-selection-neutral-default,#111);--sd-button-border:1px solid var(--color-border-selection-neutral-default,#999);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak-hover,#e0ebf6);--sd-button-color-hover:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-hover:var(--color-border-selection-neutral-default,#999);--sd-button-background-color-pressed:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-color-pressed:var(--color-fg-selection-neutral-default,#111);--sd-button-border-color-pressed:var(--color-border-selection-accent-default,#1467ba);--sd-button-border-color-disabled:var(--color-border-interaction-disabled,#c6c6c6)}:host([variant=custom i]){--sd-button-background-color-hover:color-mix(in oklab, var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4)), var(--color-fg-default,#111) 10%);--sd-button-color-hover:var(--sd-button-color,var(--color-fg-action-neutral-default,#111));--sd-button-background-color-pressed:color-mix(in oklab, var(--sd-button-background-color,var(--color-bg-action-neutral-default,#d4d4d4)), var(--color-fg-default,#111) 20%);--sd-button-color-pressed:var(--sd-button-color,var(--color-fg-action-neutral-default,#111))}:host([variant=contrast i]){--sd-button-contrast-color:color-mix(in oklab, color(from var(--sd-button-contrast-source,var(--color-bg-default,#fff)) xyz round(up, min(1, max(0, .18 - y)), 1) round(up, min(1, max(0, .18 - y)), 1) round(up, min(1, max(0, .18 - y)), 1)), #fff 17.6%);--sd-button-background-color:transparent;--sd-button-color:var(--sd-button-contrast-color);--sd-button-background-color-hover:oklab(from var(--sd-button-contrast-source,var(--color-bg-default,#fff)) calc(l + sign(.5 - l) * .1) a b);--sd-button-color-hover:var(--sd-button-contrast-color);--sd-button-background-color-pressed:oklab(from var(--sd-button-contrast-source,var(--color-bg-default,#fff)) calc(l + sign(.5 - l) * .2) a b);--sd-button-color-pressed:var(--sd-button-contrast-color);--sd-button-background-color-disabled:transparent}:host([variant=selection i][aria-pressed=true]){--sd-button-background-color:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border:1px solid var(--color-border-selection-accent-default,#1467ba);--sd-button-background-color-hover:var(--color-bg-selection-accent-weak,#c7dbef);--sd-button-border-color-hover:var(--color-border-selection-accent-default,#1467ba)}.icon:is(:not([src]),[src=""],[src="data:,"]){display:none}.content{align-items:center;min-width:0;display:flex}.content ::slotted(*){font:var(--text-body);margin-left:var(--sd-button-content-padding,8px)}.content ::slotted(:last-child){margin-right:var(--sd-button-content-padding,8px)}.icon{max-height:var(--sd-button-max-icon-size,24px);max-width:var(--sd-button-max-icon-size,24px);color:inherit}`,ft=[`primary`,`outline`,`standard`,`ghost`,`outline-danger`,`ghost-danger`,`selection`,`custom`,`contrast`],pt=`standard`;function mt(e){return ft.includes(e)}var ht=class e extends ne{static{this.ID=`sd-button`}static{this.ensureDefined=()=>{customElements.get(e.ID)||(customElements.define(e.ID,e),X.ensureDefined())}}static{this.styleSheet=new CSSStyleSheet}static{this.styleSheet.replaceSync(dt)}get imageElement(){return this._image}get icon(){return this.getAttribute(`icon`)}set icon(e){this.icon!==e&&(e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`),this.updateIcon())}get variant(){let e=this.getAttribute(`variant`);return mt(e)?e:pt}set variant(e){this.setAttribute(`variant`,mt(e)?e:pt)}get disabled(){return this.getAttribute(`aria-disabled`)==`true`}set disabled(e){this.setAttribute(`aria-disabled`,e.toString())}static get observedAttributes(){return[`icon`,`variant`]}is(){return e.ID}template(){let e=document.createElement(`template`);return e.innerHTML=ut,e}constructor(){super(),this._isSpaceOrEnterKeyDown=!1,this.addEventListener(`keydown`,e=>{this.isSpaceOrEnter(e)&&(this._isSpaceOrEnterKeyDown=!0,e.preventDefault())}),this.addEventListener(`keyup`,e=>{this.isSpaceOrEnter(e)&&this._isSpaceOrEnterKeyDown==1&&(this._isSpaceOrEnterKeyDown=!1,this.click())}),this.addEventListener(`click`,e=>{if(this.disabled||this.hasAttribute(`disabled`)){e.stopImmediatePropagation();return}let t=this.getAttribute(`type`)?.toLowerCase()?.trim();if(t!==`submit`&&t!==`reset`)return;let n=this.closest(`form`);n&&t===`submit`&&n.requestSubmit(),n&&t===`reset`&&n.reset()},{capture:!0})}isSpaceOrEnter(e){switch(e.key){case` `:case`Space`:case`Enter`:return!0;default:return!1}}click(){!this.disabled&&!this.hasAttribute(`disabled`)&&super.click()}connectedCallback(){let t=this.shadowRoot==null;super.connectedCallback(),t&&(this.shadowRoot.adoptedStyleSheets=[e.styleSheet]),this.hasAttribute(`tabIndex`)||(this.tabIndex=0),this._image=this.shadowRoot.querySelector(`.icon`),this.updateIcon(),this.hasAttribute(`role`)||this.setAttribute(`role`,`button`)}attributeChangedCallback(e,t){switch(e){case`icon`:this.updateIcon();break;case`variant`:this.variant===`selection`?this.hasAttribute(`aria-pressed`)||this.setAttribute(`aria-pressed`,`false`):t?.toLowerCase()===`selection`&&this.removeAttribute(`aria-pressed`);break}}updateIcon(){if(this._image){let e=this.getAttribute(`icon`);e&&(this._image.src=e)}}};ht.ensureDefined();var gt=o(((e,t)=>{var n=String,r=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n,blackBright:n,redBright:n,greenBright:n,yellowBright:n,blueBright:n,magentaBright:n,cyanBright:n,whiteBright:n,bgBlackBright:n,bgRedBright:n,bgGreenBright:n,bgYellowBright:n,bgBlueBright:n,bgMagentaBright:n,bgCyanBright:n,bgWhiteBright:n}};t.exports=r(),t.exports.createColors=r})),Z=o(((e,t)=>{t.exports={}})),_t=o(((e,t)=>{var n=gt(),r=Z(),i=class e extends Error{constructor(t,n,r,i,a,o){super(t),this.name=`CssSyntaxError`,this.reason=t,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),n!==void 0&&r!==void 0&&(typeof n==`number`?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(e){if(!this.source)return``;let t=this.source;e??=n.isColorSupported;let i=e=>e,a=e=>e,o=e=>e;if(e){let{bold:e,gray:t,red:s}=n.createColors(!0);a=t=>e(s(t)),i=e=>t(e),r&&(o=e=>r(e))}let s=t.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),u=String(l).length;return s.slice(c,l).map((e,t)=>{let n=c+1+t,r=` `+(` `+n).slice(-u)+` | `;if(n===this.line){if(e.length>160){let t=Math.max(0,this.column-20),n=Math.max(this.column+20,this.endColumn+20),s=e.slice(t,n),c=i(r.replace(/\d/g,` `))+e.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g,` `);return a(`>`)+i(r)+o(s)+`
|
|
314
372
|
`+c+a(`^`)}let t=i(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return a(`>`)+i(r)+o(e)+`
|
|
315
373
|
`+t+a(`^`)}return` `+i(r)+o(e)}).join(`
|
|
316
374
|
`)}toString(){let e=this.showSourceCode();return e&&=`
|
|
317
375
|
|
|
318
376
|
`+e+`
|
|
319
|
-
`,this.name+`: `+this.message+e}};t.exports=i,i.default=i})),
|
|
377
|
+
`,this.name+`: `+this.message+e}};t.exports=i,i.default=i})),vt=o(((e,t)=>{var n={after:`
|
|
320
378
|
`,beforeClose:`
|
|
321
379
|
`,beforeComment:`
|
|
322
380
|
`,beforeDecl:`
|
|
@@ -327,22 +385,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
327
385
|
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
328
386
|
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
|
|
329
387
|
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(`
|
|
330
|
-
`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}};t.exports=i,i.default=i})),
|
|
388
|
+
`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}};t.exports=i,i.default=i})),yt=o(((e,t)=>{var n=vt();function r(e,t){new n(t).stringify(e)}t.exports=r,r.default=r})),bt=o(((e,t)=>{t.exports.isClean=Symbol(`isClean`),t.exports.my=Symbol(`my`)})),xt=o(((e,t)=>{var n=_t(),r=vt(),i=yt(),{isClean:a,my:o}=bt();function s(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],a=typeof i;r===`parent`&&a===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>s(e,n)):(a===`object`&&i!==null&&(i=s(i)),n[r]=i)}return n}function c(e,t){if(t&&t.offset!==void 0)return t.offset;let n=1,r=1,i=0;for(let a=0;a<e.length;a++){if(r===t.line&&n===t.column){i=a;break}e[a]===`
|
|
331
389
|
`?(n=1,r+=1):n+=1}return i}var l=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[a]=!1,this[o]=!0;for(let t in e)if(t===`nodes`){this.nodes=[];for(let n of e[t])typeof n.clone==`function`?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=s(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}}markClean(){this[a]=!0}markDirty(){if(this[a]){this[a]=!1;let e=this;for(;e=e.parent;)e[a]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n=`document`in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(c(n,this.source.start),c(n,this.source.end)).indexOf(e.word);r!==-1&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,n=this.source.start.line,r=`document`in this.source.input?this.source.input.document:this.source.input.css,i=c(r,this.source.start),a=i+e;for(let e=i;e<a;e++)r[e]===`
|
|
332
|
-
`?(t=1,n+=1):t+=1;return{column:t,line:n,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t=`document`in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:c(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset==`number`?this.source.end.offset:c(t,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(e.word){let i=t.slice(c(t,this.source.start),c(t,this.source.end)).indexOf(e.word);i!==-1&&(n=this.positionInside(i),r=this.positionInside(i+e.word.length))}else e.start?n={column:e.start.column,line:e.start.line,offset:c(t,e.start)}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:c(t,e.end)}:typeof e.endIndex==`number`?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line,offset:n.offset+1}),{end:r,start:n}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){if(r==null)continue;let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n={}){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}};t.exports=l,l.default=l})),vt=o(((e,t)=>{var n=_t(),r=class extends n{constructor(e){super(e),this.type=`comment`}};t.exports=r,r.default=r})),yt=o(((e,t)=>{var n=_t(),r=class extends n{get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}};t.exports=r,r.default=r})),bt=o(((e,t)=>{var n=vt(),r=yt(),i=_t(),{isClean:a,my:o}=Z(),s,c,l,u;function d(e){return e.map(e=>(e.nodes&&=d(e.nodes),delete e.source,e))}function f(e){if(e[a]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)f(t)}var p=class e extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?`prepend`:!1,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(t,i){if(typeof t==`string`)t=d(c(t).nodes);else if(t===void 0)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,`ignore`)}else if(t.type===`root`&&this.type!==`document`){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,`ignore`)}else if(t.type)t=[t];else if(t.prop){if(t.value===void 0)throw Error(`Value field is missed in node creation`);typeof t.value!=`string`&&(t.value=String(t.value)),t=[new r(t)]}else if(t.selector||t.selectors)t=[new u(t)];else if(t.name)t=[new s(t)];else if(t.text)t=[new n(t)];else throw Error(`Unknown node type in node creation`);return t.map(t=>(t[o]||e.rebuild(t),t=t.proxyOf,t.parent&&t.parent.removeChild(t),t[a]&&f(t),t.raws||={},t.raws.before===void 0&&i&&i.raws.before!==void 0&&(t.raws.before=i.raws.before.replace(/\S/g,``)),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}};p.registerParse=e=>{c=e},p.registerRule=e=>{u=e},p.registerAtRule=e=>{s=e},p.registerRoot=e=>{l=e},t.exports=p,p.default=p,p.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,u.prototype):e.type===`decl`?Object.setPrototypeOf(e,r.prototype):e.type===`comment`?Object.setPrototypeOf(e,n.prototype):e.type===`root`&&Object.setPrototypeOf(e,l.prototype),e[o]=!0,e.nodes&&e.nodes.forEach(e=>{p.rebuild(e)})}})),xt=o(((e,t)=>{var n=bt(),r=class extends n{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};t.exports=r,r.default=r,n.registerAtRule(r)})),St=o(((e,t)=>{var n=bt(),r,i,a=class extends n{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new r(new i,this,e).stringify()}};a.registerLazyResult=e=>{r=e},a.registerProcessor=e=>{i=e},t.exports=a,a.default=a})),Ct=o(((e,t)=>{var n=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;t.exports={nanoid:(e=21)=>{let t=``,r=e|0;for(;r--;)t+=n[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n|0;for(;i--;)r+=e[Math.random()*e.length|0];return r}}})),wt=o(((e,t)=>{var{existsSync:n,readFileSync:r}=X(),{dirname:i,join:a}=X(),{SourceMapConsumer:o,SourceMapGenerator:s}=X();function c(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}var l=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new o(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(r)return decodeURIComponent(e.substr(r[0].length));let i=e.match(t)||e.match(n);if(i)return c(e.substr(i[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t==`string`)return t;if(typeof t==`function`){let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw Error(`Unable to load previous source map: `+n.toString());return e}}else if(t instanceof o)return s.fromSourceMap(t).toString();else if(t instanceof s)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error(`Unsupported previous source map format: `+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=a(i(e),t)),this.loadFile(t)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};t.exports=l,l.default=l})),Tt=o(((e,t)=>{var{nanoid:n}=Ct(),{isAbsolute:r,resolve:i}=X(),{SourceMapConsumer:a,SourceMapGenerator:o}=X(),{fileURLToPath:s,pathToFileURL:c}=X(),l=mt(),u=wt(),d=X(),f=Symbol(`lineToIndexCache`),p=!!(a&&o),m=!!(i&&r);function h(e){if(e[f])return e[f];let t=e.css.split(`
|
|
333
|
-
`),n=Array(t.length),r=0;for(let e=0,i=t.length;e<i;e++)n[e]=r,r+=t[e].length+1;return e[f]=n,n}var g=class{get from(){return this.file||this.id}constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===``?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!m||/^\w+:\/\//.test(t.from)||r(t.from)?this.file=t.from:this.file=i(t.from)),m&&p){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+n(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let i,a,o,s,u;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){s=e.offset;let r=this.fromOffset(s);t=r.line,n=r.col}else t=e.line,n=e.column,s=this.fromLineAndColumn(t,n);if(typeof r.offset==`number`){o=r.offset;let e=this.fromOffset(o);a=e.line,i=e.col}else a=r.line,i=r.column,o=this.fromLineAndColumn(r.line,r.column)}else if(n)s=this.fromLineAndColumn(t,n);else{s=t;let e=this.fromOffset(s);t=e.line,n=e.col}let d=this.origin(t,n,a,i);return u=d?new l(e,d.endLine===void 0?d.line:{column:d.column,line:d.line},d.endLine===void 0?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new l(e,a===void 0?t:{column:n,line:t},a===void 0?n:{column:i,line:a},this.css,this.file,r.plugin),u.input={column:n,endColumn:i,endLine:a,endOffset:o,line:t,offset:s,source:this.css},this.file&&(c&&(u.input.url=c(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return h(this)[e-1]+t-1}fromOffset(e){let t=h(this),n=t[t.length-1],r=0;if(e>=n)r=t.length-1;else{let n=t.length-2,i;for(;r<n;)if(i=r+(n-r>>1),e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}}return{col:e-t[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,n,i){if(!this.map)return!1;let a=this.map.consumer(),o=a.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof n==`number`&&(l=a.originalPositionFor({column:i,line:n}));let u;u=r(o.source)?c(o.source):new URL(o.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let d={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:u.toString()};if(u.protocol===`file:`)if(s)d.file=s(u);else throw Error(`file: protocol is not available in this PostCSS build`);let f=a.sourceContentFor(o.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};t.exports=g,g.default=g,d&&d.registerInput&&d.registerInput(g)})),
|
|
334
|
-
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};t.exports=n,n.default=n})),
|
|
390
|
+
`?(t=1,n+=1):t+=1;return{column:t,line:n,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t=`document`in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:c(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset==`number`?this.source.end.offset:c(t,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(e.word){let i=t.slice(c(t,this.source.start),c(t,this.source.end)).indexOf(e.word);i!==-1&&(n=this.positionInside(i),r=this.positionInside(i+e.word.length))}else e.start?n={column:e.start.column,line:e.start.line,offset:c(t,e.start)}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:c(t,e.end)}:typeof e.endIndex==`number`?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line,offset:n.offset+1}),{end:r,start:n}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){if(r==null)continue;let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n={}){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}};t.exports=l,l.default=l})),St=o(((e,t)=>{var n=xt(),r=class extends n{constructor(e){super(e),this.type=`comment`}};t.exports=r,r.default=r})),Ct=o(((e,t)=>{var n=xt(),r=class extends n{get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}};t.exports=r,r.default=r})),wt=o(((e,t)=>{var n=St(),r=Ct(),i=xt(),{isClean:a,my:o}=bt(),s,c,l,u;function d(e){return e.map(e=>(e.nodes&&=d(e.nodes),delete e.source,e))}function f(e){if(e[a]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)f(t)}var p=class e extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n?!0:(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?`prepend`:!1,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(t,i){if(typeof t==`string`)t=d(c(t).nodes);else if(t===void 0)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,`ignore`)}else if(t.type===`root`&&this.type!==`document`){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,`ignore`)}else if(t.type)t=[t];else if(t.prop){if(t.value===void 0)throw Error(`Value field is missed in node creation`);typeof t.value!=`string`&&(t.value=String(t.value)),t=[new r(t)]}else if(t.selector||t.selectors)t=[new u(t)];else if(t.name)t=[new s(t)];else if(t.text)t=[new n(t)];else throw Error(`Unknown node type in node creation`);return t.map(t=>(t[o]||e.rebuild(t),t=t.proxyOf,t.parent&&t.parent.removeChild(t),t[a]&&f(t),t.raws||={},t.raws.before===void 0&&i&&i.raws.before!==void 0&&(t.raws.before=i.raws.before.replace(/\S/g,``)),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}};p.registerParse=e=>{c=e},p.registerRule=e=>{u=e},p.registerAtRule=e=>{s=e},p.registerRoot=e=>{l=e},t.exports=p,p.default=p,p.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,u.prototype):e.type===`decl`?Object.setPrototypeOf(e,r.prototype):e.type===`comment`?Object.setPrototypeOf(e,n.prototype):e.type===`root`&&Object.setPrototypeOf(e,l.prototype),e[o]=!0,e.nodes&&e.nodes.forEach(e=>{p.rebuild(e)})}})),Tt=o(((e,t)=>{var n=wt(),r=class extends n{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};t.exports=r,r.default=r,n.registerAtRule(r)})),Q=o(((e,t)=>{var n=wt(),r,i,a=class extends n{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new r(new i,this,e).stringify()}};a.registerLazyResult=e=>{r=e},a.registerProcessor=e=>{i=e},t.exports=a,a.default=a})),Et=o(((e,t)=>{var n=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;t.exports={nanoid:(e=21)=>{let t=``,r=e|0;for(;r--;)t+=n[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n|0;for(;i--;)r+=e[Math.random()*e.length|0];return r}}})),Dt=o(((e,t)=>{var{existsSync:n,readFileSync:r}=Z(),{dirname:i,join:a}=Z(),{SourceMapConsumer:o,SourceMapGenerator:s}=Z();function c(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}var l=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new o(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(r)return decodeURIComponent(e.substr(r[0].length));let i=e.match(t)||e.match(n);if(i)return c(e.substr(i[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t==`string`)return t;if(typeof t==`function`){let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw Error(`Unable to load previous source map: `+n.toString());return e}}else if(t instanceof o)return s.fromSourceMap(t).toString();else if(t instanceof s)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error(`Unsupported previous source map format: `+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=a(i(e),t)),this.loadFile(t)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};t.exports=l,l.default=l})),Ot=o(((e,t)=>{var{nanoid:n}=Et(),{isAbsolute:r,resolve:i}=Z(),{SourceMapConsumer:a,SourceMapGenerator:o}=Z(),{fileURLToPath:s,pathToFileURL:c}=Z(),l=_t(),u=Dt(),d=Z(),f=Symbol(`lineToIndexCache`),p=!!(a&&o),m=!!(i&&r);function h(e){if(e[f])return e[f];let t=e.css.split(`
|
|
391
|
+
`),n=Array(t.length),r=0;for(let e=0,i=t.length;e<i;e++)n[e]=r,r+=t[e].length+1;return e[f]=n,n}var g=class{get from(){return this.file||this.id}constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===``?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!m||/^\w+:\/\//.test(t.from)||r(t.from)?this.file=t.from:this.file=i(t.from)),m&&p){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+n(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let i,a,o,s,u;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){s=e.offset;let r=this.fromOffset(s);t=r.line,n=r.col}else t=e.line,n=e.column,s=this.fromLineAndColumn(t,n);if(typeof r.offset==`number`){o=r.offset;let e=this.fromOffset(o);a=e.line,i=e.col}else a=r.line,i=r.column,o=this.fromLineAndColumn(r.line,r.column)}else if(n)s=this.fromLineAndColumn(t,n);else{s=t;let e=this.fromOffset(s);t=e.line,n=e.col}let d=this.origin(t,n,a,i);return u=d?new l(e,d.endLine===void 0?d.line:{column:d.column,line:d.line},d.endLine===void 0?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,r.plugin):new l(e,a===void 0?t:{column:n,line:t},a===void 0?n:{column:i,line:a},this.css,this.file,r.plugin),u.input={column:n,endColumn:i,endLine:a,endOffset:o,line:t,offset:s,source:this.css},this.file&&(c&&(u.input.url=c(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return h(this)[e-1]+t-1}fromOffset(e){let t=h(this),n=t[t.length-1],r=0;if(e>=n)r=t.length-1;else{let n=t.length-2,i;for(;r<n;)if(i=r+(n-r>>1),e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}}return{col:e-t[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,n,i){if(!this.map)return!1;let a=this.map.consumer(),o=a.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof n==`number`&&(l=a.originalPositionFor({column:i,line:n}));let u;u=r(o.source)?c(o.source):new URL(o.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let d={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:u.toString()};if(u.protocol===`file:`)if(s)d.file=s(u);else throw Error(`file: protocol is not available in this PostCSS build`);let f=a.sourceContentFor(o.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};t.exports=g,g.default=g,d&&d.registerInput&&d.registerInput(g)})),kt=o(((e,t)=>{var n=wt(),r,i,a=class extends n{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new r(new i,this,e).stringify()}};a.registerLazyResult=e=>{r=e},a.registerProcessor=e=>{i=e},t.exports=a,a.default=a,n.registerRoot(a)})),At=o(((e,t)=>{var n={comma(e){return n.split(e,[`,`],!0)},space(e){return n.split(e,[` `,`
|
|
392
|
+
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};t.exports=n,n.default=n})),jt=o(((e,t)=>{var n=wt(),r=At(),i=class extends n{get selectors(){return r.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}constructor(e){super(e),this.type=`rule`,this.nodes||=[]}};t.exports=i,i.default=i,n.registerRule(i)})),Mt=o(((e,t)=>{var n=Tt(),r=St(),i=Ct(),a=Ot(),o=Dt(),s=kt(),c=jt();function l(e,t){if(Array.isArray(e))return e.map(e=>l(e));let{inputs:u,...d}=e;if(u){t=[];for(let e of u){let n={...e,__proto__:a.prototype};n.map&&={...n.map,__proto__:o.prototype},t.push(n)}}if(d.nodes&&=e.nodes.map(e=>l(e,t)),d.source){let{inputId:e,...n}=d.source;d.source=n,e!=null&&(d.source.input=t[e])}if(d.type===`root`)return new s(d);if(d.type===`decl`)return new i(d);if(d.type===`rule`)return new c(d);if(d.type===`comment`)return new r(d);if(d.type===`atrule`)return new n(d);throw Error(`Unknown node type: `+e.type)}t.exports=l,l.default=l})),Nt=o(((e,t)=>{var{dirname:n,relative:r,resolve:i,sep:a}=Z(),{SourceMapConsumer:o,SourceMapGenerator:s}=Z(),{pathToFileURL:c}=Z(),l=Ot(),u=!!(o&&s),d=!!(n&&i&&r&&a);t.exports=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=`
|
|
335
393
|
`;this.css.includes(`\r
|
|
336
394
|
`)&&(t=`\r
|
|
337
395
|
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||n(e.file),i;this.mapOpts.sourcesContent===!1?(i=new o(e.text),i.sourcesContent&&=null):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.startsWith(`# sourceMappingURL=`)&&this.root.removeChild(t)}else if(this.css){let e;for(;(e=this.css.lastIndexOf(`/*#`))!==-1;){let t=this.css.indexOf(`*/`,e+3);if(t===-1)break;for(;e>0&&this.css[e-1]===`
|
|
338
396
|
`;)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}}generate(){if(this.clearAnnotation(),d&&u&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=s.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css=``,this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n=`<no source>`,r={generated:{column:0,line:0},original:{column:0,line:0},source:``},i,a;this.stringify(this.root,(o,s,c)=>{if(this.css+=o,s&&c!==`end`&&(r.generated.line=e,r.generated.column=t-1,s.source&&s.source.start?(r.source=this.sourcePath(s),r.original.line=s.source.start.line,r.original.column=s.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),a=o.match(/\n/g),a?(e+=a.length,i=o.lastIndexOf(`
|
|
339
|
-
`),t=o.length-i):t+=o.length,s&&c!==`start`){let i=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==i.last||i.raws.semicolon)&&(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?this.previous().length?this.previous().some(e=>e.annotation):!0:this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?this.previous().length?this.previous().some(e=>e.withContent()):!0:this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new l(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}})),At=o(((e,t)=>{var n=39,r=34,i=92,a=47,o=10,s=32,c=12,l=9,u=13,d=91,f=93,p=40,m=41,h=123,g=125,_=59,v=42,y=58,b=64,x=/[\t\n\f\r "#'()/;[\\\]{}]/g,S=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,w=/[\da-f]/i;t.exports=function(e,t={}){let T=e.css.valueOf(),E=t.ignoreErrors,D,ee,O,k,A,j,M,N,P,F,te=T.length,I=0,L=[],ne=[];function re(){return I}function R(t){throw e.error(`Unclosed `+t,I)}function ie(){return ne.length===0&&I>=te}function z(e){if(ne.length)return ne.pop();if(I>=te)return;let t=e?e.ignoreUnclosed:!1;switch(D=T.charCodeAt(I),D){case o:case s:case l:case u:case c:k=I;do k+=1,D=T.charCodeAt(k);while(D===s||D===o||D===l||D===u||D===c);j=[`space`,T.slice(I,k)],I=k-1;break;case d:case f:case h:case g:case y:case _:case m:{let e=String.fromCharCode(D);j=[e,e,I];break}case p:if(F=L.length?L.pop()[1]:``,P=T.charCodeAt(I+1),F===`url`&&P!==n&&P!==r&&P!==s&&P!==o&&P!==l&&P!==c&&P!==u){k=I;do{if(M=!1,k=T.indexOf(`)`,k+1),k===-1)if(E||t){k=I;break}else R(`bracket`);for(N=k;T.charCodeAt(N-1)===i;)--N,M=!M}while(M);j=[`brackets`,T.slice(I,k+1),I,k],I=k}else k=T.indexOf(`)`,I+1),ee=T.slice(I,k+1),k===-1||C.test(ee)?j=[`(`,`(`,I]:(j=[`brackets`,ee,I,k],I=k);break;case n:case r:A=D===n?`'`:`"`,k=I;do{if(M=!1,k=T.indexOf(A,k+1),k===-1)if(E||t){k=I+1;break}else R(`string`);for(N=k;T.charCodeAt(N-1)===i;)--N,M=!M}while(M);j=[`string`,T.slice(I,k+1),I,k],I=k;break;case b:x.lastIndex=I+1,x.test(T),k=x.lastIndex===0?T.length-1:x.lastIndex-2,j=[`at-word`,T.slice(I,k+1),I,k],I=k;break;case i:for(k=I,O=!0;T.charCodeAt(k+1)===i;)k+=1,O=!O;if(D=T.charCodeAt(k+1),O&&D!==a&&D!==s&&D!==o&&D!==l&&D!==u&&D!==c&&(k+=1,w.test(T.charAt(k)))){for(;w.test(T.charAt(k+1));)k+=1;T.charCodeAt(k+1)===s&&(k+=1)}j=[`word`,T.slice(I,k+1),I,k],I=k;break;default:D===a&&T.charCodeAt(I+1)===v?(k=T.indexOf(`*/`,I+2)+1,k===0&&(E||t?k=T.length:R(`comment`)),j=[`comment`,T.slice(I,k+1),I,k],I=k):(S.lastIndex=I+1,S.test(T),k=S.lastIndex===0?T.length-1:S.lastIndex-2,j=[`word`,T.slice(I,k+1),I,k],L.push(j),I=k);break}return I++,j}function B(e){ne.push(e)}return{back:B,endOfFile:ie,nextToken:z,position:re}}})),jt=o(((e,t)=>{var n=xt(),r=vt(),i=yt(),a=Q(),o=Dt(),s=At(),c={empty:!0,space:!0};function l(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}t.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new n;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r===`(`||r===`[`?l.push(r===`(`?`)`:`]`):r===`{`&&l.length>0?l.push(`}`):r===l[l.length-1]&&l.pop(),l.length===0)if(r===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r===`{`){s=!0;break}else if(r===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(r=o,i=r[0],i===`(`&&(t+=1),i===`)`&&--t,t===0&&i===`:`)if(!n)this.doubleColon(r);else if(n[0]===`word`&&n[1]===`progid`)continue;else return a;n=r}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(!n.trim())t.text=``,t.raws.left=n,t.raws.right=``;else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(e,t){let n=new i;this.init(n,e[0][2]);let r=e[e.length-1];for(r[0]===`;`&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||l(e)),n.source.end.offset++;e[0][0]!==`word`;)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop=``;e.length;){let t=e[0][0];if(t===`:`||t===`space`||t===`comment`)break;n.prop+=e.shift()[1]}n.raws.between=``;let a;for(;e.length;)if(a=e.shift(),a[0]===`:`){n.raws.between+=a[1];break}else a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),n.raws.between+=a[1];(n.prop[0]===`_`||n.prop[0]===`*`)&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;e.length&&(s=e[0][0],!(s!==`space`&&s!==`comment`));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(a=e[t],a[1].toLowerCase()===`!important`){n.important=!0;let r=this.stringFrom(e,t);r=this.spacesFromEnd(e)+r,r!==` !important`&&(n.raws.important=r);break}else if(a[1].toLowerCase()===`important`){let r=e.slice(0),i=``;for(let e=t;e>0;e--){let t=r[e][0];if(i.trim().startsWith(`!`)&&t!==`space`)break;i=r.pop()[1]+i}i.trim().startsWith(`!`)&&(n.important=!0,n.raws.important=i,e=r)}if(a[0]!==`space`&&a[0]!==`comment`)break}e.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(n.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(n,`value`,o.concat(e),t),n.value.includes(`:`)&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type===`rule`&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces=``,t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0)if(n===`;`)if(r){this.decl(s,o);return}else break;else if(n===`{`){this.rule(s);return}else if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}else n===`:`&&(r=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],!(c!==`space`&&c!==`comment`));)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,o=n.length,s=``,l=!0,u,d;for(let e=0;e<o;e+=1)i=n[e],a=i[0],a===`space`&&e===o-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!c[d]&&!c[u]?s.slice(-1)===`,`?l=!1:s+=i[1]:l=!1):s+=i[1];if(!l){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:s}}e[t]=s}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],!(t!==`space`&&t!==`comment`));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],!(t!==`space`&&t!==`comment`));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word `+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}})),Mt=o(((e,t)=>{var n=bt(),r=Tt(),i=jt();function a(e,t){let n=new i(new r(e,t));try{n.parse()}catch(e){throw e}return n.root}t.exports=a,a.default=a,n.registerParse(a)})),Nt=o(((e,t)=>{var n=class{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}};t.exports=n,n.default=n})),Pt=o(((e,t)=>{var n=Nt(),r=class{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=``,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}};t.exports=r,r.default=r})),Ft=o(((e,t)=>{var n={};t.exports=function(e){n[e]||(n[e]=!0,typeof console<`u`&&console.warn&&console.warn(e))}})),It=o(((e,t)=>{var n=bt(),r=St(),i=kt(),a=Mt(),o=Pt(),s=Q(),c=gt(),{isClean:l,my:u}=Z();Ft();var d={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function h(e){return typeof e==`object`&&typeof e.then==`function`}function g(e){let t=!1,n=d[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,m,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,m,n+`Exit`]:[n,n+`Exit`]}function _(e){let t;return t=e.type===`document`?[`Document`,m,`DocumentExit`]:e.type===`root`?[`Root`,m,`RootExit`]:g(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){return e[l]=!1,e.nodes&&e.nodes.forEach(e=>v(e)),e}var y={},b=class e{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return`LazyResult`}constructor(t,r,i){this.stringified=!1,this.processed=!1;let s;if(typeof r==`object`&&r&&(r.type===`root`||r.type===`document`))s=v(r);else if(r instanceof e||r instanceof o)s=v(r.root),r.map&&(i.map===void 0&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{let e=a;i.syntax&&(e=i.syntax.parse),i.parser&&(e=i.parser),e.parse&&(e=e.parse);try{s=e(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[u]&&n.rebuild(s)}this.result=new o(t,s,i),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!f[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[n])if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(h(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[l];){e[l]=!0;let t=[_(e)];for(;t.length>0;){let e=this.visitTick(t);if(h(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type===`document`){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return h(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(h(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type===`document`)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(h(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if(n.type!==`root`&&n.type!==`document`&&!n.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[e,i]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(t.iterator!==0){let r=t.iterator,i;for(;i=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!i[l]){i[l]=!0,e.push(_(i));return}t.iterator=0,delete n.indexes[r]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,e===m){n.nodes&&n.nodes.length&&(n[l]=!0,t.iterator=n.getIterator());return}else if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){e[l]=!0;let t=g(e);for(let n of t)if(n===m)e.nodes&&e.each(e=>{e[l]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}};b.registerPostcss=e=>{y=e},t.exports=b,b.default=b,s.registerLazyResult(b),r.registerLazyResult(b)})),Lt=o(((e,t)=>{var n=kt(),r=Mt(),i=Pt(),a=gt();Ft();var o=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let o=a;this.result=new i(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,`root`,{get(){return s.root}});let c=new n(o,void 0,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};t.exports=o,o.default=o})),Rt=o(((e,t)=>{var n=St(),r=It(),i=Lt(),a=Q(),o=class{constructor(e=[]){this.version=`8.5.8`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(!(typeof n==`object`&&(n.parse||n.stringify)))throw Error(n+` is not a PostCSS plugin`);return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new i(this,e,t):new r(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};t.exports=o,o.default=o,a.registerProcessor(o),n.registerProcessor(o)})),$=l(o(((e,t)=>{var n=xt(),r=vt(),i=bt(),a=mt(),o=yt(),s=St(),c=Ot(),l=Tt(),u=It(),d=Et(),f=_t(),p=Mt(),m=Rt(),h=Pt(),g=Q(),_=Dt(),v=gt(),y=Nt();function b(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new m(e)}b.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
397
|
+
`),t=o.length-i):t+=o.length,s&&c!==`start`){let i=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==i.last||i.raws.semicolon)&&(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?this.previous().length?this.previous().some(e=>e.annotation):!0:this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?this.previous().length?this.previous().some(e=>e.withContent()):!0:this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new l(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}})),Pt=o(((e,t)=>{var n=39,r=34,i=92,a=47,o=10,s=32,c=12,l=9,u=13,d=91,f=93,p=40,m=41,h=123,g=125,_=59,v=42,y=58,b=64,x=/[\t\n\f\r "#'()/;[\\\]{}]/g,S=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,ee=/[\da-f]/i;t.exports=function(e,t={}){let w=e.css.valueOf(),T=t.ignoreErrors,E,te,D,O,k,A,j,M,N,P,ne=w.length,F=0,I=[],re=[];function L(){return F}function ie(t){throw e.error(`Unclosed `+t,F)}function R(){return re.length===0&&F>=ne}function ae(e){if(re.length)return re.pop();if(F>=ne)return;let t=e?e.ignoreUnclosed:!1;switch(E=w.charCodeAt(F),E){case o:case s:case l:case u:case c:O=F;do O+=1,E=w.charCodeAt(O);while(E===s||E===o||E===l||E===u||E===c);A=[`space`,w.slice(F,O)],F=O-1;break;case d:case f:case h:case g:case y:case _:case m:{let e=String.fromCharCode(E);A=[e,e,F];break}case p:if(P=I.length?I.pop()[1]:``,N=w.charCodeAt(F+1),P===`url`&&N!==n&&N!==r&&N!==s&&N!==o&&N!==l&&N!==c&&N!==u){O=F;do{if(j=!1,O=w.indexOf(`)`,O+1),O===-1)if(T||t){O=F;break}else ie(`bracket`);for(M=O;w.charCodeAt(M-1)===i;)--M,j=!j}while(j);A=[`brackets`,w.slice(F,O+1),F,O],F=O}else O=w.indexOf(`)`,F+1),te=w.slice(F,O+1),O===-1||C.test(te)?A=[`(`,`(`,F]:(A=[`brackets`,te,F,O],F=O);break;case n:case r:k=E===n?`'`:`"`,O=F;do{if(j=!1,O=w.indexOf(k,O+1),O===-1)if(T||t){O=F+1;break}else ie(`string`);for(M=O;w.charCodeAt(M-1)===i;)--M,j=!j}while(j);A=[`string`,w.slice(F,O+1),F,O],F=O;break;case b:x.lastIndex=F+1,x.test(w),O=x.lastIndex===0?w.length-1:x.lastIndex-2,A=[`at-word`,w.slice(F,O+1),F,O],F=O;break;case i:for(O=F,D=!0;w.charCodeAt(O+1)===i;)O+=1,D=!D;if(E=w.charCodeAt(O+1),D&&E!==a&&E!==s&&E!==o&&E!==l&&E!==u&&E!==c&&(O+=1,ee.test(w.charAt(O)))){for(;ee.test(w.charAt(O+1));)O+=1;w.charCodeAt(O+1)===s&&(O+=1)}A=[`word`,w.slice(F,O+1),F,O],F=O;break;default:E===a&&w.charCodeAt(F+1)===v?(O=w.indexOf(`*/`,F+2)+1,O===0&&(T||t?O=w.length:ie(`comment`)),A=[`comment`,w.slice(F,O+1),F,O],F=O):(S.lastIndex=F+1,S.test(w),O=S.lastIndex===0?w.length-1:S.lastIndex-2,A=[`word`,w.slice(F,O+1),F,O],I.push(A),F=O);break}return F++,A}function oe(e){re.push(e)}return{back:oe,endOfFile:R,nextToken:ae,position:L}}})),Ft=o(((e,t)=>{var n=Tt(),r=St(),i=Ct(),a=kt(),o=jt(),s=Pt(),c={empty:!0,space:!0};function l(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}t.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new n;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r===`(`||r===`[`?l.push(r===`(`?`)`:`]`):r===`{`&&l.length>0?l.push(`}`):r===l[l.length-1]&&l.pop(),l.length===0)if(r===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r===`{`){s=!0;break}else if(r===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else c.push(e);else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(r=o,i=r[0],i===`(`&&(t+=1),i===`)`&&--t,t===0&&i===`:`)if(!n)this.doubleColon(r);else if(n[0]===`word`&&n[1]===`progid`)continue;else return a;n=r}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(!n.trim())t.text=``,t.raws.left=n,t.raws.right=``;else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(e,t){let n=new i;this.init(n,e[0][2]);let r=e[e.length-1];for(r[0]===`;`&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||l(e)),n.source.end.offset++;e[0][0]!==`word`;)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop=``;e.length;){let t=e[0][0];if(t===`:`||t===`space`||t===`comment`)break;n.prop+=e.shift()[1]}n.raws.between=``;let a;for(;e.length;)if(a=e.shift(),a[0]===`:`){n.raws.between+=a[1];break}else a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),n.raws.between+=a[1];(n.prop[0]===`_`||n.prop[0]===`*`)&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;e.length&&(s=e[0][0],!(s!==`space`&&s!==`comment`));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(a=e[t],a[1].toLowerCase()===`!important`){n.important=!0;let r=this.stringFrom(e,t);r=this.spacesFromEnd(e)+r,r!==` !important`&&(n.raws.important=r);break}else if(a[1].toLowerCase()===`important`){let r=e.slice(0),i=``;for(let e=t;e>0;e--){let t=r[e][0];if(i.trim().startsWith(`!`)&&t!==`space`)break;i=r.pop()[1]+i}i.trim().startsWith(`!`)&&(n.important=!0,n.raws.important=i,e=r)}if(a[0]!==`space`&&a[0]!==`comment`)break}e.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(n.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(n,`value`,o.concat(e),t),n.value.includes(`:`)&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type===`rule`&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces=``,t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0)if(n===`;`)if(r){this.decl(s,o);return}else break;else if(n===`{`){this.rule(s);return}else if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}else n===`:`&&(r=!0);else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],!(c!==`space`&&c!==`comment`));)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,o=n.length,s=``,l=!0,u,d;for(let e=0;e<o;e+=1)i=n[e],a=i[0],a===`space`&&e===o-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!c[d]&&!c[u]?s.slice(-1)===`,`?l=!1:s+=i[1]:l=!1):s+=i[1];if(!l){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:s}}e[t]=s}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],!(t!==`space`&&t!==`comment`));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],!(t!==`space`&&t!==`comment`));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word `+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}})),It=o(((e,t)=>{var n=wt(),r=Ot(),i=Ft();function a(e,t){let n=new i(new r(e,t));try{n.parse()}catch(e){throw e}return n.root}t.exports=a,a.default=a,n.registerParse(a)})),Lt=o(((e,t)=>{var n=class{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+`: `+this.text:this.text}};t.exports=n,n.default=n})),Rt=o(((e,t)=>{var n=Lt(),r=class{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=``,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}};t.exports=r,r.default=r})),zt=o(((e,t)=>{var n={};t.exports=function(e){n[e]||(n[e]=!0,typeof console<`u`&&console.warn&&console.warn(e))}})),Bt=o(((e,t)=>{var n=wt(),r=Q(),i=Nt(),a=It(),o=Rt(),s=kt(),c=yt(),{isClean:l,my:u}=bt();zt();var d={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function h(e){return typeof e==`object`&&typeof e.then==`function`}function g(e){let t=!1,n=d[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,m,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,m,n+`Exit`]:[n,n+`Exit`]}function _(e){let t;return t=e.type===`document`?[`Document`,m,`DocumentExit`]:e.type===`root`?[`Root`,m,`RootExit`]:g(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){return e[l]=!1,e.nodes&&e.nodes.forEach(e=>v(e)),e}var y={},b=class e{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return`LazyResult`}constructor(t,r,i){this.stringified=!1,this.processed=!1;let s;if(typeof r==`object`&&r&&(r.type===`root`||r.type===`document`))s=v(r);else if(r instanceof e||r instanceof o)s=v(r.root),r.map&&(i.map===void 0&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{let e=a;i.syntax&&(e=i.syntax.parse),i.parser&&(e=i.parser),e.parse&&(e=e.parse);try{s=e(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[u]&&n.rebuild(s)}this.result=new o(t,s,i),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!f[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[n])if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(h(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[l];){e[l]=!0;let t=[_(e)];for(;t.length>0;){let e=this.visitTick(t);if(h(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type===`document`){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return h(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new i(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(h(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type===`document`)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(h(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if(n.type!==`root`&&n.type!==`document`&&!n.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[e,i]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(t.iterator!==0){let r=t.iterator,i;for(;i=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!i[l]){i[l]=!0,e.push(_(i));return}t.iterator=0,delete n.indexes[r]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,e===m){n.nodes&&n.nodes.length&&(n[l]=!0,t.iterator=n.getIterator());return}else if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){e[l]=!0;let t=g(e);for(let n of t)if(n===m)e.nodes&&e.each(e=>{e[l]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}};b.registerPostcss=e=>{y=e},t.exports=b,b.default=b,s.registerLazyResult(b),r.registerLazyResult(b)})),Vt=o(((e,t)=>{var n=Nt(),r=It(),i=Rt(),a=yt();zt();var o=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let o=a;this.result=new i(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,`root`,{get(){return s.root}});let c=new n(o,void 0,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};t.exports=o,o.default=o})),Ht=o(((e,t)=>{var n=Q(),r=Bt(),i=Vt(),a=kt(),o=class{constructor(e=[]){this.version=`8.5.8`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(!(typeof n==`object`&&(n.parse||n.stringify)))throw Error(n+` is not a PostCSS plugin`);return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new i(this,e,t):new r(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};t.exports=o,o.default=o,a.registerProcessor(o),n.registerProcessor(o)})),$=l(o(((e,t)=>{var n=Tt(),r=St(),i=wt(),a=_t(),o=Ct(),s=Q(),c=Mt(),l=Ot(),u=Bt(),d=At(),f=xt(),p=It(),m=Ht(),h=Rt(),g=kt(),_=jt(),v=yt(),y=Lt();function b(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new m(e)}b.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
340
398
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
341
|
-
https://www.w3ctech.com/topic/2226`));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=new m().version,i}let i;return Object.defineProperty(r,`postcss`,{get(){return i||=r(),i}}),r.process=function(e,t,n){return b([r(n)]).process(e,t)},r},b.stringify=v,b.parse=p,b.fromJSON=c,b.list=d,b.comment=e=>new r(e),b.atRule=e=>new n(e),b.decl=e=>new o(e),b.rule=e=>new _(e),b.root=e=>new g(e),b.document=e=>new s(e),b.CssSyntaxError=a,b.Declaration=o,b.Container=i,b.Processor=m,b.Document=s,b.Comment=r,b.Warning=y,b.AtRule=n,b.Result=h,b.Input=l,b.Rule=_,b.Root=g,b.Node=f,u.registerPostcss(b),t.exports=b,b.default=b}))(),1),zt=$.default;$.default.stringify,$.default.fromJSON,$.default.plugin,$.default.parse,$.default.list,$.default.document,$.default.comment,$.default.atRule,$.default.rule,$.default.decl,$.default.root,$.default.CssSyntaxError,$.default.Declaration,$.default.Container,$.default.Processor,$.default.Document,$.default.Comment,$.default.Warning,$.default.AtRule,$.default.Result,$.default.Input,$.default.Rule,$.default.Root,$.default.Node;var Bt=l(o(((e,t)=>{var n=(e={})=>{let t=e.prefix,n=/\s+$/.test(t)?t:`${t} `,a=e.ignoreFiles?[].concat(e.ignoreFiles):[],o=e.includeFiles?[].concat(e.includeFiles):[];return{postcssPlugin:`postcss-prefix-selector`,prepare(s){let c=s.root,l=c.source.input.file;if(!(a.length&&l&&r(l,a))&&!(o.length&&l&&!r(l,o)))return{Rule(r,{result:a}){r.parent&&[`keyframes`,`-webkit-keyframes`,`-moz-keyframes`,`-o-keyframes`,`-ms-keyframes`].includes(r.parent.name)||(r.selectors=r.selectors.map(a=>e.exclude&&i(a,e.exclude)?a:e.transform?e.transform(t,a,n+a,c.source.input.file,r):[`:root`,`body`,`html`].some(e=>a.startsWith(e))?e.skipGlobalSelectors?a:a.replace(/(html\s+body|:root\s+body|html|:root|body)/gm,t):n+a))}}}}};function r(e,t){return t.some(t=>t instanceof RegExp?t.test(e):e.includes(t))}function i(e,t){return t.some(t=>t instanceof RegExp?t.test(e):e===t)}n.postcss=!0,t.exports=n}))(),1),Vt=Object.create,Ht=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Wt=Object.getOwnPropertyNames,Gt=Object.getPrototypeOf,Kt=Object.prototype.hasOwnProperty,qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jt=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Wt(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Kt.call(e,s)&&s!==n&&Ht(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Ut(t,s))||r.enumerable});return e},Yt=(e,t,n)=>(n=e==null?{}:Vt(Gt(e)),Jt(t||!e||!e.__esModule?Ht(n,`default`,{value:e,enumerable:!0}):n,e)),Xt=`pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}`,Zt=`code{white-space:pre}.example{flex-flow:wrap;align-items:center;gap:16px;display:flex}.example>*{flex:500px}.example .tab-control{overflow:hidden}.example div[role=tab]{cursor:pointer;-webkit-user-select:none;user-select:none;background-clip:padding-box;border-bottom:2px solid #0000;padding:8px 16px;font-size:16px;display:inline-block}.example div[role=tab]:hover{background-color:#1467ba14}.example div[role=tab][selected]{background-color:#1467ba21;border-bottom:2px solid #1467ba}.tab-content{margin:16px 0}.tab-content>pre{padding-top:0}.tab-content.code{max-height:500px;overflow:auto}.tab-content.code pre{margin:0}`,Qt=Yt(qt(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,ee=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,O=`\\b(0b[01]+)`,k=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,A=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},j={begin:`\\\\[\\s\\S]`,relevance:0},M={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[j]},N={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[j]},P={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},F=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},te=F(`//`,`$`),I=F(`/\\*`,`\\*/`),L=F(`#`,`$`),ne={scope:`number`,begin:D,relevance:0},re={scope:`number`,begin:ee,relevance:0},R={scope:`number`,begin:O,relevance:0},ie={scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]},z={scope:`title`,begin:T,relevance:0},B={scope:`title`,begin:E,relevance:0},V={begin:`\\.\\s*`+E,relevance:0},ae=Object.freeze({__proto__:null,APOS_STRING_MODE:M,BACKSLASH_ESCAPE:j,BINARY_NUMBER_MODE:R,BINARY_NUMBER_RE:O,COMMENT:F,C_BLOCK_COMMENT_MODE:I,C_LINE_COMMENT_MODE:te,C_NUMBER_MODE:re,C_NUMBER_RE:ee,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:V,NUMBER_MODE:ne,NUMBER_RE:D,PHRASAL_WORDS_MODE:P,QUOTE_STRING_MODE:N,REGEXP_MODE:ie,RE_STARTERS_RE:k,SHEBANG:A,TITLE_MODE:z,UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:B});function oe(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function se(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function ce(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=oe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function le(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function ue(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function de(e,t){e.relevance===void 0&&(e.relevance=1)}var fe=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},pe=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],H=`keyword`;function me(e,t,n=H){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,me(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,he(n[0],n[1])]})}}function he(e,t){return t?Number(t):ge(e)?0:1}function ge(e){return pe.includes(e.toLowerCase())}var _e={},ve=e=>{console.error(e)},ye=(e,...t)=>{console.log(`WARN: ${e}`,...t)},be=(e,t)=>{_e[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),_e[`${e}/${t}`]=!0)},xe=Error();function Se(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Ce(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw ve(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),xe;if(typeof e.beginScope!=`object`||e.beginScope===null)throw ve(`beginScope must be object`),xe;Se(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function U(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw ve(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),xe;if(typeof e.endScope!=`object`||e.endScope===null)throw ve(`endScope must be object`),xe;Se(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function we(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function W(e){we(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Ce(e),U(e)}function Te(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=t(C(this.regexes.map(e=>e[1]),{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[se,ue,W,fe].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[ce,le,de].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=me(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ee(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function G(e){return e?e.endsWithParent||G(e.starts):!1}function Ee(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:G(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var K=`11.11.1`,De=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},q=i,Oe=a,J=Symbol(`nomatch`),ke=7,Ae=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=M(n[1]);return t||(ye(s.replace(`{}`,n[1])),ye(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||M(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(be(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),be(`10.7.0`,`Please use highlight(code, options) instead.
|
|
342
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};
|
|
343
|
-
`,1;if(te>1e5&&te>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return N+=a,a.length}let D=M(e);if(!D)throw ve(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let ee=Te(D),O=``,k=a||ee,A={},j=new l.__emitter(l);w();let N=``,P=0,F=0,te=0,I=!1;try{if(D.__emitTokens)D.__emitTokens(n,j);else{for(k.matcher.considerAll();;){te++,I?I=!1:k.matcher.considerAll(),k.matcher.lastIndex=F;let e=k.matcher.exec(n);if(!e)break;let t=E(n.substring(F,e.index),e);F=e.index+t}E(n.substring(F))}return j.finalize(),O=j.toHTML(),{language:e,value:O,relevance:P,illegal:!1,_emitter:j,_top:k}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:q(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:F,context:n.slice(F-100,F+100),mode:t.mode,resultSoFar:O},_emitter:j};if(o)return{language:e,value:q(n),illegal:!1,relevance:0,errorRaised:t,_emitter:j,_top:k};throw t}}function b(e){let t={value:q(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(M).filter(P).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(M(e.language).supersetOf===t.language)return 1;if(M(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(L(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new De(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),L(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Oe(l,e)}let E=()=>{O(),be(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){O(),be(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let ee=!1;function O(){function e(){O()}if(document.readyState===`loading`){ee||window.addEventListener(`DOMContentLoaded`,e,!1),ee=!0;return}document.querySelectorAll(l.cssSelector).forEach(w)}function k(n,r){let i=null;try{i=r(e)}catch(e){if(ve(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)ve(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&N(i.aliases,{languageName:n})}function A(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function j(){return Object.keys(t)}function M(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function N(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function P(e){let t=M(e);return t&&!t.disableAutodetect}function F(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function te(e){F(e),a.push(e)}function I(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function L(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function ne(e){return be(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),be(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:O,highlightElement:w,highlightBlock:ne,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:k,unregisterLanguage:A,listLanguages:j,getLanguage:M,registerAliases:N,autoDetection:P,inherit:Oe,addPlugin:te,removePlugin:I}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=K,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in ae)typeof ae[e]==`object`&&n(ae[e]);return Object.assign(e,ae),e},je=Ae({});je.newInstance=()=>Ae({}),t.exports=je,je.HighlightJS=je,je.default=je}))()).default,$t=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),en=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),tn=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),nn=[...en,...tn],rn=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),an=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),on=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),sn=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function cn(e){let t=e.regex,n=$t(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+an.join(`|`)+`)`},{begin:`:(:)?(`+on.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+sn.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:rn.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+nn.join(`|`)+`)\\b`}]}}var ln=`[A-Za-z$_][0-9A-Za-z$_]*`,un=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),dn=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],fn=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),pn=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],mn=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],hn=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],gn=[].concat(mn,fn,pn);function _n(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=ln,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:ln,keyword:un,literal:dn,built_in:gn,"variable.language":hn},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...fn,...pn]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let ee={match:t.concat(/\b/,D([...mn,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},O={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},k={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},A=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,j={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(A)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},j,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:A,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},O,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},ee,E,S,k,{match:/\$[(.]/}]}}function vn(e){let t=e.regex,n=_n(e),r=ln,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:ln,keyword:un.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:dn,built_in:gn.concat(i),"variable.language":hn},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function yn(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var bn=document.createElement(`style`);bn.innerText=[Zt,Xt].join(`
|
|
344
|
-
`),document.head.appendChild(
|
|
345
|
-
`).trim();return e&&e!=`raw`&&(n=
|
|
399
|
+
https://www.w3ctech.com/topic/2226`));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=new m().version,i}let i;return Object.defineProperty(r,`postcss`,{get(){return i||=r(),i}}),r.process=function(e,t,n){return b([r(n)]).process(e,t)},r},b.stringify=v,b.parse=p,b.fromJSON=c,b.list=d,b.comment=e=>new r(e),b.atRule=e=>new n(e),b.decl=e=>new o(e),b.rule=e=>new _(e),b.root=e=>new g(e),b.document=e=>new s(e),b.CssSyntaxError=a,b.Declaration=o,b.Container=i,b.Processor=m,b.Document=s,b.Comment=r,b.Warning=y,b.AtRule=n,b.Result=h,b.Input=l,b.Rule=_,b.Root=g,b.Node=f,u.registerPostcss(b),t.exports=b,b.default=b}))(),1),Ut=$.default;$.default.stringify,$.default.fromJSON,$.default.plugin,$.default.parse,$.default.list,$.default.document,$.default.comment,$.default.atRule,$.default.rule,$.default.decl,$.default.root,$.default.CssSyntaxError,$.default.Declaration,$.default.Container,$.default.Processor,$.default.Document,$.default.Comment,$.default.Warning,$.default.AtRule,$.default.Result,$.default.Input,$.default.Rule,$.default.Root,$.default.Node;var Wt=l(o(((e,t)=>{var n=(e={})=>{let t=e.prefix,n=/\s+$/.test(t)?t:`${t} `,a=e.ignoreFiles?[].concat(e.ignoreFiles):[],o=e.includeFiles?[].concat(e.includeFiles):[];return{postcssPlugin:`postcss-prefix-selector`,prepare(s){let c=s.root,l=c.source.input.file;if(!(a.length&&l&&r(l,a))&&!(o.length&&l&&!r(l,o)))return{Rule(r,{result:a}){r.parent&&[`keyframes`,`-webkit-keyframes`,`-moz-keyframes`,`-o-keyframes`,`-ms-keyframes`].includes(r.parent.name)||(r.selectors=r.selectors.map(a=>e.exclude&&i(a,e.exclude)?a:e.transform?e.transform(t,a,n+a,c.source.input.file,r):[`:root`,`body`,`html`].some(e=>a.startsWith(e))?e.skipGlobalSelectors?a:a.replace(/(html\s+body|:root\s+body|html|:root|body)/gm,t):n+a))}}}}};function r(e,t){return t.some(t=>t instanceof RegExp?t.test(e):e.includes(t))}function i(e,t){return t.some(t=>t instanceof RegExp?t.test(e):e===t)}n.postcss=!0,t.exports=n}))(),1),Gt=Object.create,Kt=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,Jt=Object.getOwnPropertyNames,Yt=Object.getPrototypeOf,Xt=Object.prototype.hasOwnProperty,Zt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qt=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Jt(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Xt.call(e,s)&&s!==n&&Kt(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=qt(t,s))||r.enumerable});return e},$t=(e,t,n)=>(n=e==null?{}:Gt(Yt(e)),Qt(t||!e||!e.__esModule?Kt(n,`default`,{value:e,enumerable:!0}):n,e)),en=`pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}`,tn=`code{white-space:pre}.example{flex-flow:wrap;align-items:center;gap:16px;display:flex}.example>*{flex:500px}.example .tab-control{overflow:hidden}.example div[role=tab]{cursor:pointer;-webkit-user-select:none;user-select:none;background-clip:padding-box;border-bottom:2px solid #0000;padding:8px 16px;font-size:16px;display:inline-block}.example div[role=tab]:hover{background-color:#1467ba14}.example div[role=tab][selected]{background-color:#1467ba21;border-bottom:2px solid #1467ba}.tab-content{margin:16px 0}.tab-content>pre{padding-top:0}.tab-content.code{max-height:500px;overflow:auto}.tab-content.code pre{margin:0}`,nn=$t(Zt(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var ee=/\b\B/,w=`[a-zA-Z]\\w*`,T=`[a-zA-Z_]\\w*`,E=`\\b\\d+(\\.\\d+)?`,te=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,D=`\\b(0b[01]+)`,O=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,k=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},A={begin:`\\\\[\\s\\S]`,relevance:0},j={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[A]},M={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[A]},N={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},P=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},ne=P(`//`,`$`),F=P(`/\\*`,`\\*/`),I=P(`#`,`$`),re={scope:`number`,begin:E,relevance:0},L={scope:`number`,begin:te,relevance:0},ie={scope:`number`,begin:D,relevance:0},R={scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[A,{begin:/\[/,end:/\]/,relevance:0,contains:[A]}]},ae={scope:`title`,begin:w,relevance:0},oe={scope:`title`,begin:T,relevance:0},se={begin:`\\.\\s*`+T,relevance:0},z=Object.freeze({__proto__:null,APOS_STRING_MODE:j,BACKSLASH_ESCAPE:A,BINARY_NUMBER_MODE:ie,BINARY_NUMBER_RE:D,COMMENT:P,C_BLOCK_COMMENT_MODE:F,C_LINE_COMMENT_MODE:ne,C_NUMBER_MODE:L,C_NUMBER_RE:te,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:I,IDENT_RE:w,MATCH_NOTHING_RE:ee,METHOD_GUARD:se,NUMBER_MODE:re,NUMBER_RE:E,PHRASAL_WORDS_MODE:N,QUOTE_STRING_MODE:M,REGEXP_MODE:R,RE_STARTERS_RE:O,SHEBANG:k,TITLE_MODE:ae,UNDERSCORE_IDENT_RE:T,UNDERSCORE_TITLE_MODE:oe});function ce(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function B(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function V(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ce,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function le(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function ue(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function de(e,t){e.relevance===void 0&&(e.relevance=1)}var fe=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},pe=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],me=`keyword`;function he(e,t,n=me){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,he(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,ge(n[0],n[1])]})}}function ge(e,t){return t?Number(t):_e(e)?0:1}function _e(e){return pe.includes(e.toLowerCase())}var H={},U=e=>{console.error(e)},ve=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ye=(e,t)=>{H[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),H[`${e}/${t}`]=!0)},be=Error();function xe(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Se(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw U(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),be;if(typeof e.beginScope!=`object`||e.beginScope===null)throw U(`beginScope must be object`),be;xe(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function Ce(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw U(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),be;if(typeof e.endScope!=`object`||e.endScope===null)throw U(`endScope must be object`),be;xe(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function we(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Te(e){we(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Se(e),Ce(e)}function Ee(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=t(C(this.regexes.map(e=>e[1]),{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[B,ue,Te,fe].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[V,le,de].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=he(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return G(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function W(e){return e?e.endsWithParent||W(e.starts):!1}function G(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:W(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var K=`11.11.1`,De=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},q=i,Oe=a,J=Symbol(`nomatch`),ke=7,Y=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=j(n[1]);return t||(ve(s.replace(`{}`,n[1])),ve(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||j(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(ye(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),ye(`10.7.0`,`Please use highlight(code, options) instead.
|
|
400
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};I(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,I(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!O.keywords){A.addText(M);return}let e=0;O.keywordPatternRe.lastIndex=0;let t=O.keywordPatternRe.exec(M),n=``;for(;t;){n+=M.substring(e,t.index);let r=E.case_insensitive?t[0].toLowerCase():t[0],i=u(O,r);if(i){let[e,a]=i;if(A.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=ke&&(N+=a),e.startsWith(`_`))n+=t[0];else{let n=E.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=O.keywordPatternRe.lastIndex,t=O.keywordPatternRe.exec(M)}n+=M.substring(e),A.addText(n)}function f(){if(M===``)return;let e=null;if(typeof O.subLanguage==`string`){if(!t[O.subLanguage]){A.addText(M);return}e=v(O.subLanguage,M,!0,k[O.subLanguage]),k[O.subLanguage]=e._top}else e=S(M,O.subLanguage.length?O.subLanguage:null);O.relevance>0&&(N+=e.relevance),A.__addSublanguage(e._emitter,e.language)}function p(){O.subLanguage==null?d():f(),M=``}function m(e,t){e!==``&&(A.startScope(t),A.addText(e),A.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=E.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(M=i,d(),M=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&A.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(M,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),M=``):e.beginScope._multi&&(h(e.beginScope,t),M=``)),O=Object.create(e,{parent:{value:O}}),O}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return O.matcher.regexIndex===0?(M+=e[0],1):(F=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?M+=t:(n.excludeBegin&&(M+=t),p(),!n.returnBegin&&!n.excludeBegin&&(M=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(O,e,r);if(!i)return J;let a=O;O.endScope&&O.endScope._wrap?(p(),m(t,O.endScope._wrap)):O.endScope&&O.endScope._multi?(p(),h(O.endScope,e)):a.skip?M+=t:(a.returnEnd||a.excludeEnd||(M+=t),p(),a.excludeEnd&&(M=t));do O.scope&&A.closeNode(),!O.skip&&!O.subLanguage&&(N+=O.relevance),O=O.parent;while(O!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function ee(){let e=[];for(let t=O;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>A.openNode(e))}let w={};function T(t,r){let a=r&&r[0];if(M+=t,a==null)return p(),0;if(w.type===`begin`&&r.type===`end`&&w.index===r.index&&a===``){if(M+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=w.rule,t}return 1}if(w=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(O.scope||`<unnamed>`)+`"`);throw e.mode=O,e}else if(r.type===`end`){let e=C(r);if(e!==J)return e}if(r.type===`illegal`&&a===``)return M+=`
|
|
401
|
+
`,1;if(ne>1e5&&ne>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return M+=a,a.length}let E=j(e);if(!E)throw U(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let te=Ee(E),D=``,O=a||te,k={},A=new l.__emitter(l);ee();let M=``,N=0,P=0,ne=0,F=!1;try{if(E.__emitTokens)E.__emitTokens(n,A);else{for(O.matcher.considerAll();;){ne++,F?F=!1:O.matcher.considerAll(),O.matcher.lastIndex=P;let e=O.matcher.exec(n);if(!e)break;let t=T(n.substring(P,e.index),e);P=e.index+t}T(n.substring(P))}return A.finalize(),D=A.toHTML(),{language:e,value:D,relevance:N,illegal:!1,_emitter:A,_top:O}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:q(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:P,context:n.slice(P-100,P+100),mode:t.mode,resultSoFar:D},_emitter:A};if(o)return{language:e,value:q(n),illegal:!1,relevance:0,errorRaised:t,_emitter:A,_top:O};throw t}}function b(e){let t={value:q(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(j).filter(N).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(j(e.language).supersetOf===t.language)return 1;if(j(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function ee(e){let t=null,n=d(e);if(u(n))return;if(I(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new De(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),I(`after:highlightElement`,{el:e,result:i,text:r})}function w(e){l=Oe(l,e)}let T=()=>{D(),ye(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function E(){D(),ye(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let te=!1;function D(){function e(){D()}if(document.readyState===`loading`){te||window.addEventListener(`DOMContentLoaded`,e,!1),te=!0;return}document.querySelectorAll(l.cssSelector).forEach(ee)}function O(n,r){let i=null;try{i=r(e)}catch(e){if(U(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)U(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&M(i.aliases,{languageName:n})}function k(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function A(){return Object.keys(t)}function j(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function M(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function N(e){let t=j(e);return t&&!t.disableAutodetect}function P(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function ne(e){P(e),a.push(e)}function F(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function I(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function re(e){return ye(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),ye(`10.7.0`,`Please use highlightElement now.`),ee(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:D,highlightElement:ee,highlightBlock:re,configure:w,initHighlighting:T,initHighlightingOnLoad:E,registerLanguage:O,unregisterLanguage:k,listLanguages:A,getLanguage:j,registerAliases:M,autoDetection:N,inherit:Oe,addPlugin:ne,removePlugin:F}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=K,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in z)typeof z[e]==`object`&&n(z[e]);return Object.assign(e,z),e},Ae=Y({});Ae.newInstance=()=>Y({}),t.exports=Ae,Ae.HighlightJS=Ae,Ae.default=Ae}))()).default,rn=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),an=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),on=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),sn=[...an,...on],cn=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),ln=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),un=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),dn=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function fn(e){let t=e.regex,n=rn(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+ln.join(`|`)+`)`},{begin:`:(:)?(`+un.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+dn.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:cn.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+sn.join(`|`)+`)\\b`}]}}var pn=`[A-Za-z$_][0-9A-Za-z$_]*`,mn=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),hn=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],gn=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),_n=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],vn=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],yn=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],bn=[].concat(vn,gn,_n);function xn(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=pn,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:pn,keyword:mn,literal:hn,built_in:bn,"variable.language":yn},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...gn,..._n]}},ee={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},w={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},T={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function E(e){return t.concat(`(?!`,e.join(`|`),`)`)}let te={match:t.concat(/\b/,E([...vn,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},D={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},O={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},k=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,A={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(k)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},A,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:k,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},w,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},D,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},te,T,S,O,{match:/\$[(.]/}]}}function Sn(e){let t=e.regex,n=xn(e),r=pn,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:pn,keyword:mn.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:hn,built_in:bn.concat(i),"variable.language":yn},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function Cn(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var wn=document.createElement(`style`);wn.innerText=[tn,en].join(`
|
|
402
|
+
`),document.head.appendChild(wn),nn.registerLanguage(`typescript`,Sn),nn.registerLanguage(`html`,Cn),nn.registerLanguage(`css`,fn);function Tn(...e){let t=document.createElement(`div`),n=document.createElement(`div`);n.classList.add(`tab-control`);let r=document.createElement(`div`);return e.forEach(n=>{t.appendChild(n),n.addEventListener(`click`,()=>{e.forEach(e=>e.removeAttribute(`selected`)),n.setAttribute(`selected`,``),r.innerHTML=``,r.appendChild(n.content),r.className=n.className,r.classList.add(`tab-content`)})}),n.appendChild(t),n.appendChild(r),r.classList.add(`tab-content`),e[0].setAttribute(`selected`,``),r.appendChild(e[0].content),n}function En(e,t){let n=document.createElement(`div`);return n.role=`tab`,n.tabIndex=0,n.innerText=e,n.content=t,t.tagName==`PRE`&&n.classList.add(`code`),n}function Dn(e,t){let n=document.createElement(`template`);if(typeof t==`string`)return n.innerHTML=`<${e}>${t}</${e}>`,n.content.firstElementChild;{n.innerHTML=`<${e}></${e}>`;let r=n.content.firstElementChild;return t.forEach(e=>r.appendChild(e)),r}}async function On(e,t,n){let r=t.mainContent,i=typeof t.css==`string`?void 0:t.css?.label,a=typeof t.css==`string`?t.css:t.css?.content,o=`example-preview-${n}`,s;if(t.isolateMainContent){s=document.createElement(`div`);let e=s.attachShadow({mode:`open`});if(e.innerHTML=r,a){let t=new CSSStyleSheet;t.replaceSync(a),e.adoptedStyleSheets=[t]}}else s=Dn(`div`,r),a&&An(`#${o}`,a);s.id=o;let c=Tn(En(`Preview`,s),...r?[En(`HTML`,kn(`html`,r))]:[],...a?[En(i??`CSS`,kn(`css`,a))]:[],...t.initializer&&t.initializer.content?[En(t.initializer.label??`TS`,kn(`typescript`,t.initializer.content))]:[],...(t.additionalSources||[]).map(e=>En(e.label,kn(e.language,e.content))));t.description&&e.appendChild(Dn(`div`,t.description));let l=Dn(`div`,[c]);l.classList.add(`example`),e.appendChild(l),t.initializer?.initialize&&await t.initializer.initialize(s)}function kn(e,t){let n=t.split(/\r?\n/).map(e=>{let t=e.indexOf(`///`);if(t>-1){let n=e.substring(t+3).trimStart();return n?e.replace(/^(\s*)([^\s].*)$/,`$1${n}`):void 0}return e}).filter(e=>e!==void 0).join(`
|
|
403
|
+
`).trim();return e&&e!=`raw`&&(n=nn.highlight(n,{language:e}).value),Dn(`pre`,[Dn(`code`,n)])}function An(e,t){let n=document.createElement(`style`);n.innerHTML=Ut().use((0,Wt.default)({prefix:e})).process(t).css,document.head.appendChild(n)}async function jn(e,t=document.body){let n=Nn(t),r=0;return Object.keys(e).sort().map(async t=>{let i=document.createElement(`div`);i.className=`example-container`,n.appendChild(i);let a=e[t].default;await On(i,a,r++)})}function Mn(e){let t=document.createElement(`div`);t.id=`examples-container`;let n=e.querySelector(`#examples`);return n?n.after(t):e.appendChild(t),t}function Nn(e){return e.children?Mn(e):e}var Pn=`<h1 id="@cas-smartdesign/button">@cas-smartdesign/button</h1>
|
|
346
404
|
<p>A button element which encloses the look and feel of the SmartDesign 3.0 button.</p>
|
|
347
405
|
<p>This element must be used together with the design tokens of SmartDesign.
|
|
348
406
|
For an independent application, make sure to include the @cas-smartdesign/design-tokens package.
|
|
@@ -366,7 +424,7 @@ For a web app / web widget, refer to the official documentation about design tok
|
|
|
366
424
|
</ul>
|
|
367
425
|
</li>
|
|
368
426
|
<li><code>variant</code>: string<ul>
|
|
369
|
-
<li>Defines the visual style of the button. One of <code>primary</code>, <code>outline</code>, <code>standard</code>, <code>ghost</code>, <code>outline-danger</code>, <code>ghost-danger</code>, <code>selection</code> or <code>
|
|
427
|
+
<li>Defines the visual style of the button. One of <code>primary</code>, <code>outline</code>, <code>standard</code>, <code>ghost</code>, <code>outline-danger</code>, <code>ghost-danger</code>, <code>selection</code>, <code>custom</code> or <code>contrast</code>. Defaults to <code>standard</code> when unset or set to an unknown value.</li>
|
|
370
428
|
</ul>
|
|
371
429
|
</li>
|
|
372
430
|
<li><code>aria-pressed</code>: boolean<ul>
|
|
@@ -381,7 +439,7 @@ For a web app / web widget, refer to the official documentation about design tok
|
|
|
381
439
|
</ul>
|
|
382
440
|
</li>
|
|
383
441
|
<li><code>variant</code>: ButtonVariant<ul>
|
|
384
|
-
<li>Gets or sets the button's visual style (<code>primary</code>, <code>outline</code>, <code>standard</code>, <code>ghost</code>, <code>outline-danger</code>, <code>ghost-danger</code>, <code>selection</code> or <code>
|
|
442
|
+
<li>Gets or sets the button's visual style (<code>primary</code>, <code>outline</code>, <code>standard</code>, <code>ghost</code>, <code>outline-danger</code>, <code>ghost-danger</code>, <code>selection</code>, <code>custom</code> or <code>contrast</code>). Reading it returns <code>standard</code> when the <code>variant</code> attribute is missing or invalid.</li>
|
|
385
443
|
</ul>
|
|
386
444
|
</li>
|
|
387
445
|
</ul>
|
|
@@ -401,7 +459,16 @@ For a web app / web widget, refer to the official documentation about design tok
|
|
|
401
459
|
<p>The <code>selection</code> variant additionally re-points these properties while selected (<code>[aria-pressed="true"]</code>): the background and border switch to the selection accent tokens, and the hover state is pinned to the selected colors so the selected look survives the cursor. To customize the selected appearance, set the same <code>--sd-button-*</code> properties under your own <code>[aria-pressed="true"]</code> selector.</p>
|
|
402
460
|
<p>For the <code>custom</code> variant you only need to set the two rest colors — <code>--sd-button-background-color</code> and <code>--sd-button-color</code>. The hover and pressed states are derived from them automatically (the background darkens, the text color is kept), so a minimal override stays coherent. You can still pin any individual state by setting its <code>--sd-button-*</code> property explicitly.</p>
|
|
403
461
|
<p>Mind the color contrast when relying on the derived states: because the background darkens while the text color is kept, a <code>--sd-button-color</code> that contrasts well against the rest background may fall below the required contrast ratio against the darker hover/pressed background. If the derived states do not meet your contrast requirements, set <code>--sd-button-color-hover</code> and <code>--sd-button-color-pressed</code> (and the matching background properties) explicitly.</p>
|
|
462
|
+
<p>The <code>contrast</code> variant is transparent at rest and derives its foreground automatically from the surface it sits on. Point <code>--sd-button-contrast-source</code> at the color behind the button (it defaults to the themed page background <code>--color-bg-default</code>, so it already follows the light/dark theme). The derived color is exposed as <code>--sd-button-contrast-color</code> and kept across every state — the foreground never changes.</p>
|
|
404
463
|
<ul>
|
|
464
|
+
<li><code>--sd-button-contrast-source</code><ul>
|
|
465
|
+
<li>(<code>contrast</code> variant) The surface color behind the button, used to derive a legible foreground and the hover/pressed shades. Defaults to <code>--color-bg-default</code>.</li>
|
|
466
|
+
</ul>
|
|
467
|
+
</li>
|
|
468
|
+
<li><code>--sd-button-contrast-color</code><ul>
|
|
469
|
+
<li>(<code>contrast</code> variant) The derived foreground color (computed from <code>--sd-button-contrast-source</code>). Used for the text/icon color in every state. Override to pin the foreground.</li>
|
|
470
|
+
</ul>
|
|
471
|
+
</li>
|
|
405
472
|
<li><code>--sd-button-background-color</code><ul>
|
|
406
473
|
<li>Background color in the default (rest) state.</li>
|
|
407
474
|
</ul>
|
|
@@ -478,4 +545,4 @@ button.cta {
|
|
|
478
545
|
<li>Resolving <code>@use "@cas-smartdesign/button/scss/button"</code> requires the consumer's build to resolve packages in Sass.</li>
|
|
479
546
|
<li>Themed colors resolve through the <code>@cas-smartdesign/design-tokens</code> CSS custom properties; without them, the built-in hex fallbacks apply. Consumers keep the same <code>--sd-button-*</code> override knobs documented above.</li>
|
|
480
547
|
</ul>
|
|
481
|
-
`,
|
|
548
|
+
`,Fn=document.querySelector(`#markdown-container`);Fn.innerHTML=Pn,jn(Object.assign({"./examples/contrast/index.ts":f,"./examples/created_from_source/index.ts":x,"./examples/declarative/index.ts":w,"./examples/html_form/index.ts":D,"./examples/native_button/index.ts":N}),document.querySelector(`.markdown-body`));export{ht as n,ft as t};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cas-smartdesign/button",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "A button element which encloses the look and feel of the smartdesign button",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"files": [
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"registry": "https://registry.npmjs.org/"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cas-smartdesign/
|
|
21
|
-
"@cas-smartdesign/
|
|
20
|
+
"@cas-smartdesign/image-embed": "^1.0.2",
|
|
21
|
+
"@cas-smartdesign/element-base": "^6.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@cas-smartdesign/license-generator": "^1.10.0",
|
package/readme.md
CHANGED
|
@@ -17,7 +17,7 @@ For a web app / web widget, refer to the official documentation about design tok
|
|
|
17
17
|
- `type`: string
|
|
18
18
|
- Can be set to either `submit` or `reset` to make the button act like a HTML form button.
|
|
19
19
|
- `variant`: string
|
|
20
|
-
- Defines the visual style of the button. One of `primary`, `outline`, `standard`, `ghost`, `outline-danger`, `ghost-danger`, `selection` or `
|
|
20
|
+
- Defines the visual style of the button. One of `primary`, `outline`, `standard`, `ghost`, `outline-danger`, `ghost-danger`, `selection`, `custom` or `contrast`. Defaults to `standard` when unset or set to an unknown value.
|
|
21
21
|
- `aria-pressed`: boolean
|
|
22
22
|
- Marks a `selection` button as selected (standard toggle-button semantics). When the variant is set to `selection` and the attribute is absent, the button initializes it to `false` so assistive tools announce it as a toggle; the consumer flips it to `true`/`false`.
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ For a web app / web widget, refer to the official documentation about design tok
|
|
|
26
26
|
- `disabled`: boolean
|
|
27
27
|
- Makes the button looks like it is disabled & also prevents click events but used with a classname so mouse events are still triggered thus allowing for example tooltip usage in all browsers.
|
|
28
28
|
- `variant`: ButtonVariant
|
|
29
|
-
- Gets or sets the button's visual style (`primary`, `outline`, `standard`, `ghost`, `outline-danger`, `ghost-danger`, `selection` or `
|
|
29
|
+
- Gets or sets the button's visual style (`primary`, `outline`, `standard`, `ghost`, `outline-danger`, `ghost-danger`, `selection`, `custom` or `contrast`). Reading it returns `standard` when the `variant` attribute is missing or invalid.
|
|
30
30
|
|
|
31
31
|
## CSS Custom Properties
|
|
32
32
|
|
|
@@ -45,6 +45,12 @@ For the `custom` variant you only need to set the two rest colors — `--sd-butt
|
|
|
45
45
|
|
|
46
46
|
Mind the color contrast when relying on the derived states: because the background darkens while the text color is kept, a `--sd-button-color` that contrasts well against the rest background may fall below the required contrast ratio against the darker hover/pressed background. If the derived states do not meet your contrast requirements, set `--sd-button-color-hover` and `--sd-button-color-pressed` (and the matching background properties) explicitly.
|
|
47
47
|
|
|
48
|
+
The `contrast` variant is transparent at rest and derives its foreground automatically from the surface it sits on. Point `--sd-button-contrast-source` at the color behind the button (it defaults to the themed page background `--color-bg-default`, so it already follows the light/dark theme). The derived color is exposed as `--sd-button-contrast-color` and kept across every state — the foreground never changes.
|
|
49
|
+
|
|
50
|
+
- `--sd-button-contrast-source`
|
|
51
|
+
- (`contrast` variant) The surface color behind the button, used to derive a legible foreground and the hover/pressed shades. Defaults to `--color-bg-default`.
|
|
52
|
+
- `--sd-button-contrast-color`
|
|
53
|
+
- (`contrast` variant) The derived foreground color (computed from `--sd-button-contrast-source`). Used for the text/icon color in every state. Override to pin the foreground.
|
|
48
54
|
- `--sd-button-background-color`
|
|
49
55
|
- Background color in the default (rest) state.
|
|
50
56
|
- `--sd-button-color`
|
package/scss/_config.scss
CHANGED
|
@@ -4,6 +4,33 @@
|
|
|
4
4
|
// and the public mixins (_button.scss). Keep selector-agnostic: declarations only,
|
|
5
5
|
// callers provide the selector (`:host(...)` for the component, `&` for consumers).
|
|
6
6
|
|
|
7
|
+
// Returns a foreground color that stays legible on `$variable` (a color or a
|
|
8
|
+
// custom property holding one): near-black on light backgrounds, white on dark
|
|
9
|
+
// ones. It reads the source's relative-color `y` (XYZ luminance) to pick each
|
|
10
|
+
// channel, so the whole expression must reach the browser verbatim — it is
|
|
11
|
+
// interpolated as an unquoted string so Sass does not try to evaluate the CSS
|
|
12
|
+
// round()/min()/max() or the `y` keyword at compile time.
|
|
13
|
+
@function get-contrast-color($variable) {
|
|
14
|
+
// 0.18 is the geometric mean between black and white in XYZ color space.
|
|
15
|
+
$mid-gray: 0.18;
|
|
16
|
+
$lightening-factor: 17.6%;
|
|
17
|
+
$channel: "round(up, min(1, max(0, #{$mid-gray} - y)), 1)";
|
|
18
|
+
@return #{"color-mix(in oklab, color(from #{$variable} xyz #{$channel} #{$channel} #{$channel}), #fff #{$lightening-factor})"};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Hover/pressed fill for the contrast variant: a lighter-or-darker shade of the
|
|
22
|
+
// surface, made by stepping its OKLab lightness by a fixed perceptual amount
|
|
23
|
+
// (`$shift`) toward whichever extreme reads as higher contrast. A constant
|
|
24
|
+
// lightness step beats a fixed percentage mix toward the foreground: a vivid
|
|
25
|
+
// mid-toned surface like #e2001a sits close to its near-white foreground, so a
|
|
26
|
+
// 10% mix barely shows, whereas a fixed L step stays equally visible on pale,
|
|
27
|
+
// vivid and dark surfaces alike. `a`/`b` are kept, so it is the same hue at a
|
|
28
|
+
// new lightness. Interpolated as a string so Sass passes the relative color,
|
|
29
|
+
// sign() and calc() through verbatim.
|
|
30
|
+
@function get-contrast-fill($variable, $shift) {
|
|
31
|
+
@return #{"oklab(from #{$variable} calc(l + sign(0.5 - l) * #{$shift}) a b)"};
|
|
32
|
+
}
|
|
33
|
+
|
|
7
34
|
// Neutral (standard variant) colors per interactive state. These are the fallbacks
|
|
8
35
|
// the engine paints with when no variant overrides the corresponding --sd-button-*.
|
|
9
36
|
$neutral: (
|
|
@@ -31,6 +58,11 @@ $neutral: (
|
|
|
31
58
|
$_custom-bg: var(--sd-button-background-color, #{map.get(map.get($neutral, "base"), "bg")});
|
|
32
59
|
$_custom-fg: var(--sd-button-color, #{map.get(map.get($neutral, "base"), "fg")});
|
|
33
60
|
|
|
61
|
+
// Contrast variant source: the surface color the button sits on. The variant
|
|
62
|
+
// derives a legible foreground from it, defaulting to the themed page background
|
|
63
|
+
// so it adapts to light/dark themes without any consumer override.
|
|
64
|
+
$_contrast-source: var(--sd-button-contrast-source, var(--color-bg-default, #ffffff));
|
|
65
|
+
|
|
34
66
|
// Per-variant --sd-button-* values. Adding a variant is a single map entry.
|
|
35
67
|
$variants: (
|
|
36
68
|
"primary": (
|
|
@@ -109,6 +141,24 @@ $variants: (
|
|
|
109
141
|
"background-color-pressed": color-mix(in oklab, $_custom-bg, var(--color-fg-default, #111111) 20%),
|
|
110
142
|
"color-pressed": $_custom-fg,
|
|
111
143
|
),
|
|
144
|
+
// Transparent at rest with a foreground auto-derived from the surface behind
|
|
145
|
+
// the button (--sd-button-contrast-source) so it stays legible on light or
|
|
146
|
+
// dark backgrounds. The derived color is computed once into the intermediate
|
|
147
|
+
// --sd-button-contrast-color and kept across every state (the foreground never
|
|
148
|
+
// changes). Hover/pressed fill the background with a lighter-or-darker shade of
|
|
149
|
+
// the surface via a perceptually-uniform OKLab lightness step, so the feedback
|
|
150
|
+
// reads equally on pale, vivid and dark surfaces. Pin the foreground by
|
|
151
|
+
// overriding --sd-button-contrast-color, or any --sd-button-* for one state.
|
|
152
|
+
"contrast": (
|
|
153
|
+
"contrast-color": get-contrast-color($_contrast-source),
|
|
154
|
+
"background-color": transparent,
|
|
155
|
+
"color": var(--sd-button-contrast-color),
|
|
156
|
+
"background-color-hover": get-contrast-fill($_contrast-source, 0.1),
|
|
157
|
+
"color-hover": var(--sd-button-contrast-color),
|
|
158
|
+
"background-color-pressed": get-contrast-fill($_contrast-source, 0.2),
|
|
159
|
+
"color-pressed": var(--sd-button-contrast-color),
|
|
160
|
+
"background-color-disabled": transparent,
|
|
161
|
+
),
|
|
112
162
|
);
|
|
113
163
|
|
|
114
164
|
// Paint one interactive state: reads the public --sd-button-* override with the
|