@blueprint-chart/lib 2.17.0 → 2.18.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/dist/embed.js +1 -1
- package/dist/index.js +229 -229
- package/dist/lib/lib.iife.js +307 -29
- package/dist/{render-bpc-CPj5h-p4.js → render-bpc-jhkrsEsh.js} +3002 -3903
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/player-css.d.ts +1 -0
- package/dist/runtime/player.d.ts +15 -0
- package/dist/runtime-BTUG9Tha.js +1072 -0
- package/dist/runtime.js +120 -4
- package/package.json +3 -1
- package/src/runtime/player.css +278 -0
- package/dist/runtime-CT02Shsd.js +0 -118
|
@@ -0,0 +1,1072 @@
|
|
|
1
|
+
//#region src/charts/themes/index.ts
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
name: "blueprint",
|
|
5
|
+
label: "Blueprint",
|
|
6
|
+
description: "The default Blueprint Chart theme"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: "blueprint-framed",
|
|
10
|
+
label: "Blueprint Framed",
|
|
11
|
+
description: "Adds borders and a tinted footer"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "blueprint-bold",
|
|
15
|
+
label: "Blueprint Bold",
|
|
16
|
+
description: "Charts on the blueprint canvas with the full brand palette"
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
function t() {
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
function n() {
|
|
23
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia("(prefers-color-scheme: dark)");
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/dsl/grammar.js
|
|
27
|
+
function r(e) {
|
|
28
|
+
let t = 0;
|
|
29
|
+
for (let n of e) n.type === "data" && t++;
|
|
30
|
+
return t;
|
|
31
|
+
}
|
|
32
|
+
function i(e) {
|
|
33
|
+
let t = {
|
|
34
|
+
properties: [],
|
|
35
|
+
data: null,
|
|
36
|
+
colorizes: [],
|
|
37
|
+
highlights: [],
|
|
38
|
+
areaFills: [],
|
|
39
|
+
annotations: [],
|
|
40
|
+
series: [],
|
|
41
|
+
scenes: [],
|
|
42
|
+
transforms: []
|
|
43
|
+
};
|
|
44
|
+
for (let n of e) switch (n.type) {
|
|
45
|
+
case "property":
|
|
46
|
+
t.properties.push(n);
|
|
47
|
+
break;
|
|
48
|
+
case "data":
|
|
49
|
+
t.data = n;
|
|
50
|
+
break;
|
|
51
|
+
case "colorize":
|
|
52
|
+
t.colorizes.push(n);
|
|
53
|
+
break;
|
|
54
|
+
case "highlight":
|
|
55
|
+
t.highlights.push(n);
|
|
56
|
+
break;
|
|
57
|
+
case "area-fill":
|
|
58
|
+
t.areaFills.push(n);
|
|
59
|
+
break;
|
|
60
|
+
case "annotation":
|
|
61
|
+
t.annotations.push(n);
|
|
62
|
+
break;
|
|
63
|
+
case "series":
|
|
64
|
+
t.series.push(n);
|
|
65
|
+
break;
|
|
66
|
+
case "scene":
|
|
67
|
+
t.scenes.push(n);
|
|
68
|
+
break;
|
|
69
|
+
case "transform": t.transforms.push(n);
|
|
70
|
+
}
|
|
71
|
+
return t;
|
|
72
|
+
}
|
|
73
|
+
function a(e) {
|
|
74
|
+
let t = {
|
|
75
|
+
properties: [],
|
|
76
|
+
data: null,
|
|
77
|
+
colorizes: [],
|
|
78
|
+
highlights: [],
|
|
79
|
+
areaFills: [],
|
|
80
|
+
annotations: [],
|
|
81
|
+
series: [],
|
|
82
|
+
transforms: []
|
|
83
|
+
};
|
|
84
|
+
for (let n of e) switch (n.type) {
|
|
85
|
+
case "property":
|
|
86
|
+
t.properties.push(n);
|
|
87
|
+
break;
|
|
88
|
+
case "data":
|
|
89
|
+
t.data = n;
|
|
90
|
+
break;
|
|
91
|
+
case "colorize":
|
|
92
|
+
t.colorizes.push(n);
|
|
93
|
+
break;
|
|
94
|
+
case "highlight":
|
|
95
|
+
t.highlights.push(n);
|
|
96
|
+
break;
|
|
97
|
+
case "area-fill":
|
|
98
|
+
t.areaFills.push(n);
|
|
99
|
+
break;
|
|
100
|
+
case "annotation":
|
|
101
|
+
t.annotations.push(n);
|
|
102
|
+
break;
|
|
103
|
+
case "series":
|
|
104
|
+
t.series.push(n);
|
|
105
|
+
break;
|
|
106
|
+
case "transform": t.transforms.push(n);
|
|
107
|
+
}
|
|
108
|
+
return t;
|
|
109
|
+
}
|
|
110
|
+
var o = class extends SyntaxError {
|
|
111
|
+
constructor(e, t, n, r) {
|
|
112
|
+
super(e), this.expected = t, this.found = n, this.location = r, this.name = "SyntaxError";
|
|
113
|
+
}
|
|
114
|
+
format(e) {
|
|
115
|
+
let t = "Error: " + this.message;
|
|
116
|
+
if (this.location) {
|
|
117
|
+
let n = null, r = e.find((e) => e.source === this.location.source);
|
|
118
|
+
r && (n = r.text.split(/\r\n|\n|\r/g));
|
|
119
|
+
let i = this.location.start, a = this.location.source && typeof this.location.source.offset == "function" ? this.location.source.offset(i) : i, o = this.location.source + ":" + a.line + ":" + a.column;
|
|
120
|
+
if (n) {
|
|
121
|
+
let e = this.location.end, r = "".padEnd(a.line.toString().length, " "), s = n[i.line - 1], c = (i.line === e.line ? e.column : s.length + 1) - i.column || 1;
|
|
122
|
+
t += "\n --> " + o + "\n" + r + " |\n" + a.line + " | " + s + "\n" + r + " | " + "".padEnd(i.column - 1, " ") + "".padEnd(c, "^");
|
|
123
|
+
} else t += "\n at " + o;
|
|
124
|
+
}
|
|
125
|
+
return t;
|
|
126
|
+
}
|
|
127
|
+
static buildMessage(e, t) {
|
|
128
|
+
function n(e) {
|
|
129
|
+
return e.codePointAt(0).toString(16).toUpperCase();
|
|
130
|
+
}
|
|
131
|
+
let r = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode") ? /* @__PURE__ */ RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu") : null;
|
|
132
|
+
function i(e) {
|
|
133
|
+
return r ? e.replace(r, (e) => "\\u{" + n(e) + "}") : e;
|
|
134
|
+
}
|
|
135
|
+
function a(e) {
|
|
136
|
+
return i(e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (e) => "\\x0" + n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g, (e) => "\\x" + n(e)));
|
|
137
|
+
}
|
|
138
|
+
function o(e) {
|
|
139
|
+
return i(e.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, (e) => "\\x0" + n(e)).replace(/[\x10-\x1F\x7F-\x9F]/g, (e) => "\\x" + n(e)));
|
|
140
|
+
}
|
|
141
|
+
let s = {
|
|
142
|
+
literal(e) {
|
|
143
|
+
return "\"" + a(e.text) + "\"";
|
|
144
|
+
},
|
|
145
|
+
class(e) {
|
|
146
|
+
let t = e.parts.map((e) => Array.isArray(e) ? o(e[0]) + "-" + o(e[1]) : o(e));
|
|
147
|
+
return "[" + (e.inverted ? "^" : "") + t.join("") + "]" + (e.unicode ? "u" : "");
|
|
148
|
+
},
|
|
149
|
+
any() {
|
|
150
|
+
return "any character";
|
|
151
|
+
},
|
|
152
|
+
end() {
|
|
153
|
+
return "end of input";
|
|
154
|
+
},
|
|
155
|
+
other(e) {
|
|
156
|
+
return e.description;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
function c(e) {
|
|
160
|
+
return s[e.type](e);
|
|
161
|
+
}
|
|
162
|
+
function l(e) {
|
|
163
|
+
let t = e.map(c);
|
|
164
|
+
if (t.sort(), t.length > 0) {
|
|
165
|
+
let e = 1;
|
|
166
|
+
for (let n = 1; n < t.length; n++) t[n - 1] !== t[n] && (t[e] = t[n], e++);
|
|
167
|
+
t.length = e;
|
|
168
|
+
}
|
|
169
|
+
switch (t.length) {
|
|
170
|
+
case 1: return t[0];
|
|
171
|
+
case 2: return t[0] + " or " + t[1];
|
|
172
|
+
default: return t.slice(0, -1).join(", ") + ", or " + t[t.length - 1];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function u(e) {
|
|
176
|
+
return e ? "\"" + a(e) + "\"" : "end of input";
|
|
177
|
+
}
|
|
178
|
+
return "Expected " + l(e) + " but " + u(t) + " found.";
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
function s(e, t) {
|
|
182
|
+
t = t === void 0 ? {} : t;
|
|
183
|
+
let n = {}, s = t.grammarSource, c = { Chart: Wt }, l = Wt, u = "chart", d = "data", f = "colorize", p = "highlight", m = "area-fill", h = "annotation", ee = "range", g = "note", _ = "series", te = "scene", ne = "transform", v = /^[ \t]/, re = /^[^\t\n\r{}=]/, ie = /^[a-zA-Z_#]/, ae = /^[a-zA-Z0-9_#\-]/, y = /^[0-9]/, oe = /^[eE]/, b = /^[+\-]/, se = /^[^"\\]/, x = /^[0-9a-fA-F]/, S = /^[^\n]/, C = /^[ \t\n\r]/, ce = V("chart", !1), w = V("{", !1), T = V("}", !1), E = H([" ", " "], !1, !1, !1), le = V("data", !1), ue = V("=", !1), de = V(",", !1), fe = V(" ", !1), pe = H([
|
|
184
|
+
" ",
|
|
185
|
+
"\n",
|
|
186
|
+
"\r",
|
|
187
|
+
"{",
|
|
188
|
+
"}",
|
|
189
|
+
"="
|
|
190
|
+
], !0, !1, !1), me = V("colorize", !1), he = V("highlight", !1), ge = V("area-fill", !1), _e = V("annotation", !1), ve = V("range", !1), ye = V("note", !1), be = V("series", !1), xe = V("scene", !1), Se = V("transform", !1), Ce = V("%", !1), we = zt("identifier"), Te = H([
|
|
191
|
+
["a", "z"],
|
|
192
|
+
["A", "Z"],
|
|
193
|
+
"_",
|
|
194
|
+
"#"
|
|
195
|
+
], !1, !1, !1), Ee = H([
|
|
196
|
+
["a", "z"],
|
|
197
|
+
["A", "Z"],
|
|
198
|
+
["0", "9"],
|
|
199
|
+
"_",
|
|
200
|
+
"#",
|
|
201
|
+
"-"
|
|
202
|
+
], !1, !1, !1), De = V("-", !1), Oe = V(".", !1), D = H([["0", "9"]], !1, !1, !1), ke = H(["e", "E"], !1, !1, !1), Ae = H(["+", "-"], !1, !1, !1), je = zt("string"), Me = V("\"", !1), Ne = V("\\", !1), Pe = H(["\"", "\\"], !0, !1, !1), Fe = V("n", !1), Ie = V("r", !1), Le = V("t", !1), Re = V("u", !1), O = H([
|
|
203
|
+
["0", "9"],
|
|
204
|
+
["a", "f"],
|
|
205
|
+
["A", "F"]
|
|
206
|
+
], !1, !1, !1), k = Lt(), ze = V("//", !1), A = H(["\n"], !0, !1, !1), Be = V("/*", !1), j = V("*/", !1), M = H([
|
|
207
|
+
" ",
|
|
208
|
+
" ",
|
|
209
|
+
"\n",
|
|
210
|
+
"\r"
|
|
211
|
+
], !1, !1, !1), Ve = zt("whitespace");
|
|
212
|
+
function He(e, t, n) {
|
|
213
|
+
r(t) > 1 && B("duplicate data block — a chart or scene may define at most one data { } block");
|
|
214
|
+
let a = i(t);
|
|
215
|
+
return {
|
|
216
|
+
type: "chart",
|
|
217
|
+
chartType: e,
|
|
218
|
+
...n.length ? { trailingComments: n } : {},
|
|
219
|
+
properties: a.properties,
|
|
220
|
+
data: a.data,
|
|
221
|
+
colorizes: a.colorizes,
|
|
222
|
+
highlights: a.highlights,
|
|
223
|
+
areaFills: a.areaFills,
|
|
224
|
+
annotations: a.annotations,
|
|
225
|
+
series: a.series,
|
|
226
|
+
scenes: a.scenes,
|
|
227
|
+
transforms: a.transforms
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function Ue(e, t, n) {
|
|
231
|
+
return e.length && (t.leadingComments = e), n != null && (t.trailingComment = n), t;
|
|
232
|
+
}
|
|
233
|
+
function We(e, t) {
|
|
234
|
+
return {
|
|
235
|
+
type: "data",
|
|
236
|
+
entries: e,
|
|
237
|
+
...t.length ? { trailingComments: t } : {}
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function Ge(e, t, n) {
|
|
241
|
+
return e.length && (t.leadingComments = e), n != null && (t.trailingComment = n), t;
|
|
242
|
+
}
|
|
243
|
+
function Ke(e, t, n) {
|
|
244
|
+
return n;
|
|
245
|
+
}
|
|
246
|
+
function qe(e, t, n) {
|
|
247
|
+
let r = [t, ...n];
|
|
248
|
+
return {
|
|
249
|
+
type: "property",
|
|
250
|
+
key: e.name,
|
|
251
|
+
...e.quoted && e.name === "series" ? { quotedKey: !0 } : {},
|
|
252
|
+
value: r[0].value,
|
|
253
|
+
isPercentage: !1,
|
|
254
|
+
values: r.map((e) => e.value)
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
function Je(e, t) {
|
|
258
|
+
return {
|
|
259
|
+
type: "property",
|
|
260
|
+
key: e.name,
|
|
261
|
+
...e.quoted && e.name === "series" ? { quotedKey: !0 } : {},
|
|
262
|
+
value: t.value,
|
|
263
|
+
isPercentage: t.isPercentage
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function Ye(e) {
|
|
267
|
+
return {
|
|
268
|
+
name: e,
|
|
269
|
+
quoted: !0
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
function Xe(e) {
|
|
273
|
+
return {
|
|
274
|
+
name: e,
|
|
275
|
+
quoted: !1
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
function Ze(e, t) {
|
|
279
|
+
return {
|
|
280
|
+
type: "property",
|
|
281
|
+
key: e,
|
|
282
|
+
...e === "series" ? { quotedKey: !0 } : {},
|
|
283
|
+
value: t.value,
|
|
284
|
+
isPercentage: t.isPercentage
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
function Qe(e) {
|
|
288
|
+
return e.trim();
|
|
289
|
+
}
|
|
290
|
+
function $e(e, t, n) {
|
|
291
|
+
return {
|
|
292
|
+
type: "colorize",
|
|
293
|
+
target: e,
|
|
294
|
+
properties: t,
|
|
295
|
+
...n.length ? { trailingComments: n } : {}
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
function et() {
|
|
299
|
+
B("colorize needs a quoted target, e.g. colorize \"2021\" { ... }");
|
|
300
|
+
}
|
|
301
|
+
function tt(e, t, n) {
|
|
302
|
+
return {
|
|
303
|
+
type: "colorize",
|
|
304
|
+
target: e,
|
|
305
|
+
properties: t,
|
|
306
|
+
fromHighlight: !0,
|
|
307
|
+
...n.length ? { trailingComments: n } : {}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function nt(e) {
|
|
311
|
+
return {
|
|
312
|
+
type: "highlight",
|
|
313
|
+
target: e,
|
|
314
|
+
properties: []
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
function rt() {
|
|
318
|
+
B("highlight needs a quoted target, e.g. highlight \"2021\" { ... } or highlight \"2021\"");
|
|
319
|
+
}
|
|
320
|
+
function it(e, t, n, r) {
|
|
321
|
+
return {
|
|
322
|
+
type: "area-fill",
|
|
323
|
+
from: e,
|
|
324
|
+
to: t,
|
|
325
|
+
properties: n,
|
|
326
|
+
...r.length ? { trailingComments: r } : {}
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
function at() {
|
|
330
|
+
B("area-fill needs two quoted targets, e.g. area-fill \"Revenue\" \"Cost\" { ... }");
|
|
331
|
+
}
|
|
332
|
+
function ot() {
|
|
333
|
+
B("area-fill needs two quoted targets, e.g. area-fill \"Revenue\" \"Cost\" { ... }");
|
|
334
|
+
}
|
|
335
|
+
function st(e, t, n) {
|
|
336
|
+
return {
|
|
337
|
+
type: "annotation",
|
|
338
|
+
kind: "point",
|
|
339
|
+
target: e,
|
|
340
|
+
properties: t,
|
|
341
|
+
...n.length ? { trailingComments: n } : {}
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function ct() {
|
|
345
|
+
B("annotation needs a quoted target, e.g. annotation \"2021\" { ... }");
|
|
346
|
+
}
|
|
347
|
+
function lt(e, t) {
|
|
348
|
+
return {
|
|
349
|
+
type: "annotation",
|
|
350
|
+
kind: "range",
|
|
351
|
+
properties: e,
|
|
352
|
+
...t.length ? { trailingComments: t } : {}
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
function ut(e, t) {
|
|
356
|
+
return {
|
|
357
|
+
type: "annotation",
|
|
358
|
+
kind: "free",
|
|
359
|
+
properties: e,
|
|
360
|
+
...t.length ? { trailingComments: t } : {}
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
function dt(e, t, n) {
|
|
364
|
+
return {
|
|
365
|
+
type: "series",
|
|
366
|
+
name: e,
|
|
367
|
+
properties: t,
|
|
368
|
+
...n.length ? { trailingComments: n } : {}
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function ft() {
|
|
372
|
+
B("series needs a quoted name, e.g. series \"Revenue\" { ... }");
|
|
373
|
+
}
|
|
374
|
+
function pt(e, t, n) {
|
|
375
|
+
r(t) > 1 && B("duplicate data block — a chart or scene may define at most one data { } block");
|
|
376
|
+
let i = a(t);
|
|
377
|
+
return {
|
|
378
|
+
type: "scene",
|
|
379
|
+
name: e ?? null,
|
|
380
|
+
...n.length ? { trailingComments: n } : {},
|
|
381
|
+
properties: i.properties,
|
|
382
|
+
data: i.data,
|
|
383
|
+
colorizes: i.colorizes,
|
|
384
|
+
highlights: i.highlights,
|
|
385
|
+
areaFills: i.areaFills,
|
|
386
|
+
annotations: i.annotations,
|
|
387
|
+
series: i.series,
|
|
388
|
+
transforms: i.transforms
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function mt(e, t, n) {
|
|
392
|
+
return {
|
|
393
|
+
type: "transform",
|
|
394
|
+
transformType: e,
|
|
395
|
+
properties: t,
|
|
396
|
+
...n.length ? { trailingComments: n } : {}
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function ht(e, t, n) {
|
|
400
|
+
return e.length && (t.leadingComments = e), n != null && (t.trailingComment = n), t;
|
|
401
|
+
}
|
|
402
|
+
function gt(e, t) {
|
|
403
|
+
return t != null && (e.trailingComment = t), e;
|
|
404
|
+
}
|
|
405
|
+
function _t(e, t) {
|
|
406
|
+
return {
|
|
407
|
+
type: "property",
|
|
408
|
+
key: e,
|
|
409
|
+
value: t.value,
|
|
410
|
+
isPercentage: t.isPercentage
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
function vt(e) {
|
|
414
|
+
return {
|
|
415
|
+
value: e,
|
|
416
|
+
isPercentage: !0
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
function yt(e) {
|
|
420
|
+
return {
|
|
421
|
+
value: e,
|
|
422
|
+
isPercentage: !1
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
function bt(e) {
|
|
426
|
+
return {
|
|
427
|
+
value: e,
|
|
428
|
+
isPercentage: !1
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
function xt(e) {
|
|
432
|
+
return {
|
|
433
|
+
value: e,
|
|
434
|
+
isPercentage: !1
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
function St(e) {
|
|
438
|
+
return parseFloat(e);
|
|
439
|
+
}
|
|
440
|
+
function Ct(e) {
|
|
441
|
+
return e.join("");
|
|
442
|
+
}
|
|
443
|
+
function wt(e) {
|
|
444
|
+
return e;
|
|
445
|
+
}
|
|
446
|
+
function Tt() {
|
|
447
|
+
return "\"";
|
|
448
|
+
}
|
|
449
|
+
function Et() {
|
|
450
|
+
return "\\";
|
|
451
|
+
}
|
|
452
|
+
function Dt() {
|
|
453
|
+
return "\n";
|
|
454
|
+
}
|
|
455
|
+
function Ot() {
|
|
456
|
+
return "\r";
|
|
457
|
+
}
|
|
458
|
+
function kt() {
|
|
459
|
+
return " ";
|
|
460
|
+
}
|
|
461
|
+
function At(e) {
|
|
462
|
+
return String.fromCharCode(parseInt(e, 16));
|
|
463
|
+
}
|
|
464
|
+
function jt(e) {
|
|
465
|
+
B("Unknown escape sequence \\" + e);
|
|
466
|
+
}
|
|
467
|
+
function Mt(e) {
|
|
468
|
+
return e;
|
|
469
|
+
}
|
|
470
|
+
function Nt(e) {
|
|
471
|
+
return e;
|
|
472
|
+
}
|
|
473
|
+
function Pt(e) {
|
|
474
|
+
return e.trim();
|
|
475
|
+
}
|
|
476
|
+
function Ft(e) {
|
|
477
|
+
return e.trim();
|
|
478
|
+
}
|
|
479
|
+
let N = t.peg$currPos | 0, P = N, F = [{
|
|
480
|
+
line: 1,
|
|
481
|
+
column: 1
|
|
482
|
+
}], I = N, L = t.peg$maxFailExpected || [], R = t.peg$silentFails | 0, z;
|
|
483
|
+
if (t.startRule) {
|
|
484
|
+
if (!(t.startRule in c)) throw Error("Can't start parsing from rule \"" + t.startRule + "\".");
|
|
485
|
+
l = c[t.startRule];
|
|
486
|
+
}
|
|
487
|
+
function B(e, t) {
|
|
488
|
+
throw t = t === void 0 ? Vt(P, N) : t, Ht(e, t);
|
|
489
|
+
}
|
|
490
|
+
function It(t = N) {
|
|
491
|
+
let n = e.codePointAt(t);
|
|
492
|
+
return n === void 0 ? "" : String.fromCodePoint(n);
|
|
493
|
+
}
|
|
494
|
+
function V(e, t) {
|
|
495
|
+
return {
|
|
496
|
+
type: "literal",
|
|
497
|
+
text: e,
|
|
498
|
+
ignoreCase: t
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
function H(e, t, n, r) {
|
|
502
|
+
return {
|
|
503
|
+
type: "class",
|
|
504
|
+
parts: e,
|
|
505
|
+
inverted: t,
|
|
506
|
+
ignoreCase: n,
|
|
507
|
+
unicode: r
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
function Lt() {
|
|
511
|
+
return { type: "any" };
|
|
512
|
+
}
|
|
513
|
+
function Rt() {
|
|
514
|
+
return { type: "end" };
|
|
515
|
+
}
|
|
516
|
+
function zt(e) {
|
|
517
|
+
return {
|
|
518
|
+
type: "other",
|
|
519
|
+
description: e
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
function Bt(t) {
|
|
523
|
+
let n = F[t], r;
|
|
524
|
+
if (n) return n;
|
|
525
|
+
if (t >= F.length) r = F.length - 1;
|
|
526
|
+
else for (r = t; !F[--r];);
|
|
527
|
+
for (n = F[r], n = {
|
|
528
|
+
line: n.line,
|
|
529
|
+
column: n.column
|
|
530
|
+
}; r < t;) e.charCodeAt(r) === 10 ? (n.line++, n.column = 1) : n.column++, r++;
|
|
531
|
+
return F[t] = n, n;
|
|
532
|
+
}
|
|
533
|
+
function Vt(e, t, n) {
|
|
534
|
+
let r = Bt(e), i = Bt(t), a = {
|
|
535
|
+
source: s,
|
|
536
|
+
start: {
|
|
537
|
+
offset: e,
|
|
538
|
+
line: r.line,
|
|
539
|
+
column: r.column
|
|
540
|
+
},
|
|
541
|
+
end: {
|
|
542
|
+
offset: t,
|
|
543
|
+
line: i.line,
|
|
544
|
+
column: i.column
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
return n && s && typeof s.offset == "function" && (a.start = s.offset(a.start), a.end = s.offset(a.end)), a;
|
|
548
|
+
}
|
|
549
|
+
function U(e) {
|
|
550
|
+
N < I || (N > I && (I = N, L = []), L.push(e));
|
|
551
|
+
}
|
|
552
|
+
function Ht(e, t) {
|
|
553
|
+
return new o(e, null, null, t);
|
|
554
|
+
}
|
|
555
|
+
function Ut(e, t, n) {
|
|
556
|
+
return new o(o.buildMessage(e, t), e, t, n);
|
|
557
|
+
}
|
|
558
|
+
function Wt() {
|
|
559
|
+
let t, r, i, a, o, s, c, l;
|
|
560
|
+
if (t = N, $(), e.substr(N, 5) === u ? (r = u, N += 5) : (r = n, R === 0 && U(ce)), r !== n) {
|
|
561
|
+
if (i = Q(), i !== n) {
|
|
562
|
+
if (a = K(), a !== n) {
|
|
563
|
+
if ($(), e.charCodeAt(N) === 123 ? (o = "{", N++) : (o = n, R === 0 && U(w)), o !== n) {
|
|
564
|
+
for (s = [], c = Gt(); c !== n;) s.push(c), c = Gt();
|
|
565
|
+
c = X(), e.charCodeAt(N) === 125 ? (l = "}", N++) : (l = n, R === 0 && U(T)), l === n ? (N = t, t = n) : ($(), P = t, t = He(a, s, c));
|
|
566
|
+
} else N = t, t = n;
|
|
567
|
+
} else N = t, t = n;
|
|
568
|
+
} else N = t, t = n;
|
|
569
|
+
} else N = t, t = n;
|
|
570
|
+
return t;
|
|
571
|
+
}
|
|
572
|
+
function Gt() {
|
|
573
|
+
let t, r, i, a, o;
|
|
574
|
+
if (t = N, r = X(), i = Kt(), i === n && (i = Qt(), i === n && (i = $t(), i === n && (i = en(), i === n && (i = nn(), i === n && (i = rn(), i === n && (i = tn(), i === n && (i = an(), i === n && (i = on(), i === n && (i = sn(), i === n && (i = ln())))))))))), i !== n) {
|
|
575
|
+
for (a = [], o = e.charAt(N), v.test(o) ? N++ : (o = n, R === 0 && U(E)); o !== n;) a.push(o), o = e.charAt(N), v.test(o) ? N++ : (o = n, R === 0 && U(E));
|
|
576
|
+
o = Z(), o === n && (o = null), Y(), P = t, t = Ue(r, i, o);
|
|
577
|
+
} else N = t, t = n;
|
|
578
|
+
return t;
|
|
579
|
+
}
|
|
580
|
+
function Kt() {
|
|
581
|
+
let t, r, i, a, o, s;
|
|
582
|
+
if (t = N, e.substr(N, 4) === d ? (r = d, N += 4) : (r = n, R === 0 && U(le)), r !== n) {
|
|
583
|
+
if ($(), e.charCodeAt(N) === 123 ? (i = "{", N++) : (i = n, R === 0 && U(w)), i !== n) {
|
|
584
|
+
for (a = [], o = qt(); o !== n;) a.push(o), o = qt();
|
|
585
|
+
o = X(), e.charCodeAt(N) === 125 ? (s = "}", N++) : (s = n, R === 0 && U(T)), s === n ? (N = t, t = n) : (P = t, t = We(a, o));
|
|
586
|
+
} else N = t, t = n;
|
|
587
|
+
} else N = t, t = n;
|
|
588
|
+
return t;
|
|
589
|
+
}
|
|
590
|
+
function qt() {
|
|
591
|
+
let t, r, i, a, o;
|
|
592
|
+
if (t = N, r = X(), i = Xt(), i === n && (i = Jt()), i !== n) {
|
|
593
|
+
for (a = [], o = e.charAt(N), v.test(o) ? N++ : (o = n, R === 0 && U(E)); o !== n;) a.push(o), o = e.charAt(N), v.test(o) ? N++ : (o = n, R === 0 && U(E));
|
|
594
|
+
o = Z(), o === n && (o = null), Y(), P = t, t = Ge(r, i, o);
|
|
595
|
+
} else N = t, t = n;
|
|
596
|
+
return t;
|
|
597
|
+
}
|
|
598
|
+
function Jt() {
|
|
599
|
+
let t, r, i, a, o, s, c, l;
|
|
600
|
+
if (t = N, r = Yt(), r !== n) {
|
|
601
|
+
if ($(), e.charCodeAt(N) === 61 ? (i = "=", N++) : (i = n, R === 0 && U(ue)), i !== n) {
|
|
602
|
+
if ($(), a = G(), a !== n) {
|
|
603
|
+
if (o = [], s = N, e.charCodeAt(N) === 44 ? (c = ",", N++) : (c = n, R === 0 && U(de)), c === n ? (N = s, s = n) : ($(), l = G(), l === n ? (N = s, s = n) : (P = s, s = Ke(r, a, l))), s !== n) for (; s !== n;) o.push(s), s = N, e.charCodeAt(N) === 44 ? (c = ",", N++) : (c = n, R === 0 && U(de)), c === n ? (N = s, s = n) : ($(), l = G(), l === n ? (N = s, s = n) : (P = s, s = Ke(r, a, l)));
|
|
604
|
+
else o = n;
|
|
605
|
+
o === n ? (N = t, t = n) : (P = t, t = qe(r, a, o));
|
|
606
|
+
} else N = t, t = n;
|
|
607
|
+
} else N = t, t = n;
|
|
608
|
+
} else N = t, t = n;
|
|
609
|
+
return t === n && (t = N, r = Yt(), r === n ? (N = t, t = n) : ($(), e.charCodeAt(N) === 61 ? (i = "=", N++) : (i = n, R === 0 && U(ue)), i === n ? (N = t, t = n) : ($(), a = G(), a === n ? (N = t, t = n) : (P = t, t = Je(r, a))))), t;
|
|
610
|
+
}
|
|
611
|
+
function Yt() {
|
|
612
|
+
let e, t;
|
|
613
|
+
return e = N, t = q(), t !== n && (P = e, t = Ye(t)), e = t, e === n && (e = N, t = K(), t !== n && (P = e, t = Xe(t)), e = t), e;
|
|
614
|
+
}
|
|
615
|
+
function Xt() {
|
|
616
|
+
let t, r, i, a;
|
|
617
|
+
return t = N, r = Zt(), r === n ? (N = t, t = n) : (e.charCodeAt(N) === 9 ? (i = " ", N++) : (i = n, R === 0 && U(fe)), i === n ? (N = t, t = n) : ($(), a = G(), a === n ? (N = t, t = n) : (P = t, t = Ze(r, a)))), t;
|
|
618
|
+
}
|
|
619
|
+
function Zt() {
|
|
620
|
+
let t, r, i, a;
|
|
621
|
+
if (t = N, r = N, i = [], a = e.charAt(N), re.test(a) ? N++ : (a = n, R === 0 && U(pe)), a !== n) for (; a !== n;) i.push(a), a = e.charAt(N), re.test(a) ? N++ : (a = n, R === 0 && U(pe));
|
|
622
|
+
else i = n;
|
|
623
|
+
return r = i === n ? i : e.substring(r, N), r !== n && (P = t, r = Qe(r)), t = r, t;
|
|
624
|
+
}
|
|
625
|
+
function Qt() {
|
|
626
|
+
let t, r, i, a, o, s, c, l;
|
|
627
|
+
if (t = N, e.substr(N, 8) === f ? (r = f, N += 8) : (r = n, R === 0 && U(me)), r !== n) {
|
|
628
|
+
if (i = Q(), i !== n) {
|
|
629
|
+
if (a = q(), a !== n) {
|
|
630
|
+
if ($(), e.charCodeAt(N) === 123 ? (o = "{", N++) : (o = n, R === 0 && U(w)), o !== n) {
|
|
631
|
+
for (s = [], c = W(); c !== n;) s.push(c), c = W();
|
|
632
|
+
c = X(), e.charCodeAt(N) === 125 ? (l = "}", N++) : (l = n, R === 0 && U(T)), l === n ? (N = t, t = n) : (P = t, t = $e(a, s, c));
|
|
633
|
+
} else N = t, t = n;
|
|
634
|
+
} else N = t, t = n;
|
|
635
|
+
} else N = t, t = n;
|
|
636
|
+
} else N = t, t = n;
|
|
637
|
+
return t === n && (t = N, e.substr(N, 8) === f ? (r = f, N += 8) : (r = n, R === 0 && U(me)), r === n ? (N = t, t = n) : (i = $(), e.charCodeAt(N) === 123 ? (a = "{", N++) : (a = n, R === 0 && U(w)), a === n ? (N = t, t = n) : (P = t, t = et()))), t;
|
|
638
|
+
}
|
|
639
|
+
function $t() {
|
|
640
|
+
let t, r, i, a, o, s, c, l, u;
|
|
641
|
+
if (t = N, e.substr(N, 9) === p ? (r = p, N += 9) : (r = n, R === 0 && U(he)), r !== n) {
|
|
642
|
+
if (i = Q(), i !== n) {
|
|
643
|
+
if (a = q(), a !== n) {
|
|
644
|
+
if (o = $(), e.charCodeAt(N) === 123 ? (s = "{", N++) : (s = n, R === 0 && U(w)), s !== n) {
|
|
645
|
+
for (c = [], l = W(); l !== n;) c.push(l), l = W();
|
|
646
|
+
l = X(), e.charCodeAt(N) === 125 ? (u = "}", N++) : (u = n, R === 0 && U(T)), u === n ? (N = t, t = n) : (P = t, t = tt(a, c, l));
|
|
647
|
+
} else N = t, t = n;
|
|
648
|
+
} else N = t, t = n;
|
|
649
|
+
} else N = t, t = n;
|
|
650
|
+
} else N = t, t = n;
|
|
651
|
+
return t === n && (t = N, e.substr(N, 9) === p ? (r = p, N += 9) : (r = n, R === 0 && U(he)), r === n ? (N = t, t = n) : (i = Q(), i === n ? (N = t, t = n) : (a = q(), a === n ? (N = t, t = n) : (o = N, R++, s = N, c = $(), e.charCodeAt(N) === 123 ? (l = "{", N++) : (l = n, R === 0 && U(w)), l === n ? (N = s, s = n) : (c = [c, l], s = c), R--, s === n ? o = void 0 : (N = o, o = n), o === n ? (N = t, t = n) : (P = t, t = nt(a))))), t === n && (t = N, e.substr(N, 9) === p ? (r = p, N += 9) : (r = n, R === 0 && U(he)), r === n ? (N = t, t = n) : (i = $(), e.charCodeAt(N) === 123 ? (a = "{", N++) : (a = n, R === 0 && U(w)), a === n ? (N = t, t = n) : (P = t, t = rt())))), t;
|
|
652
|
+
}
|
|
653
|
+
function en() {
|
|
654
|
+
let t, r, i, a, o, s, c, l, u, d;
|
|
655
|
+
if (t = N, e.substr(N, 9) === m ? (r = m, N += 9) : (r = n, R === 0 && U(ge)), r !== n) {
|
|
656
|
+
if (i = Q(), i !== n) {
|
|
657
|
+
if (a = q(), a !== n) {
|
|
658
|
+
if (o = Q(), o !== n) {
|
|
659
|
+
if (s = q(), s !== n) {
|
|
660
|
+
if ($(), e.charCodeAt(N) === 123 ? (c = "{", N++) : (c = n, R === 0 && U(w)), c !== n) {
|
|
661
|
+
for (l = [], u = W(); u !== n;) l.push(u), u = W();
|
|
662
|
+
u = X(), e.charCodeAt(N) === 125 ? (d = "}", N++) : (d = n, R === 0 && U(T)), d === n ? (N = t, t = n) : (P = t, t = it(a, s, l, u));
|
|
663
|
+
} else N = t, t = n;
|
|
664
|
+
} else N = t, t = n;
|
|
665
|
+
} else N = t, t = n;
|
|
666
|
+
} else N = t, t = n;
|
|
667
|
+
} else N = t, t = n;
|
|
668
|
+
} else N = t, t = n;
|
|
669
|
+
return t === n && (t = N, e.substr(N, 9) === m ? (r = m, N += 9) : (r = n, R === 0 && U(ge)), r === n ? (N = t, t = n) : (i = Q(), i === n ? (N = t, t = n) : (a = q(), a === n ? (N = t, t = n) : (o = $(), e.charCodeAt(N) === 123 ? (s = "{", N++) : (s = n, R === 0 && U(w)), s === n ? (N = t, t = n) : (P = t, t = at())))), t === n && (t = N, e.substr(N, 9) === m ? (r = m, N += 9) : (r = n, R === 0 && U(ge)), r === n ? (N = t, t = n) : (i = $(), e.charCodeAt(N) === 123 ? (a = "{", N++) : (a = n, R === 0 && U(w)), a === n ? (N = t, t = n) : (P = t, t = ot())))), t;
|
|
670
|
+
}
|
|
671
|
+
function tn() {
|
|
672
|
+
let t, r, i, a, o, s, c, l;
|
|
673
|
+
if (t = N, e.substr(N, 10) === h ? (r = h, N += 10) : (r = n, R === 0 && U(_e)), r !== n) {
|
|
674
|
+
if (i = Q(), i !== n) {
|
|
675
|
+
if (a = q(), a !== n) {
|
|
676
|
+
if ($(), e.charCodeAt(N) === 123 ? (o = "{", N++) : (o = n, R === 0 && U(w)), o !== n) {
|
|
677
|
+
for (s = [], c = W(); c !== n;) s.push(c), c = W();
|
|
678
|
+
c = X(), e.charCodeAt(N) === 125 ? (l = "}", N++) : (l = n, R === 0 && U(T)), l === n ? (N = t, t = n) : (P = t, t = st(a, s, c));
|
|
679
|
+
} else N = t, t = n;
|
|
680
|
+
} else N = t, t = n;
|
|
681
|
+
} else N = t, t = n;
|
|
682
|
+
} else N = t, t = n;
|
|
683
|
+
return t === n && (t = N, e.substr(N, 10) === h ? (r = h, N += 10) : (r = n, R === 0 && U(_e)), r === n ? (N = t, t = n) : (i = $(), e.charCodeAt(N) === 123 ? (a = "{", N++) : (a = n, R === 0 && U(w)), a === n ? (N = t, t = n) : (P = t, t = ct()))), t;
|
|
684
|
+
}
|
|
685
|
+
function nn() {
|
|
686
|
+
let t, r, i, a, o, s;
|
|
687
|
+
if (t = N, e.substr(N, 5) === ee ? (r = ee, N += 5) : (r = n, R === 0 && U(ve)), r !== n) {
|
|
688
|
+
if ($(), e.charCodeAt(N) === 123 ? (i = "{", N++) : (i = n, R === 0 && U(w)), i !== n) {
|
|
689
|
+
for (a = [], o = W(); o !== n;) a.push(o), o = W();
|
|
690
|
+
o = X(), e.charCodeAt(N) === 125 ? (s = "}", N++) : (s = n, R === 0 && U(T)), s === n ? (N = t, t = n) : (P = t, t = lt(a, o));
|
|
691
|
+
} else N = t, t = n;
|
|
692
|
+
} else N = t, t = n;
|
|
693
|
+
return t;
|
|
694
|
+
}
|
|
695
|
+
function rn() {
|
|
696
|
+
let t, r, i, a, o, s;
|
|
697
|
+
if (t = N, e.substr(N, 4) === g ? (r = g, N += 4) : (r = n, R === 0 && U(ye)), r !== n) {
|
|
698
|
+
if ($(), e.charCodeAt(N) === 123 ? (i = "{", N++) : (i = n, R === 0 && U(w)), i !== n) {
|
|
699
|
+
for (a = [], o = W(); o !== n;) a.push(o), o = W();
|
|
700
|
+
o = X(), e.charCodeAt(N) === 125 ? (s = "}", N++) : (s = n, R === 0 && U(T)), s === n ? (N = t, t = n) : (P = t, t = ut(a, o));
|
|
701
|
+
} else N = t, t = n;
|
|
702
|
+
} else N = t, t = n;
|
|
703
|
+
return t;
|
|
704
|
+
}
|
|
705
|
+
function an() {
|
|
706
|
+
let t, r, i, a, o, s, c, l;
|
|
707
|
+
if (t = N, e.substr(N, 6) === _ ? (r = _, N += 6) : (r = n, R === 0 && U(be)), r !== n) {
|
|
708
|
+
if (i = Q(), i !== n) {
|
|
709
|
+
if (a = q(), a !== n) {
|
|
710
|
+
if ($(), e.charCodeAt(N) === 123 ? (o = "{", N++) : (o = n, R === 0 && U(w)), o !== n) {
|
|
711
|
+
for (s = [], c = W(); c !== n;) s.push(c), c = W();
|
|
712
|
+
c = X(), e.charCodeAt(N) === 125 ? (l = "}", N++) : (l = n, R === 0 && U(T)), l === n ? (N = t, t = n) : (P = t, t = dt(a, s, c));
|
|
713
|
+
} else N = t, t = n;
|
|
714
|
+
} else N = t, t = n;
|
|
715
|
+
} else N = t, t = n;
|
|
716
|
+
} else N = t, t = n;
|
|
717
|
+
return t === n && (t = N, e.substr(N, 6) === _ ? (r = _, N += 6) : (r = n, R === 0 && U(be)), r === n ? (N = t, t = n) : (i = $(), e.charCodeAt(N) === 123 ? (a = "{", N++) : (a = n, R === 0 && U(w)), a === n ? (N = t, t = n) : (P = t, t = ft()))), t;
|
|
718
|
+
}
|
|
719
|
+
function on() {
|
|
720
|
+
let t, r, i, a, o, s, c, l;
|
|
721
|
+
if (t = N, e.substr(N, 5) === te ? (r = te, N += 5) : (r = n, R === 0 && U(xe)), r !== n) {
|
|
722
|
+
if (i = Q(), i !== n) {
|
|
723
|
+
if (a = q(), a === n && (a = null), $(), e.charCodeAt(N) === 123 ? (o = "{", N++) : (o = n, R === 0 && U(w)), o !== n) {
|
|
724
|
+
for (s = [], c = cn(); c !== n;) s.push(c), c = cn();
|
|
725
|
+
c = X(), e.charCodeAt(N) === 125 ? (l = "}", N++) : (l = n, R === 0 && U(T)), l === n ? (N = t, t = n) : (P = t, t = pt(a, s, c));
|
|
726
|
+
} else N = t, t = n;
|
|
727
|
+
} else N = t, t = n;
|
|
728
|
+
} else N = t, t = n;
|
|
729
|
+
return t;
|
|
730
|
+
}
|
|
731
|
+
function sn() {
|
|
732
|
+
let t, r, i, a, o, s, c, l;
|
|
733
|
+
if (t = N, e.substr(N, 9) === ne ? (r = ne, N += 9) : (r = n, R === 0 && U(Se)), r !== n) {
|
|
734
|
+
if (i = Q(), i !== n) {
|
|
735
|
+
if (a = K(), a !== n) {
|
|
736
|
+
if ($(), e.charCodeAt(N) === 123 ? (o = "{", N++) : (o = n, R === 0 && U(w)), o !== n) {
|
|
737
|
+
for (s = [], c = W(); c !== n;) s.push(c), c = W();
|
|
738
|
+
c = X(), e.charCodeAt(N) === 125 ? (l = "}", N++) : (l = n, R === 0 && U(T)), l === n ? (N = t, t = n) : (P = t, t = mt(a, s, c));
|
|
739
|
+
} else N = t, t = n;
|
|
740
|
+
} else N = t, t = n;
|
|
741
|
+
} else N = t, t = n;
|
|
742
|
+
} else N = t, t = n;
|
|
743
|
+
return t;
|
|
744
|
+
}
|
|
745
|
+
function cn() {
|
|
746
|
+
let t, r, i, a, o;
|
|
747
|
+
if (t = N, r = X(), i = Kt(), i === n && (i = Qt(), i === n && (i = $t(), i === n && (i = en(), i === n && (i = nn(), i === n && (i = rn(), i === n && (i = tn(), i === n && (i = an(), i === n && (i = sn(), i === n && (i = ln()))))))))), i !== n) {
|
|
748
|
+
for (a = [], o = e.charAt(N), v.test(o) ? N++ : (o = n, R === 0 && U(E)); o !== n;) a.push(o), o = e.charAt(N), v.test(o) ? N++ : (o = n, R === 0 && U(E));
|
|
749
|
+
o = Z(), o === n && (o = null), Y(), P = t, t = ht(r, i, o);
|
|
750
|
+
} else N = t, t = n;
|
|
751
|
+
return t;
|
|
752
|
+
}
|
|
753
|
+
function W() {
|
|
754
|
+
let t, r, i, a;
|
|
755
|
+
if (t = N, $(), r = ln(), r !== n) {
|
|
756
|
+
for (i = [], a = e.charAt(N), v.test(a) ? N++ : (a = n, R === 0 && U(E)); a !== n;) i.push(a), a = e.charAt(N), v.test(a) ? N++ : (a = n, R === 0 && U(E));
|
|
757
|
+
a = Z(), a === n && (a = null), Y(), P = t, t = gt(r, a);
|
|
758
|
+
} else N = t, t = n;
|
|
759
|
+
return t;
|
|
760
|
+
}
|
|
761
|
+
function ln() {
|
|
762
|
+
let t, r, i, a;
|
|
763
|
+
return t = N, r = un(), r === n ? (N = t, t = n) : ($(), e.charCodeAt(N) === 61 ? (i = "=", N++) : (i = n, R === 0 && U(ue)), i === n ? (N = t, t = n) : ($(), a = G(), a === n ? (N = t, t = n) : (P = t, t = _t(r, a)))), t;
|
|
764
|
+
}
|
|
765
|
+
function un() {
|
|
766
|
+
let e;
|
|
767
|
+
return e = q(), e === n && (e = K()), e;
|
|
768
|
+
}
|
|
769
|
+
function G() {
|
|
770
|
+
let t, r, i;
|
|
771
|
+
return t = N, r = dn(), r === n ? (N = t, t = n) : (e.charCodeAt(N) === 37 ? (i = "%", N++) : (i = n, R === 0 && U(Ce)), i === n ? (N = t, t = n) : (P = t, t = vt(r))), t === n && (t = N, r = dn(), r !== n && (P = t, r = yt(r)), t = r, t === n && (t = N, r = q(), r !== n && (P = t, r = bt(r)), t = r, t === n && (t = N, r = K(), r !== n && (P = t, r = xt(r)), t = r))), t;
|
|
772
|
+
}
|
|
773
|
+
function K() {
|
|
774
|
+
let t, r, i, a, o;
|
|
775
|
+
if (R++, t = N, r = N, i = e.charAt(N), ie.test(i) ? N++ : (i = n, R === 0 && U(Te)), i !== n) {
|
|
776
|
+
for (a = [], o = e.charAt(N), ae.test(o) ? N++ : (o = n, R === 0 && U(Ee)); o !== n;) a.push(o), o = e.charAt(N), ae.test(o) ? N++ : (o = n, R === 0 && U(Ee));
|
|
777
|
+
i = [i, a], r = i;
|
|
778
|
+
} else N = r, r = n;
|
|
779
|
+
return t = r === n ? r : e.substring(t, N), R--, t === n && (r = n, R === 0 && U(we)), t;
|
|
780
|
+
}
|
|
781
|
+
function dn() {
|
|
782
|
+
let t, r, i, a, o, s, c, l, u, d;
|
|
783
|
+
if (t = N, r = N, i = N, e.charCodeAt(N) === 45 ? (a = "-", N++) : (a = n, R === 0 && U(De)), a === n && (a = null), o = N, e.charCodeAt(N) === 46 ? (s = ".", N++) : (s = n, R === 0 && U(Oe)), s !== n) {
|
|
784
|
+
if (c = [], l = e.charAt(N), y.test(l) ? N++ : (l = n, R === 0 && U(D)), l !== n) for (; l !== n;) c.push(l), l = e.charAt(N), y.test(l) ? N++ : (l = n, R === 0 && U(D));
|
|
785
|
+
else c = n;
|
|
786
|
+
c === n ? (N = o, o = n) : (s = [s, c], o = s);
|
|
787
|
+
} else N = o, o = n;
|
|
788
|
+
if (o === n) {
|
|
789
|
+
if (o = N, s = [], c = e.charAt(N), y.test(c) ? N++ : (c = n, R === 0 && U(D)), c !== n) for (; c !== n;) s.push(c), c = e.charAt(N), y.test(c) ? N++ : (c = n, R === 0 && U(D));
|
|
790
|
+
else s = n;
|
|
791
|
+
if (s !== n) {
|
|
792
|
+
if (c = N, e.charCodeAt(N) === 46 ? (l = ".", N++) : (l = n, R === 0 && U(Oe)), l !== n) {
|
|
793
|
+
for (u = [], d = e.charAt(N), y.test(d) ? N++ : (d = n, R === 0 && U(D)); d !== n;) u.push(d), d = e.charAt(N), y.test(d) ? N++ : (d = n, R === 0 && U(D));
|
|
794
|
+
l = [l, u], c = l;
|
|
795
|
+
} else N = c, c = n;
|
|
796
|
+
c === n && (c = null), s = [s, c], o = s;
|
|
797
|
+
} else N = o, o = n;
|
|
798
|
+
}
|
|
799
|
+
if (o !== n) {
|
|
800
|
+
if (s = N, c = e.charAt(N), oe.test(c) ? N++ : (c = n, R === 0 && U(ke)), c !== n) {
|
|
801
|
+
if (l = e.charAt(N), b.test(l) ? N++ : (l = n, R === 0 && U(Ae)), l === n && (l = null), u = [], d = e.charAt(N), y.test(d) ? N++ : (d = n, R === 0 && U(D)), d !== n) for (; d !== n;) u.push(d), d = e.charAt(N), y.test(d) ? N++ : (d = n, R === 0 && U(D));
|
|
802
|
+
else u = n;
|
|
803
|
+
u === n ? (N = s, s = n) : (c = [
|
|
804
|
+
c,
|
|
805
|
+
l,
|
|
806
|
+
u
|
|
807
|
+
], s = c);
|
|
808
|
+
} else N = s, s = n;
|
|
809
|
+
s === n && (s = null), a = [
|
|
810
|
+
a,
|
|
811
|
+
o,
|
|
812
|
+
s
|
|
813
|
+
], i = a;
|
|
814
|
+
} else N = i, i = n;
|
|
815
|
+
return r = i === n ? i : e.substring(r, N), r !== n && (P = t, r = St(r)), t = r, t;
|
|
816
|
+
}
|
|
817
|
+
function q() {
|
|
818
|
+
let t, r, i, a;
|
|
819
|
+
if (R++, t = N, e.charCodeAt(N) === 34 ? (r = "\"", N++) : (r = n, R === 0 && U(Me)), r !== n) {
|
|
820
|
+
for (i = [], a = fn(); a !== n;) i.push(a), a = fn();
|
|
821
|
+
e.charCodeAt(N) === 34 ? (a = "\"", N++) : (a = n, R === 0 && U(Me)), a === n ? (N = t, t = n) : (P = t, t = Ct(i));
|
|
822
|
+
} else N = t, t = n;
|
|
823
|
+
return R--, t === n && (r = n, R === 0 && U(je)), t;
|
|
824
|
+
}
|
|
825
|
+
function fn() {
|
|
826
|
+
let t, r, i;
|
|
827
|
+
return t = N, e.charCodeAt(N) === 92 ? (r = "\\", N++) : (r = n, R === 0 && U(Ne)), r === n ? (N = t, t = n) : (i = pn(), i === n ? (N = t, t = n) : (P = t, t = wt(i))), t === n && (t = e.charAt(N), se.test(t) ? N++ : (t = n, R === 0 && U(Pe))), t;
|
|
828
|
+
}
|
|
829
|
+
function pn() {
|
|
830
|
+
let t, r, i, a, o, s, c, l;
|
|
831
|
+
return t = N, e.charCodeAt(N) === 34 ? (r = "\"", N++) : (r = n, R === 0 && U(Me)), r !== n && (P = t, r = Tt()), t = r, t === n && (t = N, e.charCodeAt(N) === 92 ? (r = "\\", N++) : (r = n, R === 0 && U(Ne)), r !== n && (P = t, r = Et()), t = r, t === n && (t = N, e.charCodeAt(N) === 110 ? (r = "n", N++) : (r = n, R === 0 && U(Fe)), r !== n && (P = t, r = Dt()), t = r, t === n && (t = N, e.charCodeAt(N) === 114 ? (r = "r", N++) : (r = n, R === 0 && U(Ie)), r !== n && (P = t, r = Ot()), t = r, t === n && (t = N, e.charCodeAt(N) === 116 ? (r = "t", N++) : (r = n, R === 0 && U(Le)), r !== n && (P = t, r = kt()), t = r, t === n && (t = N, e.charCodeAt(N) === 117 ? (r = "u", N++) : (r = n, R === 0 && U(Re)), r === n ? (N = t, t = n) : (i = N, a = N, o = e.charAt(N), x.test(o) ? N++ : (o = n, R === 0 && U(O)), o === n ? (N = a, a = n) : (s = e.charAt(N), x.test(s) ? N++ : (s = n, R === 0 && U(O)), s === n ? (N = a, a = n) : (c = e.charAt(N), x.test(c) ? N++ : (c = n, R === 0 && U(O)), c === n ? (N = a, a = n) : (l = e.charAt(N), x.test(l) ? N++ : (l = n, R === 0 && U(O)), l === n ? (N = a, a = n) : (o = [
|
|
832
|
+
o,
|
|
833
|
+
s,
|
|
834
|
+
c,
|
|
835
|
+
l
|
|
836
|
+
], a = o)))), i = a === n ? a : e.substring(i, N), i === n ? (N = t, t = n) : (P = t, t = At(i))), t === n && (t = N, e.length > N ? (r = e.charAt(N), N++) : (r = n, R === 0 && U(k)), r !== n && (P = t, r = jt(r)), t = r)))))), t;
|
|
837
|
+
}
|
|
838
|
+
function J() {
|
|
839
|
+
let e;
|
|
840
|
+
return e = mn(), e === n && (e = hn()), e;
|
|
841
|
+
}
|
|
842
|
+
function mn() {
|
|
843
|
+
let t, r, i, a;
|
|
844
|
+
if (t = N, e.substr(N, 2) === "//" ? (r = "//", N += 2) : (r = n, R === 0 && U(ze)), r !== n) {
|
|
845
|
+
for (i = [], a = e.charAt(N), S.test(a) ? N++ : (a = n, R === 0 && U(A)); a !== n;) i.push(a), a = e.charAt(N), S.test(a) ? N++ : (a = n, R === 0 && U(A));
|
|
846
|
+
r = [r, i], t = r;
|
|
847
|
+
} else N = t, t = n;
|
|
848
|
+
return t;
|
|
849
|
+
}
|
|
850
|
+
function hn() {
|
|
851
|
+
let t, r, i, a, o, s;
|
|
852
|
+
if (t = N, e.substr(N, 2) === "/*" ? (r = "/*", N += 2) : (r = n, R === 0 && U(Be)), r !== n) {
|
|
853
|
+
for (i = [], a = N, o = N, R++, e.substr(N, 2) === "*/" ? (s = "*/", N += 2) : (s = n, R === 0 && U(j)), R--, s === n ? o = void 0 : (N = o, o = n), o === n ? (N = a, a = n) : (e.length > N ? (s = e.charAt(N), N++) : (s = n, R === 0 && U(k)), s === n ? (N = a, a = n) : (o = [o, s], a = o)); a !== n;) i.push(a), a = N, o = N, R++, e.substr(N, 2) === "*/" ? (s = "*/", N += 2) : (s = n, R === 0 && U(j)), R--, s === n ? o = void 0 : (N = o, o = n), o === n ? (N = a, a = n) : (e.length > N ? (s = e.charAt(N), N++) : (s = n, R === 0 && U(k)), s === n ? (N = a, a = n) : (o = [o, s], a = o));
|
|
854
|
+
e.substr(N, 2) === "*/" ? (a = "*/", N += 2) : (a = n, R === 0 && U(j)), a === n ? (N = t, t = n) : (r = [
|
|
855
|
+
r,
|
|
856
|
+
i,
|
|
857
|
+
a
|
|
858
|
+
], t = r);
|
|
859
|
+
} else N = t, t = n;
|
|
860
|
+
return t;
|
|
861
|
+
}
|
|
862
|
+
function Y() {
|
|
863
|
+
let t, r;
|
|
864
|
+
for (R++, t = [], r = e.charAt(N), C.test(r) ? N++ : (r = n, R === 0 && U(M)); r !== n;) t.push(r), r = e.charAt(N), C.test(r) ? N++ : (r = n, R === 0 && U(M));
|
|
865
|
+
return R--, t;
|
|
866
|
+
}
|
|
867
|
+
function X() {
|
|
868
|
+
let e, t, r, i;
|
|
869
|
+
for (e = N, t = [], r = N, Y(), i = Z(), i === n ? (N = r, r = n) : (P = r, r = Mt(i)); r !== n;) t.push(r), r = N, Y(), i = Z(), i === n ? (N = r, r = n) : (P = r, r = Mt(i));
|
|
870
|
+
return r = Y(), P = e, e = Nt(t), e;
|
|
871
|
+
}
|
|
872
|
+
function Z() {
|
|
873
|
+
let t, r, i, a, o, s, c;
|
|
874
|
+
if (t = N, e.substr(N, 2) === "//" ? (r = "//", N += 2) : (r = n, R === 0 && U(ze)), r !== n) {
|
|
875
|
+
for (i = N, a = [], o = e.charAt(N), S.test(o) ? N++ : (o = n, R === 0 && U(A)); o !== n;) a.push(o), o = e.charAt(N), S.test(o) ? N++ : (o = n, R === 0 && U(A));
|
|
876
|
+
i = e.substring(i, N), P = t, t = Pt(i);
|
|
877
|
+
} else N = t, t = n;
|
|
878
|
+
if (t === n) {
|
|
879
|
+
if (t = N, e.substr(N, 2) === "/*" ? (r = "/*", N += 2) : (r = n, R === 0 && U(Be)), r !== n) {
|
|
880
|
+
for (i = N, a = [], o = N, s = N, R++, e.substr(N, 2) === "*/" ? (c = "*/", N += 2) : (c = n, R === 0 && U(j)), R--, c === n ? s = void 0 : (N = s, s = n), s === n ? (N = o, o = n) : (e.length > N ? (c = e.charAt(N), N++) : (c = n, R === 0 && U(k)), c === n ? (N = o, o = n) : (s = [s, c], o = s)); o !== n;) a.push(o), o = N, s = N, R++, e.substr(N, 2) === "*/" ? (c = "*/", N += 2) : (c = n, R === 0 && U(j)), R--, c === n ? s = void 0 : (N = s, s = n), s === n ? (N = o, o = n) : (e.length > N ? (c = e.charAt(N), N++) : (c = n, R === 0 && U(k)), c === n ? (N = o, o = n) : (s = [s, c], o = s));
|
|
881
|
+
i = e.substring(i, N), e.substr(N, 2) === "*/" ? (a = "*/", N += 2) : (a = n, R === 0 && U(j)), a === n ? (N = t, t = n) : (P = t, t = Ft(i));
|
|
882
|
+
} else N = t, t = n;
|
|
883
|
+
}
|
|
884
|
+
return t;
|
|
885
|
+
}
|
|
886
|
+
function Q() {
|
|
887
|
+
let t, r;
|
|
888
|
+
if (R++, t = [], r = e.charAt(N), C.test(r) ? N++ : (r = n, R === 0 && U(M)), r === n && (r = J()), r !== n) for (; r !== n;) t.push(r), r = e.charAt(N), C.test(r) ? N++ : (r = n, R === 0 && U(M)), r === n && (r = J());
|
|
889
|
+
else t = n;
|
|
890
|
+
return R--, t === n && (r = n, R === 0 && U(Ve)), t;
|
|
891
|
+
}
|
|
892
|
+
function $() {
|
|
893
|
+
let t, r;
|
|
894
|
+
for (R++, t = [], r = e.charAt(N), C.test(r) ? N++ : (r = n, R === 0 && U(M)), r === n && (r = J()); r !== n;) t.push(r), r = e.charAt(N), C.test(r) ? N++ : (r = n, R === 0 && U(M)), r === n && (r = J());
|
|
895
|
+
return R--, t;
|
|
896
|
+
}
|
|
897
|
+
z = l();
|
|
898
|
+
let gn = z !== n && N === e.length;
|
|
899
|
+
function _n() {
|
|
900
|
+
throw z !== n && N < e.length && U(Rt()), Ut(L, I < e.length ? It(I) : null, I < e.length ? Vt(I, I + 1) : Vt(I, I));
|
|
901
|
+
}
|
|
902
|
+
if (t.peg$library) return {
|
|
903
|
+
peg$result: z,
|
|
904
|
+
peg$currPos: N,
|
|
905
|
+
peg$FAILED: n,
|
|
906
|
+
peg$maxFailExpected: L,
|
|
907
|
+
peg$maxFailPos: I,
|
|
908
|
+
peg$success: gn,
|
|
909
|
+
peg$throw: gn ? void 0 : _n
|
|
910
|
+
};
|
|
911
|
+
if (gn) return z;
|
|
912
|
+
_n();
|
|
913
|
+
}
|
|
914
|
+
//#endregion
|
|
915
|
+
//#region src/dsl/parser.ts
|
|
916
|
+
function c(e) {
|
|
917
|
+
try {
|
|
918
|
+
return s(e);
|
|
919
|
+
} catch (e) {
|
|
920
|
+
if (e instanceof Error && "location" in e) {
|
|
921
|
+
let t = e.location, n = /* @__PURE__ */ SyntaxError(`${e.message} at ${t.start.line}:${t.start.column}`);
|
|
922
|
+
throw n.location = t, n;
|
|
923
|
+
}
|
|
924
|
+
throw e;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
//#endregion
|
|
928
|
+
//#region src/runtime/chart-css.ts
|
|
929
|
+
var l = "\n/* Blueprint Chart — Runtime Embed Styles\n CSS custom properties with baked-in defaults for standalone iframe usage. */\n\n.bc-frame {\n --bc-frame-font-family: system-ui, -apple-system, sans-serif;\n --bc-frame-padding: 0;\n /* Per-side properties so a multi-value `padding` shorthand never lands in a\n single-value shorthand slot, which would invalidate the whole declaration. */\n --bc-frame-padding-top: var(--bc-frame-padding);\n --bc-frame-padding-right: var(--bc-frame-padding);\n --bc-frame-padding-bottom: var(--bc-frame-padding);\n --bc-frame-padding-left: var(--bc-frame-padding);\n --bc-frame-bg: #fff;\n --bc-text-color: #333;\n font-family: var(--bc-frame-font-family);\n background: var(--bc-frame-bg);\n /* currentColor marks (e.g. above-bar value labels) follow the theme text\n colour, not the ambient document colour. */\n color: var(--bc-text-color, #333);\n}\n\n/* Keeps the SVG's baked-in background rect (applyCanvasBackground) in sync\n with the frame background; transparentBackground sets the var to\n transparent at runtime. */\n.bc-frame .bc-canvas-bg {\n fill: var(--bc-frame-bg, #fff);\n}\n\n/* `theme = \"dark\"` emits this class on the frame, so it carries the same\n surface the document-level dark mode does, without depending on an ambient\n data-bs-theme. Keep in sync with DARK_THEME in render/frame-svg.ts. */\n.bc-frame.bc-theme-dark {\n --bc-frame-bg: #1c1c1c;\n --bc-text-color: rgba(255, 255, 255, 0.9);\n --bc-axis-color: rgba(255, 255, 255, 0.6);\n --bc-grid-color: #333;\n\n color: rgba(255, 255, 255, 0.9);\n}\n\n.bc-frame-header {\n padding: var(--bc-frame-padding-top) var(--bc-frame-padding-right) 0 var(--bc-frame-padding-left);\n background: var(--bc-frame-header-bg, transparent);\n border-bottom: var(--bc-frame-header-border-bottom, none);\n margin-bottom: var(--bc-frame-header-margin-bottom, 0);\n}\n\n.bc-frame-body {\n padding: 0 var(--bc-frame-padding-right) 0 var(--bc-frame-padding-left);\n}\n\n/* Constrained-height mode (`heightMode` fixed or aspect-ratio). post-render.ts\n adds .bc-frame--constrained and layout-constraints.ts pins the container\n height with overflow: hidden; without these rules the frame renders at its\n natural height and is guillotined. Mirrors chart.scss — keep the two in\n sync. */\n/* An axis label moved inside the plot sits directly on the marks; painting the\n stroke first keeps it readable over a filled band. */\n.bc-axis-label-inside {\n paint-order: stroke;\n stroke: var(--bc-frame-bg, #fff);\n stroke-width: 3px;\n stroke-linejoin: round;\n}\n\n.bc-frame--constrained {\n flex: 1;\n position: relative;\n min-height: 0;\n overflow: hidden;\n}\n\n.bc-frame--constrained .bc-frame-header {\n position: relative;\n z-index: 1;\n background: var(--bc-frame-header-bg, var(--bc-frame-bg, #fff));\n}\n\n.bc-frame--constrained .bc-frame-body {\n position: absolute;\n inset: 0;\n z-index: 0;\n overflow: hidden;\n}\n\n.bc-frame--constrained .bc-frame-note {\n position: absolute;\n bottom: var(--bc-footer-h, 0);\n left: 0;\n right: 0;\n z-index: 1;\n}\n\n.bc-frame--constrained .bc-frame-footer {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 1;\n}\n\n.bc-frame-title {\n --bc-frame-title-color: var(--bc-text-color, #333);\n --bc-frame-title-font-size: 1.25rem;\n color: var(--bc-frame-title-color);\n font-size: var(--bc-frame-title-font-size);\n font-weight: bold;\n margin: 0;\n white-space: pre-line;\n}\n\n.bc-frame-description {\n --bc-frame-description-color: var(--bc-text-color, #555);\n --bc-frame-description-font-size: 0.875rem;\n color: var(--bc-frame-description-color);\n font-size: var(--bc-frame-description-font-size);\n margin: 0.25rem 0 0;\n white-space: pre-line;\n}\n\n.bc-frame-footer {\n margin-top: 0.5rem;\n gap: 0.25rem 1rem;\n padding: var(--bc-frame-footer-padding-top, 0) var(--bc-frame-padding-right) var(--bc-frame-padding-bottom) var(--bc-frame-padding-left);\n background: var(--bc-frame-footer-bg, transparent);\n border-top: var(--bc-frame-footer-border-top, none);\n}\n\n.bc-frame-footer-left {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 0.25rem 0.75rem;\n}\n\n.bc-frame-footer-left > :not(:first-child)::before {\n content: \"\\00B7\";\n margin-right: 0.5rem;\n color: var(--bc-text-color, #888);\n}\n\n.bc-frame-footer-right {\n display: flex;\n align-items: center;\n}\n\n.bc-frame-note {\n --bc-frame-note-color: var(--bc-text-color, #888);\n --bc-frame-note-font-size: 0.75rem;\n font-style: italic;\n color: var(--bc-frame-note-color);\n font-size: var(--bc-frame-note-font-size);\n margin: 0;\n padding: 0 var(--bc-frame-padding-right) 0 var(--bc-frame-padding-left);\n}\n\n.bc-frame-byline,\n.bc-frame-source,\n.bc-frame-get-the-data {\n --bc-frame-meta-color: var(--bc-text-color, #888);\n --bc-frame-meta-font-size: 0.75rem;\n color: var(--bc-frame-meta-color);\n font-size: var(--bc-frame-meta-font-size);\n}\n\n.bc-frame-byline {\n white-space: pre-line;\n}\n\n.bc-frame-credit {\n --bc-frame-credit-color: var(--bc-text-color, #666);\n --bc-frame-credit-font-size: 0.75rem;\n color: var(--bc-frame-credit-color);\n font-size: var(--bc-frame-credit-font-size);\n font-weight: 600;\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n}\n\n.bc-frame-source-link {\n color: inherit;\n text-decoration: underline;\n}\n\n.bc-axis .domain {\n stroke: var(--bc-axis-color, #333);\n}\n\n.bc-axis .tick text {\n fill: var(--bc-axis-color, #333);\n font-size: 10px;\n}\n\n.bc-axis .tick line {\n stroke: var(--bc-axis-color, #333);\n}\n\n.bc-grid-line {\n stroke: var(--bc-grid-color, #e0e0e0);\n stroke-width: 1;\n}\n\n.bc-zero-baseline {\n stroke: #666;\n stroke-width: 1;\n}\n\n.bc-bar {\n /* fill is set via D3 .attr() from data-bound colors — do not override */\n}\n\n.bc-line {\n fill: none;\n stroke-width: 2;\n}\n\n.bc-value-label {\n font-size: 11px;\n /* fill is set via D3 .attr() — do not override */\n}\n\n.bc-direct-label {\n font-size: 12px;\n font-weight: 600;\n}\n\n.bc-tooltip {\n position: absolute;\n pointer-events: none;\n background: var(--bc-tooltip-bg, #fff);\n color: var(--bc-tooltip-color, #212529);\n border: 1px solid var(--bc-tooltip-border-color, #dee2e6);\n border-radius: 4px;\n padding: 6px 10px;\n font-size: 13px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.12);\n max-width: var(--bc-tooltip-max-width, 240px);\n overflow-wrap: break-word;\n z-index: 9999;\n display: none;\n}\n\n.bc-crosshair {\n stroke: #999;\n stroke-width: 1;\n pointer-events: none;\n}\n\n.bc-arc-label-line {\n fill: none;\n stroke: #999;\n stroke-width: 1;\n}\n\n.bc-theme-blueprint-framed {\n --bc-frame-header-border-bottom: 1px solid #e0e0e0;\n --bc-frame-header-margin-bottom: 0.5rem;\n --bc-frame-footer-bg: #f8f8f8;\n --bc-frame-footer-border-top: 1px solid #e0e0e0;\n --bc-frame-footer-padding-top: 0.625rem;\n}\n\n[data-bs-theme=\"dark\"] .bc-frame.bc-theme-blueprint-bold:not([data-bs-theme=\"dark\"] [data-bs-theme=\"light\"] *) {\n --bc-frame-bg: #000000;\n --bc-text-color: rgba(255, 255, 255, 0.95);\n --bc-axis-color: rgba(255, 255, 255, 0.7);\n --bc-grid-color: rgba(255, 255, 255, 0.12);\n}\n\n.blueprint-chart-error {\n color: red;\n padding: 1em;\n border: 1px solid red;\n}\n\nbody {\n margin: 0;\n overflow: hidden;\n}\n\n/* Dark theme: activated by data-bs-theme=\"dark\" on the document (matching the\n editor's convention). The chart owns these colors; the dark frame background\n also drives the renderer's resolveBackgroundColor, so data-mark colors and\n contrast labels adapt at render time. Scoped to .bc-frame so these override\n the frame's own light --bc-frame-bg / --bc-text-color declarations (which are\n set on .bc-frame and would otherwise shadow a document-level override). */\n[data-bs-theme=\"dark\"] body {\n /* color themes above-bar value labels (fill: currentColor). */\n background: #1c1c1c;\n color: rgba(255, 255, 255, 0.9);\n}\n\n[data-bs-theme=\"dark\"] .bc-frame {\n --bc-frame-bg: #1c1c1c;\n --bc-text-color: rgba(255, 255, 255, 0.9);\n --bc-axis-color: rgba(255, 255, 255, 0.6);\n --bc-grid-color: #333;\n\n color: rgba(255, 255, 255, 0.9);\n}\n", u = "blueprint-chart-resize", d = "blueprint-chart-error";
|
|
930
|
+
function f(e) {
|
|
931
|
+
return typeof e == "object" && e && e.type === "blueprint-chart-resize" && typeof e.height == "number" ? e.height : null;
|
|
932
|
+
}
|
|
933
|
+
function p(e) {
|
|
934
|
+
return typeof e == "object" && !!e && e.type === "blueprint-chart-error";
|
|
935
|
+
}
|
|
936
|
+
//#endregion
|
|
937
|
+
//#region src/runtime/player-css.ts
|
|
938
|
+
var m = "/* Blueprint Chart — Scene player styles, shared by the editor and the embed.\n Light colors live in var() fallbacks; only dark mode defines the tokens. */\n\n[data-bs-theme=\"dark\"] .bc-frame:not([data-bs-theme=\"dark\"] [data-bs-theme=\"light\"] *),\n.bc-frame.bc-theme-dark {\n --bc-scene-player-text: #e6e6e6;\n --bc-scene-player-muted: #a8a5a0;\n --bc-scene-player-border: #6b6966;\n --bc-scene-player-border-hover: #a8a5a0;\n --bc-scene-player-background-hover: rgba(255, 255, 255, 0.06);\n --bc-scene-player-track: #6b6966;\n --bc-scene-player-accent: #4a7fd0;\n --bc-scene-player-accent-hover: #5b8fdc;\n}\n\n.bc-scene-player--buttons {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 0.25rem 0 0;\n width: 100%;\n}\n\n.bc-scene-player--buttons.bc-scene-player--left {\n justify-content: flex-start;\n gap: 16px;\n}\n\n.bc-scene-player--buttons.bc-scene-player--left .bc-scene-player__counter {\n margin-left: auto;\n}\n\n.bc-scene-player--buttons.bc-scene-player--center {\n justify-content: center;\n gap: 16px;\n}\n\n.bc-scene-player--buttons.bc-scene-player--right {\n justify-content: flex-end;\n gap: 16px;\n}\n\n.bc-scene-player--dot-stepper,\n.bc-scene-player--minimal-arrows {\n display: flex;\n align-items: center;\n padding: 0.25rem 0 0;\n width: 100%;\n}\n\n.bc-scene-player--dot-stepper {\n gap: 0.375rem;\n}\n\n.bc-scene-player--minimal-arrows {\n gap: 4px;\n}\n\n.bc-scene-player--dot-stepper.bc-scene-player--left,\n.bc-scene-player--minimal-arrows.bc-scene-player--left {\n justify-content: flex-start;\n}\n\n.bc-scene-player--dot-stepper.bc-scene-player--center,\n.bc-scene-player--minimal-arrows.bc-scene-player--center {\n justify-content: center;\n}\n\n.bc-scene-player--dot-stepper.bc-scene-player--right,\n.bc-scene-player--minimal-arrows.bc-scene-player--right {\n justify-content: flex-end;\n}\n\n.bc-scene-player--progress-bar {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.25rem 0 0;\n width: 100%;\n}\n\n.bc-scene-player__btn-group {\n display: flex;\n gap: 6px;\n}\n\n.bc-scene-player__btn-group__btn {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 6px 14px;\n border-radius: 6px;\n border: 1px solid var(--bc-scene-player-border, currentColor);\n background: none;\n color: var(--bc-scene-player-muted);\n font-size: var(--bs-font-size-sm, 0.875rem);\n font-weight: 500;\n cursor: pointer;\n transition: border-color var(--bc-duration-base, 150ms), color var(--bc-duration-base, 150ms);\n line-height: 1.4;\n}\n\n.bc-scene-player__btn-group__btn:hover:not(:disabled) {\n border-color: var(--bc-scene-player-border-hover);\n background: var(--bc-scene-player-background-hover, rgba(0, 0, 0, 0.04));\n color: var(--bc-scene-player-text);\n}\n\n.bc-scene-player__btn-group__btn--next {\n color: var(--bc-scene-player-text);\n font-weight: 600;\n}\n\n.bc-scene-player__btn-group__btn--disabled {\n opacity: 0.35;\n cursor: default;\n}\n\n.bc-scene-player__nav-btn {\n width: 24px;\n height: 24px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: 1px solid var(--bc-scene-player-border, #e2e0db);\n color: var(--bc-scene-player-muted, #9b9893);\n cursor: pointer;\n flex-shrink: 0;\n padding: 0;\n}\n\n.bc-scene-player__nav-btn:hover:not(:disabled) {\n border-color: var(--bc-scene-player-border-hover, #6b6966);\n color: var(--bc-scene-player-text, #1a1a1a);\n}\n\n.bc-scene-player__nav-btn:disabled {\n opacity: 0.3;\n cursor: default;\n}\n\n.bc-scene-player__play-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--bc-scene-player-accent, #2c5aa0);\n border: none;\n color: #fff;\n cursor: pointer;\n flex-shrink: 0;\n padding: 0;\n transition: background var(--bc-duration-base, 150ms) ease;\n}\n\n.bc-scene-player__play-btn:hover {\n background: var(--bc-scene-player-accent-hover, #1e4888);\n}\n\n.bc-scene-player--dot-stepper .bc-scene-player__play-btn {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n}\n\n.bc-scene-player--minimal-arrows .bc-scene-player__play-btn {\n width: 26px;\n height: 26px;\n border-radius: 7px;\n}\n\n.bc-scene-player--progress-bar .bc-scene-player__play-btn {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n}\n\n.bc-scene-player__dots {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n\n.bc-scene-player__dots__dot {\n width: 8px;\n height: 8px;\n border-radius: 4px;\n border: none;\n padding: 0;\n cursor: pointer;\n background: var(--bc-scene-player-track, #e2e0db);\n opacity: 0.4;\n transition: width var(--bc-duration-slow, 250ms) ease, background var(--bc-duration-slow, 250ms) ease, opacity var(--bc-duration-slow, 250ms) ease;\n}\n\n.bc-scene-player__dots__dot--completed {\n background: var(--bc-scene-player-accent, #2c5aa0);\n opacity: 1;\n}\n\n.bc-scene-player__dots__dot--active {\n width: 20px;\n background: var(--bc-scene-player-accent, #2c5aa0);\n opacity: 1;\n}\n\n.bc-scene-player__dots__dot:hover {\n opacity: 0.8;\n}\n\n.bc-scene-player__segments {\n flex: 1;\n display: flex;\n gap: 3px;\n align-items: center;\n}\n\n.bc-scene-player__segments__segment {\n flex: 1;\n height: 4px;\n border-radius: 2px;\n border: none;\n padding: 0;\n cursor: pointer;\n background: var(--bc-scene-player-track, #e2e0db);\n opacity: 0.45;\n transition: height var(--bc-duration-slow, 250ms) ease, background var(--bc-duration-slow, 250ms) ease, opacity var(--bc-duration-slow, 250ms) ease;\n}\n\n.bc-scene-player__segments__segment--completed {\n background: var(--bc-scene-player-accent, #2c5aa0);\n opacity: 1;\n}\n\n.bc-scene-player__segments__segment--active {\n height: 6px;\n background: var(--bc-scene-player-accent, #2c5aa0);\n opacity: 1;\n}\n\n.bc-scene-player__segments__segment:hover {\n opacity: 0.8;\n}\n\n.bc-scene-player__counter {\n font-weight: 500;\n color: var(--bc-scene-player-muted, #9b9893);\n white-space: nowrap;\n font-variant-numeric: tabular-nums;\n}\n\n.bc-scene-player--buttons .bc-scene-player__counter {\n font-size: var(--bs-font-size-sm, 0.875rem);\n}\n\n.bc-scene-player--minimal-arrows .bc-scene-player__counter {\n font-size: var(--bs-font-size-xs, 0.75rem);\n margin-right: 4px;\n}\n\n.bc-scene-player--minimal-arrows .bc-scene-player__counter--end {\n margin-right: 0;\n margin-left: 4px;\n}\n\n.bc-scene-player--progress-bar .bc-scene-player__counter {\n font-size: var(--bs-font-size-xs, 0.75rem);\n flex-shrink: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .bc-scene-player,\n .bc-scene-player * {\n transition: none;\n }\n}\n", h = ee();
|
|
939
|
+
function ee() {
|
|
940
|
+
try {
|
|
941
|
+
if (typeof globalThis < "u") {
|
|
942
|
+
let e = globalThis.BLUEPRINT_CHART_RUNTIME_URL;
|
|
943
|
+
if (typeof e == "string" && e) return e;
|
|
944
|
+
}
|
|
945
|
+
return typeof document > "u" ? "" : document.currentScript?.src ?? "";
|
|
946
|
+
} catch {
|
|
947
|
+
return "";
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
var g = /* @__PURE__ */ new Map(), _ = null, te = [];
|
|
951
|
+
function ne() {
|
|
952
|
+
_ || (_ = (e) => {
|
|
953
|
+
for (let [t, n] of g) if (e.source === t.contentWindow) {
|
|
954
|
+
n(e);
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
}, window.addEventListener("message", _));
|
|
958
|
+
}
|
|
959
|
+
function v() {
|
|
960
|
+
ne(), document.querySelectorAll("script[type=\"application/blueprint-chart\"]").forEach(re);
|
|
961
|
+
}
|
|
962
|
+
function re(e) {
|
|
963
|
+
let t = e.textContent?.trim();
|
|
964
|
+
if (!t) return;
|
|
965
|
+
let r = document.createElement("iframe");
|
|
966
|
+
r.className = "blueprint-chart-iframe", r.style.cssText = "border: none; width: 100%; display: block;", r.setAttribute("sandbox", "allow-scripts"), r.setAttribute("title", "Blueprint Chart"), e.parentNode?.insertBefore(r, e);
|
|
967
|
+
let i = e.closest("[data-bs-theme]")?.getAttribute("data-bs-theme");
|
|
968
|
+
if (i === "light" || i === "dark") r.srcdoc = b(t, h, i);
|
|
969
|
+
else {
|
|
970
|
+
let e = n(), i = () => {
|
|
971
|
+
r.srcdoc = b(t, h, e?.matches ? "dark" : "light");
|
|
972
|
+
};
|
|
973
|
+
i(), e && (e.addEventListener("change", i), te.push(() => e.removeEventListener("change", i)));
|
|
974
|
+
}
|
|
975
|
+
g.set(r, (e) => {
|
|
976
|
+
let t = f(e.data);
|
|
977
|
+
if (t !== null) {
|
|
978
|
+
r.style.height = `${t}px`;
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
p(e.data) && console.warn("Blueprint Chart: could not render embed.", e.data.message);
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
var ie = [
|
|
985
|
+
"buttons",
|
|
986
|
+
"progress-bar",
|
|
987
|
+
"dot-stepper",
|
|
988
|
+
"minimal-arrows"
|
|
989
|
+
], ae = [
|
|
990
|
+
"left",
|
|
991
|
+
"center",
|
|
992
|
+
"right"
|
|
993
|
+
];
|
|
994
|
+
function y(e, t, n) {
|
|
995
|
+
return t.find((t) => t === e) ?? n;
|
|
996
|
+
}
|
|
997
|
+
function oe(e) {
|
|
998
|
+
let t;
|
|
999
|
+
try {
|
|
1000
|
+
t = c(e);
|
|
1001
|
+
} catch {
|
|
1002
|
+
return null;
|
|
1003
|
+
}
|
|
1004
|
+
let n = new Map(t.properties.map((e) => [e.key, e.value])), r = n.get("player");
|
|
1005
|
+
return !t.scenes.length || r === "none" ? null : {
|
|
1006
|
+
type: y(r, ie, "buttons"),
|
|
1007
|
+
position: y(n.get("playerPosition"), ae, "left"),
|
|
1008
|
+
total: t.scenes.length + 1
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
function b(e, t, n) {
|
|
1012
|
+
let r = t ? `<script src="${x(t)}"><\/script>` : "", i = n === "dark" ? "<html data-bs-theme=\"dark\">" : "<html>", a = t ? [
|
|
1013
|
+
"var chart = document.getElementById(\"chart\");",
|
|
1014
|
+
"function reportError(e) {",
|
|
1015
|
+
` parent.postMessage({ type: "${d}", message: String(e) }, "*");`,
|
|
1016
|
+
"}",
|
|
1017
|
+
"// Constrained frames size the plot from the footer height measured in the",
|
|
1018
|
+
"// previous render's animation frame, so render again once the player is in.",
|
|
1019
|
+
"function rerenderConstrained() {",
|
|
1020
|
+
" if (!chart.querySelector(\".bc-frame--constrained\")) {",
|
|
1021
|
+
" return;",
|
|
1022
|
+
" }",
|
|
1023
|
+
" try {",
|
|
1024
|
+
" window.BlueprintChart.renderBpc(chart, __BPC_SRC__);",
|
|
1025
|
+
" }",
|
|
1026
|
+
" catch (e) {",
|
|
1027
|
+
" reportError(e);",
|
|
1028
|
+
" }",
|
|
1029
|
+
"}",
|
|
1030
|
+
"try {",
|
|
1031
|
+
" window.BlueprintChart.renderBpc(chart, __BPC_SRC__);",
|
|
1032
|
+
" if (__BPC_PLAYER__) {",
|
|
1033
|
+
" window.BlueprintChart.mountScenePlayer(chart, __BPC_PLAYER__, function (step) {",
|
|
1034
|
+
" window.BlueprintChart.renderBpc(chart, __BPC_SRC__, { sceneIndex: step > 1 ? step - 2 : undefined, transition: true });",
|
|
1035
|
+
" });",
|
|
1036
|
+
" requestAnimationFrame(rerenderConstrained);",
|
|
1037
|
+
" }",
|
|
1038
|
+
"}",
|
|
1039
|
+
"catch (e) {",
|
|
1040
|
+
" reportError(e);",
|
|
1041
|
+
"}"
|
|
1042
|
+
] : [`parent.postMessage({ type: "${d}", message: "Blueprint Chart runtime URL unavailable" }, "*");`];
|
|
1043
|
+
return [
|
|
1044
|
+
"<!DOCTYPE html>",
|
|
1045
|
+
`${i}<head>`,
|
|
1046
|
+
`<style>${l}</style>`,
|
|
1047
|
+
`<style>${m}</style>`,
|
|
1048
|
+
"</head><body>",
|
|
1049
|
+
"<div id=\"chart\" class=\"blueprint-chart-container\"></div>",
|
|
1050
|
+
r,
|
|
1051
|
+
"<script>",
|
|
1052
|
+
`var __BPC_SRC__ = ${se(e)};`,
|
|
1053
|
+
`var __BPC_PLAYER__ = ${JSON.stringify(oe(e))};`,
|
|
1054
|
+
"function notifySize() {",
|
|
1055
|
+
" var h = document.documentElement.scrollHeight;",
|
|
1056
|
+
` parent.postMessage({ type: "${u}", height: h }, "*");`,
|
|
1057
|
+
"}",
|
|
1058
|
+
...a,
|
|
1059
|
+
"notifySize();",
|
|
1060
|
+
"new ResizeObserver(notifySize).observe(document.body);",
|
|
1061
|
+
"<\/script>",
|
|
1062
|
+
"</body></html>"
|
|
1063
|
+
].filter(Boolean).join("\n");
|
|
1064
|
+
}
|
|
1065
|
+
function se(e) {
|
|
1066
|
+
return JSON.stringify(e).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
1067
|
+
}
|
|
1068
|
+
function x(e) {
|
|
1069
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1070
|
+
}
|
|
1071
|
+
//#endregion
|
|
1072
|
+
export { p as a, n as c, u as i, t as l, v as n, f as o, d as r, c as s, b as t };
|