storybook 9.0.0-alpha.8 → 9.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/server/base-preview-head.html +1 -3
- package/bin/index.cjs +2 -2
- package/dist/actions/decorator.js +67 -72
- package/dist/actions/index.cjs +27 -31
- package/dist/actions/index.d.ts +0 -3
- package/dist/actions/index.js +27 -31
- package/dist/actions/preview.cjs +23 -27
- package/dist/actions/preview.d.ts +0 -1
- package/dist/actions/preview.js +19 -23
- package/dist/babel/index.cjs +822 -816
- package/dist/babel/index.js +822 -816
- package/dist/backgrounds/index.cjs +148 -0
- package/dist/backgrounds/index.d.ts +91 -0
- package/dist/backgrounds/index.js +130 -0
- package/dist/backgrounds/preview.cjs +143 -0
- package/dist/backgrounds/preview.d.ts +54 -0
- package/dist/backgrounds/preview.js +127 -0
- package/dist/bin/index.cjs +73 -92
- package/dist/bin/index.js +66 -85
- package/dist/builder-manager/index.cjs +316 -296
- package/dist/builder-manager/index.js +567 -547
- package/dist/channels/index.cjs +1020 -950
- package/dist/channels/index.js +1256 -1201
- package/dist/cli/bin/index.cjs +198 -198
- package/dist/cli/bin/index.js +204 -204
- package/dist/cli/index.cjs +61734 -7589
- package/dist/cli/index.d.ts +24 -20
- package/dist/cli/index.js +61775 -7630
- package/dist/common/index.cjs +16175 -9123
- package/dist/common/index.d.ts +34 -25
- package/dist/common/index.js +16270 -9212
- package/dist/component-testing/index.cjs +23 -0
- package/dist/component-testing/index.d.ts +3 -0
- package/dist/component-testing/index.js +5 -0
- package/dist/component-testing/preview.cjs +40 -0
- package/dist/component-testing/preview.d.ts +5 -0
- package/dist/component-testing/preview.js +25 -0
- package/dist/components/index.cjs +6479 -13005
- package/dist/components/index.d.ts +8 -257
- package/dist/components/index.js +6160 -18689
- package/dist/controls/decorator.d.ts +5 -0
- package/dist/controls/decorator.js +8 -0
- package/dist/controls/index.cjs +26 -0
- package/dist/controls/index.d.ts +39 -0
- package/dist/controls/index.js +6 -0
- package/dist/controls/preview.cjs +26 -0
- package/dist/controls/preview.d.ts +54 -0
- package/dist/controls/preview.js +9 -0
- package/dist/core-events/index.cjs +91 -106
- package/dist/core-events/index.d.ts +2 -80
- package/dist/core-events/index.js +79 -94
- package/dist/core-server/index.cjs +12314 -12114
- package/dist/core-server/index.d.ts +32 -23
- package/dist/core-server/index.js +12495 -12296
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +12153 -12
- package/dist/core-server/presets/common-preset.cjs +3004 -3151
- package/dist/core-server/presets/common-preset.js +2833 -2981
- package/dist/csf/index.d.ts +1 -3
- package/dist/csf-tools/index.cjs +412 -403
- package/dist/csf-tools/index.d.ts +0 -4
- package/dist/csf-tools/index.js +410 -401
- package/dist/docs-tools/index.cjs +2569 -575
- package/dist/docs-tools/index.js +2565 -564
- package/dist/highlight/index.cjs +27 -0
- package/dist/highlight/index.d.ts +61 -0
- package/dist/highlight/index.js +7 -0
- package/dist/highlight/preview.cjs +535 -0
- package/dist/highlight/preview.d.ts +54 -0
- package/dist/highlight/preview.js +519 -0
- package/dist/instrumenter/index.cjs +1417 -1761
- package/dist/instrumenter/index.d.ts +8 -7
- package/dist/instrumenter/index.js +1332 -1667
- package/dist/manager/globals-module-info.cjs +22 -33
- package/dist/manager/globals-module-info.js +7 -18
- package/dist/manager/globals-runtime.js +45449 -49535
- package/dist/manager/runtime.js +4392 -3774
- package/dist/manager-api/index.cjs +2622 -2529
- package/dist/manager-api/index.d.ts +109 -114
- package/dist/manager-api/index.js +2603 -2475
- package/dist/manager-errors.js +41 -37
- package/dist/measure/index.cjs +476 -0
- package/dist/measure/index.d.ts +66 -0
- package/dist/measure/index.js +464 -0
- package/dist/measure/preview.cjs +466 -0
- package/dist/measure/preview.d.ts +59 -0
- package/dist/measure/preview.js +450 -0
- package/dist/outline/index.cjs +528 -0
- package/dist/outline/index.d.ts +66 -0
- package/dist/outline/index.js +500 -0
- package/dist/outline/preview.cjs +518 -0
- package/dist/outline/preview.d.ts +59 -0
- package/dist/outline/preview.js +486 -0
- package/dist/preview/runtime.js +42328 -38511
- package/dist/preview-api/index.cjs +1204 -1293
- package/dist/preview-api/index.d.ts +126 -178
- package/dist/preview-api/index.js +1614 -1685
- package/dist/preview-errors.cjs +65 -51
- package/dist/preview-errors.d.ts +6 -2
- package/dist/preview-errors.js +176 -142
- package/dist/server-errors.cjs +160 -113
- package/dist/server-errors.d.ts +12 -2
- package/dist/server-errors.js +157 -110
- package/dist/telemetry/index.cjs +407 -403
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +493 -489
- package/dist/test/index.cjs +1553 -1552
- package/dist/test/index.js +9603 -9514
- package/dist/test/preview.cjs +1906 -1905
- package/dist/test/preview.d.ts +0 -6
- package/dist/test/preview.js +3664 -3603
- package/dist/test/spy.cjs +65 -64
- package/dist/test/spy.js +59 -58
- package/dist/types/index.cjs +11 -12
- package/dist/types/index.d.ts +601 -338
- package/dist/types/index.js +1 -2
- package/dist/viewport/index.cjs +310 -0
- package/dist/viewport/index.d.ts +320 -0
- package/dist/viewport/index.js +290 -0
- package/dist/viewport/preview.cjs +35 -0
- package/dist/viewport/preview.d.ts +68 -0
- package/dist/viewport/preview.js +19 -0
- package/package.json +207 -12
- package/dist/actions/manager.js +0 -1196
|
@@ -4,57 +4,57 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
|
|
|
4
4
|
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = ESM_COMPAT_dirname(__filename);
|
|
6
6
|
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var o = (e, i) =>
|
|
7
|
+
var Ct = Object.create;
|
|
8
|
+
var A = Object.defineProperty;
|
|
9
|
+
var At = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var Nt = Object.getOwnPropertyNames;
|
|
11
|
+
var Dt = Object.getPrototypeOf, It = Object.prototype.hasOwnProperty;
|
|
12
|
+
var o = (e, i) => A(e, "name", { value: i, configurable: !0 }), P = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "\
|
|
13
13
|
u" ? new Proxy(e, {
|
|
14
14
|
get: (i, t) => (typeof require < "u" ? require : i)[t]
|
|
15
15
|
}) : e)(function(e) {
|
|
16
16
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
17
17
|
throw Error('Dynamic require of "' + e + '" is not supported');
|
|
18
18
|
});
|
|
19
|
-
var
|
|
20
|
-
var
|
|
19
|
+
var q = (e, i) => () => (e && (i = e(e = 0)), i);
|
|
20
|
+
var N = (e, i) => () => (i || e((i = { exports: {} }).exports, i), i.exports), $ = (e, i) => {
|
|
21
21
|
for (var t in i)
|
|
22
|
-
|
|
23
|
-
}, fe = (e, i, t,
|
|
22
|
+
A(e, t, { get: i[t], enumerable: !0 });
|
|
23
|
+
}, fe = (e, i, t, a) => {
|
|
24
24
|
if (i && typeof i == "object" || typeof i == "function")
|
|
25
|
-
for (let
|
|
26
|
-
!
|
|
25
|
+
for (let r of Nt(i))
|
|
26
|
+
!It.call(e, r) && r !== t && A(e, r, { get: () => i[r], enumerable: !(a = At(i, r)) || a.enumerable });
|
|
27
27
|
return e;
|
|
28
28
|
};
|
|
29
|
-
var V = (e, i, t) => (t = e != null ?
|
|
29
|
+
var V = (e, i, t) => (t = e != null ? Ct(Dt(e)) : {}, fe(
|
|
30
30
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
31
|
// file that has been converted to a CommonJS file using a Babel-
|
|
32
32
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
33
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
-
i || !e || !e.__esModule ?
|
|
34
|
+
i || !e || !e.__esModule ? A(t, "default", { value: e, enumerable: !0 }) : t,
|
|
35
35
|
e
|
|
36
|
-
)),
|
|
36
|
+
)), W = (e) => fe(A({}, "__esModule", { value: !0 }), e);
|
|
37
37
|
|
|
38
38
|
// ../node_modules/tslib/tslib.es6.mjs
|
|
39
|
-
var
|
|
40
|
-
|
|
39
|
+
var Be = {};
|
|
40
|
+
$(Be, {
|
|
41
41
|
__addDisposableResource: () => qe,
|
|
42
|
-
__assign: () =>
|
|
42
|
+
__assign: () => B,
|
|
43
43
|
__asyncDelegator: () => Le,
|
|
44
|
-
__asyncGenerator: () =>
|
|
44
|
+
__asyncGenerator: () => Fe,
|
|
45
45
|
__asyncValues: () => Ce,
|
|
46
46
|
__await: () => F,
|
|
47
47
|
__awaiter: () => Ee,
|
|
48
48
|
__classPrivateFieldGet: () => Ie,
|
|
49
49
|
__classPrivateFieldIn: () => ze,
|
|
50
50
|
__classPrivateFieldSet: () => Me,
|
|
51
|
-
__createBinding: () =>
|
|
51
|
+
__createBinding: () => J,
|
|
52
52
|
__decorate: () => ye,
|
|
53
53
|
__disposeResources: () => $e,
|
|
54
54
|
__esDecorate: () => we,
|
|
55
|
-
__exportStar: () =>
|
|
55
|
+
__exportStar: () => Pe,
|
|
56
56
|
__extends: () => xe,
|
|
57
|
-
__generator: () =>
|
|
57
|
+
__generator: () => Se,
|
|
58
58
|
__importDefault: () => De,
|
|
59
59
|
__importStar: () => Ne,
|
|
60
60
|
__makeTemplateObject: () => Ae,
|
|
@@ -66,11 +66,11 @@ q(He, {
|
|
|
66
66
|
__rewriteRelativeImportExtension: () => We,
|
|
67
67
|
__runInitializers: () => be,
|
|
68
68
|
__setFunctionName: () => je,
|
|
69
|
-
__spread: () =>
|
|
70
|
-
__spreadArray: () =>
|
|
71
|
-
__spreadArrays: () =>
|
|
69
|
+
__spread: () => Te,
|
|
70
|
+
__spreadArray: () => ke,
|
|
71
|
+
__spreadArrays: () => Re,
|
|
72
72
|
__values: () => H,
|
|
73
|
-
default: () =>
|
|
73
|
+
default: () => Wt
|
|
74
74
|
});
|
|
75
75
|
function xe(e, i) {
|
|
76
76
|
if (typeof i != "function" && i !== null)
|
|
@@ -83,34 +83,34 @@ function xe(e, i) {
|
|
|
83
83
|
}
|
|
84
84
|
function he(e, i) {
|
|
85
85
|
var t = {};
|
|
86
|
-
for (var
|
|
86
|
+
for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && i.indexOf(a) < 0 && (t[a] = e[a]);
|
|
87
87
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
88
|
-
for (var
|
|
89
|
-
i.indexOf(r
|
|
88
|
+
for (var r = 0, a = Object.getOwnPropertySymbols(e); r < a.length; r++)
|
|
89
|
+
i.indexOf(a[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[r]) && (t[a[r]] = e[a[r]]);
|
|
90
90
|
return t;
|
|
91
91
|
}
|
|
92
|
-
function ye(e, i, t,
|
|
93
|
-
var
|
|
94
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") n = Reflect.decorate(e, i, t,
|
|
95
|
-
else for (var c = e.length - 1; c >= 0; c--) (s = e[c]) && (n = (
|
|
96
|
-
return
|
|
92
|
+
function ye(e, i, t, a) {
|
|
93
|
+
var r = arguments.length, n = r < 3 ? i : a === null ? a = Object.getOwnPropertyDescriptor(i, t) : a, s;
|
|
94
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") n = Reflect.decorate(e, i, t, a);
|
|
95
|
+
else for (var c = e.length - 1; c >= 0; c--) (s = e[c]) && (n = (r < 3 ? s(n) : r > 3 ? s(i, t, n) : s(i, t)) || n);
|
|
96
|
+
return r > 3 && n && Object.defineProperty(i, t, n), n;
|
|
97
97
|
}
|
|
98
98
|
function ve(e, i) {
|
|
99
|
-
return function(t,
|
|
100
|
-
i(t,
|
|
99
|
+
return function(t, a) {
|
|
100
|
+
i(t, a, e);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function we(e, i, t,
|
|
103
|
+
function we(e, i, t, a, r, n) {
|
|
104
104
|
function s(v) {
|
|
105
105
|
if (v !== void 0 && typeof v != "function") throw new TypeError("Function expected");
|
|
106
106
|
return v;
|
|
107
107
|
}
|
|
108
108
|
o(s, "accept");
|
|
109
|
-
for (var c =
|
|
110
|
-
(l ? Object.getOwnPropertyDescriptor(l,
|
|
109
|
+
for (var c = a.kind, p = c === "getter" ? "get" : c === "setter" ? "set" : "value", l = !i && e ? a.static ? e : e.prototype : null, u = i ||
|
|
110
|
+
(l ? Object.getOwnPropertyDescriptor(l, a.name) : {}), d, x = !1, g = t.length - 1; g >= 0; g--) {
|
|
111
111
|
var m = {};
|
|
112
|
-
for (var f in
|
|
113
|
-
for (var f in
|
|
112
|
+
for (var f in a) m[f] = f === "access" ? {} : a[f];
|
|
113
|
+
for (var f in a.access) m.access[f] = a.access[f];
|
|
114
114
|
m.addInitializer = function(v) {
|
|
115
115
|
if (x) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
116
116
|
n.push(s(v || null));
|
|
@@ -119,15 +119,15 @@ function we(e, i, t, r, a, n) {
|
|
|
119
119
|
if (c === "accessor") {
|
|
120
120
|
if (y === void 0) continue;
|
|
121
121
|
if (y === null || typeof y != "object") throw new TypeError("Object expected");
|
|
122
|
-
(d = s(y.get)) && (u.get = d), (d = s(y.set)) && (u.set = d), (d = s(y.init)) &&
|
|
123
|
-
} else (d = s(y)) && (c === "field" ?
|
|
122
|
+
(d = s(y.get)) && (u.get = d), (d = s(y.set)) && (u.set = d), (d = s(y.init)) && r.unshift(d);
|
|
123
|
+
} else (d = s(y)) && (c === "field" ? r.unshift(d) : u[p] = d);
|
|
124
124
|
}
|
|
125
|
-
l && Object.defineProperty(l,
|
|
125
|
+
l && Object.defineProperty(l, a.name, u), x = !0;
|
|
126
126
|
}
|
|
127
127
|
function be(e, i, t) {
|
|
128
|
-
for (var
|
|
129
|
-
t =
|
|
130
|
-
return
|
|
128
|
+
for (var a = arguments.length > 2, r = 0; r < i.length; r++)
|
|
129
|
+
t = a ? i[r].call(e, t) : i[r].call(e);
|
|
130
|
+
return a ? t : void 0;
|
|
131
131
|
}
|
|
132
132
|
function _e(e) {
|
|
133
133
|
return typeof e == "symbol" ? e : "".concat(e);
|
|
@@ -139,16 +139,16 @@ function je(e, i, t) {
|
|
|
139
139
|
function Oe(e, i) {
|
|
140
140
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, i);
|
|
141
141
|
}
|
|
142
|
-
function Ee(e, i, t,
|
|
143
|
-
function
|
|
142
|
+
function Ee(e, i, t, a) {
|
|
143
|
+
function r(n) {
|
|
144
144
|
return n instanceof t ? n : new t(function(s) {
|
|
145
145
|
s(n);
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
return o(
|
|
148
|
+
return o(r, "adopt"), new (t || (t = Promise))(function(n, s) {
|
|
149
149
|
function c(u) {
|
|
150
150
|
try {
|
|
151
|
-
l(
|
|
151
|
+
l(a.next(u));
|
|
152
152
|
} catch (d) {
|
|
153
153
|
s(d);
|
|
154
154
|
}
|
|
@@ -156,23 +156,23 @@ function Ee(e, i, t, r) {
|
|
|
156
156
|
o(c, "fulfilled");
|
|
157
157
|
function p(u) {
|
|
158
158
|
try {
|
|
159
|
-
l(
|
|
159
|
+
l(a.throw(u));
|
|
160
160
|
} catch (d) {
|
|
161
161
|
s(d);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
o(p, "rejected");
|
|
165
165
|
function l(u) {
|
|
166
|
-
u.done ? n(u.value) :
|
|
166
|
+
u.done ? n(u.value) : r(u.value).then(c, p);
|
|
167
167
|
}
|
|
168
|
-
o(l, "step"), l((
|
|
168
|
+
o(l, "step"), l((a = a.apply(e, i || [])).next());
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Se(e, i) {
|
|
172
172
|
var t = { label: 0, sent: /* @__PURE__ */ o(function() {
|
|
173
173
|
if (n[0] & 1) throw n[1];
|
|
174
174
|
return n[1];
|
|
175
|
-
}, "sent"), trys: [], ops: [] },
|
|
175
|
+
}, "sent"), trys: [], ops: [] }, a, r, n, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
176
176
|
return s.next = c(0), s.throw = c(1), s.return = c(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
177
177
|
return this;
|
|
178
178
|
}), s;
|
|
@@ -182,11 +182,11 @@ function Pe(e, i) {
|
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
function p(l) {
|
|
185
|
-
if (
|
|
185
|
+
if (a) throw new TypeError("Generator is already executing.");
|
|
186
186
|
for (; s && (s = 0, l[0] && (t = 0)), t; ) try {
|
|
187
|
-
if (
|
|
187
|
+
if (a = 1, r && (n = l[0] & 2 ? r.return : l[0] ? r.throw || ((n = r.return) && n.call(r), 0) : r.next) && !(n = n.call(r, l[1])).done)
|
|
188
188
|
return n;
|
|
189
|
-
switch (
|
|
189
|
+
switch (r = 0, n && (l = [l[0] & 2, n.value]), l[0]) {
|
|
190
190
|
case 0:
|
|
191
191
|
case 1:
|
|
192
192
|
n = l;
|
|
@@ -194,7 +194,7 @@ function Pe(e, i) {
|
|
|
194
194
|
case 4:
|
|
195
195
|
return t.label++, { value: l[1], done: !1 };
|
|
196
196
|
case 5:
|
|
197
|
-
t.label++,
|
|
197
|
+
t.label++, r = l[1], l = [0];
|
|
198
198
|
continue;
|
|
199
199
|
case 7:
|
|
200
200
|
l = t.ops.pop(), t.trys.pop();
|
|
@@ -221,23 +221,23 @@ function Pe(e, i) {
|
|
|
221
221
|
}
|
|
222
222
|
l = i.call(e, t);
|
|
223
223
|
} catch (u) {
|
|
224
|
-
l = [6, u],
|
|
224
|
+
l = [6, u], r = 0;
|
|
225
225
|
} finally {
|
|
226
|
-
|
|
226
|
+
a = n = 0;
|
|
227
227
|
}
|
|
228
228
|
if (l[0] & 5) throw l[1];
|
|
229
229
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
for (var t in e) t !== "default" && !Object.prototype.hasOwnProperty.call(i, t) &&
|
|
232
|
+
function Pe(e, i) {
|
|
233
|
+
for (var t in e) t !== "default" && !Object.prototype.hasOwnProperty.call(i, t) && J(i, e, t);
|
|
234
234
|
}
|
|
235
235
|
function H(e) {
|
|
236
|
-
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i],
|
|
236
|
+
var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i], a = 0;
|
|
237
237
|
if (t) return t.call(e);
|
|
238
238
|
if (e && typeof e.length == "number") return {
|
|
239
239
|
next: /* @__PURE__ */ o(function() {
|
|
240
|
-
return e &&
|
|
240
|
+
return e && a >= e.length && (e = void 0), { value: e && e[a++], done: !e };
|
|
241
241
|
}, "next")
|
|
242
242
|
};
|
|
243
243
|
throw new TypeError(i ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
@@ -245,62 +245,62 @@ function H(e) {
|
|
|
245
245
|
function ee(e, i) {
|
|
246
246
|
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
|
247
247
|
if (!t) return e;
|
|
248
|
-
var
|
|
248
|
+
var a = t.call(e), r, n = [], s;
|
|
249
249
|
try {
|
|
250
|
-
for (; (i === void 0 || i-- > 0) && !(
|
|
250
|
+
for (; (i === void 0 || i-- > 0) && !(r = a.next()).done; ) n.push(r.value);
|
|
251
251
|
} catch (c) {
|
|
252
252
|
s = { error: c };
|
|
253
253
|
} finally {
|
|
254
254
|
try {
|
|
255
|
-
|
|
255
|
+
r && !r.done && (t = a.return) && t.call(a);
|
|
256
256
|
} finally {
|
|
257
257
|
if (s) throw s.error;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
return n;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Te() {
|
|
263
263
|
for (var e = [], i = 0; i < arguments.length; i++)
|
|
264
264
|
e = e.concat(ee(arguments[i]));
|
|
265
265
|
return e;
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function Re() {
|
|
268
268
|
for (var e = 0, i = 0, t = arguments.length; i < t; i++) e += arguments[i].length;
|
|
269
|
-
for (var
|
|
270
|
-
for (var n = arguments[i], s = 0, c = n.length; s < c; s++,
|
|
271
|
-
r
|
|
272
|
-
return
|
|
269
|
+
for (var a = Array(e), r = 0, i = 0; i < t; i++)
|
|
270
|
+
for (var n = arguments[i], s = 0, c = n.length; s < c; s++, r++)
|
|
271
|
+
a[r] = n[s];
|
|
272
|
+
return a;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
if (t || arguments.length === 2) for (var
|
|
276
|
-
(n || !(
|
|
274
|
+
function ke(e, i, t) {
|
|
275
|
+
if (t || arguments.length === 2) for (var a = 0, r = i.length, n; a < r; a++)
|
|
276
|
+
(n || !(a in i)) && (n || (n = Array.prototype.slice.call(i, 0, a)), n[a] = i[a]);
|
|
277
277
|
return e.concat(n || Array.prototype.slice.call(i));
|
|
278
278
|
}
|
|
279
279
|
function F(e) {
|
|
280
280
|
return this instanceof F ? (this.v = e, this) : new F(e);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Fe(e, i, t) {
|
|
283
283
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
284
|
-
var
|
|
285
|
-
return
|
|
284
|
+
var a = t.apply(e, i || []), r, n = [];
|
|
285
|
+
return r = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", s), r[Symbol.
|
|
286
286
|
asyncIterator] = function() {
|
|
287
287
|
return this;
|
|
288
|
-
},
|
|
288
|
+
}, r;
|
|
289
289
|
function s(g) {
|
|
290
290
|
return function(m) {
|
|
291
291
|
return Promise.resolve(m).then(g, d);
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
294
|
function c(g, m) {
|
|
295
|
-
|
|
295
|
+
a[g] && (r[g] = function(f) {
|
|
296
296
|
return new Promise(function(y, v) {
|
|
297
297
|
n.push([g, f, y, v]) > 1 || p(g, f);
|
|
298
298
|
});
|
|
299
|
-
}, m && (
|
|
299
|
+
}, m && (r[g] = m(r[g])));
|
|
300
300
|
}
|
|
301
301
|
function p(g, m) {
|
|
302
302
|
try {
|
|
303
|
-
l(
|
|
303
|
+
l(a[g](m));
|
|
304
304
|
} catch (f) {
|
|
305
305
|
x(n[0][3], f);
|
|
306
306
|
}
|
|
@@ -320,32 +320,32 @@ function Re(e, i, t) {
|
|
|
320
320
|
}
|
|
321
321
|
function Le(e) {
|
|
322
322
|
var i, t;
|
|
323
|
-
return i = {},
|
|
324
|
-
throw
|
|
325
|
-
}),
|
|
323
|
+
return i = {}, a("next"), a("throw", function(r) {
|
|
324
|
+
throw r;
|
|
325
|
+
}), a("return"), i[Symbol.iterator] = function() {
|
|
326
326
|
return this;
|
|
327
327
|
}, i;
|
|
328
|
-
function r
|
|
329
|
-
i[
|
|
330
|
-
return (t = !t) ? { value: F(e[
|
|
328
|
+
function a(r, n) {
|
|
329
|
+
i[r] = e[r] ? function(s) {
|
|
330
|
+
return (t = !t) ? { value: F(e[r](s)), done: !1 } : n ? n(s) : s;
|
|
331
331
|
} : n;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
function Ce(e) {
|
|
335
335
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
336
336
|
var i = e[Symbol.asyncIterator], t;
|
|
337
|
-
return i ? i.call(e) : (e = typeof H == "function" ? H(e) : e[Symbol.iterator](), t = {},
|
|
337
|
+
return i ? i.call(e) : (e = typeof H == "function" ? H(e) : e[Symbol.iterator](), t = {}, a("next"), a("throw"), a("return"), t[Symbol.asyncIterator] =
|
|
338
338
|
function() {
|
|
339
339
|
return this;
|
|
340
340
|
}, t);
|
|
341
|
-
function
|
|
341
|
+
function a(n) {
|
|
342
342
|
t[n] = e[n] && function(s) {
|
|
343
343
|
return new Promise(function(c, p) {
|
|
344
|
-
s = e[n](s),
|
|
344
|
+
s = e[n](s), r(c, p, s.done, s.value);
|
|
345
345
|
});
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function r(n, s, c, p) {
|
|
349
349
|
Promise.resolve(p).then(function(l) {
|
|
350
350
|
n({ value: l, done: c });
|
|
351
351
|
}, s);
|
|
@@ -357,24 +357,24 @@ function Ae(e, i) {
|
|
|
357
357
|
function Ne(e) {
|
|
358
358
|
if (e && e.__esModule) return e;
|
|
359
359
|
var i = {};
|
|
360
|
-
if (e != null) for (var t = Q(e),
|
|
361
|
-
return
|
|
360
|
+
if (e != null) for (var t = Q(e), a = 0; a < t.length; a++) t[a] !== "default" && J(i, e, t[a]);
|
|
361
|
+
return qt(i, e), i;
|
|
362
362
|
}
|
|
363
363
|
function De(e) {
|
|
364
364
|
return e && e.__esModule ? e : { default: e };
|
|
365
365
|
}
|
|
366
|
-
function Ie(e, i, t,
|
|
367
|
-
if (t === "a" && !
|
|
368
|
-
if (typeof i == "function" ? e !== i || !
|
|
366
|
+
function Ie(e, i, t, a) {
|
|
367
|
+
if (t === "a" && !a) throw new TypeError("Private accessor was defined without a getter");
|
|
368
|
+
if (typeof i == "function" ? e !== i || !a : !i.has(e)) throw new TypeError("Cannot read private member from an object whose class did not\
|
|
369
369
|
declare it");
|
|
370
|
-
return t === "m" ?
|
|
370
|
+
return t === "m" ? a : t === "a" ? a.call(e) : a ? a.value : i.get(e);
|
|
371
371
|
}
|
|
372
|
-
function Me(e, i, t,
|
|
373
|
-
if (
|
|
374
|
-
if (
|
|
375
|
-
if (typeof i == "function" ? e !== i || !
|
|
372
|
+
function Me(e, i, t, a, r) {
|
|
373
|
+
if (a === "m") throw new TypeError("Private method is not writable");
|
|
374
|
+
if (a === "a" && !r) throw new TypeError("Private accessor was defined without a setter");
|
|
375
|
+
if (typeof i == "function" ? e !== i || !r : !i.has(e)) throw new TypeError("Cannot write private member to an object whose class did not \
|
|
376
376
|
declare it");
|
|
377
|
-
return
|
|
377
|
+
return a === "a" ? r.call(e, t) : r ? r.value = t : i.set(e, t), t;
|
|
378
378
|
}
|
|
379
379
|
function ze(e, i) {
|
|
380
380
|
if (i === null || typeof i != "object" && typeof i != "function") throw new TypeError("Cannot use 'in' operator on non-object");
|
|
@@ -383,72 +383,72 @@ function ze(e, i) {
|
|
|
383
383
|
function qe(e, i, t) {
|
|
384
384
|
if (i != null) {
|
|
385
385
|
if (typeof i != "object" && typeof i != "function") throw new TypeError("Object expected.");
|
|
386
|
-
var
|
|
386
|
+
var a, r;
|
|
387
387
|
if (t) {
|
|
388
388
|
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
389
|
-
|
|
389
|
+
a = i[Symbol.asyncDispose];
|
|
390
390
|
}
|
|
391
|
-
if (
|
|
391
|
+
if (a === void 0) {
|
|
392
392
|
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
393
|
-
|
|
393
|
+
a = i[Symbol.dispose], t && (r = a);
|
|
394
394
|
}
|
|
395
|
-
if (typeof
|
|
396
|
-
|
|
395
|
+
if (typeof a != "function") throw new TypeError("Object not disposable.");
|
|
396
|
+
r && (a = /* @__PURE__ */ o(function() {
|
|
397
397
|
try {
|
|
398
|
-
|
|
398
|
+
r.call(this);
|
|
399
399
|
} catch (n) {
|
|
400
400
|
return Promise.reject(n);
|
|
401
401
|
}
|
|
402
|
-
}, "dispose")), e.stack.push({ value: i, dispose:
|
|
402
|
+
}, "dispose")), e.stack.push({ value: i, dispose: a, async: t });
|
|
403
403
|
} else t && e.stack.push({ async: !0 });
|
|
404
404
|
return i;
|
|
405
405
|
}
|
|
406
406
|
function $e(e) {
|
|
407
407
|
function i(n) {
|
|
408
|
-
e.error = e.hasError ? new
|
|
408
|
+
e.error = e.hasError ? new $t(n, e.error, "An error was suppressed during disposal.") : n, e.hasError = !0;
|
|
409
409
|
}
|
|
410
410
|
o(i, "fail");
|
|
411
|
-
var t,
|
|
412
|
-
function
|
|
411
|
+
var t, a = 0;
|
|
412
|
+
function r() {
|
|
413
413
|
for (; t = e.stack.pop(); )
|
|
414
414
|
try {
|
|
415
|
-
if (!t.async &&
|
|
415
|
+
if (!t.async && a === 1) return a = 0, e.stack.push(t), Promise.resolve().then(r);
|
|
416
416
|
if (t.dispose) {
|
|
417
417
|
var n = t.dispose.call(t.value);
|
|
418
|
-
if (t.async) return
|
|
419
|
-
return i(s),
|
|
418
|
+
if (t.async) return a |= 2, Promise.resolve(n).then(r, function(s) {
|
|
419
|
+
return i(s), r();
|
|
420
420
|
});
|
|
421
|
-
} else
|
|
421
|
+
} else a |= 1;
|
|
422
422
|
} catch (s) {
|
|
423
423
|
i(s);
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
425
|
+
if (a === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
|
|
426
426
|
if (e.hasError) throw e.error;
|
|
427
427
|
}
|
|
428
|
-
return o(
|
|
428
|
+
return o(r, "next"), r();
|
|
429
429
|
}
|
|
430
430
|
function We(e, i) {
|
|
431
|
-
return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(t,
|
|
432
|
-
return
|
|
431
|
+
return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(t, a, r, n, s) {
|
|
432
|
+
return a ? i ? ".jsx" : ".js" : r && (!n || !s) ? t : r + n + "." + s.toLowerCase() + "js";
|
|
433
433
|
}) : e;
|
|
434
434
|
}
|
|
435
|
-
var Y,
|
|
435
|
+
var Y, B, J, qt, Q, $t, Wt, He = q(() => {
|
|
436
436
|
Y = /* @__PURE__ */ o(function(e, i) {
|
|
437
|
-
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t,
|
|
438
|
-
t.__proto__ =
|
|
439
|
-
} || function(t,
|
|
440
|
-
for (var
|
|
437
|
+
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, a) {
|
|
438
|
+
t.__proto__ = a;
|
|
439
|
+
} || function(t, a) {
|
|
440
|
+
for (var r in a) Object.prototype.hasOwnProperty.call(a, r) && (t[r] = a[r]);
|
|
441
441
|
}, Y(e, i);
|
|
442
442
|
}, "extendStatics");
|
|
443
443
|
o(xe, "__extends");
|
|
444
|
-
|
|
445
|
-
return
|
|
446
|
-
for (var t,
|
|
447
|
-
t = arguments[
|
|
444
|
+
B = /* @__PURE__ */ o(function() {
|
|
445
|
+
return B = Object.assign || /* @__PURE__ */ o(function(i) {
|
|
446
|
+
for (var t, a = 1, r = arguments.length; a < r; a++) {
|
|
447
|
+
t = arguments[a];
|
|
448
448
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
|
|
449
449
|
}
|
|
450
450
|
return i;
|
|
451
|
-
}, "__assign"),
|
|
451
|
+
}, "__assign"), B.apply(this, arguments);
|
|
452
452
|
}, "__assign");
|
|
453
453
|
o(he, "__rest");
|
|
454
454
|
o(ye, "__decorate");
|
|
@@ -459,35 +459,35 @@ var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
|
459
459
|
o(je, "__setFunctionName");
|
|
460
460
|
o(Oe, "__metadata");
|
|
461
461
|
o(Ee, "__awaiter");
|
|
462
|
-
o(
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
var
|
|
466
|
-
(!
|
|
462
|
+
o(Se, "__generator");
|
|
463
|
+
J = Object.create ? function(e, i, t, a) {
|
|
464
|
+
a === void 0 && (a = t);
|
|
465
|
+
var r = Object.getOwnPropertyDescriptor(i, t);
|
|
466
|
+
(!r || ("get" in r ? !i.__esModule : r.writable || r.configurable)) && (r = { enumerable: !0, get: /* @__PURE__ */ o(function() {
|
|
467
467
|
return i[t];
|
|
468
|
-
}, "get") }), Object.defineProperty(e,
|
|
469
|
-
} : function(e, i, t,
|
|
470
|
-
|
|
468
|
+
}, "get") }), Object.defineProperty(e, a, r);
|
|
469
|
+
} : function(e, i, t, a) {
|
|
470
|
+
a === void 0 && (a = t), e[a] = i[t];
|
|
471
471
|
};
|
|
472
|
-
o(
|
|
472
|
+
o(Pe, "__exportStar");
|
|
473
473
|
o(H, "__values");
|
|
474
474
|
o(ee, "__read");
|
|
475
|
-
o(
|
|
476
|
-
o(
|
|
477
|
-
o(
|
|
475
|
+
o(Te, "__spread");
|
|
476
|
+
o(Re, "__spreadArrays");
|
|
477
|
+
o(ke, "__spreadArray");
|
|
478
478
|
o(F, "__await");
|
|
479
|
-
o(
|
|
479
|
+
o(Fe, "__asyncGenerator");
|
|
480
480
|
o(Le, "__asyncDelegator");
|
|
481
481
|
o(Ce, "__asyncValues");
|
|
482
482
|
o(Ae, "__makeTemplateObject");
|
|
483
|
-
|
|
483
|
+
qt = Object.create ? function(e, i) {
|
|
484
484
|
Object.defineProperty(e, "default", { enumerable: !0, value: i });
|
|
485
485
|
} : function(e, i) {
|
|
486
486
|
e.default = i;
|
|
487
487
|
}, Q = /* @__PURE__ */ o(function(e) {
|
|
488
488
|
return Q = Object.getOwnPropertyNames || function(i) {
|
|
489
489
|
var t = [];
|
|
490
|
-
for (var
|
|
490
|
+
for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (t[t.length] = a);
|
|
491
491
|
return t;
|
|
492
492
|
}, Q(e);
|
|
493
493
|
}, "ownKeys");
|
|
@@ -497,15 +497,15 @@ var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
|
497
497
|
o(Me, "__classPrivateFieldSet");
|
|
498
498
|
o(ze, "__classPrivateFieldIn");
|
|
499
499
|
o(qe, "__addDisposableResource");
|
|
500
|
-
|
|
501
|
-
var
|
|
502
|
-
return
|
|
500
|
+
$t = typeof SuppressedError == "function" ? SuppressedError : function(e, i, t) {
|
|
501
|
+
var a = new Error(t);
|
|
502
|
+
return a.name = "SuppressedError", a.error = e, a.suppressed = i, a;
|
|
503
503
|
};
|
|
504
504
|
o($e, "__disposeResources");
|
|
505
505
|
o(We, "__rewriteRelativeImportExtension");
|
|
506
|
-
|
|
506
|
+
Wt = {
|
|
507
507
|
__extends: xe,
|
|
508
|
-
__assign:
|
|
508
|
+
__assign: B,
|
|
509
509
|
__rest: he,
|
|
510
510
|
__decorate: ye,
|
|
511
511
|
__param: ve,
|
|
@@ -515,16 +515,16 @@ var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
|
515
515
|
__setFunctionName: je,
|
|
516
516
|
__metadata: Oe,
|
|
517
517
|
__awaiter: Ee,
|
|
518
|
-
__generator:
|
|
519
|
-
__createBinding:
|
|
520
|
-
__exportStar:
|
|
518
|
+
__generator: Se,
|
|
519
|
+
__createBinding: J,
|
|
520
|
+
__exportStar: Pe,
|
|
521
521
|
__values: H,
|
|
522
522
|
__read: ee,
|
|
523
|
-
__spread:
|
|
524
|
-
__spreadArrays:
|
|
525
|
-
__spreadArray:
|
|
523
|
+
__spread: Te,
|
|
524
|
+
__spreadArrays: Re,
|
|
525
|
+
__spreadArray: ke,
|
|
526
526
|
__await: F,
|
|
527
|
-
__asyncGenerator:
|
|
527
|
+
__asyncGenerator: Fe,
|
|
528
528
|
__asyncDelegator: Le,
|
|
529
529
|
__asyncValues: Ce,
|
|
530
530
|
__makeTemplateObject: Ae,
|
|
@@ -540,20 +540,20 @@ var Y, W, B, Mt, Q, zt, qt, Be = z(() => {
|
|
|
540
540
|
});
|
|
541
541
|
|
|
542
542
|
// ../node_modules/@yarnpkg/esbuild-plugin-pnp/lib/index.js
|
|
543
|
-
var
|
|
543
|
+
var Ge = N((G) => {
|
|
544
544
|
"use strict";
|
|
545
|
-
Object.defineProperty(
|
|
546
|
-
|
|
547
|
-
var Je = (
|
|
545
|
+
Object.defineProperty(G, "__esModule", { value: !0 });
|
|
546
|
+
G.pnpPlugin = void 0;
|
|
547
|
+
var Je = (He(), W(Be)), Bt = Je.__importStar(P("fs")), Ht = Je.__importDefault(P("path")), Jt = /()/, Gt = [".tsx", ".ts", ".jsx", ".mjs",
|
|
548
548
|
".cjs", ".js", ".css", ".json"];
|
|
549
|
-
function
|
|
549
|
+
function Ut(e) {
|
|
550
550
|
return e.map((i) => {
|
|
551
551
|
let t = i.indexOf("*");
|
|
552
552
|
return t !== -1 ? { prefix: i.slice(0, t), suffix: i.slice(t + 1) } : i;
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
|
-
o(
|
|
556
|
-
function
|
|
555
|
+
o(Ut, "parseExternals");
|
|
556
|
+
function Vt(e, i) {
|
|
557
557
|
for (let t of i)
|
|
558
558
|
if (typeof t == "object") {
|
|
559
559
|
if (e.length >= t.prefix.length + t.suffix.length && e.startsWith(t.prefix) && e.endsWith(t.suffix))
|
|
@@ -563,44 +563,44 @@ var Ue = A((J) => {
|
|
|
563
563
|
return !0;
|
|
564
564
|
return !1;
|
|
565
565
|
}
|
|
566
|
-
o(
|
|
567
|
-
async function
|
|
566
|
+
o(Vt, "isExternal");
|
|
567
|
+
async function Xt(e) {
|
|
568
568
|
return {
|
|
569
|
-
contents: await
|
|
569
|
+
contents: await Bt.promises.readFile(e.path),
|
|
570
570
|
loader: "default",
|
|
571
571
|
// For regular imports in the `file` namespace, resolveDir is the directory the
|
|
572
572
|
// file being resolved lives in. For all other virtual modules, this defaults to
|
|
573
573
|
// empty string: ""
|
|
574
574
|
// A sensible value for pnp imports is the same as the `file` namespace, as pnp
|
|
575
575
|
// still resolves to files on disk (in the cache).
|
|
576
|
-
resolveDir:
|
|
576
|
+
resolveDir: Ht.default.dirname(e.path)
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
o(
|
|
580
|
-
async function
|
|
581
|
-
let
|
|
579
|
+
o(Xt, "defaultOnLoad");
|
|
580
|
+
async function Kt(e, { resolvedPath: i, error: t, watchFiles: a }) {
|
|
581
|
+
let r = t ? [{ text: t.message }] : [], n;
|
|
582
582
|
switch (e.kind) {
|
|
583
583
|
case "require-call":
|
|
584
584
|
case "require-resolve":
|
|
585
585
|
case "dynamic-import":
|
|
586
|
-
n = { warnings:
|
|
586
|
+
n = { warnings: r };
|
|
587
587
|
break;
|
|
588
588
|
default:
|
|
589
|
-
n = { errors:
|
|
589
|
+
n = { errors: r };
|
|
590
590
|
break;
|
|
591
591
|
}
|
|
592
|
-
return i !== null ? { namespace: "pnp", path: i, watchFiles:
|
|
592
|
+
return i !== null ? { namespace: "pnp", path: i, watchFiles: a } : { external: !0, ...n, watchFiles: a };
|
|
593
593
|
}
|
|
594
|
-
o(
|
|
595
|
-
function
|
|
594
|
+
o(Kt, "defaultOnResolve");
|
|
595
|
+
function Zt({ baseDir: e = process.cwd(), extensions: i = Gt, filter: t = Jt, onResolve: a = Kt, onLoad: r = Xt } = {}) {
|
|
596
596
|
return {
|
|
597
597
|
name: "@yarnpkg/esbuild-plugin-pnp",
|
|
598
598
|
setup(n) {
|
|
599
599
|
var s, c;
|
|
600
|
-
let { findPnpApi: p } =
|
|
600
|
+
let { findPnpApi: p } = P("module");
|
|
601
601
|
if (typeof p > "u")
|
|
602
602
|
return;
|
|
603
|
-
let l =
|
|
603
|
+
let l = Ut((s = n.initialOptions.external) !== null && s !== void 0 ? s : []), u = (c = n.initialOptions.platform) !== null && c !==
|
|
604
604
|
void 0 ? c : "browser", d = u === "node", x = new Set(n.initialOptions.conditions);
|
|
605
605
|
x.add("default"), (u === "browser" || u === "node") && x.add(u);
|
|
606
606
|
let g = new Set(x);
|
|
@@ -608,7 +608,7 @@ var Ue = A((J) => {
|
|
|
608
608
|
let m = new Set(x);
|
|
609
609
|
m.add("require"), n.onResolve({ filter: t }, (f) => {
|
|
610
610
|
var y, v;
|
|
611
|
-
if (
|
|
611
|
+
if (Vt(f.path, l))
|
|
612
612
|
return { external: !0 };
|
|
613
613
|
let _ = x;
|
|
614
614
|
f.kind === "dynamic-import" || f.kind === "import-statement" ? _ = g : (f.kind === "require-call" || f.kind === "require-resolve") &&
|
|
@@ -616,84 +616,84 @@ var Ue = A((J) => {
|
|
|
616
616
|
let O = f.resolveDir ? `${f.resolveDir}/` : f.importer ? f.importer : `${e}/`, w = p(O);
|
|
617
617
|
if (!w)
|
|
618
618
|
return;
|
|
619
|
-
let E = null,
|
|
619
|
+
let E = null, S;
|
|
620
620
|
try {
|
|
621
621
|
E = w.resolveRequest(f.path, O, {
|
|
622
622
|
conditions: _,
|
|
623
623
|
considerBuiltins: d,
|
|
624
624
|
extensions: i
|
|
625
625
|
});
|
|
626
|
-
} catch (
|
|
627
|
-
|
|
626
|
+
} catch (z) {
|
|
627
|
+
S = z;
|
|
628
628
|
}
|
|
629
|
-
let
|
|
629
|
+
let R = [w.resolveRequest("pnpapi", null)];
|
|
630
630
|
if (E) {
|
|
631
|
-
let
|
|
632
|
-
if (
|
|
633
|
-
let
|
|
634
|
-
|
|
631
|
+
let z = w.findPackageLocator(E);
|
|
632
|
+
if (z) {
|
|
633
|
+
let U = w.getPackageInformation(z);
|
|
634
|
+
U?.linkType === "SOFT" && R.push((v = (y = w.resolveVirtual) === null || y === void 0 ? void 0 : y.call(w, E)) !== null && v !==
|
|
635
635
|
void 0 ? v : E);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
return
|
|
639
|
-
}), n.onLoad !== null && n.onLoad({ filter: t },
|
|
638
|
+
return a(f, { resolvedPath: E, error: S, watchFiles: R });
|
|
639
|
+
}), n.onLoad !== null && n.onLoad({ filter: t }, r);
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
|
-
o(
|
|
644
|
-
|
|
643
|
+
o(Zt, "pnpPlugin");
|
|
644
|
+
G.pnpPlugin = Zt;
|
|
645
645
|
});
|
|
646
646
|
|
|
647
647
|
// ../node_modules/totalist/sync/index.mjs
|
|
648
648
|
var Ve = {};
|
|
649
|
-
|
|
650
|
-
totalist: () =>
|
|
649
|
+
$(Ve, {
|
|
650
|
+
totalist: () => Ue
|
|
651
651
|
});
|
|
652
|
-
import { join as te, resolve as
|
|
653
|
-
import { readdirSync as
|
|
654
|
-
function
|
|
655
|
-
e =
|
|
656
|
-
let
|
|
657
|
-
for (;
|
|
658
|
-
n = te(e, r
|
|
652
|
+
import { join as te, resolve as Yt } from "path";
|
|
653
|
+
import { readdirSync as Qt, statSync as ei } from "fs";
|
|
654
|
+
function Ue(e, i, t = "") {
|
|
655
|
+
e = Yt(".", e);
|
|
656
|
+
let a = Qt(e), r = 0, n, s;
|
|
657
|
+
for (; r < a.length; r++)
|
|
658
|
+
n = te(e, a[r]), s = ei(n), s.isDirectory() ? Ue(n, i, te(t, a[r])) : i(te(t, a[r]), n, s);
|
|
659
659
|
}
|
|
660
|
-
var Xe =
|
|
661
|
-
o(
|
|
660
|
+
var Xe = q(() => {
|
|
661
|
+
o(Ue, "totalist");
|
|
662
662
|
});
|
|
663
663
|
|
|
664
664
|
// ../node_modules/@polka/url/build.mjs
|
|
665
665
|
var Ze = {};
|
|
666
|
-
|
|
667
|
-
parse: () =>
|
|
666
|
+
$(Ze, {
|
|
667
|
+
parse: () => ti
|
|
668
668
|
});
|
|
669
669
|
import * as Ke from "node:querystring";
|
|
670
|
-
function
|
|
670
|
+
function ti(e) {
|
|
671
671
|
let i = e.url;
|
|
672
672
|
if (i == null) return;
|
|
673
673
|
let t = e._parsedUrl;
|
|
674
674
|
if (t && t.raw === i) return t;
|
|
675
|
-
let
|
|
675
|
+
let a = i, r = "", n;
|
|
676
676
|
if (i.length > 1) {
|
|
677
677
|
let s = i.indexOf("?", 1);
|
|
678
|
-
s !== -1 && (
|
|
678
|
+
s !== -1 && (r = i.substring(s), a = i.substring(0, s), r.length > 1 && (n = Ke.parse(r.substring(1))));
|
|
679
679
|
}
|
|
680
|
-
return e._parsedUrl = { pathname:
|
|
680
|
+
return e._parsedUrl = { pathname: a, search: r, query: n, raw: i };
|
|
681
681
|
}
|
|
682
|
-
var Ye =
|
|
683
|
-
o(
|
|
682
|
+
var Ye = q(() => {
|
|
683
|
+
o(ti, "parse");
|
|
684
684
|
});
|
|
685
685
|
|
|
686
686
|
// ../node_modules/mrmime/index.mjs
|
|
687
687
|
var et = {};
|
|
688
|
-
|
|
689
|
-
lookup: () =>
|
|
688
|
+
$(et, {
|
|
689
|
+
lookup: () => ii,
|
|
690
690
|
mimes: () => Qe
|
|
691
691
|
});
|
|
692
|
-
function
|
|
692
|
+
function ii(e) {
|
|
693
693
|
let i = ("" + e).trim().toLowerCase(), t = i.lastIndexOf(".");
|
|
694
694
|
return Qe[~t ? i.substring(++t) : i];
|
|
695
695
|
}
|
|
696
|
-
var Qe, tt =
|
|
696
|
+
var Qe, tt = q(() => {
|
|
697
697
|
Qe = {
|
|
698
698
|
"3g2": "video/3gpp2",
|
|
699
699
|
"3gp": "video/3gpp",
|
|
@@ -1130,82 +1130,82 @@ var Qe, tt = z(() => {
|
|
|
1130
1130
|
yml: "text/yaml",
|
|
1131
1131
|
zip: "application/zip"
|
|
1132
1132
|
};
|
|
1133
|
-
o(
|
|
1133
|
+
o(ii, "lookup");
|
|
1134
1134
|
});
|
|
1135
1135
|
|
|
1136
1136
|
// ../node_modules/sirv/build.js
|
|
1137
|
-
var nt =
|
|
1138
|
-
var ie =
|
|
1139
|
-
lookup:
|
|
1137
|
+
var nt = N((Da, rt) => {
|
|
1138
|
+
var ie = P("fs"), { join: ai, normalize: ri, resolve: ni } = P("path"), { totalist: oi } = (Xe(), W(Ve)), { parse: si } = (Ye(), W(Ze)), {
|
|
1139
|
+
lookup: li } = (tt(), W(et)), ci = /* @__PURE__ */ o(() => {
|
|
1140
1140
|
}, "noop");
|
|
1141
|
-
function
|
|
1141
|
+
function pi(e, i) {
|
|
1142
1142
|
for (let t = 0; t < i.length; t++)
|
|
1143
1143
|
if (i[t].test(e)) return !0;
|
|
1144
1144
|
}
|
|
1145
|
-
o(
|
|
1145
|
+
o(pi, "isMatch");
|
|
1146
1146
|
function it(e, i) {
|
|
1147
|
-
let t = 0,
|
|
1148
|
-
e.charCodeAt(
|
|
1147
|
+
let t = 0, a, r = e.length - 1;
|
|
1148
|
+
e.charCodeAt(r) === 47 && (e = e.substring(0, r));
|
|
1149
1149
|
let n = [], s = `${e}/index`;
|
|
1150
1150
|
for (; t < i.length; t++)
|
|
1151
|
-
|
|
1151
|
+
a = i[t] ? `.${i[t]}` : "", e && n.push(e + a), n.push(s + a);
|
|
1152
1152
|
return n;
|
|
1153
1153
|
}
|
|
1154
1154
|
o(it, "toAssume");
|
|
1155
|
-
function
|
|
1156
|
-
let
|
|
1157
|
-
for (; r < n.length; r++)
|
|
1158
|
-
if (a = e[n[r]]) return a;
|
|
1159
|
-
}
|
|
1160
|
-
o(ci, "viaCache");
|
|
1161
|
-
function pi(e, i, t, r) {
|
|
1162
|
-
let a = 0, n = it(t, r), s, c, p, l;
|
|
1155
|
+
function mi(e, i, t) {
|
|
1156
|
+
let a = 0, r, n = it(i, t);
|
|
1163
1157
|
for (; a < n.length; a++)
|
|
1164
|
-
if (
|
|
1158
|
+
if (r = e[n[a]]) return r;
|
|
1159
|
+
}
|
|
1160
|
+
o(mi, "viaCache");
|
|
1161
|
+
function ui(e, i, t, a) {
|
|
1162
|
+
let r = 0, n = it(t, a), s, c, p, l;
|
|
1163
|
+
for (; r < n.length; r++)
|
|
1164
|
+
if (s = ri(ai(e, p = n[r])), s.startsWith(e) && ie.existsSync(s)) {
|
|
1165
1165
|
if (c = ie.statSync(s), c.isDirectory()) continue;
|
|
1166
|
-
return l =
|
|
1166
|
+
return l = at(p, c, i), l["Cache-Control"] = i ? "no-cache" : "no-store", { abs: s, stats: c, headers: l };
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
o(
|
|
1170
|
-
function
|
|
1169
|
+
o(ui, "viaLocal");
|
|
1170
|
+
function fi(e, i) {
|
|
1171
1171
|
return i.statusCode = 404, i.end();
|
|
1172
1172
|
}
|
|
1173
|
-
o(
|
|
1174
|
-
function
|
|
1173
|
+
o(fi, "is404");
|
|
1174
|
+
function di(e, i, t, a, r) {
|
|
1175
1175
|
let n = 200, s, c = {};
|
|
1176
|
-
|
|
1177
|
-
for (let p in
|
|
1178
|
-
s = i.getHeader(p), s && (
|
|
1179
|
-
if ((s = i.getHeader("content-type")) && (
|
|
1176
|
+
r = { ...r };
|
|
1177
|
+
for (let p in r)
|
|
1178
|
+
s = i.getHeader(p), s && (r[p] = s);
|
|
1179
|
+
if ((s = i.getHeader("content-type")) && (r["Content-Type"] = s), e.headers.range) {
|
|
1180
1180
|
n = 206;
|
|
1181
|
-
let [p, l] = e.headers.range.replace("bytes=", "").split("-"), u = c.end = parseInt(l, 10) ||
|
|
1181
|
+
let [p, l] = e.headers.range.replace("bytes=", "").split("-"), u = c.end = parseInt(l, 10) || a.size - 1, d = c.start = parseInt(p, 10) ||
|
|
1182
1182
|
0;
|
|
1183
|
-
if (u >=
|
|
1184
|
-
return i.setHeader("Content-Range", `bytes */${
|
|
1185
|
-
|
|
1183
|
+
if (u >= a.size && (u = a.size - 1), d >= a.size)
|
|
1184
|
+
return i.setHeader("Content-Range", `bytes */${a.size}`), i.statusCode = 416, i.end();
|
|
1185
|
+
r["Content-Range"] = `bytes ${d}-${u}/${a.size}`, r["Content-Length"] = u - d + 1, r["Accept-Ranges"] = "bytes";
|
|
1186
1186
|
}
|
|
1187
|
-
i.writeHead(n,
|
|
1187
|
+
i.writeHead(n, r), ie.createReadStream(t, c).pipe(i);
|
|
1188
1188
|
}
|
|
1189
|
-
o(
|
|
1190
|
-
var
|
|
1189
|
+
o(di, "send");
|
|
1190
|
+
var gi = {
|
|
1191
1191
|
".br": "br",
|
|
1192
1192
|
".gz": "gzip"
|
|
1193
1193
|
};
|
|
1194
|
-
function
|
|
1195
|
-
let
|
|
1196
|
-
|
|
1194
|
+
function at(e, i, t) {
|
|
1195
|
+
let a = gi[e.slice(-3)], r = li(e.slice(0, a && -3)) || "";
|
|
1196
|
+
r === "text/html" && (r += ";charset=utf-8");
|
|
1197
1197
|
let n = {
|
|
1198
1198
|
"Content-Length": i.size,
|
|
1199
|
-
"Content-Type":
|
|
1199
|
+
"Content-Type": r,
|
|
1200
1200
|
"Last-Modified": i.mtime.toUTCString()
|
|
1201
1201
|
};
|
|
1202
|
-
return
|
|
1202
|
+
return a && (n["Content-Encoding"] = a), t && (n.ETag = `W/"${i.size}-${i.mtime.getTime()}"`), n;
|
|
1203
1203
|
}
|
|
1204
|
-
o(
|
|
1205
|
-
|
|
1206
|
-
e =
|
|
1207
|
-
let t = i.onNoMatch ||
|
|
1208
|
-
s = i.brotli &&
|
|
1204
|
+
o(at, "toHeaders");
|
|
1205
|
+
rt.exports = function(e, i = {}) {
|
|
1206
|
+
e = ni(e || ".");
|
|
1207
|
+
let t = i.onNoMatch || fi, a = i.setHeaders || ci, r = i.extensions || ["html", "htm"], n = i.gzip && r.map((m) => `${m}.gz`).concat("gz"),
|
|
1208
|
+
s = i.brotli && r.map((m) => `${m}.br`).concat("br"), c = {}, p = "/", l = !!i.etag, u = !!i.single;
|
|
1209
1209
|
if (typeof i.single == "string") {
|
|
1210
1210
|
let m = i.single.lastIndexOf(".");
|
|
1211
1211
|
p += ~m ? i.single.substring(0, m) : i.single;
|
|
@@ -1216,51 +1216,51 @@ var nt = A((Nr, at) => {
|
|
|
1216
1216
|
d.push(new RegExp(m, "i"));
|
|
1217
1217
|
}));
|
|
1218
1218
|
let x = i.maxAge != null && `public,max-age=${i.maxAge}`;
|
|
1219
|
-
x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev ||
|
|
1219
|
+
x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev || oi(e, (m, f, y) => {
|
|
1220
1220
|
if (!/\.well-known[\\+\/]/.test(m)) {
|
|
1221
1221
|
if (!i.dotfiles && /(^\.|[\\+|\/+]\.)/.test(m)) return;
|
|
1222
1222
|
}
|
|
1223
|
-
let v =
|
|
1223
|
+
let v = at(m, y, l);
|
|
1224
1224
|
x && (v["Cache-Control"] = x), c["/" + m.normalize().replace(/\\+/g, "/")] = { abs: f, stats: y, headers: v };
|
|
1225
1225
|
});
|
|
1226
|
-
let g = i.dev ?
|
|
1226
|
+
let g = i.dev ? ui.bind(0, e, l) : mi.bind(0, c);
|
|
1227
1227
|
return function(m, f, y) {
|
|
1228
|
-
let v = [""], _ =
|
|
1229
|
-
if (n && O.includes("gzip") && v.unshift(...n), s && /(br|brotli)/i.test(O) && v.unshift(...s), v.push(...
|
|
1228
|
+
let v = [""], _ = si(m).pathname, O = m.headers["accept-encoding"] || "";
|
|
1229
|
+
if (n && O.includes("gzip") && v.unshift(...n), s && /(br|brotli)/i.test(O) && v.unshift(...s), v.push(...r), _.indexOf("%") !== -1)
|
|
1230
1230
|
try {
|
|
1231
1231
|
_ = decodeURI(_);
|
|
1232
1232
|
} catch {
|
|
1233
1233
|
}
|
|
1234
|
-
let w = g(_, v) || u && !
|
|
1234
|
+
let w = g(_, v) || u && !pi(_, d) && g(p, v);
|
|
1235
1235
|
if (!w) return y ? y() : t(m, f);
|
|
1236
1236
|
if (l && m.headers["if-none-match"] === w.headers.ETag)
|
|
1237
1237
|
return f.writeHead(304), f.end();
|
|
1238
|
-
(n || s) && f.setHeader("Vary", "Accept-Encoding"),
|
|
1238
|
+
(n || s) && f.setHeader("Vary", "Accept-Encoding"), a(f, _, w.stats), di(m, f, w.abs, w.stats, w.headers);
|
|
1239
1239
|
};
|
|
1240
1240
|
};
|
|
1241
1241
|
});
|
|
1242
1242
|
|
|
1243
1243
|
// ../node_modules/ejs/lib/utils.js
|
|
1244
|
-
var
|
|
1244
|
+
var lt = N((T) => {
|
|
1245
1245
|
"use strict";
|
|
1246
|
-
var
|
|
1247
|
-
return
|
|
1246
|
+
var xi = /[|\\{}()[\]^$+*?.]/g, hi = Object.prototype.hasOwnProperty, ae = /* @__PURE__ */ o(function(e, i) {
|
|
1247
|
+
return hi.apply(e, [i]);
|
|
1248
1248
|
}, "hasOwn");
|
|
1249
|
-
|
|
1250
|
-
return e ? String(e).replace(
|
|
1249
|
+
T.escapeRegExpChars = function(e) {
|
|
1250
|
+
return e ? String(e).replace(xi, "\\$&") : "";
|
|
1251
1251
|
};
|
|
1252
|
-
var
|
|
1252
|
+
var yi = {
|
|
1253
1253
|
"&": "&",
|
|
1254
1254
|
"<": "<",
|
|
1255
1255
|
">": ">",
|
|
1256
1256
|
'"': """,
|
|
1257
1257
|
"'": "'"
|
|
1258
|
-
},
|
|
1259
|
-
function
|
|
1260
|
-
return
|
|
1258
|
+
}, vi = /[&<>'"]/g;
|
|
1259
|
+
function wi(e) {
|
|
1260
|
+
return yi[e] || e;
|
|
1261
1261
|
}
|
|
1262
|
-
o(
|
|
1263
|
-
var
|
|
1262
|
+
o(wi, "encode_char");
|
|
1263
|
+
var bi = `var _ENCODE_HTML_RULES = {
|
|
1264
1264
|
"&": "&"
|
|
1265
1265
|
, "<": "<"
|
|
1266
1266
|
, ">": ">"
|
|
@@ -1272,38 +1272,38 @@ function encode_char(c) {
|
|
|
1272
1272
|
return _ENCODE_HTML_RULES[c] || c;
|
|
1273
1273
|
};
|
|
1274
1274
|
`;
|
|
1275
|
-
|
|
1276
|
-
return e == null ? "" : String(e).replace(
|
|
1275
|
+
T.escapeXML = function(e) {
|
|
1276
|
+
return e == null ? "" : String(e).replace(vi, wi);
|
|
1277
1277
|
};
|
|
1278
|
-
function
|
|
1278
|
+
function st() {
|
|
1279
1279
|
return Function.prototype.toString.call(this) + `;
|
|
1280
|
-
` +
|
|
1280
|
+
` + bi;
|
|
1281
1281
|
}
|
|
1282
|
-
o(
|
|
1282
|
+
o(st, "escapeXMLToString");
|
|
1283
1283
|
try {
|
|
1284
|
-
typeof Object.defineProperty == "function" ? Object.defineProperty(
|
|
1284
|
+
typeof Object.defineProperty == "function" ? Object.defineProperty(T.escapeXML, "toString", { value: st }) : T.escapeXML.toString = st;
|
|
1285
1285
|
} catch {
|
|
1286
1286
|
console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)");
|
|
1287
1287
|
}
|
|
1288
|
-
|
|
1288
|
+
T.shallowCopy = function(e, i) {
|
|
1289
1289
|
if (i = i || {}, e != null)
|
|
1290
1290
|
for (var t in i)
|
|
1291
|
-
|
|
1291
|
+
ae(i, t) && (t === "__proto__" || t === "constructor" || (e[t] = i[t]));
|
|
1292
1292
|
return e;
|
|
1293
1293
|
};
|
|
1294
|
-
|
|
1294
|
+
T.shallowCopyFromList = function(e, i, t) {
|
|
1295
1295
|
if (t = t || [], i = i || {}, e != null)
|
|
1296
|
-
for (var
|
|
1297
|
-
var
|
|
1298
|
-
if (typeof i[
|
|
1299
|
-
if (!
|
|
1296
|
+
for (var a = 0; a < t.length; a++) {
|
|
1297
|
+
var r = t[a];
|
|
1298
|
+
if (typeof i[r] < "u") {
|
|
1299
|
+
if (!ae(i, r) || r === "__proto__" || r === "constructor")
|
|
1300
1300
|
continue;
|
|
1301
|
-
e[
|
|
1301
|
+
e[r] = i[r];
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
1304
|
return e;
|
|
1305
1305
|
};
|
|
1306
|
-
|
|
1306
|
+
T.cache = {
|
|
1307
1307
|
_data: {},
|
|
1308
1308
|
set: /* @__PURE__ */ o(function(e, i) {
|
|
1309
1309
|
this._data[e] = i;
|
|
@@ -1318,12 +1318,12 @@ function encode_char(c) {
|
|
|
1318
1318
|
this._data = {};
|
|
1319
1319
|
}, "reset")
|
|
1320
1320
|
};
|
|
1321
|
-
|
|
1321
|
+
T.hyphenToCamel = function(e) {
|
|
1322
1322
|
return e.replace(/-[a-z]/g, function(i) {
|
|
1323
1323
|
return i[1].toUpperCase();
|
|
1324
1324
|
});
|
|
1325
1325
|
};
|
|
1326
|
-
|
|
1326
|
+
T.createNullProtoObjWherePossible = function() {
|
|
1327
1327
|
return typeof Object.create == "function" ? function() {
|
|
1328
1328
|
return /* @__PURE__ */ Object.create(null);
|
|
1329
1329
|
} : { __proto__: null } instanceof Object ? function() {
|
|
@@ -1332,17 +1332,17 @@ function encode_char(c) {
|
|
|
1332
1332
|
return { __proto__: null };
|
|
1333
1333
|
};
|
|
1334
1334
|
}();
|
|
1335
|
-
|
|
1336
|
-
var i =
|
|
1335
|
+
T.hasOwnOnlyObject = function(e) {
|
|
1336
|
+
var i = T.createNullProtoObjWherePossible();
|
|
1337
1337
|
for (var t in e)
|
|
1338
|
-
|
|
1338
|
+
ae(e, t) && (i[t] = e[t]);
|
|
1339
1339
|
return i;
|
|
1340
1340
|
};
|
|
1341
1341
|
});
|
|
1342
1342
|
|
|
1343
1343
|
// ../node_modules/ejs/package.json
|
|
1344
|
-
var
|
|
1345
|
-
|
|
1344
|
+
var ct = N(($a, _i) => {
|
|
1345
|
+
_i.exports = {
|
|
1346
1346
|
name: "ejs",
|
|
1347
1347
|
description: "Embedded JavaScript templates",
|
|
1348
1348
|
keywords: [
|
|
@@ -1387,10 +1387,10 @@ var lt = A((zr, wi) => {
|
|
|
1387
1387
|
});
|
|
1388
1388
|
|
|
1389
1389
|
// ../node_modules/ejs/lib/ejs.js
|
|
1390
|
-
var
|
|
1390
|
+
var yt = N((h) => {
|
|
1391
1391
|
"use strict";
|
|
1392
|
-
var ne =
|
|
1393
|
-
|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",
|
|
1392
|
+
var ne = P("fs"), D = P("path"), b = lt(), pt = !1, ji = ct().version, Oi = "<", Ei = ">", Si = "%", xt = "locals", Pi = "ejs", Ti = "(<%%\
|
|
1393
|
+
|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)", ht = [
|
|
1394
1394
|
"delimiter",
|
|
1395
1395
|
"scope",
|
|
1396
1396
|
"context",
|
|
@@ -1402,63 +1402,63 @@ var ht = A((h) => {
|
|
|
1402
1402
|
"strict",
|
|
1403
1403
|
"filename",
|
|
1404
1404
|
"async"
|
|
1405
|
-
],
|
|
1405
|
+
], Ri = ht.concat("cache"), mt = /^\uFEFF/, re = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
1406
1406
|
h.cache = b.cache;
|
|
1407
1407
|
h.fileLoader = ne.readFileSync;
|
|
1408
|
-
h.localsName =
|
|
1408
|
+
h.localsName = xt;
|
|
1409
1409
|
h.promiseImpl = new Function("return this;")().Promise;
|
|
1410
1410
|
h.resolveInclude = function(e, i, t) {
|
|
1411
|
-
var
|
|
1411
|
+
var a = D.dirname, r = D.extname, n = D.resolve, s = n(t ? i : a(i), e), c = r(e);
|
|
1412
1412
|
return c || (s += ".ejs"), s;
|
|
1413
1413
|
};
|
|
1414
|
-
function
|
|
1414
|
+
function ut(e, i) {
|
|
1415
1415
|
var t;
|
|
1416
|
-
if (i.some(function(
|
|
1417
|
-
return t = h.resolveInclude(e,
|
|
1416
|
+
if (i.some(function(a) {
|
|
1417
|
+
return t = h.resolveInclude(e, a, !0), ne.existsSync(t);
|
|
1418
1418
|
}))
|
|
1419
1419
|
return t;
|
|
1420
1420
|
}
|
|
1421
|
-
o(
|
|
1421
|
+
o(ut, "resolvePaths");
|
|
1422
1422
|
function ki(e, i) {
|
|
1423
|
-
var t,
|
|
1423
|
+
var t, a, r = i.views, n = /^[A-Za-z]+:\\|^\//.exec(e);
|
|
1424
1424
|
if (n && n.length)
|
|
1425
|
-
e = e.replace(/^\/*/, ""), Array.isArray(i.root) ? t =
|
|
1426
|
-
else if (i.filename && (
|
|
1425
|
+
e = e.replace(/^\/*/, ""), Array.isArray(i.root) ? t = ut(e, i.root) : t = h.resolveInclude(e, i.root || "/", !0);
|
|
1426
|
+
else if (i.filename && (a = h.resolveInclude(e, i.filename), ne.existsSync(a) && (t = a)), !t && Array.isArray(r) && (t = ut(e, r)), !t &&
|
|
1427
1427
|
typeof i.includer != "function")
|
|
1428
1428
|
throw new Error('Could not find the include file "' + i.escapeFunction(e) + '"');
|
|
1429
1429
|
return t;
|
|
1430
1430
|
}
|
|
1431
1431
|
o(ki, "getIncludePath");
|
|
1432
|
-
function
|
|
1433
|
-
var t,
|
|
1432
|
+
function I(e, i) {
|
|
1433
|
+
var t, a = e.filename, r = arguments.length > 1;
|
|
1434
1434
|
if (e.cache) {
|
|
1435
|
-
if (!
|
|
1435
|
+
if (!a)
|
|
1436
1436
|
throw new Error("cache option requires a filename");
|
|
1437
|
-
if (t = h.cache.get(
|
|
1437
|
+
if (t = h.cache.get(a), t)
|
|
1438
1438
|
return t;
|
|
1439
|
-
|
|
1440
|
-
} else if (!
|
|
1441
|
-
if (!
|
|
1439
|
+
r || (i = ft(a).toString().replace(mt, ""));
|
|
1440
|
+
} else if (!r) {
|
|
1441
|
+
if (!a)
|
|
1442
1442
|
throw new Error("Internal EJS error: no file name or template provided");
|
|
1443
|
-
i =
|
|
1443
|
+
i = ft(a).toString().replace(mt, "");
|
|
1444
1444
|
}
|
|
1445
|
-
return t = h.compile(i, e), e.cache && h.cache.set(
|
|
1445
|
+
return t = h.compile(i, e), e.cache && h.cache.set(a, t), t;
|
|
1446
1446
|
}
|
|
1447
|
-
o(
|
|
1448
|
-
function
|
|
1449
|
-
var
|
|
1447
|
+
o(I, "handleCache");
|
|
1448
|
+
function Fi(e, i, t) {
|
|
1449
|
+
var a;
|
|
1450
1450
|
if (t) {
|
|
1451
1451
|
try {
|
|
1452
|
-
|
|
1453
|
-
} catch (
|
|
1454
|
-
return t(
|
|
1452
|
+
a = I(e)(i);
|
|
1453
|
+
} catch (r) {
|
|
1454
|
+
return t(r);
|
|
1455
1455
|
}
|
|
1456
|
-
t(null,
|
|
1456
|
+
t(null, a);
|
|
1457
1457
|
} else {
|
|
1458
1458
|
if (typeof h.promiseImpl == "function")
|
|
1459
|
-
return new h.promiseImpl(function(
|
|
1459
|
+
return new h.promiseImpl(function(r, n) {
|
|
1460
1460
|
try {
|
|
1461
|
-
|
|
1461
|
+
a = I(e)(i), r(a);
|
|
1462
1462
|
} catch (s) {
|
|
1463
1463
|
n(s);
|
|
1464
1464
|
}
|
|
@@ -1466,66 +1466,66 @@ var ht = A((h) => {
|
|
|
1466
1466
|
throw new Error("Please provide a callback function");
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
|
-
o(
|
|
1470
|
-
function
|
|
1469
|
+
o(Fi, "tryHandleCache");
|
|
1470
|
+
function ft(e) {
|
|
1471
1471
|
return h.fileLoader(e);
|
|
1472
1472
|
}
|
|
1473
|
-
o(
|
|
1474
|
-
function
|
|
1473
|
+
o(ft, "fileLoader");
|
|
1474
|
+
function Li(e, i) {
|
|
1475
1475
|
var t = b.shallowCopy(b.createNullProtoObjWherePossible(), i);
|
|
1476
1476
|
if (t.filename = ki(e, t), typeof i.includer == "function") {
|
|
1477
|
-
var
|
|
1478
|
-
if (
|
|
1479
|
-
return
|
|
1477
|
+
var a = i.includer(e, t.filename);
|
|
1478
|
+
if (a && (a.filename && (t.filename = a.filename), a.template))
|
|
1479
|
+
return I(t, a.template);
|
|
1480
1480
|
}
|
|
1481
|
-
return
|
|
1481
|
+
return I(t);
|
|
1482
1482
|
}
|
|
1483
|
-
o(
|
|
1484
|
-
function
|
|
1483
|
+
o(Li, "includeFile");
|
|
1484
|
+
function dt(e, i, t, a, r) {
|
|
1485
1485
|
var n = i.split(`
|
|
1486
|
-
`), s = Math.max(
|
|
1486
|
+
`), s = Math.max(a - 3, 0), c = Math.min(n.length, a + 3), p = r(t), l = n.slice(s, c).map(function(u, d) {
|
|
1487
1487
|
var x = d + s + 1;
|
|
1488
|
-
return (x ==
|
|
1488
|
+
return (x == a ? " >> " : " ") + x + "| " + u;
|
|
1489
1489
|
}).join(`
|
|
1490
1490
|
`);
|
|
1491
|
-
throw e.path = p, e.message = (p || "ejs") + ":" +
|
|
1491
|
+
throw e.path = p, e.message = (p || "ejs") + ":" + a + `
|
|
1492
1492
|
` + l + `
|
|
1493
1493
|
|
|
1494
1494
|
` + e.message, e;
|
|
1495
1495
|
}
|
|
1496
|
-
o(
|
|
1497
|
-
function
|
|
1496
|
+
o(dt, "rethrow");
|
|
1497
|
+
function gt(e) {
|
|
1498
1498
|
return e.replace(/;(\s*$)/, "$1");
|
|
1499
1499
|
}
|
|
1500
|
-
o(
|
|
1500
|
+
o(gt, "stripSemi");
|
|
1501
1501
|
h.compile = /* @__PURE__ */ o(function(i, t) {
|
|
1502
|
-
var
|
|
1503
|
-
return t && t.scope && (
|
|
1504
|
-
t.scope), delete t.scope),
|
|
1502
|
+
var a;
|
|
1503
|
+
return t && t.scope && (pt || (console.warn("`scope` option is deprecated and will be removed in EJS 3"), pt = !0), t.context || (t.context =
|
|
1504
|
+
t.scope), delete t.scope), a = new j(i, t), a.compile();
|
|
1505
1505
|
}, "compile");
|
|
1506
1506
|
h.render = function(e, i, t) {
|
|
1507
|
-
var
|
|
1508
|
-
return arguments.length == 2 && b.shallowCopyFromList(
|
|
1507
|
+
var a = i || b.createNullProtoObjWherePossible(), r = t || b.createNullProtoObjWherePossible();
|
|
1508
|
+
return arguments.length == 2 && b.shallowCopyFromList(r, a, ht), I(r, e)(a);
|
|
1509
1509
|
};
|
|
1510
1510
|
h.renderFile = function() {
|
|
1511
|
-
var e = Array.prototype.slice.call(arguments), i = e.shift(), t,
|
|
1512
|
-
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (
|
|
1513
|
-
(
|
|
1514
|
-
ns"], n && b.shallowCopy(
|
|
1511
|
+
var e = Array.prototype.slice.call(arguments), i = e.shift(), t, a = { filename: i }, r, n;
|
|
1512
|
+
return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (r = e.shift(), e.length ? b.shallowCopy(a, e.pop()) :
|
|
1513
|
+
(r.settings && (r.settings.views && (a.views = r.settings.views), r.settings["view cache"] && (a.cache = !0), n = r.settings["view optio\
|
|
1514
|
+
ns"], n && b.shallowCopy(a, n)), b.shallowCopyFromList(a, r, Ri)), a.filename = i) : r = b.createNullProtoObjWherePossible(), Fi(a, r, t);
|
|
1515
1515
|
};
|
|
1516
1516
|
h.Template = j;
|
|
1517
1517
|
h.clearCache = function() {
|
|
1518
1518
|
h.cache.reset();
|
|
1519
1519
|
};
|
|
1520
1520
|
function j(e, i) {
|
|
1521
|
-
var t = b.hasOwnOnlyObject(i),
|
|
1522
|
-
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "",
|
|
1523
|
-
t.escape || t.escapeFunction || b.escapeXML,
|
|
1524
|
-
t.openDelimiter || h.openDelimiter ||
|
|
1525
|
-
delimiter ||
|
|
1526
|
-
root,
|
|
1527
|
-
t.views,
|
|
1528
|
-
!0,
|
|
1521
|
+
var t = b.hasOwnOnlyObject(i), a = b.createNullProtoObjWherePossible();
|
|
1522
|
+
this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "", a.client = t.client || !1, a.escapeFunction =
|
|
1523
|
+
t.escape || t.escapeFunction || b.escapeXML, a.compileDebug = t.compileDebug !== !1, a.debug = !!t.debug, a.filename = t.filename, a.openDelimiter =
|
|
1524
|
+
t.openDelimiter || h.openDelimiter || Oi, a.closeDelimiter = t.closeDelimiter || h.closeDelimiter || Ei, a.delimiter = t.delimiter || h.
|
|
1525
|
+
delimiter || Si, a.strict = t.strict || !1, a.context = t.context, a.cache = t.cache || !1, a.rmWhitespace = t.rmWhitespace, a.root = t.
|
|
1526
|
+
root, a.includer = t.includer, a.outputFunctionName = t.outputFunctionName, a.localsName = t.localsName || h.localsName || xt, a.views =
|
|
1527
|
+
t.views, a.async = t.async, a.destructuredLocals = t.destructuredLocals, a.legacyInclude = typeof t.legacyInclude < "u" ? !!t.legacyInclude :
|
|
1528
|
+
!0, a.strict ? a._with = !1 : a._with = typeof t._with < "u" ? t._with : !0, this.opts = a, this.regex = this.createRegex();
|
|
1529
1529
|
}
|
|
1530
1530
|
o(j, "Template");
|
|
1531
1531
|
j.modes = {
|
|
@@ -1537,39 +1537,39 @@ ns"], n && b.shallowCopy(r, n)), b.shallowCopyFromList(r, a, Si)), r.filename =
|
|
|
1537
1537
|
};
|
|
1538
1538
|
j.prototype = {
|
|
1539
1539
|
createRegex: /* @__PURE__ */ o(function() {
|
|
1540
|
-
var e =
|
|
1540
|
+
var e = Ti, i = b.escapeRegExpChars(this.opts.delimiter), t = b.escapeRegExpChars(this.opts.openDelimiter), a = b.escapeRegExpChars(this.
|
|
1541
1541
|
opts.closeDelimiter);
|
|
1542
|
-
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g,
|
|
1542
|
+
return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g, a), new RegExp(e);
|
|
1543
1543
|
}, "createRegex"),
|
|
1544
1544
|
compile: /* @__PURE__ */ o(function() {
|
|
1545
|
-
var e, i, t = this.opts,
|
|
1545
|
+
var e, i, t = this.opts, a = "", r = "", n = t.escapeFunction, s, c = t.filename ? JSON.stringify(t.filename) : "undefined";
|
|
1546
1546
|
if (!this.source) {
|
|
1547
|
-
if (this.generateSource(),
|
|
1547
|
+
if (this.generateSource(), a += ` var __output = "";
|
|
1548
1548
|
function __append(s) { if (s !== undefined && s !== null) __output += s }
|
|
1549
1549
|
`, t.outputFunctionName) {
|
|
1550
|
-
if (!
|
|
1550
|
+
if (!re.test(t.outputFunctionName))
|
|
1551
1551
|
throw new Error("outputFunctionName is not a valid JS identifier.");
|
|
1552
|
-
|
|
1552
|
+
a += " var " + t.outputFunctionName + ` = __append;
|
|
1553
1553
|
`;
|
|
1554
1554
|
}
|
|
1555
|
-
if (t.localsName && !
|
|
1555
|
+
if (t.localsName && !re.test(t.localsName))
|
|
1556
1556
|
throw new Error("localsName is not a valid JS identifier.");
|
|
1557
1557
|
if (t.destructuredLocals && t.destructuredLocals.length) {
|
|
1558
1558
|
for (var p = " var __locals = (" + t.localsName + ` || {}),
|
|
1559
1559
|
`, l = 0; l < t.destructuredLocals.length; l++) {
|
|
1560
1560
|
var u = t.destructuredLocals[l];
|
|
1561
|
-
if (!
|
|
1561
|
+
if (!re.test(u))
|
|
1562
1562
|
throw new Error("destructuredLocals[" + l + "] is not a valid JS identifier.");
|
|
1563
1563
|
l > 0 && (p += `,
|
|
1564
1564
|
`), p += u + " = __locals." + u;
|
|
1565
1565
|
}
|
|
1566
|
-
|
|
1566
|
+
a += p + `;
|
|
1567
1567
|
`;
|
|
1568
1568
|
}
|
|
1569
|
-
t._with !== !1 && (
|
|
1570
|
-
`,
|
|
1571
|
-
`),
|
|
1572
|
-
`, this.source =
|
|
1569
|
+
t._with !== !1 && (a += " with (" + t.localsName + ` || {}) {
|
|
1570
|
+
`, r += ` }
|
|
1571
|
+
`), r += ` return __output;
|
|
1572
|
+
`, this.source = a + this.source + r;
|
|
1573
1573
|
}
|
|
1574
1574
|
t.compileDebug ? e = `var __line = 1
|
|
1575
1575
|
, __lines = ` + JSON.stringify(this.templateText) + `
|
|
@@ -1579,7 +1579,7 @@ try {
|
|
|
1579
1579
|
rethrow(e, __lines, __filename, __line, escapeFn);
|
|
1580
1580
|
}
|
|
1581
1581
|
` : e = this.source, t.client && (e = "escapeFn = escapeFn || " + n.toString() + `;
|
|
1582
|
-
` + e, t.compileDebug && (e = "rethrow = rethrow || " +
|
|
1582
|
+
` + e, t.compileDebug && (e = "rethrow = rethrow || " + dt.toString() + `;
|
|
1583
1583
|
` + e)), t.strict && (e = `"use strict";
|
|
1584
1584
|
` + e), t.debug && console.log(e), t.compileDebug && t.filename && (e = e + `
|
|
1585
1585
|
//# sourceURL=` + c + `
|
|
@@ -1604,15 +1604,15 @@ try {
|
|
|
1604
1604
|
var d = t.client ? i : /* @__PURE__ */ o(function(f) {
|
|
1605
1605
|
var y = /* @__PURE__ */ o(function(v, _) {
|
|
1606
1606
|
var O = b.shallowCopy(b.createNullProtoObjWherePossible(), f);
|
|
1607
|
-
return _ && (O = b.shallowCopy(O, _)),
|
|
1607
|
+
return _ && (O = b.shallowCopy(O, _)), Li(v, t)(O);
|
|
1608
1608
|
}, "include");
|
|
1609
1609
|
return i.apply(
|
|
1610
1610
|
t.context,
|
|
1611
|
-
[f || b.createNullProtoObjWherePossible(), n, y,
|
|
1611
|
+
[f || b.createNullProtoObjWherePossible(), n, y, dt]
|
|
1612
1612
|
);
|
|
1613
1613
|
}, "anonymous");
|
|
1614
1614
|
if (t.filename && typeof Object.defineProperty == "function") {
|
|
1615
|
-
var x = t.filename, g =
|
|
1615
|
+
var x = t.filename, g = D.basename(x, D.extname(x));
|
|
1616
1616
|
try {
|
|
1617
1617
|
Object.defineProperty(d, "name", {
|
|
1618
1618
|
value: g,
|
|
@@ -1629,18 +1629,18 @@ try {
|
|
|
1629
1629
|
var e = this.opts;
|
|
1630
1630
|
e.rmWhitespace && (this.templateText = this.templateText.replace(/[\r\n]+/g, `
|
|
1631
1631
|
`).replace(/^\s+|\s+$/gm, "")), this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
|
|
1632
|
-
var i = this, t = this.parseTemplateText(),
|
|
1632
|
+
var i = this, t = this.parseTemplateText(), a = this.opts.delimiter, r = this.opts.openDelimiter, n = this.opts.closeDelimiter;
|
|
1633
1633
|
t && t.length && t.forEach(function(s, c) {
|
|
1634
1634
|
var p;
|
|
1635
|
-
if (s.indexOf(
|
|
1635
|
+
if (s.indexOf(r + a) === 0 && s.indexOf(r + a + a) !== 0 && (p = t[c + 2], !(p == a + n || p == "-" + a + n || p == "_" + a + n)))
|
|
1636
1636
|
throw new Error('Could not find matching close tag for "' + s + '".');
|
|
1637
1637
|
i.scanLine(s);
|
|
1638
1638
|
});
|
|
1639
1639
|
}, "generateSource"),
|
|
1640
1640
|
parseTemplateText: /* @__PURE__ */ o(function() {
|
|
1641
|
-
for (var e = this.templateText, i = this.regex, t = i.exec(e),
|
|
1642
|
-
|
|
1643
|
-
return e &&
|
|
1641
|
+
for (var e = this.templateText, i = this.regex, t = i.exec(e), a = [], r; t; )
|
|
1642
|
+
r = t.index, r !== 0 && (a.push(e.substring(0, r)), e = e.slice(r)), a.push(t[0]), e = e.slice(t[0].length), t = i.exec(e);
|
|
1643
|
+
return e && a.push(e), a;
|
|
1644
1644
|
}, "parseTemplateText"),
|
|
1645
1645
|
_addOutput: /* @__PURE__ */ o(function(e) {
|
|
1646
1646
|
if (this.truncate && (e = e.replace(/^(?:\r\n|\r|\n)/, ""), this.truncate = !1), !e)
|
|
@@ -1650,33 +1650,33 @@ try {
|
|
|
1650
1650
|
`;
|
|
1651
1651
|
}, "_addOutput"),
|
|
1652
1652
|
scanLine: /* @__PURE__ */ o(function(e) {
|
|
1653
|
-
var i = this, t = this.opts.delimiter,
|
|
1653
|
+
var i = this, t = this.opts.delimiter, a = this.opts.openDelimiter, r = this.opts.closeDelimiter, n = 0;
|
|
1654
1654
|
switch (n = e.split(`
|
|
1655
1655
|
`).length - 1, e) {
|
|
1656
|
-
case
|
|
1657
|
-
case
|
|
1656
|
+
case a + t:
|
|
1657
|
+
case a + t + "_":
|
|
1658
1658
|
this.mode = j.modes.EVAL;
|
|
1659
1659
|
break;
|
|
1660
|
-
case
|
|
1660
|
+
case a + t + "=":
|
|
1661
1661
|
this.mode = j.modes.ESCAPED;
|
|
1662
1662
|
break;
|
|
1663
|
-
case
|
|
1663
|
+
case a + t + "-":
|
|
1664
1664
|
this.mode = j.modes.RAW;
|
|
1665
1665
|
break;
|
|
1666
|
-
case
|
|
1666
|
+
case a + t + "#":
|
|
1667
1667
|
this.mode = j.modes.COMMENT;
|
|
1668
1668
|
break;
|
|
1669
|
-
case
|
|
1670
|
-
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(
|
|
1669
|
+
case a + t + t:
|
|
1670
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(a + t + t, a + t) + `")
|
|
1671
1671
|
`;
|
|
1672
1672
|
break;
|
|
1673
|
-
case t + t +
|
|
1674
|
-
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t +
|
|
1673
|
+
case t + t + r:
|
|
1674
|
+
this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t + r, t + r) + `")
|
|
1675
1675
|
`;
|
|
1676
1676
|
break;
|
|
1677
|
-
case t +
|
|
1678
|
-
case "-" + t +
|
|
1679
|
-
case "_" + t +
|
|
1677
|
+
case t + r:
|
|
1678
|
+
case "-" + t + r:
|
|
1679
|
+
case "_" + t + r:
|
|
1680
1680
|
this.mode == j.modes.LITERAL && this._addOutput(e), this.mode = null, this.truncate = e.indexOf("-") === 0 || e.indexOf("_") === 0;
|
|
1681
1681
|
break;
|
|
1682
1682
|
default:
|
|
@@ -1697,12 +1697,12 @@ try {
|
|
|
1697
1697
|
break;
|
|
1698
1698
|
// Exec, esc, and output
|
|
1699
1699
|
case j.modes.ESCAPED:
|
|
1700
|
-
this.source += " ; __append(escapeFn(" +
|
|
1700
|
+
this.source += " ; __append(escapeFn(" + gt(e) + `))
|
|
1701
1701
|
`;
|
|
1702
1702
|
break;
|
|
1703
1703
|
// Exec and output
|
|
1704
1704
|
case j.modes.RAW:
|
|
1705
|
-
this.source += " ; __append(" +
|
|
1705
|
+
this.source += " ; __append(" + gt(e) + `)
|
|
1706
1706
|
`;
|
|
1707
1707
|
break;
|
|
1708
1708
|
case j.modes.COMMENT:
|
|
@@ -1721,16 +1721,16 @@ try {
|
|
|
1721
1721
|
};
|
|
1722
1722
|
h.escapeXML = b.escapeXML;
|
|
1723
1723
|
h.__express = h.renderFile;
|
|
1724
|
-
h.VERSION =
|
|
1725
|
-
h.name =
|
|
1724
|
+
h.VERSION = ji;
|
|
1725
|
+
h.name = Pi;
|
|
1726
1726
|
typeof window < "u" && (window.ejs = h);
|
|
1727
1727
|
});
|
|
1728
1728
|
|
|
1729
1729
|
// src/builder-manager/index.ts
|
|
1730
|
-
import { cp as
|
|
1731
|
-
import { dirname as
|
|
1732
|
-
import { stringifyProcessEnvs as
|
|
1733
|
-
import { globalsModuleInfoMap as
|
|
1730
|
+
import { cp as ra, rm as na, writeFile as kt } from "node:fs/promises";
|
|
1731
|
+
import { dirname as Ft, join as k, parse as oa } from "node:path";
|
|
1732
|
+
import { stringifyProcessEnvs as sa } from "storybook/internal/common";
|
|
1733
|
+
import { globalsModuleInfoMap as la } from "storybook/internal/manager/globals-module-info";
|
|
1734
1734
|
import { logger as me } from "storybook/internal/node-logger";
|
|
1735
1735
|
|
|
1736
1736
|
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/module-info.js
|
|
@@ -1738,29 +1738,29 @@ var de = /* @__PURE__ */ o((e) => {
|
|
|
1738
1738
|
let {
|
|
1739
1739
|
type: i = "esm",
|
|
1740
1740
|
varName: t,
|
|
1741
|
-
namedExports:
|
|
1742
|
-
defaultExport:
|
|
1741
|
+
namedExports: a = null,
|
|
1742
|
+
defaultExport: r = !0
|
|
1743
1743
|
} = typeof e == "string" ? { varName: e } : e;
|
|
1744
|
-
return { type: i, varName: t, namedExports:
|
|
1744
|
+
return { type: i, varName: t, namedExports: a, defaultExport: r };
|
|
1745
1745
|
}, "normalizeModuleInfo");
|
|
1746
1746
|
|
|
1747
1747
|
// ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/on-load.js
|
|
1748
|
-
var
|
|
1749
|
-
var
|
|
1750
|
-
let
|
|
1748
|
+
var Mt = /* @__PURE__ */ o((e) => `module.exports = ${e};`, "createCjsContents");
|
|
1749
|
+
var zt = /* @__PURE__ */ o((e, i, t) => {
|
|
1750
|
+
let a = t ? [`export default ${e};`] : [];
|
|
1751
1751
|
if (i && i.length) {
|
|
1752
|
-
let
|
|
1753
|
-
|
|
1752
|
+
let r = [...new Set(i)].join(", ");
|
|
1753
|
+
a.push(`const { ${r} } = ${e};`), a.push(`export { ${r} };`);
|
|
1754
1754
|
}
|
|
1755
|
-
return
|
|
1755
|
+
return a.join(`
|
|
1756
1756
|
`);
|
|
1757
1757
|
}, "createEsmContents"), ge = /* @__PURE__ */ o((e) => {
|
|
1758
|
-
let { type: i, varName: t, namedExports:
|
|
1758
|
+
let { type: i, varName: t, namedExports: a, defaultExport: r } = e;
|
|
1759
1759
|
switch (i) {
|
|
1760
1760
|
case "esm":
|
|
1761
|
-
return
|
|
1761
|
+
return zt(t, a, r);
|
|
1762
1762
|
case "cjs":
|
|
1763
|
-
return
|
|
1763
|
+
return Mt(t);
|
|
1764
1764
|
}
|
|
1765
1765
|
}, "createContents");
|
|
1766
1766
|
|
|
@@ -1769,12 +1769,12 @@ var X = "global-externals", K = /* @__PURE__ */ o((e) => {
|
|
|
1769
1769
|
let { modulePathFilter: i, getModuleInfo: t } = e;
|
|
1770
1770
|
return {
|
|
1771
1771
|
name: X,
|
|
1772
|
-
setup(
|
|
1773
|
-
|
|
1774
|
-
path:
|
|
1772
|
+
setup(a) {
|
|
1773
|
+
a.onResolve({ filter: i }, (r) => ({
|
|
1774
|
+
path: r.path,
|
|
1775
1775
|
namespace: X
|
|
1776
|
-
})),
|
|
1777
|
-
let n =
|
|
1776
|
+
})), a.onLoad({ filter: /.*/, namespace: X }, (r) => {
|
|
1777
|
+
let n = r.path, s = de(t(n));
|
|
1778
1778
|
return { contents: ge(s) };
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
@@ -1791,29 +1791,39 @@ var Z = /* @__PURE__ */ o((e) => {
|
|
|
1791
1791
|
}, "globalExternals");
|
|
1792
1792
|
|
|
1793
1793
|
// src/builder-manager/index.ts
|
|
1794
|
-
var
|
|
1794
|
+
var Lt = V(Ge(), 1), ue = V(nt(), 1);
|
|
1795
|
+
|
|
1796
|
+
// src/shared/constants/environments-support.ts
|
|
1797
|
+
var ot = [
|
|
1798
|
+
"chrome131",
|
|
1799
|
+
"edge134",
|
|
1800
|
+
"firefox136",
|
|
1801
|
+
"safari18.3",
|
|
1802
|
+
"ios18.3",
|
|
1803
|
+
"opera117"
|
|
1804
|
+
];
|
|
1795
1805
|
|
|
1796
1806
|
// src/builder-manager/utils/data.ts
|
|
1797
|
-
import { basename as
|
|
1798
|
-
import { getRefs as
|
|
1807
|
+
import { basename as Di } from "node:path";
|
|
1808
|
+
import { getRefs as Ii } from "storybook/internal/common";
|
|
1799
1809
|
|
|
1800
1810
|
// src/builder-manager/utils/template.ts
|
|
1801
|
-
var
|
|
1802
|
-
import { readFile as
|
|
1803
|
-
import { dirname as
|
|
1804
|
-
var oe = /* @__PURE__ */ o(async (e) =>
|
|
1811
|
+
var vt = V(yt(), 1);
|
|
1812
|
+
import { readFile as Ci } from "node:fs/promises";
|
|
1813
|
+
import { dirname as Ai, join as Ni } from "node:path";
|
|
1814
|
+
var oe = /* @__PURE__ */ o(async (e) => Ni(Ai(P.resolve("storybook/package.json")), "assets/server", e), "getTemplatePath"), wt = /* @__PURE__ */ o(
|
|
1805
1815
|
async (e) => {
|
|
1806
1816
|
let i = await oe(e);
|
|
1807
|
-
return
|
|
1817
|
+
return Ci(i, { encoding: "utf8" });
|
|
1808
1818
|
}, "readTemplate");
|
|
1809
|
-
var se = /* @__PURE__ */ o(async (e, i, t,
|
|
1819
|
+
var se = /* @__PURE__ */ o(async (e, i, t, a, r, n, s, c, p, l, u, { versionCheck: d, previewUrl: x, configType: g, ignorePreview: m }, f) => {
|
|
1810
1820
|
let y = await i, v = await e, _ = Object.entries(f).reduce(
|
|
1811
1821
|
(O, [w, E]) => ({ ...O, [w]: JSON.stringify(E) }),
|
|
1812
1822
|
{}
|
|
1813
1823
|
);
|
|
1814
|
-
return (0,
|
|
1824
|
+
return (0, vt.render)(v, {
|
|
1815
1825
|
title: y ? `${y} - Storybook` : "Storybook",
|
|
1816
|
-
files: { js: n, css:
|
|
1826
|
+
files: { js: n, css: r },
|
|
1817
1827
|
favicon: await t,
|
|
1818
1828
|
globals: {
|
|
1819
1829
|
FEATURES: JSON.stringify(await s, null, 2),
|
|
@@ -1828,137 +1838,137 @@ var se = /* @__PURE__ */ o(async (e, i, t, r, a, n, s, c, p, l, u, { versionChec
|
|
|
1828
1838
|
TAGS_OPTIONS: JSON.stringify(await u, null, 2),
|
|
1829
1839
|
..._
|
|
1830
1840
|
},
|
|
1831
|
-
head: await
|
|
1841
|
+
head: await a || "",
|
|
1832
1842
|
ignorePreview: m
|
|
1833
1843
|
});
|
|
1834
1844
|
}, "renderHTML");
|
|
1835
1845
|
|
|
1836
1846
|
// src/builder-manager/utils/data.ts
|
|
1837
1847
|
var le = /* @__PURE__ */ o(async (e) => {
|
|
1838
|
-
let i =
|
|
1839
|
-
presets.apply("title"), s = e.presets.apply("docs", {}), c = e.presets.apply("tags", {}), p =
|
|
1848
|
+
let i = Ii(e), t = e.presets.apply("favicon").then((x) => Di(x)), a = e.presets.apply("features"), r = e.presets.apply("logLevel"), n = e.
|
|
1849
|
+
presets.apply("title"), s = e.presets.apply("docs", {}), c = e.presets.apply("tags", {}), p = wt("template.ejs"), l = e.presets.apply("man\
|
|
1840
1850
|
agerHead"), [u, d] = await Promise.all([
|
|
1841
1851
|
//
|
|
1842
|
-
|
|
1843
|
-
|
|
1852
|
+
_t.get(),
|
|
1853
|
+
bt(e)
|
|
1844
1854
|
]);
|
|
1845
1855
|
return {
|
|
1846
1856
|
refs: i,
|
|
1847
|
-
features:
|
|
1857
|
+
features: a,
|
|
1848
1858
|
title: n,
|
|
1849
1859
|
docsOptions: s,
|
|
1850
1860
|
template: p,
|
|
1851
1861
|
customHead: l,
|
|
1852
1862
|
instance: u,
|
|
1853
1863
|
config: d,
|
|
1854
|
-
logLevel:
|
|
1864
|
+
logLevel: r,
|
|
1855
1865
|
favicon: t,
|
|
1856
1866
|
tagsOptions: c
|
|
1857
1867
|
};
|
|
1858
1868
|
}, "getData");
|
|
1859
1869
|
|
|
1860
1870
|
// src/builder-manager/utils/files.ts
|
|
1861
|
-
import { existsSync as
|
|
1862
|
-
import { mkdir as
|
|
1863
|
-
import { dirname as
|
|
1871
|
+
import { existsSync as Mi } from "node:fs";
|
|
1872
|
+
import { mkdir as zi, writeFile as qi } from "node:fs/promises";
|
|
1873
|
+
import { dirname as $i, join as Wi, normalize as Bi } from "node:path";
|
|
1864
1874
|
|
|
1865
1875
|
// ../node_modules/slash/index.js
|
|
1866
|
-
function
|
|
1876
|
+
function M(e) {
|
|
1867
1877
|
return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
|
|
1868
1878
|
}
|
|
1869
|
-
o(
|
|
1879
|
+
o(M, "slash");
|
|
1870
1880
|
|
|
1871
1881
|
// src/builder-manager/utils/files.ts
|
|
1872
1882
|
async function ce(e, i) {
|
|
1873
1883
|
let t = await Promise.all(
|
|
1874
1884
|
i?.map(async (n) => {
|
|
1875
|
-
let { location: s, url: c } =
|
|
1876
|
-
if (!
|
|
1877
|
-
let p =
|
|
1878
|
-
await
|
|
1885
|
+
let { location: s, url: c } = Hi(n, e);
|
|
1886
|
+
if (!Mi(s)) {
|
|
1887
|
+
let p = $i(s);
|
|
1888
|
+
await zi(p, { recursive: !0 });
|
|
1879
1889
|
}
|
|
1880
|
-
return await
|
|
1890
|
+
return await qi(s, n.contents), c;
|
|
1881
1891
|
}) || []
|
|
1882
|
-
),
|
|
1883
|
-
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles:
|
|
1892
|
+
), a = t.filter((n) => n.endsWith(".js"));
|
|
1893
|
+
return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles: a };
|
|
1884
1894
|
}
|
|
1885
1895
|
o(ce, "readOrderedFiles");
|
|
1886
|
-
function
|
|
1887
|
-
let t = e.path.replace(i, ""),
|
|
1888
|
-
return { location:
|
|
1896
|
+
function Hi(e, i) {
|
|
1897
|
+
let t = e.path.replace(i, ""), a = Bi(Wi(i, t)), r = `./sb-addons${M(t).split("/").map(encodeURIComponent).join("/")}`;
|
|
1898
|
+
return { location: a, url: r };
|
|
1889
1899
|
}
|
|
1890
|
-
o(
|
|
1900
|
+
o(Hi, "sanitizePath");
|
|
1891
1901
|
|
|
1892
1902
|
// src/builder-manager/utils/framework.ts
|
|
1893
|
-
import { sep as
|
|
1903
|
+
import { sep as Ji } from "node:path";
|
|
1894
1904
|
import {
|
|
1895
|
-
extractProperRendererNameFromFramework as
|
|
1896
|
-
getFrameworkName as
|
|
1905
|
+
extractProperRendererNameFromFramework as jt,
|
|
1906
|
+
getFrameworkName as Gi
|
|
1897
1907
|
} from "storybook/internal/common";
|
|
1898
|
-
var
|
|
1908
|
+
var Ot = /* @__PURE__ */ o((e) => {
|
|
1899
1909
|
if (e)
|
|
1900
1910
|
return typeof e == "string" ? e : e.name;
|
|
1901
|
-
}, "pluckNameFromConfigProperty"),
|
|
1902
|
-
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"),
|
|
1911
|
+
}, "pluckNameFromConfigProperty"), Et = /* @__PURE__ */ o((e) => e.replaceAll(Ji, "/"), "normalizePath"), Ui = /* @__PURE__ */ o((e) => Et(e).
|
|
1912
|
+
match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"), Vi = /* @__PURE__ */ o((e) => Et(e).split("node_modules/")[1] ?? e, "pluc\
|
|
1903
1913
|
kThirdPartyPackageFromPath"), pe = /* @__PURE__ */ o(async (e) => {
|
|
1904
|
-
let i = {}, { builder: t } = await e.presets.apply("core"),
|
|
1905
|
-
await
|
|
1906
|
-
let n =
|
|
1907
|
-
n && (i.STORYBOOK_BUILDER =
|
|
1908
|
-
let s =
|
|
1914
|
+
let i = {}, { builder: t } = await e.presets.apply("core"), a = await Gi(e);
|
|
1915
|
+
await jt(a) && (i.STORYBOOK_RENDERER = await jt(a) ?? void 0);
|
|
1916
|
+
let n = Ot(t);
|
|
1917
|
+
n && (i.STORYBOOK_BUILDER = Ui(n) ?? Vi(n));
|
|
1918
|
+
let s = Ot(await e.presets.apply("framework"));
|
|
1909
1919
|
return s && (i.STORYBOOK_FRAMEWORK = s), i;
|
|
1910
1920
|
}, "buildFrameworkGlobalsFromOptions");
|
|
1911
1921
|
|
|
1912
1922
|
// src/builder-manager/utils/managerEntries.ts
|
|
1913
|
-
import { existsSync as
|
|
1914
|
-
import { mkdir as
|
|
1915
|
-
import { dirname as
|
|
1916
|
-
import { resolvePathInStorybookCache as
|
|
1917
|
-
var Pt = /* @__PURE__ */ o((e) => e.replaceAll(".", "").replaceAll("@", "").replaceAll(
|
|
1918
|
-
""), "sanitizeBase"),
|
|
1923
|
+
import { existsSync as Xi } from "node:fs";
|
|
1924
|
+
import { mkdir as Ki, writeFile as Zi } from "node:fs/promises";
|
|
1925
|
+
import { dirname as Yi, join as St, parse as Qi, relative as ea, sep as ta } from "node:path";
|
|
1926
|
+
import { resolvePathInStorybookCache as ia } from "storybook/internal/common";
|
|
1927
|
+
var Pt = /* @__PURE__ */ o((e) => e.replaceAll(".", "").replaceAll("@", "").replaceAll(ta, "-").replaceAll("/", "-").replaceAll(new RegExp(/^(-)+/g),
|
|
1928
|
+
""), "sanitizeBase"), aa = /* @__PURE__ */ o((e) => {
|
|
1919
1929
|
let i = e.split(/-?node_modules-?/);
|
|
1920
1930
|
return i[i.length - 1].replaceAll("storybook-addon-", "").replaceAll("dist-", "");
|
|
1921
1931
|
}, "sanitizeFinal");
|
|
1922
|
-
async function
|
|
1932
|
+
async function Tt(e, i) {
|
|
1923
1933
|
return Promise.all(
|
|
1924
|
-
e.map(async (t,
|
|
1925
|
-
let { name:
|
|
1934
|
+
e.map(async (t, a) => {
|
|
1935
|
+
let { name: r, dir: n } = Qi(t), s = ia("sb-manager", i);
|
|
1926
1936
|
if (!s)
|
|
1927
1937
|
throw new Error("Could not create/find cache directory");
|
|
1928
|
-
let c =
|
|
1938
|
+
let c = ea(process.cwd(), n), p = St(
|
|
1929
1939
|
s,
|
|
1930
|
-
|
|
1940
|
+
aa(St(`${Pt(c)}-${a}`, `${Pt(r)}-bundle.js`))
|
|
1931
1941
|
);
|
|
1932
|
-
if (!
|
|
1933
|
-
let l =
|
|
1934
|
-
await
|
|
1942
|
+
if (!Xi(p)) {
|
|
1943
|
+
let l = Yi(p);
|
|
1944
|
+
await Ki(l, { recursive: !0 });
|
|
1935
1945
|
}
|
|
1936
|
-
return await
|
|
1946
|
+
return await Zi(p, `import '${M(t).replaceAll(/'/g, "\\'")}';`), p;
|
|
1937
1947
|
})
|
|
1938
1948
|
);
|
|
1939
1949
|
}
|
|
1940
|
-
o(
|
|
1950
|
+
o(Tt, "wrapManagerEntries");
|
|
1941
1951
|
|
|
1942
1952
|
// src/builder-manager/utils/safeResolve.ts
|
|
1943
|
-
var
|
|
1953
|
+
var Rt = /* @__PURE__ */ o((e) => {
|
|
1944
1954
|
try {
|
|
1945
|
-
return Promise.resolve(
|
|
1955
|
+
return Promise.resolve(P.resolve(e));
|
|
1946
1956
|
} catch {
|
|
1947
1957
|
return Promise.resolve(!1);
|
|
1948
1958
|
}
|
|
1949
1959
|
}, "safeResolve");
|
|
1950
1960
|
|
|
1951
1961
|
// src/builder-manager/index.ts
|
|
1952
|
-
var
|
|
1953
|
-
let [i, t,
|
|
1962
|
+
var ca = /^\/($|\?)/, L, C, bt = /* @__PURE__ */ o(async (e) => {
|
|
1963
|
+
let [i, t, a, r] = await Promise.all([
|
|
1954
1964
|
e.presets.apply("managerEntries", []),
|
|
1955
|
-
|
|
1965
|
+
Rt(k(e.configDir, "manager")),
|
|
1956
1966
|
oe("addon.tsconfig.json"),
|
|
1957
1967
|
e.presets.apply("env")
|
|
1958
1968
|
]), n = t ? [...i, t] : i;
|
|
1959
1969
|
return {
|
|
1960
|
-
entryPoints: await
|
|
1961
|
-
outdir:
|
|
1970
|
+
entryPoints: await Tt(n, e.cacheKey),
|
|
1971
|
+
outdir: k(e.outputDir || "./", "sb-addons"),
|
|
1962
1972
|
format: "iife",
|
|
1963
1973
|
write: !1,
|
|
1964
1974
|
ignoreAnnotations: !0,
|
|
@@ -1982,19 +1992,24 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
1982
1992
|
".eot": "dataurl",
|
|
1983
1993
|
".ttf": "dataurl"
|
|
1984
1994
|
},
|
|
1985
|
-
target:
|
|
1995
|
+
target: ot,
|
|
1986
1996
|
platform: "browser",
|
|
1987
1997
|
bundle: !0,
|
|
1988
|
-
minify: !
|
|
1998
|
+
minify: !1,
|
|
1999
|
+
minifyWhitespace: !1,
|
|
2000
|
+
minifyIdentifiers: !1,
|
|
2001
|
+
minifySyntax: !1,
|
|
2002
|
+
metafile: !0,
|
|
2003
|
+
// treeShaking: true,
|
|
1989
2004
|
sourcemap: !1,
|
|
1990
2005
|
conditions: ["browser", "module", "default"],
|
|
1991
2006
|
jsxFactory: "React.createElement",
|
|
1992
2007
|
jsxFragment: "React.Fragment",
|
|
1993
2008
|
jsx: "transform",
|
|
1994
2009
|
jsxImportSource: "react",
|
|
1995
|
-
tsconfig:
|
|
2010
|
+
tsconfig: a,
|
|
1996
2011
|
legalComments: "external",
|
|
1997
|
-
plugins: [Z(
|
|
2012
|
+
plugins: [Z(la), (0, Lt.pnpPlugin)()],
|
|
1998
2013
|
banner: {
|
|
1999
2014
|
js: "try{"
|
|
2000
2015
|
},
|
|
@@ -2002,25 +2017,25 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2002
2017
|
js: '}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }'
|
|
2003
2018
|
},
|
|
2004
2019
|
define: {
|
|
2005
|
-
"process.env": JSON.stringify(
|
|
2006
|
-
...
|
|
2020
|
+
"process.env": JSON.stringify(r),
|
|
2021
|
+
...sa(r),
|
|
2007
2022
|
global: "window",
|
|
2008
2023
|
module: "{}"
|
|
2009
2024
|
}
|
|
2010
2025
|
};
|
|
2011
|
-
}, "getConfig"),
|
|
2026
|
+
}, "getConfig"), _t = {
|
|
2012
2027
|
get: /* @__PURE__ */ o(async () => {
|
|
2013
2028
|
let { build: e } = await import("esbuild");
|
|
2014
2029
|
return e;
|
|
2015
2030
|
}, "get")
|
|
2016
|
-
},
|
|
2031
|
+
}, pa = /* @__PURE__ */ o(async function* ({
|
|
2017
2032
|
startTime: i,
|
|
2018
2033
|
options: t,
|
|
2019
|
-
router:
|
|
2034
|
+
router: a
|
|
2020
2035
|
}) {
|
|
2021
2036
|
t.quiet || me.info("=> Starting manager..");
|
|
2022
2037
|
let {
|
|
2023
|
-
config:
|
|
2038
|
+
config: r,
|
|
2024
2039
|
favicon: n,
|
|
2025
2040
|
customHead: s,
|
|
2026
2041
|
features: c,
|
|
@@ -2033,19 +2048,19 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2033
2048
|
tagsOptions: m
|
|
2034
2049
|
} = await le(t);
|
|
2035
2050
|
yield;
|
|
2036
|
-
let f =
|
|
2037
|
-
await
|
|
2038
|
-
...
|
|
2051
|
+
let f = r.outdir;
|
|
2052
|
+
await na(f, { recursive: !0, force: !0 }), yield, L = await p({
|
|
2053
|
+
...r
|
|
2039
2054
|
}), yield;
|
|
2040
|
-
let y =
|
|
2041
|
-
|
|
2055
|
+
let y = k(Ft(P.resolve("storybook/package.json")), "dist", "manager");
|
|
2056
|
+
a.use(
|
|
2042
2057
|
"/sb-addons",
|
|
2043
2058
|
(0, ue.default)(f, {
|
|
2044
2059
|
maxAge: 3e5,
|
|
2045
2060
|
dev: !0,
|
|
2046
2061
|
immutable: !0
|
|
2047
2062
|
})
|
|
2048
|
-
),
|
|
2063
|
+
), a.use(
|
|
2049
2064
|
"/sb-manager",
|
|
2050
2065
|
(0, ue.default)(y, {
|
|
2051
2066
|
maxAge: 3e5,
|
|
@@ -2053,7 +2068,12 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2053
2068
|
immutable: !0
|
|
2054
2069
|
})
|
|
2055
2070
|
);
|
|
2056
|
-
let { cssFiles: v, jsFiles: _ } = await ce(f,
|
|
2071
|
+
let { cssFiles: v, jsFiles: _ } = await ce(f, L?.outputFiles);
|
|
2072
|
+
L.metafile && t.outputDir && await kt(
|
|
2073
|
+
k(t.outputDir, "metafile.json"),
|
|
2074
|
+
JSON.stringify(L.metafile, null, 2)
|
|
2075
|
+
);
|
|
2076
|
+
let O = await pe(t);
|
|
2057
2077
|
yield;
|
|
2058
2078
|
let w = await se(
|
|
2059
2079
|
u,
|
|
@@ -2070,24 +2090,24 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2070
2090
|
t,
|
|
2071
2091
|
O
|
|
2072
2092
|
);
|
|
2073
|
-
return yield,
|
|
2074
|
-
E &&
|
|
2075
|
-
}),
|
|
2076
|
-
|
|
2093
|
+
return yield, a.use("/", ({ url: E }, S, R) => {
|
|
2094
|
+
E && ca.test(E) ? (S.statusCode = 200, S.setHeader("Content-Type", "text/html"), S.write(w), S.end()) : R();
|
|
2095
|
+
}), a.use("/index.html", (E, S) => {
|
|
2096
|
+
S.statusCode = 200, S.setHeader("Content-Type", "text/html"), S.write(w), S.end();
|
|
2077
2097
|
}), {
|
|
2078
|
-
bail:
|
|
2098
|
+
bail: ua,
|
|
2079
2099
|
stats: {
|
|
2080
2100
|
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2081
2101
|
},
|
|
2082
2102
|
totalTime: process.hrtime(i)
|
|
2083
2103
|
};
|
|
2084
|
-
}, "starterGeneratorFn"),
|
|
2104
|
+
}, "starterGeneratorFn"), ma = /* @__PURE__ */ o(async function* ({ startTime: i, options: t }) {
|
|
2085
2105
|
if (!t.outputDir)
|
|
2086
2106
|
throw new Error("outputDir is required");
|
|
2087
2107
|
me.info("=> Building manager..");
|
|
2088
2108
|
let {
|
|
2089
|
-
config:
|
|
2090
|
-
customHead:
|
|
2109
|
+
config: a,
|
|
2110
|
+
customHead: r,
|
|
2091
2111
|
favicon: n,
|
|
2092
2112
|
features: s,
|
|
2093
2113
|
instance: c,
|
|
@@ -2099,24 +2119,24 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2099
2119
|
tagsOptions: g
|
|
2100
2120
|
} = await le(t);
|
|
2101
2121
|
yield;
|
|
2102
|
-
let m =
|
|
2103
|
-
|
|
2104
|
-
...
|
|
2122
|
+
let m = a.outdir, f = k(Ft(P.resolve("storybook/package.json")), "dist", "manager"), y = k(t.outputDir, "sb-manager");
|
|
2123
|
+
L = await c({
|
|
2124
|
+
...a,
|
|
2105
2125
|
minify: !0
|
|
2106
2126
|
}), yield;
|
|
2107
|
-
let v =
|
|
2108
|
-
filter: /* @__PURE__ */ o((
|
|
2109
|
-
let { ext:
|
|
2110
|
-
return
|
|
2127
|
+
let v = ra(f, y, {
|
|
2128
|
+
filter: /* @__PURE__ */ o((S) => {
|
|
2129
|
+
let { ext: R } = oa(S);
|
|
2130
|
+
return R ? R === ".js" : !0;
|
|
2111
2131
|
}, "filter"),
|
|
2112
2132
|
recursive: !0
|
|
2113
|
-
}), { cssFiles: _, jsFiles: O } = await ce(m,
|
|
2133
|
+
}), { cssFiles: _, jsFiles: O } = await ce(m, L?.outputFiles), w = await pe(t);
|
|
2114
2134
|
yield;
|
|
2115
2135
|
let E = await se(
|
|
2116
2136
|
l,
|
|
2117
2137
|
u,
|
|
2118
2138
|
n,
|
|
2119
|
-
|
|
2139
|
+
r,
|
|
2120
2140
|
_,
|
|
2121
2141
|
O,
|
|
2122
2142
|
s,
|
|
@@ -2127,36 +2147,36 @@ var lr = /^\/($|\?)/, U, L, wt = /* @__PURE__ */ o(async (e) => {
|
|
|
2127
2147
|
t,
|
|
2128
2148
|
w
|
|
2129
2149
|
);
|
|
2130
|
-
return await Promise.all([
|
|
2150
|
+
return await Promise.all([kt(k(t.outputDir, "index.html"), E), v]), me.trace({ message: "=> Manager built", time: process.hrtime(i) }), {
|
|
2131
2151
|
toJson: /* @__PURE__ */ o(() => ({}), "toJson")
|
|
2132
2152
|
};
|
|
2133
|
-
}, "builderGeneratorFn"),
|
|
2134
|
-
if (
|
|
2153
|
+
}, "builderGeneratorFn"), ua = /* @__PURE__ */ o(async () => {
|
|
2154
|
+
if (C)
|
|
2135
2155
|
try {
|
|
2136
|
-
await
|
|
2156
|
+
await C.throw(new Error());
|
|
2137
2157
|
} catch {
|
|
2138
2158
|
}
|
|
2139
|
-
}, "bail"),
|
|
2140
|
-
|
|
2159
|
+
}, "bail"), Ar = /* @__PURE__ */ o(async (e) => {
|
|
2160
|
+
C = pa(e);
|
|
2141
2161
|
let i;
|
|
2142
2162
|
do
|
|
2143
|
-
i = await
|
|
2163
|
+
i = await C.next();
|
|
2144
2164
|
while (!i.done);
|
|
2145
2165
|
return i.value;
|
|
2146
|
-
}, "start"),
|
|
2147
|
-
|
|
2166
|
+
}, "start"), Nr = /* @__PURE__ */ o(async (e) => {
|
|
2167
|
+
C = ma(e);
|
|
2148
2168
|
let i;
|
|
2149
2169
|
do
|
|
2150
|
-
i = await
|
|
2170
|
+
i = await C.next();
|
|
2151
2171
|
while (!i.done);
|
|
2152
2172
|
return i.value;
|
|
2153
|
-
}, "build"),
|
|
2173
|
+
}, "build"), Dr = [], Ir = [];
|
|
2154
2174
|
export {
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2175
|
+
ua as bail,
|
|
2176
|
+
Nr as build,
|
|
2177
|
+
Dr as corePresets,
|
|
2178
|
+
_t as executor,
|
|
2179
|
+
bt as getConfig,
|
|
2180
|
+
Ir as overridePresets,
|
|
2181
|
+
Ar as start
|
|
2162
2182
|
};
|