@dpuse/dpuse-shared 1.0.209 → 1.0.210
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 +7 -7
- package/dist/dpuse-shared.es.js +243 -233
- package/dist/dpuse-shared.es.js.map +1 -1
- package/dist/types/src/component/dataView/index.d.ts +17 -3
- package/dist/types/src/component/module/connector/objectParsing.d.ts +2 -3
- package/dist/types/src/component/module/tool/filePreviewer.d.ts +2 -5
- package/dist/types/src/component/module/tool/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/dpuse-shared.es.js
CHANGED
|
@@ -400,11 +400,11 @@ function T(e) {
|
|
|
400
400
|
return t;
|
|
401
401
|
}
|
|
402
402
|
/* @__NO_SIDE_EFFECTS__ */
|
|
403
|
-
function
|
|
403
|
+
function E(e, t) {
|
|
404
404
|
return d({
|
|
405
405
|
kind: "schema",
|
|
406
406
|
type: "union",
|
|
407
|
-
reference:
|
|
407
|
+
reference: E,
|
|
408
408
|
expects: /* @__PURE__ */ u(e.map((e) => e.expects), "|"),
|
|
409
409
|
async: !1,
|
|
410
410
|
options: e,
|
|
@@ -432,7 +432,7 @@ function ee(e, t) {
|
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
/* @__NO_SIDE_EFFECTS__ */
|
|
435
|
-
function
|
|
435
|
+
function ee(...e) {
|
|
436
436
|
return d({
|
|
437
437
|
...e[0],
|
|
438
438
|
pipe: e,
|
|
@@ -449,7 +449,7 @@ function te(...e) {
|
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
/* @__NO_SIDE_EFFECTS__ */
|
|
452
|
-
function
|
|
452
|
+
function te(e, t, n) {
|
|
453
453
|
let r = e["~run"]({ value: t }, /* @__PURE__ */ a(n));
|
|
454
454
|
return {
|
|
455
455
|
typed: r.typed,
|
|
@@ -474,7 +474,7 @@ var D = /* @__PURE__ */ C({
|
|
|
474
474
|
}),
|
|
475
475
|
icon: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
476
476
|
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ w())
|
|
477
|
-
}, O = (e) => /* @__PURE__ */
|
|
477
|
+
}, O = (e) => /* @__PURE__ */ E(e.map((e) => /* @__PURE__ */ _(e))), re = O([
|
|
478
478
|
"app",
|
|
479
479
|
"connector",
|
|
480
480
|
"connectorConnection",
|
|
@@ -1774,15 +1774,15 @@ var _e = O([
|
|
|
1774
1774
|
iconvLiteDecoderId: "windows1257"
|
|
1775
1775
|
}
|
|
1776
1776
|
}, j = Te, M = Ee;
|
|
1777
|
-
function
|
|
1777
|
+
function N(e) {
|
|
1778
1778
|
return Object.hasOwn(M, e);
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1781
|
-
return
|
|
1780
|
+
function P(e) {
|
|
1781
|
+
return N(e) ? M[e].textDecoderId ?? e : e;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function De(e = "en") {
|
|
1784
1784
|
return Array.from(Object.values(M), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
1785
|
-
let o = t == null ? "" :
|
|
1785
|
+
let o = t == null ? "" : Oe(t, e);
|
|
1786
1786
|
return {
|
|
1787
1787
|
id: r,
|
|
1788
1788
|
groupLabel: o,
|
|
@@ -1794,62 +1794,62 @@ function ke(e = "en") {
|
|
|
1794
1794
|
};
|
|
1795
1795
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
1797
|
+
function Oe(e, t) {
|
|
1798
1798
|
let n = j[e].label;
|
|
1799
1799
|
return n[t] ?? n.en ?? e;
|
|
1800
1800
|
}
|
|
1801
1801
|
// src/errors/index.ts
|
|
1802
|
-
var
|
|
1803
|
-
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${
|
|
1804
|
-
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) =>
|
|
1805
|
-
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () =>
|
|
1806
|
-
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () =>
|
|
1807
|
-
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () =>
|
|
1808
|
-
],
|
|
1802
|
+
var ke = 2048, F = "[REDACTED]", Ae = 10, je = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Me = [
|
|
1803
|
+
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${F}`],
|
|
1804
|
+
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => je.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${F}` : e],
|
|
1805
|
+
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => F],
|
|
1806
|
+
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => F],
|
|
1807
|
+
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => F]
|
|
1808
|
+
], I = class extends Error {
|
|
1809
1809
|
data;
|
|
1810
1810
|
locator;
|
|
1811
1811
|
constructor(e, t, n, r) {
|
|
1812
1812
|
super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
|
|
1813
1813
|
}
|
|
1814
|
-
},
|
|
1814
|
+
}, L = class extends I {
|
|
1815
1815
|
constructor(e, t, n, r) {
|
|
1816
1816
|
super(e, t, n, r), this.name = "AppError";
|
|
1817
1817
|
}
|
|
1818
|
-
},
|
|
1818
|
+
}, Ne = class extends I {
|
|
1819
1819
|
constructor(e, t, n, r) {
|
|
1820
1820
|
super(e, t, n, r), this.name = "APIError";
|
|
1821
1821
|
}
|
|
1822
|
-
},
|
|
1822
|
+
}, Pe = class extends I {
|
|
1823
1823
|
constructor(e, t, n, r) {
|
|
1824
1824
|
super(e, t, n, r), this.name = "EngineError";
|
|
1825
1825
|
}
|
|
1826
|
-
},
|
|
1826
|
+
}, Fe = class extends I {
|
|
1827
1827
|
constructor(e, t, n, r) {
|
|
1828
1828
|
super(e, t, n, r), this.name = "ConnectorError";
|
|
1829
1829
|
}
|
|
1830
|
-
},
|
|
1830
|
+
}, R = class extends I {
|
|
1831
1831
|
constructor(e, t, n, r) {
|
|
1832
1832
|
super(e, t, n, r), this.name = "FetchError";
|
|
1833
1833
|
}
|
|
1834
1834
|
};
|
|
1835
|
-
async function
|
|
1835
|
+
async function Ie(e, t, n) {
|
|
1836
1836
|
let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
|
|
1837
1837
|
try {
|
|
1838
1838
|
a = await e.text();
|
|
1839
1839
|
} catch (e) {
|
|
1840
|
-
a = `<body unavailable: ${
|
|
1840
|
+
a = `<body unavailable: ${z(e).message}>`;
|
|
1841
1841
|
}
|
|
1842
|
-
return new
|
|
1842
|
+
return new R(i, n, { body: We(a) });
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function Le(e) {
|
|
1845
1845
|
return e.map((e) => e.message).join(" ");
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1847
|
+
function Re(e) {
|
|
1848
1848
|
try {
|
|
1849
1849
|
e();
|
|
1850
1850
|
} catch {}
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function z(e) {
|
|
1853
1853
|
if (e instanceof Error) return e;
|
|
1854
1854
|
if (typeof e == "string") return Error(e);
|
|
1855
1855
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
|
|
@@ -1861,24 +1861,24 @@ function R(e) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
return /* @__PURE__ */ Error("Unknown error");
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1865
|
-
let t = /* @__PURE__ */ new Set(), n = [], r =
|
|
1864
|
+
function ze(e) {
|
|
1865
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = z(e);
|
|
1866
1866
|
for (; r != null && !t.has(r);) {
|
|
1867
1867
|
t.add(r);
|
|
1868
|
-
let [e, i] =
|
|
1868
|
+
let [e, i] = Ge(r), a = Ue(e);
|
|
1869
1869
|
/(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
|
|
1870
1870
|
}
|
|
1871
1871
|
return n;
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function Be(e) {
|
|
1874
1874
|
let t;
|
|
1875
1875
|
for (let n of e.toReversed()) {
|
|
1876
|
-
let e =
|
|
1876
|
+
let e = He(n, t);
|
|
1877
1877
|
n.stack !== void 0 && (e.stack = n.stack), t = e;
|
|
1878
1878
|
}
|
|
1879
1879
|
return t ?? /* @__PURE__ */ Error("No error to unserialise.");
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1881
|
+
function Ve(e) {
|
|
1882
1882
|
let t;
|
|
1883
1883
|
try {
|
|
1884
1884
|
t = JSON.stringify(e);
|
|
@@ -1887,13 +1887,13 @@ function He(e) {
|
|
|
1887
1887
|
}
|
|
1888
1888
|
return t === "" && (t = "Unknown error"), t;
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1890
|
+
function He(e, t) {
|
|
1891
1891
|
switch (e.name) {
|
|
1892
|
-
case "APIError": return new
|
|
1893
|
-
case "AppError": return new
|
|
1894
|
-
case "ConnectorError": return new
|
|
1895
|
-
case "EngineError": return new
|
|
1896
|
-
case "FetchError": return new
|
|
1892
|
+
case "APIError": return new Ne(e.message, e.locator, e.data, { cause: t });
|
|
1893
|
+
case "AppError": return new L(e.message, e.locator, e.data, { cause: t });
|
|
1894
|
+
case "ConnectorError": return new Fe(e.message, e.locator, e.data, { cause: t });
|
|
1895
|
+
case "EngineError": return new Pe(e.message, e.locator, e.data, { cause: t });
|
|
1896
|
+
case "FetchError": return new R(e.message, e.locator, e.data, { cause: t });
|
|
1897
1897
|
default: {
|
|
1898
1898
|
let n = e.name;
|
|
1899
1899
|
return new class extends Error {
|
|
@@ -1902,29 +1902,29 @@ function Ue(e, t) {
|
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Ue(e) {
|
|
1906
1906
|
let { data: t, message: n, stack: r } = e;
|
|
1907
1907
|
return {
|
|
1908
1908
|
...e,
|
|
1909
|
-
data: t === void 0 ? void 0 :
|
|
1910
|
-
message:
|
|
1911
|
-
stack: r === void 0 ? void 0 :
|
|
1909
|
+
data: t === void 0 ? void 0 : V(t, /* @__PURE__ */ new WeakSet(), 0),
|
|
1910
|
+
message: B(n),
|
|
1911
|
+
stack: r === void 0 ? void 0 : B(r)
|
|
1912
1912
|
};
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function B(e) {
|
|
1915
1915
|
let t = e;
|
|
1916
|
-
for (let [e, n] of
|
|
1916
|
+
for (let [e, n] of Me) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
1917
1917
|
return t;
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1920
|
-
return typeof e == "string" ?
|
|
1919
|
+
function V(e, t, n) {
|
|
1920
|
+
return typeof e == "string" ? B(e) : typeof e != "object" || !e ? e : n >= Ae ? F : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => V(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && je.test(e) ? F : V(r, t, n + 1)])));
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1923
|
-
if (e != null && e !== "") return e.length >
|
|
1922
|
+
function We(e) {
|
|
1923
|
+
if (e != null && e !== "") return e.length > ke ? `${e.slice(0, ke)}... [truncated]` : e;
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1926
|
-
let t = e.cause == null ? null :
|
|
1927
|
-
if (e instanceof
|
|
1925
|
+
function Ge(e) {
|
|
1926
|
+
let t = e.cause == null ? null : z(e.cause);
|
|
1927
|
+
if (e instanceof I) return [{
|
|
1928
1928
|
data: e.data,
|
|
1929
1929
|
locator: e.locator,
|
|
1930
1930
|
message: e.message,
|
|
@@ -1941,12 +1941,12 @@ function Ke(e) {
|
|
|
1941
1941
|
}, t] : [{
|
|
1942
1942
|
data: n,
|
|
1943
1943
|
locator: "",
|
|
1944
|
-
message:
|
|
1944
|
+
message: Ve(e),
|
|
1945
1945
|
name: "Error",
|
|
1946
1946
|
stack: void 0
|
|
1947
1947
|
}, null];
|
|
1948
1948
|
}
|
|
1949
|
-
var
|
|
1949
|
+
var Ke = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ ee(/* @__PURE__ */ h(O([
|
|
1950
1950
|
"arrow",
|
|
1951
1951
|
"avro",
|
|
1952
1952
|
"dtv",
|
|
@@ -1959,15 +1959,15 @@ var qe = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ te(/* @__PURE__ */ h
|
|
|
1959
1959
|
"sqlite",
|
|
1960
1960
|
"xlsx",
|
|
1961
1961
|
"xml"
|
|
1962
|
-
])), /* @__PURE__ */ f(1)) }),
|
|
1962
|
+
])), /* @__PURE__ */ f(1)) }), qe = /* @__PURE__ */ h(/* @__PURE__ */ w()), Je = /* @__PURE__ */ C({
|
|
1963
1963
|
...A,
|
|
1964
1964
|
typeId: /* @__PURE__ */ _("tool"),
|
|
1965
|
-
actionNames: /* @__PURE__ */ x(
|
|
1966
|
-
parser: /* @__PURE__ */ x(
|
|
1965
|
+
actionNames: /* @__PURE__ */ x(qe),
|
|
1966
|
+
parser: /* @__PURE__ */ x(Ke)
|
|
1967
1967
|
});
|
|
1968
1968
|
// src/component/module/tool/delimitedText.ts
|
|
1969
|
-
async function
|
|
1970
|
-
let r =
|
|
1969
|
+
async function Ye(e, t, n) {
|
|
1970
|
+
let r = Xe(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await Ze(e, t.valueDelimiterIds, t.isComplete, n);
|
|
1971
1971
|
return {
|
|
1972
1972
|
issues: i,
|
|
1973
1973
|
parsedRecords: a,
|
|
@@ -1975,16 +1975,16 @@ async function Xe(e, t, n) {
|
|
|
1975
1975
|
valueDelimiterId: o
|
|
1976
1976
|
};
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1978
|
+
function Xe(e) {
|
|
1979
1979
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
1980
1980
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
1981
1981
|
}
|
|
1982
|
-
async function
|
|
1982
|
+
async function Ze(e, t, n, r) {
|
|
1983
1983
|
let i, a, o, s = [], c, l = !1;
|
|
1984
1984
|
for (let u of t) {
|
|
1985
1985
|
let { issues: t, records: d } = await r(e, u, n);
|
|
1986
1986
|
if (t.length > 0) {
|
|
1987
|
-
c =
|
|
1987
|
+
c = Qe(c, {
|
|
1988
1988
|
delimiter: u,
|
|
1989
1989
|
issues: t,
|
|
1990
1990
|
records: d
|
|
@@ -1992,7 +1992,7 @@ async function Qe(e, t, n, r) {
|
|
|
1992
1992
|
continue;
|
|
1993
1993
|
}
|
|
1994
1994
|
if (l = !0, d.length === 0) continue;
|
|
1995
|
-
let { averageValueCount: f, sumOfValueCountDiffs: p } =
|
|
1995
|
+
let { averageValueCount: f, sumOfValueCountDiffs: p } = $e(d);
|
|
1996
1996
|
(a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
|
|
1997
1997
|
}
|
|
1998
1998
|
if (!l && c != null) {
|
|
@@ -2000,19 +2000,19 @@ async function Qe(e, t, n, r) {
|
|
|
2000
2000
|
return {
|
|
2001
2001
|
issues: t,
|
|
2002
2002
|
parsedRecords: n,
|
|
2003
|
-
valueDelimiterId:
|
|
2003
|
+
valueDelimiterId: H(n) ? e : void 0
|
|
2004
2004
|
};
|
|
2005
2005
|
}
|
|
2006
2006
|
return {
|
|
2007
2007
|
issues: [],
|
|
2008
2008
|
parsedRecords: s,
|
|
2009
|
-
valueDelimiterId: i != null &&
|
|
2009
|
+
valueDelimiterId: i != null && H(s) ? i : void 0
|
|
2010
2010
|
};
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function Qe(e, t) {
|
|
2013
2013
|
return e == null || t.issues.length < e.issues.length ? t : e;
|
|
2014
2014
|
}
|
|
2015
|
-
function
|
|
2015
|
+
function $e(e) {
|
|
2016
2016
|
let t = 0, n = 0, r;
|
|
2017
2017
|
for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
|
|
2018
2018
|
return {
|
|
@@ -2020,39 +2020,39 @@ function et(e) {
|
|
|
2020
2020
|
sumOfValueCountDiffs: n
|
|
2021
2021
|
};
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function H(e) {
|
|
2024
2024
|
let t = /* @__PURE__ */ new Map();
|
|
2025
2025
|
for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
|
|
2026
2026
|
let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
|
|
2027
2027
|
return n > 1 && r * 2 > e.length;
|
|
2028
2028
|
}
|
|
2029
2029
|
// src/component/module/tool/index.ts
|
|
2030
|
-
var
|
|
2031
|
-
function
|
|
2030
|
+
var et = "https://engine-eu.dpuse.app/tools", tt = { dtv: "dpuse-tool-rust-csv-core-parser" }, U = "dpuse-tool-";
|
|
2031
|
+
function W(e, t) {
|
|
2032
2032
|
return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2035
|
-
let r =
|
|
2034
|
+
function G(e, t, n) {
|
|
2035
|
+
let r = W(e, t), [i] = r;
|
|
2036
2036
|
if (i === void 0) {
|
|
2037
2037
|
let n = {
|
|
2038
2038
|
availableToolIds: e.map((e) => e.id),
|
|
2039
2039
|
dataFormatId: t
|
|
2040
2040
|
};
|
|
2041
|
-
throw new
|
|
2041
|
+
throw new L(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
|
|
2042
2042
|
}
|
|
2043
|
-
let a =
|
|
2043
|
+
let a = tt[t];
|
|
2044
2044
|
return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
|
|
2045
2045
|
}
|
|
2046
|
-
async function
|
|
2047
|
-
let n = `${
|
|
2046
|
+
async function nt(e, t) {
|
|
2047
|
+
let n = `${U}${t}`, r = e.find((e) => e.id === n);
|
|
2048
2048
|
if (!r) {
|
|
2049
2049
|
let r = {
|
|
2050
2050
|
availableToolIds: e.map((e) => e.id),
|
|
2051
2051
|
toolName: n
|
|
2052
2052
|
};
|
|
2053
|
-
throw new
|
|
2053
|
+
throw new L(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
|
|
2054
2054
|
}
|
|
2055
|
-
let i = `${
|
|
2055
|
+
let i = `${et}/${t}_v${r.version}/${n}.es.js`;
|
|
2056
2056
|
try {
|
|
2057
2057
|
return new (await (import(
|
|
2058
2058
|
/* @vite-ignore */
|
|
@@ -2064,23 +2064,31 @@ async function rt(e, t) {
|
|
|
2064
2064
|
url: i,
|
|
2065
2065
|
version: r.version
|
|
2066
2066
|
};
|
|
2067
|
-
throw new
|
|
2067
|
+
throw new L(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", t, { cause: e });
|
|
2068
2068
|
}
|
|
2069
2069
|
}
|
|
2070
2070
|
// src/component/module/connector/objectParsing.ts
|
|
2071
|
-
var
|
|
2072
|
-
async function
|
|
2073
|
-
let { asAt: t, declaredColumnConfigs: n, declaredReadingConfig: r, filePreview: i, inferDataTypes: a,
|
|
2074
|
-
|
|
2075
|
-
|
|
2071
|
+
var rt = "\n", K = ",", it = 13, q = 10, at = 34, J = 1048576;
|
|
2072
|
+
async function ot(e) {
|
|
2073
|
+
let { asAt: t, declaredColumnConfigs: n, declaredReadingConfig: r, filePreview: i, inferDataTypes: a, readingChoiceConfig: o, startedAt: s, toolConfigs: c } = e, { isComplete: l, text: u } = i, d = r != null, f = i.bytes.length, p = {
|
|
2074
|
+
decodedEncodingId: i.decodedEncodingId,
|
|
2075
|
+
replacementCharacterCount: i.replacementCharacterCount
|
|
2076
|
+
}, m = i.encodingCandidates, h = {
|
|
2077
|
+
encodingConfidenceLevel: i.encodingConfidenceLevel,
|
|
2078
|
+
encodingId: r?.encodingId ?? i.encodingId,
|
|
2079
|
+
encodingSourceId: r?.encodingId == null ? i.encodingSourceId : void 0
|
|
2080
|
+
};
|
|
2081
|
+
if (f === 0) return {
|
|
2082
|
+
contentAuditConfig: lt({
|
|
2076
2083
|
asAt: t,
|
|
2077
2084
|
columns: [],
|
|
2078
2085
|
isComplete: !0,
|
|
2079
2086
|
recordCount: 0,
|
|
2080
|
-
size:
|
|
2087
|
+
size: f,
|
|
2081
2088
|
startedAt: s
|
|
2082
2089
|
}),
|
|
2083
2090
|
sampleConfig: {
|
|
2091
|
+
...p,
|
|
2084
2092
|
issues: [{
|
|
2085
2093
|
endLineNumber: void 0,
|
|
2086
2094
|
fieldNumber: void 0,
|
|
@@ -2091,95 +2099,79 @@ async function st(e) {
|
|
|
2091
2099
|
severityId: "info",
|
|
2092
2100
|
value: void 0
|
|
2093
2101
|
}],
|
|
2102
|
+
dataFormatId: "dtv",
|
|
2103
|
+
hasHeaders: !1,
|
|
2094
2104
|
parsedRecords: [],
|
|
2105
|
+
parserId: void 0,
|
|
2106
|
+
recordDelimiterId: rt,
|
|
2095
2107
|
size: 0,
|
|
2096
|
-
text: void 0
|
|
2108
|
+
text: void 0,
|
|
2109
|
+
valueDelimiterId: K
|
|
2097
2110
|
},
|
|
2098
2111
|
readingConfig: {
|
|
2099
2112
|
dataFormatId: "dtv",
|
|
2100
|
-
|
|
2101
|
-
|
|
2113
|
+
dataFormatSourceId: void 0,
|
|
2114
|
+
...h,
|
|
2102
2115
|
fileType: void 0,
|
|
2103
2116
|
hasHeaders: !1,
|
|
2104
|
-
isDeclared:
|
|
2105
|
-
parserId: void 0,
|
|
2106
|
-
recordDelimiterId: it,
|
|
2107
|
-
valueDelimiterId: G
|
|
2108
|
-
}
|
|
2109
|
-
};
|
|
2110
|
-
if (l == null || u == null || U(c, l).length === 0) return {
|
|
2111
|
-
contentAuditConfig: J({
|
|
2112
|
-
asAt: t,
|
|
2113
|
-
columns: [],
|
|
2114
|
-
isComplete: i.isComplete,
|
|
2115
|
-
recordCount: 0,
|
|
2116
|
-
size: p,
|
|
2117
|
-
startedAt: s
|
|
2118
|
-
}),
|
|
2119
|
-
sampleConfig: {
|
|
2120
|
-
issues: [],
|
|
2121
|
-
parsedRecords: [],
|
|
2122
|
-
size: p,
|
|
2123
|
-
text: u
|
|
2124
|
-
},
|
|
2125
|
-
readingConfig: {
|
|
2126
|
-
dataFormatId: l ?? "unknown",
|
|
2127
|
-
dataFormatSourceId: i.dataFormatSourceId,
|
|
2128
|
-
encodingConfidenceLevel: i.encodingConfidenceLevel,
|
|
2129
|
-
encodingId: i.encodingId,
|
|
2130
|
-
encodingSourceId: i.encodingSourceId,
|
|
2131
|
-
fileType: i.fileTypeConfig,
|
|
2132
|
-
hasHeaders: void 0,
|
|
2133
|
-
isDeclared: f,
|
|
2117
|
+
isDeclared: d,
|
|
2134
2118
|
parserId: void 0,
|
|
2135
|
-
recordDelimiterId:
|
|
2136
|
-
|
|
2137
|
-
valueDelimiterId: void 0
|
|
2119
|
+
recordDelimiterId: rt,
|
|
2120
|
+
valueDelimiterId: K
|
|
2138
2121
|
},
|
|
2139
|
-
encodingCandidates:
|
|
2122
|
+
encodingCandidates: m
|
|
2140
2123
|
};
|
|
2141
|
-
let
|
|
2142
|
-
dataFormatId:
|
|
2143
|
-
isComplete:
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2124
|
+
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = await pt({
|
|
2125
|
+
dataFormatId: g,
|
|
2126
|
+
isComplete: l,
|
|
2127
|
+
parserId: void 0,
|
|
2128
|
+
text: u,
|
|
2129
|
+
toolConfigs: c,
|
|
2130
|
+
valueDelimiterId: _
|
|
2131
|
+
}), y = o?.dataFormatId ?? g, b = o?.dataFormatId != null || o?.parserId != null || o?.valueDelimiterId != null, x = b ? await pt({
|
|
2132
|
+
dataFormatId: y,
|
|
2133
|
+
isComplete: l,
|
|
2134
|
+
parserId: o.parserId,
|
|
2135
|
+
text: u,
|
|
2136
|
+
toolConfigs: c,
|
|
2137
|
+
valueDelimiterId: _ ?? o.valueDelimiterId
|
|
2138
|
+
}) : v, S = x?.parseTextResult.parsedRecords ?? [], C = x == null ? void 0 : a(S, r?.hasHeaders, n), w = b && v != null ? a(v.parseTextResult.parsedRecords, r?.hasHeaders, n) : C;
|
|
2150
2139
|
return {
|
|
2151
|
-
contentAuditConfig:
|
|
2140
|
+
contentAuditConfig: lt({
|
|
2152
2141
|
asAt: t,
|
|
2153
|
-
columns:
|
|
2154
|
-
isComplete:
|
|
2155
|
-
recordCount: Math.max(0,
|
|
2156
|
-
size:
|
|
2142
|
+
columns: C?.columnConfigs ?? [],
|
|
2143
|
+
isComplete: l,
|
|
2144
|
+
recordCount: Math.max(0, S.length - +(C?.hasHeaders === !0)),
|
|
2145
|
+
size: f,
|
|
2157
2146
|
startedAt: s
|
|
2158
2147
|
}),
|
|
2159
2148
|
sampleConfig: {
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2149
|
+
...p,
|
|
2150
|
+
dataFormatId: y ?? "unknown",
|
|
2151
|
+
hasHeaders: C?.hasHeaders,
|
|
2152
|
+
issues: x?.parseTextResult.issues ?? [],
|
|
2153
|
+
parsedRecords: S,
|
|
2154
|
+
parserId: x?.parserId,
|
|
2155
|
+
recordDelimiterId: x?.parseTextResult.recordDelimiterId,
|
|
2156
|
+
size: f,
|
|
2157
|
+
text: u,
|
|
2158
|
+
valueDelimiterId: x?.valueDelimiterId
|
|
2164
2159
|
},
|
|
2165
2160
|
readingConfig: {
|
|
2166
|
-
dataFormatId:
|
|
2167
|
-
dataFormatSourceId: i.dataFormatSourceId,
|
|
2168
|
-
|
|
2169
|
-
encodingId: i.encodingId,
|
|
2170
|
-
encodingSourceId: i.encodingSourceId,
|
|
2161
|
+
dataFormatId: g ?? "unknown",
|
|
2162
|
+
dataFormatSourceId: r == null ? i.dataFormatSourceId : void 0,
|
|
2163
|
+
...h,
|
|
2171
2164
|
fileType: i.fileTypeConfig,
|
|
2172
|
-
hasHeaders:
|
|
2173
|
-
isDeclared:
|
|
2174
|
-
parserId:
|
|
2175
|
-
recordDelimiterId:
|
|
2176
|
-
|
|
2177
|
-
valueDelimiterId: v ? d ?? y.valueDelimiterId ?? G : y.valueDelimiterId
|
|
2165
|
+
hasHeaders: w?.hasHeaders,
|
|
2166
|
+
isDeclared: d,
|
|
2167
|
+
parserId: v?.parserId,
|
|
2168
|
+
recordDelimiterId: v?.parseTextResult.recordDelimiterId,
|
|
2169
|
+
valueDelimiterId: v?.valueDelimiterId
|
|
2178
2170
|
},
|
|
2179
|
-
encodingCandidates:
|
|
2171
|
+
encodingCandidates: m
|
|
2180
2172
|
};
|
|
2181
2173
|
}
|
|
2182
|
-
async function
|
|
2174
|
+
async function st(e) {
|
|
2183
2175
|
let { chunk: t, options: n, signal: r, stream: i, toolConfigs: a } = e, { parser: o } = await Y(a, n.dataFormatId, n.parserId);
|
|
2184
2176
|
return await o.parseStream(i, {
|
|
2185
2177
|
abortSignal: r,
|
|
@@ -2189,7 +2181,7 @@ async function ct(e) {
|
|
|
2189
2181
|
valueDelimiterId: n.valueDelimiterId
|
|
2190
2182
|
}, t);
|
|
2191
2183
|
}
|
|
2192
|
-
async function
|
|
2184
|
+
async function ct(e) {
|
|
2193
2185
|
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, c = Date.now(), l = performance.now(), u = t(i.hasHeaders, n), { parser: d } = await Y(s, i.dataFormatId, i.parserId), f = ft(o), p = ut(f.stream, i), m = await d.parseStream(p.stream, {
|
|
2194
2186
|
abortSignal: a,
|
|
2195
2187
|
chunkSize: i.chunkSize,
|
|
@@ -2216,7 +2208,7 @@ async function lt(e) {
|
|
|
2216
2208
|
hasHeaders: g
|
|
2217
2209
|
};
|
|
2218
2210
|
}
|
|
2219
|
-
function
|
|
2211
|
+
function lt(e) {
|
|
2220
2212
|
let { asAt: t, columns: n, isComplete: r, recordCount: i, size: a, startedAt: o } = e;
|
|
2221
2213
|
return {
|
|
2222
2214
|
asAt: t,
|
|
@@ -2248,8 +2240,8 @@ function ut(e, t) {
|
|
|
2248
2240
|
}
|
|
2249
2241
|
s = t.value;
|
|
2250
2242
|
}
|
|
2251
|
-
let c = s.subarray(0,
|
|
2252
|
-
o = s.length >
|
|
2243
|
+
let c = s.subarray(0, J);
|
|
2244
|
+
o = s.length > J ? s.subarray(J) : void 0;
|
|
2253
2245
|
let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
|
|
2254
2246
|
u == null ? (i += c.length, e.enqueue(c)) : (i += u, o = void 0, e.enqueue(c.subarray(0, u)), e.close(), await n.cancel());
|
|
2255
2247
|
},
|
|
@@ -2260,13 +2252,13 @@ function ut(e, t) {
|
|
|
2260
2252
|
};
|
|
2261
2253
|
}
|
|
2262
2254
|
function dt(e) {
|
|
2263
|
-
let t =
|
|
2255
|
+
let t = P(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2264
2256
|
return (e, t, o) => {
|
|
2265
2257
|
for (let s = 0; s < e.length; s++) {
|
|
2266
2258
|
let c = e[s];
|
|
2267
|
-
if ((c ===
|
|
2268
|
-
if (c ===
|
|
2269
|
-
else if (!a && s >= o && (c ===
|
|
2259
|
+
if ((c === at || c === q || c === it) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
|
|
2260
|
+
if (c === at) a = !a;
|
|
2261
|
+
else if (!a && s >= o && (c === q || e[s + r] !== q)) return s + r - i;
|
|
2270
2262
|
}
|
|
2271
2263
|
}
|
|
2272
2264
|
};
|
|
@@ -2286,23 +2278,41 @@ function ft(e) {
|
|
|
2286
2278
|
waitDuration: () => n
|
|
2287
2279
|
};
|
|
2288
2280
|
}
|
|
2281
|
+
async function pt(e) {
|
|
2282
|
+
let { dataFormatId: t, isComplete: n, parserId: r, text: i, toolConfigs: a, valueDelimiterId: o } = e;
|
|
2283
|
+
if (t == null || i == null || W(a, t).length === 0) return;
|
|
2284
|
+
let { parser: s, parserId: c } = await Y(a, t, r), l = o == null ? k.map(({ id: e }) => e) : [o], u = await s.parseText(i, {
|
|
2285
|
+
dataFormatId: t,
|
|
2286
|
+
isComplete: n,
|
|
2287
|
+
valueDelimiterIds: l
|
|
2288
|
+
}), d = t === "dtv", f = d && o == null && u.valueDelimiterId == null ? await s.parseText(i, {
|
|
2289
|
+
dataFormatId: t,
|
|
2290
|
+
isComplete: n,
|
|
2291
|
+
valueDelimiterIds: [K]
|
|
2292
|
+
}) : u;
|
|
2293
|
+
return {
|
|
2294
|
+
parserId: c,
|
|
2295
|
+
parseTextResult: f,
|
|
2296
|
+
valueDelimiterId: d ? o ?? f.valueDelimiterId ?? K : f.valueDelimiterId
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2289
2299
|
async function Y(e, t, n) {
|
|
2290
|
-
let r =
|
|
2300
|
+
let r = G(e, t, n);
|
|
2291
2301
|
return {
|
|
2292
|
-
parser: await
|
|
2302
|
+
parser: await nt(e, r.id.slice(U.length)),
|
|
2293
2303
|
parserId: r.id
|
|
2294
2304
|
};
|
|
2295
2305
|
}
|
|
2296
|
-
var
|
|
2306
|
+
var mt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
2297
2307
|
format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2298
2308
|
name: /* @__PURE__ */ w(),
|
|
2299
2309
|
title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2300
2310
|
type: /* @__PURE__ */ x(/* @__PURE__ */ w())
|
|
2301
|
-
})) }),
|
|
2311
|
+
})) }), ht = /* @__PURE__ */ v({
|
|
2302
2312
|
delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2303
2313
|
header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
2304
2314
|
headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
|
|
2305
|
-
}),
|
|
2315
|
+
}), gt = {
|
|
2306
2316
|
boolean: {
|
|
2307
2317
|
dataSubtypeId: void 0,
|
|
2308
2318
|
dataTypeId: "boolean"
|
|
@@ -2335,18 +2345,18 @@ var pt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
|
2335
2345
|
dataSubtypeId: "integer",
|
|
2336
2346
|
dataTypeId: "numeric"
|
|
2337
2347
|
}
|
|
2338
|
-
},
|
|
2348
|
+
}, _t = {
|
|
2339
2349
|
email: "email",
|
|
2340
2350
|
uri: "url",
|
|
2341
2351
|
uuid: "uuid"
|
|
2342
2352
|
};
|
|
2343
|
-
function
|
|
2344
|
-
let t = /* @__PURE__ */
|
|
2345
|
-
if (!t.success) throw new
|
|
2346
|
-
let n = /* @__PURE__ */
|
|
2347
|
-
if (!n.success) throw new
|
|
2353
|
+
function vt(e) {
|
|
2354
|
+
let t = /* @__PURE__ */ te(mt, e.schema);
|
|
2355
|
+
if (!t.success) throw new L("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2356
|
+
let n = /* @__PURE__ */ te(ht, e.dialect ?? {});
|
|
2357
|
+
if (!n.success) throw new L("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2348
2358
|
let r = t.output.fields.map((e) => {
|
|
2349
|
-
let t =
|
|
2359
|
+
let t = yt(e.type, e.format);
|
|
2350
2360
|
return {
|
|
2351
2361
|
name: e.name,
|
|
2352
2362
|
label: e.title,
|
|
@@ -2364,18 +2374,18 @@ function _t(e) {
|
|
|
2364
2374
|
}
|
|
2365
2375
|
};
|
|
2366
2376
|
}
|
|
2367
|
-
function
|
|
2368
|
-
let n = e == null ? void 0 :
|
|
2377
|
+
function yt(e, t) {
|
|
2378
|
+
let n = e == null ? void 0 : gt[e];
|
|
2369
2379
|
return n == null ? {
|
|
2370
2380
|
dataSubtypeId: void 0,
|
|
2371
2381
|
dataTypeId: void 0
|
|
2372
2382
|
} : t == null || n.dataTypeId !== "string" ? n : {
|
|
2373
|
-
dataSubtypeId:
|
|
2383
|
+
dataSubtypeId: _t[t] ?? "plain",
|
|
2374
2384
|
dataTypeId: "string"
|
|
2375
2385
|
};
|
|
2376
2386
|
}
|
|
2377
2387
|
// src/component/module/connector/index.ts
|
|
2378
|
-
var
|
|
2388
|
+
var bt = [
|
|
2379
2389
|
{
|
|
2380
2390
|
id: "application",
|
|
2381
2391
|
label: {
|
|
@@ -2404,7 +2414,7 @@ var yt = [
|
|
|
2404
2414
|
es: "Almacén de Archivos"
|
|
2405
2415
|
}
|
|
2406
2416
|
}
|
|
2407
|
-
],
|
|
2417
|
+
], xt = [
|
|
2408
2418
|
{
|
|
2409
2419
|
id: "apiEndpoint",
|
|
2410
2420
|
label: {
|
|
@@ -2426,7 +2436,7 @@ var yt = [
|
|
|
2426
2436
|
es: "Tabla"
|
|
2427
2437
|
}
|
|
2428
2438
|
}
|
|
2429
|
-
],
|
|
2439
|
+
], St = {
|
|
2430
2440
|
abortOperation: "Abort Operation",
|
|
2431
2441
|
auditObjectContent: "Audit Object Content",
|
|
2432
2442
|
closeStore: "Close Store",
|
|
@@ -2446,7 +2456,7 @@ var yt = [
|
|
|
2446
2456
|
retrieveChunks: "Retrieve Chunks",
|
|
2447
2457
|
retrieveRecords: "Retrieve Records",
|
|
2448
2458
|
upsertRecords: "Upsert Records"
|
|
2449
|
-
},
|
|
2459
|
+
}, Ct = [
|
|
2450
2460
|
{
|
|
2451
2461
|
id: "bidirectional",
|
|
2452
2462
|
label: {
|
|
@@ -2475,13 +2485,13 @@ var yt = [
|
|
|
2475
2485
|
es: "Desconocido"
|
|
2476
2486
|
}
|
|
2477
2487
|
}
|
|
2478
|
-
],
|
|
2488
|
+
], wt = /* @__PURE__ */ new Set([
|
|
2479
2489
|
"createObject",
|
|
2480
2490
|
"dropObject",
|
|
2481
2491
|
"loadObjectRecords",
|
|
2482
2492
|
"removeRecords",
|
|
2483
2493
|
"upsertRecords"
|
|
2484
|
-
]),
|
|
2494
|
+
]), Tt = /* @__PURE__ */ new Set([
|
|
2485
2495
|
"auditObjectContent",
|
|
2486
2496
|
"findObject",
|
|
2487
2497
|
"getInfo",
|
|
@@ -2493,13 +2503,13 @@ var yt = [
|
|
|
2493
2503
|
"retrieveChunks",
|
|
2494
2504
|
"retrieveRecords"
|
|
2495
2505
|
]);
|
|
2496
|
-
function
|
|
2506
|
+
function Et(e) {
|
|
2497
2507
|
let t = !1, n = !1;
|
|
2498
|
-
for (let r of e)
|
|
2508
|
+
for (let r of e) Tt.has(r) && (t = !0), wt.has(r) && (n = !0);
|
|
2499
2509
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2500
2510
|
}
|
|
2501
|
-
var
|
|
2502
|
-
let i =
|
|
2511
|
+
var Dt = (e, t = "en") => {
|
|
2512
|
+
let i = bt.find((t) => t.id === e);
|
|
2503
2513
|
return i ? {
|
|
2504
2514
|
label: r(n(i.label), t) ?? i.id,
|
|
2505
2515
|
description: ""
|
|
@@ -2507,8 +2517,8 @@ var Et = (e, t = "en") => {
|
|
|
2507
2517
|
label: e,
|
|
2508
2518
|
description: ""
|
|
2509
2519
|
};
|
|
2510
|
-
},
|
|
2511
|
-
let i =
|
|
2520
|
+
}, Ot = (e, t = "en") => {
|
|
2521
|
+
let i = xt.find((t) => t.id === e);
|
|
2512
2522
|
return i ? {
|
|
2513
2523
|
label: r(n(i.label), t) ?? i.id,
|
|
2514
2524
|
description: ""
|
|
@@ -2516,8 +2526,8 @@ var Et = (e, t = "en") => {
|
|
|
2516
2526
|
label: e,
|
|
2517
2527
|
description: ""
|
|
2518
2528
|
};
|
|
2519
|
-
},
|
|
2520
|
-
let i =
|
|
2529
|
+
}, kt = (e, t = "en") => {
|
|
2530
|
+
let i = Ct.find((t) => t.id === e);
|
|
2521
2531
|
return i ? {
|
|
2522
2532
|
label: r(n(i.label), t) ?? i.id,
|
|
2523
2533
|
description: ""
|
|
@@ -2526,30 +2536,30 @@ var Et = (e, t = "en") => {
|
|
|
2526
2536
|
description: ""
|
|
2527
2537
|
};
|
|
2528
2538
|
};
|
|
2529
|
-
function
|
|
2539
|
+
function At(e) {
|
|
2530
2540
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2531
2541
|
n += "|:----|:-------:|\n";
|
|
2532
|
-
for (let e of Object.keys(
|
|
2542
|
+
for (let e of Object.keys(St)) n += `| ${St[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2533
2543
|
return n;
|
|
2534
2544
|
}
|
|
2535
2545
|
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2536
|
-
var
|
|
2546
|
+
var jt = O(["list"]), Mt = /* @__PURE__ */ C({
|
|
2537
2547
|
...A,
|
|
2538
2548
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2539
|
-
actionNames: /* @__PURE__ */ h(
|
|
2549
|
+
actionNames: /* @__PURE__ */ h(jt),
|
|
2540
2550
|
recipes: /* @__PURE__ */ h(ce)
|
|
2541
|
-
}),
|
|
2551
|
+
}), Nt = O([
|
|
2542
2552
|
"list",
|
|
2543
2553
|
"render",
|
|
2544
2554
|
"setColorMode"
|
|
2545
|
-
]),
|
|
2555
|
+
]), Pt = /* @__PURE__ */ C({
|
|
2546
2556
|
...A,
|
|
2547
2557
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2548
|
-
actionNames: /* @__PURE__ */ h(
|
|
2558
|
+
actionNames: /* @__PURE__ */ h(Nt),
|
|
2549
2559
|
presentations: /* @__PURE__ */ h(ce)
|
|
2550
|
-
}),
|
|
2551
|
-
async function
|
|
2552
|
-
let i = e.id, a = `${
|
|
2560
|
+
}), Ft = "https://engine-eu.dpuse.app/presenters";
|
|
2561
|
+
async function It(e, t, n, r) {
|
|
2562
|
+
let i = e.id, a = `${Ft}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2553
2563
|
try {
|
|
2554
2564
|
return new (await (import(
|
|
2555
2565
|
/* @vite-ignore */
|
|
@@ -2561,11 +2571,11 @@ async function Ft(e, t, n, r) {
|
|
|
2561
2571
|
url: a,
|
|
2562
2572
|
version: e.version
|
|
2563
2573
|
};
|
|
2564
|
-
throw new
|
|
2574
|
+
throw new L(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
|
|
2565
2575
|
}
|
|
2566
2576
|
}
|
|
2567
2577
|
// src/locale/index.ts
|
|
2568
|
-
function
|
|
2578
|
+
function Lt(e, t) {
|
|
2569
2579
|
return {
|
|
2570
2580
|
...e,
|
|
2571
2581
|
label: e.label[t] ?? e.id,
|
|
@@ -2573,7 +2583,7 @@ function It(e, t) {
|
|
|
2573
2583
|
verb: e.verb?.[t] ?? void 0
|
|
2574
2584
|
};
|
|
2575
2585
|
}
|
|
2576
|
-
function
|
|
2586
|
+
function Rt(e, t, n = !1) {
|
|
2577
2587
|
let r = e.map((e) => ({
|
|
2578
2588
|
...e,
|
|
2579
2589
|
label: e.label[t] ?? e.id,
|
|
@@ -2582,7 +2592,7 @@ function Lt(e, t, n = !1) {
|
|
|
2582
2592
|
}));
|
|
2583
2593
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2584
2594
|
}
|
|
2585
|
-
function
|
|
2595
|
+
function zt(e, t) {
|
|
2586
2596
|
return {
|
|
2587
2597
|
...e,
|
|
2588
2598
|
label: e.label[t] ?? e.id,
|
|
@@ -2590,7 +2600,7 @@ function Rt(e, t) {
|
|
|
2590
2600
|
};
|
|
2591
2601
|
}
|
|
2592
2602
|
// src/utilities/index.ts
|
|
2593
|
-
var
|
|
2603
|
+
var Bt = /* @__PURE__ */ new Map([
|
|
2594
2604
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2595
2605
|
["avro", "application/vnd.apache.avro"],
|
|
2596
2606
|
["bin", "application/octet-stream"],
|
|
@@ -2617,14 +2627,14 @@ var zt = /* @__PURE__ */ new Map([
|
|
|
2617
2627
|
["minute", 6e4],
|
|
2618
2628
|
["second", 1e3],
|
|
2619
2629
|
["millisecond", 1]
|
|
2620
|
-
],
|
|
2630
|
+
], Vt = [
|
|
2621
2631
|
["byte", 1],
|
|
2622
2632
|
["kilobyte", 1024],
|
|
2623
2633
|
["megabyte", 1048576],
|
|
2624
2634
|
["gigabyte", 1073741824],
|
|
2625
2635
|
["terabyte", 1099511627776]
|
|
2626
|
-
],
|
|
2627
|
-
function
|
|
2636
|
+
], Q = /* @__PURE__ */ new Map(), Ht = /* @__PURE__ */ new Map();
|
|
2637
|
+
function Ut(e, t = 2, n = t, r = X) {
|
|
2628
2638
|
return e == null ? "" : $(r, {
|
|
2629
2639
|
localeMatcher: "best fit",
|
|
2630
2640
|
maximumFractionDigits: t,
|
|
@@ -2634,18 +2644,18 @@ function Ht(e, t = 2, n = t, r = X) {
|
|
|
2634
2644
|
useGrouping: !0
|
|
2635
2645
|
}).format(e);
|
|
2636
2646
|
}
|
|
2637
|
-
function
|
|
2638
|
-
return
|
|
2647
|
+
function Wt(e, t = X) {
|
|
2648
|
+
return Ut(e, 0, 0, t);
|
|
2639
2649
|
}
|
|
2640
|
-
function
|
|
2650
|
+
function Gt(e, t = 1, n = X) {
|
|
2641
2651
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2642
2652
|
maximumFractionDigits: t,
|
|
2643
2653
|
notation: "compact"
|
|
2644
2654
|
}).format(e);
|
|
2645
2655
|
}
|
|
2646
|
-
function
|
|
2656
|
+
function Kt(e, t = 1, n = X) {
|
|
2647
2657
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2648
|
-
let [r, i] =
|
|
2658
|
+
let [r, i] = Vt.find(([, n]) => tn(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
|
|
2649
2659
|
return $(n, {
|
|
2650
2660
|
maximumFractionDigits: i === 1 ? 0 : t,
|
|
2651
2661
|
style: "unit",
|
|
@@ -2653,7 +2663,7 @@ function Gt(e, t = 1, n = X) {
|
|
|
2653
2663
|
unitDisplay: i === 1 ? "long" : "short"
|
|
2654
2664
|
}).format(e / i);
|
|
2655
2665
|
}
|
|
2656
|
-
function
|
|
2666
|
+
function qt(e, t = "millisecond", n = X) {
|
|
2657
2667
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2658
2668
|
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 = [];
|
|
2659
2669
|
for (let [t, i] of s) {
|
|
@@ -2667,25 +2677,25 @@ function Kt(e, t = "millisecond", n = X) {
|
|
|
2667
2677
|
unitDisplay: "short"
|
|
2668
2678
|
}).format(o));
|
|
2669
2679
|
}
|
|
2670
|
-
return
|
|
2680
|
+
return en(n).format(c);
|
|
2671
2681
|
}
|
|
2672
|
-
function
|
|
2682
|
+
function Jt(e) {
|
|
2673
2683
|
if (!e) return;
|
|
2674
|
-
let t =
|
|
2684
|
+
let t = $t(e);
|
|
2675
2685
|
return t === void 0 ? e : e.slice(0, t);
|
|
2676
2686
|
}
|
|
2677
|
-
function
|
|
2687
|
+
function Yt(e) {
|
|
2678
2688
|
if (!e) return;
|
|
2679
|
-
let t =
|
|
2689
|
+
let t = $t(e);
|
|
2680
2690
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2681
2691
|
}
|
|
2682
|
-
function Yt(e) {
|
|
2683
|
-
return e != null && zt.has(e.toLowerCase());
|
|
2684
|
-
}
|
|
2685
2692
|
function Xt(e) {
|
|
2686
|
-
return
|
|
2693
|
+
return e != null && Bt.has(e.toLowerCase());
|
|
2687
2694
|
}
|
|
2688
2695
|
function Zt(e) {
|
|
2696
|
+
return (e == null ? void 0 : Bt.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2697
|
+
}
|
|
2698
|
+
function Qt(e) {
|
|
2689
2699
|
switch (e) {
|
|
2690
2700
|
case "Edm.Boolean": return "boolean";
|
|
2691
2701
|
case "Edm.Byte":
|
|
@@ -2706,23 +2716,23 @@ function Zt(e) {
|
|
|
2706
2716
|
default: return "unknown";
|
|
2707
2717
|
}
|
|
2708
2718
|
}
|
|
2709
|
-
function
|
|
2719
|
+
function $t(e) {
|
|
2710
2720
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2711
2721
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2712
2722
|
}
|
|
2713
|
-
function
|
|
2714
|
-
let t =
|
|
2723
|
+
function en(e) {
|
|
2724
|
+
let t = Q.get(e);
|
|
2715
2725
|
return t || (t = new Intl.ListFormat(e, {
|
|
2716
2726
|
style: "narrow",
|
|
2717
2727
|
type: "unit"
|
|
2718
|
-
}),
|
|
2728
|
+
}), Q.set(e, t)), t;
|
|
2719
2729
|
}
|
|
2720
2730
|
function $(e, t) {
|
|
2721
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2722
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
2731
|
+
let n = `${e}|${JSON.stringify(t)}`, r = Ht.get(n);
|
|
2732
|
+
return r || (r = new Intl.NumberFormat(e, t), Ht.set(n, r)), r;
|
|
2723
2733
|
}
|
|
2724
|
-
function
|
|
2734
|
+
function tn(e, t) {
|
|
2725
2735
|
let n = 10 ** t;
|
|
2726
2736
|
return Math.round(e * n) / n;
|
|
2727
2737
|
}
|
|
2728
|
-
export {
|
|
2738
|
+
export { Ne as APIError, L as AppError, Fe as ConnectorError, pe as DATA_FORMAT_CONFIGS, me as DATA_TYPE_CONFIGS, he as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID, j as ENCODING_GROUP_CONFIG_MAP, M as ENCODING_TYPE_CONFIG_MAP, Pe as EngineError, R as FetchError, t as SUPPORTED_LANGUAGES, U as TOOL_NAME_PREFIX, k as VALUE_DELIMITER_CONFIGS, ct as auditObjectContentWithParser, Ie as buildFetchError, ot as buildPreviewObjectResult, ue as componentInstanceConfigSchema, Le as concatenateSerialisedErrorMessages, we as connectorConfigSchema, Dt as constructConnectorCategoryConfig, Ot as constructConnectorItemTypeConfig, kt as constructConnectorUsageConfig, Qt as convertODataTypeIdToUsageTypeId, Mt as cookbookConfigSchema, n as createLabelMap, Et as determineConnectorUsageId, Yt as extractExtensionFromPath, Jt as extractPathWithoutExtension, Ut as formatNumberAsDecimalNumber, qt as formatNumberAsDuration, Gt as formatNumberAsSize, Kt as formatNumberAsStorageSize, Wt as formatNumberAsWholeNumber, fe as getComponentStatus, At as getConnectorActionsTable, De as getEncodingTypeConfigs, ge as getValueDelimiterCharacter, Xt as hasMimeTypeForExtension, Re as ignoreErrors, N as isEncodingTypeId, W as listParserToolConfigs, It as loadPresenter, nt as loadTool, Lt as localiseConfig, Rt as localiseConfigs, zt as localiseReference, Zt as lookupMimeTypeForExtension, z as normalizeToError, Ye as parseDelimitedText, Pt as presenterConfigSchema, vt as readTableSchema, P as resolveDecoderId, r as resolveLabel, G as resolveParserToolConfig, st as retrieveRecordsWithParser, ze as serialiseError, Je as toolConfigSchema, Be as unserialiseError };
|