bkui-vue 0.0.1-beta.66 → 0.0.1-beta.67
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 +30 -30
- package/dist/index.esm.js +915 -240
- package/dist/index.umd.js +29 -29
- package/dist/style.css +1 -1
- package/lib/button/button.css +29 -17
- package/lib/button/button.less +11 -8
- package/lib/button/button.variable.css +29 -17
- package/lib/button/index.js +1 -1
- package/lib/code-diff/index.js +1 -2
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -1
- package/lib/date-picker/date-picker.d.ts +1 -1
- package/lib/date-picker/index.d.ts +4 -4
- package/lib/dropdown/index.js +1 -1
- package/lib/form/form-item.d.ts +11 -1
- package/lib/form/form.css +8 -0
- package/lib/form/form.less +8 -1
- package/lib/form/form.variable.css +8 -0
- package/lib/form/index.d.ts +8 -1
- package/lib/form/index.js +1 -1
- package/lib/form/type.d.ts +3 -2
- package/lib/icon/exclamation-circle-shape.d.ts +4 -0
- package/lib/icon/{folder.js → exclamation-circle-shape.js} +1 -1
- package/lib/icon/funnel.js +1 -0
- package/lib/icon/index.d.ts +3 -2
- package/lib/icon/index.js +1 -1
- package/lib/input/index.d.ts +137 -47
- package/lib/input/index.js +1 -1
- package/lib/input/input.d.ts +67 -12
- package/lib/select/index.d.ts +4 -4
- package/lib/select/select.d.ts +1 -1
- package/lib/shared/index.d.ts +1 -0
- package/lib/shared/index.js +1 -1
- package/lib/shared/token.d.ts +2 -0
- package/lib/shared/vue-types.d.ts +4 -0
- package/lib/slider/index.js +1 -1
- package/lib/tree/constant.d.ts +9 -4
- package/lib/tree/index.d.ts +23 -15
- package/lib/tree/index.js +1 -1
- package/lib/tree/tree.d.ts +8 -5
- package/package.json +2 -1
- package/lib/code-diff/index.js.LICENSE.txt +0 -37
package/lib/button/button.css
CHANGED
@@ -43,17 +43,20 @@
|
|
43
43
|
}
|
44
44
|
.bk-button.bk-button-primary.is-text {
|
45
45
|
color: #3a84ff;
|
46
|
-
background:
|
46
|
+
background-color: transparent;
|
47
47
|
border: none;
|
48
48
|
}
|
49
|
-
.bk-button.bk-button-primary.is-text:hover {
|
49
|
+
.bk-button.bk-button-primary.is-text:not(.is-disabled):hover {
|
50
50
|
color: #5594fa;
|
51
51
|
}
|
52
52
|
.bk-button.bk-button-primary.is-disabled {
|
53
|
+
color: #dcdee5;
|
54
|
+
cursor: not-allowed;
|
55
|
+
}
|
56
|
+
.bk-button.bk-button-primary.is-disabled:not(.is-text) {
|
53
57
|
background-color: #dcdee5;
|
54
|
-
border-color: #dcdee5;
|
55
58
|
color: white;
|
56
|
-
|
59
|
+
border-color: #dcdee5;
|
57
60
|
}
|
58
61
|
.bk-button.bk-button-hover-primary:hover {
|
59
62
|
background-color: #5594fa;
|
@@ -86,17 +89,20 @@
|
|
86
89
|
}
|
87
90
|
.bk-button.bk-button-warning.is-text {
|
88
91
|
color: #ff9c01;
|
89
|
-
background:
|
92
|
+
background-color: transparent;
|
90
93
|
border: none;
|
91
94
|
}
|
92
|
-
.bk-button.bk-button-warning.is-text:hover {
|
95
|
+
.bk-button.bk-button-warning.is-text:not(.is-disabled):hover {
|
93
96
|
color: #ffb848;
|
94
97
|
}
|
95
98
|
.bk-button.bk-button-warning.is-disabled {
|
99
|
+
color: #dcdee5;
|
100
|
+
cursor: not-allowed;
|
101
|
+
}
|
102
|
+
.bk-button.bk-button-warning.is-disabled:not(.is-text) {
|
96
103
|
background-color: #dcdee5;
|
97
|
-
border-color: #dcdee5;
|
98
104
|
color: white;
|
99
|
-
|
105
|
+
border-color: #dcdee5;
|
100
106
|
}
|
101
107
|
.bk-button.bk-button-hover-warning:hover {
|
102
108
|
background-color: #ffb848;
|
@@ -129,17 +135,20 @@
|
|
129
135
|
}
|
130
136
|
.bk-button.bk-button-success.is-text {
|
131
137
|
color: #2dcb56;
|
132
|
-
background:
|
138
|
+
background-color: transparent;
|
133
139
|
border: none;
|
134
140
|
}
|
135
|
-
.bk-button.bk-button-success.is-text:hover {
|
141
|
+
.bk-button.bk-button-success.is-text:not(.is-disabled):hover {
|
136
142
|
color: #45e35f;
|
137
143
|
}
|
138
144
|
.bk-button.bk-button-success.is-disabled {
|
145
|
+
color: #dcdee5;
|
146
|
+
cursor: not-allowed;
|
147
|
+
}
|
148
|
+
.bk-button.bk-button-success.is-disabled:not(.is-text) {
|
139
149
|
background-color: #dcdee5;
|
140
|
-
border-color: #dcdee5;
|
141
150
|
color: white;
|
142
|
-
|
151
|
+
border-color: #dcdee5;
|
143
152
|
}
|
144
153
|
.bk-button.bk-button-hover-success:hover {
|
145
154
|
background-color: #45e35f;
|
@@ -172,17 +181,20 @@
|
|
172
181
|
}
|
173
182
|
.bk-button.bk-button-danger.is-text {
|
174
183
|
color: #ea3636;
|
175
|
-
background:
|
184
|
+
background-color: transparent;
|
176
185
|
border: none;
|
177
186
|
}
|
178
|
-
.bk-button.bk-button-danger.is-text:hover {
|
187
|
+
.bk-button.bk-button-danger.is-text:not(.is-disabled):hover {
|
179
188
|
color: #ff5656;
|
180
189
|
}
|
181
190
|
.bk-button.bk-button-danger.is-disabled {
|
191
|
+
color: #dcdee5;
|
192
|
+
cursor: not-allowed;
|
193
|
+
}
|
194
|
+
.bk-button.bk-button-danger.is-disabled:not(.is-text) {
|
182
195
|
background-color: #dcdee5;
|
183
|
-
border-color: #dcdee5;
|
184
196
|
color: white;
|
185
|
-
|
197
|
+
border-color: #dcdee5;
|
186
198
|
}
|
187
199
|
.bk-button.bk-button-hover-danger:hover {
|
188
200
|
background-color: #ff5656;
|
@@ -221,7 +233,7 @@
|
|
221
233
|
color: #63656e;
|
222
234
|
text-decoration: none;
|
223
235
|
cursor: pointer;
|
224
|
-
background:
|
236
|
+
background-color: transparent;
|
225
237
|
border: none;
|
226
238
|
outline: none;
|
227
239
|
}
|
package/lib/button/button.less
CHANGED
@@ -69,16 +69,19 @@
|
|
69
69
|
|
70
70
|
&.is-text {
|
71
71
|
color: @@color;
|
72
|
-
background:
|
72
|
+
background-color: transparent;
|
73
73
|
border: none;
|
74
|
-
&:hover {
|
74
|
+
&:not(.is-disabled):hover {
|
75
75
|
color: @@hoverColor;
|
76
76
|
}
|
77
77
|
}
|
78
78
|
&.is-disabled {
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
&:not(.is-text) {
|
80
|
+
background-color: @disable-color;
|
81
|
+
color: @white-color;
|
82
|
+
border-color: @disable-color;
|
83
|
+
}
|
84
|
+
color: @disable-color;
|
82
85
|
cursor: not-allowed;
|
83
86
|
}
|
84
87
|
}
|
@@ -98,8 +101,8 @@
|
|
98
101
|
@sizeBtnHeight: '@{value}BtnHeight';
|
99
102
|
@sizeBtnPadding: '@{value}BtnPadding';
|
100
103
|
&.@{bk-prefix}-button-@{value} {
|
101
|
-
|
102
|
-
|
104
|
+
min-width: @@sizeBtnMinWidth;
|
105
|
+
height: @@sizeBtnHeight;
|
103
106
|
line-height: @@sizeBtnHeight;
|
104
107
|
padding: 0 @@sizeBtnPadding;
|
105
108
|
}
|
@@ -132,7 +135,7 @@
|
|
132
135
|
color: @default-color;
|
133
136
|
text-decoration: none;
|
134
137
|
cursor: pointer;
|
135
|
-
background:
|
138
|
+
background-color: transparent;
|
136
139
|
border: none;
|
137
140
|
outline: none;
|
138
141
|
}
|
@@ -142,17 +142,20 @@
|
|
142
142
|
}
|
143
143
|
.bk-button.bk-button-primary.is-text {
|
144
144
|
color: var(--primary-color);
|
145
|
-
background:
|
145
|
+
background-color: transparent;
|
146
146
|
border: none;
|
147
147
|
}
|
148
|
-
.bk-button.bk-button-primary.is-text:hover {
|
148
|
+
.bk-button.bk-button-primary.is-text:not(.is-disabled):hover {
|
149
149
|
color: var(--button-primary-hover-color);
|
150
150
|
}
|
151
151
|
.bk-button.bk-button-primary.is-disabled {
|
152
|
+
color: var(--disable-color);
|
153
|
+
cursor: not-allowed;
|
154
|
+
}
|
155
|
+
.bk-button.bk-button-primary.is-disabled:not(.is-text) {
|
152
156
|
background-color: var(--disable-color);
|
153
|
-
border-color: var(--disable-color);
|
154
157
|
color: var(--white-color);
|
155
|
-
|
158
|
+
border-color: var(--disable-color);
|
156
159
|
}
|
157
160
|
.bk-button.bk-button-hover-primary:hover {
|
158
161
|
background-color: var(--button-primary-hover-color);
|
@@ -185,17 +188,20 @@
|
|
185
188
|
}
|
186
189
|
.bk-button.bk-button-warning.is-text {
|
187
190
|
color: var(--warning-color);
|
188
|
-
background:
|
191
|
+
background-color: transparent;
|
189
192
|
border: none;
|
190
193
|
}
|
191
|
-
.bk-button.bk-button-warning.is-text:hover {
|
194
|
+
.bk-button.bk-button-warning.is-text:not(.is-disabled):hover {
|
192
195
|
color: var(--button-warning-hover-color);
|
193
196
|
}
|
194
197
|
.bk-button.bk-button-warning.is-disabled {
|
198
|
+
color: var(--disable-color);
|
199
|
+
cursor: not-allowed;
|
200
|
+
}
|
201
|
+
.bk-button.bk-button-warning.is-disabled:not(.is-text) {
|
195
202
|
background-color: var(--disable-color);
|
196
|
-
border-color: var(--disable-color);
|
197
203
|
color: var(--white-color);
|
198
|
-
|
204
|
+
border-color: var(--disable-color);
|
199
205
|
}
|
200
206
|
.bk-button.bk-button-hover-warning:hover {
|
201
207
|
background-color: var(--button-warning-hover-color);
|
@@ -228,17 +234,20 @@
|
|
228
234
|
}
|
229
235
|
.bk-button.bk-button-success.is-text {
|
230
236
|
color: var(--success-color);
|
231
|
-
background:
|
237
|
+
background-color: transparent;
|
232
238
|
border: none;
|
233
239
|
}
|
234
|
-
.bk-button.bk-button-success.is-text:hover {
|
240
|
+
.bk-button.bk-button-success.is-text:not(.is-disabled):hover {
|
235
241
|
color: var(--button-success-hover-color);
|
236
242
|
}
|
237
243
|
.bk-button.bk-button-success.is-disabled {
|
244
|
+
color: var(--disable-color);
|
245
|
+
cursor: not-allowed;
|
246
|
+
}
|
247
|
+
.bk-button.bk-button-success.is-disabled:not(.is-text) {
|
238
248
|
background-color: var(--disable-color);
|
239
|
-
border-color: var(--disable-color);
|
240
249
|
color: var(--white-color);
|
241
|
-
|
250
|
+
border-color: var(--disable-color);
|
242
251
|
}
|
243
252
|
.bk-button.bk-button-hover-success:hover {
|
244
253
|
background-color: var(--button-success-hover-color);
|
@@ -271,17 +280,20 @@
|
|
271
280
|
}
|
272
281
|
.bk-button.bk-button-danger.is-text {
|
273
282
|
color: var(--danger-color);
|
274
|
-
background:
|
283
|
+
background-color: transparent;
|
275
284
|
border: none;
|
276
285
|
}
|
277
|
-
.bk-button.bk-button-danger.is-text:hover {
|
286
|
+
.bk-button.bk-button-danger.is-text:not(.is-disabled):hover {
|
278
287
|
color: var(--button-danger-hover-color);
|
279
288
|
}
|
280
289
|
.bk-button.bk-button-danger.is-disabled {
|
290
|
+
color: var(--disable-color);
|
291
|
+
cursor: not-allowed;
|
292
|
+
}
|
293
|
+
.bk-button.bk-button-danger.is-disabled:not(.is-text) {
|
281
294
|
background-color: var(--disable-color);
|
282
|
-
border-color: var(--disable-color);
|
283
295
|
color: var(--white-color);
|
284
|
-
|
296
|
+
border-color: var(--disable-color);
|
285
297
|
}
|
286
298
|
.bk-button.bk-button-hover-danger:hover {
|
287
299
|
background-color: var(--button-danger-hover-color);
|
@@ -320,7 +332,7 @@
|
|
320
332
|
color: var(--default-color);
|
321
333
|
text-decoration: none;
|
322
334
|
cursor: pointer;
|
323
|
-
background:
|
335
|
+
background-color: transparent;
|
324
336
|
border: none;
|
325
337
|
outline: none;
|
326
338
|
}
|
package/lib/button/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("../shared"),require("vue"),require("../loading"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../loading"],o);else{var t="object"==typeof exports?o(require("../shared"),require("vue"),require("../loading")):o(e["../shared"],e.vue,e["../loading"]);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,((e,o,t)=>(()=>{"use strict";var r={4870:e=>{e.exports=t},4212:o=>{o.exports=e},748:e=>{e.exports=o}},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var t=n[e]={exports:{}};return r[e](t,t.exports,i),t.exports}i.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return i.d(o,{a:o}),o},i.d=(e,o)=>{for(var t in o)i.o(o,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},i.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{i.r(a),i.d(a,{BkButton:()=>d,BkButtonGroup:()=>c,default:()=>p});var e=i(4212);function o(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}var t=i(748),r=i(4870),n=i.n(r),u=["","small","large"],l={theme:e.PropTypes.theme().def(""),hoverTheme:e.PropTypes.theme(["primary","warning","success","danger"]).def(""),size:e.PropTypes.size(u).def(""),title:e.PropTypes.string,icon:e.PropTypes.string,iconRight:e.PropTypes.string,disabled:e.PropTypes.bool,loading:e.PropTypes.bool,loadingMode:e.PropTypes.commonType(Object.values(r.BkLoadingMode)),outline:e.PropTypes.bool,text:e.PropTypes.bool,nativeType:{type:String}};const s=(0,t.defineComponent)({name:"Button",props:l,emits:["click","mouseover"],setup:function(i,a){var l,s=a.slots,c=a.attrs,d=a.emit,p=(0,t.ref)(!1),v=null!==(l=s.default)&&void 0!==l&&l,f="bk-button",m=(0,t.computed)((function(){return i.text&&!i.hoverTheme})),b=(0,t.computed)((function(){var t,r=i.hoverTheme?"".concat(f,"-hover-").concat(i.hoverTheme):"",n=i.theme?"".concat(f,"-").concat(i.theme):"",a=i.hoverTheme?"":n;return(0,e.classes)((o(t={"is-disabled":i.disabled,"is-outline":i.outline,"is-text":m.value},"".concat(f,"-").concat(i.size),i.size&&u.includes(i.size)),o(t,"no-slot",!v),t),"".concat(a," ").concat(f," ").concat(r))})),y=(0,t.computed)((function(){return i.text||i.outline||i.hoverTheme?p.value&&!i.text?"white":i.hoverTheme||i.theme:["","default"].includes(i.theme)?"":"white"})),g=(0,t.computed)((function(){return m.value||i.size===r.BkLoadingSize.Small?r.BkLoadingSize.Mini:r.BkLoadingSize.Small})),h=function(){i.loading||d("click")},T=function(){p.value=!0,d("mouseover")},
|
1
|
+
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("../shared"),require("vue"),require("../loading"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../loading"],o);else{var t="object"==typeof exports?o(require("../shared"),require("vue"),require("../loading")):o(e["../shared"],e.vue,e["../loading"]);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,((e,o,t)=>(()=>{"use strict";var r={4870:e=>{e.exports=t},4212:o=>{o.exports=e},748:e=>{e.exports=o}},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var t=n[e]={exports:{}};return r[e](t,t.exports,i),t.exports}i.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return i.d(o,{a:o}),o},i.d=(e,o)=>{for(var t in o)i.o(o,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},i.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{i.r(a),i.d(a,{BkButton:()=>d,BkButtonGroup:()=>c,default:()=>p});var e=i(4212);function o(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}var t=i(748),r=i(4870),n=i.n(r),u=["","small","large"],l={theme:e.PropTypes.theme().def(""),hoverTheme:e.PropTypes.theme(["primary","warning","success","danger"]).def(""),size:e.PropTypes.size(u).def(""),title:e.PropTypes.string,icon:e.PropTypes.string,iconRight:e.PropTypes.string,disabled:e.PropTypes.bool,loading:e.PropTypes.bool,loadingMode:e.PropTypes.commonType(Object.values(r.BkLoadingMode)),outline:e.PropTypes.bool,text:e.PropTypes.bool,nativeType:{type:String}};const s=(0,t.defineComponent)({name:"Button",props:l,emits:["click","mouseover"],setup:function(i,a){var l,s=a.slots,c=a.attrs,d=a.emit,p=(0,t.ref)(!1),v=null!==(l=s.default)&&void 0!==l&&l,f="bk-button",m=(0,t.computed)((function(){return i.text&&!i.hoverTheme})),b=(0,t.computed)((function(){var t,r=i.hoverTheme?"".concat(f,"-hover-").concat(i.hoverTheme):"",n=i.theme?"".concat(f,"-").concat(i.theme):"",a=i.hoverTheme?"":n;return(0,e.classes)((o(t={"is-disabled":i.disabled,"is-outline":i.outline,"is-text":m.value},"".concat(f,"-").concat(i.size),i.size&&u.includes(i.size)),o(t,"no-slot",!v),t),"".concat(a," ").concat(f," ").concat(r))})),y=(0,t.computed)((function(){return i.text||i.outline||i.hoverTheme?p.value&&!i.text?"white":i.text&&i.disabled?"":i.hoverTheme||i.theme:["","default"].includes(i.theme)?"":"white"})),g=(0,t.computed)((function(){return m.value||i.size===r.BkLoadingSize.Small?r.BkLoadingSize.Mini:r.BkLoadingSize.Small})),h=function(){i.loading||d("click")},T=function(){p.value=!0,d("mouseover")},x=function(){p.value=!1};return function(){var e;return(0,t.createVNode)("button",(0,t.mergeProps)({title:i.title,disabled:i.disabled,class:b.value,type:i.nativeType},c,{onClick:h,onMouseover:T,onMouseleave:x}),[i.loading&&(0,t.createVNode)(n(),{loading:!0,class:"".concat(f,"-loading"),mode:i.loadingMode,theme:y.value,size:g.value},null),s.default&&(0,t.createVNode)("span",{class:"".concat(f,"-text")},[null===(e=s.default)||void 0===e?void 0:e.call(s)])])}}}),c=(0,t.defineComponent)({name:"ButtonGroup",props:{size:e.PropTypes.size()},setup:function(r,n){var i=(0,t.computed)((function(){return(0,e.classes)(o({},"bk-button-group-".concat(r.size),!!r.size),"bk-button-group")}));return function(){var e,o;return(0,t.createVNode)("div",{class:i.value},[null===(o=(e=n.slots).default)||void 0===o?void 0:o.call(e)])}}});var d=(0,e.withInstallProps)(s,{ButtonGroup:c});const p=d})(),a})()));
|
package/lib/code-diff/index.js
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
2
|
-
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("vue"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types"],n);else{var t="object"==typeof exports?n(require("../shared"),require("vue"),require("vue-types")):n(e["../shared"],e.vue,e["vue-types"]);for(var i in t)("object"==typeof exports?exports:e)[i]=t[i]}}(self,((e,n,t)=>(()=>{var i={5651:function(e,n){!function(e){"use strict";function n(){}function t(e,n,t,i,r){for(var o=0,s=n.length,a=0,l=0;o<s;o++){var u=n[o];if(u.removed){if(u.value=e.join(i.slice(l,l+u.count)),l+=u.count,o&&n[o-1].added){var f=n[o-1];n[o-1]=n[o],n[o]=f}}else{if(!u.added&&r){var c=t.slice(a,a+u.count);c=c.map((function(e,n){var t=i[l+n];return t.length>e.length?t:e})),u.value=e.join(c)}else u.value=e.join(t.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=n[s-1];return s>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(n[s-2].value+=d.value,n.pop()),n}function i(e){return{newPos:e.newPos,components:e.components.slice(0)}}n.prototype={diff:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.callback;"function"==typeof r&&(o=r,r={}),this.options=r;var s=this;function a(e){return o?(setTimeout((function(){o(void 0,e)}),0),!0):e}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e));var l=(n=this.removeEmpty(this.tokenize(n))).length,u=e.length,f=1,c=l+u,d=[{newPos:-1,components:[]}],h=this.extractCommon(d[0],n,e,0);if(d[0].newPos+1>=l&&h+1>=u)return a([{value:this.join(n),count:n.length}]);function p(){for(var r=-1*f;r<=f;r+=2){var o=void 0,c=d[r-1],h=d[r+1],p=(h?h.newPos:0)-r;c&&(d[r-1]=void 0);var g=c&&c.newPos+1<l,v=h&&0<=p&&p<u;if(g||v){if(!g||v&&c.newPos<h.newPos?(o=i(h),s.pushComponent(o.components,void 0,!0)):((o=c).newPos++,s.pushComponent(o.components,!0,void 0)),p=s.extractCommon(o,n,e,r),o.newPos+1>=l&&p+1>=u)return a(t(s,o.components,n,e,s.useLongestToken));d[r]=o}else d[r]=void 0}f++}if(o)!function e(){setTimeout((function(){if(f>c)return o();p()||e()}),0)}();else for(;f<=c;){var g=p();if(g)return g}},pushComponent:function(e,n,t){var i=e[e.length-1];i&&i.added===n&&i.removed===t?e[e.length-1]={count:i.count+1,added:n,removed:t}:e.push({count:1,added:n,removed:t})},extractCommon:function(e,n,t,i){for(var r=n.length,o=t.length,s=e.newPos,a=s-i,l=0;s+1<r&&a+1<o&&this.equals(n[s+1],t[a+1]);)s++,a++,l++;return l&&e.components.push({count:l}),e.newPos=s,a},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var r=new n;function o(e,n){if("function"==typeof e)n.callback=e;else if(e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}var s=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a=/\S/,l=new n;l.equals=function(e,n){return this.options.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e===n||this.options.ignoreWhitespace&&!a.test(e)&&!a.test(n)},l.tokenize=function(e){for(var n=e.split(/(\s+|[()[\]{}'"]|\b)/),t=0;t<n.length-1;t++)!n[t+1]&&n[t+2]&&s.test(n[t])&&s.test(n[t+2])&&(n[t]+=n[t+2],n.splice(t+1,2),t--);return n};var u=new n;function f(e,n,t){return u.diff(e,n,t)}u.tokenize=function(e){var n=[],t=e.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var i=0;i<t.length;i++){var r=t[i];i%2&&!this.options.newlineIsToken?n[n.length-1]+=r:(this.options.ignoreWhitespace&&(r=r.trim()),n.push(r))}return n};var c=new n;c.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var d=new n;function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function p(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n<e.length;n++)t[n]=e[n];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}d.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var g=Object.prototype.toString,v=new n;function b(e,n,t,i,r){var o,s;for(n=n||[],t=t||[],i&&(e=i(r,e)),o=0;o<n.length;o+=1)if(n[o]===e)return t[o];if("[object Array]"===g.call(e)){for(n.push(e),s=new Array(e.length),t.push(s),o=0;o<e.length;o+=1)s[o]=b(e[o],n,t,i,r);return n.pop(),t.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),"object"===h(e)&&null!==e){n.push(e),s={},t.push(s);var a,l=[];for(a in e)e.hasOwnProperty(a)&&l.push(a);for(l.sort(),o=0;o<l.length;o+=1)s[a=l[o]]=b(e[a],n,t,i,a);n.pop(),t.pop()}else s=e;return s}v.useLongestToken=!0,v.tokenize=u.tokenize,v.castInput=function(e){var n=this.options,t=n.undefinedReplacement,i=n.stringifyReplacer,r=void 0===i?function(e,n){return void 0===n?t:n}:i;return"string"==typeof e?e:JSON.stringify(b(e,null,null,r),r," ")},v.equals=function(e,t){return n.prototype.equals.call(v,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var m=new n;function y(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],r=[],o=0;function s(){var e={};for(r.push(e);o<t.length;){var i=t[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(i))break;var s=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(i);s&&(e.index=s[1]),o++}for(a(e),a(e),e.hunks=[];o<t.length;){var u=t[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(u))break;if(/^@@/.test(u))e.hunks.push(l());else{if(u&&n.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(u));o++}}}function a(e){var n=/^(---|\+\+\+)\s+(.*)$/.exec(t[o]);if(n){var i="---"===n[1]?"old":"new",r=n[2].split("\t",2),s=r[0].replace(/\\\\/g,"\\");/^".*"$/.test(s)&&(s=s.substr(1,s.length-2)),e[i+"FileName"]=s,e[i+"Header"]=(r[1]||"").trim(),o++}}function l(){for(var e=o,r=t[o++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),s={oldStart:+r[1],oldLines:+r[2]||1,newStart:+r[3],newLines:+r[4]||1,lines:[],linedelimiters:[]},a=0,l=0;o<t.length&&!(0===t[o].indexOf("--- ")&&o+2<t.length&&0===t[o+1].indexOf("+++ ")&&0===t[o+2].indexOf("@@"));o++){var u=0==t[o].length&&o!=t.length-1?" ":t[o][0];if("+"!==u&&"-"!==u&&" "!==u&&"\\"!==u)break;s.lines.push(t[o]),s.linedelimiters.push(i[o]||"\n"),"+"===u?a++:"-"===u?l++:" "===u&&(a++,l++)}if(a||1!==s.newLines||(s.newLines=0),l||1!==s.oldLines||(s.oldLines=0),n.strict){if(a!==s.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(l!==s.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return s}for(;o<t.length;)s();return r}function w(e,n,t){var i=!0,r=!1,o=!1,s=1;return function a(){if(i&&!o){if(r?s++:i=!1,e+s<=t)return s;o=!0}if(!r)return o||(i=!0),n<=e-s?-s++:(r=!0,a())}}function x(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n&&(n=y(n)),Array.isArray(n)){if(n.length>1)throw new Error("applyPatch only works with a single input.");n=n[0]}var i,r,o=e.split(/\r\n|[\n\v\f\r\x85]/),s=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],a=n.hunks,l=t.compareLine||function(e,n,t,i){return n===i},u=0,f=t.fuzzFactor||0,c=0,d=0;function h(e,n){for(var t=0;t<e.lines.length;t++){var i=e.lines[t],r=i.length>0?i[0]:" ",s=i.length>0?i.substr(1):i;if(" "===r||"-"===r){if(!l(n+1,o[n],r,s)&&++u>f)return!1;n++}}return!0}for(var p=0;p<a.length;p++){for(var g=a[p],v=o.length-g.oldLines,b=0,m=d+g.oldStart-1,x=w(m,c,v);void 0!==b;b=x())if(h(g,m+b)){g.offset=d+=b;break}if(void 0===b)return!1;c=g.offset+g.oldStart+g.oldLines}for(var N=0,L=0;L<a.length;L++){var S=a[L],C=S.oldStart+S.offset+N-1;N+=S.newLines-S.oldLines,C<0&&(C=0);for(var T=0;T<S.lines.length;T++){var E=S.lines[T],k=E.length>0?E[0]:" ",H=E.length>0?E.substr(1):E,F=S.linedelimiters[T];if(" "===k)C++;else if("-"===k)o.splice(C,1),s.splice(C,1);else if("+"===k)o.splice(C,0,H),s.splice(C,0,F),C++;else if("\\"===k){var j=S.lines[T-1]?S.lines[T-1][0]:null;"+"===j?i=!0:"-"===j&&(r=!0)}}}if(i)for(;!o[o.length-1];)o.pop(),s.pop();else r&&(o.push(""),s.push("\n"));for(var O=0;O<o.length-1;O++)o[O]=o[O]+s[O];return o.join("")}function N(e,n,t,i,r,o,s){s||(s={}),void 0===s.context&&(s.context=4);var a=f(t,i,s);function l(e){return e.map((function(e){return" "+e}))}a.push({value:"",lines:[]});for(var u=[],c=0,d=0,h=[],g=1,v=1,b=function(e){var n=a[e],r=n.lines||n.value.replace(/\n$/,"").split("\n");if(n.lines=r,n.added||n.removed){var o;if(!c){var f=a[e-1];c=g,d=v,f&&(h=s.context>0?l(f.lines.slice(-s.context)):[],c-=h.length,d-=h.length)}(o=h).push.apply(o,p(r.map((function(e){return(n.added?"+":"-")+e})))),n.added?v+=r.length:g+=r.length}else{if(c)if(r.length<=2*s.context&&e<a.length-2){var b;(b=h).push.apply(b,p(l(r)))}else{var m,y=Math.min(r.length,s.context);(m=h).push.apply(m,p(l(r.slice(0,y))));var w={oldStart:c,oldLines:g-c+y,newStart:d,newLines:v-d+y,lines:h};if(e>=a.length-2&&r.length<=s.context){var x=/\n$/.test(t),N=/\n$/.test(i),L=0==r.length&&h.length>w.oldLines;!x&&L&&h.splice(w.oldLines,0,"\"),(x||L)&&N||h.push("\")}u.push(w),c=0,d=0,h=[]}g+=r.length,v+=r.length}},m=0;m<a.length;m++)b(m);return{oldFileName:e,newFileName:n,oldHeader:r,newHeader:o,hunks:u}}function L(e,n,t,i,r,o,s){var a=N(e,n,t,i,r,o,s),l=[];e==n&&l.push("Index: "+e),l.push("==================================================================="),l.push("--- "+a.oldFileName+(void 0===a.oldHeader?"":"\t"+a.oldHeader)),l.push("+++ "+a.newFileName+(void 0===a.newHeader?"":"\t"+a.newHeader));for(var u=0;u<a.hunks.length;u++){var f=a.hunks[u];l.push("@@ -"+f.oldStart+","+f.oldLines+" +"+f.newStart+","+f.newLines+" @@"),l.push.apply(l,f.lines)}return l.join("\n")+"\n"}function S(e,n){if(n.length>e.length)return!1;for(var t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function C(e){var n=R(e.lines),t=n.oldLines,i=n.newLines;void 0!==t?e.oldLines=t:delete e.oldLines,void 0!==i?e.newLines=i:delete e.newLines}function T(e,n){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return y(e)[0];if(!n)throw new Error("Must provide a base reference or pass in a patch");return N(void 0,void 0,n,e)}return e}function E(e){return e.newFileName&&e.newFileName!==e.oldFileName}function k(e,n,t){return n===t?n:(e.conflict=!0,{mine:n,theirs:t})}function H(e,n){return e.oldStart<n.oldStart&&e.oldStart+e.oldLines<n.oldStart}function F(e,n){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+n,newLines:e.newLines,lines:e.lines}}function j(e,n,t,i,r){var o={offset:n,lines:t,index:0},s={offset:i,lines:r,index:0};for(A(e,o,s),A(e,s,o);o.index<o.lines.length&&s.index<s.lines.length;){var a=o.lines[o.index],l=s.lines[s.index];if("-"!==a[0]&&"+"!==a[0]||"-"!==l[0]&&"+"!==l[0])if("+"===a[0]&&" "===l[0]){var u;(u=e.lines).push.apply(u,p(z(o)))}else if("+"===l[0]&&" "===a[0]){var f;(f=e.lines).push.apply(f,p(z(s)))}else"-"===a[0]&&" "===l[0]?P(e,o,s):"-"===l[0]&&" "===a[0]?P(e,s,o,!0):a===l?(e.lines.push(a),o.index++,s.index++):I(e,z(o),z(s));else O(e,o,s)}M(e,o),M(e,s),C(e)}function O(e,n,t){var i,r,o=z(n),s=z(t);if(D(o)&&D(s)){var a,l;if(S(o,s)&&W(t,o,o.length-s.length))return void(a=e.lines).push.apply(a,p(o));if(S(s,o)&&W(n,s,s.length-o.length))return void(l=e.lines).push.apply(l,p(s))}else if(r=s,(i=o).length===r.length&&S(i,r)){var u;return void(u=e.lines).push.apply(u,p(o))}I(e,o,s)}function P(e,n,t,i){var r,o=z(n),s=function(e,n){for(var t=[],i=[],r=0,o=!1,s=!1;r<n.length&&e.index<e.lines.length;){var a=e.lines[e.index],l=n[r];if("+"===l[0])break;if(o=o||" "!==a[0],i.push(l),r++,"+"===a[0])for(s=!0;"+"===a[0];)t.push(a),a=e.lines[++e.index];l.substr(1)===a.substr(1)?(t.push(a),e.index++):s=!0}if("+"===(n[r]||"")[0]&&o&&(s=!0),s)return t;for(;r<n.length;)i.push(n[r++]);return{merged:i,changes:t}}(t,o);s.merged?(r=e.lines).push.apply(r,p(s.merged)):I(e,i?s:o,i?o:s)}function I(e,n,t){e.conflict=!0,e.lines.push({conflict:!0,mine:n,theirs:t})}function A(e,n,t){for(;n.offset<t.offset&&n.index<n.lines.length;){var i=n.lines[n.index++];e.lines.push(i),n.offset++}}function M(e,n){for(;n.index<n.lines.length;){var t=n.lines[n.index++];e.lines.push(t)}}function z(e){for(var n=[],t=e.lines[e.index][0];e.index<e.lines.length;){var i=e.lines[e.index];if("-"===t&&"+"===i[0]&&(t="+"),t!==i[0])break;n.push(i),e.index++}return n}function D(e){return e.reduce((function(e,n){return e&&"-"===n[0]}),!0)}function W(e,n,t){for(var i=0;i<t;i++){var r=n[n.length-t+i].substr(1);if(e.lines[e.index+i]!==" "+r)return!1}return e.index+=t,!0}function R(e){var n=0,t=0;return e.forEach((function(e){if("string"!=typeof e){var i=R(e.mine),r=R(e.theirs);void 0!==n&&(i.oldLines===r.oldLines?n+=i.oldLines:n=void 0),void 0!==t&&(i.newLines===r.newLines?t+=i.newLines:t=void 0)}else void 0===t||"+"!==e[0]&&" "!==e[0]||t++,void 0===n||"-"!==e[0]&&" "!==e[0]||n++})),{oldLines:n,newLines:t}}m.tokenize=function(e){return e.slice()},m.join=m.removeEmpty=function(e){return e},e.Diff=n,e.diffChars=function(e,n,t){return r.diff(e,n,t)},e.diffWords=function(e,n,t){return t=o(t,{ignoreWhitespace:!0}),l.diff(e,n,t)},e.diffWordsWithSpace=function(e,n,t){return l.diff(e,n,t)},e.diffLines=f,e.diffTrimmedLines=function(e,n,t){var i=o(t,{ignoreWhitespace:!0});return u.diff(e,n,i)},e.diffSentences=function(e,n,t){return c.diff(e,n,t)},e.diffCss=function(e,n,t){return d.diff(e,n,t)},e.diffJson=function(e,n,t){return v.diff(e,n,t)},e.diffArrays=function(e,n,t){return m.diff(e,n,t)},e.structuredPatch=N,e.createTwoFilesPatch=L,e.createPatch=function(e,n,t,i,r,o){return L(e,e,n,t,i,r,o)},e.applyPatch=x,e.applyPatches=function(e,n){"string"==typeof e&&(e=y(e));var t=0;!function i(){var r=e[t++];if(!r)return n.complete();n.loadFile(r,(function(e,t){if(e)return n.complete(e);var o=x(t,r,n);n.patched(r,o,(function(e){if(e)return n.complete(e);i()}))}))}()},e.parsePatch=y,e.merge=function(e,n,t){e=T(e,t),n=T(n,t);var i={};(e.index||n.index)&&(i.index=e.index||n.index),(e.newFileName||n.newFileName)&&(E(e)?E(n)?(i.oldFileName=k(i,e.oldFileName,n.oldFileName),i.newFileName=k(i,e.newFileName,n.newFileName),i.oldHeader=k(i,e.oldHeader,n.oldHeader),i.newHeader=k(i,e.newHeader,n.newHeader)):(i.oldFileName=e.oldFileName,i.newFileName=e.newFileName,i.oldHeader=e.oldHeader,i.newHeader=e.newHeader):(i.oldFileName=n.oldFileName||e.oldFileName,i.newFileName=n.newFileName||e.newFileName,i.oldHeader=n.oldHeader||e.oldHeader,i.newHeader=n.newHeader||e.newHeader)),i.hunks=[];for(var r=0,o=0,s=0,a=0;r<e.hunks.length||o<n.hunks.length;){var l=e.hunks[r]||{oldStart:1/0},u=n.hunks[o]||{oldStart:1/0};if(H(l,u))i.hunks.push(F(l,s)),r++,a+=l.newLines-l.oldLines;else if(H(u,l))i.hunks.push(F(u,a)),o++,s+=u.newLines-u.oldLines;else{var f={oldStart:Math.min(l.oldStart,u.oldStart),oldLines:0,newStart:Math.min(l.newStart+s,u.oldStart+a),newLines:0,lines:[]};j(f,l.oldStart,l.lines,u.oldStart,u.lines),o++,r++,i.hunks.push(f)}}return i},e.convertChangesToDMP=function(e){for(var n,t,i=[],r=0;r<e.length;r++)t=(n=e[r]).added?1:n.removed?-1:0,i.push([t,n.value]);return i},e.convertChangesToXML=function(e){for(var n=[],t=0;t<e.length;t++){var i=e[t];i.added?n.push("<ins>"):i.removed&&n.push("<del>"),n.push((r=i.value,void 0,r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""))),i.added?n.push("</ins>"):i.removed&&n.push("</del>")}var r;return n.join("")},e.canonicalize=b,Object.defineProperty(e,"__esModule",{value:!0})}(n)},2148:(e,n)=>{!function(e){var n=/\S/,t=/\"/g,i=/\n/g,r=/\r/g,o=/\\/g,s=/\u2028/,a=/\u2029/;function l(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function u(e,n,t){if(n.charAt(t)!=e.charAt(0))return!1;for(var i=1,r=e.length;i<r;i++)if(n.charAt(t+i)!=e.charAt(i))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(t,i){var r,o=t.length,s=0,a=null,f=null,c="",d=[],h=!1,p=0,g=0,v="{{",b="}}";function m(){c.length>0&&(d.push({tag:"_t",text:new String(c)}),c="")}function y(t,i){if(m(),t&&function(){for(var t=!0,i=g;i<d.length;i++)if(!(t=e.tags[d[i].tag]<e.tags._v||"_t"==d[i].tag&&null===d[i].text.match(n)))return!1;return t}())for(var r,o=g;o<d.length;o++)d[o].text&&((r=d[o+1])&&">"==r.tag&&(r.indent=d[o].text.toString()),d.splice(o,1));else i||d.push({tag:"\n"});h=!1,g=d.length}function w(e,n){var t="="+b,i=e.indexOf(t,n),r=l(e.substring(e.indexOf("=",n)+1,i)).split(" ");return v=r[0],b=r[r.length-1],i+t.length-1}for(i&&(i=i.split(" "),v=i[0],b=i[1]),p=0;p<o;p++)0==s?u(v,t,p)?(--p,m(),s=1):"\n"==t.charAt(p)?y(h):c+=t.charAt(p):1==s?(p+=v.length-1,"="==(a=(f=e.tags[t.charAt(p+1)])?t.charAt(p+1):"_v")?(p=w(t,p),s=0):(f&&p++,s=2),h=p):u(b,t,p)?(d.push({tag:a,n:l(c),otag:v,ctag:b,i:"/"==a?h-v.length:p+b.length}),c="",p+=b.length-1,s=0,"{"==a&&("}}"==b?p++:"}"===(r=d[d.length-1]).n.substr(r.n.length-1)&&(r.n=r.n.substring(0,r.n.length-1)))):c+=t.charAt(p);return y(h,!0),d};var f={_t:!0,"\n":!0,$:!0,"/":!0};function c(n,t,i,r){var o,s=[],a=null,l=null;for(o=i[i.length-1];n.length>0;){if(l=n.shift(),o&&"<"==o.tag&&!(l.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[l.tag]<=e.tags.$||d(l,r))i.push(l),l.nodes=c(n,l.tag,i,r);else{if("/"==l.tag){if(0===i.length)throw new Error("Closing tag without opener: /"+l.n);if(a=i.pop(),l.n!=a.n&&!h(l.n,a.n,r))throw new Error("Nesting error: "+a.n+" vs. "+l.n);return a.end=l.i,s}"\n"==l.tag&&(l.last=0==n.length||"\n"==n[0].tag)}s.push(l)}if(i.length>0)throw new Error("missing closing tag: "+i.pop().n);return s}function d(e,n){for(var t=0,i=n.length;t<i;t++)if(n[t].o==e.n)return e.tag="#",!0}function h(e,n,t){for(var i=0,r=t.length;i<r;i++)if(t[i].c==e&&t[i].o==n)return!0}function p(e){var n=[];for(var t in e.partials)n.push('"'+v(t)+'":{name:"'+v(e.partials[t].name)+'", '+p(e.partials[t])+"}");return"partials: {"+n.join(",")+"}, subs: "+function(e){var n=[];for(var t in e)n.push('"'+v(t)+'": function(c,p,t,i) {'+e[t]+"}");return"{ "+n.join(",")+" }"}(e.subs)}e.stringify=function(n,t,i){return"{code: function (c,p,i) { "+e.wrapMain(n.code)+" },"+p(n)+"}"};var g=0;function v(e){return e.replace(o,"\\\\").replace(t,'\\"').replace(i,"\\n").replace(r,"\\r").replace(s,"\\u2028").replace(a,"\\u2029")}function b(e){return~e.indexOf(".")?"d":"f"}function m(e,n){var t="<"+(n.prefix||"")+e.n+g++;return n.partials[t]={name:e.n,partials:{}},n.code+='t.b(t.rp("'+v(t)+'",c,p,"'+(e.indent||"")+'"));',t}function y(e,n){n.code+="t.b(t.t(t."+b(e.n)+'("'+v(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(n,t,i){g=0;var r={code:"",subs:{},partials:{}};return e.walk(n,r),i.asString?this.stringify(r,t,i):this.makeTemplate(r,t,i)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,n,t){var i=this.makePartials(e);return i.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(i,n,this,t)},e.makePartials=function(e){var n,t={subs:{},partials:e.partials,name:e.name};for(n in t.partials)t.partials[n]=this.makePartials(t.partials[n]);for(n in e.subs)t.subs[n]=new Function("c","p","t","i",e.subs[n]);return t},e.codegen={"#":function(n,t){t.code+="if(t.s(t."+b(n.n)+'("'+v(n.n)+'",c,p,1),c,p,0,'+n.i+","+n.end+',"'+n.otag+" "+n.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(n.nodes,t),t.code+="});c.pop();}"},"^":function(n,t){t.code+="if(!t.s(t."+b(n.n)+'("'+v(n.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(n.nodes,t),t.code+="};"},">":m,"<":function(n,t){var i={partials:{},code:"",subs:{},inPartial:!0};e.walk(n.nodes,i);var r=t.partials[m(n,t)];r.subs=i.subs,r.partials=i.partials},$:function(n,t){var i={subs:{},code:"",partials:t.partials,prefix:n.n};e.walk(n.nodes,i),t.subs[n.n]=i.code,t.inPartial||(t.code+='t.sub("'+v(n.n)+'",c,p,i);')},"\n":function(e,n){n.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,n){n.code+="t.b(t.v(t."+b(e.n)+'("'+v(e.n)+'",c,p,0)));'},_t:function(e,n){n.code+=w('"'+v(e.text)+'"')},"{":y,"&":y},e.walk=function(n,t){for(var i,r=0,o=n.length;r<o;r++)(i=e.codegen[n[r].tag])&&i(n[r],t);return t},e.parse=function(e,n,t){return c(e,0,[],(t=t||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,n){return[e,!!n.asString,!!n.disableLambda,n.delimiters,!!n.modelGet].join("||")},e.compile=function(n,t){t=t||{};var i=e.cacheKey(n,t),r=this.cache[i];if(r){var o=r.partials;for(var s in o)delete o[s].instance;return r}return r=this.generate(this.parse(this.scan(n,t.delimiters),n,t),n,t),this.cache[i]=r}}(n)},112:(e,n,t)=>{var i=t(2148);i.Template=t(8719).Template,i.template=i.Template,e.exports=i},8719:(e,n)=>{!function(e){function n(e,n,t){var i;return n&&"object"==typeof n&&(void 0!==n[e]?i=n[e]:t&&n.get&&"function"==typeof n.get&&(i=n.get(e))),i}e.Template=function(e,n,t,i){e=e||{},this.r=e.code||this.r,this.c=t,this.options=i||{},this.text=n||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,n,t){return""},v:function(e){return e=l(e),a.test(e)?e.replace(t,"&").replace(i,"<").replace(r,">").replace(o,"'").replace(s,"""):e},t:l,render:function(e,n,t){return this.ri([e],n||{},t)},ri:function(e,n,t){return this.r(e,n,t)},ep:function(e,n){var t=this.partials[e],i=n[t.name];if(t.instance&&t.base==i)return t.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,t.subs){for(key in n.stackText||(n.stackText={}),t.subs)n.stackText[key]||(n.stackText[key]=void 0!==this.activeSub&&n.stackText[this.activeSub]?n.stackText[this.activeSub]:this.text);i=function(e,n,t,i,r,o){function s(){}function a(){}var l;s.prototype=e,a.prototype=e.subs;var u=new s;for(l in u.subs=new a,u.subsText={},u.buf="",i=i||{},u.stackSubs=i,u.subsText=o,n)i[l]||(i[l]=n[l]);for(l in i)u.subs[l]=i[l];for(l in r=r||{},u.stackPartials=r,t)r[l]||(r[l]=t[l]);for(l in r)u.partials[l]=r[l];return u}(i,t.subs,t.partials,this.stackSubs,this.stackPartials,n.stackText)}return this.partials[e].instance=i,i},rp:function(e,n,t,i){var r=this.ep(e,t);return r?r.ri(n,t,i):""},rs:function(e,n,t){var i=e[e.length-1];if(u(i))for(var r=0;r<i.length;r++)e.push(i[r]),t(e,n,this),e.pop();else t(e,n,this)},s:function(e,n,t,i,r,o,s){var a;return(!u(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,n,t,i,r,o,s)),a=!!e,!i&&a&&n&&n.push("object"==typeof e?e:n[n.length-1]),a)},d:function(e,t,i,r){var o,s=e.split("."),a=this.f(s[0],t,i,r),l=this.options.modelGet,f=null;if("."===e&&u(t[t.length-2]))a=t[t.length-1];else for(var c=1;c<s.length;c++)void 0!==(o=n(s[c],a,l))?(f=a,a=o):a="";return!(r&&!a)&&(r||"function"!=typeof a||(t.push(f),a=this.mv(a,t,i),t.pop()),a)},f:function(e,t,i,r){for(var o=!1,s=!1,a=this.options.modelGet,l=t.length-1;l>=0;l--)if(void 0!==(o=n(e,t[l],a))){s=!0;break}return s?(r||"function"!=typeof o||(o=this.mv(o,t,i)),o):!r&&""},ls:function(e,n,t,i,r){var o=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(l(e.call(n,i)),n,t)),this.options.delimiters=o,!1},ct:function(e,n,t){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(n,t)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,n,t,i,r,o,s){var a,l=n[n.length-1],u=e.call(l);return"function"==typeof u?!!i||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(u,l,t,a.substring(r,o),s)):u},mv:function(e,n,t){var i=n[n.length-1],r=e.call(i);return"function"==typeof r?this.ct(l(r.call(i)),i,t):r},sub:function(e,n,t,i){var r=this.subs[e];r&&(this.activeSub=e,r(n,t,this,i),this.activeSub=!1)}};var t=/&/g,i=/</g,r=/>/g,o=/\'/g,s=/\"/g,a=/[&<>\"\']/;function l(e){return String(null==e?"":e)}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(n)},4212:n=>{"use strict";n.exports=e},748:e=>{"use strict";e.exports=n},210:e=>{"use strict";e.exports=t}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var t=r[e]={exports:{}};return i[e].call(t.exports,t,t.exports,o),t.exports}o.d=(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{"use strict";o.r(s),o.d(s,{default:()=>pe});var e=o(4212);function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}var t,i=o(748),r=o(5651);!function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(t||(t={}));var a=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");function l(e){return e?e.replace(/\\/g,"/"):e}var u=function(e,n,t){if(t||2===arguments.length)for(var i,r=0,o=n.length;r<o;r++)!i&&r in n||(i||(i=Array.prototype.slice.call(n,0,r)),i[r]=n[r]);return e.concat(i||Array.prototype.slice.call(n))};function f(e,n){var t=e.split(".");return t.length>1?t[t.length-1]:n}function c(e,n){return n.reduce((function(n,t){return n||e.startsWith(t)}),!1)}var d=["a/","b/","i/","w/","c/","o/"];function h(e,n,t){var i=void 0!==t?u(u([],d,!0),[t],!1):d,r=((n?new RegExp("^"+n.replace(a,"\\$&")+' "?(.+?)"?$'):new RegExp('^"?(.+?)"?$')).exec(e)||[])[1],o=void 0===r?"":r,s=i.find((function(e){return 0===o.indexOf(e)}));return(s?o.slice(s.length):o).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function p(){}function g(e,n,t,i,r){for(var o=0,s=n.length,a=0,l=0;o<s;o++){var u=n[o];if(u.removed){if(u.value=e.join(i.slice(l,l+u.count)),l+=u.count,o&&n[o-1].added){var f=n[o-1];n[o-1]=n[o],n[o]=f}}else{if(!u.added&&r){var c=t.slice(a,a+u.count);c=c.map((function(e,n){var t=i[l+n];return t.length>e.length?t:e})),u.value=e.join(c)}else u.value=e.join(t.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=n[s-1];return s>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(n[s-2].value+=d.value,n.pop()),n}function v(e){return{newPos:e.newPos,components:e.components.slice(0)}}p.prototype={diff:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.callback;"function"==typeof t&&(i=t,t={}),this.options=t;var r=this;function o(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e));var s=(n=this.removeEmpty(this.tokenize(n))).length,a=e.length,l=1,u=s+a,f=[{newPos:-1,components:[]}],c=this.extractCommon(f[0],n,e,0);if(f[0].newPos+1>=s&&c+1>=a)return o([{value:this.join(n),count:n.length}]);function d(){for(var t=-1*l;t<=l;t+=2){var i=void 0,u=f[t-1],c=f[t+1],d=(c?c.newPos:0)-t;u&&(f[t-1]=void 0);var h=u&&u.newPos+1<s,p=c&&0<=d&&d<a;if(h||p){if(!h||p&&u.newPos<c.newPos?(i=v(c),r.pushComponent(i.components,void 0,!0)):((i=u).newPos++,r.pushComponent(i.components,!0,void 0)),d=r.extractCommon(i,n,e,t),i.newPos+1>=s&&d+1>=a)return o(g(r,i.components,n,e,r.useLongestToken));f[t]=i}else f[t]=void 0}l++}if(i)!function e(){setTimeout((function(){if(l>u)return i();d()||e()}),0)}();else for(;l<=u;){var h=d();if(h)return h}},pushComponent:function(e,n,t){var i=e[e.length-1];i&&i.added===n&&i.removed===t?e[e.length-1]={count:i.count+1,added:n,removed:t}:e.push({count:1,added:n,removed:t})},extractCommon:function(e,n,t,i){for(var r=n.length,o=t.length,s=e.newPos,a=s-i,l=0;s+1<r&&a+1<o&&this.equals(n[s+1],t[a+1]);)s++,a++,l++;return l&&e.components.push({count:l}),e.newPos=s,a},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var b=new p,m=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,y=/\S/,w=new p;w.equals=function(e,n){return this.options.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e===n||this.options.ignoreWhitespace&&!y.test(e)&&!y.test(n)},w.tokenize=function(e){for(var n=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;t<n.length-1;t++)!n[t+1]&&n[t+2]&&m.test(n[t])&&m.test(n[t+2])&&(n[t]+=n[t+2],n.splice(t+1,2),t--);return n};var x=new p;function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}x.tokenize=function(e){var n=[],t=e.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var i=0;i<t.length;i++){var r=t[i];i%2&&!this.options.newlineIsToken?n[n.length-1]+=r:(this.options.ignoreWhitespace&&(r=r.trim()),n.push(r))}return n},(new p).tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)},(new p).tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var L=Object.prototype.toString,S=new p;function C(e,n,t,i,r){var o,s;for(n=n||[],t=t||[],i&&(e=i(r,e)),o=0;o<n.length;o+=1)if(n[o]===e)return t[o];if("[object Array]"===L.call(e)){for(n.push(e),s=new Array(e.length),t.push(s),o=0;o<e.length;o+=1)s[o]=C(e[o],n,t,i,r);return n.pop(),t.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),"object"===N(e)&&null!==e){n.push(e),s={},t.push(s);var a,l=[];for(a in e)e.hasOwnProperty(a)&&l.push(a);for(l.sort(),o=0;o<l.length;o+=1)s[a=l[o]]=C(e[a],n,t,i,a);n.pop(),t.pop()}else s=e;return s}S.useLongestToken=!0,S.tokenize=x.tokenize,S.castInput=function(e){var n=this.options,t=n.undefinedReplacement,i=n.stringifyReplacer,r=void 0===i?function(e,n){return void 0===n?t:n}:i;return"string"==typeof e?e:JSON.stringify(C(e,null,null,r),r," ")},S.equals=function(e,n){return p.prototype.equals.call(S,e.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var T=new p;function E(e){return function(n,t){var i=e(n).trim(),r=e(t).trim();return function(e,n){if(0===e.length)return n.length;if(0===n.length)return e.length;var t,i,r=[];for(t=0;t<=n.length;t++)r[t]=[t];for(i=0;i<=e.length;i++)r[0][i]=i;for(t=1;t<=n.length;t++)for(i=1;i<=e.length;i++)n.charAt(t-1)===e.charAt(i-1)?r[t][i]=r[t-1][i-1]:r[t][i]=Math.min(r[t-1][i-1]+1,Math.min(r[t][i-1]+1,r[t-1][i]+1));return r[n.length][e.length]}(i,r)/(i.length+r.length)}}function k(e){return function n(t,i,r,o){void 0===r&&(r=0),void 0===o&&(o=new Map);var s=function(n,t,i){void 0===i&&(i=new Map);for(var r,o=1/0,s=0;s<n.length;++s)for(var a=0;a<t.length;++a){var l=JSON.stringify([n[s],t[a]]),u=void 0;i.has(l)&&(u=i.get(l))||(u=e(n[s],t[a]),i.set(l,u)),u<o&&(r={indexA:s,indexB:a,score:o=u})}return r}(t,i,o);if(!s||t.length+i.length<3)return[[t,i]];var a=t.slice(0,s.indexA),l=i.slice(0,s.indexB),u=[t[s.indexA]],f=[i[s.indexB]],c=s.indexA+1,d=s.indexB+1,h=t.slice(c),p=i.slice(d),g=n(a,l,r+1,o),v=n(u,f,r+1,o),b=n(h,p,r+1,o),m=v;return(s.indexA>0||s.indexB>0)&&(m=g.concat(m)),(t.length>c||i.length>d)&&(m=m.concat(b)),m}}T.tokenize=function(e){return e.slice()},T.join=T.removeEmpty=function(e){return e};var H=function(){return H=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},H.apply(this,arguments)},F={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},j={matching:"none",matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:"word"},O="/",P=E((function(e){return e.value})),I=k(P);function A(e){return-1!==e.indexOf("dev/null")}function M(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function z(e){switch(e){case t.CONTEXT:return F.CONTEXT;case t.INSERT:return F.INSERTS;case t.DELETE:return F.DELETES}}function D(e){return e.slice(0).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function W(e,n,t){void 0===t&&(t=!0);var i=function(e){return e?2:1}(n);return{prefix:e.substring(0,i),content:t?D(e.substring(i)):e.substring(i)}}function R(e){var n=l(e.oldName),t=l(e.newName);if(n===t||A(n)||A(t))return A(t)?n:t;for(var i=[],r=[],o=n.split(O),s=t.split(O),a=0,u=o.length-1,f=s.length-1;a<u&&a<f&&o[a]===s[a];)i.push(s[a]),a+=1;for(;u>a&&f>a&&o[u]===s[f];)r.unshift(s[f]),u-=1,f-=1;var c=i.join(O),d=r.join(O),h=o.slice(a,u+1).join(O),p=s.slice(a,f+1).join(O);return c.length&&d.length?c+O+"{"+h+" → "+p+"}"+O+d:c.length?c+O+"{"+h+" → "+p+"}":d.length?"{"+h+" → "+p+"}"+O+d:n+" → "+t}function B(e){return"d2h-"+function(e){var n,t,i=0;for(n=0,t=e.length;n<t;n++)i=(i<<5)-i+e.charCodeAt(n),i|=0;return i}(R(e)).toString().slice(-6)}function $(e){var n="file-changed";return e.isRename||e.isCopy?n="file-renamed":e.isNew?n="file-added":e.isDeleted?n="file-deleted":e.newName!==e.oldName&&(n="file-renamed"),n}function q(e,n,t,i){void 0===i&&(i={});var r=H(H({},j),i),o=r.matching,s=r.maxLineLengthHighlight,a=r.matchWordsThreshold,l=r.diffStyle,u=W(e,t,!1),f=W(n,t,!1);if(u.content.length>s||f.content.length>s)return{oldLine:{prefix:u.prefix,content:D(u.content)},newLine:{prefix:f.prefix,content:D(f.content)}};var c,d,h="char"===l?(c=u.content,d=f.content,b.diff(c,d,undefined)):function(e,n,t){return w.diff(e,n,void 0)}(u.content,f.content),p=[];if("word"===l&&"words"===o){var g=h.filter((function(e){return e.removed})),v=h.filter((function(e){return e.added}));I(v,g).forEach((function(e){1===e[0].length&&1===e[1].length&&P(e[0][0],e[1][0])<a&&(p.push(e[0][0]),p.push(e[1][0]))}))}var m,y=h.reduce((function(e,n){var t=n.added?"ins":n.removed?"del":null,i=p.indexOf(n)>-1?' class="d2h-change"':"",r=D(n.value);return null!==t?e+"<"+t+i+">"+r+"</"+t+">":""+e+r}),"");return{oldLine:{prefix:u.prefix,content:(m=y,m.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:f.prefix,content:M(y)}}}var U="file-summary",V=function(){return V=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},V.apply(this,arguments)},_=V(V({},j),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),G="generic",X="line-by-line",J=function(){function e(e,n){void 0===n&&(n={}),this.hoganUtils=e,this.config=V(V({},_),n)}return e.prototype.render=function(e){var n=this,t=e.map((function(e){var t;return t=e.blocks.length?n.generateFileHtml(e):n.generateEmptyDiff(),n.makeFileDiffHtml(e,t)})).join("\n");return this.hoganUtils.render(G,"wrapper",{content:t})},e.prototype.makeFileDiffHtml=function(e,n){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";var t=this.hoganUtils.template(X,"file-diff"),i=this.hoganUtils.template(G,"file-path"),r=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",$(e));return t.render({file:e,fileHtmlId:B(e),diffs:n,filePath:i.render({fileDiffName:R(e)},{fileIcon:r,fileTag:o})})},e.prototype.generateEmptyDiff=function(){return this.hoganUtils.render(G,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:F})},e.prototype.generateFileHtml=function(e){var n=this,t=k(E((function(n){return W(n.content,e.isCombined).content})));return e.blocks.map((function(i){var r=n.hoganUtils.render(G,"block-header",{CSSLineClass:F,blockHeader:e.isTooBig?i.header:D(i.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return n.applyLineGroupping(i).forEach((function(i){var o=i[0],s=i[1],a=i[2];if(s.length&&a.length&&!o.length)n.applyRematchMatching(s,a,t).map((function(t){var i=t[0],o=t[1],s=n.processChangedLines(e.isCombined,i,o),a=s.left,l=s.right;r+=a,r+=l}));else if(o.length)o.forEach((function(t){var i=W(t.content,e.isCombined),o=i.prefix,s=i.content;r+=n.generateSingleLineHtml({type:F.CONTEXT,prefix:o,content:s,oldNumber:t.oldNumber,newNumber:t.newNumber})}));else if(s.length||a.length){var l=n.processChangedLines(e.isCombined,s,a),u=l.left,f=l.right;r+=u,r+=f}else console.error("Unknown state reached while processing groups of lines",o,s,a)})),r})).join("\n")},e.prototype.applyLineGroupping=function(e){for(var n=[],i=[],r=[],o=0;o<e.lines.length;o++){var s=e.lines[o];(s.type!==t.INSERT&&r.length||s.type===t.CONTEXT&&i.length>0)&&(n.push([[],i,r]),i=[],r=[]),s.type===t.CONTEXT?n.push([[s],[],[]]):s.type===t.INSERT&&0===i.length?n.push([[],[],[s]]):s.type===t.INSERT&&i.length>0?r.push(s):s.type===t.DELETE&&i.push(s)}return(i.length||r.length)&&(n.push([[],i,r]),i=[],r=[]),n},e.prototype.applyRematchMatching=function(e,n,t){var i=e.length*n.length,r=Math.max.apply(null,[0].concat(e.concat(n).map((function(e){return e.content.length}))));return i<this.config.matchingMaxComparisons&&r<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?t(e,n):[[e,n]]},e.prototype.processChangedLines=function(e,n,t){for(var i={right:"",left:""},r=Math.max(n.length,t.length),o=0;o<r;o++){var s=n[o],a=t[o],l=void 0!==s&&void 0!==a?q(s.content,a.content,e,this.config):void 0,u=void 0!==s&&void 0!==s.oldNumber?V(V({},void 0!==l?{prefix:l.oldLine.prefix,content:l.oldLine.content,type:F.DELETE_CHANGES}:V(V({},W(s.content,e)),{type:z(s.type)})),{oldNumber:s.oldNumber,newNumber:s.newNumber}):void 0,f=void 0!==a&&void 0!==a.newNumber?V(V({},void 0!==l?{prefix:l.newLine.prefix,content:l.newLine.content,type:F.INSERT_CHANGES}:V(V({},W(a.content,e)),{type:z(a.type)})),{oldNumber:a.oldNumber,newNumber:a.newNumber}):void 0,c=this.generateLineHtml(u,f),d=c.left,h=c.right;i.left+=d,i.right+=h}return i},e.prototype.generateLineHtml=function(e,n){return{left:this.generateSingleLineHtml(e),right:this.generateSingleLineHtml(n)}},e.prototype.generateSingleLineHtml=function(e){if(void 0===e)return"";var n=this.hoganUtils.render(X,"numbers",{oldNumber:e.oldNumber||"",newNumber:e.newNumber||""});return this.hoganUtils.render(G,"line",{type:e.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===e.prefix?" ":e.prefix,content:e.content,lineNumber:n})},e}();const K=J;var Z=function(){return Z=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},Z.apply(this,arguments)},Q=Z(Z({},j),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Y="generic",ee=function(){function e(e,n){void 0===n&&(n={}),this.hoganUtils=e,this.config=Z(Z({},Q),n)}return e.prototype.render=function(e){var n=this,t=e.map((function(e){var t;return t=e.blocks.length?n.generateFileHtml(e):n.generateEmptyDiff(),n.makeFileDiffHtml(e,t)})).join("\n");return this.hoganUtils.render(Y,"wrapper",{content:t})},e.prototype.makeFileDiffHtml=function(e,n){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";var t=this.hoganUtils.template("side-by-side","file-diff"),i=this.hoganUtils.template(Y,"file-path"),r=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",$(e));return t.render({file:e,fileHtmlId:B(e),diffs:n,filePath:i.render({fileDiffName:R(e)},{fileIcon:r,fileTag:o})})},e.prototype.generateEmptyDiff=function(){return{right:"",left:this.hoganUtils.render(Y,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:F})}},e.prototype.generateFileHtml=function(e){var n=this,t=k(E((function(n){return W(n.content,e.isCombined).content})));return e.blocks.map((function(i){var r={left:n.makeHeaderHtml(i.header,e),right:n.makeHeaderHtml("")};return n.applyLineGroupping(i).forEach((function(i){var o=i[0],s=i[1],a=i[2];if(s.length&&a.length&&!o.length)n.applyRematchMatching(s,a,t).map((function(t){var i=t[0],o=t[1],s=n.processChangedLines(e.isCombined,i,o),a=s.left,l=s.right;r.left+=a,r.right+=l}));else if(o.length)o.forEach((function(t){var i=W(t.content,e.isCombined),o=i.prefix,s=i.content,a=n.generateLineHtml({type:F.CONTEXT,prefix:o,content:s,number:t.oldNumber},{type:F.CONTEXT,prefix:o,content:s,number:t.newNumber}),l=a.left,u=a.right;r.left+=l,r.right+=u}));else if(s.length||a.length){var l=n.processChangedLines(e.isCombined,s,a),u=l.left,f=l.right;r.left+=u,r.right+=f}else console.error("Unknown state reached while processing groups of lines",o,s,a)})),r})).reduce((function(e,n){return{left:e.left+n.left,right:e.right+n.right}}),{left:"",right:""})},e.prototype.applyLineGroupping=function(e){for(var n=[],i=[],r=[],o=0;o<e.lines.length;o++){var s=e.lines[o];(s.type!==t.INSERT&&r.length||s.type===t.CONTEXT&&i.length>0)&&(n.push([[],i,r]),i=[],r=[]),s.type===t.CONTEXT?n.push([[s],[],[]]):s.type===t.INSERT&&0===i.length?n.push([[],[],[s]]):s.type===t.INSERT&&i.length>0?r.push(s):s.type===t.DELETE&&i.push(s)}return(i.length||r.length)&&(n.push([[],i,r]),i=[],r=[]),n},e.prototype.applyRematchMatching=function(e,n,t){var i=e.length*n.length,r=Math.max.apply(null,[0].concat(e.concat(n).map((function(e){return e.content.length}))));return i<this.config.matchingMaxComparisons&&r<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?t(e,n):[[e,n]]},e.prototype.makeHeaderHtml=function(e,n){return this.hoganUtils.render(Y,"block-header",{CSSLineClass:F,blockHeader:(null==n?void 0:n.isTooBig)?e:D(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})},e.prototype.processChangedLines=function(e,n,t){for(var i={right:"",left:""},r=Math.max(n.length,t.length),o=0;o<r;o++){var s=n[o],a=t[o],l=void 0!==s&&void 0!==a?q(s.content,a.content,e,this.config):void 0,u=void 0!==s&&void 0!==s.oldNumber?Z(Z({},void 0!==l?{prefix:l.oldLine.prefix,content:l.oldLine.content,type:F.DELETE_CHANGES}:Z(Z({},W(s.content,e)),{type:z(s.type)})),{number:s.oldNumber}):void 0,f=void 0!==a&&void 0!==a.newNumber?Z(Z({},void 0!==l?{prefix:l.newLine.prefix,content:l.newLine.content,type:F.INSERT_CHANGES}:Z(Z({},W(a.content,e)),{type:z(a.type)})),{number:a.newNumber}):void 0,c=this.generateLineHtml(u,f),d=c.left,h=c.right;i.left+=d,i.right+=h}return i},e.prototype.generateLineHtml=function(e,n){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(n)}},e.prototype.generateSingleHtml=function(e){var n="d2h-code-side-linenumber",t="d2h-code-side-line";return this.hoganUtils.render(Y,"line",{type:(null==e?void 0:e.type)||F.CONTEXT+" d2h-emptyplaceholder",lineClass:void 0!==e?n:n+" d2h-code-side-emptyplaceholder",contentClass:void 0!==e?t:t+" d2h-code-side-emptyplaceholder",prefix:" "===(null==e?void 0:e.prefix)?" ":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})},e}();const ne=ee;var te=o(112),ie={};ie["file-summary-line"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<li class="d2h-file-list-line">'),i.b("\n"+t),i.b(' <span class="d2h-file-name-wrapper">'),i.b("\n"+t),i.b(i.rp("<fileIcon0",e,n," ")),i.b(' <a href="#'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-name">'),i.b(i.v(i.f("fileName",e,n,0))),i.b("</a>"),i.b("\n"+t),i.b(' <span class="d2h-file-stats">'),i.b("\n"+t),i.b(' <span class="d2h-lines-added">'),i.b(i.v(i.f("addedLines",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(' <span class="d2h-lines-deleted">'),i.b(i.v(i.f("deletedLines",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(" </span>"),i.b("\n"+t),i.b(" </span>"),i.b("\n"+t),i.b("</li>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),ie["file-summary-wrapper"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="d2h-file-list-wrapper">'),i.b("\n"+t),i.b(' <div class="d2h-file-list-header">'),i.b("\n"+t),i.b(' <span class="d2h-file-list-title">Files changed ('),i.b(i.v(i.f("filesNumber",e,n,0))),i.b(")</span>"),i.b("\n"+t),i.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),i.b("\n"+t),i.b(' <a class="d2h-file-switch d2h-show">show</a>'),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <ol class="d2h-file-list">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("files",e,n,0))),i.b("\n"+t),i.b(" </ol>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),ie["generic-block-header"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,n,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('"></td>'),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b('">'),i.b(i.t(i.f("blockHeader",e,n,0))),i.b("</div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),ie["generic-empty-diff"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b('">'),i.b("\n"+t),i.b(" File without changes"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),ie["generic-file-path"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-file-name-wrapper">'),i.b("\n"+t),i.b(i.rp("<fileIcon0",e,n," ")),i.b(' <span class="d2h-file-name">'),i.b(i.v(i.f("fileDiffName",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(i.rp("<fileTag1",e,n," ")),i.b("</span>"),i.b("\n"+t),i.b('<label class="d2h-file-collapse">'),i.b("\n"+t),i.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),i.b("\n"+t),i.b(" Viewed"),i.b("\n"+t),i.b("</label>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),ie["generic-line"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,n,0))),i.b(" "),i.b(i.v(i.f("type",e,n,0))),i.b('">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("lineNumber",e,n,0))),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("type",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b('">'),i.b("\n"+t),i.s(i.f("prefix",e,n,1),e,n,0,162,238,"{{ }}")&&(i.rs(e,n,(function(e,n,i){i.b(' <span class="d2h-code-line-prefix">'),i.b(i.t(i.f("prefix",e,n,0))),i.b("</span>"),i.b("\n"+t)})),e.pop()),i.s(i.f("prefix",e,n,1),e,n,1,0,0,"")||(i.b(' <span class="d2h-code-line-prefix"> </span>'),i.b("\n"+t)),i.s(i.f("content",e,n,1),e,n,0,371,445,"{{ }}")&&(i.rs(e,n,(function(e,n,i){i.b(' <span class="d2h-code-line-ctn">'),i.b(i.t(i.f("content",e,n,0))),i.b("</span>"),i.b("\n"+t)})),e.pop()),i.s(i.f("content",e,n,1),e,n,1,0,0,"")||(i.b(' <span class="d2h-code-line-ctn"><br></span>'),i.b("\n"+t)),i.b(" </div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),ie["generic-wrapper"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="d2h-wrapper">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("content",e,n,0))),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),ie["icon-file-added"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),i.b("\n"+t),i.b(' width="14">'),i.b("\n"+t),i.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>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ie["icon-file-changed"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.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>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ie["icon-file-deleted"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.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>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ie["icon-file-renamed"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ie["icon-file"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),i.b("\n"+t),i.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ie["line-by-line-file-diff"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="d2h-file-header">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("filePath",e,n,0))),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-file-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("diffs",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),ie["line-by-line-numbers"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="line-num1">'),i.b(i.v(i.f("oldNumber",e,n,0))),i.b("</div>"),i.b("\n"+t),i.b('<div class="line-num2">'),i.b(i.v(i.f("newNumber",e,n,0))),i.b("</div>"),i.fl()},partials:{},subs:{}}),ie["side-by-side-file-diff"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="d2h-file-header">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("filePath",e,n,0))),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-files-diff">'),i.b("\n"+t),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.d("diffs.left",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.d("diffs.right",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),ie["tag-file-added"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),i.fl()},partials:{},subs:{}}),ie["tag-file-changed"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),i.fl()},partials:{},subs:{}}),ie["tag-file-deleted"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),i.fl()},partials:{},subs:{}}),ie["tag-file-renamed"]=new te.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),i.fl()},partials:{},subs:{}});var re=function(){return re=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},re.apply(this,arguments)};const oe=function(){function e(e){var n=e.compiledTemplates,t=void 0===n?{}:n,i=e.rawTemplates,r=void 0===i?{}:i,o=Object.entries(r).reduce((function(e,n){var t,i=n[0],r=n[1],o=te.compile(r,{asString:!1});return re(re({},e),((t={})[i]=o,t))}),{});this.preCompiledTemplates=re(re(re({},ie),t),o)}return e.compile=function(e){return te.compile(e,{asString:!1})},e.prototype.render=function(e,n,t,i,r){var o=this.templateKey(e,n);try{return this.preCompiledTemplates[o].render(t,i,r)}catch(e){throw new Error("Could not find template to render '"+o+"'")}},e.prototype.template=function(e,n){return this.preCompiledTemplates[this.templateKey(e,n)]},e.prototype.templateKey=function(e,n){return e+"-"+n},e}();var se=function(){return se=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},se.apply(this,arguments)},ae=se(se(se({},_),Q),{outputFormat:"line-by-line",drawFileList:!0});function le(e,n){void 0===n&&(n={});var i=se(se({},ae),n),r="string"==typeof e?function(e,n){void 0===n&&(n={});var i=[],r=null,o=null,s=null,a=null,l=null,u=null,d=null,p="--- ",g="+++ ",v="@@",b=/^old mode (\d{6})/,m=/^new mode (\d{6})/,y=/^deleted file mode (\d{6})/,w=/^new file mode (\d{6})/,x=/^copy from "?(.+)"?/,N=/^copy to "?(.+)"?/,L=/^rename from "?(.+)"?/,S=/^rename to "?(.+)"?/,C=/^similarity index (\d+)%/,T=/^dissimilarity index (\d+)%/,E=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,k=/^Binary files (.*) and (.*) differ/,H=/^GIT binary patch/,F=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,j=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,O=/^new file mode (\d{6})/,P=/^deleted file mode (\d{6}),(\d{6})/,I=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function A(){null!==o&&null!==r&&(r.blocks.push(o),o=null)}function M(){null!==r&&(r.oldName||null===u||(r.oldName=u),r.newName||null===d||(r.newName=d),r.newName&&(i.push(r),r=null)),u=null,d=null}function z(){A(),M(),r={blocks:[],deletedLines:0,addedLines:0}}function D(e){var n;A(),null!==r&&((n=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(r.isCombined=!1,s=parseInt(n[1],10),l=parseInt(n[2],10)):(n=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(r.isCombined=!0,s=parseInt(n[1],10),a=parseInt(n[2],10),l=parseInt(n[3],10)):(e.startsWith(v)&&console.error("Failed to parse lines, starting in 0!"),s=0,l=0,r.isCombined=!1)),o={lines:[],oldStartLine:s,oldStartLine2:a,newStartLine:l,header:e}}return I.forEach((function(e,a){if(e&&!e.startsWith("*")){var A,M=I[a-1],W=I[a+1],R=I[a+2];if(e.startsWith("diff")){if(z(),(A=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(e))&&(u=h(A[1],void 0,n.dstPrefix),d=h(A[2],void 0,n.srcPrefix)),null===r)throw new Error("Where is my file !!!");r.isGitDiff=!0}else if((!r||!r.isGitDiff&&r&&e.startsWith(p)&&W.startsWith(g)&&R.startsWith(v))&&z(),!(null==r?void 0:r.isTooBig)){if(r&&("number"==typeof n.diffMaxChanges&&r.addedLines+r.deletedLines>n.diffMaxChanges||"number"==typeof n.diffMaxLineLength&&e.length>n.diffMaxLineLength))return r.isTooBig=!0,r.addedLines=0,r.deletedLines=0,r.blocks=[],o=null,void D("function"==typeof n.diffTooBigMessage?n.diffTooBigMessage(i.length):"Diff too big to be displayed");if(e.startsWith(p)&&W.startsWith(g)||e.startsWith(g)&&M.startsWith(p)){if(r&&!r.oldName&&e.startsWith("--- ")&&(A=function(e,n){return h(e,"---",n)}(e,n.srcPrefix)))return r.oldName=A,void(r.language=f(r.oldName,r.language));if(r&&!r.newName&&e.startsWith("+++ ")&&(A=function(e,n){return h(e,"+++",n)}(e,n.dstPrefix)))return r.newName=A,void(r.language=f(r.newName,r.language))}if(r&&(e.startsWith(v)||r.isGitDiff&&r.oldName&&r.newName&&!o))D(e);else if(o&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))!function(e){if(null!==r&&null!==o&&null!==s&&null!==l){var n={content:e},i=r.isCombined?["+ "," +","++"]:["+"],a=r.isCombined?["- "," -","--"]:["-"];c(e,i)?(r.addedLines++,n.type=t.INSERT,n.oldNumber=void 0,n.newNumber=l++):c(e,a)?(r.deletedLines++,n.type=t.DELETE,n.oldNumber=s++,n.newNumber=void 0):(n.type=t.CONTEXT,n.oldNumber=s++,n.newNumber=l++),o.lines.push(n)}}(e);else{var B=!function(e,n){for(var t=n;t<I.length-3;){if(e.startsWith("diff"))return!1;if(I[t].startsWith(p)&&I[t+1].startsWith(g)&&I[t+2].startsWith(v))return!0;t++}return!1}(e,a);if(null===r)throw new Error("Where is my file !!!");(A=b.exec(e))?r.oldMode=A[1]:(A=m.exec(e))?r.newMode=A[1]:(A=y.exec(e))?(r.deletedFileMode=A[1],r.isDeleted=!0):(A=w.exec(e))?(r.newFileMode=A[1],r.isNew=!0):(A=x.exec(e))?(B&&(r.oldName=A[1]),r.isCopy=!0):(A=N.exec(e))?(B&&(r.newName=A[1]),r.isCopy=!0):(A=L.exec(e))?(B&&(r.oldName=A[1]),r.isRename=!0):(A=S.exec(e))?(B&&(r.newName=A[1]),r.isRename=!0):(A=k.exec(e))?(r.isBinary=!0,r.oldName=h(A[1],void 0,n.srcPrefix),r.newName=h(A[2],void 0,n.dstPrefix),D("Binary file")):H.test(e)?(r.isBinary=!0,D(e)):(A=C.exec(e))?r.unchangedPercentage=parseInt(A[1],10):(A=T.exec(e))?r.changedPercentage=parseInt(A[1],10):(A=E.exec(e))?(r.checksumBefore=A[1],r.checksumAfter=A[2],A[3]&&(r.mode=A[3])):(A=F.exec(e))?(r.checksumBefore=[A[2],A[3]],r.checksumAfter=A[1]):(A=j.exec(e))?(r.oldMode=[A[2],A[3]],r.newMode=A[1]):(A=O.exec(e))?(r.newFileMode=A[1],r.isNew=!0):(A=P.exec(e))&&(r.deletedFileMode=A[1],r.isDeleted=!0)}}}})),A(),M(),i}(e,i):e,o=new oe(i),s=i.drawFileList?function(e,n){var t=e.map((function(e){return n.render(U,"line",{fileHtmlId:B(e),oldName:e.oldName,newName:e.newName,fileName:R(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:n.template("icon",$(e))})})).join("\n");return n.render(U,"wrapper",{filesNumber:e.length,files:t})}(r,o):"";return s+("side-by-side"===i.outputFormat?new ne(o,i).render(r):new K(o,i).render(r))}var ue=o(210),fe=(0,e.stringEnum)([].concat(["side-by-side","line-by-line"])),ce=(0,e.stringEnum)([].concat(["dark","light"])),de={oldContent:(0,ue.string)().def(""),newContent:(0,ue.string)().def(""),diffFormat:(0,ue.string)().def(fe["line-by-line"]),diffContext:(0,ue.number)(),theme:(0,ue.string)().def("light"),language:(0,ue.string)().def("javascript"),hljs:e.PropTypes.any.isRequired};const he=(0,i.defineComponent)({name:"CodeDiff",props:de,emits:[],setup:function(t){var o=(0,i.ref)(null),s=(0,i.ref)(""),a=(0,i.computed)((function(){return(0,e.classes)({dark:t.theme===ce.dark},"hljs bk-code-diff")}));function l(e,n){var a,l,u=(0,r.createPatch)("",t.oldContent,t.newContent,"","",{context:e});s.value=(a=le(u,{drawFileList:!1,matching:"lines",outputFormat:t.diffFormat}),l=n,a.replace(/d2h-code-line-ctn/g,(function(e){return"".concat(e," lang-").concat(l)}))),(0,i.nextTick)((function(){o.value&&o.value.querySelectorAll(".lang-".concat(t.language)).forEach((function(e){t.hljs.highlightElement(e)}))}))}return(0,i.onMounted)((function(){l(t.diffContext,t.language)})),(0,i.watch)((function(){return[t.diffContext,t.language]}),(function(e){var t,i,r=(i=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,r,o=[],s=!0,a=!1;try{for(t=t.call(e);!(s=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==t.return||t.return()}finally{if(a)throw r}}return o}}(t,i)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());l(r[0],r[1])})),function(){return(0,i.createVNode)("div",{ref:o,class:a.value,innerHTML:s.value},null)}}}),pe=(0,e.withInstall)(he)})(),s})()));
|
1
|
+
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("vue"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types"],n);else{var t="object"==typeof exports?n(require("../shared"),require("vue"),require("vue-types")):n(e["../shared"],e.vue,e["vue-types"]);for(var i in t)("object"==typeof exports?exports:e)[i]=t[i]}}(self,((e,n,t)=>(()=>{var i={2148:(e,n)=>{!function(e){var n=/\S/,t=/\"/g,i=/\n/g,r=/\r/g,o=/\\/g,a=/\u2028/,s=/\u2029/;function l(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function c(e,n,t){if(n.charAt(t)!=e.charAt(0))return!1;for(var i=1,r=e.length;i<r;i++)if(n.charAt(t+i)!=e.charAt(i))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(t,i){var r,o=t.length,a=0,s=null,u=null,f="",d=[],p=!1,h=0,b=0,g="{{",v="}}";function m(){f.length>0&&(d.push({tag:"_t",text:new String(f)}),f="")}function y(t,i){if(m(),t&&function(){for(var t=!0,i=b;i<d.length;i++)if(!(t=e.tags[d[i].tag]<e.tags._v||"_t"==d[i].tag&&null===d[i].text.match(n)))return!1;return t}())for(var r,o=b;o<d.length;o++)d[o].text&&((r=d[o+1])&&">"==r.tag&&(r.indent=d[o].text.toString()),d.splice(o,1));else i||d.push({tag:"\n"});p=!1,b=d.length}function w(e,n){var t="="+v,i=e.indexOf(t,n),r=l(e.substring(e.indexOf("=",n)+1,i)).split(" ");return g=r[0],v=r[r.length-1],i+t.length-1}for(i&&(i=i.split(" "),g=i[0],v=i[1]),h=0;h<o;h++)0==a?c(g,t,h)?(--h,m(),a=1):"\n"==t.charAt(h)?y(p):f+=t.charAt(h):1==a?(h+=g.length-1,"="==(s=(u=e.tags[t.charAt(h+1)])?t.charAt(h+1):"_v")?(h=w(t,h),a=0):(u&&h++,a=2),p=h):c(v,t,h)?(d.push({tag:s,n:l(f),otag:g,ctag:v,i:"/"==s?p-g.length:h+v.length}),f="",h+=v.length-1,a=0,"{"==s&&("}}"==v?h++:"}"===(r=d[d.length-1]).n.substr(r.n.length-1)&&(r.n=r.n.substring(0,r.n.length-1)))):f+=t.charAt(h);return y(p,!0),d};var u={_t:!0,"\n":!0,$:!0,"/":!0};function f(n,t,i,r){var o,a=[],s=null,l=null;for(o=i[i.length-1];n.length>0;){if(l=n.shift(),o&&"<"==o.tag&&!(l.tag in u))throw new Error("Illegal content in < super tag.");if(e.tags[l.tag]<=e.tags.$||d(l,r))i.push(l),l.nodes=f(n,l.tag,i,r);else{if("/"==l.tag){if(0===i.length)throw new Error("Closing tag without opener: /"+l.n);if(s=i.pop(),l.n!=s.n&&!p(l.n,s.n,r))throw new Error("Nesting error: "+s.n+" vs. "+l.n);return s.end=l.i,a}"\n"==l.tag&&(l.last=0==n.length||"\n"==n[0].tag)}a.push(l)}if(i.length>0)throw new Error("missing closing tag: "+i.pop().n);return a}function d(e,n){for(var t=0,i=n.length;t<i;t++)if(n[t].o==e.n)return e.tag="#",!0}function p(e,n,t){for(var i=0,r=t.length;i<r;i++)if(t[i].c==e&&t[i].o==n)return!0}function h(e){var n=[];for(var t in e.partials)n.push('"'+g(t)+'":{name:"'+g(e.partials[t].name)+'", '+h(e.partials[t])+"}");return"partials: {"+n.join(",")+"}, subs: "+function(e){var n=[];for(var t in e)n.push('"'+g(t)+'": function(c,p,t,i) {'+e[t]+"}");return"{ "+n.join(",")+" }"}(e.subs)}e.stringify=function(n,t,i){return"{code: function (c,p,i) { "+e.wrapMain(n.code)+" },"+h(n)+"}"};var b=0;function g(e){return e.replace(o,"\\\\").replace(t,'\\"').replace(i,"\\n").replace(r,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function v(e){return~e.indexOf(".")?"d":"f"}function m(e,n){var t="<"+(n.prefix||"")+e.n+b++;return n.partials[t]={name:e.n,partials:{}},n.code+='t.b(t.rp("'+g(t)+'",c,p,"'+(e.indent||"")+'"));',t}function y(e,n){n.code+="t.b(t.t(t."+v(e.n)+'("'+g(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(n,t,i){b=0;var r={code:"",subs:{},partials:{}};return e.walk(n,r),i.asString?this.stringify(r,t,i):this.makeTemplate(r,t,i)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,n,t){var i=this.makePartials(e);return i.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(i,n,this,t)},e.makePartials=function(e){var n,t={subs:{},partials:e.partials,name:e.name};for(n in t.partials)t.partials[n]=this.makePartials(t.partials[n]);for(n in e.subs)t.subs[n]=new Function("c","p","t","i",e.subs[n]);return t},e.codegen={"#":function(n,t){t.code+="if(t.s(t."+v(n.n)+'("'+g(n.n)+'",c,p,1),c,p,0,'+n.i+","+n.end+',"'+n.otag+" "+n.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(n.nodes,t),t.code+="});c.pop();}"},"^":function(n,t){t.code+="if(!t.s(t."+v(n.n)+'("'+g(n.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(n.nodes,t),t.code+="};"},">":m,"<":function(n,t){var i={partials:{},code:"",subs:{},inPartial:!0};e.walk(n.nodes,i);var r=t.partials[m(n,t)];r.subs=i.subs,r.partials=i.partials},$:function(n,t){var i={subs:{},code:"",partials:t.partials,prefix:n.n};e.walk(n.nodes,i),t.subs[n.n]=i.code,t.inPartial||(t.code+='t.sub("'+g(n.n)+'",c,p,i);')},"\n":function(e,n){n.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,n){n.code+="t.b(t.v(t."+v(e.n)+'("'+g(e.n)+'",c,p,0)));'},_t:function(e,n){n.code+=w('"'+g(e.text)+'"')},"{":y,"&":y},e.walk=function(n,t){for(var i,r=0,o=n.length;r<o;r++)(i=e.codegen[n[r].tag])&&i(n[r],t);return t},e.parse=function(e,n,t){return f(e,0,[],(t=t||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,n){return[e,!!n.asString,!!n.disableLambda,n.delimiters,!!n.modelGet].join("||")},e.compile=function(n,t){t=t||{};var i=e.cacheKey(n,t),r=this.cache[i];if(r){var o=r.partials;for(var a in o)delete o[a].instance;return r}return r=this.generate(this.parse(this.scan(n,t.delimiters),n,t),n,t),this.cache[i]=r}}(n)},112:(e,n,t)=>{var i=t(2148);i.Template=t(8719).Template,i.template=i.Template,e.exports=i},8719:(e,n)=>{!function(e){function n(e,n,t){var i;return n&&"object"==typeof n&&(void 0!==n[e]?i=n[e]:t&&n.get&&"function"==typeof n.get&&(i=n.get(e))),i}e.Template=function(e,n,t,i){e=e||{},this.r=e.code||this.r,this.c=t,this.options=i||{},this.text=n||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,n,t){return""},v:function(e){return e=l(e),s.test(e)?e.replace(t,"&").replace(i,"<").replace(r,">").replace(o,"'").replace(a,"""):e},t:l,render:function(e,n,t){return this.ri([e],n||{},t)},ri:function(e,n,t){return this.r(e,n,t)},ep:function(e,n){var t=this.partials[e],i=n[t.name];if(t.instance&&t.base==i)return t.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,t.subs){for(key in n.stackText||(n.stackText={}),t.subs)n.stackText[key]||(n.stackText[key]=void 0!==this.activeSub&&n.stackText[this.activeSub]?n.stackText[this.activeSub]:this.text);i=function(e,n,t,i,r,o){function a(){}function s(){}var l;a.prototype=e,s.prototype=e.subs;var c=new a;for(l in c.subs=new s,c.subsText={},c.buf="",i=i||{},c.stackSubs=i,c.subsText=o,n)i[l]||(i[l]=n[l]);for(l in i)c.subs[l]=i[l];for(l in r=r||{},c.stackPartials=r,t)r[l]||(r[l]=t[l]);for(l in r)c.partials[l]=r[l];return c}(i,t.subs,t.partials,this.stackSubs,this.stackPartials,n.stackText)}return this.partials[e].instance=i,i},rp:function(e,n,t,i){var r=this.ep(e,t);return r?r.ri(n,t,i):""},rs:function(e,n,t){var i=e[e.length-1];if(c(i))for(var r=0;r<i.length;r++)e.push(i[r]),t(e,n,this),e.pop();else t(e,n,this)},s:function(e,n,t,i,r,o,a){var s;return(!c(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,n,t,i,r,o,a)),s=!!e,!i&&s&&n&&n.push("object"==typeof e?e:n[n.length-1]),s)},d:function(e,t,i,r){var o,a=e.split("."),s=this.f(a[0],t,i,r),l=this.options.modelGet,u=null;if("."===e&&c(t[t.length-2]))s=t[t.length-1];else for(var f=1;f<a.length;f++)void 0!==(o=n(a[f],s,l))?(u=s,s=o):s="";return!(r&&!s)&&(r||"function"!=typeof s||(t.push(u),s=this.mv(s,t,i),t.pop()),s)},f:function(e,t,i,r){for(var o=!1,a=!1,s=this.options.modelGet,l=t.length-1;l>=0;l--)if(void 0!==(o=n(e,t[l],s))){a=!0;break}return a?(r||"function"!=typeof o||(o=this.mv(o,t,i)),o):!r&&""},ls:function(e,n,t,i,r){var o=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(l(e.call(n,i)),n,t)),this.options.delimiters=o,!1},ct:function(e,n,t){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(n,t)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,n,t,i,r,o,a){var s,l=n[n.length-1],c=e.call(l);return"function"==typeof c?!!i||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,l,t,s.substring(r,o),a)):c},mv:function(e,n,t){var i=n[n.length-1],r=e.call(i);return"function"==typeof r?this.ct(l(r.call(i)),i,t):r},sub:function(e,n,t,i){var r=this.subs[e];r&&(this.activeSub=e,r(n,t,this,i),this.activeSub=!1)}};var t=/&/g,i=/</g,r=/>/g,o=/\'/g,a=/\"/g,s=/[&<>\"\']/;function l(e){return String(null==e?"":e)}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(n)},4212:n=>{"use strict";n.exports=e},748:e=>{"use strict";e.exports=n},210:e=>{"use strict";e.exports=t}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var t=r[e]={exports:{}};return i[e](t,t.exports,o),t.exports}o.d=(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";o.r(a),o.d(a,{default:()=>ke});var e=o(4212);function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}var t=o(748);function i(){}function r(e,n,t,i,r){for(var o=0,a=n.length,s=0,l=0;o<a;o++){var c=n[o];if(c.removed){if(c.value=e.join(i.slice(l,l+c.count)),l+=c.count,o&&n[o-1].added){var u=n[o-1];n[o-1]=n[o],n[o]=u}}else{if(!c.added&&r){var f=t.slice(s,s+c.count);f=f.map((function(e,n){var t=i[l+n];return t.length>e.length?t:e})),c.value=e.join(f)}else c.value=e.join(t.slice(s,s+c.count));s+=c.count,c.added||(l+=c.count)}}var d=n[a-1];return a>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(n[a-2].value+=d.value,n.pop()),n}function s(e){return{newPos:e.newPos,components:e.components.slice(0)}}i.prototype={diff:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.callback;"function"==typeof t&&(i=t,t={}),this.options=t;var o=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e));var l=(n=this.removeEmpty(this.tokenize(n))).length,c=e.length,u=1,f=l+c,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],n,e,0);if(d[0].newPos+1>=l&&p+1>=c)return a([{value:this.join(n),count:n.length}]);function h(){for(var t=-1*u;t<=u;t+=2){var i=void 0,f=d[t-1],p=d[t+1],h=(p?p.newPos:0)-t;f&&(d[t-1]=void 0);var b=f&&f.newPos+1<l,g=p&&0<=h&&h<c;if(b||g){if(!b||g&&f.newPos<p.newPos?(i=s(p),o.pushComponent(i.components,void 0,!0)):((i=f).newPos++,o.pushComponent(i.components,!0,void 0)),h=o.extractCommon(i,n,e,t),i.newPos+1>=l&&h+1>=c)return a(r(o,i.components,n,e,o.useLongestToken));d[t]=i}else d[t]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>f)return i();h()||e()}),0)}();else for(;u<=f;){var b=h();if(b)return b}},pushComponent:function(e,n,t){var i=e[e.length-1];i&&i.added===n&&i.removed===t?e[e.length-1]={count:i.count+1,added:n,removed:t}:e.push({count:1,added:n,removed:t})},extractCommon:function(e,n,t,i){for(var r=n.length,o=t.length,a=e.newPos,s=a-i,l=0;a+1<r&&s+1<o&&this.equals(n[a+1],t[s+1]);)a++,s++,l++;return l&&e.components.push({count:l}),e.newPos=a,s},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}},new i;var l=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,c=/\S/,u=new i;u.equals=function(e,n){return this.options.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e===n||this.options.ignoreWhitespace&&!c.test(e)&&!c.test(n)},u.tokenize=function(e){for(var n=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;t<n.length-1;t++)!n[t+1]&&n[t+2]&&l.test(n[t])&&l.test(n[t+2])&&(n[t]+=n[t+2],n.splice(t+1,2),t--);return n};var f=new i;function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return h(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}f.tokenize=function(e){var n=[],t=e.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var i=0;i<t.length;i++){var r=t[i];i%2&&!this.options.newlineIsToken?n[n.length-1]+=r:(this.options.ignoreWhitespace&&(r=r.trim()),n.push(r))}return n},(new i).tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)},(new i).tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var b=Object.prototype.toString,g=new i;function v(e,n,t,i,r){var o,a;for(n=n||[],t=t||[],i&&(e=i(r,e)),o=0;o<n.length;o+=1)if(n[o]===e)return t[o];if("[object Array]"===b.call(e)){for(n.push(e),a=new Array(e.length),t.push(a),o=0;o<e.length;o+=1)a[o]=v(e[o],n,t,i,r);return n.pop(),t.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),"object"===d(e)&&null!==e){n.push(e),a={},t.push(a);var s,l=[];for(s in e)e.hasOwnProperty(s)&&l.push(s);for(l.sort(),o=0;o<l.length;o+=1)a[s=l[o]]=v(e[s],n,t,i,s);n.pop(),t.pop()}else a=e;return a}g.useLongestToken=!0,g.tokenize=f.tokenize,g.castInput=function(e){var n=this.options,t=n.undefinedReplacement,i=n.stringifyReplacer,r=void 0===i?function(e,n){return void 0===n?t:n}:i;return"string"==typeof e?e:JSON.stringify(v(e,null,null,r),r," ")},g.equals=function(e,n){return i.prototype.equals.call(g,e.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var m,y=new i;function w(e,n,t,i,r,o){return function(e,n,t,i,r,o,a){return function(e){var n=[];e.oldFileName==e.newFileName&&n.push("Index: "+e.oldFileName),n.push("==================================================================="),n.push("--- "+e.oldFileName+(void 0===e.oldHeader?"":"\t"+e.oldHeader)),n.push("+++ "+e.newFileName+(void 0===e.newHeader?"":"\t"+e.newHeader));for(var t=0;t<e.hunks.length;t++){var i=e.hunks[t];0===i.oldLines&&(i.oldStart-=1),0===i.newLines&&(i.newStart-=1),n.push("@@ -"+i.oldStart+","+i.oldLines+" +"+i.newStart+","+i.newLines+" @@"),n.push.apply(n,i.lines)}return n.join("\n")+"\n"}(function(e,n,t,i,r,o,a){a||(a={}),void 0===a.context&&(a.context=4);var s=function(e,n,t){return f.diff(e,n,t)}(t,i,a);function l(e){return e.map((function(e){return" "+e}))}s.push({value:"",lines:[]});for(var c=[],u=0,d=0,h=[],b=1,g=1,v=function(e){var n=s[e],r=n.lines||n.value.replace(/\n$/,"").split("\n");if(n.lines=r,n.added||n.removed){var o;if(!u){var f=s[e-1];u=b,d=g,f&&(h=a.context>0?l(f.lines.slice(-a.context)):[],u-=h.length,d-=h.length)}(o=h).push.apply(o,p(r.map((function(e){return(n.added?"+":"-")+e})))),n.added?g+=r.length:b+=r.length}else{if(u)if(r.length<=2*a.context&&e<s.length-2){var v;(v=h).push.apply(v,p(l(r)))}else{var m,y=Math.min(r.length,a.context);(m=h).push.apply(m,p(l(r.slice(0,y))));var w={oldStart:u,oldLines:b-u+y,newStart:d,newLines:g-d+y,lines:h};if(e>=s.length-2&&r.length<=a.context){var x=/\n$/.test(t),N=/\n$/.test(i),C=0==r.length&&h.length>w.oldLines;!x&&C&&t.length>0&&h.splice(w.oldLines,0,"\"),(x||C)&&N||h.push("\")}c.push(w),u=0,d=0,h=[]}b+=r.length,g+=r.length}},m=0;m<s.length;m++)v(m);return{oldFileName:e,newFileName:n,oldHeader:r,newHeader:o,hunks:c}}(e,n,t,i,r,o,a))}(e,e,n,t,i,r,o)}y.tokenize=function(e){return e.slice()},y.join=y.removeEmpty=function(e){return e},function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(m||(m={}));var x=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");function N(e){return e?e.replace(/\\/g,"/"):e}var C=function(e,n,t){if(t||2===arguments.length)for(var i,r=0,o=n.length;r<o;r++)!i&&r in n||(i||(i=Array.prototype.slice.call(n,0,r)),i[r]=n[r]);return e.concat(i||Array.prototype.slice.call(n))};function T(e,n){var t=e.split(".");return t.length>1?t[t.length-1]:n}function S(e,n){return n.reduce((function(n,t){return n||e.startsWith(t)}),!1)}var E=["a/","b/","i/","w/","c/","o/"];function L(e,n,t){var i=void 0!==t?C(C([],E,!0),[t],!1):E,r=((n?new RegExp("^".concat(n.replace(x,"\\$&"),' "?(.+?)"?$')):new RegExp('^"?(.+?)"?$')).exec(e)||[])[1],o=void 0===r?"":r,a=i.find((function(e){return 0===o.indexOf(e)}));return(a?o.slice(a.length):o).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function k(){}function H(e,n,t,i,r){for(var o=0,a=n.length,s=0,l=0;o<a;o++){var c=n[o];if(c.removed){if(c.value=e.join(i.slice(l,l+c.count)),l+=c.count,o&&n[o-1].added){var u=n[o-1];n[o-1]=n[o],n[o]=u}}else{if(!c.added&&r){var f=t.slice(s,s+c.count);f=f.map((function(e,n){var t=i[l+n];return t.length>e.length?t:e})),c.value=e.join(f)}else c.value=e.join(t.slice(s,s+c.count));s+=c.count,c.added||(l+=c.count)}}var d=n[a-1];return a>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(n[a-2].value+=d.value,n.pop()),n}function j(e){return{newPos:e.newPos,components:e.components.slice(0)}}k.prototype={diff:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.callback;"function"==typeof t&&(i=t,t={}),this.options=t;var r=this;function o(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e));var a=(n=this.removeEmpty(this.tokenize(n))).length,s=e.length,l=1,c=a+s,u=[{newPos:-1,components:[]}],f=this.extractCommon(u[0],n,e,0);if(u[0].newPos+1>=a&&f+1>=s)return o([{value:this.join(n),count:n.length}]);function d(){for(var t=-1*l;t<=l;t+=2){var i=void 0,c=u[t-1],f=u[t+1],d=(f?f.newPos:0)-t;c&&(u[t-1]=void 0);var p=c&&c.newPos+1<a,h=f&&0<=d&&d<s;if(p||h){if(!p||h&&c.newPos<f.newPos?(i=j(f),r.pushComponent(i.components,void 0,!0)):((i=c).newPos++,r.pushComponent(i.components,!0,void 0)),d=r.extractCommon(i,n,e,t),i.newPos+1>=a&&d+1>=s)return o(H(r,i.components,n,e,r.useLongestToken));u[t]=i}else u[t]=void 0}l++}if(i)!function e(){setTimeout((function(){if(l>c)return i();d()||e()}),0)}();else for(;l<=c;){var p=d();if(p)return p}},pushComponent:function(e,n,t){var i=e[e.length-1];i&&i.added===n&&i.removed===t?e[e.length-1]={count:i.count+1,added:n,removed:t}:e.push({count:1,added:n,removed:t})},extractCommon:function(e,n,t,i){for(var r=n.length,o=t.length,a=e.newPos,s=a-i,l=0;a+1<r&&s+1<o&&this.equals(n[a+1],t[s+1]);)a++,s++,l++;return l&&e.components.push({count:l}),e.newPos=a,s},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var I=new k,O=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,A=/\S/,P=new k;P.equals=function(e,n){return this.options.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e===n||this.options.ignoreWhitespace&&!A.test(e)&&!A.test(n)},P.tokenize=function(e){for(var n=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;t<n.length-1;t++)!n[t+1]&&n[t+2]&&O.test(n[t])&&O.test(n[t+2])&&(n[t]+=n[t+2],n.splice(t+1,2),t--);return n};var M=new k;function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}M.tokenize=function(e){var n=[],t=e.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var i=0;i<t.length;i++){var r=t[i];i%2&&!this.options.newlineIsToken?n[n.length-1]+=r:(this.options.ignoreWhitespace&&(r=r.trim()),n.push(r))}return n},(new k).tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)},(new k).tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var F=Object.prototype.toString,D=new k;function W(e,n,t,i,r){var o,a;for(n=n||[],t=t||[],i&&(e=i(r,e)),o=0;o<n.length;o+=1)if(n[o]===e)return t[o];if("[object Array]"===F.call(e)){for(n.push(e),a=new Array(e.length),t.push(a),o=0;o<e.length;o+=1)a[o]=W(e[o],n,t,i,r);return n.pop(),t.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),"object"===z(e)&&null!==e){n.push(e),a={},t.push(a);var s,l=[];for(s in e)e.hasOwnProperty(s)&&l.push(s);for(l.sort(),o=0;o<l.length;o+=1)a[s=l[o]]=W(e[s],n,t,i,s);n.pop(),t.pop()}else a=e;return a}D.useLongestToken=!0,D.tokenize=M.tokenize,D.castInput=function(e){var n=this.options,t=n.undefinedReplacement,i=n.stringifyReplacer,r=void 0===i?function(e,n){return void 0===n?t:n}:i;return"string"==typeof e?e:JSON.stringify(W(e,null,null,r),r," ")},D.equals=function(e,n){return k.prototype.equals.call(D,e.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var R=new k;function B(e){return function(n,t){var i=e(n).trim(),r=e(t).trim();return function(e,n){if(0===e.length)return n.length;if(0===n.length)return e.length;var t,i,r=[];for(t=0;t<=n.length;t++)r[t]=[t];for(i=0;i<=e.length;i++)r[0][i]=i;for(t=1;t<=n.length;t++)for(i=1;i<=e.length;i++)n.charAt(t-1)===e.charAt(i-1)?r[t][i]=r[t-1][i-1]:r[t][i]=Math.min(r[t-1][i-1]+1,Math.min(r[t][i-1]+1,r[t-1][i]+1));return r[n.length][e.length]}(i,r)/(i.length+r.length)}}function U(e){return function n(t,i,r,o){void 0===r&&(r=0),void 0===o&&(o=new Map);var a=function(n,t,i){void 0===i&&(i=new Map);for(var r,o=1/0,a=0;a<n.length;++a)for(var s=0;s<t.length;++s){var l=JSON.stringify([n[a],t[s]]),c=void 0;i.has(l)&&(c=i.get(l))||(c=e(n[a],t[s]),i.set(l,c)),c<o&&(r={indexA:a,indexB:s,score:o=c})}return r}(t,i,o);if(!a||t.length+i.length<3)return[[t,i]];var s=t.slice(0,a.indexA),l=i.slice(0,a.indexB),c=[t[a.indexA]],u=[i[a.indexB]],f=a.indexA+1,d=a.indexB+1,p=t.slice(f),h=i.slice(d),b=n(s,l,r+1,o),g=n(c,u,r+1,o),v=n(p,h,r+1,o),m=g;return(a.indexA>0||a.indexB>0)&&(m=b.concat(m)),(t.length>f||i.length>d)&&(m=m.concat(v)),m}}R.tokenize=function(e){return e.slice()},R.join=R.removeEmpty=function(e){return e};var $=function(){return $=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},$.apply(this,arguments)},q={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},V={matching:"none",matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:"word"},G="/",_=B((function(e){return e.value})),X=U(_);function J(e){return-1!==e.indexOf("dev/null")}function K(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function Z(e){switch(e){case m.CONTEXT:return q.CONTEXT;case m.INSERT:return q.INSERTS;case m.DELETE:return q.DELETES}}function Q(e){return e.slice(0).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function Y(e,n,t){void 0===t&&(t=!0);var i=function(e){return e?2:1}(n);return{prefix:e.substring(0,i),content:t?Q(e.substring(i)):e.substring(i)}}function ee(e){var n=N(e.oldName),t=N(e.newName);if(n===t||J(n)||J(t))return J(t)?n:t;for(var i=[],r=[],o=n.split(G),a=t.split(G),s=0,l=o.length-1,c=a.length-1;s<l&&s<c&&o[s]===a[s];)i.push(a[s]),s+=1;for(;l>s&&c>s&&o[l]===a[c];)r.unshift(a[c]),l-=1,c-=1;var u=i.join(G),f=r.join(G),d=o.slice(s,l+1).join(G),p=a.slice(s,c+1).join(G);return u.length&&f.length?u+G+"{"+d+" → "+p+"}"+G+f:u.length?u+G+"{"+d+" → "+p+"}":f.length?"{"+d+" → "+p+"}"+G+f:n+" → "+t}function ne(e){return"d2h-".concat(function(e){var n,t,i=0;for(n=0,t=e.length;n<t;n++)i=(i<<5)-i+e.charCodeAt(n),i|=0;return i}(ee(e)).toString().slice(-6))}function te(e){var n="file-changed";return e.isRename||e.isCopy?n="file-renamed":e.isNew?n="file-added":e.isDeleted?n="file-deleted":e.newName!==e.oldName&&(n="file-renamed"),n}function ie(e,n,t,i){void 0===i&&(i={});var r=$($({},V),i),o=r.matching,a=r.maxLineLengthHighlight,s=r.matchWordsThreshold,l=r.diffStyle,c=Y(e,t,!1),u=Y(n,t,!1);if(c.content.length>a||u.content.length>a)return{oldLine:{prefix:c.prefix,content:Q(c.content)},newLine:{prefix:u.prefix,content:Q(u.content)}};var f,d,p="char"===l?(f=c.content,d=u.content,I.diff(f,d,undefined)):function(e,n,t){return P.diff(e,n,void 0)}(c.content,u.content),h=[];if("word"===l&&"words"===o){var b=p.filter((function(e){return e.removed})),g=p.filter((function(e){return e.added}));X(g,b).forEach((function(e){1===e[0].length&&1===e[1].length&&_(e[0][0],e[1][0])<s&&(h.push(e[0][0]),h.push(e[1][0]))}))}var v,m=p.reduce((function(e,n){var t=n.added?"ins":n.removed?"del":null,i=h.indexOf(n)>-1?' class="d2h-change"':"",r=Q(n.value);return null!==t?"".concat(e,"<").concat(t).concat(i,">").concat(r,"</").concat(t,">"):"".concat(e).concat(r)}),"");return{oldLine:{prefix:c.prefix,content:(v=m,v.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:u.prefix,content:K(m)}}}var re="file-summary",oe=function(){return oe=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},oe.apply(this,arguments)},ae=oe(oe({},V),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),se="generic",le="line-by-line",ce=function(){function e(e,n){void 0===n&&(n={}),this.hoganUtils=e,this.config=oe(oe({},ae),n)}return e.prototype.render=function(e){var n=this,t=e.map((function(e){var t;return t=e.blocks.length?n.generateFileHtml(e):n.generateEmptyDiff(),n.makeFileDiffHtml(e,t)})).join("\n");return this.hoganUtils.render(se,"wrapper",{content:t})},e.prototype.makeFileDiffHtml=function(e,n){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";var t=this.hoganUtils.template(le,"file-diff"),i=this.hoganUtils.template(se,"file-path"),r=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",te(e));return t.render({file:e,fileHtmlId:ne(e),diffs:n,filePath:i.render({fileDiffName:ee(e)},{fileIcon:r,fileTag:o})})},e.prototype.generateEmptyDiff=function(){return this.hoganUtils.render(se,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:q})},e.prototype.generateFileHtml=function(e){var n=this,t=U(B((function(n){return Y(n.content,e.isCombined).content})));return e.blocks.map((function(i){var r=n.hoganUtils.render(se,"block-header",{CSSLineClass:q,blockHeader:e.isTooBig?i.header:Q(i.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return n.applyLineGroupping(i).forEach((function(i){var o=i[0],a=i[1],s=i[2];if(a.length&&s.length&&!o.length)n.applyRematchMatching(a,s,t).map((function(t){var i=t[0],o=t[1],a=n.processChangedLines(e.isCombined,i,o),s=a.left,l=a.right;r+=s,r+=l}));else if(o.length)o.forEach((function(t){var i=Y(t.content,e.isCombined),o=i.prefix,a=i.content;r+=n.generateSingleLineHtml({type:q.CONTEXT,prefix:o,content:a,oldNumber:t.oldNumber,newNumber:t.newNumber})}));else if(a.length||s.length){var l=n.processChangedLines(e.isCombined,a,s),c=l.left,u=l.right;r+=c,r+=u}else console.error("Unknown state reached while processing groups of lines",o,a,s)})),r})).join("\n")},e.prototype.applyLineGroupping=function(e){for(var n=[],t=[],i=[],r=0;r<e.lines.length;r++){var o=e.lines[r];(o.type!==m.INSERT&&i.length||o.type===m.CONTEXT&&t.length>0)&&(n.push([[],t,i]),t=[],i=[]),o.type===m.CONTEXT?n.push([[o],[],[]]):o.type===m.INSERT&&0===t.length?n.push([[],[],[o]]):o.type===m.INSERT&&t.length>0?i.push(o):o.type===m.DELETE&&t.push(o)}return(t.length||i.length)&&(n.push([[],t,i]),t=[],i=[]),n},e.prototype.applyRematchMatching=function(e,n,t){var i=e.length*n.length,r=Math.max.apply(null,[0].concat(e.concat(n).map((function(e){return e.content.length}))));return i<this.config.matchingMaxComparisons&&r<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?t(e,n):[[e,n]]},e.prototype.processChangedLines=function(e,n,t){for(var i={right:"",left:""},r=Math.max(n.length,t.length),o=0;o<r;o++){var a=n[o],s=t[o],l=void 0!==a&&void 0!==s?ie(a.content,s.content,e,this.config):void 0,c=void 0!==a&&void 0!==a.oldNumber?oe(oe({},void 0!==l?{prefix:l.oldLine.prefix,content:l.oldLine.content,type:q.DELETE_CHANGES}:oe(oe({},Y(a.content,e)),{type:Z(a.type)})),{oldNumber:a.oldNumber,newNumber:a.newNumber}):void 0,u=void 0!==s&&void 0!==s.newNumber?oe(oe({},void 0!==l?{prefix:l.newLine.prefix,content:l.newLine.content,type:q.INSERT_CHANGES}:oe(oe({},Y(s.content,e)),{type:Z(s.type)})),{oldNumber:s.oldNumber,newNumber:s.newNumber}):void 0,f=this.generateLineHtml(c,u),d=f.left,p=f.right;i.left+=d,i.right+=p}return i},e.prototype.generateLineHtml=function(e,n){return{left:this.generateSingleLineHtml(e),right:this.generateSingleLineHtml(n)}},e.prototype.generateSingleLineHtml=function(e){if(void 0===e)return"";var n=this.hoganUtils.render(le,"numbers",{oldNumber:e.oldNumber||"",newNumber:e.newNumber||""});return this.hoganUtils.render(se,"line",{type:e.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===e.prefix?" ":e.prefix,content:e.content,lineNumber:n})},e}();const ue=ce;var fe=function(){return fe=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},fe.apply(this,arguments)},de=fe(fe({},V),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),pe="generic",he=function(){function e(e,n){void 0===n&&(n={}),this.hoganUtils=e,this.config=fe(fe({},de),n)}return e.prototype.render=function(e){var n=this,t=e.map((function(e){var t;return t=e.blocks.length?n.generateFileHtml(e):n.generateEmptyDiff(),n.makeFileDiffHtml(e,t)})).join("\n");return this.hoganUtils.render(pe,"wrapper",{content:t})},e.prototype.makeFileDiffHtml=function(e,n){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";var t=this.hoganUtils.template("side-by-side","file-diff"),i=this.hoganUtils.template(pe,"file-path"),r=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",te(e));return t.render({file:e,fileHtmlId:ne(e),diffs:n,filePath:i.render({fileDiffName:ee(e)},{fileIcon:r,fileTag:o})})},e.prototype.generateEmptyDiff=function(){return{right:"",left:this.hoganUtils.render(pe,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:q})}},e.prototype.generateFileHtml=function(e){var n=this,t=U(B((function(n){return Y(n.content,e.isCombined).content})));return e.blocks.map((function(i){var r={left:n.makeHeaderHtml(i.header,e),right:n.makeHeaderHtml("")};return n.applyLineGroupping(i).forEach((function(i){var o=i[0],a=i[1],s=i[2];if(a.length&&s.length&&!o.length)n.applyRematchMatching(a,s,t).map((function(t){var i=t[0],o=t[1],a=n.processChangedLines(e.isCombined,i,o),s=a.left,l=a.right;r.left+=s,r.right+=l}));else if(o.length)o.forEach((function(t){var i=Y(t.content,e.isCombined),o=i.prefix,a=i.content,s=n.generateLineHtml({type:q.CONTEXT,prefix:o,content:a,number:t.oldNumber},{type:q.CONTEXT,prefix:o,content:a,number:t.newNumber}),l=s.left,c=s.right;r.left+=l,r.right+=c}));else if(a.length||s.length){var l=n.processChangedLines(e.isCombined,a,s),c=l.left,u=l.right;r.left+=c,r.right+=u}else console.error("Unknown state reached while processing groups of lines",o,a,s)})),r})).reduce((function(e,n){return{left:e.left+n.left,right:e.right+n.right}}),{left:"",right:""})},e.prototype.applyLineGroupping=function(e){for(var n=[],t=[],i=[],r=0;r<e.lines.length;r++){var o=e.lines[r];(o.type!==m.INSERT&&i.length||o.type===m.CONTEXT&&t.length>0)&&(n.push([[],t,i]),t=[],i=[]),o.type===m.CONTEXT?n.push([[o],[],[]]):o.type===m.INSERT&&0===t.length?n.push([[],[],[o]]):o.type===m.INSERT&&t.length>0?i.push(o):o.type===m.DELETE&&t.push(o)}return(t.length||i.length)&&(n.push([[],t,i]),t=[],i=[]),n},e.prototype.applyRematchMatching=function(e,n,t){var i=e.length*n.length,r=Math.max.apply(null,[0].concat(e.concat(n).map((function(e){return e.content.length}))));return i<this.config.matchingMaxComparisons&&r<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?t(e,n):[[e,n]]},e.prototype.makeHeaderHtml=function(e,n){return this.hoganUtils.render(pe,"block-header",{CSSLineClass:q,blockHeader:(null==n?void 0:n.isTooBig)?e:Q(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})},e.prototype.processChangedLines=function(e,n,t){for(var i={right:"",left:""},r=Math.max(n.length,t.length),o=0;o<r;o++){var a=n[o],s=t[o],l=void 0!==a&&void 0!==s?ie(a.content,s.content,e,this.config):void 0,c=void 0!==a&&void 0!==a.oldNumber?fe(fe({},void 0!==l?{prefix:l.oldLine.prefix,content:l.oldLine.content,type:q.DELETE_CHANGES}:fe(fe({},Y(a.content,e)),{type:Z(a.type)})),{number:a.oldNumber}):void 0,u=void 0!==s&&void 0!==s.newNumber?fe(fe({},void 0!==l?{prefix:l.newLine.prefix,content:l.newLine.content,type:q.INSERT_CHANGES}:fe(fe({},Y(s.content,e)),{type:Z(s.type)})),{number:s.newNumber}):void 0,f=this.generateLineHtml(c,u),d=f.left,p=f.right;i.left+=d,i.right+=p}return i},e.prototype.generateLineHtml=function(e,n){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(n)}},e.prototype.generateSingleHtml=function(e){var n="d2h-code-side-linenumber",t="d2h-code-side-line";return this.hoganUtils.render(pe,"line",{type:(null==e?void 0:e.type)||"".concat(q.CONTEXT," d2h-emptyplaceholder"),lineClass:void 0!==e?n:"".concat(n," d2h-code-side-emptyplaceholder"),contentClass:void 0!==e?t:"".concat(t," d2h-code-side-emptyplaceholder"),prefix:" "===(null==e?void 0:e.prefix)?" ":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})},e}();const be=he;var ge=o(112),ve={};ve["file-summary-line"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<li class="d2h-file-list-line">'),i.b("\n"+t),i.b(' <span class="d2h-file-name-wrapper">'),i.b("\n"+t),i.b(i.rp("<fileIcon0",e,n," ")),i.b(' <a href="#'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-name">'),i.b(i.v(i.f("fileName",e,n,0))),i.b("</a>"),i.b("\n"+t),i.b(' <span class="d2h-file-stats">'),i.b("\n"+t),i.b(' <span class="d2h-lines-added">'),i.b(i.v(i.f("addedLines",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(' <span class="d2h-lines-deleted">'),i.b(i.v(i.f("deletedLines",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(" </span>"),i.b("\n"+t),i.b(" </span>"),i.b("\n"+t),i.b("</li>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),ve["file-summary-wrapper"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="d2h-file-list-wrapper">'),i.b("\n"+t),i.b(' <div class="d2h-file-list-header">'),i.b("\n"+t),i.b(' <span class="d2h-file-list-title">Files changed ('),i.b(i.v(i.f("filesNumber",e,n,0))),i.b(")</span>"),i.b("\n"+t),i.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),i.b("\n"+t),i.b(' <a class="d2h-file-switch d2h-show">show</a>'),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <ol class="d2h-file-list">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("files",e,n,0))),i.b("\n"+t),i.b(" </ol>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),ve["generic-block-header"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,n,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('"></td>'),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b('">'),i.b(i.t(i.f("blockHeader",e,n,0))),i.b("</div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),ve["generic-empty-diff"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b('">'),i.b("\n"+t),i.b(" File without changes"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),ve["generic-file-path"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-file-name-wrapper">'),i.b("\n"+t),i.b(i.rp("<fileIcon0",e,n," ")),i.b(' <span class="d2h-file-name">'),i.b(i.v(i.f("fileDiffName",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(i.rp("<fileTag1",e,n," ")),i.b("</span>"),i.b("\n"+t),i.b('<label class="d2h-file-collapse">'),i.b("\n"+t),i.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),i.b("\n"+t),i.b(" Viewed"),i.b("\n"+t),i.b("</label>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),ve["generic-line"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,n,0))),i.b(" "),i.b(i.v(i.f("type",e,n,0))),i.b('">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("lineNumber",e,n,0))),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("type",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b('">'),i.b("\n"+t),i.s(i.f("prefix",e,n,1),e,n,0,162,238,"{{ }}")&&(i.rs(e,n,(function(e,n,i){i.b(' <span class="d2h-code-line-prefix">'),i.b(i.t(i.f("prefix",e,n,0))),i.b("</span>"),i.b("\n"+t)})),e.pop()),i.s(i.f("prefix",e,n,1),e,n,1,0,0,"")||(i.b(' <span class="d2h-code-line-prefix"> </span>'),i.b("\n"+t)),i.s(i.f("content",e,n,1),e,n,0,371,445,"{{ }}")&&(i.rs(e,n,(function(e,n,i){i.b(' <span class="d2h-code-line-ctn">'),i.b(i.t(i.f("content",e,n,0))),i.b("</span>"),i.b("\n"+t)})),e.pop()),i.s(i.f("content",e,n,1),e,n,1,0,0,"")||(i.b(' <span class="d2h-code-line-ctn"><br></span>'),i.b("\n"+t)),i.b(" </div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),ve["generic-wrapper"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="d2h-wrapper">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("content",e,n,0))),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),ve["icon-file-added"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),i.b("\n"+t),i.b(' width="14">'),i.b("\n"+t),i.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>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ve["icon-file-changed"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.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>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ve["icon-file-deleted"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.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>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ve["icon-file-renamed"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ve["icon-file"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),i.b("\n"+t),i.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),ve["line-by-line-file-diff"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="d2h-file-header">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("filePath",e,n,0))),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-file-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("diffs",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),ve["line-by-line-numbers"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="line-num1">'),i.b(i.v(i.f("oldNumber",e,n,0))),i.b("</div>"),i.b("\n"+t),i.b('<div class="line-num2">'),i.b(i.v(i.f("newNumber",e,n,0))),i.b("</div>"),i.fl()},partials:{},subs:{}}),ve["side-by-side-file-diff"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="d2h-file-header">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("filePath",e,n,0))),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-files-diff">'),i.b("\n"+t),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.d("diffs.left",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.d("diffs.right",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),ve["tag-file-added"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),i.fl()},partials:{},subs:{}}),ve["tag-file-changed"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),i.fl()},partials:{},subs:{}}),ve["tag-file-deleted"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),i.fl()},partials:{},subs:{}}),ve["tag-file-renamed"]=new ge.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),i.fl()},partials:{},subs:{}});var me=function(){return me=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},me.apply(this,arguments)};const ye=function(){function e(e){var n=e.compiledTemplates,t=void 0===n?{}:n,i=e.rawTemplates,r=void 0===i?{}:i,o=Object.entries(r).reduce((function(e,n){var t,i=n[0],r=n[1],o=ge.compile(r,{asString:!1});return me(me({},e),((t={})[i]=o,t))}),{});this.preCompiledTemplates=me(me(me({},ve),t),o)}return e.compile=function(e){return ge.compile(e,{asString:!1})},e.prototype.render=function(e,n,t,i,r){var o=this.templateKey(e,n);try{return this.preCompiledTemplates[o].render(t,i,r)}catch(e){throw new Error("Could not find template to render '".concat(o,"'"))}},e.prototype.template=function(e,n){return this.preCompiledTemplates[this.templateKey(e,n)]},e.prototype.templateKey=function(e,n){return"".concat(e,"-").concat(n)},e}();var we=function(){return we=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},we.apply(this,arguments)},xe=we(we(we({},ae),de),{outputFormat:"line-by-line",drawFileList:!0});function Ne(e,n){void 0===n&&(n={});var t=we(we({},xe),n),i="string"==typeof e?function(e,n){void 0===n&&(n={});var t=[],i=null,r=null,o=null,a=null,s=null,l=null,c=null,u="--- ",f="+++ ",d="@@",p=/^old mode (\d{6})/,h=/^new mode (\d{6})/,b=/^deleted file mode (\d{6})/,g=/^new file mode (\d{6})/,v=/^copy from "?(.+)"?/,y=/^copy to "?(.+)"?/,w=/^rename from "?(.+)"?/,x=/^rename to "?(.+)"?/,N=/^similarity index (\d+)%/,C=/^dissimilarity index (\d+)%/,E=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,k=/^Binary files (.*) and (.*) differ/,H=/^GIT binary patch/,j=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,I=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,O=/^new file mode (\d{6})/,A=/^deleted file mode (\d{6}),(\d{6})/,P=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function M(){null!==r&&null!==i&&(i.blocks.push(r),r=null)}function z(){null!==i&&(i.oldName||null===l||(i.oldName=l),i.newName||null===c||(i.newName=c),i.newName&&(t.push(i),i=null)),l=null,c=null}function F(){M(),z(),i={blocks:[],deletedLines:0,addedLines:0}}function D(e){var n;M(),null!==i&&((n=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(i.isCombined=!1,o=parseInt(n[1],10),s=parseInt(n[2],10)):(n=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(i.isCombined=!0,o=parseInt(n[1],10),a=parseInt(n[2],10),s=parseInt(n[3],10)):(e.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),o=0,s=0,i.isCombined=!1)),r={lines:[],oldStartLine:o,oldStartLine2:a,newStartLine:s,header:e}}return P.forEach((function(e,a){if(e&&!e.startsWith("*")){var M,z=P[a-1],W=P[a+1],R=P[a+2];if(e.startsWith("diff")){if(F(),(M=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(e))&&(l=L(M[1],void 0,n.dstPrefix),c=L(M[2],void 0,n.srcPrefix)),null===i)throw new Error("Where is my file !!!");i.isGitDiff=!0}else if((!i||!i.isGitDiff&&i&&e.startsWith(u)&&W.startsWith(f)&&R.startsWith(d))&&F(),!(null==i?void 0:i.isTooBig)){if(i&&("number"==typeof n.diffMaxChanges&&i.addedLines+i.deletedLines>n.diffMaxChanges||"number"==typeof n.diffMaxLineLength&&e.length>n.diffMaxLineLength))return i.isTooBig=!0,i.addedLines=0,i.deletedLines=0,i.blocks=[],r=null,void D("function"==typeof n.diffTooBigMessage?n.diffTooBigMessage(t.length):"Diff too big to be displayed");if(e.startsWith(u)&&W.startsWith(f)||e.startsWith(f)&&z.startsWith(u)){if(i&&!i.oldName&&e.startsWith("--- ")&&(M=function(e,n){return L(e,"---",n)}(e,n.srcPrefix)))return i.oldName=M,void(i.language=T(i.oldName,i.language));if(i&&!i.newName&&e.startsWith("+++ ")&&(M=function(e,n){return L(e,"+++",n)}(e,n.dstPrefix)))return i.newName=M,void(i.language=T(i.newName,i.language))}if(i&&(e.startsWith(d)||i.isGitDiff&&i.oldName&&i.newName&&!r))D(e);else if(r&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))!function(e){if(null!==i&&null!==r&&null!==o&&null!==s){var n={content:e},t=i.isCombined?["+ "," +","++"]:["+"],a=i.isCombined?["- "," -","--"]:["-"];S(e,t)?(i.addedLines++,n.type=m.INSERT,n.oldNumber=void 0,n.newNumber=s++):S(e,a)?(i.deletedLines++,n.type=m.DELETE,n.oldNumber=o++,n.newNumber=void 0):(n.type=m.CONTEXT,n.oldNumber=o++,n.newNumber=s++),r.lines.push(n)}}(e);else{var B=!function(e,n){for(var t=n;t<P.length-3;){if(e.startsWith("diff"))return!1;if(P[t].startsWith(u)&&P[t+1].startsWith(f)&&P[t+2].startsWith(d))return!0;t++}return!1}(e,a);if(null===i)throw new Error("Where is my file !!!");(M=p.exec(e))?i.oldMode=M[1]:(M=h.exec(e))?i.newMode=M[1]:(M=b.exec(e))?(i.deletedFileMode=M[1],i.isDeleted=!0):(M=g.exec(e))?(i.newFileMode=M[1],i.isNew=!0):(M=v.exec(e))?(B&&(i.oldName=M[1]),i.isCopy=!0):(M=y.exec(e))?(B&&(i.newName=M[1]),i.isCopy=!0):(M=w.exec(e))?(B&&(i.oldName=M[1]),i.isRename=!0):(M=x.exec(e))?(B&&(i.newName=M[1]),i.isRename=!0):(M=k.exec(e))?(i.isBinary=!0,i.oldName=L(M[1],void 0,n.srcPrefix),i.newName=L(M[2],void 0,n.dstPrefix),D("Binary file")):H.test(e)?(i.isBinary=!0,D(e)):(M=N.exec(e))?i.unchangedPercentage=parseInt(M[1],10):(M=C.exec(e))?i.changedPercentage=parseInt(M[1],10):(M=E.exec(e))?(i.checksumBefore=M[1],i.checksumAfter=M[2],M[3]&&(i.mode=M[3])):(M=j.exec(e))?(i.checksumBefore=[M[2],M[3]],i.checksumAfter=M[1]):(M=I.exec(e))?(i.oldMode=[M[2],M[3]],i.newMode=M[1]):(M=O.exec(e))?(i.newFileMode=M[1],i.isNew=!0):(M=A.exec(e))&&(i.deletedFileMode=M[1],i.isDeleted=!0)}}}})),M(),z(),t}(e,t):e,r=new ye(t),o=t.drawFileList?function(e,n){var t=e.map((function(e){return n.render(re,"line",{fileHtmlId:ne(e),oldName:e.oldName,newName:e.newName,fileName:ee(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:n.template("icon",te(e))})})).join("\n");return n.render(re,"wrapper",{filesNumber:e.length,files:t})}(i,r):"";return o+("side-by-side"===t.outputFormat?new be(r,t).render(i):new ue(r,t).render(i))}var Ce=o(210),Te=(0,e.stringEnum)([].concat(["side-by-side","line-by-line"])),Se=(0,e.stringEnum)([].concat(["dark","light"])),Ee={oldContent:(0,Ce.string)().def(""),newContent:(0,Ce.string)().def(""),diffFormat:(0,Ce.string)().def(Te["line-by-line"]),diffContext:(0,Ce.number)(),theme:(0,Ce.string)().def("light"),language:(0,Ce.string)().def("javascript"),hljs:e.PropTypes.any.isRequired};const Le=(0,t.defineComponent)({name:"CodeDiff",props:Ee,emits:[],setup:function(i){var r=(0,t.ref)(null),o=(0,t.ref)(""),a=(0,t.computed)((function(){return(0,e.classes)({dark:i.theme===Se.dark},"hljs bk-code-diff")}));function s(e,n){var a,s,l=w("",i.oldContent,i.newContent,"","",{context:e});o.value=(a=Ne(l,{drawFileList:!1,matching:"lines",outputFormat:i.diffFormat}),s=n,a.replace(/d2h-code-line-ctn/g,(function(e){return"".concat(e," lang-").concat(s)}))),(0,t.nextTick)((function(){r.value&&r.value.querySelectorAll(".lang-".concat(i.language)).forEach((function(e){i.hljs.highlightElement(e)}))}))}return(0,t.onMounted)((function(){s(i.diffContext,i.language)})),(0,t.watch)((function(){return[i.diffContext,i.language]}),(function(e){var t,i,r=(i=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,r,o=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw r}}return o}}(t,i)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());s(r[0],r[1])})),function(){return(0,t.createVNode)("div",{ref:r,class:a.value,innerHTML:o.value},null)}}}),ke=(0,e.withInstall)(Le)})(),a})()));
|
package/lib/components.d.ts
CHANGED