@knime/jsonforms 0.1.7 → 1.0.1
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/CHANGELOG.md +14 -0
- package/README.md +71 -70
- package/dist/AnyOfTwinlist-B_ZhgekG.js +20 -0
- package/dist/BaseButton-arvXMjXG.js +112 -0
- package/dist/Button-Bc51Uur8.js +83 -0
- package/dist/Checkbox-BxPISyW3.js +75 -0
- package/dist/CheckboxControl-B-RyvD0K.js +42 -0
- package/dist/{Checkboxes-C6FkTqJJ.js → Checkboxes-COtqblKj.js} +11 -10
- package/dist/CheckboxesControl-YyKWzrxj.js +38 -0
- package/dist/ColumnFilter-bO-fKaHD.js +22 -0
- package/dist/ColumnSelect-D0vqxZ2B.js +65 -0
- package/dist/{ComboBoxControl-ZCl7sHRN.js → ComboBoxControl-CLL5eRHX.js} +127 -126
- package/dist/DateControl-v0qHckKz.js +27 -0
- package/dist/DateTimeControl-COnMFfMd.js +47 -0
- package/dist/DateTimeInput-ltP7o2TE.js +11059 -0
- package/dist/Dropdown-By1NMrXZ.js +691 -0
- package/dist/{DropdownControl-BFnea4SN.js → DropdownControl-Eb3G4P0X.js} +1 -1
- package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-Cfmqdv7v.js +223 -0
- package/dist/ErrorMessage-fuIcc8xw.js +23 -0
- package/dist/FunctionButton-DBec3TQi.js +75 -0
- package/dist/HorizontalLayout-Dsv1qfyL.js +30 -0
- package/dist/InputField-BKH5rtn3.js +148 -0
- package/dist/IntegerControl-CBuOHc4B.js +18 -0
- package/dist/{IntervalControl-CsuXbPwA.js → IntervalControl-JL6QGHT2.js} +214 -216
- package/dist/{MultiselectListBox-BWKtEC8t.js → MultiselectListBox-Dv5n9S3f.js} +4 -3
- package/dist/NameFilter-oHBcHQTY.js +22 -0
- package/dist/NumberControl-Cwf50Oe-.js +18 -0
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-C_g1bVI2.js +42 -0
- package/dist/{NumberInput-84bJjfB4.js → NumberInput-DERn3NyL.js} +9 -7
- package/dist/OneOfDropdown-kY3PQFJX.js +32 -0
- package/dist/RadioControl-DsVkQLSI.js +22 -0
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-BsA00YLx.js +106 -0
- package/dist/{RichTextControl-DgdPhNzf.js → RichTextControl-DXH5XiAI.js} +4595 -3481
- package/dist/SectionLayout-BDgtf57K.js +43 -0
- package/dist/SimpleButtonControl-6d7wNl3P.js +58 -0
- package/dist/SimpleTwinlistControl-CJyR3gN8.js +48 -0
- package/dist/SortListControl-On9GHu_U.js +356 -0
- package/dist/TextAreaControl-DF_pLD80.js +108 -0
- package/dist/TextControl-BTZ4ONmV.js +4 -0
- package/dist/TextControl.vue_vue_type_script_setup_true_lang-CYfvYMWm.js +65 -0
- package/dist/{TimeControl-D07XI-Sl.js → TimeControl-D2j2e_nC.js} +122 -124
- package/dist/TwinlistControl-DcFpZrni.js +553 -0
- package/dist/{TwinlistLoadingInfo-DHKwC-WM.js → TwinlistLoadingInfo-CTVlN9EZ.js} +183 -175
- package/dist/{ValueSwitch-DXmeJXda.js → ValueSwitch-CpE1f4ie.js} +1 -1
- package/dist/ValueSwitchControl-BQFL8H6P.js +18 -0
- package/dist/VerticalLayout-D1KXulG4.js +30 -0
- package/dist/{VerticalLayoutBase-CI2PQj0c.js → VerticalLayoutBase-D-NdtOho.js} +2 -2
- package/dist/VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js +13201 -0
- package/dist/_baseAssignValue-C56BMUo_.js +19 -0
- package/dist/_baseEach-1sO8_8tT.js +31 -0
- package/dist/_baseIsEqual-d71B2UwX.js +248 -0
- package/dist/_baseIteratee-BgB8cpN8.js +104 -0
- package/dist/_getTag-BiNJdVyP.js +314 -0
- package/dist/arrow-dropdown-DjUxzjqC.js +17 -0
- package/dist/close-h7XT0ja0.js +17 -0
- package/dist/floating-ui.vue.esm-CDpUY3-t.js +986 -0
- package/dist/getPossibleValuesFromUiSchema-BFJtj-id.js +40 -0
- package/dist/index-BrIvBSNK-BRWnkVln.js +685 -0
- package/dist/index-C1PjXAJX.js +17 -0
- package/dist/index-Cp7Xre_V.js +331 -0
- package/dist/isObject-B53jY8Qg.js +7 -0
- package/dist/isSymbol-DLKDpjGl.js +8 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.d.ts +2 -0
- package/dist/knime-jsonforms.js +119 -3
- package/dist/magic-string.es-DFyz70Kz.js +860 -0
- package/dist/popper-1JCni0RT.js +907 -0
- package/dist/reload-BhzcZRFp.js +17 -0
- package/dist/src/JsonFormsDialog.vue.d.ts +50 -0
- package/dist/src/constants/index.d.ts +2 -0
- package/dist/src/constants/inputFormats.d.ts +25 -0
- package/dist/src/constants/priorityRanks.d.ts +4 -0
- package/dist/src/higherOrderComponents/control/LabeledControl.vue.d.ts +31 -0
- package/dist/src/higherOrderComponents/control/addLabel.d.ts +6 -0
- package/dist/src/higherOrderComponents/control/controlToRenderer.d.ts +6 -0
- package/dist/src/higherOrderComponents/control/handleVisibility.d.ts +2 -0
- package/dist/src/higherOrderComponents/control/index.d.ts +7 -0
- package/dist/src/higherOrderComponents/control/types.d.ts +36 -0
- package/dist/src/higherOrderComponents/control/util.d.ts +44 -0
- package/dist/src/higherOrderComponents/index.d.ts +3 -0
- package/dist/src/higherOrderComponents/layout/handleVisibility.d.ts +2 -0
- package/dist/src/higherOrderComponents/layout/index.d.ts +4 -0
- package/dist/src/higherOrderComponents/layout/layoutToRenderer.d.ts +6 -0
- package/dist/src/higherOrderComponents/layout/types.d.ts +28 -0
- package/dist/src/higherOrderComponents/layout/util.d.ts +25 -0
- package/dist/src/higherOrderComponents/types.d.ts +25 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/layoutComponents/Form.vue.d.ts +10 -0
- package/dist/src/layoutComponents/HorizontalLayout.vue.d.ts +12 -0
- package/dist/src/layoutComponents/SectionLayout.vue.d.ts +21 -0
- package/dist/src/layoutComponents/VerticalLayout.vue.d.ts +12 -0
- package/dist/src/layoutComponents/VerticalLayoutBase.vue.d.ts +26 -0
- package/dist/src/layoutComponents/index.d.ts +3 -0
- package/dist/src/loading/LoadingDialog.vue.d.ts +2 -0
- package/dist/src/renderers/checkboxRenderer.d.ts +192 -0
- package/dist/src/renderers/checkboxesRenderer.d.ts +7 -0
- package/dist/src/renderers/columnFilterRenderer.d.ts +5 -0
- package/dist/src/renderers/columnSelectRenderer.d.ts +209 -0
- package/dist/src/renderers/comboBoxRenderer.d.ts +6 -0
- package/dist/src/renderers/dateTimeRenderer.d.ts +5 -0
- package/dist/src/renderers/defaultRenderers.d.ts +1898 -0
- package/dist/src/renderers/dropdownRenderer.d.ts +253 -0
- package/dist/src/renderers/fallbackRenderers.d.ts +649 -0
- package/dist/src/renderers/horizontalLayoutRenderer.d.ts +48 -0
- package/dist/src/renderers/index.d.ts +1 -0
- package/dist/src/renderers/integerRenderer.d.ts +5 -0
- package/dist/src/renderers/intervalRenderer.d.ts +5 -0
- package/dist/src/renderers/localDateRenderer.d.ts +5 -0
- package/dist/src/renderers/localTimeRenderer.d.ts +5 -0
- package/dist/src/renderers/nameFilterRenderer.d.ts +5 -0
- package/dist/src/renderers/numberRenderer.d.ts +5 -0
- package/dist/src/renderers/radioRenderer.d.ts +5 -0
- package/dist/src/renderers/richTextRenderer.d.ts +5 -0
- package/dist/src/renderers/sectionLayoutRenderer.d.ts +108 -0
- package/dist/src/renderers/simpleButtonRenderer.d.ts +121 -0
- package/dist/src/renderers/sortListRenderer.d.ts +288 -0
- package/dist/src/renderers/textAreaRenderer.d.ts +5 -0
- package/dist/src/renderers/textMessageRenderer.d.ts +89 -0
- package/dist/src/renderers/textRenderer.d.ts +193 -0
- package/dist/src/renderers/twinlistRenderer.d.ts +13 -0
- package/dist/src/renderers/valueSwitchRenderer.d.ts +5 -0
- package/dist/src/renderers/verticalLayoutRenderer.d.ts +94 -0
- package/dist/src/types/ChoicesUiSchema.d.ts +21 -0
- package/dist/src/types/Control.d.ts +2 -0
- package/dist/src/types/alert.d.ts +5 -0
- package/dist/src/types/provided.d.ts +25 -0
- package/dist/src/uiComponents/CheckboxControl.vue.d.ts +22 -0
- package/dist/src/uiComponents/CheckboxesControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/ColumnSelect.vue.d.ts +26 -0
- package/dist/src/uiComponents/ComboBoxControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/DateControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/DateTimeControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/DropdownControl.vue.d.ts +52 -0
- package/dist/src/uiComponents/DynamicIcon.vue.d.ts +16 -0
- package/dist/src/uiComponents/ErrorMessage.vue.d.ts +23 -0
- package/dist/src/uiComponents/IntegerControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/IntervalControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/NumberControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/NumberControlBase.vue.d.ts +19 -0
- package/dist/src/uiComponents/OneOfDropdown.vue.d.ts +23 -0
- package/dist/src/uiComponents/RadioControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/RadioControlBase.vue.d.ts +19 -0
- package/dist/src/uiComponents/SimpleButtonControl.vue.d.ts +121 -0
- package/dist/src/uiComponents/SortListControl.vue.d.ts +93 -0
- package/dist/src/uiComponents/TextAreaControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/TextControl.vue.d.ts +23 -0
- package/dist/src/uiComponents/TextMessageControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/TimeControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/ValueSwitchControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/composables/useHideOnNull.d.ts +28 -0
- package/dist/src/uiComponents/composables/useProvidedState.d.ts +3 -0
- package/dist/src/uiComponents/index.d.ts +4 -0
- package/dist/src/uiComponents/loading/LoadingDropdown.vue.d.ts +12 -0
- package/dist/src/uiComponents/loading/TwinlistLoadingInfo.vue.d.ts +2 -0
- package/dist/src/uiComponents/loading/types/LoadingDropdownProps.d.ts +8 -0
- package/dist/src/uiComponents/richTextControl/DialogLinkModal.vue.d.ts +29 -0
- package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +12 -0
- package/dist/src/uiComponents/twinlist/AnyOfTwinlist.vue.d.ts +12 -0
- package/dist/src/uiComponents/twinlist/ColumnFilter.vue.d.ts +13 -0
- package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +13 -0
- package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +109 -0
- package/dist/src/uiComponents/twinlist/TwinlistControl.vue.d.ts +67 -0
- package/dist/src/uiComponents/twinlist/useUnknownValuesInTwinlist.d.ts +19 -0
- package/dist/src/utils/getFlattenedSettings.d.ts +5 -0
- package/dist/src/utils/getPossibleValuesFromUiSchema.d.ts +10 -0
- package/dist/src/utils/index.d.ts +15 -0
- package/dist/src/utils/inject.d.ts +3 -0
- package/dist/src/utils/localTimeUtils.d.ts +16 -0
- package/dist/svgWithTitle-zrGi2kyc.js +18 -0
- package/dist/testUtils/component.d.ts +190 -0
- package/dist/testUtils/index.d.ts +2 -0
- package/dist/testUtils/renderer.d.ts +6 -0
- package/dist/testing.d.ts +2 -0
- package/dist/testing.js +18889 -0
- package/dist/toString-C9vll-oa.js +26 -0
- package/dist/useSearch-hpyYQ_6y.js +74 -0
- package/package.json +11 -7
- package/dist/AnyOfTwinlist-BAbzoFfn.js +0 -17
- package/dist/ArrayLayout-Cfdlkm_T.js +0 -487
- package/dist/ButtonControl-yAb2GdQI.js +0 -127
- package/dist/CheckboxControl-Ck45Jycu.js +0 -50
- package/dist/CheckboxesControl-Xx9tpOL6.js +0 -39
- package/dist/ColumnFilter-u7yVpuFC.js +0 -17
- package/dist/ColumnSelect-DfXHTA0Z.js +0 -60
- package/dist/CredentialsControl-D1Te47JG.js +0 -20
- package/dist/CredentialsControlBase-Dqhh-4hT.js +0 -110
- package/dist/DateControl-CuV2lKvs.js +0 -30
- package/dist/DateTimeControl-BDZ18Hzl.js +0 -4
- package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-BRWvAXuk.js +0 -171
- package/dist/DynamicValuesControl-BgNPwoHm.js +0 -127
- package/dist/FileChooserControl-HX_GjlNB.js +0 -605
- package/dist/FileExplorerTab-FjmnUl9M.js +0 -3951
- package/dist/HorizontalLayout-BrHkxvnP.js +0 -39
- package/dist/IntegerControl-Dxk1Y8LA.js +0 -13
- package/dist/LayoutComponentWrapper-VvzxL4qE.js +0 -36
- package/dist/LegacyCredentialsControl-p5U7Vp0h.js +0 -62
- package/dist/LocalFileChooserControl-Cr0A0dg6.js +0 -57
- package/dist/MenuItems.vue_vue_type_style_index_0_lang-BiJVA2Wt.js +0 -464
- package/dist/NameFilter-CsfBC6e2.js +0 -17
- package/dist/NodeDialog.vue.d.ts +0 -8
- package/dist/NumberControl-BJCFqjn3.js +0 -13
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-DkAPaKAi.js +0 -43
- package/dist/OneOfDropdown-CBLlPlxh.js +0 -15
- package/dist/RadioControl-BZEV6NYx.js +0 -13
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-DvA87Y4C.js +0 -128
- package/dist/SectionLayout-DtVREvcv.js +0 -54
- package/dist/SimpleButtonControl-D2kCPiU9.js +0 -59
- package/dist/SimpleTwinlistControl-D6E8DEoD.js +0 -68
- package/dist/SortListControl-DcW5Ofs5.js +0 -316
- package/dist/TextAreaControl-DTw_oBDS.js +0 -111
- package/dist/TextControl-BlfySQDC.js +0 -49
- package/dist/TwinlistControl-BqoP2Kbq.js +0 -587
- package/dist/ValueSwitchControl-CyDbUKLv.js +0 -13
- package/dist/VennDiagramLayout-DXH6CUzc.js +0 -104
- package/dist/VerticalLayout-CTFSrGS8.js +0 -39
- package/dist/arrow-up-Dsq3EgtE.js +0 -30
- package/dist/floating-ui.vue.esm-D_FlISFP.js +0 -94
- package/dist/getFlattenedSettings-D64OwqpI.js +0 -7
- package/dist/index-1mTLieVA.js +0 -32714
- package/dist/index.d.ts +0 -3
- package/dist/layoutComponents/Form.vue.d.ts +0 -2
- package/dist/link-BA69Hfx6.js +0 -17
- package/dist/loading/LoadingDialog.vue.d.ts +0 -2
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
import { B as ht } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js";
|
|
2
|
+
var q = { exports: {} };
|
|
3
|
+
(function(E, t) {
|
|
4
|
+
(function(e, n) {
|
|
5
|
+
n(t);
|
|
6
|
+
})(ht, function(e) {
|
|
7
|
+
const s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", u = new Uint8Array(64), f = new Uint8Array(128);
|
|
8
|
+
for (let a = 0; a < s.length; a++) {
|
|
9
|
+
const h = s.charCodeAt(a);
|
|
10
|
+
u[a] = h, f[h] = a;
|
|
11
|
+
}
|
|
12
|
+
function o(a, h) {
|
|
13
|
+
let i = 0, l = 0, d = 0;
|
|
14
|
+
do {
|
|
15
|
+
const b = a.next();
|
|
16
|
+
d = f[b], i |= (d & 31) << l, l += 5;
|
|
17
|
+
} while (d & 32);
|
|
18
|
+
const g = i & 1;
|
|
19
|
+
return i >>>= 1, g && (i = -2147483648 | -i), h + i;
|
|
20
|
+
}
|
|
21
|
+
function c(a, h, i) {
|
|
22
|
+
let l = h - i;
|
|
23
|
+
l = l < 0 ? -l << 1 | 1 : l << 1;
|
|
24
|
+
do {
|
|
25
|
+
let d = l & 31;
|
|
26
|
+
l >>>= 5, l > 0 && (d |= 32), a.write(u[d]);
|
|
27
|
+
} while (l > 0);
|
|
28
|
+
return h;
|
|
29
|
+
}
|
|
30
|
+
function k(a, h) {
|
|
31
|
+
return a.pos >= h ? !1 : a.peek() !== 44;
|
|
32
|
+
}
|
|
33
|
+
const O = 1024 * 16, z = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
|
|
34
|
+
decode(a) {
|
|
35
|
+
return Buffer.from(a.buffer, a.byteOffset, a.byteLength).toString();
|
|
36
|
+
}
|
|
37
|
+
} : {
|
|
38
|
+
decode(a) {
|
|
39
|
+
let h = "";
|
|
40
|
+
for (let i = 0; i < a.length; i++)
|
|
41
|
+
h += String.fromCharCode(a[i]);
|
|
42
|
+
return h;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
class P {
|
|
46
|
+
constructor() {
|
|
47
|
+
this.pos = 0, this.out = "", this.buffer = new Uint8Array(O);
|
|
48
|
+
}
|
|
49
|
+
write(h) {
|
|
50
|
+
const { buffer: i } = this;
|
|
51
|
+
i[this.pos++] = h, this.pos === O && (this.out += z.decode(i), this.pos = 0);
|
|
52
|
+
}
|
|
53
|
+
flush() {
|
|
54
|
+
const { buffer: h, out: i, pos: l } = this;
|
|
55
|
+
return l > 0 ? i + z.decode(h.subarray(0, l)) : i;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
class G {
|
|
59
|
+
constructor(h) {
|
|
60
|
+
this.pos = 0, this.buffer = h;
|
|
61
|
+
}
|
|
62
|
+
next() {
|
|
63
|
+
return this.buffer.charCodeAt(this.pos++);
|
|
64
|
+
}
|
|
65
|
+
peek() {
|
|
66
|
+
return this.buffer.charCodeAt(this.pos);
|
|
67
|
+
}
|
|
68
|
+
indexOf(h) {
|
|
69
|
+
const { buffer: i, pos: l } = this, d = i.indexOf(h, l);
|
|
70
|
+
return d === -1 ? i.length : d;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const F = [];
|
|
74
|
+
function X(a) {
|
|
75
|
+
const { length: h } = a, i = new G(a), l = [], d = [];
|
|
76
|
+
let g = 0;
|
|
77
|
+
for (; i.pos < h; i.pos++) {
|
|
78
|
+
g = o(i, g);
|
|
79
|
+
const b = o(i, 0);
|
|
80
|
+
if (!k(i, h)) {
|
|
81
|
+
const y = d.pop();
|
|
82
|
+
y[2] = g, y[3] = b;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const m = o(i, 0), w = o(i, 0) & 1 ? [g, b, 0, 0, m, o(i, 0)] : [g, b, 0, 0, m];
|
|
86
|
+
let x = F;
|
|
87
|
+
if (k(i, h)) {
|
|
88
|
+
x = [];
|
|
89
|
+
do {
|
|
90
|
+
const y = o(i, 0);
|
|
91
|
+
x.push(y);
|
|
92
|
+
} while (k(i, h));
|
|
93
|
+
}
|
|
94
|
+
w.vars = x, l.push(w), d.push(w);
|
|
95
|
+
}
|
|
96
|
+
return l;
|
|
97
|
+
}
|
|
98
|
+
function Z(a) {
|
|
99
|
+
const h = new P();
|
|
100
|
+
for (let i = 0; i < a.length; )
|
|
101
|
+
i = H(a, i, h, [0]);
|
|
102
|
+
return h.flush();
|
|
103
|
+
}
|
|
104
|
+
function H(a, h, i, l) {
|
|
105
|
+
const d = a[h], { 0: g, 1: b, 2: m, 3: S, 4: C, vars: w } = d;
|
|
106
|
+
h > 0 && i.write(44), l[0] = c(i, g, l[0]), c(i, b, 0), c(i, C, 0);
|
|
107
|
+
const x = d.length === 6 ? 1 : 0;
|
|
108
|
+
c(i, x, 0), d.length === 6 && c(i, d[5], 0);
|
|
109
|
+
for (const y of w)
|
|
110
|
+
c(i, y, 0);
|
|
111
|
+
for (h++; h < a.length; ) {
|
|
112
|
+
const y = a[h], { 0: p, 1: v } = y;
|
|
113
|
+
if (p > m || p === m && v >= S)
|
|
114
|
+
break;
|
|
115
|
+
h = H(a, h, i, l);
|
|
116
|
+
}
|
|
117
|
+
return i.write(44), l[0] = c(i, m, l[0]), c(i, S, 0), h;
|
|
118
|
+
}
|
|
119
|
+
function V(a) {
|
|
120
|
+
const { length: h } = a, i = new G(a), l = [], d = [];
|
|
121
|
+
let g = 0, b = 0, m = 0, S = 0, C = 0, w = 0, x = 0, y = 0;
|
|
122
|
+
do {
|
|
123
|
+
const p = i.indexOf(";");
|
|
124
|
+
let v = 0;
|
|
125
|
+
for (; i.pos < p; i.pos++) {
|
|
126
|
+
if (v = o(i, v), !k(i, p)) {
|
|
127
|
+
const L = d.pop();
|
|
128
|
+
L[2] = g, L[3] = v;
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const R = o(i, 0), U = R & 1, A = R & 2, T = R & 4;
|
|
132
|
+
let Y = null, D = F, _;
|
|
133
|
+
if (U) {
|
|
134
|
+
const L = o(i, b);
|
|
135
|
+
m = o(i, b === L ? m : 0), b = L, _ = [g, v, 0, 0, L, m];
|
|
136
|
+
} else
|
|
137
|
+
_ = [g, v, 0, 0];
|
|
138
|
+
if (_.isScope = !!T, A) {
|
|
139
|
+
const L = S, I = C;
|
|
140
|
+
S = o(i, S);
|
|
141
|
+
const j = L === S;
|
|
142
|
+
C = o(i, j ? C : 0), w = o(i, j && I === C ? w : 0), Y = [S, C, w];
|
|
143
|
+
}
|
|
144
|
+
if (_.callsite = Y, k(i, p)) {
|
|
145
|
+
D = [];
|
|
146
|
+
do {
|
|
147
|
+
x = g, y = v;
|
|
148
|
+
const L = o(i, 0);
|
|
149
|
+
let I;
|
|
150
|
+
if (L < -1) {
|
|
151
|
+
I = [[o(i, 0)]];
|
|
152
|
+
for (let j = -1; j > L; j--) {
|
|
153
|
+
const st = x;
|
|
154
|
+
x = o(i, x), y = o(i, x === st ? y : 0);
|
|
155
|
+
const ot = o(i, 0);
|
|
156
|
+
I.push([ot, x, y]);
|
|
157
|
+
}
|
|
158
|
+
} else
|
|
159
|
+
I = [[L]];
|
|
160
|
+
D.push(I);
|
|
161
|
+
} while (k(i, p));
|
|
162
|
+
}
|
|
163
|
+
_.bindings = D, l.push(_), d.push(_);
|
|
164
|
+
}
|
|
165
|
+
g++, i.pos = p + 1;
|
|
166
|
+
} while (i.pos < h);
|
|
167
|
+
return l;
|
|
168
|
+
}
|
|
169
|
+
function tt(a) {
|
|
170
|
+
if (a.length === 0)
|
|
171
|
+
return "";
|
|
172
|
+
const h = new P();
|
|
173
|
+
for (let i = 0; i < a.length; )
|
|
174
|
+
i = J(a, i, h, [0, 0, 0, 0, 0, 0, 0]);
|
|
175
|
+
return h.flush();
|
|
176
|
+
}
|
|
177
|
+
function J(a, h, i, l) {
|
|
178
|
+
const d = a[h], { 0: g, 1: b, 2: m, 3: S, isScope: C, callsite: w, bindings: x } = d;
|
|
179
|
+
l[0] < g ? (W(i, l[0], g), l[0] = g, l[1] = 0) : h > 0 && i.write(44), l[1] = c(i, d[1], l[1]);
|
|
180
|
+
const y = (d.length === 6 ? 1 : 0) | (w ? 2 : 0) | (C ? 4 : 0);
|
|
181
|
+
if (c(i, y, 0), d.length === 6) {
|
|
182
|
+
const { 4: p, 5: v } = d;
|
|
183
|
+
p !== l[2] && (l[3] = 0), l[2] = c(i, p, l[2]), l[3] = c(i, v, l[3]);
|
|
184
|
+
}
|
|
185
|
+
if (w) {
|
|
186
|
+
const { 0: p, 1: v, 2: R } = d.callsite;
|
|
187
|
+
p !== l[4] ? (l[5] = 0, l[6] = 0) : v !== l[5] && (l[6] = 0), l[4] = c(i, p, l[4]), l[5] = c(i, v, l[5]), l[6] = c(i, R, l[6]);
|
|
188
|
+
}
|
|
189
|
+
if (x)
|
|
190
|
+
for (const p of x) {
|
|
191
|
+
p.length > 1 && c(i, -p.length, 0);
|
|
192
|
+
const v = p[0][0];
|
|
193
|
+
c(i, v, 0);
|
|
194
|
+
let R = g, U = b;
|
|
195
|
+
for (let A = 1; A < p.length; A++) {
|
|
196
|
+
const T = p[A];
|
|
197
|
+
R = c(i, T[1], R), U = c(i, T[2], U), c(i, T[0], 0);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
for (h++; h < a.length; ) {
|
|
201
|
+
const p = a[h], { 0: v, 1: R } = p;
|
|
202
|
+
if (v > m || v === m && R >= S)
|
|
203
|
+
break;
|
|
204
|
+
h = J(a, h, i, l);
|
|
205
|
+
}
|
|
206
|
+
return l[0] < m ? (W(i, l[0], m), l[0] = m, l[1] = 0) : i.write(44), l[1] = c(i, S, l[1]), h;
|
|
207
|
+
}
|
|
208
|
+
function W(a, h, i) {
|
|
209
|
+
do
|
|
210
|
+
a.write(59);
|
|
211
|
+
while (++h < i);
|
|
212
|
+
}
|
|
213
|
+
function et(a) {
|
|
214
|
+
const { length: h } = a, i = new G(a), l = [];
|
|
215
|
+
let d = 0, g = 0, b = 0, m = 0, S = 0;
|
|
216
|
+
do {
|
|
217
|
+
const C = i.indexOf(";"), w = [];
|
|
218
|
+
let x = !0, y = 0;
|
|
219
|
+
for (d = 0; i.pos < C; ) {
|
|
220
|
+
let p;
|
|
221
|
+
d = o(i, d), d < y && (x = !1), y = d, k(i, C) ? (g = o(i, g), b = o(i, b), m = o(i, m), k(i, C) ? (S = o(i, S), p = [d, g, b, m, S]) : p = [d, g, b, m]) : p = [d], w.push(p), i.pos++;
|
|
222
|
+
}
|
|
223
|
+
x || nt(w), l.push(w), i.pos = C + 1;
|
|
224
|
+
} while (i.pos <= h);
|
|
225
|
+
return l;
|
|
226
|
+
}
|
|
227
|
+
function nt(a) {
|
|
228
|
+
a.sort(it);
|
|
229
|
+
}
|
|
230
|
+
function it(a, h) {
|
|
231
|
+
return a[0] - h[0];
|
|
232
|
+
}
|
|
233
|
+
function rt(a) {
|
|
234
|
+
const h = new P();
|
|
235
|
+
let i = 0, l = 0, d = 0, g = 0;
|
|
236
|
+
for (let b = 0; b < a.length; b++) {
|
|
237
|
+
const m = a[b];
|
|
238
|
+
if (b > 0 && h.write(59), m.length === 0)
|
|
239
|
+
continue;
|
|
240
|
+
let S = 0;
|
|
241
|
+
for (let C = 0; C < m.length; C++) {
|
|
242
|
+
const w = m[C];
|
|
243
|
+
C > 0 && h.write(44), S = c(h, w[0], S), w.length !== 1 && (i = c(h, w[1], i), l = c(h, w[2], l), d = c(h, w[3], d), w.length !== 4 && (g = c(h, w[4], g)));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return h.flush();
|
|
247
|
+
}
|
|
248
|
+
e.decode = et, e.decodeGeneratedRanges = V, e.decodeOriginalScopes = X, e.encode = rt, e.encodeGeneratedRanges = tt, e.encodeOriginalScopes = Z, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
249
|
+
});
|
|
250
|
+
})(q, q.exports);
|
|
251
|
+
var lt = q.exports;
|
|
252
|
+
class B {
|
|
253
|
+
constructor(t) {
|
|
254
|
+
this.bits = t instanceof B ? t.bits.slice() : [];
|
|
255
|
+
}
|
|
256
|
+
add(t) {
|
|
257
|
+
this.bits[t >> 5] |= 1 << (t & 31);
|
|
258
|
+
}
|
|
259
|
+
has(t) {
|
|
260
|
+
return !!(this.bits[t >> 5] & 1 << (t & 31));
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
class M {
|
|
264
|
+
constructor(t, e, n) {
|
|
265
|
+
this.start = t, this.end = e, this.original = n, this.intro = "", this.outro = "", this.content = n, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
|
|
266
|
+
}
|
|
267
|
+
appendLeft(t) {
|
|
268
|
+
this.outro += t;
|
|
269
|
+
}
|
|
270
|
+
appendRight(t) {
|
|
271
|
+
this.intro = this.intro + t;
|
|
272
|
+
}
|
|
273
|
+
clone() {
|
|
274
|
+
const t = new M(this.start, this.end, this.original);
|
|
275
|
+
return t.intro = this.intro, t.outro = this.outro, t.content = this.content, t.storeName = this.storeName, t.edited = this.edited, t;
|
|
276
|
+
}
|
|
277
|
+
contains(t) {
|
|
278
|
+
return this.start < t && t < this.end;
|
|
279
|
+
}
|
|
280
|
+
eachNext(t) {
|
|
281
|
+
let e = this;
|
|
282
|
+
for (; e; )
|
|
283
|
+
t(e), e = e.next;
|
|
284
|
+
}
|
|
285
|
+
eachPrevious(t) {
|
|
286
|
+
let e = this;
|
|
287
|
+
for (; e; )
|
|
288
|
+
t(e), e = e.previous;
|
|
289
|
+
}
|
|
290
|
+
edit(t, e, n) {
|
|
291
|
+
return this.content = t, n || (this.intro = "", this.outro = ""), this.storeName = e, this.edited = !0, this;
|
|
292
|
+
}
|
|
293
|
+
prependLeft(t) {
|
|
294
|
+
this.outro = t + this.outro;
|
|
295
|
+
}
|
|
296
|
+
prependRight(t) {
|
|
297
|
+
this.intro = t + this.intro;
|
|
298
|
+
}
|
|
299
|
+
reset() {
|
|
300
|
+
this.intro = "", this.outro = "", this.edited && (this.content = this.original, this.storeName = !1, this.edited = !1);
|
|
301
|
+
}
|
|
302
|
+
split(t) {
|
|
303
|
+
const e = t - this.start, n = this.original.slice(0, e), r = this.original.slice(e);
|
|
304
|
+
this.original = n;
|
|
305
|
+
const s = new M(t, this.end, r);
|
|
306
|
+
return s.outro = this.outro, this.outro = "", this.end = t, this.edited ? (s.edit("", !1), this.content = "") : this.content = n, s.next = this.next, s.next && (s.next.previous = s), s.previous = this, this.next = s, s;
|
|
307
|
+
}
|
|
308
|
+
toString() {
|
|
309
|
+
return this.intro + this.content + this.outro;
|
|
310
|
+
}
|
|
311
|
+
trimEnd(t) {
|
|
312
|
+
if (this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
|
|
313
|
+
const e = this.content.replace(t, "");
|
|
314
|
+
if (e.length)
|
|
315
|
+
return e !== this.content && (this.split(this.start + e.length).edit("", void 0, !0), this.edited && this.edit(e, this.storeName, !0)), !0;
|
|
316
|
+
if (this.edit("", void 0, !0), this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
|
|
317
|
+
}
|
|
318
|
+
trimStart(t) {
|
|
319
|
+
if (this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
|
|
320
|
+
const e = this.content.replace(t, "");
|
|
321
|
+
if (e.length) {
|
|
322
|
+
if (e !== this.content) {
|
|
323
|
+
const n = this.split(this.end - e.length);
|
|
324
|
+
this.edited && n.edit(e, this.storeName, !0), this.edit("", void 0, !0);
|
|
325
|
+
}
|
|
326
|
+
return !0;
|
|
327
|
+
} else if (this.edit("", void 0, !0), this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function ut() {
|
|
331
|
+
return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (E) => globalThis.btoa(unescape(encodeURIComponent(E))) : typeof Buffer == "function" ? (E) => Buffer.from(E, "utf-8").toString("base64") : () => {
|
|
332
|
+
throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
const ct = /* @__PURE__ */ ut();
|
|
336
|
+
class at {
|
|
337
|
+
constructor(t) {
|
|
338
|
+
this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = lt.encode(t.mappings), typeof t.x_google_ignoreList < "u" && (this.x_google_ignoreList = t.x_google_ignoreList);
|
|
339
|
+
}
|
|
340
|
+
toString() {
|
|
341
|
+
return JSON.stringify(this);
|
|
342
|
+
}
|
|
343
|
+
toUrl() {
|
|
344
|
+
return "data:application/json;charset=utf-8;base64," + ct(this.toString());
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
function ft(E) {
|
|
348
|
+
const t = E.split(`
|
|
349
|
+
`), e = t.filter((s) => /^\t+/.test(s)), n = t.filter((s) => /^ {2,}/.test(s));
|
|
350
|
+
if (e.length === 0 && n.length === 0)
|
|
351
|
+
return null;
|
|
352
|
+
if (e.length >= n.length)
|
|
353
|
+
return " ";
|
|
354
|
+
const r = n.reduce((s, u) => {
|
|
355
|
+
const f = /^ +/.exec(u)[0].length;
|
|
356
|
+
return Math.min(f, s);
|
|
357
|
+
}, 1 / 0);
|
|
358
|
+
return new Array(r + 1).join(" ");
|
|
359
|
+
}
|
|
360
|
+
function dt(E, t) {
|
|
361
|
+
const e = E.split(/[/\\]/), n = t.split(/[/\\]/);
|
|
362
|
+
for (e.pop(); e[0] === n[0]; )
|
|
363
|
+
e.shift(), n.shift();
|
|
364
|
+
if (e.length) {
|
|
365
|
+
let r = e.length;
|
|
366
|
+
for (; r--; ) e[r] = "..";
|
|
367
|
+
}
|
|
368
|
+
return e.concat(n).join("/");
|
|
369
|
+
}
|
|
370
|
+
const gt = Object.prototype.toString;
|
|
371
|
+
function pt(E) {
|
|
372
|
+
return gt.call(E) === "[object Object]";
|
|
373
|
+
}
|
|
374
|
+
function K(E) {
|
|
375
|
+
const t = E.split(`
|
|
376
|
+
`), e = [];
|
|
377
|
+
for (let n = 0, r = 0; n < t.length; n++)
|
|
378
|
+
e.push(r), r += t[n].length + 1;
|
|
379
|
+
return function(r) {
|
|
380
|
+
let s = 0, u = e.length;
|
|
381
|
+
for (; s < u; ) {
|
|
382
|
+
const c = s + u >> 1;
|
|
383
|
+
r < e[c] ? u = c : s = c + 1;
|
|
384
|
+
}
|
|
385
|
+
const f = s - 1, o = r - e[f];
|
|
386
|
+
return { line: f, column: o };
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
const mt = /\w/;
|
|
390
|
+
class wt {
|
|
391
|
+
constructor(t) {
|
|
392
|
+
this.hires = t, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
|
|
393
|
+
}
|
|
394
|
+
addEdit(t, e, n, r) {
|
|
395
|
+
if (e.length) {
|
|
396
|
+
const s = e.length - 1;
|
|
397
|
+
let u = e.indexOf(`
|
|
398
|
+
`, 0), f = -1;
|
|
399
|
+
for (; u >= 0 && s > u; ) {
|
|
400
|
+
const c = [this.generatedCodeColumn, t, n.line, n.column];
|
|
401
|
+
r >= 0 && c.push(r), this.rawSegments.push(c), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, f = u, u = e.indexOf(`
|
|
402
|
+
`, u + 1);
|
|
403
|
+
}
|
|
404
|
+
const o = [this.generatedCodeColumn, t, n.line, n.column];
|
|
405
|
+
r >= 0 && o.push(r), this.rawSegments.push(o), this.advance(e.slice(f + 1));
|
|
406
|
+
} else this.pending && (this.rawSegments.push(this.pending), this.advance(e));
|
|
407
|
+
this.pending = null;
|
|
408
|
+
}
|
|
409
|
+
addUneditedChunk(t, e, n, r, s) {
|
|
410
|
+
let u = e.start, f = !0, o = !1;
|
|
411
|
+
for (; u < e.end; ) {
|
|
412
|
+
if (this.hires || f || s.has(u)) {
|
|
413
|
+
const c = [this.generatedCodeColumn, t, r.line, r.column];
|
|
414
|
+
this.hires === "boundary" ? mt.test(n[u]) ? o || (this.rawSegments.push(c), o = !0) : (this.rawSegments.push(c), o = !1) : this.rawSegments.push(c);
|
|
415
|
+
}
|
|
416
|
+
n[u] === `
|
|
417
|
+
` ? (r.line += 1, r.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, f = !0) : (r.column += 1, this.generatedCodeColumn += 1, f = !1), u += 1;
|
|
418
|
+
}
|
|
419
|
+
this.pending = null;
|
|
420
|
+
}
|
|
421
|
+
advance(t) {
|
|
422
|
+
if (!t) return;
|
|
423
|
+
const e = t.split(`
|
|
424
|
+
`);
|
|
425
|
+
if (e.length > 1) {
|
|
426
|
+
for (let n = 0; n < e.length - 1; n++)
|
|
427
|
+
this.generatedCodeLine++, this.raw[this.generatedCodeLine] = this.rawSegments = [];
|
|
428
|
+
this.generatedCodeColumn = 0;
|
|
429
|
+
}
|
|
430
|
+
this.generatedCodeColumn += e[e.length - 1].length;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
const $ = `
|
|
434
|
+
`, N = {
|
|
435
|
+
insertLeft: !1,
|
|
436
|
+
insertRight: !1,
|
|
437
|
+
storeName: !1
|
|
438
|
+
};
|
|
439
|
+
class Q {
|
|
440
|
+
constructor(t, e = {}) {
|
|
441
|
+
const n = new M(0, t.length, t);
|
|
442
|
+
Object.defineProperties(this, {
|
|
443
|
+
original: { writable: !0, value: t },
|
|
444
|
+
outro: { writable: !0, value: "" },
|
|
445
|
+
intro: { writable: !0, value: "" },
|
|
446
|
+
firstChunk: { writable: !0, value: n },
|
|
447
|
+
lastChunk: { writable: !0, value: n },
|
|
448
|
+
lastSearchedChunk: { writable: !0, value: n },
|
|
449
|
+
byStart: { writable: !0, value: {} },
|
|
450
|
+
byEnd: { writable: !0, value: {} },
|
|
451
|
+
filename: { writable: !0, value: e.filename },
|
|
452
|
+
indentExclusionRanges: { writable: !0, value: e.indentExclusionRanges },
|
|
453
|
+
sourcemapLocations: { writable: !0, value: new B() },
|
|
454
|
+
storedNames: { writable: !0, value: {} },
|
|
455
|
+
indentStr: { writable: !0, value: void 0 },
|
|
456
|
+
ignoreList: { writable: !0, value: e.ignoreList }
|
|
457
|
+
}), this.byStart[0] = n, this.byEnd[t.length] = n;
|
|
458
|
+
}
|
|
459
|
+
addSourcemapLocation(t) {
|
|
460
|
+
this.sourcemapLocations.add(t);
|
|
461
|
+
}
|
|
462
|
+
append(t) {
|
|
463
|
+
if (typeof t != "string") throw new TypeError("outro content must be a string");
|
|
464
|
+
return this.outro += t, this;
|
|
465
|
+
}
|
|
466
|
+
appendLeft(t, e) {
|
|
467
|
+
if (typeof e != "string") throw new TypeError("inserted content must be a string");
|
|
468
|
+
this._split(t);
|
|
469
|
+
const n = this.byEnd[t];
|
|
470
|
+
return n ? n.appendLeft(e) : this.intro += e, this;
|
|
471
|
+
}
|
|
472
|
+
appendRight(t, e) {
|
|
473
|
+
if (typeof e != "string") throw new TypeError("inserted content must be a string");
|
|
474
|
+
this._split(t);
|
|
475
|
+
const n = this.byStart[t];
|
|
476
|
+
return n ? n.appendRight(e) : this.outro += e, this;
|
|
477
|
+
}
|
|
478
|
+
clone() {
|
|
479
|
+
const t = new Q(this.original, { filename: this.filename });
|
|
480
|
+
let e = this.firstChunk, n = t.firstChunk = t.lastSearchedChunk = e.clone();
|
|
481
|
+
for (; e; ) {
|
|
482
|
+
t.byStart[n.start] = n, t.byEnd[n.end] = n;
|
|
483
|
+
const r = e.next, s = r && r.clone();
|
|
484
|
+
s && (n.next = s, s.previous = n, n = s), e = r;
|
|
485
|
+
}
|
|
486
|
+
return t.lastChunk = n, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new B(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
|
|
487
|
+
}
|
|
488
|
+
generateDecodedMap(t) {
|
|
489
|
+
t = t || {};
|
|
490
|
+
const e = 0, n = Object.keys(this.storedNames), r = new wt(t.hires), s = K(this.original);
|
|
491
|
+
return this.intro && r.advance(this.intro), this.firstChunk.eachNext((u) => {
|
|
492
|
+
const f = s(u.start);
|
|
493
|
+
u.intro.length && r.advance(u.intro), u.edited ? r.addEdit(
|
|
494
|
+
e,
|
|
495
|
+
u.content,
|
|
496
|
+
f,
|
|
497
|
+
u.storeName ? n.indexOf(u.original) : -1
|
|
498
|
+
) : r.addUneditedChunk(e, u, this.original, f, this.sourcemapLocations), u.outro.length && r.advance(u.outro);
|
|
499
|
+
}), {
|
|
500
|
+
file: t.file ? t.file.split(/[/\\]/).pop() : void 0,
|
|
501
|
+
sources: [
|
|
502
|
+
t.source ? dt(t.file || "", t.source) : t.file || ""
|
|
503
|
+
],
|
|
504
|
+
sourcesContent: t.includeContent ? [this.original] : void 0,
|
|
505
|
+
names: n,
|
|
506
|
+
mappings: r.raw,
|
|
507
|
+
x_google_ignoreList: this.ignoreList ? [e] : void 0
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
generateMap(t) {
|
|
511
|
+
return new at(this.generateDecodedMap(t));
|
|
512
|
+
}
|
|
513
|
+
_ensureindentStr() {
|
|
514
|
+
this.indentStr === void 0 && (this.indentStr = ft(this.original));
|
|
515
|
+
}
|
|
516
|
+
_getRawIndentString() {
|
|
517
|
+
return this._ensureindentStr(), this.indentStr;
|
|
518
|
+
}
|
|
519
|
+
getIndentString() {
|
|
520
|
+
return this._ensureindentStr(), this.indentStr === null ? " " : this.indentStr;
|
|
521
|
+
}
|
|
522
|
+
indent(t, e) {
|
|
523
|
+
const n = /^[^\r\n]/gm;
|
|
524
|
+
if (pt(t) && (e = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
|
|
525
|
+
e = e || {};
|
|
526
|
+
const r = {};
|
|
527
|
+
e.exclude && (typeof e.exclude[0] == "number" ? [e.exclude] : e.exclude).forEach((k) => {
|
|
528
|
+
for (let O = k[0]; O < k[1]; O += 1)
|
|
529
|
+
r[O] = !0;
|
|
530
|
+
});
|
|
531
|
+
let s = e.indentStart !== !1;
|
|
532
|
+
const u = (c) => s ? `${t}${c}` : (s = !0, c);
|
|
533
|
+
this.intro = this.intro.replace(n, u);
|
|
534
|
+
let f = 0, o = this.firstChunk;
|
|
535
|
+
for (; o; ) {
|
|
536
|
+
const c = o.end;
|
|
537
|
+
if (o.edited)
|
|
538
|
+
r[f] || (o.content = o.content.replace(n, u), o.content.length && (s = o.content[o.content.length - 1] === `
|
|
539
|
+
`));
|
|
540
|
+
else
|
|
541
|
+
for (f = o.start; f < c; ) {
|
|
542
|
+
if (!r[f]) {
|
|
543
|
+
const k = this.original[f];
|
|
544
|
+
k === `
|
|
545
|
+
` ? s = !0 : k !== "\r" && s && (s = !1, f === o.start || (this._splitChunk(o, f), o = o.next), o.prependRight(t));
|
|
546
|
+
}
|
|
547
|
+
f += 1;
|
|
548
|
+
}
|
|
549
|
+
f = o.end, o = o.next;
|
|
550
|
+
}
|
|
551
|
+
return this.outro = this.outro.replace(n, u), this;
|
|
552
|
+
}
|
|
553
|
+
insert() {
|
|
554
|
+
throw new Error(
|
|
555
|
+
"magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"
|
|
556
|
+
);
|
|
557
|
+
}
|
|
558
|
+
insertLeft(t, e) {
|
|
559
|
+
return N.insertLeft || (console.warn(
|
|
560
|
+
"magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"
|
|
561
|
+
), N.insertLeft = !0), this.appendLeft(t, e);
|
|
562
|
+
}
|
|
563
|
+
insertRight(t, e) {
|
|
564
|
+
return N.insertRight || (console.warn(
|
|
565
|
+
"magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"
|
|
566
|
+
), N.insertRight = !0), this.prependRight(t, e);
|
|
567
|
+
}
|
|
568
|
+
move(t, e, n) {
|
|
569
|
+
if (n >= t && n <= e) throw new Error("Cannot move a selection inside itself");
|
|
570
|
+
this._split(t), this._split(e), this._split(n);
|
|
571
|
+
const r = this.byStart[t], s = this.byEnd[e], u = r.previous, f = s.next, o = this.byStart[n];
|
|
572
|
+
if (!o && s === this.lastChunk) return this;
|
|
573
|
+
const c = o ? o.previous : this.lastChunk;
|
|
574
|
+
return u && (u.next = f), f && (f.previous = u), c && (c.next = r), o && (o.previous = s), r.previous || (this.firstChunk = s.next), s.next || (this.lastChunk = r.previous, this.lastChunk.next = null), r.previous = c, s.next = o || null, c || (this.firstChunk = r), o || (this.lastChunk = s), this;
|
|
575
|
+
}
|
|
576
|
+
overwrite(t, e, n, r) {
|
|
577
|
+
return r = r || {}, this.update(t, e, n, { ...r, overwrite: !r.contentOnly });
|
|
578
|
+
}
|
|
579
|
+
update(t, e, n, r) {
|
|
580
|
+
if (typeof n != "string") throw new TypeError("replacement content must be a string");
|
|
581
|
+
if (this.original.length !== 0) {
|
|
582
|
+
for (; t < 0; ) t += this.original.length;
|
|
583
|
+
for (; e < 0; ) e += this.original.length;
|
|
584
|
+
}
|
|
585
|
+
if (e > this.original.length) throw new Error("end is out of bounds");
|
|
586
|
+
if (t === e)
|
|
587
|
+
throw new Error(
|
|
588
|
+
"Cannot overwrite a zero-length range – use appendLeft or prependRight instead"
|
|
589
|
+
);
|
|
590
|
+
this._split(t), this._split(e), r === !0 && (N.storeName || (console.warn(
|
|
591
|
+
"The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"
|
|
592
|
+
), N.storeName = !0), r = { storeName: !0 });
|
|
593
|
+
const s = r !== void 0 ? r.storeName : !1, u = r !== void 0 ? r.overwrite : !1;
|
|
594
|
+
if (s) {
|
|
595
|
+
const c = this.original.slice(t, e);
|
|
596
|
+
Object.defineProperty(this.storedNames, c, {
|
|
597
|
+
writable: !0,
|
|
598
|
+
value: !0,
|
|
599
|
+
enumerable: !0
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
const f = this.byStart[t], o = this.byEnd[e];
|
|
603
|
+
if (f) {
|
|
604
|
+
let c = f;
|
|
605
|
+
for (; c !== o; ) {
|
|
606
|
+
if (c.next !== this.byStart[c.end])
|
|
607
|
+
throw new Error("Cannot overwrite across a split point");
|
|
608
|
+
c = c.next, c.edit("", !1);
|
|
609
|
+
}
|
|
610
|
+
f.edit(n, s, !u);
|
|
611
|
+
} else {
|
|
612
|
+
const c = new M(t, e, "").edit(n, s);
|
|
613
|
+
o.next = c, c.previous = o;
|
|
614
|
+
}
|
|
615
|
+
return this;
|
|
616
|
+
}
|
|
617
|
+
prepend(t) {
|
|
618
|
+
if (typeof t != "string") throw new TypeError("outro content must be a string");
|
|
619
|
+
return this.intro = t + this.intro, this;
|
|
620
|
+
}
|
|
621
|
+
prependLeft(t, e) {
|
|
622
|
+
if (typeof e != "string") throw new TypeError("inserted content must be a string");
|
|
623
|
+
this._split(t);
|
|
624
|
+
const n = this.byEnd[t];
|
|
625
|
+
return n ? n.prependLeft(e) : this.intro = e + this.intro, this;
|
|
626
|
+
}
|
|
627
|
+
prependRight(t, e) {
|
|
628
|
+
if (typeof e != "string") throw new TypeError("inserted content must be a string");
|
|
629
|
+
this._split(t);
|
|
630
|
+
const n = this.byStart[t];
|
|
631
|
+
return n ? n.prependRight(e) : this.outro = e + this.outro, this;
|
|
632
|
+
}
|
|
633
|
+
remove(t, e) {
|
|
634
|
+
if (this.original.length !== 0) {
|
|
635
|
+
for (; t < 0; ) t += this.original.length;
|
|
636
|
+
for (; e < 0; ) e += this.original.length;
|
|
637
|
+
}
|
|
638
|
+
if (t === e) return this;
|
|
639
|
+
if (t < 0 || e > this.original.length) throw new Error("Character is out of bounds");
|
|
640
|
+
if (t > e) throw new Error("end must be greater than start");
|
|
641
|
+
this._split(t), this._split(e);
|
|
642
|
+
let n = this.byStart[t];
|
|
643
|
+
for (; n; )
|
|
644
|
+
n.intro = "", n.outro = "", n.edit(""), n = e > n.end ? this.byStart[n.end] : null;
|
|
645
|
+
return this;
|
|
646
|
+
}
|
|
647
|
+
reset(t, e) {
|
|
648
|
+
if (this.original.length !== 0) {
|
|
649
|
+
for (; t < 0; ) t += this.original.length;
|
|
650
|
+
for (; e < 0; ) e += this.original.length;
|
|
651
|
+
}
|
|
652
|
+
if (t === e) return this;
|
|
653
|
+
if (t < 0 || e > this.original.length) throw new Error("Character is out of bounds");
|
|
654
|
+
if (t > e) throw new Error("end must be greater than start");
|
|
655
|
+
this._split(t), this._split(e);
|
|
656
|
+
let n = this.byStart[t];
|
|
657
|
+
for (; n; )
|
|
658
|
+
n.reset(), n = e > n.end ? this.byStart[n.end] : null;
|
|
659
|
+
return this;
|
|
660
|
+
}
|
|
661
|
+
lastChar() {
|
|
662
|
+
if (this.outro.length) return this.outro[this.outro.length - 1];
|
|
663
|
+
let t = this.lastChunk;
|
|
664
|
+
do {
|
|
665
|
+
if (t.outro.length) return t.outro[t.outro.length - 1];
|
|
666
|
+
if (t.content.length) return t.content[t.content.length - 1];
|
|
667
|
+
if (t.intro.length) return t.intro[t.intro.length - 1];
|
|
668
|
+
} while (t = t.previous);
|
|
669
|
+
return this.intro.length ? this.intro[this.intro.length - 1] : "";
|
|
670
|
+
}
|
|
671
|
+
lastLine() {
|
|
672
|
+
let t = this.outro.lastIndexOf($);
|
|
673
|
+
if (t !== -1) return this.outro.substr(t + 1);
|
|
674
|
+
let e = this.outro, n = this.lastChunk;
|
|
675
|
+
do {
|
|
676
|
+
if (n.outro.length > 0) {
|
|
677
|
+
if (t = n.outro.lastIndexOf($), t !== -1) return n.outro.substr(t + 1) + e;
|
|
678
|
+
e = n.outro + e;
|
|
679
|
+
}
|
|
680
|
+
if (n.content.length > 0) {
|
|
681
|
+
if (t = n.content.lastIndexOf($), t !== -1) return n.content.substr(t + 1) + e;
|
|
682
|
+
e = n.content + e;
|
|
683
|
+
}
|
|
684
|
+
if (n.intro.length > 0) {
|
|
685
|
+
if (t = n.intro.lastIndexOf($), t !== -1) return n.intro.substr(t + 1) + e;
|
|
686
|
+
e = n.intro + e;
|
|
687
|
+
}
|
|
688
|
+
} while (n = n.previous);
|
|
689
|
+
return t = this.intro.lastIndexOf($), t !== -1 ? this.intro.substr(t + 1) + e : this.intro + e;
|
|
690
|
+
}
|
|
691
|
+
slice(t = 0, e = this.original.length) {
|
|
692
|
+
if (this.original.length !== 0) {
|
|
693
|
+
for (; t < 0; ) t += this.original.length;
|
|
694
|
+
for (; e < 0; ) e += this.original.length;
|
|
695
|
+
}
|
|
696
|
+
let n = "", r = this.firstChunk;
|
|
697
|
+
for (; r && (r.start > t || r.end <= t); ) {
|
|
698
|
+
if (r.start < e && r.end >= e)
|
|
699
|
+
return n;
|
|
700
|
+
r = r.next;
|
|
701
|
+
}
|
|
702
|
+
if (r && r.edited && r.start !== t)
|
|
703
|
+
throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);
|
|
704
|
+
const s = r;
|
|
705
|
+
for (; r; ) {
|
|
706
|
+
r.intro && (s !== r || r.start === t) && (n += r.intro);
|
|
707
|
+
const u = r.start < e && r.end >= e;
|
|
708
|
+
if (u && r.edited && r.end !== e)
|
|
709
|
+
throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);
|
|
710
|
+
const f = s === r ? t - r.start : 0, o = u ? r.content.length + e - r.end : r.content.length;
|
|
711
|
+
if (n += r.content.slice(f, o), r.outro && (!u || r.end === e) && (n += r.outro), u)
|
|
712
|
+
break;
|
|
713
|
+
r = r.next;
|
|
714
|
+
}
|
|
715
|
+
return n;
|
|
716
|
+
}
|
|
717
|
+
// TODO deprecate this? not really very useful
|
|
718
|
+
snip(t, e) {
|
|
719
|
+
const n = this.clone();
|
|
720
|
+
return n.remove(0, t), n.remove(e, n.original.length), n;
|
|
721
|
+
}
|
|
722
|
+
_split(t) {
|
|
723
|
+
if (this.byStart[t] || this.byEnd[t]) return;
|
|
724
|
+
let e = this.lastSearchedChunk;
|
|
725
|
+
const n = t > e.end;
|
|
726
|
+
for (; e; ) {
|
|
727
|
+
if (e.contains(t)) return this._splitChunk(e, t);
|
|
728
|
+
e = n ? this.byStart[e.end] : this.byEnd[e.start];
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
_splitChunk(t, e) {
|
|
732
|
+
if (t.edited && t.content.length) {
|
|
733
|
+
const r = K(this.original)(e);
|
|
734
|
+
throw new Error(
|
|
735
|
+
`Cannot split a chunk that has already been edited (${r.line}:${r.column} – "${t.original}")`
|
|
736
|
+
);
|
|
737
|
+
}
|
|
738
|
+
const n = t.split(e);
|
|
739
|
+
return this.byEnd[e] = t, this.byStart[e] = n, this.byEnd[n.end] = n, t === this.lastChunk && (this.lastChunk = n), this.lastSearchedChunk = t, !0;
|
|
740
|
+
}
|
|
741
|
+
toString() {
|
|
742
|
+
let t = this.intro, e = this.firstChunk;
|
|
743
|
+
for (; e; )
|
|
744
|
+
t += e.toString(), e = e.next;
|
|
745
|
+
return t + this.outro;
|
|
746
|
+
}
|
|
747
|
+
isEmpty() {
|
|
748
|
+
let t = this.firstChunk;
|
|
749
|
+
do
|
|
750
|
+
if (t.intro.length && t.intro.trim() || t.content.length && t.content.trim() || t.outro.length && t.outro.trim())
|
|
751
|
+
return !1;
|
|
752
|
+
while (t = t.next);
|
|
753
|
+
return !0;
|
|
754
|
+
}
|
|
755
|
+
length() {
|
|
756
|
+
let t = this.firstChunk, e = 0;
|
|
757
|
+
do
|
|
758
|
+
e += t.intro.length + t.content.length + t.outro.length;
|
|
759
|
+
while (t = t.next);
|
|
760
|
+
return e;
|
|
761
|
+
}
|
|
762
|
+
trimLines() {
|
|
763
|
+
return this.trim("[\\r\\n]");
|
|
764
|
+
}
|
|
765
|
+
trim(t) {
|
|
766
|
+
return this.trimStart(t).trimEnd(t);
|
|
767
|
+
}
|
|
768
|
+
trimEndAborted(t) {
|
|
769
|
+
const e = new RegExp((t || "\\s") + "+$");
|
|
770
|
+
if (this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
|
|
771
|
+
let n = this.lastChunk;
|
|
772
|
+
do {
|
|
773
|
+
const r = n.end, s = n.trimEnd(e);
|
|
774
|
+
if (n.end !== r && (this.lastChunk === n && (this.lastChunk = n.next), this.byEnd[n.end] = n, this.byStart[n.next.start] = n.next, this.byEnd[n.next.end] = n.next), s) return !0;
|
|
775
|
+
n = n.previous;
|
|
776
|
+
} while (n);
|
|
777
|
+
return !1;
|
|
778
|
+
}
|
|
779
|
+
trimEnd(t) {
|
|
780
|
+
return this.trimEndAborted(t), this;
|
|
781
|
+
}
|
|
782
|
+
trimStartAborted(t) {
|
|
783
|
+
const e = new RegExp("^" + (t || "\\s") + "+");
|
|
784
|
+
if (this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
|
|
785
|
+
let n = this.firstChunk;
|
|
786
|
+
do {
|
|
787
|
+
const r = n.end, s = n.trimStart(e);
|
|
788
|
+
if (n.end !== r && (n === this.lastChunk && (this.lastChunk = n.next), this.byEnd[n.end] = n, this.byStart[n.next.start] = n.next, this.byEnd[n.next.end] = n.next), s) return !0;
|
|
789
|
+
n = n.next;
|
|
790
|
+
} while (n);
|
|
791
|
+
return !1;
|
|
792
|
+
}
|
|
793
|
+
trimStart(t) {
|
|
794
|
+
return this.trimStartAborted(t), this;
|
|
795
|
+
}
|
|
796
|
+
hasChanged() {
|
|
797
|
+
return this.original !== this.toString();
|
|
798
|
+
}
|
|
799
|
+
_replaceRegexp(t, e) {
|
|
800
|
+
function n(s, u) {
|
|
801
|
+
return typeof e == "string" ? e.replace(/\$(\$|&|\d+)/g, (f, o) => o === "$" ? "$" : o === "&" ? s[0] : +o < s.length ? s[+o] : `$${o}`) : e(...s, s.index, u, s.groups);
|
|
802
|
+
}
|
|
803
|
+
function r(s, u) {
|
|
804
|
+
let f;
|
|
805
|
+
const o = [];
|
|
806
|
+
for (; f = s.exec(u); )
|
|
807
|
+
o.push(f);
|
|
808
|
+
return o;
|
|
809
|
+
}
|
|
810
|
+
if (t.global)
|
|
811
|
+
r(t, this.original).forEach((u) => {
|
|
812
|
+
if (u.index != null) {
|
|
813
|
+
const f = n(u, this.original);
|
|
814
|
+
f !== u[0] && this.overwrite(
|
|
815
|
+
u.index,
|
|
816
|
+
u.index + u[0].length,
|
|
817
|
+
f
|
|
818
|
+
);
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
else {
|
|
822
|
+
const s = this.original.match(t);
|
|
823
|
+
if (s && s.index != null) {
|
|
824
|
+
const u = n(s, this.original);
|
|
825
|
+
u !== s[0] && this.overwrite(
|
|
826
|
+
s.index,
|
|
827
|
+
s.index + s[0].length,
|
|
828
|
+
u
|
|
829
|
+
);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
return this;
|
|
833
|
+
}
|
|
834
|
+
_replaceString(t, e) {
|
|
835
|
+
const { original: n } = this, r = n.indexOf(t);
|
|
836
|
+
return r !== -1 && this.overwrite(r, r + t.length, e), this;
|
|
837
|
+
}
|
|
838
|
+
replace(t, e) {
|
|
839
|
+
return typeof t == "string" ? this._replaceString(t, e) : this._replaceRegexp(t, e);
|
|
840
|
+
}
|
|
841
|
+
_replaceAllString(t, e) {
|
|
842
|
+
const { original: n } = this, r = t.length;
|
|
843
|
+
for (let s = n.indexOf(t); s !== -1; s = n.indexOf(t, s + r))
|
|
844
|
+
n.slice(s, s + r) !== e && this.overwrite(s, s + r, e);
|
|
845
|
+
return this;
|
|
846
|
+
}
|
|
847
|
+
replaceAll(t, e) {
|
|
848
|
+
if (typeof t == "string")
|
|
849
|
+
return this._replaceAllString(t, e);
|
|
850
|
+
if (!t.global)
|
|
851
|
+
throw new TypeError(
|
|
852
|
+
"MagicString.prototype.replaceAll called with a non-global RegExp argument"
|
|
853
|
+
);
|
|
854
|
+
return this._replaceRegexp(t, e);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
export {
|
|
858
|
+
at as SourceMap,
|
|
859
|
+
Q as default
|
|
860
|
+
};
|