@dpuse/dpuse-shared 1.0.149 → 1.0.151

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.
@@ -90,19 +90,19 @@ function f(e, t) {
90
90
  };
91
91
  }
92
92
  /* @__NO_SIDE_EFFECTS__ */
93
- function ee(e, t, n) {
93
+ function p(e, t, n) {
94
94
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
95
95
  }
96
96
  /* @__NO_SIDE_EFFECTS__ */
97
- function p(e, t, n) {
97
+ function m(e, t, n) {
98
98
  return typeof e.default == "function" ? e.default(t, n) : e.default;
99
99
  }
100
100
  /* @__NO_SIDE_EFFECTS__ */
101
- function m(e, t) {
101
+ function h(e, t) {
102
102
  return d({
103
103
  kind: "schema",
104
104
  type: "array",
105
- reference: m,
105
+ reference: h,
106
106
  expects: "Array",
107
107
  async: !1,
108
108
  item: e,
@@ -135,11 +135,11 @@ function m(e, t) {
135
135
  });
136
136
  }
137
137
  /* @__NO_SIDE_EFFECTS__ */
138
- function h(e) {
138
+ function ee(e) {
139
139
  return d({
140
140
  kind: "schema",
141
141
  type: "boolean",
142
- reference: h,
142
+ reference: ee,
143
143
  expects: "boolean",
144
144
  async: !1,
145
145
  message: e,
@@ -174,7 +174,7 @@ function _(e, t) {
174
174
  wrapped: e,
175
175
  default: t,
176
176
  "~run"(e, t) {
177
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ p(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
177
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ m(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
178
178
  }
179
179
  });
180
180
  }
@@ -203,7 +203,7 @@ function y(e, t) {
203
203
  wrapped: e,
204
204
  default: t,
205
205
  "~run"(e, t) {
206
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ p(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
206
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ m(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
207
207
  }
208
208
  });
209
209
  }
@@ -277,7 +277,7 @@ function x(e, t) {
277
277
  for (let r in this.entries) {
278
278
  let i = this.entries[r];
279
279
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
280
- let a = r in n ? n[r] : /* @__PURE__ */ p(i), o = i["~run"]({ value: a }, t);
280
+ let a = r in n ? n[r] : /* @__PURE__ */ m(i), o = i["~run"]({ value: a }, t);
281
281
  if (o.issues) {
282
282
  let i = {
283
283
  type: "object",
@@ -293,7 +293,7 @@ function x(e, t) {
293
293
  }
294
294
  }
295
295
  o.typed || (e.typed = !1), e.value[r] = o.value;
296
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ee(i);
296
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ p(i);
297
297
  else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (s(this, "key", e, t, {
298
298
  input: void 0,
299
299
  expected: `"${r}"`,
@@ -342,18 +342,18 @@ function S(e) {
342
342
  });
343
343
  }
344
344
  /* @__NO_SIDE_EFFECTS__ */
345
- function C(e) {
345
+ function te(e) {
346
346
  let t;
347
347
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
348
348
  else t = n.issues;
349
349
  return t;
350
350
  }
351
351
  /* @__NO_SIDE_EFFECTS__ */
352
- function w(e, t) {
352
+ function C(e, t) {
353
353
  return d({
354
354
  kind: "schema",
355
355
  type: "union",
356
- reference: w,
356
+ reference: C,
357
357
  expects: /* @__PURE__ */ u(e.map((e) => e.expects), "|"),
358
358
  async: !1,
359
359
  options: e,
@@ -373,15 +373,15 @@ function w(e, t) {
373
373
  if (n) return n;
374
374
  if (r) {
375
375
  if (r.length === 1) return r[0];
376
- s(this, "type", e, t, { issues: /* @__PURE__ */ C(r) }), e.typed = !0;
376
+ s(this, "type", e, t, { issues: /* @__PURE__ */ te(r) }), e.typed = !0;
377
377
  } else if (i?.length === 1) return i[0];
378
- else s(this, "type", e, t, { issues: /* @__PURE__ */ C(i) });
378
+ else s(this, "type", e, t, { issues: /* @__PURE__ */ te(i) });
379
379
  return e;
380
380
  }
381
381
  });
382
382
  }
383
383
  /* @__NO_SIDE_EFFECTS__ */
384
- function te(...e) {
384
+ function ne(...e) {
385
385
  return d({
386
386
  ...e[0],
387
387
  pipe: e,
@@ -399,10 +399,10 @@ function te(...e) {
399
399
  }
400
400
  //#endregion
401
401
  //#region src/locale/locale.schema.ts
402
- var T = /* @__PURE__ */ x({
402
+ var w = /* @__PURE__ */ x({
403
403
  en: /* @__PURE__ */ S(),
404
404
  es: /* @__PURE__ */ S()
405
- }), ne = {
405
+ }), re = {
406
406
  id: /* @__PURE__ */ S(),
407
407
  label: /* @__PURE__ */ x({
408
408
  en: /* @__PURE__ */ y(/* @__PURE__ */ S()),
@@ -414,7 +414,7 @@ var T = /* @__PURE__ */ x({
414
414
  }),
415
415
  icon: /* @__PURE__ */ _(/* @__PURE__ */ S()),
416
416
  iconDark: /* @__PURE__ */ _(/* @__PURE__ */ S())
417
- }, E = (e) => /* @__PURE__ */ w(e.map((e) => /* @__PURE__ */ g(e))), re = E([
417
+ }, T = (e) => /* @__PURE__ */ C(e.map((e) => /* @__PURE__ */ g(e))), ie = T([
418
418
  "app",
419
419
  "connector",
420
420
  "connectorConnection",
@@ -436,32 +436,32 @@ var T = /* @__PURE__ */ x({
436
436
  "presenter",
437
437
  "presenterPresentation",
438
438
  "tool"
439
- ]), ie = E([
439
+ ]), ae = T([
440
440
  "danger",
441
441
  "success",
442
442
  "warning"
443
- ]), ae = E([
443
+ ]), oe = T([
444
444
  "alpha",
445
445
  "beta",
446
446
  "releaseCandidate",
447
447
  "generalAvailability"
448
- ]), oe = /* @__PURE__ */ x({
449
- color: ie,
448
+ ]), se = /* @__PURE__ */ x({
449
+ color: ae,
450
450
  label: /* @__PURE__ */ S()
451
- }), D = {
452
- ...ne,
453
- typeId: re
454
- }, O = /* @__PURE__ */ x({
455
- ...D,
451
+ }), ce = {
452
+ ...re,
453
+ typeId: ie
454
+ }, le = /* @__PURE__ */ x({
455
+ ...ce,
456
456
  order: /* @__PURE__ */ v(),
457
457
  path: /* @__PURE__ */ S()
458
- }), k = {
459
- ...D,
458
+ }), E = {
459
+ ...ce,
460
460
  firstCreatedAt: /* @__PURE__ */ _(/* @__PURE__ */ v()),
461
461
  lastUpdatedAt: /* @__PURE__ */ _(/* @__PURE__ */ v()),
462
- status: /* @__PURE__ */ _(oe),
463
- statusId: /* @__PURE__ */ _(ae)
464
- }, se = /* @__PURE__ */ x({ ...k }), ce = [
462
+ status: /* @__PURE__ */ _(se),
463
+ statusId: /* @__PURE__ */ _(oe)
464
+ }, ue = /* @__PURE__ */ x({ ...E }), de = [
465
465
  {
466
466
  id: "alpha",
467
467
  color: "danger",
@@ -495,8 +495,8 @@ var T = /* @__PURE__ */ x({
495
495
  }
496
496
  }
497
497
  ];
498
- function le(e, t = "en") {
499
- let n = ce.find((t) => t.id === e);
498
+ function fe(e, t = "en") {
499
+ let n = de.find((t) => t.id === e);
500
500
  if (n) {
501
501
  let e = n.labels[t] ?? n.labels.en ?? n.id;
502
502
  return {
@@ -511,7 +511,7 @@ function le(e, t = "en") {
511
511
  }
512
512
  //#endregion
513
513
  //#region src/component/dataView/dataFormatIcons.ts
514
- var ue = {
514
+ var pe = {
515
515
  arrow: {
516
516
  icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1350 1181.25\"><polygon fill=\"#000\" points=\"168.75,168.75 590.62,590.62 168.75,1012.5 168.75,843.75 421.88,590.62 168.75,337.5\"/><polygon fill=\"#000\" points=\"464.06,168.75 885.94,590.62 464.06,1012.5 464.06,843.75 717.19,590.62 464.06,337.5\"/><polygon fill=\"#000\" points=\"759.38,168.75 1181.25,590.62 759.38,1012.5 759.38,843.75 1012.5,590.62 759.38,337.5\"/></svg>",
517
517
  iconDark: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1350 1181.25\"><polygon fill=\"#fff\" points=\"168.75,168.75 590.62,590.62 168.75,1012.5 168.75,843.75 421.88,590.62 168.75,337.5\"/><polygon fill=\"#fff\" points=\"464.06,168.75 885.94,590.62 464.06,1012.5 464.06,843.75 717.19,590.62 464.06,337.5\"/><polygon fill=\"#fff\" points=\"759.38,168.75 1181.25,590.62 759.38,1012.5 759.38,843.75 1012.5,590.62 759.38,337.5\"/></svg>"
@@ -564,7 +564,7 @@ var ue = {
564
564
  //#endregion
565
565
  //#region src/component/dataView/index.ts
566
566
  n({ en: "Arrow" }), n({ en: "Avro" }), n({ en: "Delimited text (CSV, TSV…)" }), n({ en: "JSON" }), n({ en: "JSON Lines (JSONL)" }), n({ en: "Markdown (MD)" }), n({ en: "OpenDocument spreadsheet (ODS)" }), n({ en: "Parquet" }), n({ en: "SPSS (SAV)" }), n({ en: "SQLite" }), n({ en: "Excel (XLSX, XLSM)" }), n({ en: "XML" });
567
- var de = [
567
+ var D = [
568
568
  ",",
569
569
  ";",
570
570
  " ",
@@ -576,7 +576,7 @@ var de = [
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" }), E([
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" }), T([
580
580
  "app",
581
581
  "engine",
582
582
  "connector",
@@ -586,17 +586,17 @@ n({ en: "Newline" }), n({ en: "Carriage Return" }), n({ en: "Carriage Return/New
586
586
  ]);
587
587
  //#endregion
588
588
  //#region src/component/module/moduleConfig.schema.ts
589
- var A = {
590
- ...k,
589
+ var O = {
590
+ ...E,
591
591
  vendorAccountURL: /* @__PURE__ */ _(/* @__PURE__ */ S()),
592
592
  vendorDocumentationURL: /* @__PURE__ */ _(/* @__PURE__ */ S()),
593
593
  vendorHomeURL: /* @__PURE__ */ _(/* @__PURE__ */ S()),
594
594
  version: /* @__PURE__ */ S()
595
595
  };
596
- ({ ...A });
596
+ ({ ...O });
597
597
  //#endregion
598
598
  //#region src/component/module/connector/connectorConfig.schema.ts
599
- var fe = E([
599
+ var me = T([
600
600
  "abortOperation",
601
601
  "auditObjectContent",
602
602
  "createObject",
@@ -612,44 +612,425 @@ var fe = E([
612
612
  "retrieveChunks",
613
613
  "retrieveRecords",
614
614
  "upsertRecords"
615
- ]), pe = E([
615
+ ]), he = T([
616
616
  "application",
617
617
  "curatedDataset",
618
618
  "database",
619
619
  "fileStore"
620
- ]), me = /* @__PURE__ */ x({ label: T }), he = E([
620
+ ]), ge = /* @__PURE__ */ x({ label: w }), _e = T([
621
621
  "apiEndpoint",
622
622
  "file",
623
623
  "table"
624
- ]), ge = E([
624
+ ]), ve = T([
625
625
  "bidirectional",
626
626
  "destination",
627
627
  "source",
628
628
  "unknown"
629
- ]), _e = /* @__PURE__ */ x({ label: T }), ve = /* @__PURE__ */ x({
630
- authMethodId: E([
629
+ ]), ye = /* @__PURE__ */ x({ label: w }), be = /* @__PURE__ */ x({
630
+ authMethodId: T([
631
631
  "apiKey",
632
632
  "disabled",
633
633
  "oAuth2",
634
634
  "none"
635
635
  ]),
636
636
  activeConnectionCount: /* @__PURE__ */ y(/* @__PURE__ */ v()),
637
- canDescribe: /* @__PURE__ */ y(/* @__PURE__ */ h()),
637
+ canDescribe: /* @__PURE__ */ y(/* @__PURE__ */ ee()),
638
638
  id: /* @__PURE__ */ y(/* @__PURE__ */ S()),
639
- label: /* @__PURE__ */ y(T),
639
+ label: /* @__PURE__ */ y(w),
640
640
  maxConnectionCount: /* @__PURE__ */ _(/* @__PURE__ */ v()),
641
- params: /* @__PURE__ */ y(/* @__PURE__ */ m(/* @__PURE__ */ b(/* @__PURE__ */ S(), /* @__PURE__ */ S())))
642
- }), ye = /* @__PURE__ */ x({
643
- ...A,
641
+ params: /* @__PURE__ */ y(/* @__PURE__ */ h(/* @__PURE__ */ b(/* @__PURE__ */ S(), /* @__PURE__ */ S())))
642
+ }), xe = /* @__PURE__ */ x({
643
+ ...O,
644
644
  typeId: /* @__PURE__ */ g("connector"),
645
- actionNames: /* @__PURE__ */ m(fe),
646
- category: /* @__PURE__ */ _(me),
647
- categoryId: pe,
648
- implementations: /* @__PURE__ */ b(/* @__PURE__ */ S(), ve),
649
- itemTypeId: he,
650
- usage: /* @__PURE__ */ _(_e),
651
- usageId: /* @__PURE__ */ _(ge)
652
- }), be = [
645
+ actionNames: /* @__PURE__ */ h(me),
646
+ category: /* @__PURE__ */ _(ge),
647
+ categoryId: he,
648
+ implementations: /* @__PURE__ */ b(/* @__PURE__ */ S(), be),
649
+ itemTypeId: _e,
650
+ usage: /* @__PURE__ */ _(ye),
651
+ usageId: /* @__PURE__ */ _(ve)
652
+ }), k = 2048, A = "[REDACTED]", Se = 10, j = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Ce = [
653
+ [/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${A}`],
654
+ [/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => j.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${A}` : e],
655
+ [/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => A],
656
+ [/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => A],
657
+ [/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => A]
658
+ ], M = class extends Error {
659
+ data;
660
+ locator;
661
+ constructor(e, t, n, r) {
662
+ super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
663
+ }
664
+ }, N = class extends M {
665
+ constructor(e, t, n, r) {
666
+ super(e, t, n, r), this.name = "AppError";
667
+ }
668
+ }, P = class extends M {
669
+ constructor(e, t, n, r) {
670
+ super(e, t, n, r), this.name = "APIError";
671
+ }
672
+ }, F = class extends M {
673
+ constructor(e, t, n, r) {
674
+ super(e, t, n, r), this.name = "EngineError";
675
+ }
676
+ }, I = class extends M {
677
+ constructor(e, t, n, r) {
678
+ super(e, t, n, r), this.name = "ConnectorError";
679
+ }
680
+ }, L = class extends M {
681
+ constructor(e, t, n, r) {
682
+ super(e, t, n, r), this.name = "FetchError";
683
+ }
684
+ };
685
+ async function we(e, t, n) {
686
+ let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
687
+ try {
688
+ a = await e.text();
689
+ } catch (e) {
690
+ a = `<body unavailable: ${R(e).message}>`;
691
+ }
692
+ return new L(i, n, { body: Me(a) });
693
+ }
694
+ function Te(e) {
695
+ return e.map((e) => e.message).join(" ");
696
+ }
697
+ function Ee(e) {
698
+ try {
699
+ e();
700
+ } catch {}
701
+ }
702
+ function R(e) {
703
+ if (e instanceof Error) return e;
704
+ if (typeof e == "string") return Error(e);
705
+ if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
706
+ if (typeof e == "symbol") return Error(e.description ?? "Unknown error");
707
+ if (typeof e == "object") try {
708
+ return Error(JSON.stringify(e));
709
+ } catch {
710
+ return /* @__PURE__ */ Error("Unknown error");
711
+ }
712
+ return /* @__PURE__ */ Error("Unknown error");
713
+ }
714
+ function De(e) {
715
+ let t = /* @__PURE__ */ new Set(), n = [], r = R(e);
716
+ for (; r != null && !t.has(r);) {
717
+ t.add(r);
718
+ let [e, i] = Ne(r), a = je(e);
719
+ /(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
720
+ }
721
+ return n;
722
+ }
723
+ function Oe(e) {
724
+ let t;
725
+ for (let n of e.toReversed()) {
726
+ let e = Ae(n, t);
727
+ n.stack !== void 0 && (e.stack = n.stack), t = e;
728
+ }
729
+ return t ?? /* @__PURE__ */ Error("No error to unserialise.");
730
+ }
731
+ function ke(e) {
732
+ let t;
733
+ try {
734
+ t = JSON.stringify(e);
735
+ } catch {
736
+ t = typeof e == "symbol" ? e.description ?? "Unknown error" : typeof e == "bigint" ? e.toString() : "Unknown error";
737
+ }
738
+ return t === "" && (t = "Unknown error"), t;
739
+ }
740
+ function Ae(e, t) {
741
+ switch (e.name) {
742
+ case "APIError": return new P(e.message, e.locator, e.data, { cause: t });
743
+ case "AppError": return new N(e.message, e.locator, e.data, { cause: t });
744
+ case "ConnectorError": return new I(e.message, e.locator, e.data, { cause: t });
745
+ case "EngineError": return new F(e.message, e.locator, e.data, { cause: t });
746
+ case "FetchError": return new L(e.message, e.locator, e.data, { cause: t });
747
+ default: {
748
+ let n = e.name;
749
+ return new class extends Error {
750
+ name = n;
751
+ }(e.message, { cause: t });
752
+ }
753
+ }
754
+ }
755
+ function je(e) {
756
+ let { data: t, message: n, stack: r } = e;
757
+ return {
758
+ ...e,
759
+ data: t === void 0 ? void 0 : B(t, /* @__PURE__ */ new WeakSet(), 0),
760
+ message: z(n),
761
+ stack: r === void 0 ? void 0 : z(r)
762
+ };
763
+ }
764
+ function z(e) {
765
+ let t = e;
766
+ for (let [e, n] of Ce) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
767
+ return t;
768
+ }
769
+ function B(e, t, n) {
770
+ return typeof e == "string" ? z(e) : typeof e != "object" || !e ? e : n >= Se ? A : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => B(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && j.test(e) ? A : B(r, t, n + 1)])));
771
+ }
772
+ function Me(e) {
773
+ if (e != null && e !== "") return e.length > k ? `${e.slice(0, k)}... [truncated]` : e;
774
+ }
775
+ function Ne(e) {
776
+ let t = e.cause == null ? null : R(e.cause);
777
+ if (e instanceof M) return [{
778
+ data: e.data,
779
+ locator: e.locator,
780
+ message: e.message,
781
+ name: e.name,
782
+ stack: e.stack
783
+ }, t];
784
+ let n = Object.fromEntries(Object.entries(e).filter(([e]) => e !== "cause"));
785
+ return e.name ? [{
786
+ data: n,
787
+ locator: "",
788
+ message: e.message,
789
+ name: e.name,
790
+ stack: e.stack
791
+ }, t] : [{
792
+ data: n,
793
+ locator: "",
794
+ message: ke(e),
795
+ name: "Error",
796
+ stack: void 0
797
+ }, null];
798
+ }
799
+ var Pe = /* @__PURE__ */ x({ dataFormatIds: /* @__PURE__ */ ne(/* @__PURE__ */ h(T([
800
+ "arrow",
801
+ "avro",
802
+ "dtv",
803
+ "json",
804
+ "jsonl",
805
+ "markdown",
806
+ "ods",
807
+ "parquet",
808
+ "sav",
809
+ "sqlite",
810
+ "xlsx",
811
+ "xml"
812
+ ])), /* @__PURE__ */ f(1)) }), Fe = /* @__PURE__ */ h(/* @__PURE__ */ S()), Ie = /* @__PURE__ */ x({
813
+ ...O,
814
+ typeId: /* @__PURE__ */ g("tool"),
815
+ actionNames: /* @__PURE__ */ y(Fe),
816
+ parser: /* @__PURE__ */ y(Pe)
817
+ });
818
+ //#endregion
819
+ //#region src/component/module/tool/delimitedText.ts
820
+ async function Le(e, t, n) {
821
+ let r = Re(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await ze(e, t.valueDelimiterIds, t.isComplete, n);
822
+ return {
823
+ issues: i,
824
+ parsedRecords: a,
825
+ recordDelimiterId: r,
826
+ valueDelimiterId: o
827
+ };
828
+ }
829
+ function Re(e) {
830
+ let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
831
+ return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
832
+ }
833
+ async function ze(e, t, n, r) {
834
+ let i, a, o, s = [], c, l = !1;
835
+ for (let u of t) {
836
+ let { issues: t, records: d } = await r(e, u, n);
837
+ if (t.length > 0) {
838
+ c = Be(c, {
839
+ delimiter: u,
840
+ issues: t,
841
+ records: d
842
+ });
843
+ continue;
844
+ }
845
+ if (l = !0, d.length === 0) continue;
846
+ let { averageValueCount: f, sumOfValueCountDiffs: p } = Ve(d);
847
+ (!o || p <= o) && (!a || f > a) && (i = u, a = f, o = p, s = d);
848
+ }
849
+ if (!l && c != null) {
850
+ let { delimiter: e, issues: t, records: n } = c;
851
+ return {
852
+ issues: t,
853
+ parsedRecords: n,
854
+ valueDelimiterId: V(n) ? e : void 0
855
+ };
856
+ }
857
+ return {
858
+ issues: [],
859
+ parsedRecords: s,
860
+ valueDelimiterId: i != null && V(s) ? i : void 0
861
+ };
862
+ }
863
+ function Be(e, t) {
864
+ return e == null || t.issues.length < e.issues.length ? t : e;
865
+ }
866
+ function Ve(e) {
867
+ let t = 0, n = 0, r;
868
+ for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
869
+ return {
870
+ averageValueCount: t / e.length,
871
+ sumOfValueCountDiffs: n
872
+ };
873
+ }
874
+ function V(e) {
875
+ let t = /* @__PURE__ */ new Map();
876
+ for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
877
+ let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
878
+ return n > 1 && r * 2 > e.length;
879
+ }
880
+ //#endregion
881
+ //#region src/component/module/tool/index.ts
882
+ var He = "https://engine-eu.dpuse.app/tools", H = "dpuse-tool-";
883
+ function U(e, t) {
884
+ return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
885
+ }
886
+ function W(e, t, n) {
887
+ let r = U(e, t), [i] = r;
888
+ if (i === void 0) {
889
+ let n = {
890
+ availableToolIds: e.map((e) => e.id),
891
+ dataFormatId: t
892
+ };
893
+ throw new N(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
894
+ }
895
+ return r.find((e) => e.id === n) ?? i;
896
+ }
897
+ async function G(e, t) {
898
+ let n = `${H}${t}`, r = e.find((e) => e.id === n);
899
+ if (!r) {
900
+ let r = {
901
+ availableToolIds: e.map((e) => e.id),
902
+ toolName: n
903
+ };
904
+ throw new N(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
905
+ }
906
+ let i = `${He}/${t}_v${r.version}/${n}.es.js`;
907
+ try {
908
+ return new (await (import(
909
+ /* @vite-ignore */
910
+ i
911
+ ))).Tool();
912
+ } catch (e) {
913
+ let t = {
914
+ toolName: n,
915
+ url: i,
916
+ version: r.version
917
+ };
918
+ throw new N(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", t, { cause: e });
919
+ }
920
+ }
921
+ //#endregion
922
+ //#region src/component/module/connector/objectParsing.ts
923
+ var Ue = "\n", K = ",";
924
+ async function We(e) {
925
+ let { asAt: t, filePreview: n, inferDataTypes: r, parserId: i, startedAt: a, toolConfigs: o } = e, { dataFormatId: s, text: c } = n, l = n.bytes.length;
926
+ if (l === 0) return {
927
+ asAt: t,
928
+ columnConfigs: [],
929
+ dataFormatId: "dtv",
930
+ duration: performance.now() - a,
931
+ encodingId: void 0,
932
+ encodingConfidenceLevel: void 0,
933
+ fileType: void 0,
934
+ hasHeaders: !1,
935
+ recordDelimiterId: Ue,
936
+ parsedRecords: [],
937
+ inferenceRecords: [],
938
+ issues: [{
939
+ id: "empty",
940
+ lineNumber: void 0,
941
+ message: "The file is empty.",
942
+ severityId: "info"
943
+ }],
944
+ size: 0,
945
+ text: void 0,
946
+ valueDelimiterId: K
947
+ };
948
+ if (s == null || c == null || U(o, s).length === 0) return {
949
+ asAt: t,
950
+ columnConfigs: [],
951
+ dataFormatId: s ?? "unknown",
952
+ duration: performance.now() - a,
953
+ encodingId: n.encodingId,
954
+ encodingConfidenceLevel: n.encodingConfidenceLevel,
955
+ fileType: n.fileTypeConfig,
956
+ hasHeaders: void 0,
957
+ recordDelimiterId: void 0,
958
+ parsedRecords: [],
959
+ inferenceRecords: [],
960
+ issues: [],
961
+ size: l,
962
+ text: c,
963
+ valueDelimiterId: void 0
964
+ };
965
+ let { parser: u, parserId: d } = await q(o, s, i), f = await u.parseText(c, {
966
+ dataFormatId: s,
967
+ isComplete: n.isComplete,
968
+ valueDelimiterIds: D
969
+ }), p = s === "dtv", m = p && f.valueDelimiterId == null ? await u.parseText(c, {
970
+ dataFormatId: s,
971
+ isComplete: n.isComplete,
972
+ valueDelimiterIds: [K]
973
+ }) : f, h = r(m.parsedRecords);
974
+ return {
975
+ asAt: t,
976
+ columnConfigs: h.columnConfigs,
977
+ dataFormatId: s,
978
+ duration: performance.now() - a,
979
+ encodingId: n.encodingId,
980
+ encodingConfidenceLevel: n.encodingConfidenceLevel,
981
+ fileType: n.fileTypeConfig,
982
+ hasHeaders: h.hasHeaderRow,
983
+ recordDelimiterId: m.recordDelimiterId,
984
+ parsedRecords: m.parsedRecords,
985
+ parserId: d,
986
+ inferenceRecords: h.typedRecords,
987
+ issues: m.issues,
988
+ size: l,
989
+ text: c,
990
+ valueDelimiterId: p ? m.valueDelimiterId ?? K : m.valueDelimiterId
991
+ };
992
+ }
993
+ async function Ge(e) {
994
+ let { chunk: t, options: n, signal: r, stream: i, toolConfigs: a } = e, { parser: o } = await q(a, n.dataFormatId, n.parserId);
995
+ return await o.parseStream(i, {
996
+ abortSignal: r,
997
+ chunkSize: n.chunkSize,
998
+ dataFormatId: n.dataFormatId,
999
+ encodingId: n.encodingId,
1000
+ valueDelimiterId: n.valueDelimiterId
1001
+ }, t);
1002
+ }
1003
+ async function Ke(e) {
1004
+ 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 q(o, r.dataFormatId, r.parserId), d = await u.parseStream(a, {
1005
+ abortSignal: i,
1006
+ chunkSize: r.chunkSize,
1007
+ dataFormatId: r.dataFormatId,
1008
+ encodingId: r.encodingId,
1009
+ valueDelimiterId: r.valueDelimiterId
1010
+ }, (e, t) => {
1011
+ l.auditRecords(t), n(t.length);
1012
+ });
1013
+ return {
1014
+ asAt: s,
1015
+ columns: l.completeAudit(),
1016
+ commentLineCount: d.commentLineCount,
1017
+ duration: performance.now() - c,
1018
+ emptyLineCount: d.emptyLineCount,
1019
+ invalidFieldLengthCount: d.nonUniformRecordCount,
1020
+ lineCount: d.lineCount,
1021
+ recordCount: Math.max(0, d.recordCount - +!!r.hasHeaders)
1022
+ };
1023
+ }
1024
+ async function q(e, t, n) {
1025
+ let r = W(e, t, n);
1026
+ return {
1027
+ parser: await G(e, r.id.slice(H.length)),
1028
+ parserId: r.id
1029
+ };
1030
+ }
1031
+ //#endregion
1032
+ //#region src/component/module/connector/index.ts
1033
+ var qe = [
653
1034
  {
654
1035
  id: "application",
655
1036
  label: {
@@ -678,7 +1059,7 @@ var fe = E([
678
1059
  es: "Almacén de Archivos"
679
1060
  }
680
1061
  }
681
- ], xe = [
1062
+ ], Je = [
682
1063
  {
683
1064
  id: "apiEndpoint",
684
1065
  label: {
@@ -700,7 +1081,7 @@ var fe = E([
700
1081
  es: "Tabla"
701
1082
  }
702
1083
  }
703
- ], j = {
1084
+ ], J = {
704
1085
  abortOperation: "Abort Operation",
705
1086
  auditObjectContent: "Audit Object Content",
706
1087
  createObject: "Create Object",
@@ -716,7 +1097,7 @@ var fe = E([
716
1097
  retrieveChunks: "Retrieve Chunks",
717
1098
  retrieveRecords: "Retrieve Records",
718
1099
  upsertRecords: "Upsert Records"
719
- }, Se = [
1100
+ }, Ye = [
720
1101
  {
721
1102
  id: "bidirectional",
722
1103
  label: {
@@ -745,12 +1126,12 @@ var fe = E([
745
1126
  es: "Desconocido"
746
1127
  }
747
1128
  }
748
- ], Ce = /* @__PURE__ */ new Set([
1129
+ ], Xe = /* @__PURE__ */ new Set([
749
1130
  "createObject",
750
1131
  "dropObject",
751
1132
  "removeRecords",
752
1133
  "upsertRecords"
753
- ]), we = /* @__PURE__ */ new Set([
1134
+ ]), Ze = /* @__PURE__ */ new Set([
754
1135
  "auditObjectContent",
755
1136
  "findObject",
756
1137
  "getInfo",
@@ -761,13 +1142,13 @@ var fe = E([
761
1142
  "retrieveChunks",
762
1143
  "retrieveRecords"
763
1144
  ]);
764
- function Te(e) {
1145
+ function Qe(e) {
765
1146
  let t = !1, n = !1;
766
- for (let r of e) we.has(r) && (t = !0), Ce.has(r) && (n = !0);
1147
+ for (let r of e) Ze.has(r) && (t = !0), Xe.has(r) && (n = !0);
767
1148
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
768
1149
  }
769
- var Ee = (e, t = "en") => {
770
- let i = be.find((t) => t.id === e);
1150
+ var $e = (e, t = "en") => {
1151
+ let i = qe.find((t) => t.id === e);
771
1152
  return i ? {
772
1153
  label: r(n(i.label), t) ?? i.id,
773
1154
  description: ""
@@ -775,8 +1156,8 @@ var Ee = (e, t = "en") => {
775
1156
  label: e,
776
1157
  description: ""
777
1158
  };
778
- }, De = (e, t = "en") => {
779
- let i = xe.find((t) => t.id === e);
1159
+ }, et = (e, t = "en") => {
1160
+ let i = Je.find((t) => t.id === e);
780
1161
  return i ? {
781
1162
  label: r(n(i.label), t) ?? i.id,
782
1163
  description: ""
@@ -784,8 +1165,8 @@ var Ee = (e, t = "en") => {
784
1165
  label: e,
785
1166
  description: ""
786
1167
  };
787
- }, Oe = (e, t = "en") => {
788
- let i = Se.find((t) => t.id === e);
1168
+ }, tt = (e, t = "en") => {
1169
+ let i = Ye.find((t) => t.id === e);
789
1170
  return i ? {
790
1171
  label: r(n(i.label), t) ?? i.id,
791
1172
  description: ""
@@ -794,180 +1175,31 @@ var Ee = (e, t = "en") => {
794
1175
  description: ""
795
1176
  };
796
1177
  };
797
- function ke(e) {
1178
+ function nt(e) {
798
1179
  let t = new Set(e), n = "|Action|Supported|\n";
799
1180
  n += "|:----|:-------:|\n";
800
- for (let e of Object.keys(j)) n += `| ${j[e]} | ${t.has(e) ? "✓" : ""} |\n`;
1181
+ for (let e of Object.keys(J)) n += `| ${J[e]} | ${t.has(e) ? "✓" : ""} |\n`;
801
1182
  return n;
802
1183
  }
803
1184
  //#endregion
804
1185
  //#region src/component/module/cookbook/cookbookConfig.schema.ts
805
- var Ae = E(["list"]), je = /* @__PURE__ */ x({
806
- ...A,
1186
+ var rt = T(["list"]), it = /* @__PURE__ */ x({
1187
+ ...O,
807
1188
  typeId: /* @__PURE__ */ g("cookbook"),
808
- actionNames: /* @__PURE__ */ m(Ae),
809
- recipes: /* @__PURE__ */ m(O)
810
- }), M = 2048, N = "[REDACTED]", Me = 10, P = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Ne = [
811
- [/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${N}`],
812
- [/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => P.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${N}` : e],
813
- [/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => N],
814
- [/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => N],
815
- [/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => N]
816
- ], F = class extends Error {
817
- data;
818
- locator;
819
- constructor(e, t, n, r) {
820
- super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
821
- }
822
- }, I = class extends F {
823
- constructor(e, t, n, r) {
824
- super(e, t, n, r), this.name = "AppError";
825
- }
826
- }, L = class extends F {
827
- constructor(e, t, n, r) {
828
- super(e, t, n, r), this.name = "APIError";
829
- }
830
- }, R = class extends F {
831
- constructor(e, t, n, r) {
832
- super(e, t, n, r), this.name = "EngineError";
833
- }
834
- }, z = class extends F {
835
- constructor(e, t, n, r) {
836
- super(e, t, n, r), this.name = "ConnectorError";
837
- }
838
- }, B = class extends F {
839
- constructor(e, t, n, r) {
840
- super(e, t, n, r), this.name = "FetchError";
841
- }
842
- };
843
- async function Pe(e, t, n) {
844
- let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
845
- try {
846
- a = await e.text();
847
- } catch (e) {
848
- a = `<body unavailable: ${V(e).message}>`;
849
- }
850
- return new B(i, n, { body: He(a) });
851
- }
852
- function Fe(e) {
853
- return e.map((e) => e.message).join(" ");
854
- }
855
- function Ie(e) {
856
- try {
857
- e();
858
- } catch {}
859
- }
860
- function V(e) {
861
- if (e instanceof Error) return e;
862
- if (typeof e == "string") return Error(e);
863
- if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
864
- if (typeof e == "symbol") return Error(e.description ?? "Unknown error");
865
- if (typeof e == "object") try {
866
- return Error(JSON.stringify(e));
867
- } catch {
868
- return /* @__PURE__ */ Error("Unknown error");
869
- }
870
- return /* @__PURE__ */ Error("Unknown error");
871
- }
872
- function Le(e) {
873
- let t = /* @__PURE__ */ new Set(), n = [], r = V(e);
874
- for (; r != null && !t.has(r);) {
875
- t.add(r);
876
- let [e, i] = Ue(r), a = Ve(e);
877
- /(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
878
- }
879
- return n;
880
- }
881
- function Re(e) {
882
- let t;
883
- for (let n of e.toReversed()) {
884
- let e = Be(n, t);
885
- n.stack !== void 0 && (e.stack = n.stack), t = e;
886
- }
887
- return t ?? /* @__PURE__ */ Error("No error to unserialise.");
888
- }
889
- function ze(e) {
890
- let t;
891
- try {
892
- t = JSON.stringify(e);
893
- } catch {
894
- t = typeof e == "symbol" ? e.description ?? "Unknown error" : typeof e == "bigint" ? e.toString() : "Unknown error";
895
- }
896
- return t === "" && (t = "Unknown error"), t;
897
- }
898
- function Be(e, t) {
899
- switch (e.name) {
900
- case "APIError": return new L(e.message, e.locator, e.data, { cause: t });
901
- case "AppError": return new I(e.message, e.locator, e.data, { cause: t });
902
- case "ConnectorError": return new z(e.message, e.locator, e.data, { cause: t });
903
- case "EngineError": return new R(e.message, e.locator, e.data, { cause: t });
904
- case "FetchError": return new B(e.message, e.locator, e.data, { cause: t });
905
- default: {
906
- let n = e.name;
907
- return new class extends Error {
908
- name = n;
909
- }(e.message, { cause: t });
910
- }
911
- }
912
- }
913
- function Ve(e) {
914
- let { data: t, message: n, stack: r } = e;
915
- return {
916
- ...e,
917
- data: t === void 0 ? void 0 : U(t, /* @__PURE__ */ new WeakSet(), 0),
918
- message: H(n),
919
- stack: r === void 0 ? void 0 : H(r)
920
- };
921
- }
922
- function H(e) {
923
- let t = e;
924
- for (let [e, n] of Ne) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
925
- return t;
926
- }
927
- function U(e, t, n) {
928
- return typeof e == "string" ? H(e) : typeof e != "object" || !e ? e : n >= Me ? N : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => U(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && P.test(e) ? N : U(r, t, n + 1)])));
929
- }
930
- function He(e) {
931
- if (e != null && e !== "") return e.length > M ? `${e.slice(0, M)}... [truncated]` : e;
932
- }
933
- function Ue(e) {
934
- let t = e.cause == null ? null : V(e.cause);
935
- if (e instanceof F) return [{
936
- data: e.data,
937
- locator: e.locator,
938
- message: e.message,
939
- name: e.name,
940
- stack: e.stack
941
- }, t];
942
- let n = Object.fromEntries(Object.entries(e).filter(([e]) => e !== "cause"));
943
- return e.name ? [{
944
- data: n,
945
- locator: "",
946
- message: e.message,
947
- name: e.name,
948
- stack: e.stack
949
- }, t] : [{
950
- data: n,
951
- locator: "",
952
- message: ze(e),
953
- name: "Error",
954
- stack: void 0
955
- }, null];
956
- }
957
- //#endregion
958
- //#region src/component/module/presenter/presenterConfig.schema.ts
959
- var We = E([
1189
+ actionNames: /* @__PURE__ */ h(rt),
1190
+ recipes: /* @__PURE__ */ h(le)
1191
+ }), at = T([
960
1192
  "list",
961
1193
  "render",
962
1194
  "setColorMode"
963
- ]), Ge = /* @__PURE__ */ x({
964
- ...A,
1195
+ ]), ot = /* @__PURE__ */ x({
1196
+ ...O,
965
1197
  typeId: /* @__PURE__ */ g("presenter"),
966
- actionNames: /* @__PURE__ */ m(We),
967
- presentations: /* @__PURE__ */ m(O)
968
- }), Ke = "https://engine-eu.dpuse.app/presenters";
969
- async function qe(e, t, n, r) {
970
- let i = e.id, a = `${Ke}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
1198
+ actionNames: /* @__PURE__ */ h(at),
1199
+ presentations: /* @__PURE__ */ h(le)
1200
+ }), st = "https://engine-eu.dpuse.app/presenters";
1201
+ async function ct(e, t, n, r) {
1202
+ let i = e.id, a = `${st}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
971
1203
  try {
972
1204
  return new (await (import(
973
1205
  /* @vite-ignore */
@@ -979,55 +1211,12 @@ async function qe(e, t, n, r) {
979
1211
  url: a,
980
1212
  version: e.version
981
1213
  };
982
- throw new I(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
983
- }
984
- }
985
- var Je = /* @__PURE__ */ x({ dataFormatIds: /* @__PURE__ */ te(/* @__PURE__ */ m(E([
986
- "arrow",
987
- "avro",
988
- "dtv",
989
- "json",
990
- "jsonl",
991
- "markdown",
992
- "ods",
993
- "parquet",
994
- "sav",
995
- "sqlite",
996
- "xlsx",
997
- "xml"
998
- ])), /* @__PURE__ */ f(1)) }), Ye = /* @__PURE__ */ m(/* @__PURE__ */ S()), Xe = /* @__PURE__ */ x({
999
- ...A,
1000
- typeId: /* @__PURE__ */ g("tool"),
1001
- actionNames: /* @__PURE__ */ y(Ye),
1002
- parser: /* @__PURE__ */ y(Je)
1003
- }), Ze = "https://engine-eu.dpuse.app/tools";
1004
- async function Qe(e, t) {
1005
- let n = `dpuse-tool-${t}`, r = e.find((e) => e.id === n);
1006
- if (!r) {
1007
- let r = {
1008
- availableToolIds: e.map((e) => e.id),
1009
- toolName: n
1010
- };
1011
- throw new I(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
1012
- }
1013
- let i = `${Ze}/${t}_v${r.version}/${n}.es.js`;
1014
- try {
1015
- return new (await (import(
1016
- /* @vite-ignore */
1017
- i
1018
- ))).Tool();
1019
- } catch (e) {
1020
- let t = {
1021
- toolName: n,
1022
- url: i,
1023
- version: r.version
1024
- };
1025
- throw new I(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", t, { cause: e });
1214
+ throw new N(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
1026
1215
  }
1027
1216
  }
1028
1217
  //#endregion
1029
1218
  //#region src/encoding/index.ts
1030
- var $e = {
1219
+ var lt = {
1031
1220
  arabic: {
1032
1221
  id: "arabic",
1033
1222
  label: {
@@ -1175,7 +1364,7 @@ var $e = {
1175
1364
  es: "Occidental"
1176
1365
  }
1177
1366
  }
1178
- }, et = {
1367
+ }, ut = {
1179
1368
  ascii: {
1180
1369
  id: "ascii",
1181
1370
  groupId: null,
@@ -1606,16 +1795,16 @@ var $e = {
1606
1795
  groupId: "baltic",
1607
1796
  decoderId: "windows-1257"
1608
1797
  }
1609
- }, W = $e, G = et;
1610
- function K(e) {
1611
- return Object.hasOwn(G, e);
1798
+ }, Y = lt, X = ut;
1799
+ function dt(e) {
1800
+ return Object.hasOwn(X, e);
1612
1801
  }
1613
- function tt(e) {
1614
- return K(e) ? G[e].decoderId ?? e : e;
1802
+ function ft(e) {
1803
+ return dt(e) ? X[e].decoderId ?? e : e;
1615
1804
  }
1616
- function nt(e = "en") {
1617
- return Array.from(Object.values(G), ({ decoderId: t, groupId: n, id: r }) => {
1618
- let i = n == null ? "" : rt(n, e);
1805
+ function pt(e = "en") {
1806
+ return Array.from(Object.values(X), ({ decoderId: t, groupId: n, id: r }) => {
1807
+ let i = n == null ? "" : mt(n, e);
1619
1808
  return {
1620
1809
  id: r,
1621
1810
  groupLabel: i,
@@ -1625,13 +1814,13 @@ function nt(e = "en") {
1625
1814
  };
1626
1815
  }).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.label.localeCompare(n.label, e));
1627
1816
  }
1628
- function rt(e, t) {
1629
- let n = W[e].label;
1817
+ function mt(e, t) {
1818
+ let n = Y[e].label;
1630
1819
  return n[t] ?? n.en ?? e;
1631
1820
  }
1632
1821
  //#endregion
1633
1822
  //#region src/locale/index.ts
1634
- function it(e, t) {
1823
+ function ht(e, t) {
1635
1824
  return {
1636
1825
  ...e,
1637
1826
  label: e.label[t] ?? e.id,
@@ -1639,7 +1828,7 @@ function it(e, t) {
1639
1828
  verb: e.verb?.[t] ?? void 0
1640
1829
  };
1641
1830
  }
1642
- function at(e, t, n = !1) {
1831
+ function gt(e, t, n = !1) {
1643
1832
  let r = e.map((e) => ({
1644
1833
  ...e,
1645
1834
  label: e.label[t] ?? e.id,
@@ -1648,7 +1837,7 @@ function at(e, t, n = !1) {
1648
1837
  }));
1649
1838
  return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
1650
1839
  }
1651
- function ot(e, t) {
1840
+ function _t(e, t) {
1652
1841
  return {
1653
1842
  ...e,
1654
1843
  label: e.label[t] ?? e.id,
@@ -1657,7 +1846,7 @@ function ot(e, t) {
1657
1846
  }
1658
1847
  //#endregion
1659
1848
  //#region src/utilities/index.ts
1660
- var q = /* @__PURE__ */ new Map([
1849
+ var vt = /* @__PURE__ */ new Map([
1661
1850
  ["arrow", "application/vnd.apache.arrow.file"],
1662
1851
  ["avro", "application/vnd.apache.avro"],
1663
1852
  ["bin", "application/octet-stream"],
@@ -1678,20 +1867,20 @@ var q = /* @__PURE__ */ new Map([
1678
1867
  ["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
1679
1868
  ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
1680
1869
  ["xml", "application/xml"]
1681
- ]), J = "en", Y = [
1870
+ ]), Z = "en", Q = [
1682
1871
  ["day", 864e5],
1683
1872
  ["hour", 36e5],
1684
1873
  ["minute", 6e4],
1685
1874
  ["second", 1e3],
1686
1875
  ["millisecond", 1]
1687
- ], st = [
1876
+ ], yt = [
1688
1877
  ["byte", 1],
1689
1878
  ["kilobyte", 1024],
1690
1879
  ["megabyte", 1048576],
1691
1880
  ["gigabyte", 1073741824],
1692
1881
  ["terabyte", 1099511627776]
1693
- ], X = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map();
1694
- function Q(e, t = 2, n = t, r = J) {
1882
+ ], bt = /* @__PURE__ */ new Map(), xt = /* @__PURE__ */ new Map();
1883
+ function St(e, t = 2, n = t, r = Z) {
1695
1884
  return e == null ? "" : $(r, {
1696
1885
  localeMatcher: "best fit",
1697
1886
  maximumFractionDigits: t,
@@ -1701,18 +1890,18 @@ function Q(e, t = 2, n = t, r = J) {
1701
1890
  useGrouping: !0
1702
1891
  }).format(e);
1703
1892
  }
1704
- function ct(e, t = J) {
1705
- return Q(e, 0, 0, t);
1893
+ function Ct(e, t = Z) {
1894
+ return St(e, 0, 0, t);
1706
1895
  }
1707
- function lt(e, t = 1, n = J) {
1896
+ function wt(e, t = 1, n = Z) {
1708
1897
  return e == null || !Number.isFinite(e) ? "" : $(n, {
1709
1898
  maximumFractionDigits: t,
1710
1899
  notation: "compact"
1711
1900
  }).format(e);
1712
1901
  }
1713
- function ut(e, t = 1, n = J) {
1902
+ function Tt(e, t = 1, n = Z) {
1714
1903
  if (e == null || !Number.isFinite(e)) return "";
1715
- let [r, i] = st.find(([, n]) => yt(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
1904
+ let [r, i] = yt.find(([, n]) => Pt(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
1716
1905
  return $(n, {
1717
1906
  maximumFractionDigits: i === 1 ? 0 : t,
1718
1907
  style: "unit",
@@ -1720,9 +1909,9 @@ function ut(e, t = 1, n = J) {
1720
1909
  unitDisplay: i === 1 ? "long" : "short"
1721
1910
  }).format(e / i);
1722
1911
  }
1723
- function dt(e, t = "millisecond", n = J) {
1912
+ function Et(e, t = "millisecond", n = Z) {
1724
1913
  if (e == null || !Number.isFinite(e)) return "";
1725
- let r = Math.round(Math.abs(e)), i = Y.findIndex(([, e]) => r >= e), a = i === -1 ? Y.length - 1 : i, o = Y.findIndex(([e]) => e === t), s = Y.slice(a, Math.max(o, a) + 1), c = [];
1914
+ 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 = [];
1726
1915
  for (let [t, i] of s) {
1727
1916
  let a = Math.floor(r / i);
1728
1917
  if (a === 0 && c.length > 0) continue;
@@ -1734,25 +1923,25 @@ function dt(e, t = "millisecond", n = J) {
1734
1923
  unitDisplay: "short"
1735
1924
  }).format(o));
1736
1925
  }
1737
- return vt(n).format(c);
1926
+ return Nt(n).format(c);
1738
1927
  }
1739
- function ft(e) {
1928
+ function Dt(e) {
1740
1929
  if (!e) return;
1741
- let t = _t(e);
1930
+ let t = Mt(e);
1742
1931
  return t === void 0 ? e : e.slice(0, t);
1743
1932
  }
1744
- function pt(e) {
1933
+ function Ot(e) {
1745
1934
  if (!e) return;
1746
- let t = _t(e);
1935
+ let t = Mt(e);
1747
1936
  return t === void 0 ? void 0 : e.slice(t + 1);
1748
1937
  }
1749
- function mt(e) {
1750
- return e != null && q.has(e.toLowerCase());
1938
+ function kt(e) {
1939
+ return e != null && vt.has(e.toLowerCase());
1751
1940
  }
1752
- function ht(e) {
1753
- return (e == null ? void 0 : q.get(e.toLowerCase())) ?? "application/octet-stream";
1941
+ function At(e) {
1942
+ return (e == null ? void 0 : vt.get(e.toLowerCase())) ?? "application/octet-stream";
1754
1943
  }
1755
- function gt(e) {
1944
+ function jt(e) {
1756
1945
  switch (e) {
1757
1946
  case "Edm.Boolean": return "boolean";
1758
1947
  case "Edm.Byte":
@@ -1773,24 +1962,24 @@ function gt(e) {
1773
1962
  default: return "unknown";
1774
1963
  }
1775
1964
  }
1776
- function _t(e) {
1965
+ function Mt(e) {
1777
1966
  let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
1778
1967
  return n > t && n < e.length - 1 ? n : void 0;
1779
1968
  }
1780
- function vt(e) {
1781
- let t = X.get(e);
1969
+ function Nt(e) {
1970
+ let t = bt.get(e);
1782
1971
  return t || (t = new Intl.ListFormat(e, {
1783
1972
  style: "narrow",
1784
1973
  type: "unit"
1785
- }), X.set(e, t)), t;
1974
+ }), bt.set(e, t)), t;
1786
1975
  }
1787
1976
  function $(e, t) {
1788
- let n = `${e}|${JSON.stringify(t)}`, r = Z.get(n);
1789
- return r || (r = new Intl.NumberFormat(e, t), Z.set(n, r)), r;
1977
+ let n = `${e}|${JSON.stringify(t)}`, r = xt.get(n);
1978
+ return r || (r = new Intl.NumberFormat(e, t), xt.set(n, r)), r;
1790
1979
  }
1791
- function yt(e, t) {
1980
+ function Pt(e, t) {
1792
1981
  let n = 10 ** t;
1793
1982
  return Math.round(e * n) / n;
1794
1983
  }
1795
1984
  //#endregion
1796
- export { L as APIError, I as AppError, z as ConnectorError, ue as DATA_FORMAT_ICON_CONFIGS, e as DEFAULT_LOCALE_ID, W as ENCODING_GROUP_CONFIG_MAP, G as ENCODING_TYPE_CONFIG_MAP, R as EngineError, B as FetchError, de as ORDERED_VALUE_DELIMITER_IDS, t as SUPPORTED_LANGUAGES, Pe as buildFetchError, se as componentInstanceConfigSchema, Fe as concatenateSerialisedErrorMessages, ye as connectorConfigSchema, Ee as constructConnectorCategoryConfig, De as constructConnectorItemTypeConfig, Oe as constructConnectorUsageConfig, gt as convertODataTypeIdToUsageTypeId, je as cookbookConfigSchema, n as createLabelMap, Te as determineConnectorUsageId, pt as extractExtensionFromPath, ft as extractPathWithoutExtension, Q as formatNumberAsDecimalNumber, dt as formatNumberAsDuration, lt as formatNumberAsSize, ut as formatNumberAsStorageSize, ct as formatNumberAsWholeNumber, le as getComponentStatus, ke as getConnectorActionsTable, nt as getEncodingTypeConfigs, mt as hasMimeTypeForExtension, Ie as ignoreErrors, K as isEncodingTypeId, qe as loadPresenter, Qe as loadTool, it as localiseConfig, at as localiseConfigs, ot as localiseReference, ht as lookupMimeTypeForExtension, V as normalizeToError, Ge as presenterConfigSchema, tt as resolveDecoderId, r as resolveLabel, Le as serialiseError, Xe as toolConfigSchema, Re as unserialiseError };
1985
+ export { P as APIError, N as AppError, I as ConnectorError, pe as DATA_FORMAT_ICON_CONFIGS, e as DEFAULT_LOCALE_ID, Y as ENCODING_GROUP_CONFIG_MAP, X as ENCODING_TYPE_CONFIG_MAP, F as EngineError, L as FetchError, D as ORDERED_VALUE_DELIMITER_IDS, t as SUPPORTED_LANGUAGES, H as TOOL_NAME_PREFIX, Ke as auditObjectContentWithParser, we as buildFetchError, We as buildPreviewConfig, ue as componentInstanceConfigSchema, Te as concatenateSerialisedErrorMessages, xe as connectorConfigSchema, $e as constructConnectorCategoryConfig, et as constructConnectorItemTypeConfig, tt as constructConnectorUsageConfig, jt as convertODataTypeIdToUsageTypeId, it as cookbookConfigSchema, n as createLabelMap, Qe as determineConnectorUsageId, Ot as extractExtensionFromPath, Dt as extractPathWithoutExtension, St as formatNumberAsDecimalNumber, Et as formatNumberAsDuration, wt as formatNumberAsSize, Tt as formatNumberAsStorageSize, Ct as formatNumberAsWholeNumber, fe as getComponentStatus, nt as getConnectorActionsTable, pt as getEncodingTypeConfigs, kt as hasMimeTypeForExtension, Ee as ignoreErrors, dt as isEncodingTypeId, U as listParserToolConfigs, ct as loadPresenter, G as loadTool, ht as localiseConfig, gt as localiseConfigs, _t as localiseReference, At as lookupMimeTypeForExtension, R as normalizeToError, Le as parseDelimitedText, ot as presenterConfigSchema, ft as resolveDecoderId, r as resolveLabel, W as resolveParserToolConfig, Ge as retrieveRecordsWithParser, De as serialiseError, Ie as toolConfigSchema, Oe as unserialiseError };