@floless/app 0.76.0 → 0.78.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/floless-server.cjs +848 -565
- package/dist/schemas/steel.takeoff.v1.schema.json +3 -2
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +25 -0
- package/dist/web/app.css +73 -0
- package/dist/web/aware.js +1 -1
- package/dist/web/steel-editor.html +18 -1
- package/dist/web/workspaces.js +229 -2
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -4415,10 +4415,10 @@ var require_redaction = __commonJS({
|
|
|
4415
4415
|
var strict = false;
|
|
4416
4416
|
function redaction(opts, serialize) {
|
|
4417
4417
|
const { paths, censor, remove } = handle(opts);
|
|
4418
|
-
const shape = paths.reduce((o,
|
|
4418
|
+
const shape = paths.reduce((o, str2) => {
|
|
4419
4419
|
rx.lastIndex = 0;
|
|
4420
|
-
const first = rx.exec(
|
|
4421
|
-
const next = rx.exec(
|
|
4420
|
+
const first = rx.exec(str2);
|
|
4421
|
+
const next = rx.exec(str2);
|
|
4422
4422
|
let ns = first[1] !== void 0 ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0];
|
|
4423
4423
|
if (ns === "*") {
|
|
4424
4424
|
ns = wildcardFirstSym;
|
|
@@ -4431,7 +4431,7 @@ var require_redaction = __commonJS({
|
|
|
4431
4431
|
return o;
|
|
4432
4432
|
}
|
|
4433
4433
|
const { index } = next;
|
|
4434
|
-
const nextPath = `${
|
|
4434
|
+
const nextPath = `${str2.substr(index, str2.length - 1)}`;
|
|
4435
4435
|
o[ns] = o[ns] || [];
|
|
4436
4436
|
if (ns !== wildcardFirstSym && o[ns].length === 0) {
|
|
4437
4437
|
o[ns].push(...o[wildcardFirstSym] || []);
|
|
@@ -4547,7 +4547,7 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
4547
4547
|
}
|
|
4548
4548
|
var argLen = args.length;
|
|
4549
4549
|
if (argLen === 0) return f;
|
|
4550
|
-
var
|
|
4550
|
+
var str2 = "";
|
|
4551
4551
|
var a = 1 - offset;
|
|
4552
4552
|
var lastPos = -1;
|
|
4553
4553
|
var flen = f && f.length || 0;
|
|
@@ -4562,8 +4562,8 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
4562
4562
|
break;
|
|
4563
4563
|
if (args[a] == null) break;
|
|
4564
4564
|
if (lastPos < i)
|
|
4565
|
-
|
|
4566
|
-
|
|
4565
|
+
str2 += f.slice(lastPos, i);
|
|
4566
|
+
str2 += Number(args[a]);
|
|
4567
4567
|
lastPos = i + 2;
|
|
4568
4568
|
i++;
|
|
4569
4569
|
break;
|
|
@@ -4572,8 +4572,8 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
4572
4572
|
break;
|
|
4573
4573
|
if (args[a] == null) break;
|
|
4574
4574
|
if (lastPos < i)
|
|
4575
|
-
|
|
4576
|
-
|
|
4575
|
+
str2 += f.slice(lastPos, i);
|
|
4576
|
+
str2 += Math.floor(Number(args[a]));
|
|
4577
4577
|
lastPos = i + 2;
|
|
4578
4578
|
i++;
|
|
4579
4579
|
break;
|
|
@@ -4586,21 +4586,21 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
4586
4586
|
break;
|
|
4587
4587
|
if (args[a] === void 0) break;
|
|
4588
4588
|
if (lastPos < i)
|
|
4589
|
-
|
|
4589
|
+
str2 += f.slice(lastPos, i);
|
|
4590
4590
|
var type = typeof args[a];
|
|
4591
4591
|
if (type === "string") {
|
|
4592
|
-
|
|
4592
|
+
str2 += "'" + args[a] + "'";
|
|
4593
4593
|
lastPos = i + 2;
|
|
4594
4594
|
i++;
|
|
4595
4595
|
break;
|
|
4596
4596
|
}
|
|
4597
4597
|
if (type === "function") {
|
|
4598
|
-
|
|
4598
|
+
str2 += args[a].name || "<anonymous>";
|
|
4599
4599
|
lastPos = i + 2;
|
|
4600
4600
|
i++;
|
|
4601
4601
|
break;
|
|
4602
4602
|
}
|
|
4603
|
-
|
|
4603
|
+
str2 += ss(args[a]);
|
|
4604
4604
|
lastPos = i + 2;
|
|
4605
4605
|
i++;
|
|
4606
4606
|
break;
|
|
@@ -4608,15 +4608,15 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
4608
4608
|
if (a >= argLen)
|
|
4609
4609
|
break;
|
|
4610
4610
|
if (lastPos < i)
|
|
4611
|
-
|
|
4612
|
-
|
|
4611
|
+
str2 += f.slice(lastPos, i);
|
|
4612
|
+
str2 += String(args[a]);
|
|
4613
4613
|
lastPos = i + 2;
|
|
4614
4614
|
i++;
|
|
4615
4615
|
break;
|
|
4616
4616
|
case 37:
|
|
4617
4617
|
if (lastPos < i)
|
|
4618
|
-
|
|
4619
|
-
|
|
4618
|
+
str2 += f.slice(lastPos, i);
|
|
4619
|
+
str2 += "%";
|
|
4620
4620
|
lastPos = i + 2;
|
|
4621
4621
|
i++;
|
|
4622
4622
|
a--;
|
|
@@ -4629,9 +4629,9 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
4629
4629
|
if (lastPos === -1)
|
|
4630
4630
|
return f;
|
|
4631
4631
|
else if (lastPos < flen) {
|
|
4632
|
-
|
|
4632
|
+
str2 += f.slice(lastPos);
|
|
4633
4633
|
}
|
|
4634
|
-
return
|
|
4634
|
+
return str2;
|
|
4635
4635
|
}
|
|
4636
4636
|
}
|
|
4637
4637
|
});
|
|
@@ -6255,7 +6255,7 @@ var require_tools = __commonJS({
|
|
|
6255
6255
|
var transport = require_transport();
|
|
6256
6256
|
var [nodeMajor] = process.versions.node.split(".").map((v) => Number(v));
|
|
6257
6257
|
var asJsonChan = diagChan.tracingChannel("pino_asJson");
|
|
6258
|
-
var asString = nodeMajor >= 25 ? (
|
|
6258
|
+
var asString = nodeMajor >= 25 ? (str2) => JSON.stringify(str2) : _asString;
|
|
6259
6259
|
function noop() {
|
|
6260
6260
|
}
|
|
6261
6261
|
function genLog(level, hook) {
|
|
@@ -6293,38 +6293,38 @@ var require_tools = __commonJS({
|
|
|
6293
6293
|
}
|
|
6294
6294
|
}
|
|
6295
6295
|
}
|
|
6296
|
-
function _asString(
|
|
6296
|
+
function _asString(str2) {
|
|
6297
6297
|
let result = "";
|
|
6298
6298
|
let last = 0;
|
|
6299
6299
|
let found = false;
|
|
6300
6300
|
let point = 255;
|
|
6301
|
-
const l =
|
|
6301
|
+
const l = str2.length;
|
|
6302
6302
|
if (l > 100) {
|
|
6303
|
-
return JSON.stringify(
|
|
6303
|
+
return JSON.stringify(str2);
|
|
6304
6304
|
}
|
|
6305
6305
|
for (var i = 0; i < l && point >= 32; i++) {
|
|
6306
|
-
point =
|
|
6306
|
+
point = str2.charCodeAt(i);
|
|
6307
6307
|
if (point === 34 || point === 92) {
|
|
6308
|
-
result +=
|
|
6308
|
+
result += str2.slice(last, i) + "\\";
|
|
6309
6309
|
last = i;
|
|
6310
6310
|
found = true;
|
|
6311
6311
|
}
|
|
6312
6312
|
}
|
|
6313
6313
|
if (!found) {
|
|
6314
|
-
result =
|
|
6314
|
+
result = str2;
|
|
6315
6315
|
} else {
|
|
6316
|
-
result +=
|
|
6316
|
+
result += str2.slice(last);
|
|
6317
6317
|
}
|
|
6318
|
-
return point < 32 ? JSON.stringify(
|
|
6318
|
+
return point < 32 ? JSON.stringify(str2) : '"' + result + '"';
|
|
6319
6319
|
}
|
|
6320
|
-
function asJson(obj, msg,
|
|
6320
|
+
function asJson(obj, msg, num3, time) {
|
|
6321
6321
|
if (asJsonChan.hasSubscribers === false) {
|
|
6322
|
-
return _asJson.call(this, obj, msg,
|
|
6322
|
+
return _asJson.call(this, obj, msg, num3, time);
|
|
6323
6323
|
}
|
|
6324
6324
|
const store = { instance: this, arguments };
|
|
6325
|
-
return asJsonChan.traceSync(_asJson, store, this, obj, msg,
|
|
6325
|
+
return asJsonChan.traceSync(_asJson, store, this, obj, msg, num3, time);
|
|
6326
6326
|
}
|
|
6327
|
-
function _asJson(obj, msg,
|
|
6327
|
+
function _asJson(obj, msg, num3, time) {
|
|
6328
6328
|
const stringify2 = this[stringifySym];
|
|
6329
6329
|
const stringifySafe = this[stringifySafeSym];
|
|
6330
6330
|
const stringifiers = this[stringifiersSym];
|
|
@@ -6334,7 +6334,7 @@ var require_tools = __commonJS({
|
|
|
6334
6334
|
const formatters = this[formattersSym];
|
|
6335
6335
|
const messageKey = this[messageKeySym];
|
|
6336
6336
|
const errorKey = this[errorKeySym];
|
|
6337
|
-
let data = this[lsCacheSym][
|
|
6337
|
+
let data = this[lsCacheSym][num3] + time;
|
|
6338
6338
|
data = data + chindings;
|
|
6339
6339
|
let value;
|
|
6340
6340
|
if (formatters.log) {
|
|
@@ -6959,7 +6959,7 @@ var require_proto = __commonJS({
|
|
|
6959
6959
|
function defaultMixinMergeStrategy(mergeObject, mixinObject) {
|
|
6960
6960
|
return Object.assign(mixinObject, mergeObject);
|
|
6961
6961
|
}
|
|
6962
|
-
function write(_obj, msg,
|
|
6962
|
+
function write(_obj, msg, num3) {
|
|
6963
6963
|
const t = this[timeSym]();
|
|
6964
6964
|
const mixin = this[mixinSym];
|
|
6965
6965
|
const errorKey = this[errorKeySym];
|
|
@@ -6981,12 +6981,12 @@ var require_proto = __commonJS({
|
|
|
6981
6981
|
}
|
|
6982
6982
|
}
|
|
6983
6983
|
if (mixin) {
|
|
6984
|
-
obj = mixinMergeStrategy(obj, mixin(obj,
|
|
6984
|
+
obj = mixinMergeStrategy(obj, mixin(obj, num3, this));
|
|
6985
6985
|
}
|
|
6986
|
-
const s = this[asJsonSym](obj, msg,
|
|
6986
|
+
const s = this[asJsonSym](obj, msg, num3, t);
|
|
6987
6987
|
const stream = this[streamSym];
|
|
6988
6988
|
if (stream[needsMetadataGsym] === true) {
|
|
6989
|
-
stream.lastLevel =
|
|
6989
|
+
stream.lastLevel = num3;
|
|
6990
6990
|
stream.lastObj = obj;
|
|
6991
6991
|
stream.lastMsg = msg;
|
|
6992
6992
|
stream.lastTime = t.slice(this[timeSliceIndexSym]);
|
|
@@ -7019,11 +7019,11 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
7019
7019
|
exports2.configure = configure;
|
|
7020
7020
|
module2.exports = stringify;
|
|
7021
7021
|
var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
|
|
7022
|
-
function strEscape(
|
|
7023
|
-
if (
|
|
7024
|
-
return `"${
|
|
7022
|
+
function strEscape(str2) {
|
|
7023
|
+
if (str2.length < 5e3 && !strEscapeSequencesRegExp.test(str2)) {
|
|
7024
|
+
return `"${str2}"`;
|
|
7025
7025
|
}
|
|
7026
|
-
return JSON.stringify(
|
|
7026
|
+
return JSON.stringify(str2);
|
|
7027
7027
|
}
|
|
7028
7028
|
function sort(array, comparator) {
|
|
7029
7029
|
if (array.length > 200 || comparator) {
|
|
@@ -8513,13 +8513,13 @@ var require_serializer = __commonJS({
|
|
|
8513
8513
|
return "" + integer;
|
|
8514
8514
|
}
|
|
8515
8515
|
asNumber(i) {
|
|
8516
|
-
const
|
|
8517
|
-
if (
|
|
8516
|
+
const num3 = Number(i);
|
|
8517
|
+
if (num3 !== num3) {
|
|
8518
8518
|
throw new Error(`The value "${i}" cannot be converted to a number.`);
|
|
8519
|
-
} else if (
|
|
8519
|
+
} else if (num3 === Infinity || num3 === -Infinity) {
|
|
8520
8520
|
return "null";
|
|
8521
8521
|
} else {
|
|
8522
|
-
return "" +
|
|
8522
|
+
return "" + num3;
|
|
8523
8523
|
}
|
|
8524
8524
|
}
|
|
8525
8525
|
asBoolean(bool) {
|
|
@@ -8555,8 +8555,8 @@ var require_serializer = __commonJS({
|
|
|
8555
8555
|
}
|
|
8556
8556
|
throw new Error(`The value "${date}" cannot be converted to a time.`);
|
|
8557
8557
|
}
|
|
8558
|
-
asString(
|
|
8559
|
-
const len2 =
|
|
8558
|
+
asString(str2) {
|
|
8559
|
+
const len2 = str2.length;
|
|
8560
8560
|
if (len2 === 0) {
|
|
8561
8561
|
return '""';
|
|
8562
8562
|
} else if (len2 < 42) {
|
|
@@ -8564,25 +8564,25 @@ var require_serializer = __commonJS({
|
|
|
8564
8564
|
let last = -1;
|
|
8565
8565
|
let point = 255;
|
|
8566
8566
|
for (let i = 0; i < len2; i++) {
|
|
8567
|
-
point =
|
|
8567
|
+
point = str2.charCodeAt(i);
|
|
8568
8568
|
if (point === 34 || // '"'
|
|
8569
8569
|
point === 92) {
|
|
8570
8570
|
last === -1 && (last = 0);
|
|
8571
|
-
result +=
|
|
8571
|
+
result += str2.slice(last, i) + "\\";
|
|
8572
8572
|
last = i;
|
|
8573
8573
|
} else if (point < 32 || point >= 55296 && point <= 57343) {
|
|
8574
|
-
return JSON.stringify(
|
|
8574
|
+
return JSON.stringify(str2);
|
|
8575
8575
|
}
|
|
8576
8576
|
}
|
|
8577
|
-
return last === -1 && '"' +
|
|
8578
|
-
} else if (len2 < 5e3 && STR_ESCAPE.test(
|
|
8579
|
-
return '"' +
|
|
8577
|
+
return last === -1 && '"' + str2 + '"' || '"' + result + str2.slice(last) + '"';
|
|
8578
|
+
} else if (len2 < 5e3 && STR_ESCAPE.test(str2) === false) {
|
|
8579
|
+
return '"' + str2 + '"';
|
|
8580
8580
|
} else {
|
|
8581
|
-
return JSON.stringify(
|
|
8581
|
+
return JSON.stringify(str2);
|
|
8582
8582
|
}
|
|
8583
8583
|
}
|
|
8584
|
-
asUnsafeString(
|
|
8585
|
-
return '"' +
|
|
8584
|
+
asUnsafeString(str2) {
|
|
8585
|
+
return '"' + str2 + '"';
|
|
8586
8586
|
}
|
|
8587
8587
|
getState() {
|
|
8588
8588
|
return this._options;
|
|
@@ -10712,11 +10712,11 @@ var require_proxy_addr = __commonJS({
|
|
|
10712
10712
|
}
|
|
10713
10713
|
function parseipNotation(note) {
|
|
10714
10714
|
const pos2 = note.lastIndexOf("/");
|
|
10715
|
-
const
|
|
10716
|
-
if (!isip(
|
|
10717
|
-
throw new TypeError("invalid IP address: " +
|
|
10715
|
+
const str2 = pos2 !== -1 ? note.substring(0, pos2) : note;
|
|
10716
|
+
if (!isip(str2)) {
|
|
10717
|
+
throw new TypeError("invalid IP address: " + str2);
|
|
10718
10718
|
}
|
|
10719
|
-
let ip = parseip(
|
|
10719
|
+
let ip = parseip(str2);
|
|
10720
10720
|
if (pos2 === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) {
|
|
10721
10721
|
ip = ip.toIPv4Address();
|
|
10722
10722
|
}
|
|
@@ -12426,7 +12426,7 @@ var require_code = __commonJS({
|
|
|
12426
12426
|
}
|
|
12427
12427
|
exports2._ = _;
|
|
12428
12428
|
var plus = new _Code("+");
|
|
12429
|
-
function
|
|
12429
|
+
function str2(strs, ...args) {
|
|
12430
12430
|
const expr = [safeStringify(strs[0])];
|
|
12431
12431
|
let i = 0;
|
|
12432
12432
|
while (i < args.length) {
|
|
@@ -12437,7 +12437,7 @@ var require_code = __commonJS({
|
|
|
12437
12437
|
optimize(expr);
|
|
12438
12438
|
return new _Code(expr);
|
|
12439
12439
|
}
|
|
12440
|
-
exports2.str =
|
|
12440
|
+
exports2.str = str2;
|
|
12441
12441
|
function addCodeArg(code, arg) {
|
|
12442
12442
|
if (arg instanceof _Code)
|
|
12443
12443
|
code.push(...arg._items);
|
|
@@ -12480,7 +12480,7 @@ var require_code = __commonJS({
|
|
|
12480
12480
|
return;
|
|
12481
12481
|
}
|
|
12482
12482
|
function strConcat(c1, c2) {
|
|
12483
|
-
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 :
|
|
12483
|
+
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str2`${c1}${c2}`;
|
|
12484
12484
|
}
|
|
12485
12485
|
exports2.strConcat = strConcat;
|
|
12486
12486
|
function interpolate(x) {
|
|
@@ -13442,22 +13442,22 @@ var require_util = __commonJS({
|
|
|
13442
13442
|
return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
|
|
13443
13443
|
}
|
|
13444
13444
|
exports2.schemaRefOrVal = schemaRefOrVal;
|
|
13445
|
-
function unescapeFragment(
|
|
13446
|
-
return unescapeJsonPointer(decodeURIComponent(
|
|
13445
|
+
function unescapeFragment(str2) {
|
|
13446
|
+
return unescapeJsonPointer(decodeURIComponent(str2));
|
|
13447
13447
|
}
|
|
13448
13448
|
exports2.unescapeFragment = unescapeFragment;
|
|
13449
|
-
function escapeFragment(
|
|
13450
|
-
return encodeURIComponent(escapeJsonPointer(
|
|
13449
|
+
function escapeFragment(str2) {
|
|
13450
|
+
return encodeURIComponent(escapeJsonPointer(str2));
|
|
13451
13451
|
}
|
|
13452
13452
|
exports2.escapeFragment = escapeFragment;
|
|
13453
|
-
function escapeJsonPointer(
|
|
13454
|
-
if (typeof
|
|
13455
|
-
return `${
|
|
13456
|
-
return
|
|
13453
|
+
function escapeJsonPointer(str2) {
|
|
13454
|
+
if (typeof str2 == "number")
|
|
13455
|
+
return `${str2}`;
|
|
13456
|
+
return str2.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
13457
13457
|
}
|
|
13458
13458
|
exports2.escapeJsonPointer = escapeJsonPointer;
|
|
13459
|
-
function unescapeJsonPointer(
|
|
13460
|
-
return
|
|
13459
|
+
function unescapeJsonPointer(str2) {
|
|
13460
|
+
return str2.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
13461
13461
|
}
|
|
13462
13462
|
exports2.unescapeJsonPointer = unescapeJsonPointer;
|
|
13463
13463
|
function eachItem(xs, f) {
|
|
@@ -14482,8 +14482,8 @@ var require_json_schema_traverse = __commonJS({
|
|
|
14482
14482
|
post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
14483
14483
|
}
|
|
14484
14484
|
}
|
|
14485
|
-
function escapeJsonPtr(
|
|
14486
|
-
return
|
|
14485
|
+
function escapeJsonPtr(str2) {
|
|
14486
|
+
return str2.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
14487
14487
|
}
|
|
14488
14488
|
}
|
|
14489
14489
|
});
|
|
@@ -15547,10 +15547,10 @@ var require_utils = __commonJS({
|
|
|
15547
15547
|
return { host, isIPV6: false };
|
|
15548
15548
|
}
|
|
15549
15549
|
}
|
|
15550
|
-
function findToken(
|
|
15550
|
+
function findToken(str2, token) {
|
|
15551
15551
|
let ind = 0;
|
|
15552
|
-
for (let i = 0; i <
|
|
15553
|
-
if (
|
|
15552
|
+
for (let i = 0; i < str2.length; i++) {
|
|
15553
|
+
if (str2[i] === token) ind++;
|
|
15554
15554
|
}
|
|
15555
15555
|
return ind;
|
|
15556
15556
|
}
|
|
@@ -16287,7 +16287,7 @@ var require_core = __commonJS({
|
|
|
16287
16287
|
var util_1 = require_util();
|
|
16288
16288
|
var $dataRefSchema = require_data();
|
|
16289
16289
|
var uri_1 = require_uri();
|
|
16290
|
-
var defaultRegExp = (
|
|
16290
|
+
var defaultRegExp = (str2, flags) => new RegExp(str2, flags);
|
|
16291
16291
|
defaultRegExp.code = "new RegExp";
|
|
16292
16292
|
var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
|
|
16293
16293
|
var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -17082,16 +17082,16 @@ var require_ucs2length = __commonJS({
|
|
|
17082
17082
|
"node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
|
|
17083
17083
|
"use strict";
|
|
17084
17084
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
17085
|
-
function ucs2length(
|
|
17086
|
-
const len2 =
|
|
17085
|
+
function ucs2length(str2) {
|
|
17086
|
+
const len2 = str2.length;
|
|
17087
17087
|
let length = 0;
|
|
17088
17088
|
let pos2 = 0;
|
|
17089
17089
|
let value;
|
|
17090
17090
|
while (pos2 < len2) {
|
|
17091
17091
|
length++;
|
|
17092
|
-
value =
|
|
17092
|
+
value = str2.charCodeAt(pos2++);
|
|
17093
17093
|
if (value >= 55296 && value <= 56319 && pos2 < len2) {
|
|
17094
|
-
value =
|
|
17094
|
+
value = str2.charCodeAt(pos2);
|
|
17095
17095
|
if ((value & 64512) === 56320)
|
|
17096
17096
|
pos2++;
|
|
17097
17097
|
}
|
|
@@ -19007,13 +19007,13 @@ var require_timestamp = __commonJS({
|
|
|
19007
19007
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
19008
19008
|
var TIME = /^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i;
|
|
19009
19009
|
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
19010
|
-
function validTimestamp(
|
|
19011
|
-
const dt =
|
|
19010
|
+
function validTimestamp(str2, allowDate) {
|
|
19011
|
+
const dt = str2.split(DT_SEPARATOR);
|
|
19012
19012
|
return dt.length === 2 && validDate(dt[0]) && validTime(dt[1]) || allowDate && dt.length === 1 && validDate(dt[0]);
|
|
19013
19013
|
}
|
|
19014
19014
|
exports2.default = validTimestamp;
|
|
19015
|
-
function validDate(
|
|
19016
|
-
const matches = DATE.exec(
|
|
19015
|
+
function validDate(str2) {
|
|
19016
|
+
const matches = DATE.exec(str2);
|
|
19017
19017
|
if (!matches)
|
|
19018
19018
|
return false;
|
|
19019
19019
|
const y = +matches[1];
|
|
@@ -19022,8 +19022,8 @@ var require_timestamp = __commonJS({
|
|
|
19022
19022
|
return m >= 1 && m <= 12 && d >= 1 && (d <= DAYS[m] || // leap year: https://tools.ietf.org/html/rfc3339#appendix-C
|
|
19023
19023
|
m === 2 && d === 29 && (y % 100 === 0 ? y % 400 === 0 : y % 4 === 0));
|
|
19024
19024
|
}
|
|
19025
|
-
function validTime(
|
|
19026
|
-
const matches = TIME.exec(
|
|
19025
|
+
function validTime(str2) {
|
|
19026
|
+
const matches = TIME.exec(str2);
|
|
19027
19027
|
if (!matches)
|
|
19028
19028
|
return false;
|
|
19029
19029
|
const hr = +matches[1];
|
|
@@ -20086,7 +20086,7 @@ var require_parseJson = __commonJS({
|
|
|
20086
20086
|
var CODE_A = "a".charCodeAt(0);
|
|
20087
20087
|
var CODE_0 = "0".charCodeAt(0);
|
|
20088
20088
|
function parseJsonString(s, pos2) {
|
|
20089
|
-
let
|
|
20089
|
+
let str2 = "";
|
|
20090
20090
|
let c;
|
|
20091
20091
|
parseJsonString.message = void 0;
|
|
20092
20092
|
while (true) {
|
|
@@ -20096,7 +20096,7 @@ var require_parseJson = __commonJS({
|
|
|
20096
20096
|
if (c === "\\") {
|
|
20097
20097
|
c = s[pos2];
|
|
20098
20098
|
if (c in escapedChars) {
|
|
20099
|
-
|
|
20099
|
+
str2 += escapedChars[c];
|
|
20100
20100
|
pos2++;
|
|
20101
20101
|
} else if (c === "u") {
|
|
20102
20102
|
pos2++;
|
|
@@ -20120,7 +20120,7 @@ var require_parseJson = __commonJS({
|
|
|
20120
20120
|
}
|
|
20121
20121
|
pos2++;
|
|
20122
20122
|
}
|
|
20123
|
-
|
|
20123
|
+
str2 += String.fromCharCode(code);
|
|
20124
20124
|
} else {
|
|
20125
20125
|
errorMessage(`unexpected token ${c}`);
|
|
20126
20126
|
return void 0;
|
|
@@ -20130,7 +20130,7 @@ var require_parseJson = __commonJS({
|
|
|
20130
20130
|
return void 0;
|
|
20131
20131
|
} else {
|
|
20132
20132
|
if (c.charCodeAt(0) >= 32) {
|
|
20133
|
-
|
|
20133
|
+
str2 += c;
|
|
20134
20134
|
} else {
|
|
20135
20135
|
errorMessage(`unexpected token ${c}`);
|
|
20136
20136
|
return void 0;
|
|
@@ -20138,7 +20138,7 @@ var require_parseJson = __commonJS({
|
|
|
20138
20138
|
}
|
|
20139
20139
|
}
|
|
20140
20140
|
parseJsonString.position = pos2;
|
|
20141
|
-
return
|
|
20141
|
+
return str2;
|
|
20142
20142
|
function errorMessage(msg) {
|
|
20143
20143
|
parseJsonString.position = pos2;
|
|
20144
20144
|
parseJsonString.message = msg;
|
|
@@ -20687,8 +20687,8 @@ var require_formats = __commonJS({
|
|
|
20687
20687
|
}
|
|
20688
20688
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
20689
20689
|
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
20690
|
-
function date(
|
|
20691
|
-
const matches = DATE.exec(
|
|
20690
|
+
function date(str2) {
|
|
20691
|
+
const matches = DATE.exec(str2);
|
|
20692
20692
|
if (!matches)
|
|
20693
20693
|
return false;
|
|
20694
20694
|
const year = +matches[1];
|
|
@@ -20707,8 +20707,8 @@ var require_formats = __commonJS({
|
|
|
20707
20707
|
}
|
|
20708
20708
|
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
20709
20709
|
function getTime(strictTimeZone) {
|
|
20710
|
-
return function time(
|
|
20711
|
-
const matches = TIME.exec(
|
|
20710
|
+
return function time(str2) {
|
|
20711
|
+
const matches = TIME.exec(str2);
|
|
20712
20712
|
if (!matches)
|
|
20713
20713
|
return false;
|
|
20714
20714
|
const hr = +matches[1];
|
|
@@ -20754,8 +20754,8 @@ var require_formats = __commonJS({
|
|
|
20754
20754
|
var DATE_TIME_SEPARATOR = /t|\s/i;
|
|
20755
20755
|
function getDateTime(strictTimeZone) {
|
|
20756
20756
|
const time = getTime(strictTimeZone);
|
|
20757
|
-
return function date_time(
|
|
20758
|
-
const dateTime =
|
|
20757
|
+
return function date_time(str2) {
|
|
20758
|
+
const dateTime = str2.split(DATE_TIME_SEPARATOR);
|
|
20759
20759
|
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
|
|
20760
20760
|
};
|
|
20761
20761
|
}
|
|
@@ -20780,13 +20780,13 @@ var require_formats = __commonJS({
|
|
|
20780
20780
|
}
|
|
20781
20781
|
var NOT_URI_FRAGMENT = /\/|:/;
|
|
20782
20782
|
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
20783
|
-
function uri(
|
|
20784
|
-
return NOT_URI_FRAGMENT.test(
|
|
20783
|
+
function uri(str2) {
|
|
20784
|
+
return NOT_URI_FRAGMENT.test(str2) && URI.test(str2);
|
|
20785
20785
|
}
|
|
20786
20786
|
var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
20787
|
-
function byte(
|
|
20787
|
+
function byte(str2) {
|
|
20788
20788
|
BYTE.lastIndex = 0;
|
|
20789
|
-
return BYTE.test(
|
|
20789
|
+
return BYTE.test(str2);
|
|
20790
20790
|
}
|
|
20791
20791
|
var MIN_INT32 = -(2 ** 31);
|
|
20792
20792
|
var MAX_INT32 = 2 ** 31 - 1;
|
|
@@ -20800,11 +20800,11 @@ var require_formats = __commonJS({
|
|
|
20800
20800
|
return true;
|
|
20801
20801
|
}
|
|
20802
20802
|
var Z_ANCHOR = /[^\\]\\Z/;
|
|
20803
|
-
function regex(
|
|
20804
|
-
if (Z_ANCHOR.test(
|
|
20803
|
+
function regex(str2) {
|
|
20804
|
+
if (Z_ANCHOR.test(str2))
|
|
20805
20805
|
return false;
|
|
20806
20806
|
try {
|
|
20807
|
-
new RegExp(
|
|
20807
|
+
new RegExp(str2);
|
|
20808
20808
|
return true;
|
|
20809
20809
|
} catch (e) {
|
|
20810
20810
|
return false;
|
|
@@ -24673,9 +24673,9 @@ var require_semver = __commonJS({
|
|
|
24673
24673
|
} else {
|
|
24674
24674
|
this.prerelease = m[4].split(".").map((id) => {
|
|
24675
24675
|
if (/^[0-9]+$/.test(id)) {
|
|
24676
|
-
const
|
|
24677
|
-
if (
|
|
24678
|
-
return
|
|
24676
|
+
const num3 = +id;
|
|
24677
|
+
if (num3 >= 0 && num3 < MAX_SAFE_INTEGER) {
|
|
24678
|
+
return num3;
|
|
24679
24679
|
}
|
|
24680
24680
|
}
|
|
24681
24681
|
return id;
|
|
@@ -27282,24 +27282,24 @@ var require_querystring = __commonJS({
|
|
|
27282
27282
|
0
|
|
27283
27283
|
// 112 - 127
|
|
27284
27284
|
]);
|
|
27285
|
-
function encodeString(
|
|
27286
|
-
const len2 =
|
|
27285
|
+
function encodeString(str2) {
|
|
27286
|
+
const len2 = str2.length;
|
|
27287
27287
|
if (len2 === 0) return "";
|
|
27288
27288
|
let out = "";
|
|
27289
27289
|
let lastPos = 0;
|
|
27290
27290
|
let i = 0;
|
|
27291
27291
|
outer: for (; i < len2; i++) {
|
|
27292
|
-
let c =
|
|
27292
|
+
let c = str2.charCodeAt(i);
|
|
27293
27293
|
while (c < 128) {
|
|
27294
27294
|
if (noEscape[c] !== 1) {
|
|
27295
|
-
if (lastPos < i) out +=
|
|
27295
|
+
if (lastPos < i) out += str2.slice(lastPos, i);
|
|
27296
27296
|
lastPos = i + 1;
|
|
27297
27297
|
out += hexTable[c];
|
|
27298
27298
|
}
|
|
27299
27299
|
if (++i === len2) break outer;
|
|
27300
|
-
c =
|
|
27300
|
+
c = str2.charCodeAt(i);
|
|
27301
27301
|
}
|
|
27302
|
-
if (lastPos < i) out +=
|
|
27302
|
+
if (lastPos < i) out += str2.slice(lastPos, i);
|
|
27303
27303
|
if (c < 2048) {
|
|
27304
27304
|
lastPos = i + 1;
|
|
27305
27305
|
out += hexTable[192 | c >> 6] + hexTable[128 | c & 63];
|
|
@@ -27314,13 +27314,13 @@ var require_querystring = __commonJS({
|
|
|
27314
27314
|
if (i >= len2) {
|
|
27315
27315
|
throw new Error("URI malformed");
|
|
27316
27316
|
}
|
|
27317
|
-
const c2 =
|
|
27317
|
+
const c2 = str2.charCodeAt(i) & 1023;
|
|
27318
27318
|
lastPos = i + 1;
|
|
27319
27319
|
c = 65536 + ((c & 1023) << 10 | c2);
|
|
27320
27320
|
out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
27321
27321
|
}
|
|
27322
|
-
if (lastPos === 0) return
|
|
27323
|
-
if (lastPos < len2) return out +
|
|
27322
|
+
if (lastPos === 0) return str2;
|
|
27323
|
+
if (lastPos < len2) return out + str2.slice(lastPos);
|
|
27324
27324
|
return out;
|
|
27325
27325
|
}
|
|
27326
27326
|
module2.exports = { encodeString };
|
|
@@ -27536,9 +27536,9 @@ var require_util2 = __commonJS({
|
|
|
27536
27536
|
var types_1 = require_types4();
|
|
27537
27537
|
var sets = __importStar(require_sets());
|
|
27538
27538
|
var CTRL = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";
|
|
27539
|
-
exports2.strToChars = (
|
|
27539
|
+
exports2.strToChars = (str2) => {
|
|
27540
27540
|
const charsRegex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;
|
|
27541
|
-
return
|
|
27541
|
+
return str2.replace(charsRegex, (s, b, lbs, a16, b16, dctrl, eslsh) => {
|
|
27542
27542
|
if (lbs) {
|
|
27543
27543
|
return s;
|
|
27544
27544
|
}
|
|
@@ -27554,11 +27554,11 @@ var require_util2 = __commonJS({
|
|
|
27554
27554
|
return /[[\]{}^$.|?*+()]/.test(c) ? `\\${c}` : c;
|
|
27555
27555
|
});
|
|
27556
27556
|
};
|
|
27557
|
-
exports2.tokenizeClass = (
|
|
27557
|
+
exports2.tokenizeClass = (str2, regexpStr) => {
|
|
27558
27558
|
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
27559
27559
|
let tokens = [], rs, c;
|
|
27560
27560
|
const regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g;
|
|
27561
|
-
while ((rs = regexp.exec(
|
|
27561
|
+
while ((rs = regexp.exec(str2)) !== null) {
|
|
27562
27562
|
const p = (_g = (_f = (_e = (_d = (_c = (_b2 = (_a2 = rs[1] && sets.words()) !== null && _a2 !== void 0 ? _a2 : rs[2] && sets.ints()) !== null && _b2 !== void 0 ? _b2 : rs[3] && sets.whitespace()) !== null && _c !== void 0 ? _c : rs[4] && sets.notWords()) !== null && _d !== void 0 ? _d : rs[5] && sets.notInts()) !== null && _e !== void 0 ? _e : rs[6] && sets.notWhitespace()) !== null && _f !== void 0 ? _f : rs[7] && {
|
|
27563
27563
|
type: types_1.types.RANGE,
|
|
27564
27564
|
from: (rs[8] || rs[9]).charCodeAt(0),
|
|
@@ -27621,15 +27621,15 @@ var require_tokenizer = __commonJS({
|
|
|
27621
27621
|
const repeatErr = (col) => {
|
|
27622
27622
|
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Nothing to repeat at column ${col - 1}`);
|
|
27623
27623
|
};
|
|
27624
|
-
let
|
|
27625
|
-
while (i <
|
|
27626
|
-
switch (c =
|
|
27624
|
+
let str2 = util.strToChars(regexpStr);
|
|
27625
|
+
while (i < str2.length) {
|
|
27626
|
+
switch (c = str2[i++]) {
|
|
27627
27627
|
// Handle escaped characters, inclues a few sets.
|
|
27628
27628
|
case "\\":
|
|
27629
|
-
if (i ===
|
|
27629
|
+
if (i === str2.length) {
|
|
27630
27630
|
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: \\ at end of pattern`);
|
|
27631
27631
|
}
|
|
27632
|
-
switch (c =
|
|
27632
|
+
switch (c = str2[i++]) {
|
|
27633
27633
|
case "b":
|
|
27634
27634
|
last.push({ type: types_1.types.POSITION, value: "b" });
|
|
27635
27635
|
break;
|
|
@@ -27657,8 +27657,8 @@ var require_tokenizer = __commonJS({
|
|
|
27657
27657
|
default:
|
|
27658
27658
|
if (digit.test(c)) {
|
|
27659
27659
|
let digits = c;
|
|
27660
|
-
while (i <
|
|
27661
|
-
digits +=
|
|
27660
|
+
while (i < str2.length && digit.test(str2[i])) {
|
|
27661
|
+
digits += str2[i++];
|
|
27662
27662
|
}
|
|
27663
27663
|
let value = parseInt(digits, 10);
|
|
27664
27664
|
const reference = { type: types_1.types.REFERENCE, value };
|
|
@@ -27679,13 +27679,13 @@ var require_tokenizer = __commonJS({
|
|
|
27679
27679
|
// Handle custom sets.
|
|
27680
27680
|
case "[": {
|
|
27681
27681
|
let not;
|
|
27682
|
-
if (
|
|
27682
|
+
if (str2[i] === "^") {
|
|
27683
27683
|
not = true;
|
|
27684
27684
|
i++;
|
|
27685
27685
|
} else {
|
|
27686
27686
|
not = false;
|
|
27687
27687
|
}
|
|
27688
|
-
let classTokens = util.tokenizeClass(
|
|
27688
|
+
let classTokens = util.tokenizeClass(str2.slice(i), regexpStr);
|
|
27689
27689
|
i += classTokens[1];
|
|
27690
27690
|
last.push({
|
|
27691
27691
|
type: types_1.types.SET,
|
|
@@ -27705,8 +27705,8 @@ var require_tokenizer = __commonJS({
|
|
|
27705
27705
|
stack: [],
|
|
27706
27706
|
remember: true
|
|
27707
27707
|
};
|
|
27708
|
-
if (
|
|
27709
|
-
c =
|
|
27708
|
+
if (str2[i] === "?") {
|
|
27709
|
+
c = str2[i + 1];
|
|
27710
27710
|
i += 2;
|
|
27711
27711
|
if (c === "=") {
|
|
27712
27712
|
group.followedBy = true;
|
|
@@ -27716,21 +27716,21 @@ var require_tokenizer = __commonJS({
|
|
|
27716
27716
|
group.remember = false;
|
|
27717
27717
|
} else if (c === "<") {
|
|
27718
27718
|
let name = "";
|
|
27719
|
-
if (captureGroupFirstChar.test(
|
|
27720
|
-
name +=
|
|
27719
|
+
if (captureGroupFirstChar.test(str2[i])) {
|
|
27720
|
+
name += str2[i];
|
|
27721
27721
|
i++;
|
|
27722
27722
|
} else {
|
|
27723
|
-
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${
|
|
27723
|
+
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str2[i]}' after '<' at column ${i + 1}`);
|
|
27724
27724
|
}
|
|
27725
|
-
while (i <
|
|
27726
|
-
name +=
|
|
27725
|
+
while (i < str2.length && captureGroupChars.test(str2[i])) {
|
|
27726
|
+
name += str2[i];
|
|
27727
27727
|
i++;
|
|
27728
27728
|
}
|
|
27729
27729
|
if (!name) {
|
|
27730
|
-
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${
|
|
27730
|
+
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str2[i]}' after '<' at column ${i + 1}`);
|
|
27731
27731
|
}
|
|
27732
|
-
if (
|
|
27733
|
-
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unclosed capture group name, expected '>', found '${
|
|
27732
|
+
if (str2[i] !== ">") {
|
|
27733
|
+
throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unclosed capture group name, expected '>', found '${str2[i]}' at column ${i + 1}`);
|
|
27734
27734
|
}
|
|
27735
27735
|
group.name = name;
|
|
27736
27736
|
i++;
|
|
@@ -27773,7 +27773,7 @@ var require_tokenizer = __commonJS({
|
|
|
27773
27773
|
// This design is chosen because there could be more than
|
|
27774
27774
|
// one repetition symbols in a regex i.e. `a?+{2,3}`.
|
|
27775
27775
|
case "{": {
|
|
27776
|
-
let rs = /^(\d+)(,(\d+)?)?\}/.exec(
|
|
27776
|
+
let rs = /^(\d+)(,(\d+)?)?\}/.exec(str2.slice(i)), min, max;
|
|
27777
27777
|
if (rs !== null) {
|
|
27778
27778
|
if (last.length === 0) {
|
|
27779
27779
|
repeatErr(i);
|
|
@@ -31737,25 +31737,25 @@ var require_dist4 = __commonJS({
|
|
|
31737
31737
|
C.prototype = /* @__PURE__ */ Object.create(null);
|
|
31738
31738
|
return C;
|
|
31739
31739
|
})();
|
|
31740
|
-
function parseCookie(
|
|
31740
|
+
function parseCookie(str2, options) {
|
|
31741
31741
|
const obj = new NullObject();
|
|
31742
|
-
const len2 =
|
|
31742
|
+
const len2 = str2.length;
|
|
31743
31743
|
if (len2 < 2)
|
|
31744
31744
|
return obj;
|
|
31745
31745
|
const dec = options?.decode || decode;
|
|
31746
31746
|
let index = 0;
|
|
31747
31747
|
do {
|
|
31748
|
-
const eqIdx = eqIndex(
|
|
31748
|
+
const eqIdx = eqIndex(str2, index, len2);
|
|
31749
31749
|
if (eqIdx === -1)
|
|
31750
31750
|
break;
|
|
31751
|
-
const endIdx = endIndex(
|
|
31751
|
+
const endIdx = endIndex(str2, index, len2);
|
|
31752
31752
|
if (eqIdx > endIdx) {
|
|
31753
|
-
index =
|
|
31753
|
+
index = str2.lastIndexOf(";", eqIdx - 1) + 1;
|
|
31754
31754
|
continue;
|
|
31755
31755
|
}
|
|
31756
|
-
const key = valueSlice(
|
|
31756
|
+
const key = valueSlice(str2, index, eqIdx);
|
|
31757
31757
|
if (obj[key] === void 0) {
|
|
31758
|
-
obj[key] = dec(valueSlice(
|
|
31758
|
+
obj[key] = dec(valueSlice(str2, eqIdx + 1, endIdx));
|
|
31759
31759
|
}
|
|
31760
31760
|
index = endIdx + 1;
|
|
31761
31761
|
} while (index < len2);
|
|
@@ -31790,51 +31790,51 @@ var require_dist4 = __commonJS({
|
|
|
31790
31790
|
if (!cookieValueRegExp.test(value)) {
|
|
31791
31791
|
throw new TypeError(`argument val is invalid: ${cookie.value}`);
|
|
31792
31792
|
}
|
|
31793
|
-
let
|
|
31793
|
+
let str2 = cookie.name + "=" + value;
|
|
31794
31794
|
if (cookie.maxAge !== void 0) {
|
|
31795
31795
|
if (!Number.isInteger(cookie.maxAge)) {
|
|
31796
31796
|
throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);
|
|
31797
31797
|
}
|
|
31798
|
-
|
|
31798
|
+
str2 += "; Max-Age=" + cookie.maxAge;
|
|
31799
31799
|
}
|
|
31800
31800
|
if (cookie.domain) {
|
|
31801
31801
|
if (!domainValueRegExp.test(cookie.domain)) {
|
|
31802
31802
|
throw new TypeError(`option domain is invalid: ${cookie.domain}`);
|
|
31803
31803
|
}
|
|
31804
|
-
|
|
31804
|
+
str2 += "; Domain=" + cookie.domain;
|
|
31805
31805
|
}
|
|
31806
31806
|
if (cookie.path) {
|
|
31807
31807
|
if (!pathValueRegExp.test(cookie.path)) {
|
|
31808
31808
|
throw new TypeError(`option path is invalid: ${cookie.path}`);
|
|
31809
31809
|
}
|
|
31810
|
-
|
|
31810
|
+
str2 += "; Path=" + cookie.path;
|
|
31811
31811
|
}
|
|
31812
31812
|
if (cookie.expires) {
|
|
31813
31813
|
if (!isDate(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) {
|
|
31814
31814
|
throw new TypeError(`option expires is invalid: ${cookie.expires}`);
|
|
31815
31815
|
}
|
|
31816
|
-
|
|
31816
|
+
str2 += "; Expires=" + cookie.expires.toUTCString();
|
|
31817
31817
|
}
|
|
31818
31818
|
if (cookie.httpOnly) {
|
|
31819
|
-
|
|
31819
|
+
str2 += "; HttpOnly";
|
|
31820
31820
|
}
|
|
31821
31821
|
if (cookie.secure) {
|
|
31822
|
-
|
|
31822
|
+
str2 += "; Secure";
|
|
31823
31823
|
}
|
|
31824
31824
|
if (cookie.partitioned) {
|
|
31825
|
-
|
|
31825
|
+
str2 += "; Partitioned";
|
|
31826
31826
|
}
|
|
31827
31827
|
if (cookie.priority) {
|
|
31828
31828
|
const priority = typeof cookie.priority === "string" ? cookie.priority.toLowerCase() : void 0;
|
|
31829
31829
|
switch (priority) {
|
|
31830
31830
|
case "low":
|
|
31831
|
-
|
|
31831
|
+
str2 += "; Priority=Low";
|
|
31832
31832
|
break;
|
|
31833
31833
|
case "medium":
|
|
31834
|
-
|
|
31834
|
+
str2 += "; Priority=Medium";
|
|
31835
31835
|
break;
|
|
31836
31836
|
case "high":
|
|
31837
|
-
|
|
31837
|
+
str2 += "; Priority=High";
|
|
31838
31838
|
break;
|
|
31839
31839
|
default:
|
|
31840
31840
|
throw new TypeError(`option priority is invalid: ${cookie.priority}`);
|
|
@@ -31845,35 +31845,35 @@ var require_dist4 = __commonJS({
|
|
|
31845
31845
|
switch (sameSite) {
|
|
31846
31846
|
case true:
|
|
31847
31847
|
case "strict":
|
|
31848
|
-
|
|
31848
|
+
str2 += "; SameSite=Strict";
|
|
31849
31849
|
break;
|
|
31850
31850
|
case "lax":
|
|
31851
|
-
|
|
31851
|
+
str2 += "; SameSite=Lax";
|
|
31852
31852
|
break;
|
|
31853
31853
|
case "none":
|
|
31854
|
-
|
|
31854
|
+
str2 += "; SameSite=None";
|
|
31855
31855
|
break;
|
|
31856
31856
|
default:
|
|
31857
31857
|
throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);
|
|
31858
31858
|
}
|
|
31859
31859
|
}
|
|
31860
|
-
return
|
|
31860
|
+
return str2;
|
|
31861
31861
|
}
|
|
31862
|
-
function parseSetCookie(
|
|
31862
|
+
function parseSetCookie(str2, options) {
|
|
31863
31863
|
const dec = options?.decode || decode;
|
|
31864
|
-
const len2 =
|
|
31865
|
-
const endIdx = endIndex(
|
|
31866
|
-
const eqIdx = eqIndex(
|
|
31867
|
-
const setCookie = eqIdx === -1 ? { name: "", value: dec(valueSlice(
|
|
31868
|
-
name: valueSlice(
|
|
31869
|
-
value: dec(valueSlice(
|
|
31864
|
+
const len2 = str2.length;
|
|
31865
|
+
const endIdx = endIndex(str2, 0, len2);
|
|
31866
|
+
const eqIdx = eqIndex(str2, 0, endIdx);
|
|
31867
|
+
const setCookie = eqIdx === -1 ? { name: "", value: dec(valueSlice(str2, 0, endIdx)) } : {
|
|
31868
|
+
name: valueSlice(str2, 0, eqIdx),
|
|
31869
|
+
value: dec(valueSlice(str2, eqIdx + 1, endIdx))
|
|
31870
31870
|
};
|
|
31871
31871
|
let index = endIdx + 1;
|
|
31872
31872
|
while (index < len2) {
|
|
31873
|
-
const endIdx2 = endIndex(
|
|
31874
|
-
const eqIdx2 = eqIndex(
|
|
31875
|
-
const attr = eqIdx2 === -1 ? valueSlice(
|
|
31876
|
-
const val = eqIdx2 === -1 ? void 0 : valueSlice(
|
|
31873
|
+
const endIdx2 = endIndex(str2, index, len2);
|
|
31874
|
+
const eqIdx2 = eqIndex(str2, index, endIdx2);
|
|
31875
|
+
const attr = eqIdx2 === -1 ? valueSlice(str2, index, endIdx2) : valueSlice(str2, index, eqIdx2);
|
|
31876
|
+
const val = eqIdx2 === -1 ? void 0 : valueSlice(str2, eqIdx2 + 1, endIdx2);
|
|
31877
31877
|
switch (attr.toLowerCase()) {
|
|
31878
31878
|
case "httponly":
|
|
31879
31879
|
setCookie.httpOnly = true;
|
|
@@ -31922,37 +31922,37 @@ var require_dist4 = __commonJS({
|
|
|
31922
31922
|
}
|
|
31923
31923
|
return setCookie;
|
|
31924
31924
|
}
|
|
31925
|
-
function endIndex(
|
|
31926
|
-
const index =
|
|
31925
|
+
function endIndex(str2, min, len2) {
|
|
31926
|
+
const index = str2.indexOf(";", min);
|
|
31927
31927
|
return index === -1 ? len2 : index;
|
|
31928
31928
|
}
|
|
31929
|
-
function eqIndex(
|
|
31930
|
-
const index =
|
|
31929
|
+
function eqIndex(str2, min, max) {
|
|
31930
|
+
const index = str2.indexOf("=", min);
|
|
31931
31931
|
return index < max ? index : -1;
|
|
31932
31932
|
}
|
|
31933
|
-
function valueSlice(
|
|
31933
|
+
function valueSlice(str2, min, max) {
|
|
31934
31934
|
let start = min;
|
|
31935
31935
|
let end = max;
|
|
31936
31936
|
do {
|
|
31937
|
-
const code =
|
|
31937
|
+
const code = str2.charCodeAt(start);
|
|
31938
31938
|
if (code !== 32 && code !== 9)
|
|
31939
31939
|
break;
|
|
31940
31940
|
} while (++start < end);
|
|
31941
31941
|
while (end > start) {
|
|
31942
|
-
const code =
|
|
31942
|
+
const code = str2.charCodeAt(end - 1);
|
|
31943
31943
|
if (code !== 32 && code !== 9)
|
|
31944
31944
|
break;
|
|
31945
31945
|
end--;
|
|
31946
31946
|
}
|
|
31947
|
-
return
|
|
31947
|
+
return str2.slice(start, end);
|
|
31948
31948
|
}
|
|
31949
|
-
function decode(
|
|
31950
|
-
if (
|
|
31951
|
-
return
|
|
31949
|
+
function decode(str2) {
|
|
31950
|
+
if (str2.indexOf("%") === -1)
|
|
31951
|
+
return str2;
|
|
31952
31952
|
try {
|
|
31953
|
-
return decodeURIComponent(
|
|
31953
|
+
return decodeURIComponent(str2);
|
|
31954
31954
|
} catch (e) {
|
|
31955
|
-
return
|
|
31955
|
+
return str2;
|
|
31956
31956
|
}
|
|
31957
31957
|
}
|
|
31958
31958
|
function isDate(val) {
|
|
@@ -32072,7 +32072,7 @@ var require_form_data = __commonJS({
|
|
|
32072
32072
|
const boundary = `----formdata-${randomUUID5()}`;
|
|
32073
32073
|
const prefix = `--${boundary}\r
|
|
32074
32074
|
Content-Disposition: form-data`;
|
|
32075
|
-
const escape2 = (
|
|
32075
|
+
const escape2 = (str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
|
|
32076
32076
|
const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n");
|
|
32077
32077
|
const linebreak = new Uint8Array([13, 10]);
|
|
32078
32078
|
async function* asyncIterator() {
|
|
@@ -32318,8 +32318,8 @@ var require_set_cookie = __commonJS({
|
|
|
32318
32318
|
function createNullObj() {
|
|
32319
32319
|
return /* @__PURE__ */ Object.create(null);
|
|
32320
32320
|
}
|
|
32321
|
-
function isNonEmptyString(
|
|
32322
|
-
return typeof
|
|
32321
|
+
function isNonEmptyString(str2) {
|
|
32322
|
+
return typeof str2 === "string" && !!str2.trim();
|
|
32323
32323
|
}
|
|
32324
32324
|
function parseString(setCookieValue, options) {
|
|
32325
32325
|
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
@@ -32410,13 +32410,13 @@ var require_set_cookie = __commonJS({
|
|
|
32410
32410
|
input = [input];
|
|
32411
32411
|
}
|
|
32412
32412
|
if (!options.map) {
|
|
32413
|
-
return input.filter(isNonEmptyString).map(function(
|
|
32414
|
-
return parseString(
|
|
32413
|
+
return input.filter(isNonEmptyString).map(function(str2) {
|
|
32414
|
+
return parseString(str2, options);
|
|
32415
32415
|
}).filter(Boolean);
|
|
32416
32416
|
} else {
|
|
32417
32417
|
var cookies = createNullObj();
|
|
32418
|
-
return input.filter(isNonEmptyString).reduce(function(cookies2,
|
|
32419
|
-
var cookie = parseString(
|
|
32418
|
+
return input.filter(isNonEmptyString).reduce(function(cookies2, str2) {
|
|
32419
|
+
var cookie = parseString(str2, options);
|
|
32420
32420
|
if (cookie && !isForbiddenKey(cookie.name)) {
|
|
32421
32421
|
cookies2[cookie.name] = cookie;
|
|
32422
32422
|
}
|
|
@@ -34476,38 +34476,38 @@ var require_commonjs = __commonJS({
|
|
|
34476
34476
|
"use strict";
|
|
34477
34477
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
34478
34478
|
exports2.range = exports2.balanced = void 0;
|
|
34479
|
-
var balanced = (a, b,
|
|
34480
|
-
const ma = a instanceof RegExp ? maybeMatch(a,
|
|
34481
|
-
const mb = b instanceof RegExp ? maybeMatch(b,
|
|
34482
|
-
const r = ma !== null && mb != null && (0, exports2.range)(ma, mb,
|
|
34479
|
+
var balanced = (a, b, str2) => {
|
|
34480
|
+
const ma = a instanceof RegExp ? maybeMatch(a, str2) : a;
|
|
34481
|
+
const mb = b instanceof RegExp ? maybeMatch(b, str2) : b;
|
|
34482
|
+
const r = ma !== null && mb != null && (0, exports2.range)(ma, mb, str2);
|
|
34483
34483
|
return r && {
|
|
34484
34484
|
start: r[0],
|
|
34485
34485
|
end: r[1],
|
|
34486
|
-
pre:
|
|
34487
|
-
body:
|
|
34488
|
-
post:
|
|
34486
|
+
pre: str2.slice(0, r[0]),
|
|
34487
|
+
body: str2.slice(r[0] + ma.length, r[1]),
|
|
34488
|
+
post: str2.slice(r[1] + mb.length)
|
|
34489
34489
|
};
|
|
34490
34490
|
};
|
|
34491
34491
|
exports2.balanced = balanced;
|
|
34492
|
-
var maybeMatch = (reg2,
|
|
34493
|
-
const m =
|
|
34492
|
+
var maybeMatch = (reg2, str2) => {
|
|
34493
|
+
const m = str2.match(reg2);
|
|
34494
34494
|
return m ? m[0] : null;
|
|
34495
34495
|
};
|
|
34496
|
-
var range = (a, b,
|
|
34496
|
+
var range = (a, b, str2) => {
|
|
34497
34497
|
let begs, beg, left, right = void 0, result;
|
|
34498
|
-
let ai =
|
|
34499
|
-
let bi =
|
|
34498
|
+
let ai = str2.indexOf(a);
|
|
34499
|
+
let bi = str2.indexOf(b, ai + 1);
|
|
34500
34500
|
let i = ai;
|
|
34501
34501
|
if (ai >= 0 && bi > 0) {
|
|
34502
34502
|
if (a === b) {
|
|
34503
34503
|
return [ai, bi];
|
|
34504
34504
|
}
|
|
34505
34505
|
begs = [];
|
|
34506
|
-
left =
|
|
34506
|
+
left = str2.length;
|
|
34507
34507
|
while (i >= 0 && !result) {
|
|
34508
34508
|
if (i === ai) {
|
|
34509
34509
|
begs.push(i);
|
|
34510
|
-
ai =
|
|
34510
|
+
ai = str2.indexOf(a, i + 1);
|
|
34511
34511
|
} else if (begs.length === 1) {
|
|
34512
34512
|
const r = begs.pop();
|
|
34513
34513
|
if (r !== void 0)
|
|
@@ -34518,7 +34518,7 @@ var require_commonjs = __commonJS({
|
|
|
34518
34518
|
left = beg;
|
|
34519
34519
|
right = bi;
|
|
34520
34520
|
}
|
|
34521
|
-
bi =
|
|
34521
|
+
bi = str2.indexOf(b, i + 1);
|
|
34522
34522
|
}
|
|
34523
34523
|
i = ai < bi && ai >= 0 ? ai : bi;
|
|
34524
34524
|
}
|
|
@@ -34556,23 +34556,23 @@ var require_commonjs2 = __commonJS({
|
|
|
34556
34556
|
var commaPattern = /\\,/g;
|
|
34557
34557
|
var periodPattern = /\\\./g;
|
|
34558
34558
|
exports2.EXPANSION_MAX = 1e5;
|
|
34559
|
-
function numeric(
|
|
34560
|
-
return !isNaN(
|
|
34559
|
+
function numeric(str2) {
|
|
34560
|
+
return !isNaN(str2) ? parseInt(str2, 10) : str2.charCodeAt(0);
|
|
34561
34561
|
}
|
|
34562
|
-
function escapeBraces(
|
|
34563
|
-
return
|
|
34562
|
+
function escapeBraces(str2) {
|
|
34563
|
+
return str2.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
|
|
34564
34564
|
}
|
|
34565
|
-
function unescapeBraces(
|
|
34566
|
-
return
|
|
34565
|
+
function unescapeBraces(str2) {
|
|
34566
|
+
return str2.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
|
|
34567
34567
|
}
|
|
34568
|
-
function parseCommaParts(
|
|
34569
|
-
if (!
|
|
34568
|
+
function parseCommaParts(str2) {
|
|
34569
|
+
if (!str2) {
|
|
34570
34570
|
return [""];
|
|
34571
34571
|
}
|
|
34572
34572
|
const parts = [];
|
|
34573
|
-
const m = (0, balanced_match_1.balanced)("{", "}",
|
|
34573
|
+
const m = (0, balanced_match_1.balanced)("{", "}", str2);
|
|
34574
34574
|
if (!m) {
|
|
34575
|
-
return
|
|
34575
|
+
return str2.split(",");
|
|
34576
34576
|
}
|
|
34577
34577
|
const { pre, body, post } = m;
|
|
34578
34578
|
const p = pre.split(",");
|
|
@@ -34586,18 +34586,18 @@ var require_commonjs2 = __commonJS({
|
|
|
34586
34586
|
parts.push.apply(parts, p);
|
|
34587
34587
|
return parts;
|
|
34588
34588
|
}
|
|
34589
|
-
function expand(
|
|
34590
|
-
if (!
|
|
34589
|
+
function expand(str2, options = {}) {
|
|
34590
|
+
if (!str2) {
|
|
34591
34591
|
return [];
|
|
34592
34592
|
}
|
|
34593
34593
|
const { max = exports2.EXPANSION_MAX } = options;
|
|
34594
|
-
if (
|
|
34595
|
-
|
|
34594
|
+
if (str2.slice(0, 2) === "{}") {
|
|
34595
|
+
str2 = "\\{\\}" + str2.slice(2);
|
|
34596
34596
|
}
|
|
34597
|
-
return expand_(escapeBraces(
|
|
34597
|
+
return expand_(escapeBraces(str2), max, true).map(unescapeBraces);
|
|
34598
34598
|
}
|
|
34599
|
-
function embrace(
|
|
34600
|
-
return "{" +
|
|
34599
|
+
function embrace(str2) {
|
|
34600
|
+
return "{" + str2 + "}";
|
|
34601
34601
|
}
|
|
34602
34602
|
function isPadded(el) {
|
|
34603
34603
|
return /^-?0\d/.test(el);
|
|
@@ -34608,11 +34608,11 @@ var require_commonjs2 = __commonJS({
|
|
|
34608
34608
|
function gte(i, y) {
|
|
34609
34609
|
return i >= y;
|
|
34610
34610
|
}
|
|
34611
|
-
function expand_(
|
|
34611
|
+
function expand_(str2, max, isTop) {
|
|
34612
34612
|
const expansions = [];
|
|
34613
|
-
const m = (0, balanced_match_1.balanced)("{", "}",
|
|
34613
|
+
const m = (0, balanced_match_1.balanced)("{", "}", str2);
|
|
34614
34614
|
if (!m)
|
|
34615
|
-
return [
|
|
34615
|
+
return [str2];
|
|
34616
34616
|
const pre = m.pre;
|
|
34617
34617
|
const post = m.post.length ? expand_(m.post, max, false) : [""];
|
|
34618
34618
|
if (/\$$/.test(m.pre)) {
|
|
@@ -34627,10 +34627,10 @@ var require_commonjs2 = __commonJS({
|
|
|
34627
34627
|
const isOptions = m.body.indexOf(",") >= 0;
|
|
34628
34628
|
if (!isSequence && !isOptions) {
|
|
34629
34629
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
34630
|
-
|
|
34631
|
-
return expand_(
|
|
34630
|
+
str2 = m.pre + "{" + m.body + escClose + m.post;
|
|
34631
|
+
return expand_(str2, max, true);
|
|
34632
34632
|
}
|
|
34633
|
-
return [
|
|
34633
|
+
return [str2];
|
|
34634
34634
|
}
|
|
34635
34635
|
let n;
|
|
34636
34636
|
if (isSequence) {
|
|
@@ -35067,7 +35067,7 @@ var require_ast = __commonJS({
|
|
|
35067
35067
|
}
|
|
35068
35068
|
return c;
|
|
35069
35069
|
}
|
|
35070
|
-
static #parseAST(
|
|
35070
|
+
static #parseAST(str2, ast, pos2, opt, extDepth) {
|
|
35071
35071
|
const maxDepth = opt.maxExtglobRecursion ?? 2;
|
|
35072
35072
|
let escaping = false;
|
|
35073
35073
|
let inBrace = false;
|
|
@@ -35076,8 +35076,8 @@ var require_ast = __commonJS({
|
|
|
35076
35076
|
if (ast.type === null) {
|
|
35077
35077
|
let i2 = pos2;
|
|
35078
35078
|
let acc2 = "";
|
|
35079
|
-
while (i2 <
|
|
35080
|
-
const c =
|
|
35079
|
+
while (i2 < str2.length) {
|
|
35080
|
+
const c = str2.charAt(i2++);
|
|
35081
35081
|
if (escaping || c === "\\") {
|
|
35082
35082
|
escaping = !escaping;
|
|
35083
35083
|
acc2 += c;
|
|
@@ -35100,12 +35100,12 @@ var require_ast = __commonJS({
|
|
|
35100
35100
|
acc2 += c;
|
|
35101
35101
|
continue;
|
|
35102
35102
|
}
|
|
35103
|
-
const doRecurse = !opt.noext && isExtglobType(c) &&
|
|
35103
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str2.charAt(i2) === "(" && extDepth <= maxDepth;
|
|
35104
35104
|
if (doRecurse) {
|
|
35105
35105
|
ast.push(acc2);
|
|
35106
35106
|
acc2 = "";
|
|
35107
35107
|
const ext = new _a2(c, ast);
|
|
35108
|
-
i2 = _a2.#parseAST(
|
|
35108
|
+
i2 = _a2.#parseAST(str2, ext, i2, opt, extDepth + 1);
|
|
35109
35109
|
ast.push(ext);
|
|
35110
35110
|
continue;
|
|
35111
35111
|
}
|
|
@@ -35118,8 +35118,8 @@ var require_ast = __commonJS({
|
|
|
35118
35118
|
let part = new _a2(null, ast);
|
|
35119
35119
|
const parts = [];
|
|
35120
35120
|
let acc = "";
|
|
35121
|
-
while (i <
|
|
35122
|
-
const c =
|
|
35121
|
+
while (i < str2.length) {
|
|
35122
|
+
const c = str2.charAt(i++);
|
|
35123
35123
|
if (escaping || c === "\\") {
|
|
35124
35124
|
escaping = !escaping;
|
|
35125
35125
|
acc += c;
|
|
@@ -35142,7 +35142,7 @@ var require_ast = __commonJS({
|
|
|
35142
35142
|
acc += c;
|
|
35143
35143
|
continue;
|
|
35144
35144
|
}
|
|
35145
|
-
const doRecurse = !opt.noext && isExtglobType(c) &&
|
|
35145
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str2.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
|
|
35146
35146
|
(extDepth <= maxDepth || ast && ast.#canAdoptType(c));
|
|
35147
35147
|
if (doRecurse) {
|
|
35148
35148
|
const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
|
|
@@ -35150,7 +35150,7 @@ var require_ast = __commonJS({
|
|
|
35150
35150
|
acc = "";
|
|
35151
35151
|
const ext = new _a2(c, part);
|
|
35152
35152
|
part.push(ext);
|
|
35153
|
-
i = _a2.#parseAST(
|
|
35153
|
+
i = _a2.#parseAST(str2, ext, i, opt, extDepth + depthAdd);
|
|
35154
35154
|
continue;
|
|
35155
35155
|
}
|
|
35156
35156
|
if (c === "|") {
|
|
@@ -35173,7 +35173,7 @@ var require_ast = __commonJS({
|
|
|
35173
35173
|
}
|
|
35174
35174
|
ast.type = null;
|
|
35175
35175
|
ast.#hasMagic = void 0;
|
|
35176
|
-
ast.#parts = [
|
|
35176
|
+
ast.#parts = [str2.substring(pos2 - 1)];
|
|
35177
35177
|
return i;
|
|
35178
35178
|
}
|
|
35179
35179
|
#canAdoptWithSpace(child) {
|
|
@@ -40986,17 +40986,17 @@ var require_escape_html = __commonJS({
|
|
|
40986
40986
|
var matchHtmlRegExp = /["'&<>]/;
|
|
40987
40987
|
module2.exports = escapeHtml;
|
|
40988
40988
|
function escapeHtml(string) {
|
|
40989
|
-
var
|
|
40990
|
-
var match = matchHtmlRegExp.exec(
|
|
40989
|
+
var str2 = "" + string;
|
|
40990
|
+
var match = matchHtmlRegExp.exec(str2);
|
|
40991
40991
|
if (!match) {
|
|
40992
|
-
return
|
|
40992
|
+
return str2;
|
|
40993
40993
|
}
|
|
40994
40994
|
var escape2;
|
|
40995
40995
|
var html = "";
|
|
40996
40996
|
var index = 0;
|
|
40997
40997
|
var lastIndex = 0;
|
|
40998
|
-
for (index = match.index; index <
|
|
40999
|
-
switch (
|
|
40998
|
+
for (index = match.index; index < str2.length; index++) {
|
|
40999
|
+
switch (str2.charCodeAt(index)) {
|
|
41000
41000
|
case 34:
|
|
41001
41001
|
escape2 = """;
|
|
41002
41002
|
break;
|
|
@@ -41016,12 +41016,12 @@ var require_escape_html = __commonJS({
|
|
|
41016
41016
|
continue;
|
|
41017
41017
|
}
|
|
41018
41018
|
if (lastIndex !== index) {
|
|
41019
|
-
html +=
|
|
41019
|
+
html += str2.substring(lastIndex, index);
|
|
41020
41020
|
}
|
|
41021
41021
|
lastIndex = index + 1;
|
|
41022
41022
|
html += escape2;
|
|
41023
41023
|
}
|
|
41024
|
-
return lastIndex !== index ? html +
|
|
41024
|
+
return lastIndex !== index ? html + str2.substring(lastIndex, index) : html;
|
|
41025
41025
|
}
|
|
41026
41026
|
}
|
|
41027
41027
|
});
|
|
@@ -41036,24 +41036,24 @@ var require_dist5 = __commonJS({
|
|
|
41036
41036
|
var DAY = HOUR * 24;
|
|
41037
41037
|
var YEAR = DAY * 365.25;
|
|
41038
41038
|
function parse(val) {
|
|
41039
|
-
var
|
|
41040
|
-
if (arr != null && (
|
|
41041
|
-
if (arr[3] != null) return
|
|
41042
|
-
if (arr[4] != null) return
|
|
41043
|
-
if (arr[5] != null) return
|
|
41044
|
-
if (arr[6] != null) return
|
|
41045
|
-
if (arr[7] != null) return
|
|
41046
|
-
if (arr[8] != null) return
|
|
41047
|
-
return
|
|
41048
|
-
}
|
|
41049
|
-
}
|
|
41050
|
-
function fmt(val, pfx,
|
|
41051
|
-
var
|
|
41052
|
-
return pfx +
|
|
41053
|
-
}
|
|
41054
|
-
function format(
|
|
41055
|
-
var pfx =
|
|
41056
|
-
if (abs < SEC) return
|
|
41039
|
+
var num3, arr = val.toLowerCase().match(RGX);
|
|
41040
|
+
if (arr != null && (num3 = parseFloat(arr[1]))) {
|
|
41041
|
+
if (arr[3] != null) return num3 * SEC;
|
|
41042
|
+
if (arr[4] != null) return num3 * MIN;
|
|
41043
|
+
if (arr[5] != null) return num3 * HOUR;
|
|
41044
|
+
if (arr[6] != null) return num3 * DAY;
|
|
41045
|
+
if (arr[7] != null) return num3 * DAY * 7;
|
|
41046
|
+
if (arr[8] != null) return num3 * YEAR;
|
|
41047
|
+
return num3;
|
|
41048
|
+
}
|
|
41049
|
+
}
|
|
41050
|
+
function fmt(val, pfx, str2, long) {
|
|
41051
|
+
var num3 = (val | 0) === val ? val : ~~(val + 0.5);
|
|
41052
|
+
return pfx + num3 + (long ? " " + str2 + (num3 != 1 ? "s" : "") : str2[0]);
|
|
41053
|
+
}
|
|
41054
|
+
function format(num3, long) {
|
|
41055
|
+
var pfx = num3 < 0 ? "-" : "", abs = num3 < 0 ? -num3 : num3;
|
|
41056
|
+
if (abs < SEC) return num3 + (long ? " ms" : "ms");
|
|
41057
41057
|
if (abs < MIN) return fmt(abs / SEC, pfx, "second", long);
|
|
41058
41058
|
if (abs < HOUR) return fmt(abs / MIN, pfx, "minute", long);
|
|
41059
41059
|
if (abs < DAY) return fmt(abs / HOUR, pfx, "hour", long);
|
|
@@ -41069,13 +41069,13 @@ var require_dist5 = __commonJS({
|
|
|
41069
41069
|
var require_collapseLeadingSlashes = __commonJS({
|
|
41070
41070
|
"node_modules/@fastify/send/lib/collapseLeadingSlashes.js"(exports2, module2) {
|
|
41071
41071
|
"use strict";
|
|
41072
|
-
function collapseLeadingSlashes(
|
|
41073
|
-
if (
|
|
41074
|
-
return
|
|
41072
|
+
function collapseLeadingSlashes(str2) {
|
|
41073
|
+
if (str2[0] !== "/" || str2[1] !== "/") {
|
|
41074
|
+
return str2;
|
|
41075
41075
|
}
|
|
41076
|
-
for (let i = 2, il =
|
|
41077
|
-
if (
|
|
41078
|
-
return
|
|
41076
|
+
for (let i = 2, il = str2.length; i < il; ++i) {
|
|
41077
|
+
if (str2[i] !== "/") {
|
|
41078
|
+
return str2.slice(i - 1);
|
|
41079
41079
|
}
|
|
41080
41080
|
}
|
|
41081
41081
|
}
|
|
@@ -41150,8 +41150,8 @@ var require_normalizeList = __commonJS({
|
|
|
41150
41150
|
var require_parseBytesRange = __commonJS({
|
|
41151
41151
|
"node_modules/@fastify/send/lib/parseBytesRange.js"(exports2, module2) {
|
|
41152
41152
|
"use strict";
|
|
41153
|
-
function parseBytesRange(size,
|
|
41154
|
-
const values =
|
|
41153
|
+
function parseBytesRange(size, str2) {
|
|
41154
|
+
const values = str2.slice(str2.indexOf("=") + 1);
|
|
41155
41155
|
const ranges = [];
|
|
41156
41156
|
const len2 = values.length;
|
|
41157
41157
|
let i = 0;
|
|
@@ -41230,12 +41230,12 @@ var require_parseTokenList = __commonJS({
|
|
|
41230
41230
|
"node_modules/@fastify/send/lib/parseTokenList.js"(exports2, module2) {
|
|
41231
41231
|
"use strict";
|
|
41232
41232
|
var slice = String.prototype.slice;
|
|
41233
|
-
function parseTokenList(
|
|
41233
|
+
function parseTokenList(str2, cb) {
|
|
41234
41234
|
let end = 0;
|
|
41235
41235
|
let start = 0;
|
|
41236
41236
|
let result;
|
|
41237
|
-
for (let i = 0, len2 =
|
|
41238
|
-
switch (
|
|
41237
|
+
for (let i = 0, len2 = str2.length; i < len2; i++) {
|
|
41238
|
+
switch (str2.charCodeAt(i)) {
|
|
41239
41239
|
case 32:
|
|
41240
41240
|
if (start === end) {
|
|
41241
41241
|
start = end = i + 1;
|
|
@@ -41243,7 +41243,7 @@ var require_parseTokenList = __commonJS({
|
|
|
41243
41243
|
break;
|
|
41244
41244
|
case 44:
|
|
41245
41245
|
if (start !== end) {
|
|
41246
|
-
result = cb(slice.call(
|
|
41246
|
+
result = cb(slice.call(str2, start, end));
|
|
41247
41247
|
if (result !== void 0) {
|
|
41248
41248
|
return result;
|
|
41249
41249
|
}
|
|
@@ -41256,7 +41256,7 @@ var require_parseTokenList = __commonJS({
|
|
|
41256
41256
|
}
|
|
41257
41257
|
}
|
|
41258
41258
|
if (start !== end) {
|
|
41259
|
-
return cb(slice.call(
|
|
41259
|
+
return cb(slice.call(str2, start, end));
|
|
41260
41260
|
}
|
|
41261
41261
|
}
|
|
41262
41262
|
module2.exports.parseTokenList = parseTokenList;
|
|
@@ -41269,8 +41269,8 @@ var require_depd = __commonJS({
|
|
|
41269
41269
|
var relative3 = require("path").relative;
|
|
41270
41270
|
module2.exports = depd;
|
|
41271
41271
|
var basePath = process.cwd();
|
|
41272
|
-
function containsNamespace(
|
|
41273
|
-
var vals =
|
|
41272
|
+
function containsNamespace(str2, namespace) {
|
|
41273
|
+
var vals = str2.split(/[ ,]+/);
|
|
41274
41274
|
var ns = String(namespace).toLowerCase();
|
|
41275
41275
|
for (var i = 0; i < vals.length; i++) {
|
|
41276
41276
|
var val = vals[i];
|
|
@@ -41297,21 +41297,21 @@ var require_depd = __commonJS({
|
|
|
41297
41297
|
return descriptor;
|
|
41298
41298
|
}
|
|
41299
41299
|
function createArgumentsString(arity) {
|
|
41300
|
-
var
|
|
41300
|
+
var str2 = "";
|
|
41301
41301
|
for (var i = 0; i < arity; i++) {
|
|
41302
|
-
|
|
41302
|
+
str2 += ", arg" + i;
|
|
41303
41303
|
}
|
|
41304
|
-
return
|
|
41304
|
+
return str2.substr(2);
|
|
41305
41305
|
}
|
|
41306
41306
|
function createStackString(stack) {
|
|
41307
|
-
var
|
|
41307
|
+
var str2 = this.name + ": " + this.namespace;
|
|
41308
41308
|
if (this.message) {
|
|
41309
|
-
|
|
41309
|
+
str2 += " deprecated " + this.message;
|
|
41310
41310
|
}
|
|
41311
41311
|
for (var i = 0; i < stack.length; i++) {
|
|
41312
|
-
|
|
41312
|
+
str2 += "\n at " + stack[i].toString();
|
|
41313
41313
|
}
|
|
41314
|
-
return
|
|
41314
|
+
return str2;
|
|
41315
41315
|
}
|
|
41316
41316
|
function depd(namespace) {
|
|
41317
41317
|
if (!namespace) {
|
|
@@ -41340,15 +41340,15 @@ var require_depd = __commonJS({
|
|
|
41340
41340
|
if (process.noDeprecation) {
|
|
41341
41341
|
return true;
|
|
41342
41342
|
}
|
|
41343
|
-
var
|
|
41344
|
-
return containsNamespace(
|
|
41343
|
+
var str2 = process.env.NO_DEPRECATION || "";
|
|
41344
|
+
return containsNamespace(str2, namespace);
|
|
41345
41345
|
}
|
|
41346
41346
|
function istraced(namespace) {
|
|
41347
41347
|
if (process.traceDeprecation) {
|
|
41348
41348
|
return true;
|
|
41349
41349
|
}
|
|
41350
|
-
var
|
|
41351
|
-
return containsNamespace(
|
|
41350
|
+
var str2 = process.env.TRACE_DEPRECATION || "";
|
|
41351
|
+
return containsNamespace(str2, namespace);
|
|
41352
41352
|
}
|
|
41353
41353
|
function log2(message, site) {
|
|
41354
41354
|
var haslisteners = eehaslisteners(process, "deprecation");
|
|
@@ -41782,8 +41782,8 @@ var require_toidentifier = __commonJS({
|
|
|
41782
41782
|
"node_modules/toidentifier/index.js"(exports2, module2) {
|
|
41783
41783
|
"use strict";
|
|
41784
41784
|
module2.exports = toIdentifier;
|
|
41785
|
-
function toIdentifier(
|
|
41786
|
-
return
|
|
41785
|
+
function toIdentifier(str2) {
|
|
41786
|
+
return str2.split(" ").map(function(token) {
|
|
41787
41787
|
return token.slice(0, 1).toUpperCase() + token.slice(1);
|
|
41788
41788
|
}).join("").replace(/[^ _0-9a-z]/gi, "");
|
|
41789
41789
|
}
|
|
@@ -42521,7 +42521,7 @@ var require_accept_negotiator = __commonJS({
|
|
|
42521
42521
|
var QUALITY = 2;
|
|
42522
42522
|
var END = 3;
|
|
42523
42523
|
function parse(header, processMatch) {
|
|
42524
|
-
let
|
|
42524
|
+
let str2 = "";
|
|
42525
42525
|
let quality;
|
|
42526
42526
|
let state2 = BEGIN;
|
|
42527
42527
|
for (let i = 0, il = header.length; i < il; ++i) {
|
|
@@ -42536,19 +42536,19 @@ var require_accept_negotiator = __commonJS({
|
|
|
42536
42536
|
continue;
|
|
42537
42537
|
} else if (char === ",") {
|
|
42538
42538
|
if (state2 === TOKEN) {
|
|
42539
|
-
if (processMatch(
|
|
42539
|
+
if (processMatch(str2, 1)) {
|
|
42540
42540
|
state2 = END;
|
|
42541
42541
|
break;
|
|
42542
42542
|
}
|
|
42543
42543
|
state2 = BEGIN;
|
|
42544
|
-
|
|
42544
|
+
str2 = "";
|
|
42545
42545
|
} else if (state2 === QUALITY) {
|
|
42546
|
-
if (processMatch(
|
|
42546
|
+
if (processMatch(str2, parseFloat(quality) || 0)) {
|
|
42547
42547
|
state2 = END;
|
|
42548
42548
|
break;
|
|
42549
42549
|
}
|
|
42550
42550
|
state2 = BEGIN;
|
|
42551
|
-
|
|
42551
|
+
str2 = "";
|
|
42552
42552
|
quality = "";
|
|
42553
42553
|
}
|
|
42554
42554
|
continue;
|
|
@@ -42561,29 +42561,29 @@ var require_accept_negotiator = __commonJS({
|
|
|
42561
42561
|
}
|
|
42562
42562
|
} else if (state2 === BEGIN) {
|
|
42563
42563
|
state2 = TOKEN;
|
|
42564
|
-
|
|
42564
|
+
str2 += char;
|
|
42565
42565
|
continue;
|
|
42566
42566
|
}
|
|
42567
42567
|
if (state2 === TOKEN) {
|
|
42568
42568
|
const prevChar = header[i - 1];
|
|
42569
42569
|
if (prevChar === " " || prevChar === " ") {
|
|
42570
|
-
|
|
42570
|
+
str2 = "";
|
|
42571
42571
|
}
|
|
42572
|
-
|
|
42572
|
+
str2 += char;
|
|
42573
42573
|
continue;
|
|
42574
42574
|
}
|
|
42575
|
-
if (processMatch(
|
|
42575
|
+
if (processMatch(str2, parseFloat(quality) || 0)) {
|
|
42576
42576
|
state2 = END;
|
|
42577
42577
|
break;
|
|
42578
42578
|
}
|
|
42579
42579
|
state2 = BEGIN;
|
|
42580
|
-
|
|
42580
|
+
str2 = char;
|
|
42581
42581
|
quality = "";
|
|
42582
42582
|
}
|
|
42583
42583
|
if (state2 === TOKEN) {
|
|
42584
|
-
processMatch(
|
|
42584
|
+
processMatch(str2, 1);
|
|
42585
42585
|
} else if (state2 === QUALITY) {
|
|
42586
|
-
processMatch(
|
|
42586
|
+
processMatch(str2, parseFloat(quality) || 0);
|
|
42587
42587
|
}
|
|
42588
42588
|
}
|
|
42589
42589
|
module2.exports = negotiate;
|
|
@@ -42723,8 +42723,8 @@ var require_content_disposition = __commonJS({
|
|
|
42723
42723
|
}
|
|
42724
42724
|
return string;
|
|
42725
42725
|
}
|
|
42726
|
-
function decodefield(
|
|
42727
|
-
var match = EXT_VALUE_REGEXP.exec(
|
|
42726
|
+
function decodefield(str2) {
|
|
42727
|
+
var match = EXT_VALUE_REGEXP.exec(str2);
|
|
42728
42728
|
if (!match) {
|
|
42729
42729
|
throw new TypeError("invalid extended field value");
|
|
42730
42730
|
}
|
|
@@ -42792,19 +42792,19 @@ var require_content_disposition = __commonJS({
|
|
|
42792
42792
|
}
|
|
42793
42793
|
return new ContentDisposition(type, params);
|
|
42794
42794
|
}
|
|
42795
|
-
function pdecode(
|
|
42795
|
+
function pdecode(str2, hex) {
|
|
42796
42796
|
return String.fromCharCode(parseInt(hex, 16));
|
|
42797
42797
|
}
|
|
42798
42798
|
function pencode(char) {
|
|
42799
42799
|
return "%" + String(char).charCodeAt(0).toString(16).toUpperCase();
|
|
42800
42800
|
}
|
|
42801
42801
|
function qstring(val) {
|
|
42802
|
-
var
|
|
42803
|
-
return '"' +
|
|
42802
|
+
var str2 = String(val);
|
|
42803
|
+
return '"' + str2.replace(QUOTE_REGEXP, "\\$1") + '"';
|
|
42804
42804
|
}
|
|
42805
42805
|
function ustring(val) {
|
|
42806
|
-
var
|
|
42807
|
-
var encoded = encodeURIComponent(
|
|
42806
|
+
var str2 = String(val);
|
|
42807
|
+
var encoded = encodeURIComponent(str2).replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode);
|
|
42808
42808
|
return "UTF-8''" + encoded;
|
|
42809
42809
|
}
|
|
42810
42810
|
function ContentDisposition(type, parameters) {
|
|
@@ -44386,13 +44386,13 @@ var require_Collection = __commonJS({
|
|
|
44386
44386
|
var require_stringifyComment = __commonJS({
|
|
44387
44387
|
"node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) {
|
|
44388
44388
|
"use strict";
|
|
44389
|
-
var stringifyComment = (
|
|
44389
|
+
var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#");
|
|
44390
44390
|
function indentComment(comment, indent) {
|
|
44391
44391
|
if (/^\n+$/.test(comment))
|
|
44392
44392
|
return comment.substring(1);
|
|
44393
44393
|
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
|
|
44394
44394
|
}
|
|
44395
|
-
var lineComment = (
|
|
44395
|
+
var lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment;
|
|
44396
44396
|
exports2.indentComment = indentComment;
|
|
44397
44397
|
exports2.lineComment = lineComment;
|
|
44398
44398
|
exports2.stringifyComment = stringifyComment;
|
|
@@ -44546,16 +44546,16 @@ var require_stringifyString = __commonJS({
|
|
|
44546
44546
|
lineWidth: ctx.options.lineWidth,
|
|
44547
44547
|
minContentWidth: ctx.options.minContentWidth
|
|
44548
44548
|
});
|
|
44549
|
-
var containsDocumentMarker = (
|
|
44550
|
-
function lineLengthOverLimit(
|
|
44549
|
+
var containsDocumentMarker = (str2) => /^(%|---|\.\.\.)/m.test(str2);
|
|
44550
|
+
function lineLengthOverLimit(str2, lineWidth, indentLength) {
|
|
44551
44551
|
if (!lineWidth || lineWidth < 0)
|
|
44552
44552
|
return false;
|
|
44553
44553
|
const limit = lineWidth - indentLength;
|
|
44554
|
-
const strLen =
|
|
44554
|
+
const strLen = str2.length;
|
|
44555
44555
|
if (strLen <= limit)
|
|
44556
44556
|
return false;
|
|
44557
44557
|
for (let i = 0, start = 0; i < strLen; ++i) {
|
|
44558
|
-
if (
|
|
44558
|
+
if (str2[i] === "\n") {
|
|
44559
44559
|
if (i - start > limit)
|
|
44560
44560
|
return true;
|
|
44561
44561
|
start = i + 1;
|
|
@@ -44572,11 +44572,11 @@ var require_stringifyString = __commonJS({
|
|
|
44572
44572
|
const { implicitKey } = ctx;
|
|
44573
44573
|
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
44574
44574
|
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
44575
|
-
let
|
|
44575
|
+
let str2 = "";
|
|
44576
44576
|
let start = 0;
|
|
44577
44577
|
for (let i = 0, ch2 = json[i]; ch2; ch2 = json[++i]) {
|
|
44578
44578
|
if (ch2 === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
|
|
44579
|
-
|
|
44579
|
+
str2 += json.slice(start, i) + "\\ ";
|
|
44580
44580
|
i += 1;
|
|
44581
44581
|
start = i;
|
|
44582
44582
|
ch2 = "\\";
|
|
@@ -44585,38 +44585,38 @@ var require_stringifyString = __commonJS({
|
|
|
44585
44585
|
switch (json[i + 1]) {
|
|
44586
44586
|
case "u":
|
|
44587
44587
|
{
|
|
44588
|
-
|
|
44588
|
+
str2 += json.slice(start, i);
|
|
44589
44589
|
const code = json.substr(i + 2, 4);
|
|
44590
44590
|
switch (code) {
|
|
44591
44591
|
case "0000":
|
|
44592
|
-
|
|
44592
|
+
str2 += "\\0";
|
|
44593
44593
|
break;
|
|
44594
44594
|
case "0007":
|
|
44595
|
-
|
|
44595
|
+
str2 += "\\a";
|
|
44596
44596
|
break;
|
|
44597
44597
|
case "000b":
|
|
44598
|
-
|
|
44598
|
+
str2 += "\\v";
|
|
44599
44599
|
break;
|
|
44600
44600
|
case "001b":
|
|
44601
|
-
|
|
44601
|
+
str2 += "\\e";
|
|
44602
44602
|
break;
|
|
44603
44603
|
case "0085":
|
|
44604
|
-
|
|
44604
|
+
str2 += "\\N";
|
|
44605
44605
|
break;
|
|
44606
44606
|
case "00a0":
|
|
44607
|
-
|
|
44607
|
+
str2 += "\\_";
|
|
44608
44608
|
break;
|
|
44609
44609
|
case "2028":
|
|
44610
|
-
|
|
44610
|
+
str2 += "\\L";
|
|
44611
44611
|
break;
|
|
44612
44612
|
case "2029":
|
|
44613
|
-
|
|
44613
|
+
str2 += "\\P";
|
|
44614
44614
|
break;
|
|
44615
44615
|
default:
|
|
44616
44616
|
if (code.substr(0, 2) === "00")
|
|
44617
|
-
|
|
44617
|
+
str2 += "\\x" + code.substr(2);
|
|
44618
44618
|
else
|
|
44619
|
-
|
|
44619
|
+
str2 += json.substr(i, 6);
|
|
44620
44620
|
}
|
|
44621
44621
|
i += 5;
|
|
44622
44622
|
start = i + 1;
|
|
@@ -44626,14 +44626,14 @@ var require_stringifyString = __commonJS({
|
|
|
44626
44626
|
if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
|
|
44627
44627
|
i += 1;
|
|
44628
44628
|
} else {
|
|
44629
|
-
|
|
44629
|
+
str2 += json.slice(start, i) + "\n\n";
|
|
44630
44630
|
while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
|
|
44631
|
-
|
|
44631
|
+
str2 += "\n";
|
|
44632
44632
|
i += 2;
|
|
44633
44633
|
}
|
|
44634
|
-
|
|
44634
|
+
str2 += indent;
|
|
44635
44635
|
if (json[i + 2] === " ")
|
|
44636
|
-
|
|
44636
|
+
str2 += "\\";
|
|
44637
44637
|
i += 1;
|
|
44638
44638
|
start = i + 1;
|
|
44639
44639
|
}
|
|
@@ -44642,8 +44642,8 @@ var require_stringifyString = __commonJS({
|
|
|
44642
44642
|
i += 1;
|
|
44643
44643
|
}
|
|
44644
44644
|
}
|
|
44645
|
-
|
|
44646
|
-
return implicitKey ?
|
|
44645
|
+
str2 = start ? str2 + json.slice(start) : json;
|
|
44646
|
+
return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
44647
44647
|
}
|
|
44648
44648
|
function singleQuotedString(value, ctx) {
|
|
44649
44649
|
if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
|
|
@@ -44771,15 +44771,15 @@ ${indent}${start}${value}${end}`;
|
|
|
44771
44771
|
return quotedString(value, ctx);
|
|
44772
44772
|
}
|
|
44773
44773
|
}
|
|
44774
|
-
const
|
|
44774
|
+
const str2 = value.replace(/\n+/g, `$&
|
|
44775
44775
|
${indent}`);
|
|
44776
44776
|
if (actualString) {
|
|
44777
|
-
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(
|
|
44777
|
+
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str2);
|
|
44778
44778
|
const { compat, tags } = ctx.doc.schema;
|
|
44779
44779
|
if (tags.some(test) || compat?.some(test))
|
|
44780
44780
|
return quotedString(value, ctx);
|
|
44781
44781
|
}
|
|
44782
|
-
return implicitKey ?
|
|
44782
|
+
return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));
|
|
44783
44783
|
}
|
|
44784
44784
|
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
44785
44785
|
const { implicitKey, inFlow } = ctx;
|
|
@@ -44931,11 +44931,11 @@ var require_stringify2 = __commonJS({
|
|
|
44931
44931
|
const props = stringifyProps(node, tagObj, ctx);
|
|
44932
44932
|
if (props.length > 0)
|
|
44933
44933
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
44934
|
-
const
|
|
44934
|
+
const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
|
|
44935
44935
|
if (!props)
|
|
44936
|
-
return
|
|
44937
|
-
return identity.isScalar(node) ||
|
|
44938
|
-
${ctx.indent}${
|
|
44936
|
+
return str2;
|
|
44937
|
+
return identity.isScalar(node) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props}
|
|
44938
|
+
${ctx.indent}${str2}`;
|
|
44939
44939
|
}
|
|
44940
44940
|
exports2.createStringifyContext = createStringifyContext;
|
|
44941
44941
|
exports2.stringify = stringify;
|
|
@@ -44970,8 +44970,8 @@ var require_stringifyPair = __commonJS({
|
|
|
44970
44970
|
});
|
|
44971
44971
|
let keyCommentDone = false;
|
|
44972
44972
|
let chompKeep = false;
|
|
44973
|
-
let
|
|
44974
|
-
if (!explicitKey && !ctx.inFlow &&
|
|
44973
|
+
let str2 = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
44974
|
+
if (!explicitKey && !ctx.inFlow && str2.length > 1024) {
|
|
44975
44975
|
if (simpleKeys)
|
|
44976
44976
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
44977
44977
|
explicitKey = true;
|
|
@@ -44980,27 +44980,27 @@ var require_stringifyPair = __commonJS({
|
|
|
44980
44980
|
if (allNullValues || value == null) {
|
|
44981
44981
|
if (keyCommentDone && onComment)
|
|
44982
44982
|
onComment();
|
|
44983
|
-
return
|
|
44983
|
+
return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2;
|
|
44984
44984
|
}
|
|
44985
44985
|
} else if (allNullValues && !simpleKeys || value == null && explicitKey) {
|
|
44986
|
-
|
|
44986
|
+
str2 = `? ${str2}`;
|
|
44987
44987
|
if (keyComment && !keyCommentDone) {
|
|
44988
|
-
|
|
44988
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
44989
44989
|
} else if (chompKeep && onChompKeep)
|
|
44990
44990
|
onChompKeep();
|
|
44991
|
-
return
|
|
44991
|
+
return str2;
|
|
44992
44992
|
}
|
|
44993
44993
|
if (keyCommentDone)
|
|
44994
44994
|
keyComment = null;
|
|
44995
44995
|
if (explicitKey) {
|
|
44996
44996
|
if (keyComment)
|
|
44997
|
-
|
|
44998
|
-
|
|
44997
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
44998
|
+
str2 = `? ${str2}
|
|
44999
44999
|
${indent}:`;
|
|
45000
45000
|
} else {
|
|
45001
|
-
|
|
45001
|
+
str2 = `${str2}:`;
|
|
45002
45002
|
if (keyComment)
|
|
45003
|
-
|
|
45003
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
|
|
45004
45004
|
}
|
|
45005
45005
|
let vsb, vcb, valueComment;
|
|
45006
45006
|
if (identity.isNode(value)) {
|
|
@@ -45016,7 +45016,7 @@ ${indent}:`;
|
|
|
45016
45016
|
}
|
|
45017
45017
|
ctx.implicitKey = false;
|
|
45018
45018
|
if (!explicitKey && !keyComment && identity.isScalar(value))
|
|
45019
|
-
ctx.indentAtStart =
|
|
45019
|
+
ctx.indentAtStart = str2.length + 1;
|
|
45020
45020
|
chompKeep = false;
|
|
45021
45021
|
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
|
|
45022
45022
|
ctx.indent = ctx.indent.substring(2);
|
|
@@ -45060,16 +45060,16 @@ ${ctx.indent}`;
|
|
|
45060
45060
|
} else if (valueStr === "" || valueStr[0] === "\n") {
|
|
45061
45061
|
ws = "";
|
|
45062
45062
|
}
|
|
45063
|
-
|
|
45063
|
+
str2 += ws + valueStr;
|
|
45064
45064
|
if (ctx.inFlow) {
|
|
45065
45065
|
if (valueCommentDone && onComment)
|
|
45066
45066
|
onComment();
|
|
45067
45067
|
} else if (valueComment && !valueCommentDone) {
|
|
45068
|
-
|
|
45068
|
+
str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(valueComment));
|
|
45069
45069
|
} else if (chompKeep && onChompKeep) {
|
|
45070
45070
|
onChompKeep();
|
|
45071
45071
|
}
|
|
45072
|
-
return
|
|
45072
|
+
return str2;
|
|
45073
45073
|
}
|
|
45074
45074
|
exports2.stringifyPair = stringifyPair;
|
|
45075
45075
|
}
|
|
@@ -45296,31 +45296,31 @@ var require_stringifyCollection = __commonJS({
|
|
|
45296
45296
|
}
|
|
45297
45297
|
}
|
|
45298
45298
|
chompKeep = false;
|
|
45299
|
-
let
|
|
45299
|
+
let str3 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
|
|
45300
45300
|
if (comment2)
|
|
45301
|
-
|
|
45301
|
+
str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment2));
|
|
45302
45302
|
if (chompKeep && comment2)
|
|
45303
45303
|
chompKeep = false;
|
|
45304
|
-
lines.push(blockItemPrefix +
|
|
45304
|
+
lines.push(blockItemPrefix + str3);
|
|
45305
45305
|
}
|
|
45306
|
-
let
|
|
45306
|
+
let str2;
|
|
45307
45307
|
if (lines.length === 0) {
|
|
45308
|
-
|
|
45308
|
+
str2 = flowChars.start + flowChars.end;
|
|
45309
45309
|
} else {
|
|
45310
|
-
|
|
45310
|
+
str2 = lines[0];
|
|
45311
45311
|
for (let i = 1; i < lines.length; ++i) {
|
|
45312
45312
|
const line = lines[i];
|
|
45313
|
-
|
|
45313
|
+
str2 += line ? `
|
|
45314
45314
|
${indent}${line}` : "\n";
|
|
45315
45315
|
}
|
|
45316
45316
|
}
|
|
45317
45317
|
if (comment) {
|
|
45318
|
-
|
|
45318
|
+
str2 += "\n" + stringifyComment.indentComment(commentString(comment), indent);
|
|
45319
45319
|
if (onComment)
|
|
45320
45320
|
onComment();
|
|
45321
45321
|
} else if (chompKeep && onChompKeep)
|
|
45322
45322
|
onChompKeep();
|
|
45323
|
-
return
|
|
45323
|
+
return str2;
|
|
45324
45324
|
}
|
|
45325
45325
|
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
45326
45326
|
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
@@ -45363,21 +45363,21 @@ ${indent}${line}` : "\n";
|
|
|
45363
45363
|
}
|
|
45364
45364
|
if (comment)
|
|
45365
45365
|
reqNewline = true;
|
|
45366
|
-
let
|
|
45367
|
-
reqNewline || (reqNewline = lines.length > linesAtValue ||
|
|
45366
|
+
let str2 = stringify.stringify(item, itemCtx, () => comment = null);
|
|
45367
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n"));
|
|
45368
45368
|
if (i < items.length - 1) {
|
|
45369
|
-
|
|
45369
|
+
str2 += ",";
|
|
45370
45370
|
} else if (ctx.options.trailingComma) {
|
|
45371
45371
|
if (ctx.options.lineWidth > 0) {
|
|
45372
|
-
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (
|
|
45372
|
+
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str2.length + 2) > ctx.options.lineWidth);
|
|
45373
45373
|
}
|
|
45374
45374
|
if (reqNewline) {
|
|
45375
|
-
|
|
45375
|
+
str2 += ",";
|
|
45376
45376
|
}
|
|
45377
45377
|
}
|
|
45378
45378
|
if (comment)
|
|
45379
|
-
|
|
45380
|
-
lines.push(
|
|
45379
|
+
str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment));
|
|
45380
|
+
lines.push(str2);
|
|
45381
45381
|
linesAtValue = lines.length;
|
|
45382
45382
|
}
|
|
45383
45383
|
const { start, end } = flowChars;
|
|
@@ -45389,11 +45389,11 @@ ${indent}${line}` : "\n";
|
|
|
45389
45389
|
reqNewline = ctx.options.lineWidth > 0 && len2 > ctx.options.lineWidth;
|
|
45390
45390
|
}
|
|
45391
45391
|
if (reqNewline) {
|
|
45392
|
-
let
|
|
45392
|
+
let str2 = start;
|
|
45393
45393
|
for (const line of lines)
|
|
45394
|
-
|
|
45394
|
+
str2 += line ? `
|
|
45395
45395
|
${indentStep}${indent}${line}` : "\n";
|
|
45396
|
-
return `${
|
|
45396
|
+
return `${str2}
|
|
45397
45397
|
${indent}${end}`;
|
|
45398
45398
|
} else {
|
|
45399
45399
|
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
@@ -45725,7 +45725,7 @@ var require_string = __commonJS({
|
|
|
45725
45725
|
identify: (value) => typeof value === "string",
|
|
45726
45726
|
default: true,
|
|
45727
45727
|
tag: "tag:yaml.org,2002:str",
|
|
45728
|
-
resolve: (
|
|
45728
|
+
resolve: (str2) => str2,
|
|
45729
45729
|
stringify(item, ctx, onComment, onChompKeep) {
|
|
45730
45730
|
ctx = Object.assign({ actualString: true }, ctx);
|
|
45731
45731
|
return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);
|
|
@@ -45763,7 +45763,7 @@ var require_bool = __commonJS({
|
|
|
45763
45763
|
default: true,
|
|
45764
45764
|
tag: "tag:yaml.org,2002:bool",
|
|
45765
45765
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
45766
|
-
resolve: (
|
|
45766
|
+
resolve: (str2) => new Scalar.Scalar(str2[0] === "t" || str2[0] === "T"),
|
|
45767
45767
|
stringify({ source, value }, ctx) {
|
|
45768
45768
|
if (source && boolTag.test.test(source)) {
|
|
45769
45769
|
const sv = source[0] === "t" || source[0] === "T";
|
|
@@ -45784,9 +45784,9 @@ var require_stringifyNumber = __commonJS({
|
|
|
45784
45784
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
45785
45785
|
if (typeof value === "bigint")
|
|
45786
45786
|
return String(value);
|
|
45787
|
-
const
|
|
45788
|
-
if (!isFinite(
|
|
45789
|
-
return isNaN(
|
|
45787
|
+
const num3 = typeof value === "number" ? value : Number(value);
|
|
45788
|
+
if (!isFinite(num3))
|
|
45789
|
+
return isNaN(num3) ? ".nan" : num3 < 0 ? "-.inf" : ".inf";
|
|
45790
45790
|
let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
45791
45791
|
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
|
|
45792
45792
|
let i = n.indexOf(".");
|
|
@@ -45815,7 +45815,7 @@ var require_float = __commonJS({
|
|
|
45815
45815
|
default: true,
|
|
45816
45816
|
tag: "tag:yaml.org,2002:float",
|
|
45817
45817
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
45818
|
-
resolve: (
|
|
45818
|
+
resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
45819
45819
|
stringify: stringifyNumber.stringifyNumber
|
|
45820
45820
|
};
|
|
45821
45821
|
var floatExp = {
|
|
@@ -45824,10 +45824,10 @@ var require_float = __commonJS({
|
|
|
45824
45824
|
tag: "tag:yaml.org,2002:float",
|
|
45825
45825
|
format: "EXP",
|
|
45826
45826
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
|
|
45827
|
-
resolve: (
|
|
45827
|
+
resolve: (str2) => parseFloat(str2),
|
|
45828
45828
|
stringify(node) {
|
|
45829
|
-
const
|
|
45830
|
-
return isFinite(
|
|
45829
|
+
const num3 = Number(node.value);
|
|
45830
|
+
return isFinite(num3) ? num3.toExponential() : stringifyNumber.stringifyNumber(node);
|
|
45831
45831
|
}
|
|
45832
45832
|
};
|
|
45833
45833
|
var float = {
|
|
@@ -45835,11 +45835,11 @@ var require_float = __commonJS({
|
|
|
45835
45835
|
default: true,
|
|
45836
45836
|
tag: "tag:yaml.org,2002:float",
|
|
45837
45837
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
|
|
45838
|
-
resolve(
|
|
45839
|
-
const node = new Scalar.Scalar(parseFloat(
|
|
45840
|
-
const dot =
|
|
45841
|
-
if (dot !== -1 &&
|
|
45842
|
-
node.minFractionDigits =
|
|
45838
|
+
resolve(str2) {
|
|
45839
|
+
const node = new Scalar.Scalar(parseFloat(str2));
|
|
45840
|
+
const dot = str2.indexOf(".");
|
|
45841
|
+
if (dot !== -1 && str2[str2.length - 1] === "0")
|
|
45842
|
+
node.minFractionDigits = str2.length - dot - 1;
|
|
45843
45843
|
return node;
|
|
45844
45844
|
},
|
|
45845
45845
|
stringify: stringifyNumber.stringifyNumber
|
|
@@ -45856,7 +45856,7 @@ var require_int = __commonJS({
|
|
|
45856
45856
|
"use strict";
|
|
45857
45857
|
var stringifyNumber = require_stringifyNumber();
|
|
45858
45858
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
45859
|
-
var intResolve = (
|
|
45859
|
+
var intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix);
|
|
45860
45860
|
function intStringify(node, radix, prefix) {
|
|
45861
45861
|
const { value } = node;
|
|
45862
45862
|
if (intIdentify(value) && value >= 0)
|
|
@@ -45869,7 +45869,7 @@ var require_int = __commonJS({
|
|
|
45869
45869
|
tag: "tag:yaml.org,2002:int",
|
|
45870
45870
|
format: "OCT",
|
|
45871
45871
|
test: /^0o[0-7]+$/,
|
|
45872
|
-
resolve: (
|
|
45872
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 8, opt),
|
|
45873
45873
|
stringify: (node) => intStringify(node, 8, "0o")
|
|
45874
45874
|
};
|
|
45875
45875
|
var int = {
|
|
@@ -45877,7 +45877,7 @@ var require_int = __commonJS({
|
|
|
45877
45877
|
default: true,
|
|
45878
45878
|
tag: "tag:yaml.org,2002:int",
|
|
45879
45879
|
test: /^[-+]?[0-9]+$/,
|
|
45880
|
-
resolve: (
|
|
45880
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt),
|
|
45881
45881
|
stringify: stringifyNumber.stringifyNumber
|
|
45882
45882
|
};
|
|
45883
45883
|
var intHex = {
|
|
@@ -45886,7 +45886,7 @@ var require_int = __commonJS({
|
|
|
45886
45886
|
tag: "tag:yaml.org,2002:int",
|
|
45887
45887
|
format: "HEX",
|
|
45888
45888
|
test: /^0x[0-9a-fA-F]+$/,
|
|
45889
|
-
resolve: (
|
|
45889
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt),
|
|
45890
45890
|
stringify: (node) => intStringify(node, 16, "0x")
|
|
45891
45891
|
};
|
|
45892
45892
|
exports2.int = int;
|
|
@@ -45939,7 +45939,7 @@ var require_schema2 = __commonJS({
|
|
|
45939
45939
|
identify: (value) => typeof value === "string",
|
|
45940
45940
|
default: true,
|
|
45941
45941
|
tag: "tag:yaml.org,2002:str",
|
|
45942
|
-
resolve: (
|
|
45942
|
+
resolve: (str2) => str2,
|
|
45943
45943
|
stringify: stringifyJSON
|
|
45944
45944
|
},
|
|
45945
45945
|
{
|
|
@@ -45956,7 +45956,7 @@ var require_schema2 = __commonJS({
|
|
|
45956
45956
|
default: true,
|
|
45957
45957
|
tag: "tag:yaml.org,2002:bool",
|
|
45958
45958
|
test: /^true$|^false$/,
|
|
45959
|
-
resolve: (
|
|
45959
|
+
resolve: (str2) => str2 === "true",
|
|
45960
45960
|
stringify: stringifyJSON
|
|
45961
45961
|
},
|
|
45962
45962
|
{
|
|
@@ -45964,7 +45964,7 @@ var require_schema2 = __commonJS({
|
|
|
45964
45964
|
default: true,
|
|
45965
45965
|
tag: "tag:yaml.org,2002:int",
|
|
45966
45966
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
45967
|
-
resolve: (
|
|
45967
|
+
resolve: (str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, 10),
|
|
45968
45968
|
stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
|
|
45969
45969
|
},
|
|
45970
45970
|
{
|
|
@@ -45972,7 +45972,7 @@ var require_schema2 = __commonJS({
|
|
|
45972
45972
|
default: true,
|
|
45973
45973
|
tag: "tag:yaml.org,2002:float",
|
|
45974
45974
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
45975
|
-
resolve: (
|
|
45975
|
+
resolve: (str2) => parseFloat(str2),
|
|
45976
45976
|
stringify: stringifyJSON
|
|
45977
45977
|
}
|
|
45978
45978
|
];
|
|
@@ -45980,9 +45980,9 @@ var require_schema2 = __commonJS({
|
|
|
45980
45980
|
default: true,
|
|
45981
45981
|
tag: "",
|
|
45982
45982
|
test: /^/,
|
|
45983
|
-
resolve(
|
|
45984
|
-
onError(`Unresolved plain scalar ${JSON.stringify(
|
|
45985
|
-
return
|
|
45983
|
+
resolve(str2, onError) {
|
|
45984
|
+
onError(`Unresolved plain scalar ${JSON.stringify(str2)}`);
|
|
45985
|
+
return str2;
|
|
45986
45986
|
}
|
|
45987
45987
|
};
|
|
45988
45988
|
var schema = [map.map, seq.seq].concat(jsonScalars, jsonError);
|
|
@@ -46014,10 +46014,10 @@ var require_binary = __commonJS({
|
|
|
46014
46014
|
if (typeof node_buffer.Buffer === "function") {
|
|
46015
46015
|
return node_buffer.Buffer.from(src, "base64");
|
|
46016
46016
|
} else if (typeof atob === "function") {
|
|
46017
|
-
const
|
|
46018
|
-
const buffer = new Uint8Array(
|
|
46019
|
-
for (let i = 0; i <
|
|
46020
|
-
buffer[i] =
|
|
46017
|
+
const str2 = atob(src.replace(/[\n\r]/g, ""));
|
|
46018
|
+
const buffer = new Uint8Array(str2.length);
|
|
46019
|
+
for (let i = 0; i < str2.length; ++i)
|
|
46020
|
+
buffer[i] = str2.charCodeAt(i);
|
|
46021
46021
|
return buffer;
|
|
46022
46022
|
} else {
|
|
46023
46023
|
onError("This environment does not support reading binary tags; either Buffer or atob is required");
|
|
@@ -46028,28 +46028,28 @@ var require_binary = __commonJS({
|
|
|
46028
46028
|
if (!value)
|
|
46029
46029
|
return "";
|
|
46030
46030
|
const buf = value;
|
|
46031
|
-
let
|
|
46031
|
+
let str2;
|
|
46032
46032
|
if (typeof node_buffer.Buffer === "function") {
|
|
46033
|
-
|
|
46033
|
+
str2 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString("base64");
|
|
46034
46034
|
} else if (typeof btoa === "function") {
|
|
46035
46035
|
let s = "";
|
|
46036
46036
|
for (let i = 0; i < buf.length; ++i)
|
|
46037
46037
|
s += String.fromCharCode(buf[i]);
|
|
46038
|
-
|
|
46038
|
+
str2 = btoa(s);
|
|
46039
46039
|
} else {
|
|
46040
46040
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
46041
46041
|
}
|
|
46042
46042
|
type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
|
|
46043
46043
|
if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
|
|
46044
46044
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
46045
|
-
const n = Math.ceil(
|
|
46045
|
+
const n = Math.ceil(str2.length / lineWidth);
|
|
46046
46046
|
const lines = new Array(n);
|
|
46047
46047
|
for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
|
|
46048
|
-
lines[i] =
|
|
46048
|
+
lines[i] = str2.substr(o, lineWidth);
|
|
46049
46049
|
}
|
|
46050
|
-
|
|
46050
|
+
str2 = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
|
46051
46051
|
}
|
|
46052
|
-
return stringifyString.stringifyString({ comment, type, value:
|
|
46052
|
+
return stringifyString.stringifyString({ comment, type, value: str2 }, ctx, onComment, onChompKeep);
|
|
46053
46053
|
}
|
|
46054
46054
|
};
|
|
46055
46055
|
exports2.binary = binary;
|
|
@@ -46255,7 +46255,7 @@ var require_float2 = __commonJS({
|
|
|
46255
46255
|
default: true,
|
|
46256
46256
|
tag: "tag:yaml.org,2002:float",
|
|
46257
46257
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
46258
|
-
resolve: (
|
|
46258
|
+
resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
46259
46259
|
stringify: stringifyNumber.stringifyNumber
|
|
46260
46260
|
};
|
|
46261
46261
|
var floatExp = {
|
|
@@ -46264,10 +46264,10 @@ var require_float2 = __commonJS({
|
|
|
46264
46264
|
tag: "tag:yaml.org,2002:float",
|
|
46265
46265
|
format: "EXP",
|
|
46266
46266
|
test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
|
|
46267
|
-
resolve: (
|
|
46267
|
+
resolve: (str2) => parseFloat(str2.replace(/_/g, "")),
|
|
46268
46268
|
stringify(node) {
|
|
46269
|
-
const
|
|
46270
|
-
return isFinite(
|
|
46269
|
+
const num3 = Number(node.value);
|
|
46270
|
+
return isFinite(num3) ? num3.toExponential() : stringifyNumber.stringifyNumber(node);
|
|
46271
46271
|
}
|
|
46272
46272
|
};
|
|
46273
46273
|
var float = {
|
|
@@ -46275,11 +46275,11 @@ var require_float2 = __commonJS({
|
|
|
46275
46275
|
default: true,
|
|
46276
46276
|
tag: "tag:yaml.org,2002:float",
|
|
46277
46277
|
test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
|
|
46278
|
-
resolve(
|
|
46279
|
-
const node = new Scalar.Scalar(parseFloat(
|
|
46280
|
-
const dot =
|
|
46278
|
+
resolve(str2) {
|
|
46279
|
+
const node = new Scalar.Scalar(parseFloat(str2.replace(/_/g, "")));
|
|
46280
|
+
const dot = str2.indexOf(".");
|
|
46281
46281
|
if (dot !== -1) {
|
|
46282
|
-
const f =
|
|
46282
|
+
const f = str2.substring(dot + 1).replace(/_/g, "");
|
|
46283
46283
|
if (f[f.length - 1] === "0")
|
|
46284
46284
|
node.minFractionDigits = f.length;
|
|
46285
46285
|
}
|
|
@@ -46299,34 +46299,34 @@ var require_int2 = __commonJS({
|
|
|
46299
46299
|
"use strict";
|
|
46300
46300
|
var stringifyNumber = require_stringifyNumber();
|
|
46301
46301
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
46302
|
-
function intResolve(
|
|
46303
|
-
const sign =
|
|
46302
|
+
function intResolve(str2, offset, radix, { intAsBigInt }) {
|
|
46303
|
+
const sign = str2[0];
|
|
46304
46304
|
if (sign === "-" || sign === "+")
|
|
46305
46305
|
offset += 1;
|
|
46306
|
-
|
|
46306
|
+
str2 = str2.substring(offset).replace(/_/g, "");
|
|
46307
46307
|
if (intAsBigInt) {
|
|
46308
46308
|
switch (radix) {
|
|
46309
46309
|
case 2:
|
|
46310
|
-
|
|
46310
|
+
str2 = `0b${str2}`;
|
|
46311
46311
|
break;
|
|
46312
46312
|
case 8:
|
|
46313
|
-
|
|
46313
|
+
str2 = `0o${str2}`;
|
|
46314
46314
|
break;
|
|
46315
46315
|
case 16:
|
|
46316
|
-
|
|
46316
|
+
str2 = `0x${str2}`;
|
|
46317
46317
|
break;
|
|
46318
46318
|
}
|
|
46319
|
-
const n2 = BigInt(
|
|
46319
|
+
const n2 = BigInt(str2);
|
|
46320
46320
|
return sign === "-" ? BigInt(-1) * n2 : n2;
|
|
46321
46321
|
}
|
|
46322
|
-
const n = parseInt(
|
|
46322
|
+
const n = parseInt(str2, radix);
|
|
46323
46323
|
return sign === "-" ? -1 * n : n;
|
|
46324
46324
|
}
|
|
46325
46325
|
function intStringify(node, radix, prefix) {
|
|
46326
46326
|
const { value } = node;
|
|
46327
46327
|
if (intIdentify(value)) {
|
|
46328
|
-
const
|
|
46329
|
-
return value < 0 ? "-" + prefix +
|
|
46328
|
+
const str2 = value.toString(radix);
|
|
46329
|
+
return value < 0 ? "-" + prefix + str2.substr(1) : prefix + str2;
|
|
46330
46330
|
}
|
|
46331
46331
|
return stringifyNumber.stringifyNumber(node);
|
|
46332
46332
|
}
|
|
@@ -46336,7 +46336,7 @@ var require_int2 = __commonJS({
|
|
|
46336
46336
|
tag: "tag:yaml.org,2002:int",
|
|
46337
46337
|
format: "BIN",
|
|
46338
46338
|
test: /^[-+]?0b[0-1_]+$/,
|
|
46339
|
-
resolve: (
|
|
46339
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 2, opt),
|
|
46340
46340
|
stringify: (node) => intStringify(node, 2, "0b")
|
|
46341
46341
|
};
|
|
46342
46342
|
var intOct = {
|
|
@@ -46345,7 +46345,7 @@ var require_int2 = __commonJS({
|
|
|
46345
46345
|
tag: "tag:yaml.org,2002:int",
|
|
46346
46346
|
format: "OCT",
|
|
46347
46347
|
test: /^[-+]?0[0-7_]+$/,
|
|
46348
|
-
resolve: (
|
|
46348
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 1, 8, opt),
|
|
46349
46349
|
stringify: (node) => intStringify(node, 8, "0")
|
|
46350
46350
|
};
|
|
46351
46351
|
var int = {
|
|
@@ -46353,7 +46353,7 @@ var require_int2 = __commonJS({
|
|
|
46353
46353
|
default: true,
|
|
46354
46354
|
tag: "tag:yaml.org,2002:int",
|
|
46355
46355
|
test: /^[-+]?[0-9][0-9_]*$/,
|
|
46356
|
-
resolve: (
|
|
46356
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt),
|
|
46357
46357
|
stringify: stringifyNumber.stringifyNumber
|
|
46358
46358
|
};
|
|
46359
46359
|
var intHex = {
|
|
@@ -46362,7 +46362,7 @@ var require_int2 = __commonJS({
|
|
|
46362
46362
|
tag: "tag:yaml.org,2002:int",
|
|
46363
46363
|
format: "HEX",
|
|
46364
46364
|
test: /^[-+]?0x[0-9a-fA-F_]+$/,
|
|
46365
|
-
resolve: (
|
|
46365
|
+
resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt),
|
|
46366
46366
|
stringify: (node) => intStringify(node, 16, "0x")
|
|
46367
46367
|
};
|
|
46368
46368
|
exports2.int = int;
|
|
@@ -46466,26 +46466,26 @@ var require_timestamp2 = __commonJS({
|
|
|
46466
46466
|
"node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) {
|
|
46467
46467
|
"use strict";
|
|
46468
46468
|
var stringifyNumber = require_stringifyNumber();
|
|
46469
|
-
function parseSexagesimal(
|
|
46470
|
-
const sign =
|
|
46471
|
-
const parts = sign === "-" || sign === "+" ?
|
|
46472
|
-
const
|
|
46473
|
-
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 *
|
|
46474
|
-
return sign === "-" ?
|
|
46469
|
+
function parseSexagesimal(str2, asBigInt) {
|
|
46470
|
+
const sign = str2[0];
|
|
46471
|
+
const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2;
|
|
46472
|
+
const num3 = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
46473
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num3(60) + num3(p), num3(0));
|
|
46474
|
+
return sign === "-" ? num3(-1) * res : res;
|
|
46475
46475
|
}
|
|
46476
46476
|
function stringifySexagesimal(node) {
|
|
46477
46477
|
let { value } = node;
|
|
46478
|
-
let
|
|
46478
|
+
let num3 = (n) => n;
|
|
46479
46479
|
if (typeof value === "bigint")
|
|
46480
|
-
|
|
46480
|
+
num3 = (n) => BigInt(n);
|
|
46481
46481
|
else if (isNaN(value) || !isFinite(value))
|
|
46482
46482
|
return stringifyNumber.stringifyNumber(node);
|
|
46483
46483
|
let sign = "";
|
|
46484
46484
|
if (value < 0) {
|
|
46485
46485
|
sign = "-";
|
|
46486
|
-
value *=
|
|
46486
|
+
value *= num3(-1);
|
|
46487
46487
|
}
|
|
46488
|
-
const _60 =
|
|
46488
|
+
const _60 = num3(60);
|
|
46489
46489
|
const parts = [value % _60];
|
|
46490
46490
|
if (value < 60) {
|
|
46491
46491
|
parts.unshift(0);
|
|
@@ -46505,7 +46505,7 @@ var require_timestamp2 = __commonJS({
|
|
|
46505
46505
|
tag: "tag:yaml.org,2002:int",
|
|
46506
46506
|
format: "TIME",
|
|
46507
46507
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
46508
|
-
resolve: (
|
|
46508
|
+
resolve: (str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt),
|
|
46509
46509
|
stringify: stringifySexagesimal
|
|
46510
46510
|
};
|
|
46511
46511
|
var floatTime = {
|
|
@@ -46514,7 +46514,7 @@ var require_timestamp2 = __commonJS({
|
|
|
46514
46514
|
tag: "tag:yaml.org,2002:float",
|
|
46515
46515
|
format: "TIME",
|
|
46516
46516
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
46517
|
-
resolve: (
|
|
46517
|
+
resolve: (str2) => parseSexagesimal(str2, false),
|
|
46518
46518
|
stringify: stringifySexagesimal
|
|
46519
46519
|
};
|
|
46520
46520
|
var timestamp = {
|
|
@@ -46525,8 +46525,8 @@ var require_timestamp2 = __commonJS({
|
|
|
46525
46525
|
// may be omitted altogether, resulting in a date format. In such a case, the time part is
|
|
46526
46526
|
// assumed to be 00:00:00Z (start of day, UTC).
|
|
46527
46527
|
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
46528
|
-
resolve(
|
|
46529
|
-
const match =
|
|
46528
|
+
resolve(str2) {
|
|
46529
|
+
const match = str2.match(timestamp.test);
|
|
46530
46530
|
if (!match)
|
|
46531
46531
|
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
46532
46532
|
const [, year, month, day2, hour2, minute, second] = match.map(Number);
|
|
@@ -53093,7 +53093,7 @@ function appVersion() {
|
|
|
53093
53093
|
return resolveVersion({
|
|
53094
53094
|
isSea: isSea2(),
|
|
53095
53095
|
sqVersionXml: readSqVersionXml(),
|
|
53096
|
-
define: true ? "0.
|
|
53096
|
+
define: true ? "0.78.0" : void 0,
|
|
53097
53097
|
pkgVersion: readPkgVersion()
|
|
53098
53098
|
});
|
|
53099
53099
|
}
|
|
@@ -53103,7 +53103,7 @@ function resolveChannel(s) {
|
|
|
53103
53103
|
return "dev";
|
|
53104
53104
|
}
|
|
53105
53105
|
function appChannel() {
|
|
53106
|
-
return resolveChannel({ isSea: isSea2(), define: true ? "0.
|
|
53106
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.78.0" : void 0 });
|
|
53107
53107
|
}
|
|
53108
53108
|
|
|
53109
53109
|
// workflow-update.ts
|
|
@@ -53990,25 +53990,45 @@ var BASE_PLATE_PARAMS = {
|
|
|
53990
53990
|
edgeDist: [0, 5e3],
|
|
53991
53991
|
weldLeg: [0, 200]
|
|
53992
53992
|
};
|
|
53993
|
+
var SHEAR_PLATE_PARAMS = {
|
|
53994
|
+
plateThickness: [1, 100],
|
|
53995
|
+
plateHeight: [1, 5e3],
|
|
53996
|
+
plateWidth: [1, 2e3],
|
|
53997
|
+
boltDia: [1, 100],
|
|
53998
|
+
boltCols: [1, 10],
|
|
53999
|
+
boltRows: [1, 30],
|
|
54000
|
+
boltPitch: [1, 1e3],
|
|
54001
|
+
edgeDist: [0, 2e3]
|
|
54002
|
+
};
|
|
53993
54003
|
function sanitizeRecipe(raw) {
|
|
53994
54004
|
if (!raw || typeof raw !== "object") return void 0;
|
|
53995
54005
|
const r = raw;
|
|
53996
54006
|
if (typeof r.kind !== "string" || !r.kind || !r.params || typeof r.params !== "object") return void 0;
|
|
53997
|
-
const
|
|
54007
|
+
const num3 = {};
|
|
53998
54008
|
for (const [k, v] of Object.entries(r.params)) {
|
|
53999
|
-
if (typeof v === "number" && isFinite(v))
|
|
54009
|
+
if (typeof v === "number" && isFinite(v)) num3[k] = v;
|
|
54000
54010
|
}
|
|
54001
54011
|
if (r.kind === "base-plate") {
|
|
54002
54012
|
const params = {};
|
|
54003
54013
|
for (const [k, [lo, hi]] of Object.entries(BASE_PLATE_PARAMS)) {
|
|
54004
|
-
if (k in
|
|
54005
|
-
if (!(
|
|
54006
|
-
params[k] =
|
|
54014
|
+
if (k in num3) {
|
|
54015
|
+
if (!(num3[k] >= lo && num3[k] <= hi)) return void 0;
|
|
54016
|
+
params[k] = num3[k];
|
|
54017
|
+
}
|
|
54018
|
+
}
|
|
54019
|
+
return Object.keys(params).length ? { kind: r.kind, params } : void 0;
|
|
54020
|
+
}
|
|
54021
|
+
if (r.kind === "shear-plate") {
|
|
54022
|
+
const params = {};
|
|
54023
|
+
for (const [k, [lo, hi]] of Object.entries(SHEAR_PLATE_PARAMS)) {
|
|
54024
|
+
if (k in num3) {
|
|
54025
|
+
if (!(num3[k] >= lo && num3[k] <= hi)) return void 0;
|
|
54026
|
+
params[k] = num3[k];
|
|
54007
54027
|
}
|
|
54008
54028
|
}
|
|
54009
54029
|
return Object.keys(params).length ? { kind: r.kind, params } : void 0;
|
|
54010
54030
|
}
|
|
54011
|
-
return Object.keys(
|
|
54031
|
+
return Object.keys(num3).length ? { kind: r.kind, params: num3 } : void 0;
|
|
54012
54032
|
}
|
|
54013
54033
|
async function extractConnection(companionId, ifcPath, id) {
|
|
54014
54034
|
await ensureConnectionReader();
|
|
@@ -54437,6 +54457,318 @@ function readVersion(id, n) {
|
|
|
54437
54457
|
return null;
|
|
54438
54458
|
}
|
|
54439
54459
|
}
|
|
54460
|
+
function readVersionSkeleton(id, n) {
|
|
54461
|
+
try {
|
|
54462
|
+
const snap = JSON.parse((0, import_node_fs21.readFileSync)((0, import_node_path19.join)(versionsDir(id), `${n}.json`), "utf8"));
|
|
54463
|
+
return snap.contract;
|
|
54464
|
+
} catch {
|
|
54465
|
+
return null;
|
|
54466
|
+
}
|
|
54467
|
+
}
|
|
54468
|
+
|
|
54469
|
+
// bom-format.ts
|
|
54470
|
+
var round1 = (n) => Math.round(n * 10) / 10;
|
|
54471
|
+
function contractToBom(contractInput) {
|
|
54472
|
+
const c = contractInput ?? {};
|
|
54473
|
+
const weights = c.weights ?? {};
|
|
54474
|
+
const agg = /* @__PURE__ */ new Map();
|
|
54475
|
+
for (const plan of c.plans ?? []) {
|
|
54476
|
+
const ptPerFt = typeof plan.pt_per_ft === "number" && plan.pt_per_ft > 0 ? plan.pt_per_ft : 12;
|
|
54477
|
+
for (const m of plan.members ?? []) {
|
|
54478
|
+
const profile = m.profile;
|
|
54479
|
+
if (!profile) continue;
|
|
54480
|
+
const plf = weights[profile];
|
|
54481
|
+
if (plf == null) continue;
|
|
54482
|
+
let lenFt;
|
|
54483
|
+
if (m.role === "column") {
|
|
54484
|
+
const tos = m.col?.tos;
|
|
54485
|
+
const bos = m.col?.bos;
|
|
54486
|
+
if (tos == null || bos == null) continue;
|
|
54487
|
+
lenFt = Math.abs(tos - bos) / 12;
|
|
54488
|
+
} else {
|
|
54489
|
+
const wp = m.wp;
|
|
54490
|
+
if (!Array.isArray(wp) || wp.length < 2) continue;
|
|
54491
|
+
const a = wp[0];
|
|
54492
|
+
const b = wp[1];
|
|
54493
|
+
if (!a || !b) continue;
|
|
54494
|
+
lenFt = Math.hypot(a[0] - b[0], a[1] - b[1]) / ptPerFt;
|
|
54495
|
+
}
|
|
54496
|
+
const g = agg.get(profile) ?? { qty: 0, lenFt: 0, plf };
|
|
54497
|
+
g.qty += 1;
|
|
54498
|
+
g.lenFt += lenFt;
|
|
54499
|
+
agg.set(profile, g);
|
|
54500
|
+
}
|
|
54501
|
+
}
|
|
54502
|
+
const rows = [...agg.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([profile, g]) => ({
|
|
54503
|
+
Profile: profile,
|
|
54504
|
+
Qty: g.qty,
|
|
54505
|
+
"Length (ft)": round1(g.lenFt),
|
|
54506
|
+
"lb/ft": g.plf,
|
|
54507
|
+
"Weight (lb)": Math.round(g.lenFt * g.plf)
|
|
54508
|
+
}));
|
|
54509
|
+
const totalLb = rows.reduce((t, r) => t + r["Weight (lb)"], 0);
|
|
54510
|
+
const totalQty = rows.reduce((t, r) => t + r.Qty, 0);
|
|
54511
|
+
const totalLenFt = round1(rows.reduce((t, r) => t + r["Length (ft)"], 0));
|
|
54512
|
+
const totalTons = round1(totalLb / 2e3);
|
|
54513
|
+
rows.push({
|
|
54514
|
+
Profile: "TOTAL",
|
|
54515
|
+
Qty: totalQty,
|
|
54516
|
+
"Length (ft)": totalLenFt,
|
|
54517
|
+
"lb/ft": "",
|
|
54518
|
+
"Weight (lb)": totalLb
|
|
54519
|
+
});
|
|
54520
|
+
return {
|
|
54521
|
+
title: `Bill of Materials \u2014 ${totalTons} tons (${totalLb.toLocaleString("en-US")} lb)`,
|
|
54522
|
+
columns: ["Profile", "Qty", "Length (ft)", "lb/ft", "Weight (lb)"],
|
|
54523
|
+
rows,
|
|
54524
|
+
totalLb,
|
|
54525
|
+
totalTons
|
|
54526
|
+
};
|
|
54527
|
+
}
|
|
54528
|
+
|
|
54529
|
+
// steel-diff.ts
|
|
54530
|
+
var NUL = String.fromCharCode(0);
|
|
54531
|
+
var asArray = (v) => Array.isArray(v) ? v : [];
|
|
54532
|
+
var str = (v) => typeof v === "string" ? v : "";
|
|
54533
|
+
var normProfile = (v) => str(v).trim().toUpperCase().replace(/\s+/g, "");
|
|
54534
|
+
var num = (v) => typeof v === "number" && isFinite(v) ? v : null;
|
|
54535
|
+
var MOVE_TOL_FT = 0.5;
|
|
54536
|
+
function collect(contract) {
|
|
54537
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
54538
|
+
const dup = /* @__PURE__ */ new Set();
|
|
54539
|
+
const idSheets = /* @__PURE__ */ new Map();
|
|
54540
|
+
const c = contract ?? {};
|
|
54541
|
+
for (const plan of asArray(c.plans)) {
|
|
54542
|
+
const sheet = str(plan?.sheet);
|
|
54543
|
+
const rawPpf = plan?.pt_per_ft;
|
|
54544
|
+
const hasScale = typeof rawPpf === "number" && rawPpf > 0;
|
|
54545
|
+
const ptPerFt = hasScale ? rawPpf : 12;
|
|
54546
|
+
for (const m of asArray(plan?.members)) {
|
|
54547
|
+
const id = str(m?.id);
|
|
54548
|
+
if (!id) continue;
|
|
54549
|
+
const key = sheet + NUL + id;
|
|
54550
|
+
(idSheets.get(id) ?? idSheets.set(id, /* @__PURE__ */ new Set()).get(id)).add(sheet);
|
|
54551
|
+
if (byKey.has(key)) {
|
|
54552
|
+
dup.add(key);
|
|
54553
|
+
continue;
|
|
54554
|
+
}
|
|
54555
|
+
byKey.set(key, {
|
|
54556
|
+
key,
|
|
54557
|
+
id,
|
|
54558
|
+
sheet,
|
|
54559
|
+
mark: str(m?.mark) || void 0,
|
|
54560
|
+
profile: str(m?.profile),
|
|
54561
|
+
role: str(m?.role) || "beam",
|
|
54562
|
+
ptPerFt,
|
|
54563
|
+
hasScale,
|
|
54564
|
+
wp: asArray(m?.wp).map((p) => asArray(p).map((x) => fin(x))),
|
|
54565
|
+
// finite-guarded (no NaN) — consistent with num() elsewhere
|
|
54566
|
+
ends: asArray(m?.ends),
|
|
54567
|
+
col: m?.col ?? {},
|
|
54568
|
+
material: str(m?.material)
|
|
54569
|
+
});
|
|
54570
|
+
}
|
|
54571
|
+
}
|
|
54572
|
+
return { byKey, dupKeys: [...dup], idSheets };
|
|
54573
|
+
}
|
|
54574
|
+
var refOf = (m) => ({ key: m.key, id: m.id, sheet: m.sheet, ...m.mark ? { mark: m.mark } : {}, profile: m.profile, role: m.role });
|
|
54575
|
+
var fin = (v) => {
|
|
54576
|
+
const n = Number(v);
|
|
54577
|
+
return isFinite(n) ? n : 0;
|
|
54578
|
+
};
|
|
54579
|
+
var dist = (p, q) => Math.hypot((p[0] ?? 0) - (q[0] ?? 0), (p[1] ?? 0) - (q[1] ?? 0));
|
|
54580
|
+
var ftPt = (p, ppf) => [fin(p?.[0]) / ppf, fin(p?.[1]) / ppf];
|
|
54581
|
+
function beamMoveFeet(a, b) {
|
|
54582
|
+
const af0 = ftPt(a.wp[0], a.ptPerFt), af1 = ftPt(a.wp[1] ?? a.wp[0], a.ptPerFt);
|
|
54583
|
+
const bf0 = ftPt(b.wp[0], b.ptPerFt), bf1 = ftPt(b.wp[1] ?? b.wp[0], b.ptPerFt);
|
|
54584
|
+
const aligned = Math.max(dist(af0, bf0), dist(af1, bf1));
|
|
54585
|
+
const flipped = Math.max(dist(af0, bf1), dist(af1, bf0));
|
|
54586
|
+
return flipped < aligned ? { feet: flipped, flipped: true } : { feet: aligned, flipped: false };
|
|
54587
|
+
}
|
|
54588
|
+
function elevMoveFeet(a, b) {
|
|
54589
|
+
let ft = 0;
|
|
54590
|
+
const at = num(a.col?.tos), bt = num(b.col?.tos);
|
|
54591
|
+
if (at != null && bt != null) ft = Math.max(ft, Math.abs(at - bt) / 12);
|
|
54592
|
+
const ab = num(a.col?.bos), bb = num(b.col?.bos);
|
|
54593
|
+
if (ab != null && bb != null) ft = Math.max(ft, Math.abs(ab - bb) / 12);
|
|
54594
|
+
for (let i = 0; i < 2; i++) {
|
|
54595
|
+
const ea = num(a.ends?.[i]?.tos), eb = num(b.ends?.[i]?.tos);
|
|
54596
|
+
if (ea != null && eb != null) ft = Math.max(ft, Math.abs(ea - eb) / 12);
|
|
54597
|
+
}
|
|
54598
|
+
return ft;
|
|
54599
|
+
}
|
|
54600
|
+
var stable = (o) => {
|
|
54601
|
+
if (Array.isArray(o)) return "[" + o.map(stable).join(",") + "]";
|
|
54602
|
+
if (o && typeof o === "object") return "{" + Object.keys(o).sort().map((k) => k + ":" + stable(o[k])).join(",") + "}";
|
|
54603
|
+
return JSON.stringify(o) ?? "null";
|
|
54604
|
+
};
|
|
54605
|
+
function connIdentity(ref, lib) {
|
|
54606
|
+
const conn = str(ref?.conn).trim();
|
|
54607
|
+
if (conn && lib.has(conn)) {
|
|
54608
|
+
const r = lib.get(conn);
|
|
54609
|
+
return `${str(r?.type)}/${str(r?.detail)}`;
|
|
54610
|
+
}
|
|
54611
|
+
return str(ref?.detail).trim() || str(ref?.note).trim() || "";
|
|
54612
|
+
}
|
|
54613
|
+
function jointsSummary(a, b) {
|
|
54614
|
+
const kind = (sig) => sig.split("@")[0] ?? "";
|
|
54615
|
+
const setA = new Set(a), setB = new Set(b);
|
|
54616
|
+
const gone = a.filter((x) => !setB.has(x));
|
|
54617
|
+
const got = b.filter((x) => !setA.has(x));
|
|
54618
|
+
const gk = gone.length ? kind(gone[0] ?? "") : "";
|
|
54619
|
+
const tk = got.length ? kind(got[0] ?? "") : "";
|
|
54620
|
+
if (gone.length && got.length && gk === tk) return `${tk || "connection"} params changed`;
|
|
54621
|
+
if (got.length) return `${tk || "connection"} added`;
|
|
54622
|
+
if (gone.length) return `${gk || "connection"} removed`;
|
|
54623
|
+
return "connection changed";
|
|
54624
|
+
}
|
|
54625
|
+
function indexJoints(contract, lib) {
|
|
54626
|
+
const idx = /* @__PURE__ */ new Map();
|
|
54627
|
+
for (const j of asArray(contract?.joints)) {
|
|
54628
|
+
const sig = `${str(j?.kind)}@${str(j?.at)}:${connIdentity(j, lib)}:${stable(j?.params)}:${stable(asArray(j?.secondaries).map(str).sort())}:${stable(j?.place)}`;
|
|
54629
|
+
for (const ref of [str(j?.main), ...asArray(j?.secondaries).map(str)].filter(Boolean)) {
|
|
54630
|
+
const arr = idx.get(ref);
|
|
54631
|
+
if (arr) arr.push(sig);
|
|
54632
|
+
else idx.set(ref, [sig]);
|
|
54633
|
+
}
|
|
54634
|
+
}
|
|
54635
|
+
for (const sigs of idx.values()) sigs.sort();
|
|
54636
|
+
return idx;
|
|
54637
|
+
}
|
|
54638
|
+
function diffContracts(from, to) {
|
|
54639
|
+
const A = collect(from);
|
|
54640
|
+
const B = collect(to);
|
|
54641
|
+
const dupKeys = [.../* @__PURE__ */ new Set([...A.dupKeys, ...B.dupKeys])];
|
|
54642
|
+
const ambiguous = new Set(dupKeys);
|
|
54643
|
+
const libA = new Map(asArray(from?.connections).map((r) => [str(r?.id), r]));
|
|
54644
|
+
const libB = new Map(asArray(to?.connections).map((r) => [str(r?.id), r]));
|
|
54645
|
+
const jointsA = indexJoints(from, libA);
|
|
54646
|
+
const jointsB = indexJoints(to, libB);
|
|
54647
|
+
const ambiguousJoints = /* @__PURE__ */ new Set();
|
|
54648
|
+
const flagAmbiguousJoints = (contract, idSheets) => {
|
|
54649
|
+
for (const j of asArray(contract?.joints)) {
|
|
54650
|
+
const refs = [str(j?.main), ...asArray(j?.secondaries).map(str)].filter(Boolean);
|
|
54651
|
+
if (refs.some((r) => (idSheets.get(r)?.size ?? 0) > 1)) ambiguousJoints.add(str(j?.id));
|
|
54652
|
+
}
|
|
54653
|
+
};
|
|
54654
|
+
flagAmbiguousJoints(from, A.idSheets);
|
|
54655
|
+
flagAmbiguousJoints(to, B.idSheets);
|
|
54656
|
+
const added = [];
|
|
54657
|
+
const removed = [];
|
|
54658
|
+
for (const [key, b] of B.byKey) if (!A.byKey.has(key)) added.push(refOf(b));
|
|
54659
|
+
for (const [key, a] of A.byKey) if (!B.byKey.has(key)) removed.push(refOf(a));
|
|
54660
|
+
const resized = [];
|
|
54661
|
+
const material = [];
|
|
54662
|
+
const moved = [];
|
|
54663
|
+
const connections = [];
|
|
54664
|
+
let unchanged = 0;
|
|
54665
|
+
let anyScaleUnknown = false;
|
|
54666
|
+
for (const [key, a] of A.byKey) {
|
|
54667
|
+
const b = B.byKey.get(key);
|
|
54668
|
+
if (!b || ambiguous.has(key)) continue;
|
|
54669
|
+
let changed = false;
|
|
54670
|
+
if (normProfile(a.profile) !== normProfile(b.profile)) {
|
|
54671
|
+
resized.push({ ref: refOf(b), from: a.profile, to: b.profile });
|
|
54672
|
+
changed = true;
|
|
54673
|
+
}
|
|
54674
|
+
if (a.material.trim().toUpperCase() !== b.material.trim().toUpperCase() && (a.material || b.material)) {
|
|
54675
|
+
material.push({ ref: refOf(b), from: a.material, to: b.material });
|
|
54676
|
+
changed = true;
|
|
54677
|
+
}
|
|
54678
|
+
const planMove = a.wp.length && b.wp.length ? beamMoveFeet(a, b) : { feet: 0, flipped: false };
|
|
54679
|
+
const feet = Math.max(planMove.feet, elevMoveFeet(a, b));
|
|
54680
|
+
if (feet > MOVE_TOL_FT) {
|
|
54681
|
+
const scaleUnknown = !a.hasScale || !b.hasScale;
|
|
54682
|
+
moved.push({ ref: refOf(b), feet: Math.round(feet * 10) / 10, ...scaleUnknown ? { scaleUnknown: true } : {} });
|
|
54683
|
+
if (scaleUnknown) anyScaleUnknown = true;
|
|
54684
|
+
changed = true;
|
|
54685
|
+
}
|
|
54686
|
+
const eA = [connIdentity(a.ends?.[0], libA), connIdentity(a.ends?.[1], libA)];
|
|
54687
|
+
const eB = [connIdentity(b.ends?.[0], libB), connIdentity(b.ends?.[1], libB)];
|
|
54688
|
+
const [eB0, eB1] = planMove.flipped ? [eB[1], eB[0]] : [eB[0], eB[1]];
|
|
54689
|
+
const parts = [];
|
|
54690
|
+
if (eA[0] !== eB0) parts.push(`end 1: ${eA[0] || "none"} \u2192 ${eB0 || "none"}`);
|
|
54691
|
+
if (eA[1] !== eB1) parts.push(`end 2: ${eA[1] || "none"} \u2192 ${eB1 || "none"}`);
|
|
54692
|
+
const cA = connIdentity(a.col, libA), cB = connIdentity(b.col, libB);
|
|
54693
|
+
if (cA !== cB) parts.push(`column: ${cA || "none"} \u2192 ${cB || "none"}`);
|
|
54694
|
+
if (!((A.idSheets.get(a.id)?.size ?? 0) > 1 || (B.idSheets.get(b.id)?.size ?? 0) > 1)) {
|
|
54695
|
+
const jA = jointsA.get(a.id) ?? [];
|
|
54696
|
+
const jB = jointsB.get(b.id) ?? [];
|
|
54697
|
+
if (stable(jA) !== stable(jB)) parts.push(jointsSummary(jA, jB));
|
|
54698
|
+
}
|
|
54699
|
+
if (parts.length) {
|
|
54700
|
+
connections.push({ ref: refOf(b), summary: parts.join("; ") });
|
|
54701
|
+
changed = true;
|
|
54702
|
+
}
|
|
54703
|
+
if (!changed) unchanged++;
|
|
54704
|
+
}
|
|
54705
|
+
const keysA = A.byKey.size;
|
|
54706
|
+
const keysB = B.byKey.size;
|
|
54707
|
+
let shared = 0;
|
|
54708
|
+
for (const k of A.byKey.keys()) if (B.byKey.has(k)) shared++;
|
|
54709
|
+
const smaller = Math.min(keysA, keysB);
|
|
54710
|
+
const identityNotPreserved = keysA >= 5 && keysB >= 5 && smaller > 0 && shared / smaller < 0.1;
|
|
54711
|
+
const bom = (x) => {
|
|
54712
|
+
try {
|
|
54713
|
+
return contractToBom(x);
|
|
54714
|
+
} catch {
|
|
54715
|
+
return { totalLb: 0, totalTons: 0 };
|
|
54716
|
+
}
|
|
54717
|
+
};
|
|
54718
|
+
const fromBom = bom(from);
|
|
54719
|
+
const toBom = bom(to);
|
|
54720
|
+
const netLb = toBom.totalLb - fromBom.totalLb;
|
|
54721
|
+
const warnings = {
|
|
54722
|
+
...identityNotPreserved ? { identityNotPreserved: true } : {},
|
|
54723
|
+
...dupKeys.length ? { duplicateKeys: dupKeys } : {},
|
|
54724
|
+
...ambiguousJoints.size ? { ambiguousJoints: [...ambiguousJoints] } : {},
|
|
54725
|
+
...anyScaleUnknown ? { scaleUnknown: true } : {}
|
|
54726
|
+
};
|
|
54727
|
+
return {
|
|
54728
|
+
from: 0,
|
|
54729
|
+
to: 0,
|
|
54730
|
+
tonnage: {
|
|
54731
|
+
fromLb: fromBom.totalLb,
|
|
54732
|
+
toLb: toBom.totalLb,
|
|
54733
|
+
netLb,
|
|
54734
|
+
fromTons: fromBom.totalTons,
|
|
54735
|
+
toTons: toBom.totalTons,
|
|
54736
|
+
netTons: Math.round(netLb / 2e3 * 10) / 10
|
|
54737
|
+
},
|
|
54738
|
+
added,
|
|
54739
|
+
removed,
|
|
54740
|
+
resized,
|
|
54741
|
+
moved,
|
|
54742
|
+
material,
|
|
54743
|
+
connections,
|
|
54744
|
+
unchanged,
|
|
54745
|
+
warnings
|
|
54746
|
+
};
|
|
54747
|
+
}
|
|
54748
|
+
|
|
54749
|
+
// version-diff.ts
|
|
54750
|
+
function computeVersionDiff(id, n, base) {
|
|
54751
|
+
if (!Number.isInteger(n) || n < 1) return { code: 400, body: { ok: false, error: "n must be a positive integer version number" } };
|
|
54752
|
+
const head = listVersions(id)[0]?.n ?? 0;
|
|
54753
|
+
if (head === 0) return { code: 404, body: { ok: false, error: "no versions for this project" } };
|
|
54754
|
+
const to = readVersionSkeleton(id, n);
|
|
54755
|
+
if (to == null) return { code: 404, body: { ok: false, error: `version v${n} not found` } };
|
|
54756
|
+
if (n === 1) {
|
|
54757
|
+
const empty = diffContracts({}, to);
|
|
54758
|
+
return {
|
|
54759
|
+
code: 200,
|
|
54760
|
+
body: { ok: true, diff: { ...empty, from: 0, to: 1, firstVersion: true, added: [], tonnage: { fromLb: 0, toLb: 0, netLb: 0, fromTons: 0, toTons: 0, netTons: 0 } } }
|
|
54761
|
+
};
|
|
54762
|
+
}
|
|
54763
|
+
const b = base ?? n - 1;
|
|
54764
|
+
if (!Number.isInteger(b) || b < 1 || b >= n) return { code: 400, body: { ok: false, error: `base must be an integer in 1..${n - 1}` } };
|
|
54765
|
+
const from = readVersionSkeleton(id, b);
|
|
54766
|
+
if (from == null) return { code: 404, body: { ok: false, error: `base version v${b} not found` } };
|
|
54767
|
+
const diff = diffContracts(from, to);
|
|
54768
|
+
diff.from = b;
|
|
54769
|
+
diff.to = n;
|
|
54770
|
+
return { code: 200, body: { ok: true, diff } };
|
|
54771
|
+
}
|
|
54440
54772
|
|
|
54441
54773
|
// project-sources-store.ts
|
|
54442
54774
|
var import_node_crypto8 = require("node:crypto");
|
|
@@ -54843,16 +55175,16 @@ var GROUPS = {
|
|
|
54843
55175
|
custom: { key: "custom", label: "Imported connections", color: "#8a97a8" }
|
|
54844
55176
|
};
|
|
54845
55177
|
var EMBED = 1;
|
|
54846
|
-
function
|
|
55178
|
+
function num2(params, key, def) {
|
|
54847
55179
|
const v = params?.[key];
|
|
54848
55180
|
return typeof v === "number" && isFinite(v) ? v : def;
|
|
54849
55181
|
}
|
|
54850
55182
|
function pos(params, key, def) {
|
|
54851
|
-
const v =
|
|
55183
|
+
const v = num2(params, key, def);
|
|
54852
55184
|
return v > 0 ? v : def;
|
|
54853
55185
|
}
|
|
54854
55186
|
function intMin1(params, key, def) {
|
|
54855
|
-
return Math.max(1, Math.round(
|
|
55187
|
+
return Math.max(1, Math.round(num2(params, key, def)));
|
|
54856
55188
|
}
|
|
54857
55189
|
function finite3(a) {
|
|
54858
55190
|
return Array.isArray(a) && a.length >= 3 && a.every((n) => typeof n === "number" && isFinite(n));
|
|
@@ -54907,18 +55239,18 @@ function expandBasePlate(joint, col) {
|
|
|
54907
55239
|
const [bx, by, bz] = base;
|
|
54908
55240
|
const { w, d } = col.dims;
|
|
54909
55241
|
const thickness = pos(p, "thickness", 25);
|
|
54910
|
-
const margin = Math.max(0,
|
|
55242
|
+
const margin = Math.max(0, num2(p, "margin", 75));
|
|
54911
55243
|
const width = pos(p, "plateWidth", Math.max(w, d) + 2 * margin);
|
|
54912
55244
|
const depth = pos(p, "plateDepth", Math.max(w, d) + 2 * margin);
|
|
54913
55245
|
const boltDia = pos(p, "boltDia", 24);
|
|
54914
|
-
const clearance =
|
|
54915
|
-
const edge =
|
|
55246
|
+
const clearance = num2(p, "holeClearance", 6);
|
|
55247
|
+
const edge = num2(p, "edgeDist", Math.max(1.5 * boltDia, 40));
|
|
54916
55248
|
const cols = intMin1(p, "boltCols", 2);
|
|
54917
55249
|
const rows = intMin1(p, "boltRows", 2);
|
|
54918
|
-
const weldLeg =
|
|
54919
|
-
const projBelow =
|
|
54920
|
-
const embedment = Math.max(0,
|
|
54921
|
-
const grout = Math.max(0,
|
|
55250
|
+
const weldLeg = num2(p, "weldLeg", 8);
|
|
55251
|
+
const projBelow = num2(p, "projBelow", 75);
|
|
55252
|
+
const embedment = Math.max(0, num2(p, "embedment", 0));
|
|
55253
|
+
const grout = Math.max(0, num2(p, "grout", 0));
|
|
54922
55254
|
const rodBelow = embedment > 0 ? grout + embedment : projBelow;
|
|
54923
55255
|
const nutH = pos(p, "nutHeight", 0.8 * boltDia);
|
|
54924
55256
|
const nutAF = pos(p, "nutAcrossFlats", 1.6 * boltDia);
|
|
@@ -55028,14 +55360,14 @@ function beamCopes(beam, support, at, params) {
|
|
|
55028
55360
|
if (!finite3(beam.from) || !finite3(beam.to) || !beam.dims || !(beam.dims.d > 0) || !(beam.dims.w > 0)) return {};
|
|
55029
55361
|
if (profileKind(support.profile) !== "I") return {};
|
|
55030
55362
|
const endPt = at === "end1" ? beam.to : beam.from;
|
|
55031
|
-
const gap = Math.max(0,
|
|
55363
|
+
const gap = Math.max(0, num2(params, "clearance", 12.7));
|
|
55032
55364
|
const beamMidZ = endPt[2] + (typeof beam.posOffset === "number" && isFinite(beam.posOffset) ? beam.posOffset : 0);
|
|
55033
55365
|
const beamTopZ = beamMidZ + beam.dims.d / 2, beamBotZ = beamMidZ - beam.dims.d / 2;
|
|
55034
55366
|
const supMidZ = supportWorkZAt(support, endPt) + (typeof support.posOffset === "number" && isFinite(support.posOffset) ? support.posOffset : 0);
|
|
55035
55367
|
const supTopZ = supMidZ + support.dims.d / 2, supBotZ = supMidZ - support.dims.d / 2;
|
|
55036
55368
|
const tfS = flangeThk(support.profile, support.dims.d);
|
|
55037
|
-
const kClear = Math.max(0,
|
|
55038
|
-
const minLen = Math.max(0,
|
|
55369
|
+
const kClear = Math.max(0, num2(params, "copeKClear", 12.7));
|
|
55370
|
+
const minLen = Math.max(0, num2(params, "copeMinLength", 31.75));
|
|
55039
55371
|
const kBand = tfS + kClear;
|
|
55040
55372
|
const webLo = supBotZ + kBand, webHi = supTopZ - kBand;
|
|
55041
55373
|
if (!(webLo < webHi && beamTopZ > webLo && beamBotZ < webHi)) return {};
|
|
@@ -55078,14 +55410,14 @@ function expandShearPlate(joint, beam, support) {
|
|
|
55078
55410
|
const cols = intMin1(p, "boltCols", 1);
|
|
55079
55411
|
const rows = intMin1(p, "boltRows", 3);
|
|
55080
55412
|
const pitch = pos(p, "boltPitch", 70);
|
|
55081
|
-
const holeClr =
|
|
55082
|
-
const edge = Math.max(0,
|
|
55083
|
-
const weldLeg =
|
|
55084
|
-
const clearance = Math.max(0,
|
|
55413
|
+
const holeClr = num2(p, "holeClearance", 2);
|
|
55414
|
+
const edge = Math.max(0, num2(p, "edgeDist", Math.max(1.5 * boltDia, 30)));
|
|
55415
|
+
const weldLeg = num2(p, "weldLeg", 6);
|
|
55416
|
+
const clearance = Math.max(0, num2(p, "clearance", 12.7));
|
|
55085
55417
|
const stiffener = p?.["stiffener"] === true;
|
|
55086
55418
|
const height = pos(p, "plateHeight", (rows - 1) * pitch + 2 * edge);
|
|
55087
55419
|
const twHalf = webHalfThk(beam.profile, beam.dims.w);
|
|
55088
|
-
const webSide =
|
|
55420
|
+
const webSide = num2(p, "webSide", 1) >= 0 ? 1 : -1;
|
|
55089
55421
|
const pOff = webSide * (twHalf + thickness / 2);
|
|
55090
55422
|
const u0 = support ? webHalfThk(support.profile, support.dims.w) : 0;
|
|
55091
55423
|
const edgeV = Math.min(edge, height * 0.4);
|
|
@@ -55416,66 +55748,6 @@ function contractToScene(contractInput) {
|
|
|
55416
55748
|
};
|
|
55417
55749
|
}
|
|
55418
55750
|
|
|
55419
|
-
// bom-format.ts
|
|
55420
|
-
var round1 = (n) => Math.round(n * 10) / 10;
|
|
55421
|
-
function contractToBom(contractInput) {
|
|
55422
|
-
const c = contractInput ?? {};
|
|
55423
|
-
const weights = c.weights ?? {};
|
|
55424
|
-
const agg = /* @__PURE__ */ new Map();
|
|
55425
|
-
for (const plan of c.plans ?? []) {
|
|
55426
|
-
const ptPerFt = typeof plan.pt_per_ft === "number" && plan.pt_per_ft > 0 ? plan.pt_per_ft : 12;
|
|
55427
|
-
for (const m of plan.members ?? []) {
|
|
55428
|
-
const profile = m.profile;
|
|
55429
|
-
if (!profile) continue;
|
|
55430
|
-
const plf = weights[profile];
|
|
55431
|
-
if (plf == null) continue;
|
|
55432
|
-
let lenFt;
|
|
55433
|
-
if (m.role === "column") {
|
|
55434
|
-
const tos = m.col?.tos;
|
|
55435
|
-
const bos = m.col?.bos;
|
|
55436
|
-
if (tos == null || bos == null) continue;
|
|
55437
|
-
lenFt = Math.abs(tos - bos) / 12;
|
|
55438
|
-
} else {
|
|
55439
|
-
const wp = m.wp;
|
|
55440
|
-
if (!Array.isArray(wp) || wp.length < 2) continue;
|
|
55441
|
-
const a = wp[0];
|
|
55442
|
-
const b = wp[1];
|
|
55443
|
-
if (!a || !b) continue;
|
|
55444
|
-
lenFt = Math.hypot(a[0] - b[0], a[1] - b[1]) / ptPerFt;
|
|
55445
|
-
}
|
|
55446
|
-
const g = agg.get(profile) ?? { qty: 0, lenFt: 0, plf };
|
|
55447
|
-
g.qty += 1;
|
|
55448
|
-
g.lenFt += lenFt;
|
|
55449
|
-
agg.set(profile, g);
|
|
55450
|
-
}
|
|
55451
|
-
}
|
|
55452
|
-
const rows = [...agg.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([profile, g]) => ({
|
|
55453
|
-
Profile: profile,
|
|
55454
|
-
Qty: g.qty,
|
|
55455
|
-
"Length (ft)": round1(g.lenFt),
|
|
55456
|
-
"lb/ft": g.plf,
|
|
55457
|
-
"Weight (lb)": Math.round(g.lenFt * g.plf)
|
|
55458
|
-
}));
|
|
55459
|
-
const totalLb = rows.reduce((t, r) => t + r["Weight (lb)"], 0);
|
|
55460
|
-
const totalQty = rows.reduce((t, r) => t + r.Qty, 0);
|
|
55461
|
-
const totalLenFt = round1(rows.reduce((t, r) => t + r["Length (ft)"], 0));
|
|
55462
|
-
const totalTons = round1(totalLb / 2e3);
|
|
55463
|
-
rows.push({
|
|
55464
|
-
Profile: "TOTAL",
|
|
55465
|
-
Qty: totalQty,
|
|
55466
|
-
"Length (ft)": totalLenFt,
|
|
55467
|
-
"lb/ft": "",
|
|
55468
|
-
"Weight (lb)": totalLb
|
|
55469
|
-
});
|
|
55470
|
-
return {
|
|
55471
|
-
title: `Bill of Materials \u2014 ${totalTons} tons (${totalLb.toLocaleString("en-US")} lb)`,
|
|
55472
|
-
columns: ["Profile", "Qty", "Length (ft)", "lb/ft", "Weight (lb)"],
|
|
55473
|
-
rows,
|
|
55474
|
-
totalLb,
|
|
55475
|
-
totalTons
|
|
55476
|
-
};
|
|
55477
|
-
}
|
|
55478
|
-
|
|
55479
55751
|
// bom-export.ts
|
|
55480
55752
|
var import_node_os14 = require("node:os");
|
|
55481
55753
|
var import_node_path21 = require("node:path");
|
|
@@ -59236,17 +59508,17 @@ try {
|
|
|
59236
59508
|
tds = 1;
|
|
59237
59509
|
} catch (e) {
|
|
59238
59510
|
}
|
|
59239
|
-
function strToU8(
|
|
59511
|
+
function strToU8(str2, latin1) {
|
|
59240
59512
|
if (latin1) {
|
|
59241
|
-
var ar_1 = new u8(
|
|
59242
|
-
for (var i = 0; i <
|
|
59243
|
-
ar_1[i] =
|
|
59513
|
+
var ar_1 = new u8(str2.length);
|
|
59514
|
+
for (var i = 0; i < str2.length; ++i)
|
|
59515
|
+
ar_1[i] = str2.charCodeAt(i);
|
|
59244
59516
|
return ar_1;
|
|
59245
59517
|
}
|
|
59246
59518
|
if (te)
|
|
59247
|
-
return te.encode(
|
|
59248
|
-
var l =
|
|
59249
|
-
var ar = new u8(
|
|
59519
|
+
return te.encode(str2);
|
|
59520
|
+
var l = str2.length;
|
|
59521
|
+
var ar = new u8(str2.length + (str2.length >> 1));
|
|
59250
59522
|
var ai = 0;
|
|
59251
59523
|
var w = function(v) {
|
|
59252
59524
|
ar[ai++] = v;
|
|
@@ -59257,13 +59529,13 @@ function strToU8(str, latin1) {
|
|
|
59257
59529
|
n.set(ar);
|
|
59258
59530
|
ar = n;
|
|
59259
59531
|
}
|
|
59260
|
-
var c =
|
|
59532
|
+
var c = str2.charCodeAt(i);
|
|
59261
59533
|
if (c < 128 || latin1)
|
|
59262
59534
|
w(c);
|
|
59263
59535
|
else if (c < 2048)
|
|
59264
59536
|
w(192 | c >> 6), w(128 | c & 63);
|
|
59265
59537
|
else if (c > 55295 && c < 57344)
|
|
59266
|
-
c = 65536 + (c & 1023 << 10) |
|
|
59538
|
+
c = 65536 + (c & 1023 << 10) | str2.charCodeAt(++i) & 1023, w(240 | c >> 18), w(128 | c >> 12 & 63), w(128 | c >> 6 & 63), w(128 | c & 63);
|
|
59267
59539
|
else
|
|
59268
59540
|
w(224 | c >> 12), w(128 | c >> 6 & 63), w(128 | c & 63);
|
|
59269
59541
|
}
|
|
@@ -60005,16 +60277,16 @@ function memberTons(contract, m) {
|
|
|
60005
60277
|
}
|
|
60006
60278
|
function rollup(members, countWeighted = false) {
|
|
60007
60279
|
const counts = emptyCounts();
|
|
60008
|
-
let
|
|
60280
|
+
let num3 = 0, den = 0, tons = 0;
|
|
60009
60281
|
for (const m of members) {
|
|
60010
60282
|
counts[m.band]++;
|
|
60011
60283
|
if (m.band === "rfi") continue;
|
|
60012
60284
|
const w = countWeighted ? 1 : m.tons;
|
|
60013
|
-
|
|
60285
|
+
num3 += w * BAND_WEIGHT[m.band];
|
|
60014
60286
|
den += w;
|
|
60015
60287
|
tons += m.tons;
|
|
60016
60288
|
}
|
|
60017
|
-
return { score: den > 0 ? Math.round(
|
|
60289
|
+
return { score: den > 0 ? Math.round(num3 / den * 100) : null, tons, counts };
|
|
60018
60290
|
}
|
|
60019
60291
|
function bandEnd(end, rows) {
|
|
60020
60292
|
const row = end.conn ? rows.get(end.conn) : void 0;
|
|
@@ -60050,14 +60322,14 @@ function scoreConnections(contractInput) {
|
|
|
60050
60322
|
}
|
|
60051
60323
|
});
|
|
60052
60324
|
const counts = emptyCounts();
|
|
60053
|
-
let
|
|
60325
|
+
let num3 = 0, den = 0;
|
|
60054
60326
|
for (const e of byEnd) {
|
|
60055
60327
|
counts[e.band]++;
|
|
60056
60328
|
if (e.band === "rfi") continue;
|
|
60057
|
-
|
|
60329
|
+
num3 += BAND_WEIGHT[e.band];
|
|
60058
60330
|
den += 1;
|
|
60059
60331
|
}
|
|
60060
|
-
const category = { score: den > 0 ? Math.round(
|
|
60332
|
+
const category = { score: den > 0 ? Math.round(num3 / den * 100) : null, tons: 0, counts };
|
|
60061
60333
|
return { byEnd, category };
|
|
60062
60334
|
}
|
|
60063
60335
|
function scoreContract(contractInput) {
|
|
@@ -60104,7 +60376,7 @@ function scoreContract(contractInput) {
|
|
|
60104
60376
|
const columns = rollup(byMember.filter((m) => m.role === "column"));
|
|
60105
60377
|
const details = rollupDetails(byDetail);
|
|
60106
60378
|
const scored = byMember.filter((m) => m.band !== "rfi");
|
|
60107
|
-
const
|
|
60379
|
+
const num3 = scored.reduce((s, m) => s + m.tons * BAND_WEIGHT[m.band], 0);
|
|
60108
60380
|
const den = scored.reduce((s, m) => s + m.tons, 0);
|
|
60109
60381
|
return {
|
|
60110
60382
|
byMember,
|
|
@@ -60122,7 +60394,7 @@ function scoreContract(contractInput) {
|
|
|
60122
60394
|
note: "Approximate in v1 \u2014 precise per-segment binding is Slice 2."
|
|
60123
60395
|
},
|
|
60124
60396
|
overall: {
|
|
60125
|
-
score: den > 0 ? Math.round(
|
|
60397
|
+
score: den > 0 ? Math.round(num3 / den * 100) : null,
|
|
60126
60398
|
tons: den,
|
|
60127
60399
|
rfiCount: byMember.filter((m) => m.band === "rfi").length
|
|
60128
60400
|
}
|
|
@@ -60134,13 +60406,13 @@ function detailSheet(text) {
|
|
|
60134
60406
|
}
|
|
60135
60407
|
function rollupDetails(details) {
|
|
60136
60408
|
const counts = emptyCounts();
|
|
60137
|
-
let
|
|
60409
|
+
let num3 = 0, den = 0;
|
|
60138
60410
|
for (const d of details) {
|
|
60139
60411
|
counts[d.band]++;
|
|
60140
|
-
|
|
60412
|
+
num3 += BAND_WEIGHT[d.band];
|
|
60141
60413
|
den += 1;
|
|
60142
60414
|
}
|
|
60143
|
-
return { score: den > 0 ? Math.round(
|
|
60415
|
+
return { score: den > 0 ? Math.round(num3 / den * 100) : null, tons: 0, counts };
|
|
60144
60416
|
}
|
|
60145
60417
|
|
|
60146
60418
|
// contract-score.ts
|
|
@@ -63425,18 +63697,18 @@ var unifyPaths = (paths_) => {
|
|
|
63425
63697
|
return paths.map(normalizePathToUnix);
|
|
63426
63698
|
};
|
|
63427
63699
|
var toUnix = (string) => {
|
|
63428
|
-
let
|
|
63700
|
+
let str2 = string.replace(BACK_SLASH_RE, SLASH);
|
|
63429
63701
|
let prepend = false;
|
|
63430
|
-
if (
|
|
63702
|
+
if (str2.startsWith(SLASH_SLASH)) {
|
|
63431
63703
|
prepend = true;
|
|
63432
63704
|
}
|
|
63433
|
-
while (
|
|
63434
|
-
|
|
63705
|
+
while (str2.match(DOUBLE_SLASH_RE)) {
|
|
63706
|
+
str2 = str2.replace(DOUBLE_SLASH_RE, SLASH);
|
|
63435
63707
|
}
|
|
63436
63708
|
if (prepend) {
|
|
63437
|
-
|
|
63709
|
+
str2 = SLASH + str2;
|
|
63438
63710
|
}
|
|
63439
|
-
return
|
|
63711
|
+
return str2;
|
|
63440
63712
|
};
|
|
63441
63713
|
var normalizePathToUnix = (path) => toUnix(sysPath2.normalize(toUnix(path)));
|
|
63442
63714
|
var normalizeIgnored = (cwd = "") => (path) => {
|
|
@@ -64675,6 +64947,17 @@ async function startServer() {
|
|
|
64675
64947
|
if (!p) return reply.status(404).send({ ok: false, error: `unknown project: ${req.params.id}` });
|
|
64676
64948
|
return { ok: true, versions: listVersions(req.params.id), approvedAt: p.approvedAt ?? null };
|
|
64677
64949
|
});
|
|
64950
|
+
app.get(
|
|
64951
|
+
"/api/projects/:id/versions/:n/diff",
|
|
64952
|
+
async (req, reply) => {
|
|
64953
|
+
const project = getProject(req.params.id);
|
|
64954
|
+
if (!project) return reply.status(404).send({ ok: false, error: `unknown project: ${req.params.id}` });
|
|
64955
|
+
const n = Number(req.params.n);
|
|
64956
|
+
const base = req.query.base !== void 0 && req.query.base !== "" ? Number(req.query.base) : void 0;
|
|
64957
|
+
const { code, body } = computeVersionDiff(project.id, n, base);
|
|
64958
|
+
return reply.status(code).send(body);
|
|
64959
|
+
}
|
|
64960
|
+
);
|
|
64678
64961
|
app.post("/api/projects/:id/versions/:n/rollback", async (req, reply) => {
|
|
64679
64962
|
const project = getProject(req.params.id);
|
|
64680
64963
|
if (!project) return reply.status(404).send({ ok: false, error: `unknown project: ${req.params.id}` });
|