v-code-diff 1.7.1 → 1.8.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 +53 -43
- package/dist/v2/index.cjs.js +12 -12
- package/dist/v2/index.es.js +770 -700
- package/dist/v2/index.umd.js +13 -13
- package/dist/v2.7/index.cjs.js +15 -15
- package/dist/v2.7/index.es.js +1202 -1166
- package/dist/v2.7/index.umd.js +15 -15
- package/dist/v3/index.cjs.js +15 -15
- package/dist/v3/index.es.js +1155 -1094
- package/dist/v3/index.umd.js +15 -15
- package/package.json +13 -2
- package/src/CodeDiff.vue +40 -16
- package/src/style.scss +8 -3
- package/src/var.scss +541 -73
package/dist/v3/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view{--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #24292f;--color-diff-blob-addition-fg: #24292f;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #24292f;--color-diff-blob-deletion-fg: #24292f;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #57606a;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(27,31,36,.15);--color-diffstat-addition-border: rgba(27,31,36,.15);--color-diffstat-addition-bg: #2da44e;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #8250df;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #24292f;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #57606a;--color-codemirror-cursor: #24292f;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #24292f;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #2da44e;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(27,31,36,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(27,31,36,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: -2px -2px 0 rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(27,31,36,.12), 0 8px 24px rgba(66,74,83,.12);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(27,31,36,.15);--color-btn-shadow: 0 1px 0 rgba(27,31,36,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(27,31,36,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(27,31,36,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-focus-bg: #f6f8fa;--color-btn-focus-border: rgba(27,31,36,.15);--color-btn-focus-shadow: 0 0 0 3px rgba(9,105,218,.3);--color-btn-shadow-active: inset 0 .15em .3em rgba(27,31,36,.15);--color-btn-shadow-input-focus: 0 0 0 .2em rgba(9,105,218,.3);--color-btn-counter-bg: rgba(27,31,36,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #2da44e;--color-btn-primary-border: rgba(27,31,36,.15);--color-btn-primary-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #2c974b;--color-btn-primary-hover-border: rgba(27,31,36,.15);--color-btn-primary-selected-bg: hsla(137,55%,36%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(27,31,36,.15);--color-btn-primary-focus-bg: #2da44e;--color-btn-primary-focus-border: rgba(27,31,36,.15);--color-btn-primary-focus-shadow: 0 0 0 3px rgba(45,164,78,.4);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(255,255,255,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(27,31,36,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(27,31,36,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-focus-border: rgba(27,31,36,.15);--color-btn-outline-focus-shadow: 0 0 0 3px rgba(5,80,174,.4);--color-btn-outline-counter-bg: rgba(9,105,218,.1);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(27,31,36,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(27,31,36,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-focus-border: rgba(27,31,36,.15);--color-btn-danger-focus-shadow: 0 0 0 3px rgba(164,14,38,.4);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #cf222e;--color-switch-track-bg: #eaeef2;--color-switch-track-border: #afb8c1;--color-switch-track-checked-bg: #ddf4ff;--color-switch-track-checked-hover-bg: #b6e3ff;--color-switch-track-checked-active-bg: #80ccff;--color-switch-track-checked-border: #54aeff;--color-switch-knob-checked-bg: #0969da;--color-switch-knob-checked-disabled-bg: #6e7781;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #6e7781;--color-fg-default: #24292f;--color-fg-muted: #57606a;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(27,31,36,.15);--color-shadow-small: 0 1px 0 rgba(27,31,36,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #2da44e;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #bf8700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #cf222e;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #2da44e;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #cf222e;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(27,31,36,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(27,31,36,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-primer-shadow-focus: 0 0 0 3px rgba(9,105,218,.3);--color-scale-black: #1b1f24;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .filename{font-size:13px;color:var(--color-fg-default)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:gray}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
function
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#ffffff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{font-size:13px;color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;width:50%}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { defineComponent as Ne, openBlock as G, createElementBlock as W, createElementVNode as B, normalizeClass as Ee, unref as F, toDisplayString as ee, createCommentVNode as ve, Fragment as de, renderList as Ge, createBlock as Ce, computed as _e, ref as Hn, watch as Fn, normalizeStyle as zn, renderSlot as en } from "vue";
|
|
3
|
+
function ae() {
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
diff: function(r,
|
|
5
|
+
ae.prototype = {
|
|
6
|
+
diff: function(r, l) {
|
|
7
7
|
var u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, h = u.callback;
|
|
8
8
|
typeof u == "function" && (h = u, u = {}), this.options = u;
|
|
9
9
|
var n = this;
|
|
@@ -12,29 +12,29 @@ re.prototype = {
|
|
|
12
12
|
h(void 0, p);
|
|
13
13
|
}, 0), !0) : p;
|
|
14
14
|
}
|
|
15
|
-
r = this.castInput(r),
|
|
16
|
-
var i =
|
|
17
|
-
u.maxEditLength && (
|
|
15
|
+
r = this.castInput(r), l = this.castInput(l), r = this.removeEmpty(this.tokenize(r)), l = this.removeEmpty(this.tokenize(l));
|
|
16
|
+
var i = l.length, a = r.length, s = 1, o = i + a;
|
|
17
|
+
u.maxEditLength && (o = Math.min(o, u.maxEditLength));
|
|
18
18
|
var c = [{
|
|
19
19
|
newPos: -1,
|
|
20
20
|
components: []
|
|
21
|
-
}], f = this.extractCommon(c[0],
|
|
21
|
+
}], f = this.extractCommon(c[0], l, r, 0);
|
|
22
22
|
if (c[0].newPos + 1 >= i && f + 1 >= a)
|
|
23
23
|
return t([{
|
|
24
|
-
value: this.join(
|
|
25
|
-
count:
|
|
24
|
+
value: this.join(l),
|
|
25
|
+
count: l.length
|
|
26
26
|
}]);
|
|
27
27
|
function g() {
|
|
28
28
|
for (var p = -1 * s; p <= s; p += 2) {
|
|
29
29
|
var b = void 0, E = c[p - 1], v = c[p + 1], w = (v ? v.newPos : 0) - p;
|
|
30
30
|
E && (c[p - 1] = void 0);
|
|
31
|
-
var
|
|
32
|
-
if (!
|
|
31
|
+
var y = E && E.newPos + 1 < i, D = v && 0 <= w && w < a;
|
|
32
|
+
if (!y && !D) {
|
|
33
33
|
c[p] = void 0;
|
|
34
34
|
continue;
|
|
35
35
|
}
|
|
36
|
-
if (!
|
|
37
|
-
return t(
|
|
36
|
+
if (!y || D && E.newPos < v.newPos ? (b = Kn(v), n.pushComponent(b.components, void 0, !0)) : (b = E, b.newPos++, n.pushComponent(b.components, !0, void 0)), w = n.extractCommon(b, l, r, p), b.newPos + 1 >= i && w + 1 >= a)
|
|
37
|
+
return t(Gn(n, b.components, l, r, n.useLongestToken));
|
|
38
38
|
c[p] = b;
|
|
39
39
|
}
|
|
40
40
|
s++;
|
|
@@ -42,44 +42,44 @@ re.prototype = {
|
|
|
42
42
|
if (h)
|
|
43
43
|
(function p() {
|
|
44
44
|
setTimeout(function() {
|
|
45
|
-
if (s >
|
|
45
|
+
if (s > o)
|
|
46
46
|
return h();
|
|
47
47
|
g() || p();
|
|
48
48
|
}, 0);
|
|
49
49
|
})();
|
|
50
50
|
else
|
|
51
|
-
for (; s <=
|
|
51
|
+
for (; s <= o; ) {
|
|
52
52
|
var d = g();
|
|
53
53
|
if (d)
|
|
54
54
|
return d;
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
pushComponent: function(r,
|
|
57
|
+
pushComponent: function(r, l, u) {
|
|
58
58
|
var h = r[r.length - 1];
|
|
59
|
-
h && h.added ===
|
|
59
|
+
h && h.added === l && h.removed === u ? r[r.length - 1] = {
|
|
60
60
|
count: h.count + 1,
|
|
61
|
-
added:
|
|
61
|
+
added: l,
|
|
62
62
|
removed: u
|
|
63
63
|
} : r.push({
|
|
64
64
|
count: 1,
|
|
65
|
-
added:
|
|
65
|
+
added: l,
|
|
66
66
|
removed: u
|
|
67
67
|
});
|
|
68
68
|
},
|
|
69
|
-
extractCommon: function(r,
|
|
70
|
-
for (var n =
|
|
69
|
+
extractCommon: function(r, l, u, h) {
|
|
70
|
+
for (var n = l.length, t = u.length, i = r.newPos, a = i - h, s = 0; i + 1 < n && a + 1 < t && this.equals(l[i + 1], u[a + 1]); )
|
|
71
71
|
i++, a++, s++;
|
|
72
72
|
return s && r.components.push({
|
|
73
73
|
count: s
|
|
74
74
|
}), r.newPos = i, a;
|
|
75
75
|
},
|
|
76
|
-
equals: function(r,
|
|
77
|
-
return this.options.comparator ? this.options.comparator(r,
|
|
76
|
+
equals: function(r, l) {
|
|
77
|
+
return this.options.comparator ? this.options.comparator(r, l) : r === l || this.options.ignoreCase && r.toLowerCase() === l.toLowerCase();
|
|
78
78
|
},
|
|
79
79
|
removeEmpty: function(r) {
|
|
80
|
-
for (var
|
|
81
|
-
r[u] &&
|
|
82
|
-
return
|
|
80
|
+
for (var l = [], u = 0; u < r.length; u++)
|
|
81
|
+
r[u] && l.push(r[u]);
|
|
82
|
+
return l;
|
|
83
83
|
},
|
|
84
84
|
castInput: function(r) {
|
|
85
85
|
return r;
|
|
@@ -91,7 +91,7 @@ re.prototype = {
|
|
|
91
91
|
return r.join("");
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
function
|
|
94
|
+
function Gn(e, r, l, u, h) {
|
|
95
95
|
for (var n = 0, t = r.length, i = 0, a = 0; n < t; n++) {
|
|
96
96
|
var s = r[n];
|
|
97
97
|
if (s.removed) {
|
|
@@ -101,128 +101,128 @@ function Hn(e, r, o, u, h) {
|
|
|
101
101
|
}
|
|
102
102
|
} else {
|
|
103
103
|
if (!s.added && h) {
|
|
104
|
-
var
|
|
105
|
-
|
|
104
|
+
var o = l.slice(i, i + s.count);
|
|
105
|
+
o = o.map(function(g, d) {
|
|
106
106
|
var p = u[a + d];
|
|
107
107
|
return p.length > g.length ? p : g;
|
|
108
|
-
}), s.value = e.join(
|
|
108
|
+
}), s.value = e.join(o);
|
|
109
109
|
} else
|
|
110
|
-
s.value = e.join(
|
|
110
|
+
s.value = e.join(l.slice(i, i + s.count));
|
|
111
111
|
i += s.count, s.added || (a += s.count);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
var f = r[t - 1];
|
|
115
115
|
return t > 1 && typeof f.value == "string" && (f.added || f.removed) && e.equals("", f.value) && (r[t - 2].value += f.value, r.pop()), r;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Kn(e) {
|
|
118
118
|
return {
|
|
119
119
|
newPos: e.newPos,
|
|
120
120
|
components: e.components.slice(0)
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
var
|
|
124
|
-
function
|
|
125
|
-
return
|
|
123
|
+
var Wn = new ae();
|
|
124
|
+
function Qn(e, r, l) {
|
|
125
|
+
return Wn.diff(e, r, l);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Zn(e, r) {
|
|
128
128
|
if (typeof e == "function")
|
|
129
129
|
r.callback = e;
|
|
130
130
|
else if (e)
|
|
131
|
-
for (var
|
|
132
|
-
e.hasOwnProperty(
|
|
131
|
+
for (var l in e)
|
|
132
|
+
e.hasOwnProperty(l) && (r[l] = e[l]);
|
|
133
133
|
return r;
|
|
134
134
|
}
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
return this.options.ignoreCase && (e = e.toLowerCase(), r = r.toLowerCase()), e === r || this.options.ignoreWhitespace && !
|
|
135
|
+
var nn = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, tn = /\S/, Ke = new ae();
|
|
136
|
+
Ke.equals = function(e, r) {
|
|
137
|
+
return this.options.ignoreCase && (e = e.toLowerCase(), r = r.toLowerCase()), e === r || this.options.ignoreWhitespace && !tn.test(e) && !tn.test(r);
|
|
138
138
|
};
|
|
139
|
-
|
|
140
|
-
for (var r = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),
|
|
141
|
-
!r[
|
|
139
|
+
Ke.tokenize = function(e) {
|
|
140
|
+
for (var r = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), l = 0; l < r.length - 1; l++)
|
|
141
|
+
!r[l + 1] && r[l + 2] && nn.test(r[l]) && nn.test(r[l + 2]) && (r[l] += r[l + 2], r.splice(l + 1, 2), l--);
|
|
142
142
|
return r;
|
|
143
143
|
};
|
|
144
|
-
function
|
|
145
|
-
return
|
|
144
|
+
function Yn(e, r, l) {
|
|
145
|
+
return l = Zn(l, {
|
|
146
146
|
ignoreWhitespace: !0
|
|
147
|
-
}),
|
|
147
|
+
}), Ke.diff(e, r, l);
|
|
148
148
|
}
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
var r = [],
|
|
152
|
-
|
|
153
|
-
for (var u = 0; u <
|
|
154
|
-
var h =
|
|
149
|
+
var hn = new ae();
|
|
150
|
+
hn.tokenize = function(e) {
|
|
151
|
+
var r = [], l = e.split(/(\n|\r\n)/);
|
|
152
|
+
l[l.length - 1] || l.pop();
|
|
153
|
+
for (var u = 0; u < l.length; u++) {
|
|
154
|
+
var h = l[u];
|
|
155
155
|
u % 2 && !this.options.newlineIsToken ? r[r.length - 1] += h : (this.options.ignoreWhitespace && (h = h.trim()), r.push(h));
|
|
156
156
|
}
|
|
157
157
|
return r;
|
|
158
158
|
};
|
|
159
|
-
var
|
|
160
|
-
|
|
159
|
+
var Xn = new ae();
|
|
160
|
+
Xn.tokenize = function(e) {
|
|
161
161
|
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
162
162
|
};
|
|
163
|
-
var
|
|
164
|
-
|
|
163
|
+
var Vn = new ae();
|
|
164
|
+
Vn.tokenize = function(e) {
|
|
165
165
|
return e.split(/([{}:;,]|\s+)/);
|
|
166
166
|
};
|
|
167
|
-
function
|
|
167
|
+
function Oe(e) {
|
|
168
168
|
"@babel/helpers - typeof";
|
|
169
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
169
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Oe = function(r) {
|
|
170
170
|
return typeof r;
|
|
171
|
-
} :
|
|
171
|
+
} : Oe = function(r) {
|
|
172
172
|
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
173
|
-
},
|
|
173
|
+
}, Oe(e);
|
|
174
174
|
}
|
|
175
|
-
var
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
var r = this.options,
|
|
180
|
-
return typeof t == "undefined" ?
|
|
175
|
+
var jn = Object.prototype.toString, me = new ae();
|
|
176
|
+
me.useLongestToken = !0;
|
|
177
|
+
me.tokenize = hn.tokenize;
|
|
178
|
+
me.castInput = function(e) {
|
|
179
|
+
var r = this.options, l = r.undefinedReplacement, u = r.stringifyReplacer, h = u === void 0 ? function(n, t) {
|
|
180
|
+
return typeof t == "undefined" ? l : t;
|
|
181
181
|
} : u;
|
|
182
|
-
return typeof e == "string" ? e : JSON.stringify(
|
|
182
|
+
return typeof e == "string" ? e : JSON.stringify(Fe(e, null, null, h), h, " ");
|
|
183
183
|
};
|
|
184
|
-
|
|
185
|
-
return
|
|
184
|
+
me.equals = function(e, r) {
|
|
185
|
+
return ae.prototype.equals.call(me, e.replace(/,([\r\n])/g, "$1"), r.replace(/,([\r\n])/g, "$1"));
|
|
186
186
|
};
|
|
187
|
-
function
|
|
188
|
-
r = r || [],
|
|
187
|
+
function Fe(e, r, l, u, h) {
|
|
188
|
+
r = r || [], l = l || [], u && (e = u(h, e));
|
|
189
189
|
var n;
|
|
190
190
|
for (n = 0; n < r.length; n += 1)
|
|
191
191
|
if (r[n] === e)
|
|
192
|
-
return
|
|
192
|
+
return l[n];
|
|
193
193
|
var t;
|
|
194
|
-
if (
|
|
195
|
-
for (r.push(e), t = new Array(e.length),
|
|
196
|
-
t[n] =
|
|
197
|
-
return r.pop(),
|
|
194
|
+
if (jn.call(e) === "[object Array]") {
|
|
195
|
+
for (r.push(e), t = new Array(e.length), l.push(t), n = 0; n < e.length; n += 1)
|
|
196
|
+
t[n] = Fe(e[n], r, l, u, h);
|
|
197
|
+
return r.pop(), l.pop(), t;
|
|
198
198
|
}
|
|
199
|
-
if (e && e.toJSON && (e = e.toJSON()),
|
|
200
|
-
r.push(e), t = {},
|
|
199
|
+
if (e && e.toJSON && (e = e.toJSON()), Oe(e) === "object" && e !== null) {
|
|
200
|
+
r.push(e), t = {}, l.push(t);
|
|
201
201
|
var i = [], a;
|
|
202
202
|
for (a in e)
|
|
203
203
|
e.hasOwnProperty(a) && i.push(a);
|
|
204
204
|
for (i.sort(), n = 0; n < i.length; n += 1)
|
|
205
|
-
a = i[n], t[a] =
|
|
206
|
-
r.pop(),
|
|
205
|
+
a = i[n], t[a] = Fe(e[a], r, l, u, a);
|
|
206
|
+
r.pop(), l.pop();
|
|
207
207
|
} else
|
|
208
208
|
t = e;
|
|
209
209
|
return t;
|
|
210
210
|
}
|
|
211
|
-
var
|
|
212
|
-
|
|
211
|
+
var ze = new ae();
|
|
212
|
+
ze.tokenize = function(e) {
|
|
213
213
|
return e.slice();
|
|
214
214
|
};
|
|
215
|
-
|
|
215
|
+
ze.join = ze.removeEmpty = function(e) {
|
|
216
216
|
return e;
|
|
217
217
|
};
|
|
218
|
-
function
|
|
218
|
+
function Jn(e) {
|
|
219
219
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
221
|
+
var dn = { exports: {} };
|
|
222
222
|
(function(e) {
|
|
223
223
|
var r = function() {
|
|
224
224
|
this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = 0.5, this.Match_Distance = 1e3, this.Patch_DeleteThreshold = 0.5, this.Patch_Margin = 4, this.Match_MaxBits = 32;
|
|
225
|
-
},
|
|
225
|
+
}, l = -1, u = 1, h = 0;
|
|
226
226
|
r.Diff = function(n, t) {
|
|
227
227
|
return [n, t];
|
|
228
228
|
}, r.prototype.diff_main = function(n, t, i, a) {
|
|
@@ -233,63 +233,63 @@ var hn = { exports: {} };
|
|
|
233
233
|
if (n == t)
|
|
234
234
|
return n ? [new r.Diff(h, n)] : [];
|
|
235
235
|
typeof i == "undefined" && (i = !0);
|
|
236
|
-
var
|
|
236
|
+
var o = i, c = this.diff_commonPrefix(n, t), f = n.substring(0, c);
|
|
237
237
|
n = n.substring(c), t = t.substring(c), c = this.diff_commonSuffix(n, t);
|
|
238
238
|
var g = n.substring(n.length - c);
|
|
239
239
|
n = n.substring(0, n.length - c), t = t.substring(0, t.length - c);
|
|
240
|
-
var d = this.diff_compute_(n, t,
|
|
240
|
+
var d = this.diff_compute_(n, t, o, s);
|
|
241
241
|
return f && d.unshift(new r.Diff(h, f)), g && d.push(new r.Diff(h, g)), this.diff_cleanupMerge(d), d;
|
|
242
242
|
}, r.prototype.diff_compute_ = function(n, t, i, a) {
|
|
243
243
|
var s;
|
|
244
244
|
if (!n)
|
|
245
245
|
return [new r.Diff(u, t)];
|
|
246
246
|
if (!t)
|
|
247
|
-
return [new r.Diff(
|
|
248
|
-
var
|
|
247
|
+
return [new r.Diff(l, n)];
|
|
248
|
+
var o = n.length > t.length ? n : t, c = n.length > t.length ? t : n, f = o.indexOf(c);
|
|
249
249
|
if (f != -1)
|
|
250
250
|
return s = [
|
|
251
|
-
new r.Diff(u,
|
|
251
|
+
new r.Diff(u, o.substring(0, f)),
|
|
252
252
|
new r.Diff(h, c),
|
|
253
253
|
new r.Diff(
|
|
254
254
|
u,
|
|
255
|
-
|
|
255
|
+
o.substring(f + c.length)
|
|
256
256
|
)
|
|
257
|
-
], n.length > t.length && (s[0][0] = s[2][0] =
|
|
257
|
+
], n.length > t.length && (s[0][0] = s[2][0] = l), s;
|
|
258
258
|
if (c.length == 1)
|
|
259
259
|
return [
|
|
260
|
-
new r.Diff(
|
|
260
|
+
new r.Diff(l, n),
|
|
261
261
|
new r.Diff(u, t)
|
|
262
262
|
];
|
|
263
263
|
var g = this.diff_halfMatch_(n, t);
|
|
264
264
|
if (g) {
|
|
265
|
-
var d = g[0], p = g[1], b = g[2], E = g[3], v = g[4], w = this.diff_main(d, b, i, a),
|
|
265
|
+
var d = g[0], p = g[1], b = g[2], E = g[3], v = g[4], w = this.diff_main(d, b, i, a), y = this.diff_main(p, E, i, a);
|
|
266
266
|
return w.concat(
|
|
267
267
|
[new r.Diff(h, v)],
|
|
268
|
-
|
|
268
|
+
y
|
|
269
269
|
);
|
|
270
270
|
}
|
|
271
271
|
return i && n.length > 100 && t.length > 100 ? this.diff_lineMode_(n, t, a) : this.diff_bisect_(n, t, a);
|
|
272
272
|
}, r.prototype.diff_lineMode_ = function(n, t, i) {
|
|
273
273
|
var a = this.diff_linesToChars_(n, t);
|
|
274
274
|
n = a.chars1, t = a.chars2;
|
|
275
|
-
var s = a.lineArray,
|
|
276
|
-
this.diff_charsToLines_(
|
|
277
|
-
for (var c = 0, f = 0, g = 0, d = "", p = ""; c <
|
|
278
|
-
switch (
|
|
275
|
+
var s = a.lineArray, o = this.diff_main(n, t, !1, i);
|
|
276
|
+
this.diff_charsToLines_(o, s), this.diff_cleanupSemantic(o), o.push(new r.Diff(h, ""));
|
|
277
|
+
for (var c = 0, f = 0, g = 0, d = "", p = ""; c < o.length; ) {
|
|
278
|
+
switch (o[c][0]) {
|
|
279
279
|
case u:
|
|
280
|
-
g++, p +=
|
|
280
|
+
g++, p += o[c][1];
|
|
281
281
|
break;
|
|
282
|
-
case
|
|
283
|
-
f++, d +=
|
|
282
|
+
case l:
|
|
283
|
+
f++, d += o[c][1];
|
|
284
284
|
break;
|
|
285
285
|
case h:
|
|
286
286
|
if (f >= 1 && g >= 1) {
|
|
287
|
-
|
|
287
|
+
o.splice(
|
|
288
288
|
c - f - g,
|
|
289
289
|
f + g
|
|
290
290
|
), c = c - f - g;
|
|
291
291
|
for (var b = this.diff_main(d, p, !1, i), E = b.length - 1; E >= 0; E--)
|
|
292
|
-
|
|
292
|
+
o.splice(c, 0, b[E]);
|
|
293
293
|
c = c + b.length;
|
|
294
294
|
}
|
|
295
295
|
g = 0, f = 0, d = "", p = "";
|
|
@@ -297,55 +297,55 @@ var hn = { exports: {} };
|
|
|
297
297
|
}
|
|
298
298
|
c++;
|
|
299
299
|
}
|
|
300
|
-
return
|
|
300
|
+
return o.pop(), o;
|
|
301
301
|
}, r.prototype.diff_bisect_ = function(n, t, i) {
|
|
302
|
-
for (var a = n.length, s = t.length,
|
|
302
|
+
for (var a = n.length, s = t.length, o = Math.ceil((a + s) / 2), c = o, f = 2 * o, g = new Array(f), d = new Array(f), p = 0; p < f; p++)
|
|
303
303
|
g[p] = -1, d[p] = -1;
|
|
304
304
|
g[c + 1] = 0, d[c + 1] = 0;
|
|
305
|
-
for (var b = a - s, E = b % 2 != 0, v = 0, w = 0,
|
|
306
|
-
for (var
|
|
307
|
-
var I = c +
|
|
308
|
-
|
|
309
|
-
for (var
|
|
310
|
-
R++,
|
|
305
|
+
for (var b = a - s, E = b % 2 != 0, v = 0, w = 0, y = 0, D = 0, S = 0; S < o && !((/* @__PURE__ */ new Date()).getTime() > i); S++) {
|
|
306
|
+
for (var T = -S + v; T <= S - w; T += 2) {
|
|
307
|
+
var I = c + T, R;
|
|
308
|
+
T == -S || T != S && g[I - 1] < g[I + 1] ? R = g[I + 1] : R = g[I - 1] + 1;
|
|
309
|
+
for (var z = R - T; R < a && z < s && n.charAt(R) == t.charAt(z); )
|
|
310
|
+
R++, z++;
|
|
311
311
|
if (g[I] = R, R > a)
|
|
312
312
|
w += 2;
|
|
313
|
-
else if (
|
|
313
|
+
else if (z > s)
|
|
314
314
|
v += 2;
|
|
315
315
|
else if (E) {
|
|
316
|
-
var U = c + b -
|
|
316
|
+
var U = c + b - T;
|
|
317
317
|
if (U >= 0 && U < f && d[U] != -1) {
|
|
318
|
-
var
|
|
319
|
-
if (R >=
|
|
320
|
-
return this.diff_bisectSplit_(n, t, R,
|
|
318
|
+
var P = a - d[U];
|
|
319
|
+
if (R >= P)
|
|
320
|
+
return this.diff_bisectSplit_(n, t, R, z, i);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
for (var
|
|
325
|
-
var U = c +
|
|
326
|
-
|
|
327
|
-
for (var
|
|
328
|
-
|
|
329
|
-
if (d[U] =
|
|
330
|
-
|
|
331
|
-
else if (
|
|
332
|
-
|
|
324
|
+
for (var K = -S + y; K <= S - D; K += 2) {
|
|
325
|
+
var U = c + K, P;
|
|
326
|
+
K == -S || K != S && d[U - 1] < d[U + 1] ? P = d[U + 1] : P = d[U - 1] + 1;
|
|
327
|
+
for (var X = P - K; P < a && X < s && n.charAt(a - P - 1) == t.charAt(s - X - 1); )
|
|
328
|
+
P++, X++;
|
|
329
|
+
if (d[U] = P, P > a)
|
|
330
|
+
D += 2;
|
|
331
|
+
else if (X > s)
|
|
332
|
+
y += 2;
|
|
333
333
|
else if (!E) {
|
|
334
|
-
var I = c + b -
|
|
334
|
+
var I = c + b - K;
|
|
335
335
|
if (I >= 0 && I < f && g[I] != -1) {
|
|
336
|
-
var R = g[I],
|
|
337
|
-
if (
|
|
338
|
-
return this.diff_bisectSplit_(n, t, R,
|
|
336
|
+
var R = g[I], z = c + R - I;
|
|
337
|
+
if (P = a - P, R >= P)
|
|
338
|
+
return this.diff_bisectSplit_(n, t, R, z, i);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
return [
|
|
344
|
-
new r.Diff(
|
|
344
|
+
new r.Diff(l, n),
|
|
345
345
|
new r.Diff(u, t)
|
|
346
346
|
];
|
|
347
347
|
}, r.prototype.diff_bisectSplit_ = function(n, t, i, a, s) {
|
|
348
|
-
var
|
|
348
|
+
var o = n.substring(0, i), c = t.substring(0, a), f = n.substring(i), g = t.substring(a), d = this.diff_main(o, c, !1, s), p = this.diff_main(f, g, !1, s);
|
|
349
349
|
return d.concat(p);
|
|
350
350
|
}, r.prototype.diff_linesToChars_ = function(n, t) {
|
|
351
351
|
var i = [], a = {};
|
|
@@ -355,31 +355,31 @@ var hn = { exports: {} };
|
|
|
355
355
|
b = g.indexOf(`
|
|
356
356
|
`, p), b == -1 && (b = g.length - 1);
|
|
357
357
|
var v = g.substring(p, b + 1);
|
|
358
|
-
(a.hasOwnProperty ? a.hasOwnProperty(v) : a[v] !== void 0) ? d += String.fromCharCode(a[v]) : (E ==
|
|
358
|
+
(a.hasOwnProperty ? a.hasOwnProperty(v) : a[v] !== void 0) ? d += String.fromCharCode(a[v]) : (E == o && (v = g.substring(p), b = g.length), d += String.fromCharCode(E), a[v] = E, i[E++] = v), p = b + 1;
|
|
359
359
|
}
|
|
360
360
|
return d;
|
|
361
361
|
}
|
|
362
|
-
var
|
|
363
|
-
|
|
362
|
+
var o = 4e4, c = s(n);
|
|
363
|
+
o = 65535;
|
|
364
364
|
var f = s(t);
|
|
365
365
|
return { chars1: c, chars2: f, lineArray: i };
|
|
366
366
|
}, r.prototype.diff_charsToLines_ = function(n, t) {
|
|
367
367
|
for (var i = 0; i < n.length; i++) {
|
|
368
|
-
for (var a = n[i][1], s = [],
|
|
369
|
-
s[
|
|
368
|
+
for (var a = n[i][1], s = [], o = 0; o < a.length; o++)
|
|
369
|
+
s[o] = t[a.charCodeAt(o)];
|
|
370
370
|
n[i][1] = s.join("");
|
|
371
371
|
}
|
|
372
372
|
}, r.prototype.diff_commonPrefix = function(n, t) {
|
|
373
373
|
if (!n || !t || n.charAt(0) != t.charAt(0))
|
|
374
374
|
return 0;
|
|
375
|
-
for (var i = 0, a = Math.min(n.length, t.length), s = a,
|
|
376
|
-
n.substring(
|
|
375
|
+
for (var i = 0, a = Math.min(n.length, t.length), s = a, o = 0; i < s; )
|
|
376
|
+
n.substring(o, s) == t.substring(o, s) ? (i = s, o = i) : a = s, s = Math.floor((a - i) / 2 + i);
|
|
377
377
|
return s;
|
|
378
378
|
}, r.prototype.diff_commonSuffix = function(n, t) {
|
|
379
379
|
if (!n || !t || n.charAt(n.length - 1) != t.charAt(t.length - 1))
|
|
380
380
|
return 0;
|
|
381
|
-
for (var i = 0, a = Math.min(n.length, t.length), s = a,
|
|
382
|
-
n.substring(n.length - s, n.length -
|
|
381
|
+
for (var i = 0, a = Math.min(n.length, t.length), s = a, o = 0; i < s; )
|
|
382
|
+
n.substring(n.length - s, n.length - o) == t.substring(t.length - s, t.length - o) ? (i = s, o = i) : a = s, s = Math.floor((a - i) / 2 + i);
|
|
383
383
|
return s;
|
|
384
384
|
}, r.prototype.diff_commonOverlap_ = function(n, t) {
|
|
385
385
|
var i = n.length, a = t.length;
|
|
@@ -389,11 +389,11 @@ var hn = { exports: {} };
|
|
|
389
389
|
var s = Math.min(i, a);
|
|
390
390
|
if (n == t)
|
|
391
391
|
return s;
|
|
392
|
-
for (var
|
|
392
|
+
for (var o = 0, c = 1; ; ) {
|
|
393
393
|
var f = n.substring(s - c), g = t.indexOf(f);
|
|
394
394
|
if (g == -1)
|
|
395
|
-
return
|
|
396
|
-
c += g, (g == 0 || n.substring(s - c) == t.substring(0, c)) && (
|
|
395
|
+
return o;
|
|
396
|
+
c += g, (g == 0 || n.substring(s - c) == t.substring(0, c)) && (o = c, c++);
|
|
397
397
|
}
|
|
398
398
|
}, r.prototype.diff_halfMatch_ = function(n, t) {
|
|
399
399
|
if (this.Diff_Timeout <= 0)
|
|
@@ -402,30 +402,30 @@ var hn = { exports: {} };
|
|
|
402
402
|
if (i.length < 4 || a.length * 2 < i.length)
|
|
403
403
|
return null;
|
|
404
404
|
var s = this;
|
|
405
|
-
function
|
|
406
|
-
for (var
|
|
407
|
-
var
|
|
408
|
-
w.substring(
|
|
409
|
-
|
|
410
|
-
),
|
|
411
|
-
w.substring(0,
|
|
412
|
-
|
|
405
|
+
function o(w, y, D) {
|
|
406
|
+
for (var S = w.substring(D, D + Math.floor(w.length / 4)), T = -1, I = "", R, z, U, P; (T = y.indexOf(S, T + 1)) != -1; ) {
|
|
407
|
+
var K = s.diff_commonPrefix(
|
|
408
|
+
w.substring(D),
|
|
409
|
+
y.substring(T)
|
|
410
|
+
), X = s.diff_commonSuffix(
|
|
411
|
+
w.substring(0, D),
|
|
412
|
+
y.substring(0, T)
|
|
413
413
|
);
|
|
414
|
-
I.length <
|
|
414
|
+
I.length < X + K && (I = y.substring(T - X, T) + y.substring(T, T + K), R = w.substring(0, D - X), z = w.substring(D + K), U = y.substring(0, T - X), P = y.substring(T + K));
|
|
415
415
|
}
|
|
416
416
|
return I.length * 2 >= w.length ? [
|
|
417
417
|
R,
|
|
418
|
-
|
|
418
|
+
z,
|
|
419
419
|
U,
|
|
420
|
-
|
|
420
|
+
P,
|
|
421
421
|
I
|
|
422
422
|
] : null;
|
|
423
423
|
}
|
|
424
|
-
var c =
|
|
424
|
+
var c = o(
|
|
425
425
|
i,
|
|
426
426
|
a,
|
|
427
427
|
Math.ceil(i.length / 4)
|
|
428
|
-
), f =
|
|
428
|
+
), f = o(
|
|
429
429
|
i,
|
|
430
430
|
a,
|
|
431
431
|
Math.ceil(i.length / 2)
|
|
@@ -438,82 +438,82 @@ var hn = { exports: {} };
|
|
|
438
438
|
var v = g[4];
|
|
439
439
|
return [d, p, b, E, v];
|
|
440
440
|
}, r.prototype.diff_cleanupSemantic = function(n) {
|
|
441
|
-
for (var t = !1, i = [], a = 0, s = null,
|
|
442
|
-
n[
|
|
441
|
+
for (var t = !1, i = [], a = 0, s = null, o = 0, c = 0, f = 0, g = 0, d = 0; o < n.length; )
|
|
442
|
+
n[o][0] == h ? (i[a++] = o, c = g, f = d, g = 0, d = 0, s = n[o][1]) : (n[o][0] == u ? g += n[o][1].length : d += n[o][1].length, s && s.length <= Math.max(c, f) && s.length <= Math.max(
|
|
443
443
|
g,
|
|
444
444
|
d
|
|
445
445
|
) && (n.splice(
|
|
446
446
|
i[a - 1],
|
|
447
447
|
0,
|
|
448
|
-
new r.Diff(
|
|
449
|
-
), n[i[a - 1] + 1][0] = u, a--, a--,
|
|
450
|
-
for (t && this.diff_cleanupMerge(n), this.diff_cleanupSemanticLossless(n),
|
|
451
|
-
if (n[
|
|
452
|
-
var p = n[
|
|
453
|
-
E >= v ? (E >= p.length / 2 || E >= b.length / 2) && (n.splice(
|
|
448
|
+
new r.Diff(l, s)
|
|
449
|
+
), n[i[a - 1] + 1][0] = u, a--, a--, o = a > 0 ? i[a - 1] : -1, c = 0, f = 0, g = 0, d = 0, s = null, t = !0)), o++;
|
|
450
|
+
for (t && this.diff_cleanupMerge(n), this.diff_cleanupSemanticLossless(n), o = 1; o < n.length; ) {
|
|
451
|
+
if (n[o - 1][0] == l && n[o][0] == u) {
|
|
452
|
+
var p = n[o - 1][1], b = n[o][1], E = this.diff_commonOverlap_(p, b), v = this.diff_commonOverlap_(b, p);
|
|
453
|
+
E >= v ? (E >= p.length / 2 || E >= b.length / 2) && (n.splice(o, 0, new r.Diff(
|
|
454
454
|
h,
|
|
455
455
|
b.substring(0, E)
|
|
456
|
-
)), n[
|
|
456
|
+
)), n[o - 1][1] = p.substring(0, p.length - E), n[o + 1][1] = b.substring(E), o++) : (v >= p.length / 2 || v >= b.length / 2) && (n.splice(o, 0, new r.Diff(
|
|
457
457
|
h,
|
|
458
458
|
p.substring(0, v)
|
|
459
|
-
)), n[
|
|
459
|
+
)), n[o - 1][0] = u, n[o - 1][1] = b.substring(0, b.length - v), n[o + 1][0] = l, n[o + 1][1] = p.substring(v), o++), o++;
|
|
460
460
|
}
|
|
461
|
-
|
|
461
|
+
o++;
|
|
462
462
|
}
|
|
463
463
|
}, r.prototype.diff_cleanupSemanticLossless = function(n) {
|
|
464
464
|
function t(v, w) {
|
|
465
465
|
if (!v || !w)
|
|
466
466
|
return 6;
|
|
467
|
-
var
|
|
468
|
-
return
|
|
467
|
+
var y = v.charAt(v.length - 1), D = w.charAt(0), S = y.match(r.nonAlphaNumericRegex_), T = D.match(r.nonAlphaNumericRegex_), I = S && y.match(r.whitespaceRegex_), R = T && D.match(r.whitespaceRegex_), z = I && y.match(r.linebreakRegex_), U = R && D.match(r.linebreakRegex_), P = z && v.match(r.blanklineEndRegex_), K = U && w.match(r.blanklineStartRegex_);
|
|
468
|
+
return P || K ? 5 : z || U ? 4 : S && !I && R ? 3 : I || R ? 2 : S || T ? 1 : 0;
|
|
469
469
|
}
|
|
470
470
|
for (var i = 1; i < n.length - 1; ) {
|
|
471
471
|
if (n[i - 1][0] == h && n[i + 1][0] == h) {
|
|
472
|
-
var a = n[i - 1][1], s = n[i][1],
|
|
472
|
+
var a = n[i - 1][1], s = n[i][1], o = n[i + 1][1], c = this.diff_commonSuffix(a, s);
|
|
473
473
|
if (c) {
|
|
474
474
|
var f = s.substring(s.length - c);
|
|
475
|
-
a = a.substring(0, a.length - c), s = f + s.substring(0, s.length - c),
|
|
475
|
+
a = a.substring(0, a.length - c), s = f + s.substring(0, s.length - c), o = f + o;
|
|
476
476
|
}
|
|
477
|
-
for (var g = a, d = s, p =
|
|
478
|
-
a += s.charAt(0), s = s.substring(1) +
|
|
479
|
-
var E = t(a, s) + t(s,
|
|
480
|
-
E >= b && (b = E, g = a, d = s, p =
|
|
477
|
+
for (var g = a, d = s, p = o, b = t(a, s) + t(s, o); s.charAt(0) === o.charAt(0); ) {
|
|
478
|
+
a += s.charAt(0), s = s.substring(1) + o.charAt(0), o = o.substring(1);
|
|
479
|
+
var E = t(a, s) + t(s, o);
|
|
480
|
+
E >= b && (b = E, g = a, d = s, p = o);
|
|
481
481
|
}
|
|
482
482
|
n[i - 1][1] != g && (g ? n[i - 1][1] = g : (n.splice(i - 1, 1), i--), n[i][1] = d, p ? n[i + 1][1] = p : (n.splice(i + 1, 1), i--));
|
|
483
483
|
}
|
|
484
484
|
i++;
|
|
485
485
|
}
|
|
486
486
|
}, r.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, r.whitespaceRegex_ = /\s/, r.linebreakRegex_ = /[\r\n]/, r.blanklineEndRegex_ = /\n\r?\n$/, r.blanklineStartRegex_ = /^\r?\n\r?\n/, r.prototype.diff_cleanupEfficiency = function(n) {
|
|
487
|
-
for (var t = !1, i = [], a = 0, s = null,
|
|
488
|
-
n[
|
|
487
|
+
for (var t = !1, i = [], a = 0, s = null, o = 0, c = !1, f = !1, g = !1, d = !1; o < n.length; )
|
|
488
|
+
n[o][0] == h ? (n[o][1].length < this.Diff_EditCost && (g || d) ? (i[a++] = o, c = g, f = d, s = n[o][1]) : (a = 0, s = null), g = d = !1) : (n[o][0] == l ? d = !0 : g = !0, s && (c && f && g && d || s.length < this.Diff_EditCost / 2 && c + f + g + d == 3) && (n.splice(
|
|
489
489
|
i[a - 1],
|
|
490
490
|
0,
|
|
491
|
-
new r.Diff(
|
|
492
|
-
), n[i[a - 1] + 1][0] = u, a--, s = null, c && f ? (g = d = !0, a = 0) : (a--,
|
|
491
|
+
new r.Diff(l, s)
|
|
492
|
+
), n[i[a - 1] + 1][0] = u, a--, s = null, c && f ? (g = d = !0, a = 0) : (a--, o = a > 0 ? i[a - 1] : -1, g = d = !1), t = !0)), o++;
|
|
493
493
|
t && this.diff_cleanupMerge(n);
|
|
494
494
|
}, r.prototype.diff_cleanupMerge = function(n) {
|
|
495
495
|
n.push(new r.Diff(h, ""));
|
|
496
|
-
for (var t = 0, i = 0, a = 0, s = "",
|
|
496
|
+
for (var t = 0, i = 0, a = 0, s = "", o = "", c; t < n.length; )
|
|
497
497
|
switch (n[t][0]) {
|
|
498
498
|
case u:
|
|
499
|
-
a++,
|
|
499
|
+
a++, o += n[t][1], t++;
|
|
500
500
|
break;
|
|
501
|
-
case
|
|
501
|
+
case l:
|
|
502
502
|
i++, s += n[t][1], t++;
|
|
503
503
|
break;
|
|
504
504
|
case h:
|
|
505
|
-
i + a > 1 ? (i !== 0 && a !== 0 && (c = this.diff_commonPrefix(
|
|
505
|
+
i + a > 1 ? (i !== 0 && a !== 0 && (c = this.diff_commonPrefix(o, s), c !== 0 && (t - i - a > 0 && n[t - i - a - 1][0] == h ? n[t - i - a - 1][1] += o.substring(0, c) : (n.splice(0, 0, new r.Diff(
|
|
506
506
|
h,
|
|
507
|
-
|
|
508
|
-
)), t++),
|
|
507
|
+
o.substring(0, c)
|
|
508
|
+
)), t++), o = o.substring(c), s = s.substring(c)), c = this.diff_commonSuffix(o, s), c !== 0 && (n[t][1] = o.substring(o.length - c) + n[t][1], o = o.substring(0, o.length - c), s = s.substring(0, s.length - c))), t -= i + a, n.splice(t, i + a), s.length && (n.splice(
|
|
509
509
|
t,
|
|
510
510
|
0,
|
|
511
|
-
new r.Diff(
|
|
512
|
-
), t++),
|
|
511
|
+
new r.Diff(l, s)
|
|
512
|
+
), t++), o.length && (n.splice(
|
|
513
513
|
t,
|
|
514
514
|
0,
|
|
515
|
-
new r.Diff(u,
|
|
516
|
-
), t++), t++) : t !== 0 && n[t - 1][0] == h ? (n[t - 1][1] += n[t][1], n.splice(t, 1)) : t++, a = 0, i = 0, s = "",
|
|
515
|
+
new r.Diff(u, o)
|
|
516
|
+
), t++), t++) : t !== 0 && n[t - 1][0] == h ? (n[t - 1][1] += n[t][1], n.splice(t, 1)) : t++, a = 0, i = 0, s = "", o = "";
|
|
517
517
|
break;
|
|
518
518
|
}
|
|
519
519
|
n[n.length - 1][1] === "" && n.pop();
|
|
@@ -522,18 +522,18 @@ var hn = { exports: {} };
|
|
|
522
522
|
n[t - 1][0] == h && n[t + 1][0] == h && (n[t][1].substring(n[t][1].length - n[t - 1][1].length) == n[t - 1][1] ? (n[t][1] = n[t - 1][1] + n[t][1].substring(0, n[t][1].length - n[t - 1][1].length), n[t + 1][1] = n[t - 1][1] + n[t + 1][1], n.splice(t - 1, 1), f = !0) : n[t][1].substring(0, n[t + 1][1].length) == n[t + 1][1] && (n[t - 1][1] += n[t + 1][1], n[t][1] = n[t][1].substring(n[t + 1][1].length) + n[t + 1][1], n.splice(t + 1, 1), f = !0)), t++;
|
|
523
523
|
f && this.diff_cleanupMerge(n);
|
|
524
524
|
}, r.prototype.diff_xIndex = function(n, t) {
|
|
525
|
-
var i = 0, a = 0, s = 0,
|
|
526
|
-
for (c = 0; c < n.length && (n[c][0] !== u && (i += n[c][1].length), n[c][0] !==
|
|
527
|
-
s = i,
|
|
528
|
-
return n.length != c && n[c][0] ===
|
|
525
|
+
var i = 0, a = 0, s = 0, o = 0, c;
|
|
526
|
+
for (c = 0; c < n.length && (n[c][0] !== u && (i += n[c][1].length), n[c][0] !== l && (a += n[c][1].length), !(i > t)); c++)
|
|
527
|
+
s = i, o = a;
|
|
528
|
+
return n.length != c && n[c][0] === l ? o : o + (t - s);
|
|
529
529
|
}, r.prototype.diff_prettyHtml = function(n) {
|
|
530
|
-
for (var t = [], i = /&/g, a = /</g, s = />/g,
|
|
531
|
-
var f = n[c][0], g = n[c][1], d = g.replace(i, "&").replace(a, "<").replace(s, ">").replace(
|
|
530
|
+
for (var t = [], i = /&/g, a = /</g, s = />/g, o = /\n/g, c = 0; c < n.length; c++) {
|
|
531
|
+
var f = n[c][0], g = n[c][1], d = g.replace(i, "&").replace(a, "<").replace(s, ">").replace(o, "¶<br>");
|
|
532
532
|
switch (f) {
|
|
533
533
|
case u:
|
|
534
534
|
t[c] = '<ins style="background:#e6ffe6;">' + d + "</ins>";
|
|
535
535
|
break;
|
|
536
|
-
case
|
|
536
|
+
case l:
|
|
537
537
|
t[c] = '<del style="background:#ffe6e6;">' + d + "</del>";
|
|
538
538
|
break;
|
|
539
539
|
case h:
|
|
@@ -548,16 +548,16 @@ var hn = { exports: {} };
|
|
|
548
548
|
return t.join("");
|
|
549
549
|
}, r.prototype.diff_text2 = function(n) {
|
|
550
550
|
for (var t = [], i = 0; i < n.length; i++)
|
|
551
|
-
n[i][0] !==
|
|
551
|
+
n[i][0] !== l && (t[i] = n[i][1]);
|
|
552
552
|
return t.join("");
|
|
553
553
|
}, r.prototype.diff_levenshtein = function(n) {
|
|
554
554
|
for (var t = 0, i = 0, a = 0, s = 0; s < n.length; s++) {
|
|
555
|
-
var
|
|
556
|
-
switch (
|
|
555
|
+
var o = n[s][0], c = n[s][1];
|
|
556
|
+
switch (o) {
|
|
557
557
|
case u:
|
|
558
558
|
i += c.length;
|
|
559
559
|
break;
|
|
560
|
-
case
|
|
560
|
+
case l:
|
|
561
561
|
a += c.length;
|
|
562
562
|
break;
|
|
563
563
|
case h:
|
|
@@ -572,7 +572,7 @@ var hn = { exports: {} };
|
|
|
572
572
|
case u:
|
|
573
573
|
t[i] = "+" + encodeURI(n[i][1]);
|
|
574
574
|
break;
|
|
575
|
-
case
|
|
575
|
+
case l:
|
|
576
576
|
t[i] = "-" + n[i][1].length;
|
|
577
577
|
break;
|
|
578
578
|
case h:
|
|
@@ -581,9 +581,9 @@ var hn = { exports: {} };
|
|
|
581
581
|
}
|
|
582
582
|
return t.join(" ").replace(/%20/g, " ");
|
|
583
583
|
}, r.prototype.diff_fromDelta = function(n, t) {
|
|
584
|
-
for (var i = [], a = 0, s = 0,
|
|
585
|
-
var f =
|
|
586
|
-
switch (
|
|
584
|
+
for (var i = [], a = 0, s = 0, o = t.split(/\t/g), c = 0; c < o.length; c++) {
|
|
585
|
+
var f = o[c].substring(1);
|
|
586
|
+
switch (o[c].charAt(0)) {
|
|
587
587
|
case "+":
|
|
588
588
|
try {
|
|
589
589
|
i[a++] = new r.Diff(u, decodeURI(f));
|
|
@@ -597,11 +597,11 @@ var hn = { exports: {} };
|
|
|
597
597
|
if (isNaN(g) || g < 0)
|
|
598
598
|
throw new Error("Invalid number in diff_fromDelta: " + f);
|
|
599
599
|
var d = n.substring(s, s += g);
|
|
600
|
-
|
|
600
|
+
o[c].charAt(0) == "=" ? i[a++] = new r.Diff(h, d) : i[a++] = new r.Diff(l, d);
|
|
601
601
|
break;
|
|
602
602
|
default:
|
|
603
|
-
if (
|
|
604
|
-
throw new Error("Invalid diff operation in diff_fromDelta: " +
|
|
603
|
+
if (o[c])
|
|
604
|
+
throw new Error("Invalid diff operation in diff_fromDelta: " + o[c]);
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
if (s != n.length)
|
|
@@ -615,34 +615,34 @@ var hn = { exports: {} };
|
|
|
615
615
|
if (t.length > this.Match_MaxBits)
|
|
616
616
|
throw new Error("Pattern too long for this browser.");
|
|
617
617
|
var a = this.match_alphabet_(t), s = this;
|
|
618
|
-
function
|
|
619
|
-
var U = R / t.length,
|
|
620
|
-
return s.Match_Distance ? U +
|
|
618
|
+
function o(R, z) {
|
|
619
|
+
var U = R / t.length, P = Math.abs(i - z);
|
|
620
|
+
return s.Match_Distance ? U + P / s.Match_Distance : P ? 1 : U;
|
|
621
621
|
}
|
|
622
622
|
var c = this.Match_Threshold, f = n.indexOf(t, i);
|
|
623
|
-
f != -1 && (c = Math.min(
|
|
623
|
+
f != -1 && (c = Math.min(o(0, f), c), f = n.lastIndexOf(t, i + t.length), f != -1 && (c = Math.min(o(0, f), c)));
|
|
624
624
|
var g = 1 << t.length - 1;
|
|
625
625
|
f = -1;
|
|
626
626
|
for (var d, p, b = t.length + n.length, E, v = 0; v < t.length; v++) {
|
|
627
627
|
for (d = 0, p = b; d < p; )
|
|
628
|
-
|
|
628
|
+
o(v, i + p) <= c ? d = p : b = p, p = Math.floor((b - d) / 2 + d);
|
|
629
629
|
b = p;
|
|
630
|
-
var w = Math.max(1, i - p + 1),
|
|
631
|
-
|
|
632
|
-
for (var
|
|
633
|
-
var
|
|
634
|
-
if (v === 0 ? S
|
|
635
|
-
var I =
|
|
630
|
+
var w = Math.max(1, i - p + 1), y = Math.min(i + p, n.length) + t.length, D = Array(y + 2);
|
|
631
|
+
D[y + 1] = (1 << v) - 1;
|
|
632
|
+
for (var S = y; S >= w; S--) {
|
|
633
|
+
var T = a[n.charAt(S - 1)];
|
|
634
|
+
if (v === 0 ? D[S] = (D[S + 1] << 1 | 1) & T : D[S] = (D[S + 1] << 1 | 1) & T | ((E[S + 1] | E[S]) << 1 | 1) | E[S + 1], D[S] & g) {
|
|
635
|
+
var I = o(v, S - 1);
|
|
636
636
|
if (I <= c)
|
|
637
|
-
if (c = I, f =
|
|
637
|
+
if (c = I, f = S - 1, f > i)
|
|
638
638
|
w = Math.max(1, 2 * i - f);
|
|
639
639
|
else
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
if (
|
|
643
|
+
if (o(v + 1, i) > c)
|
|
644
644
|
break;
|
|
645
|
-
E =
|
|
645
|
+
E = D;
|
|
646
646
|
}
|
|
647
647
|
return f;
|
|
648
648
|
}, r.prototype.match_alphabet_ = function(n) {
|
|
@@ -663,11 +663,11 @@ var hn = { exports: {} };
|
|
|
663
663
|
a += this.Patch_Margin;
|
|
664
664
|
var s = t.substring(n.start2 - a, n.start2);
|
|
665
665
|
s && n.diffs.unshift(new r.Diff(h, s));
|
|
666
|
-
var
|
|
666
|
+
var o = t.substring(
|
|
667
667
|
n.start2 + n.length1,
|
|
668
668
|
n.start2 + n.length1 + a
|
|
669
669
|
);
|
|
670
|
-
|
|
670
|
+
o && n.diffs.push(new r.Diff(h, o)), n.start1 -= s.length, n.start2 -= s.length, n.length1 += s.length + o.length, n.length2 += s.length + o.length;
|
|
671
671
|
}
|
|
672
672
|
}, r.prototype.patch_make = function(n, t, i) {
|
|
673
673
|
var a, s;
|
|
@@ -694,28 +694,28 @@ var hn = { exports: {} };
|
|
|
694
694
|
throw new Error("Unknown call format to patch_make.");
|
|
695
695
|
if (s.length === 0)
|
|
696
696
|
return [];
|
|
697
|
-
for (var
|
|
697
|
+
for (var o = [], c = new r.patch_obj(), f = 0, g = 0, d = 0, p = a, b = a, E = 0; E < s.length; E++) {
|
|
698
698
|
var v = s[E][0], w = s[E][1];
|
|
699
699
|
switch (!f && v !== h && (c.start1 = g, c.start2 = d), v) {
|
|
700
700
|
case u:
|
|
701
701
|
c.diffs[f++] = s[E], c.length2 += w.length, b = b.substring(0, d) + w + b.substring(d);
|
|
702
702
|
break;
|
|
703
|
-
case
|
|
703
|
+
case l:
|
|
704
704
|
c.length1 += w.length, c.diffs[f++] = s[E], b = b.substring(0, d) + b.substring(d + w.length);
|
|
705
705
|
break;
|
|
706
706
|
case h:
|
|
707
|
-
w.length <= 2 * this.Patch_Margin && f && s.length != E + 1 ? (c.diffs[f++] = s[E], c.length1 += w.length, c.length2 += w.length) : w.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, p),
|
|
707
|
+
w.length <= 2 * this.Patch_Margin && f && s.length != E + 1 ? (c.diffs[f++] = s[E], c.length1 += w.length, c.length2 += w.length) : w.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, p), o.push(c), c = new r.patch_obj(), f = 0, p = b, g = d);
|
|
708
708
|
break;
|
|
709
709
|
}
|
|
710
|
-
v !== u && (g += w.length), v !==
|
|
710
|
+
v !== u && (g += w.length), v !== l && (d += w.length);
|
|
711
711
|
}
|
|
712
|
-
return f && (this.patch_addContext_(c, p),
|
|
712
|
+
return f && (this.patch_addContext_(c, p), o.push(c)), o;
|
|
713
713
|
}, r.prototype.patch_deepCopy = function(n) {
|
|
714
714
|
for (var t = [], i = 0; i < n.length; i++) {
|
|
715
715
|
var a = n[i], s = new r.patch_obj();
|
|
716
716
|
s.diffs = [];
|
|
717
|
-
for (var
|
|
718
|
-
s.diffs[
|
|
717
|
+
for (var o = 0; o < a.diffs.length; o++)
|
|
718
|
+
s.diffs[o] = new r.Diff(a.diffs[o][0], a.diffs[o][1]);
|
|
719
719
|
s.start1 = a.start1, s.start2 = a.start2, s.length1 = a.length1, s.length2 = a.length2, t[i] = s;
|
|
720
720
|
}
|
|
721
721
|
return t;
|
|
@@ -725,8 +725,8 @@ var hn = { exports: {} };
|
|
|
725
725
|
n = this.patch_deepCopy(n);
|
|
726
726
|
var i = this.patch_addPadding(n);
|
|
727
727
|
t = i + t + i, this.patch_splitMax(n);
|
|
728
|
-
for (var a = 0, s = [],
|
|
729
|
-
var c = n[
|
|
728
|
+
for (var a = 0, s = [], o = 0; o < n.length; o++) {
|
|
729
|
+
var c = n[o].start2 + a, f = this.diff_text1(n[o].diffs), g, d = -1;
|
|
730
730
|
if (f.length > this.Match_MaxBits ? (g = this.match_main(
|
|
731
731
|
t,
|
|
732
732
|
f.substring(0, this.Match_MaxBits),
|
|
@@ -736,24 +736,24 @@ var hn = { exports: {} };
|
|
|
736
736
|
f.substring(f.length - this.Match_MaxBits),
|
|
737
737
|
c + f.length - this.Match_MaxBits
|
|
738
738
|
), (d == -1 || g >= d) && (g = -1))) : g = this.match_main(t, f, c), g == -1)
|
|
739
|
-
s[
|
|
739
|
+
s[o] = !1, a -= n[o].length2 - n[o].length1;
|
|
740
740
|
else {
|
|
741
|
-
s[
|
|
741
|
+
s[o] = !0, a = g - c;
|
|
742
742
|
var p;
|
|
743
743
|
if (d == -1 ? p = t.substring(g, g + f.length) : p = t.substring(g, d + this.Match_MaxBits), f == p)
|
|
744
|
-
t = t.substring(0, g) + this.diff_text2(n[
|
|
744
|
+
t = t.substring(0, g) + this.diff_text2(n[o].diffs) + t.substring(g + f.length);
|
|
745
745
|
else {
|
|
746
746
|
var b = this.diff_main(f, p, !1);
|
|
747
747
|
if (f.length > this.Match_MaxBits && this.diff_levenshtein(b) / f.length > this.Patch_DeleteThreshold)
|
|
748
|
-
s[
|
|
748
|
+
s[o] = !1;
|
|
749
749
|
else {
|
|
750
750
|
this.diff_cleanupSemanticLossless(b);
|
|
751
|
-
for (var E = 0, v, w = 0; w < n[
|
|
752
|
-
var
|
|
753
|
-
|
|
751
|
+
for (var E = 0, v, w = 0; w < n[o].diffs.length; w++) {
|
|
752
|
+
var y = n[o].diffs[w];
|
|
753
|
+
y[0] !== h && (v = this.diff_xIndex(b, E)), y[0] === u ? t = t.substring(0, g + v) + y[1] + t.substring(g + v) : y[0] === l && (t = t.substring(0, g + v) + t.substring(g + this.diff_xIndex(
|
|
754
754
|
b,
|
|
755
|
-
E +
|
|
756
|
-
))),
|
|
755
|
+
E + y[1].length
|
|
756
|
+
))), y[0] !== l && (E += y[1].length);
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
759
|
}
|
|
@@ -765,18 +765,18 @@ var hn = { exports: {} };
|
|
|
765
765
|
i += String.fromCharCode(a);
|
|
766
766
|
for (var a = 0; a < n.length; a++)
|
|
767
767
|
n[a].start1 += t, n[a].start2 += t;
|
|
768
|
-
var s = n[0],
|
|
769
|
-
if (
|
|
770
|
-
|
|
771
|
-
else if (t >
|
|
772
|
-
var c = t -
|
|
773
|
-
|
|
768
|
+
var s = n[0], o = s.diffs;
|
|
769
|
+
if (o.length == 0 || o[0][0] != h)
|
|
770
|
+
o.unshift(new r.Diff(h, i)), s.start1 -= t, s.start2 -= t, s.length1 += t, s.length2 += t;
|
|
771
|
+
else if (t > o[0][1].length) {
|
|
772
|
+
var c = t - o[0][1].length;
|
|
773
|
+
o[0][1] = i.substring(o[0][1].length) + o[0][1], s.start1 -= c, s.start2 -= c, s.length1 += c, s.length2 += c;
|
|
774
774
|
}
|
|
775
|
-
if (s = n[n.length - 1],
|
|
776
|
-
|
|
777
|
-
else if (t >
|
|
778
|
-
var c = t -
|
|
779
|
-
|
|
775
|
+
if (s = n[n.length - 1], o = s.diffs, o.length == 0 || o[o.length - 1][0] != h)
|
|
776
|
+
o.push(new r.Diff(h, i)), s.length1 += t, s.length2 += t;
|
|
777
|
+
else if (t > o[o.length - 1][1].length) {
|
|
778
|
+
var c = t - o[o.length - 1][1].length;
|
|
779
|
+
o[o.length - 1][1] += i.substring(0, c), s.length1 += c, s.length2 += c;
|
|
780
780
|
}
|
|
781
781
|
return i;
|
|
782
782
|
}, r.prototype.patch_splitMax = function(n) {
|
|
@@ -784,14 +784,14 @@ var hn = { exports: {} };
|
|
|
784
784
|
if (!(n[i].length1 <= t)) {
|
|
785
785
|
var a = n[i];
|
|
786
786
|
n.splice(i--, 1);
|
|
787
|
-
for (var s = a.start1,
|
|
787
|
+
for (var s = a.start1, o = a.start2, c = ""; a.diffs.length !== 0; ) {
|
|
788
788
|
var f = new r.patch_obj(), g = !0;
|
|
789
|
-
for (f.start1 = s - c.length, f.start2 =
|
|
789
|
+
for (f.start1 = s - c.length, f.start2 = o - c.length, c !== "" && (f.length1 = f.length2 = c.length, f.diffs.push(new r.Diff(h, c))); a.diffs.length !== 0 && f.length1 < t - this.Patch_Margin; ) {
|
|
790
790
|
var d = a.diffs[0][0], p = a.diffs[0][1];
|
|
791
|
-
d === u ? (f.length2 += p.length,
|
|
791
|
+
d === u ? (f.length2 += p.length, o += p.length, f.diffs.push(a.diffs.shift()), g = !1) : d === l && f.diffs.length == 1 && f.diffs[0][0] == h && p.length > 2 * t ? (f.length1 += p.length, s += p.length, g = !1, f.diffs.push(new r.Diff(d, p)), a.diffs.shift()) : (p = p.substring(
|
|
792
792
|
0,
|
|
793
793
|
t - f.length1 - this.Patch_Margin
|
|
794
|
-
), f.length1 += p.length, s += p.length, d === h ? (f.length2 += p.length,
|
|
794
|
+
), f.length1 += p.length, s += p.length, d === h ? (f.length2 += p.length, o += p.length) : g = !1, f.diffs.push(new r.Diff(d, p)), p == a.diffs[0][1] ? a.diffs.shift() : a.diffs[0][1] = a.diffs[0][1].substring(p.length));
|
|
795
795
|
}
|
|
796
796
|
c = this.diff_text2(f.diffs), c = c.substring(c.length - this.Patch_Margin);
|
|
797
797
|
var b = this.diff_text1(a.diffs).substring(0, this.Patch_Margin);
|
|
@@ -808,11 +808,11 @@ var hn = { exports: {} };
|
|
|
808
808
|
return t;
|
|
809
809
|
for (var i = n.split(`
|
|
810
810
|
`), a = 0, s = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; a < i.length; ) {
|
|
811
|
-
var
|
|
812
|
-
if (!
|
|
811
|
+
var o = i[a].match(s);
|
|
812
|
+
if (!o)
|
|
813
813
|
throw new Error("Invalid patch string: " + i[a]);
|
|
814
814
|
var c = new r.patch_obj();
|
|
815
|
-
for (t.push(c), c.start1 = parseInt(
|
|
815
|
+
for (t.push(c), c.start1 = parseInt(o[1], 10), o[2] === "" ? (c.start1--, c.length1 = 1) : o[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(o[2], 10)), c.start2 = parseInt(o[3], 10), o[4] === "" ? (c.start2--, c.length2 = 1) : o[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(o[4], 10)), a++; a < i.length; ) {
|
|
816
816
|
var f = i[a].charAt(0);
|
|
817
817
|
try {
|
|
818
818
|
var g = decodeURI(i[a].substring(1));
|
|
@@ -820,7 +820,7 @@ var hn = { exports: {} };
|
|
|
820
820
|
throw new Error("Illegal escape in patch_fromText: " + g);
|
|
821
821
|
}
|
|
822
822
|
if (f == "-")
|
|
823
|
-
c.diffs.push(new r.Diff(
|
|
823
|
+
c.diffs.push(new r.Diff(l, g));
|
|
824
824
|
else if (f == "+")
|
|
825
825
|
c.diffs.push(new r.Diff(u, g));
|
|
826
826
|
else if (f == " ")
|
|
@@ -846,7 +846,7 @@ var hn = { exports: {} };
|
|
|
846
846
|
case u:
|
|
847
847
|
a = "+";
|
|
848
848
|
break;
|
|
849
|
-
case
|
|
849
|
+
case l:
|
|
850
850
|
a = "-";
|
|
851
851
|
break;
|
|
852
852
|
case h:
|
|
@@ -857,22 +857,20 @@ var hn = { exports: {} };
|
|
|
857
857
|
`;
|
|
858
858
|
}
|
|
859
859
|
return i.join("").replace(/%20/g, " ");
|
|
860
|
-
}, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE =
|
|
861
|
-
})(
|
|
862
|
-
var
|
|
863
|
-
function
|
|
860
|
+
}, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE = l, e.exports.DIFF_INSERT = u, e.exports.DIFF_EQUAL = h;
|
|
861
|
+
})(dn);
|
|
862
|
+
var xe = dn.exports;
|
|
863
|
+
function pn(e) {
|
|
864
864
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
865
865
|
throw new Error("map is read-only");
|
|
866
866
|
} : e instanceof Set && (e.add = e.clear = e.delete = function() {
|
|
867
867
|
throw new Error("set is read-only");
|
|
868
|
-
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach(
|
|
869
|
-
|
|
870
|
-
|
|
868
|
+
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((r) => {
|
|
869
|
+
const l = e[r], u = typeof l;
|
|
870
|
+
(u === "object" || u === "function") && !Object.isFrozen(l) && pn(l);
|
|
871
871
|
}), e;
|
|
872
872
|
}
|
|
873
|
-
|
|
874
|
-
Ke.exports.default = We;
|
|
875
|
-
class tn {
|
|
873
|
+
class rn {
|
|
876
874
|
/**
|
|
877
875
|
* @param {CompiledMode} mode
|
|
878
876
|
*/
|
|
@@ -883,62 +881,67 @@ class tn {
|
|
|
883
881
|
this.isMatchIgnored = !0;
|
|
884
882
|
}
|
|
885
883
|
}
|
|
886
|
-
function
|
|
884
|
+
function bn(e) {
|
|
887
885
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
888
886
|
}
|
|
889
|
-
function
|
|
890
|
-
const
|
|
887
|
+
function oe(e, ...r) {
|
|
888
|
+
const l = /* @__PURE__ */ Object.create(null);
|
|
891
889
|
for (const u in e)
|
|
892
|
-
|
|
890
|
+
l[u] = e[u];
|
|
893
891
|
return r.forEach(function(u) {
|
|
894
892
|
for (const h in u)
|
|
895
|
-
|
|
893
|
+
l[h] = u[h];
|
|
896
894
|
}), /** @type {T} */
|
|
897
|
-
|
|
895
|
+
l;
|
|
898
896
|
}
|
|
899
|
-
const
|
|
897
|
+
const qn = "</span>", sn = (e) => !!e.scope, et = (e, { prefix: r }) => {
|
|
898
|
+
if (e.startsWith("language:"))
|
|
899
|
+
return e.replace("language:", "language-");
|
|
900
900
|
if (e.includes(".")) {
|
|
901
|
-
const
|
|
901
|
+
const l = e.split(".");
|
|
902
902
|
return [
|
|
903
|
-
`${r}${
|
|
904
|
-
...
|
|
903
|
+
`${r}${l.shift()}`,
|
|
904
|
+
...l.map((u, h) => `${u}${"_".repeat(h + 1)}`)
|
|
905
905
|
].join(" ");
|
|
906
906
|
}
|
|
907
907
|
return `${r}${e}`;
|
|
908
908
|
};
|
|
909
|
-
class
|
|
909
|
+
class nt {
|
|
910
910
|
/**
|
|
911
911
|
* Creates a new HTMLRenderer
|
|
912
912
|
*
|
|
913
913
|
* @param {Tree} parseTree - the parse tree (must support `walk` API)
|
|
914
914
|
* @param {{classPrefix: string}} options
|
|
915
915
|
*/
|
|
916
|
-
constructor(r,
|
|
917
|
-
this.buffer = "", this.classPrefix =
|
|
916
|
+
constructor(r, l) {
|
|
917
|
+
this.buffer = "", this.classPrefix = l.classPrefix, r.walk(this);
|
|
918
918
|
}
|
|
919
919
|
/**
|
|
920
920
|
* Adds texts to the output stream
|
|
921
921
|
*
|
|
922
922
|
* @param {string} text */
|
|
923
923
|
addText(r) {
|
|
924
|
-
this.buffer +=
|
|
924
|
+
this.buffer += bn(r);
|
|
925
925
|
}
|
|
926
926
|
/**
|
|
927
927
|
* Adds a node open to the output stream (if needed)
|
|
928
928
|
*
|
|
929
929
|
* @param {Node} node */
|
|
930
930
|
openNode(r) {
|
|
931
|
-
if (!
|
|
931
|
+
if (!sn(r))
|
|
932
932
|
return;
|
|
933
|
-
|
|
934
|
-
|
|
933
|
+
const l = et(
|
|
934
|
+
r.scope,
|
|
935
|
+
{ prefix: this.classPrefix }
|
|
936
|
+
);
|
|
937
|
+
this.span(l);
|
|
935
938
|
}
|
|
936
939
|
/**
|
|
937
940
|
* Adds a node close to the output stream (if needed)
|
|
938
941
|
*
|
|
939
942
|
* @param {Node} node */
|
|
940
943
|
closeNode(r) {
|
|
941
|
-
|
|
944
|
+
sn(r) && (this.buffer += qn);
|
|
942
945
|
}
|
|
943
946
|
/**
|
|
944
947
|
* returns the accumulated buffer
|
|
@@ -955,13 +958,13 @@ class Jn {
|
|
|
955
958
|
this.buffer += `<span class="${r}">`;
|
|
956
959
|
}
|
|
957
960
|
}
|
|
958
|
-
const
|
|
961
|
+
const an = (e = {}) => {
|
|
959
962
|
const r = { children: [] };
|
|
960
963
|
return Object.assign(r, e), r;
|
|
961
964
|
};
|
|
962
|
-
class
|
|
965
|
+
class We {
|
|
963
966
|
constructor() {
|
|
964
|
-
this.rootNode =
|
|
967
|
+
this.rootNode = an(), this.stack = [this.rootNode];
|
|
965
968
|
}
|
|
966
969
|
get top() {
|
|
967
970
|
return this.stack[this.stack.length - 1];
|
|
@@ -975,8 +978,8 @@ class Qe {
|
|
|
975
978
|
}
|
|
976
979
|
/** @param {string} scope */
|
|
977
980
|
openNode(r) {
|
|
978
|
-
const
|
|
979
|
-
this.add(
|
|
981
|
+
const l = an({ scope: r });
|
|
982
|
+
this.add(l), this.stack.push(l);
|
|
980
983
|
}
|
|
981
984
|
closeNode() {
|
|
982
985
|
if (this.stack.length > 1)
|
|
@@ -1000,143 +1003,143 @@ class Qe {
|
|
|
1000
1003
|
* @param {Renderer} builder
|
|
1001
1004
|
* @param {Node} node
|
|
1002
1005
|
*/
|
|
1003
|
-
static _walk(r,
|
|
1004
|
-
return typeof
|
|
1006
|
+
static _walk(r, l) {
|
|
1007
|
+
return typeof l == "string" ? r.addText(l) : l.children && (r.openNode(l), l.children.forEach((u) => this._walk(r, u)), r.closeNode(l)), r;
|
|
1005
1008
|
}
|
|
1006
1009
|
/**
|
|
1007
1010
|
* @param {Node} node
|
|
1008
1011
|
*/
|
|
1009
1012
|
static _collapse(r) {
|
|
1010
|
-
typeof r != "string" && r.children && (r.children.every((
|
|
1011
|
-
|
|
1013
|
+
typeof r != "string" && r.children && (r.children.every((l) => typeof l == "string") ? r.children = [r.children.join("")] : r.children.forEach((l) => {
|
|
1014
|
+
We._collapse(l);
|
|
1012
1015
|
}));
|
|
1013
1016
|
}
|
|
1014
1017
|
}
|
|
1015
|
-
class
|
|
1018
|
+
class tt extends We {
|
|
1016
1019
|
/**
|
|
1017
1020
|
* @param {*} options
|
|
1018
1021
|
*/
|
|
1019
1022
|
constructor(r) {
|
|
1020
1023
|
super(), this.options = r;
|
|
1021
1024
|
}
|
|
1022
|
-
/**
|
|
1023
|
-
* @param {string} text
|
|
1024
|
-
* @param {string} scope
|
|
1025
|
-
*/
|
|
1026
|
-
addKeyword(r, o) {
|
|
1027
|
-
r !== "" && (this.openNode(o), this.addText(r), this.closeNode());
|
|
1028
|
-
}
|
|
1029
1025
|
/**
|
|
1030
1026
|
* @param {string} text
|
|
1031
1027
|
*/
|
|
1032
1028
|
addText(r) {
|
|
1033
1029
|
r !== "" && this.add(r);
|
|
1034
1030
|
}
|
|
1031
|
+
/** @param {string} scope */
|
|
1032
|
+
startScope(r) {
|
|
1033
|
+
this.openNode(r);
|
|
1034
|
+
}
|
|
1035
|
+
endScope() {
|
|
1036
|
+
this.closeNode();
|
|
1037
|
+
}
|
|
1035
1038
|
/**
|
|
1036
1039
|
* @param {Emitter & {root: DataNode}} emitter
|
|
1037
1040
|
* @param {string} name
|
|
1038
1041
|
*/
|
|
1039
|
-
|
|
1042
|
+
__addSublanguage(r, l) {
|
|
1040
1043
|
const u = r.root;
|
|
1041
|
-
|
|
1044
|
+
l && (u.scope = `language:${l}`), this.add(u);
|
|
1042
1045
|
}
|
|
1043
1046
|
toHTML() {
|
|
1044
|
-
return new
|
|
1047
|
+
return new nt(this, this.options).value();
|
|
1045
1048
|
}
|
|
1046
1049
|
finalize() {
|
|
1047
|
-
return !0;
|
|
1050
|
+
return this.closeAllNodes(), !0;
|
|
1048
1051
|
}
|
|
1049
1052
|
}
|
|
1050
|
-
function
|
|
1053
|
+
function ye(e) {
|
|
1051
1054
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
1052
1055
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return
|
|
1056
|
+
function _n(e) {
|
|
1057
|
+
return ue("(?=", e, ")");
|
|
1055
1058
|
}
|
|
1056
|
-
function
|
|
1057
|
-
return
|
|
1059
|
+
function rt(e) {
|
|
1060
|
+
return ue("(?:", e, ")*");
|
|
1058
1061
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return
|
|
1062
|
+
function it(e) {
|
|
1063
|
+
return ue("(?:", e, ")?");
|
|
1061
1064
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return e.map((
|
|
1065
|
+
function ue(...e) {
|
|
1066
|
+
return e.map((l) => ye(l)).join("");
|
|
1064
1067
|
}
|
|
1065
|
-
function
|
|
1068
|
+
function st(e) {
|
|
1066
1069
|
const r = e[e.length - 1];
|
|
1067
1070
|
return typeof r == "object" && r.constructor === Object ? (e.splice(e.length - 1, 1), r) : {};
|
|
1068
1071
|
}
|
|
1069
|
-
function
|
|
1070
|
-
return "(" + (
|
|
1072
|
+
function Qe(...e) {
|
|
1073
|
+
return "(" + (st(e).capture ? "" : "?:") + e.map((u) => ye(u)).join("|") + ")";
|
|
1071
1074
|
}
|
|
1072
|
-
function
|
|
1075
|
+
function En(e) {
|
|
1073
1076
|
return new RegExp(e.toString() + "|").exec("").length - 1;
|
|
1074
1077
|
}
|
|
1075
|
-
function
|
|
1076
|
-
const
|
|
1077
|
-
return
|
|
1078
|
+
function at(e, r) {
|
|
1079
|
+
const l = e && e.exec(r);
|
|
1080
|
+
return l && l.index === 0;
|
|
1078
1081
|
}
|
|
1079
|
-
const
|
|
1080
|
-
function
|
|
1081
|
-
let
|
|
1082
|
+
const ot = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1083
|
+
function Ze(e, { joinWith: r }) {
|
|
1084
|
+
let l = 0;
|
|
1082
1085
|
return e.map((u) => {
|
|
1083
|
-
|
|
1084
|
-
const h =
|
|
1085
|
-
let n =
|
|
1086
|
+
l += 1;
|
|
1087
|
+
const h = l;
|
|
1088
|
+
let n = ye(u), t = "";
|
|
1086
1089
|
for (; n.length > 0; ) {
|
|
1087
|
-
const i =
|
|
1090
|
+
const i = ot.exec(n);
|
|
1088
1091
|
if (!i) {
|
|
1089
1092
|
t += n;
|
|
1090
1093
|
break;
|
|
1091
1094
|
}
|
|
1092
|
-
t += n.substring(0, i.index), n = n.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? t += "\\" + String(Number(i[1]) + h) : (t += i[0], i[0] === "(" &&
|
|
1095
|
+
t += n.substring(0, i.index), n = n.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? t += "\\" + String(Number(i[1]) + h) : (t += i[0], i[0] === "(" && l++);
|
|
1093
1096
|
}
|
|
1094
1097
|
return t;
|
|
1095
1098
|
}).map((u) => `(${u})`).join(r);
|
|
1096
1099
|
}
|
|
1097
|
-
const
|
|
1100
|
+
const lt = /\b\B/, vn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", mn = "\\b\\d+(\\.\\d+)?", yn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", wn = "\\b(0b[01]+)", ct = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ut = (e = {}) => {
|
|
1098
1101
|
const r = /^#![ ]*\//;
|
|
1099
|
-
return e.binary && (e.begin =
|
|
1102
|
+
return e.binary && (e.begin = ue(
|
|
1100
1103
|
r,
|
|
1101
1104
|
/.*\b/,
|
|
1102
1105
|
e.binary,
|
|
1103
1106
|
/\b.*/
|
|
1104
|
-
)),
|
|
1107
|
+
)), oe({
|
|
1105
1108
|
scope: "meta",
|
|
1106
1109
|
begin: r,
|
|
1107
1110
|
end: /$/,
|
|
1108
1111
|
relevance: 0,
|
|
1109
1112
|
/** @type {ModeCallback} */
|
|
1110
|
-
"on:begin": (
|
|
1111
|
-
|
|
1113
|
+
"on:begin": (l, u) => {
|
|
1114
|
+
l.index !== 0 && u.ignoreMatch();
|
|
1112
1115
|
}
|
|
1113
1116
|
}, e);
|
|
1114
|
-
},
|
|
1117
|
+
}, we = {
|
|
1115
1118
|
begin: "\\\\[\\s\\S]",
|
|
1116
1119
|
relevance: 0
|
|
1117
|
-
},
|
|
1120
|
+
}, ft = {
|
|
1118
1121
|
scope: "string",
|
|
1119
1122
|
begin: "'",
|
|
1120
1123
|
end: "'",
|
|
1121
1124
|
illegal: "\\n",
|
|
1122
|
-
contains: [
|
|
1123
|
-
},
|
|
1125
|
+
contains: [we]
|
|
1126
|
+
}, gt = {
|
|
1124
1127
|
scope: "string",
|
|
1125
1128
|
begin: '"',
|
|
1126
1129
|
end: '"',
|
|
1127
1130
|
illegal: "\\n",
|
|
1128
|
-
contains: [
|
|
1129
|
-
},
|
|
1131
|
+
contains: [we]
|
|
1132
|
+
}, ht = {
|
|
1130
1133
|
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/
|
|
1131
|
-
},
|
|
1132
|
-
const u =
|
|
1134
|
+
}, Be = function(e, r, l = {}) {
|
|
1135
|
+
const u = oe(
|
|
1133
1136
|
{
|
|
1134
1137
|
scope: "comment",
|
|
1135
1138
|
begin: e,
|
|
1136
1139
|
end: r,
|
|
1137
1140
|
contains: []
|
|
1138
1141
|
},
|
|
1139
|
-
|
|
1142
|
+
l
|
|
1140
1143
|
);
|
|
1141
1144
|
u.contains.push({
|
|
1142
1145
|
scope: "doctag",
|
|
@@ -1147,7 +1150,7 @@ const st = /\b\B/, _n = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
1147
1150
|
excludeBegin: !0,
|
|
1148
1151
|
relevance: 0
|
|
1149
1152
|
});
|
|
1150
|
-
const h =
|
|
1153
|
+
const h = Qe(
|
|
1151
1154
|
// list of common 1 and 2 letter words in English
|
|
1152
1155
|
"I",
|
|
1153
1156
|
"a",
|
|
@@ -1183,7 +1186,7 @@ const st = /\b\B/, _n = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
1183
1186
|
//
|
|
1184
1187
|
// for a visual example please see:
|
|
1185
1188
|
// https://github.com/highlightjs/highlight.js/issues/2827
|
|
1186
|
-
begin:
|
|
1189
|
+
begin: ue(
|
|
1187
1190
|
/[ ]+/,
|
|
1188
1191
|
// necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
|
|
1189
1192
|
"(",
|
|
@@ -1194,132 +1197,122 @@ const st = /\b\B/, _n = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\
|
|
|
1194
1197
|
// look for 3 words in a row
|
|
1195
1198
|
}
|
|
1196
1199
|
), u;
|
|
1197
|
-
},
|
|
1200
|
+
}, dt = Be("//", "$"), pt = Be("/\\*", "\\*/"), bt = Be("#", "$"), _t = {
|
|
1198
1201
|
scope: "number",
|
|
1199
|
-
begin:
|
|
1202
|
+
begin: mn,
|
|
1200
1203
|
relevance: 0
|
|
1201
|
-
},
|
|
1204
|
+
}, Et = {
|
|
1202
1205
|
scope: "number",
|
|
1203
|
-
begin:
|
|
1206
|
+
begin: yn,
|
|
1204
1207
|
relevance: 0
|
|
1205
|
-
},
|
|
1208
|
+
}, vt = {
|
|
1206
1209
|
scope: "number",
|
|
1207
|
-
begin:
|
|
1210
|
+
begin: wn,
|
|
1208
1211
|
relevance: 0
|
|
1209
|
-
},
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
ve,
|
|
1224
|
-
{
|
|
1225
|
-
begin: /\[/,
|
|
1226
|
-
end: /\]/,
|
|
1227
|
-
relevance: 0,
|
|
1228
|
-
contains: [ve]
|
|
1229
|
-
}
|
|
1230
|
-
]
|
|
1231
|
-
}]
|
|
1232
|
-
}, Et = {
|
|
1212
|
+
}, mt = {
|
|
1213
|
+
scope: "regexp",
|
|
1214
|
+
begin: /\/(?=[^/\n]*\/)/,
|
|
1215
|
+
end: /\/[gimuy]*/,
|
|
1216
|
+
contains: [
|
|
1217
|
+
we,
|
|
1218
|
+
{
|
|
1219
|
+
begin: /\[/,
|
|
1220
|
+
end: /\]/,
|
|
1221
|
+
relevance: 0,
|
|
1222
|
+
contains: [we]
|
|
1223
|
+
}
|
|
1224
|
+
]
|
|
1225
|
+
}, yt = {
|
|
1233
1226
|
scope: "title",
|
|
1234
|
-
begin:
|
|
1227
|
+
begin: vn,
|
|
1235
1228
|
relevance: 0
|
|
1236
|
-
},
|
|
1229
|
+
}, wt = {
|
|
1237
1230
|
scope: "title",
|
|
1238
|
-
begin:
|
|
1231
|
+
begin: Ye,
|
|
1239
1232
|
relevance: 0
|
|
1240
|
-
},
|
|
1233
|
+
}, Nt = {
|
|
1241
1234
|
// excludes method names from keyword processing
|
|
1242
|
-
begin: "\\.\\s*" +
|
|
1235
|
+
begin: "\\.\\s*" + Ye,
|
|
1243
1236
|
relevance: 0
|
|
1244
|
-
},
|
|
1237
|
+
}, At = function(e) {
|
|
1245
1238
|
return Object.assign(
|
|
1246
1239
|
e,
|
|
1247
1240
|
{
|
|
1248
1241
|
/** @type {ModeCallback} */
|
|
1249
|
-
"on:begin": (r,
|
|
1250
|
-
|
|
1242
|
+
"on:begin": (r, l) => {
|
|
1243
|
+
l.data._beginMatch = r[1];
|
|
1251
1244
|
},
|
|
1252
1245
|
/** @type {ModeCallback} */
|
|
1253
|
-
"on:end": (r,
|
|
1254
|
-
|
|
1246
|
+
"on:end": (r, l) => {
|
|
1247
|
+
l.data._beginMatch !== r[1] && l.ignoreMatch();
|
|
1255
1248
|
}
|
|
1256
1249
|
}
|
|
1257
1250
|
);
|
|
1258
1251
|
};
|
|
1259
|
-
var
|
|
1252
|
+
var De = /* @__PURE__ */ Object.freeze({
|
|
1260
1253
|
__proto__: null,
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1254
|
+
APOS_STRING_MODE: ft,
|
|
1255
|
+
BACKSLASH_ESCAPE: we,
|
|
1256
|
+
BINARY_NUMBER_MODE: vt,
|
|
1257
|
+
BINARY_NUMBER_RE: wn,
|
|
1258
|
+
COMMENT: Be,
|
|
1259
|
+
C_BLOCK_COMMENT_MODE: pt,
|
|
1260
|
+
C_LINE_COMMENT_MODE: dt,
|
|
1261
|
+
C_NUMBER_MODE: Et,
|
|
1262
|
+
C_NUMBER_RE: yn,
|
|
1263
|
+
END_SAME_AS_BEGIN: At,
|
|
1264
|
+
HASH_COMMENT_MODE: bt,
|
|
1265
|
+
IDENT_RE: vn,
|
|
1266
|
+
MATCH_NOTHING_RE: lt,
|
|
1267
|
+
METHOD_GUARD: Nt,
|
|
1268
|
+
NUMBER_MODE: _t,
|
|
1269
|
+
NUMBER_RE: mn,
|
|
1270
|
+
PHRASAL_WORDS_MODE: ht,
|
|
1271
|
+
QUOTE_STRING_MODE: gt,
|
|
1272
|
+
REGEXP_MODE: mt,
|
|
1273
|
+
RE_STARTERS_RE: ct,
|
|
1274
|
+
SHEBANG: ut,
|
|
1275
|
+
TITLE_MODE: yt,
|
|
1276
|
+
UNDERSCORE_IDENT_RE: Ye,
|
|
1277
|
+
UNDERSCORE_TITLE_MODE: wt
|
|
1285
1278
|
});
|
|
1286
|
-
function
|
|
1279
|
+
function Mt(e, r) {
|
|
1287
1280
|
e.input[e.index - 1] === "." && r.ignoreMatch();
|
|
1288
1281
|
}
|
|
1289
|
-
function
|
|
1282
|
+
function Tt(e, r) {
|
|
1290
1283
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
1291
1284
|
}
|
|
1292
|
-
function
|
|
1293
|
-
r && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
1285
|
+
function St(e, r) {
|
|
1286
|
+
r && 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));
|
|
1294
1287
|
}
|
|
1295
|
-
function
|
|
1296
|
-
Array.isArray(e.illegal) && (e.illegal =
|
|
1288
|
+
function Dt(e, r) {
|
|
1289
|
+
Array.isArray(e.illegal) && (e.illegal = Qe(...e.illegal));
|
|
1297
1290
|
}
|
|
1298
|
-
function
|
|
1291
|
+
function Rt(e, r) {
|
|
1299
1292
|
if (e.match) {
|
|
1300
1293
|
if (e.begin || e.end)
|
|
1301
1294
|
throw new Error("begin & end are not supported with match");
|
|
1302
1295
|
e.begin = e.match, delete e.match;
|
|
1303
1296
|
}
|
|
1304
1297
|
}
|
|
1305
|
-
function
|
|
1298
|
+
function Lt(e, r) {
|
|
1306
1299
|
e.relevance === void 0 && (e.relevance = 1);
|
|
1307
1300
|
}
|
|
1308
|
-
const
|
|
1301
|
+
const Ot = (e, r) => {
|
|
1309
1302
|
if (!e.beforeMatch)
|
|
1310
1303
|
return;
|
|
1311
1304
|
if (e.starts)
|
|
1312
1305
|
throw new Error("beforeMatch cannot be used with starts");
|
|
1313
|
-
const
|
|
1306
|
+
const l = Object.assign({}, e);
|
|
1314
1307
|
Object.keys(e).forEach((u) => {
|
|
1315
1308
|
delete e[u];
|
|
1316
|
-
}), e.keywords =
|
|
1309
|
+
}), e.keywords = l.keywords, e.begin = ue(l.beforeMatch, _n(l.begin)), e.starts = {
|
|
1317
1310
|
relevance: 0,
|
|
1318
1311
|
contains: [
|
|
1319
|
-
Object.assign(
|
|
1312
|
+
Object.assign(l, { endsParent: !0 })
|
|
1320
1313
|
]
|
|
1321
|
-
}, e.relevance = 0, delete
|
|
1322
|
-
},
|
|
1314
|
+
}, e.relevance = 0, delete l.beforeMatch;
|
|
1315
|
+
}, Ct = [
|
|
1323
1316
|
"of",
|
|
1324
1317
|
"and",
|
|
1325
1318
|
"for",
|
|
@@ -1334,85 +1327,85 @@ const Dt = (e, r) => {
|
|
|
1334
1327
|
// common variable name
|
|
1335
1328
|
"value"
|
|
1336
1329
|
// common variable name
|
|
1337
|
-
],
|
|
1338
|
-
function
|
|
1330
|
+
], It = "keyword";
|
|
1331
|
+
function Nn(e, r, l = It) {
|
|
1339
1332
|
const u = /* @__PURE__ */ Object.create(null);
|
|
1340
|
-
return typeof e == "string" ? h(
|
|
1333
|
+
return typeof e == "string" ? h(l, e.split(" ")) : Array.isArray(e) ? h(l, e) : Object.keys(e).forEach(function(n) {
|
|
1341
1334
|
Object.assign(
|
|
1342
1335
|
u,
|
|
1343
|
-
|
|
1336
|
+
Nn(e[n], r, n)
|
|
1344
1337
|
);
|
|
1345
1338
|
}), u;
|
|
1346
1339
|
function h(n, t) {
|
|
1347
1340
|
r && (t = t.map((i) => i.toLowerCase())), t.forEach(function(i) {
|
|
1348
1341
|
const a = i.split("|");
|
|
1349
|
-
u[a[0]] = [n,
|
|
1342
|
+
u[a[0]] = [n, kt(a[0], a[1])];
|
|
1350
1343
|
});
|
|
1351
1344
|
}
|
|
1352
1345
|
}
|
|
1353
|
-
function
|
|
1354
|
-
return r ? Number(r) :
|
|
1346
|
+
function kt(e, r) {
|
|
1347
|
+
return r ? Number(r) : Bt(e) ? 0 : 1;
|
|
1355
1348
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return
|
|
1349
|
+
function Bt(e) {
|
|
1350
|
+
return Ct.includes(e.toLowerCase());
|
|
1358
1351
|
}
|
|
1359
|
-
const
|
|
1352
|
+
const on = {}, ce = (e) => {
|
|
1360
1353
|
console.error(e);
|
|
1361
|
-
},
|
|
1354
|
+
}, ln = (e, ...r) => {
|
|
1362
1355
|
console.log(`WARN: ${e}`, ...r);
|
|
1363
|
-
},
|
|
1364
|
-
|
|
1365
|
-
},
|
|
1366
|
-
function
|
|
1356
|
+
}, ge = (e, r) => {
|
|
1357
|
+
on[`${e}/${r}`] || (console.log(`Deprecated as of ${e}. ${r}`), on[`${e}/${r}`] = !0);
|
|
1358
|
+
}, Ie = new Error();
|
|
1359
|
+
function An(e, r, { key: l }) {
|
|
1367
1360
|
let u = 0;
|
|
1368
|
-
const h = e[
|
|
1361
|
+
const h = e[l], n = {}, t = {};
|
|
1369
1362
|
for (let i = 1; i <= r.length; i++)
|
|
1370
|
-
t[i + u] = h[i], n[i + u] = !0, u +=
|
|
1371
|
-
e[
|
|
1363
|
+
t[i + u] = h[i], n[i + u] = !0, u += En(r[i - 1]);
|
|
1364
|
+
e[l] = t, e[l]._emit = n, e[l]._multi = !0;
|
|
1372
1365
|
}
|
|
1373
|
-
function
|
|
1366
|
+
function $t(e) {
|
|
1374
1367
|
if (Array.isArray(e.begin)) {
|
|
1375
1368
|
if (e.skip || e.excludeBegin || e.returnBegin)
|
|
1376
|
-
throw
|
|
1369
|
+
throw ce("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Ie;
|
|
1377
1370
|
if (typeof e.beginScope != "object" || e.beginScope === null)
|
|
1378
|
-
throw
|
|
1379
|
-
|
|
1371
|
+
throw ce("beginScope must be object"), Ie;
|
|
1372
|
+
An(e, e.begin, { key: "beginScope" }), e.begin = Ze(e.begin, { joinWith: "" });
|
|
1380
1373
|
}
|
|
1381
1374
|
}
|
|
1382
|
-
function
|
|
1375
|
+
function Pt(e) {
|
|
1383
1376
|
if (Array.isArray(e.end)) {
|
|
1384
1377
|
if (e.skip || e.excludeEnd || e.returnEnd)
|
|
1385
|
-
throw
|
|
1378
|
+
throw ce("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Ie;
|
|
1386
1379
|
if (typeof e.endScope != "object" || e.endScope === null)
|
|
1387
|
-
throw
|
|
1388
|
-
|
|
1380
|
+
throw ce("endScope must be object"), Ie;
|
|
1381
|
+
An(e, e.end, { key: "endScope" }), e.end = Ze(e.end, { joinWith: "" });
|
|
1389
1382
|
}
|
|
1390
1383
|
}
|
|
1391
|
-
function
|
|
1384
|
+
function Ut(e) {
|
|
1392
1385
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
1393
1386
|
}
|
|
1394
|
-
function
|
|
1395
|
-
|
|
1387
|
+
function xt(e) {
|
|
1388
|
+
Ut(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), $t(e), Pt(e);
|
|
1396
1389
|
}
|
|
1397
|
-
function
|
|
1390
|
+
function Ht(e) {
|
|
1398
1391
|
function r(t, i) {
|
|
1399
1392
|
return new RegExp(
|
|
1400
|
-
|
|
1393
|
+
ye(t),
|
|
1401
1394
|
"m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (i ? "g" : "")
|
|
1402
1395
|
);
|
|
1403
1396
|
}
|
|
1404
|
-
class
|
|
1397
|
+
class l {
|
|
1405
1398
|
constructor() {
|
|
1406
1399
|
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
1407
1400
|
}
|
|
1408
1401
|
// @ts-ignore
|
|
1409
1402
|
addRule(i, a) {
|
|
1410
|
-
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, i]), this.matchAt +=
|
|
1403
|
+
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, i]), this.matchAt += En(i) + 1;
|
|
1411
1404
|
}
|
|
1412
1405
|
compile() {
|
|
1413
1406
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
1414
1407
|
const i = this.regexes.map((a) => a[1]);
|
|
1415
|
-
this.matcherRe = r(
|
|
1408
|
+
this.matcherRe = r(Ze(i, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
1416
1409
|
}
|
|
1417
1410
|
/** @param {string} s */
|
|
1418
1411
|
exec(i) {
|
|
@@ -1420,8 +1413,8 @@ function Ut(e) {
|
|
|
1420
1413
|
const a = this.matcherRe.exec(i);
|
|
1421
1414
|
if (!a)
|
|
1422
1415
|
return null;
|
|
1423
|
-
const s = a.findIndex((c, f) => f > 0 && c !== void 0),
|
|
1424
|
-
return a.splice(0, s), Object.assign(a,
|
|
1416
|
+
const s = a.findIndex((c, f) => f > 0 && c !== void 0), o = this.matchIndexes[s];
|
|
1417
|
+
return a.splice(0, s), Object.assign(a, o);
|
|
1425
1418
|
}
|
|
1426
1419
|
}
|
|
1427
1420
|
class u {
|
|
@@ -1432,8 +1425,8 @@ function Ut(e) {
|
|
|
1432
1425
|
getMatcher(i) {
|
|
1433
1426
|
if (this.multiRegexes[i])
|
|
1434
1427
|
return this.multiRegexes[i];
|
|
1435
|
-
const a = new
|
|
1436
|
-
return this.rules.slice(i).forEach(([s,
|
|
1428
|
+
const a = new l();
|
|
1429
|
+
return this.rules.slice(i).forEach(([s, o]) => a.addRule(s, o)), a.compile(), this.multiRegexes[i] = a, a;
|
|
1437
1430
|
}
|
|
1438
1431
|
resumingScanAtSamePosition() {
|
|
1439
1432
|
return this.regexIndex !== 0;
|
|
@@ -1451,8 +1444,8 @@ function Ut(e) {
|
|
|
1451
1444
|
a.lastIndex = this.lastIndex;
|
|
1452
1445
|
let s = a.exec(i);
|
|
1453
1446
|
if (this.resumingScanAtSamePosition() && !(s && s.index === this.lastIndex)) {
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1447
|
+
const o = this.getMatcher(0);
|
|
1448
|
+
o.lastIndex = this.lastIndex + 1, s = o.exec(i);
|
|
1456
1449
|
}
|
|
1457
1450
|
return s && (this.regexIndex += s.position + 1, this.regexIndex === this.count && this.considerAll()), s;
|
|
1458
1451
|
}
|
|
@@ -1469,57 +1462,57 @@ function Ut(e) {
|
|
|
1469
1462
|
if (t.isCompiled)
|
|
1470
1463
|
return a;
|
|
1471
1464
|
[
|
|
1472
|
-
|
|
1465
|
+
Tt,
|
|
1473
1466
|
// do this early so compiler extensions generally don't have to worry about
|
|
1474
1467
|
// the distinction between match/begin
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
].forEach((
|
|
1479
|
-
|
|
1468
|
+
Rt,
|
|
1469
|
+
xt,
|
|
1470
|
+
Ot
|
|
1471
|
+
].forEach((o) => o(t, i)), e.compilerExtensions.forEach((o) => o(t, i)), t.__beforeBegin = null, [
|
|
1472
|
+
St,
|
|
1480
1473
|
// do this later so compiler extensions that come earlier have access to the
|
|
1481
1474
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
1482
|
-
|
|
1475
|
+
Dt,
|
|
1483
1476
|
// default to 1 relevance if not specified
|
|
1484
|
-
|
|
1485
|
-
].forEach((
|
|
1477
|
+
Lt
|
|
1478
|
+
].forEach((o) => o(t, i)), t.isCompiled = !0;
|
|
1486
1479
|
let s = null;
|
|
1487
|
-
return typeof t.keywords == "object" && t.keywords.$pattern && (t.keywords = Object.assign({}, t.keywords), s = t.keywords.$pattern, delete t.keywords.$pattern), s = s || /\w+/, t.keywords && (t.keywords =
|
|
1480
|
+
return typeof t.keywords == "object" && t.keywords.$pattern && (t.keywords = Object.assign({}, t.keywords), s = t.keywords.$pattern, delete t.keywords.$pattern), s = s || /\w+/, t.keywords && (t.keywords = Nn(t.keywords, e.case_insensitive)), a.keywordPatternRe = r(s, !0), i && (t.begin || (t.begin = /\B|\b/), a.beginRe = r(a.begin), !t.end && !t.endsWithParent && (t.end = /\B|\b/), t.end && (a.endRe = r(a.end)), a.terminatorEnd = ye(a.end) || "", t.endsWithParent && i.terminatorEnd && (a.terminatorEnd += (t.end ? "|" : "") + i.terminatorEnd)), t.illegal && (a.illegalRe = r(
|
|
1488
1481
|
/** @type {RegExp | string} */
|
|
1489
1482
|
t.illegal
|
|
1490
|
-
)), t.contains || (t.contains = []), t.contains = [].concat(...t.contains.map(function(
|
|
1491
|
-
return
|
|
1492
|
-
})), t.contains.forEach(function(
|
|
1483
|
+
)), t.contains || (t.contains = []), t.contains = [].concat(...t.contains.map(function(o) {
|
|
1484
|
+
return Ft(o === "self" ? t : o);
|
|
1485
|
+
})), t.contains.forEach(function(o) {
|
|
1493
1486
|
n(
|
|
1494
1487
|
/** @type Mode */
|
|
1495
|
-
|
|
1488
|
+
o,
|
|
1496
1489
|
a
|
|
1497
1490
|
);
|
|
1498
1491
|
}), t.starts && n(t.starts, i), a.matcher = h(a), a;
|
|
1499
1492
|
}
|
|
1500
1493
|
if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
|
|
1501
1494
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
1502
|
-
return e.classNameAliases =
|
|
1495
|
+
return e.classNameAliases = oe(e.classNameAliases || {}), n(
|
|
1503
1496
|
/** @type Mode */
|
|
1504
1497
|
e
|
|
1505
1498
|
);
|
|
1506
1499
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return e ? e.endsWithParent ||
|
|
1500
|
+
function Mn(e) {
|
|
1501
|
+
return e ? e.endsWithParent || Mn(e.starts) : !1;
|
|
1509
1502
|
}
|
|
1510
|
-
function
|
|
1503
|
+
function Ft(e) {
|
|
1511
1504
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(r) {
|
|
1512
|
-
return
|
|
1513
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
1505
|
+
return oe(e, { variants: null }, r);
|
|
1506
|
+
})), e.cachedVariants ? e.cachedVariants : Mn(e) ? oe(e, { starts: e.starts ? oe(e.starts) : null }) : Object.isFrozen(e) ? oe(e) : e;
|
|
1514
1507
|
}
|
|
1515
|
-
var
|
|
1516
|
-
class
|
|
1517
|
-
constructor(r,
|
|
1518
|
-
super(r), this.name = "HTMLInjectionError", this.html =
|
|
1508
|
+
var zt = "11.9.0";
|
|
1509
|
+
class Gt extends Error {
|
|
1510
|
+
constructor(r, l) {
|
|
1511
|
+
super(r), this.name = "HTMLInjectionError", this.html = l;
|
|
1519
1512
|
}
|
|
1520
1513
|
}
|
|
1521
|
-
const
|
|
1522
|
-
const r = /* @__PURE__ */ Object.create(null),
|
|
1514
|
+
const He = bn, cn = oe, un = Symbol("nomatch"), Kt = 7, Tn = function(e) {
|
|
1515
|
+
const r = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ Object.create(null), u = [];
|
|
1523
1516
|
let h = !0;
|
|
1524
1517
|
const n = "Could not find the language '{}', did you forget to load/include a language module?", t = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
1525
1518
|
let i = {
|
|
@@ -1532,395 +1525,413 @@ const xe = dn, ln = ae, cn = Symbol("nomatch"), Ft = 7, zt = function(e) {
|
|
|
1532
1525
|
languages: null,
|
|
1533
1526
|
// beta configuration options, subject to change, welcome to discuss
|
|
1534
1527
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1535
|
-
__emitter:
|
|
1528
|
+
__emitter: tt
|
|
1536
1529
|
};
|
|
1537
1530
|
function a(_) {
|
|
1538
1531
|
return i.noHighlightRe.test(_);
|
|
1539
1532
|
}
|
|
1540
1533
|
function s(_) {
|
|
1541
|
-
let
|
|
1542
|
-
|
|
1543
|
-
const O = i.languageDetectRe.exec(
|
|
1534
|
+
let N = _.className + " ";
|
|
1535
|
+
N += _.parentNode ? _.parentNode.className : "";
|
|
1536
|
+
const O = i.languageDetectRe.exec(N);
|
|
1544
1537
|
if (O) {
|
|
1545
1538
|
const k = R(O[1]);
|
|
1546
|
-
return k || (
|
|
1539
|
+
return k || (ln(n.replace("{}", O[1])), ln("Falling back to no-highlight mode for this block.", _)), k ? O[1] : "no-highlight";
|
|
1547
1540
|
}
|
|
1548
|
-
return
|
|
1541
|
+
return N.split(/\s+/).find((k) => a(k) || R(k));
|
|
1549
1542
|
}
|
|
1550
|
-
function
|
|
1551
|
-
let k = "",
|
|
1552
|
-
typeof
|
|
1553
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
1543
|
+
function o(_, N, O) {
|
|
1544
|
+
let k = "", H = "";
|
|
1545
|
+
typeof N == "object" ? (k = _, O = N.ignoreIllegals, H = N.language) : (ge("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ge("10.7.0", `Please use highlight(code, options) instead.
|
|
1546
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = N), O === void 0 && (O = !0);
|
|
1554
1547
|
const Y = {
|
|
1555
1548
|
code: k,
|
|
1556
|
-
language:
|
|
1549
|
+
language: H
|
|
1557
1550
|
};
|
|
1558
|
-
|
|
1551
|
+
fe("before:highlight", Y);
|
|
1559
1552
|
const q = Y.result ? Y.result : c(Y.language, Y.code, O);
|
|
1560
|
-
return q.code = Y.code,
|
|
1553
|
+
return q.code = Y.code, fe("after:highlight", q), q;
|
|
1561
1554
|
}
|
|
1562
|
-
function c(_,
|
|
1563
|
-
const
|
|
1564
|
-
function Y(
|
|
1565
|
-
return
|
|
1555
|
+
function c(_, N, O, k) {
|
|
1556
|
+
const H = /* @__PURE__ */ Object.create(null);
|
|
1557
|
+
function Y(m, M) {
|
|
1558
|
+
return m.keywords[M];
|
|
1566
1559
|
}
|
|
1567
1560
|
function q() {
|
|
1568
1561
|
if (!L.keywords) {
|
|
1569
|
-
|
|
1562
|
+
Q.addText(x);
|
|
1570
1563
|
return;
|
|
1571
1564
|
}
|
|
1572
|
-
let
|
|
1565
|
+
let m = 0;
|
|
1573
1566
|
L.keywordPatternRe.lastIndex = 0;
|
|
1574
|
-
let
|
|
1575
|
-
for (;
|
|
1576
|
-
C +=
|
|
1577
|
-
const
|
|
1567
|
+
let M = L.keywordPatternRe.exec(x), C = "";
|
|
1568
|
+
for (; M; ) {
|
|
1569
|
+
C += x.substring(m, M.index);
|
|
1570
|
+
const $ = te.case_insensitive ? M[0].toLowerCase() : M[0], Z = Y(L, $);
|
|
1578
1571
|
if (Z) {
|
|
1579
|
-
const [
|
|
1580
|
-
if (
|
|
1581
|
-
C +=
|
|
1572
|
+
const [re, Un] = Z;
|
|
1573
|
+
if (Q.addText(C), C = "", H[$] = (H[$] || 0) + 1, H[$] <= Kt && (Se += Un), re.startsWith("_"))
|
|
1574
|
+
C += M[0];
|
|
1582
1575
|
else {
|
|
1583
|
-
const
|
|
1584
|
-
|
|
1576
|
+
const xn = te.classNameAliases[re] || re;
|
|
1577
|
+
ne(M[0], xn);
|
|
1585
1578
|
}
|
|
1586
1579
|
} else
|
|
1587
|
-
C +=
|
|
1588
|
-
|
|
1580
|
+
C += M[0];
|
|
1581
|
+
m = L.keywordPatternRe.lastIndex, M = L.keywordPatternRe.exec(x);
|
|
1589
1582
|
}
|
|
1590
|
-
C +=
|
|
1583
|
+
C += x.substring(m), Q.addText(C);
|
|
1591
1584
|
}
|
|
1592
|
-
function
|
|
1593
|
-
if (
|
|
1585
|
+
function Me() {
|
|
1586
|
+
if (x === "")
|
|
1594
1587
|
return;
|
|
1595
|
-
let
|
|
1588
|
+
let m = null;
|
|
1596
1589
|
if (typeof L.subLanguage == "string") {
|
|
1597
1590
|
if (!r[L.subLanguage]) {
|
|
1598
|
-
|
|
1591
|
+
Q.addText(x);
|
|
1599
1592
|
return;
|
|
1600
1593
|
}
|
|
1601
|
-
|
|
1602
|
-
|
|
1594
|
+
m = c(L.subLanguage, x, !0, qe[L.subLanguage]), qe[L.subLanguage] = /** @type {CompiledMode} */
|
|
1595
|
+
m._top;
|
|
1603
1596
|
} else
|
|
1604
|
-
|
|
1605
|
-
L.relevance > 0 && (
|
|
1597
|
+
m = g(x, L.subLanguage.length ? L.subLanguage : null);
|
|
1598
|
+
L.relevance > 0 && (Se += m.relevance), Q.__addSublanguage(m._emitter, m.language);
|
|
1606
1599
|
}
|
|
1607
|
-
function
|
|
1608
|
-
L.subLanguage != null ?
|
|
1600
|
+
function V() {
|
|
1601
|
+
L.subLanguage != null ? Me() : q(), x = "";
|
|
1609
1602
|
}
|
|
1610
|
-
function
|
|
1603
|
+
function ne(m, M) {
|
|
1604
|
+
m !== "" && (Q.startScope(M), Q.addText(m), Q.endScope());
|
|
1605
|
+
}
|
|
1606
|
+
function Xe(m, M) {
|
|
1611
1607
|
let C = 1;
|
|
1612
|
-
const
|
|
1613
|
-
for (; C <=
|
|
1614
|
-
if (!
|
|
1608
|
+
const $ = M.length - 1;
|
|
1609
|
+
for (; C <= $; ) {
|
|
1610
|
+
if (!m._emit[C]) {
|
|
1615
1611
|
C++;
|
|
1616
1612
|
continue;
|
|
1617
1613
|
}
|
|
1618
|
-
const Z =
|
|
1619
|
-
Z ?
|
|
1614
|
+
const Z = te.classNameAliases[m[C]] || m[C], re = M[C];
|
|
1615
|
+
Z ? ne(re, Z) : (x = re, q(), x = ""), C++;
|
|
1620
1616
|
}
|
|
1621
1617
|
}
|
|
1622
|
-
function
|
|
1623
|
-
return
|
|
1618
|
+
function Ve(m, M) {
|
|
1619
|
+
return m.scope && typeof m.scope == "string" && Q.openNode(te.classNameAliases[m.scope] || m.scope), m.beginScope && (m.beginScope._wrap ? (ne(x, te.classNameAliases[m.beginScope._wrap] || m.beginScope._wrap), x = "") : m.beginScope._multi && (Xe(m.beginScope, M), x = "")), L = Object.create(m, { parent: { value: L } }), L;
|
|
1624
1620
|
}
|
|
1625
|
-
function
|
|
1626
|
-
let
|
|
1627
|
-
if (
|
|
1628
|
-
if (
|
|
1629
|
-
const Z = new
|
|
1630
|
-
|
|
1621
|
+
function je(m, M, C) {
|
|
1622
|
+
let $ = at(m.endRe, C);
|
|
1623
|
+
if ($) {
|
|
1624
|
+
if (m["on:end"]) {
|
|
1625
|
+
const Z = new rn(m);
|
|
1626
|
+
m["on:end"](M, Z), Z.isMatchIgnored && ($ = !1);
|
|
1631
1627
|
}
|
|
1632
|
-
if (
|
|
1633
|
-
for (;
|
|
1634
|
-
|
|
1635
|
-
return
|
|
1628
|
+
if ($) {
|
|
1629
|
+
for (; m.endsParent && m.parent; )
|
|
1630
|
+
m = m.parent;
|
|
1631
|
+
return m;
|
|
1636
1632
|
}
|
|
1637
1633
|
}
|
|
1638
|
-
if (
|
|
1639
|
-
return
|
|
1634
|
+
if (m.endsWithParent)
|
|
1635
|
+
return je(m.parent, M, C);
|
|
1640
1636
|
}
|
|
1641
|
-
function
|
|
1642
|
-
return L.matcher.regexIndex === 0 ? (
|
|
1637
|
+
function In(m) {
|
|
1638
|
+
return L.matcher.regexIndex === 0 ? (x += m[0], 1) : (Ue = !0, 0);
|
|
1643
1639
|
}
|
|
1644
|
-
function
|
|
1645
|
-
const
|
|
1646
|
-
for (const
|
|
1647
|
-
if (
|
|
1648
|
-
return
|
|
1649
|
-
return C.skip ?
|
|
1640
|
+
function kn(m) {
|
|
1641
|
+
const M = m[0], C = m.rule, $ = new rn(C), Z = [C.__beforeBegin, C["on:begin"]];
|
|
1642
|
+
for (const re of Z)
|
|
1643
|
+
if (re && (re(m, $), $.isMatchIgnored))
|
|
1644
|
+
return In(M);
|
|
1645
|
+
return C.skip ? x += M : (C.excludeBegin && (x += M), V(), !C.returnBegin && !C.excludeBegin && (x = M)), Ve(C, m), C.returnBegin ? 0 : M.length;
|
|
1650
1646
|
}
|
|
1651
|
-
function
|
|
1652
|
-
const
|
|
1653
|
-
if (
|
|
1654
|
-
return
|
|
1647
|
+
function Bn(m) {
|
|
1648
|
+
const M = m[0], C = N.substring(m.index), $ = je(L, m, C);
|
|
1649
|
+
if (!$)
|
|
1650
|
+
return un;
|
|
1655
1651
|
const Z = L;
|
|
1656
|
-
L.endScope && L.endScope._wrap ? (
|
|
1652
|
+
L.endScope && L.endScope._wrap ? (V(), ne(M, L.endScope._wrap)) : L.endScope && L.endScope._multi ? (V(), Xe(L.endScope, m)) : Z.skip ? x += M : (Z.returnEnd || Z.excludeEnd || (x += M), V(), Z.excludeEnd && (x = M));
|
|
1657
1653
|
do
|
|
1658
|
-
L.scope &&
|
|
1659
|
-
while (L !==
|
|
1660
|
-
return
|
|
1654
|
+
L.scope && Q.closeNode(), !L.skip && !L.subLanguage && (Se += L.relevance), L = L.parent;
|
|
1655
|
+
while (L !== $.parent);
|
|
1656
|
+
return $.starts && Ve($.starts, m), Z.returnEnd ? 0 : M.length;
|
|
1661
1657
|
}
|
|
1662
|
-
function
|
|
1663
|
-
const
|
|
1664
|
-
for (let
|
|
1665
|
-
|
|
1666
|
-
|
|
1658
|
+
function $n() {
|
|
1659
|
+
const m = [];
|
|
1660
|
+
for (let M = L; M !== te; M = M.parent)
|
|
1661
|
+
M.scope && m.unshift(M.scope);
|
|
1662
|
+
m.forEach((M) => Q.openNode(M));
|
|
1667
1663
|
}
|
|
1668
|
-
let
|
|
1669
|
-
function Je(
|
|
1670
|
-
const C =
|
|
1671
|
-
if (
|
|
1672
|
-
return
|
|
1673
|
-
if (
|
|
1674
|
-
if (
|
|
1675
|
-
const
|
|
1676
|
-
throw
|
|
1664
|
+
let Te = {};
|
|
1665
|
+
function Je(m, M) {
|
|
1666
|
+
const C = M && M[0];
|
|
1667
|
+
if (x += m, C == null)
|
|
1668
|
+
return V(), 0;
|
|
1669
|
+
if (Te.type === "begin" && M.type === "end" && Te.index === M.index && C === "") {
|
|
1670
|
+
if (x += N.slice(M.index, M.index + 1), !h) {
|
|
1671
|
+
const $ = new Error(`0 width match regex (${_})`);
|
|
1672
|
+
throw $.languageName = _, $.badRule = Te.rule, $;
|
|
1677
1673
|
}
|
|
1678
1674
|
return 1;
|
|
1679
1675
|
}
|
|
1680
|
-
if (
|
|
1681
|
-
return
|
|
1682
|
-
if (
|
|
1683
|
-
const
|
|
1684
|
-
throw
|
|
1685
|
-
} else if (
|
|
1686
|
-
const
|
|
1687
|
-
if (
|
|
1688
|
-
return
|
|
1676
|
+
if (Te = M, M.type === "begin")
|
|
1677
|
+
return kn(M);
|
|
1678
|
+
if (M.type === "illegal" && !O) {
|
|
1679
|
+
const $ = new Error('Illegal lexeme "' + C + '" for mode "' + (L.scope || "<unnamed>") + '"');
|
|
1680
|
+
throw $.mode = L, $;
|
|
1681
|
+
} else if (M.type === "end") {
|
|
1682
|
+
const $ = Bn(M);
|
|
1683
|
+
if ($ !== un)
|
|
1684
|
+
return $;
|
|
1689
1685
|
}
|
|
1690
|
-
if (
|
|
1686
|
+
if (M.type === "illegal" && C === "")
|
|
1691
1687
|
return 1;
|
|
1692
|
-
if (
|
|
1688
|
+
if (Pe > 1e5 && Pe > M.index * 3)
|
|
1693
1689
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1694
|
-
return
|
|
1690
|
+
return x += C, C.length;
|
|
1695
1691
|
}
|
|
1696
|
-
const
|
|
1697
|
-
if (!
|
|
1698
|
-
throw
|
|
1699
|
-
const
|
|
1700
|
-
let
|
|
1701
|
-
const qe = {},
|
|
1702
|
-
|
|
1703
|
-
let
|
|
1692
|
+
const te = R(_);
|
|
1693
|
+
if (!te)
|
|
1694
|
+
throw ce(n.replace("{}", _)), new Error('Unknown language: "' + _ + '"');
|
|
1695
|
+
const Pn = Ht(te);
|
|
1696
|
+
let $e = "", L = k || Pn;
|
|
1697
|
+
const qe = {}, Q = new i.__emitter(i);
|
|
1698
|
+
$n();
|
|
1699
|
+
let x = "", Se = 0, le = 0, Pe = 0, Ue = !1;
|
|
1704
1700
|
try {
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1701
|
+
if (te.__emitTokens)
|
|
1702
|
+
te.__emitTokens(N, Q);
|
|
1703
|
+
else {
|
|
1704
|
+
for (L.matcher.considerAll(); ; ) {
|
|
1705
|
+
Pe++, Ue ? Ue = !1 : L.matcher.considerAll(), L.matcher.lastIndex = le;
|
|
1706
|
+
const m = L.matcher.exec(N);
|
|
1707
|
+
if (!m)
|
|
1708
|
+
break;
|
|
1709
|
+
const M = N.substring(le, m.index), C = Je(M, m);
|
|
1710
|
+
le = m.index + C;
|
|
1711
|
+
}
|
|
1712
|
+
Je(N.substring(le));
|
|
1712
1713
|
}
|
|
1713
|
-
return
|
|
1714
|
+
return Q.finalize(), $e = Q.toHTML(), {
|
|
1714
1715
|
language: _,
|
|
1715
|
-
value:
|
|
1716
|
-
relevance:
|
|
1716
|
+
value: $e,
|
|
1717
|
+
relevance: Se,
|
|
1717
1718
|
illegal: !1,
|
|
1718
|
-
_emitter:
|
|
1719
|
+
_emitter: Q,
|
|
1719
1720
|
_top: L
|
|
1720
1721
|
};
|
|
1721
|
-
} catch (
|
|
1722
|
-
if (
|
|
1722
|
+
} catch (m) {
|
|
1723
|
+
if (m.message && m.message.includes("Illegal"))
|
|
1723
1724
|
return {
|
|
1724
1725
|
language: _,
|
|
1725
|
-
value:
|
|
1726
|
+
value: He(N),
|
|
1726
1727
|
illegal: !0,
|
|
1727
1728
|
relevance: 0,
|
|
1728
1729
|
_illegalBy: {
|
|
1729
|
-
message:
|
|
1730
|
-
index:
|
|
1731
|
-
context:
|
|
1732
|
-
mode:
|
|
1733
|
-
resultSoFar:
|
|
1730
|
+
message: m.message,
|
|
1731
|
+
index: le,
|
|
1732
|
+
context: N.slice(le - 100, le + 100),
|
|
1733
|
+
mode: m.mode,
|
|
1734
|
+
resultSoFar: $e
|
|
1734
1735
|
},
|
|
1735
|
-
_emitter:
|
|
1736
|
+
_emitter: Q
|
|
1736
1737
|
};
|
|
1737
1738
|
if (h)
|
|
1738
1739
|
return {
|
|
1739
1740
|
language: _,
|
|
1740
|
-
value:
|
|
1741
|
+
value: He(N),
|
|
1741
1742
|
illegal: !1,
|
|
1742
1743
|
relevance: 0,
|
|
1743
|
-
errorRaised:
|
|
1744
|
-
_emitter:
|
|
1744
|
+
errorRaised: m,
|
|
1745
|
+
_emitter: Q,
|
|
1745
1746
|
_top: L
|
|
1746
1747
|
};
|
|
1747
|
-
throw
|
|
1748
|
+
throw m;
|
|
1748
1749
|
}
|
|
1749
1750
|
}
|
|
1750
1751
|
function f(_) {
|
|
1751
|
-
const
|
|
1752
|
-
value:
|
|
1752
|
+
const N = {
|
|
1753
|
+
value: He(_),
|
|
1753
1754
|
illegal: !1,
|
|
1754
1755
|
relevance: 0,
|
|
1755
1756
|
_top: t,
|
|
1756
1757
|
_emitter: new i.__emitter(i)
|
|
1757
1758
|
};
|
|
1758
|
-
return
|
|
1759
|
+
return N._emitter.addText(_), N;
|
|
1759
1760
|
}
|
|
1760
|
-
function g(_,
|
|
1761
|
-
|
|
1762
|
-
const O = f(_), k =
|
|
1763
|
-
(
|
|
1761
|
+
function g(_, N) {
|
|
1762
|
+
N = N || i.languages || Object.keys(r);
|
|
1763
|
+
const O = f(_), k = N.filter(R).filter(U).map(
|
|
1764
|
+
(V) => c(V, _, !1)
|
|
1764
1765
|
);
|
|
1765
1766
|
k.unshift(O);
|
|
1766
|
-
const
|
|
1767
|
-
if (
|
|
1768
|
-
return
|
|
1769
|
-
if (
|
|
1770
|
-
if (R(
|
|
1767
|
+
const H = k.sort((V, ne) => {
|
|
1768
|
+
if (V.relevance !== ne.relevance)
|
|
1769
|
+
return ne.relevance - V.relevance;
|
|
1770
|
+
if (V.language && ne.language) {
|
|
1771
|
+
if (R(V.language).supersetOf === ne.language)
|
|
1771
1772
|
return 1;
|
|
1772
|
-
if (R(
|
|
1773
|
+
if (R(ne.language).supersetOf === V.language)
|
|
1773
1774
|
return -1;
|
|
1774
1775
|
}
|
|
1775
1776
|
return 0;
|
|
1776
|
-
}), [Y, q] =
|
|
1777
|
-
return
|
|
1777
|
+
}), [Y, q] = H, Me = Y;
|
|
1778
|
+
return Me.secondBest = q, Me;
|
|
1778
1779
|
}
|
|
1779
|
-
function d(_,
|
|
1780
|
-
const k =
|
|
1780
|
+
function d(_, N, O) {
|
|
1781
|
+
const k = N && l[N] || O;
|
|
1781
1782
|
_.classList.add("hljs"), _.classList.add(`language-${k}`);
|
|
1782
1783
|
}
|
|
1783
1784
|
function p(_) {
|
|
1784
|
-
let
|
|
1785
|
+
let N = null;
|
|
1785
1786
|
const O = s(_);
|
|
1786
1787
|
if (a(O))
|
|
1787
1788
|
return;
|
|
1788
|
-
if (
|
|
1789
|
+
if (fe(
|
|
1789
1790
|
"before:highlightElement",
|
|
1790
1791
|
{ el: _, language: O }
|
|
1791
|
-
), _.
|
|
1792
|
-
|
|
1792
|
+
), _.dataset.highlighted) {
|
|
1793
|
+
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", _);
|
|
1794
|
+
return;
|
|
1795
|
+
}
|
|
1796
|
+
if (_.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(_)), i.throwUnescapedHTML))
|
|
1797
|
+
throw new Gt(
|
|
1793
1798
|
"One of your code blocks includes unescaped HTML.",
|
|
1794
1799
|
_.innerHTML
|
|
1795
1800
|
);
|
|
1796
|
-
|
|
1797
|
-
const k =
|
|
1798
|
-
_.innerHTML =
|
|
1799
|
-
language:
|
|
1801
|
+
N = _;
|
|
1802
|
+
const k = N.textContent, H = O ? o(k, { language: O, ignoreIllegals: !0 }) : g(k);
|
|
1803
|
+
_.innerHTML = H.value, _.dataset.highlighted = "yes", d(_, O, H.language), _.result = {
|
|
1804
|
+
language: H.language,
|
|
1800
1805
|
// TODO: remove with version 11.0
|
|
1801
|
-
re:
|
|
1802
|
-
relevance:
|
|
1803
|
-
},
|
|
1804
|
-
language:
|
|
1805
|
-
relevance:
|
|
1806
|
-
}),
|
|
1806
|
+
re: H.relevance,
|
|
1807
|
+
relevance: H.relevance
|
|
1808
|
+
}, H.secondBest && (_.secondBest = {
|
|
1809
|
+
language: H.secondBest.language,
|
|
1810
|
+
relevance: H.secondBest.relevance
|
|
1811
|
+
}), fe("after:highlightElement", { el: _, result: H, text: k });
|
|
1807
1812
|
}
|
|
1808
1813
|
function b(_) {
|
|
1809
|
-
i =
|
|
1814
|
+
i = cn(i, _);
|
|
1810
1815
|
}
|
|
1811
1816
|
const E = () => {
|
|
1812
|
-
|
|
1817
|
+
y(), ge("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1813
1818
|
};
|
|
1814
1819
|
function v() {
|
|
1815
|
-
|
|
1820
|
+
y(), ge("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1816
1821
|
}
|
|
1817
1822
|
let w = !1;
|
|
1818
|
-
function
|
|
1823
|
+
function y() {
|
|
1819
1824
|
if (document.readyState === "loading") {
|
|
1820
1825
|
w = !0;
|
|
1821
1826
|
return;
|
|
1822
1827
|
}
|
|
1823
1828
|
document.querySelectorAll(i.cssSelector).forEach(p);
|
|
1824
1829
|
}
|
|
1825
|
-
function
|
|
1826
|
-
w &&
|
|
1830
|
+
function D() {
|
|
1831
|
+
w && y();
|
|
1827
1832
|
}
|
|
1828
|
-
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded",
|
|
1829
|
-
function
|
|
1833
|
+
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", D, !1);
|
|
1834
|
+
function S(_, N) {
|
|
1830
1835
|
let O = null;
|
|
1831
1836
|
try {
|
|
1832
|
-
O =
|
|
1837
|
+
O = N(e);
|
|
1833
1838
|
} catch (k) {
|
|
1834
|
-
if (
|
|
1835
|
-
|
|
1839
|
+
if (ce("Language definition for '{}' could not be registered.".replace("{}", _)), h)
|
|
1840
|
+
ce(k);
|
|
1836
1841
|
else
|
|
1837
1842
|
throw k;
|
|
1838
1843
|
O = t;
|
|
1839
1844
|
}
|
|
1840
|
-
O.name || (O.name = _), r[_] = O, O.rawDefinition =
|
|
1845
|
+
O.name || (O.name = _), r[_] = O, O.rawDefinition = N.bind(null, e), O.aliases && z(O.aliases, { languageName: _ });
|
|
1841
1846
|
}
|
|
1842
|
-
function
|
|
1847
|
+
function T(_) {
|
|
1843
1848
|
delete r[_];
|
|
1844
|
-
for (const
|
|
1845
|
-
|
|
1849
|
+
for (const N of Object.keys(l))
|
|
1850
|
+
l[N] === _ && delete l[N];
|
|
1846
1851
|
}
|
|
1847
1852
|
function I() {
|
|
1848
1853
|
return Object.keys(r);
|
|
1849
1854
|
}
|
|
1850
1855
|
function R(_) {
|
|
1851
|
-
return _ = (_ || "").toLowerCase(), r[_] || r[
|
|
1856
|
+
return _ = (_ || "").toLowerCase(), r[_] || r[l[_]];
|
|
1852
1857
|
}
|
|
1853
|
-
function
|
|
1858
|
+
function z(_, { languageName: N }) {
|
|
1854
1859
|
typeof _ == "string" && (_ = [_]), _.forEach((O) => {
|
|
1855
|
-
|
|
1860
|
+
l[O.toLowerCase()] = N;
|
|
1856
1861
|
});
|
|
1857
1862
|
}
|
|
1858
1863
|
function U(_) {
|
|
1859
|
-
const
|
|
1860
|
-
return
|
|
1864
|
+
const N = R(_);
|
|
1865
|
+
return N && !N.disableAutodetect;
|
|
1861
1866
|
}
|
|
1862
|
-
function
|
|
1863
|
-
_["before:highlightBlock"] && !_["before:highlightElement"] && (_["before:highlightElement"] = (
|
|
1867
|
+
function P(_) {
|
|
1868
|
+
_["before:highlightBlock"] && !_["before:highlightElement"] && (_["before:highlightElement"] = (N) => {
|
|
1864
1869
|
_["before:highlightBlock"](
|
|
1865
|
-
Object.assign({ block:
|
|
1870
|
+
Object.assign({ block: N.el }, N)
|
|
1866
1871
|
);
|
|
1867
|
-
}), _["after:highlightBlock"] && !_["after:highlightElement"] && (_["after:highlightElement"] = (
|
|
1872
|
+
}), _["after:highlightBlock"] && !_["after:highlightElement"] && (_["after:highlightElement"] = (N) => {
|
|
1868
1873
|
_["after:highlightBlock"](
|
|
1869
|
-
Object.assign({ block:
|
|
1874
|
+
Object.assign({ block: N.el }, N)
|
|
1870
1875
|
);
|
|
1871
1876
|
});
|
|
1872
1877
|
}
|
|
1873
|
-
function
|
|
1874
|
-
|
|
1878
|
+
function K(_) {
|
|
1879
|
+
P(_), u.push(_);
|
|
1875
1880
|
}
|
|
1876
|
-
function
|
|
1881
|
+
function X(_) {
|
|
1882
|
+
const N = u.indexOf(_);
|
|
1883
|
+
N !== -1 && u.splice(N, 1);
|
|
1884
|
+
}
|
|
1885
|
+
function fe(_, N) {
|
|
1877
1886
|
const O = _;
|
|
1878
1887
|
u.forEach(function(k) {
|
|
1879
|
-
k[O] && k[O](
|
|
1888
|
+
k[O] && k[O](N);
|
|
1880
1889
|
});
|
|
1881
1890
|
}
|
|
1882
|
-
function
|
|
1883
|
-
return
|
|
1891
|
+
function Ae(_) {
|
|
1892
|
+
return ge("10.7.0", "highlightBlock will be removed entirely in v12.0"), ge("10.7.0", "Please use highlightElement now."), p(_);
|
|
1884
1893
|
}
|
|
1885
1894
|
Object.assign(e, {
|
|
1886
|
-
highlight:
|
|
1895
|
+
highlight: o,
|
|
1887
1896
|
highlightAuto: g,
|
|
1888
|
-
highlightAll:
|
|
1897
|
+
highlightAll: y,
|
|
1889
1898
|
highlightElement: p,
|
|
1890
1899
|
// TODO: Remove with v12 API
|
|
1891
|
-
highlightBlock:
|
|
1900
|
+
highlightBlock: Ae,
|
|
1892
1901
|
configure: b,
|
|
1893
1902
|
initHighlighting: E,
|
|
1894
1903
|
initHighlightingOnLoad: v,
|
|
1895
|
-
registerLanguage:
|
|
1896
|
-
unregisterLanguage:
|
|
1904
|
+
registerLanguage: S,
|
|
1905
|
+
unregisterLanguage: T,
|
|
1897
1906
|
listLanguages: I,
|
|
1898
1907
|
getLanguage: R,
|
|
1899
|
-
registerAliases:
|
|
1908
|
+
registerAliases: z,
|
|
1900
1909
|
autoDetection: U,
|
|
1901
|
-
inherit:
|
|
1902
|
-
addPlugin:
|
|
1910
|
+
inherit: cn,
|
|
1911
|
+
addPlugin: K,
|
|
1912
|
+
removePlugin: X
|
|
1903
1913
|
}), e.debugMode = function() {
|
|
1904
1914
|
h = !1;
|
|
1905
1915
|
}, e.safeMode = function() {
|
|
1906
1916
|
h = !0;
|
|
1907
|
-
}, e.versionString =
|
|
1908
|
-
concat:
|
|
1909
|
-
lookahead:
|
|
1910
|
-
either:
|
|
1911
|
-
optional:
|
|
1912
|
-
anyNumberOfTimes:
|
|
1917
|
+
}, e.versionString = zt, e.regex = {
|
|
1918
|
+
concat: ue,
|
|
1919
|
+
lookahead: _n,
|
|
1920
|
+
either: Qe,
|
|
1921
|
+
optional: it,
|
|
1922
|
+
anyNumberOfTimes: rt
|
|
1913
1923
|
};
|
|
1914
|
-
for (const _ in
|
|
1915
|
-
typeof
|
|
1916
|
-
return Object.assign(e,
|
|
1917
|
-
};
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
+
for (const _ in De)
|
|
1925
|
+
typeof De[_] == "object" && pn(De[_]);
|
|
1926
|
+
return Object.assign(e, De), e;
|
|
1927
|
+
}, pe = Tn({});
|
|
1928
|
+
pe.newInstance = () => Tn({});
|
|
1929
|
+
var Wt = pe;
|
|
1930
|
+
pe.HighlightJS = pe;
|
|
1931
|
+
pe.default = pe;
|
|
1932
|
+
const J = /* @__PURE__ */ Jn(Wt);
|
|
1933
|
+
function Qt(e) {
|
|
1934
|
+
const r = e.regex, l = r.concat(/[\p{L}_]/u, r.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), u = /[\p{L}0-9._:-]+/u, h = {
|
|
1924
1935
|
className: "symbol",
|
|
1925
1936
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1926
1937
|
}, n = {
|
|
@@ -2092,7 +2103,7 @@ function Kt(e) {
|
|
|
2092
2103
|
begin: r.concat(
|
|
2093
2104
|
/</,
|
|
2094
2105
|
r.lookahead(r.concat(
|
|
2095
|
-
|
|
2106
|
+
l,
|
|
2096
2107
|
// <tag/>
|
|
2097
2108
|
// <tag>
|
|
2098
2109
|
// <tag ...
|
|
@@ -2103,7 +2114,7 @@ function Kt(e) {
|
|
|
2103
2114
|
contains: [
|
|
2104
2115
|
{
|
|
2105
2116
|
className: "name",
|
|
2106
|
-
begin:
|
|
2117
|
+
begin: l,
|
|
2107
2118
|
relevance: 0,
|
|
2108
2119
|
starts: s
|
|
2109
2120
|
}
|
|
@@ -2115,14 +2126,14 @@ function Kt(e) {
|
|
|
2115
2126
|
begin: r.concat(
|
|
2116
2127
|
/<\//,
|
|
2117
2128
|
r.lookahead(r.concat(
|
|
2118
|
-
|
|
2129
|
+
l,
|
|
2119
2130
|
/>/
|
|
2120
2131
|
))
|
|
2121
2132
|
),
|
|
2122
2133
|
contains: [
|
|
2123
2134
|
{
|
|
2124
2135
|
className: "name",
|
|
2125
|
-
begin:
|
|
2136
|
+
begin: l,
|
|
2126
2137
|
relevance: 0
|
|
2127
2138
|
},
|
|
2128
2139
|
{
|
|
@@ -2135,7 +2146,7 @@ function Kt(e) {
|
|
|
2135
2146
|
]
|
|
2136
2147
|
};
|
|
2137
2148
|
}
|
|
2138
|
-
const
|
|
2149
|
+
const fn = "[A-Za-z$_][0-9A-Za-z$_]*", Zt = [
|
|
2139
2150
|
"as",
|
|
2140
2151
|
// for exports
|
|
2141
2152
|
"in",
|
|
@@ -2178,14 +2189,14 @@ const un = "[A-Za-z$_][0-9A-Za-z$_]*", Wt = [
|
|
|
2178
2189
|
"from",
|
|
2179
2190
|
"export",
|
|
2180
2191
|
"extends"
|
|
2181
|
-
],
|
|
2192
|
+
], Yt = [
|
|
2182
2193
|
"true",
|
|
2183
2194
|
"false",
|
|
2184
2195
|
"null",
|
|
2185
2196
|
"undefined",
|
|
2186
2197
|
"NaN",
|
|
2187
2198
|
"Infinity"
|
|
2188
|
-
],
|
|
2199
|
+
], Sn = [
|
|
2189
2200
|
// Fundamental objects
|
|
2190
2201
|
"Object",
|
|
2191
2202
|
"Function",
|
|
@@ -2235,7 +2246,7 @@ const un = "[A-Za-z$_][0-9A-Za-z$_]*", Wt = [
|
|
|
2235
2246
|
"Intl",
|
|
2236
2247
|
// WebAssembly
|
|
2237
2248
|
"WebAssembly"
|
|
2238
|
-
],
|
|
2249
|
+
], Dn = [
|
|
2239
2250
|
"Error",
|
|
2240
2251
|
"EvalError",
|
|
2241
2252
|
"InternalError",
|
|
@@ -2244,7 +2255,7 @@ const un = "[A-Za-z$_][0-9A-Za-z$_]*", Wt = [
|
|
|
2244
2255
|
"SyntaxError",
|
|
2245
2256
|
"TypeError",
|
|
2246
2257
|
"URIError"
|
|
2247
|
-
],
|
|
2258
|
+
], Rn = [
|
|
2248
2259
|
"setInterval",
|
|
2249
2260
|
"setTimeout",
|
|
2250
2261
|
"clearInterval",
|
|
@@ -2262,7 +2273,7 @@ const un = "[A-Za-z$_][0-9A-Za-z$_]*", Wt = [
|
|
|
2262
2273
|
"encodeURIComponent",
|
|
2263
2274
|
"escape",
|
|
2264
2275
|
"unescape"
|
|
2265
|
-
],
|
|
2276
|
+
], Xt = [
|
|
2266
2277
|
"arguments",
|
|
2267
2278
|
"this",
|
|
2268
2279
|
"super",
|
|
@@ -2270,19 +2281,20 @@ const un = "[A-Za-z$_][0-9A-Za-z$_]*", Wt = [
|
|
|
2270
2281
|
"window",
|
|
2271
2282
|
"document",
|
|
2272
2283
|
"localStorage",
|
|
2284
|
+
"sessionStorage",
|
|
2273
2285
|
"module",
|
|
2274
2286
|
"global"
|
|
2275
2287
|
// Node.js
|
|
2276
|
-
],
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2288
|
+
], Vt = [].concat(
|
|
2289
|
+
Rn,
|
|
2290
|
+
Sn,
|
|
2291
|
+
Dn
|
|
2280
2292
|
);
|
|
2281
|
-
function
|
|
2282
|
-
const r = e.regex,
|
|
2283
|
-
const k = "</" +
|
|
2284
|
-
return
|
|
2285
|
-
}, u =
|
|
2293
|
+
function jt(e) {
|
|
2294
|
+
const r = e.regex, l = (N, { after: O }) => {
|
|
2295
|
+
const k = "</" + N[0].slice(1);
|
|
2296
|
+
return N.input.indexOf(k, O) !== -1;
|
|
2297
|
+
}, u = fn, h = {
|
|
2286
2298
|
begin: "<>",
|
|
2287
2299
|
end: "</>"
|
|
2288
2300
|
}, n = /<[A-Za-z0-9\\._:-]+\s*\/>/, t = {
|
|
@@ -2292,22 +2304,22 @@ function Xt(e) {
|
|
|
2292
2304
|
* @param {RegExpMatchArray} match
|
|
2293
2305
|
* @param {CallbackResponse} response
|
|
2294
2306
|
*/
|
|
2295
|
-
isTrulyOpeningTag: (
|
|
2296
|
-
const k =
|
|
2307
|
+
isTrulyOpeningTag: (N, O) => {
|
|
2308
|
+
const k = N[0].length + N.index, H = N.input[k];
|
|
2297
2309
|
if (
|
|
2298
2310
|
// HTML should not include another raw `<` inside a tag
|
|
2299
2311
|
// nested type?
|
|
2300
2312
|
// `<Array<Array<number>>`, etc.
|
|
2301
|
-
|
|
2313
|
+
H === "<" || // the , gives away that this is not HTML
|
|
2302
2314
|
// `<T, A extends keyof T, V>`
|
|
2303
|
-
|
|
2315
|
+
H === ","
|
|
2304
2316
|
) {
|
|
2305
2317
|
O.ignoreMatch();
|
|
2306
2318
|
return;
|
|
2307
2319
|
}
|
|
2308
|
-
|
|
2320
|
+
H === ">" && (l(N, { after: k }) || O.ignoreMatch());
|
|
2309
2321
|
let Y;
|
|
2310
|
-
const q =
|
|
2322
|
+
const q = N.input.substring(k);
|
|
2311
2323
|
if (Y = q.match(/^\s*=/)) {
|
|
2312
2324
|
O.ignoreMatch();
|
|
2313
2325
|
return;
|
|
@@ -2318,17 +2330,17 @@ function Xt(e) {
|
|
|
2318
2330
|
}
|
|
2319
2331
|
}
|
|
2320
2332
|
}, i = {
|
|
2321
|
-
$pattern:
|
|
2322
|
-
keyword:
|
|
2323
|
-
literal:
|
|
2324
|
-
built_in:
|
|
2325
|
-
"variable.language":
|
|
2326
|
-
}, a = "[0-9](_?[0-9])*", s = `\\.(${a})`,
|
|
2333
|
+
$pattern: fn,
|
|
2334
|
+
keyword: Zt,
|
|
2335
|
+
literal: Yt,
|
|
2336
|
+
built_in: Vt,
|
|
2337
|
+
"variable.language": Xt
|
|
2338
|
+
}, a = "[0-9](_?[0-9])*", s = `\\.(${a})`, o = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
|
|
2327
2339
|
className: "number",
|
|
2328
2340
|
variants: [
|
|
2329
2341
|
// DecimalLiteral
|
|
2330
|
-
{ begin: `(\\b(${
|
|
2331
|
-
{ begin: `\\b(${
|
|
2342
|
+
{ begin: `(\\b(${o})((${s})|\\.)?|(${s}))[eE][+-]?(${a})\\b` },
|
|
2343
|
+
{ begin: `\\b(${o})\\b((${s})\\b|\\.)?|(${s})\\b` },
|
|
2332
2344
|
// DecimalBigIntegerLiteral
|
|
2333
2345
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
2334
2346
|
// NonDecimalIntegerLiteral
|
|
@@ -2372,6 +2384,18 @@ function Xt(e) {
|
|
|
2372
2384
|
subLanguage: "css"
|
|
2373
2385
|
}
|
|
2374
2386
|
}, p = {
|
|
2387
|
+
begin: "gql`",
|
|
2388
|
+
end: "",
|
|
2389
|
+
starts: {
|
|
2390
|
+
end: "`",
|
|
2391
|
+
returnEnd: !1,
|
|
2392
|
+
contains: [
|
|
2393
|
+
e.BACKSLASH_ESCAPE,
|
|
2394
|
+
f
|
|
2395
|
+
],
|
|
2396
|
+
subLanguage: "graphql"
|
|
2397
|
+
}
|
|
2398
|
+
}, b = {
|
|
2375
2399
|
className: "string",
|
|
2376
2400
|
begin: "`",
|
|
2377
2401
|
end: "`",
|
|
@@ -2379,7 +2403,7 @@ function Xt(e) {
|
|
|
2379
2403
|
e.BACKSLASH_ESCAPE,
|
|
2380
2404
|
f
|
|
2381
2405
|
]
|
|
2382
|
-
},
|
|
2406
|
+
}, v = {
|
|
2383
2407
|
className: "comment",
|
|
2384
2408
|
variants: [
|
|
2385
2409
|
e.COMMENT(
|
|
@@ -2424,12 +2448,13 @@ function Xt(e) {
|
|
|
2424
2448
|
e.C_BLOCK_COMMENT_MODE,
|
|
2425
2449
|
e.C_LINE_COMMENT_MODE
|
|
2426
2450
|
]
|
|
2427
|
-
},
|
|
2451
|
+
}, w = [
|
|
2428
2452
|
e.APOS_STRING_MODE,
|
|
2429
2453
|
e.QUOTE_STRING_MODE,
|
|
2430
2454
|
g,
|
|
2431
2455
|
d,
|
|
2432
2456
|
p,
|
|
2457
|
+
b,
|
|
2433
2458
|
// Skip numbers when they are part of a variable name
|
|
2434
2459
|
{ match: /\$\d+/ },
|
|
2435
2460
|
c
|
|
@@ -2437,7 +2462,7 @@ function Xt(e) {
|
|
|
2437
2462
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
2438
2463
|
// hljs.REGEXP_MODE
|
|
2439
2464
|
];
|
|
2440
|
-
f.contains =
|
|
2465
|
+
f.contains = w.concat({
|
|
2441
2466
|
// we need to pair up {} inside our subst to prevent
|
|
2442
2467
|
// it from ending too early by matching another }
|
|
2443
2468
|
begin: /\{/,
|
|
@@ -2445,15 +2470,15 @@ function Xt(e) {
|
|
|
2445
2470
|
keywords: i,
|
|
2446
2471
|
contains: [
|
|
2447
2472
|
"self"
|
|
2448
|
-
].concat(
|
|
2473
|
+
].concat(w)
|
|
2449
2474
|
});
|
|
2450
|
-
const
|
|
2475
|
+
const y = [].concat(v, f.contains), D = y.concat([
|
|
2451
2476
|
// eat recursive parens in sub expressions
|
|
2452
2477
|
{
|
|
2453
2478
|
begin: /\(/,
|
|
2454
2479
|
end: /\)/,
|
|
2455
2480
|
keywords: i,
|
|
2456
|
-
contains: ["self"].concat(
|
|
2481
|
+
contains: ["self"].concat(y)
|
|
2457
2482
|
}
|
|
2458
2483
|
]), S = {
|
|
2459
2484
|
className: "params",
|
|
@@ -2462,8 +2487,8 @@ function Xt(e) {
|
|
|
2462
2487
|
excludeBegin: !0,
|
|
2463
2488
|
excludeEnd: !0,
|
|
2464
2489
|
keywords: i,
|
|
2465
|
-
contains:
|
|
2466
|
-
},
|
|
2490
|
+
contains: D
|
|
2491
|
+
}, T = {
|
|
2467
2492
|
variants: [
|
|
2468
2493
|
// class Car extends vehicle
|
|
2469
2494
|
{
|
|
@@ -2496,7 +2521,7 @@ function Xt(e) {
|
|
|
2496
2521
|
}
|
|
2497
2522
|
}
|
|
2498
2523
|
]
|
|
2499
|
-
},
|
|
2524
|
+
}, I = {
|
|
2500
2525
|
relevance: 0,
|
|
2501
2526
|
match: r.either(
|
|
2502
2527
|
// Hard coded exceptions
|
|
@@ -2516,16 +2541,16 @@ function Xt(e) {
|
|
|
2516
2541
|
keywords: {
|
|
2517
2542
|
_: [
|
|
2518
2543
|
// se we still get relevance credit for JS library classes
|
|
2519
|
-
...
|
|
2520
|
-
...
|
|
2544
|
+
...Sn,
|
|
2545
|
+
...Dn
|
|
2521
2546
|
]
|
|
2522
2547
|
}
|
|
2523
|
-
},
|
|
2548
|
+
}, R = {
|
|
2524
2549
|
label: "use_strict",
|
|
2525
2550
|
className: "meta",
|
|
2526
2551
|
relevance: 10,
|
|
2527
2552
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
2528
|
-
},
|
|
2553
|
+
}, z = {
|
|
2529
2554
|
variants: [
|
|
2530
2555
|
{
|
|
2531
2556
|
match: [
|
|
@@ -2550,19 +2575,19 @@ function Xt(e) {
|
|
|
2550
2575
|
label: "func.def",
|
|
2551
2576
|
contains: [S],
|
|
2552
2577
|
illegal: /%/
|
|
2553
|
-
},
|
|
2578
|
+
}, U = {
|
|
2554
2579
|
relevance: 0,
|
|
2555
2580
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
2556
2581
|
className: "variable.constant"
|
|
2557
2582
|
};
|
|
2558
|
-
function
|
|
2559
|
-
return r.concat("(?!",
|
|
2583
|
+
function P(N) {
|
|
2584
|
+
return r.concat("(?!", N.join("|"), ")");
|
|
2560
2585
|
}
|
|
2561
|
-
const
|
|
2586
|
+
const K = {
|
|
2562
2587
|
match: r.concat(
|
|
2563
2588
|
/\b/,
|
|
2564
|
-
|
|
2565
|
-
...
|
|
2589
|
+
P([
|
|
2590
|
+
...Rn,
|
|
2566
2591
|
"super",
|
|
2567
2592
|
"import"
|
|
2568
2593
|
]),
|
|
@@ -2571,7 +2596,7 @@ function Xt(e) {
|
|
|
2571
2596
|
),
|
|
2572
2597
|
className: "title.function",
|
|
2573
2598
|
relevance: 0
|
|
2574
|
-
},
|
|
2599
|
+
}, X = {
|
|
2575
2600
|
begin: r.concat(/\./, r.lookahead(
|
|
2576
2601
|
r.concat(u, /(?![0-9A-Za-z$_(])/)
|
|
2577
2602
|
)),
|
|
@@ -2580,7 +2605,7 @@ function Xt(e) {
|
|
|
2580
2605
|
keywords: "prototype",
|
|
2581
2606
|
className: "property",
|
|
2582
2607
|
relevance: 0
|
|
2583
|
-
},
|
|
2608
|
+
}, fe = {
|
|
2584
2609
|
match: [
|
|
2585
2610
|
/get|set/,
|
|
2586
2611
|
/\s+/,
|
|
@@ -2598,7 +2623,7 @@ function Xt(e) {
|
|
|
2598
2623
|
},
|
|
2599
2624
|
S
|
|
2600
2625
|
]
|
|
2601
|
-
},
|
|
2626
|
+
}, Ae = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", _ = {
|
|
2602
2627
|
match: [
|
|
2603
2628
|
/const|var|let/,
|
|
2604
2629
|
/\s+/,
|
|
@@ -2607,7 +2632,7 @@ function Xt(e) {
|
|
|
2607
2632
|
/=\s*/,
|
|
2608
2633
|
/(async\s*)?/,
|
|
2609
2634
|
// async is optional
|
|
2610
|
-
r.lookahead(
|
|
2635
|
+
r.lookahead(Ae)
|
|
2611
2636
|
],
|
|
2612
2637
|
keywords: "async",
|
|
2613
2638
|
className: {
|
|
@@ -2619,11 +2644,11 @@ function Xt(e) {
|
|
|
2619
2644
|
]
|
|
2620
2645
|
};
|
|
2621
2646
|
return {
|
|
2622
|
-
name: "
|
|
2647
|
+
name: "JavaScript",
|
|
2623
2648
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
2624
2649
|
keywords: i,
|
|
2625
2650
|
// this will be extended by TypeScript
|
|
2626
|
-
exports: { PARAMS_CONTAINS:
|
|
2651
|
+
exports: { PARAMS_CONTAINS: D, CLASS_REFERENCE: I },
|
|
2627
2652
|
illegal: /#(?![$_A-z])/,
|
|
2628
2653
|
contains: [
|
|
2629
2654
|
e.SHEBANG({
|
|
@@ -2631,17 +2656,18 @@ function Xt(e) {
|
|
|
2631
2656
|
binary: "node",
|
|
2632
2657
|
relevance: 5
|
|
2633
2658
|
}),
|
|
2634
|
-
|
|
2659
|
+
R,
|
|
2635
2660
|
e.APOS_STRING_MODE,
|
|
2636
2661
|
e.QUOTE_STRING_MODE,
|
|
2637
2662
|
g,
|
|
2638
2663
|
d,
|
|
2639
2664
|
p,
|
|
2640
|
-
|
|
2665
|
+
b,
|
|
2666
|
+
v,
|
|
2641
2667
|
// Skip numbers when they are part of a variable name
|
|
2642
2668
|
{ match: /\$\d+/ },
|
|
2643
2669
|
c,
|
|
2644
|
-
|
|
2670
|
+
I,
|
|
2645
2671
|
{
|
|
2646
2672
|
className: "attr",
|
|
2647
2673
|
begin: u + r.lookahead(":"),
|
|
@@ -2654,14 +2680,14 @@ function Xt(e) {
|
|
|
2654
2680
|
keywords: "return throw case",
|
|
2655
2681
|
relevance: 0,
|
|
2656
2682
|
contains: [
|
|
2657
|
-
|
|
2683
|
+
v,
|
|
2658
2684
|
e.REGEXP_MODE,
|
|
2659
2685
|
{
|
|
2660
2686
|
className: "function",
|
|
2661
2687
|
// we have to count the parens to make sure we actually have the
|
|
2662
2688
|
// correct bounding ( ) before the =>. There could be any number of
|
|
2663
2689
|
// sub-expressions inside also surrounded by parens.
|
|
2664
|
-
begin:
|
|
2690
|
+
begin: Ae,
|
|
2665
2691
|
returnBegin: !0,
|
|
2666
2692
|
end: "\\s*=>",
|
|
2667
2693
|
contains: [
|
|
@@ -2683,7 +2709,7 @@ function Xt(e) {
|
|
|
2683
2709
|
excludeBegin: !0,
|
|
2684
2710
|
excludeEnd: !0,
|
|
2685
2711
|
keywords: i,
|
|
2686
|
-
contains:
|
|
2712
|
+
contains: D
|
|
2687
2713
|
}
|
|
2688
2714
|
]
|
|
2689
2715
|
}
|
|
@@ -2723,7 +2749,7 @@ function Xt(e) {
|
|
|
2723
2749
|
}
|
|
2724
2750
|
]
|
|
2725
2751
|
},
|
|
2726
|
-
|
|
2752
|
+
z,
|
|
2727
2753
|
{
|
|
2728
2754
|
// prevent this from getting swallowed up by function
|
|
2729
2755
|
// since they appear "function like"
|
|
@@ -2747,7 +2773,7 @@ function Xt(e) {
|
|
|
2747
2773
|
match: /\.\.\./,
|
|
2748
2774
|
relevance: 0
|
|
2749
2775
|
},
|
|
2750
|
-
|
|
2776
|
+
X,
|
|
2751
2777
|
// hack: prevents detection of keywords in some circumstances
|
|
2752
2778
|
// .keyword()
|
|
2753
2779
|
// $keyword = x
|
|
@@ -2760,10 +2786,10 @@ function Xt(e) {
|
|
|
2760
2786
|
className: { 1: "title.function" },
|
|
2761
2787
|
contains: [S]
|
|
2762
2788
|
},
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2789
|
+
K,
|
|
2790
|
+
U,
|
|
2791
|
+
T,
|
|
2792
|
+
fe,
|
|
2767
2793
|
{
|
|
2768
2794
|
match: /\$[(.]/
|
|
2769
2795
|
// relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
|
@@ -2771,12 +2797,12 @@ function Xt(e) {
|
|
|
2771
2797
|
]
|
|
2772
2798
|
};
|
|
2773
2799
|
}
|
|
2774
|
-
function
|
|
2800
|
+
function Jt(e) {
|
|
2775
2801
|
const r = {
|
|
2776
2802
|
className: "attr",
|
|
2777
2803
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
2778
2804
|
relevance: 1.01
|
|
2779
|
-
},
|
|
2805
|
+
}, l = {
|
|
2780
2806
|
match: /[{}[\],:]/,
|
|
2781
2807
|
className: "punctuation",
|
|
2782
2808
|
relevance: 0
|
|
@@ -2795,7 +2821,7 @@ function jt(e) {
|
|
|
2795
2821
|
},
|
|
2796
2822
|
contains: [
|
|
2797
2823
|
r,
|
|
2798
|
-
|
|
2824
|
+
l,
|
|
2799
2825
|
e.QUOTE_STRING_MODE,
|
|
2800
2826
|
h,
|
|
2801
2827
|
e.C_NUMBER_MODE,
|
|
@@ -2805,8 +2831,8 @@ function jt(e) {
|
|
|
2805
2831
|
illegal: "\\S"
|
|
2806
2832
|
};
|
|
2807
2833
|
}
|
|
2808
|
-
function
|
|
2809
|
-
const r = "true false yes no null",
|
|
2834
|
+
function qt(e) {
|
|
2835
|
+
const r = "true false yes no null", l = "[\\w#;/?:@&=+$,.~*'()[\\]]+", u = {
|
|
2810
2836
|
className: "attr",
|
|
2811
2837
|
variants: [
|
|
2812
2838
|
{ begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
|
|
@@ -2861,9 +2887,9 @@ function Vt(e) {
|
|
|
2861
2887
|
end: /"/
|
|
2862
2888
|
},
|
|
2863
2889
|
{ begin: /[^\s,{}[\]]+/ }
|
|
2864
|
-
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", s = "(\\.[0-9]*)?",
|
|
2890
|
+
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", s = "(\\.[0-9]*)?", o = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", c = {
|
|
2865
2891
|
className: "number",
|
|
2866
|
-
begin: "\\b" + i + a + s +
|
|
2892
|
+
begin: "\\b" + i + a + s + o + "\\b"
|
|
2867
2893
|
}, f = {
|
|
2868
2894
|
end: ",",
|
|
2869
2895
|
endsWithParent: !0,
|
|
@@ -2910,23 +2936,23 @@ function Vt(e) {
|
|
|
2910
2936
|
{
|
|
2911
2937
|
// named tags
|
|
2912
2938
|
className: "type",
|
|
2913
|
-
begin: "!\\w+!" +
|
|
2939
|
+
begin: "!\\w+!" + l
|
|
2914
2940
|
},
|
|
2915
2941
|
// https://yaml.org/spec/1.2/spec.html#id2784064
|
|
2916
2942
|
{
|
|
2917
2943
|
// verbatim tags
|
|
2918
2944
|
className: "type",
|
|
2919
|
-
begin: "!<" +
|
|
2945
|
+
begin: "!<" + l + ">"
|
|
2920
2946
|
},
|
|
2921
2947
|
{
|
|
2922
2948
|
// primary tags
|
|
2923
2949
|
className: "type",
|
|
2924
|
-
begin: "!" +
|
|
2950
|
+
begin: "!" + l
|
|
2925
2951
|
},
|
|
2926
2952
|
{
|
|
2927
2953
|
// secondary tags
|
|
2928
2954
|
className: "type",
|
|
2929
|
-
begin: "!!" +
|
|
2955
|
+
begin: "!!" + l
|
|
2930
2956
|
},
|
|
2931
2957
|
{
|
|
2932
2958
|
// fragment id &ref
|
|
@@ -2969,7 +2995,7 @@ function Vt(e) {
|
|
|
2969
2995
|
contains: p
|
|
2970
2996
|
};
|
|
2971
2997
|
}
|
|
2972
|
-
function
|
|
2998
|
+
function er(e) {
|
|
2973
2999
|
return {
|
|
2974
3000
|
name: "Plain text",
|
|
2975
3001
|
aliases: [
|
|
@@ -2979,8 +3005,8 @@ function Jt(e) {
|
|
|
2979
3005
|
disableAutodetect: !0
|
|
2980
3006
|
};
|
|
2981
3007
|
}
|
|
2982
|
-
function
|
|
2983
|
-
const r = e.regex,
|
|
3008
|
+
function nr(e) {
|
|
3009
|
+
const r = e.regex, l = /[\p{XID_Start}_]\p{XID_Continue}*/u, u = [
|
|
2984
3010
|
"and",
|
|
2985
3011
|
"as",
|
|
2986
3012
|
"assert",
|
|
@@ -3121,7 +3147,7 @@ function qt(e) {
|
|
|
3121
3147
|
end: /\}/,
|
|
3122
3148
|
keywords: i,
|
|
3123
3149
|
illegal: /#/
|
|
3124
|
-
},
|
|
3150
|
+
}, o = {
|
|
3125
3151
|
begin: /\{\{/,
|
|
3126
3152
|
relevance: 0
|
|
3127
3153
|
}, c = {
|
|
@@ -3152,7 +3178,7 @@ function qt(e) {
|
|
|
3152
3178
|
contains: [
|
|
3153
3179
|
e.BACKSLASH_ESCAPE,
|
|
3154
3180
|
a,
|
|
3155
|
-
|
|
3181
|
+
o,
|
|
3156
3182
|
s
|
|
3157
3183
|
]
|
|
3158
3184
|
},
|
|
@@ -3162,7 +3188,7 @@ function qt(e) {
|
|
|
3162
3188
|
contains: [
|
|
3163
3189
|
e.BACKSLASH_ESCAPE,
|
|
3164
3190
|
a,
|
|
3165
|
-
|
|
3191
|
+
o,
|
|
3166
3192
|
s
|
|
3167
3193
|
]
|
|
3168
3194
|
},
|
|
@@ -3189,7 +3215,7 @@ function qt(e) {
|
|
|
3189
3215
|
end: /'/,
|
|
3190
3216
|
contains: [
|
|
3191
3217
|
e.BACKSLASH_ESCAPE,
|
|
3192
|
-
|
|
3218
|
+
o,
|
|
3193
3219
|
s
|
|
3194
3220
|
]
|
|
3195
3221
|
},
|
|
@@ -3198,7 +3224,7 @@ function qt(e) {
|
|
|
3198
3224
|
end: /"/,
|
|
3199
3225
|
contains: [
|
|
3200
3226
|
e.BACKSLASH_ESCAPE,
|
|
3201
|
-
|
|
3227
|
+
o,
|
|
3202
3228
|
s
|
|
3203
3229
|
]
|
|
3204
3230
|
},
|
|
@@ -3304,7 +3330,7 @@ function qt(e) {
|
|
|
3304
3330
|
],
|
|
3305
3331
|
unicodeRegex: !0,
|
|
3306
3332
|
keywords: i,
|
|
3307
|
-
illegal: /(
|
|
3333
|
+
illegal: /(<\/|\?)|=>/,
|
|
3308
3334
|
contains: [
|
|
3309
3335
|
a,
|
|
3310
3336
|
p,
|
|
@@ -3325,7 +3351,7 @@ function qt(e) {
|
|
|
3325
3351
|
match: [
|
|
3326
3352
|
/\bdef/,
|
|
3327
3353
|
/\s+/,
|
|
3328
|
-
|
|
3354
|
+
l
|
|
3329
3355
|
],
|
|
3330
3356
|
scope: {
|
|
3331
3357
|
1: "keyword",
|
|
@@ -3339,10 +3365,10 @@ function qt(e) {
|
|
|
3339
3365
|
match: [
|
|
3340
3366
|
/\bclass/,
|
|
3341
3367
|
/\s+/,
|
|
3342
|
-
|
|
3368
|
+
l,
|
|
3343
3369
|
/\s*/,
|
|
3344
3370
|
/\(\s*/,
|
|
3345
|
-
|
|
3371
|
+
l,
|
|
3346
3372
|
/\s*\)/
|
|
3347
3373
|
]
|
|
3348
3374
|
},
|
|
@@ -3350,7 +3376,7 @@ function qt(e) {
|
|
|
3350
3376
|
match: [
|
|
3351
3377
|
/\bclass/,
|
|
3352
3378
|
/\s+/,
|
|
3353
|
-
|
|
3379
|
+
l
|
|
3354
3380
|
]
|
|
3355
3381
|
}
|
|
3356
3382
|
],
|
|
@@ -3373,22 +3399,22 @@ function qt(e) {
|
|
|
3373
3399
|
]
|
|
3374
3400
|
};
|
|
3375
3401
|
}
|
|
3376
|
-
var
|
|
3402
|
+
var he = "[0-9](_*[0-9])*", Re = `\\.(${he})`, Le = "[0-9a-fA-F](_*[0-9a-fA-F])*", gn = {
|
|
3377
3403
|
className: "number",
|
|
3378
3404
|
variants: [
|
|
3379
3405
|
// DecimalFloatingPointLiteral
|
|
3380
3406
|
// including ExponentPart
|
|
3381
|
-
{ begin: `(\\b(${
|
|
3407
|
+
{ begin: `(\\b(${he})((${Re})|\\.)?|(${Re}))[eE][+-]?(${he})[fFdD]?\\b` },
|
|
3382
3408
|
// excluding ExponentPart
|
|
3383
|
-
{ begin: `\\b(${
|
|
3384
|
-
{ begin: `(${
|
|
3385
|
-
{ begin: `\\b(${
|
|
3409
|
+
{ begin: `\\b(${he})((${Re})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
3410
|
+
{ begin: `(${Re})[fFdD]?\\b` },
|
|
3411
|
+
{ begin: `\\b(${he})[fFdD]\\b` },
|
|
3386
3412
|
// HexadecimalFloatingPointLiteral
|
|
3387
|
-
{ begin: `\\b0[xX]((${
|
|
3413
|
+
{ begin: `\\b0[xX]((${Le})\\.?|(${Le})?\\.(${Le}))[pP][+-]?(${he})[fFdD]?\\b` },
|
|
3388
3414
|
// DecimalIntegerLiteral
|
|
3389
3415
|
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
3390
3416
|
// HexIntegerLiteral
|
|
3391
|
-
{ begin: `\\b0[xX](${
|
|
3417
|
+
{ begin: `\\b0[xX](${Le})[lL]?\\b` },
|
|
3392
3418
|
// OctalIntegerLiteral
|
|
3393
3419
|
{ begin: "\\b0(_*[0-7])*[lL]?\\b" },
|
|
3394
3420
|
// BinaryIntegerLiteral
|
|
@@ -3396,11 +3422,11 @@ var fe = "[0-9](_*[0-9])*", Se = `\\.(${fe})`, De = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3396
3422
|
],
|
|
3397
3423
|
relevance: 0
|
|
3398
3424
|
};
|
|
3399
|
-
function
|
|
3400
|
-
return
|
|
3425
|
+
function Ln(e, r, l) {
|
|
3426
|
+
return l === -1 ? "" : e.replace(r, (u) => Ln(e, r, l - 1));
|
|
3401
3427
|
}
|
|
3402
|
-
function
|
|
3403
|
-
const r = e.regex,
|
|
3428
|
+
function tr(e) {
|
|
3429
|
+
const r = e.regex, l = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = l + Ln("(?:<" + l + "~~~(?:\\s*,\\s*" + l + "~~~)*>)?", /~~~/g, 2), a = {
|
|
3404
3430
|
keyword: [
|
|
3405
3431
|
"synchronized",
|
|
3406
3432
|
"abstract",
|
|
@@ -3466,7 +3492,7 @@ function er(e) {
|
|
|
3466
3492
|
]
|
|
3467
3493
|
}, s = {
|
|
3468
3494
|
className: "meta",
|
|
3469
|
-
begin: "@" +
|
|
3495
|
+
begin: "@" + l,
|
|
3470
3496
|
contains: [
|
|
3471
3497
|
{
|
|
3472
3498
|
begin: /\(/,
|
|
@@ -3475,7 +3501,7 @@ function er(e) {
|
|
|
3475
3501
|
// allow nested () inside our annotation
|
|
3476
3502
|
}
|
|
3477
3503
|
]
|
|
3478
|
-
},
|
|
3504
|
+
}, o = {
|
|
3479
3505
|
className: "params",
|
|
3480
3506
|
begin: /\(/,
|
|
3481
3507
|
end: /\)/,
|
|
@@ -3528,7 +3554,7 @@ function er(e) {
|
|
|
3528
3554
|
match: [
|
|
3529
3555
|
/\b(?:class|interface|enum|extends|implements|new)/,
|
|
3530
3556
|
/\s+/,
|
|
3531
|
-
|
|
3557
|
+
l
|
|
3532
3558
|
],
|
|
3533
3559
|
className: {
|
|
3534
3560
|
1: "keyword",
|
|
@@ -3542,9 +3568,9 @@ function er(e) {
|
|
|
3542
3568
|
},
|
|
3543
3569
|
{
|
|
3544
3570
|
begin: [
|
|
3545
|
-
r.concat(/(?!else)/,
|
|
3571
|
+
r.concat(/(?!else)/, l),
|
|
3546
3572
|
/\s+/,
|
|
3547
|
-
|
|
3573
|
+
l,
|
|
3548
3574
|
/\s+/,
|
|
3549
3575
|
/=(?!=)/
|
|
3550
3576
|
],
|
|
@@ -3558,14 +3584,14 @@ function er(e) {
|
|
|
3558
3584
|
begin: [
|
|
3559
3585
|
/record/,
|
|
3560
3586
|
/\s+/,
|
|
3561
|
-
|
|
3587
|
+
l
|
|
3562
3588
|
],
|
|
3563
3589
|
className: {
|
|
3564
3590
|
1: "keyword",
|
|
3565
3591
|
3: "title.class"
|
|
3566
3592
|
},
|
|
3567
3593
|
contains: [
|
|
3568
|
-
|
|
3594
|
+
o,
|
|
3569
3595
|
e.C_LINE_COMMENT_MODE,
|
|
3570
3596
|
e.C_BLOCK_COMMENT_MODE
|
|
3571
3597
|
]
|
|
@@ -3595,7 +3621,7 @@ function er(e) {
|
|
|
3595
3621
|
s,
|
|
3596
3622
|
e.APOS_STRING_MODE,
|
|
3597
3623
|
e.QUOTE_STRING_MODE,
|
|
3598
|
-
|
|
3624
|
+
gn,
|
|
3599
3625
|
e.C_BLOCK_COMMENT_MODE
|
|
3600
3626
|
]
|
|
3601
3627
|
},
|
|
@@ -3603,25 +3629,25 @@ function er(e) {
|
|
|
3603
3629
|
e.C_BLOCK_COMMENT_MODE
|
|
3604
3630
|
]
|
|
3605
3631
|
},
|
|
3606
|
-
|
|
3632
|
+
gn,
|
|
3607
3633
|
s
|
|
3608
3634
|
]
|
|
3609
3635
|
};
|
|
3610
3636
|
}
|
|
3611
|
-
function
|
|
3612
|
-
const r = e.regex,
|
|
3637
|
+
function rr(e) {
|
|
3638
|
+
const r = e.regex, l = {}, u = {
|
|
3613
3639
|
begin: /\$\{/,
|
|
3614
3640
|
end: /\}/,
|
|
3615
3641
|
contains: [
|
|
3616
3642
|
"self",
|
|
3617
3643
|
{
|
|
3618
3644
|
begin: /:-/,
|
|
3619
|
-
contains: [
|
|
3645
|
+
contains: [l]
|
|
3620
3646
|
}
|
|
3621
3647
|
// default values
|
|
3622
3648
|
]
|
|
3623
3649
|
};
|
|
3624
|
-
Object.assign(
|
|
3650
|
+
Object.assign(l, {
|
|
3625
3651
|
className: "variable",
|
|
3626
3652
|
variants: [
|
|
3627
3653
|
{ begin: r.concat(
|
|
@@ -3653,19 +3679,20 @@ function nr(e) {
|
|
|
3653
3679
|
end: /"/,
|
|
3654
3680
|
contains: [
|
|
3655
3681
|
e.BACKSLASH_ESCAPE,
|
|
3656
|
-
|
|
3682
|
+
l,
|
|
3657
3683
|
h
|
|
3658
3684
|
]
|
|
3659
3685
|
};
|
|
3660
3686
|
h.contains.push(t);
|
|
3661
3687
|
const i = {
|
|
3662
|
-
|
|
3663
|
-
begin: /\\"/
|
|
3688
|
+
match: /\\"/
|
|
3664
3689
|
}, a = {
|
|
3665
3690
|
className: "string",
|
|
3666
3691
|
begin: /'/,
|
|
3667
3692
|
end: /'/
|
|
3668
3693
|
}, s = {
|
|
3694
|
+
match: /\\'/
|
|
3695
|
+
}, o = {
|
|
3669
3696
|
begin: /\$?\(\(/,
|
|
3670
3697
|
end: /\)\)/,
|
|
3671
3698
|
contains: [
|
|
@@ -3674,9 +3701,9 @@ function nr(e) {
|
|
|
3674
3701
|
className: "number"
|
|
3675
3702
|
},
|
|
3676
3703
|
e.NUMBER_MODE,
|
|
3677
|
-
|
|
3704
|
+
l
|
|
3678
3705
|
]
|
|
3679
|
-
},
|
|
3706
|
+
}, c = [
|
|
3680
3707
|
"fish",
|
|
3681
3708
|
"bash",
|
|
3682
3709
|
"zsh",
|
|
@@ -3686,16 +3713,16 @@ function nr(e) {
|
|
|
3686
3713
|
"tcsh",
|
|
3687
3714
|
"dash",
|
|
3688
3715
|
"scsh"
|
|
3689
|
-
],
|
|
3690
|
-
binary: `(${
|
|
3716
|
+
], f = e.SHEBANG({
|
|
3717
|
+
binary: `(${c.join("|")})`,
|
|
3691
3718
|
relevance: 10
|
|
3692
|
-
}),
|
|
3719
|
+
}), g = {
|
|
3693
3720
|
className: "function",
|
|
3694
3721
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3695
3722
|
returnBegin: !0,
|
|
3696
3723
|
contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
|
|
3697
3724
|
relevance: 0
|
|
3698
|
-
},
|
|
3725
|
+
}, d = [
|
|
3699
3726
|
"if",
|
|
3700
3727
|
"then",
|
|
3701
3728
|
"else",
|
|
@@ -3703,16 +3730,18 @@ function nr(e) {
|
|
|
3703
3730
|
"fi",
|
|
3704
3731
|
"for",
|
|
3705
3732
|
"while",
|
|
3733
|
+
"until",
|
|
3706
3734
|
"in",
|
|
3707
3735
|
"do",
|
|
3708
3736
|
"done",
|
|
3709
3737
|
"case",
|
|
3710
3738
|
"esac",
|
|
3711
|
-
"function"
|
|
3712
|
-
|
|
3739
|
+
"function",
|
|
3740
|
+
"select"
|
|
3741
|
+
], p = [
|
|
3713
3742
|
"true",
|
|
3714
3743
|
"false"
|
|
3715
|
-
],
|
|
3744
|
+
], b = { match: /(\/[a-z._-]+)+/ }, E = [
|
|
3716
3745
|
"break",
|
|
3717
3746
|
"cd",
|
|
3718
3747
|
"continue",
|
|
@@ -3731,7 +3760,7 @@ function nr(e) {
|
|
|
3731
3760
|
"trap",
|
|
3732
3761
|
"umask",
|
|
3733
3762
|
"unset"
|
|
3734
|
-
],
|
|
3763
|
+
], v = [
|
|
3735
3764
|
"alias",
|
|
3736
3765
|
"bind",
|
|
3737
3766
|
"builtin",
|
|
@@ -3753,7 +3782,7 @@ function nr(e) {
|
|
|
3753
3782
|
"typeset",
|
|
3754
3783
|
"ulimit",
|
|
3755
3784
|
"unalias"
|
|
3756
|
-
],
|
|
3785
|
+
], w = [
|
|
3757
3786
|
"autoload",
|
|
3758
3787
|
"bg",
|
|
3759
3788
|
"bindkey",
|
|
@@ -3822,7 +3851,7 @@ function nr(e) {
|
|
|
3822
3851
|
"zsocket",
|
|
3823
3852
|
"zstyle",
|
|
3824
3853
|
"ztcp"
|
|
3825
|
-
],
|
|
3854
|
+
], y = [
|
|
3826
3855
|
"chcon",
|
|
3827
3856
|
"chgrp",
|
|
3828
3857
|
"chown",
|
|
@@ -3932,37 +3961,38 @@ function nr(e) {
|
|
|
3932
3961
|
aliases: ["sh"],
|
|
3933
3962
|
keywords: {
|
|
3934
3963
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
3935
|
-
keyword:
|
|
3936
|
-
literal:
|
|
3964
|
+
keyword: d,
|
|
3965
|
+
literal: p,
|
|
3937
3966
|
built_in: [
|
|
3938
|
-
...b,
|
|
3939
3967
|
...E,
|
|
3968
|
+
...v,
|
|
3940
3969
|
// Shell modifiers
|
|
3941
3970
|
"set",
|
|
3942
3971
|
"shopt",
|
|
3943
|
-
...
|
|
3944
|
-
...
|
|
3972
|
+
...w,
|
|
3973
|
+
...y
|
|
3945
3974
|
]
|
|
3946
3975
|
},
|
|
3947
3976
|
contains: [
|
|
3948
|
-
|
|
3977
|
+
f,
|
|
3949
3978
|
// to catch known shells and boost relevancy
|
|
3950
3979
|
e.SHEBANG(),
|
|
3951
3980
|
// to catch unknown shells but still highlight the shebang
|
|
3952
|
-
|
|
3953
|
-
|
|
3981
|
+
g,
|
|
3982
|
+
o,
|
|
3954
3983
|
e.HASH_COMMENT_MODE,
|
|
3955
3984
|
n,
|
|
3956
|
-
|
|
3985
|
+
b,
|
|
3957
3986
|
t,
|
|
3958
3987
|
i,
|
|
3959
3988
|
a,
|
|
3960
|
-
|
|
3989
|
+
s,
|
|
3990
|
+
l
|
|
3961
3991
|
]
|
|
3962
3992
|
};
|
|
3963
3993
|
}
|
|
3964
|
-
function
|
|
3965
|
-
const r = e.regex,
|
|
3994
|
+
function ir(e) {
|
|
3995
|
+
const r = e.regex, l = e.COMMENT("--", "$"), u = {
|
|
3966
3996
|
className: "string",
|
|
3967
3997
|
variants: [
|
|
3968
3998
|
{
|
|
@@ -4391,7 +4421,7 @@ function tr(e) {
|
|
|
4391
4421
|
"within",
|
|
4392
4422
|
"without",
|
|
4393
4423
|
"year"
|
|
4394
|
-
],
|
|
4424
|
+
], o = [
|
|
4395
4425
|
"abs",
|
|
4396
4426
|
"acos",
|
|
4397
4427
|
"array_agg",
|
|
@@ -4510,12 +4540,12 @@ function tr(e) {
|
|
|
4510
4540
|
"nulls last",
|
|
4511
4541
|
"depth first",
|
|
4512
4542
|
"breadth first"
|
|
4513
|
-
], g =
|
|
4543
|
+
], g = o, d = [
|
|
4514
4544
|
...s,
|
|
4515
4545
|
...a
|
|
4516
|
-
].filter((w) => !
|
|
4546
|
+
].filter((w) => !o.includes(w)), p = {
|
|
4517
4547
|
className: "variable",
|
|
4518
|
-
begin: /@[a-z0-9]
|
|
4548
|
+
begin: /@[a-z0-9][a-z0-9_]*/
|
|
4519
4549
|
}, b = {
|
|
4520
4550
|
className: "operator",
|
|
4521
4551
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
@@ -4526,11 +4556,11 @@ function tr(e) {
|
|
|
4526
4556
|
keywords: { built_in: g }
|
|
4527
4557
|
};
|
|
4528
4558
|
function v(w, {
|
|
4529
|
-
exceptions:
|
|
4530
|
-
when:
|
|
4559
|
+
exceptions: y,
|
|
4560
|
+
when: D
|
|
4531
4561
|
} = {}) {
|
|
4532
|
-
const
|
|
4533
|
-
return
|
|
4562
|
+
const S = D;
|
|
4563
|
+
return y = y || [], w.map((T) => T.match(/\|\d+$/) || y.includes(T) ? T : S(T) ? `${T}|0` : T);
|
|
4534
4564
|
}
|
|
4535
4565
|
return {
|
|
4536
4566
|
name: "SQL",
|
|
@@ -4565,48 +4595,48 @@ function tr(e) {
|
|
|
4565
4595
|
h,
|
|
4566
4596
|
e.C_NUMBER_MODE,
|
|
4567
4597
|
e.C_BLOCK_COMMENT_MODE,
|
|
4568
|
-
|
|
4598
|
+
l,
|
|
4569
4599
|
b
|
|
4570
4600
|
]
|
|
4571
4601
|
};
|
|
4572
4602
|
}
|
|
4573
|
-
J.registerLanguage("xml",
|
|
4574
|
-
J.registerLanguage("javascript",
|
|
4575
|
-
J.registerLanguage("json",
|
|
4576
|
-
J.registerLanguage("yaml",
|
|
4577
|
-
J.registerLanguage("plaintext",
|
|
4578
|
-
J.registerLanguage("python",
|
|
4579
|
-
J.registerLanguage("java",
|
|
4580
|
-
J.registerLanguage("bash",
|
|
4581
|
-
J.registerLanguage("sql",
|
|
4582
|
-
var
|
|
4583
|
-
const
|
|
4584
|
-
function
|
|
4585
|
-
return e === void 0 ?
|
|
4603
|
+
J.registerLanguage("xml", Qt);
|
|
4604
|
+
J.registerLanguage("javascript", jt);
|
|
4605
|
+
J.registerLanguage("json", Jt);
|
|
4606
|
+
J.registerLanguage("yaml", qt);
|
|
4607
|
+
J.registerLanguage("plaintext", er);
|
|
4608
|
+
J.registerLanguage("python", nr);
|
|
4609
|
+
J.registerLanguage("java", tr);
|
|
4610
|
+
J.registerLanguage("bash", rr);
|
|
4611
|
+
J.registerLanguage("sql", ir);
|
|
4612
|
+
var A = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(A || {});
|
|
4613
|
+
const ie = "<code-diff-modified>", se = "</code-diff-modified>", sr = ie.replace("<", "<").replace(">", ">"), ar = se.replace("<", "<").replace(">", ">");
|
|
4614
|
+
function be(e) {
|
|
4615
|
+
return e === void 0 ? A.EQUAL : e.added ? A.ADD : e.removed ? A.DELETE : A.EQUAL;
|
|
4586
4616
|
}
|
|
4587
|
-
function
|
|
4588
|
-
return typeof e == "undefined" ? r : typeof r == "undefined" ? e : (
|
|
4589
|
-
(h) =>
|
|
4617
|
+
function ke(e, r, l = "word") {
|
|
4618
|
+
return typeof e == "undefined" ? r : typeof r == "undefined" ? e : (l === "char" ? Qn : Yn)(e, r).filter((h) => be(h) !== A.DELETE).map(
|
|
4619
|
+
(h) => be(h) === A.ADD ? `${ie}${h.value}${se}` : h.value
|
|
4590
4620
|
).join("");
|
|
4591
4621
|
}
|
|
4592
|
-
function
|
|
4593
|
-
const
|
|
4594
|
-
return
|
|
4595
|
-
const [s,
|
|
4622
|
+
function On(e, r) {
|
|
4623
|
+
const l = new xe.diff_match_patch(), u = l.diff_linesToChars_(e, r), h = u.chars1, n = u.chars2, t = u.lineArray, i = l.diff_main(h, n, !1);
|
|
4624
|
+
return l.diff_charsToLines_(i, t), i.map((a) => {
|
|
4625
|
+
const [s, o] = a;
|
|
4596
4626
|
return {
|
|
4597
|
-
count:
|
|
4627
|
+
count: o.replace(/\n$/, "").split(`
|
|
4598
4628
|
`).length,
|
|
4599
|
-
value:
|
|
4600
|
-
removed: s ===
|
|
4601
|
-
added: s ===
|
|
4629
|
+
value: o,
|
|
4630
|
+
removed: s === xe.DIFF_DELETE,
|
|
4631
|
+
added: s === xe.DIFF_INSERT
|
|
4602
4632
|
};
|
|
4603
4633
|
});
|
|
4604
4634
|
}
|
|
4605
|
-
function
|
|
4606
|
-
if (!r.match(new RegExp(`(${
|
|
4635
|
+
function j(e, r) {
|
|
4636
|
+
if (!r.match(new RegExp(`(${ie}|${se})`, "g")))
|
|
4607
4637
|
return J.highlight(r, { language: e }).value;
|
|
4608
4638
|
let u = r;
|
|
4609
|
-
const h = r.replace(new RegExp(`(${
|
|
4639
|
+
const h = r.replace(new RegExp(`(${ie}|${se})`, "g"), ""), n = document.createElement("div");
|
|
4610
4640
|
n.innerHTML = J.highlight(h, { language: e }).value;
|
|
4611
4641
|
let t = !1;
|
|
4612
4642
|
const i = (a) => {
|
|
@@ -4614,90 +4644,90 @@ function V(e, r) {
|
|
|
4614
4644
|
if (s.nodeType === Node.ELEMENT_NODE && i(s), s.nodeType === Node.TEXT_NODE) {
|
|
4615
4645
|
if (!s.textContent)
|
|
4616
4646
|
return;
|
|
4617
|
-
let
|
|
4618
|
-
for (t && (c = c +
|
|
4619
|
-
if (u.startsWith(
|
|
4620
|
-
u = u.slice(
|
|
4647
|
+
let o = s.textContent, c = "";
|
|
4648
|
+
for (t && (c = c + ie); o.length; ) {
|
|
4649
|
+
if (u.startsWith(ie)) {
|
|
4650
|
+
u = u.slice(ie.length), c = c + ie, t = !0;
|
|
4621
4651
|
continue;
|
|
4622
4652
|
}
|
|
4623
|
-
if (u.startsWith(
|
|
4624
|
-
u = u.slice(
|
|
4653
|
+
if (u.startsWith(se)) {
|
|
4654
|
+
u = u.slice(se.length), c = c + se, t = !1;
|
|
4625
4655
|
continue;
|
|
4626
4656
|
}
|
|
4627
|
-
const f = u.match(new RegExp(`(${
|
|
4628
|
-
c = c + u.substring(0, d), u = u.slice(d),
|
|
4657
|
+
const f = u.match(new RegExp(`(${ie}|${se})`)), g = f && f.index ? f.index : u.length, d = Math.min(g, o.length);
|
|
4658
|
+
c = c + u.substring(0, d), u = u.slice(d), o = o.slice(d);
|
|
4629
4659
|
}
|
|
4630
|
-
t && (c = c +
|
|
4660
|
+
t && (c = c + se), s.textContent = c;
|
|
4631
4661
|
}
|
|
4632
4662
|
});
|
|
4633
4663
|
};
|
|
4634
|
-
return i(n), n.innerHTML.replace(new RegExp(
|
|
4664
|
+
return i(n), n.innerHTML.replace(new RegExp(sr, "g"), '<span class="x">').replace(new RegExp(ar, "g"), "</span>");
|
|
4635
4665
|
}
|
|
4636
|
-
function
|
|
4666
|
+
function Cn(e) {
|
|
4637
4667
|
const r = (h, n) => (h.match(new RegExp(n, "g")) || []).length;
|
|
4638
|
-
let
|
|
4668
|
+
let l = 0, u = 0;
|
|
4639
4669
|
for (const h of e)
|
|
4640
|
-
h.added && (
|
|
4670
|
+
h.added && (l += r(h.value.trim(), `
|
|
4641
4671
|
`) + 1), h.removed && (u += r(h.value.trim(), `
|
|
4642
4672
|
`) + 1);
|
|
4643
|
-
return { additionsNum:
|
|
4673
|
+
return { additionsNum: l, deletionsNum: u };
|
|
4644
4674
|
}
|
|
4645
|
-
function
|
|
4646
|
-
const n = () => ({ type:
|
|
4647
|
-
let a = 0, s = 0,
|
|
4675
|
+
function or(e, r, l = "plaintext", u = "word", h = 10) {
|
|
4676
|
+
const n = () => ({ type: A.EMPTY }), t = (p, b, E) => ({ type: p, num: b, code: E }), i = On(e, r);
|
|
4677
|
+
let a = 0, s = 0, o = !1;
|
|
4648
4678
|
const c = [], f = {
|
|
4649
4679
|
changes: c,
|
|
4650
4680
|
collector: [],
|
|
4651
|
-
stat:
|
|
4681
|
+
stat: Cn(i)
|
|
4652
4682
|
};
|
|
4653
4683
|
for (let p = 0; p < i.length; p++) {
|
|
4654
|
-
if (
|
|
4655
|
-
|
|
4684
|
+
if (o) {
|
|
4685
|
+
o = !1;
|
|
4656
4686
|
continue;
|
|
4657
4687
|
}
|
|
4658
|
-
const [b, E] = [i[p], i[p + 1]], [v, w] = [
|
|
4688
|
+
const [b, E] = [i[p], i[p + 1]], [v, w] = [be(b), be(E)], y = b.value.replace(/\n$/, "").split(`
|
|
4659
4689
|
`);
|
|
4660
4690
|
if (E === void 0) {
|
|
4661
|
-
for (const
|
|
4662
|
-
let
|
|
4663
|
-
const R =
|
|
4664
|
-
v ===
|
|
4691
|
+
for (const S of y) {
|
|
4692
|
+
let T = n(), I = n();
|
|
4693
|
+
const R = j(l, S);
|
|
4694
|
+
v === A.EQUAL && (a++, s++, T = t(A.EQUAL, a, R), I = t(A.EQUAL, s, R)), v === A.DELETE && (a++, T = t(A.DELETE, a, R), I = n()), v === A.ADD && (s++, T = n(), I = t(A.ADD, s, R)), c.push({ left: T, right: I });
|
|
4665
4695
|
}
|
|
4666
4696
|
break;
|
|
4667
4697
|
}
|
|
4668
|
-
if (v ===
|
|
4669
|
-
for (const
|
|
4698
|
+
if (v === A.EQUAL)
|
|
4699
|
+
for (const S of y) {
|
|
4670
4700
|
a++, s++;
|
|
4671
|
-
const
|
|
4701
|
+
const T = j(l, S);
|
|
4672
4702
|
c.push({
|
|
4673
|
-
left: t(
|
|
4674
|
-
right: t(
|
|
4703
|
+
left: t(A.EQUAL, a, T),
|
|
4704
|
+
right: t(A.EQUAL, s, T)
|
|
4675
4705
|
});
|
|
4676
4706
|
}
|
|
4677
|
-
const
|
|
4707
|
+
const D = E.value.replace(/\n$/, "").split(`
|
|
4678
4708
|
`);
|
|
4679
|
-
if (v ===
|
|
4680
|
-
if (w ===
|
|
4681
|
-
for (const
|
|
4709
|
+
if (v === A.DELETE) {
|
|
4710
|
+
if (w === A.EQUAL)
|
|
4711
|
+
for (const S of y)
|
|
4682
4712
|
a++, c.push({
|
|
4683
|
-
left: t(
|
|
4713
|
+
left: t(A.DELETE, a, j(l, S)),
|
|
4684
4714
|
right: n()
|
|
4685
4715
|
});
|
|
4686
|
-
if (w ===
|
|
4687
|
-
|
|
4688
|
-
const
|
|
4689
|
-
for (let
|
|
4690
|
-
|
|
4691
|
-
const [I, R] = [
|
|
4692
|
-
c.push({ left:
|
|
4716
|
+
if (w === A.ADD) {
|
|
4717
|
+
o = !0;
|
|
4718
|
+
const S = Math.max(b.count, E.count);
|
|
4719
|
+
for (let T = 0; T < S; T++) {
|
|
4720
|
+
T < b.count && a++, T < E.count && s++;
|
|
4721
|
+
const [I, R] = [y[T], D[T]], z = y.length === D.length ? ke(R, I, u) : I, U = y.length === D.length ? ke(I, R, u) : R, P = T < b.count ? t(A.DELETE, a, j(l, z)) : n(), K = T < E.count ? t(A.ADD, s, j(l, U)) : n();
|
|
4722
|
+
c.push({ left: P, right: K });
|
|
4693
4723
|
}
|
|
4694
4724
|
}
|
|
4695
4725
|
}
|
|
4696
|
-
if (v ===
|
|
4697
|
-
for (const
|
|
4726
|
+
if (v === A.ADD)
|
|
4727
|
+
for (const S of y)
|
|
4698
4728
|
s++, c.push({
|
|
4699
4729
|
left: n(),
|
|
4700
|
-
right: t(
|
|
4730
|
+
right: t(A.ADD, s, j(l, S))
|
|
4701
4731
|
});
|
|
4702
4732
|
}
|
|
4703
4733
|
if (e === r) {
|
|
@@ -4707,7 +4737,7 @@ function sr(e, r, o = "plaintext", u = "word", h = 10) {
|
|
|
4707
4737
|
}
|
|
4708
4738
|
for (let p = 0; p < c.length; p++) {
|
|
4709
4739
|
const b = c[p];
|
|
4710
|
-
if (b.left.type ===
|
|
4740
|
+
if (b.left.type === A.DELETE || b.right.type === A.ADD) {
|
|
4711
4741
|
const [E, v] = [Math.max(p - h, 0), Math.min(p + h + 1, c.length)];
|
|
4712
4742
|
for (let w = E; w < v; w++)
|
|
4713
4743
|
c[w].fold = !1;
|
|
@@ -4732,73 +4762,73 @@ function sr(e, r, o = "plaintext", u = "word", h = 10) {
|
|
|
4732
4762
|
fold: !0
|
|
4733
4763
|
}), d = []), f.changes = g, f;
|
|
4734
4764
|
}
|
|
4735
|
-
function
|
|
4736
|
-
const n =
|
|
4765
|
+
function lr(e, r, l = "plaintext", u = "word", h = 10) {
|
|
4766
|
+
const n = On(e, r);
|
|
4737
4767
|
let t = 0, i = 0, a = !1;
|
|
4738
|
-
const s = [],
|
|
4768
|
+
const s = [], o = {
|
|
4739
4769
|
changes: s,
|
|
4740
4770
|
collector: [],
|
|
4741
|
-
stat:
|
|
4771
|
+
stat: Cn(n)
|
|
4742
4772
|
};
|
|
4743
4773
|
for (let g = 0; g < n.length; g++) {
|
|
4744
4774
|
if (a) {
|
|
4745
4775
|
a = !1;
|
|
4746
4776
|
continue;
|
|
4747
4777
|
}
|
|
4748
|
-
const [d, p] = [n[g], n[g + 1]], [b, E] = [
|
|
4778
|
+
const [d, p] = [n[g], n[g + 1]], [b, E] = [be(d), be(p)], v = d.value.replace(/\n$/, "").split(`
|
|
4749
4779
|
`);
|
|
4750
4780
|
if (p === void 0) {
|
|
4751
|
-
for (const
|
|
4752
|
-
b ===
|
|
4753
|
-
const
|
|
4781
|
+
for (const y of v) {
|
|
4782
|
+
b === A.EQUAL && (t++, i++), b === A.DELETE && t++, b === A.ADD && i++;
|
|
4783
|
+
const D = j(l, y);
|
|
4754
4784
|
s.push({
|
|
4755
4785
|
type: b,
|
|
4756
|
-
code:
|
|
4757
|
-
addNum: b ===
|
|
4758
|
-
delNum: b ===
|
|
4786
|
+
code: D,
|
|
4787
|
+
addNum: b === A.DELETE ? void 0 : i,
|
|
4788
|
+
delNum: b === A.ADD ? void 0 : t
|
|
4759
4789
|
});
|
|
4760
4790
|
}
|
|
4761
4791
|
break;
|
|
4762
4792
|
}
|
|
4763
|
-
if (b ===
|
|
4764
|
-
for (const
|
|
4793
|
+
if (b === A.EQUAL)
|
|
4794
|
+
for (const y of v) {
|
|
4765
4795
|
t++, i++;
|
|
4766
|
-
const
|
|
4767
|
-
s.push({ type:
|
|
4796
|
+
const D = j(l, y);
|
|
4797
|
+
s.push({ type: A.EQUAL, code: D, delNum: t, addNum: i });
|
|
4768
4798
|
}
|
|
4769
4799
|
const w = p.value.replace(/\n$/, "").split(`
|
|
4770
4800
|
`);
|
|
4771
|
-
if (b ===
|
|
4772
|
-
if (E ===
|
|
4773
|
-
for (let
|
|
4774
|
-
const
|
|
4801
|
+
if (b === A.DELETE)
|
|
4802
|
+
if (E === A.ADD && v.length === w.length) {
|
|
4803
|
+
for (let y = 0; y < v.length; y++) {
|
|
4804
|
+
const D = v[y], S = w[y];
|
|
4775
4805
|
t++;
|
|
4776
|
-
const
|
|
4777
|
-
s.push({ type:
|
|
4806
|
+
const T = j(l, ke(S, D, u));
|
|
4807
|
+
s.push({ type: A.DELETE, code: T, delNum: t });
|
|
4778
4808
|
}
|
|
4779
|
-
for (let
|
|
4780
|
-
const
|
|
4809
|
+
for (let y = 0; y < w.length; y++) {
|
|
4810
|
+
const D = v[y], S = w[y];
|
|
4781
4811
|
i++;
|
|
4782
|
-
const
|
|
4783
|
-
s.push({ type:
|
|
4812
|
+
const T = j(l, ke(D, S, u));
|
|
4813
|
+
s.push({ type: A.ADD, code: T, addNum: i });
|
|
4784
4814
|
}
|
|
4785
4815
|
a = !0;
|
|
4786
4816
|
} else
|
|
4787
|
-
for (const
|
|
4817
|
+
for (const y of v) {
|
|
4788
4818
|
t++;
|
|
4789
|
-
const
|
|
4790
|
-
s.push({ type:
|
|
4819
|
+
const D = j(l, y);
|
|
4820
|
+
s.push({ type: A.DELETE, code: D, delNum: t });
|
|
4791
4821
|
}
|
|
4792
|
-
if (b ===
|
|
4793
|
-
for (const
|
|
4822
|
+
if (b === A.ADD)
|
|
4823
|
+
for (const y of v) {
|
|
4794
4824
|
i++;
|
|
4795
|
-
const
|
|
4796
|
-
s.push({ type:
|
|
4825
|
+
const D = j(l, y);
|
|
4826
|
+
s.push({ type: A.ADD, code: D, addNum: i });
|
|
4797
4827
|
}
|
|
4798
4828
|
}
|
|
4799
4829
|
for (let g = 0; g < s.length; g++) {
|
|
4800
4830
|
const d = s[g];
|
|
4801
|
-
if (d.type ===
|
|
4831
|
+
if (d.type === A.DELETE || d.type === A.ADD) {
|
|
4802
4832
|
const [p, b] = [Math.max(g - h, 0), Math.min(g + h + 1, s.length)];
|
|
4803
4833
|
for (let E = p; E < b; E++)
|
|
4804
4834
|
s[E].fold = !1;
|
|
@@ -4808,14 +4838,14 @@ function ar(e, r, o = "plaintext", u = "word", h = 10) {
|
|
|
4808
4838
|
if (e === r) {
|
|
4809
4839
|
for (let g = 0; g < s.length; g++)
|
|
4810
4840
|
s[g].fold = !1;
|
|
4811
|
-
return
|
|
4841
|
+
return o;
|
|
4812
4842
|
}
|
|
4813
4843
|
const c = [];
|
|
4814
4844
|
let f = [];
|
|
4815
4845
|
for (let g = 0; g < s.length; g++) {
|
|
4816
4846
|
const d = s[g];
|
|
4817
4847
|
if (d.fold === !1) {
|
|
4818
|
-
f.length && (f[0].hideIndex =
|
|
4848
|
+
f.length && (f[0].hideIndex = o.collector.length, o.collector.push({
|
|
4819
4849
|
lines: f,
|
|
4820
4850
|
fold: !0
|
|
4821
4851
|
}), f = []), c.push(d);
|
|
@@ -4823,102 +4853,102 @@ function ar(e, r, o = "plaintext", u = "word", h = 10) {
|
|
|
4823
4853
|
}
|
|
4824
4854
|
d.type === "equal" && (d.hide = !0, f.push(d)), c.push(d);
|
|
4825
4855
|
}
|
|
4826
|
-
return f.length && (f[0].hideIndex =
|
|
4856
|
+
return f.length && (f[0].hideIndex = o.collector.length, o.collector.push({
|
|
4827
4857
|
lines: f,
|
|
4828
4858
|
fold: !0
|
|
4829
|
-
}), f = []),
|
|
4859
|
+
}), f = []), o.changes = c, o;
|
|
4830
4860
|
}
|
|
4831
|
-
const
|
|
4861
|
+
const cr = { key: 0 }, ur = /* @__PURE__ */ B("td", {
|
|
4832
4862
|
class: "blob-code blob-code-hunk",
|
|
4833
4863
|
align: "left"
|
|
4834
|
-
}, " ⋯ ", -1),
|
|
4864
|
+
}, " ⋯ ", -1), fr = { key: 1 }, gr = ["data-code-marker", "innerHTML"], hr = /* @__PURE__ */ Ne({
|
|
4835
4865
|
__name: "UnifiedLine",
|
|
4836
4866
|
props: {
|
|
4837
4867
|
line: null
|
|
4838
4868
|
},
|
|
4839
4869
|
emits: ["expand"],
|
|
4840
4870
|
setup(e, { emit: r }) {
|
|
4841
|
-
function
|
|
4842
|
-
return u ===
|
|
4871
|
+
function l(u) {
|
|
4872
|
+
return u === A.DELETE ? "-" : u === A.ADD ? "+" : "";
|
|
4843
4873
|
}
|
|
4844
|
-
return (u, h) => e.line.hideIndex !== void 0 && e.line.hide ? (
|
|
4845
|
-
|
|
4874
|
+
return (u, h) => e.line.hideIndex !== void 0 && e.line.hide ? (G(), W("tr", cr, [
|
|
4875
|
+
B("td", {
|
|
4846
4876
|
class: "blob-num blob-num-hunk text-center",
|
|
4847
4877
|
colspan: "2",
|
|
4848
4878
|
onClick: h[0] || (h[0] = (n) => r("expand", e.line))
|
|
4849
4879
|
}, " > "),
|
|
4850
|
-
|
|
4851
|
-
])) : e.line.hide ?
|
|
4852
|
-
|
|
4853
|
-
class:
|
|
4854
|
-
"blob-num-deletion": e.line.type ===
|
|
4855
|
-
"blob-num-addition": e.line.type ===
|
|
4856
|
-
"blob-num-context": e.line.type ===
|
|
4880
|
+
ur
|
|
4881
|
+
])) : e.line.hide ? ve("", !0) : (G(), W("tr", fr, [
|
|
4882
|
+
B("td", {
|
|
4883
|
+
class: Ee(["blob-num", {
|
|
4884
|
+
"blob-num-deletion": e.line.type === F(A).DELETE,
|
|
4885
|
+
"blob-num-addition": e.line.type === F(A).ADD,
|
|
4886
|
+
"blob-num-context": e.line.type === F(A).EQUAL,
|
|
4857
4887
|
"blob-num-hunk": e.line.hide !== void 0
|
|
4858
4888
|
}])
|
|
4859
|
-
},
|
|
4860
|
-
|
|
4861
|
-
class:
|
|
4862
|
-
"blob-num-deletion": e.line.type ===
|
|
4863
|
-
"blob-num-addition": e.line.type ===
|
|
4864
|
-
"blob-num-context": e.line.type ===
|
|
4889
|
+
}, ee(e.line.delNum), 3),
|
|
4890
|
+
B("td", {
|
|
4891
|
+
class: Ee(["blob-num", {
|
|
4892
|
+
"blob-num-deletion": e.line.type === F(A).DELETE,
|
|
4893
|
+
"blob-num-addition": e.line.type === F(A).ADD,
|
|
4894
|
+
"blob-num-context": e.line.type === F(A).EQUAL,
|
|
4865
4895
|
"blob-num-hunk": e.line.hide !== void 0
|
|
4866
4896
|
}])
|
|
4867
|
-
},
|
|
4868
|
-
|
|
4869
|
-
class:
|
|
4870
|
-
"blob-code-deletion": e.line.type ===
|
|
4871
|
-
"blob-code-addition": e.line.type ===
|
|
4872
|
-
"blob-code-context": e.line.type ===
|
|
4897
|
+
}, ee(e.line.addNum), 3),
|
|
4898
|
+
B("td", {
|
|
4899
|
+
class: Ee(["blob-code", {
|
|
4900
|
+
"blob-code-deletion": e.line.type === F(A).DELETE,
|
|
4901
|
+
"blob-code-addition": e.line.type === F(A).ADD,
|
|
4902
|
+
"blob-code-context": e.line.type === F(A).EQUAL,
|
|
4873
4903
|
"blob-code-hunk": e.line.hide !== void 0
|
|
4874
4904
|
}])
|
|
4875
4905
|
}, [
|
|
4876
|
-
|
|
4906
|
+
B("span", {
|
|
4877
4907
|
class: "blob-code-inner blob-code-marker",
|
|
4878
|
-
"data-code-marker":
|
|
4908
|
+
"data-code-marker": l(e.line.type),
|
|
4879
4909
|
innerHTML: e.line.code
|
|
4880
|
-
}, null, 8,
|
|
4910
|
+
}, null, 8, gr)
|
|
4881
4911
|
], 2)
|
|
4882
4912
|
]));
|
|
4883
4913
|
}
|
|
4884
|
-
}),
|
|
4914
|
+
}), dr = { class: "diff-table" }, pr = /* @__PURE__ */ Ne({
|
|
4885
4915
|
__name: "UnifiedViewer",
|
|
4886
4916
|
props: {
|
|
4887
4917
|
diffChange: null
|
|
4888
4918
|
},
|
|
4889
4919
|
setup(e) {
|
|
4890
4920
|
const r = e;
|
|
4891
|
-
function
|
|
4921
|
+
function l({ hideIndex: u }) {
|
|
4892
4922
|
u !== void 0 && r.diffChange.collector[u].lines.forEach((h) => {
|
|
4893
4923
|
h.hide = !1, h.fold = !1;
|
|
4894
4924
|
});
|
|
4895
4925
|
}
|
|
4896
4926
|
return (u, h) => {
|
|
4897
4927
|
var n;
|
|
4898
|
-
return
|
|
4899
|
-
|
|
4900
|
-
(
|
|
4928
|
+
return G(), W("table", dr, [
|
|
4929
|
+
B("tbody", null, [
|
|
4930
|
+
(G(!0), W(de, null, Ge((n = e.diffChange) == null ? void 0 : n.changes, (t, i) => (G(), Ce(hr, {
|
|
4901
4931
|
key: i,
|
|
4902
4932
|
line: t,
|
|
4903
|
-
onExpand:
|
|
4933
|
+
onExpand: l
|
|
4904
4934
|
}, null, 8, ["line"]))), 128))
|
|
4905
4935
|
])
|
|
4906
4936
|
]);
|
|
4907
4937
|
};
|
|
4908
4938
|
}
|
|
4909
|
-
}),
|
|
4939
|
+
}), br = { key: 0 }, _r = /* @__PURE__ */ B("td", {
|
|
4910
4940
|
class: "blob-code blob-code-inner blob-code-hunk",
|
|
4911
4941
|
colspan: "3",
|
|
4912
4942
|
align: "left"
|
|
4913
|
-
}, " ⋯ ", -1),
|
|
4943
|
+
}, " ⋯ ", -1), Er = { key: 1 }, vr = /* @__PURE__ */ B("td", { class: "blob-num blob-num-empty empty-cell" }, null, -1), mr = /* @__PURE__ */ B("td", { class: "blob-code blob-code-empty empty-cell" }, null, -1), yr = ["onMousedown"], wr = ["data-code-marker", "innerHTML"], Nr = /* @__PURE__ */ Ne({
|
|
4914
4944
|
__name: "SplitLine",
|
|
4915
4945
|
props: {
|
|
4916
4946
|
splitLine: null
|
|
4917
4947
|
},
|
|
4918
4948
|
emits: ["expand"],
|
|
4919
4949
|
setup(e, { emit: r }) {
|
|
4920
|
-
function
|
|
4921
|
-
return h ===
|
|
4950
|
+
function l(h) {
|
|
4951
|
+
return h === A.DELETE ? "-" : h === A.ADD ? "+" : "";
|
|
4922
4952
|
}
|
|
4923
4953
|
function u(h) {
|
|
4924
4954
|
window.getSelection().removeAllRanges();
|
|
@@ -4928,90 +4958,102 @@ const or = { key: 0 }, lr = /* @__PURE__ */ H("td", {
|
|
|
4928
4958
|
for (const i of n)
|
|
4929
4959
|
i.classList.toggle("no-select", h === "right");
|
|
4930
4960
|
}
|
|
4931
|
-
return (h, n) => e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? (
|
|
4932
|
-
|
|
4961
|
+
return (h, n) => e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? (G(), W("tr", br, [
|
|
4962
|
+
B("td", {
|
|
4933
4963
|
class: "blob-num blob-num-hunk",
|
|
4934
4964
|
colspan: "1",
|
|
4935
4965
|
onClick: n[0] || (n[0] = (t) => r("expand", e.splitLine))
|
|
4936
4966
|
}, " > "),
|
|
4937
|
-
|
|
4938
|
-
])) : e.splitLine.hide ?
|
|
4939
|
-
(
|
|
4940
|
-
t.type ===
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
], 64)) : (
|
|
4944
|
-
|
|
4945
|
-
class:
|
|
4946
|
-
"blob-num-deletion": t.type ===
|
|
4947
|
-
"blob-num-addition": t.type ===
|
|
4948
|
-
"blob-num-context": t.type ===
|
|
4967
|
+
_r
|
|
4968
|
+
])) : e.splitLine.hide ? ve("", !0) : (G(), W("tr", Er, [
|
|
4969
|
+
(G(!0), W(de, null, Ge([e.splitLine.left, e.splitLine.right], (t, i) => (G(), W(de, null, [
|
|
4970
|
+
t.type === F(A).EMPTY ? (G(), W(de, { key: 0 }, [
|
|
4971
|
+
vr,
|
|
4972
|
+
mr
|
|
4973
|
+
], 64)) : (G(), W(de, { key: 1 }, [
|
|
4974
|
+
B("td", {
|
|
4975
|
+
class: Ee(["blob-num", {
|
|
4976
|
+
"blob-num-deletion": t.type === F(A).DELETE,
|
|
4977
|
+
"blob-num-addition": t.type === F(A).ADD,
|
|
4978
|
+
"blob-num-context": t.type === F(A).EQUAL,
|
|
4949
4979
|
"blob-num-hunk": e.splitLine.hide !== void 0
|
|
4950
4980
|
}])
|
|
4951
|
-
},
|
|
4952
|
-
|
|
4953
|
-
class:
|
|
4954
|
-
"blob-code-deletion": t.type ===
|
|
4955
|
-
"blob-code-addition": t.type ===
|
|
4956
|
-
"blob-code-context": t.type ===
|
|
4981
|
+
}, ee(t.num), 3),
|
|
4982
|
+
B("td", {
|
|
4983
|
+
class: Ee(["blob-code", {
|
|
4984
|
+
"blob-code-deletion": t.type === F(A).DELETE,
|
|
4985
|
+
"blob-code-addition": t.type === F(A).ADD,
|
|
4986
|
+
"blob-code-context": t.type === F(A).EQUAL,
|
|
4957
4987
|
"blob-code-hunk": e.splitLine.hide !== void 0,
|
|
4958
4988
|
"split-side-left": i === 0,
|
|
4959
4989
|
"split-side-right": i === 1
|
|
4960
4990
|
}]),
|
|
4961
4991
|
onMousedown: (a) => u(i === 0 ? "left" : "right")
|
|
4962
4992
|
}, [
|
|
4963
|
-
|
|
4993
|
+
B("span", {
|
|
4964
4994
|
class: "blob-code-inner blob-code-marker",
|
|
4965
|
-
"data-code-marker":
|
|
4995
|
+
"data-code-marker": l(t.type),
|
|
4966
4996
|
innerHTML: t.code
|
|
4967
|
-
}, null, 8,
|
|
4968
|
-
], 42,
|
|
4997
|
+
}, null, 8, wr)
|
|
4998
|
+
], 42, yr)
|
|
4969
4999
|
], 64))
|
|
4970
5000
|
], 64))), 256))
|
|
4971
5001
|
]));
|
|
4972
5002
|
}
|
|
4973
|
-
}),
|
|
4974
|
-
/* @__PURE__ */
|
|
4975
|
-
/* @__PURE__ */
|
|
4976
|
-
/* @__PURE__ */
|
|
4977
|
-
/* @__PURE__ */
|
|
4978
|
-
], -1),
|
|
5003
|
+
}), Ar = { class: "file-diff-split diff-table" }, Mr = /* @__PURE__ */ B("colgroup", null, [
|
|
5004
|
+
/* @__PURE__ */ B("col", { width: "44" }),
|
|
5005
|
+
/* @__PURE__ */ B("col"),
|
|
5006
|
+
/* @__PURE__ */ B("col", { width: "44" }),
|
|
5007
|
+
/* @__PURE__ */ B("col")
|
|
5008
|
+
], -1), Tr = /* @__PURE__ */ Ne({
|
|
4979
5009
|
__name: "SplitViewer",
|
|
4980
5010
|
props: {
|
|
4981
5011
|
diffChange: null
|
|
4982
5012
|
},
|
|
4983
5013
|
setup(e) {
|
|
4984
5014
|
const r = e;
|
|
4985
|
-
function
|
|
5015
|
+
function l({ hideIndex: u }) {
|
|
4986
5016
|
u !== void 0 && r.diffChange.collector[u].lines.forEach((h) => {
|
|
4987
5017
|
h.hide = !1, h.fold = !1;
|
|
4988
5018
|
});
|
|
4989
5019
|
}
|
|
4990
5020
|
return (u, h) => {
|
|
4991
5021
|
var n;
|
|
4992
|
-
return
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
(
|
|
5022
|
+
return G(), W("table", Ar, [
|
|
5023
|
+
Mr,
|
|
5024
|
+
B("tbody", null, [
|
|
5025
|
+
(G(!0), W(de, null, Ge((n = e.diffChange) == null ? void 0 : n.changes, (t, i) => (G(), Ce(Nr, {
|
|
4996
5026
|
key: i,
|
|
4997
5027
|
"split-line": t,
|
|
4998
|
-
onExpand:
|
|
5028
|
+
onExpand: l
|
|
4999
5029
|
}, null, 8, ["split-line"]))), 128))
|
|
5000
5030
|
])
|
|
5001
5031
|
]);
|
|
5002
5032
|
};
|
|
5003
5033
|
}
|
|
5004
5034
|
});
|
|
5005
|
-
const
|
|
5035
|
+
const Sr = ["theme"], Dr = {
|
|
5006
5036
|
key: 0,
|
|
5007
5037
|
class: "file-header"
|
|
5008
|
-
},
|
|
5038
|
+
}, Rr = {
|
|
5039
|
+
key: 0,
|
|
5040
|
+
class: "file-info"
|
|
5041
|
+
}, Lr = { class: "info-left" }, Or = { class: "info-left" }, Cr = {
|
|
5042
|
+
key: 0,
|
|
5043
|
+
class: "diff-stat"
|
|
5044
|
+
}, Ir = { class: "diff-stat-added" }, kr = {
|
|
5045
|
+
class: "diff-stat-deleted",
|
|
5046
|
+
style: { "margin-left": "8px" }
|
|
5047
|
+
}, Br = {
|
|
5048
|
+
key: 1,
|
|
5049
|
+
class: "file-info"
|
|
5050
|
+
}, $r = { class: "info-left" }, Pr = { class: "info-right" }, Ur = { style: { "margin-left": "20px" } }, xr = {
|
|
5009
5051
|
key: 0,
|
|
5010
5052
|
class: "diff-stat"
|
|
5011
|
-
},
|
|
5053
|
+
}, Hr = { class: "diff-stat-added" }, Fr = {
|
|
5012
5054
|
class: "diff-stat-deleted",
|
|
5013
5055
|
style: { "margin-left": "8px" }
|
|
5014
|
-
},
|
|
5056
|
+
}, zr = /* @__PURE__ */ Ne({
|
|
5015
5057
|
__name: "CodeDiff",
|
|
5016
5058
|
props: {
|
|
5017
5059
|
newString: null,
|
|
@@ -5024,23 +5066,25 @@ const Ar = {
|
|
|
5024
5066
|
noDiffLineFeed: { type: Boolean, default: !1 },
|
|
5025
5067
|
maxHeight: { default: void 0 },
|
|
5026
5068
|
filename: { default: void 0 },
|
|
5069
|
+
newFilename: { default: void 0 },
|
|
5027
5070
|
hideHeader: { type: Boolean, default: !1 },
|
|
5028
|
-
hideStat: { type: Boolean, default: !1 }
|
|
5071
|
+
hideStat: { type: Boolean, default: !1 },
|
|
5072
|
+
theme: { default: "light" }
|
|
5029
5073
|
},
|
|
5030
5074
|
emits: ["diff"],
|
|
5031
5075
|
setup(e, { emit: r }) {
|
|
5032
|
-
const
|
|
5033
|
-
let s =
|
|
5034
|
-
return s =
|
|
5076
|
+
const l = e, u = _e(() => l.outputFormat === "line-by-line"), h = _e(() => {
|
|
5077
|
+
let s = l.oldString || "";
|
|
5078
|
+
return s = l.trim ? s.trim() : s, s = l.noDiffLineFeed ? s.replace(/(\r\n)/g, `
|
|
5035
5079
|
`) : s, s;
|
|
5036
|
-
}), n =
|
|
5037
|
-
let s =
|
|
5038
|
-
return s =
|
|
5080
|
+
}), n = _e(() => {
|
|
5081
|
+
let s = l.newString || "";
|
|
5082
|
+
return s = l.trim ? s.trim() : s, s = l.noDiffLineFeed ? s.replace(/(\r\n)/g, `
|
|
5039
5083
|
`) : s, s;
|
|
5040
|
-
}), t =
|
|
5041
|
-
() => u.value ?
|
|
5042
|
-
), i =
|
|
5043
|
-
return
|
|
5084
|
+
}), t = _e(
|
|
5085
|
+
() => u.value ? lr(h.value, n.value, l.language, l.diffStyle, l.context) : or(h.value, n.value, l.language, l.diffStyle, l.context)
|
|
5086
|
+
), i = Hn(t.value), a = _e(() => i.value.stat.additionsNum === 0 && i.value.stat.deletionsNum === 0);
|
|
5087
|
+
return Fn(() => l, () => {
|
|
5044
5088
|
i.value = t.value, r("diff", {
|
|
5045
5089
|
stat: {
|
|
5046
5090
|
isChanged: !a.value,
|
|
@@ -5048,37 +5092,54 @@ const Ar = {
|
|
|
5048
5092
|
delNum: i.value.stat.deletionsNum
|
|
5049
5093
|
}
|
|
5050
5094
|
});
|
|
5051
|
-
}, { deep: !0, immediate: !0 }), (s,
|
|
5095
|
+
}, { deep: !0, immediate: !0 }), (s, o) => (G(), W("div", {
|
|
5052
5096
|
class: "code-diff-view",
|
|
5053
|
-
|
|
5097
|
+
theme: e.theme,
|
|
5098
|
+
style: zn({ maxHeight: e.maxHeight })
|
|
5054
5099
|
}, [
|
|
5055
|
-
e.hideHeader ?
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5100
|
+
e.hideHeader ? ve("", !0) : (G(), W("div", Dr, [
|
|
5101
|
+
F(u) ? (G(), W("div", Rr, [
|
|
5102
|
+
B("span", null, [
|
|
5103
|
+
B("div", Lr, ee(e.filename), 1),
|
|
5104
|
+
B("div", Or, ee(e.newFilename), 1)
|
|
5105
|
+
]),
|
|
5106
|
+
e.hideStat ? ve("", !0) : (G(), W("span", Cr, [
|
|
5107
|
+
en(s.$slots, "stat", {}, () => [
|
|
5108
|
+
B("span", Ir, "+" + ee(F(i).stat.additionsNum) + " additions", 1),
|
|
5109
|
+
B("span", kr, "-" + ee(F(i).stat.deletionsNum) + " deletions", 1)
|
|
5110
|
+
])
|
|
5061
5111
|
]))
|
|
5062
|
-
])
|
|
5112
|
+
])) : (G(), W("div", Br, [
|
|
5113
|
+
B("span", $r, ee(e.filename), 1),
|
|
5114
|
+
B("span", Pr, [
|
|
5115
|
+
B("span", Ur, ee(e.newFilename), 1),
|
|
5116
|
+
e.hideStat ? ve("", !0) : (G(), W("span", xr, [
|
|
5117
|
+
en(s.$slots, "stat", {}, () => [
|
|
5118
|
+
B("span", Hr, "+" + ee(F(i).stat.additionsNum) + " additions", 1),
|
|
5119
|
+
B("span", Fr, "-" + ee(F(i).stat.deletionsNum) + " deletions", 1)
|
|
5120
|
+
])
|
|
5121
|
+
]))
|
|
5122
|
+
])
|
|
5123
|
+
]))
|
|
5063
5124
|
])),
|
|
5064
|
-
|
|
5125
|
+
F(u) ? (G(), Ce(pr, {
|
|
5065
5126
|
key: 1,
|
|
5066
|
-
"diff-change":
|
|
5067
|
-
}, null, 8, ["diff-change"])) : (
|
|
5127
|
+
"diff-change": F(i)
|
|
5128
|
+
}, null, 8, ["diff-change"])) : (G(), Ce(Tr, {
|
|
5068
5129
|
key: 2,
|
|
5069
|
-
"diff-change":
|
|
5130
|
+
"diff-change": F(i)
|
|
5070
5131
|
}, null, 8, ["diff-change"]))
|
|
5071
|
-
],
|
|
5132
|
+
], 12, Sr));
|
|
5072
5133
|
}
|
|
5073
5134
|
});
|
|
5074
|
-
function
|
|
5075
|
-
e.component("CodeDiff",
|
|
5135
|
+
function Gr(e) {
|
|
5136
|
+
e.component("CodeDiff", zr);
|
|
5076
5137
|
}
|
|
5077
|
-
const
|
|
5078
|
-
install:
|
|
5138
|
+
const Wr = {
|
|
5139
|
+
install: Gr,
|
|
5079
5140
|
hljs: J
|
|
5080
5141
|
};
|
|
5081
5142
|
export {
|
|
5082
|
-
|
|
5083
|
-
|
|
5143
|
+
zr as CodeDiff,
|
|
5144
|
+
Wr as default
|
|
5084
5145
|
};
|