bkui-vue 2.0.1-beta.113 → 2.0.1-beta.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +54 -54
- package/dist/index.esm.js +13950 -13941
- package/dist/index.umd.js +54 -54
- package/dist/style.css +1 -1
- package/lib/affix/index.d.ts +57 -111
- package/lib/affix/index.js +47 -39
- package/lib/alert/index.d.ts +73 -126
- package/lib/alert/index.js +50 -42
- package/lib/animate-number/index.d.ts +33 -96
- package/lib/animate-number/index.js +21 -16
- package/lib/backtop/index.d.ts +69 -117
- package/lib/backtop/index.js +42 -31
- package/lib/badge/index.d.ts +119 -152
- package/lib/badge/index.js +43 -37
- package/lib/breadcrumb/index.d.ts +67 -119
- package/lib/breadcrumb/index.js +48 -40
- package/lib/button/button.d.ts +2 -2
- package/lib/button/index.d.ts +119 -155
- package/lib/button/index.js +55 -46
- package/lib/card/index.d.ts +128 -157
- package/lib/card/index.js +67 -55
- package/lib/cascader/cascader.d.ts +3 -3
- package/lib/cascader/index.d.ts +393 -354
- package/lib/cascader/index.js +149 -119
- package/lib/checkbox/checkbox.d.ts +1 -1
- package/lib/checkbox/index.d.ts +143 -175
- package/lib/checkbox/index.js +89 -79
- package/lib/code-diff/index.d.ts +65 -82
- package/lib/code-diff/index.js +464 -517
- package/lib/collapse/index.d.ts +156 -175
- package/lib/collapse/index.js +67 -60
- package/lib/collapse-transition/index.d.ts +19 -94
- package/lib/collapse-transition/index.js +23 -16
- package/lib/color-picker/color-picker.d.ts +1 -1
- package/lib/color-picker/index.d.ts +144 -165
- package/lib/color-picker/index.js +98 -82
- package/lib/config-provider/index.d.ts +160 -227
- package/lib/config-provider/index.js +51 -43
- package/lib/container/container.d.ts +1 -1
- package/lib/container/index.d.ts +74 -85
- package/lib/container/index.js +55 -47
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -1
- package/lib/date-picker/base/time-spinner.d.ts +3 -3
- package/lib/date-picker/date-picker.d.ts +4 -4
- package/lib/date-picker/index.d.ts +380 -351
- package/lib/date-picker/index.js +171 -150
- package/lib/date-picker/panel/date-range.d.ts +1 -1
- package/lib/date-picker/panel/date.d.ts +1 -1
- package/lib/date-picker/panel/time-range.d.ts +2 -2
- package/lib/date-picker/panel/time.d.ts +2 -2
- package/lib/date-picker/time-picker.d.ts +4 -4
- package/lib/dialog/index.d.ts +299 -269
- package/lib/dialog/index.js +323 -310
- package/lib/directives/index.js +344 -336
- package/lib/divider/index.d.ts +57 -111
- package/lib/divider/index.js +23 -16
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/index.d.ts +94 -136
- package/lib/dropdown/index.js +66 -52
- package/lib/exception/index.d.ts +41 -102
- package/lib/exception/index.js +76 -70
- package/lib/fixed-navbar/index.d.ts +59 -113
- package/lib/fixed-navbar/index.js +22 -15
- package/lib/form/form.d.ts +1 -1
- package/lib/form/index.d.ts +80 -132
- package/lib/form/index.js +104 -83
- package/lib/icon/angle-double-down-line.js +31 -29
- package/lib/icon/angle-double-left-line.js +31 -29
- package/lib/icon/angle-double-left.js +31 -29
- package/lib/icon/angle-double-right-line.js +31 -29
- package/lib/icon/angle-double-right.js +31 -29
- package/lib/icon/angle-double-up-line.js +31 -29
- package/lib/icon/angle-down-fill.js +31 -29
- package/lib/icon/angle-down-line.js +31 -29
- package/lib/icon/angle-down.js +31 -29
- package/lib/icon/angle-left.js +31 -29
- package/lib/icon/angle-right.js +31 -29
- package/lib/icon/angle-up-fill.js +31 -29
- package/lib/icon/angle-up.js +31 -29
- package/lib/icon/archive-fill.js +31 -29
- package/lib/icon/arrows-left.js +31 -29
- package/lib/icon/arrows-right.js +31 -29
- package/lib/icon/assistant.js +31 -29
- package/lib/icon/audio-fill.js +31 -29
- package/lib/icon/bk.js +31 -29
- package/lib/icon/circle.js +31 -29
- package/lib/icon/close-line.js +31 -29
- package/lib/icon/close.js +31 -29
- package/lib/icon/code.js +31 -29
- package/lib/icon/cog-shape.js +31 -29
- package/lib/icon/collapse-left.js +31 -29
- package/lib/icon/copy-shape.js +31 -29
- package/lib/icon/copy.js +31 -29
- package/lib/icon/data-shape.js +31 -29
- package/lib/icon/del.js +31 -29
- package/lib/icon/doc-fill.js +31 -29
- package/lib/icon/done.js +31 -29
- package/lib/icon/down-shape.js +31 -29
- package/lib/icon/down-small.js +31 -29
- package/lib/icon/edit-line.js +31 -29
- package/lib/icon/ellipsis.js +31 -29
- package/lib/icon/enlarge-line.js +31 -29
- package/lib/icon/error.js +31 -29
- package/lib/icon/excel-fill.js +31 -29
- package/lib/icon/exclamation-circle-shape.js +31 -29
- package/lib/icon/eye.js +31 -29
- package/lib/icon/filliscreen-line.js +31 -29
- package/lib/icon/fix-line.js +31 -29
- package/lib/icon/fix-shape.js +31 -29
- package/lib/icon/folder-open.js +31 -29
- package/lib/icon/folder-shape-open.js +31 -29
- package/lib/icon/folder-shape.js +31 -29
- package/lib/icon/folder.js +31 -29
- package/lib/icon/funnel.js +31 -29
- package/lib/icon/grag-fill.js +31 -29
- package/lib/icon/help-document-fill.js +31 -29
- package/lib/icon/help-fill.js +31 -29
- package/lib/icon/help.js +31 -29
- package/lib/icon/image-fill.js +31 -29
- package/lib/icon/img-error.js +31 -29
- package/lib/icon/img-placehoulder.js +31 -29
- package/lib/icon/info-line.js +31 -29
- package/lib/icon/info.js +31 -29
- package/lib/icon/left-shape.js +31 -29
- package/lib/icon/left-turn-line.js +31 -29
- package/lib/icon/loading.js +31 -29
- package/lib/icon/narrow-line.js +31 -29
- package/lib/icon/original.js +31 -29
- package/lib/icon/pdf-fill.js +31 -29
- package/lib/icon/play-shape.js +31 -29
- package/lib/icon/plus.js +31 -29
- package/lib/icon/ppt-fill.js +31 -29
- package/lib/icon/qq.js +31 -29
- package/lib/icon/right-shape.js +31 -29
- package/lib/icon/right-turn-line.js +31 -29
- package/lib/icon/search.js +31 -29
- package/lib/icon/share.js +31 -29
- package/lib/icon/spinner.js +31 -29
- package/lib/icon/success.js +31 -29
- package/lib/icon/switcher-loading.js +31 -29
- package/lib/icon/text-all.js +31 -29
- package/lib/icon/text-file.js +31 -29
- package/lib/icon/text-fill.js +31 -29
- package/lib/icon/transfer.js +31 -29
- package/lib/icon/tree-application-shape.js +31 -29
- package/lib/icon/unfull-screen.js +31 -29
- package/lib/icon/unvisible.js +31 -29
- package/lib/icon/up-shape.js +31 -29
- package/lib/icon/upload.js +31 -29
- package/lib/icon/video-fill.js +31 -29
- package/lib/icon/warn.js +31 -29
- package/lib/icon/weixin-pro.js +31 -29
- package/lib/icon/weixin.js +31 -29
- package/lib/image/index.d.ts +113 -149
- package/lib/image/index.js +76 -61
- package/lib/index.js +1 -1
- package/lib/info-box/index.js +328 -315
- package/lib/input/index.d.ts +326 -293
- package/lib/input/index.js +91 -83
- package/lib/link/index.d.ts +73 -122
- package/lib/link/index.js +27 -19
- package/lib/loading/index.d.ts +130 -156
- package/lib/loading/index.js +56 -51
- package/lib/loading/loading.d.ts +1 -1
- package/lib/locale/index.js +3 -3
- package/lib/menu/index.d.ts +55 -116
- package/lib/menu/index.js +67 -58
- package/lib/message/index.js +72 -67
- package/lib/message/messageConstructor.d.ts +5 -5
- package/lib/modal/index.d.ts +171 -185
- package/lib/modal/index.js +58 -48
- package/lib/navigation/index.d.ts +152 -188
- package/lib/navigation/index.js +35 -25
- package/lib/notify/index.js +57 -48
- package/lib/overflow-title/index.d.ts +343 -256
- package/lib/overflow-title/index.js +51 -38
- package/lib/pagination/index.d.ts +184 -198
- package/lib/pagination/index.js +112 -103
- package/lib/plugin-popover/index.js +7 -5
- package/lib/plugins/index.js +7 -5
- package/lib/pop-confirm/index.d.ts +115 -153
- package/lib/pop-confirm/index.js +53 -36
- package/lib/pop-confirm/pop-confirm.d.ts +1 -1
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.d.ts +421 -359
- package/lib/popover/index.js +291 -179
- package/lib/popover2/index.d.ts +8 -83
- package/lib/popover2/index.js +15 -11
- package/lib/process/index.d.ts +93 -137
- package/lib/process/index.js +299 -295
- package/lib/progress/index.d.ts +178 -187
- package/lib/progress/index.js +47 -40
- package/lib/progress/progress.d.ts +2 -2
- package/lib/radio/index.d.ts +91 -140
- package/lib/radio/index.js +85 -79
- package/lib/rate/index.d.ts +55 -112
- package/lib/rate/index.js +44 -39
- package/lib/resize-layout/index.d.ts +168 -192
- package/lib/resize-layout/index.js +50 -43
- package/lib/resize-layout/resize-layout.d.ts +2 -2
- package/lib/scrollbar/index.js +63 -63
- package/lib/search-select/index.d.ts +678 -895
- package/lib/search-select/index.js +397 -379
- package/lib/search-select/input.d.ts +2 -2
- package/lib/search-select/search-select.d.ts +133 -188
- package/lib/search-select/selected.d.ts +133 -188
- package/lib/select/index.d.ts +1375 -1217
- package/lib/select/index.js +456 -419
- package/lib/select/select.d.ts +132 -169
- package/lib/select/selectTagInput.d.ts +2 -2
- package/lib/shared/index.js +109 -103
- package/lib/sideslider/index.d.ts +197 -201
- package/lib/sideslider/index.js +311 -302
- package/lib/slider/index.d.ts +214 -210
- package/lib/slider/index.js +305 -294
- package/lib/steps/index.d.ts +110 -149
- package/lib/steps/index.js +303 -298
- package/lib/swiper/index.d.ts +81 -127
- package/lib/swiper/index.js +42 -36
- package/lib/switcher/index.d.ts +152 -174
- package/lib/switcher/index.js +50 -44
- package/lib/tab/index.d.ts +151 -183
- package/lib/tab/index.js +72 -59
- package/lib/table/components/table-column.d.ts +1 -1
- package/lib/table/hooks/use-columns.d.ts +1 -1
- package/lib/table/hooks/use-layout.d.ts +2 -2
- package/lib/table/hooks/use-rows.d.ts +1 -1
- package/lib/table/index.d.ts +457 -362
- package/lib/table/index.js +589 -547
- package/lib/table/table.d.ts +1 -1
- package/lib/table-column/index.d.ts +104 -150
- package/lib/table-column/index.js +13 -9
- package/lib/tag/index.d.ts +95 -142
- package/lib/tag/index.js +56 -46
- package/lib/tag-input/index.d.ts +744 -529
- package/lib/tag-input/index.js +148 -128
- package/lib/tag-input/tag-input.d.ts +5 -5
- package/lib/time-picker/index.d.ts +439 -386
- package/lib/time-picker/index.js +13 -9
- package/lib/timeline/index.d.ts +64 -131
- package/lib/timeline/index.js +27 -21
- package/lib/transfer/index.d.ts +191 -206
- package/lib/transfer/index.js +56 -40
- package/lib/tree/index.d.ts +350 -308
- package/lib/tree/index.js +171 -150
- package/lib/tree/tree.d.ts +1 -1
- package/lib/tree/use-tree-init.d.ts +1 -1
- package/lib/upload/index.d.ts +311 -273
- package/lib/upload/index.js +474 -465
- package/lib/upload/upload.d.ts +2 -2
- package/lib/virtual-render/index.d.ts +333 -241
- package/lib/virtual-render/index.js +84 -72
- package/lib/virtual-render/virtual-render.d.ts +1 -1
- package/package.json +1 -1
package/lib/code-diff/index.js
CHANGED
@@ -6,26 +6,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
|
7
7
|
/******/ var __webpack_modules__ = ({
|
8
8
|
|
9
|
-
/***/
|
10
|
-
/***/ ((module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
11
|
-
|
12
|
-
/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9601);
|
13
|
-
/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
14
|
-
/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2609);
|
15
|
-
/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
16
|
-
// Imports
|
17
|
-
|
18
|
-
|
19
|
-
var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
20
|
-
// Module
|
21
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.d2h-wrapper{text-align:left}.d2h-file-header{background-color:#f7f7f7;border-bottom:1px solid #d8d8d8;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:Source Sans Pro,Helvetica Neue,Helvetica,Arial,sans-serif;height:35px;padding:5px 10px}.d2h-file-header.d2h-sticky-header{position:sticky;top:0;z-index:1}.d2h-file-stats{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;margin-left:auto}.d2h-lines-added{border:1px solid #b4e2b4;border-radius:5px 0 0 5px;color:#399839;padding:2px;text-align:right;vertical-align:middle}.d2h-lines-deleted{border:1px solid #e9aeae;border-radius:0 5px 5px 0;color:#c33;margin-left:1px;padding:2px;text-align:left;vertical-align:middle}.d2h-file-name-wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;width:100%}.d2h-file-name{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.d2h-file-wrapper{border:1px solid #ddd;border-radius:3px;margin-bottom:1em}.d2h-file-collapse{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid #ddd;border-radius:3px;cursor:pointer;display:none;font-size:12px;justify-content:flex-end;padding:4px 8px}.d2h-file-collapse.d2h-selected{background-color:#c8e1ff}.d2h-file-collapse-input{margin:0 4px 0 0}.d2h-diff-table{border-collapse:collapse;font-family:Menlo,Consolas,monospace;font-size:13px;width:100%}.d2h-files-diff{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.d2h-file-diff{overflow-y:hidden}.d2h-file-diff.d2h-d-none,.d2h-files-diff.d2h-d-none{display:none}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%}.d2h-code-line{padding:0 8em;width:calc(100% - 16em)}.d2h-code-line,.d2h-code-side-line{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.d2h-code-side-line{padding:0 4.5em;width:calc(100% - 9em)}.d2h-code-line-ctn{word-wrap:normal;background:none;display:inline-block;padding:0;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle;white-space:pre;width:100%}.d2h-code-line del,.d2h-code-side-line del{background-color:#ffb6ba;border-radius:.2em;display:inline-block;margin-top:-1px;text-decoration:none}.d2h-code-line ins,.d2h-code-side-line ins{background-color:#97f295;border-radius:.2em;display:inline-block;margin-top:-1px;text-align:left;text-decoration:none}.d2h-code-line-prefix{word-wrap:normal;background:none;display:inline;padding:0;white-space:pre}.line-num1{float:left}.line-num1,.line-num2{-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;padding:0 .5em;text-overflow:ellipsis;width:3.5em}.line-num2{float:right}.d2h-code-linenumber{background-color:#fff;border:solid #eee;border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);cursor:pointer;display:inline-block;position:absolute;text-align:right;width:7.5em}.d2h-code-linenumber:after{content:"\\200b"}.d2h-code-side-linenumber{background-color:#fff;border:solid #eee;border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);cursor:pointer;display:inline-block;overflow:hidden;padding:0 .5em;position:absolute;text-align:right;text-overflow:ellipsis;width:4em}.d2h-code-side-linenumber:after{content:"\\200b"}.d2h-code-side-emptyplaceholder,.d2h-emptyplaceholder{background-color:#f1f1f1;border-color:#e1e1e1}.d2h-code-line-prefix,.d2h-code-linenumber,.d2h-code-side-linenumber,.d2h-emptyplaceholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.d2h-code-linenumber,.d2h-code-side-linenumber{direction:rtl}.d2h-del{background-color:#fee8e9;border-color:#e9aeae}.d2h-ins{background-color:#dfd;border-color:#b4e2b4}.d2h-info{background-color:#f8fafd;border-color:#d5e4f2;color:rgba(0,0,0,.3)}.d2h-file-diff .d2h-del.d2h-change{background-color:#fdf2d0}.d2h-file-diff .d2h-ins.d2h-change{background-color:#ded}.d2h-file-list-wrapper{margin-bottom:10px}.d2h-file-list-wrapper a{color:#3572b0;text-decoration:none}.d2h-file-list-wrapper a:visited{color:#3572b0}.d2h-file-list-header{text-align:left}.d2h-file-list-title{font-weight:700}.d2h-file-list-line{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.d2h-file-list{display:block;list-style:none;margin:0;padding:0}.d2h-file-list>li{border-bottom:1px solid #ddd;margin:0;padding:5px 10px}.d2h-file-list>li:last-child{border-bottom:none}.d2h-file-switch{cursor:pointer;display:none;font-size:10px}.d2h-icon{fill:currentColor;margin-right:10px;vertical-align:middle}.d2h-deleted{color:#c33}.d2h-added{color:#399839}.d2h-changed{color:#d0b44c}.d2h-moved{color:#3572b0}.d2h-tag{background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:10px;margin-left:5px;padding:0 2px}.d2h-deleted-tag{border:1px solid #c33}.d2h-added-tag{border:1px solid #399839}.d2h-changed-tag{border:1px solid #d0b44c}.d2h-moved-tag{border:1px solid #3572b0}`, ""]);
|
22
|
-
// Exports
|
23
|
-
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (___CSS_LOADER_EXPORT___)));
|
24
|
-
|
25
|
-
|
26
|
-
/***/ }),
|
27
|
-
|
28
|
-
/***/ 2609:
|
9
|
+
/***/ 935:
|
29
10
|
/***/ ((module) => {
|
30
11
|
|
31
12
|
|
@@ -116,18 +97,7 @@ module.exports = function (cssWithMappingToString) {
|
|
116
97
|
|
117
98
|
/***/ }),
|
118
99
|
|
119
|
-
/***/
|
120
|
-
/***/ ((module) => {
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
module.exports = function (i) {
|
125
|
-
return i[1];
|
126
|
-
};
|
127
|
-
|
128
|
-
/***/ }),
|
129
|
-
|
130
|
-
/***/ 2148:
|
100
|
+
/***/ 1815:
|
131
101
|
/***/ ((__unused_webpack_module, exports) => {
|
132
102
|
|
133
103
|
/*
|
@@ -557,7 +527,7 @@ module.exports = function (i) {
|
|
557
527
|
|
558
528
|
/***/ }),
|
559
529
|
|
560
|
-
/***/
|
530
|
+
/***/ 2133:
|
561
531
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
562
532
|
|
563
533
|
/*
|
@@ -577,15 +547,15 @@ module.exports = function (i) {
|
|
577
547
|
|
578
548
|
// This file is for use with Node.js. See dist/ for browser files.
|
579
549
|
|
580
|
-
var Hogan = __webpack_require__(
|
581
|
-
Hogan.Template = (__webpack_require__(
|
550
|
+
var Hogan = __webpack_require__(1815);
|
551
|
+
Hogan.Template = (__webpack_require__(2252).Template);
|
582
552
|
Hogan.template = Hogan.Template;
|
583
553
|
module.exports = Hogan;
|
584
554
|
|
585
555
|
|
586
556
|
/***/ }),
|
587
557
|
|
588
|
-
/***/
|
558
|
+
/***/ 2252:
|
589
559
|
/***/ ((__unused_webpack_module, exports) => {
|
590
560
|
|
591
561
|
/*
|
@@ -931,6 +901,36 @@ var Hogan = {};
|
|
931
901
|
})( true ? exports : 0);
|
932
902
|
|
933
903
|
|
904
|
+
/***/ }),
|
905
|
+
|
906
|
+
/***/ 6284:
|
907
|
+
/***/ ((module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
908
|
+
|
909
|
+
/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6758);
|
910
|
+
/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
911
|
+
/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(935);
|
912
|
+
/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
913
|
+
// Imports
|
914
|
+
|
915
|
+
|
916
|
+
var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
917
|
+
// Module
|
918
|
+
___CSS_LOADER_EXPORT___.push([module.id, `:host,:root{--d2h-bg-color:#fff;--d2h-border-color:#ddd;--d2h-dim-color:rgba(0,0,0,.3);--d2h-line-border-color:#eee;--d2h-file-header-bg-color:#f7f7f7;--d2h-file-header-border-color:#d8d8d8;--d2h-empty-placeholder-bg-color:#f1f1f1;--d2h-empty-placeholder-border-color:#e1e1e1;--d2h-selected-color:#c8e1ff;--d2h-ins-bg-color:#dfd;--d2h-ins-border-color:#b4e2b4;--d2h-ins-highlight-bg-color:#97f295;--d2h-ins-label-color:#399839;--d2h-del-bg-color:#fee8e9;--d2h-del-border-color:#e9aeae;--d2h-del-highlight-bg-color:#ffb6ba;--d2h-del-label-color:#c33;--d2h-change-del-color:#fdf2d0;--d2h-change-ins-color:#ded;--d2h-info-bg-color:#f8fafd;--d2h-info-border-color:#d5e4f2;--d2h-change-label-color:#d0b44c;--d2h-moved-label-color:#3572b0;--d2h-dark-color:#e6edf3;--d2h-dark-bg-color:#0d1117;--d2h-dark-border-color:#30363d;--d2h-dark-dim-color:#6e7681;--d2h-dark-line-border-color:#21262d;--d2h-dark-file-header-bg-color:#161b22;--d2h-dark-file-header-border-color:#30363d;--d2h-dark-empty-placeholder-bg-color:hsla(215,8%,47%,.1);--d2h-dark-empty-placeholder-border-color:#30363d;--d2h-dark-selected-color:rgba(56,139,253,.1);--d2h-dark-ins-bg-color:rgba(46,160,67,.15);--d2h-dark-ins-border-color:rgba(46,160,67,.4);--d2h-dark-ins-highlight-bg-color:rgba(46,160,67,.4);--d2h-dark-ins-label-color:#3fb950;--d2h-dark-del-bg-color:rgba(248,81,73,.1);--d2h-dark-del-border-color:rgba(248,81,73,.4);--d2h-dark-del-highlight-bg-color:rgba(248,81,73,.4);--d2h-dark-del-label-color:#f85149;--d2h-dark-change-del-color:rgba(210,153,34,.2);--d2h-dark-change-ins-color:rgba(46,160,67,.25);--d2h-dark-info-bg-color:rgba(56,139,253,.1);--d2h-dark-info-border-color:rgba(56,139,253,.4);--d2h-dark-change-label-color:#d29922;--d2h-dark-moved-label-color:#3572b0}.d2h-wrapper{text-align:left}.d2h-file-header{background-color:#f7f7f7;background-color:var(--d2h-file-header-bg-color);border-bottom:1px solid #d8d8d8;border-bottom:1px solid var(--d2h-file-header-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:Source Sans Pro,Helvetica Neue,Helvetica,Arial,sans-serif;height:35px;padding:5px 10px}.d2h-file-header.d2h-sticky-header{position:sticky;top:0;z-index:1}.d2h-file-stats{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;margin-left:auto}.d2h-lines-added{border:1px solid #b4e2b4;border:1px solid var(--d2h-ins-border-color);border-radius:5px 0 0 5px;color:#399839;color:var(--d2h-ins-label-color);padding:2px;text-align:right;vertical-align:middle}.d2h-lines-deleted{border:1px solid #e9aeae;border:1px solid var(--d2h-del-border-color);border-radius:0 5px 5px 0;color:#c33;color:var(--d2h-del-label-color);margin-left:1px;padding:2px;text-align:left;vertical-align:middle}.d2h-file-name-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:15px;width:100%}.d2h-file-name{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.d2h-file-wrapper{border:1px solid #ddd;border:1px solid var(--d2h-border-color);border-radius:3px;margin-bottom:1em}.d2h-file-collapse{-webkit-box-pack:end;-ms-flex-pack:end;cursor:pointer;display:none;font-size:12px;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid #ddd;border:1px solid var(--d2h-border-color);border-radius:3px;padding:4px 8px}.d2h-file-collapse.d2h-selected{background-color:#c8e1ff;background-color:var(--d2h-selected-color)}.d2h-file-collapse-input{margin:0 4px 0 0}.d2h-diff-table{border-collapse:collapse;font-family:Menlo,Consolas,monospace;font-size:13px;width:100%}.d2h-files-diff{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.d2h-file-diff{overflow-y:hidden}.d2h-file-diff.d2h-d-none,.d2h-files-diff.d2h-d-none{display:none}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%}.d2h-code-line{padding:0 8em;width:calc(100% - 16em)}.d2h-code-line,.d2h-code-side-line{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.d2h-code-side-line{padding:0 4.5em;width:calc(100% - 9em)}.d2h-code-line-ctn{background:none;display:inline-block;padding:0;word-wrap:normal;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle;white-space:pre;width:100%}.d2h-code-line del,.d2h-code-side-line del{background-color:#ffb6ba;background-color:var(--d2h-del-highlight-bg-color)}.d2h-code-line del,.d2h-code-line ins,.d2h-code-side-line del,.d2h-code-side-line ins{border-radius:.2em;display:inline-block;margin-top:-1px;-webkit-text-decoration:none;text-decoration:none}.d2h-code-line ins,.d2h-code-side-line ins{background-color:#97f295;background-color:var(--d2h-ins-highlight-bg-color);text-align:left}.d2h-code-line-prefix{background:none;display:inline;padding:0;word-wrap:normal;white-space:pre}.line-num1{float:left}.line-num1,.line-num2{-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;padding:0 .5em;text-overflow:ellipsis;width:3.5em}.line-num2{float:right}.d2h-code-linenumber{background-color:#fff;background-color:var(--d2h-bg-color);border:solid #eee;border:solid var(--d2h-line-border-color);border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);color:var(--d2h-dim-color);cursor:pointer;display:inline-block;position:absolute;text-align:right;width:7.5em}.d2h-code-linenumber:after{content:"\\200b"}.d2h-code-side-linenumber{background-color:#fff;background-color:var(--d2h-bg-color);border:solid #eee;border:solid var(--d2h-line-border-color);border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);color:var(--d2h-dim-color);cursor:pointer;display:inline-block;overflow:hidden;padding:0 .5em;position:absolute;text-align:right;text-overflow:ellipsis;width:4em}.d2h-code-side-linenumber:after{content:"\\200b"}.d2h-code-side-emptyplaceholder,.d2h-emptyplaceholder{background-color:#f1f1f1;background-color:var(--d2h-empty-placeholder-bg-color);border-color:#e1e1e1;border-color:var(--d2h-empty-placeholder-border-color)}.d2h-code-line-prefix,.d2h-code-linenumber,.d2h-code-side-linenumber,.d2h-emptyplaceholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.d2h-code-linenumber,.d2h-code-side-linenumber{direction:rtl}.d2h-del{background-color:#fee8e9;background-color:var(--d2h-del-bg-color);border-color:#e9aeae;border-color:var(--d2h-del-border-color)}.d2h-ins{background-color:#dfd;background-color:var(--d2h-ins-bg-color);border-color:#b4e2b4;border-color:var(--d2h-ins-border-color)}.d2h-info{background-color:#f8fafd;background-color:var(--d2h-info-bg-color);border-color:#d5e4f2;border-color:var(--d2h-info-border-color);color:rgba(0,0,0,.3);color:var(--d2h-dim-color)}.d2h-file-diff .d2h-del.d2h-change{background-color:#fdf2d0;background-color:var(--d2h-change-del-color)}.d2h-file-diff .d2h-ins.d2h-change{background-color:#ded;background-color:var(--d2h-change-ins-color)}.d2h-file-list-wrapper{margin-bottom:10px}.d2h-file-list-wrapper a{-webkit-text-decoration:none;text-decoration:none}.d2h-file-list-wrapper a,.d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-moved-label-color)}.d2h-file-list-header{text-align:left}.d2h-file-list-title{font-weight:700}.d2h-file-list-line{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.d2h-file-list{display:block;list-style:none;margin:0;padding:0}.d2h-file-list>li{border-bottom:1px solid #ddd;border-bottom:1px solid var(--d2h-border-color);margin:0;padding:5px 10px}.d2h-file-list>li:last-child{border-bottom:none}.d2h-file-switch{cursor:pointer;display:none;font-size:10px}.d2h-icon{margin-right:10px;vertical-align:middle;fill:currentColor}.d2h-deleted{color:#c33;color:var(--d2h-del-label-color)}.d2h-added{color:#399839;color:var(--d2h-ins-label-color)}.d2h-changed{color:#d0b44c;color:var(--d2h-change-label-color)}.d2h-moved{color:#3572b0;color:var(--d2h-moved-label-color)}.d2h-tag{background-color:#fff;background-color:var(--d2h-bg-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:10px;margin-left:5px;padding:0 2px}.d2h-deleted-tag{border:1px solid #c33;border:1px solid var(--d2h-del-label-color)}.d2h-added-tag{border:1px solid #399839;border:1px solid var(--d2h-ins-label-color)}.d2h-changed-tag{border:1px solid #d0b44c;border:1px solid var(--d2h-change-label-color)}.d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-moved-label-color)}.d2h-dark-color-scheme{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);color:#e6edf3;color:var(--d2h-dark-color)}.d2h-dark-color-scheme .d2h-file-header{background-color:#161b22;background-color:var(--d2h-dark-file-header-bg-color);border-bottom:#30363d;border-bottom:var(--d2h-dark-file-header-border-color)}.d2h-dark-color-scheme .d2h-lines-added{border:1px solid rgba(46,160,67,.4);border:1px solid var(--d2h-dark-ins-border-color);color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-lines-deleted{border:1px solid rgba(248,81,73,.4);border:1px solid var(--d2h-dark-del-border-color);color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-code-line del,.d2h-dark-color-scheme .d2h-code-side-line del{background-color:rgba(248,81,73,.4);background-color:var(--d2h-dark-del-highlight-bg-color)}.d2h-dark-color-scheme .d2h-code-line ins,.d2h-dark-color-scheme .d2h-code-side-line ins{background-color:rgba(46,160,67,.4);background-color:var(--d2h-dark-ins-highlight-bg-color)}.d2h-dark-color-scheme .d2h-diff-tbody{border-color:#30363d;border-color:var(--d2h-dark-border-color)}.d2h-dark-color-scheme .d2h-code-side-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-files-diff .d2h-code-side-emptyplaceholder,.d2h-dark-color-scheme .d2h-files-diff .d2h-emptyplaceholder{background-color:hsla(215,8%,47%,.1);background-color:var(--d2h-dark-empty-placeholder-bg-color);border-color:#30363d;border-color:var(--d2h-dark-empty-placeholder-border-color)}.d2h-dark-color-scheme .d2h-code-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-del{background-color:rgba(248,81,73,.1);background-color:var(--d2h-dark-del-bg-color);border-color:rgba(248,81,73,.4);border-color:var(--d2h-dark-del-border-color)}.d2h-dark-color-scheme .d2h-ins{background-color:rgba(46,160,67,.15);background-color:var(--d2h-dark-ins-bg-color);border-color:rgba(46,160,67,.4);border-color:var(--d2h-dark-ins-border-color)}.d2h-dark-color-scheme .d2h-info{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-info-bg-color);border-color:rgba(56,139,253,.4);border-color:var(--d2h-dark-info-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-file-diff .d2h-del.d2h-change{background-color:rgba(210,153,34,.2);background-color:var(--d2h-dark-change-del-color)}.d2h-dark-color-scheme .d2h-file-diff .d2h-ins.d2h-change{background-color:rgba(46,160,67,.25);background-color:var(--d2h-dark-change-ins-color)}.d2h-dark-color-scheme .d2h-file-wrapper{border:1px solid #30363d;border:1px solid var(--d2h-dark-border-color)}.d2h-dark-color-scheme .d2h-file-collapse{border:1px solid #0d1117;border:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-file-collapse.d2h-selected{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-selected-color)}.d2h-dark-color-scheme .d2h-file-list-wrapper a,.d2h-dark-color-scheme .d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-dark-color-scheme .d2h-file-list>li{border-bottom:1px solid #0d1117;border-bottom:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted{color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-added{color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-changed{color:#d29922;color:var(--d2h-dark-change-label-color)}.d2h-dark-color-scheme .d2h-moved{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-dark-color-scheme .d2h-tag{background-color:#0d1117;background-color:var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted-tag{border:1px solid #f85149;border:1px solid var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-added-tag{border:1px solid #3fb950;border:1px solid var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-changed-tag{border:1px solid #d29922;border:1px solid var(--d2h-dark-change-label-color)}.d2h-dark-color-scheme .d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-dark-moved-label-color)}@media (prefers-color-scheme:dark){.d2h-auto-color-scheme{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);color:#e6edf3;color:var(--d2h-dark-color)}.d2h-auto-color-scheme .d2h-file-header{background-color:#161b22;background-color:var(--d2h-dark-file-header-bg-color);border-bottom:#30363d;border-bottom:var(--d2h-dark-file-header-border-color)}.d2h-auto-color-scheme .d2h-lines-added{border:1px solid rgba(46,160,67,.4);border:1px solid var(--d2h-dark-ins-border-color);color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-lines-deleted{border:1px solid rgba(248,81,73,.4);border:1px solid var(--d2h-dark-del-border-color);color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-code-line del,.d2h-auto-color-scheme .d2h-code-side-line del{background-color:rgba(248,81,73,.4);background-color:var(--d2h-dark-del-highlight-bg-color)}.d2h-auto-color-scheme .d2h-code-line ins,.d2h-auto-color-scheme .d2h-code-side-line ins{background-color:rgba(46,160,67,.4);background-color:var(--d2h-dark-ins-highlight-bg-color)}.d2h-auto-color-scheme .d2h-diff-tbody{border-color:#30363d;border-color:var(--d2h-dark-border-color)}.d2h-auto-color-scheme .d2h-code-side-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-files-diff .d2h-code-side-emptyplaceholder,.d2h-auto-color-scheme .d2h-files-diff .d2h-emptyplaceholder{background-color:hsla(215,8%,47%,.1);background-color:var(--d2h-dark-empty-placeholder-bg-color);border-color:#30363d;border-color:var(--d2h-dark-empty-placeholder-border-color)}.d2h-auto-color-scheme .d2h-code-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-del{background-color:rgba(248,81,73,.1);background-color:var(--d2h-dark-del-bg-color);border-color:rgba(248,81,73,.4);border-color:var(--d2h-dark-del-border-color)}.d2h-auto-color-scheme .d2h-ins{background-color:rgba(46,160,67,.15);background-color:var(--d2h-dark-ins-bg-color);border-color:rgba(46,160,67,.4);border-color:var(--d2h-dark-ins-border-color)}.d2h-auto-color-scheme .d2h-info{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-info-bg-color);border-color:rgba(56,139,253,.4);border-color:var(--d2h-dark-info-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-file-diff .d2h-del.d2h-change{background-color:rgba(210,153,34,.2);background-color:var(--d2h-dark-change-del-color)}.d2h-auto-color-scheme .d2h-file-diff .d2h-ins.d2h-change{background-color:rgba(46,160,67,.25);background-color:var(--d2h-dark-change-ins-color)}.d2h-auto-color-scheme .d2h-file-wrapper{border:1px solid #30363d;border:1px solid var(--d2h-dark-border-color)}.d2h-auto-color-scheme .d2h-file-collapse{border:1px solid #0d1117;border:1px solid var(--d2h-dark-bg-color)}.d2h-auto-color-scheme .d2h-file-collapse.d2h-selected{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-selected-color)}.d2h-auto-color-scheme .d2h-file-list-wrapper a,.d2h-auto-color-scheme .d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-auto-color-scheme .d2h-file-list>li{border-bottom:1px solid #0d1117;border-bottom:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted{color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-added{color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-changed{color:#d29922;color:var(--d2h-dark-change-label-color)}.d2h-auto-color-scheme .d2h-moved{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-auto-color-scheme .d2h-tag{background-color:#0d1117;background-color:var(--d2h-dark-bg-color)}.d2h-auto-color-scheme .d2h-deleted-tag{border:1px solid #f85149;border:1px solid var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-added-tag{border:1px solid #3fb950;border:1px solid var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-changed-tag{border:1px solid #d29922;border:1px solid var(--d2h-dark-change-label-color)}.d2h-auto-color-scheme .d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-dark-moved-label-color)}}`, ""]);
|
919
|
+
// Exports
|
920
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (___CSS_LOADER_EXPORT___)));
|
921
|
+
|
922
|
+
|
923
|
+
/***/ }),
|
924
|
+
|
925
|
+
/***/ 6758:
|
926
|
+
/***/ ((module) => {
|
927
|
+
|
928
|
+
|
929
|
+
|
930
|
+
module.exports = function (i) {
|
931
|
+
return i[1];
|
932
|
+
};
|
933
|
+
|
934
934
|
/***/ })
|
935
935
|
|
936
936
|
/******/ });
|
@@ -991,57 +991,57 @@ var Hogan = {};
|
|
991
991
|
/******/
|
992
992
|
/************************************************************************/
|
993
993
|
var __webpack_exports__ = {};
|
994
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
995
|
-
(() => {
|
996
994
|
|
997
995
|
// EXPORTS
|
998
996
|
__webpack_require__.d(__webpack_exports__, {
|
999
997
|
"default": () => (/* binding */ src)
|
1000
998
|
});
|
1001
999
|
|
1002
|
-
;//
|
1003
|
-
var x = y => {
|
1004
|
-
var
|
1005
|
-
|
1006
|
-
|
1000
|
+
;// external "../shared"
|
1001
|
+
var x = (y) => {
|
1002
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1003
|
+
}
|
1004
|
+
var y = (x) => (() => (x))
|
1005
|
+
const shared_namespaceObject = x({ ["PropTypes"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes), ["classes"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.classes), ["stringEnum"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.stringEnum), ["withInstall"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall) });
|
1006
|
+
;// ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
1007
1007
|
function _arrayWithHoles(arr) {
|
1008
1008
|
if (Array.isArray(arr)) return arr;
|
1009
1009
|
}
|
1010
|
-
;//
|
1011
|
-
function _iterableToArrayLimit(
|
1012
|
-
var
|
1013
|
-
if (null !=
|
1014
|
-
var
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1010
|
+
;// ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
1011
|
+
function _iterableToArrayLimit(r, l) {
|
1012
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
1013
|
+
if (null != t) {
|
1014
|
+
var e,
|
1015
|
+
n,
|
1016
|
+
i,
|
1017
|
+
u,
|
1018
|
+
a = [],
|
1019
|
+
f = !0,
|
1020
|
+
o = !1;
|
1021
1021
|
try {
|
1022
|
-
if (
|
1023
|
-
if (Object(
|
1024
|
-
|
1025
|
-
} else for (; !(
|
1026
|
-
} catch (
|
1027
|
-
|
1022
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
1023
|
+
if (Object(t) !== t) return;
|
1024
|
+
f = !1;
|
1025
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
1026
|
+
} catch (r) {
|
1027
|
+
o = !0, n = r;
|
1028
1028
|
} finally {
|
1029
1029
|
try {
|
1030
|
-
if (!
|
1030
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
1031
1031
|
} finally {
|
1032
|
-
if (
|
1032
|
+
if (o) throw n;
|
1033
1033
|
}
|
1034
1034
|
}
|
1035
|
-
return
|
1035
|
+
return a;
|
1036
1036
|
}
|
1037
1037
|
}
|
1038
|
-
;//
|
1038
|
+
;// ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
1039
1039
|
function _arrayLikeToArray(arr, len) {
|
1040
1040
|
if (len == null || len > arr.length) len = arr.length;
|
1041
1041
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
1042
1042
|
return arr2;
|
1043
1043
|
}
|
1044
|
-
;//
|
1044
|
+
;// ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
1045
1045
|
|
1046
1046
|
function _unsupportedIterableToArray(o, minLen) {
|
1047
1047
|
if (!o) return;
|
@@ -1051,11 +1051,11 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
1051
1051
|
if (n === "Map" || n === "Set") return Array.from(o);
|
1052
1052
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
1053
1053
|
}
|
1054
|
-
;//
|
1054
|
+
;// ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
1055
1055
|
function _nonIterableRest() {
|
1056
1056
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
1057
1057
|
}
|
1058
|
-
;//
|
1058
|
+
;// ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
1059
1059
|
|
1060
1060
|
|
1061
1061
|
|
@@ -1063,19 +1063,25 @@ function _nonIterableRest() {
|
|
1063
1063
|
function _slicedToArray(arr, i) {
|
1064
1064
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
1065
1065
|
}
|
1066
|
-
;//
|
1067
|
-
var external_vue_x = y => {
|
1068
|
-
var
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
var
|
1077
|
-
const
|
1078
|
-
;//
|
1066
|
+
;// external "vue"
|
1067
|
+
var external_vue_x = (y) => {
|
1068
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1069
|
+
}
|
1070
|
+
var external_vue_y = (x) => (() => (x))
|
1071
|
+
const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.computed), ["createVNode"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.createVNode), ["defineComponent"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.defineComponent), ["nextTick"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.nextTick), ["onMounted"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.onMounted), ["ref"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.ref), ["watch"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.watch) });
|
1072
|
+
;// external "vue-types"
|
1073
|
+
var external_vue_types_x = (y) => {
|
1074
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1075
|
+
}
|
1076
|
+
var external_vue_types_y = (x) => (() => (x))
|
1077
|
+
const external_vue_types_namespaceObject = external_vue_types_x({ ["number"]: () => (__WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.number), ["string"]: () => (__WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.string) });
|
1078
|
+
;// external "../config-provider"
|
1079
|
+
var config_provider_x = (y) => {
|
1080
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1081
|
+
}
|
1082
|
+
var config_provider_y = (x) => (() => (x))
|
1083
|
+
const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix) });
|
1084
|
+
;// ../../packages/code-diff/node_modules/diff/lib/index.mjs
|
1079
1085
|
function Diff() {}
|
1080
1086
|
Diff.prototype = {
|
1081
1087
|
diff: function diff(oldString, newString) {
|
@@ -2630,29 +2636,35 @@ function escapeHTML(s) {
|
|
2630
2636
|
|
2631
2637
|
|
2632
2638
|
|
2633
|
-
;//
|
2639
|
+
;// ../../node_modules/diff2html/lib-esm/types.js
|
2634
2640
|
var LineType;
|
2635
2641
|
(function (LineType) {
|
2636
2642
|
LineType["INSERT"] = "insert";
|
2637
2643
|
LineType["DELETE"] = "delete";
|
2638
2644
|
LineType["CONTEXT"] = "context";
|
2639
2645
|
})(LineType || (LineType = {}));
|
2640
|
-
|
2646
|
+
const OutputFormatType = {
|
2641
2647
|
LINE_BY_LINE: 'line-by-line',
|
2642
2648
|
SIDE_BY_SIDE: 'side-by-side',
|
2643
2649
|
};
|
2644
|
-
|
2650
|
+
const LineMatchingType = {
|
2645
2651
|
LINES: 'lines',
|
2646
2652
|
WORDS: 'words',
|
2647
2653
|
NONE: 'none',
|
2648
2654
|
};
|
2649
|
-
|
2655
|
+
const DiffStyleType = {
|
2650
2656
|
WORD: 'word',
|
2651
2657
|
CHAR: 'char',
|
2652
2658
|
};
|
2659
|
+
var ColorSchemeType;
|
2660
|
+
(function (ColorSchemeType) {
|
2661
|
+
ColorSchemeType["AUTO"] = "auto";
|
2662
|
+
ColorSchemeType["DARK"] = "dark";
|
2663
|
+
ColorSchemeType["LIGHT"] = "light";
|
2664
|
+
})(ColorSchemeType || (ColorSchemeType = {}));
|
2653
2665
|
//# sourceMappingURL=types.js.map
|
2654
|
-
;//
|
2655
|
-
|
2666
|
+
;// ../../node_modules/diff2html/lib-esm/utils.js
|
2667
|
+
const specials = [
|
2656
2668
|
'-',
|
2657
2669
|
'[',
|
2658
2670
|
']',
|
@@ -2670,7 +2682,7 @@ var specials = [
|
|
2670
2682
|
'$',
|
2671
2683
|
'|',
|
2672
2684
|
];
|
2673
|
-
|
2685
|
+
const regex = RegExp('[' + specials.join('\\') + ']', 'g');
|
2674
2686
|
function escapeForRegExp(str) {
|
2675
2687
|
return str.replace(regex, '\\$&');
|
2676
2688
|
}
|
@@ -2678,8 +2690,8 @@ function unifyPath(path) {
|
|
2678
2690
|
return path ? path.replace(/\\/g, '/') : path;
|
2679
2691
|
}
|
2680
2692
|
function hashCode(text) {
|
2681
|
-
|
2682
|
-
|
2693
|
+
let i, chr, len;
|
2694
|
+
let hash = 0;
|
2683
2695
|
for (i = 0, len = text.length; i < len; i++) {
|
2684
2696
|
chr = text.charCodeAt(i);
|
2685
2697
|
hash = (hash << 5) - hash + chr;
|
@@ -2688,34 +2700,25 @@ function hashCode(text) {
|
|
2688
2700
|
return hash;
|
2689
2701
|
}
|
2690
2702
|
//# sourceMappingURL=utils.js.map
|
2691
|
-
;//
|
2692
|
-
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
2693
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
2694
|
-
if (ar || !(i in from)) {
|
2695
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
2696
|
-
ar[i] = from[i];
|
2697
|
-
}
|
2698
|
-
}
|
2699
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
2700
|
-
};
|
2703
|
+
;// ../../node_modules/diff2html/lib-esm/diff-parser.js
|
2701
2704
|
|
2702
2705
|
|
2703
2706
|
function getExtension(filename, language) {
|
2704
|
-
|
2707
|
+
const filenameParts = filename.split('.');
|
2705
2708
|
return filenameParts.length > 1 ? filenameParts[filenameParts.length - 1] : language;
|
2706
2709
|
}
|
2707
2710
|
function startsWithAny(str, prefixes) {
|
2708
|
-
return prefixes.reduce(
|
2711
|
+
return prefixes.reduce((startsWith, prefix) => startsWith || str.startsWith(prefix), false);
|
2709
2712
|
}
|
2710
|
-
|
2713
|
+
const baseDiffFilenamePrefixes = ['a/', 'b/', 'i/', 'w/', 'c/', 'o/'];
|
2711
2714
|
function getFilename(line, linePrefix, extraPrefix) {
|
2712
|
-
|
2713
|
-
|
2714
|
-
? new RegExp(
|
2715
|
+
const prefixes = extraPrefix !== undefined ? [...baseDiffFilenamePrefixes, extraPrefix] : baseDiffFilenamePrefixes;
|
2716
|
+
const FilenameRegExp = linePrefix
|
2717
|
+
? new RegExp(`^${escapeForRegExp(linePrefix)} "?(.+?)"?$`)
|
2715
2718
|
: new RegExp('^"?(.+?)"?$');
|
2716
|
-
|
2717
|
-
|
2718
|
-
|
2719
|
+
const [, filename = ''] = FilenameRegExp.exec(line) || [];
|
2720
|
+
const matchingPrefix = prefixes.find(p => filename.indexOf(p) === 0);
|
2721
|
+
const fnameWithoutPrefix = matchingPrefix ? filename.slice(matchingPrefix.length) : filename;
|
2719
2722
|
return fnameWithoutPrefix.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/, '');
|
2720
2723
|
}
|
2721
2724
|
function getSrcFilename(line, srcPrefix) {
|
@@ -2724,37 +2727,36 @@ function getSrcFilename(line, srcPrefix) {
|
|
2724
2727
|
function getDstFilename(line, dstPrefix) {
|
2725
2728
|
return getFilename(line, '+++', dstPrefix);
|
2726
2729
|
}
|
2727
|
-
function parse(diffInput, config) {
|
2728
|
-
|
2729
|
-
|
2730
|
-
|
2731
|
-
|
2732
|
-
|
2733
|
-
|
2734
|
-
|
2735
|
-
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2740
|
-
|
2741
|
-
|
2742
|
-
|
2743
|
-
|
2744
|
-
|
2745
|
-
|
2746
|
-
|
2747
|
-
|
2748
|
-
|
2749
|
-
|
2750
|
-
|
2751
|
-
|
2752
|
-
|
2753
|
-
|
2754
|
-
|
2755
|
-
|
2756
|
-
|
2757
|
-
var diffLines = diffInput
|
2730
|
+
function parse(diffInput, config = {}) {
|
2731
|
+
const files = [];
|
2732
|
+
let currentFile = null;
|
2733
|
+
let currentBlock = null;
|
2734
|
+
let oldLine = null;
|
2735
|
+
let oldLine2 = null;
|
2736
|
+
let newLine = null;
|
2737
|
+
let possibleOldName = null;
|
2738
|
+
let possibleNewName = null;
|
2739
|
+
const oldFileNameHeader = '--- ';
|
2740
|
+
const newFileNameHeader = '+++ ';
|
2741
|
+
const hunkHeaderPrefix = '@@';
|
2742
|
+
const oldMode = /^old mode (\d{6})/;
|
2743
|
+
const newMode = /^new mode (\d{6})/;
|
2744
|
+
const deletedFileMode = /^deleted file mode (\d{6})/;
|
2745
|
+
const newFileMode = /^new file mode (\d{6})/;
|
2746
|
+
const copyFrom = /^copy from "?(.+)"?/;
|
2747
|
+
const copyTo = /^copy to "?(.+)"?/;
|
2748
|
+
const renameFrom = /^rename from "?(.+)"?/;
|
2749
|
+
const renameTo = /^rename to "?(.+)"?/;
|
2750
|
+
const similarityIndex = /^similarity index (\d+)%/;
|
2751
|
+
const dissimilarityIndex = /^dissimilarity index (\d+)%/;
|
2752
|
+
const index = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/;
|
2753
|
+
const binaryFiles = /^Binary files (.*) and (.*) differ/;
|
2754
|
+
const binaryDiff = /^GIT binary patch/;
|
2755
|
+
const combinedIndex = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/;
|
2756
|
+
const combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/;
|
2757
|
+
const combinedNewFile = /^new file mode (\d{6})/;
|
2758
|
+
const combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/;
|
2759
|
+
const diffLines = diffInput
|
2758
2760
|
.replace(/\/g, '')
|
2759
2761
|
.replace(/\r\n?/g, '\n')
|
2760
2762
|
.split('\n');
|
@@ -2791,7 +2793,7 @@ function parse(diffInput, config) {
|
|
2791
2793
|
}
|
2792
2794
|
function startBlock(line) {
|
2793
2795
|
saveBlock();
|
2794
|
-
|
2796
|
+
let values;
|
2795
2797
|
if (currentFile !== null) {
|
2796
2798
|
if ((values = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line))) {
|
2797
2799
|
currentFile.isCombined = false;
|
@@ -2824,11 +2826,11 @@ function parse(diffInput, config) {
|
|
2824
2826
|
function createLine(line) {
|
2825
2827
|
if (currentFile === null || currentBlock === null || oldLine === null || newLine === null)
|
2826
2828
|
return;
|
2827
|
-
|
2829
|
+
const currentLine = {
|
2828
2830
|
content: line,
|
2829
2831
|
};
|
2830
|
-
|
2831
|
-
|
2832
|
+
const addedPrefixes = currentFile.isCombined ? ['+ ', ' +', '++'] : ['+'];
|
2833
|
+
const deletedPrefixes = currentFile.isCombined ? ['- ', ' -', '--'] : ['-'];
|
2832
2834
|
if (startsWithAny(line, addedPrefixes)) {
|
2833
2835
|
currentFile.addedLines++;
|
2834
2836
|
currentLine.type = LineType.INSERT;
|
@@ -2849,7 +2851,7 @@ function parse(diffInput, config) {
|
|
2849
2851
|
currentBlock.lines.push(currentLine);
|
2850
2852
|
}
|
2851
2853
|
function existHunkHeader(line, lineIdx) {
|
2852
|
-
|
2854
|
+
let idx = lineIdx;
|
2853
2855
|
while (idx < diffLines.length - 3) {
|
2854
2856
|
if (line.startsWith('diff')) {
|
2855
2857
|
return false;
|
@@ -2863,17 +2865,17 @@ function parse(diffInput, config) {
|
|
2863
2865
|
}
|
2864
2866
|
return false;
|
2865
2867
|
}
|
2866
|
-
diffLines.forEach(
|
2868
|
+
diffLines.forEach((line, lineIndex) => {
|
2867
2869
|
if (!line || line.startsWith('*')) {
|
2868
2870
|
return;
|
2869
2871
|
}
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
2872
|
+
let values;
|
2873
|
+
const prevLine = diffLines[lineIndex - 1];
|
2874
|
+
const nxtLine = diffLines[lineIndex + 1];
|
2875
|
+
const afterNxtLine = diffLines[lineIndex + 2];
|
2874
2876
|
if (line.startsWith('diff --git') || line.startsWith('diff --combined')) {
|
2875
2877
|
startFile();
|
2876
|
-
|
2878
|
+
const gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/;
|
2877
2879
|
if ((values = gitDiffStart.exec(line))) {
|
2878
2880
|
possibleOldName = getFilename(values[1], undefined, config.dstPrefix);
|
2879
2881
|
possibleNewName = getFilename(values[2], undefined, config.srcPrefix);
|
@@ -2886,7 +2888,7 @@ function parse(diffInput, config) {
|
|
2886
2888
|
}
|
2887
2889
|
if (line.startsWith('Binary files') && !(currentFile === null || currentFile === void 0 ? void 0 : currentFile.isGitDiff)) {
|
2888
2890
|
startFile();
|
2889
|
-
|
2891
|
+
const unixDiffBinaryStart = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/;
|
2890
2892
|
if ((values = unixDiffBinaryStart.exec(line))) {
|
2891
2893
|
possibleOldName = getFilename(values[1], undefined, config.dstPrefix);
|
2892
2894
|
possibleNewName = getFilename(values[2], undefined, config.srcPrefix);
|
@@ -2917,7 +2919,7 @@ function parse(diffInput, config) {
|
|
2917
2919
|
currentFile.deletedLines = 0;
|
2918
2920
|
currentFile.blocks = [];
|
2919
2921
|
currentBlock = null;
|
2920
|
-
|
2922
|
+
const message = typeof config.diffTooBigMessage === 'function'
|
2921
2923
|
? config.diffTooBigMessage(files.length)
|
2922
2924
|
: 'Diff too big to be displayed';
|
2923
2925
|
startBlock(message);
|
@@ -2952,7 +2954,7 @@ function parse(diffInput, config) {
|
|
2952
2954
|
createLine(line);
|
2953
2955
|
return;
|
2954
2956
|
}
|
2955
|
-
|
2957
|
+
const doesNotExistHunkHeader = !existHunkHeader(line, lineIndex);
|
2956
2958
|
if (currentFile === null) {
|
2957
2959
|
throw new Error('Where is my file !!!');
|
2958
2960
|
}
|
@@ -3037,7 +3039,7 @@ function parse(diffInput, config) {
|
|
3037
3039
|
return files;
|
3038
3040
|
}
|
3039
3041
|
//# sourceMappingURL=diff-parser.js.map
|
3040
|
-
;//
|
3042
|
+
;// ../../node_modules/diff2html/node_modules/diff/lib/index.mjs
|
3041
3043
|
function lib_Diff() {}
|
3042
3044
|
lib_Diff.prototype = {
|
3043
3045
|
diff: function diff(oldString, newString) {
|
@@ -4600,7 +4602,7 @@ function lib_escapeHTML(s) {
|
|
4600
4602
|
|
4601
4603
|
|
4602
4604
|
|
4603
|
-
;//
|
4605
|
+
;// ../../node_modules/diff2html/lib-esm/rematch.js
|
4604
4606
|
function levenshtein(a, b) {
|
4605
4607
|
if (a.length === 0) {
|
4606
4608
|
return b.length;
|
@@ -4608,12 +4610,12 @@ function levenshtein(a, b) {
|
|
4608
4610
|
if (b.length === 0) {
|
4609
4611
|
return a.length;
|
4610
4612
|
}
|
4611
|
-
|
4612
|
-
|
4613
|
+
const matrix = [];
|
4614
|
+
let i;
|
4613
4615
|
for (i = 0; i <= b.length; i++) {
|
4614
4616
|
matrix[i] = [i];
|
4615
4617
|
}
|
4616
|
-
|
4618
|
+
let j;
|
4617
4619
|
for (j = 0; j <= a.length; j++) {
|
4618
4620
|
matrix[0][j] = j;
|
4619
4621
|
}
|
@@ -4630,22 +4632,21 @@ function levenshtein(a, b) {
|
|
4630
4632
|
return matrix[b.length][a.length];
|
4631
4633
|
}
|
4632
4634
|
function newDistanceFn(str) {
|
4633
|
-
return
|
4634
|
-
|
4635
|
-
|
4636
|
-
|
4635
|
+
return (x, y) => {
|
4636
|
+
const xValue = str(x).trim();
|
4637
|
+
const yValue = str(y).trim();
|
4638
|
+
const lev = levenshtein(xValue, yValue);
|
4637
4639
|
return lev / (xValue.length + yValue.length);
|
4638
4640
|
};
|
4639
4641
|
}
|
4640
4642
|
function newMatcherFn(distance) {
|
4641
|
-
function findBestMatch(a, b, cache) {
|
4642
|
-
|
4643
|
-
|
4644
|
-
|
4645
|
-
|
4646
|
-
|
4647
|
-
|
4648
|
-
var md = void 0;
|
4643
|
+
function findBestMatch(a, b, cache = new Map()) {
|
4644
|
+
let bestMatchDist = Infinity;
|
4645
|
+
let bestMatch;
|
4646
|
+
for (let i = 0; i < a.length; ++i) {
|
4647
|
+
for (let j = 0; j < b.length; ++j) {
|
4648
|
+
const cacheKey = JSON.stringify([a[i], b[j]]);
|
4649
|
+
let md;
|
4649
4650
|
if (!(cache.has(cacheKey) && (md = cache.get(cacheKey)))) {
|
4650
4651
|
md = distance(a[i], b[j]);
|
4651
4652
|
cache.set(cacheKey, md);
|
@@ -4658,25 +4659,23 @@ function newMatcherFn(distance) {
|
|
4658
4659
|
}
|
4659
4660
|
return bestMatch;
|
4660
4661
|
}
|
4661
|
-
function group(a, b, level, cache) {
|
4662
|
-
|
4663
|
-
if (cache === void 0) { cache = new Map(); }
|
4664
|
-
var bm = findBestMatch(a, b, cache);
|
4662
|
+
function group(a, b, level = 0, cache = new Map()) {
|
4663
|
+
const bm = findBestMatch(a, b, cache);
|
4665
4664
|
if (!bm || a.length + b.length < 3) {
|
4666
4665
|
return [[a, b]];
|
4667
4666
|
}
|
4668
|
-
|
4669
|
-
|
4670
|
-
|
4671
|
-
|
4672
|
-
|
4673
|
-
|
4674
|
-
|
4675
|
-
|
4676
|
-
|
4677
|
-
|
4678
|
-
|
4679
|
-
|
4667
|
+
const a1 = a.slice(0, bm.indexA);
|
4668
|
+
const b1 = b.slice(0, bm.indexB);
|
4669
|
+
const aMatch = [a[bm.indexA]];
|
4670
|
+
const bMatch = [b[bm.indexB]];
|
4671
|
+
const tailA = bm.indexA + 1;
|
4672
|
+
const tailB = bm.indexB + 1;
|
4673
|
+
const a2 = a.slice(tailA);
|
4674
|
+
const b2 = b.slice(tailB);
|
4675
|
+
const group1 = group(a1, b1, level + 1, cache);
|
4676
|
+
const groupMatch = group(aMatch, bMatch, level + 1, cache);
|
4677
|
+
const group2 = group(a2, b2, level + 1, cache);
|
4678
|
+
let result = groupMatch;
|
4680
4679
|
if (bm.indexA > 0 || bm.indexB > 0) {
|
4681
4680
|
result = group1.concat(result);
|
4682
4681
|
}
|
@@ -4688,23 +4687,12 @@ function newMatcherFn(distance) {
|
|
4688
4687
|
return group;
|
4689
4688
|
}
|
4690
4689
|
//# sourceMappingURL=rematch.js.map
|
4691
|
-
;//
|
4692
|
-
var __assign = (undefined && undefined.__assign) || function () {
|
4693
|
-
__assign = Object.assign || function(t) {
|
4694
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4695
|
-
s = arguments[i];
|
4696
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
4697
|
-
t[p] = s[p];
|
4698
|
-
}
|
4699
|
-
return t;
|
4700
|
-
};
|
4701
|
-
return __assign.apply(this, arguments);
|
4702
|
-
};
|
4690
|
+
;// ../../node_modules/diff2html/lib-esm/render-utils.js
|
4703
4691
|
|
4704
4692
|
|
4705
4693
|
|
4706
4694
|
|
4707
|
-
|
4695
|
+
const CSSLineClass = {
|
4708
4696
|
INSERTS: 'd2h-ins',
|
4709
4697
|
DELETES: 'd2h-del',
|
4710
4698
|
CONTEXT: 'd2h-cntx',
|
@@ -4712,15 +4700,16 @@ var CSSLineClass = {
|
|
4712
4700
|
INSERT_CHANGES: 'd2h-ins d2h-change',
|
4713
4701
|
DELETE_CHANGES: 'd2h-del d2h-change',
|
4714
4702
|
};
|
4715
|
-
|
4703
|
+
const defaultRenderConfig = {
|
4716
4704
|
matching: LineMatchingType.NONE,
|
4717
4705
|
matchWordsThreshold: 0.25,
|
4718
4706
|
maxLineLengthHighlight: 10000,
|
4719
4707
|
diffStyle: DiffStyleType.WORD,
|
4708
|
+
colorScheme: ColorSchemeType.LIGHT,
|
4720
4709
|
};
|
4721
|
-
|
4722
|
-
|
4723
|
-
|
4710
|
+
const separator = '/';
|
4711
|
+
const distance = newDistanceFn((change) => change.value);
|
4712
|
+
const matcher = newMatcherFn(distance);
|
4724
4713
|
function isDevNullName(name) {
|
4725
4714
|
return name.indexOf('dev/null') !== -1;
|
4726
4715
|
}
|
@@ -4740,6 +4729,17 @@ function toCSSClass(lineType) {
|
|
4740
4729
|
return CSSLineClass.DELETES;
|
4741
4730
|
}
|
4742
4731
|
}
|
4732
|
+
function colorSchemeToCss(colorScheme) {
|
4733
|
+
switch (colorScheme) {
|
4734
|
+
case ColorSchemeType.DARK:
|
4735
|
+
return 'd2h-dark-color-scheme';
|
4736
|
+
case ColorSchemeType.AUTO:
|
4737
|
+
return 'd2h-auto-color-scheme';
|
4738
|
+
case ColorSchemeType.LIGHT:
|
4739
|
+
default:
|
4740
|
+
return 'd2h-light-color-scheme';
|
4741
|
+
}
|
4742
|
+
}
|
4743
4743
|
function prefixLength(isCombined) {
|
4744
4744
|
return isCombined ? 2 : 1;
|
4745
4745
|
}
|
@@ -4753,27 +4753,26 @@ function escapeForHtml(str) {
|
|
4753
4753
|
.replace(/'/g, ''')
|
4754
4754
|
.replace(/\//g, '/');
|
4755
4755
|
}
|
4756
|
-
function deconstructLine(line, isCombined, escape) {
|
4757
|
-
|
4758
|
-
var indexToSplit = prefixLength(isCombined);
|
4756
|
+
function deconstructLine(line, isCombined, escape = true) {
|
4757
|
+
const indexToSplit = prefixLength(isCombined);
|
4759
4758
|
return {
|
4760
4759
|
prefix: line.substring(0, indexToSplit),
|
4761
4760
|
content: escape ? escapeForHtml(line.substring(indexToSplit)) : line.substring(indexToSplit),
|
4762
4761
|
};
|
4763
4762
|
}
|
4764
4763
|
function filenameDiff(file) {
|
4765
|
-
|
4766
|
-
|
4764
|
+
const oldFilename = unifyPath(file.oldName);
|
4765
|
+
const newFilename = unifyPath(file.newName);
|
4767
4766
|
if (oldFilename !== newFilename && !isDevNullName(oldFilename) && !isDevNullName(newFilename)) {
|
4768
|
-
|
4769
|
-
|
4770
|
-
|
4771
|
-
|
4772
|
-
|
4773
|
-
|
4774
|
-
|
4775
|
-
|
4776
|
-
|
4767
|
+
const prefixPaths = [];
|
4768
|
+
const suffixPaths = [];
|
4769
|
+
const oldFilenameParts = oldFilename.split(separator);
|
4770
|
+
const newFilenameParts = newFilename.split(separator);
|
4771
|
+
const oldFilenamePartsSize = oldFilenameParts.length;
|
4772
|
+
const newFilenamePartsSize = newFilenameParts.length;
|
4773
|
+
let i = 0;
|
4774
|
+
let j = oldFilenamePartsSize - 1;
|
4775
|
+
let k = newFilenamePartsSize - 1;
|
4777
4776
|
while (i < j && i < k) {
|
4778
4777
|
if (oldFilenameParts[i] === newFilenameParts[i]) {
|
4779
4778
|
prefixPaths.push(newFilenameParts[i]);
|
@@ -4793,10 +4792,10 @@ function filenameDiff(file) {
|
|
4793
4792
|
break;
|
4794
4793
|
}
|
4795
4794
|
}
|
4796
|
-
|
4797
|
-
|
4798
|
-
|
4799
|
-
|
4795
|
+
const finalPrefix = prefixPaths.join(separator);
|
4796
|
+
const finalSuffix = suffixPaths.join(separator);
|
4797
|
+
const oldRemainingPath = oldFilenameParts.slice(i, j + 1).join(separator);
|
4798
|
+
const newRemainingPath = newFilenameParts.slice(i, k + 1).join(separator);
|
4800
4799
|
if (finalPrefix.length && finalSuffix.length) {
|
4801
4800
|
return (finalPrefix + separator + '{' + oldRemainingPath + ' → ' + newRemainingPath + '}' + separator + finalSuffix);
|
4802
4801
|
}
|
@@ -4816,10 +4815,10 @@ function filenameDiff(file) {
|
|
4816
4815
|
}
|
4817
4816
|
}
|
4818
4817
|
function getHtmlId(file) {
|
4819
|
-
return
|
4818
|
+
return `d2h-${hashCode(filenameDiff(file)).toString().slice(-6)}`;
|
4820
4819
|
}
|
4821
4820
|
function getFileIcon(file) {
|
4822
|
-
|
4821
|
+
let templateName = 'file-changed';
|
4823
4822
|
if (file.isRename) {
|
4824
4823
|
templateName = 'file-renamed';
|
4825
4824
|
}
|
@@ -4837,11 +4836,10 @@ function getFileIcon(file) {
|
|
4837
4836
|
}
|
4838
4837
|
return templateName;
|
4839
4838
|
}
|
4840
|
-
function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
4841
|
-
|
4842
|
-
|
4843
|
-
|
4844
|
-
var line2 = deconstructLine(diffLine2, isCombined, false);
|
4839
|
+
function diffHighlight(diffLine1, diffLine2, isCombined, config = {}) {
|
4840
|
+
const { matching, maxLineLengthHighlight, matchWordsThreshold, diffStyle } = Object.assign(Object.assign({}, defaultRenderConfig), config);
|
4841
|
+
const line1 = deconstructLine(diffLine1, isCombined, false);
|
4842
|
+
const line2 = deconstructLine(diffLine2, isCombined, false);
|
4845
4843
|
if (line1.content.length > maxLineLengthHighlight || line2.content.length > maxLineLengthHighlight) {
|
4846
4844
|
return {
|
4847
4845
|
oldLine: {
|
@@ -4854,17 +4852,17 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
|
4854
4852
|
},
|
4855
4853
|
};
|
4856
4854
|
}
|
4857
|
-
|
4855
|
+
const diff = diffStyle === 'char'
|
4858
4856
|
? lib_diffChars(line1.content, line2.content)
|
4859
4857
|
: lib_diffWordsWithSpace(line1.content, line2.content);
|
4860
|
-
|
4858
|
+
const changedWords = [];
|
4861
4859
|
if (diffStyle === 'word' && matching === 'words') {
|
4862
|
-
|
4863
|
-
|
4864
|
-
|
4865
|
-
chunks.forEach(
|
4860
|
+
const removed = diff.filter(element => element.removed);
|
4861
|
+
const added = diff.filter(element => element.added);
|
4862
|
+
const chunks = matcher(added, removed);
|
4863
|
+
chunks.forEach(chunk => {
|
4866
4864
|
if (chunk[0].length === 1 && chunk[1].length === 1) {
|
4867
|
-
|
4865
|
+
const dist = distance(chunk[0][0], chunk[1][0]);
|
4868
4866
|
if (dist < matchWordsThreshold) {
|
4869
4867
|
changedWords.push(chunk[0][0]);
|
4870
4868
|
changedWords.push(chunk[1][0]);
|
@@ -4872,13 +4870,13 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
|
4872
4870
|
}
|
4873
4871
|
});
|
4874
4872
|
}
|
4875
|
-
|
4876
|
-
|
4877
|
-
|
4878
|
-
|
4873
|
+
const highlightedLine = diff.reduce((highlightedLine, part) => {
|
4874
|
+
const elemType = part.added ? 'ins' : part.removed ? 'del' : null;
|
4875
|
+
const addClass = changedWords.indexOf(part) > -1 ? ' class="d2h-change"' : '';
|
4876
|
+
const escapedValue = escapeForHtml(part.value);
|
4879
4877
|
return elemType !== null
|
4880
|
-
?
|
4881
|
-
:
|
4878
|
+
? `${highlightedLine}<${elemType}${addClass}>${escapedValue}</${elemType}>`
|
4879
|
+
: `${highlightedLine}${escapedValue}`;
|
4882
4880
|
}, '');
|
4883
4881
|
return {
|
4884
4882
|
oldLine: {
|
@@ -4892,14 +4890,21 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
|
4892
4890
|
};
|
4893
4891
|
}
|
4894
4892
|
//# sourceMappingURL=render-utils.js.map
|
4895
|
-
;//
|
4896
|
-
|
4897
|
-
|
4898
|
-
|
4899
|
-
|
4900
|
-
|
4901
|
-
|
4902
|
-
|
4893
|
+
;// ../../node_modules/diff2html/lib-esm/file-list-renderer.js
|
4894
|
+
|
4895
|
+
const baseTemplatesPath = 'file-summary';
|
4896
|
+
const iconsBaseTemplatesPath = 'icon';
|
4897
|
+
const defaultFileListRendererConfig = {
|
4898
|
+
colorScheme: defaultRenderConfig.colorScheme,
|
4899
|
+
};
|
4900
|
+
class FileListRenderer {
|
4901
|
+
constructor(hoganUtils, config = {}) {
|
4902
|
+
this.hoganUtils = hoganUtils;
|
4903
|
+
this.config = Object.assign(Object.assign({}, defaultFileListRendererConfig), config);
|
4904
|
+
}
|
4905
|
+
render(diffFiles) {
|
4906
|
+
const files = diffFiles
|
4907
|
+
.map(file => this.hoganUtils.render(baseTemplatesPath, 'line', {
|
4903
4908
|
fileHtmlId: getHtmlId(file),
|
4904
4909
|
oldName: file.oldName,
|
4905
4910
|
newName: file.newName,
|
@@ -4907,65 +4912,56 @@ function render(diffFiles, hoganUtils) {
|
|
4907
4912
|
deletedLines: '-' + file.deletedLines,
|
4908
4913
|
addedLines: '+' + file.addedLines,
|
4909
4914
|
}, {
|
4910
|
-
fileIcon: hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)),
|
4915
|
+
fileIcon: this.hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)),
|
4916
|
+
}))
|
4917
|
+
.join('\n');
|
4918
|
+
return this.hoganUtils.render(baseTemplatesPath, 'wrapper', {
|
4919
|
+
colorScheme: colorSchemeToCss(this.config.colorScheme),
|
4920
|
+
filesNumber: diffFiles.length,
|
4921
|
+
files: files,
|
4911
4922
|
});
|
4912
|
-
}
|
4913
|
-
.join('\n');
|
4914
|
-
return hoganUtils.render(baseTemplatesPath, 'wrapper', {
|
4915
|
-
filesNumber: diffFiles.length,
|
4916
|
-
files: files,
|
4917
|
-
});
|
4923
|
+
}
|
4918
4924
|
}
|
4919
4925
|
//# sourceMappingURL=file-list-renderer.js.map
|
4920
|
-
;//
|
4921
|
-
var line_by_line_renderer_assign = (undefined && undefined.__assign) || function () {
|
4922
|
-
line_by_line_renderer_assign = Object.assign || function(t) {
|
4923
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4924
|
-
s = arguments[i];
|
4925
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
4926
|
-
t[p] = s[p];
|
4927
|
-
}
|
4928
|
-
return t;
|
4929
|
-
};
|
4930
|
-
return line_by_line_renderer_assign.apply(this, arguments);
|
4931
|
-
};
|
4926
|
+
;// ../../node_modules/diff2html/lib-esm/line-by-line-renderer.js
|
4932
4927
|
|
4933
4928
|
|
4934
4929
|
|
4935
|
-
|
4936
|
-
|
4937
|
-
|
4938
|
-
|
4939
|
-
|
4940
|
-
|
4941
|
-
|
4942
|
-
if (config === void 0) { config = {}; }
|
4930
|
+
const defaultLineByLineRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 });
|
4931
|
+
const genericTemplatesPath = 'generic';
|
4932
|
+
const line_by_line_renderer_baseTemplatesPath = 'line-by-line';
|
4933
|
+
const line_by_line_renderer_iconsBaseTemplatesPath = 'icon';
|
4934
|
+
const tagsBaseTemplatesPath = 'tag';
|
4935
|
+
class LineByLineRenderer {
|
4936
|
+
constructor(hoganUtils, config = {}) {
|
4943
4937
|
this.hoganUtils = hoganUtils;
|
4944
|
-
this.config =
|
4938
|
+
this.config = Object.assign(Object.assign({}, defaultLineByLineRendererConfig), config);
|
4945
4939
|
}
|
4946
|
-
|
4947
|
-
|
4948
|
-
|
4949
|
-
|
4950
|
-
var diffs;
|
4940
|
+
render(diffFiles) {
|
4941
|
+
const diffsHtml = diffFiles
|
4942
|
+
.map(file => {
|
4943
|
+
let diffs;
|
4951
4944
|
if (file.blocks.length) {
|
4952
|
-
diffs =
|
4945
|
+
diffs = this.generateFileHtml(file);
|
4953
4946
|
}
|
4954
4947
|
else {
|
4955
|
-
diffs =
|
4948
|
+
diffs = this.generateEmptyDiff();
|
4956
4949
|
}
|
4957
|
-
return
|
4950
|
+
return this.makeFileDiffHtml(file, diffs);
|
4958
4951
|
})
|
4959
4952
|
.join('\n');
|
4960
|
-
return this.hoganUtils.render(genericTemplatesPath, 'wrapper', {
|
4961
|
-
|
4962
|
-
|
4953
|
+
return this.hoganUtils.render(genericTemplatesPath, 'wrapper', {
|
4954
|
+
colorScheme: colorSchemeToCss(this.config.colorScheme),
|
4955
|
+
content: diffsHtml,
|
4956
|
+
});
|
4957
|
+
}
|
4958
|
+
makeFileDiffHtml(file, diffs) {
|
4963
4959
|
if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0)
|
4964
4960
|
return '';
|
4965
|
-
|
4966
|
-
|
4967
|
-
|
4968
|
-
|
4961
|
+
const fileDiffTemplate = this.hoganUtils.template(line_by_line_renderer_baseTemplatesPath, 'file-diff');
|
4962
|
+
const filePathTemplate = this.hoganUtils.template(genericTemplatesPath, 'file-path');
|
4963
|
+
const fileIconTemplate = this.hoganUtils.template(line_by_line_renderer_iconsBaseTemplatesPath, 'file');
|
4964
|
+
const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, getFileIcon(file));
|
4969
4965
|
return fileDiffTemplate.render({
|
4970
4966
|
file: file,
|
4971
4967
|
fileHtmlId: getHtmlId(file),
|
@@ -4977,38 +4973,35 @@ var LineByLineRenderer = (function () {
|
|
4977
4973
|
fileTag: fileTagTemplate,
|
4978
4974
|
}),
|
4979
4975
|
});
|
4980
|
-
}
|
4981
|
-
|
4976
|
+
}
|
4977
|
+
generateEmptyDiff() {
|
4982
4978
|
return this.hoganUtils.render(genericTemplatesPath, 'empty-diff', {
|
4983
4979
|
contentClass: 'd2h-code-line',
|
4984
4980
|
CSSLineClass: CSSLineClass,
|
4985
4981
|
});
|
4986
|
-
}
|
4987
|
-
|
4988
|
-
|
4989
|
-
var matcher = newMatcherFn(newDistanceFn(function (e) { return deconstructLine(e.content, file.isCombined).content; }));
|
4982
|
+
}
|
4983
|
+
generateFileHtml(file) {
|
4984
|
+
const matcher = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content));
|
4990
4985
|
return file.blocks
|
4991
|
-
.map(
|
4992
|
-
|
4986
|
+
.map(block => {
|
4987
|
+
let lines = this.hoganUtils.render(genericTemplatesPath, 'block-header', {
|
4993
4988
|
CSSLineClass: CSSLineClass,
|
4994
4989
|
blockHeader: file.isTooBig ? block.header : escapeForHtml(block.header),
|
4995
4990
|
lineClass: 'd2h-code-linenumber',
|
4996
4991
|
contentClass: 'd2h-code-line',
|
4997
4992
|
});
|
4998
|
-
|
4999
|
-
var contextLines = _a[0], oldLines = _a[1], newLines = _a[2];
|
4993
|
+
this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => {
|
5000
4994
|
if (oldLines.length && newLines.length && !contextLines.length) {
|
5001
|
-
|
5002
|
-
|
5003
|
-
var _b = _this.processChangedLines(file, file.isCombined, oldLines, newLines), left = _b.left, right = _b.right;
|
4995
|
+
this.applyRematchMatching(oldLines, newLines, matcher).map(([oldLines, newLines]) => {
|
4996
|
+
const { left, right } = this.processChangedLines(file, file.isCombined, oldLines, newLines);
|
5004
4997
|
lines += left;
|
5005
4998
|
lines += right;
|
5006
4999
|
});
|
5007
5000
|
}
|
5008
5001
|
else if (contextLines.length) {
|
5009
|
-
contextLines.forEach(
|
5010
|
-
|
5011
|
-
lines +=
|
5002
|
+
contextLines.forEach(line => {
|
5003
|
+
const { prefix, content } = deconstructLine(line.content, file.isCombined);
|
5004
|
+
lines += this.generateSingleLineHtml(file, {
|
5012
5005
|
type: CSSLineClass.CONTEXT,
|
5013
5006
|
prefix: prefix,
|
5014
5007
|
content: content,
|
@@ -5018,7 +5011,7 @@ var LineByLineRenderer = (function () {
|
|
5018
5011
|
});
|
5019
5012
|
}
|
5020
5013
|
else if (oldLines.length || newLines.length) {
|
5021
|
-
|
5014
|
+
const { left, right } = this.processChangedLines(file, file.isCombined, oldLines, newLines);
|
5022
5015
|
lines += left;
|
5023
5016
|
lines += right;
|
5024
5017
|
}
|
@@ -5029,13 +5022,13 @@ var LineByLineRenderer = (function () {
|
|
5029
5022
|
return lines;
|
5030
5023
|
})
|
5031
5024
|
.join('\n');
|
5032
|
-
}
|
5033
|
-
|
5034
|
-
|
5035
|
-
|
5036
|
-
|
5037
|
-
for (
|
5038
|
-
|
5025
|
+
}
|
5026
|
+
applyLineGroupping(block) {
|
5027
|
+
const blockLinesGroups = [];
|
5028
|
+
let oldLines = [];
|
5029
|
+
let newLines = [];
|
5030
|
+
for (let i = 0; i < block.lines.length; i++) {
|
5031
|
+
const diffLine = block.lines[i];
|
5039
5032
|
if ((diffLine.type !== LineType.INSERT && newLines.length) ||
|
5040
5033
|
(diffLine.type === LineType.CONTEXT && oldLines.length > 0)) {
|
5041
5034
|
blockLinesGroups.push([[], oldLines, newLines]);
|
@@ -5061,59 +5054,59 @@ var LineByLineRenderer = (function () {
|
|
5061
5054
|
newLines = [];
|
5062
5055
|
}
|
5063
5056
|
return blockLinesGroups;
|
5064
|
-
}
|
5065
|
-
|
5066
|
-
|
5067
|
-
|
5068
|
-
|
5057
|
+
}
|
5058
|
+
applyRematchMatching(oldLines, newLines, matcher) {
|
5059
|
+
const comparisons = oldLines.length * newLines.length;
|
5060
|
+
const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(elem => elem.content.length)));
|
5061
|
+
const doMatching = comparisons < this.config.matchingMaxComparisons &&
|
5069
5062
|
maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison &&
|
5070
5063
|
(this.config.matching === 'lines' || this.config.matching === 'words');
|
5071
5064
|
return doMatching ? matcher(oldLines, newLines) : [[oldLines, newLines]];
|
5072
|
-
}
|
5073
|
-
|
5074
|
-
|
5065
|
+
}
|
5066
|
+
processChangedLines(file, isCombined, oldLines, newLines) {
|
5067
|
+
const fileHtml = {
|
5075
5068
|
right: '',
|
5076
5069
|
left: '',
|
5077
5070
|
};
|
5078
|
-
|
5079
|
-
for (
|
5080
|
-
|
5081
|
-
|
5082
|
-
|
5071
|
+
const maxLinesNumber = Math.max(oldLines.length, newLines.length);
|
5072
|
+
for (let i = 0; i < maxLinesNumber; i++) {
|
5073
|
+
const oldLine = oldLines[i];
|
5074
|
+
const newLine = newLines[i];
|
5075
|
+
const diff = oldLine !== undefined && newLine !== undefined
|
5083
5076
|
? diffHighlight(oldLine.content, newLine.content, isCombined, this.config)
|
5084
5077
|
: undefined;
|
5085
|
-
|
5086
|
-
?
|
5078
|
+
const preparedOldLine = oldLine !== undefined && oldLine.oldNumber !== undefined
|
5079
|
+
? Object.assign(Object.assign({}, (diff !== undefined
|
5087
5080
|
? {
|
5088
5081
|
prefix: diff.oldLine.prefix,
|
5089
5082
|
content: diff.oldLine.content,
|
5090
5083
|
type: CSSLineClass.DELETE_CHANGES,
|
5091
5084
|
}
|
5092
|
-
:
|
5093
|
-
|
5094
|
-
?
|
5085
|
+
: Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) }))), { oldNumber: oldLine.oldNumber, newNumber: oldLine.newNumber }) : undefined;
|
5086
|
+
const preparedNewLine = newLine !== undefined && newLine.newNumber !== undefined
|
5087
|
+
? Object.assign(Object.assign({}, (diff !== undefined
|
5095
5088
|
? {
|
5096
5089
|
prefix: diff.newLine.prefix,
|
5097
5090
|
content: diff.newLine.content,
|
5098
5091
|
type: CSSLineClass.INSERT_CHANGES,
|
5099
5092
|
}
|
5100
|
-
:
|
5101
|
-
|
5093
|
+
: Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) }))), { oldNumber: newLine.oldNumber, newNumber: newLine.newNumber }) : undefined;
|
5094
|
+
const { left, right } = this.generateLineHtml(file, preparedOldLine, preparedNewLine);
|
5102
5095
|
fileHtml.left += left;
|
5103
5096
|
fileHtml.right += right;
|
5104
5097
|
}
|
5105
5098
|
return fileHtml;
|
5106
|
-
}
|
5107
|
-
|
5099
|
+
}
|
5100
|
+
generateLineHtml(file, oldLine, newLine) {
|
5108
5101
|
return {
|
5109
5102
|
left: this.generateSingleLineHtml(file, oldLine),
|
5110
5103
|
right: this.generateSingleLineHtml(file, newLine),
|
5111
5104
|
};
|
5112
|
-
}
|
5113
|
-
|
5105
|
+
}
|
5106
|
+
generateSingleLineHtml(file, line) {
|
5114
5107
|
if (line === undefined)
|
5115
5108
|
return '';
|
5116
|
-
|
5109
|
+
const lineNumberHtml = this.hoganUtils.render(line_by_line_renderer_baseTemplatesPath, 'numbers', {
|
5117
5110
|
oldNumber: line.oldNumber || '',
|
5118
5111
|
newNumber: line.newNumber || '',
|
5119
5112
|
});
|
@@ -5124,63 +5117,51 @@ var LineByLineRenderer = (function () {
|
|
5124
5117
|
prefix: line.prefix === ' ' ? ' ' : line.prefix,
|
5125
5118
|
content: line.content,
|
5126
5119
|
lineNumber: lineNumberHtml,
|
5127
|
-
line
|
5128
|
-
file
|
5120
|
+
line,
|
5121
|
+
file,
|
5129
5122
|
});
|
5130
|
-
}
|
5131
|
-
|
5132
|
-
}());
|
5133
|
-
/* harmony default export */ const line_by_line_renderer = (LineByLineRenderer);
|
5123
|
+
}
|
5124
|
+
}
|
5134
5125
|
//# sourceMappingURL=line-by-line-renderer.js.map
|
5135
|
-
;//
|
5136
|
-
var side_by_side_renderer_assign = (undefined && undefined.__assign) || function () {
|
5137
|
-
side_by_side_renderer_assign = Object.assign || function(t) {
|
5138
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5139
|
-
s = arguments[i];
|
5140
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5141
|
-
t[p] = s[p];
|
5142
|
-
}
|
5143
|
-
return t;
|
5144
|
-
};
|
5145
|
-
return side_by_side_renderer_assign.apply(this, arguments);
|
5146
|
-
};
|
5126
|
+
;// ../../node_modules/diff2html/lib-esm/side-by-side-renderer.js
|
5147
5127
|
|
5148
5128
|
|
5149
5129
|
|
5150
|
-
|
5151
|
-
|
5152
|
-
|
5153
|
-
|
5154
|
-
|
5155
|
-
|
5156
|
-
|
5157
|
-
if (config === void 0) { config = {}; }
|
5130
|
+
const defaultSideBySideRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 });
|
5131
|
+
const side_by_side_renderer_genericTemplatesPath = 'generic';
|
5132
|
+
const side_by_side_renderer_baseTemplatesPath = 'side-by-side';
|
5133
|
+
const side_by_side_renderer_iconsBaseTemplatesPath = 'icon';
|
5134
|
+
const side_by_side_renderer_tagsBaseTemplatesPath = 'tag';
|
5135
|
+
class SideBySideRenderer {
|
5136
|
+
constructor(hoganUtils, config = {}) {
|
5158
5137
|
this.hoganUtils = hoganUtils;
|
5159
|
-
this.config =
|
5138
|
+
this.config = Object.assign(Object.assign({}, defaultSideBySideRendererConfig), config);
|
5160
5139
|
}
|
5161
|
-
|
5162
|
-
|
5163
|
-
|
5164
|
-
|
5165
|
-
var diffs;
|
5140
|
+
render(diffFiles) {
|
5141
|
+
const diffsHtml = diffFiles
|
5142
|
+
.map(file => {
|
5143
|
+
let diffs;
|
5166
5144
|
if (file.blocks.length) {
|
5167
|
-
diffs =
|
5145
|
+
diffs = this.generateFileHtml(file);
|
5168
5146
|
}
|
5169
5147
|
else {
|
5170
|
-
diffs =
|
5148
|
+
diffs = this.generateEmptyDiff();
|
5171
5149
|
}
|
5172
|
-
return
|
5150
|
+
return this.makeFileDiffHtml(file, diffs);
|
5173
5151
|
})
|
5174
5152
|
.join('\n');
|
5175
|
-
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'wrapper', {
|
5176
|
-
|
5177
|
-
|
5153
|
+
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'wrapper', {
|
5154
|
+
colorScheme: colorSchemeToCss(this.config.colorScheme),
|
5155
|
+
content: diffsHtml,
|
5156
|
+
});
|
5157
|
+
}
|
5158
|
+
makeFileDiffHtml(file, diffs) {
|
5178
5159
|
if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0)
|
5179
5160
|
return '';
|
5180
|
-
|
5181
|
-
|
5182
|
-
|
5183
|
-
|
5161
|
+
const fileDiffTemplate = this.hoganUtils.template(side_by_side_renderer_baseTemplatesPath, 'file-diff');
|
5162
|
+
const filePathTemplate = this.hoganUtils.template(side_by_side_renderer_genericTemplatesPath, 'file-path');
|
5163
|
+
const fileIconTemplate = this.hoganUtils.template(side_by_side_renderer_iconsBaseTemplatesPath, 'file');
|
5164
|
+
const fileTagTemplate = this.hoganUtils.template(side_by_side_renderer_tagsBaseTemplatesPath, getFileIcon(file));
|
5184
5165
|
return fileDiffTemplate.render({
|
5185
5166
|
file: file,
|
5186
5167
|
fileHtmlId: getHtmlId(file),
|
@@ -5192,8 +5173,8 @@ var SideBySideRenderer = (function () {
|
|
5192
5173
|
fileTag: fileTagTemplate,
|
5193
5174
|
}),
|
5194
5175
|
});
|
5195
|
-
}
|
5196
|
-
|
5176
|
+
}
|
5177
|
+
generateEmptyDiff() {
|
5197
5178
|
return {
|
5198
5179
|
right: '',
|
5199
5180
|
left: this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'empty-diff', {
|
@@ -5201,30 +5182,27 @@ var SideBySideRenderer = (function () {
|
|
5201
5182
|
CSSLineClass: CSSLineClass,
|
5202
5183
|
}),
|
5203
5184
|
};
|
5204
|
-
}
|
5205
|
-
|
5206
|
-
|
5207
|
-
var matcher = newMatcherFn(newDistanceFn(function (e) { return deconstructLine(e.content, file.isCombined).content; }));
|
5185
|
+
}
|
5186
|
+
generateFileHtml(file) {
|
5187
|
+
const matcher = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content));
|
5208
5188
|
return file.blocks
|
5209
|
-
.map(
|
5210
|
-
|
5211
|
-
left:
|
5212
|
-
right:
|
5189
|
+
.map(block => {
|
5190
|
+
const fileHtml = {
|
5191
|
+
left: this.makeHeaderHtml(block.header, file),
|
5192
|
+
right: this.makeHeaderHtml(''),
|
5213
5193
|
};
|
5214
|
-
|
5215
|
-
var contextLines = _a[0], oldLines = _a[1], newLines = _a[2];
|
5194
|
+
this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => {
|
5216
5195
|
if (oldLines.length && newLines.length && !contextLines.length) {
|
5217
|
-
|
5218
|
-
|
5219
|
-
var _b = _this.processChangedLines(file.isCombined, oldLines, newLines), left = _b.left, right = _b.right;
|
5196
|
+
this.applyRematchMatching(oldLines, newLines, matcher).map(([oldLines, newLines]) => {
|
5197
|
+
const { left, right } = this.processChangedLines(file.isCombined, oldLines, newLines);
|
5220
5198
|
fileHtml.left += left;
|
5221
5199
|
fileHtml.right += right;
|
5222
5200
|
});
|
5223
5201
|
}
|
5224
5202
|
else if (contextLines.length) {
|
5225
|
-
contextLines.forEach(
|
5226
|
-
|
5227
|
-
|
5203
|
+
contextLines.forEach(line => {
|
5204
|
+
const { prefix, content } = deconstructLine(line.content, file.isCombined);
|
5205
|
+
const { left, right } = this.generateLineHtml({
|
5228
5206
|
type: CSSLineClass.CONTEXT,
|
5229
5207
|
prefix: prefix,
|
5230
5208
|
content: content,
|
@@ -5234,13 +5212,13 @@ var SideBySideRenderer = (function () {
|
|
5234
5212
|
prefix: prefix,
|
5235
5213
|
content: content,
|
5236
5214
|
number: line.newNumber,
|
5237
|
-
})
|
5215
|
+
});
|
5238
5216
|
fileHtml.left += left;
|
5239
5217
|
fileHtml.right += right;
|
5240
5218
|
});
|
5241
5219
|
}
|
5242
5220
|
else if (oldLines.length || newLines.length) {
|
5243
|
-
|
5221
|
+
const { left, right } = this.processChangedLines(file.isCombined, oldLines, newLines);
|
5244
5222
|
fileHtml.left += left;
|
5245
5223
|
fileHtml.right += right;
|
5246
5224
|
}
|
@@ -5250,16 +5228,16 @@ var SideBySideRenderer = (function () {
|
|
5250
5228
|
});
|
5251
5229
|
return fileHtml;
|
5252
5230
|
})
|
5253
|
-
.reduce(
|
5231
|
+
.reduce((accomulated, html) => {
|
5254
5232
|
return { left: accomulated.left + html.left, right: accomulated.right + html.right };
|
5255
5233
|
}, { left: '', right: '' });
|
5256
|
-
}
|
5257
|
-
|
5258
|
-
|
5259
|
-
|
5260
|
-
|
5261
|
-
for (
|
5262
|
-
|
5234
|
+
}
|
5235
|
+
applyLineGroupping(block) {
|
5236
|
+
const blockLinesGroups = [];
|
5237
|
+
let oldLines = [];
|
5238
|
+
let newLines = [];
|
5239
|
+
for (let i = 0; i < block.lines.length; i++) {
|
5240
|
+
const diffLine = block.lines[i];
|
5263
5241
|
if ((diffLine.type !== LineType.INSERT && newLines.length) ||
|
5264
5242
|
(diffLine.type === LineType.CONTEXT && oldLines.length > 0)) {
|
5265
5243
|
blockLinesGroups.push([[], oldLines, newLines]);
|
@@ -5285,86 +5263,84 @@ var SideBySideRenderer = (function () {
|
|
5285
5263
|
newLines = [];
|
5286
5264
|
}
|
5287
5265
|
return blockLinesGroups;
|
5288
|
-
}
|
5289
|
-
|
5290
|
-
|
5291
|
-
|
5292
|
-
|
5266
|
+
}
|
5267
|
+
applyRematchMatching(oldLines, newLines, matcher) {
|
5268
|
+
const comparisons = oldLines.length * newLines.length;
|
5269
|
+
const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(elem => elem.content.length)));
|
5270
|
+
const doMatching = comparisons < this.config.matchingMaxComparisons &&
|
5293
5271
|
maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison &&
|
5294
5272
|
(this.config.matching === 'lines' || this.config.matching === 'words');
|
5295
5273
|
return doMatching ? matcher(oldLines, newLines) : [[oldLines, newLines]];
|
5296
|
-
}
|
5297
|
-
|
5274
|
+
}
|
5275
|
+
makeHeaderHtml(blockHeader, file) {
|
5298
5276
|
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'block-header', {
|
5299
5277
|
CSSLineClass: CSSLineClass,
|
5300
5278
|
blockHeader: (file === null || file === void 0 ? void 0 : file.isTooBig) ? blockHeader : escapeForHtml(blockHeader),
|
5301
5279
|
lineClass: 'd2h-code-side-linenumber',
|
5302
5280
|
contentClass: 'd2h-code-side-line',
|
5303
5281
|
});
|
5304
|
-
}
|
5305
|
-
|
5306
|
-
|
5282
|
+
}
|
5283
|
+
processChangedLines(isCombined, oldLines, newLines) {
|
5284
|
+
const fileHtml = {
|
5307
5285
|
right: '',
|
5308
5286
|
left: '',
|
5309
5287
|
};
|
5310
|
-
|
5311
|
-
for (
|
5312
|
-
|
5313
|
-
|
5314
|
-
|
5288
|
+
const maxLinesNumber = Math.max(oldLines.length, newLines.length);
|
5289
|
+
for (let i = 0; i < maxLinesNumber; i++) {
|
5290
|
+
const oldLine = oldLines[i];
|
5291
|
+
const newLine = newLines[i];
|
5292
|
+
const diff = oldLine !== undefined && newLine !== undefined
|
5315
5293
|
? diffHighlight(oldLine.content, newLine.content, isCombined, this.config)
|
5316
5294
|
: undefined;
|
5317
|
-
|
5318
|
-
?
|
5295
|
+
const preparedOldLine = oldLine !== undefined && oldLine.oldNumber !== undefined
|
5296
|
+
? Object.assign(Object.assign({}, (diff !== undefined
|
5319
5297
|
? {
|
5320
5298
|
prefix: diff.oldLine.prefix,
|
5321
5299
|
content: diff.oldLine.content,
|
5322
5300
|
type: CSSLineClass.DELETE_CHANGES,
|
5323
5301
|
}
|
5324
|
-
:
|
5325
|
-
|
5326
|
-
?
|
5302
|
+
: Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) }))), { number: oldLine.oldNumber }) : undefined;
|
5303
|
+
const preparedNewLine = newLine !== undefined && newLine.newNumber !== undefined
|
5304
|
+
? Object.assign(Object.assign({}, (diff !== undefined
|
5327
5305
|
? {
|
5328
5306
|
prefix: diff.newLine.prefix,
|
5329
5307
|
content: diff.newLine.content,
|
5330
5308
|
type: CSSLineClass.INSERT_CHANGES,
|
5331
5309
|
}
|
5332
|
-
:
|
5333
|
-
|
5310
|
+
: Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) }))), { number: newLine.newNumber }) : undefined;
|
5311
|
+
const { left, right } = this.generateLineHtml(preparedOldLine, preparedNewLine);
|
5334
5312
|
fileHtml.left += left;
|
5335
5313
|
fileHtml.right += right;
|
5336
5314
|
}
|
5337
5315
|
return fileHtml;
|
5338
|
-
}
|
5339
|
-
|
5316
|
+
}
|
5317
|
+
generateLineHtml(oldLine, newLine) {
|
5340
5318
|
return {
|
5341
5319
|
left: this.generateSingleHtml(oldLine),
|
5342
5320
|
right: this.generateSingleHtml(newLine),
|
5343
5321
|
};
|
5344
|
-
}
|
5345
|
-
|
5346
|
-
|
5347
|
-
|
5322
|
+
}
|
5323
|
+
generateSingleHtml(line) {
|
5324
|
+
const lineClass = 'd2h-code-side-linenumber';
|
5325
|
+
const contentClass = 'd2h-code-side-line';
|
5348
5326
|
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'line', {
|
5349
|
-
type: (line === null || line === void 0 ? void 0 : line.type) ||
|
5350
|
-
lineClass: line !== undefined ? lineClass :
|
5351
|
-
contentClass: line !== undefined ? contentClass :
|
5327
|
+
type: (line === null || line === void 0 ? void 0 : line.type) || `${CSSLineClass.CONTEXT} d2h-emptyplaceholder`,
|
5328
|
+
lineClass: line !== undefined ? lineClass : `${lineClass} d2h-code-side-emptyplaceholder`,
|
5329
|
+
contentClass: line !== undefined ? contentClass : `${contentClass} d2h-code-side-emptyplaceholder`,
|
5352
5330
|
prefix: (line === null || line === void 0 ? void 0 : line.prefix) === ' ' ? ' ' : line === null || line === void 0 ? void 0 : line.prefix,
|
5353
5331
|
content: line === null || line === void 0 ? void 0 : line.content,
|
5354
5332
|
lineNumber: line === null || line === void 0 ? void 0 : line.number,
|
5355
5333
|
});
|
5356
|
-
}
|
5357
|
-
|
5358
|
-
}());
|
5359
|
-
/* harmony default export */ const side_by_side_renderer = (SideBySideRenderer);
|
5334
|
+
}
|
5335
|
+
}
|
5360
5336
|
//# sourceMappingURL=side-by-side-renderer.js.map
|
5361
5337
|
// EXTERNAL MODULE: ../../node_modules/hogan.js/lib/hogan.js
|
5362
|
-
var hogan = __webpack_require__(
|
5363
|
-
;//
|
5338
|
+
var hogan = __webpack_require__(2133);
|
5339
|
+
;// ../../node_modules/diff2html/lib-esm/diff2html-templates.js
|
5364
5340
|
|
5365
|
-
|
5341
|
+
const defaultTemplates = {};
|
5366
5342
|
defaultTemplates["file-summary-line"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<li class=\"d2h-file-list-line\">"); t.b("\n" + i); t.b(" <span class=\"d2h-file-name-wrapper\">"); t.b("\n" + i); t.b(t.rp("<fileIcon0", c, p, " ")); t.b(" <a href=\"#"); t.b(t.v(t.f("fileHtmlId", c, p, 0))); t.b("\" class=\"d2h-file-name\">"); t.b(t.v(t.f("fileName", c, p, 0))); t.b("</a>"); t.b("\n" + i); t.b(" <span class=\"d2h-file-stats\">"); t.b("\n" + i); t.b(" <span class=\"d2h-lines-added\">"); t.b(t.v(t.f("addedLines", c, p, 0))); t.b("</span>"); t.b("\n" + i); t.b(" <span class=\"d2h-lines-deleted\">"); t.b(t.v(t.f("deletedLines", c, p, 0))); t.b("</span>"); t.b("\n" + i); t.b(" </span>"); t.b("\n" + i); t.b(" </span>"); t.b("\n" + i); t.b("</li>"); return t.fl(); }, partials: { "<fileIcon0": { name: "fileIcon", partials: {}, subs: {} } }, subs: {} });
|
5367
|
-
defaultTemplates["file-summary-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-file-list-wrapper\">"); t.b("\n" + i); t.b(" <div class=\"d2h-file-list-header\">"); t.b("\n" + i); t.b(" <span class=\"d2h-file-list-title\">Files changed ("); t.b(t.v(t.f("filesNumber", c, p, 0))); t.b(")</span>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-hide\">hide</a>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-show\">show</a>"); t.b("\n" + i); t.b(" </div>"); t.b("\n" + i); t.b(" <ol class=\"d2h-file-list\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("files", c, p, 0))); t.b("\n" + i); t.b(" </ol>"); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5343
|
+
defaultTemplates["file-summary-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-file-list-wrapper "); t.b(t.v(t.f("colorScheme", c, p, 0))); t.b("\">"); t.b("\n" + i); t.b(" <div class=\"d2h-file-list-header\">"); t.b("\n" + i); t.b(" <span class=\"d2h-file-list-title\">Files changed ("); t.b(t.v(t.f("filesNumber", c, p, 0))); t.b(")</span>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-hide\">hide</a>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-show\">show</a>"); t.b("\n" + i); t.b(" </div>"); t.b("\n" + i); t.b(" <ol class=\"d2h-file-list\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("files", c, p, 0))); t.b("\n" + i); t.b(" </ol>"); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5368
5344
|
defaultTemplates["generic-block-header"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<tr>"); t.b("\n" + i); t.b(" <td class=\""); t.b(t.v(t.f("lineClass", c, p, 0))); t.b(" "); t.b(t.v(t.d("CSSLineClass.INFO", c, p, 0))); t.b("\"></td>"); t.b("\n" + i); t.b(" <td class=\""); t.b(t.v(t.d("CSSLineClass.INFO", c, p, 0))); t.b("\">"); t.b("\n" + i); t.b(" <div class=\""); t.b(t.v(t.f("contentClass", c, p, 0))); t.b("\">"); if (t.s(t.f("blockHeader", c, p, 1), c, p, 0, 156, 173, "{{ }}")) {
|
5369
5345
|
t.rs(c, p, function (c, p, t) { t.b(t.t(t.f("blockHeader", c, p, 0))); });
|
5370
5346
|
c.pop();
|
@@ -5386,7 +5362,7 @@ defaultTemplates["generic-line"] = new hogan.Template({ code: function (c, p, i)
|
|
5386
5362
|
t.b(" <span class=\"d2h-code-line-ctn\"><br></span>");
|
5387
5363
|
t.b("\n" + i);
|
5388
5364
|
} ; t.b(" </div>"); t.b("\n" + i); t.b(" </td>"); t.b("\n" + i); t.b("</tr>"); return t.fl(); }, partials: {}, subs: {} });
|
5389
|
-
defaultTemplates["generic-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-wrapper\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("content", c, p, 0))); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5365
|
+
defaultTemplates["generic-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-wrapper "); t.b(t.v(t.f("colorScheme", c, p, 0))); t.b("\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("content", c, p, 0))); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5390
5366
|
defaultTemplates["icon-file-added"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-added\" height=\"16\" title=\"added\" version=\"1.1\" viewBox=\"0 0 14 16\""); t.b("\n" + i); t.b(" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
5391
5367
|
defaultTemplates["icon-file-changed"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-changed\" height=\"16\" title=\"modified\" version=\"1.1\""); t.b("\n" + i); t.b(" viewBox=\"0 0 14 16\" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
5392
5368
|
defaultTemplates["icon-file-deleted"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-deleted\" height=\"16\" title=\"removed\" version=\"1.1\""); t.b("\n" + i); t.b(" viewBox=\"0 0 14 16\" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
@@ -5400,92 +5376,65 @@ defaultTemplates["tag-file-changed"] = new hogan.Template({ code: function (c, p
|
|
5400
5376
|
defaultTemplates["tag-file-deleted"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<span class=\"d2h-tag d2h-deleted d2h-deleted-tag\">DELETED</span>"); return t.fl(); }, partials: {}, subs: {} });
|
5401
5377
|
defaultTemplates["tag-file-renamed"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<span class=\"d2h-tag d2h-moved d2h-moved-tag\">RENAMED</span>"); return t.fl(); }, partials: {}, subs: {} });
|
5402
5378
|
//# sourceMappingURL=diff2html-templates.js.map
|
5403
|
-
;//
|
5404
|
-
var hoganjs_utils_assign = (undefined && undefined.__assign) || function () {
|
5405
|
-
hoganjs_utils_assign = Object.assign || function(t) {
|
5406
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5407
|
-
s = arguments[i];
|
5408
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5409
|
-
t[p] = s[p];
|
5410
|
-
}
|
5411
|
-
return t;
|
5412
|
-
};
|
5413
|
-
return hoganjs_utils_assign.apply(this, arguments);
|
5414
|
-
};
|
5379
|
+
;// ../../node_modules/diff2html/lib-esm/hoganjs-utils.js
|
5415
5380
|
|
5416
5381
|
|
5417
|
-
|
5418
|
-
|
5419
|
-
|
5420
|
-
|
5421
|
-
|
5422
|
-
var name = _a[0], templateString = _a[1];
|
5423
|
-
var compiledTemplate = hogan.compile(templateString, { asString: false });
|
5424
|
-
return hoganjs_utils_assign(hoganjs_utils_assign({}, previousTemplates), (_b = {}, _b[name] = compiledTemplate, _b));
|
5382
|
+
class HoganJsUtils {
|
5383
|
+
constructor({ compiledTemplates = {}, rawTemplates = {} }) {
|
5384
|
+
const compiledRawTemplates = Object.entries(rawTemplates).reduce((previousTemplates, [name, templateString]) => {
|
5385
|
+
const compiledTemplate = hogan.compile(templateString, { asString: false });
|
5386
|
+
return Object.assign(Object.assign({}, previousTemplates), { [name]: compiledTemplate });
|
5425
5387
|
}, {});
|
5426
|
-
this.preCompiledTemplates =
|
5388
|
+
this.preCompiledTemplates = Object.assign(Object.assign(Object.assign({}, defaultTemplates), compiledTemplates), compiledRawTemplates);
|
5427
5389
|
}
|
5428
|
-
|
5390
|
+
static compile(templateString) {
|
5429
5391
|
return hogan.compile(templateString, { asString: false });
|
5430
|
-
}
|
5431
|
-
|
5432
|
-
|
5392
|
+
}
|
5393
|
+
render(namespace, view, params, partials, indent) {
|
5394
|
+
const templateKey = this.templateKey(namespace, view);
|
5433
5395
|
try {
|
5434
|
-
|
5396
|
+
const template = this.preCompiledTemplates[templateKey];
|
5435
5397
|
return template.render(params, partials, indent);
|
5436
5398
|
}
|
5437
5399
|
catch (e) {
|
5438
|
-
throw new Error(
|
5400
|
+
throw new Error(`Could not find template to render '${templateKey}'`);
|
5439
5401
|
}
|
5440
|
-
}
|
5441
|
-
|
5402
|
+
}
|
5403
|
+
template(namespace, view) {
|
5442
5404
|
return this.preCompiledTemplates[this.templateKey(namespace, view)];
|
5443
|
-
}
|
5444
|
-
|
5445
|
-
return
|
5446
|
-
}
|
5447
|
-
|
5448
|
-
}());
|
5449
|
-
/* harmony default export */ const hoganjs_utils = (HoganJsUtils);
|
5405
|
+
}
|
5406
|
+
templateKey(namespace, view) {
|
5407
|
+
return `${namespace}-${view}`;
|
5408
|
+
}
|
5409
|
+
}
|
5450
5410
|
//# sourceMappingURL=hoganjs-utils.js.map
|
5451
|
-
;//
|
5452
|
-
var diff2html_assign = (undefined && undefined.__assign) || function () {
|
5453
|
-
diff2html_assign = Object.assign || function(t) {
|
5454
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5455
|
-
s = arguments[i];
|
5456
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5457
|
-
t[p] = s[p];
|
5458
|
-
}
|
5459
|
-
return t;
|
5460
|
-
};
|
5461
|
-
return diff2html_assign.apply(this, arguments);
|
5462
|
-
};
|
5411
|
+
;// ../../node_modules/diff2html/lib-esm/diff2html.js
|
5463
5412
|
|
5464
5413
|
|
5465
5414
|
|
5466
5415
|
|
5467
5416
|
|
5468
5417
|
|
5469
|
-
|
5470
|
-
function diff2html_parse(diffInput, configuration) {
|
5471
|
-
|
5472
|
-
return DiffParser.parse(diffInput, diff2html_assign(diff2html_assign({}, defaultDiff2HtmlConfig), configuration));
|
5418
|
+
const defaultDiff2HtmlConfig = Object.assign(Object.assign(Object.assign({}, defaultLineByLineRendererConfig), defaultSideBySideRendererConfig), { outputFormat: OutputFormatType.LINE_BY_LINE, drawFileList: true });
|
5419
|
+
function diff2html_parse(diffInput, configuration = {}) {
|
5420
|
+
return DiffParser.parse(diffInput, Object.assign(Object.assign({}, defaultDiff2HtmlConfig), configuration));
|
5473
5421
|
}
|
5474
|
-
function html(diffInput, configuration) {
|
5475
|
-
|
5476
|
-
|
5477
|
-
|
5478
|
-
|
5479
|
-
|
5480
|
-
|
5481
|
-
|
5482
|
-
|
5422
|
+
function html(diffInput, configuration = {}) {
|
5423
|
+
const config = Object.assign(Object.assign({}, defaultDiff2HtmlConfig), configuration);
|
5424
|
+
const diffJson = typeof diffInput === 'string' ? parse(diffInput, config) : diffInput;
|
5425
|
+
const hoganUtils = new HoganJsUtils(config);
|
5426
|
+
const { colorScheme } = config;
|
5427
|
+
const fileListRendererConfig = { colorScheme };
|
5428
|
+
const fileList = config.drawFileList ? new FileListRenderer(hoganUtils, fileListRendererConfig).render(diffJson) : '';
|
5429
|
+
const diffOutput = config.outputFormat === 'side-by-side'
|
5430
|
+
? new SideBySideRenderer(hoganUtils, config).render(diffJson)
|
5431
|
+
: new LineByLineRenderer(hoganUtils, config).render(diffJson);
|
5483
5432
|
return fileList + diffOutput;
|
5484
5433
|
}
|
5485
5434
|
//# sourceMappingURL=diff2html.js.map
|
5486
5435
|
// EXTERNAL MODULE: ../../node_modules/diff2html/bundles/css/diff2html.min.css
|
5487
|
-
var diff2html_min = __webpack_require__(
|
5488
|
-
;//
|
5436
|
+
var diff2html_min = __webpack_require__(6284);
|
5437
|
+
;// ../../packages/code-diff/src/code-diff.tsx
|
5489
5438
|
|
5490
5439
|
|
5491
5440
|
/*
|
@@ -5603,7 +5552,7 @@ function changeCodeCls(htmlStr, lang) {
|
|
5603
5552
|
};
|
5604
5553
|
}
|
5605
5554
|
}));
|
5606
|
-
;//
|
5555
|
+
;// ../../packages/code-diff/src/index.ts
|
5607
5556
|
/*
|
5608
5557
|
* Tencent is pleased to support the open source community by making
|
5609
5558
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -5633,7 +5582,5 @@ function changeCodeCls(htmlStr, lang) {
|
|
5633
5582
|
|
5634
5583
|
var BkCodeDiff = (0,shared_namespaceObject.withInstall)(code_diff);
|
5635
5584
|
/* harmony default export */ const src = (BkCodeDiff);
|
5636
|
-
})();
|
5637
|
-
|
5638
5585
|
var __webpack_exports__default = __webpack_exports__["default"];
|
5639
5586
|
export { __webpack_exports__default as default };
|