@dpuse/dpuse-shared 1.0.118 → 1.0.120
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/README.md
CHANGED
|
@@ -241,14 +241,14 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
241
241
|
|
|
242
242
|
| Chunk/Module/File | Composition |
|
|
243
243
|
| :-------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- |
|
|
244
|
-
| **dist/dpuse-shared.es.js** | 35.
|
|
245
|
-
| src → index.ts + 9 more | `█████████████░░░░░░░` 65.
|
|
246
|
-
| ↳ index.ts | `▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░` 55.
|
|
247
|
-
| ↳ connectorConfig.schema.ts | `▒░░░░░░░░░░░░░░░░░░░` 3.
|
|
244
|
+
| **dist/dpuse-shared.es.js** | 35.6 kB · gzip 9.4 kB · 100.0% of the build |
|
|
245
|
+
| src → index.ts + 9 more | `█████████████░░░░░░░` 65.7% · 23.4 kB |
|
|
246
|
+
| ↳ index.ts | `▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░` 55.9% · 19.9 kB |
|
|
247
|
+
| ↳ connectorConfig.schema.ts | `▒░░░░░░░░░░░░░░░░░░░` 3.3% · 1.2 kB |
|
|
248
248
|
| ↳ componentConfig.schema.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.6% · 936 B |
|
|
249
249
|
| ↳ 7 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 4.0% · 1.4 kB |
|
|
250
|
-
| valibot → dist/index.mjs | `████░░░░░░░░░░░░░░░░`
|
|
251
|
-
| (bundler output, whitespace & JSON) | `███░░░░░░░░░░░░░░░░░` 14.
|
|
250
|
+
| valibot → dist/index.mjs | `████░░░░░░░░░░░░░░░░` 19.7% · 7.0 kB |
|
|
251
|
+
| (bundler output, whitespace & JSON) | `███░░░░░░░░░░░░░░░░░` 14.6% · 5.2 kB |
|
|
252
252
|
|
|
253
253
|
Bars show each row's share of its output file. ↳ rows are part of the row above.
|
|
254
254
|
|
|
@@ -305,9 +305,6 @@ This section is updated each time `npm run document` is run. Settings come from
|
|
|
305
305
|
|
|
306
306
|
This project is working towards the [OpenSSF Best Practices](https://www.bestpractices.dev) Passing badge, a self-certification covering security policy, vulnerability reporting, build processes, code quality, and more. Currently the [OpenSSF Scorecard](https://scorecard.dev) provides an independent automated assessment of the project's security practices and is an ongoing area of improvement.
|
|
307
307
|
|
|
308
|
-
> [!NOTE]
|
|
309
|
-
> Apart from the Best Practices badge above, the remaining Scorecard gaps need multi-person review or a pull-request workflow, which this solo-maintained project doesn't use.
|
|
310
|
-
|
|
311
308
|
### Reporting Vulnerabilities
|
|
312
309
|
|
|
313
310
|
Please do not open public GitHub issues for security vulnerabilities. Use [GitHub private vulnerability reporting](https://github.com/dpuse/dpuse-shared/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.
|
package/dist/dpuse-shared.es.js
CHANGED
|
@@ -655,7 +655,7 @@ function xe(e) {
|
|
|
655
655
|
for (let r of e) be.has(r) && (t = !0), ye.has(r) && (n = !0);
|
|
656
656
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
657
657
|
}
|
|
658
|
-
var
|
|
658
|
+
var Se = (e, t = "en") => {
|
|
659
659
|
let i = _e.find((t) => t.id === e);
|
|
660
660
|
return i ? {
|
|
661
661
|
label: r(n(i.label), t) ?? i.id,
|
|
@@ -664,7 +664,7 @@ var j = (e, t = "en") => {
|
|
|
664
664
|
label: e,
|
|
665
665
|
description: ""
|
|
666
666
|
};
|
|
667
|
-
},
|
|
667
|
+
}, Ce = (e, t = "en") => {
|
|
668
668
|
let i = ve.find((t) => t.id === e);
|
|
669
669
|
return i ? {
|
|
670
670
|
label: r(n(i.label), t) ?? i.id,
|
|
@@ -674,7 +674,7 @@ var j = (e, t = "en") => {
|
|
|
674
674
|
description: ""
|
|
675
675
|
};
|
|
676
676
|
};
|
|
677
|
-
function
|
|
677
|
+
function we(e) {
|
|
678
678
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
679
679
|
n += "|:----|:-------:|\n";
|
|
680
680
|
for (let e of Object.keys(A)) n += `| ${A[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
@@ -682,49 +682,40 @@ function Se(e) {
|
|
|
682
682
|
}
|
|
683
683
|
//#endregion
|
|
684
684
|
//#region src/component/module/cookbook/cookbookConfig.schema.ts
|
|
685
|
-
var
|
|
685
|
+
var Te = T(["list"]), Ee = /* @__PURE__ */ b({
|
|
686
686
|
...k,
|
|
687
687
|
typeId: /* @__PURE__ */ h("cookbook"),
|
|
688
|
-
actionNames: /* @__PURE__ */ p(Ce),
|
|
689
|
-
recipes: /* @__PURE__ */ p(D)
|
|
690
|
-
}), Te = T([
|
|
691
|
-
"list",
|
|
692
|
-
"render",
|
|
693
|
-
"setColorMode"
|
|
694
|
-
]), Ee = /* @__PURE__ */ b({
|
|
695
|
-
...k,
|
|
696
|
-
typeId: /* @__PURE__ */ h("presenter"),
|
|
697
688
|
actionNames: /* @__PURE__ */ p(Te),
|
|
698
|
-
|
|
699
|
-
}),
|
|
700
|
-
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${
|
|
701
|
-
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) =>
|
|
702
|
-
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () =>
|
|
703
|
-
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () =>
|
|
704
|
-
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () =>
|
|
705
|
-
],
|
|
689
|
+
recipes: /* @__PURE__ */ p(D)
|
|
690
|
+
}), j = 2048, M = "[REDACTED]", De = 10, N = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Oe = [
|
|
691
|
+
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${M}`],
|
|
692
|
+
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => N.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${M}` : e],
|
|
693
|
+
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => M],
|
|
694
|
+
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => M],
|
|
695
|
+
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => M]
|
|
696
|
+
], P = class extends Error {
|
|
706
697
|
data;
|
|
707
698
|
locator;
|
|
708
699
|
constructor(e, t, n, r) {
|
|
709
700
|
super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
|
|
710
701
|
}
|
|
711
|
-
},
|
|
702
|
+
}, F = class extends P {
|
|
712
703
|
constructor(e, t, n, r) {
|
|
713
704
|
super(e, t, n, r), this.name = "AppError";
|
|
714
705
|
}
|
|
715
|
-
},
|
|
706
|
+
}, I = class extends P {
|
|
716
707
|
constructor(e, t, n, r) {
|
|
717
708
|
super(e, t, n, r), this.name = "APIError";
|
|
718
709
|
}
|
|
719
|
-
},
|
|
710
|
+
}, L = class extends P {
|
|
720
711
|
constructor(e, t, n, r) {
|
|
721
712
|
super(e, t, n, r), this.name = "EngineError";
|
|
722
713
|
}
|
|
723
|
-
},
|
|
714
|
+
}, R = class extends P {
|
|
724
715
|
constructor(e, t, n, r) {
|
|
725
716
|
super(e, t, n, r), this.name = "ConnectorError";
|
|
726
717
|
}
|
|
727
|
-
},
|
|
718
|
+
}, z = class extends P {
|
|
728
719
|
constructor(e, t, n, r) {
|
|
729
720
|
super(e, t, n, r), this.name = "FetchError";
|
|
730
721
|
}
|
|
@@ -734,9 +725,9 @@ async function ke(e, t, n) {
|
|
|
734
725
|
try {
|
|
735
726
|
a = await e.text();
|
|
736
727
|
} catch (e) {
|
|
737
|
-
a = `<body unavailable: ${
|
|
728
|
+
a = `<body unavailable: ${B(e).message}>`;
|
|
738
729
|
}
|
|
739
|
-
return new
|
|
730
|
+
return new z(i, n, { body: Le(a) });
|
|
740
731
|
}
|
|
741
732
|
function Ae(e) {
|
|
742
733
|
return e.map((e) => e.message).join(" ");
|
|
@@ -746,7 +737,7 @@ function je(e) {
|
|
|
746
737
|
e();
|
|
747
738
|
} catch {}
|
|
748
739
|
}
|
|
749
|
-
function
|
|
740
|
+
function B(e) {
|
|
750
741
|
if (e instanceof Error) return e;
|
|
751
742
|
if (typeof e == "string") return Error(e);
|
|
752
743
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
|
|
@@ -759,7 +750,7 @@ function H(e) {
|
|
|
759
750
|
return /* @__PURE__ */ Error("Unknown error");
|
|
760
751
|
}
|
|
761
752
|
function Me(e) {
|
|
762
|
-
let t = /* @__PURE__ */ new Set(), n = [], r =
|
|
753
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = B(e);
|
|
763
754
|
for (; r != null && !t.has(r);) {
|
|
764
755
|
t.add(r);
|
|
765
756
|
let [e, i] = Re(r), a = Ie(e);
|
|
@@ -786,11 +777,11 @@ function Pe(e) {
|
|
|
786
777
|
}
|
|
787
778
|
function Fe(e, t) {
|
|
788
779
|
switch (e.name) {
|
|
789
|
-
case "APIError": return new
|
|
790
|
-
case "AppError": return new
|
|
791
|
-
case "ConnectorError": return new
|
|
792
|
-
case "EngineError": return new
|
|
793
|
-
case "FetchError": return new
|
|
780
|
+
case "APIError": return new I(e.message, e.locator, e.data, { cause: t });
|
|
781
|
+
case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
|
|
782
|
+
case "ConnectorError": return new R(e.message, e.locator, e.data, { cause: t });
|
|
783
|
+
case "EngineError": return new L(e.message, e.locator, e.data, { cause: t });
|
|
784
|
+
case "FetchError": return new z(e.message, e.locator, e.data, { cause: t });
|
|
794
785
|
default: {
|
|
795
786
|
let n = e.name;
|
|
796
787
|
return new class extends Error {
|
|
@@ -803,25 +794,25 @@ function Ie(e) {
|
|
|
803
794
|
let { data: t, message: n, stack: r } = e;
|
|
804
795
|
return {
|
|
805
796
|
...e,
|
|
806
|
-
data: t === void 0 ? void 0 :
|
|
807
|
-
message:
|
|
808
|
-
stack: r === void 0 ? void 0 :
|
|
797
|
+
data: t === void 0 ? void 0 : H(t, /* @__PURE__ */ new WeakSet(), 0),
|
|
798
|
+
message: V(n),
|
|
799
|
+
stack: r === void 0 ? void 0 : V(r)
|
|
809
800
|
};
|
|
810
801
|
}
|
|
811
|
-
function
|
|
802
|
+
function V(e) {
|
|
812
803
|
let t = e;
|
|
813
804
|
for (let [e, n] of Oe) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
814
805
|
return t;
|
|
815
806
|
}
|
|
816
|
-
function
|
|
817
|
-
return typeof e == "string" ?
|
|
807
|
+
function H(e, t, n) {
|
|
808
|
+
return typeof e == "string" ? V(e) : typeof e != "object" || !e ? e : n >= De ? M : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => H(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && N.test(e) ? M : H(r, t, n + 1)])));
|
|
818
809
|
}
|
|
819
810
|
function Le(e) {
|
|
820
|
-
if (e != null && e !== "") return e.length >
|
|
811
|
+
if (e != null && e !== "") return e.length > j ? `${e.slice(0, j)}... [truncated]` : e;
|
|
821
812
|
}
|
|
822
813
|
function Re(e) {
|
|
823
|
-
let t = e.cause == null ? null :
|
|
824
|
-
if (e instanceof
|
|
814
|
+
let t = e.cause == null ? null : B(e.cause);
|
|
815
|
+
if (e instanceof P) return [{
|
|
825
816
|
data: e.data,
|
|
826
817
|
locator: e.locator,
|
|
827
818
|
message: e.message,
|
|
@@ -844,18 +835,46 @@ function Re(e) {
|
|
|
844
835
|
}, null];
|
|
845
836
|
}
|
|
846
837
|
//#endregion
|
|
838
|
+
//#region src/component/module/presenter/presenterConfig.schema.ts
|
|
839
|
+
var ze = T([
|
|
840
|
+
"list",
|
|
841
|
+
"render",
|
|
842
|
+
"setColorMode"
|
|
843
|
+
]), Be = /* @__PURE__ */ b({
|
|
844
|
+
...k,
|
|
845
|
+
typeId: /* @__PURE__ */ h("presenter"),
|
|
846
|
+
actionNames: /* @__PURE__ */ p(ze),
|
|
847
|
+
presentations: /* @__PURE__ */ p(D)
|
|
848
|
+
}), Ve = "https://engine-eu.dpuse.app/presenters";
|
|
849
|
+
async function He(e, t, n) {
|
|
850
|
+
let r = e.id, i = `${Ve}/${r.split("-").slice(2).join("-")}_v${e.version}/${r}.es.js`;
|
|
851
|
+
try {
|
|
852
|
+
return new (await (import(
|
|
853
|
+
/* @vite-ignore */
|
|
854
|
+
i
|
|
855
|
+
))).Presenter(t, n);
|
|
856
|
+
} catch (t) {
|
|
857
|
+
let n = {
|
|
858
|
+
presenterName: r,
|
|
859
|
+
url: i,
|
|
860
|
+
version: e.version
|
|
861
|
+
};
|
|
862
|
+
throw new F(`Failed to load presenter '${r}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
//#endregion
|
|
847
866
|
//#region src/component/module/tool/index.ts
|
|
848
|
-
var
|
|
849
|
-
async function
|
|
867
|
+
var Ue = "https://engine-eu.dpuse.app/tools";
|
|
868
|
+
async function We(e, t) {
|
|
850
869
|
let n = `dpuse-tool-${t}`, r = e.find((e) => e.id === n);
|
|
851
870
|
if (!r) {
|
|
852
871
|
let r = {
|
|
853
872
|
availableToolIds: e.map((e) => e.id),
|
|
854
873
|
toolName: n
|
|
855
874
|
};
|
|
856
|
-
throw new
|
|
875
|
+
throw new F(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
|
|
857
876
|
}
|
|
858
|
-
let i = `${
|
|
877
|
+
let i = `${Ue}/${t}_v${r.version}/${n}.es.js`;
|
|
859
878
|
try {
|
|
860
879
|
return new (await (import(
|
|
861
880
|
/* @vite-ignore */
|
|
@@ -867,12 +886,12 @@ async function Be(e, t) {
|
|
|
867
886
|
url: i,
|
|
868
887
|
version: r.version
|
|
869
888
|
};
|
|
870
|
-
throw new
|
|
889
|
+
throw new F(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", t, { cause: e });
|
|
871
890
|
}
|
|
872
891
|
}
|
|
873
892
|
//#endregion
|
|
874
893
|
//#region src/encoding/index.ts
|
|
875
|
-
var
|
|
894
|
+
var Ge = {
|
|
876
895
|
arabic: {
|
|
877
896
|
id: "arabic",
|
|
878
897
|
label: {
|
|
@@ -1020,7 +1039,7 @@ var Ve = {
|
|
|
1020
1039
|
es: "Occidental"
|
|
1021
1040
|
}
|
|
1022
1041
|
}
|
|
1023
|
-
},
|
|
1042
|
+
}, Ke = {
|
|
1024
1043
|
ascii: {
|
|
1025
1044
|
id: "ascii",
|
|
1026
1045
|
groupId: null,
|
|
@@ -1451,16 +1470,16 @@ var Ve = {
|
|
|
1451
1470
|
groupId: "baltic",
|
|
1452
1471
|
decoderId: "windows-1257"
|
|
1453
1472
|
}
|
|
1454
|
-
},
|
|
1455
|
-
function
|
|
1456
|
-
return Object.hasOwn(
|
|
1473
|
+
}, U = Ge, W = Ke;
|
|
1474
|
+
function G(e) {
|
|
1475
|
+
return Object.hasOwn(W, e);
|
|
1457
1476
|
}
|
|
1458
|
-
function
|
|
1459
|
-
return
|
|
1477
|
+
function qe(e) {
|
|
1478
|
+
return G(e) ? W[e].decoderId ?? e : e;
|
|
1460
1479
|
}
|
|
1461
|
-
function
|
|
1462
|
-
return Array.from(Object.values(
|
|
1463
|
-
let i = n == null ? "" :
|
|
1480
|
+
function Je(e = "en") {
|
|
1481
|
+
return Array.from(Object.values(W), ({ decoderId: t, groupId: n, id: r }) => {
|
|
1482
|
+
let i = n == null ? "" : Ye(n, e);
|
|
1464
1483
|
return {
|
|
1465
1484
|
id: r,
|
|
1466
1485
|
groupLabel: i,
|
|
@@ -1470,13 +1489,13 @@ function We(e = "en") {
|
|
|
1470
1489
|
};
|
|
1471
1490
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.label.localeCompare(n.label, e));
|
|
1472
1491
|
}
|
|
1473
|
-
function
|
|
1474
|
-
let n =
|
|
1492
|
+
function Ye(e, t) {
|
|
1493
|
+
let n = U[e].label;
|
|
1475
1494
|
return n[t] ?? n.en ?? e;
|
|
1476
1495
|
}
|
|
1477
1496
|
//#endregion
|
|
1478
1497
|
//#region src/locale/index.ts
|
|
1479
|
-
function
|
|
1498
|
+
function Xe(e, t) {
|
|
1480
1499
|
return {
|
|
1481
1500
|
...e,
|
|
1482
1501
|
label: e.label[t] ?? e.id,
|
|
@@ -1484,7 +1503,7 @@ function Ke(e, t) {
|
|
|
1484
1503
|
verb: e.verb?.[t] ?? void 0
|
|
1485
1504
|
};
|
|
1486
1505
|
}
|
|
1487
|
-
function
|
|
1506
|
+
function Ze(e, t, n = !1) {
|
|
1488
1507
|
let r = e.map((e) => ({
|
|
1489
1508
|
...e,
|
|
1490
1509
|
label: e.label[t] ?? e.id,
|
|
@@ -1493,7 +1512,7 @@ function J(e, t, n = !1) {
|
|
|
1493
1512
|
}));
|
|
1494
1513
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
1495
1514
|
}
|
|
1496
|
-
function
|
|
1515
|
+
function Qe(e, t) {
|
|
1497
1516
|
return {
|
|
1498
1517
|
...e,
|
|
1499
1518
|
label: e.label[t] ?? e.id,
|
|
@@ -1502,103 +1521,75 @@ function qe(e, t) {
|
|
|
1502
1521
|
}
|
|
1503
1522
|
//#endregion
|
|
1504
1523
|
//#region src/utilities/index.ts
|
|
1505
|
-
var
|
|
1506
|
-
[
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
]
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
],
|
|
1516
|
-
[
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
],
|
|
1521
|
-
[
|
|
1522
|
-
"secs",
|
|
1523
|
-
1e3,
|
|
1524
|
-
(e) => e === 1 ? "1 sec" : `${$(e)} secs`
|
|
1525
|
-
],
|
|
1526
|
-
[
|
|
1527
|
-
"ms",
|
|
1528
|
-
0,
|
|
1529
|
-
(e) => `${$(e)} ms`
|
|
1530
|
-
]
|
|
1531
|
-
], X = "en", Z = /* @__PURE__ */ new Map();
|
|
1532
|
-
function Je(e) {
|
|
1533
|
-
switch (e) {
|
|
1534
|
-
case "Edm.Binary": return "unknown";
|
|
1535
|
-
case "Edm.Boolean": return "boolean";
|
|
1536
|
-
case "Edm.Byte": return "wholeNumber";
|
|
1537
|
-
case "Edm.DateTime": return "moment";
|
|
1538
|
-
case "Edm.DateTimeOffset": return "moment";
|
|
1539
|
-
case "Edm.Decimal": return "decimalNumber";
|
|
1540
|
-
case "Edm.Double": return "decimalNumber";
|
|
1541
|
-
case "Edm.Guid": return "string";
|
|
1542
|
-
case "Edm.Int16": return "wholeNumber";
|
|
1543
|
-
case "Edm.Int32": return "wholeNumber";
|
|
1544
|
-
case "Edm.Int64": return "wholeNumber";
|
|
1545
|
-
case "Edm.SByte": return "wholeNumber";
|
|
1546
|
-
case "Edm.Single": return "decimalNumber";
|
|
1547
|
-
case "Edm.String": return "string";
|
|
1548
|
-
case "Edm.Time": return "momentTime";
|
|
1549
|
-
default: return "unknown";
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
function Ye(e) {
|
|
1553
|
-
if (e) {
|
|
1554
|
-
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
1555
|
-
return n <= t || n === -1 ? e : e.slice(0, Math.max(0, n));
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
function Xe(e) {
|
|
1559
|
-
if (e) {
|
|
1560
|
-
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
1561
|
-
if (n <= t) return;
|
|
1562
|
-
if (n !== -1) return e.slice(Math.max(0, n + 1));
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
function Q(e, t = 2, n = t, r = X) {
|
|
1566
|
-
if (e == null) return "";
|
|
1567
|
-
let i = `${r}decimal${String(t)}.${String(n)}`, a = Z.get(i);
|
|
1568
|
-
return a || (a = new Intl.NumberFormat(r, {
|
|
1524
|
+
var K = "en", q = [
|
|
1525
|
+
["day", 864e5],
|
|
1526
|
+
["hour", 36e5],
|
|
1527
|
+
["minute", 6e4],
|
|
1528
|
+
["second", 1e3],
|
|
1529
|
+
["millisecond", 1]
|
|
1530
|
+
], $e = [
|
|
1531
|
+
["byte", 1],
|
|
1532
|
+
["kilobyte", 1024],
|
|
1533
|
+
["megabyte", 1048576],
|
|
1534
|
+
["gigabyte", 1073741824],
|
|
1535
|
+
["terabyte", 1099511627776]
|
|
1536
|
+
], J = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
|
|
1537
|
+
function X(e, t = 2, n = t, r = K) {
|
|
1538
|
+
return e == null ? "" : $(r, {
|
|
1569
1539
|
localeMatcher: "best fit",
|
|
1570
1540
|
maximumFractionDigits: t,
|
|
1571
|
-
minimumFractionDigits: n,
|
|
1541
|
+
minimumFractionDigits: Math.min(n, t),
|
|
1572
1542
|
minimumIntegerDigits: 1,
|
|
1573
1543
|
style: "decimal",
|
|
1574
1544
|
useGrouping: !0
|
|
1575
|
-
})
|
|
1545
|
+
}).format(e);
|
|
1576
1546
|
}
|
|
1577
|
-
function
|
|
1578
|
-
return
|
|
1547
|
+
function Z(e, t = K) {
|
|
1548
|
+
return X(e, 0, 0, t);
|
|
1579
1549
|
}
|
|
1580
|
-
function
|
|
1581
|
-
return e == null
|
|
1550
|
+
function et(e, t = 1, n = K) {
|
|
1551
|
+
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
1552
|
+
maximumFractionDigits: t,
|
|
1553
|
+
notation: "compact"
|
|
1554
|
+
}).format(e);
|
|
1582
1555
|
}
|
|
1583
|
-
function
|
|
1584
|
-
if (e == null) return "";
|
|
1585
|
-
let
|
|
1586
|
-
|
|
1587
|
-
|
|
1556
|
+
function tt(e, t = 1, n = K) {
|
|
1557
|
+
if (e == null || !Number.isFinite(e)) return "";
|
|
1558
|
+
let [r, i] = $e.find(([, n]) => ct(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
|
|
1559
|
+
return $(n, {
|
|
1560
|
+
maximumFractionDigits: i === 1 ? 0 : t,
|
|
1561
|
+
style: "unit",
|
|
1562
|
+
unit: r,
|
|
1563
|
+
unitDisplay: i === 1 ? "long" : "short"
|
|
1564
|
+
}).format(e / i);
|
|
1588
1565
|
}
|
|
1589
|
-
function
|
|
1590
|
-
if (e == null) return "";
|
|
1591
|
-
let
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1566
|
+
function nt(e, t = "millisecond", n = K) {
|
|
1567
|
+
if (e == null || !Number.isFinite(e)) return "";
|
|
1568
|
+
let r = Math.round(Math.abs(e)), i = q.findIndex(([, e]) => r >= e), a = i === -1 ? q.length - 1 : i, o = q.findIndex(([e]) => e === t), s = q.slice(a, Math.max(o, a) + 1), c = [];
|
|
1569
|
+
for (let [t, i] of s) {
|
|
1570
|
+
let a = Math.floor(r / i);
|
|
1571
|
+
if (a === 0 && c.length > 0) continue;
|
|
1572
|
+
r -= a * i;
|
|
1573
|
+
let o = c.length === 0 && e < 0 && a > 0 ? -a : a;
|
|
1574
|
+
c.push($(n, {
|
|
1575
|
+
style: "unit",
|
|
1576
|
+
unit: t,
|
|
1577
|
+
unitDisplay: "short"
|
|
1578
|
+
}).format(o));
|
|
1579
|
+
}
|
|
1580
|
+
return st(n).format(c);
|
|
1581
|
+
}
|
|
1582
|
+
function rt(e) {
|
|
1583
|
+
if (!e) return;
|
|
1584
|
+
let t = Q(e);
|
|
1585
|
+
return t === void 0 ? e : e.slice(0, t);
|
|
1600
1586
|
}
|
|
1601
|
-
function
|
|
1587
|
+
function it(e) {
|
|
1588
|
+
if (!e) return;
|
|
1589
|
+
let t = Q(e);
|
|
1590
|
+
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
1591
|
+
}
|
|
1592
|
+
function at(e) {
|
|
1602
1593
|
switch (e?.toLowerCase()) {
|
|
1603
1594
|
case "csv": return "text/csv";
|
|
1604
1595
|
case "tab":
|
|
@@ -1608,5 +1599,45 @@ function et(e) {
|
|
|
1608
1599
|
default: return "application/octet-stream";
|
|
1609
1600
|
}
|
|
1610
1601
|
}
|
|
1602
|
+
function ot(e) {
|
|
1603
|
+
switch (e) {
|
|
1604
|
+
case "Edm.Boolean": return "boolean";
|
|
1605
|
+
case "Edm.Byte":
|
|
1606
|
+
case "Edm.Int16":
|
|
1607
|
+
case "Edm.Int32":
|
|
1608
|
+
case "Edm.Int64":
|
|
1609
|
+
case "Edm.SByte": return "wholeNumber";
|
|
1610
|
+
case "Edm.Decimal":
|
|
1611
|
+
case "Edm.Double":
|
|
1612
|
+
case "Edm.Single": return "decimalNumber";
|
|
1613
|
+
case "Edm.Date":
|
|
1614
|
+
case "Edm.DateTime":
|
|
1615
|
+
case "Edm.DateTimeOffset": return "moment";
|
|
1616
|
+
case "Edm.Time":
|
|
1617
|
+
case "Edm.TimeOfDay": return "momentTime";
|
|
1618
|
+
case "Edm.Guid":
|
|
1619
|
+
case "Edm.String": return "string";
|
|
1620
|
+
default: return "unknown";
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
function Q(e) {
|
|
1624
|
+
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
1625
|
+
return n > t && n < e.length - 1 ? n : void 0;
|
|
1626
|
+
}
|
|
1627
|
+
function st(e) {
|
|
1628
|
+
let t = J.get(e);
|
|
1629
|
+
return t || (t = new Intl.ListFormat(e, {
|
|
1630
|
+
style: "narrow",
|
|
1631
|
+
type: "unit"
|
|
1632
|
+
}), J.set(e, t)), t;
|
|
1633
|
+
}
|
|
1634
|
+
function $(e, t) {
|
|
1635
|
+
let n = `${e}|${JSON.stringify(t)}`, r = Y.get(n);
|
|
1636
|
+
return r || (r = new Intl.NumberFormat(e, t), Y.set(n, r)), r;
|
|
1637
|
+
}
|
|
1638
|
+
function ct(e, t) {
|
|
1639
|
+
let n = 10 ** t;
|
|
1640
|
+
return Math.round(e * n) / n;
|
|
1641
|
+
}
|
|
1611
1642
|
//#endregion
|
|
1612
|
-
export {
|
|
1643
|
+
export { I as APIError, F as AppError, R as ConnectorError, e as DEFAULT_LOCALE_ID, U as ENCODING_GROUP_CONFIG_MAP, W as ENCODING_TYPE_CONFIG_MAP, L as EngineError, z as FetchError, le as ORDERED_VALUE_DELIMITER_IDS, t as SUPPORTED_LANGUAGES, ke as buildFetchError, oe as componentInstanceConfigSchema, Ae as concatenateSerialisedErrorMessages, ge as connectorConfigSchema, Se as constructConnectorCategoryConfig, Ce as constructConnectorUsageConfig, ot as convertODataTypeIdToUsageTypeId, Ee as cookbookConfigSchema, n as createLabelMap, xe as determineConnectorUsageId, it as extractExtensionFromPath, rt as extractPathWithoutExtension, X as formatNumberAsDecimalNumber, nt as formatNumberAsDuration, et as formatNumberAsSize, tt as formatNumberAsStorageSize, Z as formatNumberAsWholeNumber, ce as getComponentStatus, we as getConnectorActionsTable, Je as getEncodingTypeConfigs, je as ignoreErrors, G as isEncodingTypeId, He as loadPresenter, We as loadTool, Xe as localiseConfig, Ze as localiseConfigs, Qe as localiseReference, at as lookupMimeTypeForExtension, B as normalizeToError, Be as presenterConfigSchema, qe as resolveDecoderId, r as resolveLabel, Me as serialiseError, Ne as unserialiseError };
|