v-code-diff 1.7.2 → 1.9.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/README.md +59 -44
- package/dist/v2/index.cjs.js +16 -14
- package/dist/v2/index.es.js +1065 -966
- package/dist/v2/index.umd.js +16 -14
- package/dist/v2.7/index.cjs.js +18 -16
- package/dist/v2.7/index.es.js +1295 -1233
- package/dist/v2.7/index.umd.js +18 -16
- package/dist/v3/index.cjs.js +18 -16
- package/dist/v3/index.es.js +1664 -1577
- package/dist/v3/index.umd.js +18 -16
- package/package.json +17 -14
- package/scripts/{postinstall.js → postinstall.cjs} +1 -2
- package/scripts/{utils.js → utils.cjs} +0 -2
- package/src/CodeDiff.vue +41 -16
- package/src/style.scss +15 -4
- package/src/types.ts +2 -0
- package/src/utils.ts +44 -13
- package/src/var.scss +541 -73
- package/types/index.d.ts +5 -4
package/dist/v2/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view{--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #24292f;--color-diff-blob-addition-fg: #24292f;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #24292f;--color-diff-blob-deletion-fg: #24292f;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #57606a;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(27,31,36,.15);--color-diffstat-addition-border: rgba(27,31,36,.15);--color-diffstat-addition-bg: #2da44e;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #8250df;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #24292f;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #57606a;--color-codemirror-cursor: #24292f;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #24292f;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #2da44e;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(27,31,36,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(27,31,36,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: -2px -2px 0 rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(27,31,36,.12), 0 8px 24px rgba(66,74,83,.12);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(27,31,36,.15);--color-btn-shadow: 0 1px 0 rgba(27,31,36,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(27,31,36,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(27,31,36,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-focus-bg: #f6f8fa;--color-btn-focus-border: rgba(27,31,36,.15);--color-btn-focus-shadow: 0 0 0 3px rgba(9,105,218,.3);--color-btn-shadow-active: inset 0 .15em .3em rgba(27,31,36,.15);--color-btn-shadow-input-focus: 0 0 0 .2em rgba(9,105,218,.3);--color-btn-counter-bg: rgba(27,31,36,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #2da44e;--color-btn-primary-border: rgba(27,31,36,.15);--color-btn-primary-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #2c974b;--color-btn-primary-hover-border: rgba(27,31,36,.15);--color-btn-primary-selected-bg: hsla(137,55%,36%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(27,31,36,.15);--color-btn-primary-focus-bg: #2da44e;--color-btn-primary-focus-border: rgba(27,31,36,.15);--color-btn-primary-focus-shadow: 0 0 0 3px rgba(45,164,78,.4);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(255,255,255,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(27,31,36,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(27,31,36,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-focus-border: rgba(27,31,36,.15);--color-btn-outline-focus-shadow: 0 0 0 3px rgba(5,80,174,.4);--color-btn-outline-counter-bg: rgba(9,105,218,.1);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(27,31,36,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(27,31,36,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-focus-border: rgba(27,31,36,.15);--color-btn-danger-focus-shadow: 0 0 0 3px rgba(164,14,38,.4);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #cf222e;--color-switch-track-bg: #eaeef2;--color-switch-track-border: #afb8c1;--color-switch-track-checked-bg: #ddf4ff;--color-switch-track-checked-hover-bg: #b6e3ff;--color-switch-track-checked-active-bg: #80ccff;--color-switch-track-checked-border: #54aeff;--color-switch-knob-checked-bg: #0969da;--color-switch-knob-checked-disabled-bg: #6e7781;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #6e7781;--color-fg-default: #24292f;--color-fg-muted: #57606a;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(27,31,36,.15);--color-shadow-small: 0 1px 0 rgba(27,31,36,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #2da44e;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #bf8700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #cf222e;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #2da44e;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #cf222e;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(27,31,36,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(27,31,36,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-primer-shadow-focus: 0 0 0 3px rgba(9,105,218,.3);--color-scale-black: #1b1f24;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .filename{font-size:13px;color:var(--color-fg-default)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:gray}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
e = e ||
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#ffffff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import Ue from "vue";
|
|
3
|
+
import Hn, { computed as ge, ref as Fn, watch as zn } from "@vue/composition-api/dist/vue-composition-api.mjs";
|
|
4
|
+
function Gn(e) {
|
|
5
|
+
e = e || Ue, e && !e.__composition_api_installed__ && e.use(Hn);
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function
|
|
7
|
+
Gn(Ue);
|
|
8
|
+
Ue.version;
|
|
9
|
+
function ne() {
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
ne.prototype = {
|
|
12
12
|
diff: function(n, a) {
|
|
13
13
|
var u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, h = u.callback;
|
|
14
14
|
typeof u == "function" && (h = u, u = {}), this.options = u;
|
|
@@ -32,15 +32,15 @@ J.prototype = {
|
|
|
32
32
|
}]);
|
|
33
33
|
function g() {
|
|
34
34
|
for (var p = -1 * o; p <= o; p += 2) {
|
|
35
|
-
var _ = void 0,
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
if (!
|
|
35
|
+
var _ = void 0, E = c[p - 1], b = c[p + 1], y = (b ? b.newPos : 0) - p;
|
|
36
|
+
E && (c[p - 1] = void 0);
|
|
37
|
+
var A = E && E.newPos + 1 < i, R = b && 0 <= y && y < s;
|
|
38
|
+
if (!A && !R) {
|
|
39
39
|
c[p] = void 0;
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
|
-
if (!
|
|
43
|
-
return r(
|
|
42
|
+
if (!A || R && E.newPos < b.newPos ? (_ = Wn(b), t.pushComponent(_.components, void 0, !0)) : (_ = E, _.newPos++, t.pushComponent(_.components, !0, void 0)), y = t.extractCommon(_, a, n, p), _.newPos + 1 >= i && y + 1 >= s)
|
|
43
|
+
return r(Kn(t, _.components, a, n, t.useLongestToken));
|
|
44
44
|
c[p] = _;
|
|
45
45
|
}
|
|
46
46
|
o++;
|
|
@@ -97,7 +97,7 @@ J.prototype = {
|
|
|
97
97
|
return n.join("");
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
function
|
|
100
|
+
function Kn(e, n, a, u, h) {
|
|
101
101
|
for (var t = 0, r = n.length, i = 0, s = 0; t < r; t++) {
|
|
102
102
|
var o = n[t];
|
|
103
103
|
if (o.removed) {
|
|
@@ -120,17 +120,17 @@ function zn(e, n, a, u, h) {
|
|
|
120
120
|
var f = n[r - 1];
|
|
121
121
|
return r > 1 && typeof f.value == "string" && (f.added || f.removed) && e.equals("", f.value) && (n[r - 2].value += f.value, n.pop()), n;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Wn(e) {
|
|
124
124
|
return {
|
|
125
125
|
newPos: e.newPos,
|
|
126
126
|
components: e.components.slice(0)
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
131
|
-
return
|
|
129
|
+
var Qn = new ne();
|
|
130
|
+
function qn(e, n, a) {
|
|
131
|
+
return Qn.diff(e, n, a);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Zn(e, n) {
|
|
134
134
|
if (typeof e == "function")
|
|
135
135
|
n.callback = e;
|
|
136
136
|
else if (e)
|
|
@@ -138,21 +138,21 @@ function Qn(e, n) {
|
|
|
138
138
|
e.hasOwnProperty(a) && (n[a] = e[a]);
|
|
139
139
|
return n;
|
|
140
140
|
}
|
|
141
|
-
var
|
|
142
|
-
|
|
141
|
+
var Ve = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Xe = /\S/, Pe = new ne();
|
|
142
|
+
Pe.equals = function(e, n) {
|
|
143
143
|
return this.options.ignoreCase && (e = e.toLowerCase(), n = n.toLowerCase()), e === n || this.options.ignoreWhitespace && !Xe.test(e) && !Xe.test(n);
|
|
144
144
|
};
|
|
145
|
-
|
|
145
|
+
Pe.tokenize = function(e) {
|
|
146
146
|
for (var n = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), a = 0; a < n.length - 1; a++)
|
|
147
|
-
!n[a + 1] && n[a + 2] &&
|
|
147
|
+
!n[a + 1] && n[a + 2] && Ve.test(n[a]) && Ve.test(n[a + 2]) && (n[a] += n[a + 2], n.splice(a + 1, 2), a--);
|
|
148
148
|
return n;
|
|
149
149
|
};
|
|
150
|
-
function
|
|
151
|
-
return a =
|
|
150
|
+
function Yn(e, n, a) {
|
|
151
|
+
return a = Zn(a, {
|
|
152
152
|
ignoreWhitespace: !0
|
|
153
|
-
}),
|
|
153
|
+
}), Pe.diff(e, n, a);
|
|
154
154
|
}
|
|
155
|
-
var hn = new
|
|
155
|
+
var hn = new ne();
|
|
156
156
|
hn.tokenize = function(e) {
|
|
157
157
|
var n = [], a = e.split(/(\n|\r\n)/);
|
|
158
158
|
a[a.length - 1] || a.pop();
|
|
@@ -162,35 +162,35 @@ hn.tokenize = function(e) {
|
|
|
162
162
|
}
|
|
163
163
|
return n;
|
|
164
164
|
};
|
|
165
|
-
var
|
|
166
|
-
|
|
165
|
+
var Vn = new ne();
|
|
166
|
+
Vn.tokenize = function(e) {
|
|
167
167
|
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
168
168
|
};
|
|
169
|
-
var
|
|
170
|
-
|
|
169
|
+
var Xn = new ne();
|
|
170
|
+
Xn.tokenize = function(e) {
|
|
171
171
|
return e.split(/([{}:;,]|\s+)/);
|
|
172
172
|
};
|
|
173
|
-
function
|
|
173
|
+
function Te(e) {
|
|
174
174
|
"@babel/helpers - typeof";
|
|
175
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
175
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Te = function(n) {
|
|
176
176
|
return typeof n;
|
|
177
|
-
} :
|
|
177
|
+
} : Te = function(n) {
|
|
178
178
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
179
|
-
},
|
|
179
|
+
}, Te(e);
|
|
180
180
|
}
|
|
181
|
-
var jn = Object.prototype.toString,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
var jn = Object.prototype.toString, he = new ne();
|
|
182
|
+
he.useLongestToken = !0;
|
|
183
|
+
he.tokenize = hn.tokenize;
|
|
184
|
+
he.castInput = function(e) {
|
|
185
185
|
var n = this.options, a = n.undefinedReplacement, u = n.stringifyReplacer, h = u === void 0 ? function(t, r) {
|
|
186
186
|
return typeof r == "undefined" ? a : r;
|
|
187
187
|
} : u;
|
|
188
|
-
return typeof e == "string" ? e : JSON.stringify(
|
|
188
|
+
return typeof e == "string" ? e : JSON.stringify(Be(e, null, null, h), h, " ");
|
|
189
189
|
};
|
|
190
|
-
|
|
191
|
-
return
|
|
190
|
+
he.equals = function(e, n) {
|
|
191
|
+
return ne.prototype.equals.call(he, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"));
|
|
192
192
|
};
|
|
193
|
-
function
|
|
193
|
+
function Be(e, n, a, u, h) {
|
|
194
194
|
n = n || [], a = a || [], u && (e = u(h, e));
|
|
195
195
|
var t;
|
|
196
196
|
for (t = 0; t < n.length; t += 1)
|
|
@@ -199,29 +199,29 @@ function ke(e, n, a, u, h) {
|
|
|
199
199
|
var r;
|
|
200
200
|
if (jn.call(e) === "[object Array]") {
|
|
201
201
|
for (n.push(e), r = new Array(e.length), a.push(r), t = 0; t < e.length; t += 1)
|
|
202
|
-
r[t] =
|
|
202
|
+
r[t] = Be(e[t], n, a, u, h);
|
|
203
203
|
return n.pop(), a.pop(), r;
|
|
204
204
|
}
|
|
205
|
-
if (e && e.toJSON && (e = e.toJSON()),
|
|
205
|
+
if (e && e.toJSON && (e = e.toJSON()), Te(e) === "object" && e !== null) {
|
|
206
206
|
n.push(e), r = {}, a.push(r);
|
|
207
207
|
var i = [], s;
|
|
208
208
|
for (s in e)
|
|
209
209
|
e.hasOwnProperty(s) && i.push(s);
|
|
210
210
|
for (i.sort(), t = 0; t < i.length; t += 1)
|
|
211
|
-
s = i[t], r[s] =
|
|
211
|
+
s = i[t], r[s] = Be(e[s], n, a, u, s);
|
|
212
212
|
n.pop(), a.pop();
|
|
213
213
|
} else
|
|
214
214
|
r = e;
|
|
215
215
|
return r;
|
|
216
216
|
}
|
|
217
|
-
var
|
|
218
|
-
|
|
217
|
+
var $e = new ne();
|
|
218
|
+
$e.tokenize = function(e) {
|
|
219
219
|
return e.slice();
|
|
220
220
|
};
|
|
221
|
-
|
|
221
|
+
$e.join = $e.removeEmpty = function(e) {
|
|
222
222
|
return e;
|
|
223
223
|
};
|
|
224
|
-
function
|
|
224
|
+
function Jn(e) {
|
|
225
225
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
226
226
|
}
|
|
227
227
|
var dn = { exports: {} };
|
|
@@ -268,10 +268,10 @@ var dn = { exports: {} };
|
|
|
268
268
|
];
|
|
269
269
|
var g = this.diff_halfMatch_(t, r);
|
|
270
270
|
if (g) {
|
|
271
|
-
var d = g[0], p = g[1], _ = g[2],
|
|
272
|
-
return
|
|
273
|
-
[new n.Diff(h,
|
|
274
|
-
|
|
271
|
+
var d = g[0], p = g[1], _ = g[2], E = g[3], b = g[4], y = this.diff_main(d, _, i, s), A = this.diff_main(p, E, i, s);
|
|
272
|
+
return y.concat(
|
|
273
|
+
[new n.Diff(h, b)],
|
|
274
|
+
A
|
|
275
275
|
);
|
|
276
276
|
}
|
|
277
277
|
return i && t.length > 100 && r.length > 100 ? this.diff_lineMode_(t, r, s) : this.diff_bisect_(t, r, s);
|
|
@@ -294,8 +294,8 @@ var dn = { exports: {} };
|
|
|
294
294
|
c - f - g,
|
|
295
295
|
f + g
|
|
296
296
|
), c = c - f - g;
|
|
297
|
-
for (var _ = this.diff_main(d, p, !1, i),
|
|
298
|
-
l.splice(c, 0, _[
|
|
297
|
+
for (var _ = this.diff_main(d, p, !1, i), E = _.length - 1; E >= 0; E--)
|
|
298
|
+
l.splice(c, 0, _[E]);
|
|
299
299
|
c = c + _.length;
|
|
300
300
|
}
|
|
301
301
|
g = 0, f = 0, d = "", p = "";
|
|
@@ -308,40 +308,40 @@ var dn = { exports: {} };
|
|
|
308
308
|
for (var s = t.length, o = r.length, l = Math.ceil((s + o) / 2), c = l, f = 2 * l, g = new Array(f), d = new Array(f), p = 0; p < f; p++)
|
|
309
309
|
g[p] = -1, d[p] = -1;
|
|
310
310
|
g[c + 1] = 0, d[c + 1] = 0;
|
|
311
|
-
for (var _ = s - o,
|
|
312
|
-
for (var
|
|
313
|
-
var
|
|
314
|
-
|
|
315
|
-
for (var
|
|
316
|
-
|
|
317
|
-
if (g[
|
|
318
|
-
|
|
319
|
-
else if (
|
|
320
|
-
|
|
321
|
-
else if (
|
|
322
|
-
var
|
|
323
|
-
if (
|
|
324
|
-
var
|
|
325
|
-
if (
|
|
326
|
-
return this.diff_bisectSplit_(t, r,
|
|
311
|
+
for (var _ = s - o, E = _ % 2 != 0, b = 0, y = 0, A = 0, R = 0, w = 0; w < l && !((/* @__PURE__ */ new Date()).getTime() > i); w++) {
|
|
312
|
+
for (var D = -w + b; D <= w - y; D += 2) {
|
|
313
|
+
var C = c + D, T;
|
|
314
|
+
D == -w || D != w && g[C - 1] < g[C + 1] ? T = g[C + 1] : T = g[C - 1] + 1;
|
|
315
|
+
for (var $ = T - D; T < s && $ < o && t.charAt(T) == r.charAt($); )
|
|
316
|
+
T++, $++;
|
|
317
|
+
if (g[C] = T, T > s)
|
|
318
|
+
y += 2;
|
|
319
|
+
else if ($ > o)
|
|
320
|
+
b += 2;
|
|
321
|
+
else if (E) {
|
|
322
|
+
var k = c + _ - D;
|
|
323
|
+
if (k >= 0 && k < f && d[k] != -1) {
|
|
324
|
+
var P = s - d[k];
|
|
325
|
+
if (T >= P)
|
|
326
|
+
return this.diff_bisectSplit_(t, r, T, $, i);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
for (var F = -
|
|
331
|
-
var
|
|
332
|
-
F == -
|
|
333
|
-
for (var
|
|
334
|
-
|
|
335
|
-
if (d[
|
|
336
|
-
|
|
337
|
-
else if (
|
|
338
|
-
|
|
339
|
-
else if (!
|
|
340
|
-
var
|
|
341
|
-
if (
|
|
342
|
-
var
|
|
343
|
-
if (
|
|
344
|
-
return this.diff_bisectSplit_(t, r,
|
|
330
|
+
for (var F = -w + A; F <= w - R; F += 2) {
|
|
331
|
+
var k = c + F, P;
|
|
332
|
+
F == -w || F != w && d[k - 1] < d[k + 1] ? P = d[k + 1] : P = d[k - 1] + 1;
|
|
333
|
+
for (var K = P - F; P < s && K < o && t.charAt(s - P - 1) == r.charAt(o - K - 1); )
|
|
334
|
+
P++, K++;
|
|
335
|
+
if (d[k] = P, P > s)
|
|
336
|
+
R += 2;
|
|
337
|
+
else if (K > o)
|
|
338
|
+
A += 2;
|
|
339
|
+
else if (!E) {
|
|
340
|
+
var C = c + _ - F;
|
|
341
|
+
if (C >= 0 && C < f && g[C] != -1) {
|
|
342
|
+
var T = g[C], $ = c + T - C;
|
|
343
|
+
if (P = s - P, T >= P)
|
|
344
|
+
return this.diff_bisectSplit_(t, r, T, $, i);
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
@@ -357,11 +357,11 @@ var dn = { exports: {} };
|
|
|
357
357
|
var i = [], s = {};
|
|
358
358
|
i[0] = "";
|
|
359
359
|
function o(g) {
|
|
360
|
-
for (var d = "", p = 0, _ = -1,
|
|
360
|
+
for (var d = "", p = 0, _ = -1, E = i.length; _ < g.length - 1; ) {
|
|
361
361
|
_ = g.indexOf(`
|
|
362
362
|
`, p), _ == -1 && (_ = g.length - 1);
|
|
363
|
-
var
|
|
364
|
-
(s.hasOwnProperty ? s.hasOwnProperty(
|
|
363
|
+
var b = g.substring(p, _ + 1);
|
|
364
|
+
(s.hasOwnProperty ? s.hasOwnProperty(b) : s[b] !== void 0) ? d += String.fromCharCode(s[b]) : (E == l && (b = g.substring(p), _ = g.length), d += String.fromCharCode(E), s[b] = E, i[E++] = b), p = _ + 1;
|
|
365
365
|
}
|
|
366
366
|
return d;
|
|
367
367
|
}
|
|
@@ -408,23 +408,23 @@ var dn = { exports: {} };
|
|
|
408
408
|
if (i.length < 4 || s.length * 2 < i.length)
|
|
409
409
|
return null;
|
|
410
410
|
var o = this;
|
|
411
|
-
function l(
|
|
412
|
-
for (var
|
|
411
|
+
function l(y, A, R) {
|
|
412
|
+
for (var w = y.substring(R, R + Math.floor(y.length / 4)), D = -1, C = "", T, $, k, P; (D = A.indexOf(w, D + 1)) != -1; ) {
|
|
413
413
|
var F = o.diff_commonPrefix(
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
),
|
|
417
|
-
|
|
418
|
-
|
|
414
|
+
y.substring(R),
|
|
415
|
+
A.substring(D)
|
|
416
|
+
), K = o.diff_commonSuffix(
|
|
417
|
+
y.substring(0, R),
|
|
418
|
+
A.substring(0, D)
|
|
419
419
|
);
|
|
420
|
-
|
|
420
|
+
C.length < K + F && (C = A.substring(D - K, D) + A.substring(D, D + F), T = y.substring(0, R - K), $ = y.substring(R + F), k = A.substring(0, D - K), P = A.substring(D + F));
|
|
421
421
|
}
|
|
422
|
-
return
|
|
423
|
-
|
|
424
|
-
H,
|
|
425
|
-
U,
|
|
422
|
+
return C.length * 2 >= y.length ? [
|
|
423
|
+
T,
|
|
426
424
|
$,
|
|
427
|
-
|
|
425
|
+
k,
|
|
426
|
+
P,
|
|
427
|
+
C
|
|
428
428
|
] : null;
|
|
429
429
|
}
|
|
430
430
|
var c = l(
|
|
@@ -439,10 +439,10 @@ var dn = { exports: {} };
|
|
|
439
439
|
if (!c && !f)
|
|
440
440
|
return null;
|
|
441
441
|
f ? c ? g = c[4].length > f[4].length ? c : f : g = f : g = c;
|
|
442
|
-
var d, p, _,
|
|
443
|
-
t.length > r.length ? (d = g[0], p = g[1], _ = g[2],
|
|
444
|
-
var
|
|
445
|
-
return [d, p, _,
|
|
442
|
+
var d, p, _, E;
|
|
443
|
+
t.length > r.length ? (d = g[0], p = g[1], _ = g[2], E = g[3]) : (_ = g[0], E = g[1], d = g[2], p = g[3]);
|
|
444
|
+
var b = g[4];
|
|
445
|
+
return [d, p, _, E, b];
|
|
446
446
|
}, n.prototype.diff_cleanupSemantic = function(t) {
|
|
447
447
|
for (var r = !1, i = [], s = 0, o = null, l = 0, c = 0, f = 0, g = 0, d = 0; l < t.length; )
|
|
448
448
|
t[l][0] == h ? (i[s++] = l, c = g, f = d, g = 0, d = 0, o = t[l][1]) : (t[l][0] == u ? g += t[l][1].length : d += t[l][1].length, o && o.length <= Math.max(c, f) && o.length <= Math.max(
|
|
@@ -455,23 +455,23 @@ var dn = { exports: {} };
|
|
|
455
455
|
), t[i[s - 1] + 1][0] = u, s--, s--, l = s > 0 ? i[s - 1] : -1, c = 0, f = 0, g = 0, d = 0, o = null, r = !0)), l++;
|
|
456
456
|
for (r && this.diff_cleanupMerge(t), this.diff_cleanupSemanticLossless(t), l = 1; l < t.length; ) {
|
|
457
457
|
if (t[l - 1][0] == a && t[l][0] == u) {
|
|
458
|
-
var p = t[l - 1][1], _ = t[l][1],
|
|
459
|
-
|
|
458
|
+
var p = t[l - 1][1], _ = t[l][1], E = this.diff_commonOverlap_(p, _), b = this.diff_commonOverlap_(_, p);
|
|
459
|
+
E >= b ? (E >= p.length / 2 || E >= _.length / 2) && (t.splice(l, 0, new n.Diff(
|
|
460
460
|
h,
|
|
461
|
-
_.substring(0,
|
|
462
|
-
)), t[l - 1][1] = p.substring(0, p.length -
|
|
461
|
+
_.substring(0, E)
|
|
462
|
+
)), t[l - 1][1] = p.substring(0, p.length - E), t[l + 1][1] = _.substring(E), l++) : (b >= p.length / 2 || b >= _.length / 2) && (t.splice(l, 0, new n.Diff(
|
|
463
463
|
h,
|
|
464
|
-
p.substring(0,
|
|
465
|
-
)), t[l - 1][0] = u, t[l - 1][1] = _.substring(0, _.length -
|
|
464
|
+
p.substring(0, b)
|
|
465
|
+
)), t[l - 1][0] = u, t[l - 1][1] = _.substring(0, _.length - b), t[l + 1][0] = a, t[l + 1][1] = p.substring(b), l++), l++;
|
|
466
466
|
}
|
|
467
467
|
l++;
|
|
468
468
|
}
|
|
469
469
|
}, n.prototype.diff_cleanupSemanticLossless = function(t) {
|
|
470
|
-
function r(
|
|
471
|
-
if (!
|
|
470
|
+
function r(b, y) {
|
|
471
|
+
if (!b || !y)
|
|
472
472
|
return 6;
|
|
473
|
-
var
|
|
474
|
-
return
|
|
473
|
+
var A = b.charAt(b.length - 1), R = y.charAt(0), w = A.match(n.nonAlphaNumericRegex_), D = R.match(n.nonAlphaNumericRegex_), C = w && A.match(n.whitespaceRegex_), T = D && R.match(n.whitespaceRegex_), $ = C && A.match(n.linebreakRegex_), k = T && R.match(n.linebreakRegex_), P = $ && b.match(n.blanklineEndRegex_), F = k && y.match(n.blanklineStartRegex_);
|
|
474
|
+
return P || F ? 5 : $ || k ? 4 : w && !C && T ? 3 : C || T ? 2 : w || D ? 1 : 0;
|
|
475
475
|
}
|
|
476
476
|
for (var i = 1; i < t.length - 1; ) {
|
|
477
477
|
if (t[i - 1][0] == h && t[i + 1][0] == h) {
|
|
@@ -482,8 +482,8 @@ var dn = { exports: {} };
|
|
|
482
482
|
}
|
|
483
483
|
for (var g = s, d = o, p = l, _ = r(s, o) + r(o, l); o.charAt(0) === l.charAt(0); ) {
|
|
484
484
|
s += o.charAt(0), o = o.substring(1) + l.charAt(0), l = l.substring(1);
|
|
485
|
-
var
|
|
486
|
-
|
|
485
|
+
var E = r(s, o) + r(o, l);
|
|
486
|
+
E >= _ && (_ = E, g = s, d = o, p = l);
|
|
487
487
|
}
|
|
488
488
|
t[i - 1][1] != g && (g ? t[i - 1][1] = g : (t.splice(i - 1, 1), i--), t[i][1] = d, p ? t[i + 1][1] = p : (t.splice(i + 1, 1), i--));
|
|
489
489
|
}
|
|
@@ -621,34 +621,34 @@ var dn = { exports: {} };
|
|
|
621
621
|
if (r.length > this.Match_MaxBits)
|
|
622
622
|
throw new Error("Pattern too long for this browser.");
|
|
623
623
|
var s = this.match_alphabet_(r), o = this;
|
|
624
|
-
function l(
|
|
625
|
-
var
|
|
626
|
-
return o.Match_Distance ?
|
|
624
|
+
function l(T, $) {
|
|
625
|
+
var k = T / r.length, P = Math.abs(i - $);
|
|
626
|
+
return o.Match_Distance ? k + P / o.Match_Distance : P ? 1 : k;
|
|
627
627
|
}
|
|
628
628
|
var c = this.Match_Threshold, f = t.indexOf(r, i);
|
|
629
629
|
f != -1 && (c = Math.min(l(0, f), c), f = t.lastIndexOf(r, i + r.length), f != -1 && (c = Math.min(l(0, f), c)));
|
|
630
630
|
var g = 1 << r.length - 1;
|
|
631
631
|
f = -1;
|
|
632
|
-
for (var d, p, _ = r.length + t.length,
|
|
632
|
+
for (var d, p, _ = r.length + t.length, E, b = 0; b < r.length; b++) {
|
|
633
633
|
for (d = 0, p = _; d < p; )
|
|
634
|
-
l(
|
|
634
|
+
l(b, i + p) <= c ? d = p : _ = p, p = Math.floor((_ - d) / 2 + d);
|
|
635
635
|
_ = p;
|
|
636
|
-
var
|
|
637
|
-
|
|
638
|
-
for (var
|
|
639
|
-
var
|
|
640
|
-
if (
|
|
641
|
-
var
|
|
642
|
-
if (
|
|
643
|
-
if (c =
|
|
644
|
-
|
|
636
|
+
var y = Math.max(1, i - p + 1), A = Math.min(i + p, t.length) + r.length, R = Array(A + 2);
|
|
637
|
+
R[A + 1] = (1 << b) - 1;
|
|
638
|
+
for (var w = A; w >= y; w--) {
|
|
639
|
+
var D = s[t.charAt(w - 1)];
|
|
640
|
+
if (b === 0 ? R[w] = (R[w + 1] << 1 | 1) & D : R[w] = (R[w + 1] << 1 | 1) & D | ((E[w + 1] | E[w]) << 1 | 1) | E[w + 1], R[w] & g) {
|
|
641
|
+
var C = l(b, w - 1);
|
|
642
|
+
if (C <= c)
|
|
643
|
+
if (c = C, f = w - 1, f > i)
|
|
644
|
+
y = Math.max(1, 2 * i - f);
|
|
645
645
|
else
|
|
646
646
|
break;
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
if (l(
|
|
649
|
+
if (l(b + 1, i) > c)
|
|
650
650
|
break;
|
|
651
|
-
|
|
651
|
+
E = R;
|
|
652
652
|
}
|
|
653
653
|
return f;
|
|
654
654
|
}, n.prototype.match_alphabet_ = function(t) {
|
|
@@ -700,20 +700,20 @@ var dn = { exports: {} };
|
|
|
700
700
|
throw new Error("Unknown call format to patch_make.");
|
|
701
701
|
if (o.length === 0)
|
|
702
702
|
return [];
|
|
703
|
-
for (var l = [], c = new n.patch_obj(), f = 0, g = 0, d = 0, p = s, _ = s,
|
|
704
|
-
var
|
|
705
|
-
switch (!f &&
|
|
703
|
+
for (var l = [], c = new n.patch_obj(), f = 0, g = 0, d = 0, p = s, _ = s, E = 0; E < o.length; E++) {
|
|
704
|
+
var b = o[E][0], y = o[E][1];
|
|
705
|
+
switch (!f && b !== h && (c.start1 = g, c.start2 = d), b) {
|
|
706
706
|
case u:
|
|
707
|
-
c.diffs[f++] = o[
|
|
707
|
+
c.diffs[f++] = o[E], c.length2 += y.length, _ = _.substring(0, d) + y + _.substring(d);
|
|
708
708
|
break;
|
|
709
709
|
case a:
|
|
710
|
-
c.length1 +=
|
|
710
|
+
c.length1 += y.length, c.diffs[f++] = o[E], _ = _.substring(0, d) + _.substring(d + y.length);
|
|
711
711
|
break;
|
|
712
712
|
case h:
|
|
713
|
-
|
|
713
|
+
y.length <= 2 * this.Patch_Margin && f && o.length != E + 1 ? (c.diffs[f++] = o[E], c.length1 += y.length, c.length2 += y.length) : y.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, p), l.push(c), c = new n.patch_obj(), f = 0, p = _, g = d);
|
|
714
714
|
break;
|
|
715
715
|
}
|
|
716
|
-
|
|
716
|
+
b !== u && (g += y.length), b !== a && (d += y.length);
|
|
717
717
|
}
|
|
718
718
|
return f && (this.patch_addContext_(c, p), l.push(c)), l;
|
|
719
719
|
}, n.prototype.patch_deepCopy = function(t) {
|
|
@@ -754,12 +754,12 @@ var dn = { exports: {} };
|
|
|
754
754
|
o[l] = !1;
|
|
755
755
|
else {
|
|
756
756
|
this.diff_cleanupSemanticLossless(_);
|
|
757
|
-
for (var
|
|
758
|
-
var
|
|
759
|
-
|
|
757
|
+
for (var E = 0, b, y = 0; y < t[l].diffs.length; y++) {
|
|
758
|
+
var A = t[l].diffs[y];
|
|
759
|
+
A[0] !== h && (b = this.diff_xIndex(_, E)), A[0] === u ? r = r.substring(0, g + b) + A[1] + r.substring(g + b) : A[0] === a && (r = r.substring(0, g + b) + r.substring(g + this.diff_xIndex(
|
|
760
760
|
_,
|
|
761
|
-
|
|
762
|
-
))),
|
|
761
|
+
E + A[1].length
|
|
762
|
+
))), A[0] !== a && (E += A[1].length);
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
}
|
|
@@ -865,20 +865,18 @@ var dn = { exports: {} };
|
|
|
865
865
|
return i.join("").replace(/%20/g, " ");
|
|
866
866
|
}, e.exports = n, e.exports.diff_match_patch = n, e.exports.DIFF_DELETE = a, e.exports.DIFF_INSERT = u, e.exports.DIFF_EQUAL = h;
|
|
867
867
|
})(dn);
|
|
868
|
-
var
|
|
869
|
-
function
|
|
868
|
+
var Ie = dn.exports;
|
|
869
|
+
function pn(e) {
|
|
870
870
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
871
871
|
throw new Error("map is read-only");
|
|
872
872
|
} : e instanceof Set && (e.add = e.clear = e.delete = function() {
|
|
873
873
|
throw new Error("set is read-only");
|
|
874
|
-
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach(
|
|
875
|
-
|
|
876
|
-
|
|
874
|
+
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((n) => {
|
|
875
|
+
const a = e[n], u = typeof a;
|
|
876
|
+
(u === "object" || u === "function") && !Object.isFrozen(a) && pn(a);
|
|
877
877
|
}), e;
|
|
878
878
|
}
|
|
879
|
-
|
|
880
|
-
Pe.exports.default = xe;
|
|
881
|
-
class Ve {
|
|
879
|
+
class je {
|
|
882
880
|
/**
|
|
883
881
|
* @param {CompiledMode} mode
|
|
884
882
|
*/
|
|
@@ -889,10 +887,10 @@ class Ve {
|
|
|
889
887
|
this.isMatchIgnored = !0;
|
|
890
888
|
}
|
|
891
889
|
}
|
|
892
|
-
function
|
|
890
|
+
function _n(e) {
|
|
893
891
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
894
892
|
}
|
|
895
|
-
function
|
|
893
|
+
function re(e, ...n) {
|
|
896
894
|
const a = /* @__PURE__ */ Object.create(null);
|
|
897
895
|
for (const u in e)
|
|
898
896
|
a[u] = e[u];
|
|
@@ -902,7 +900,9 @@ function te(e, ...n) {
|
|
|
902
900
|
}), /** @type {T} */
|
|
903
901
|
a;
|
|
904
902
|
}
|
|
905
|
-
const
|
|
903
|
+
const et = "</span>", Je = (e) => !!e.scope, nt = (e, { prefix: n }) => {
|
|
904
|
+
if (e.startsWith("language:"))
|
|
905
|
+
return e.replace("language:", "language-");
|
|
906
906
|
if (e.includes(".")) {
|
|
907
907
|
const a = e.split(".");
|
|
908
908
|
return [
|
|
@@ -912,7 +912,7 @@ const Vn = "</span>", Je = (e) => !!e.scope || e.sublanguage && e.language, Jn =
|
|
|
912
912
|
}
|
|
913
913
|
return `${n}${e}`;
|
|
914
914
|
};
|
|
915
|
-
class
|
|
915
|
+
class tt {
|
|
916
916
|
/**
|
|
917
917
|
* Creates a new HTMLRenderer
|
|
918
918
|
*
|
|
@@ -927,7 +927,7 @@ class et {
|
|
|
927
927
|
*
|
|
928
928
|
* @param {string} text */
|
|
929
929
|
addText(n) {
|
|
930
|
-
this.buffer +=
|
|
930
|
+
this.buffer += _n(n);
|
|
931
931
|
}
|
|
932
932
|
/**
|
|
933
933
|
* Adds a node open to the output stream (if needed)
|
|
@@ -936,15 +936,18 @@ class et {
|
|
|
936
936
|
openNode(n) {
|
|
937
937
|
if (!Je(n))
|
|
938
938
|
return;
|
|
939
|
-
|
|
940
|
-
|
|
939
|
+
const a = nt(
|
|
940
|
+
n.scope,
|
|
941
|
+
{ prefix: this.classPrefix }
|
|
942
|
+
);
|
|
943
|
+
this.span(a);
|
|
941
944
|
}
|
|
942
945
|
/**
|
|
943
946
|
* Adds a node close to the output stream (if needed)
|
|
944
947
|
*
|
|
945
948
|
* @param {Node} node */
|
|
946
949
|
closeNode(n) {
|
|
947
|
-
Je(n) && (this.buffer +=
|
|
950
|
+
Je(n) && (this.buffer += et);
|
|
948
951
|
}
|
|
949
952
|
/**
|
|
950
953
|
* returns the accumulated buffer
|
|
@@ -965,7 +968,7 @@ const en = (e = {}) => {
|
|
|
965
968
|
const n = { children: [] };
|
|
966
969
|
return Object.assign(n, e), n;
|
|
967
970
|
};
|
|
968
|
-
class
|
|
971
|
+
class xe {
|
|
969
972
|
constructor() {
|
|
970
973
|
this.rootNode = en(), this.stack = [this.rootNode];
|
|
971
974
|
}
|
|
@@ -1014,83 +1017,83 @@ class He {
|
|
|
1014
1017
|
*/
|
|
1015
1018
|
static _collapse(n) {
|
|
1016
1019
|
typeof n != "string" && n.children && (n.children.every((a) => typeof a == "string") ? n.children = [n.children.join("")] : n.children.forEach((a) => {
|
|
1017
|
-
|
|
1020
|
+
xe._collapse(a);
|
|
1018
1021
|
}));
|
|
1019
1022
|
}
|
|
1020
1023
|
}
|
|
1021
|
-
class
|
|
1024
|
+
class rt extends xe {
|
|
1022
1025
|
/**
|
|
1023
1026
|
* @param {*} options
|
|
1024
1027
|
*/
|
|
1025
1028
|
constructor(n) {
|
|
1026
1029
|
super(), this.options = n;
|
|
1027
1030
|
}
|
|
1028
|
-
/**
|
|
1029
|
-
* @param {string} text
|
|
1030
|
-
* @param {string} scope
|
|
1031
|
-
*/
|
|
1032
|
-
addKeyword(n, a) {
|
|
1033
|
-
n !== "" && (this.openNode(a), this.addText(n), this.closeNode());
|
|
1034
|
-
}
|
|
1035
1031
|
/**
|
|
1036
1032
|
* @param {string} text
|
|
1037
1033
|
*/
|
|
1038
1034
|
addText(n) {
|
|
1039
1035
|
n !== "" && this.add(n);
|
|
1040
1036
|
}
|
|
1037
|
+
/** @param {string} scope */
|
|
1038
|
+
startScope(n) {
|
|
1039
|
+
this.openNode(n);
|
|
1040
|
+
}
|
|
1041
|
+
endScope() {
|
|
1042
|
+
this.closeNode();
|
|
1043
|
+
}
|
|
1041
1044
|
/**
|
|
1042
1045
|
* @param {Emitter & {root: DataNode}} emitter
|
|
1043
1046
|
* @param {string} name
|
|
1044
1047
|
*/
|
|
1045
|
-
|
|
1048
|
+
__addSublanguage(n, a) {
|
|
1046
1049
|
const u = n.root;
|
|
1047
|
-
|
|
1050
|
+
a && (u.scope = `language:${a}`), this.add(u);
|
|
1048
1051
|
}
|
|
1049
1052
|
toHTML() {
|
|
1050
|
-
return new
|
|
1053
|
+
return new tt(this, this.options).value();
|
|
1051
1054
|
}
|
|
1052
1055
|
finalize() {
|
|
1053
|
-
return !0;
|
|
1056
|
+
return this.closeAllNodes(), !0;
|
|
1054
1057
|
}
|
|
1055
1058
|
}
|
|
1056
|
-
function
|
|
1059
|
+
function de(e) {
|
|
1057
1060
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
1058
1061
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return
|
|
1062
|
+
function bn(e) {
|
|
1063
|
+
return ae("(?=", e, ")");
|
|
1061
1064
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
1065
|
+
function it(e) {
|
|
1066
|
+
return ae("(?:", e, ")*");
|
|
1064
1067
|
}
|
|
1065
|
-
function
|
|
1066
|
-
return
|
|
1068
|
+
function st(e) {
|
|
1069
|
+
return ae("(?:", e, ")?");
|
|
1067
1070
|
}
|
|
1068
|
-
function
|
|
1069
|
-
return e.map((a) =>
|
|
1071
|
+
function ae(...e) {
|
|
1072
|
+
return e.map((a) => de(a)).join("");
|
|
1070
1073
|
}
|
|
1071
|
-
function
|
|
1074
|
+
function at(e) {
|
|
1072
1075
|
const n = e[e.length - 1];
|
|
1073
1076
|
return typeof n == "object" && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {};
|
|
1074
1077
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return "(" + (
|
|
1078
|
+
function He(...e) {
|
|
1079
|
+
return "(" + (at(e).capture ? "" : "?:") + e.map((u) => de(u)).join("|") + ")";
|
|
1077
1080
|
}
|
|
1078
|
-
function
|
|
1081
|
+
function vn(e) {
|
|
1079
1082
|
return new RegExp(e.toString() + "|").exec("").length - 1;
|
|
1080
1083
|
}
|
|
1081
|
-
function
|
|
1084
|
+
function ot(e, n) {
|
|
1082
1085
|
const a = e && e.exec(n);
|
|
1083
1086
|
return a && a.index === 0;
|
|
1084
1087
|
}
|
|
1085
|
-
const
|
|
1086
|
-
function
|
|
1088
|
+
const lt = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1089
|
+
function Fe(e, { joinWith: n }) {
|
|
1087
1090
|
let a = 0;
|
|
1088
1091
|
return e.map((u) => {
|
|
1089
1092
|
a += 1;
|
|
1090
1093
|
const h = a;
|
|
1091
|
-
let t =
|
|
1094
|
+
let t = de(u), r = "";
|
|
1092
1095
|
for (; t.length > 0; ) {
|
|
1093
|
-
const i =
|
|
1096
|
+
const i = lt.exec(t);
|
|
1094
1097
|
if (!i) {
|
|
1095
1098
|
r += t;
|
|
1096
1099
|
break;
|
|
@@ -1100,14 +1103,14 @@ function ze(e, { joinWith: n }) {
|
|
|
1100
1103
|
return r;
|
|
1101
1104
|
}).map((u) => `(${u})`).join(n);
|
|
1102
1105
|
}
|
|
1103
|
-
const
|
|
1106
|
+
const ct = /\b\B/, En = "[a-zA-Z]\\w*", ze = "[a-zA-Z_]\\w*", mn = "\\b\\d+(\\.\\d+)?", yn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", wn = "\\b(0b[01]+)", ut = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ft = (e = {}) => {
|
|
1104
1107
|
const n = /^#![ ]*\//;
|
|
1105
|
-
return e.binary && (e.begin =
|
|
1108
|
+
return e.binary && (e.begin = ae(
|
|
1106
1109
|
n,
|
|
1107
1110
|
/.*\b/,
|
|
1108
1111
|
e.binary,
|
|
1109
1112
|
/\b.*/
|
|
1110
|
-
)),
|
|
1113
|
+
)), re({
|
|
1111
1114
|
scope: "meta",
|
|
1112
1115
|
begin: n,
|
|
1113
1116
|
end: /$/,
|
|
@@ -1117,25 +1120,25 @@ const ot = /\b\B/, vn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
1117
1120
|
a.index !== 0 && u.ignoreMatch();
|
|
1118
1121
|
}
|
|
1119
1122
|
}, e);
|
|
1120
|
-
},
|
|
1123
|
+
}, pe = {
|
|
1121
1124
|
begin: "\\\\[\\s\\S]",
|
|
1122
1125
|
relevance: 0
|
|
1123
|
-
},
|
|
1126
|
+
}, gt = {
|
|
1124
1127
|
scope: "string",
|
|
1125
1128
|
begin: "'",
|
|
1126
1129
|
end: "'",
|
|
1127
1130
|
illegal: "\\n",
|
|
1128
|
-
contains: [
|
|
1129
|
-
},
|
|
1131
|
+
contains: [pe]
|
|
1132
|
+
}, ht = {
|
|
1130
1133
|
scope: "string",
|
|
1131
1134
|
begin: '"',
|
|
1132
1135
|
end: '"',
|
|
1133
1136
|
illegal: "\\n",
|
|
1134
|
-
contains: [
|
|
1135
|
-
},
|
|
1137
|
+
contains: [pe]
|
|
1138
|
+
}, dt = {
|
|
1136
1139
|
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/
|
|
1137
|
-
},
|
|
1138
|
-
const u =
|
|
1140
|
+
}, Re = function(e, n, a = {}) {
|
|
1141
|
+
const u = re(
|
|
1139
1142
|
{
|
|
1140
1143
|
scope: "comment",
|
|
1141
1144
|
begin: e,
|
|
@@ -1153,7 +1156,7 @@ const ot = /\b\B/, vn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
1153
1156
|
excludeBegin: !0,
|
|
1154
1157
|
relevance: 0
|
|
1155
1158
|
});
|
|
1156
|
-
const h =
|
|
1159
|
+
const h = He(
|
|
1157
1160
|
// list of common 1 and 2 letter words in English
|
|
1158
1161
|
"I",
|
|
1159
1162
|
"a",
|
|
@@ -1189,7 +1192,7 @@ const ot = /\b\B/, vn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
1189
1192
|
//
|
|
1190
1193
|
// for a visual example please see:
|
|
1191
1194
|
// https://github.com/highlightjs/highlight.js/issues/2827
|
|
1192
|
-
begin:
|
|
1195
|
+
begin: ae(
|
|
1193
1196
|
/[ ]+/,
|
|
1194
1197
|
// necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
|
|
1195
1198
|
"(",
|
|
@@ -1200,54 +1203,44 @@ const ot = /\b\B/, vn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
1200
1203
|
// look for 3 words in a row
|
|
1201
1204
|
}
|
|
1202
1205
|
), u;
|
|
1203
|
-
},
|
|
1204
|
-
scope: "number",
|
|
1205
|
-
begin: En,
|
|
1206
|
-
relevance: 0
|
|
1207
|
-
}, bt = {
|
|
1206
|
+
}, pt = Re("//", "$"), _t = Re("/\\*", "\\*/"), bt = Re("#", "$"), vt = {
|
|
1208
1207
|
scope: "number",
|
|
1209
1208
|
begin: mn,
|
|
1210
1209
|
relevance: 0
|
|
1211
|
-
},
|
|
1210
|
+
}, Et = {
|
|
1212
1211
|
scope: "number",
|
|
1213
1212
|
begin: yn,
|
|
1214
1213
|
relevance: 0
|
|
1215
|
-
}, Et = {
|
|
1216
|
-
// this outer rule makes sure we actually have a WHOLE regex and not simply
|
|
1217
|
-
// an expression such as:
|
|
1218
|
-
//
|
|
1219
|
-
// 3 / something
|
|
1220
|
-
//
|
|
1221
|
-
// (which will then blow up when regex's `illegal` sees the newline)
|
|
1222
|
-
begin: /(?=\/[^/\n]*\/)/,
|
|
1223
|
-
contains: [{
|
|
1224
|
-
scope: "regexp",
|
|
1225
|
-
begin: /\//,
|
|
1226
|
-
end: /\/[gimuy]*/,
|
|
1227
|
-
illegal: /\n/,
|
|
1228
|
-
contains: [
|
|
1229
|
-
ge,
|
|
1230
|
-
{
|
|
1231
|
-
begin: /\[/,
|
|
1232
|
-
end: /\]/,
|
|
1233
|
-
relevance: 0,
|
|
1234
|
-
contains: [ge]
|
|
1235
|
-
}
|
|
1236
|
-
]
|
|
1237
|
-
}]
|
|
1238
1214
|
}, mt = {
|
|
1239
|
-
scope: "
|
|
1240
|
-
begin:
|
|
1215
|
+
scope: "number",
|
|
1216
|
+
begin: wn,
|
|
1241
1217
|
relevance: 0
|
|
1242
1218
|
}, yt = {
|
|
1219
|
+
scope: "regexp",
|
|
1220
|
+
begin: /\/(?=[^/\n]*\/)/,
|
|
1221
|
+
end: /\/[gimuy]*/,
|
|
1222
|
+
contains: [
|
|
1223
|
+
pe,
|
|
1224
|
+
{
|
|
1225
|
+
begin: /\[/,
|
|
1226
|
+
end: /\]/,
|
|
1227
|
+
relevance: 0,
|
|
1228
|
+
contains: [pe]
|
|
1229
|
+
}
|
|
1230
|
+
]
|
|
1231
|
+
}, wt = {
|
|
1243
1232
|
scope: "title",
|
|
1244
|
-
begin:
|
|
1233
|
+
begin: En,
|
|
1245
1234
|
relevance: 0
|
|
1246
|
-
},
|
|
1235
|
+
}, Nt = {
|
|
1236
|
+
scope: "title",
|
|
1237
|
+
begin: ze,
|
|
1238
|
+
relevance: 0
|
|
1239
|
+
}, At = {
|
|
1247
1240
|
// excludes method names from keyword processing
|
|
1248
|
-
begin: "\\.\\s*" +
|
|
1241
|
+
begin: "\\.\\s*" + ze,
|
|
1249
1242
|
relevance: 0
|
|
1250
|
-
},
|
|
1243
|
+
}, Mt = function(e) {
|
|
1251
1244
|
return Object.assign(
|
|
1252
1245
|
e,
|
|
1253
1246
|
{
|
|
@@ -1262,53 +1255,53 @@ const ot = /\b\B/, vn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
1262
1255
|
}
|
|
1263
1256
|
);
|
|
1264
1257
|
};
|
|
1265
|
-
var
|
|
1258
|
+
var Ne = /* @__PURE__ */ Object.freeze({
|
|
1266
1259
|
__proto__: null,
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1260
|
+
APOS_STRING_MODE: gt,
|
|
1261
|
+
BACKSLASH_ESCAPE: pe,
|
|
1262
|
+
BINARY_NUMBER_MODE: mt,
|
|
1263
|
+
BINARY_NUMBER_RE: wn,
|
|
1264
|
+
COMMENT: Re,
|
|
1265
|
+
C_BLOCK_COMMENT_MODE: _t,
|
|
1266
|
+
C_LINE_COMMENT_MODE: pt,
|
|
1267
|
+
C_NUMBER_MODE: Et,
|
|
1268
|
+
C_NUMBER_RE: yn,
|
|
1269
|
+
END_SAME_AS_BEGIN: Mt,
|
|
1270
|
+
HASH_COMMENT_MODE: bt,
|
|
1271
|
+
IDENT_RE: En,
|
|
1272
|
+
MATCH_NOTHING_RE: ct,
|
|
1273
|
+
METHOD_GUARD: At,
|
|
1274
|
+
NUMBER_MODE: vt,
|
|
1275
|
+
NUMBER_RE: mn,
|
|
1276
|
+
PHRASAL_WORDS_MODE: dt,
|
|
1277
|
+
QUOTE_STRING_MODE: ht,
|
|
1278
|
+
REGEXP_MODE: yt,
|
|
1279
|
+
RE_STARTERS_RE: ut,
|
|
1280
|
+
SHEBANG: ft,
|
|
1281
|
+
TITLE_MODE: wt,
|
|
1282
|
+
UNDERSCORE_IDENT_RE: ze,
|
|
1283
|
+
UNDERSCORE_TITLE_MODE: Nt
|
|
1291
1284
|
});
|
|
1292
|
-
function
|
|
1285
|
+
function Tt(e, n) {
|
|
1293
1286
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
1294
1287
|
}
|
|
1295
|
-
function
|
|
1288
|
+
function St(e, n) {
|
|
1296
1289
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
1297
1290
|
}
|
|
1298
|
-
function
|
|
1299
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
1291
|
+
function Dt(e, n) {
|
|
1292
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Tt, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
1300
1293
|
}
|
|
1301
|
-
function
|
|
1302
|
-
Array.isArray(e.illegal) && (e.illegal =
|
|
1294
|
+
function Rt(e, n) {
|
|
1295
|
+
Array.isArray(e.illegal) && (e.illegal = He(...e.illegal));
|
|
1303
1296
|
}
|
|
1304
|
-
function
|
|
1297
|
+
function Ct(e, n) {
|
|
1305
1298
|
if (e.match) {
|
|
1306
1299
|
if (e.begin || e.end)
|
|
1307
1300
|
throw new Error("begin & end are not supported with match");
|
|
1308
1301
|
e.begin = e.match, delete e.match;
|
|
1309
1302
|
}
|
|
1310
1303
|
}
|
|
1311
|
-
function
|
|
1304
|
+
function Lt(e, n) {
|
|
1312
1305
|
e.relevance === void 0 && (e.relevance = 1);
|
|
1313
1306
|
}
|
|
1314
1307
|
const Ot = (e, n) => {
|
|
@@ -1319,13 +1312,13 @@ const Ot = (e, n) => {
|
|
|
1319
1312
|
const a = Object.assign({}, e);
|
|
1320
1313
|
Object.keys(e).forEach((u) => {
|
|
1321
1314
|
delete e[u];
|
|
1322
|
-
}), e.keywords = a.keywords, e.begin =
|
|
1315
|
+
}), e.keywords = a.keywords, e.begin = ae(a.beforeMatch, bn(a.begin)), e.starts = {
|
|
1323
1316
|
relevance: 0,
|
|
1324
1317
|
contains: [
|
|
1325
1318
|
Object.assign(a, { endsParent: !0 })
|
|
1326
1319
|
]
|
|
1327
1320
|
}, e.relevance = 0, delete a.beforeMatch;
|
|
1328
|
-
},
|
|
1321
|
+
}, It = [
|
|
1329
1322
|
"of",
|
|
1330
1323
|
"and",
|
|
1331
1324
|
"for",
|
|
@@ -1340,70 +1333,70 @@ const Ot = (e, n) => {
|
|
|
1340
1333
|
// common variable name
|
|
1341
1334
|
"value"
|
|
1342
1335
|
// common variable name
|
|
1343
|
-
],
|
|
1344
|
-
function
|
|
1336
|
+
], kt = "keyword";
|
|
1337
|
+
function Nn(e, n, a = kt) {
|
|
1345
1338
|
const u = /* @__PURE__ */ Object.create(null);
|
|
1346
1339
|
return typeof e == "string" ? h(a, e.split(" ")) : Array.isArray(e) ? h(a, e) : Object.keys(e).forEach(function(t) {
|
|
1347
1340
|
Object.assign(
|
|
1348
1341
|
u,
|
|
1349
|
-
|
|
1342
|
+
Nn(e[t], n, t)
|
|
1350
1343
|
);
|
|
1351
1344
|
}), u;
|
|
1352
1345
|
function h(t, r) {
|
|
1353
1346
|
n && (r = r.map((i) => i.toLowerCase())), r.forEach(function(i) {
|
|
1354
1347
|
const s = i.split("|");
|
|
1355
|
-
u[s[0]] = [t,
|
|
1348
|
+
u[s[0]] = [t, Bt(s[0], s[1])];
|
|
1356
1349
|
});
|
|
1357
1350
|
}
|
|
1358
1351
|
}
|
|
1359
|
-
function
|
|
1360
|
-
return n ? Number(n) :
|
|
1352
|
+
function Bt(e, n) {
|
|
1353
|
+
return n ? Number(n) : $t(e) ? 0 : 1;
|
|
1361
1354
|
}
|
|
1362
|
-
function
|
|
1363
|
-
return
|
|
1355
|
+
function $t(e) {
|
|
1356
|
+
return It.includes(e.toLowerCase());
|
|
1364
1357
|
}
|
|
1365
|
-
const nn = {},
|
|
1358
|
+
const nn = {}, se = (e) => {
|
|
1366
1359
|
console.error(e);
|
|
1367
1360
|
}, tn = (e, ...n) => {
|
|
1368
1361
|
console.log(`WARN: ${e}`, ...n);
|
|
1369
|
-
},
|
|
1362
|
+
}, le = (e, n) => {
|
|
1370
1363
|
nn[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), nn[`${e}/${n}`] = !0);
|
|
1371
|
-
},
|
|
1372
|
-
function
|
|
1364
|
+
}, Se = new Error();
|
|
1365
|
+
function An(e, n, { key: a }) {
|
|
1373
1366
|
let u = 0;
|
|
1374
1367
|
const h = e[a], t = {}, r = {};
|
|
1375
1368
|
for (let i = 1; i <= n.length; i++)
|
|
1376
|
-
r[i + u] = h[i], t[i + u] = !0, u +=
|
|
1369
|
+
r[i + u] = h[i], t[i + u] = !0, u += vn(n[i - 1]);
|
|
1377
1370
|
e[a] = r, e[a]._emit = t, e[a]._multi = !0;
|
|
1378
1371
|
}
|
|
1379
|
-
function
|
|
1372
|
+
function Ut(e) {
|
|
1380
1373
|
if (Array.isArray(e.begin)) {
|
|
1381
1374
|
if (e.skip || e.excludeBegin || e.returnBegin)
|
|
1382
|
-
throw
|
|
1375
|
+
throw se("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Se;
|
|
1383
1376
|
if (typeof e.beginScope != "object" || e.beginScope === null)
|
|
1384
|
-
throw
|
|
1385
|
-
|
|
1377
|
+
throw se("beginScope must be object"), Se;
|
|
1378
|
+
An(e, e.begin, { key: "beginScope" }), e.begin = Fe(e.begin, { joinWith: "" });
|
|
1386
1379
|
}
|
|
1387
1380
|
}
|
|
1388
|
-
function
|
|
1381
|
+
function Pt(e) {
|
|
1389
1382
|
if (Array.isArray(e.end)) {
|
|
1390
1383
|
if (e.skip || e.excludeEnd || e.returnEnd)
|
|
1391
|
-
throw
|
|
1384
|
+
throw se("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Se;
|
|
1392
1385
|
if (typeof e.endScope != "object" || e.endScope === null)
|
|
1393
|
-
throw
|
|
1394
|
-
|
|
1386
|
+
throw se("endScope must be object"), Se;
|
|
1387
|
+
An(e, e.end, { key: "endScope" }), e.end = Fe(e.end, { joinWith: "" });
|
|
1395
1388
|
}
|
|
1396
1389
|
}
|
|
1397
|
-
function
|
|
1390
|
+
function xt(e) {
|
|
1398
1391
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
1399
1392
|
}
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1393
|
+
function Ht(e) {
|
|
1394
|
+
xt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Ut(e), Pt(e);
|
|
1402
1395
|
}
|
|
1403
|
-
function
|
|
1396
|
+
function Ft(e) {
|
|
1404
1397
|
function n(r, i) {
|
|
1405
1398
|
return new RegExp(
|
|
1406
|
-
|
|
1399
|
+
de(r),
|
|
1407
1400
|
"m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (i ? "g" : "")
|
|
1408
1401
|
);
|
|
1409
1402
|
}
|
|
@@ -1413,12 +1406,12 @@ function xt(e) {
|
|
|
1413
1406
|
}
|
|
1414
1407
|
// @ts-ignore
|
|
1415
1408
|
addRule(i, s) {
|
|
1416
|
-
s.position = this.position++, this.matchIndexes[this.matchAt] = s, this.regexes.push([s, i]), this.matchAt +=
|
|
1409
|
+
s.position = this.position++, this.matchIndexes[this.matchAt] = s, this.regexes.push([s, i]), this.matchAt += vn(i) + 1;
|
|
1417
1410
|
}
|
|
1418
1411
|
compile() {
|
|
1419
1412
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
1420
1413
|
const i = this.regexes.map((s) => s[1]);
|
|
1421
|
-
this.matcherRe = n(
|
|
1414
|
+
this.matcherRe = n(Fe(i, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
1422
1415
|
}
|
|
1423
1416
|
/** @param {string} s */
|
|
1424
1417
|
exec(i) {
|
|
@@ -1475,26 +1468,26 @@ function xt(e) {
|
|
|
1475
1468
|
if (r.isCompiled)
|
|
1476
1469
|
return s;
|
|
1477
1470
|
[
|
|
1478
|
-
|
|
1471
|
+
St,
|
|
1479
1472
|
// do this early so compiler extensions generally don't have to worry about
|
|
1480
1473
|
// the distinction between match/begin
|
|
1481
|
-
|
|
1482
|
-
|
|
1474
|
+
Ct,
|
|
1475
|
+
Ht,
|
|
1483
1476
|
Ot
|
|
1484
1477
|
].forEach((l) => l(r, i)), e.compilerExtensions.forEach((l) => l(r, i)), r.__beforeBegin = null, [
|
|
1485
|
-
|
|
1478
|
+
Dt,
|
|
1486
1479
|
// do this later so compiler extensions that come earlier have access to the
|
|
1487
1480
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
1488
|
-
|
|
1481
|
+
Rt,
|
|
1489
1482
|
// default to 1 relevance if not specified
|
|
1490
|
-
|
|
1483
|
+
Lt
|
|
1491
1484
|
].forEach((l) => l(r, i)), r.isCompiled = !0;
|
|
1492
1485
|
let o = null;
|
|
1493
|
-
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), o = r.keywords.$pattern, delete r.keywords.$pattern), o = o || /\w+/, r.keywords && (r.keywords =
|
|
1486
|
+
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), o = r.keywords.$pattern, delete r.keywords.$pattern), o = o || /\w+/, r.keywords && (r.keywords = Nn(r.keywords, e.case_insensitive)), s.keywordPatternRe = n(o, !0), i && (r.begin || (r.begin = /\B|\b/), s.beginRe = n(s.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (s.endRe = n(s.end)), s.terminatorEnd = de(s.end) || "", r.endsWithParent && i.terminatorEnd && (s.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (s.illegalRe = n(
|
|
1494
1487
|
/** @type {RegExp | string} */
|
|
1495
1488
|
r.illegal
|
|
1496
1489
|
)), r.contains || (r.contains = []), r.contains = [].concat(...r.contains.map(function(l) {
|
|
1497
|
-
return
|
|
1490
|
+
return zt(l === "self" ? r : l);
|
|
1498
1491
|
})), r.contains.forEach(function(l) {
|
|
1499
1492
|
t(
|
|
1500
1493
|
/** @type Mode */
|
|
@@ -1505,7 +1498,7 @@ function xt(e) {
|
|
|
1505
1498
|
}
|
|
1506
1499
|
if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
|
|
1507
1500
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
1508
|
-
return e.classNameAliases =
|
|
1501
|
+
return e.classNameAliases = re(e.classNameAliases || {}), t(
|
|
1509
1502
|
/** @type Mode */
|
|
1510
1503
|
e
|
|
1511
1504
|
);
|
|
@@ -1513,18 +1506,18 @@ function xt(e) {
|
|
|
1513
1506
|
function Mn(e) {
|
|
1514
1507
|
return e ? e.endsWithParent || Mn(e.starts) : !1;
|
|
1515
1508
|
}
|
|
1516
|
-
function
|
|
1509
|
+
function zt(e) {
|
|
1517
1510
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
1518
|
-
return
|
|
1519
|
-
})), e.cachedVariants ? e.cachedVariants : Mn(e) ?
|
|
1511
|
+
return re(e, { variants: null }, n);
|
|
1512
|
+
})), e.cachedVariants ? e.cachedVariants : Mn(e) ? re(e, { starts: e.starts ? re(e.starts) : null }) : Object.isFrozen(e) ? re(e) : e;
|
|
1520
1513
|
}
|
|
1521
|
-
var
|
|
1522
|
-
class
|
|
1514
|
+
var Gt = "11.9.0";
|
|
1515
|
+
class Kt extends Error {
|
|
1523
1516
|
constructor(n, a) {
|
|
1524
1517
|
super(n), this.name = "HTMLInjectionError", this.html = a;
|
|
1525
1518
|
}
|
|
1526
1519
|
}
|
|
1527
|
-
const
|
|
1520
|
+
const ke = _n, rn = re, sn = Symbol("nomatch"), Wt = 7, Tn = function(e) {
|
|
1528
1521
|
const n = /* @__PURE__ */ Object.create(null), a = /* @__PURE__ */ Object.create(null), u = [];
|
|
1529
1522
|
let h = !0;
|
|
1530
1523
|
const t = "Could not find the language '{}', did you forget to load/include a language module?", r = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
@@ -1538,394 +1531,412 @@ const Ie = pn, rn = te, sn = Symbol("nomatch"), Gt = 7, Kt = function(e) {
|
|
|
1538
1531
|
languages: null,
|
|
1539
1532
|
// beta configuration options, subject to change, welcome to discuss
|
|
1540
1533
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1541
|
-
__emitter:
|
|
1534
|
+
__emitter: rt
|
|
1542
1535
|
};
|
|
1543
|
-
function s(
|
|
1544
|
-
return i.noHighlightRe.test(
|
|
1536
|
+
function s(v) {
|
|
1537
|
+
return i.noHighlightRe.test(v);
|
|
1545
1538
|
}
|
|
1546
|
-
function o(
|
|
1547
|
-
let N =
|
|
1548
|
-
N +=
|
|
1549
|
-
const
|
|
1550
|
-
if (
|
|
1551
|
-
const
|
|
1552
|
-
return
|
|
1539
|
+
function o(v) {
|
|
1540
|
+
let N = v.className + " ";
|
|
1541
|
+
N += v.parentNode ? v.parentNode.className : "";
|
|
1542
|
+
const O = i.languageDetectRe.exec(N);
|
|
1543
|
+
if (O) {
|
|
1544
|
+
const B = T(O[1]);
|
|
1545
|
+
return B || (tn(t.replace("{}", O[1])), tn("Falling back to no-highlight mode for this block.", v)), B ? O[1] : "no-highlight";
|
|
1553
1546
|
}
|
|
1554
|
-
return N.split(/\s+/).find((
|
|
1547
|
+
return N.split(/\s+/).find((B) => s(B) || T(B));
|
|
1555
1548
|
}
|
|
1556
|
-
function l(
|
|
1557
|
-
let
|
|
1558
|
-
typeof N == "object" ? (
|
|
1559
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
1549
|
+
function l(v, N, O) {
|
|
1550
|
+
let B = "", H = "";
|
|
1551
|
+
typeof N == "object" ? (B = v, O = N.ignoreIllegals, H = N.language) : (le("10.7.0", "highlight(lang, code, ...args) has been deprecated."), le("10.7.0", `Please use highlight(code, options) instead.
|
|
1552
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), H = v, B = N), O === void 0 && (O = !0);
|
|
1560
1553
|
const W = {
|
|
1561
|
-
code:
|
|
1562
|
-
language:
|
|
1554
|
+
code: B,
|
|
1555
|
+
language: H
|
|
1563
1556
|
};
|
|
1564
|
-
|
|
1565
|
-
const Y = W.result ? W.result : c(W.language, W.code,
|
|
1566
|
-
return Y.code = W.code,
|
|
1557
|
+
te("before:highlight", W);
|
|
1558
|
+
const Y = W.result ? W.result : c(W.language, W.code, O);
|
|
1559
|
+
return Y.code = W.code, te("after:highlight", Y), Y;
|
|
1567
1560
|
}
|
|
1568
|
-
function c(
|
|
1569
|
-
const
|
|
1570
|
-
function W(
|
|
1571
|
-
return
|
|
1561
|
+
function c(v, N, O, B) {
|
|
1562
|
+
const H = /* @__PURE__ */ Object.create(null);
|
|
1563
|
+
function W(m, M) {
|
|
1564
|
+
return m.keywords[M];
|
|
1572
1565
|
}
|
|
1573
1566
|
function Y() {
|
|
1574
|
-
if (!
|
|
1575
|
-
z.addText(
|
|
1567
|
+
if (!L.keywords) {
|
|
1568
|
+
z.addText(x);
|
|
1576
1569
|
return;
|
|
1577
1570
|
}
|
|
1578
|
-
let
|
|
1579
|
-
|
|
1580
|
-
let
|
|
1581
|
-
for (;
|
|
1582
|
-
|
|
1583
|
-
const
|
|
1584
|
-
if (
|
|
1585
|
-
const [j,
|
|
1586
|
-
if (z.addText(
|
|
1587
|
-
|
|
1571
|
+
let m = 0;
|
|
1572
|
+
L.keywordPatternRe.lastIndex = 0;
|
|
1573
|
+
let M = L.keywordPatternRe.exec(x), I = "";
|
|
1574
|
+
for (; M; ) {
|
|
1575
|
+
I += x.substring(m, M.index);
|
|
1576
|
+
const U = X.case_insensitive ? M[0].toLowerCase() : M[0], G = W(L, U);
|
|
1577
|
+
if (G) {
|
|
1578
|
+
const [j, Pn] = G;
|
|
1579
|
+
if (z.addText(I), I = "", H[U] = (H[U] || 0) + 1, H[U] <= Wt && (we += Pn), j.startsWith("_"))
|
|
1580
|
+
I += M[0];
|
|
1588
1581
|
else {
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1582
|
+
const xn = X.classNameAliases[j] || j;
|
|
1583
|
+
V(M[0], xn);
|
|
1591
1584
|
}
|
|
1592
1585
|
} else
|
|
1593
|
-
|
|
1594
|
-
|
|
1586
|
+
I += M[0];
|
|
1587
|
+
m = L.keywordPatternRe.lastIndex, M = L.keywordPatternRe.exec(x);
|
|
1595
1588
|
}
|
|
1596
|
-
|
|
1589
|
+
I += x.substring(m), z.addText(I);
|
|
1597
1590
|
}
|
|
1598
|
-
function
|
|
1599
|
-
if (
|
|
1591
|
+
function me() {
|
|
1592
|
+
if (x === "")
|
|
1600
1593
|
return;
|
|
1601
|
-
let
|
|
1602
|
-
if (typeof
|
|
1603
|
-
if (!n[
|
|
1604
|
-
z.addText(
|
|
1594
|
+
let m = null;
|
|
1595
|
+
if (typeof L.subLanguage == "string") {
|
|
1596
|
+
if (!n[L.subLanguage]) {
|
|
1597
|
+
z.addText(x);
|
|
1605
1598
|
return;
|
|
1606
1599
|
}
|
|
1607
|
-
|
|
1608
|
-
|
|
1600
|
+
m = c(L.subLanguage, x, !0, Ye[L.subLanguage]), Ye[L.subLanguage] = /** @type {CompiledMode} */
|
|
1601
|
+
m._top;
|
|
1609
1602
|
} else
|
|
1610
|
-
|
|
1611
|
-
|
|
1603
|
+
m = g(x, L.subLanguage.length ? L.subLanguage : null);
|
|
1604
|
+
L.relevance > 0 && (we += m.relevance), z.__addSublanguage(m._emitter, m.language);
|
|
1612
1605
|
}
|
|
1613
1606
|
function Q() {
|
|
1614
|
-
|
|
1607
|
+
L.subLanguage != null ? me() : Y(), x = "";
|
|
1608
|
+
}
|
|
1609
|
+
function V(m, M) {
|
|
1610
|
+
m !== "" && (z.startScope(M), z.addText(m), z.endScope());
|
|
1615
1611
|
}
|
|
1616
|
-
function
|
|
1617
|
-
let
|
|
1618
|
-
const
|
|
1619
|
-
for (;
|
|
1620
|
-
if (!
|
|
1621
|
-
|
|
1612
|
+
function We(m, M) {
|
|
1613
|
+
let I = 1;
|
|
1614
|
+
const U = M.length - 1;
|
|
1615
|
+
for (; I <= U; ) {
|
|
1616
|
+
if (!m._emit[I]) {
|
|
1617
|
+
I++;
|
|
1622
1618
|
continue;
|
|
1623
1619
|
}
|
|
1624
|
-
const
|
|
1625
|
-
|
|
1620
|
+
const G = X.classNameAliases[m[I]] || m[I], j = M[I];
|
|
1621
|
+
G ? V(j, G) : (x = j, Y(), x = ""), I++;
|
|
1626
1622
|
}
|
|
1627
1623
|
}
|
|
1628
|
-
function Qe(
|
|
1629
|
-
return
|
|
1624
|
+
function Qe(m, M) {
|
|
1625
|
+
return m.scope && typeof m.scope == "string" && z.openNode(X.classNameAliases[m.scope] || m.scope), m.beginScope && (m.beginScope._wrap ? (V(x, X.classNameAliases[m.beginScope._wrap] || m.beginScope._wrap), x = "") : m.beginScope._multi && (We(m.beginScope, M), x = "")), L = Object.create(m, { parent: { value: L } }), L;
|
|
1630
1626
|
}
|
|
1631
|
-
function
|
|
1632
|
-
let
|
|
1633
|
-
if (
|
|
1634
|
-
if (
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1627
|
+
function qe(m, M, I) {
|
|
1628
|
+
let U = ot(m.endRe, I);
|
|
1629
|
+
if (U) {
|
|
1630
|
+
if (m["on:end"]) {
|
|
1631
|
+
const G = new je(m);
|
|
1632
|
+
m["on:end"](M, G), G.isMatchIgnored && (U = !1);
|
|
1637
1633
|
}
|
|
1638
|
-
if (
|
|
1639
|
-
for (;
|
|
1640
|
-
|
|
1641
|
-
return
|
|
1634
|
+
if (U) {
|
|
1635
|
+
for (; m.endsParent && m.parent; )
|
|
1636
|
+
m = m.parent;
|
|
1637
|
+
return m;
|
|
1642
1638
|
}
|
|
1643
1639
|
}
|
|
1644
|
-
if (
|
|
1645
|
-
return
|
|
1640
|
+
if (m.endsWithParent)
|
|
1641
|
+
return qe(m.parent, M, I);
|
|
1646
1642
|
}
|
|
1647
|
-
function
|
|
1648
|
-
return
|
|
1643
|
+
function In(m) {
|
|
1644
|
+
return L.matcher.regexIndex === 0 ? (x += m[0], 1) : (Oe = !0, 0);
|
|
1649
1645
|
}
|
|
1650
|
-
function
|
|
1651
|
-
const
|
|
1652
|
-
for (const j of
|
|
1653
|
-
if (j && (j(
|
|
1654
|
-
return
|
|
1655
|
-
return
|
|
1646
|
+
function kn(m) {
|
|
1647
|
+
const M = m[0], I = m.rule, U = new je(I), G = [I.__beforeBegin, I["on:begin"]];
|
|
1648
|
+
for (const j of G)
|
|
1649
|
+
if (j && (j(m, U), U.isMatchIgnored))
|
|
1650
|
+
return In(M);
|
|
1651
|
+
return I.skip ? x += M : (I.excludeBegin && (x += M), Q(), !I.returnBegin && !I.excludeBegin && (x = M)), Qe(I, m), I.returnBegin ? 0 : M.length;
|
|
1656
1652
|
}
|
|
1657
|
-
function
|
|
1658
|
-
const
|
|
1659
|
-
if (!
|
|
1653
|
+
function Bn(m) {
|
|
1654
|
+
const M = m[0], I = N.substring(m.index), U = qe(L, m, I);
|
|
1655
|
+
if (!U)
|
|
1660
1656
|
return sn;
|
|
1661
|
-
const
|
|
1662
|
-
|
|
1657
|
+
const G = L;
|
|
1658
|
+
L.endScope && L.endScope._wrap ? (Q(), V(M, L.endScope._wrap)) : L.endScope && L.endScope._multi ? (Q(), We(L.endScope, m)) : G.skip ? x += M : (G.returnEnd || G.excludeEnd || (x += M), Q(), G.excludeEnd && (x = M));
|
|
1663
1659
|
do
|
|
1664
|
-
|
|
1665
|
-
while (
|
|
1666
|
-
return
|
|
1660
|
+
L.scope && z.closeNode(), !L.skip && !L.subLanguage && (we += L.relevance), L = L.parent;
|
|
1661
|
+
while (L !== U.parent);
|
|
1662
|
+
return U.starts && Qe(U.starts, m), G.returnEnd ? 0 : M.length;
|
|
1667
1663
|
}
|
|
1668
|
-
function
|
|
1669
|
-
const
|
|
1670
|
-
for (let
|
|
1671
|
-
|
|
1672
|
-
|
|
1664
|
+
function $n() {
|
|
1665
|
+
const m = [];
|
|
1666
|
+
for (let M = L; M !== X; M = M.parent)
|
|
1667
|
+
M.scope && m.unshift(M.scope);
|
|
1668
|
+
m.forEach((M) => z.openNode(M));
|
|
1673
1669
|
}
|
|
1674
|
-
let
|
|
1675
|
-
function
|
|
1676
|
-
const
|
|
1677
|
-
if (
|
|
1670
|
+
let ye = {};
|
|
1671
|
+
function Ze(m, M) {
|
|
1672
|
+
const I = M && M[0];
|
|
1673
|
+
if (x += m, I == null)
|
|
1678
1674
|
return Q(), 0;
|
|
1679
|
-
if (
|
|
1680
|
-
if (
|
|
1681
|
-
const
|
|
1682
|
-
throw
|
|
1675
|
+
if (ye.type === "begin" && M.type === "end" && ye.index === M.index && I === "") {
|
|
1676
|
+
if (x += N.slice(M.index, M.index + 1), !h) {
|
|
1677
|
+
const U = new Error(`0 width match regex (${v})`);
|
|
1678
|
+
throw U.languageName = v, U.badRule = ye.rule, U;
|
|
1683
1679
|
}
|
|
1684
1680
|
return 1;
|
|
1685
1681
|
}
|
|
1686
|
-
if (
|
|
1687
|
-
return
|
|
1688
|
-
if (
|
|
1689
|
-
const
|
|
1690
|
-
throw
|
|
1691
|
-
} else if (
|
|
1692
|
-
const
|
|
1693
|
-
if (
|
|
1694
|
-
return
|
|
1682
|
+
if (ye = M, M.type === "begin")
|
|
1683
|
+
return kn(M);
|
|
1684
|
+
if (M.type === "illegal" && !O) {
|
|
1685
|
+
const U = new Error('Illegal lexeme "' + I + '" for mode "' + (L.scope || "<unnamed>") + '"');
|
|
1686
|
+
throw U.mode = L, U;
|
|
1687
|
+
} else if (M.type === "end") {
|
|
1688
|
+
const U = Bn(M);
|
|
1689
|
+
if (U !== sn)
|
|
1690
|
+
return U;
|
|
1695
1691
|
}
|
|
1696
|
-
if (
|
|
1692
|
+
if (M.type === "illegal" && I === "")
|
|
1697
1693
|
return 1;
|
|
1698
|
-
if (
|
|
1694
|
+
if (Le > 1e5 && Le > M.index * 3)
|
|
1699
1695
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1700
|
-
return
|
|
1696
|
+
return x += I, I.length;
|
|
1701
1697
|
}
|
|
1702
|
-
const
|
|
1703
|
-
if (!
|
|
1704
|
-
throw
|
|
1705
|
-
const
|
|
1706
|
-
let
|
|
1698
|
+
const X = T(v);
|
|
1699
|
+
if (!X)
|
|
1700
|
+
throw se(t.replace("{}", v)), new Error('Unknown language: "' + v + '"');
|
|
1701
|
+
const Un = Ft(X);
|
|
1702
|
+
let Ce = "", L = B || Un;
|
|
1707
1703
|
const Ye = {}, z = new i.__emitter(i);
|
|
1708
|
-
|
|
1709
|
-
let
|
|
1704
|
+
$n();
|
|
1705
|
+
let x = "", we = 0, ie = 0, Le = 0, Oe = !1;
|
|
1710
1706
|
try {
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1707
|
+
if (X.__emitTokens)
|
|
1708
|
+
X.__emitTokens(N, z);
|
|
1709
|
+
else {
|
|
1710
|
+
for (L.matcher.considerAll(); ; ) {
|
|
1711
|
+
Le++, Oe ? Oe = !1 : L.matcher.considerAll(), L.matcher.lastIndex = ie;
|
|
1712
|
+
const m = L.matcher.exec(N);
|
|
1713
|
+
if (!m)
|
|
1714
|
+
break;
|
|
1715
|
+
const M = N.substring(ie, m.index), I = Ze(M, m);
|
|
1716
|
+
ie = m.index + I;
|
|
1717
|
+
}
|
|
1718
|
+
Ze(N.substring(ie));
|
|
1718
1719
|
}
|
|
1719
|
-
return
|
|
1720
|
-
language:
|
|
1721
|
-
value:
|
|
1722
|
-
relevance:
|
|
1720
|
+
return z.finalize(), Ce = z.toHTML(), {
|
|
1721
|
+
language: v,
|
|
1722
|
+
value: Ce,
|
|
1723
|
+
relevance: we,
|
|
1723
1724
|
illegal: !1,
|
|
1724
1725
|
_emitter: z,
|
|
1725
|
-
_top:
|
|
1726
|
+
_top: L
|
|
1726
1727
|
};
|
|
1727
|
-
} catch (
|
|
1728
|
-
if (
|
|
1728
|
+
} catch (m) {
|
|
1729
|
+
if (m.message && m.message.includes("Illegal"))
|
|
1729
1730
|
return {
|
|
1730
|
-
language:
|
|
1731
|
-
value:
|
|
1731
|
+
language: v,
|
|
1732
|
+
value: ke(N),
|
|
1732
1733
|
illegal: !0,
|
|
1733
1734
|
relevance: 0,
|
|
1734
1735
|
_illegalBy: {
|
|
1735
|
-
message:
|
|
1736
|
-
index:
|
|
1737
|
-
context: N.slice(
|
|
1738
|
-
mode:
|
|
1739
|
-
resultSoFar:
|
|
1736
|
+
message: m.message,
|
|
1737
|
+
index: ie,
|
|
1738
|
+
context: N.slice(ie - 100, ie + 100),
|
|
1739
|
+
mode: m.mode,
|
|
1740
|
+
resultSoFar: Ce
|
|
1740
1741
|
},
|
|
1741
1742
|
_emitter: z
|
|
1742
1743
|
};
|
|
1743
1744
|
if (h)
|
|
1744
1745
|
return {
|
|
1745
|
-
language:
|
|
1746
|
-
value:
|
|
1746
|
+
language: v,
|
|
1747
|
+
value: ke(N),
|
|
1747
1748
|
illegal: !1,
|
|
1748
1749
|
relevance: 0,
|
|
1749
|
-
errorRaised:
|
|
1750
|
+
errorRaised: m,
|
|
1750
1751
|
_emitter: z,
|
|
1751
|
-
_top:
|
|
1752
|
+
_top: L
|
|
1752
1753
|
};
|
|
1753
|
-
throw
|
|
1754
|
+
throw m;
|
|
1754
1755
|
}
|
|
1755
1756
|
}
|
|
1756
|
-
function f(
|
|
1757
|
+
function f(v) {
|
|
1757
1758
|
const N = {
|
|
1758
|
-
value:
|
|
1759
|
+
value: ke(v),
|
|
1759
1760
|
illegal: !1,
|
|
1760
1761
|
relevance: 0,
|
|
1761
1762
|
_top: r,
|
|
1762
1763
|
_emitter: new i.__emitter(i)
|
|
1763
1764
|
};
|
|
1764
|
-
return N._emitter.addText(
|
|
1765
|
+
return N._emitter.addText(v), N;
|
|
1765
1766
|
}
|
|
1766
|
-
function g(
|
|
1767
|
+
function g(v, N) {
|
|
1767
1768
|
N = N || i.languages || Object.keys(n);
|
|
1768
|
-
const
|
|
1769
|
-
(Q) => c(Q,
|
|
1769
|
+
const O = f(v), B = N.filter(T).filter(k).map(
|
|
1770
|
+
(Q) => c(Q, v, !1)
|
|
1770
1771
|
);
|
|
1771
|
-
|
|
1772
|
-
const
|
|
1773
|
-
if (Q.relevance !==
|
|
1774
|
-
return
|
|
1775
|
-
if (Q.language &&
|
|
1776
|
-
if (
|
|
1772
|
+
B.unshift(O);
|
|
1773
|
+
const H = B.sort((Q, V) => {
|
|
1774
|
+
if (Q.relevance !== V.relevance)
|
|
1775
|
+
return V.relevance - Q.relevance;
|
|
1776
|
+
if (Q.language && V.language) {
|
|
1777
|
+
if (T(Q.language).supersetOf === V.language)
|
|
1777
1778
|
return 1;
|
|
1778
|
-
if (
|
|
1779
|
+
if (T(V.language).supersetOf === Q.language)
|
|
1779
1780
|
return -1;
|
|
1780
1781
|
}
|
|
1781
1782
|
return 0;
|
|
1782
|
-
}), [W, Y] =
|
|
1783
|
-
return
|
|
1783
|
+
}), [W, Y] = H, me = W;
|
|
1784
|
+
return me.secondBest = Y, me;
|
|
1784
1785
|
}
|
|
1785
|
-
function d(
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1786
|
+
function d(v, N, O) {
|
|
1787
|
+
const B = N && a[N] || O;
|
|
1788
|
+
v.classList.add("hljs"), v.classList.add(`language-${B}`);
|
|
1788
1789
|
}
|
|
1789
|
-
function p(
|
|
1790
|
+
function p(v) {
|
|
1790
1791
|
let N = null;
|
|
1791
|
-
const
|
|
1792
|
-
if (s(
|
|
1792
|
+
const O = o(v);
|
|
1793
|
+
if (s(O))
|
|
1793
1794
|
return;
|
|
1794
|
-
if (
|
|
1795
|
+
if (te(
|
|
1795
1796
|
"before:highlightElement",
|
|
1796
|
-
{ el:
|
|
1797
|
-
),
|
|
1798
|
-
|
|
1797
|
+
{ el: v, language: O }
|
|
1798
|
+
), v.dataset.highlighted) {
|
|
1799
|
+
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", v);
|
|
1800
|
+
return;
|
|
1801
|
+
}
|
|
1802
|
+
if (v.children.length > 0 && (i.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(v)), i.throwUnescapedHTML))
|
|
1803
|
+
throw new Kt(
|
|
1799
1804
|
"One of your code blocks includes unescaped HTML.",
|
|
1800
|
-
|
|
1805
|
+
v.innerHTML
|
|
1801
1806
|
);
|
|
1802
|
-
N =
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1805
|
-
language:
|
|
1807
|
+
N = v;
|
|
1808
|
+
const B = N.textContent, H = O ? l(B, { language: O, ignoreIllegals: !0 }) : g(B);
|
|
1809
|
+
v.innerHTML = H.value, v.dataset.highlighted = "yes", d(v, O, H.language), v.result = {
|
|
1810
|
+
language: H.language,
|
|
1806
1811
|
// TODO: remove with version 11.0
|
|
1807
|
-
re:
|
|
1808
|
-
relevance:
|
|
1809
|
-
},
|
|
1810
|
-
language:
|
|
1811
|
-
relevance:
|
|
1812
|
-
}),
|
|
1812
|
+
re: H.relevance,
|
|
1813
|
+
relevance: H.relevance
|
|
1814
|
+
}, H.secondBest && (v.secondBest = {
|
|
1815
|
+
language: H.secondBest.language,
|
|
1816
|
+
relevance: H.secondBest.relevance
|
|
1817
|
+
}), te("after:highlightElement", { el: v, result: H, text: B });
|
|
1813
1818
|
}
|
|
1814
|
-
function _(
|
|
1815
|
-
i = rn(i,
|
|
1819
|
+
function _(v) {
|
|
1820
|
+
i = rn(i, v);
|
|
1816
1821
|
}
|
|
1817
|
-
const
|
|
1818
|
-
|
|
1822
|
+
const E = () => {
|
|
1823
|
+
A(), le("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1819
1824
|
};
|
|
1820
|
-
function
|
|
1821
|
-
|
|
1825
|
+
function b() {
|
|
1826
|
+
A(), le("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1822
1827
|
}
|
|
1823
|
-
let
|
|
1824
|
-
function
|
|
1828
|
+
let y = !1;
|
|
1829
|
+
function A() {
|
|
1825
1830
|
if (document.readyState === "loading") {
|
|
1826
|
-
|
|
1831
|
+
y = !0;
|
|
1827
1832
|
return;
|
|
1828
1833
|
}
|
|
1829
1834
|
document.querySelectorAll(i.cssSelector).forEach(p);
|
|
1830
1835
|
}
|
|
1831
|
-
function
|
|
1832
|
-
|
|
1836
|
+
function R() {
|
|
1837
|
+
y && A();
|
|
1833
1838
|
}
|
|
1834
|
-
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded",
|
|
1835
|
-
function
|
|
1836
|
-
let
|
|
1839
|
+
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", R, !1);
|
|
1840
|
+
function w(v, N) {
|
|
1841
|
+
let O = null;
|
|
1837
1842
|
try {
|
|
1838
|
-
|
|
1839
|
-
} catch (
|
|
1840
|
-
if (
|
|
1841
|
-
|
|
1843
|
+
O = N(e);
|
|
1844
|
+
} catch (B) {
|
|
1845
|
+
if (se("Language definition for '{}' could not be registered.".replace("{}", v)), h)
|
|
1846
|
+
se(B);
|
|
1842
1847
|
else
|
|
1843
|
-
throw
|
|
1844
|
-
|
|
1848
|
+
throw B;
|
|
1849
|
+
O = r;
|
|
1845
1850
|
}
|
|
1846
|
-
|
|
1851
|
+
O.name || (O.name = v), n[v] = O, O.rawDefinition = N.bind(null, e), O.aliases && $(O.aliases, { languageName: v });
|
|
1847
1852
|
}
|
|
1848
|
-
function
|
|
1849
|
-
delete n[
|
|
1853
|
+
function D(v) {
|
|
1854
|
+
delete n[v];
|
|
1850
1855
|
for (const N of Object.keys(a))
|
|
1851
|
-
a[N] ===
|
|
1856
|
+
a[N] === v && delete a[N];
|
|
1852
1857
|
}
|
|
1853
|
-
function
|
|
1858
|
+
function C() {
|
|
1854
1859
|
return Object.keys(n);
|
|
1855
1860
|
}
|
|
1856
|
-
function
|
|
1857
|
-
return
|
|
1861
|
+
function T(v) {
|
|
1862
|
+
return v = (v || "").toLowerCase(), n[v] || n[a[v]];
|
|
1858
1863
|
}
|
|
1859
|
-
function
|
|
1860
|
-
typeof
|
|
1861
|
-
a[
|
|
1864
|
+
function $(v, { languageName: N }) {
|
|
1865
|
+
typeof v == "string" && (v = [v]), v.forEach((O) => {
|
|
1866
|
+
a[O.toLowerCase()] = N;
|
|
1862
1867
|
});
|
|
1863
1868
|
}
|
|
1864
|
-
function
|
|
1865
|
-
const N =
|
|
1869
|
+
function k(v) {
|
|
1870
|
+
const N = T(v);
|
|
1866
1871
|
return N && !N.disableAutodetect;
|
|
1867
1872
|
}
|
|
1868
|
-
function
|
|
1869
|
-
|
|
1870
|
-
|
|
1873
|
+
function P(v) {
|
|
1874
|
+
v["before:highlightBlock"] && !v["before:highlightElement"] && (v["before:highlightElement"] = (N) => {
|
|
1875
|
+
v["before:highlightBlock"](
|
|
1871
1876
|
Object.assign({ block: N.el }, N)
|
|
1872
1877
|
);
|
|
1873
|
-
}),
|
|
1874
|
-
|
|
1878
|
+
}), v["after:highlightBlock"] && !v["after:highlightElement"] && (v["after:highlightElement"] = (N) => {
|
|
1879
|
+
v["after:highlightBlock"](
|
|
1875
1880
|
Object.assign({ block: N.el }, N)
|
|
1876
1881
|
);
|
|
1877
1882
|
});
|
|
1878
1883
|
}
|
|
1879
|
-
function F(
|
|
1880
|
-
|
|
1884
|
+
function F(v) {
|
|
1885
|
+
P(v), u.push(v);
|
|
1886
|
+
}
|
|
1887
|
+
function K(v) {
|
|
1888
|
+
const N = u.indexOf(v);
|
|
1889
|
+
N !== -1 && u.splice(N, 1);
|
|
1881
1890
|
}
|
|
1882
|
-
function
|
|
1883
|
-
const
|
|
1884
|
-
u.forEach(function(
|
|
1885
|
-
|
|
1891
|
+
function te(v, N) {
|
|
1892
|
+
const O = v;
|
|
1893
|
+
u.forEach(function(B) {
|
|
1894
|
+
B[O] && B[O](N);
|
|
1886
1895
|
});
|
|
1887
1896
|
}
|
|
1888
|
-
function
|
|
1889
|
-
return
|
|
1897
|
+
function oe(v) {
|
|
1898
|
+
return le("10.7.0", "highlightBlock will be removed entirely in v12.0"), le("10.7.0", "Please use highlightElement now."), p(v);
|
|
1890
1899
|
}
|
|
1891
1900
|
Object.assign(e, {
|
|
1892
1901
|
highlight: l,
|
|
1893
1902
|
highlightAuto: g,
|
|
1894
|
-
highlightAll:
|
|
1903
|
+
highlightAll: A,
|
|
1895
1904
|
highlightElement: p,
|
|
1896
1905
|
// TODO: Remove with v12 API
|
|
1897
|
-
highlightBlock:
|
|
1906
|
+
highlightBlock: oe,
|
|
1898
1907
|
configure: _,
|
|
1899
|
-
initHighlighting:
|
|
1900
|
-
initHighlightingOnLoad:
|
|
1901
|
-
registerLanguage:
|
|
1902
|
-
unregisterLanguage:
|
|
1903
|
-
listLanguages:
|
|
1904
|
-
getLanguage:
|
|
1905
|
-
registerAliases:
|
|
1906
|
-
autoDetection:
|
|
1908
|
+
initHighlighting: E,
|
|
1909
|
+
initHighlightingOnLoad: b,
|
|
1910
|
+
registerLanguage: w,
|
|
1911
|
+
unregisterLanguage: D,
|
|
1912
|
+
listLanguages: C,
|
|
1913
|
+
getLanguage: T,
|
|
1914
|
+
registerAliases: $,
|
|
1915
|
+
autoDetection: k,
|
|
1907
1916
|
inherit: rn,
|
|
1908
|
-
addPlugin: F
|
|
1917
|
+
addPlugin: F,
|
|
1918
|
+
removePlugin: K
|
|
1909
1919
|
}), e.debugMode = function() {
|
|
1910
1920
|
h = !1;
|
|
1911
1921
|
}, e.safeMode = function() {
|
|
1912
1922
|
h = !0;
|
|
1913
|
-
}, e.versionString =
|
|
1914
|
-
concat:
|
|
1915
|
-
lookahead:
|
|
1916
|
-
either:
|
|
1917
|
-
optional:
|
|
1918
|
-
anyNumberOfTimes:
|
|
1923
|
+
}, e.versionString = Gt, e.regex = {
|
|
1924
|
+
concat: ae,
|
|
1925
|
+
lookahead: bn,
|
|
1926
|
+
either: He,
|
|
1927
|
+
optional: st,
|
|
1928
|
+
anyNumberOfTimes: it
|
|
1919
1929
|
};
|
|
1920
|
-
for (const
|
|
1921
|
-
typeof
|
|
1922
|
-
return Object.assign(e,
|
|
1923
|
-
};
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1930
|
+
for (const v in Ne)
|
|
1931
|
+
typeof Ne[v] == "object" && pn(Ne[v]);
|
|
1932
|
+
return Object.assign(e, Ne), e;
|
|
1933
|
+
}, ue = Tn({});
|
|
1934
|
+
ue.newInstance = () => Tn({});
|
|
1935
|
+
var Qt = ue;
|
|
1936
|
+
ue.HighlightJS = ue;
|
|
1937
|
+
ue.default = ue;
|
|
1938
|
+
const Z = /* @__PURE__ */ Jn(Qt);
|
|
1939
|
+
function qt(e) {
|
|
1929
1940
|
const n = e.regex, a = n.concat(/[\p{L}_]/u, n.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), u = /[\p{L}0-9._:-]+/u, h = {
|
|
1930
1941
|
className: "symbol",
|
|
1931
1942
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
@@ -2184,14 +2195,14 @@ const an = "[A-Za-z$_][0-9A-Za-z$_]*", Zt = [
|
|
|
2184
2195
|
"from",
|
|
2185
2196
|
"export",
|
|
2186
2197
|
"extends"
|
|
2187
|
-
],
|
|
2198
|
+
], Yt = [
|
|
2188
2199
|
"true",
|
|
2189
2200
|
"false",
|
|
2190
2201
|
"null",
|
|
2191
2202
|
"undefined",
|
|
2192
2203
|
"NaN",
|
|
2193
2204
|
"Infinity"
|
|
2194
|
-
],
|
|
2205
|
+
], Sn = [
|
|
2195
2206
|
// Fundamental objects
|
|
2196
2207
|
"Object",
|
|
2197
2208
|
"Function",
|
|
@@ -2241,7 +2252,7 @@ const an = "[A-Za-z$_][0-9A-Za-z$_]*", Zt = [
|
|
|
2241
2252
|
"Intl",
|
|
2242
2253
|
// WebAssembly
|
|
2243
2254
|
"WebAssembly"
|
|
2244
|
-
],
|
|
2255
|
+
], Dn = [
|
|
2245
2256
|
"Error",
|
|
2246
2257
|
"EvalError",
|
|
2247
2258
|
"InternalError",
|
|
@@ -2250,7 +2261,7 @@ const an = "[A-Za-z$_][0-9A-Za-z$_]*", Zt = [
|
|
|
2250
2261
|
"SyntaxError",
|
|
2251
2262
|
"TypeError",
|
|
2252
2263
|
"URIError"
|
|
2253
|
-
],
|
|
2264
|
+
], Rn = [
|
|
2254
2265
|
"setInterval",
|
|
2255
2266
|
"setTimeout",
|
|
2256
2267
|
"clearInterval",
|
|
@@ -2268,7 +2279,7 @@ const an = "[A-Za-z$_][0-9A-Za-z$_]*", Zt = [
|
|
|
2268
2279
|
"encodeURIComponent",
|
|
2269
2280
|
"escape",
|
|
2270
2281
|
"unescape"
|
|
2271
|
-
],
|
|
2282
|
+
], Vt = [
|
|
2272
2283
|
"arguments",
|
|
2273
2284
|
"this",
|
|
2274
2285
|
"super",
|
|
@@ -2276,18 +2287,19 @@ const an = "[A-Za-z$_][0-9A-Za-z$_]*", Zt = [
|
|
|
2276
2287
|
"window",
|
|
2277
2288
|
"document",
|
|
2278
2289
|
"localStorage",
|
|
2290
|
+
"sessionStorage",
|
|
2279
2291
|
"module",
|
|
2280
2292
|
"global"
|
|
2281
2293
|
// Node.js
|
|
2282
|
-
],
|
|
2294
|
+
], Xt = [].concat(
|
|
2295
|
+
Rn,
|
|
2283
2296
|
Sn,
|
|
2284
|
-
|
|
2285
|
-
Tn
|
|
2297
|
+
Dn
|
|
2286
2298
|
);
|
|
2287
|
-
function
|
|
2288
|
-
const n = e.regex, a = (N, { after:
|
|
2289
|
-
const
|
|
2290
|
-
return N.input.indexOf(
|
|
2299
|
+
function jt(e) {
|
|
2300
|
+
const n = e.regex, a = (N, { after: O }) => {
|
|
2301
|
+
const B = "</" + N[0].slice(1);
|
|
2302
|
+
return N.input.indexOf(B, O) !== -1;
|
|
2291
2303
|
}, u = an, h = {
|
|
2292
2304
|
begin: "<>",
|
|
2293
2305
|
end: "</>"
|
|
@@ -2298,37 +2310,37 @@ function Xt(e) {
|
|
|
2298
2310
|
* @param {RegExpMatchArray} match
|
|
2299
2311
|
* @param {CallbackResponse} response
|
|
2300
2312
|
*/
|
|
2301
|
-
isTrulyOpeningTag: (N,
|
|
2302
|
-
const
|
|
2313
|
+
isTrulyOpeningTag: (N, O) => {
|
|
2314
|
+
const B = N[0].length + N.index, H = N.input[B];
|
|
2303
2315
|
if (
|
|
2304
2316
|
// HTML should not include another raw `<` inside a tag
|
|
2305
2317
|
// nested type?
|
|
2306
2318
|
// `<Array<Array<number>>`, etc.
|
|
2307
|
-
|
|
2319
|
+
H === "<" || // the , gives away that this is not HTML
|
|
2308
2320
|
// `<T, A extends keyof T, V>`
|
|
2309
|
-
|
|
2321
|
+
H === ","
|
|
2310
2322
|
) {
|
|
2311
|
-
|
|
2323
|
+
O.ignoreMatch();
|
|
2312
2324
|
return;
|
|
2313
2325
|
}
|
|
2314
|
-
|
|
2326
|
+
H === ">" && (a(N, { after: B }) || O.ignoreMatch());
|
|
2315
2327
|
let W;
|
|
2316
|
-
const Y = N.input.substring(
|
|
2328
|
+
const Y = N.input.substring(B);
|
|
2317
2329
|
if (W = Y.match(/^\s*=/)) {
|
|
2318
|
-
|
|
2330
|
+
O.ignoreMatch();
|
|
2319
2331
|
return;
|
|
2320
2332
|
}
|
|
2321
2333
|
if ((W = Y.match(/^\s+extends\s+/)) && W.index === 0) {
|
|
2322
|
-
|
|
2334
|
+
O.ignoreMatch();
|
|
2323
2335
|
return;
|
|
2324
2336
|
}
|
|
2325
2337
|
}
|
|
2326
2338
|
}, i = {
|
|
2327
2339
|
$pattern: an,
|
|
2328
2340
|
keyword: Zt,
|
|
2329
|
-
literal:
|
|
2330
|
-
built_in:
|
|
2331
|
-
"variable.language":
|
|
2341
|
+
literal: Yt,
|
|
2342
|
+
built_in: Xt,
|
|
2343
|
+
"variable.language": Vt
|
|
2332
2344
|
}, s = "[0-9](_?[0-9])*", o = `\\.(${s})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
|
|
2333
2345
|
className: "number",
|
|
2334
2346
|
variants: [
|
|
@@ -2378,6 +2390,18 @@ function Xt(e) {
|
|
|
2378
2390
|
subLanguage: "css"
|
|
2379
2391
|
}
|
|
2380
2392
|
}, p = {
|
|
2393
|
+
begin: "gql`",
|
|
2394
|
+
end: "",
|
|
2395
|
+
starts: {
|
|
2396
|
+
end: "`",
|
|
2397
|
+
returnEnd: !1,
|
|
2398
|
+
contains: [
|
|
2399
|
+
e.BACKSLASH_ESCAPE,
|
|
2400
|
+
f
|
|
2401
|
+
],
|
|
2402
|
+
subLanguage: "graphql"
|
|
2403
|
+
}
|
|
2404
|
+
}, _ = {
|
|
2381
2405
|
className: "string",
|
|
2382
2406
|
begin: "`",
|
|
2383
2407
|
end: "`",
|
|
@@ -2385,7 +2409,7 @@ function Xt(e) {
|
|
|
2385
2409
|
e.BACKSLASH_ESCAPE,
|
|
2386
2410
|
f
|
|
2387
2411
|
]
|
|
2388
|
-
},
|
|
2412
|
+
}, b = {
|
|
2389
2413
|
className: "comment",
|
|
2390
2414
|
variants: [
|
|
2391
2415
|
e.COMMENT(
|
|
@@ -2430,12 +2454,13 @@ function Xt(e) {
|
|
|
2430
2454
|
e.C_BLOCK_COMMENT_MODE,
|
|
2431
2455
|
e.C_LINE_COMMENT_MODE
|
|
2432
2456
|
]
|
|
2433
|
-
},
|
|
2457
|
+
}, y = [
|
|
2434
2458
|
e.APOS_STRING_MODE,
|
|
2435
2459
|
e.QUOTE_STRING_MODE,
|
|
2436
2460
|
g,
|
|
2437
2461
|
d,
|
|
2438
2462
|
p,
|
|
2463
|
+
_,
|
|
2439
2464
|
// Skip numbers when they are part of a variable name
|
|
2440
2465
|
{ match: /\$\d+/ },
|
|
2441
2466
|
c
|
|
@@ -2443,7 +2468,7 @@ function Xt(e) {
|
|
|
2443
2468
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
2444
2469
|
// hljs.REGEXP_MODE
|
|
2445
2470
|
];
|
|
2446
|
-
f.contains =
|
|
2471
|
+
f.contains = y.concat({
|
|
2447
2472
|
// we need to pair up {} inside our subst to prevent
|
|
2448
2473
|
// it from ending too early by matching another }
|
|
2449
2474
|
begin: /\{/,
|
|
@@ -2451,25 +2476,25 @@ function Xt(e) {
|
|
|
2451
2476
|
keywords: i,
|
|
2452
2477
|
contains: [
|
|
2453
2478
|
"self"
|
|
2454
|
-
].concat(
|
|
2479
|
+
].concat(y)
|
|
2455
2480
|
});
|
|
2456
|
-
const
|
|
2481
|
+
const A = [].concat(b, f.contains), R = A.concat([
|
|
2457
2482
|
// eat recursive parens in sub expressions
|
|
2458
2483
|
{
|
|
2459
2484
|
begin: /\(/,
|
|
2460
2485
|
end: /\)/,
|
|
2461
2486
|
keywords: i,
|
|
2462
|
-
contains: ["self"].concat(
|
|
2487
|
+
contains: ["self"].concat(A)
|
|
2463
2488
|
}
|
|
2464
|
-
]),
|
|
2489
|
+
]), w = {
|
|
2465
2490
|
className: "params",
|
|
2466
2491
|
begin: /\(/,
|
|
2467
2492
|
end: /\)/,
|
|
2468
2493
|
excludeBegin: !0,
|
|
2469
2494
|
excludeEnd: !0,
|
|
2470
2495
|
keywords: i,
|
|
2471
|
-
contains:
|
|
2472
|
-
},
|
|
2496
|
+
contains: R
|
|
2497
|
+
}, D = {
|
|
2473
2498
|
variants: [
|
|
2474
2499
|
// class Car extends vehicle
|
|
2475
2500
|
{
|
|
@@ -2502,7 +2527,7 @@ function Xt(e) {
|
|
|
2502
2527
|
}
|
|
2503
2528
|
}
|
|
2504
2529
|
]
|
|
2505
|
-
},
|
|
2530
|
+
}, C = {
|
|
2506
2531
|
relevance: 0,
|
|
2507
2532
|
match: n.either(
|
|
2508
2533
|
// Hard coded exceptions
|
|
@@ -2522,16 +2547,16 @@ function Xt(e) {
|
|
|
2522
2547
|
keywords: {
|
|
2523
2548
|
_: [
|
|
2524
2549
|
// se we still get relevance credit for JS library classes
|
|
2525
|
-
...
|
|
2526
|
-
...
|
|
2550
|
+
...Sn,
|
|
2551
|
+
...Dn
|
|
2527
2552
|
]
|
|
2528
2553
|
}
|
|
2529
|
-
},
|
|
2554
|
+
}, T = {
|
|
2530
2555
|
label: "use_strict",
|
|
2531
2556
|
className: "meta",
|
|
2532
2557
|
relevance: 10,
|
|
2533
2558
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
2534
|
-
},
|
|
2559
|
+
}, $ = {
|
|
2535
2560
|
variants: [
|
|
2536
2561
|
{
|
|
2537
2562
|
match: [
|
|
@@ -2554,21 +2579,21 @@ function Xt(e) {
|
|
|
2554
2579
|
3: "title.function"
|
|
2555
2580
|
},
|
|
2556
2581
|
label: "func.def",
|
|
2557
|
-
contains: [
|
|
2582
|
+
contains: [w],
|
|
2558
2583
|
illegal: /%/
|
|
2559
|
-
},
|
|
2584
|
+
}, k = {
|
|
2560
2585
|
relevance: 0,
|
|
2561
2586
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
2562
2587
|
className: "variable.constant"
|
|
2563
2588
|
};
|
|
2564
|
-
function
|
|
2589
|
+
function P(N) {
|
|
2565
2590
|
return n.concat("(?!", N.join("|"), ")");
|
|
2566
2591
|
}
|
|
2567
|
-
const
|
|
2592
|
+
const F = {
|
|
2568
2593
|
match: n.concat(
|
|
2569
2594
|
/\b/,
|
|
2570
|
-
|
|
2571
|
-
...
|
|
2595
|
+
P([
|
|
2596
|
+
...Rn,
|
|
2572
2597
|
"super",
|
|
2573
2598
|
"import"
|
|
2574
2599
|
]),
|
|
@@ -2577,7 +2602,7 @@ function Xt(e) {
|
|
|
2577
2602
|
),
|
|
2578
2603
|
className: "title.function",
|
|
2579
2604
|
relevance: 0
|
|
2580
|
-
},
|
|
2605
|
+
}, K = {
|
|
2581
2606
|
begin: n.concat(/\./, n.lookahead(
|
|
2582
2607
|
n.concat(u, /(?![0-9A-Za-z$_(])/)
|
|
2583
2608
|
)),
|
|
@@ -2586,7 +2611,7 @@ function Xt(e) {
|
|
|
2586
2611
|
keywords: "prototype",
|
|
2587
2612
|
className: "property",
|
|
2588
2613
|
relevance: 0
|
|
2589
|
-
},
|
|
2614
|
+
}, te = {
|
|
2590
2615
|
match: [
|
|
2591
2616
|
/get|set/,
|
|
2592
2617
|
/\s+/,
|
|
@@ -2602,9 +2627,9 @@ function Xt(e) {
|
|
|
2602
2627
|
// eat to avoid empty params
|
|
2603
2628
|
begin: /\(\)/
|
|
2604
2629
|
},
|
|
2605
|
-
|
|
2630
|
+
w
|
|
2606
2631
|
]
|
|
2607
|
-
},
|
|
2632
|
+
}, oe = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", v = {
|
|
2608
2633
|
match: [
|
|
2609
2634
|
/const|var|let/,
|
|
2610
2635
|
/\s+/,
|
|
@@ -2613,7 +2638,7 @@ function Xt(e) {
|
|
|
2613
2638
|
/=\s*/,
|
|
2614
2639
|
/(async\s*)?/,
|
|
2615
2640
|
// async is optional
|
|
2616
|
-
n.lookahead(
|
|
2641
|
+
n.lookahead(oe)
|
|
2617
2642
|
],
|
|
2618
2643
|
keywords: "async",
|
|
2619
2644
|
className: {
|
|
@@ -2621,15 +2646,15 @@ function Xt(e) {
|
|
|
2621
2646
|
3: "title.function"
|
|
2622
2647
|
},
|
|
2623
2648
|
contains: [
|
|
2624
|
-
|
|
2649
|
+
w
|
|
2625
2650
|
]
|
|
2626
2651
|
};
|
|
2627
2652
|
return {
|
|
2628
|
-
name: "
|
|
2653
|
+
name: "JavaScript",
|
|
2629
2654
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
2630
2655
|
keywords: i,
|
|
2631
2656
|
// this will be extended by TypeScript
|
|
2632
|
-
exports: { PARAMS_CONTAINS:
|
|
2657
|
+
exports: { PARAMS_CONTAINS: R, CLASS_REFERENCE: C },
|
|
2633
2658
|
illegal: /#(?![$_A-z])/,
|
|
2634
2659
|
contains: [
|
|
2635
2660
|
e.SHEBANG({
|
|
@@ -2637,37 +2662,38 @@ function Xt(e) {
|
|
|
2637
2662
|
binary: "node",
|
|
2638
2663
|
relevance: 5
|
|
2639
2664
|
}),
|
|
2640
|
-
|
|
2665
|
+
T,
|
|
2641
2666
|
e.APOS_STRING_MODE,
|
|
2642
2667
|
e.QUOTE_STRING_MODE,
|
|
2643
2668
|
g,
|
|
2644
2669
|
d,
|
|
2645
2670
|
p,
|
|
2646
|
-
|
|
2671
|
+
_,
|
|
2672
|
+
b,
|
|
2647
2673
|
// Skip numbers when they are part of a variable name
|
|
2648
2674
|
{ match: /\$\d+/ },
|
|
2649
2675
|
c,
|
|
2650
|
-
|
|
2676
|
+
C,
|
|
2651
2677
|
{
|
|
2652
2678
|
className: "attr",
|
|
2653
2679
|
begin: u + n.lookahead(":"),
|
|
2654
2680
|
relevance: 0
|
|
2655
2681
|
},
|
|
2656
|
-
|
|
2682
|
+
v,
|
|
2657
2683
|
{
|
|
2658
2684
|
// "value" container
|
|
2659
2685
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
2660
2686
|
keywords: "return throw case",
|
|
2661
2687
|
relevance: 0,
|
|
2662
2688
|
contains: [
|
|
2663
|
-
|
|
2689
|
+
b,
|
|
2664
2690
|
e.REGEXP_MODE,
|
|
2665
2691
|
{
|
|
2666
2692
|
className: "function",
|
|
2667
2693
|
// we have to count the parens to make sure we actually have the
|
|
2668
2694
|
// correct bounding ( ) before the =>. There could be any number of
|
|
2669
2695
|
// sub-expressions inside also surrounded by parens.
|
|
2670
|
-
begin:
|
|
2696
|
+
begin: oe,
|
|
2671
2697
|
returnBegin: !0,
|
|
2672
2698
|
end: "\\s*=>",
|
|
2673
2699
|
contains: [
|
|
@@ -2689,7 +2715,7 @@ function Xt(e) {
|
|
|
2689
2715
|
excludeBegin: !0,
|
|
2690
2716
|
excludeEnd: !0,
|
|
2691
2717
|
keywords: i,
|
|
2692
|
-
contains:
|
|
2718
|
+
contains: R
|
|
2693
2719
|
}
|
|
2694
2720
|
]
|
|
2695
2721
|
}
|
|
@@ -2729,7 +2755,7 @@ function Xt(e) {
|
|
|
2729
2755
|
}
|
|
2730
2756
|
]
|
|
2731
2757
|
},
|
|
2732
|
-
|
|
2758
|
+
$,
|
|
2733
2759
|
{
|
|
2734
2760
|
// prevent this from getting swallowed up by function
|
|
2735
2761
|
// since they appear "function like"
|
|
@@ -2744,7 +2770,7 @@ function Xt(e) {
|
|
|
2744
2770
|
returnBegin: !0,
|
|
2745
2771
|
label: "func.def",
|
|
2746
2772
|
contains: [
|
|
2747
|
-
|
|
2773
|
+
w,
|
|
2748
2774
|
e.inherit(e.TITLE_MODE, { begin: u, className: "title.function" })
|
|
2749
2775
|
]
|
|
2750
2776
|
},
|
|
@@ -2753,7 +2779,7 @@ function Xt(e) {
|
|
|
2753
2779
|
match: /\.\.\./,
|
|
2754
2780
|
relevance: 0
|
|
2755
2781
|
},
|
|
2756
|
-
|
|
2782
|
+
K,
|
|
2757
2783
|
// hack: prevents detection of keywords in some circumstances
|
|
2758
2784
|
// .keyword()
|
|
2759
2785
|
// $keyword = x
|
|
@@ -2764,12 +2790,12 @@ function Xt(e) {
|
|
|
2764
2790
|
{
|
|
2765
2791
|
match: [/\bconstructor(?=\s*\()/],
|
|
2766
2792
|
className: { 1: "title.function" },
|
|
2767
|
-
contains: [
|
|
2793
|
+
contains: [w]
|
|
2768
2794
|
},
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2795
|
+
F,
|
|
2796
|
+
k,
|
|
2797
|
+
D,
|
|
2798
|
+
te,
|
|
2773
2799
|
{
|
|
2774
2800
|
match: /\$[(.]/
|
|
2775
2801
|
// relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
|
@@ -2777,7 +2803,7 @@ function Xt(e) {
|
|
|
2777
2803
|
]
|
|
2778
2804
|
};
|
|
2779
2805
|
}
|
|
2780
|
-
function
|
|
2806
|
+
function Jt(e) {
|
|
2781
2807
|
const n = {
|
|
2782
2808
|
className: "attr",
|
|
2783
2809
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
@@ -2811,7 +2837,7 @@ function Vt(e) {
|
|
|
2811
2837
|
illegal: "\\S"
|
|
2812
2838
|
};
|
|
2813
2839
|
}
|
|
2814
|
-
function
|
|
2840
|
+
function er(e) {
|
|
2815
2841
|
const n = "true false yes no null", a = "[\\w#;/?:@&=+$,.~*'()[\\]]+", u = {
|
|
2816
2842
|
className: "attr",
|
|
2817
2843
|
variants: [
|
|
@@ -2975,7 +3001,7 @@ function Jt(e) {
|
|
|
2975
3001
|
contains: p
|
|
2976
3002
|
};
|
|
2977
3003
|
}
|
|
2978
|
-
function
|
|
3004
|
+
function nr(e) {
|
|
2979
3005
|
return {
|
|
2980
3006
|
name: "Plain text",
|
|
2981
3007
|
aliases: [
|
|
@@ -2985,7 +3011,7 @@ function er(e) {
|
|
|
2985
3011
|
disableAutodetect: !0
|
|
2986
3012
|
};
|
|
2987
3013
|
}
|
|
2988
|
-
function
|
|
3014
|
+
function tr(e) {
|
|
2989
3015
|
const n = e.regex, a = /[\p{XID_Start}_]\p{XID_Continue}*/u, u = [
|
|
2990
3016
|
"and",
|
|
2991
3017
|
"as",
|
|
@@ -3272,7 +3298,7 @@ function nr(e) {
|
|
|
3272
3298
|
endsWithParent: !0
|
|
3273
3299
|
}
|
|
3274
3300
|
]
|
|
3275
|
-
},
|
|
3301
|
+
}, E = {
|
|
3276
3302
|
className: "params",
|
|
3277
3303
|
variants: [
|
|
3278
3304
|
// Exclude params in functions without params
|
|
@@ -3310,7 +3336,7 @@ function nr(e) {
|
|
|
3310
3336
|
],
|
|
3311
3337
|
unicodeRegex: !0,
|
|
3312
3338
|
keywords: i,
|
|
3313
|
-
illegal: /(
|
|
3339
|
+
illegal: /(<\/|\?)|=>/,
|
|
3314
3340
|
contains: [
|
|
3315
3341
|
s,
|
|
3316
3342
|
p,
|
|
@@ -3337,7 +3363,7 @@ function nr(e) {
|
|
|
3337
3363
|
1: "keyword",
|
|
3338
3364
|
3: "title.function"
|
|
3339
3365
|
},
|
|
3340
|
-
contains: [
|
|
3366
|
+
contains: [E]
|
|
3341
3367
|
},
|
|
3342
3368
|
{
|
|
3343
3369
|
variants: [
|
|
@@ -3372,25 +3398,25 @@ function nr(e) {
|
|
|
3372
3398
|
end: /(?=#)|$/,
|
|
3373
3399
|
contains: [
|
|
3374
3400
|
p,
|
|
3375
|
-
|
|
3401
|
+
E,
|
|
3376
3402
|
c
|
|
3377
3403
|
]
|
|
3378
3404
|
}
|
|
3379
3405
|
]
|
|
3380
3406
|
};
|
|
3381
3407
|
}
|
|
3382
|
-
var
|
|
3408
|
+
var ce = "[0-9](_*[0-9])*", Ae = `\\.(${ce})`, Me = "[0-9a-fA-F](_*[0-9a-fA-F])*", on = {
|
|
3383
3409
|
className: "number",
|
|
3384
3410
|
variants: [
|
|
3385
3411
|
// DecimalFloatingPointLiteral
|
|
3386
3412
|
// including ExponentPart
|
|
3387
|
-
{ begin: `(\\b(${
|
|
3413
|
+
{ begin: `(\\b(${ce})((${Ae})|\\.)?|(${Ae}))[eE][+-]?(${ce})[fFdD]?\\b` },
|
|
3388
3414
|
// excluding ExponentPart
|
|
3389
|
-
{ begin: `\\b(${
|
|
3390
|
-
{ begin: `(${
|
|
3391
|
-
{ begin: `\\b(${
|
|
3415
|
+
{ begin: `\\b(${ce})((${Ae})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
3416
|
+
{ begin: `(${Ae})[fFdD]?\\b` },
|
|
3417
|
+
{ begin: `\\b(${ce})[fFdD]\\b` },
|
|
3392
3418
|
// HexadecimalFloatingPointLiteral
|
|
3393
|
-
{ begin: `\\b0[xX]((${Me})\\.?|(${Me})?\\.(${Me}))[pP][+-]?(${
|
|
3419
|
+
{ begin: `\\b0[xX]((${Me})\\.?|(${Me})?\\.(${Me}))[pP][+-]?(${ce})[fFdD]?\\b` },
|
|
3394
3420
|
// DecimalIntegerLiteral
|
|
3395
3421
|
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
3396
3422
|
// HexIntegerLiteral
|
|
@@ -3402,11 +3428,11 @@ var oe = "[0-9](_*[0-9])*", Ne = `\\.(${oe})`, Me = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3402
3428
|
],
|
|
3403
3429
|
relevance: 0
|
|
3404
3430
|
};
|
|
3405
|
-
function
|
|
3406
|
-
return a === -1 ? "" : e.replace(n, (u) =>
|
|
3431
|
+
function Cn(e, n, a) {
|
|
3432
|
+
return a === -1 ? "" : e.replace(n, (u) => Cn(e, n, a - 1));
|
|
3407
3433
|
}
|
|
3408
|
-
function
|
|
3409
|
-
const n = e.regex, a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = a +
|
|
3434
|
+
function rr(e) {
|
|
3435
|
+
const n = e.regex, a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = a + Cn("(?:<" + a + "~~~(?:\\s*,\\s*" + a + "~~~)*>)?", /~~~/g, 2), s = {
|
|
3410
3436
|
keyword: [
|
|
3411
3437
|
"synchronized",
|
|
3412
3438
|
"abstract",
|
|
@@ -3614,7 +3640,7 @@ function tr(e) {
|
|
|
3614
3640
|
]
|
|
3615
3641
|
};
|
|
3616
3642
|
}
|
|
3617
|
-
function
|
|
3643
|
+
function ir(e) {
|
|
3618
3644
|
const n = e.regex, a = {}, u = {
|
|
3619
3645
|
begin: /\$\{/,
|
|
3620
3646
|
end: /\}/,
|
|
@@ -3665,13 +3691,14 @@ function rr(e) {
|
|
|
3665
3691
|
};
|
|
3666
3692
|
h.contains.push(r);
|
|
3667
3693
|
const i = {
|
|
3668
|
-
|
|
3669
|
-
begin: /\\"/
|
|
3694
|
+
match: /\\"/
|
|
3670
3695
|
}, s = {
|
|
3671
3696
|
className: "string",
|
|
3672
3697
|
begin: /'/,
|
|
3673
3698
|
end: /'/
|
|
3674
3699
|
}, o = {
|
|
3700
|
+
match: /\\'/
|
|
3701
|
+
}, l = {
|
|
3675
3702
|
begin: /\$?\(\(/,
|
|
3676
3703
|
end: /\)\)/,
|
|
3677
3704
|
contains: [
|
|
@@ -3682,7 +3709,7 @@ function rr(e) {
|
|
|
3682
3709
|
e.NUMBER_MODE,
|
|
3683
3710
|
a
|
|
3684
3711
|
]
|
|
3685
|
-
},
|
|
3712
|
+
}, c = [
|
|
3686
3713
|
"fish",
|
|
3687
3714
|
"bash",
|
|
3688
3715
|
"zsh",
|
|
@@ -3692,16 +3719,16 @@ function rr(e) {
|
|
|
3692
3719
|
"tcsh",
|
|
3693
3720
|
"dash",
|
|
3694
3721
|
"scsh"
|
|
3695
|
-
],
|
|
3696
|
-
binary: `(${
|
|
3722
|
+
], f = e.SHEBANG({
|
|
3723
|
+
binary: `(${c.join("|")})`,
|
|
3697
3724
|
relevance: 10
|
|
3698
|
-
}),
|
|
3725
|
+
}), g = {
|
|
3699
3726
|
className: "function",
|
|
3700
3727
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3701
3728
|
returnBegin: !0,
|
|
3702
3729
|
contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
|
|
3703
3730
|
relevance: 0
|
|
3704
|
-
},
|
|
3731
|
+
}, d = [
|
|
3705
3732
|
"if",
|
|
3706
3733
|
"then",
|
|
3707
3734
|
"else",
|
|
@@ -3709,16 +3736,18 @@ function rr(e) {
|
|
|
3709
3736
|
"fi",
|
|
3710
3737
|
"for",
|
|
3711
3738
|
"while",
|
|
3739
|
+
"until",
|
|
3712
3740
|
"in",
|
|
3713
3741
|
"do",
|
|
3714
3742
|
"done",
|
|
3715
3743
|
"case",
|
|
3716
3744
|
"esac",
|
|
3717
|
-
"function"
|
|
3718
|
-
|
|
3745
|
+
"function",
|
|
3746
|
+
"select"
|
|
3747
|
+
], p = [
|
|
3719
3748
|
"true",
|
|
3720
3749
|
"false"
|
|
3721
|
-
],
|
|
3750
|
+
], _ = { match: /(\/[a-z._-]+)+/ }, E = [
|
|
3722
3751
|
"break",
|
|
3723
3752
|
"cd",
|
|
3724
3753
|
"continue",
|
|
@@ -3737,7 +3766,7 @@ function rr(e) {
|
|
|
3737
3766
|
"trap",
|
|
3738
3767
|
"umask",
|
|
3739
3768
|
"unset"
|
|
3740
|
-
],
|
|
3769
|
+
], b = [
|
|
3741
3770
|
"alias",
|
|
3742
3771
|
"bind",
|
|
3743
3772
|
"builtin",
|
|
@@ -3759,7 +3788,7 @@ function rr(e) {
|
|
|
3759
3788
|
"typeset",
|
|
3760
3789
|
"ulimit",
|
|
3761
3790
|
"unalias"
|
|
3762
|
-
],
|
|
3791
|
+
], y = [
|
|
3763
3792
|
"autoload",
|
|
3764
3793
|
"bg",
|
|
3765
3794
|
"bindkey",
|
|
@@ -3828,7 +3857,7 @@ function rr(e) {
|
|
|
3828
3857
|
"zsocket",
|
|
3829
3858
|
"zstyle",
|
|
3830
3859
|
"ztcp"
|
|
3831
|
-
],
|
|
3860
|
+
], A = [
|
|
3832
3861
|
"chcon",
|
|
3833
3862
|
"chgrp",
|
|
3834
3863
|
"chown",
|
|
@@ -3938,36 +3967,37 @@ function rr(e) {
|
|
|
3938
3967
|
aliases: ["sh"],
|
|
3939
3968
|
keywords: {
|
|
3940
3969
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
3941
|
-
keyword:
|
|
3942
|
-
literal:
|
|
3970
|
+
keyword: d,
|
|
3971
|
+
literal: p,
|
|
3943
3972
|
built_in: [
|
|
3944
|
-
...
|
|
3945
|
-
...
|
|
3973
|
+
...E,
|
|
3974
|
+
...b,
|
|
3946
3975
|
// Shell modifiers
|
|
3947
3976
|
"set",
|
|
3948
3977
|
"shopt",
|
|
3949
|
-
...
|
|
3950
|
-
...
|
|
3978
|
+
...y,
|
|
3979
|
+
...A
|
|
3951
3980
|
]
|
|
3952
3981
|
},
|
|
3953
3982
|
contains: [
|
|
3954
|
-
|
|
3983
|
+
f,
|
|
3955
3984
|
// to catch known shells and boost relevancy
|
|
3956
3985
|
e.SHEBANG(),
|
|
3957
3986
|
// to catch unknown shells but still highlight the shebang
|
|
3958
|
-
|
|
3959
|
-
|
|
3987
|
+
g,
|
|
3988
|
+
l,
|
|
3960
3989
|
e.HASH_COMMENT_MODE,
|
|
3961
3990
|
t,
|
|
3962
|
-
|
|
3991
|
+
_,
|
|
3963
3992
|
r,
|
|
3964
3993
|
i,
|
|
3965
3994
|
s,
|
|
3995
|
+
o,
|
|
3966
3996
|
a
|
|
3967
3997
|
]
|
|
3968
3998
|
};
|
|
3969
3999
|
}
|
|
3970
|
-
function
|
|
4000
|
+
function sr(e) {
|
|
3971
4001
|
const n = e.regex, a = e.COMMENT("--", "$"), u = {
|
|
3972
4002
|
className: "string",
|
|
3973
4003
|
variants: [
|
|
@@ -4519,24 +4549,24 @@ function ir(e) {
|
|
|
4519
4549
|
], g = l, d = [
|
|
4520
4550
|
...o,
|
|
4521
4551
|
...s
|
|
4522
|
-
].filter((
|
|
4552
|
+
].filter((y) => !l.includes(y)), p = {
|
|
4523
4553
|
className: "variable",
|
|
4524
|
-
begin: /@[a-z0-9]
|
|
4554
|
+
begin: /@[a-z0-9][a-z0-9_]*/
|
|
4525
4555
|
}, _ = {
|
|
4526
4556
|
className: "operator",
|
|
4527
4557
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
4528
4558
|
relevance: 0
|
|
4529
|
-
},
|
|
4559
|
+
}, E = {
|
|
4530
4560
|
begin: n.concat(/\b/, n.either(...g), /\s*\(/),
|
|
4531
4561
|
relevance: 0,
|
|
4532
4562
|
keywords: { built_in: g }
|
|
4533
4563
|
};
|
|
4534
|
-
function
|
|
4535
|
-
exceptions:
|
|
4536
|
-
when:
|
|
4564
|
+
function b(y, {
|
|
4565
|
+
exceptions: A,
|
|
4566
|
+
when: R
|
|
4537
4567
|
} = {}) {
|
|
4538
|
-
const
|
|
4539
|
-
return
|
|
4568
|
+
const w = R;
|
|
4569
|
+
return A = A || [], y.map((D) => D.match(/\|\d+$/) || A.includes(D) ? D : w(D) ? `${D}|0` : D);
|
|
4540
4570
|
}
|
|
4541
4571
|
return {
|
|
4542
4572
|
name: "SQL",
|
|
@@ -4545,7 +4575,7 @@ function ir(e) {
|
|
|
4545
4575
|
illegal: /[{}]|<\//,
|
|
4546
4576
|
keywords: {
|
|
4547
4577
|
$pattern: /\b[\w\.]+/,
|
|
4548
|
-
keyword:
|
|
4578
|
+
keyword: b(d, { when: (y) => y.length < 3 }),
|
|
4549
4579
|
literal: t,
|
|
4550
4580
|
type: i,
|
|
4551
4581
|
built_in: c
|
|
@@ -4565,7 +4595,7 @@ function ir(e) {
|
|
|
4565
4595
|
className: "type",
|
|
4566
4596
|
begin: n.either(...r)
|
|
4567
4597
|
},
|
|
4568
|
-
|
|
4598
|
+
E,
|
|
4569
4599
|
p,
|
|
4570
4600
|
u,
|
|
4571
4601
|
h,
|
|
@@ -4576,44 +4606,44 @@ function ir(e) {
|
|
|
4576
4606
|
]
|
|
4577
4607
|
};
|
|
4578
4608
|
}
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
var
|
|
4589
|
-
const
|
|
4590
|
-
function
|
|
4591
|
-
return e === void 0 ?
|
|
4609
|
+
Z.registerLanguage("xml", qt);
|
|
4610
|
+
Z.registerLanguage("javascript", jt);
|
|
4611
|
+
Z.registerLanguage("json", Jt);
|
|
4612
|
+
Z.registerLanguage("yaml", er);
|
|
4613
|
+
Z.registerLanguage("plaintext", nr);
|
|
4614
|
+
Z.registerLanguage("python", tr);
|
|
4615
|
+
Z.registerLanguage("java", rr);
|
|
4616
|
+
Z.registerLanguage("bash", ir);
|
|
4617
|
+
Z.registerLanguage("sql", sr);
|
|
4618
|
+
var S = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(S || {});
|
|
4619
|
+
const J = "<code-diff-modified>", ee = "</code-diff-modified>", ar = J.replace("<", "<").replace(">", ">"), or = ee.replace("<", "<").replace(">", ">");
|
|
4620
|
+
function fe(e) {
|
|
4621
|
+
return e === void 0 ? S.EQUAL : e.added ? S.ADD : e.removed ? S.DELETE : S.EQUAL;
|
|
4592
4622
|
}
|
|
4593
|
-
function
|
|
4594
|
-
return typeof e == "undefined" ? n : typeof n == "undefined" ? e : (a === "char" ?
|
|
4595
|
-
(h) =>
|
|
4623
|
+
function De(e, n, a = "word") {
|
|
4624
|
+
return typeof e == "undefined" ? n : typeof n == "undefined" ? e : (a === "char" ? qn : Yn)(e, n).filter((h) => fe(h) !== S.DELETE).map(
|
|
4625
|
+
(h) => fe(h) === S.ADD ? `${J}${h.value}${ee}` : h.value
|
|
4596
4626
|
).join("");
|
|
4597
4627
|
}
|
|
4598
|
-
function
|
|
4599
|
-
const a = new
|
|
4628
|
+
function Ln(e, n) {
|
|
4629
|
+
const a = new Ie.diff_match_patch(), u = a.diff_linesToChars_(e, n), h = u.chars1, t = u.chars2, r = u.lineArray, i = a.diff_main(h, t, !1);
|
|
4600
4630
|
return a.diff_charsToLines_(i, r), i.map((s) => {
|
|
4601
4631
|
const [o, l] = s;
|
|
4602
4632
|
return {
|
|
4603
4633
|
count: l.replace(/\n$/, "").split(`
|
|
4604
4634
|
`).length,
|
|
4605
4635
|
value: l,
|
|
4606
|
-
removed: o ===
|
|
4607
|
-
added: o ===
|
|
4636
|
+
removed: o === Ie.DIFF_DELETE,
|
|
4637
|
+
added: o === Ie.DIFF_INSERT
|
|
4608
4638
|
};
|
|
4609
4639
|
});
|
|
4610
4640
|
}
|
|
4611
|
-
function
|
|
4612
|
-
if (!n.match(new RegExp(`(${
|
|
4613
|
-
return
|
|
4641
|
+
function q(e, n) {
|
|
4642
|
+
if (!n.match(new RegExp(`(${J}|${ee})`, "g")))
|
|
4643
|
+
return Z.highlight(n, { language: e }).value;
|
|
4614
4644
|
let u = n;
|
|
4615
|
-
const h = n.replace(new RegExp(`(${
|
|
4616
|
-
t.innerHTML =
|
|
4645
|
+
const h = n.replace(new RegExp(`(${J}|${ee})`, "g"), ""), t = document.createElement("div");
|
|
4646
|
+
t.innerHTML = Z.highlight(h, { language: e }).value;
|
|
4617
4647
|
let r = !1;
|
|
4618
4648
|
const i = (s) => {
|
|
4619
4649
|
s.childNodes.forEach((o) => {
|
|
@@ -4621,239 +4651,264 @@ function Z(e, n) {
|
|
|
4621
4651
|
if (!o.textContent)
|
|
4622
4652
|
return;
|
|
4623
4653
|
let l = o.textContent, c = "";
|
|
4624
|
-
for (r && (c = c +
|
|
4625
|
-
if (u.startsWith(
|
|
4626
|
-
u = u.slice(
|
|
4654
|
+
for (r && (c = c + J); l.length; ) {
|
|
4655
|
+
if (u.startsWith(J)) {
|
|
4656
|
+
u = u.slice(J.length), c = c + J, r = !0;
|
|
4627
4657
|
continue;
|
|
4628
4658
|
}
|
|
4629
|
-
if (u.startsWith(
|
|
4630
|
-
u = u.slice(
|
|
4659
|
+
if (u.startsWith(ee)) {
|
|
4660
|
+
u = u.slice(ee.length), c = c + ee, r = !1;
|
|
4631
4661
|
continue;
|
|
4632
4662
|
}
|
|
4633
|
-
const f = u.match(new RegExp(`(${
|
|
4663
|
+
const f = u.match(new RegExp(`(${J}|${ee})`)), g = f && f.index ? f.index : u.length, d = Math.min(g, l.length);
|
|
4634
4664
|
c = c + u.substring(0, d), u = u.slice(d), l = l.slice(d);
|
|
4635
4665
|
}
|
|
4636
|
-
r && (c = c +
|
|
4666
|
+
r && (c = c + ee), o.textContent = c;
|
|
4637
4667
|
}
|
|
4638
4668
|
});
|
|
4639
4669
|
};
|
|
4640
|
-
return i(t), t.innerHTML.replace(new RegExp(
|
|
4670
|
+
return i(t), t.innerHTML.replace(new RegExp(ar, "g"), '<span class="x">').replace(new RegExp(or, "g"), "</span>");
|
|
4641
4671
|
}
|
|
4642
|
-
function On(e) {
|
|
4643
|
-
const
|
|
4644
|
-
let
|
|
4645
|
-
for (const
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
`)
|
|
4649
|
-
|
|
4672
|
+
function On(e, n) {
|
|
4673
|
+
const a = (s, o) => (s.match(new RegExp(o, "g")) || []).length, u = (s) => s.filter((o) => n == null ? void 0 : n.test(o)).length;
|
|
4674
|
+
let h = 0, t = 0, r = 0, i = 0;
|
|
4675
|
+
for (const s of e) {
|
|
4676
|
+
if (s.added) {
|
|
4677
|
+
const o = u(s.value.trim().split(`
|
|
4678
|
+
`));
|
|
4679
|
+
h += a(s.value.trim(), `
|
|
4680
|
+
`) + 1 - o, r += o;
|
|
4681
|
+
continue;
|
|
4682
|
+
}
|
|
4683
|
+
if (s.removed) {
|
|
4684
|
+
const o = u(s.value.trim().split(`
|
|
4685
|
+
`));
|
|
4686
|
+
t += a(s.value.trim(), `
|
|
4687
|
+
`) + 1 - o, i += o;
|
|
4688
|
+
continue;
|
|
4689
|
+
}
|
|
4690
|
+
}
|
|
4691
|
+
return {
|
|
4692
|
+
additionsNum: h,
|
|
4693
|
+
deletionsNum: t,
|
|
4694
|
+
ignoreAdditionsNum: r,
|
|
4695
|
+
ignoreDeletionsNum: i
|
|
4696
|
+
};
|
|
4650
4697
|
}
|
|
4651
|
-
function
|
|
4652
|
-
const
|
|
4653
|
-
let
|
|
4654
|
-
const
|
|
4655
|
-
changes:
|
|
4698
|
+
function lr(e, n, a = "plaintext", u = "word", h = 10, t) {
|
|
4699
|
+
const r = () => ({ type: S.EMPTY }), i = (E, b, y) => ({ type: E, num: b, code: y }), s = Ln(e, n), o = t ? new RegExp(t) : void 0;
|
|
4700
|
+
let l = 0, c = 0, f = !1;
|
|
4701
|
+
const g = [], d = {
|
|
4702
|
+
changes: g,
|
|
4656
4703
|
collector: [],
|
|
4657
|
-
stat: On(
|
|
4704
|
+
stat: On(s, o)
|
|
4658
4705
|
};
|
|
4659
|
-
for (let
|
|
4660
|
-
if (
|
|
4661
|
-
|
|
4706
|
+
for (let E = 0; E < s.length; E++) {
|
|
4707
|
+
if (f) {
|
|
4708
|
+
f = !1;
|
|
4662
4709
|
continue;
|
|
4663
4710
|
}
|
|
4664
|
-
const [
|
|
4711
|
+
const [b, y] = [s[E], s[E + 1]], [A, R] = [fe(b), fe(y)], w = b.value.replace(/\n$/, "").split(`
|
|
4665
4712
|
`);
|
|
4666
|
-
if (
|
|
4667
|
-
for (const
|
|
4668
|
-
let
|
|
4669
|
-
const
|
|
4670
|
-
|
|
4713
|
+
if (y === void 0) {
|
|
4714
|
+
for (const C of w) {
|
|
4715
|
+
let T = r(), $ = r();
|
|
4716
|
+
const k = q(a, C);
|
|
4717
|
+
A === S.EQUAL && (l++, c++, T = i(S.EQUAL, l, k), $ = i(S.EQUAL, c, k)), A === S.DELETE && (l++, T = i(S.DELETE, l, k), $ = r()), A === S.ADD && (c++, T = r(), $ = i(S.ADD, c, k)), g.push({ left: T, right: $ });
|
|
4671
4718
|
}
|
|
4672
4719
|
break;
|
|
4673
4720
|
}
|
|
4674
|
-
if (
|
|
4675
|
-
for (const
|
|
4676
|
-
|
|
4677
|
-
const
|
|
4678
|
-
|
|
4679
|
-
left:
|
|
4680
|
-
right:
|
|
4721
|
+
if (A === S.EQUAL)
|
|
4722
|
+
for (const C of w) {
|
|
4723
|
+
l++, c++;
|
|
4724
|
+
const T = q(a, C);
|
|
4725
|
+
g.push({
|
|
4726
|
+
left: i(S.EQUAL, l, T),
|
|
4727
|
+
right: i(S.EQUAL, c, T)
|
|
4681
4728
|
});
|
|
4682
4729
|
}
|
|
4683
|
-
const
|
|
4730
|
+
const D = y.value.replace(/\n$/, "").split(`
|
|
4684
4731
|
`);
|
|
4685
|
-
if (
|
|
4686
|
-
if (
|
|
4687
|
-
for (const
|
|
4688
|
-
|
|
4689
|
-
left:
|
|
4690
|
-
right:
|
|
4732
|
+
if (A === S.DELETE) {
|
|
4733
|
+
if (R === S.EQUAL)
|
|
4734
|
+
for (const C of w)
|
|
4735
|
+
l++, g.push({
|
|
4736
|
+
left: i(S.DELETE, l, q(a, C)),
|
|
4737
|
+
right: r()
|
|
4691
4738
|
});
|
|
4692
|
-
if (
|
|
4693
|
-
|
|
4694
|
-
const
|
|
4695
|
-
for (let
|
|
4696
|
-
|
|
4697
|
-
const [
|
|
4698
|
-
|
|
4739
|
+
if (R === S.ADD) {
|
|
4740
|
+
f = !0;
|
|
4741
|
+
const C = Math.max(b.count, y.count);
|
|
4742
|
+
for (let T = 0; T < C; T++) {
|
|
4743
|
+
T < b.count && l++, T < y.count && c++;
|
|
4744
|
+
const [$, k] = [w[T], D[T]], P = w.length === D.length ? De(k, $, u) : $, F = w.length === D.length ? De($, k, u) : k, K = o != null && o.test($) ? S.EQUAL : S.DELETE, te = o != null && o.test(k) ? S.EQUAL : S.ADD, oe = T < b.count ? i(K, l, q(a, P)) : r(), v = T < y.count ? i(te, c, q(a, F)) : r();
|
|
4745
|
+
g.push({ left: oe, right: v });
|
|
4699
4746
|
}
|
|
4700
4747
|
}
|
|
4701
4748
|
}
|
|
4702
|
-
if (
|
|
4703
|
-
for (const
|
|
4704
|
-
|
|
4705
|
-
left:
|
|
4706
|
-
right:
|
|
4749
|
+
if (A === S.ADD)
|
|
4750
|
+
for (const C of w)
|
|
4751
|
+
c++, g.push({
|
|
4752
|
+
left: r(),
|
|
4753
|
+
right: i(S.ADD, c, q(a, C))
|
|
4707
4754
|
});
|
|
4708
4755
|
}
|
|
4709
4756
|
if (e === n) {
|
|
4710
|
-
for (let
|
|
4711
|
-
|
|
4712
|
-
return
|
|
4757
|
+
for (let E = 0; E < g.length; E++)
|
|
4758
|
+
g[E].fold = !1;
|
|
4759
|
+
return d;
|
|
4713
4760
|
}
|
|
4714
|
-
for (let
|
|
4715
|
-
const
|
|
4716
|
-
if (
|
|
4717
|
-
const [
|
|
4718
|
-
for (let
|
|
4719
|
-
|
|
4761
|
+
for (let E = 0; E < g.length; E++) {
|
|
4762
|
+
const b = g[E];
|
|
4763
|
+
if (b.left.type === S.DELETE || b.right.type === S.ADD) {
|
|
4764
|
+
const [y, A] = [Math.max(E - h, 0), Math.min(E + h + 1, g.length)];
|
|
4765
|
+
for (let R = y; R < A; R++)
|
|
4766
|
+
g[R].fold = !1;
|
|
4720
4767
|
}
|
|
4721
|
-
|
|
4768
|
+
b.fold === void 0 && (b.fold = !0);
|
|
4722
4769
|
}
|
|
4723
|
-
const
|
|
4724
|
-
let
|
|
4725
|
-
for (let
|
|
4726
|
-
const
|
|
4727
|
-
if (
|
|
4728
|
-
|
|
4729
|
-
lines:
|
|
4770
|
+
const p = [];
|
|
4771
|
+
let _ = [];
|
|
4772
|
+
for (let E = 0; E < g.length; E++) {
|
|
4773
|
+
const b = g[E];
|
|
4774
|
+
if (b.fold === !1) {
|
|
4775
|
+
_.length && (_[0].hideIndex = d.collector.length, d.collector.push({
|
|
4776
|
+
lines: _,
|
|
4730
4777
|
fold: !0
|
|
4731
|
-
}),
|
|
4778
|
+
}), _ = []), p.push(b);
|
|
4732
4779
|
continue;
|
|
4733
4780
|
}
|
|
4734
|
-
|
|
4781
|
+
b.hide = !0, _.push(b), p.push(b);
|
|
4735
4782
|
}
|
|
4736
|
-
return
|
|
4737
|
-
lines:
|
|
4783
|
+
return _.length && (_[0].hideIndex = d.collector.length, d.collector.push({
|
|
4784
|
+
lines: _,
|
|
4738
4785
|
fold: !0
|
|
4739
|
-
}),
|
|
4786
|
+
}), _ = []), d.changes = p, d;
|
|
4740
4787
|
}
|
|
4741
|
-
function
|
|
4742
|
-
const
|
|
4743
|
-
let
|
|
4744
|
-
const
|
|
4745
|
-
changes:
|
|
4788
|
+
function cr(e, n, a = "plaintext", u = "word", h = 10, t) {
|
|
4789
|
+
const r = Ln(e, n), i = t ? new RegExp(t) : void 0;
|
|
4790
|
+
let s = 0, o = 0, l = !1;
|
|
4791
|
+
const c = [], f = {
|
|
4792
|
+
changes: c,
|
|
4746
4793
|
collector: [],
|
|
4747
|
-
stat: On(
|
|
4794
|
+
stat: On(r, i)
|
|
4748
4795
|
};
|
|
4749
|
-
for (let
|
|
4750
|
-
if (
|
|
4751
|
-
|
|
4796
|
+
for (let p = 0; p < r.length; p++) {
|
|
4797
|
+
if (l) {
|
|
4798
|
+
l = !1;
|
|
4752
4799
|
continue;
|
|
4753
4800
|
}
|
|
4754
|
-
const [
|
|
4801
|
+
const [_, E] = [r[p], r[p + 1]], [b, y] = [fe(_), fe(E)], A = _.value.replace(/\n$/, "").split(`
|
|
4755
4802
|
`);
|
|
4756
|
-
if (
|
|
4757
|
-
for (const
|
|
4758
|
-
|
|
4759
|
-
const
|
|
4760
|
-
|
|
4761
|
-
type:
|
|
4762
|
-
code:
|
|
4763
|
-
addNum:
|
|
4764
|
-
delNum:
|
|
4803
|
+
if (E === void 0) {
|
|
4804
|
+
for (const w of A) {
|
|
4805
|
+
b === S.EQUAL && (s++, o++), b === S.DELETE && s++, b === S.ADD && o++;
|
|
4806
|
+
const D = q(a, w);
|
|
4807
|
+
c.push({
|
|
4808
|
+
type: b,
|
|
4809
|
+
code: D,
|
|
4810
|
+
addNum: b === S.DELETE ? void 0 : o,
|
|
4811
|
+
delNum: b === S.ADD ? void 0 : s
|
|
4765
4812
|
});
|
|
4766
4813
|
}
|
|
4767
4814
|
break;
|
|
4768
4815
|
}
|
|
4769
|
-
if (
|
|
4770
|
-
for (const
|
|
4771
|
-
|
|
4772
|
-
const
|
|
4773
|
-
|
|
4816
|
+
if (b === S.EQUAL)
|
|
4817
|
+
for (const w of A) {
|
|
4818
|
+
s++, o++;
|
|
4819
|
+
const D = q(a, w);
|
|
4820
|
+
c.push({ type: S.EQUAL, code: D, delNum: s, addNum: o });
|
|
4774
4821
|
}
|
|
4775
|
-
const
|
|
4822
|
+
const R = E.value.replace(/\n$/, "").split(`
|
|
4776
4823
|
`);
|
|
4777
|
-
if (
|
|
4778
|
-
if (
|
|
4779
|
-
for (let
|
|
4780
|
-
const
|
|
4781
|
-
|
|
4782
|
-
const
|
|
4783
|
-
|
|
4824
|
+
if (b === S.DELETE)
|
|
4825
|
+
if (y === S.ADD && A.length === R.length) {
|
|
4826
|
+
for (let w = 0; w < A.length; w++) {
|
|
4827
|
+
const D = A[w], C = R[w];
|
|
4828
|
+
s++;
|
|
4829
|
+
const T = q(a, De(C, D, u));
|
|
4830
|
+
c.push({
|
|
4831
|
+
type: i != null && i.test(D) ? S.EQUAL : S.DELETE,
|
|
4832
|
+
code: T,
|
|
4833
|
+
delNum: s
|
|
4834
|
+
});
|
|
4784
4835
|
}
|
|
4785
|
-
for (let
|
|
4786
|
-
const
|
|
4787
|
-
|
|
4788
|
-
const
|
|
4789
|
-
|
|
4836
|
+
for (let w = 0; w < R.length; w++) {
|
|
4837
|
+
const D = A[w], C = R[w];
|
|
4838
|
+
o++;
|
|
4839
|
+
const T = q(a, De(D, C, u));
|
|
4840
|
+
c.push({
|
|
4841
|
+
type: i != null && i.test(C) ? S.EQUAL : S.ADD,
|
|
4842
|
+
code: T,
|
|
4843
|
+
addNum: o
|
|
4844
|
+
});
|
|
4790
4845
|
}
|
|
4791
|
-
|
|
4846
|
+
l = !0;
|
|
4792
4847
|
} else
|
|
4793
|
-
for (const
|
|
4794
|
-
|
|
4795
|
-
const
|
|
4796
|
-
|
|
4848
|
+
for (const w of A) {
|
|
4849
|
+
s++;
|
|
4850
|
+
const D = q(a, w);
|
|
4851
|
+
c.push({ type: S.DELETE, code: D, delNum: s });
|
|
4797
4852
|
}
|
|
4798
|
-
if (
|
|
4799
|
-
for (const
|
|
4800
|
-
|
|
4801
|
-
const
|
|
4802
|
-
|
|
4853
|
+
if (b === S.ADD)
|
|
4854
|
+
for (const w of A) {
|
|
4855
|
+
o++;
|
|
4856
|
+
const D = q(a, w);
|
|
4857
|
+
c.push({ type: S.ADD, code: D, addNum: o });
|
|
4803
4858
|
}
|
|
4804
4859
|
}
|
|
4805
|
-
for (let
|
|
4806
|
-
const
|
|
4807
|
-
if (
|
|
4808
|
-
const [
|
|
4809
|
-
for (let
|
|
4810
|
-
|
|
4860
|
+
for (let p = 0; p < c.length; p++) {
|
|
4861
|
+
const _ = c[p];
|
|
4862
|
+
if (_.type === S.DELETE || _.type === S.ADD) {
|
|
4863
|
+
const [E, b] = [Math.max(p - h, 0), Math.min(p + h + 1, c.length)];
|
|
4864
|
+
for (let y = E; y < b; y++)
|
|
4865
|
+
c[y].fold = !1;
|
|
4811
4866
|
}
|
|
4812
|
-
|
|
4867
|
+
_.fold === void 0 && (_.fold = !0);
|
|
4813
4868
|
}
|
|
4814
4869
|
if (e === n) {
|
|
4815
|
-
for (let
|
|
4816
|
-
|
|
4817
|
-
return
|
|
4870
|
+
for (let p = 0; p < c.length; p++)
|
|
4871
|
+
c[p].fold = !1;
|
|
4872
|
+
return f;
|
|
4818
4873
|
}
|
|
4819
|
-
const
|
|
4820
|
-
let
|
|
4821
|
-
for (let
|
|
4822
|
-
const
|
|
4823
|
-
if (
|
|
4824
|
-
|
|
4825
|
-
lines:
|
|
4874
|
+
const g = [];
|
|
4875
|
+
let d = [];
|
|
4876
|
+
for (let p = 0; p < c.length; p++) {
|
|
4877
|
+
const _ = c[p];
|
|
4878
|
+
if (_.fold === !1) {
|
|
4879
|
+
d.length && (d[0].hideIndex = f.collector.length, f.collector.push({
|
|
4880
|
+
lines: d,
|
|
4826
4881
|
fold: !0
|
|
4827
|
-
}),
|
|
4882
|
+
}), d = []), g.push(_);
|
|
4828
4883
|
continue;
|
|
4829
4884
|
}
|
|
4830
|
-
|
|
4885
|
+
_.type === "equal" && (_.hide = !0, d.push(_)), g.push(_);
|
|
4831
4886
|
}
|
|
4832
|
-
return
|
|
4833
|
-
lines:
|
|
4887
|
+
return d.length && (d[0].hideIndex = f.collector.length, f.collector.push({
|
|
4888
|
+
lines: d,
|
|
4834
4889
|
fold: !0
|
|
4835
|
-
}),
|
|
4890
|
+
}), d = []), f.changes = g, f;
|
|
4836
4891
|
}
|
|
4837
|
-
const
|
|
4838
|
-
|
|
4892
|
+
const Ge = {};
|
|
4893
|
+
Ge.props = {
|
|
4839
4894
|
line: {
|
|
4840
4895
|
key: "line",
|
|
4841
4896
|
required: !0,
|
|
4842
4897
|
type: null
|
|
4843
4898
|
}
|
|
4844
4899
|
};
|
|
4845
|
-
|
|
4900
|
+
Ge.setup = (e, n) => {
|
|
4846
4901
|
const a = n.emit;
|
|
4847
4902
|
function u(h) {
|
|
4848
|
-
return h ===
|
|
4903
|
+
return h === S.DELETE ? "-" : h === S.ADD ? "+" : "";
|
|
4849
4904
|
}
|
|
4850
4905
|
return {
|
|
4851
|
-
DiffType:
|
|
4906
|
+
DiffType: S,
|
|
4852
4907
|
emit: a,
|
|
4853
4908
|
getCodeMarker: u
|
|
4854
4909
|
};
|
|
4855
4910
|
};
|
|
4856
|
-
var
|
|
4911
|
+
var ur = function() {
|
|
4857
4912
|
var e = this, n = e.$createElement, a = e._self._c || n;
|
|
4858
4913
|
return e.line.hideIndex !== void 0 && e.line.hide ? a("tr", [a("td", {
|
|
4859
4914
|
staticClass: "blob-num blob-num-hunk text-center",
|
|
@@ -4903,8 +4958,8 @@ var cr = function() {
|
|
|
4903
4958
|
innerHTML: e._s(e.line.code)
|
|
4904
4959
|
}
|
|
4905
4960
|
})])]);
|
|
4906
|
-
},
|
|
4907
|
-
function
|
|
4961
|
+
}, fr = [];
|
|
4962
|
+
function Ee(e, n, a, u, h, t, r, i) {
|
|
4908
4963
|
var s = typeof e == "function" ? e.options : e;
|
|
4909
4964
|
n && (s.render = n, s.staticRenderFns = a, s._compiled = !0), u && (s.functional = !0), t && (s._scopeId = "data-v-" + t);
|
|
4910
4965
|
var o;
|
|
@@ -4934,31 +4989,31 @@ function be(e, n, a, u, h, t, r, i) {
|
|
|
4934
4989
|
};
|
|
4935
4990
|
}
|
|
4936
4991
|
const ln = {};
|
|
4937
|
-
var
|
|
4938
|
-
|
|
4939
|
-
cr,
|
|
4992
|
+
var gr = /* @__PURE__ */ Ee(
|
|
4993
|
+
Ge,
|
|
4940
4994
|
ur,
|
|
4995
|
+
fr,
|
|
4941
4996
|
!1,
|
|
4942
|
-
|
|
4997
|
+
hr,
|
|
4943
4998
|
null,
|
|
4944
4999
|
null,
|
|
4945
5000
|
null
|
|
4946
5001
|
);
|
|
4947
|
-
function
|
|
5002
|
+
function hr(e) {
|
|
4948
5003
|
for (let n in ln)
|
|
4949
5004
|
this[n] = ln[n];
|
|
4950
5005
|
}
|
|
4951
|
-
const
|
|
4952
|
-
return
|
|
4953
|
-
}(),
|
|
4954
|
-
|
|
5006
|
+
const dr = /* @__PURE__ */ function() {
|
|
5007
|
+
return gr.exports;
|
|
5008
|
+
}(), _e = {};
|
|
5009
|
+
_e.props = {
|
|
4955
5010
|
diffChange: {
|
|
4956
5011
|
key: "diffChange",
|
|
4957
5012
|
required: !0,
|
|
4958
5013
|
type: null
|
|
4959
5014
|
}
|
|
4960
5015
|
};
|
|
4961
|
-
|
|
5016
|
+
_e.setup = (e, n) => {
|
|
4962
5017
|
const a = e;
|
|
4963
5018
|
function u({
|
|
4964
5019
|
hideIndex: h
|
|
@@ -4971,10 +5026,10 @@ de.setup = (e, n) => {
|
|
|
4971
5026
|
expandHandler: u
|
|
4972
5027
|
};
|
|
4973
5028
|
};
|
|
4974
|
-
|
|
4975
|
-
UnifiedLine:
|
|
4976
|
-
},
|
|
4977
|
-
var
|
|
5029
|
+
_e.components = Object.assign({
|
|
5030
|
+
UnifiedLine: dr
|
|
5031
|
+
}, _e.components);
|
|
5032
|
+
var pr = function() {
|
|
4978
5033
|
var e, n = this, a = n.$createElement, u = n._self._c || a;
|
|
4979
5034
|
return u("table", {
|
|
4980
5035
|
staticClass: "diff-table"
|
|
@@ -4989,36 +5044,36 @@ var dr = function() {
|
|
|
4989
5044
|
}
|
|
4990
5045
|
});
|
|
4991
5046
|
}), 1)]);
|
|
4992
|
-
},
|
|
5047
|
+
}, _r = [];
|
|
4993
5048
|
const cn = {};
|
|
4994
|
-
var
|
|
4995
|
-
|
|
4996
|
-
dr,
|
|
5049
|
+
var br = /* @__PURE__ */ Ee(
|
|
5050
|
+
_e,
|
|
4997
5051
|
pr,
|
|
5052
|
+
_r,
|
|
4998
5053
|
!1,
|
|
4999
|
-
|
|
5054
|
+
vr,
|
|
5000
5055
|
null,
|
|
5001
5056
|
null,
|
|
5002
5057
|
null
|
|
5003
5058
|
);
|
|
5004
|
-
function
|
|
5059
|
+
function vr(e) {
|
|
5005
5060
|
for (let n in cn)
|
|
5006
5061
|
this[n] = cn[n];
|
|
5007
5062
|
}
|
|
5008
|
-
const
|
|
5009
|
-
return
|
|
5010
|
-
}(),
|
|
5011
|
-
|
|
5063
|
+
const Er = /* @__PURE__ */ function() {
|
|
5064
|
+
return br.exports;
|
|
5065
|
+
}(), Ke = {};
|
|
5066
|
+
Ke.props = {
|
|
5012
5067
|
splitLine: {
|
|
5013
5068
|
key: "splitLine",
|
|
5014
5069
|
required: !0,
|
|
5015
5070
|
type: null
|
|
5016
5071
|
}
|
|
5017
5072
|
};
|
|
5018
|
-
|
|
5073
|
+
Ke.setup = (e, n) => {
|
|
5019
5074
|
const a = n.emit;
|
|
5020
5075
|
function u(t) {
|
|
5021
|
-
return t ===
|
|
5076
|
+
return t === S.DELETE ? "-" : t === S.ADD ? "+" : "";
|
|
5022
5077
|
}
|
|
5023
5078
|
function h(t) {
|
|
5024
5079
|
window.getSelection().removeAllRanges();
|
|
@@ -5029,13 +5084,13 @@ We.setup = (e, n) => {
|
|
|
5029
5084
|
s.classList.toggle("no-select", t === "right");
|
|
5030
5085
|
}
|
|
5031
5086
|
return {
|
|
5032
|
-
DiffType:
|
|
5087
|
+
DiffType: S,
|
|
5033
5088
|
emit: a,
|
|
5034
5089
|
getCodeMarker: u,
|
|
5035
5090
|
onSplitLineMousedown: h
|
|
5036
5091
|
};
|
|
5037
5092
|
};
|
|
5038
|
-
var
|
|
5093
|
+
var mr = function() {
|
|
5039
5094
|
var e = this, n = e.$createElement, a = e._self._c || n;
|
|
5040
5095
|
return e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? a("tr", [a("td", {
|
|
5041
5096
|
staticClass: "blob-num blob-num-hunk",
|
|
@@ -5091,33 +5146,33 @@ var Er = function() {
|
|
|
5091
5146
|
}
|
|
5092
5147
|
})])]];
|
|
5093
5148
|
})], 2);
|
|
5094
|
-
},
|
|
5149
|
+
}, yr = [];
|
|
5095
5150
|
const un = {};
|
|
5096
|
-
var
|
|
5097
|
-
|
|
5098
|
-
Er,
|
|
5151
|
+
var wr = /* @__PURE__ */ Ee(
|
|
5152
|
+
Ke,
|
|
5099
5153
|
mr,
|
|
5154
|
+
yr,
|
|
5100
5155
|
!1,
|
|
5101
|
-
|
|
5156
|
+
Nr,
|
|
5102
5157
|
null,
|
|
5103
5158
|
null,
|
|
5104
5159
|
null
|
|
5105
5160
|
);
|
|
5106
|
-
function
|
|
5161
|
+
function Nr(e) {
|
|
5107
5162
|
for (let n in un)
|
|
5108
5163
|
this[n] = un[n];
|
|
5109
5164
|
}
|
|
5110
|
-
const
|
|
5111
|
-
return
|
|
5112
|
-
}(),
|
|
5113
|
-
|
|
5165
|
+
const Ar = /* @__PURE__ */ function() {
|
|
5166
|
+
return wr.exports;
|
|
5167
|
+
}(), be = {};
|
|
5168
|
+
be.props = {
|
|
5114
5169
|
diffChange: {
|
|
5115
5170
|
key: "diffChange",
|
|
5116
5171
|
required: !0,
|
|
5117
5172
|
type: null
|
|
5118
5173
|
}
|
|
5119
5174
|
};
|
|
5120
|
-
|
|
5175
|
+
be.setup = (e, n) => {
|
|
5121
5176
|
const a = e;
|
|
5122
5177
|
function u({
|
|
5123
5178
|
hideIndex: h
|
|
@@ -5130,9 +5185,9 @@ pe.setup = (e, n) => {
|
|
|
5130
5185
|
expandHandler: u
|
|
5131
5186
|
};
|
|
5132
5187
|
};
|
|
5133
|
-
|
|
5134
|
-
SplitLine:
|
|
5135
|
-
},
|
|
5188
|
+
be.components = Object.assign({
|
|
5189
|
+
SplitLine: Ar
|
|
5190
|
+
}, be.components);
|
|
5136
5191
|
var Mr = function() {
|
|
5137
5192
|
var e, n = this, a = n.$createElement, u = n._self._c || a;
|
|
5138
5193
|
return u("table", {
|
|
@@ -5148,7 +5203,7 @@ var Mr = function() {
|
|
|
5148
5203
|
}
|
|
5149
5204
|
});
|
|
5150
5205
|
}), 1)]);
|
|
5151
|
-
},
|
|
5206
|
+
}, Tr = [function() {
|
|
5152
5207
|
var e = this, n = e.$createElement, a = e._self._c || n;
|
|
5153
5208
|
return a("colgroup", [a("col", {
|
|
5154
5209
|
attrs: {
|
|
@@ -5161,25 +5216,25 @@ var Mr = function() {
|
|
|
5161
5216
|
}), a("col")]);
|
|
5162
5217
|
}];
|
|
5163
5218
|
const fn = {};
|
|
5164
|
-
var
|
|
5165
|
-
|
|
5219
|
+
var Sr = /* @__PURE__ */ Ee(
|
|
5220
|
+
be,
|
|
5166
5221
|
Mr,
|
|
5167
|
-
|
|
5222
|
+
Tr,
|
|
5168
5223
|
!1,
|
|
5169
|
-
|
|
5224
|
+
Dr,
|
|
5170
5225
|
null,
|
|
5171
5226
|
null,
|
|
5172
5227
|
null
|
|
5173
5228
|
);
|
|
5174
|
-
function
|
|
5229
|
+
function Dr(e) {
|
|
5175
5230
|
for (let n in fn)
|
|
5176
5231
|
this[n] = fn[n];
|
|
5177
5232
|
}
|
|
5178
|
-
const
|
|
5179
|
-
return
|
|
5233
|
+
const Rr = /* @__PURE__ */ function() {
|
|
5234
|
+
return Sr.exports;
|
|
5180
5235
|
}();
|
|
5181
|
-
const
|
|
5182
|
-
|
|
5236
|
+
const ve = {};
|
|
5237
|
+
ve.props = {
|
|
5183
5238
|
newString: {
|
|
5184
5239
|
key: "newString",
|
|
5185
5240
|
required: !0,
|
|
@@ -5238,6 +5293,12 @@ _e.props = {
|
|
|
5238
5293
|
type: String,
|
|
5239
5294
|
default: void 0
|
|
5240
5295
|
},
|
|
5296
|
+
newFilename: {
|
|
5297
|
+
key: "newFilename",
|
|
5298
|
+
required: !1,
|
|
5299
|
+
type: String,
|
|
5300
|
+
default: void 0
|
|
5301
|
+
},
|
|
5241
5302
|
hideHeader: {
|
|
5242
5303
|
key: "hideHeader",
|
|
5243
5304
|
required: !1,
|
|
@@ -5249,19 +5310,31 @@ _e.props = {
|
|
|
5249
5310
|
required: !1,
|
|
5250
5311
|
type: Boolean,
|
|
5251
5312
|
default: !1
|
|
5313
|
+
},
|
|
5314
|
+
theme: {
|
|
5315
|
+
key: "theme",
|
|
5316
|
+
required: !1,
|
|
5317
|
+
type: String,
|
|
5318
|
+
default: "light"
|
|
5319
|
+
},
|
|
5320
|
+
ignoreMatchingLines: {
|
|
5321
|
+
key: "ignoreMatchingLines",
|
|
5322
|
+
required: !1,
|
|
5323
|
+
type: String,
|
|
5324
|
+
default: void 0
|
|
5252
5325
|
}
|
|
5253
5326
|
};
|
|
5254
|
-
|
|
5255
|
-
const a = e, u = n.emit, h =
|
|
5327
|
+
ve.setup = (e, n) => {
|
|
5328
|
+
const a = e, u = n.emit, h = ge(() => a.outputFormat === "line-by-line"), t = ge(() => {
|
|
5256
5329
|
let l = a.oldString || "";
|
|
5257
5330
|
return l = a.trim ? l.trim() : l, l = a.noDiffLineFeed ? l.replace(/(\r\n)/g, `
|
|
5258
5331
|
`) : l, l;
|
|
5259
|
-
}), r =
|
|
5332
|
+
}), r = ge(() => {
|
|
5260
5333
|
let l = a.newString || "";
|
|
5261
5334
|
return l = a.trim ? l.trim() : l, l = a.noDiffLineFeed ? l.replace(/(\r\n)/g, `
|
|
5262
5335
|
`) : l, l;
|
|
5263
|
-
}), i =
|
|
5264
|
-
return
|
|
5336
|
+
}), i = ge(() => h.value ? cr(t.value, r.value, a.language, a.diffStyle, a.context, a.ignoreMatchingLines) : lr(t.value, r.value, a.language, a.diffStyle, a.context, a.ignoreMatchingLines)), s = Fn(i.value), o = ge(() => s.value.stat.additionsNum === 0 && s.value.stat.deletionsNum === 0);
|
|
5337
|
+
return zn(() => a, () => {
|
|
5265
5338
|
s.value = i.value, u("diff", {
|
|
5266
5339
|
stat: {
|
|
5267
5340
|
isChanged: !o.value,
|
|
@@ -5277,33 +5350,59 @@ _e.setup = (e, n) => {
|
|
|
5277
5350
|
diffChange: s
|
|
5278
5351
|
};
|
|
5279
5352
|
};
|
|
5280
|
-
|
|
5281
|
-
UnifiedViewer:
|
|
5282
|
-
SplitViewer:
|
|
5283
|
-
},
|
|
5284
|
-
var
|
|
5353
|
+
ve.components = Object.assign({
|
|
5354
|
+
UnifiedViewer: Er,
|
|
5355
|
+
SplitViewer: Rr
|
|
5356
|
+
}, ve.components);
|
|
5357
|
+
var Cr = function() {
|
|
5285
5358
|
var e = this, n = e.$createElement, a = e._self._c || n;
|
|
5286
5359
|
return a("div", {
|
|
5287
5360
|
staticClass: "code-diff-view",
|
|
5288
5361
|
style: {
|
|
5289
5362
|
maxHeight: e.maxHeight
|
|
5363
|
+
},
|
|
5364
|
+
attrs: {
|
|
5365
|
+
theme: e.theme
|
|
5290
5366
|
}
|
|
5291
5367
|
}, [e.hideHeader ? e._e() : a("div", {
|
|
5292
5368
|
staticClass: "file-header"
|
|
5293
|
-
}, [a("div", {
|
|
5369
|
+
}, [e.isUnifiedViewer ? a("div", {
|
|
5294
5370
|
staticClass: "file-info"
|
|
5295
|
-
}, [a("span", {
|
|
5296
|
-
staticClass: "
|
|
5297
|
-
}, [e._v(e._s(e.filename))]),
|
|
5371
|
+
}, [a("span", [a("div", {
|
|
5372
|
+
staticClass: "info-left"
|
|
5373
|
+
}, [e._v(e._s(e.filename))]), a("div", {
|
|
5374
|
+
staticClass: "info-left"
|
|
5375
|
+
}, [e._v(e._s(e.newFilename))])]), e.hideStat ? e._e() : a("span", {
|
|
5298
5376
|
staticClass: "diff-stat"
|
|
5377
|
+
}, [e._t("stat", function() {
|
|
5378
|
+
return [a("span", {
|
|
5379
|
+
staticClass: "diff-stat-added"
|
|
5380
|
+
}, [e._v("+" + e._s(e.diffChange.stat.additionsNum) + " additions")]), a("span", {
|
|
5381
|
+
staticClass: "diff-stat-deleted"
|
|
5382
|
+
}, [e._v("-" + e._s(e.diffChange.stat.deletionsNum) + " deletions")])];
|
|
5383
|
+
}, {
|
|
5384
|
+
stat: e.diffChange.stat
|
|
5385
|
+
})], 2)]) : a("div", {
|
|
5386
|
+
staticClass: "file-info"
|
|
5387
|
+
}, [a("span", {
|
|
5388
|
+
staticClass: "info-left"
|
|
5389
|
+
}, [e._v(e._s(e.filename))]), a("span", {
|
|
5390
|
+
staticClass: "info-right"
|
|
5299
5391
|
}, [a("span", {
|
|
5300
|
-
staticClass: "diff-stat-added"
|
|
5301
|
-
}, [e._v("+" + e._s(e.diffChange.stat.additionsNum) + " additions")]), a("span", {
|
|
5302
|
-
staticClass: "diff-stat-deleted",
|
|
5303
5392
|
staticStyle: {
|
|
5304
|
-
"margin-left": "
|
|
5393
|
+
"margin-left": "20px"
|
|
5305
5394
|
}
|
|
5306
|
-
}, [e._v(
|
|
5395
|
+
}, [e._v(e._s(e.newFilename))]), e.hideStat ? e._e() : a("span", {
|
|
5396
|
+
staticClass: "diff-stat"
|
|
5397
|
+
}, [e._t("stat", function() {
|
|
5398
|
+
return [a("span", {
|
|
5399
|
+
staticClass: "diff-stat-added"
|
|
5400
|
+
}, [e._v("+" + e._s(e.diffChange.stat.additionsNum) + " additions")]), a("span", {
|
|
5401
|
+
staticClass: "diff-stat-deleted"
|
|
5402
|
+
}, [e._v("-" + e._s(e.diffChange.stat.deletionsNum) + " deletions")])];
|
|
5403
|
+
}, {
|
|
5404
|
+
stat: e.diffChange.stat
|
|
5405
|
+
})], 2)])])]), e.isUnifiedViewer ? a("UnifiedViewer", {
|
|
5307
5406
|
attrs: {
|
|
5308
5407
|
"diff-change": e.diffChange
|
|
5309
5408
|
}
|
|
@@ -5312,33 +5411,33 @@ var Rr = function() {
|
|
|
5312
5411
|
"diff-change": e.diffChange
|
|
5313
5412
|
}
|
|
5314
5413
|
})], 1);
|
|
5315
|
-
},
|
|
5414
|
+
}, Lr = [];
|
|
5316
5415
|
const gn = {};
|
|
5317
|
-
var
|
|
5318
|
-
|
|
5319
|
-
Rr,
|
|
5320
|
-
Or,
|
|
5321
|
-
!1,
|
|
5416
|
+
var Or = /* @__PURE__ */ Ee(
|
|
5417
|
+
ve,
|
|
5322
5418
|
Cr,
|
|
5419
|
+
Lr,
|
|
5420
|
+
!1,
|
|
5421
|
+
Ir,
|
|
5323
5422
|
null,
|
|
5324
5423
|
null,
|
|
5325
5424
|
null
|
|
5326
5425
|
);
|
|
5327
|
-
function
|
|
5426
|
+
function Ir(e) {
|
|
5328
5427
|
for (let n in gn)
|
|
5329
5428
|
this[n] = gn[n];
|
|
5330
5429
|
}
|
|
5331
|
-
const
|
|
5332
|
-
return
|
|
5430
|
+
const kr = /* @__PURE__ */ function() {
|
|
5431
|
+
return Or.exports;
|
|
5333
5432
|
}();
|
|
5334
|
-
function
|
|
5335
|
-
e.component("CodeDiff",
|
|
5433
|
+
function Br(e) {
|
|
5434
|
+
e.component("CodeDiff", kr);
|
|
5336
5435
|
}
|
|
5337
|
-
const
|
|
5338
|
-
install:
|
|
5339
|
-
hljs:
|
|
5436
|
+
const Pr = {
|
|
5437
|
+
install: Br,
|
|
5438
|
+
hljs: Z
|
|
5340
5439
|
};
|
|
5341
5440
|
export {
|
|
5342
|
-
|
|
5343
|
-
|
|
5441
|
+
kr as CodeDiff,
|
|
5442
|
+
Pr as default
|
|
5344
5443
|
};
|