v-code-diff 1.1.0 → 1.2.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 +9 -5
- package/dist/v2/index.cjs.js +11 -9
- package/dist/v2/index.es.js +925 -889
- package/dist/v2.7/index.cjs.js +11 -9
- package/dist/v2.7/index.es.js +897 -881
- package/dist/v3/index.cjs.js +11 -9
- package/dist/v3/index.es.js +840 -812
- package/package.json +3 -1
- package/scripts/postinstall.js +2 -2
- package/src/CodeDiff.vue +13 -2
- package/src/split/SplitLine.vue +2 -2
- package/src/style.scss +36 -0
- package/src/types.ts +13 -2
- package/src/unified/UnifiedLine.vue +3 -3
- package/src/utils.ts +69 -42
package/dist/v2/index.es.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
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}.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 .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 .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)}})();
|
|
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}.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 .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
2
|
import ke from "vue";
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
e = e || ke, e && !e.__composition_api_installed__ && e.use(
|
|
3
|
+
import $n, { computed as ve } from "@vue/composition-api/dist/vue-composition-api.mjs";
|
|
4
|
+
function Bn(e) {
|
|
5
|
+
e = e || ke, e && !e.__composition_api_installed__ && e.use($n);
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
Bn(ke);
|
|
8
8
|
ke.version;
|
|
9
9
|
function Z() {
|
|
10
10
|
}
|
|
11
11
|
Z.prototype = {
|
|
12
12
|
diff: function(n, t) {
|
|
13
|
-
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
14
|
-
typeof s == "function" && (
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
return
|
|
18
|
-
|
|
13
|
+
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, c = s.callback;
|
|
14
|
+
typeof s == "function" && (c = s, s = {}), this.options = s;
|
|
15
|
+
var l = this;
|
|
16
|
+
function r(g) {
|
|
17
|
+
return c ? (setTimeout(function() {
|
|
18
|
+
c(void 0, g);
|
|
19
19
|
}, 0), !0) : g;
|
|
20
20
|
}
|
|
21
21
|
n = this.castInput(n), t = this.castInput(t), n = this.removeEmpty(this.tokenize(n)), t = this.removeEmpty(this.tokenize(t));
|
|
22
|
-
var
|
|
22
|
+
var i = t.length, a = n.length, o = 1, p = i + a;
|
|
23
23
|
s.maxEditLength && (p = Math.min(p, s.maxEditLength));
|
|
24
|
-
var
|
|
24
|
+
var d = [{
|
|
25
25
|
newPos: -1,
|
|
26
26
|
components: []
|
|
27
|
-
}],
|
|
28
|
-
if (
|
|
29
|
-
return
|
|
27
|
+
}], b = this.extractCommon(d[0], t, n, 0);
|
|
28
|
+
if (d[0].newPos + 1 >= i && b + 1 >= a)
|
|
29
|
+
return r([{
|
|
30
30
|
value: this.join(t),
|
|
31
31
|
count: t.length
|
|
32
32
|
}]);
|
|
33
|
-
function
|
|
33
|
+
function E() {
|
|
34
34
|
for (var g = -1 * o; g <= o; g += 2) {
|
|
35
|
-
var
|
|
36
|
-
S && (
|
|
37
|
-
var
|
|
38
|
-
if (!
|
|
39
|
-
|
|
35
|
+
var m = void 0, S = d[g - 1], M = d[g + 1], x = (M ? M.newPos : 0) - g;
|
|
36
|
+
S && (d[g - 1] = void 0);
|
|
37
|
+
var A = S && S.newPos + 1 < i, L = M && 0 <= x && x < a;
|
|
38
|
+
if (!A && !L) {
|
|
39
|
+
d[g] = void 0;
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
|
-
if (!
|
|
43
|
-
return
|
|
44
|
-
|
|
42
|
+
if (!A || L && S.newPos < M.newPos ? (m = Pn(M), l.pushComponent(m.components, void 0, !0)) : (m = S, m.newPos++, l.pushComponent(m.components, !0, void 0)), x = l.extractCommon(m, t, n, g), m.newPos + 1 >= i && x + 1 >= a)
|
|
43
|
+
return r(Un(l, m.components, t, n, l.useLongestToken));
|
|
44
|
+
d[g] = m;
|
|
45
45
|
}
|
|
46
46
|
o++;
|
|
47
47
|
}
|
|
48
|
-
if (
|
|
48
|
+
if (c)
|
|
49
49
|
(function g() {
|
|
50
50
|
setTimeout(function() {
|
|
51
51
|
if (o > p)
|
|
52
|
-
return
|
|
53
|
-
|
|
52
|
+
return c();
|
|
53
|
+
E() || g();
|
|
54
54
|
}, 0);
|
|
55
55
|
})();
|
|
56
56
|
else
|
|
57
57
|
for (; o <= p; ) {
|
|
58
|
-
var
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
58
|
+
var v = E();
|
|
59
|
+
if (v)
|
|
60
|
+
return v;
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
pushComponent: function(n, t, s) {
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
count:
|
|
64
|
+
var c = n[n.length - 1];
|
|
65
|
+
c && c.added === t && c.removed === s ? n[n.length - 1] = {
|
|
66
|
+
count: c.count + 1,
|
|
67
67
|
added: t,
|
|
68
68
|
removed: s
|
|
69
69
|
} : n.push({
|
|
@@ -72,12 +72,12 @@ Z.prototype = {
|
|
|
72
72
|
removed: s
|
|
73
73
|
});
|
|
74
74
|
},
|
|
75
|
-
extractCommon: function(n, t, s,
|
|
76
|
-
for (var
|
|
77
|
-
|
|
75
|
+
extractCommon: function(n, t, s, c) {
|
|
76
|
+
for (var l = t.length, r = s.length, i = n.newPos, a = i - c, o = 0; i + 1 < l && a + 1 < r && this.equals(t[i + 1], s[a + 1]); )
|
|
77
|
+
i++, a++, o++;
|
|
78
78
|
return o && n.components.push({
|
|
79
79
|
count: o
|
|
80
|
-
}), n.newPos =
|
|
80
|
+
}), n.newPos = i, a;
|
|
81
81
|
},
|
|
82
82
|
equals: function(n, t) {
|
|
83
83
|
return this.options.comparator ? this.options.comparator(n, t) : n === t || this.options.ignoreCase && n.toLowerCase() === t.toLowerCase();
|
|
@@ -97,40 +97,40 @@ Z.prototype = {
|
|
|
97
97
|
return n.join("");
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
function
|
|
101
|
-
for (var
|
|
102
|
-
var o = n[
|
|
100
|
+
function Un(e, n, t, s, c) {
|
|
101
|
+
for (var l = 0, r = n.length, i = 0, a = 0; l < r; l++) {
|
|
102
|
+
var o = n[l];
|
|
103
103
|
if (o.removed) {
|
|
104
|
-
if (o.value = e.join(s.slice(a, a + o.count)), a += o.count,
|
|
105
|
-
var
|
|
106
|
-
n[
|
|
104
|
+
if (o.value = e.join(s.slice(a, a + o.count)), a += o.count, l && n[l - 1].added) {
|
|
105
|
+
var d = n[l - 1];
|
|
106
|
+
n[l - 1] = n[l], n[l] = d;
|
|
107
107
|
}
|
|
108
108
|
} else {
|
|
109
|
-
if (!o.added &&
|
|
110
|
-
var p = t.slice(
|
|
111
|
-
p = p.map(function(
|
|
112
|
-
var g = s[a +
|
|
113
|
-
return g.length >
|
|
109
|
+
if (!o.added && c) {
|
|
110
|
+
var p = t.slice(i, i + o.count);
|
|
111
|
+
p = p.map(function(E, v) {
|
|
112
|
+
var g = s[a + v];
|
|
113
|
+
return g.length > E.length ? g : E;
|
|
114
114
|
}), o.value = e.join(p);
|
|
115
115
|
} else
|
|
116
|
-
o.value = e.join(t.slice(
|
|
117
|
-
|
|
116
|
+
o.value = e.join(t.slice(i, i + o.count));
|
|
117
|
+
i += o.count, o.added || (a += o.count);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
var
|
|
121
|
-
return
|
|
120
|
+
var b = n[r - 1];
|
|
121
|
+
return r > 1 && typeof b.value == "string" && (b.added || b.removed) && e.equals("", b.value) && (n[r - 2].value += b.value, n.pop()), n;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Pn(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 Hn = new Z();
|
|
130
|
+
function zn(e, n, t) {
|
|
131
|
+
return Hn.diff(e, n, t);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Fn(e, n) {
|
|
134
134
|
if (typeof e == "function")
|
|
135
135
|
n.callback = e;
|
|
136
136
|
else if (e)
|
|
@@ -147,8 +147,8 @@ $e.tokenize = function(e) {
|
|
|
147
147
|
!n[t + 1] && n[t + 2] && Xe.test(n[t]) && Xe.test(n[t + 2]) && (n[t] += n[t + 2], n.splice(t + 1, 2), t--);
|
|
148
148
|
return n;
|
|
149
149
|
};
|
|
150
|
-
function
|
|
151
|
-
return t =
|
|
150
|
+
function Gn(e, n, t) {
|
|
151
|
+
return t = Fn(t, {
|
|
152
152
|
ignoreWhitespace: !0
|
|
153
153
|
}), $e.diff(e, n, t);
|
|
154
154
|
}
|
|
@@ -157,64 +157,64 @@ Be.tokenize = function(e) {
|
|
|
157
157
|
var n = [], t = e.split(/(\n|\r\n)/);
|
|
158
158
|
t[t.length - 1] || t.pop();
|
|
159
159
|
for (var s = 0; s < t.length; s++) {
|
|
160
|
-
var
|
|
161
|
-
s % 2 && !this.options.newlineIsToken ? n[n.length - 1] +=
|
|
160
|
+
var c = t[s];
|
|
161
|
+
s % 2 && !this.options.newlineIsToken ? n[n.length - 1] += c : (this.options.ignoreWhitespace && (c = c.trim()), n.push(c));
|
|
162
162
|
}
|
|
163
163
|
return n;
|
|
164
164
|
};
|
|
165
165
|
function gn(e, n, t) {
|
|
166
166
|
return Be.diff(e, n, t);
|
|
167
167
|
}
|
|
168
|
-
var Gn = new Z();
|
|
169
|
-
Gn.tokenize = function(e) {
|
|
170
|
-
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
171
|
-
};
|
|
172
168
|
var Kn = new Z();
|
|
173
169
|
Kn.tokenize = function(e) {
|
|
170
|
+
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
171
|
+
};
|
|
172
|
+
var Wn = new Z();
|
|
173
|
+
Wn.tokenize = function(e) {
|
|
174
174
|
return e.split(/([{}:;,]|\s+)/);
|
|
175
175
|
};
|
|
176
|
-
function
|
|
177
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
176
|
+
function we(e) {
|
|
177
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? we = function(n) {
|
|
178
178
|
return typeof n;
|
|
179
|
-
} :
|
|
179
|
+
} : we = function(n) {
|
|
180
180
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
181
|
-
},
|
|
181
|
+
}, we(e);
|
|
182
182
|
}
|
|
183
|
-
var
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
var n = this.options, t = n.undefinedReplacement, s = n.stringifyReplacer,
|
|
188
|
-
return typeof
|
|
183
|
+
var qn = Object.prototype.toString, le = new Z();
|
|
184
|
+
le.useLongestToken = !0;
|
|
185
|
+
le.tokenize = Be.tokenize;
|
|
186
|
+
le.castInput = function(e) {
|
|
187
|
+
var n = this.options, t = n.undefinedReplacement, s = n.stringifyReplacer, c = s === void 0 ? function(l, r) {
|
|
188
|
+
return typeof r > "u" ? t : r;
|
|
189
189
|
} : s;
|
|
190
|
-
return typeof e == "string" ? e : JSON.stringify(
|
|
190
|
+
return typeof e == "string" ? e : JSON.stringify(De(e, null, null, c), c, " ");
|
|
191
191
|
};
|
|
192
|
-
|
|
193
|
-
return Z.prototype.equals.call(
|
|
192
|
+
le.equals = function(e, n) {
|
|
193
|
+
return Z.prototype.equals.call(le, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"));
|
|
194
194
|
};
|
|
195
|
-
function
|
|
196
|
-
n = n || [], t = t || [], s && (e = s(
|
|
197
|
-
var
|
|
198
|
-
for (
|
|
199
|
-
if (n[
|
|
200
|
-
return t[
|
|
201
|
-
var
|
|
202
|
-
if (
|
|
203
|
-
for (n.push(e),
|
|
204
|
-
|
|
205
|
-
return n.pop(), t.pop(),
|
|
195
|
+
function De(e, n, t, s, c) {
|
|
196
|
+
n = n || [], t = t || [], s && (e = s(c, e));
|
|
197
|
+
var l;
|
|
198
|
+
for (l = 0; l < n.length; l += 1)
|
|
199
|
+
if (n[l] === e)
|
|
200
|
+
return t[l];
|
|
201
|
+
var r;
|
|
202
|
+
if (qn.call(e) === "[object Array]") {
|
|
203
|
+
for (n.push(e), r = new Array(e.length), t.push(r), l = 0; l < e.length; l += 1)
|
|
204
|
+
r[l] = De(e[l], n, t, s, c);
|
|
205
|
+
return n.pop(), t.pop(), r;
|
|
206
206
|
}
|
|
207
|
-
if (e && e.toJSON && (e = e.toJSON()),
|
|
208
|
-
n.push(e),
|
|
209
|
-
var
|
|
207
|
+
if (e && e.toJSON && (e = e.toJSON()), we(e) === "object" && e !== null) {
|
|
208
|
+
n.push(e), r = {}, t.push(r);
|
|
209
|
+
var i = [], a;
|
|
210
210
|
for (a in e)
|
|
211
|
-
e.hasOwnProperty(a) &&
|
|
212
|
-
for (
|
|
213
|
-
a =
|
|
211
|
+
e.hasOwnProperty(a) && i.push(a);
|
|
212
|
+
for (i.sort(), l = 0; l < i.length; l += 1)
|
|
213
|
+
a = i[l], r[a] = De(e[a], n, t, s, a);
|
|
214
214
|
n.pop(), t.pop();
|
|
215
215
|
} else
|
|
216
|
-
|
|
217
|
-
return
|
|
216
|
+
r = e;
|
|
217
|
+
return r;
|
|
218
218
|
}
|
|
219
219
|
var Ie = new Z();
|
|
220
220
|
Ie.tokenize = function(e) {
|
|
@@ -255,22 +255,22 @@ function V(e, ...n) {
|
|
|
255
255
|
for (const s in e)
|
|
256
256
|
t[s] = e[s];
|
|
257
257
|
return n.forEach(function(s) {
|
|
258
|
-
for (const
|
|
259
|
-
t[
|
|
258
|
+
for (const c in s)
|
|
259
|
+
t[c] = s[c];
|
|
260
260
|
}), /** @type {T} */
|
|
261
261
|
t;
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const Yn = "</span>", Je = (e) => !!e.scope || e.sublanguage && e.language, Zn = (e, { prefix: n }) => {
|
|
264
264
|
if (e.includes(".")) {
|
|
265
265
|
const t = e.split(".");
|
|
266
266
|
return [
|
|
267
267
|
`${n}${t.shift()}`,
|
|
268
|
-
...t.map((s,
|
|
268
|
+
...t.map((s, c) => `${s}${"_".repeat(c + 1)}`)
|
|
269
269
|
].join(" ");
|
|
270
270
|
}
|
|
271
271
|
return `${n}${e}`;
|
|
272
272
|
};
|
|
273
|
-
class
|
|
273
|
+
class Qn {
|
|
274
274
|
/**
|
|
275
275
|
* Creates a new HTMLRenderer
|
|
276
276
|
*
|
|
@@ -295,14 +295,14 @@ class Zn {
|
|
|
295
295
|
if (!Je(n))
|
|
296
296
|
return;
|
|
297
297
|
let t = "";
|
|
298
|
-
n.sublanguage ? t = `language-${n.language}` : t =
|
|
298
|
+
n.sublanguage ? t = `language-${n.language}` : t = Zn(n.scope, { prefix: this.classPrefix }), this.span(t);
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
301
301
|
* Adds a node close to the output stream (if needed)
|
|
302
302
|
*
|
|
303
303
|
* @param {Node} node */
|
|
304
304
|
closeNode(n) {
|
|
305
|
-
Je(n) && (this.buffer +=
|
|
305
|
+
Je(n) && (this.buffer += Yn);
|
|
306
306
|
}
|
|
307
307
|
/**
|
|
308
308
|
* returns the accumulated buffer
|
|
@@ -376,7 +376,7 @@ class He {
|
|
|
376
376
|
}));
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
|
-
class
|
|
379
|
+
class Xn extends He {
|
|
380
380
|
/**
|
|
381
381
|
* @param {*} options
|
|
382
382
|
*/
|
|
@@ -405,60 +405,60 @@ class Qn extends He {
|
|
|
405
405
|
s.sublanguage = !0, s.language = t, this.add(s);
|
|
406
406
|
}
|
|
407
407
|
toHTML() {
|
|
408
|
-
return new
|
|
408
|
+
return new Qn(this, this.options).value();
|
|
409
409
|
}
|
|
410
410
|
finalize() {
|
|
411
411
|
return !0;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function ue(e) {
|
|
415
415
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
416
416
|
}
|
|
417
417
|
function _n(e) {
|
|
418
418
|
return ee("(?=", e, ")");
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function Vn(e) {
|
|
421
421
|
return ee("(?:", e, ")*");
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function jn(e) {
|
|
424
424
|
return ee("(?:", e, ")?");
|
|
425
425
|
}
|
|
426
426
|
function ee(...e) {
|
|
427
|
-
return e.map((t) =>
|
|
427
|
+
return e.map((t) => ue(t)).join("");
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Jn(e) {
|
|
430
430
|
const n = e[e.length - 1];
|
|
431
431
|
return typeof n == "object" && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {};
|
|
432
432
|
}
|
|
433
433
|
function ze(...e) {
|
|
434
|
-
return "(" + (
|
|
434
|
+
return "(" + (Jn(e).capture ? "" : "?:") + e.map((s) => ue(s)).join("|") + ")";
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function hn(e) {
|
|
437
437
|
return new RegExp(e.toString() + "|").exec("").length - 1;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function et(e, n) {
|
|
440
440
|
const t = e && e.exec(n);
|
|
441
441
|
return t && t.index === 0;
|
|
442
442
|
}
|
|
443
|
-
const
|
|
443
|
+
const nt = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
444
444
|
function Fe(e, { joinWith: n }) {
|
|
445
445
|
let t = 0;
|
|
446
446
|
return e.map((s) => {
|
|
447
447
|
t += 1;
|
|
448
|
-
const
|
|
449
|
-
let
|
|
450
|
-
for (;
|
|
451
|
-
const
|
|
452
|
-
if (!
|
|
453
|
-
|
|
448
|
+
const c = t;
|
|
449
|
+
let l = ue(s), r = "";
|
|
450
|
+
for (; l.length > 0; ) {
|
|
451
|
+
const i = nt.exec(l);
|
|
452
|
+
if (!i) {
|
|
453
|
+
r += l;
|
|
454
454
|
break;
|
|
455
455
|
}
|
|
456
|
-
|
|
456
|
+
r += l.substring(0, i.index), l = l.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? r += "\\" + String(Number(i[1]) + c) : (r += i[0], i[0] === "(" && t++);
|
|
457
457
|
}
|
|
458
|
-
return
|
|
458
|
+
return r;
|
|
459
459
|
}).map((s) => `(${s})`).join(n);
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const tt = /\b\B/, bn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\\d+)?", mn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", yn = "\\b(0b[01]+)", st = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", it = (e = {}) => {
|
|
462
462
|
const n = /^#![ ]*\//;
|
|
463
463
|
return e.binary && (e.begin = ee(
|
|
464
464
|
n,
|
|
@@ -475,7 +475,7 @@ const nt = /\b\B/, hn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
475
475
|
t.index !== 0 && s.ignoreMatch();
|
|
476
476
|
}
|
|
477
477
|
}, e);
|
|
478
|
-
},
|
|
478
|
+
}, fe = {
|
|
479
479
|
begin: "\\\\[\\s\\S]",
|
|
480
480
|
relevance: 0
|
|
481
481
|
}, rt = {
|
|
@@ -483,16 +483,16 @@ const nt = /\b\B/, hn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
483
483
|
begin: "'",
|
|
484
484
|
end: "'",
|
|
485
485
|
illegal: "\\n",
|
|
486
|
-
contains: [
|
|
487
|
-
},
|
|
486
|
+
contains: [fe]
|
|
487
|
+
}, at = {
|
|
488
488
|
scope: "string",
|
|
489
489
|
begin: '"',
|
|
490
490
|
end: '"',
|
|
491
491
|
illegal: "\\n",
|
|
492
|
-
contains: [
|
|
493
|
-
},
|
|
492
|
+
contains: [fe]
|
|
493
|
+
}, ot = {
|
|
494
494
|
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/
|
|
495
|
-
},
|
|
495
|
+
}, Re = function(e, n, t = {}) {
|
|
496
496
|
const s = V(
|
|
497
497
|
{
|
|
498
498
|
scope: "comment",
|
|
@@ -511,7 +511,7 @@ const nt = /\b\B/, hn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
511
511
|
excludeBegin: !0,
|
|
512
512
|
relevance: 0
|
|
513
513
|
});
|
|
514
|
-
const
|
|
514
|
+
const c = ze(
|
|
515
515
|
// list of common 1 and 2 letter words in English
|
|
516
516
|
"I",
|
|
517
517
|
"a",
|
|
@@ -551,26 +551,26 @@ const nt = /\b\B/, hn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
551
551
|
/[ ]+/,
|
|
552
552
|
// necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
|
|
553
553
|
"(",
|
|
554
|
-
|
|
554
|
+
c,
|
|
555
555
|
/[.]?[:]?([.][ ]|[ ])/,
|
|
556
556
|
"){3}"
|
|
557
557
|
)
|
|
558
558
|
// look for 3 words in a row
|
|
559
559
|
}
|
|
560
560
|
), s;
|
|
561
|
-
},
|
|
561
|
+
}, ct = Re("//", "$"), lt = Re("/\\*", "\\*/"), ut = Re("#", "$"), ft = {
|
|
562
562
|
scope: "number",
|
|
563
563
|
begin: En,
|
|
564
564
|
relevance: 0
|
|
565
|
-
},
|
|
565
|
+
}, dt = {
|
|
566
566
|
scope: "number",
|
|
567
567
|
begin: mn,
|
|
568
568
|
relevance: 0
|
|
569
|
-
},
|
|
569
|
+
}, gt = {
|
|
570
570
|
scope: "number",
|
|
571
571
|
begin: yn,
|
|
572
572
|
relevance: 0
|
|
573
|
-
},
|
|
573
|
+
}, pt = {
|
|
574
574
|
// this outer rule makes sure we actually have a WHOLE regex and not simply
|
|
575
575
|
// an expression such as:
|
|
576
576
|
//
|
|
@@ -584,20 +584,20 @@ const nt = /\b\B/, hn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
584
584
|
end: /\/[gimuy]*/,
|
|
585
585
|
illegal: /\n/,
|
|
586
586
|
contains: [
|
|
587
|
-
|
|
587
|
+
fe,
|
|
588
588
|
{
|
|
589
589
|
begin: /\[/,
|
|
590
590
|
end: /\]/,
|
|
591
591
|
relevance: 0,
|
|
592
|
-
contains: [
|
|
592
|
+
contains: [fe]
|
|
593
593
|
}
|
|
594
594
|
]
|
|
595
595
|
}]
|
|
596
|
-
},
|
|
596
|
+
}, _t = {
|
|
597
597
|
scope: "title",
|
|
598
|
-
begin:
|
|
598
|
+
begin: bn,
|
|
599
599
|
relevance: 0
|
|
600
|
-
},
|
|
600
|
+
}, ht = {
|
|
601
601
|
scope: "title",
|
|
602
602
|
begin: Ge,
|
|
603
603
|
relevance: 0
|
|
@@ -605,7 +605,7 @@ const nt = /\b\B/, hn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
605
605
|
// excludes method names from keyword processing
|
|
606
606
|
begin: "\\.\\s*" + Ge,
|
|
607
607
|
relevance: 0
|
|
608
|
-
},
|
|
608
|
+
}, Et = function(e) {
|
|
609
609
|
return Object.assign(
|
|
610
610
|
e,
|
|
611
611
|
{
|
|
@@ -620,56 +620,56 @@ const nt = /\b\B/, hn = "[a-zA-Z]\\w*", Ge = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
620
620
|
}
|
|
621
621
|
);
|
|
622
622
|
};
|
|
623
|
-
var
|
|
623
|
+
var Ne = /* @__PURE__ */ Object.freeze({
|
|
624
624
|
__proto__: null,
|
|
625
|
-
MATCH_NOTHING_RE:
|
|
626
|
-
IDENT_RE:
|
|
625
|
+
MATCH_NOTHING_RE: tt,
|
|
626
|
+
IDENT_RE: bn,
|
|
627
627
|
UNDERSCORE_IDENT_RE: Ge,
|
|
628
628
|
NUMBER_RE: En,
|
|
629
629
|
C_NUMBER_RE: mn,
|
|
630
630
|
BINARY_NUMBER_RE: yn,
|
|
631
|
-
RE_STARTERS_RE:
|
|
632
|
-
SHEBANG:
|
|
633
|
-
BACKSLASH_ESCAPE:
|
|
631
|
+
RE_STARTERS_RE: st,
|
|
632
|
+
SHEBANG: it,
|
|
633
|
+
BACKSLASH_ESCAPE: fe,
|
|
634
634
|
APOS_STRING_MODE: rt,
|
|
635
|
-
QUOTE_STRING_MODE:
|
|
636
|
-
PHRASAL_WORDS_MODE:
|
|
637
|
-
COMMENT:
|
|
638
|
-
C_LINE_COMMENT_MODE:
|
|
639
|
-
C_BLOCK_COMMENT_MODE:
|
|
640
|
-
HASH_COMMENT_MODE:
|
|
641
|
-
NUMBER_MODE:
|
|
642
|
-
C_NUMBER_MODE:
|
|
643
|
-
BINARY_NUMBER_MODE:
|
|
644
|
-
REGEXP_MODE:
|
|
645
|
-
TITLE_MODE:
|
|
646
|
-
UNDERSCORE_TITLE_MODE:
|
|
635
|
+
QUOTE_STRING_MODE: at,
|
|
636
|
+
PHRASAL_WORDS_MODE: ot,
|
|
637
|
+
COMMENT: Re,
|
|
638
|
+
C_LINE_COMMENT_MODE: ct,
|
|
639
|
+
C_BLOCK_COMMENT_MODE: lt,
|
|
640
|
+
HASH_COMMENT_MODE: ut,
|
|
641
|
+
NUMBER_MODE: ft,
|
|
642
|
+
C_NUMBER_MODE: dt,
|
|
643
|
+
BINARY_NUMBER_MODE: gt,
|
|
644
|
+
REGEXP_MODE: pt,
|
|
645
|
+
TITLE_MODE: _t,
|
|
646
|
+
UNDERSCORE_TITLE_MODE: ht,
|
|
647
647
|
METHOD_GUARD: bt,
|
|
648
|
-
END_SAME_AS_BEGIN:
|
|
648
|
+
END_SAME_AS_BEGIN: Et
|
|
649
649
|
});
|
|
650
|
-
function Et(e, n) {
|
|
651
|
-
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
652
|
-
}
|
|
653
650
|
function mt(e, n) {
|
|
654
|
-
e.
|
|
651
|
+
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
655
652
|
}
|
|
656
653
|
function yt(e, n) {
|
|
657
|
-
|
|
654
|
+
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
658
655
|
}
|
|
659
656
|
function vt(e, n) {
|
|
660
|
-
|
|
657
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = mt, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
661
658
|
}
|
|
662
659
|
function Nt(e, n) {
|
|
660
|
+
Array.isArray(e.illegal) && (e.illegal = ze(...e.illegal));
|
|
661
|
+
}
|
|
662
|
+
function Tt(e, n) {
|
|
663
663
|
if (e.match) {
|
|
664
664
|
if (e.begin || e.end)
|
|
665
665
|
throw new Error("begin & end are not supported with match");
|
|
666
666
|
e.begin = e.match, delete e.match;
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function At(e, n) {
|
|
670
670
|
e.relevance === void 0 && (e.relevance = 1);
|
|
671
671
|
}
|
|
672
|
-
const
|
|
672
|
+
const wt = (e, n) => {
|
|
673
673
|
if (!e.beforeMatch)
|
|
674
674
|
return;
|
|
675
675
|
if (e.starts)
|
|
@@ -683,7 +683,7 @@ const At = (e, n) => {
|
|
|
683
683
|
Object.assign(t, { endsParent: !0 })
|
|
684
684
|
]
|
|
685
685
|
}, e.relevance = 0, delete t.beforeMatch;
|
|
686
|
-
},
|
|
686
|
+
}, St = [
|
|
687
687
|
"of",
|
|
688
688
|
"and",
|
|
689
689
|
"for",
|
|
@@ -698,57 +698,57 @@ const At = (e, n) => {
|
|
|
698
698
|
// common variable name
|
|
699
699
|
"value"
|
|
700
700
|
// common variable name
|
|
701
|
-
],
|
|
702
|
-
function vn(e, n, t =
|
|
701
|
+
], Mt = "keyword";
|
|
702
|
+
function vn(e, n, t = Mt) {
|
|
703
703
|
const s = /* @__PURE__ */ Object.create(null);
|
|
704
|
-
return typeof e == "string" ?
|
|
704
|
+
return typeof e == "string" ? c(t, e.split(" ")) : Array.isArray(e) ? c(t, e) : Object.keys(e).forEach(function(l) {
|
|
705
705
|
Object.assign(
|
|
706
706
|
s,
|
|
707
|
-
vn(e[
|
|
707
|
+
vn(e[l], n, l)
|
|
708
708
|
);
|
|
709
709
|
}), s;
|
|
710
|
-
function l
|
|
711
|
-
n && (
|
|
712
|
-
const a =
|
|
713
|
-
s[a[0]] = [
|
|
710
|
+
function c(l, r) {
|
|
711
|
+
n && (r = r.map((i) => i.toLowerCase())), r.forEach(function(i) {
|
|
712
|
+
const a = i.split("|");
|
|
713
|
+
s[a[0]] = [l, Rt(a[0], a[1])];
|
|
714
714
|
});
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
return n ? Number(n) :
|
|
717
|
+
function Rt(e, n) {
|
|
718
|
+
return n ? Number(n) : Ot(e) ? 0 : 1;
|
|
719
719
|
}
|
|
720
|
-
function
|
|
721
|
-
return
|
|
720
|
+
function Ot(e) {
|
|
721
|
+
return St.includes(e.toLowerCase());
|
|
722
722
|
}
|
|
723
723
|
const nn = {}, J = (e) => {
|
|
724
724
|
console.error(e);
|
|
725
725
|
}, tn = (e, ...n) => {
|
|
726
726
|
console.log(`WARN: ${e}`, ...n);
|
|
727
|
-
},
|
|
727
|
+
}, ie = (e, n) => {
|
|
728
728
|
nn[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), nn[`${e}/${n}`] = !0);
|
|
729
|
-
},
|
|
729
|
+
}, Se = new Error();
|
|
730
730
|
function Nn(e, n, { key: t }) {
|
|
731
731
|
let s = 0;
|
|
732
|
-
const
|
|
733
|
-
for (let
|
|
734
|
-
i
|
|
735
|
-
e[t] =
|
|
732
|
+
const c = e[t], l = {}, r = {};
|
|
733
|
+
for (let i = 1; i <= n.length; i++)
|
|
734
|
+
r[i + s] = c[i], l[i + s] = !0, s += hn(n[i - 1]);
|
|
735
|
+
e[t] = r, e[t]._emit = l, e[t]._multi = !0;
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function xt(e) {
|
|
738
738
|
if (Array.isArray(e.begin)) {
|
|
739
739
|
if (e.skip || e.excludeBegin || e.returnBegin)
|
|
740
|
-
throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
|
|
740
|
+
throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Se;
|
|
741
741
|
if (typeof e.beginScope != "object" || e.beginScope === null)
|
|
742
|
-
throw J("beginScope must be object"),
|
|
742
|
+
throw J("beginScope must be object"), Se;
|
|
743
743
|
Nn(e, e.begin, { key: "beginScope" }), e.begin = Fe(e.begin, { joinWith: "" });
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function Ct(e) {
|
|
747
747
|
if (Array.isArray(e.end)) {
|
|
748
748
|
if (e.skip || e.excludeEnd || e.returnEnd)
|
|
749
|
-
throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
|
|
749
|
+
throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Se;
|
|
750
750
|
if (typeof e.endScope != "object" || e.endScope === null)
|
|
751
|
-
throw J("endScope must be object"),
|
|
751
|
+
throw J("endScope must be object"), Se;
|
|
752
752
|
Nn(e, e.end, { key: "endScope" }), e.end = Fe(e.end, { joinWith: "" });
|
|
753
753
|
}
|
|
754
754
|
}
|
|
@@ -756,13 +756,13 @@ function Lt(e) {
|
|
|
756
756
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
757
757
|
}
|
|
758
758
|
function Dt(e) {
|
|
759
|
-
Lt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }),
|
|
759
|
+
Lt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), xt(e), Ct(e);
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
function n(
|
|
761
|
+
function It(e) {
|
|
762
|
+
function n(r, i) {
|
|
763
763
|
return new RegExp(
|
|
764
|
-
|
|
765
|
-
"m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (
|
|
764
|
+
ue(r),
|
|
765
|
+
"m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (i ? "g" : "")
|
|
766
766
|
);
|
|
767
767
|
}
|
|
768
768
|
class t {
|
|
@@ -770,21 +770,21 @@ function Ct(e) {
|
|
|
770
770
|
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
771
771
|
}
|
|
772
772
|
// @ts-ignore
|
|
773
|
-
addRule(
|
|
774
|
-
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a,
|
|
773
|
+
addRule(i, a) {
|
|
774
|
+
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, i]), this.matchAt += hn(i) + 1;
|
|
775
775
|
}
|
|
776
776
|
compile() {
|
|
777
777
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
778
|
-
const
|
|
779
|
-
this.matcherRe = n(Fe(
|
|
778
|
+
const i = this.regexes.map((a) => a[1]);
|
|
779
|
+
this.matcherRe = n(Fe(i, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
780
780
|
}
|
|
781
781
|
/** @param {string} s */
|
|
782
|
-
exec(
|
|
782
|
+
exec(i) {
|
|
783
783
|
this.matcherRe.lastIndex = this.lastIndex;
|
|
784
|
-
const a = this.matcherRe.exec(
|
|
784
|
+
const a = this.matcherRe.exec(i);
|
|
785
785
|
if (!a)
|
|
786
786
|
return null;
|
|
787
|
-
const o = a.findIndex((
|
|
787
|
+
const o = a.findIndex((d, b) => b > 0 && d !== void 0), p = this.matchIndexes[o];
|
|
788
788
|
return a.splice(0, o), Object.assign(a, p);
|
|
789
789
|
}
|
|
790
790
|
}
|
|
@@ -793,11 +793,11 @@ function Ct(e) {
|
|
|
793
793
|
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
|
794
794
|
}
|
|
795
795
|
// @ts-ignore
|
|
796
|
-
getMatcher(
|
|
797
|
-
if (this.multiRegexes[
|
|
798
|
-
return this.multiRegexes[
|
|
796
|
+
getMatcher(i) {
|
|
797
|
+
if (this.multiRegexes[i])
|
|
798
|
+
return this.multiRegexes[i];
|
|
799
799
|
const a = new t();
|
|
800
|
-
return this.rules.slice(
|
|
800
|
+
return this.rules.slice(i).forEach(([o, p]) => a.addRule(o, p)), a.compile(), this.multiRegexes[i] = a, a;
|
|
801
801
|
}
|
|
802
802
|
resumingScanAtSamePosition() {
|
|
803
803
|
return this.regexIndex !== 0;
|
|
@@ -806,64 +806,64 @@ function Ct(e) {
|
|
|
806
806
|
this.regexIndex = 0;
|
|
807
807
|
}
|
|
808
808
|
// @ts-ignore
|
|
809
|
-
addRule(
|
|
810
|
-
this.rules.push([
|
|
809
|
+
addRule(i, a) {
|
|
810
|
+
this.rules.push([i, a]), a.type === "begin" && this.count++;
|
|
811
811
|
}
|
|
812
812
|
/** @param {string} s */
|
|
813
|
-
exec(
|
|
813
|
+
exec(i) {
|
|
814
814
|
const a = this.getMatcher(this.regexIndex);
|
|
815
815
|
a.lastIndex = this.lastIndex;
|
|
816
|
-
let o = a.exec(
|
|
816
|
+
let o = a.exec(i);
|
|
817
817
|
if (this.resumingScanAtSamePosition() && !(o && o.index === this.lastIndex)) {
|
|
818
818
|
const p = this.getMatcher(0);
|
|
819
|
-
p.lastIndex = this.lastIndex + 1, o = p.exec(
|
|
819
|
+
p.lastIndex = this.lastIndex + 1, o = p.exec(i);
|
|
820
820
|
}
|
|
821
821
|
return o && (this.regexIndex += o.position + 1, this.regexIndex === this.count && this.considerAll()), o;
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
const
|
|
826
|
-
return
|
|
824
|
+
function c(r) {
|
|
825
|
+
const i = new s();
|
|
826
|
+
return r.contains.forEach((a) => i.addRule(a.begin, { rule: a, type: "begin" })), r.terminatorEnd && i.addRule(r.terminatorEnd, { type: "end" }), r.illegal && i.addRule(r.illegal, { type: "illegal" }), i;
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function l(r, i) {
|
|
829
829
|
const a = (
|
|
830
830
|
/** @type CompiledMode */
|
|
831
|
-
|
|
831
|
+
r
|
|
832
832
|
);
|
|
833
|
-
if (
|
|
833
|
+
if (r.isCompiled)
|
|
834
834
|
return a;
|
|
835
835
|
[
|
|
836
|
-
|
|
836
|
+
yt,
|
|
837
837
|
// do this early so compiler extensions generally don't have to worry about
|
|
838
838
|
// the distinction between match/begin
|
|
839
|
-
|
|
839
|
+
Tt,
|
|
840
840
|
Dt,
|
|
841
|
-
|
|
842
|
-
].forEach((p) => p(
|
|
843
|
-
|
|
841
|
+
wt
|
|
842
|
+
].forEach((p) => p(r, i)), e.compilerExtensions.forEach((p) => p(r, i)), r.__beforeBegin = null, [
|
|
843
|
+
vt,
|
|
844
844
|
// do this later so compiler extensions that come earlier have access to the
|
|
845
845
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
846
|
-
|
|
846
|
+
Nt,
|
|
847
847
|
// default to 1 relevance if not specified
|
|
848
|
-
|
|
849
|
-
].forEach((p) => p(
|
|
848
|
+
At
|
|
849
|
+
].forEach((p) => p(r, i)), r.isCompiled = !0;
|
|
850
850
|
let o = null;
|
|
851
|
-
return typeof
|
|
851
|
+
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 = vn(r.keywords, e.case_insensitive)), a.keywordPatternRe = n(o, !0), i && (r.begin || (r.begin = /\B|\b/), a.beginRe = n(a.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (a.endRe = n(a.end)), a.terminatorEnd = ue(a.end) || "", r.endsWithParent && i.terminatorEnd && (a.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (a.illegalRe = n(
|
|
852
852
|
/** @type {RegExp | string} */
|
|
853
|
-
|
|
854
|
-
)),
|
|
855
|
-
return
|
|
856
|
-
})),
|
|
857
|
-
|
|
853
|
+
r.illegal
|
|
854
|
+
)), r.contains || (r.contains = []), r.contains = [].concat(...r.contains.map(function(p) {
|
|
855
|
+
return kt(p === "self" ? r : p);
|
|
856
|
+
})), r.contains.forEach(function(p) {
|
|
857
|
+
l(
|
|
858
858
|
/** @type Mode */
|
|
859
859
|
p,
|
|
860
860
|
a
|
|
861
861
|
);
|
|
862
|
-
}),
|
|
862
|
+
}), r.starts && l(r.starts, i), a.matcher = c(a), a;
|
|
863
863
|
}
|
|
864
864
|
if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
|
|
865
865
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
866
|
-
return e.classNameAliases = V(e.classNameAliases || {}),
|
|
866
|
+
return e.classNameAliases = V(e.classNameAliases || {}), l(
|
|
867
867
|
/** @type Mode */
|
|
868
868
|
e
|
|
869
869
|
);
|
|
@@ -871,22 +871,22 @@ function Ct(e) {
|
|
|
871
871
|
function Tn(e) {
|
|
872
872
|
return e ? e.endsWithParent || Tn(e.starts) : !1;
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function kt(e) {
|
|
875
875
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
876
876
|
return V(e, { variants: null }, n);
|
|
877
877
|
})), e.cachedVariants ? e.cachedVariants : Tn(e) ? V(e, { starts: e.starts ? V(e.starts) : null }) : Object.isFrozen(e) ? V(e) : e;
|
|
878
878
|
}
|
|
879
|
-
var
|
|
880
|
-
class
|
|
879
|
+
var $t = "11.7.0";
|
|
880
|
+
class Bt extends Error {
|
|
881
881
|
constructor(n, t) {
|
|
882
882
|
super(n), this.name = "HTMLInjectionError", this.html = t;
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
const
|
|
885
|
+
const Le = pn, sn = V, rn = Symbol("nomatch"), Ut = 7, Pt = function(e) {
|
|
886
886
|
const n = /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null), s = [];
|
|
887
|
-
let
|
|
888
|
-
const
|
|
889
|
-
let
|
|
887
|
+
let c = !0;
|
|
888
|
+
const l = "Could not find the language '{}', did you forget to load/include a language module?", r = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
889
|
+
let i = {
|
|
890
890
|
ignoreUnescapedHTML: !1,
|
|
891
891
|
throwUnescapedHTML: !1,
|
|
892
892
|
noHighlightRe: /^(no-?highlight)$/i,
|
|
@@ -896,270 +896,270 @@ const De = pn, sn = V, rn = Symbol("nomatch"), Bt = 7, Ut = function(e) {
|
|
|
896
896
|
languages: null,
|
|
897
897
|
// beta configuration options, subject to change, welcome to discuss
|
|
898
898
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
899
|
-
__emitter:
|
|
899
|
+
__emitter: Xn
|
|
900
900
|
};
|
|
901
901
|
function a(u) {
|
|
902
|
-
return
|
|
902
|
+
return i.noHighlightRe.test(u);
|
|
903
903
|
}
|
|
904
904
|
function o(u) {
|
|
905
|
-
let
|
|
906
|
-
|
|
907
|
-
const T =
|
|
905
|
+
let _ = u.className + " ";
|
|
906
|
+
_ += u.parentNode ? u.parentNode.className : "";
|
|
907
|
+
const T = i.languageDetectRe.exec(_);
|
|
908
908
|
if (T) {
|
|
909
|
-
const
|
|
910
|
-
return
|
|
909
|
+
const O = $(T[1]);
|
|
910
|
+
return O || (tn(l.replace("{}", T[1])), tn("Falling back to no-highlight mode for this block.", u)), O ? T[1] : "no-highlight";
|
|
911
911
|
}
|
|
912
|
-
return
|
|
912
|
+
return _.split(/\s+/).find((O) => a(O) || $(O));
|
|
913
913
|
}
|
|
914
|
-
function p(u,
|
|
915
|
-
let
|
|
916
|
-
typeof
|
|
917
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), I = u,
|
|
918
|
-
const
|
|
919
|
-
code:
|
|
914
|
+
function p(u, _, T) {
|
|
915
|
+
let O = "", I = "";
|
|
916
|
+
typeof _ == "object" ? (O = u, T = _.ignoreIllegals, I = _.language) : (ie("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ie("10.7.0", `Please use highlight(code, options) instead.
|
|
917
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), I = u, O = _), T === void 0 && (T = !0);
|
|
918
|
+
const P = {
|
|
919
|
+
code: O,
|
|
920
920
|
language: I
|
|
921
921
|
};
|
|
922
|
-
se("before:highlight",
|
|
923
|
-
const K =
|
|
924
|
-
return K.code =
|
|
922
|
+
se("before:highlight", P);
|
|
923
|
+
const K = P.result ? P.result : d(P.language, P.code, T);
|
|
924
|
+
return K.code = P.code, se("after:highlight", K), K;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function d(u, _, T, O) {
|
|
927
927
|
const I = /* @__PURE__ */ Object.create(null);
|
|
928
|
-
function
|
|
929
|
-
return
|
|
928
|
+
function P(f, h) {
|
|
929
|
+
return f.keywords[h];
|
|
930
930
|
}
|
|
931
931
|
function K() {
|
|
932
|
-
if (!
|
|
933
|
-
|
|
932
|
+
if (!N.keywords) {
|
|
933
|
+
B.addText(D);
|
|
934
934
|
return;
|
|
935
935
|
}
|
|
936
|
-
let
|
|
937
|
-
|
|
938
|
-
let
|
|
939
|
-
for (;
|
|
940
|
-
w +=
|
|
941
|
-
const
|
|
942
|
-
if (
|
|
943
|
-
const [W,
|
|
944
|
-
if (
|
|
945
|
-
w +=
|
|
936
|
+
let f = 0;
|
|
937
|
+
N.keywordPatternRe.lastIndex = 0;
|
|
938
|
+
let h = N.keywordPatternRe.exec(D), w = "";
|
|
939
|
+
for (; h; ) {
|
|
940
|
+
w += D.substring(f, h.index);
|
|
941
|
+
const C = X.case_insensitive ? h[0].toLowerCase() : h[0], U = P(N, C);
|
|
942
|
+
if (U) {
|
|
943
|
+
const [W, In] = U;
|
|
944
|
+
if (B.addText(w), w = "", I[C] = (I[C] || 0) + 1, I[C] <= Ut && (ye += In), W.startsWith("_"))
|
|
945
|
+
w += h[0];
|
|
946
946
|
else {
|
|
947
|
-
const
|
|
948
|
-
|
|
947
|
+
const kn = X.classNameAliases[W] || W;
|
|
948
|
+
B.addKeyword(h[0], kn);
|
|
949
949
|
}
|
|
950
950
|
} else
|
|
951
|
-
w +=
|
|
952
|
-
|
|
951
|
+
w += h[0];
|
|
952
|
+
f = N.keywordPatternRe.lastIndex, h = N.keywordPatternRe.exec(D);
|
|
953
953
|
}
|
|
954
|
-
w +=
|
|
954
|
+
w += D.substring(f), B.addText(w);
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
if (
|
|
956
|
+
function Ee() {
|
|
957
|
+
if (D === "")
|
|
958
958
|
return;
|
|
959
|
-
let
|
|
960
|
-
if (typeof
|
|
961
|
-
if (!n[
|
|
962
|
-
|
|
959
|
+
let f = null;
|
|
960
|
+
if (typeof N.subLanguage == "string") {
|
|
961
|
+
if (!n[N.subLanguage]) {
|
|
962
|
+
B.addText(D);
|
|
963
963
|
return;
|
|
964
964
|
}
|
|
965
|
-
|
|
966
|
-
|
|
965
|
+
f = d(N.subLanguage, D, !0, Qe[N.subLanguage]), Qe[N.subLanguage] = /** @type {CompiledMode} */
|
|
966
|
+
f._top;
|
|
967
967
|
} else
|
|
968
|
-
|
|
969
|
-
|
|
968
|
+
f = E(D, N.subLanguage.length ? N.subLanguage : null);
|
|
969
|
+
N.relevance > 0 && (ye += f.relevance), B.addSublanguage(f._emitter, f.language);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
|
|
971
|
+
function H() {
|
|
972
|
+
N.subLanguage != null ? Ee() : K(), D = "";
|
|
973
973
|
}
|
|
974
|
-
function Q(
|
|
974
|
+
function Q(f, h) {
|
|
975
975
|
let w = 1;
|
|
976
|
-
const
|
|
977
|
-
for (; w <=
|
|
978
|
-
if (!
|
|
976
|
+
const C = h.length - 1;
|
|
977
|
+
for (; w <= C; ) {
|
|
978
|
+
if (!f._emit[w]) {
|
|
979
979
|
w++;
|
|
980
980
|
continue;
|
|
981
981
|
}
|
|
982
|
-
const
|
|
983
|
-
|
|
982
|
+
const U = X.classNameAliases[f[w]] || f[w], W = h[w];
|
|
983
|
+
U ? B.addKeyword(W, U) : (D = W, K(), D = ""), w++;
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
function qe(
|
|
987
|
-
return
|
|
986
|
+
function qe(f, h) {
|
|
987
|
+
return f.scope && typeof f.scope == "string" && B.openNode(X.classNameAliases[f.scope] || f.scope), f.beginScope && (f.beginScope._wrap ? (B.addKeyword(D, X.classNameAliases[f.beginScope._wrap] || f.beginScope._wrap), D = "") : f.beginScope._multi && (Q(f.beginScope, h), D = "")), N = Object.create(f, { parent: { value: N } }), N;
|
|
988
988
|
}
|
|
989
|
-
function Ye(
|
|
990
|
-
let
|
|
991
|
-
if (
|
|
992
|
-
if (
|
|
993
|
-
const
|
|
994
|
-
|
|
989
|
+
function Ye(f, h, w) {
|
|
990
|
+
let C = et(f.endRe, w);
|
|
991
|
+
if (C) {
|
|
992
|
+
if (f["on:end"]) {
|
|
993
|
+
const U = new je(f);
|
|
994
|
+
f["on:end"](h, U), U.isMatchIgnored && (C = !1);
|
|
995
995
|
}
|
|
996
|
-
if (
|
|
997
|
-
for (;
|
|
998
|
-
|
|
999
|
-
return
|
|
996
|
+
if (C) {
|
|
997
|
+
for (; f.endsParent && f.parent; )
|
|
998
|
+
f = f.parent;
|
|
999
|
+
return f;
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
|
-
if (
|
|
1003
|
-
return Ye(
|
|
1002
|
+
if (f.endsWithParent)
|
|
1003
|
+
return Ye(f.parent, h, w);
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return
|
|
1005
|
+
function On(f) {
|
|
1006
|
+
return N.matcher.regexIndex === 0 ? (D += f[0], 1) : (Ce = !0, 0);
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1009
|
-
const
|
|
1010
|
-
for (const W of
|
|
1011
|
-
if (W && (W(
|
|
1012
|
-
return
|
|
1013
|
-
return w.skip ?
|
|
1008
|
+
function xn(f) {
|
|
1009
|
+
const h = f[0], w = f.rule, C = new je(w), U = [w.__beforeBegin, w["on:begin"]];
|
|
1010
|
+
for (const W of U)
|
|
1011
|
+
if (W && (W(f, C), C.isMatchIgnored))
|
|
1012
|
+
return On(h);
|
|
1013
|
+
return w.skip ? D += h : (w.excludeBegin && (D += h), H(), !w.returnBegin && !w.excludeBegin && (D = h)), qe(w, f), w.returnBegin ? 0 : h.length;
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1016
|
-
const
|
|
1017
|
-
if (!
|
|
1015
|
+
function Cn(f) {
|
|
1016
|
+
const h = f[0], w = _.substring(f.index), C = Ye(N, f, w);
|
|
1017
|
+
if (!C)
|
|
1018
1018
|
return rn;
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1019
|
+
const U = N;
|
|
1020
|
+
N.endScope && N.endScope._wrap ? (H(), B.addKeyword(h, N.endScope._wrap)) : N.endScope && N.endScope._multi ? (H(), Q(N.endScope, f)) : U.skip ? D += h : (U.returnEnd || U.excludeEnd || (D += h), H(), U.excludeEnd && (D = h));
|
|
1021
1021
|
do
|
|
1022
|
-
|
|
1023
|
-
while (
|
|
1024
|
-
return
|
|
1022
|
+
N.scope && B.closeNode(), !N.skip && !N.subLanguage && (ye += N.relevance), N = N.parent;
|
|
1023
|
+
while (N !== C.parent);
|
|
1024
|
+
return C.starts && qe(C.starts, f), U.returnEnd ? 0 : h.length;
|
|
1025
1025
|
}
|
|
1026
1026
|
function Ln() {
|
|
1027
|
-
const
|
|
1028
|
-
for (let
|
|
1029
|
-
|
|
1030
|
-
|
|
1027
|
+
const f = [];
|
|
1028
|
+
for (let h = N; h !== X; h = h.parent)
|
|
1029
|
+
h.scope && f.unshift(h.scope);
|
|
1030
|
+
f.forEach((h) => B.openNode(h));
|
|
1031
1031
|
}
|
|
1032
|
-
let
|
|
1033
|
-
function Ze(
|
|
1034
|
-
const w =
|
|
1035
|
-
if (
|
|
1036
|
-
return
|
|
1037
|
-
if (
|
|
1038
|
-
if (
|
|
1039
|
-
const
|
|
1040
|
-
throw
|
|
1032
|
+
let me = {};
|
|
1033
|
+
function Ze(f, h) {
|
|
1034
|
+
const w = h && h[0];
|
|
1035
|
+
if (D += f, w == null)
|
|
1036
|
+
return H(), 0;
|
|
1037
|
+
if (me.type === "begin" && h.type === "end" && me.index === h.index && w === "") {
|
|
1038
|
+
if (D += _.slice(h.index, h.index + 1), !c) {
|
|
1039
|
+
const C = new Error(`0 width match regex (${u})`);
|
|
1040
|
+
throw C.languageName = u, C.badRule = me.rule, C;
|
|
1041
1041
|
}
|
|
1042
1042
|
return 1;
|
|
1043
1043
|
}
|
|
1044
|
-
if (
|
|
1045
|
-
return
|
|
1046
|
-
if (
|
|
1047
|
-
const
|
|
1048
|
-
throw
|
|
1049
|
-
} else if (
|
|
1050
|
-
const
|
|
1051
|
-
if (
|
|
1052
|
-
return
|
|
1044
|
+
if (me = h, h.type === "begin")
|
|
1045
|
+
return xn(h);
|
|
1046
|
+
if (h.type === "illegal" && !T) {
|
|
1047
|
+
const C = new Error('Illegal lexeme "' + w + '" for mode "' + (N.scope || "<unnamed>") + '"');
|
|
1048
|
+
throw C.mode = N, C;
|
|
1049
|
+
} else if (h.type === "end") {
|
|
1050
|
+
const C = Cn(h);
|
|
1051
|
+
if (C !== rn)
|
|
1052
|
+
return C;
|
|
1053
1053
|
}
|
|
1054
|
-
if (
|
|
1054
|
+
if (h.type === "illegal" && w === "")
|
|
1055
1055
|
return 1;
|
|
1056
|
-
if (xe > 1e5 && xe >
|
|
1056
|
+
if (xe > 1e5 && xe > h.index * 3)
|
|
1057
1057
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1058
|
-
return
|
|
1058
|
+
return D += w, w.length;
|
|
1059
1059
|
}
|
|
1060
|
-
const X =
|
|
1060
|
+
const X = $(u);
|
|
1061
1061
|
if (!X)
|
|
1062
|
-
throw J(
|
|
1063
|
-
const Dn =
|
|
1064
|
-
let Oe = "",
|
|
1065
|
-
const Qe = {},
|
|
1062
|
+
throw J(l.replace("{}", u)), new Error('Unknown language: "' + u + '"');
|
|
1063
|
+
const Dn = It(X);
|
|
1064
|
+
let Oe = "", N = O || Dn;
|
|
1065
|
+
const Qe = {}, B = new i.__emitter(i);
|
|
1066
1066
|
Ln();
|
|
1067
|
-
let
|
|
1067
|
+
let D = "", ye = 0, j = 0, xe = 0, Ce = !1;
|
|
1068
1068
|
try {
|
|
1069
|
-
for (
|
|
1070
|
-
xe++,
|
|
1071
|
-
const
|
|
1072
|
-
if (!
|
|
1069
|
+
for (N.matcher.considerAll(); ; ) {
|
|
1070
|
+
xe++, Ce ? Ce = !1 : N.matcher.considerAll(), N.matcher.lastIndex = j;
|
|
1071
|
+
const f = N.matcher.exec(_);
|
|
1072
|
+
if (!f)
|
|
1073
1073
|
break;
|
|
1074
|
-
const
|
|
1075
|
-
j =
|
|
1074
|
+
const h = _.substring(j, f.index), w = Ze(h, f);
|
|
1075
|
+
j = f.index + w;
|
|
1076
1076
|
}
|
|
1077
|
-
return Ze(
|
|
1077
|
+
return Ze(_.substring(j)), B.closeAllNodes(), B.finalize(), Oe = B.toHTML(), {
|
|
1078
1078
|
language: u,
|
|
1079
1079
|
value: Oe,
|
|
1080
|
-
relevance:
|
|
1080
|
+
relevance: ye,
|
|
1081
1081
|
illegal: !1,
|
|
1082
|
-
_emitter:
|
|
1083
|
-
_top:
|
|
1082
|
+
_emitter: B,
|
|
1083
|
+
_top: N
|
|
1084
1084
|
};
|
|
1085
|
-
} catch (
|
|
1086
|
-
if (
|
|
1085
|
+
} catch (f) {
|
|
1086
|
+
if (f.message && f.message.includes("Illegal"))
|
|
1087
1087
|
return {
|
|
1088
1088
|
language: u,
|
|
1089
|
-
value:
|
|
1089
|
+
value: Le(_),
|
|
1090
1090
|
illegal: !0,
|
|
1091
1091
|
relevance: 0,
|
|
1092
1092
|
_illegalBy: {
|
|
1093
|
-
message:
|
|
1093
|
+
message: f.message,
|
|
1094
1094
|
index: j,
|
|
1095
|
-
context:
|
|
1096
|
-
mode:
|
|
1095
|
+
context: _.slice(j - 100, j + 100),
|
|
1096
|
+
mode: f.mode,
|
|
1097
1097
|
resultSoFar: Oe
|
|
1098
1098
|
},
|
|
1099
|
-
_emitter:
|
|
1099
|
+
_emitter: B
|
|
1100
1100
|
};
|
|
1101
|
-
if (
|
|
1101
|
+
if (c)
|
|
1102
1102
|
return {
|
|
1103
1103
|
language: u,
|
|
1104
|
-
value:
|
|
1104
|
+
value: Le(_),
|
|
1105
1105
|
illegal: !1,
|
|
1106
1106
|
relevance: 0,
|
|
1107
|
-
errorRaised:
|
|
1108
|
-
_emitter:
|
|
1109
|
-
_top:
|
|
1107
|
+
errorRaised: f,
|
|
1108
|
+
_emitter: B,
|
|
1109
|
+
_top: N
|
|
1110
1110
|
};
|
|
1111
|
-
throw
|
|
1111
|
+
throw f;
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1115
|
-
const
|
|
1116
|
-
value:
|
|
1114
|
+
function b(u) {
|
|
1115
|
+
const _ = {
|
|
1116
|
+
value: Le(u),
|
|
1117
1117
|
illegal: !1,
|
|
1118
1118
|
relevance: 0,
|
|
1119
|
-
_top:
|
|
1120
|
-
_emitter: new
|
|
1119
|
+
_top: r,
|
|
1120
|
+
_emitter: new i.__emitter(i)
|
|
1121
1121
|
};
|
|
1122
|
-
return
|
|
1122
|
+
return _._emitter.addText(u), _;
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1125
|
-
|
|
1126
|
-
const T =
|
|
1127
|
-
(
|
|
1124
|
+
function E(u, _) {
|
|
1125
|
+
_ = _ || i.languages || Object.keys(n);
|
|
1126
|
+
const T = b(u), O = _.filter($).filter(te).map(
|
|
1127
|
+
(H) => d(H, u, !1)
|
|
1128
1128
|
);
|
|
1129
|
-
|
|
1130
|
-
const I =
|
|
1131
|
-
if (
|
|
1132
|
-
return Q.relevance -
|
|
1133
|
-
if (
|
|
1134
|
-
if (
|
|
1129
|
+
O.unshift(T);
|
|
1130
|
+
const I = O.sort((H, Q) => {
|
|
1131
|
+
if (H.relevance !== Q.relevance)
|
|
1132
|
+
return Q.relevance - H.relevance;
|
|
1133
|
+
if (H.language && Q.language) {
|
|
1134
|
+
if ($(H.language).supersetOf === Q.language)
|
|
1135
1135
|
return 1;
|
|
1136
|
-
if (
|
|
1136
|
+
if ($(Q.language).supersetOf === H.language)
|
|
1137
1137
|
return -1;
|
|
1138
1138
|
}
|
|
1139
1139
|
return 0;
|
|
1140
|
-
}), [
|
|
1141
|
-
return
|
|
1140
|
+
}), [P, K] = I, Ee = P;
|
|
1141
|
+
return Ee.secondBest = K, Ee;
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const
|
|
1145
|
-
u.classList.add("hljs"), u.classList.add(`language-${
|
|
1143
|
+
function v(u, _, T) {
|
|
1144
|
+
const O = _ && t[_] || T;
|
|
1145
|
+
u.classList.add("hljs"), u.classList.add(`language-${O}`);
|
|
1146
1146
|
}
|
|
1147
1147
|
function g(u) {
|
|
1148
|
-
let
|
|
1148
|
+
let _ = null;
|
|
1149
1149
|
const T = o(u);
|
|
1150
1150
|
if (a(T))
|
|
1151
1151
|
return;
|
|
1152
1152
|
if (se(
|
|
1153
1153
|
"before:highlightElement",
|
|
1154
1154
|
{ el: u, language: T }
|
|
1155
|
-
), u.children.length > 0 && (
|
|
1156
|
-
throw new
|
|
1155
|
+
), u.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(u)), i.throwUnescapedHTML))
|
|
1156
|
+
throw new Bt(
|
|
1157
1157
|
"One of your code blocks includes unescaped HTML.",
|
|
1158
1158
|
u.innerHTML
|
|
1159
1159
|
);
|
|
1160
|
-
|
|
1161
|
-
const
|
|
1162
|
-
u.innerHTML = I.value,
|
|
1160
|
+
_ = u;
|
|
1161
|
+
const O = _.textContent, I = T ? p(O, { language: T, ignoreIllegals: !0 }) : E(O);
|
|
1162
|
+
u.innerHTML = I.value, v(u, T, I.language), u.result = {
|
|
1163
1163
|
language: I.language,
|
|
1164
1164
|
// TODO: remove with version 11.0
|
|
1165
1165
|
re: I.relevance,
|
|
@@ -1167,127 +1167,127 @@ https://github.com/highlightjs/highlight.js/issues/2277`), I = u, M = b), T ===
|
|
|
1167
1167
|
}, I.secondBest && (u.secondBest = {
|
|
1168
1168
|
language: I.secondBest.language,
|
|
1169
1169
|
relevance: I.secondBest.relevance
|
|
1170
|
-
}), se("after:highlightElement", { el: u, result: I, text:
|
|
1170
|
+
}), se("after:highlightElement", { el: u, result: I, text: O });
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1173
|
-
|
|
1172
|
+
function m(u) {
|
|
1173
|
+
i = sn(i, u);
|
|
1174
1174
|
}
|
|
1175
1175
|
const S = () => {
|
|
1176
|
-
|
|
1176
|
+
A(), ie("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1177
1177
|
};
|
|
1178
|
-
function
|
|
1179
|
-
|
|
1178
|
+
function M() {
|
|
1179
|
+
A(), ie("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1180
1180
|
}
|
|
1181
|
-
let
|
|
1182
|
-
function
|
|
1181
|
+
let x = !1;
|
|
1182
|
+
function A() {
|
|
1183
1183
|
if (document.readyState === "loading") {
|
|
1184
|
-
|
|
1184
|
+
x = !0;
|
|
1185
1185
|
return;
|
|
1186
1186
|
}
|
|
1187
|
-
document.querySelectorAll(
|
|
1187
|
+
document.querySelectorAll(i.cssSelector).forEach(g);
|
|
1188
1188
|
}
|
|
1189
1189
|
function L() {
|
|
1190
|
-
|
|
1190
|
+
x && A();
|
|
1191
1191
|
}
|
|
1192
1192
|
typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded", L, !1);
|
|
1193
|
-
function
|
|
1193
|
+
function k(u, _) {
|
|
1194
1194
|
let T = null;
|
|
1195
1195
|
try {
|
|
1196
|
-
T =
|
|
1197
|
-
} catch (
|
|
1198
|
-
if (J("Language definition for '{}' could not be registered.".replace("{}", u)),
|
|
1199
|
-
J(
|
|
1196
|
+
T = _(e);
|
|
1197
|
+
} catch (O) {
|
|
1198
|
+
if (J("Language definition for '{}' could not be registered.".replace("{}", u)), c)
|
|
1199
|
+
J(O);
|
|
1200
1200
|
else
|
|
1201
|
-
throw
|
|
1202
|
-
T =
|
|
1201
|
+
throw O;
|
|
1202
|
+
T = r;
|
|
1203
1203
|
}
|
|
1204
|
-
T.name || (T.name = u), n[u] = T, T.rawDefinition =
|
|
1204
|
+
T.name || (T.name = u), n[u] = T, T.rawDefinition = _.bind(null, e), T.aliases && ne(T.aliases, { languageName: u });
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function R(u) {
|
|
1207
1207
|
delete n[u];
|
|
1208
|
-
for (const
|
|
1209
|
-
t[
|
|
1208
|
+
for (const _ of Object.keys(t))
|
|
1209
|
+
t[_] === u && delete t[_];
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function z() {
|
|
1212
1212
|
return Object.keys(n);
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function $(u) {
|
|
1215
1215
|
return u = (u || "").toLowerCase(), n[u] || n[t[u]];
|
|
1216
1216
|
}
|
|
1217
|
-
function ne(u, { languageName:
|
|
1217
|
+
function ne(u, { languageName: _ }) {
|
|
1218
1218
|
typeof u == "string" && (u = [u]), u.forEach((T) => {
|
|
1219
|
-
t[T.toLowerCase()] =
|
|
1219
|
+
t[T.toLowerCase()] = _;
|
|
1220
1220
|
});
|
|
1221
1221
|
}
|
|
1222
1222
|
function te(u) {
|
|
1223
|
-
const
|
|
1224
|
-
return
|
|
1223
|
+
const _ = $(u);
|
|
1224
|
+
return _ && !_.disableAutodetect;
|
|
1225
1225
|
}
|
|
1226
1226
|
function oe(u) {
|
|
1227
|
-
u["before:highlightBlock"] && !u["before:highlightElement"] && (u["before:highlightElement"] = (
|
|
1227
|
+
u["before:highlightBlock"] && !u["before:highlightElement"] && (u["before:highlightElement"] = (_) => {
|
|
1228
1228
|
u["before:highlightBlock"](
|
|
1229
|
-
Object.assign({ block:
|
|
1229
|
+
Object.assign({ block: _.el }, _)
|
|
1230
1230
|
);
|
|
1231
|
-
}), u["after:highlightBlock"] && !u["after:highlightElement"] && (u["after:highlightElement"] = (
|
|
1231
|
+
}), u["after:highlightBlock"] && !u["after:highlightElement"] && (u["after:highlightElement"] = (_) => {
|
|
1232
1232
|
u["after:highlightBlock"](
|
|
1233
|
-
Object.assign({ block:
|
|
1233
|
+
Object.assign({ block: _.el }, _)
|
|
1234
1234
|
);
|
|
1235
1235
|
});
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function ce(u) {
|
|
1238
1238
|
oe(u), s.push(u);
|
|
1239
1239
|
}
|
|
1240
|
-
function se(u,
|
|
1240
|
+
function se(u, _) {
|
|
1241
1241
|
const T = u;
|
|
1242
|
-
s.forEach(function(
|
|
1243
|
-
|
|
1242
|
+
s.forEach(function(O) {
|
|
1243
|
+
O[T] && O[T](_);
|
|
1244
1244
|
});
|
|
1245
1245
|
}
|
|
1246
1246
|
function be(u) {
|
|
1247
|
-
return
|
|
1247
|
+
return ie("10.7.0", "highlightBlock will be removed entirely in v12.0"), ie("10.7.0", "Please use highlightElement now."), g(u);
|
|
1248
1248
|
}
|
|
1249
1249
|
Object.assign(e, {
|
|
1250
1250
|
highlight: p,
|
|
1251
|
-
highlightAuto:
|
|
1252
|
-
highlightAll:
|
|
1251
|
+
highlightAuto: E,
|
|
1252
|
+
highlightAll: A,
|
|
1253
1253
|
highlightElement: g,
|
|
1254
1254
|
// TODO: Remove with v12 API
|
|
1255
1255
|
highlightBlock: be,
|
|
1256
|
-
configure:
|
|
1256
|
+
configure: m,
|
|
1257
1257
|
initHighlighting: S,
|
|
1258
|
-
initHighlightingOnLoad:
|
|
1259
|
-
registerLanguage:
|
|
1260
|
-
unregisterLanguage:
|
|
1261
|
-
listLanguages:
|
|
1262
|
-
getLanguage:
|
|
1258
|
+
initHighlightingOnLoad: M,
|
|
1259
|
+
registerLanguage: k,
|
|
1260
|
+
unregisterLanguage: R,
|
|
1261
|
+
listLanguages: z,
|
|
1262
|
+
getLanguage: $,
|
|
1263
1263
|
registerAliases: ne,
|
|
1264
1264
|
autoDetection: te,
|
|
1265
1265
|
inherit: sn,
|
|
1266
|
-
addPlugin:
|
|
1266
|
+
addPlugin: ce
|
|
1267
1267
|
}), e.debugMode = function() {
|
|
1268
|
-
|
|
1268
|
+
c = !1;
|
|
1269
1269
|
}, e.safeMode = function() {
|
|
1270
|
-
|
|
1271
|
-
}, e.versionString =
|
|
1270
|
+
c = !0;
|
|
1271
|
+
}, e.versionString = $t, e.regex = {
|
|
1272
1272
|
concat: ee,
|
|
1273
1273
|
lookahead: _n,
|
|
1274
1274
|
either: ze,
|
|
1275
|
-
optional:
|
|
1276
|
-
anyNumberOfTimes:
|
|
1275
|
+
optional: jn,
|
|
1276
|
+
anyNumberOfTimes: Vn
|
|
1277
1277
|
};
|
|
1278
|
-
for (const u in
|
|
1279
|
-
typeof
|
|
1280
|
-
return Object.assign(e,
|
|
1278
|
+
for (const u in Ne)
|
|
1279
|
+
typeof Ne[u] == "object" && Ue.exports(Ne[u]);
|
|
1280
|
+
return Object.assign(e, Ne), e;
|
|
1281
1281
|
};
|
|
1282
|
-
var
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
const G =
|
|
1286
|
-
function
|
|
1287
|
-
const n = e.regex, t = n.concat(/[\p{L}_]/u, n.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), s = /[\p{L}0-9._:-]+/u,
|
|
1282
|
+
var de = Pt({}), Ht = de;
|
|
1283
|
+
de.HighlightJS = de;
|
|
1284
|
+
de.default = de;
|
|
1285
|
+
const G = Ht;
|
|
1286
|
+
function zt(e) {
|
|
1287
|
+
const n = e.regex, t = n.concat(/[\p{L}_]/u, n.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), s = /[\p{L}0-9._:-]+/u, c = {
|
|
1288
1288
|
className: "symbol",
|
|
1289
1289
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1290
|
-
},
|
|
1290
|
+
}, l = {
|
|
1291
1291
|
begin: /\s/,
|
|
1292
1292
|
contains: [
|
|
1293
1293
|
{
|
|
@@ -1296,10 +1296,10 @@ function Ht(e) {
|
|
|
1296
1296
|
illegal: /\n/
|
|
1297
1297
|
}
|
|
1298
1298
|
]
|
|
1299
|
-
},
|
|
1299
|
+
}, r = e.inherit(l, {
|
|
1300
1300
|
begin: /\(/,
|
|
1301
1301
|
end: /\)/
|
|
1302
|
-
}),
|
|
1302
|
+
}), i = e.inherit(e.APOS_STRING_MODE, { className: "string" }), a = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), o = {
|
|
1303
1303
|
endsWithParent: !0,
|
|
1304
1304
|
illegal: /</,
|
|
1305
1305
|
relevance: 0,
|
|
@@ -1320,12 +1320,12 @@ function Ht(e) {
|
|
|
1320
1320
|
{
|
|
1321
1321
|
begin: /"/,
|
|
1322
1322
|
end: /"/,
|
|
1323
|
-
contains: [
|
|
1323
|
+
contains: [c]
|
|
1324
1324
|
},
|
|
1325
1325
|
{
|
|
1326
1326
|
begin: /'/,
|
|
1327
1327
|
end: /'/,
|
|
1328
|
-
contains: [
|
|
1328
|
+
contains: [c]
|
|
1329
1329
|
},
|
|
1330
1330
|
{ begin: /[^\s"'=<>`]+/ }
|
|
1331
1331
|
]
|
|
@@ -1357,10 +1357,10 @@ function Ht(e) {
|
|
|
1357
1357
|
end: />/,
|
|
1358
1358
|
relevance: 10,
|
|
1359
1359
|
contains: [
|
|
1360
|
-
|
|
1360
|
+
l,
|
|
1361
1361
|
a,
|
|
1362
|
-
r,
|
|
1363
1362
|
i,
|
|
1363
|
+
r,
|
|
1364
1364
|
{
|
|
1365
1365
|
begin: /\[/,
|
|
1366
1366
|
end: /\]/,
|
|
@@ -1370,10 +1370,10 @@ function Ht(e) {
|
|
|
1370
1370
|
begin: /<![a-z]/,
|
|
1371
1371
|
end: />/,
|
|
1372
1372
|
contains: [
|
|
1373
|
-
|
|
1374
|
-
|
|
1373
|
+
l,
|
|
1374
|
+
r,
|
|
1375
1375
|
a,
|
|
1376
|
-
|
|
1376
|
+
i
|
|
1377
1377
|
]
|
|
1378
1378
|
}
|
|
1379
1379
|
]
|
|
@@ -1390,7 +1390,7 @@ function Ht(e) {
|
|
|
1390
1390
|
end: /\]\]>/,
|
|
1391
1391
|
relevance: 10
|
|
1392
1392
|
},
|
|
1393
|
-
|
|
1393
|
+
c,
|
|
1394
1394
|
// xml processing instructions
|
|
1395
1395
|
{
|
|
1396
1396
|
className: "meta",
|
|
@@ -1499,7 +1499,7 @@ function Ht(e) {
|
|
|
1499
1499
|
]
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
1502
|
-
const an = "[A-Za-z$_][0-9A-Za-z$_]*",
|
|
1502
|
+
const an = "[A-Za-z$_][0-9A-Za-z$_]*", Ft = [
|
|
1503
1503
|
"as",
|
|
1504
1504
|
// for exports
|
|
1505
1505
|
"in",
|
|
@@ -1542,7 +1542,7 @@ const an = "[A-Za-z$_][0-9A-Za-z$_]*", zt = [
|
|
|
1542
1542
|
"from",
|
|
1543
1543
|
"export",
|
|
1544
1544
|
"extends"
|
|
1545
|
-
],
|
|
1545
|
+
], Gt = [
|
|
1546
1546
|
"true",
|
|
1547
1547
|
"false",
|
|
1548
1548
|
"null",
|
|
@@ -1626,7 +1626,7 @@ const an = "[A-Za-z$_][0-9A-Za-z$_]*", zt = [
|
|
|
1626
1626
|
"encodeURIComponent",
|
|
1627
1627
|
"escape",
|
|
1628
1628
|
"unescape"
|
|
1629
|
-
],
|
|
1629
|
+
], Kt = [
|
|
1630
1630
|
"arguments",
|
|
1631
1631
|
"this",
|
|
1632
1632
|
"super",
|
|
@@ -1637,27 +1637,27 @@ const an = "[A-Za-z$_][0-9A-Za-z$_]*", zt = [
|
|
|
1637
1637
|
"module",
|
|
1638
1638
|
"global"
|
|
1639
1639
|
// Node.js
|
|
1640
|
-
],
|
|
1640
|
+
], Wt = [].concat(
|
|
1641
1641
|
Sn,
|
|
1642
1642
|
An,
|
|
1643
1643
|
wn
|
|
1644
1644
|
);
|
|
1645
|
-
function
|
|
1646
|
-
const n = e.regex, t = (
|
|
1647
|
-
const
|
|
1648
|
-
return
|
|
1649
|
-
}, s = an,
|
|
1645
|
+
function qt(e) {
|
|
1646
|
+
const n = e.regex, t = (_, { after: T }) => {
|
|
1647
|
+
const O = "</" + _[0].slice(1);
|
|
1648
|
+
return _.input.indexOf(O, T) !== -1;
|
|
1649
|
+
}, s = an, c = {
|
|
1650
1650
|
begin: "<>",
|
|
1651
1651
|
end: "</>"
|
|
1652
|
-
},
|
|
1652
|
+
}, l = /<[A-Za-z0-9\\._:-]+\s*\/>/, r = {
|
|
1653
1653
|
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
1654
1654
|
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
1655
1655
|
/**
|
|
1656
1656
|
* @param {RegExpMatchArray} match
|
|
1657
1657
|
* @param {CallbackResponse} response
|
|
1658
1658
|
*/
|
|
1659
|
-
isTrulyOpeningTag: (
|
|
1660
|
-
const
|
|
1659
|
+
isTrulyOpeningTag: (_, T) => {
|
|
1660
|
+
const O = _[0].length + _.index, I = _.input[O];
|
|
1661
1661
|
if (
|
|
1662
1662
|
// HTML should not include another raw `<` inside a tag
|
|
1663
1663
|
// nested type?
|
|
@@ -1669,25 +1669,25 @@ function Wt(e) {
|
|
|
1669
1669
|
T.ignoreMatch();
|
|
1670
1670
|
return;
|
|
1671
1671
|
}
|
|
1672
|
-
I === ">" && (t(
|
|
1673
|
-
let
|
|
1674
|
-
const K =
|
|
1675
|
-
if (
|
|
1672
|
+
I === ">" && (t(_, { after: O }) || T.ignoreMatch());
|
|
1673
|
+
let P;
|
|
1674
|
+
const K = _.input.substring(O);
|
|
1675
|
+
if (P = K.match(/^\s*=/)) {
|
|
1676
1676
|
T.ignoreMatch();
|
|
1677
1677
|
return;
|
|
1678
1678
|
}
|
|
1679
|
-
if ((
|
|
1679
|
+
if ((P = K.match(/^\s+extends\s+/)) && P.index === 0) {
|
|
1680
1680
|
T.ignoreMatch();
|
|
1681
1681
|
return;
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
|
-
},
|
|
1684
|
+
}, i = {
|
|
1685
1685
|
$pattern: an,
|
|
1686
|
-
keyword:
|
|
1687
|
-
literal:
|
|
1688
|
-
built_in:
|
|
1689
|
-
"variable.language":
|
|
1690
|
-
}, a = "[0-9](_?[0-9])*", o = `\\.(${a})`, p = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",
|
|
1686
|
+
keyword: Ft,
|
|
1687
|
+
literal: Gt,
|
|
1688
|
+
built_in: Wt,
|
|
1689
|
+
"variable.language": Kt
|
|
1690
|
+
}, a = "[0-9](_?[0-9])*", o = `\\.(${a})`, p = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", d = {
|
|
1691
1691
|
className: "number",
|
|
1692
1692
|
variants: [
|
|
1693
1693
|
// DecimalLiteral
|
|
@@ -1704,14 +1704,14 @@ function Wt(e) {
|
|
|
1704
1704
|
{ begin: "\\b0[0-7]+n?\\b" }
|
|
1705
1705
|
],
|
|
1706
1706
|
relevance: 0
|
|
1707
|
-
},
|
|
1707
|
+
}, b = {
|
|
1708
1708
|
className: "subst",
|
|
1709
1709
|
begin: "\\$\\{",
|
|
1710
1710
|
end: "\\}",
|
|
1711
|
-
keywords:
|
|
1711
|
+
keywords: i,
|
|
1712
1712
|
contains: []
|
|
1713
1713
|
// defined later
|
|
1714
|
-
},
|
|
1714
|
+
}, E = {
|
|
1715
1715
|
begin: "html`",
|
|
1716
1716
|
end: "",
|
|
1717
1717
|
starts: {
|
|
@@ -1719,11 +1719,11 @@ function Wt(e) {
|
|
|
1719
1719
|
returnEnd: !1,
|
|
1720
1720
|
contains: [
|
|
1721
1721
|
e.BACKSLASH_ESCAPE,
|
|
1722
|
-
|
|
1722
|
+
b
|
|
1723
1723
|
],
|
|
1724
1724
|
subLanguage: "xml"
|
|
1725
1725
|
}
|
|
1726
|
-
},
|
|
1726
|
+
}, v = {
|
|
1727
1727
|
begin: "css`",
|
|
1728
1728
|
end: "",
|
|
1729
1729
|
starts: {
|
|
@@ -1731,7 +1731,7 @@ function Wt(e) {
|
|
|
1731
1731
|
returnEnd: !1,
|
|
1732
1732
|
contains: [
|
|
1733
1733
|
e.BACKSLASH_ESCAPE,
|
|
1734
|
-
|
|
1734
|
+
b
|
|
1735
1735
|
],
|
|
1736
1736
|
subLanguage: "css"
|
|
1737
1737
|
}
|
|
@@ -1741,7 +1741,7 @@ function Wt(e) {
|
|
|
1741
1741
|
end: "`",
|
|
1742
1742
|
contains: [
|
|
1743
1743
|
e.BACKSLASH_ESCAPE,
|
|
1744
|
-
|
|
1744
|
+
b
|
|
1745
1745
|
]
|
|
1746
1746
|
}, S = {
|
|
1747
1747
|
className: "comment",
|
|
@@ -1788,36 +1788,36 @@ function Wt(e) {
|
|
|
1788
1788
|
e.C_BLOCK_COMMENT_MODE,
|
|
1789
1789
|
e.C_LINE_COMMENT_MODE
|
|
1790
1790
|
]
|
|
1791
|
-
},
|
|
1791
|
+
}, M = [
|
|
1792
1792
|
e.APOS_STRING_MODE,
|
|
1793
1793
|
e.QUOTE_STRING_MODE,
|
|
1794
|
-
|
|
1795
|
-
|
|
1794
|
+
E,
|
|
1795
|
+
v,
|
|
1796
1796
|
g,
|
|
1797
1797
|
// Skip numbers when they are part of a variable name
|
|
1798
1798
|
{ match: /\$\d+/ },
|
|
1799
|
-
|
|
1799
|
+
d
|
|
1800
1800
|
// This is intentional:
|
|
1801
1801
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
1802
1802
|
// hljs.REGEXP_MODE
|
|
1803
1803
|
];
|
|
1804
|
-
|
|
1804
|
+
b.contains = M.concat({
|
|
1805
1805
|
// we need to pair up {} inside our subst to prevent
|
|
1806
1806
|
// it from ending too early by matching another }
|
|
1807
1807
|
begin: /\{/,
|
|
1808
1808
|
end: /\}/,
|
|
1809
|
-
keywords:
|
|
1809
|
+
keywords: i,
|
|
1810
1810
|
contains: [
|
|
1811
1811
|
"self"
|
|
1812
|
-
].concat(
|
|
1812
|
+
].concat(M)
|
|
1813
1813
|
});
|
|
1814
|
-
const
|
|
1814
|
+
const x = [].concat(S, b.contains), A = x.concat([
|
|
1815
1815
|
// eat recursive parens in sub expressions
|
|
1816
1816
|
{
|
|
1817
1817
|
begin: /\(/,
|
|
1818
1818
|
end: /\)/,
|
|
1819
|
-
keywords:
|
|
1820
|
-
contains: ["self"].concat(
|
|
1819
|
+
keywords: i,
|
|
1820
|
+
contains: ["self"].concat(x)
|
|
1821
1821
|
}
|
|
1822
1822
|
]), L = {
|
|
1823
1823
|
className: "params",
|
|
@@ -1825,9 +1825,9 @@ function Wt(e) {
|
|
|
1825
1825
|
end: /\)/,
|
|
1826
1826
|
excludeBegin: !0,
|
|
1827
1827
|
excludeEnd: !0,
|
|
1828
|
-
keywords:
|
|
1829
|
-
contains:
|
|
1830
|
-
},
|
|
1828
|
+
keywords: i,
|
|
1829
|
+
contains: A
|
|
1830
|
+
}, k = {
|
|
1831
1831
|
variants: [
|
|
1832
1832
|
// class Car extends vehicle
|
|
1833
1833
|
{
|
|
@@ -1860,7 +1860,7 @@ function Wt(e) {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
]
|
|
1863
|
-
},
|
|
1863
|
+
}, R = {
|
|
1864
1864
|
relevance: 0,
|
|
1865
1865
|
match: n.either(
|
|
1866
1866
|
// Hard coded exceptions
|
|
@@ -1884,12 +1884,12 @@ function Wt(e) {
|
|
|
1884
1884
|
...wn
|
|
1885
1885
|
]
|
|
1886
1886
|
}
|
|
1887
|
-
},
|
|
1887
|
+
}, z = {
|
|
1888
1888
|
label: "use_strict",
|
|
1889
1889
|
className: "meta",
|
|
1890
1890
|
relevance: 10,
|
|
1891
1891
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
1892
|
-
},
|
|
1892
|
+
}, $ = {
|
|
1893
1893
|
variants: [
|
|
1894
1894
|
{
|
|
1895
1895
|
match: [
|
|
@@ -1919,8 +1919,8 @@ function Wt(e) {
|
|
|
1919
1919
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
1920
1920
|
className: "variable.constant"
|
|
1921
1921
|
};
|
|
1922
|
-
function te(
|
|
1923
|
-
return n.concat("(?!",
|
|
1922
|
+
function te(_) {
|
|
1923
|
+
return n.concat("(?!", _.join("|"), ")");
|
|
1924
1924
|
}
|
|
1925
1925
|
const oe = {
|
|
1926
1926
|
match: n.concat(
|
|
@@ -1935,7 +1935,7 @@ function Wt(e) {
|
|
|
1935
1935
|
),
|
|
1936
1936
|
className: "title.function",
|
|
1937
1937
|
relevance: 0
|
|
1938
|
-
},
|
|
1938
|
+
}, ce = {
|
|
1939
1939
|
begin: n.concat(/\./, n.lookahead(
|
|
1940
1940
|
n.concat(s, /(?![0-9A-Za-z$_(])/)
|
|
1941
1941
|
)),
|
|
@@ -1985,9 +1985,9 @@ function Wt(e) {
|
|
|
1985
1985
|
return {
|
|
1986
1986
|
name: "Javascript",
|
|
1987
1987
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
1988
|
-
keywords:
|
|
1988
|
+
keywords: i,
|
|
1989
1989
|
// this will be extended by TypeScript
|
|
1990
|
-
exports: { PARAMS_CONTAINS:
|
|
1990
|
+
exports: { PARAMS_CONTAINS: A, CLASS_REFERENCE: R },
|
|
1991
1991
|
illegal: /#(?![$_A-z])/,
|
|
1992
1992
|
contains: [
|
|
1993
1993
|
e.SHEBANG({
|
|
@@ -1995,17 +1995,17 @@ function Wt(e) {
|
|
|
1995
1995
|
binary: "node",
|
|
1996
1996
|
relevance: 5
|
|
1997
1997
|
}),
|
|
1998
|
-
|
|
1998
|
+
z,
|
|
1999
1999
|
e.APOS_STRING_MODE,
|
|
2000
2000
|
e.QUOTE_STRING_MODE,
|
|
2001
|
-
|
|
2002
|
-
|
|
2001
|
+
E,
|
|
2002
|
+
v,
|
|
2003
2003
|
g,
|
|
2004
2004
|
S,
|
|
2005
2005
|
// Skip numbers when they are part of a variable name
|
|
2006
2006
|
{ match: /\$\d+/ },
|
|
2007
|
-
|
|
2008
|
-
|
|
2007
|
+
d,
|
|
2008
|
+
R,
|
|
2009
2009
|
{
|
|
2010
2010
|
className: "attr",
|
|
2011
2011
|
begin: s + n.lookahead(":"),
|
|
@@ -2046,8 +2046,8 @@ function Wt(e) {
|
|
|
2046
2046
|
end: /\)/,
|
|
2047
2047
|
excludeBegin: !0,
|
|
2048
2048
|
excludeEnd: !0,
|
|
2049
|
-
keywords:
|
|
2050
|
-
contains:
|
|
2049
|
+
keywords: i,
|
|
2050
|
+
contains: A
|
|
2051
2051
|
}
|
|
2052
2052
|
]
|
|
2053
2053
|
}
|
|
@@ -2065,21 +2065,21 @@ function Wt(e) {
|
|
|
2065
2065
|
{
|
|
2066
2066
|
// JSX
|
|
2067
2067
|
variants: [
|
|
2068
|
-
{ begin:
|
|
2069
|
-
{ match:
|
|
2068
|
+
{ begin: c.begin, end: c.end },
|
|
2069
|
+
{ match: l },
|
|
2070
2070
|
{
|
|
2071
|
-
begin:
|
|
2071
|
+
begin: r.begin,
|
|
2072
2072
|
// we carefully check the opening tag to see if it truly
|
|
2073
2073
|
// is a tag and not a false positive
|
|
2074
|
-
"on:begin":
|
|
2075
|
-
end:
|
|
2074
|
+
"on:begin": r.isTrulyOpeningTag,
|
|
2075
|
+
end: r.end
|
|
2076
2076
|
}
|
|
2077
2077
|
],
|
|
2078
2078
|
subLanguage: "xml",
|
|
2079
2079
|
contains: [
|
|
2080
2080
|
{
|
|
2081
|
-
begin:
|
|
2082
|
-
end:
|
|
2081
|
+
begin: r.begin,
|
|
2082
|
+
end: r.end,
|
|
2083
2083
|
skip: !0,
|
|
2084
2084
|
contains: ["self"]
|
|
2085
2085
|
}
|
|
@@ -2087,7 +2087,7 @@ function Wt(e) {
|
|
|
2087
2087
|
}
|
|
2088
2088
|
]
|
|
2089
2089
|
},
|
|
2090
|
-
|
|
2090
|
+
$,
|
|
2091
2091
|
{
|
|
2092
2092
|
// prevent this from getting swallowed up by function
|
|
2093
2093
|
// since they appear "function like"
|
|
@@ -2111,7 +2111,7 @@ function Wt(e) {
|
|
|
2111
2111
|
match: /\.\.\./,
|
|
2112
2112
|
relevance: 0
|
|
2113
2113
|
},
|
|
2114
|
-
|
|
2114
|
+
ce,
|
|
2115
2115
|
// hack: prevents detection of keywords in some circumstances
|
|
2116
2116
|
// .keyword()
|
|
2117
2117
|
// $keyword = x
|
|
@@ -2126,7 +2126,7 @@ function Wt(e) {
|
|
|
2126
2126
|
},
|
|
2127
2127
|
oe,
|
|
2128
2128
|
ne,
|
|
2129
|
-
|
|
2129
|
+
k,
|
|
2130
2130
|
se,
|
|
2131
2131
|
{
|
|
2132
2132
|
match: /\$[(.]/
|
|
@@ -2135,7 +2135,7 @@ function Wt(e) {
|
|
|
2135
2135
|
]
|
|
2136
2136
|
};
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function Yt(e) {
|
|
2139
2139
|
const n = {
|
|
2140
2140
|
className: "attr",
|
|
2141
2141
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
@@ -2148,7 +2148,7 @@ function qt(e) {
|
|
|
2148
2148
|
"true",
|
|
2149
2149
|
"false",
|
|
2150
2150
|
"null"
|
|
2151
|
-
],
|
|
2151
|
+
], c = {
|
|
2152
2152
|
scope: "literal",
|
|
2153
2153
|
beginKeywords: s.join(" ")
|
|
2154
2154
|
};
|
|
@@ -2161,7 +2161,7 @@ function qt(e) {
|
|
|
2161
2161
|
n,
|
|
2162
2162
|
t,
|
|
2163
2163
|
e.QUOTE_STRING_MODE,
|
|
2164
|
-
|
|
2164
|
+
c,
|
|
2165
2165
|
e.C_NUMBER_MODE,
|
|
2166
2166
|
e.C_LINE_COMMENT_MODE,
|
|
2167
2167
|
e.C_BLOCK_COMMENT_MODE
|
|
@@ -2169,7 +2169,7 @@ function qt(e) {
|
|
|
2169
2169
|
illegal: "\\S"
|
|
2170
2170
|
};
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2172
|
+
function Zt(e) {
|
|
2173
2173
|
const n = "true false yes no null", t = "[\\w#;/?:@&=+$,.~*'()[\\]]+", s = {
|
|
2174
2174
|
className: "attr",
|
|
2175
2175
|
variants: [
|
|
@@ -2183,7 +2183,7 @@ function Yt(e) {
|
|
|
2183
2183
|
begin: "'\\w[\\w :\\/.-]*':(?=[ ]|$)"
|
|
2184
2184
|
}
|
|
2185
2185
|
]
|
|
2186
|
-
},
|
|
2186
|
+
}, c = {
|
|
2187
2187
|
className: "template-variable",
|
|
2188
2188
|
variants: [
|
|
2189
2189
|
{
|
|
@@ -2197,7 +2197,7 @@ function Yt(e) {
|
|
|
2197
2197
|
end: /\}/
|
|
2198
2198
|
}
|
|
2199
2199
|
]
|
|
2200
|
-
},
|
|
2200
|
+
}, l = {
|
|
2201
2201
|
className: "string",
|
|
2202
2202
|
relevance: 0,
|
|
2203
2203
|
variants: [
|
|
@@ -2213,9 +2213,9 @@ function Yt(e) {
|
|
|
2213
2213
|
],
|
|
2214
2214
|
contains: [
|
|
2215
2215
|
e.BACKSLASH_ESCAPE,
|
|
2216
|
-
|
|
2216
|
+
c
|
|
2217
2217
|
]
|
|
2218
|
-
},
|
|
2218
|
+
}, r = e.inherit(l, { variants: [
|
|
2219
2219
|
{
|
|
2220
2220
|
begin: /'/,
|
|
2221
2221
|
end: /'/
|
|
@@ -2225,25 +2225,25 @@ function Yt(e) {
|
|
|
2225
2225
|
end: /"/
|
|
2226
2226
|
},
|
|
2227
2227
|
{ begin: /[^\s,{}[\]]+/ }
|
|
2228
|
-
] }),
|
|
2228
|
+
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", o = "(\\.[0-9]*)?", p = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", d = {
|
|
2229
2229
|
className: "number",
|
|
2230
|
-
begin: "\\b" +
|
|
2231
|
-
},
|
|
2230
|
+
begin: "\\b" + i + a + o + p + "\\b"
|
|
2231
|
+
}, b = {
|
|
2232
2232
|
end: ",",
|
|
2233
2233
|
endsWithParent: !0,
|
|
2234
2234
|
excludeEnd: !0,
|
|
2235
2235
|
keywords: n,
|
|
2236
2236
|
relevance: 0
|
|
2237
|
-
},
|
|
2237
|
+
}, E = {
|
|
2238
2238
|
begin: /\{/,
|
|
2239
2239
|
end: /\}/,
|
|
2240
|
-
contains: [
|
|
2240
|
+
contains: [b],
|
|
2241
2241
|
illegal: "\\n",
|
|
2242
2242
|
relevance: 0
|
|
2243
|
-
},
|
|
2243
|
+
}, v = {
|
|
2244
2244
|
begin: "\\[",
|
|
2245
2245
|
end: "\\]",
|
|
2246
|
-
contains: [
|
|
2246
|
+
contains: [b],
|
|
2247
2247
|
illegal: "\\n",
|
|
2248
2248
|
relevance: 0
|
|
2249
2249
|
}, g = [
|
|
@@ -2314,7 +2314,7 @@ function Yt(e) {
|
|
|
2314
2314
|
beginKeywords: n,
|
|
2315
2315
|
keywords: { literal: n }
|
|
2316
2316
|
},
|
|
2317
|
-
|
|
2317
|
+
d,
|
|
2318
2318
|
// numbers are any valid C-style number that
|
|
2319
2319
|
// sit isolated from other words
|
|
2320
2320
|
{
|
|
@@ -2322,18 +2322,18 @@ function Yt(e) {
|
|
|
2322
2322
|
begin: e.C_NUMBER_RE + "\\b",
|
|
2323
2323
|
relevance: 0
|
|
2324
2324
|
},
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
],
|
|
2329
|
-
return
|
|
2325
|
+
E,
|
|
2326
|
+
v,
|
|
2327
|
+
l
|
|
2328
|
+
], m = [...g];
|
|
2329
|
+
return m.pop(), m.push(r), b.contains = m, {
|
|
2330
2330
|
name: "YAML",
|
|
2331
2331
|
case_insensitive: !0,
|
|
2332
2332
|
aliases: ["yml"],
|
|
2333
2333
|
contains: g
|
|
2334
2334
|
};
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2336
|
+
function Qt(e) {
|
|
2337
2337
|
return {
|
|
2338
2338
|
name: "Plain text",
|
|
2339
2339
|
aliases: [
|
|
@@ -2343,7 +2343,7 @@ function Zt(e) {
|
|
|
2343
2343
|
disableAutodetect: !0
|
|
2344
2344
|
};
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2346
|
+
function Xt(e) {
|
|
2347
2347
|
const n = e.regex, t = /[\p{XID_Start}_]\p{XID_Continue}*/u, s = [
|
|
2348
2348
|
"and",
|
|
2349
2349
|
"as",
|
|
@@ -2379,7 +2379,7 @@ function Qt(e) {
|
|
|
2379
2379
|
"while",
|
|
2380
2380
|
"with",
|
|
2381
2381
|
"yield"
|
|
2382
|
-
],
|
|
2382
|
+
], i = {
|
|
2383
2383
|
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
2384
2384
|
keyword: s,
|
|
2385
2385
|
built_in: [
|
|
@@ -2483,12 +2483,12 @@ function Qt(e) {
|
|
|
2483
2483
|
className: "subst",
|
|
2484
2484
|
begin: /\{/,
|
|
2485
2485
|
end: /\}/,
|
|
2486
|
-
keywords:
|
|
2486
|
+
keywords: i,
|
|
2487
2487
|
illegal: /#/
|
|
2488
2488
|
}, p = {
|
|
2489
2489
|
begin: /\{\{/,
|
|
2490
2490
|
relevance: 0
|
|
2491
|
-
},
|
|
2491
|
+
}, d = {
|
|
2492
2492
|
className: "string",
|
|
2493
2493
|
contains: [e.BACKSLASH_ESCAPE],
|
|
2494
2494
|
variants: [
|
|
@@ -2569,7 +2569,7 @@ function Qt(e) {
|
|
|
2569
2569
|
e.APOS_STRING_MODE,
|
|
2570
2570
|
e.QUOTE_STRING_MODE
|
|
2571
2571
|
]
|
|
2572
|
-
},
|
|
2572
|
+
}, b = "[0-9](_?[0-9])*", E = `(\\b(${b}))?\\.(${b})|\\b(${b})\\.`, v = `\\b|${s.join("|")}`, g = {
|
|
2573
2573
|
className: "number",
|
|
2574
2574
|
relevance: 0,
|
|
2575
2575
|
variants: [
|
|
@@ -2584,10 +2584,10 @@ function Qt(e) {
|
|
|
2584
2584
|
// because both MUST contain a decimal point and so cannot be confused with
|
|
2585
2585
|
// the interior part of an identifier
|
|
2586
2586
|
{
|
|
2587
|
-
begin: `(\\b(${
|
|
2587
|
+
begin: `(\\b(${b})|(${E}))[eE][+-]?(${b})[jJ]?(?=${v})`
|
|
2588
2588
|
},
|
|
2589
2589
|
{
|
|
2590
|
-
begin: `(${
|
|
2590
|
+
begin: `(${E})[jJ]?`
|
|
2591
2591
|
},
|
|
2592
2592
|
// decinteger, bininteger, octinteger, hexinteger
|
|
2593
2593
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
|
|
@@ -2596,28 +2596,28 @@ function Qt(e) {
|
|
|
2596
2596
|
// decinteger is optionally imaginary
|
|
2597
2597
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
2598
2598
|
{
|
|
2599
|
-
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${
|
|
2599
|
+
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${v})`
|
|
2600
2600
|
},
|
|
2601
2601
|
{
|
|
2602
|
-
begin: `\\b0[bB](_?[01])+[lL]?(?=${
|
|
2602
|
+
begin: `\\b0[bB](_?[01])+[lL]?(?=${v})`
|
|
2603
2603
|
},
|
|
2604
2604
|
{
|
|
2605
|
-
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${
|
|
2605
|
+
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${v})`
|
|
2606
2606
|
},
|
|
2607
2607
|
{
|
|
2608
|
-
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${
|
|
2608
|
+
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${v})`
|
|
2609
2609
|
},
|
|
2610
2610
|
// imagnumber (digitpart-based)
|
|
2611
2611
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
2612
2612
|
{
|
|
2613
|
-
begin: `\\b(${
|
|
2613
|
+
begin: `\\b(${b})[jJ](?=${v})`
|
|
2614
2614
|
}
|
|
2615
2615
|
]
|
|
2616
|
-
},
|
|
2616
|
+
}, m = {
|
|
2617
2617
|
className: "comment",
|
|
2618
2618
|
begin: n.lookahead(/# type:/),
|
|
2619
2619
|
end: /$/,
|
|
2620
|
-
keywords:
|
|
2620
|
+
keywords: i,
|
|
2621
2621
|
contains: [
|
|
2622
2622
|
{
|
|
2623
2623
|
// prevent keywords from coloring `type`
|
|
@@ -2644,19 +2644,19 @@ function Qt(e) {
|
|
|
2644
2644
|
end: /\)/,
|
|
2645
2645
|
excludeBegin: !0,
|
|
2646
2646
|
excludeEnd: !0,
|
|
2647
|
-
keywords:
|
|
2647
|
+
keywords: i,
|
|
2648
2648
|
contains: [
|
|
2649
2649
|
"self",
|
|
2650
2650
|
a,
|
|
2651
2651
|
g,
|
|
2652
|
-
|
|
2652
|
+
d,
|
|
2653
2653
|
e.HASH_COMMENT_MODE
|
|
2654
2654
|
]
|
|
2655
2655
|
}
|
|
2656
2656
|
]
|
|
2657
2657
|
};
|
|
2658
2658
|
return o.contains = [
|
|
2659
|
-
|
|
2659
|
+
d,
|
|
2660
2660
|
g,
|
|
2661
2661
|
a
|
|
2662
2662
|
], {
|
|
@@ -2667,7 +2667,7 @@ function Qt(e) {
|
|
|
2667
2667
|
"ipython"
|
|
2668
2668
|
],
|
|
2669
2669
|
unicodeRegex: !0,
|
|
2670
|
-
keywords:
|
|
2670
|
+
keywords: i,
|
|
2671
2671
|
illegal: /(<\/|->|\?)|=>/,
|
|
2672
2672
|
contains: [
|
|
2673
2673
|
a,
|
|
@@ -2682,8 +2682,8 @@ function Qt(e) {
|
|
|
2682
2682
|
beginKeywords: "if",
|
|
2683
2683
|
relevance: 0
|
|
2684
2684
|
},
|
|
2685
|
-
|
|
2686
|
-
|
|
2685
|
+
d,
|
|
2686
|
+
m,
|
|
2687
2687
|
e.HASH_COMMENT_MODE,
|
|
2688
2688
|
{
|
|
2689
2689
|
match: [
|
|
@@ -2731,28 +2731,28 @@ function Qt(e) {
|
|
|
2731
2731
|
contains: [
|
|
2732
2732
|
g,
|
|
2733
2733
|
S,
|
|
2734
|
-
|
|
2734
|
+
d
|
|
2735
2735
|
]
|
|
2736
2736
|
}
|
|
2737
2737
|
]
|
|
2738
2738
|
};
|
|
2739
2739
|
}
|
|
2740
|
-
var
|
|
2740
|
+
var re = "[0-9](_*[0-9])*", Te = `\\.(${re})`, Ae = "[0-9a-fA-F](_*[0-9a-fA-F])*", on = {
|
|
2741
2741
|
className: "number",
|
|
2742
2742
|
variants: [
|
|
2743
2743
|
// DecimalFloatingPointLiteral
|
|
2744
2744
|
// including ExponentPart
|
|
2745
|
-
{ begin: `(\\b(${
|
|
2745
|
+
{ begin: `(\\b(${re})((${Te})|\\.)?|(${Te}))[eE][+-]?(${re})[fFdD]?\\b` },
|
|
2746
2746
|
// excluding ExponentPart
|
|
2747
|
-
{ begin: `\\b(${
|
|
2748
|
-
{ begin: `(${
|
|
2749
|
-
{ begin: `\\b(${
|
|
2747
|
+
{ begin: `\\b(${re})((${Te})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
2748
|
+
{ begin: `(${Te})[fFdD]?\\b` },
|
|
2749
|
+
{ begin: `\\b(${re})[fFdD]\\b` },
|
|
2750
2750
|
// HexadecimalFloatingPointLiteral
|
|
2751
|
-
{ begin: `\\b0[xX]((${
|
|
2751
|
+
{ begin: `\\b0[xX]((${Ae})\\.?|(${Ae})?\\.(${Ae}))[pP][+-]?(${re})[fFdD]?\\b` },
|
|
2752
2752
|
// DecimalIntegerLiteral
|
|
2753
2753
|
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
2754
2754
|
// HexIntegerLiteral
|
|
2755
|
-
{ begin: `\\b0[xX](${
|
|
2755
|
+
{ begin: `\\b0[xX](${Ae})[lL]?\\b` },
|
|
2756
2756
|
// OctalIntegerLiteral
|
|
2757
2757
|
{ begin: "\\b0(_*[0-7])*[lL]?\\b" },
|
|
2758
2758
|
// BinaryIntegerLiteral
|
|
@@ -2763,7 +2763,7 @@ var ie = "[0-9](_*[0-9])*", Ne = `\\.(${ie})`, Te = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
2763
2763
|
function Mn(e, n, t) {
|
|
2764
2764
|
return t === -1 ? "" : e.replace(n, (s) => Mn(e, n, t - 1));
|
|
2765
2765
|
}
|
|
2766
|
-
function
|
|
2766
|
+
function Vt(e) {
|
|
2767
2767
|
const n = e.regex, t = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", s = t + Mn("(?:<" + t + "~~~(?:\\s*,\\s*" + t + "~~~)*>)?", /~~~/g, 2), a = {
|
|
2768
2768
|
keyword: [
|
|
2769
2769
|
"synchronized",
|
|
@@ -2972,7 +2972,7 @@ function Xt(e) {
|
|
|
2972
2972
|
]
|
|
2973
2973
|
};
|
|
2974
2974
|
}
|
|
2975
|
-
function
|
|
2975
|
+
function jt(e) {
|
|
2976
2976
|
const n = e.regex, t = {}, s = {
|
|
2977
2977
|
begin: /\$\{/,
|
|
2978
2978
|
end: /\}/,
|
|
@@ -2997,12 +2997,12 @@ function Vt(e) {
|
|
|
2997
2997
|
s
|
|
2998
2998
|
]
|
|
2999
2999
|
});
|
|
3000
|
-
const
|
|
3000
|
+
const c = {
|
|
3001
3001
|
className: "subst",
|
|
3002
3002
|
begin: /\$\(/,
|
|
3003
3003
|
end: /\)/,
|
|
3004
3004
|
contains: [e.BACKSLASH_ESCAPE]
|
|
3005
|
-
},
|
|
3005
|
+
}, l = {
|
|
3006
3006
|
begin: /<<-?\s*(?=\w+)/,
|
|
3007
3007
|
starts: { contains: [
|
|
3008
3008
|
e.END_SAME_AS_BEGIN({
|
|
@@ -3011,18 +3011,18 @@ function Vt(e) {
|
|
|
3011
3011
|
className: "string"
|
|
3012
3012
|
})
|
|
3013
3013
|
] }
|
|
3014
|
-
},
|
|
3014
|
+
}, r = {
|
|
3015
3015
|
className: "string",
|
|
3016
3016
|
begin: /"/,
|
|
3017
3017
|
end: /"/,
|
|
3018
3018
|
contains: [
|
|
3019
3019
|
e.BACKSLASH_ESCAPE,
|
|
3020
3020
|
t,
|
|
3021
|
-
|
|
3021
|
+
c
|
|
3022
3022
|
]
|
|
3023
3023
|
};
|
|
3024
|
-
|
|
3025
|
-
const
|
|
3024
|
+
c.contains.push(r);
|
|
3025
|
+
const i = {
|
|
3026
3026
|
className: "",
|
|
3027
3027
|
begin: /\\"/
|
|
3028
3028
|
}, a = {
|
|
@@ -3050,16 +3050,16 @@ function Vt(e) {
|
|
|
3050
3050
|
"tcsh",
|
|
3051
3051
|
"dash",
|
|
3052
3052
|
"scsh"
|
|
3053
|
-
],
|
|
3053
|
+
], d = e.SHEBANG({
|
|
3054
3054
|
binary: `(${p.join("|")})`,
|
|
3055
3055
|
relevance: 10
|
|
3056
|
-
}),
|
|
3056
|
+
}), b = {
|
|
3057
3057
|
className: "function",
|
|
3058
3058
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3059
3059
|
returnBegin: !0,
|
|
3060
3060
|
contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
|
|
3061
3061
|
relevance: 0
|
|
3062
|
-
},
|
|
3062
|
+
}, E = [
|
|
3063
3063
|
"if",
|
|
3064
3064
|
"then",
|
|
3065
3065
|
"else",
|
|
@@ -3073,10 +3073,10 @@ function Vt(e) {
|
|
|
3073
3073
|
"case",
|
|
3074
3074
|
"esac",
|
|
3075
3075
|
"function"
|
|
3076
|
-
],
|
|
3076
|
+
], v = [
|
|
3077
3077
|
"true",
|
|
3078
3078
|
"false"
|
|
3079
|
-
], g = { match: /(\/[a-z._-]+)+/ },
|
|
3079
|
+
], g = { match: /(\/[a-z._-]+)+/ }, m = [
|
|
3080
3080
|
"break",
|
|
3081
3081
|
"cd",
|
|
3082
3082
|
"continue",
|
|
@@ -3117,7 +3117,7 @@ function Vt(e) {
|
|
|
3117
3117
|
"typeset",
|
|
3118
3118
|
"ulimit",
|
|
3119
3119
|
"unalias"
|
|
3120
|
-
],
|
|
3120
|
+
], M = [
|
|
3121
3121
|
"autoload",
|
|
3122
3122
|
"bg",
|
|
3123
3123
|
"bindkey",
|
|
@@ -3186,7 +3186,7 @@ function Vt(e) {
|
|
|
3186
3186
|
"zsocket",
|
|
3187
3187
|
"zstyle",
|
|
3188
3188
|
"ztcp"
|
|
3189
|
-
],
|
|
3189
|
+
], x = [
|
|
3190
3190
|
"chcon",
|
|
3191
3191
|
"chgrp",
|
|
3192
3192
|
"chown",
|
|
@@ -3296,36 +3296,36 @@ function Vt(e) {
|
|
|
3296
3296
|
aliases: ["sh"],
|
|
3297
3297
|
keywords: {
|
|
3298
3298
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
3299
|
-
keyword:
|
|
3300
|
-
literal:
|
|
3299
|
+
keyword: E,
|
|
3300
|
+
literal: v,
|
|
3301
3301
|
built_in: [
|
|
3302
|
-
...
|
|
3302
|
+
...m,
|
|
3303
3303
|
...S,
|
|
3304
3304
|
// Shell modifiers
|
|
3305
3305
|
"set",
|
|
3306
3306
|
"shopt",
|
|
3307
|
-
...
|
|
3308
|
-
...
|
|
3307
|
+
...M,
|
|
3308
|
+
...x
|
|
3309
3309
|
]
|
|
3310
3310
|
},
|
|
3311
3311
|
contains: [
|
|
3312
|
-
|
|
3312
|
+
d,
|
|
3313
3313
|
// to catch known shells and boost relevancy
|
|
3314
3314
|
e.SHEBANG(),
|
|
3315
3315
|
// to catch unknown shells but still highlight the shebang
|
|
3316
|
-
|
|
3316
|
+
b,
|
|
3317
3317
|
o,
|
|
3318
3318
|
e.HASH_COMMENT_MODE,
|
|
3319
|
-
|
|
3319
|
+
l,
|
|
3320
3320
|
g,
|
|
3321
|
-
i,
|
|
3322
3321
|
r,
|
|
3322
|
+
i,
|
|
3323
3323
|
a,
|
|
3324
3324
|
t
|
|
3325
3325
|
]
|
|
3326
3326
|
};
|
|
3327
3327
|
}
|
|
3328
|
-
function
|
|
3328
|
+
function Jt(e) {
|
|
3329
3329
|
const n = e.regex, t = e.COMMENT("--", "$"), s = {
|
|
3330
3330
|
className: "string",
|
|
3331
3331
|
variants: [
|
|
@@ -3335,22 +3335,22 @@ function jt(e) {
|
|
|
3335
3335
|
contains: [{ begin: /''/ }]
|
|
3336
3336
|
}
|
|
3337
3337
|
]
|
|
3338
|
-
},
|
|
3338
|
+
}, c = {
|
|
3339
3339
|
begin: /"/,
|
|
3340
3340
|
end: /"/,
|
|
3341
3341
|
contains: [{ begin: /""/ }]
|
|
3342
|
-
},
|
|
3342
|
+
}, l = [
|
|
3343
3343
|
"true",
|
|
3344
3344
|
"false",
|
|
3345
3345
|
// Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
|
|
3346
3346
|
// "null",
|
|
3347
3347
|
"unknown"
|
|
3348
|
-
],
|
|
3348
|
+
], r = [
|
|
3349
3349
|
"double precision",
|
|
3350
3350
|
"large object",
|
|
3351
3351
|
"with timezone",
|
|
3352
3352
|
"without timezone"
|
|
3353
|
-
],
|
|
3353
|
+
], i = [
|
|
3354
3354
|
"bigint",
|
|
3355
3355
|
"binary",
|
|
3356
3356
|
"blob",
|
|
@@ -3841,7 +3841,7 @@ function jt(e) {
|
|
|
3841
3841
|
"var_pop",
|
|
3842
3842
|
"var_samp",
|
|
3843
3843
|
"width_bucket"
|
|
3844
|
-
],
|
|
3844
|
+
], d = [
|
|
3845
3845
|
"current_catalog",
|
|
3846
3846
|
"current_date",
|
|
3847
3847
|
"current_default_transform_group",
|
|
@@ -3857,7 +3857,7 @@ function jt(e) {
|
|
|
3857
3857
|
"localtime",
|
|
3858
3858
|
"current_timestamp",
|
|
3859
3859
|
"localtimestamp"
|
|
3860
|
-
],
|
|
3860
|
+
], b = [
|
|
3861
3861
|
"create table",
|
|
3862
3862
|
"insert into",
|
|
3863
3863
|
"primary key",
|
|
@@ -3874,27 +3874,27 @@ function jt(e) {
|
|
|
3874
3874
|
"nulls last",
|
|
3875
3875
|
"depth first",
|
|
3876
3876
|
"breadth first"
|
|
3877
|
-
],
|
|
3877
|
+
], E = p, v = [
|
|
3878
3878
|
...o,
|
|
3879
3879
|
...a
|
|
3880
|
-
].filter((
|
|
3880
|
+
].filter((x) => !p.includes(x)), g = {
|
|
3881
3881
|
className: "variable",
|
|
3882
3882
|
begin: /@[a-z0-9]+/
|
|
3883
|
-
},
|
|
3883
|
+
}, m = {
|
|
3884
3884
|
className: "operator",
|
|
3885
3885
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
3886
3886
|
relevance: 0
|
|
3887
3887
|
}, S = {
|
|
3888
|
-
begin: n.concat(/\b/, n.either(...
|
|
3888
|
+
begin: n.concat(/\b/, n.either(...E), /\s*\(/),
|
|
3889
3889
|
relevance: 0,
|
|
3890
|
-
keywords: { built_in:
|
|
3890
|
+
keywords: { built_in: E }
|
|
3891
3891
|
};
|
|
3892
|
-
function x
|
|
3893
|
-
exceptions:
|
|
3892
|
+
function M(x, {
|
|
3893
|
+
exceptions: A,
|
|
3894
3894
|
when: L
|
|
3895
3895
|
} = {}) {
|
|
3896
|
-
const
|
|
3897
|
-
return
|
|
3896
|
+
const k = L;
|
|
3897
|
+
return A = A || [], x.map((R) => R.match(/\|\d+$/) || A.includes(R) ? R : k(R) ? `${R}|0` : R);
|
|
3898
3898
|
}
|
|
3899
3899
|
return {
|
|
3900
3900
|
name: "SQL",
|
|
@@ -3903,245 +3903,260 @@ function jt(e) {
|
|
|
3903
3903
|
illegal: /[{}]|<\//,
|
|
3904
3904
|
keywords: {
|
|
3905
3905
|
$pattern: /\b[\w\.]+/,
|
|
3906
|
-
keyword:
|
|
3907
|
-
literal:
|
|
3908
|
-
type:
|
|
3909
|
-
built_in:
|
|
3906
|
+
keyword: M(v, { when: (x) => x.length < 3 }),
|
|
3907
|
+
literal: l,
|
|
3908
|
+
type: i,
|
|
3909
|
+
built_in: d
|
|
3910
3910
|
},
|
|
3911
3911
|
contains: [
|
|
3912
3912
|
{
|
|
3913
|
-
begin: n.either(...
|
|
3913
|
+
begin: n.either(...b),
|
|
3914
3914
|
relevance: 0,
|
|
3915
3915
|
keywords: {
|
|
3916
3916
|
$pattern: /[\w\.]+/,
|
|
3917
|
-
keyword:
|
|
3918
|
-
literal:
|
|
3919
|
-
type:
|
|
3917
|
+
keyword: v.concat(b),
|
|
3918
|
+
literal: l,
|
|
3919
|
+
type: i
|
|
3920
3920
|
}
|
|
3921
3921
|
},
|
|
3922
3922
|
{
|
|
3923
3923
|
className: "type",
|
|
3924
|
-
begin: n.either(...
|
|
3924
|
+
begin: n.either(...r)
|
|
3925
3925
|
},
|
|
3926
3926
|
S,
|
|
3927
3927
|
g,
|
|
3928
3928
|
s,
|
|
3929
|
-
|
|
3929
|
+
c,
|
|
3930
3930
|
e.C_NUMBER_MODE,
|
|
3931
3931
|
e.C_BLOCK_COMMENT_MODE,
|
|
3932
3932
|
t,
|
|
3933
|
-
|
|
3933
|
+
m
|
|
3934
3934
|
]
|
|
3935
3935
|
};
|
|
3936
3936
|
}
|
|
3937
|
-
G.registerLanguage("xml",
|
|
3938
|
-
G.registerLanguage("javascript",
|
|
3939
|
-
G.registerLanguage("json",
|
|
3940
|
-
G.registerLanguage("yaml",
|
|
3941
|
-
G.registerLanguage("plaintext",
|
|
3942
|
-
G.registerLanguage("python",
|
|
3943
|
-
G.registerLanguage("java",
|
|
3944
|
-
G.registerLanguage("bash",
|
|
3945
|
-
G.registerLanguage("sql",
|
|
3946
|
-
var
|
|
3947
|
-
const q = "<code-diff-modified>", Y = "</code-diff-modified>",
|
|
3948
|
-
(
|
|
3937
|
+
G.registerLanguage("xml", zt);
|
|
3938
|
+
G.registerLanguage("javascript", qt);
|
|
3939
|
+
G.registerLanguage("json", Yt);
|
|
3940
|
+
G.registerLanguage("yaml", Zt);
|
|
3941
|
+
G.registerLanguage("plaintext", Qt);
|
|
3942
|
+
G.registerLanguage("python", Xt);
|
|
3943
|
+
G.registerLanguage("java", Vt);
|
|
3944
|
+
G.registerLanguage("bash", jt);
|
|
3945
|
+
G.registerLanguage("sql", Jt);
|
|
3946
|
+
var y = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(y || {});
|
|
3947
|
+
const q = "<code-diff-modified>", Y = "</code-diff-modified>", es = q.replace("<", "<").replace(">", ">"), ns = Y.replace("<", "<").replace(">", ">"), ae = (e) => e === void 0 ? y.EQUAL : e.added ? y.ADD : e.removed ? y.DELETE : y.EQUAL, Me = (e, n, t = "word") => typeof e > "u" ? n : typeof n > "u" ? e : (t === "char" ? zn : Gn)(e, n).filter((c) => ae(c) !== y.DELETE).map(
|
|
3948
|
+
(c) => ae(c) === y.ADD ? `${q}${c.value}${Y}` : c.value
|
|
3949
3949
|
).join(""), F = (e, n) => {
|
|
3950
3950
|
if (!n.match(new RegExp(`(${q}|${Y})`, "g")))
|
|
3951
3951
|
return G.highlight(n, { language: e }).value;
|
|
3952
3952
|
let s = n;
|
|
3953
|
-
const
|
|
3954
|
-
|
|
3955
|
-
let
|
|
3956
|
-
const
|
|
3953
|
+
const c = n.replace(new RegExp(`(${q}|${Y})`, "g"), ""), l = document.createElement("div");
|
|
3954
|
+
l.innerHTML = G.highlight(c, { language: e }).value;
|
|
3955
|
+
let r = !1;
|
|
3956
|
+
const i = (a) => {
|
|
3957
3957
|
a.childNodes.forEach((o) => {
|
|
3958
|
-
if (o.nodeType === Node.ELEMENT_NODE &&
|
|
3958
|
+
if (o.nodeType === Node.ELEMENT_NODE && i(o), o.nodeType === Node.TEXT_NODE) {
|
|
3959
3959
|
if (!o.textContent)
|
|
3960
3960
|
return;
|
|
3961
|
-
let p = o.textContent,
|
|
3962
|
-
for (
|
|
3961
|
+
let p = o.textContent, d = "";
|
|
3962
|
+
for (r && (d = d + q); p.length; ) {
|
|
3963
3963
|
if (s.startsWith(q)) {
|
|
3964
|
-
s = s.slice(q.length),
|
|
3964
|
+
s = s.slice(q.length), d = d + q, r = !0;
|
|
3965
3965
|
continue;
|
|
3966
3966
|
}
|
|
3967
3967
|
if (s.startsWith(Y)) {
|
|
3968
|
-
s = s.slice(Y.length),
|
|
3968
|
+
s = s.slice(Y.length), d = d + Y, r = !1;
|
|
3969
3969
|
continue;
|
|
3970
3970
|
}
|
|
3971
|
-
const
|
|
3972
|
-
|
|
3971
|
+
const b = s.match(new RegExp(`(${q}|${Y})`)), E = b && b.index ? b.index : s.length, v = Math.min(E, p.length);
|
|
3972
|
+
d = d + s.substring(0, v), s = s.slice(v), p = p.slice(v);
|
|
3973
3973
|
}
|
|
3974
|
-
|
|
3974
|
+
r && (d = d + Y), o.textContent = d;
|
|
3975
3975
|
}
|
|
3976
3976
|
});
|
|
3977
3977
|
};
|
|
3978
|
-
return
|
|
3978
|
+
return i(l), l.innerHTML.replace(new RegExp(es, "g"), '<span class="x">').replace(new RegExp(ns, "g"), "</span>");
|
|
3979
3979
|
};
|
|
3980
|
-
function
|
|
3981
|
-
|
|
3982
|
-
|
|
3980
|
+
function Rn(e) {
|
|
3981
|
+
const n = (c, l) => (c.match(new RegExp(l, "g")) || []).length;
|
|
3982
|
+
let t = 0, s = 0;
|
|
3983
|
+
for (const c of e)
|
|
3984
|
+
c.added && (t += n(c.value.trim(), `
|
|
3985
|
+
`) + 1), c.removed && (s += n(c.value.trim(), `
|
|
3986
|
+
`) + 1);
|
|
3987
|
+
return { additionsNum: t, deletionsNum: s };
|
|
3988
|
+
}
|
|
3989
|
+
function ts(e, n, t = "plaintext", s = "word", c = 10) {
|
|
3990
|
+
var v;
|
|
3991
|
+
const l = () => ({ type: y.EMPTY }), r = (g, m, S) => ({ type: g, num: m, code: S }), i = gn(e, n);
|
|
3983
3992
|
let a = 0, o = 0, p = !1;
|
|
3984
|
-
const
|
|
3985
|
-
|
|
3993
|
+
const d = [], b = {
|
|
3994
|
+
changes: d,
|
|
3995
|
+
stat: Rn(i)
|
|
3996
|
+
};
|
|
3997
|
+
for (let g = 0; g < i.length; g++) {
|
|
3986
3998
|
if (p) {
|
|
3987
3999
|
p = !1;
|
|
3988
4000
|
continue;
|
|
3989
4001
|
}
|
|
3990
|
-
const [
|
|
4002
|
+
const [m, S] = [i[g], i[g + 1]], [M, x] = [ae(m), ae(S)], A = m.value.replace(/\n$/, "").split(`
|
|
3991
4003
|
`);
|
|
3992
|
-
if (
|
|
3993
|
-
for (const
|
|
3994
|
-
let
|
|
3995
|
-
const
|
|
3996
|
-
|
|
4004
|
+
if (S === void 0) {
|
|
4005
|
+
for (const k of A) {
|
|
4006
|
+
let R = l(), z = l();
|
|
4007
|
+
const $ = F(t, k);
|
|
4008
|
+
M === y.EQUAL && (a++, o++, R = r(y.EQUAL, a, $), z = r(y.EQUAL, o, $)), M === y.DELETE && (a++, R = r(y.DELETE, a, $), z = l()), M === y.ADD && (o++, R = l(), z = r(y.ADD, o, $)), d.push({ left: R, right: z });
|
|
3997
4009
|
}
|
|
3998
4010
|
break;
|
|
3999
4011
|
}
|
|
4000
|
-
if (
|
|
4001
|
-
for (const
|
|
4012
|
+
if (M === y.EQUAL)
|
|
4013
|
+
for (const k of A) {
|
|
4002
4014
|
a++, o++;
|
|
4003
|
-
const
|
|
4004
|
-
|
|
4005
|
-
left:
|
|
4006
|
-
right:
|
|
4015
|
+
const R = F(t, k);
|
|
4016
|
+
d.push({
|
|
4017
|
+
left: r(y.EQUAL, a, R),
|
|
4018
|
+
right: r(y.EQUAL, o, R)
|
|
4007
4019
|
});
|
|
4008
4020
|
}
|
|
4009
|
-
const
|
|
4021
|
+
const L = S.value.replace(/\n$/, "").split(`
|
|
4010
4022
|
`);
|
|
4011
|
-
if (
|
|
4012
|
-
if (x ===
|
|
4013
|
-
for (const
|
|
4014
|
-
a++,
|
|
4015
|
-
left:
|
|
4016
|
-
right:
|
|
4023
|
+
if (M === y.DELETE) {
|
|
4024
|
+
if (x === y.EQUAL)
|
|
4025
|
+
for (const k of A)
|
|
4026
|
+
a++, d.push({
|
|
4027
|
+
left: r(y.DELETE, a, F(t, k)),
|
|
4028
|
+
right: l()
|
|
4017
4029
|
});
|
|
4018
|
-
if (x ===
|
|
4030
|
+
if (x === y.ADD) {
|
|
4019
4031
|
p = !0;
|
|
4020
|
-
const
|
|
4021
|
-
for (let
|
|
4022
|
-
|
|
4023
|
-
const [
|
|
4024
|
-
|
|
4032
|
+
const k = Math.max(m.count, S.count);
|
|
4033
|
+
for (let R = 0; R < k; R++) {
|
|
4034
|
+
R < m.count && a++, R < S.count && o++;
|
|
4035
|
+
const [z, $] = [A[R], L[R]], ne = A.length === L.length ? Me($, z, s) : z, te = A.length === L.length ? Me(z, $, s) : $, oe = R < m.count ? r(y.DELETE, a, F(t, ne)) : l(), ce = R < S.count ? r(y.ADD, o, F(t, te)) : l();
|
|
4036
|
+
d.push({ left: oe, right: ce });
|
|
4025
4037
|
}
|
|
4026
4038
|
}
|
|
4027
4039
|
}
|
|
4028
|
-
if (
|
|
4029
|
-
for (const
|
|
4030
|
-
o++,
|
|
4031
|
-
left:
|
|
4032
|
-
right:
|
|
4040
|
+
if (M === y.ADD)
|
|
4041
|
+
for (const k of A)
|
|
4042
|
+
o++, d.push({
|
|
4043
|
+
left: l(),
|
|
4044
|
+
right: r(y.ADD, o, F(t, k))
|
|
4033
4045
|
});
|
|
4034
4046
|
}
|
|
4035
4047
|
if (e === n) {
|
|
4036
|
-
for (let
|
|
4037
|
-
|
|
4038
|
-
return
|
|
4048
|
+
for (let g = 0; g < d.length; g++)
|
|
4049
|
+
d[g].fold = !1;
|
|
4050
|
+
return b;
|
|
4039
4051
|
}
|
|
4040
|
-
for (let
|
|
4041
|
-
const
|
|
4042
|
-
if (
|
|
4043
|
-
const [
|
|
4044
|
-
for (let x =
|
|
4045
|
-
|
|
4052
|
+
for (let g = 0; g < d.length; g++) {
|
|
4053
|
+
const m = d[g];
|
|
4054
|
+
if (m.left.type === y.DELETE || m.right.type === y.ADD) {
|
|
4055
|
+
const [S, M] = [Math.max(g - c, 0), Math.min(g + c + 1, d.length)];
|
|
4056
|
+
for (let x = S; x < M; x++)
|
|
4057
|
+
d[x].fold = !1;
|
|
4046
4058
|
}
|
|
4047
|
-
|
|
4059
|
+
m.fold === void 0 && (m.fold = !0);
|
|
4048
4060
|
}
|
|
4049
|
-
const
|
|
4050
|
-
for (let
|
|
4051
|
-
const
|
|
4052
|
-
if (
|
|
4053
|
-
|
|
4061
|
+
const E = [];
|
|
4062
|
+
for (let g = 0; g < d.length; g++) {
|
|
4063
|
+
const m = d[g];
|
|
4064
|
+
if (m.fold === !1) {
|
|
4065
|
+
E.push(m);
|
|
4054
4066
|
continue;
|
|
4055
4067
|
}
|
|
4056
|
-
|
|
4068
|
+
m.fold === !0 && ((v = E[E.length - 1]) == null ? void 0 : v.fold) !== !0 && E.push(m);
|
|
4057
4069
|
}
|
|
4058
|
-
return
|
|
4070
|
+
return b.changes = E, b;
|
|
4059
4071
|
}
|
|
4060
|
-
function
|
|
4061
|
-
var
|
|
4062
|
-
const
|
|
4063
|
-
let
|
|
4064
|
-
const o = []
|
|
4065
|
-
|
|
4072
|
+
function ss(e, n, t = "plaintext", s = "word", c = 2) {
|
|
4073
|
+
var b;
|
|
4074
|
+
const l = gn(e, n);
|
|
4075
|
+
let r = 0, i = 0, a = !1;
|
|
4076
|
+
const o = [], p = {
|
|
4077
|
+
changes: o,
|
|
4078
|
+
stat: Rn(l)
|
|
4079
|
+
};
|
|
4080
|
+
for (let E = 0; E < l.length; E++) {
|
|
4066
4081
|
if (a) {
|
|
4067
4082
|
a = !1;
|
|
4068
4083
|
continue;
|
|
4069
4084
|
}
|
|
4070
|
-
const [
|
|
4085
|
+
const [v, g] = [l[E], l[E + 1]], [m, S] = [ae(v), ae(g)], M = v.value.replace(/\n$/, "").split(`
|
|
4071
4086
|
`);
|
|
4072
|
-
if (
|
|
4073
|
-
for (const
|
|
4074
|
-
|
|
4075
|
-
const
|
|
4087
|
+
if (g === void 0) {
|
|
4088
|
+
for (const A of M) {
|
|
4089
|
+
m === y.EQUAL && (r++, i++), m === y.DELETE && r++, m === y.ADD && i++;
|
|
4090
|
+
const L = F(t, A);
|
|
4076
4091
|
o.push({
|
|
4077
|
-
type:
|
|
4078
|
-
code:
|
|
4079
|
-
addNum:
|
|
4080
|
-
delNum:
|
|
4092
|
+
type: m,
|
|
4093
|
+
code: L,
|
|
4094
|
+
addNum: m === y.DELETE ? void 0 : i,
|
|
4095
|
+
delNum: m === y.ADD ? void 0 : r
|
|
4081
4096
|
});
|
|
4082
4097
|
}
|
|
4083
4098
|
break;
|
|
4084
4099
|
}
|
|
4085
|
-
if (
|
|
4086
|
-
for (const
|
|
4087
|
-
|
|
4088
|
-
const
|
|
4089
|
-
o.push({ type:
|
|
4100
|
+
if (m === y.EQUAL)
|
|
4101
|
+
for (const A of M) {
|
|
4102
|
+
r++, i++;
|
|
4103
|
+
const L = F(t, A);
|
|
4104
|
+
o.push({ type: y.EQUAL, code: L, delNum: r, addNum: i });
|
|
4090
4105
|
}
|
|
4091
|
-
const x =
|
|
4106
|
+
const x = g.value.replace(/\n$/, "").split(`
|
|
4092
4107
|
`);
|
|
4093
|
-
if (
|
|
4094
|
-
if (
|
|
4095
|
-
for (let
|
|
4096
|
-
const
|
|
4097
|
-
i++;
|
|
4098
|
-
const D = F(t, Se(L, R, s));
|
|
4099
|
-
o.push({ type: m.DELETE, code: D, delNum: i });
|
|
4100
|
-
}
|
|
4101
|
-
for (let y = 0; y < x.length; y++) {
|
|
4102
|
-
const R = S[y], L = x[y];
|
|
4108
|
+
if (m === y.DELETE)
|
|
4109
|
+
if (S === y.ADD && M.length === x.length) {
|
|
4110
|
+
for (let A = 0; A < M.length; A++) {
|
|
4111
|
+
const L = M[A], k = x[A];
|
|
4103
4112
|
r++;
|
|
4104
|
-
const
|
|
4105
|
-
o.push({ type:
|
|
4113
|
+
const R = F(t, Me(k, L, s));
|
|
4114
|
+
o.push({ type: y.DELETE, code: R, delNum: r });
|
|
4115
|
+
}
|
|
4116
|
+
for (let A = 0; A < x.length; A++) {
|
|
4117
|
+
const L = M[A], k = x[A];
|
|
4118
|
+
i++;
|
|
4119
|
+
const R = F(t, Me(L, k, s));
|
|
4120
|
+
o.push({ type: y.ADD, code: R, addNum: i });
|
|
4106
4121
|
}
|
|
4107
4122
|
a = !0;
|
|
4108
4123
|
} else
|
|
4109
|
-
for (const
|
|
4110
|
-
|
|
4111
|
-
const
|
|
4112
|
-
o.push({ type:
|
|
4124
|
+
for (const A of M) {
|
|
4125
|
+
r++;
|
|
4126
|
+
const L = F(t, A);
|
|
4127
|
+
o.push({ type: y.DELETE, code: L, delNum: r });
|
|
4113
4128
|
}
|
|
4114
|
-
if (
|
|
4115
|
-
for (const
|
|
4116
|
-
|
|
4117
|
-
const
|
|
4118
|
-
o.push({ type:
|
|
4129
|
+
if (m === y.ADD)
|
|
4130
|
+
for (const A of M) {
|
|
4131
|
+
i++;
|
|
4132
|
+
const L = F(t, A);
|
|
4133
|
+
o.push({ type: y.ADD, code: L, addNum: i });
|
|
4119
4134
|
}
|
|
4120
4135
|
}
|
|
4121
|
-
for (let
|
|
4122
|
-
const
|
|
4123
|
-
if (
|
|
4124
|
-
const [
|
|
4125
|
-
for (let
|
|
4126
|
-
o[
|
|
4136
|
+
for (let E = 0; E < o.length; E++) {
|
|
4137
|
+
const v = o[E];
|
|
4138
|
+
if (v.type === y.DELETE || v.type === y.ADD) {
|
|
4139
|
+
const [g, m] = [Math.max(E - c, 0), Math.min(E + c + 1, o.length)];
|
|
4140
|
+
for (let S = g; S < m; S++)
|
|
4141
|
+
o[S].fold = !1;
|
|
4127
4142
|
}
|
|
4128
|
-
|
|
4143
|
+
v.fold === void 0 && (v.fold = !0);
|
|
4129
4144
|
}
|
|
4130
4145
|
if (e === n) {
|
|
4131
|
-
for (let
|
|
4132
|
-
o[
|
|
4133
|
-
return
|
|
4146
|
+
for (let E = 0; E < o.length; E++)
|
|
4147
|
+
o[E].fold = !1;
|
|
4148
|
+
return p;
|
|
4134
4149
|
}
|
|
4135
|
-
const
|
|
4136
|
-
for (let
|
|
4137
|
-
const
|
|
4138
|
-
if (
|
|
4139
|
-
|
|
4150
|
+
const d = [];
|
|
4151
|
+
for (let E = 0; E < o.length; E++) {
|
|
4152
|
+
const v = o[E];
|
|
4153
|
+
if (v.fold === !1) {
|
|
4154
|
+
d.push(v);
|
|
4140
4155
|
continue;
|
|
4141
4156
|
}
|
|
4142
|
-
|
|
4157
|
+
v.fold === !0 && (E === 0 || ((b = d[d.length - 1]) == null ? void 0 : b.fold) !== !0) && d.push(v);
|
|
4143
4158
|
}
|
|
4144
|
-
return p;
|
|
4159
|
+
return p.changes = d, p;
|
|
4145
4160
|
}
|
|
4146
4161
|
const Ke = {};
|
|
4147
4162
|
Ke.props = {
|
|
@@ -4152,17 +4167,17 @@ Ke.props = {
|
|
|
4152
4167
|
}
|
|
4153
4168
|
};
|
|
4154
4169
|
Ke.setup = (e, n) => ({
|
|
4155
|
-
DiffType:
|
|
4156
|
-
getCodeMarker: (s) => s ===
|
|
4170
|
+
DiffType: y,
|
|
4171
|
+
getCodeMarker: (s) => s === y.DELETE ? "-" : s === y.ADD ? "+" : ""
|
|
4157
4172
|
});
|
|
4158
|
-
var
|
|
4173
|
+
var is = function() {
|
|
4159
4174
|
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
4160
4175
|
return e.line.fold ? t("tr", [t("td", {
|
|
4161
|
-
staticClass: "blob-num blob-num-
|
|
4176
|
+
staticClass: "blob-num blob-num-hunk"
|
|
4162
4177
|
}, [e._v(" > ")]), t("td", {
|
|
4163
|
-
staticClass: "blob-num blob-num-
|
|
4178
|
+
staticClass: "blob-num blob-num-hunk"
|
|
4164
4179
|
}, [e._v(" > ")]), t("td", {
|
|
4165
|
-
staticClass: "blob-code blob-code-
|
|
4180
|
+
staticClass: "blob-code blob-code-hunk",
|
|
4166
4181
|
attrs: {
|
|
4167
4182
|
align: "left"
|
|
4168
4183
|
}
|
|
@@ -4197,29 +4212,29 @@ var ss = function() {
|
|
|
4197
4212
|
}
|
|
4198
4213
|
})])]);
|
|
4199
4214
|
}, rs = [];
|
|
4200
|
-
function
|
|
4215
|
+
function he(e, n, t, s, c, l, r, i) {
|
|
4201
4216
|
var a = typeof e == "function" ? e.options : e;
|
|
4202
|
-
n && (a.render = n, a.staticRenderFns = t, a._compiled = !0), s && (a.functional = !0),
|
|
4217
|
+
n && (a.render = n, a.staticRenderFns = t, a._compiled = !0), s && (a.functional = !0), l && (a._scopeId = "data-v-" + l);
|
|
4203
4218
|
var o;
|
|
4204
|
-
if (
|
|
4205
|
-
|
|
4219
|
+
if (r ? (o = function(b) {
|
|
4220
|
+
b = b || // cached call
|
|
4206
4221
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
4207
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !
|
|
4208
|
-
}, a._ssrRegister = o) :
|
|
4209
|
-
|
|
4222
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !b && typeof __VUE_SSR_CONTEXT__ < "u" && (b = __VUE_SSR_CONTEXT__), c && c.call(this, b), b && b._registeredComponents && b._registeredComponents.add(r);
|
|
4223
|
+
}, a._ssrRegister = o) : c && (o = i ? function() {
|
|
4224
|
+
c.call(
|
|
4210
4225
|
this,
|
|
4211
4226
|
(a.functional ? this.parent : this).$root.$options.shadowRoot
|
|
4212
4227
|
);
|
|
4213
|
-
} :
|
|
4228
|
+
} : c), o)
|
|
4214
4229
|
if (a.functional) {
|
|
4215
4230
|
a._injectStyles = o;
|
|
4216
4231
|
var p = a.render;
|
|
4217
|
-
a.render = function(
|
|
4218
|
-
return o.call(
|
|
4232
|
+
a.render = function(E, v) {
|
|
4233
|
+
return o.call(v), p(E, v);
|
|
4219
4234
|
};
|
|
4220
4235
|
} else {
|
|
4221
|
-
var
|
|
4222
|
-
a.beforeCreate =
|
|
4236
|
+
var d = a.beforeCreate;
|
|
4237
|
+
a.beforeCreate = d ? [].concat(d, o) : [o];
|
|
4223
4238
|
}
|
|
4224
4239
|
return {
|
|
4225
4240
|
exports: e,
|
|
@@ -4227,64 +4242,64 @@ function _e(e, n, t, s, l, c, i, r) {
|
|
|
4227
4242
|
};
|
|
4228
4243
|
}
|
|
4229
4244
|
const cn = {};
|
|
4230
|
-
var
|
|
4245
|
+
var as = /* @__PURE__ */ he(
|
|
4231
4246
|
Ke,
|
|
4232
|
-
|
|
4247
|
+
is,
|
|
4233
4248
|
rs,
|
|
4234
4249
|
!1,
|
|
4235
|
-
|
|
4250
|
+
os,
|
|
4236
4251
|
null,
|
|
4237
4252
|
null,
|
|
4238
4253
|
null
|
|
4239
4254
|
);
|
|
4240
|
-
function
|
|
4255
|
+
function os(e) {
|
|
4241
4256
|
for (let n in cn)
|
|
4242
4257
|
this[n] = cn[n];
|
|
4243
4258
|
}
|
|
4244
|
-
const
|
|
4245
|
-
return
|
|
4246
|
-
}(),
|
|
4247
|
-
|
|
4259
|
+
const cs = /* @__PURE__ */ function() {
|
|
4260
|
+
return as.exports;
|
|
4261
|
+
}(), ge = {};
|
|
4262
|
+
ge.props = {
|
|
4248
4263
|
diffChange: {
|
|
4249
4264
|
key: "diffChange",
|
|
4250
4265
|
required: !0,
|
|
4251
4266
|
type: null
|
|
4252
4267
|
}
|
|
4253
4268
|
};
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
UnifiedLine:
|
|
4257
|
-
},
|
|
4258
|
-
var
|
|
4269
|
+
ge.setup = (e, n) => ({});
|
|
4270
|
+
ge.components = Object.assign({
|
|
4271
|
+
UnifiedLine: cs
|
|
4272
|
+
}, ge.components);
|
|
4273
|
+
var ls = function() {
|
|
4259
4274
|
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
4260
4275
|
return t("table", {
|
|
4261
4276
|
staticClass: "diff-table"
|
|
4262
|
-
}, [t("tbody", e._l(e.diffChange, function(s,
|
|
4277
|
+
}, [t("tbody", e._l(e.diffChange, function(s, c) {
|
|
4263
4278
|
return t("UnifiedLine", {
|
|
4264
|
-
key:
|
|
4279
|
+
key: c,
|
|
4265
4280
|
attrs: {
|
|
4266
4281
|
line: s
|
|
4267
4282
|
}
|
|
4268
4283
|
});
|
|
4269
4284
|
}), 1)]);
|
|
4270
|
-
},
|
|
4285
|
+
}, us = [];
|
|
4271
4286
|
const ln = {};
|
|
4272
|
-
var
|
|
4273
|
-
|
|
4274
|
-
cs,
|
|
4287
|
+
var fs = /* @__PURE__ */ he(
|
|
4288
|
+
ge,
|
|
4275
4289
|
ls,
|
|
4290
|
+
us,
|
|
4276
4291
|
!1,
|
|
4277
|
-
|
|
4292
|
+
ds,
|
|
4278
4293
|
null,
|
|
4279
4294
|
null,
|
|
4280
4295
|
null
|
|
4281
4296
|
);
|
|
4282
|
-
function
|
|
4297
|
+
function ds(e) {
|
|
4283
4298
|
for (let n in ln)
|
|
4284
4299
|
this[n] = ln[n];
|
|
4285
4300
|
}
|
|
4286
|
-
const
|
|
4287
|
-
return
|
|
4301
|
+
const gs = /* @__PURE__ */ function() {
|
|
4302
|
+
return fs.exports;
|
|
4288
4303
|
}(), We = {};
|
|
4289
4304
|
We.props = {
|
|
4290
4305
|
splitLine: {
|
|
@@ -4294,18 +4309,18 @@ We.props = {
|
|
|
4294
4309
|
}
|
|
4295
4310
|
};
|
|
4296
4311
|
We.setup = (e, n) => ({
|
|
4297
|
-
DiffType:
|
|
4298
|
-
getCodeMarker: (s) => s ===
|
|
4312
|
+
DiffType: y,
|
|
4313
|
+
getCodeMarker: (s) => s === y.DELETE ? "-" : s === y.ADD ? "+" : ""
|
|
4299
4314
|
});
|
|
4300
|
-
var
|
|
4315
|
+
var ps = function() {
|
|
4301
4316
|
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
4302
4317
|
return e.splitLine.fold ? t("tr", [t("td", {
|
|
4303
|
-
staticClass: "blob-num blob-num-
|
|
4318
|
+
staticClass: "blob-num blob-num-hunk",
|
|
4304
4319
|
attrs: {
|
|
4305
4320
|
colspan: "1"
|
|
4306
4321
|
}
|
|
4307
4322
|
}, [e._v(" > ")]), t("td", {
|
|
4308
|
-
staticClass: "blob-code blob-code-
|
|
4323
|
+
staticClass: "blob-code blob-code-inner blob-code-hunk",
|
|
4309
4324
|
attrs: {
|
|
4310
4325
|
colspan: "3",
|
|
4311
4326
|
align: "left"
|
|
@@ -4339,12 +4354,12 @@ var gs = function() {
|
|
|
4339
4354
|
}
|
|
4340
4355
|
})])]];
|
|
4341
4356
|
})], 2);
|
|
4342
|
-
},
|
|
4357
|
+
}, _s = [];
|
|
4343
4358
|
const un = {};
|
|
4344
|
-
var
|
|
4359
|
+
var hs = /* @__PURE__ */ he(
|
|
4345
4360
|
We,
|
|
4346
|
-
gs,
|
|
4347
4361
|
ps,
|
|
4362
|
+
_s,
|
|
4348
4363
|
!1,
|
|
4349
4364
|
bs,
|
|
4350
4365
|
null,
|
|
@@ -4355,33 +4370,33 @@ function bs(e) {
|
|
|
4355
4370
|
for (let n in un)
|
|
4356
4371
|
this[n] = un[n];
|
|
4357
4372
|
}
|
|
4358
|
-
const
|
|
4359
|
-
return
|
|
4360
|
-
}(),
|
|
4361
|
-
|
|
4373
|
+
const Es = /* @__PURE__ */ function() {
|
|
4374
|
+
return hs.exports;
|
|
4375
|
+
}(), pe = {};
|
|
4376
|
+
pe.props = {
|
|
4362
4377
|
diffChange: {
|
|
4363
4378
|
key: "diffChange",
|
|
4364
4379
|
required: !0,
|
|
4365
4380
|
type: null
|
|
4366
4381
|
}
|
|
4367
4382
|
};
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
SplitLine:
|
|
4371
|
-
},
|
|
4372
|
-
var
|
|
4383
|
+
pe.setup = (e, n) => ({});
|
|
4384
|
+
pe.components = Object.assign({
|
|
4385
|
+
SplitLine: Es
|
|
4386
|
+
}, pe.components);
|
|
4387
|
+
var ms = function() {
|
|
4373
4388
|
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
4374
4389
|
return t("table", {
|
|
4375
4390
|
staticClass: "file-diff-split diff-table"
|
|
4376
|
-
}, [e._m(0), t("tbody", e._l(e.diffChange, function(s,
|
|
4391
|
+
}, [e._m(0), t("tbody", e._l(e.diffChange, function(s, c) {
|
|
4377
4392
|
return t("SplitLine", {
|
|
4378
|
-
key:
|
|
4393
|
+
key: c,
|
|
4379
4394
|
attrs: {
|
|
4380
4395
|
"split-line": s
|
|
4381
4396
|
}
|
|
4382
4397
|
});
|
|
4383
4398
|
}), 1)]);
|
|
4384
|
-
},
|
|
4399
|
+
}, ys = [function() {
|
|
4385
4400
|
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
4386
4401
|
return t("colgroup", [t("col", {
|
|
4387
4402
|
attrs: {
|
|
@@ -4394,25 +4409,25 @@ var Es = function() {
|
|
|
4394
4409
|
}), t("col")]);
|
|
4395
4410
|
}];
|
|
4396
4411
|
const fn = {};
|
|
4397
|
-
var
|
|
4398
|
-
|
|
4399
|
-
Es,
|
|
4412
|
+
var vs = /* @__PURE__ */ he(
|
|
4413
|
+
pe,
|
|
4400
4414
|
ms,
|
|
4415
|
+
ys,
|
|
4401
4416
|
!1,
|
|
4402
|
-
|
|
4417
|
+
Ns,
|
|
4403
4418
|
null,
|
|
4404
4419
|
null,
|
|
4405
4420
|
null
|
|
4406
4421
|
);
|
|
4407
|
-
function
|
|
4422
|
+
function Ns(e) {
|
|
4408
4423
|
for (let n in fn)
|
|
4409
4424
|
this[n] = fn[n];
|
|
4410
4425
|
}
|
|
4411
|
-
const
|
|
4412
|
-
return
|
|
4426
|
+
const Ts = /* @__PURE__ */ function() {
|
|
4427
|
+
return vs.exports;
|
|
4413
4428
|
}();
|
|
4414
|
-
const
|
|
4415
|
-
|
|
4429
|
+
const _e = {};
|
|
4430
|
+
_e.props = {
|
|
4416
4431
|
newString: {
|
|
4417
4432
|
key: "newString",
|
|
4418
4433
|
required: !0,
|
|
@@ -4464,68 +4479,89 @@ pe.props = {
|
|
|
4464
4479
|
required: !1,
|
|
4465
4480
|
type: Number,
|
|
4466
4481
|
default: void 0
|
|
4482
|
+
},
|
|
4483
|
+
filename: {
|
|
4484
|
+
key: "filename",
|
|
4485
|
+
required: !1,
|
|
4486
|
+
type: String,
|
|
4487
|
+
default: void 0
|
|
4467
4488
|
}
|
|
4468
4489
|
};
|
|
4469
|
-
|
|
4470
|
-
const t = e, s =
|
|
4471
|
-
const
|
|
4472
|
-
return t.noDiffLineFeed ?
|
|
4473
|
-
`) :
|
|
4474
|
-
}),
|
|
4475
|
-
const
|
|
4476
|
-
return t.noDiffLineFeed ?
|
|
4477
|
-
`) :
|
|
4478
|
-
}),
|
|
4490
|
+
_e.setup = (e, n) => {
|
|
4491
|
+
const t = e, s = ve(() => t.outputFormat === "line-by-line"), c = ve(() => {
|
|
4492
|
+
const i = t.trim ? t.oldString.trim() : t.oldString;
|
|
4493
|
+
return t.noDiffLineFeed ? i.replace(/(\r\n)/g, `
|
|
4494
|
+
`) : i;
|
|
4495
|
+
}), l = ve(() => {
|
|
4496
|
+
const i = t.trim ? t.newString.trim() : t.newString;
|
|
4497
|
+
return t.noDiffLineFeed ? i.replace(/(\r\n)/g, `
|
|
4498
|
+
`) : i;
|
|
4499
|
+
}), r = ve(() => s.value ? ss(c.value, l.value, t.language, t.diffStyle, t.context) : ts(c.value, l.value, t.language, t.diffStyle, t.context));
|
|
4479
4500
|
return {
|
|
4480
4501
|
isUnifiedViewer: s,
|
|
4481
|
-
diffChange:
|
|
4502
|
+
diffChange: r
|
|
4482
4503
|
};
|
|
4483
4504
|
};
|
|
4484
|
-
|
|
4485
|
-
UnifiedViewer:
|
|
4486
|
-
SplitViewer:
|
|
4487
|
-
},
|
|
4488
|
-
var
|
|
4505
|
+
_e.components = Object.assign({
|
|
4506
|
+
UnifiedViewer: gs,
|
|
4507
|
+
SplitViewer: Ts
|
|
4508
|
+
}, _e.components);
|
|
4509
|
+
var As = function() {
|
|
4489
4510
|
var e = this, n = e.$createElement, t = e._self._c || n;
|
|
4490
4511
|
return t("div", {
|
|
4491
4512
|
staticClass: "code-diff-view",
|
|
4492
4513
|
style: {
|
|
4493
4514
|
maxHeight: e.maxHeight
|
|
4494
4515
|
}
|
|
4495
|
-
}, [
|
|
4516
|
+
}, [t("div", {
|
|
4517
|
+
staticClass: "file-header"
|
|
4518
|
+
}, [t("div", {
|
|
4519
|
+
staticClass: "file-info"
|
|
4520
|
+
}, [t("span", {
|
|
4521
|
+
staticClass: "filename"
|
|
4522
|
+
}, [e._v(e._s(e.filename))]), t("span", {
|
|
4523
|
+
staticClass: "diff-stat"
|
|
4524
|
+
}, [t("span", {
|
|
4525
|
+
staticClass: "diff-stat-added"
|
|
4526
|
+
}, [e._v("+" + e._s(e.diffChange.stat.additionsNum) + " additions")]), t("span", {
|
|
4527
|
+
staticClass: "diff-stat-deleted",
|
|
4528
|
+
staticStyle: {
|
|
4529
|
+
"margin-left": "8px"
|
|
4530
|
+
}
|
|
4531
|
+
}, [e._v("-" + e._s(e.diffChange.stat.deletionsNum) + " deletions")])])])]), e.isUnifiedViewer ? t("UnifiedViewer", {
|
|
4496
4532
|
attrs: {
|
|
4497
|
-
"diff-change": e.diffChange
|
|
4533
|
+
"diff-change": e.diffChange.changes
|
|
4498
4534
|
}
|
|
4499
4535
|
}) : t("SplitViewer", {
|
|
4500
4536
|
attrs: {
|
|
4501
|
-
"diff-change": e.diffChange
|
|
4537
|
+
"diff-change": e.diffChange.changes
|
|
4502
4538
|
}
|
|
4503
4539
|
})], 1);
|
|
4504
|
-
},
|
|
4540
|
+
}, ws = [];
|
|
4505
4541
|
const dn = {};
|
|
4506
|
-
var
|
|
4507
|
-
|
|
4508
|
-
Ts,
|
|
4542
|
+
var Ss = /* @__PURE__ */ he(
|
|
4543
|
+
_e,
|
|
4509
4544
|
As,
|
|
4545
|
+
ws,
|
|
4510
4546
|
!1,
|
|
4511
|
-
|
|
4547
|
+
Ms,
|
|
4512
4548
|
null,
|
|
4513
4549
|
null,
|
|
4514
4550
|
null
|
|
4515
4551
|
);
|
|
4516
|
-
function
|
|
4552
|
+
function Ms(e) {
|
|
4517
4553
|
for (let n in dn)
|
|
4518
4554
|
this[n] = dn[n];
|
|
4519
4555
|
}
|
|
4520
|
-
const
|
|
4521
|
-
return
|
|
4522
|
-
}(),
|
|
4523
|
-
e.component("CodeDiff",
|
|
4556
|
+
const Rs = /* @__PURE__ */ function() {
|
|
4557
|
+
return Ss.exports;
|
|
4558
|
+
}(), Os = (e) => {
|
|
4559
|
+
e.component("CodeDiff", Rs);
|
|
4524
4560
|
}, Ls = {
|
|
4525
|
-
install:
|
|
4561
|
+
install: Os,
|
|
4526
4562
|
hljs: G
|
|
4527
4563
|
};
|
|
4528
4564
|
export {
|
|
4529
|
-
|
|
4565
|
+
Rs as CodeDiff,
|
|
4530
4566
|
Ls as default
|
|
4531
4567
|
};
|