@dpuse/dpuse-shared 1.0.181 → 1.0.183
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/dpuse-shared.es.js
CHANGED
|
@@ -349,11 +349,11 @@ function ee(e) {
|
|
|
349
349
|
return t;
|
|
350
350
|
}
|
|
351
351
|
/* @__NO_SIDE_EFFECTS__ */
|
|
352
|
-
function
|
|
352
|
+
function w(e, t) {
|
|
353
353
|
return d({
|
|
354
354
|
kind: "schema",
|
|
355
355
|
type: "union",
|
|
356
|
-
reference:
|
|
356
|
+
reference: w,
|
|
357
357
|
expects: /* @__PURE__ */ u(e.map((e) => e.expects), "|"),
|
|
358
358
|
async: !1,
|
|
359
359
|
options: e,
|
|
@@ -381,7 +381,7 @@ function te(e, t) {
|
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
383
|
/* @__NO_SIDE_EFFECTS__ */
|
|
384
|
-
function
|
|
384
|
+
function te(...e) {
|
|
385
385
|
return d({
|
|
386
386
|
...e[0],
|
|
387
387
|
pipe: e,
|
|
@@ -399,10 +399,10 @@ function ne(...e) {
|
|
|
399
399
|
}
|
|
400
400
|
//#endregion
|
|
401
401
|
//#region src/locale/locale.schema.ts
|
|
402
|
-
var
|
|
402
|
+
var T = /* @__PURE__ */ S({
|
|
403
403
|
en: /* @__PURE__ */ C(),
|
|
404
404
|
es: /* @__PURE__ */ C()
|
|
405
|
-
}),
|
|
405
|
+
}), ne = {
|
|
406
406
|
id: /* @__PURE__ */ C(),
|
|
407
407
|
label: /* @__PURE__ */ S({
|
|
408
408
|
en: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
@@ -414,7 +414,7 @@ var w = /* @__PURE__ */ S({
|
|
|
414
414
|
}),
|
|
415
415
|
icon: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
416
416
|
iconDark: /* @__PURE__ */ v(/* @__PURE__ */ C())
|
|
417
|
-
},
|
|
417
|
+
}, E = (e) => /* @__PURE__ */ w(e.map((e) => /* @__PURE__ */ _(e))), re = E([
|
|
418
418
|
"app",
|
|
419
419
|
"connector",
|
|
420
420
|
"connectorConnection",
|
|
@@ -436,31 +436,31 @@ var w = /* @__PURE__ */ S({
|
|
|
436
436
|
"presenter",
|
|
437
437
|
"presenterPresentation",
|
|
438
438
|
"tool"
|
|
439
|
-
]),
|
|
439
|
+
]), ie = E([
|
|
440
440
|
"danger",
|
|
441
441
|
"success",
|
|
442
442
|
"warning"
|
|
443
|
-
]),
|
|
443
|
+
]), ae = E([
|
|
444
444
|
"alpha",
|
|
445
445
|
"beta",
|
|
446
446
|
"releaseCandidate",
|
|
447
447
|
"generalAvailability"
|
|
448
|
-
]),
|
|
449
|
-
color:
|
|
448
|
+
]), oe = /* @__PURE__ */ S({
|
|
449
|
+
color: ie,
|
|
450
450
|
label: /* @__PURE__ */ C()
|
|
451
|
-
}),
|
|
452
|
-
...
|
|
453
|
-
typeId:
|
|
451
|
+
}), se = {
|
|
452
|
+
...ne,
|
|
453
|
+
typeId: re
|
|
454
454
|
}, ce = /* @__PURE__ */ S({
|
|
455
|
-
...
|
|
455
|
+
...se,
|
|
456
456
|
order: /* @__PURE__ */ y(),
|
|
457
457
|
path: /* @__PURE__ */ C()
|
|
458
458
|
}), le = {
|
|
459
|
-
...
|
|
459
|
+
...se,
|
|
460
460
|
firstCreatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
461
461
|
lastUpdatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
462
|
-
status: /* @__PURE__ */ v(
|
|
463
|
-
statusId: /* @__PURE__ */ v(
|
|
462
|
+
status: /* @__PURE__ */ v(oe),
|
|
463
|
+
statusId: /* @__PURE__ */ v(ae)
|
|
464
464
|
}, ue = /* @__PURE__ */ S({ ...le }), de = [
|
|
465
465
|
{
|
|
466
466
|
id: "alpha",
|
|
@@ -576,7 +576,7 @@ var me = [
|
|
|
576
576
|
"0x1F",
|
|
577
577
|
"0x1E"
|
|
578
578
|
];
|
|
579
|
-
n({ en: "Newline" }), n({ en: "Carriage Return" }), n({ en: "Carriage Return/Newline" }), n({ en: "Colon" }), n({ en: "Comma" }), n({ en: "Exclamation Mark" }), n({ en: "Record Separator" }), n({ en: "Semicolon" }), n({ en: "Space" }), n({ en: "Tab" }), n({ en: "Underscore" }), n({ en: "Unit Separator" }), n({ en: "Vertical Bar" }),
|
|
579
|
+
n({ en: "Newline" }), n({ en: "Carriage Return" }), n({ en: "Carriage Return/Newline" }), n({ en: "Colon" }), n({ en: "Comma" }), n({ en: "Exclamation Mark" }), n({ en: "Record Separator" }), n({ en: "Semicolon" }), n({ en: "Space" }), n({ en: "Tab" }), n({ en: "Underscore" }), n({ en: "Unit Separator" }), n({ en: "Vertical Bar" }), E([
|
|
580
580
|
"app",
|
|
581
581
|
"engine",
|
|
582
582
|
"connector",
|
|
@@ -596,7 +596,7 @@ var D = {
|
|
|
596
596
|
({ ...D });
|
|
597
597
|
//#endregion
|
|
598
598
|
//#region src/component/module/connector/connectorConfig.schema.ts
|
|
599
|
-
var he =
|
|
599
|
+
var he = E([
|
|
600
600
|
"abortOperation",
|
|
601
601
|
"auditObjectContent",
|
|
602
602
|
"closeStore",
|
|
@@ -616,22 +616,22 @@ var he = T([
|
|
|
616
616
|
"retrieveChunks",
|
|
617
617
|
"retrieveRecords",
|
|
618
618
|
"upsertRecords"
|
|
619
|
-
]), ge =
|
|
619
|
+
]), ge = E([
|
|
620
620
|
"application",
|
|
621
621
|
"curatedDataset",
|
|
622
622
|
"database",
|
|
623
623
|
"fileStore"
|
|
624
|
-
]), _e = /* @__PURE__ */ S({ label:
|
|
624
|
+
]), _e = /* @__PURE__ */ S({ label: T }), ve = E([
|
|
625
625
|
"apiEndpoint",
|
|
626
626
|
"file",
|
|
627
627
|
"table"
|
|
628
|
-
]), ye =
|
|
628
|
+
]), ye = E([
|
|
629
629
|
"bidirectional",
|
|
630
630
|
"destination",
|
|
631
631
|
"source",
|
|
632
632
|
"unknown"
|
|
633
|
-
]), be = /* @__PURE__ */ S({ label:
|
|
634
|
-
authMethodId:
|
|
633
|
+
]), be = /* @__PURE__ */ S({ label: T }), xe = /* @__PURE__ */ S({
|
|
634
|
+
authMethodId: E([
|
|
635
635
|
"apiKey",
|
|
636
636
|
"disabled",
|
|
637
637
|
"oAuth2",
|
|
@@ -640,7 +640,7 @@ var he = T([
|
|
|
640
640
|
activeConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ y()),
|
|
641
641
|
canDescribe: /* @__PURE__ */ b(/* @__PURE__ */ g()),
|
|
642
642
|
id: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
643
|
-
label: /* @__PURE__ */ b(
|
|
643
|
+
label: /* @__PURE__ */ b(T),
|
|
644
644
|
maxConnectionCount: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
645
645
|
params: /* @__PURE__ */ b(/* @__PURE__ */ h(/* @__PURE__ */ x(/* @__PURE__ */ C(), /* @__PURE__ */ C())))
|
|
646
646
|
}), Se = /* @__PURE__ */ S({
|
|
@@ -1601,15 +1601,15 @@ var he = T([
|
|
|
1601
1601
|
iconvLiteDecoderId: "windows1257"
|
|
1602
1602
|
}
|
|
1603
1603
|
}, O = Ce, k = we;
|
|
1604
|
-
function
|
|
1604
|
+
function A(e) {
|
|
1605
1605
|
return Object.hasOwn(k, e);
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1608
|
-
return
|
|
1607
|
+
function j(e) {
|
|
1608
|
+
return A(e) ? k[e].textDecoderId ?? e : e;
|
|
1609
1609
|
}
|
|
1610
|
-
function
|
|
1610
|
+
function Te(e = "en") {
|
|
1611
1611
|
return Array.from(Object.values(k), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
1612
|
-
let o = t == null ? "" :
|
|
1612
|
+
let o = t == null ? "" : Ee(t, e);
|
|
1613
1613
|
return {
|
|
1614
1614
|
id: r,
|
|
1615
1615
|
groupLabel: o,
|
|
@@ -1621,63 +1621,63 @@ function Ee(e = "en") {
|
|
|
1621
1621
|
};
|
|
1622
1622
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1624
|
+
function Ee(e, t) {
|
|
1625
1625
|
let n = O[e].label;
|
|
1626
1626
|
return n[t] ?? n.en ?? e;
|
|
1627
1627
|
}
|
|
1628
1628
|
//#endregion
|
|
1629
1629
|
//#region src/errors/index.ts
|
|
1630
|
-
var
|
|
1631
|
-
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${
|
|
1632
|
-
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) =>
|
|
1633
|
-
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () =>
|
|
1634
|
-
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () =>
|
|
1635
|
-
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () =>
|
|
1636
|
-
],
|
|
1630
|
+
var M = 2048, N = "[REDACTED]", De = 10, Oe = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, ke = [
|
|
1631
|
+
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${N}`],
|
|
1632
|
+
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => Oe.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${N}` : e],
|
|
1633
|
+
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => N],
|
|
1634
|
+
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => N],
|
|
1635
|
+
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => N]
|
|
1636
|
+
], P = class extends Error {
|
|
1637
1637
|
data;
|
|
1638
1638
|
locator;
|
|
1639
1639
|
constructor(e, t, n, r) {
|
|
1640
1640
|
super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
|
|
1641
1641
|
}
|
|
1642
|
-
},
|
|
1642
|
+
}, F = class extends P {
|
|
1643
1643
|
constructor(e, t, n, r) {
|
|
1644
1644
|
super(e, t, n, r), this.name = "AppError";
|
|
1645
1645
|
}
|
|
1646
|
-
},
|
|
1646
|
+
}, Ae = class extends P {
|
|
1647
1647
|
constructor(e, t, n, r) {
|
|
1648
1648
|
super(e, t, n, r), this.name = "APIError";
|
|
1649
1649
|
}
|
|
1650
|
-
},
|
|
1650
|
+
}, je = class extends P {
|
|
1651
1651
|
constructor(e, t, n, r) {
|
|
1652
1652
|
super(e, t, n, r), this.name = "EngineError";
|
|
1653
1653
|
}
|
|
1654
|
-
},
|
|
1654
|
+
}, Me = class extends P {
|
|
1655
1655
|
constructor(e, t, n, r) {
|
|
1656
1656
|
super(e, t, n, r), this.name = "ConnectorError";
|
|
1657
1657
|
}
|
|
1658
|
-
},
|
|
1658
|
+
}, I = class extends P {
|
|
1659
1659
|
constructor(e, t, n, r) {
|
|
1660
1660
|
super(e, t, n, r), this.name = "FetchError";
|
|
1661
1661
|
}
|
|
1662
1662
|
};
|
|
1663
|
-
async function
|
|
1663
|
+
async function Ne(e, t, n) {
|
|
1664
1664
|
let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
|
|
1665
1665
|
try {
|
|
1666
1666
|
a = await e.text();
|
|
1667
1667
|
} catch (e) {
|
|
1668
|
-
a = `<body unavailable: ${
|
|
1668
|
+
a = `<body unavailable: ${L(e).message}>`;
|
|
1669
1669
|
}
|
|
1670
|
-
return new
|
|
1670
|
+
return new I(i, n, { body: Ve(a) });
|
|
1671
1671
|
}
|
|
1672
|
-
function
|
|
1672
|
+
function Pe(e) {
|
|
1673
1673
|
return e.map((e) => e.message).join(" ");
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function Fe(e) {
|
|
1676
1676
|
try {
|
|
1677
1677
|
e();
|
|
1678
1678
|
} catch {}
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1680
|
+
function L(e) {
|
|
1681
1681
|
if (e instanceof Error) return e;
|
|
1682
1682
|
if (typeof e == "string") return Error(e);
|
|
1683
1683
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
|
|
@@ -1689,24 +1689,24 @@ function z(e) {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
return /* @__PURE__ */ Error("Unknown error");
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1693
|
-
let t = /* @__PURE__ */ new Set(), n = [], r =
|
|
1692
|
+
function Ie(e) {
|
|
1693
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = L(e);
|
|
1694
1694
|
for (; r != null && !t.has(r);) {
|
|
1695
1695
|
t.add(r);
|
|
1696
|
-
let [e, i] =
|
|
1696
|
+
let [e, i] = He(r), a = Be(e);
|
|
1697
1697
|
/(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
|
|
1698
1698
|
}
|
|
1699
1699
|
return n;
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1701
|
+
function Le(e) {
|
|
1702
1702
|
let t;
|
|
1703
1703
|
for (let n of e.toReversed()) {
|
|
1704
|
-
let e =
|
|
1704
|
+
let e = ze(n, t);
|
|
1705
1705
|
n.stack !== void 0 && (e.stack = n.stack), t = e;
|
|
1706
1706
|
}
|
|
1707
1707
|
return t ?? /* @__PURE__ */ Error("No error to unserialise.");
|
|
1708
1708
|
}
|
|
1709
|
-
function
|
|
1709
|
+
function Re(e) {
|
|
1710
1710
|
let t;
|
|
1711
1711
|
try {
|
|
1712
1712
|
t = JSON.stringify(e);
|
|
@@ -1715,13 +1715,13 @@ function Ie(e) {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
return t === "" && (t = "Unknown error"), t;
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function ze(e, t) {
|
|
1719
1719
|
switch (e.name) {
|
|
1720
|
-
case "APIError": return new
|
|
1721
|
-
case "AppError": return new
|
|
1722
|
-
case "ConnectorError": return new
|
|
1723
|
-
case "EngineError": return new
|
|
1724
|
-
case "FetchError": return new
|
|
1720
|
+
case "APIError": return new Ae(e.message, e.locator, e.data, { cause: t });
|
|
1721
|
+
case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
|
|
1722
|
+
case "ConnectorError": return new Me(e.message, e.locator, e.data, { cause: t });
|
|
1723
|
+
case "EngineError": return new je(e.message, e.locator, e.data, { cause: t });
|
|
1724
|
+
case "FetchError": return new I(e.message, e.locator, e.data, { cause: t });
|
|
1725
1725
|
default: {
|
|
1726
1726
|
let n = e.name;
|
|
1727
1727
|
return new class extends Error {
|
|
@@ -1730,29 +1730,29 @@ function Le(e, t) {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
|
-
function
|
|
1733
|
+
function Be(e) {
|
|
1734
1734
|
let { data: t, message: n, stack: r } = e;
|
|
1735
1735
|
return {
|
|
1736
1736
|
...e,
|
|
1737
|
-
data: t === void 0 ? void 0 :
|
|
1738
|
-
message:
|
|
1739
|
-
stack: r === void 0 ? void 0 :
|
|
1737
|
+
data: t === void 0 ? void 0 : z(t, /* @__PURE__ */ new WeakSet(), 0),
|
|
1738
|
+
message: R(n),
|
|
1739
|
+
stack: r === void 0 ? void 0 : R(r)
|
|
1740
1740
|
};
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1742
|
+
function R(e) {
|
|
1743
1743
|
let t = e;
|
|
1744
|
-
for (let [e, n] of
|
|
1744
|
+
for (let [e, n] of ke) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
1745
1745
|
return t;
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1748
|
-
return typeof e == "string" ?
|
|
1747
|
+
function z(e, t, n) {
|
|
1748
|
+
return typeof e == "string" ? R(e) : typeof e != "object" || !e ? e : n >= De ? N : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => z(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && Oe.test(e) ? N : z(r, t, n + 1)])));
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1751
|
-
if (e != null && e !== "") return e.length >
|
|
1750
|
+
function Ve(e) {
|
|
1751
|
+
if (e != null && e !== "") return e.length > M ? `${e.slice(0, M)}... [truncated]` : e;
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1754
|
-
let t = e.cause == null ? null :
|
|
1755
|
-
if (e instanceof
|
|
1753
|
+
function He(e) {
|
|
1754
|
+
let t = e.cause == null ? null : L(e.cause);
|
|
1755
|
+
if (e instanceof P) return [{
|
|
1756
1756
|
data: e.data,
|
|
1757
1757
|
locator: e.locator,
|
|
1758
1758
|
message: e.message,
|
|
@@ -1769,12 +1769,12 @@ function Be(e) {
|
|
|
1769
1769
|
}, t] : [{
|
|
1770
1770
|
data: n,
|
|
1771
1771
|
locator: "",
|
|
1772
|
-
message:
|
|
1772
|
+
message: Re(e),
|
|
1773
1773
|
name: "Error",
|
|
1774
1774
|
stack: void 0
|
|
1775
1775
|
}, null];
|
|
1776
1776
|
}
|
|
1777
|
-
var
|
|
1777
|
+
var Ue = /* @__PURE__ */ S({ dataFormatIds: /* @__PURE__ */ te(/* @__PURE__ */ h(E([
|
|
1778
1778
|
"arrow",
|
|
1779
1779
|
"avro",
|
|
1780
1780
|
"dtv",
|
|
@@ -1787,16 +1787,16 @@ var Ve = /* @__PURE__ */ S({ dataFormatIds: /* @__PURE__ */ ne(/* @__PURE__ */ h
|
|
|
1787
1787
|
"sqlite",
|
|
1788
1788
|
"xlsx",
|
|
1789
1789
|
"xml"
|
|
1790
|
-
])), /* @__PURE__ */ f(1)) }),
|
|
1790
|
+
])), /* @__PURE__ */ f(1)) }), We = /* @__PURE__ */ h(/* @__PURE__ */ C()), Ge = /* @__PURE__ */ S({
|
|
1791
1791
|
...D,
|
|
1792
1792
|
typeId: /* @__PURE__ */ _("tool"),
|
|
1793
|
-
actionNames: /* @__PURE__ */ b(
|
|
1794
|
-
parser: /* @__PURE__ */ b(
|
|
1793
|
+
actionNames: /* @__PURE__ */ b(We),
|
|
1794
|
+
parser: /* @__PURE__ */ b(Ue)
|
|
1795
1795
|
});
|
|
1796
1796
|
//#endregion
|
|
1797
1797
|
//#region src/component/module/tool/delimitedText.ts
|
|
1798
|
-
async function
|
|
1799
|
-
let r =
|
|
1798
|
+
async function Ke(e, t, n) {
|
|
1799
|
+
let r = qe(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await Je(e, t.valueDelimiterIds, t.isComplete, n);
|
|
1800
1800
|
return {
|
|
1801
1801
|
issues: i,
|
|
1802
1802
|
parsedRecords: a,
|
|
@@ -1804,16 +1804,16 @@ async function We(e, t, n) {
|
|
|
1804
1804
|
valueDelimiterId: o
|
|
1805
1805
|
};
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function qe(e) {
|
|
1808
1808
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
1809
1809
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
1810
1810
|
}
|
|
1811
|
-
async function
|
|
1811
|
+
async function Je(e, t, n, r) {
|
|
1812
1812
|
let i, a, o, s = [], c, l = !1;
|
|
1813
1813
|
for (let u of t) {
|
|
1814
1814
|
let { issues: t, records: d } = await r(e, u, n);
|
|
1815
1815
|
if (t.length > 0) {
|
|
1816
|
-
c =
|
|
1816
|
+
c = Ye(c, {
|
|
1817
1817
|
delimiter: u,
|
|
1818
1818
|
issues: t,
|
|
1819
1819
|
records: d
|
|
@@ -1821,7 +1821,7 @@ async function Ke(e, t, n, r) {
|
|
|
1821
1821
|
continue;
|
|
1822
1822
|
}
|
|
1823
1823
|
if (l = !0, d.length === 0) continue;
|
|
1824
|
-
let { averageValueCount: f, sumOfValueCountDiffs: p } =
|
|
1824
|
+
let { averageValueCount: f, sumOfValueCountDiffs: p } = Xe(d);
|
|
1825
1825
|
(a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
|
|
1826
1826
|
}
|
|
1827
1827
|
if (!l && c != null) {
|
|
@@ -1829,19 +1829,19 @@ async function Ke(e, t, n, r) {
|
|
|
1829
1829
|
return {
|
|
1830
1830
|
issues: t,
|
|
1831
1831
|
parsedRecords: n,
|
|
1832
|
-
valueDelimiterId:
|
|
1832
|
+
valueDelimiterId: B(n) ? e : void 0
|
|
1833
1833
|
};
|
|
1834
1834
|
}
|
|
1835
1835
|
return {
|
|
1836
1836
|
issues: [],
|
|
1837
1837
|
parsedRecords: s,
|
|
1838
|
-
valueDelimiterId: i != null &&
|
|
1838
|
+
valueDelimiterId: i != null && B(s) ? i : void 0
|
|
1839
1839
|
};
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Ye(e, t) {
|
|
1842
1842
|
return e == null || t.issues.length < e.issues.length ? t : e;
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function Xe(e) {
|
|
1845
1845
|
let t = 0, n = 0, r;
|
|
1846
1846
|
for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
|
|
1847
1847
|
return {
|
|
@@ -1849,7 +1849,7 @@ function Je(e) {
|
|
|
1849
1849
|
sumOfValueCountDiffs: n
|
|
1850
1850
|
};
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function B(e) {
|
|
1853
1853
|
let t = /* @__PURE__ */ new Map();
|
|
1854
1854
|
for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
|
|
1855
1855
|
let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
|
|
@@ -1857,32 +1857,32 @@ function H(e) {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
//#endregion
|
|
1859
1859
|
//#region src/component/module/tool/index.ts
|
|
1860
|
-
var
|
|
1861
|
-
function
|
|
1860
|
+
var Ze = "https://engine-eu.dpuse.app/tools", Qe = { dtv: "dpuse-tool-rust-csv-core-parser" }, V = "dpuse-tool-";
|
|
1861
|
+
function H(e, t) {
|
|
1862
1862
|
return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1865
|
-
let r =
|
|
1864
|
+
function U(e, t, n) {
|
|
1865
|
+
let r = H(e, t), [i] = r;
|
|
1866
1866
|
if (i === void 0) {
|
|
1867
1867
|
let n = {
|
|
1868
1868
|
availableToolIds: e.map((e) => e.id),
|
|
1869
1869
|
dataFormatId: t
|
|
1870
1870
|
};
|
|
1871
|
-
throw new
|
|
1871
|
+
throw new F(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
|
|
1872
1872
|
}
|
|
1873
|
-
let a =
|
|
1873
|
+
let a = Qe[t];
|
|
1874
1874
|
return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
|
|
1875
1875
|
}
|
|
1876
|
-
async function
|
|
1877
|
-
let n = `${
|
|
1876
|
+
async function W(e, t) {
|
|
1877
|
+
let n = `${V}${t}`, r = e.find((e) => e.id === n);
|
|
1878
1878
|
if (!r) {
|
|
1879
1879
|
let r = {
|
|
1880
1880
|
availableToolIds: e.map((e) => e.id),
|
|
1881
1881
|
toolName: n
|
|
1882
1882
|
};
|
|
1883
|
-
throw new
|
|
1883
|
+
throw new F(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
|
|
1884
1884
|
}
|
|
1885
|
-
let i = `${
|
|
1885
|
+
let i = `${Ze}/${t}_v${r.version}/${n}.es.js`;
|
|
1886
1886
|
try {
|
|
1887
1887
|
return new (await (import(
|
|
1888
1888
|
/* @vite-ignore */
|
|
@@ -1894,16 +1894,16 @@ async function K(e, t) {
|
|
|
1894
1894
|
url: i,
|
|
1895
1895
|
version: r.version
|
|
1896
1896
|
};
|
|
1897
|
-
throw new
|
|
1897
|
+
throw new F(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", t, { cause: e });
|
|
1898
1898
|
}
|
|
1899
1899
|
}
|
|
1900
1900
|
//#endregion
|
|
1901
1901
|
//#region src/component/module/connector/objectParsing.ts
|
|
1902
|
-
var
|
|
1903
|
-
async function
|
|
1902
|
+
var $e = "\n", G = ",", et = 13, K = 10, tt = 34, q = 1048576;
|
|
1903
|
+
async function nt(e) {
|
|
1904
1904
|
let { asAt: t, filePreview: n, inferDataTypes: r, parserId: i, startedAt: a, toolConfigs: o, valueDelimiterId: s } = e, { dataFormatId: c, text: l } = n, u = n.bytes.length;
|
|
1905
1905
|
if (u === 0) return {
|
|
1906
|
-
contentAuditConfig:
|
|
1906
|
+
contentAuditConfig: J({
|
|
1907
1907
|
asAt: t,
|
|
1908
1908
|
columns: [],
|
|
1909
1909
|
hasHeaders: !1,
|
|
@@ -1929,12 +1929,12 @@ async function et(e) {
|
|
|
1929
1929
|
encodingId: void 0,
|
|
1930
1930
|
fileType: void 0,
|
|
1931
1931
|
hasHeaders: !1,
|
|
1932
|
-
recordDelimiterId:
|
|
1933
|
-
valueDelimiterId:
|
|
1932
|
+
recordDelimiterId: $e,
|
|
1933
|
+
valueDelimiterId: G
|
|
1934
1934
|
}
|
|
1935
1935
|
};
|
|
1936
|
-
if (c == null || l == null ||
|
|
1937
|
-
contentAuditConfig:
|
|
1936
|
+
if (c == null || l == null || H(o, c).length === 0) return {
|
|
1937
|
+
contentAuditConfig: J({
|
|
1938
1938
|
asAt: t,
|
|
1939
1939
|
columns: [],
|
|
1940
1940
|
hasHeaders: !1,
|
|
@@ -1959,17 +1959,17 @@ async function et(e) {
|
|
|
1959
1959
|
valueDelimiterId: void 0
|
|
1960
1960
|
}
|
|
1961
1961
|
};
|
|
1962
|
-
let { parser: d, parserId: f } = await
|
|
1962
|
+
let { parser: d, parserId: f } = await Y(o, c, i), p = s == null ? me : [s], m = await d.parseText(l, {
|
|
1963
1963
|
dataFormatId: c,
|
|
1964
1964
|
isComplete: n.isComplete,
|
|
1965
1965
|
valueDelimiterIds: p
|
|
1966
1966
|
}), h = c === "dtv", g = h && s == null && m.valueDelimiterId == null ? await d.parseText(l, {
|
|
1967
1967
|
dataFormatId: c,
|
|
1968
1968
|
isComplete: n.isComplete,
|
|
1969
|
-
valueDelimiterIds: [
|
|
1969
|
+
valueDelimiterIds: [G]
|
|
1970
1970
|
}) : m, _ = r(g.parsedRecords);
|
|
1971
1971
|
return {
|
|
1972
|
-
contentAuditConfig:
|
|
1972
|
+
contentAuditConfig: J({
|
|
1973
1973
|
asAt: t,
|
|
1974
1974
|
columns: _.columnConfigs,
|
|
1975
1975
|
hasHeaders: _.hasHeaderRow,
|
|
@@ -1992,12 +1992,12 @@ async function et(e) {
|
|
|
1992
1992
|
hasHeaders: _.hasHeaderRow,
|
|
1993
1993
|
parserId: f,
|
|
1994
1994
|
recordDelimiterId: g.recordDelimiterId,
|
|
1995
|
-
valueDelimiterId: h ? s ?? g.valueDelimiterId ??
|
|
1995
|
+
valueDelimiterId: h ? s ?? g.valueDelimiterId ?? G : g.valueDelimiterId
|
|
1996
1996
|
}
|
|
1997
1997
|
};
|
|
1998
1998
|
}
|
|
1999
|
-
async function
|
|
2000
|
-
let { chunk: t, options: n, signal: r, stream: i, toolConfigs: a } = e, { parser: o } = await
|
|
1999
|
+
async function rt(e) {
|
|
2000
|
+
let { chunk: t, options: n, signal: r, stream: i, toolConfigs: a } = e, { parser: o } = await Y(a, n.dataFormatId, n.parserId);
|
|
2001
2001
|
return await o.parseStream(i, {
|
|
2002
2002
|
abortSignal: r,
|
|
2003
2003
|
chunkSize: n.chunkSize,
|
|
@@ -2006,8 +2006,8 @@ async function tt(e) {
|
|
|
2006
2006
|
valueDelimiterId: n.valueDelimiterId
|
|
2007
2007
|
}, t);
|
|
2008
2008
|
}
|
|
2009
|
-
async function
|
|
2010
|
-
let { constructColumnAuditor: t, onProgress: n, options: r, signal: i, stream: a, toolConfigs: o } = e, s = Date.now(), c = performance.now(), l = t(r.hasHeaders), { parser: u } = await
|
|
2009
|
+
async function it(e) {
|
|
2010
|
+
let { constructColumnAuditor: t, onProgress: n, options: r, signal: i, stream: a, toolConfigs: o } = e, s = Date.now(), c = performance.now(), l = t(r.hasHeaders), { parser: u } = await Y(o, r.dataFormatId, r.parserId), d = st(a), f = at(d.stream, r), p = await u.parseStream(f.stream, {
|
|
2011
2011
|
abortSignal: i,
|
|
2012
2012
|
chunkSize: r.chunkSize,
|
|
2013
2013
|
dataFormatId: r.dataFormatId,
|
|
@@ -2031,7 +2031,7 @@ async function nt(e) {
|
|
|
2031
2031
|
sourceWaitDuration: d.waitDuration()
|
|
2032
2032
|
};
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2034
|
+
function J(e) {
|
|
2035
2035
|
let { asAt: t, columns: n, hasHeaders: r, isComplete: i, recordCount: a, size: o, startedAt: s } = e;
|
|
2036
2036
|
return {
|
|
2037
2037
|
asAt: t,
|
|
@@ -2048,20 +2048,26 @@ function Y(e) {
|
|
|
2048
2048
|
sourceWaitDuration: void 0
|
|
2049
2049
|
};
|
|
2050
2050
|
}
|
|
2051
|
-
function
|
|
2052
|
-
let n = e.getReader(), r =
|
|
2051
|
+
function at(e, t) {
|
|
2052
|
+
let n = e.getReader(), r = ot(t.encodingId), i = 0, a = !1, o;
|
|
2053
2053
|
return {
|
|
2054
2054
|
byteCount: () => i,
|
|
2055
2055
|
isComplete: () => a,
|
|
2056
2056
|
stream: new ReadableStream({
|
|
2057
2057
|
async pull(e) {
|
|
2058
|
-
let
|
|
2059
|
-
if (
|
|
2060
|
-
|
|
2061
|
-
|
|
2058
|
+
let s = o;
|
|
2059
|
+
if (s == null) {
|
|
2060
|
+
let t = await n.read();
|
|
2061
|
+
if (t.done) {
|
|
2062
|
+
a = !0, e.close();
|
|
2063
|
+
return;
|
|
2064
|
+
}
|
|
2065
|
+
s = t.value;
|
|
2062
2066
|
}
|
|
2063
|
-
let
|
|
2064
|
-
|
|
2067
|
+
let c = s.subarray(0, q);
|
|
2068
|
+
o = s.length > q ? s.subarray(q) : void 0;
|
|
2069
|
+
let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
|
|
2070
|
+
u == null ? (i += c.length, e.enqueue(c)) : (i += u, o = void 0, e.enqueue(c.subarray(0, u)), e.close(), await n.cancel());
|
|
2065
2071
|
},
|
|
2066
2072
|
cancel(e) {
|
|
2067
2073
|
return n.cancel(e);
|
|
@@ -2069,19 +2075,19 @@ function rt(e, t) {
|
|
|
2069
2075
|
}, { highWaterMark: 0 })
|
|
2070
2076
|
};
|
|
2071
2077
|
}
|
|
2072
|
-
function
|
|
2073
|
-
let t =
|
|
2078
|
+
function ot(e) {
|
|
2079
|
+
let t = j(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2074
2080
|
return (e, t, o) => {
|
|
2075
2081
|
for (let s = 0; s < e.length; s++) {
|
|
2076
2082
|
let c = e[s];
|
|
2077
|
-
if ((c ===
|
|
2078
|
-
if (c ===
|
|
2079
|
-
else if (!a && s >= o && (c ===
|
|
2083
|
+
if ((c === tt || c === K || c === et) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
|
|
2084
|
+
if (c === tt) a = !a;
|
|
2085
|
+
else if (!a && s >= o && (c === K || e[s + r] !== K)) return s + r - i;
|
|
2080
2086
|
}
|
|
2081
2087
|
}
|
|
2082
2088
|
};
|
|
2083
2089
|
}
|
|
2084
|
-
function
|
|
2090
|
+
function st(e) {
|
|
2085
2091
|
let t = e.getReader(), n = 0;
|
|
2086
2092
|
return {
|
|
2087
2093
|
stream: new ReadableStream({
|
|
@@ -2096,16 +2102,16 @@ function at(e) {
|
|
|
2096
2102
|
waitDuration: () => n
|
|
2097
2103
|
};
|
|
2098
2104
|
}
|
|
2099
|
-
async function
|
|
2100
|
-
let r =
|
|
2105
|
+
async function Y(e, t, n) {
|
|
2106
|
+
let r = U(e, t, n);
|
|
2101
2107
|
return {
|
|
2102
|
-
parser: await
|
|
2108
|
+
parser: await W(e, r.id.slice(V.length)),
|
|
2103
2109
|
parserId: r.id
|
|
2104
2110
|
};
|
|
2105
2111
|
}
|
|
2106
2112
|
//#endregion
|
|
2107
2113
|
//#region src/component/module/connector/index.ts
|
|
2108
|
-
var
|
|
2114
|
+
var ct = [
|
|
2109
2115
|
{
|
|
2110
2116
|
id: "application",
|
|
2111
2117
|
label: {
|
|
@@ -2134,7 +2140,7 @@ var ot = [
|
|
|
2134
2140
|
es: "Almacén de Archivos"
|
|
2135
2141
|
}
|
|
2136
2142
|
}
|
|
2137
|
-
],
|
|
2143
|
+
], lt = [
|
|
2138
2144
|
{
|
|
2139
2145
|
id: "apiEndpoint",
|
|
2140
2146
|
label: {
|
|
@@ -2156,7 +2162,7 @@ var ot = [
|
|
|
2156
2162
|
es: "Tabla"
|
|
2157
2163
|
}
|
|
2158
2164
|
}
|
|
2159
|
-
],
|
|
2165
|
+
], ut = {
|
|
2160
2166
|
abortOperation: "Abort Operation",
|
|
2161
2167
|
auditObjectContent: "Audit Object Content",
|
|
2162
2168
|
closeStore: "Close Store",
|
|
@@ -2176,7 +2182,7 @@ var ot = [
|
|
|
2176
2182
|
retrieveChunks: "Retrieve Chunks",
|
|
2177
2183
|
retrieveRecords: "Retrieve Records",
|
|
2178
2184
|
upsertRecords: "Upsert Records"
|
|
2179
|
-
},
|
|
2185
|
+
}, dt = [
|
|
2180
2186
|
{
|
|
2181
2187
|
id: "bidirectional",
|
|
2182
2188
|
label: {
|
|
@@ -2205,13 +2211,13 @@ var ot = [
|
|
|
2205
2211
|
es: "Desconocido"
|
|
2206
2212
|
}
|
|
2207
2213
|
}
|
|
2208
|
-
],
|
|
2214
|
+
], ft = /* @__PURE__ */ new Set([
|
|
2209
2215
|
"createObject",
|
|
2210
2216
|
"dropObject",
|
|
2211
2217
|
"loadObjectRecords",
|
|
2212
2218
|
"removeRecords",
|
|
2213
2219
|
"upsertRecords"
|
|
2214
|
-
]),
|
|
2220
|
+
]), pt = /* @__PURE__ */ new Set([
|
|
2215
2221
|
"auditObjectContent",
|
|
2216
2222
|
"findObject",
|
|
2217
2223
|
"getInfo",
|
|
@@ -2223,13 +2229,13 @@ var ot = [
|
|
|
2223
2229
|
"retrieveChunks",
|
|
2224
2230
|
"retrieveRecords"
|
|
2225
2231
|
]);
|
|
2226
|
-
function
|
|
2232
|
+
function mt(e) {
|
|
2227
2233
|
let t = !1, n = !1;
|
|
2228
|
-
for (let r of e)
|
|
2234
|
+
for (let r of e) pt.has(r) && (t = !0), ft.has(r) && (n = !0);
|
|
2229
2235
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2230
2236
|
}
|
|
2231
|
-
var
|
|
2232
|
-
let i =
|
|
2237
|
+
var ht = (e, t = "en") => {
|
|
2238
|
+
let i = ct.find((t) => t.id === e);
|
|
2233
2239
|
return i ? {
|
|
2234
2240
|
label: r(n(i.label), t) ?? i.id,
|
|
2235
2241
|
description: ""
|
|
@@ -2237,8 +2243,8 @@ var pt = (e, t = "en") => {
|
|
|
2237
2243
|
label: e,
|
|
2238
2244
|
description: ""
|
|
2239
2245
|
};
|
|
2240
|
-
},
|
|
2241
|
-
let i =
|
|
2246
|
+
}, gt = (e, t = "en") => {
|
|
2247
|
+
let i = lt.find((t) => t.id === e);
|
|
2242
2248
|
return i ? {
|
|
2243
2249
|
label: r(n(i.label), t) ?? i.id,
|
|
2244
2250
|
description: ""
|
|
@@ -2246,8 +2252,8 @@ var pt = (e, t = "en") => {
|
|
|
2246
2252
|
label: e,
|
|
2247
2253
|
description: ""
|
|
2248
2254
|
};
|
|
2249
|
-
},
|
|
2250
|
-
let i =
|
|
2255
|
+
}, _t = (e, t = "en") => {
|
|
2256
|
+
let i = dt.find((t) => t.id === e);
|
|
2251
2257
|
return i ? {
|
|
2252
2258
|
label: r(n(i.label), t) ?? i.id,
|
|
2253
2259
|
description: ""
|
|
@@ -2256,31 +2262,31 @@ var pt = (e, t = "en") => {
|
|
|
2256
2262
|
description: ""
|
|
2257
2263
|
};
|
|
2258
2264
|
};
|
|
2259
|
-
function
|
|
2265
|
+
function vt(e) {
|
|
2260
2266
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2261
2267
|
n += "|:----|:-------:|\n";
|
|
2262
|
-
for (let e of Object.keys(
|
|
2268
|
+
for (let e of Object.keys(ut)) n += `| ${ut[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2263
2269
|
return n;
|
|
2264
2270
|
}
|
|
2265
2271
|
//#endregion
|
|
2266
2272
|
//#region src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2267
|
-
var
|
|
2273
|
+
var yt = E(["list"]), bt = /* @__PURE__ */ S({
|
|
2268
2274
|
...D,
|
|
2269
2275
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2270
|
-
actionNames: /* @__PURE__ */ h(
|
|
2276
|
+
actionNames: /* @__PURE__ */ h(yt),
|
|
2271
2277
|
recipes: /* @__PURE__ */ h(ce)
|
|
2272
|
-
}),
|
|
2278
|
+
}), xt = E([
|
|
2273
2279
|
"list",
|
|
2274
2280
|
"render",
|
|
2275
2281
|
"setColorMode"
|
|
2276
|
-
]),
|
|
2282
|
+
]), St = /* @__PURE__ */ S({
|
|
2277
2283
|
...D,
|
|
2278
2284
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2279
|
-
actionNames: /* @__PURE__ */ h(
|
|
2285
|
+
actionNames: /* @__PURE__ */ h(xt),
|
|
2280
2286
|
presentations: /* @__PURE__ */ h(ce)
|
|
2281
|
-
}),
|
|
2282
|
-
async function
|
|
2283
|
-
let i = e.id, a = `${
|
|
2287
|
+
}), Ct = "https://engine-eu.dpuse.app/presenters";
|
|
2288
|
+
async function wt(e, t, n, r) {
|
|
2289
|
+
let i = e.id, a = `${Ct}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2284
2290
|
try {
|
|
2285
2291
|
return new (await (import(
|
|
2286
2292
|
/* @vite-ignore */
|
|
@@ -2292,12 +2298,12 @@ async function St(e, t, n, r) {
|
|
|
2292
2298
|
url: a,
|
|
2293
2299
|
version: e.version
|
|
2294
2300
|
};
|
|
2295
|
-
throw new
|
|
2301
|
+
throw new F(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
|
|
2296
2302
|
}
|
|
2297
2303
|
}
|
|
2298
2304
|
//#endregion
|
|
2299
2305
|
//#region src/locale/index.ts
|
|
2300
|
-
function
|
|
2306
|
+
function Tt(e, t) {
|
|
2301
2307
|
return {
|
|
2302
2308
|
...e,
|
|
2303
2309
|
label: e.label[t] ?? e.id,
|
|
@@ -2305,7 +2311,7 @@ function Ct(e, t) {
|
|
|
2305
2311
|
verb: e.verb?.[t] ?? void 0
|
|
2306
2312
|
};
|
|
2307
2313
|
}
|
|
2308
|
-
function
|
|
2314
|
+
function Et(e, t, n = !1) {
|
|
2309
2315
|
let r = e.map((e) => ({
|
|
2310
2316
|
...e,
|
|
2311
2317
|
label: e.label[t] ?? e.id,
|
|
@@ -2314,7 +2320,7 @@ function wt(e, t, n = !1) {
|
|
|
2314
2320
|
}));
|
|
2315
2321
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2316
2322
|
}
|
|
2317
|
-
function
|
|
2323
|
+
function Dt(e, t) {
|
|
2318
2324
|
return {
|
|
2319
2325
|
...e,
|
|
2320
2326
|
label: e.label[t] ?? e.id,
|
|
@@ -2323,7 +2329,7 @@ function Tt(e, t) {
|
|
|
2323
2329
|
}
|
|
2324
2330
|
//#endregion
|
|
2325
2331
|
//#region src/utilities/index.ts
|
|
2326
|
-
var
|
|
2332
|
+
var Ot = /* @__PURE__ */ new Map([
|
|
2327
2333
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2328
2334
|
["avro", "application/vnd.apache.avro"],
|
|
2329
2335
|
["bin", "application/octet-stream"],
|
|
@@ -2344,20 +2350,20 @@ var Et = /* @__PURE__ */ new Map([
|
|
|
2344
2350
|
["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
|
|
2345
2351
|
["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
2346
2352
|
["xml", "application/xml"]
|
|
2347
|
-
]),
|
|
2353
|
+
]), X = "en", Z = [
|
|
2348
2354
|
["day", 864e5],
|
|
2349
2355
|
["hour", 36e5],
|
|
2350
2356
|
["minute", 6e4],
|
|
2351
2357
|
["second", 1e3],
|
|
2352
2358
|
["millisecond", 1]
|
|
2353
|
-
],
|
|
2359
|
+
], kt = [
|
|
2354
2360
|
["byte", 1],
|
|
2355
2361
|
["kilobyte", 1024],
|
|
2356
2362
|
["megabyte", 1048576],
|
|
2357
2363
|
["gigabyte", 1073741824],
|
|
2358
2364
|
["terabyte", 1099511627776]
|
|
2359
|
-
],
|
|
2360
|
-
function
|
|
2365
|
+
], Q = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ new Map();
|
|
2366
|
+
function jt(e, t = 2, n = t, r = X) {
|
|
2361
2367
|
return e == null ? "" : $(r, {
|
|
2362
2368
|
localeMatcher: "best fit",
|
|
2363
2369
|
maximumFractionDigits: t,
|
|
@@ -2367,18 +2373,18 @@ function At(e, t = 2, n = t, r = Z) {
|
|
|
2367
2373
|
useGrouping: !0
|
|
2368
2374
|
}).format(e);
|
|
2369
2375
|
}
|
|
2370
|
-
function
|
|
2371
|
-
return
|
|
2376
|
+
function Mt(e, t = X) {
|
|
2377
|
+
return jt(e, 0, 0, t);
|
|
2372
2378
|
}
|
|
2373
|
-
function
|
|
2379
|
+
function Nt(e, t = 1, n = X) {
|
|
2374
2380
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2375
2381
|
maximumFractionDigits: t,
|
|
2376
2382
|
notation: "compact"
|
|
2377
2383
|
}).format(e);
|
|
2378
2384
|
}
|
|
2379
|
-
function
|
|
2385
|
+
function Pt(e, t = 1, n = X) {
|
|
2380
2386
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2381
|
-
let [r, i] =
|
|
2387
|
+
let [r, i] = kt.find(([, n]) => Ut(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
|
|
2382
2388
|
return $(n, {
|
|
2383
2389
|
maximumFractionDigits: i === 1 ? 0 : t,
|
|
2384
2390
|
style: "unit",
|
|
@@ -2386,9 +2392,9 @@ function Nt(e, t = 1, n = Z) {
|
|
|
2386
2392
|
unitDisplay: i === 1 ? "long" : "short"
|
|
2387
2393
|
}).format(e / i);
|
|
2388
2394
|
}
|
|
2389
|
-
function
|
|
2395
|
+
function Ft(e, t = "millisecond", n = X) {
|
|
2390
2396
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2391
|
-
let r = Math.round(Math.abs(e)), i =
|
|
2397
|
+
let r = Math.round(Math.abs(e)), i = Z.findIndex(([, e]) => r >= e), a = i === -1 ? Z.length - 1 : i, o = Z.findIndex(([e]) => e === t), s = Z.slice(a, Math.max(o, a) + 1), c = [];
|
|
2392
2398
|
for (let [t, i] of s) {
|
|
2393
2399
|
let a = Math.floor(r / i);
|
|
2394
2400
|
if (a === 0 && c.length > 0) continue;
|
|
@@ -2400,25 +2406,25 @@ function Pt(e, t = "millisecond", n = Z) {
|
|
|
2400
2406
|
unitDisplay: "short"
|
|
2401
2407
|
}).format(o));
|
|
2402
2408
|
}
|
|
2403
|
-
return
|
|
2409
|
+
return Ht(n).format(c);
|
|
2404
2410
|
}
|
|
2405
|
-
function
|
|
2411
|
+
function It(e) {
|
|
2406
2412
|
if (!e) return;
|
|
2407
|
-
let t =
|
|
2413
|
+
let t = Vt(e);
|
|
2408
2414
|
return t === void 0 ? e : e.slice(0, t);
|
|
2409
2415
|
}
|
|
2410
|
-
function
|
|
2416
|
+
function Lt(e) {
|
|
2411
2417
|
if (!e) return;
|
|
2412
|
-
let t =
|
|
2418
|
+
let t = Vt(e);
|
|
2413
2419
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2414
2420
|
}
|
|
2415
|
-
function Lt(e) {
|
|
2416
|
-
return e != null && Et.has(e.toLowerCase());
|
|
2417
|
-
}
|
|
2418
2421
|
function Rt(e) {
|
|
2419
|
-
return
|
|
2422
|
+
return e != null && Ot.has(e.toLowerCase());
|
|
2420
2423
|
}
|
|
2421
2424
|
function zt(e) {
|
|
2425
|
+
return (e == null ? void 0 : Ot.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2426
|
+
}
|
|
2427
|
+
function Bt(e) {
|
|
2422
2428
|
switch (e) {
|
|
2423
2429
|
case "Edm.Boolean": return "boolean";
|
|
2424
2430
|
case "Edm.Byte":
|
|
@@ -2439,24 +2445,24 @@ function zt(e) {
|
|
|
2439
2445
|
default: return "unknown";
|
|
2440
2446
|
}
|
|
2441
2447
|
}
|
|
2442
|
-
function
|
|
2448
|
+
function Vt(e) {
|
|
2443
2449
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2444
2450
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2445
2451
|
}
|
|
2446
|
-
function
|
|
2447
|
-
let t =
|
|
2452
|
+
function Ht(e) {
|
|
2453
|
+
let t = Q.get(e);
|
|
2448
2454
|
return t || (t = new Intl.ListFormat(e, {
|
|
2449
2455
|
style: "narrow",
|
|
2450
2456
|
type: "unit"
|
|
2451
|
-
}),
|
|
2457
|
+
}), Q.set(e, t)), t;
|
|
2452
2458
|
}
|
|
2453
2459
|
function $(e, t) {
|
|
2454
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2455
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
2460
|
+
let n = `${e}|${JSON.stringify(t)}`, r = At.get(n);
|
|
2461
|
+
return r || (r = new Intl.NumberFormat(e, t), At.set(n, r)), r;
|
|
2456
2462
|
}
|
|
2457
|
-
function
|
|
2463
|
+
function Ut(e, t) {
|
|
2458
2464
|
let n = 10 ** t;
|
|
2459
2465
|
return Math.round(e * n) / n;
|
|
2460
2466
|
}
|
|
2461
2467
|
//#endregion
|
|
2462
|
-
export {
|
|
2468
|
+
export { Ae as APIError, F as AppError, Me as ConnectorError, pe as DATA_FORMAT_ICON_CONFIGS, e as DEFAULT_LOCALE_ID, O as ENCODING_GROUP_CONFIG_MAP, k as ENCODING_TYPE_CONFIG_MAP, je as EngineError, I as FetchError, me as ORDERED_VALUE_DELIMITER_IDS, t as SUPPORTED_LANGUAGES, V as TOOL_NAME_PREFIX, it as auditObjectContentWithParser, Ne as buildFetchError, nt as buildPreviewObjectResult, ue as componentInstanceConfigSchema, Pe as concatenateSerialisedErrorMessages, Se as connectorConfigSchema, ht as constructConnectorCategoryConfig, gt as constructConnectorItemTypeConfig, _t as constructConnectorUsageConfig, Bt as convertODataTypeIdToUsageTypeId, bt as cookbookConfigSchema, n as createLabelMap, mt as determineConnectorUsageId, Lt as extractExtensionFromPath, It as extractPathWithoutExtension, jt as formatNumberAsDecimalNumber, Ft as formatNumberAsDuration, Nt as formatNumberAsSize, Pt as formatNumberAsStorageSize, Mt as formatNumberAsWholeNumber, fe as getComponentStatus, vt as getConnectorActionsTable, Te as getEncodingTypeConfigs, Rt as hasMimeTypeForExtension, Fe as ignoreErrors, A as isEncodingTypeId, H as listParserToolConfigs, wt as loadPresenter, W as loadTool, Tt as localiseConfig, Et as localiseConfigs, Dt as localiseReference, zt as lookupMimeTypeForExtension, L as normalizeToError, Ke as parseDelimitedText, St as presenterConfigSchema, j as resolveDecoderId, r as resolveLabel, U as resolveParserToolConfig, rt as retrieveRecordsWithParser, Ie as serialiseError, Ge as toolConfigSchema, Le as unserialiseError };
|