@datapos/datapos-shared 0.3.335 → 0.3.337

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.
@@ -1,825 +0,0 @@
1
- let j;
2
- // @__NO_SIDE_EFFECTS__
3
- function H(e) {
4
- return {
5
- lang: e?.lang ?? j?.lang,
6
- message: e?.message,
7
- abortEarly: e?.abortEarly ?? j?.abortEarly,
8
- abortPipeEarly: e?.abortPipeEarly ?? j?.abortPipeEarly
9
- };
10
- }
11
- let K;
12
- // @__NO_SIDE_EFFECTS__
13
- function W(e) {
14
- return K?.get(e);
15
- }
16
- let X;
17
- // @__NO_SIDE_EFFECTS__
18
- function J(e) {
19
- return X?.get(e);
20
- }
21
- let q;
22
- // @__NO_SIDE_EFFECTS__
23
- function Q(e, r) {
24
- return q?.get(e)?.get(r);
25
- }
26
- // @__NO_SIDE_EFFECTS__
27
- function U(e) {
28
- const r = typeof e;
29
- return r === "string" ? `"${e}"` : r === "number" || r === "bigint" || r === "boolean" ? `${e}` : r === "object" || r === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : r;
30
- }
31
- function g(e, r, t, n, s) {
32
- const o = s && "input" in s ? s.input : t.value, i = s?.expected ?? e.expects ?? null, u = s?.received ?? /* @__PURE__ */ U(o), a = {
33
- kind: e.kind,
34
- type: e.type,
35
- input: o,
36
- expected: i,
37
- received: u,
38
- message: `Invalid ${r}: ${i ? `Expected ${i} but r` : "R"}eceived ${u}`,
39
- requirement: e.requirement,
40
- path: s?.path,
41
- issues: s?.issues,
42
- lang: n.lang,
43
- abortEarly: n.abortEarly,
44
- abortPipeEarly: n.abortPipeEarly
45
- }, p = e.kind === "schema", d = s?.message ?? e.message ?? /* @__PURE__ */ Q(e.reference, a.lang) ?? (p ? /* @__PURE__ */ J(a.lang) : null) ?? n.message ?? /* @__PURE__ */ W(a.lang);
46
- d !== void 0 && (a.message = typeof d == "function" ? d(a) : d), p && (t.typed = !1), t.issues ? t.issues.push(a) : t.issues = [a];
47
- }
48
- // @__NO_SIDE_EFFECTS__
49
- function h(e) {
50
- return {
51
- version: 1,
52
- vendor: "valibot",
53
- validate(r) {
54
- return e["~run"]({ value: r }, /* @__PURE__ */ H());
55
- }
56
- };
57
- }
58
- // @__NO_SIDE_EFFECTS__
59
- function Y(e, r) {
60
- return Object.hasOwn(e, r) && r !== "__proto__" && r !== "prototype" && r !== "constructor";
61
- }
62
- // @__NO_SIDE_EFFECTS__
63
- function Z(e, r) {
64
- const t = [...new Set(e)];
65
- return t.length > 1 ? `(${t.join(` ${r} `)})` : t[0] ?? "never";
66
- }
67
- // @__NO_SIDE_EFFECTS__
68
- function ee(e, r, t) {
69
- return typeof e.fallback == "function" ? e.fallback(r, t) : e.fallback;
70
- }
71
- // @__NO_SIDE_EFFECTS__
72
- function A(e, r, t) {
73
- return typeof e.default == "function" ? e.default(r, t) : e.default;
74
- }
75
- // @__NO_SIDE_EFFECTS__
76
- function x(e, r) {
77
- return {
78
- kind: "schema",
79
- type: "array",
80
- reference: x,
81
- expects: "Array",
82
- async: !1,
83
- item: e,
84
- message: r,
85
- get "~standard"() {
86
- return /* @__PURE__ */ h(this);
87
- },
88
- "~run"(t, n) {
89
- const s = t.value;
90
- if (Array.isArray(s)) {
91
- t.typed = !0, t.value = [];
92
- for (let o = 0; o < s.length; o++) {
93
- const i = s[o], u = this.item["~run"]({ value: i }, n);
94
- if (u.issues) {
95
- const a = {
96
- type: "array",
97
- origin: "value",
98
- input: s,
99
- key: o,
100
- value: i
101
- };
102
- for (const p of u.issues)
103
- p.path ? p.path.unshift(a) : p.path = [a], t.issues?.push(p);
104
- if (t.issues || (t.issues = u.issues), n.abortEarly) {
105
- t.typed = !1;
106
- break;
107
- }
108
- }
109
- u.typed || (t.typed = !1), t.value.push(u.value);
110
- }
111
- } else g(this, "type", t, n);
112
- return t;
113
- }
114
- };
115
- }
116
- // @__NO_SIDE_EFFECTS__
117
- function B(e) {
118
- return {
119
- kind: "schema",
120
- type: "boolean",
121
- reference: B,
122
- expects: "boolean",
123
- async: !1,
124
- message: e,
125
- get "~standard"() {
126
- return /* @__PURE__ */ h(this);
127
- },
128
- "~run"(r, t) {
129
- return typeof r.value == "boolean" ? r.typed = !0 : g(this, "type", r, t), r;
130
- }
131
- };
132
- }
133
- // @__NO_SIDE_EFFECTS__
134
- function D(e, r) {
135
- return {
136
- kind: "schema",
137
- type: "literal",
138
- reference: D,
139
- expects: /* @__PURE__ */ U(e),
140
- async: !1,
141
- literal: e,
142
- message: r,
143
- get "~standard"() {
144
- return /* @__PURE__ */ h(this);
145
- },
146
- "~run"(t, n) {
147
- return t.value === this.literal ? t.typed = !0 : g(this, "type", t, n), t;
148
- }
149
- };
150
- }
151
- // @__NO_SIDE_EFFECTS__
152
- function y(e, r) {
153
- return {
154
- kind: "schema",
155
- type: "nullable",
156
- reference: y,
157
- expects: `(${e.expects} | null)`,
158
- async: !1,
159
- wrapped: e,
160
- default: r,
161
- get "~standard"() {
162
- return /* @__PURE__ */ h(this);
163
- },
164
- "~run"(t, n) {
165
- return t.value === null && (this.default !== void 0 && (t.value = /* @__PURE__ */ A(this, t, n)), t.value === null) ? (t.typed = !0, t) : this.wrapped["~run"](t, n);
166
- }
167
- };
168
- }
169
- // @__NO_SIDE_EFFECTS__
170
- function k(e) {
171
- return {
172
- kind: "schema",
173
- type: "number",
174
- reference: k,
175
- expects: "number",
176
- async: !1,
177
- message: e,
178
- get "~standard"() {
179
- return /* @__PURE__ */ h(this);
180
- },
181
- "~run"(r, t) {
182
- return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : g(this, "type", r, t), r;
183
- }
184
- };
185
- }
186
- // @__NO_SIDE_EFFECTS__
187
- function b(e, r) {
188
- return {
189
- kind: "schema",
190
- type: "object",
191
- reference: b,
192
- expects: "Object",
193
- async: !1,
194
- entries: e,
195
- message: r,
196
- get "~standard"() {
197
- return /* @__PURE__ */ h(this);
198
- },
199
- "~run"(t, n) {
200
- const s = t.value;
201
- if (s && typeof s == "object") {
202
- t.typed = !0, t.value = {};
203
- for (const o in this.entries) {
204
- const i = this.entries[o];
205
- if (o in s || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
206
- const u = o in s ? s[o] : /* @__PURE__ */ A(i), a = i["~run"]({ value: u }, n);
207
- if (a.issues) {
208
- const p = {
209
- type: "object",
210
- origin: "value",
211
- input: s,
212
- key: o,
213
- value: u
214
- };
215
- for (const d of a.issues)
216
- d.path ? d.path.unshift(p) : d.path = [p], t.issues?.push(d);
217
- if (t.issues || (t.issues = a.issues), n.abortEarly) {
218
- t.typed = !1;
219
- break;
220
- }
221
- }
222
- a.typed || (t.typed = !1), t.value[o] = a.value;
223
- } else if (i.fallback !== void 0) t.value[o] = /* @__PURE__ */ ee(i);
224
- else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (g(this, "key", t, n, {
225
- input: void 0,
226
- expected: `"${o}"`,
227
- path: [{
228
- type: "object",
229
- origin: "key",
230
- input: s,
231
- key: o,
232
- value: s[o]
233
- }]
234
- }), n.abortEarly))
235
- break;
236
- }
237
- } else g(this, "type", t, n);
238
- return t;
239
- }
240
- };
241
- }
242
- // @__NO_SIDE_EFFECTS__
243
- function f(e, r) {
244
- return {
245
- kind: "schema",
246
- type: "optional",
247
- reference: f,
248
- expects: `(${e.expects} | undefined)`,
249
- async: !1,
250
- wrapped: e,
251
- default: r,
252
- get "~standard"() {
253
- return /* @__PURE__ */ h(this);
254
- },
255
- "~run"(t, n) {
256
- return t.value === void 0 && (this.default !== void 0 && (t.value = /* @__PURE__ */ A(this, t, n)), t.value === void 0) ? (t.typed = !0, t) : this.wrapped["~run"](t, n);
257
- }
258
- };
259
- }
260
- // @__NO_SIDE_EFFECTS__
261
- function R(e, r, t) {
262
- return {
263
- kind: "schema",
264
- type: "record",
265
- reference: R,
266
- expects: "Object",
267
- async: !1,
268
- key: e,
269
- value: r,
270
- message: t,
271
- get "~standard"() {
272
- return /* @__PURE__ */ h(this);
273
- },
274
- "~run"(n, s) {
275
- const o = n.value;
276
- if (o && typeof o == "object") {
277
- n.typed = !0, n.value = {};
278
- for (const i in o) if (/* @__PURE__ */ Y(o, i)) {
279
- const u = o[i], a = this.key["~run"]({ value: i }, s);
280
- if (a.issues) {
281
- const d = {
282
- type: "object",
283
- origin: "key",
284
- input: o,
285
- key: i,
286
- value: u
287
- };
288
- for (const S of a.issues)
289
- S.path = [d], n.issues?.push(S);
290
- if (n.issues || (n.issues = a.issues), s.abortEarly) {
291
- n.typed = !1;
292
- break;
293
- }
294
- }
295
- const p = this.value["~run"]({ value: u }, s);
296
- if (p.issues) {
297
- const d = {
298
- type: "object",
299
- origin: "value",
300
- input: o,
301
- key: i,
302
- value: u
303
- };
304
- for (const S of p.issues)
305
- S.path ? S.path.unshift(d) : S.path = [d], n.issues?.push(S);
306
- if (n.issues || (n.issues = p.issues), s.abortEarly) {
307
- n.typed = !1;
308
- break;
309
- }
310
- }
311
- (!a.typed || !p.typed) && (n.typed = !1), a.typed && (n.value[a.value] = p.value);
312
- }
313
- } else g(this, "type", n, s);
314
- return n;
315
- }
316
- };
317
- }
318
- // @__NO_SIDE_EFFECTS__
319
- function l(e) {
320
- return {
321
- kind: "schema",
322
- type: "string",
323
- reference: l,
324
- expects: "string",
325
- async: !1,
326
- message: e,
327
- get "~standard"() {
328
- return /* @__PURE__ */ h(this);
329
- },
330
- "~run"(r, t) {
331
- return typeof r.value == "string" ? r.typed = !0 : g(this, "type", r, t), r;
332
- }
333
- };
334
- }
335
- // @__NO_SIDE_EFFECTS__
336
- function _(e) {
337
- let r;
338
- if (e) for (const t of e) r ? r.push(...t.issues) : r = t.issues;
339
- return r;
340
- }
341
- // @__NO_SIDE_EFFECTS__
342
- function G(e, r) {
343
- return {
344
- kind: "schema",
345
- type: "union",
346
- reference: G,
347
- expects: /* @__PURE__ */ Z(e.map((t) => t.expects), "|"),
348
- async: !1,
349
- options: e,
350
- message: r,
351
- get "~standard"() {
352
- return /* @__PURE__ */ h(this);
353
- },
354
- "~run"(t, n) {
355
- let s, o, i;
356
- for (const u of this.options) {
357
- const a = u["~run"]({ value: t.value }, n);
358
- if (a.typed) if (a.issues) o ? o.push(a) : o = [a];
359
- else {
360
- s = a;
361
- break;
362
- }
363
- else i ? i.push(a) : i = [a];
364
- }
365
- if (s) return s;
366
- if (o) {
367
- if (o.length === 1) return o[0];
368
- g(this, "type", t, n, { issues: /* @__PURE__ */ _(o) }), t.typed = !0;
369
- } else {
370
- if (i?.length === 1) return i[0];
371
- g(this, "type", t, n, { issues: /* @__PURE__ */ _(i) });
372
- }
373
- return t;
374
- }
375
- };
376
- }
377
- const v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */ D(r))), te = /* @__PURE__ */ b({
378
- "en-au": /* @__PURE__ */ l(),
379
- "en-gb": /* @__PURE__ */ l(),
380
- "en-us": /* @__PURE__ */ l(),
381
- "es-es": /* @__PURE__ */ l()
382
- }), C = /* @__PURE__ */ b({
383
- "en-au": /* @__PURE__ */ f(/* @__PURE__ */ l()),
384
- "en-gb": /* @__PURE__ */ f(/* @__PURE__ */ l()),
385
- "en-us": /* @__PURE__ */ f(/* @__PURE__ */ l()),
386
- "es-es": /* @__PURE__ */ f(/* @__PURE__ */ l())
387
- }), re = v(["amber", "green", "red", "other"]), ne = v([
388
- "alpha",
389
- "beta",
390
- "generalAvailability",
391
- "notApplicable",
392
- "preAlpha",
393
- "proposed",
394
- "releaseCandidate",
395
- "unavailable",
396
- "underReview"
397
- ]), se = v([
398
- "app",
399
- "connector",
400
- "connectorConnection",
401
- "context",
402
- "contextModelGroup",
403
- "contextModel",
404
- "contextModelDimensionGroup",
405
- "contextModelDimension",
406
- "contextModelDimensionHierarchy",
407
- "contextModelEntityGroup",
408
- "contextModelEntity",
409
- "contextModelEntityDataItem",
410
- "contextModelEntityEvent",
411
- "contextModelEntityPrimaryMeasure",
412
- "contextModelSecondaryMeasureGroup",
413
- "contextModelSecondaryMeasure",
414
- "dataView",
415
- "dimension",
416
- "engine",
417
- "eventQuery",
418
- "presenter",
419
- "presenterPresentation",
420
- "tool"
421
- ]);
422
- v(["app", "engine", "connector", "context", "presenter", "tool"]);
423
- const oe = /* @__PURE__ */ b({
424
- id: /* @__PURE__ */ l(),
425
- color: re,
426
- label: /* @__PURE__ */ l()
427
- }), T = {
428
- id: /* @__PURE__ */ l(),
429
- label: C,
430
- description: C,
431
- firstCreatedAt: /* @__PURE__ */ f(/* @__PURE__ */ k()),
432
- icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),
433
- iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),
434
- lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ k()),
435
- status: /* @__PURE__ */ y(oe),
436
- statusId: ne
437
- }, Se = /* @__PURE__ */ b({
438
- ...T,
439
- typeId: se
440
- }), $ = {
441
- ...T,
442
- version: /* @__PURE__ */ l()
443
- }, P = /* @__PURE__ */ b({
444
- id: /* @__PURE__ */ l(),
445
- label: C,
446
- description: C,
447
- icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),
448
- iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),
449
- order: /* @__PURE__ */ k(),
450
- path: /* @__PURE__ */ l()
451
- }), E = (e) => {
452
- const r = Object.entries(e).filter((t) => typeof t[1] == "string");
453
- return new Map(r);
454
- }, ie = (e, r, t = I) => {
455
- const n = e.get(r);
456
- if (n !== void 0) return n;
457
- if (t !== r)
458
- return e.get(t);
459
- }, ae = [
460
- { id: "alpha", color: "red", labels: E({ "en-gb": "alpha" }) },
461
- { id: "beta", color: "amber", labels: E({ "en-gb": "beta" }) },
462
- { id: "generalAvailability", color: "green", labels: E({ "en-gb": "" }) },
463
- { id: "notApplicable", color: "green", labels: E({ "en-gb": "not-applicable" }) },
464
- { id: "preAlpha", color: "red", labels: E({ "en-gb": "pre-alpha" }) },
465
- { id: "proposed", color: "other", labels: E({ "en-gb": "proposed" }) },
466
- { id: "releaseCandidate", color: "green", labels: E({ "en-gb": "release-candidate" }) },
467
- { id: "unavailable", color: "other", labels: E({ "en-gb": "unavailable" }) },
468
- { id: "underReview", color: "other", labels: E({ "en-gb": "under-review" }) }
469
- ], ke = (e, r = I) => {
470
- const t = ae.find((n) => n.id === e);
471
- if (t) {
472
- const n = ie(t.labels, r);
473
- return { id: t.id, color: t.color, label: n ?? t.id };
474
- }
475
- return { id: e, color: "other", label: e };
476
- }, le = v(["apiKey", "disabled", "oAuth2", "none"]), ce = v(["application", "curatedDataset", "database", "fileStore"]), ue = v([
477
- "abortOperation",
478
- "authenticateConnection",
479
- "createObject",
480
- "describeConnection",
481
- "dropObject",
482
- "findObject",
483
- "getReadableStream",
484
- "getRecord",
485
- "listNodes",
486
- "previewObject",
487
- "removeRecords",
488
- "retrieveChunks",
489
- "retrieveRecords",
490
- "upsertRecords"
491
- ]), pe = v(["bidirectional", "destination", "source", "unknown"]), de = /* @__PURE__ */ b({
492
- authMethodId: le,
493
- activeConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ k()),
494
- canDescribe: /* @__PURE__ */ f(/* @__PURE__ */ B()),
495
- id: /* @__PURE__ */ f(/* @__PURE__ */ l()),
496
- label: /* @__PURE__ */ f(te),
497
- maxConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ k()),
498
- params: /* @__PURE__ */ f(/* @__PURE__ */ x(/* @__PURE__ */ R(/* @__PURE__ */ l(), /* @__PURE__ */ l())))
499
- }), De = /* @__PURE__ */ b({
500
- ...$,
501
- typeId: /* @__PURE__ */ D("connector"),
502
- category: /* @__PURE__ */ y(/* @__PURE__ */ b({ id: /* @__PURE__ */ l(), label: /* @__PURE__ */ l() })),
503
- categoryId: ce,
504
- implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(), de),
505
- operations: /* @__PURE__ */ x(ue),
506
- usageId: pe,
507
- vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ l()),
508
- vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ l()),
509
- vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ l())
510
- }), we = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Ie = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], O = (e) => {
511
- const r = Object.entries(e).filter((t) => typeof t[1] == "string");
512
- return new Map(r);
513
- };
514
- O({ "en-gb": "Application" }), O({ "en-gb": "Curated Dataset" }), O({ "en-gb": "Database" }), O({ "en-gb": "File Store" });
515
- const fe = v(["list"]), me = /* @__PURE__ */ b({
516
- ...T,
517
- typeId: /* @__PURE__ */ D("contextModelGroup"),
518
- modelRefs: /* @__PURE__ */ x(P),
519
- order: /* @__PURE__ */ k()
520
- }), Oe = /* @__PURE__ */ b({
521
- ...$,
522
- typeId: /* @__PURE__ */ D("context"),
523
- models: /* @__PURE__ */ x(me),
524
- operations: /* @__PURE__ */ x(fe)
525
- });
526
- class F extends Error {
527
- locator;
528
- constructor(r, t, n) {
529
- super(r, n), this.name = "DataPosError", this.locator = t;
530
- }
531
- }
532
- class w extends F {
533
- constructor(r, t, n) {
534
- super(r, t, n), this.name = "ApplicationError";
535
- }
536
- }
537
- class Ce extends w {
538
- constructor(r, t, n) {
539
- super(r, t, n), this.name = "APIError";
540
- }
541
- }
542
- class Me extends w {
543
- constructor(r, t, n) {
544
- super(r, t, n), this.name = "EngineError";
545
- }
546
- }
547
- class z extends w {
548
- body;
549
- constructor(r, t, n, s) {
550
- super(r, t, s), this.name = "FetchError", this.body = n;
551
- }
552
- }
553
- class be extends w {
554
- componentName;
555
- info;
556
- constructor(r, t, n, s, o) {
557
- super(r, t, o), this.name = "VueHandledError", this.info = n, this.componentName = s;
558
- }
559
- }
560
- class Ne extends w {
561
- constructor(r, t, n) {
562
- super(r, t, n), this.name = "WindowHandledRuntimeError";
563
- }
564
- }
565
- class je extends w {
566
- constructor(r, t, n) {
567
- super(r, t, n), this.name = "WindowHandledPromiseRejectionError";
568
- }
569
- }
570
- class Ae extends F {
571
- constructor(r, t, n) {
572
- super(r, t, n), this.name = "OperationalError";
573
- }
574
- }
575
- async function Re(e, r, t) {
576
- const n = ` - ${e.statusText}`, s = `${r} Response status '${e.status}${e.statusText ? n : ""}' received.`, o = await e.text();
577
- return new z(s, t, o);
578
- }
579
- function Te(e) {
580
- return e.map((r) => r.message).join(" ");
581
- }
582
- function $e(e) {
583
- if (e instanceof Error) return e;
584
- if (typeof e == "string") return new Error(e);
585
- if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return new Error(String(e));
586
- if (typeof e == "symbol") return new Error(e.description ?? "Unknown error");
587
- if (e && typeof e == "object")
588
- try {
589
- return new Error(JSON.stringify(e));
590
- } catch {
591
- return new Error("Unknown error");
592
- }
593
- return new Error("Unknown error");
594
- }
595
- function Fe(e) {
596
- const r = /* @__PURE__ */ new Set(), t = [];
597
- let n = e;
598
- for (; n && !r.has(n); ) {
599
- r.add(n);
600
- let s;
601
- if (n instanceof z)
602
- s = { body: n.body, locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;
603
- else if (n instanceof be)
604
- s = { componentName: n.componentName, info: n.info, locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;
605
- else if (n instanceof F)
606
- s = { locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;
607
- else if (n instanceof Error) {
608
- const o = n;
609
- s = { locator: "", message: o.message, name: o.name, stack: o.stack }, n = o.cause;
610
- } else
611
- s = { locator: "", message: String(n), name: "Error" }, n = void 0;
612
- /(?:\.{3}|[.!?])$/.test(s.message) || (s.message += "."), t.push(s);
613
- }
614
- return t;
615
- }
616
- const ye = v(["list", "render", "setColorMode"]), Le = /* @__PURE__ */ b({
617
- ...$,
618
- typeId: /* @__PURE__ */ D("presenter"),
619
- presentations: /* @__PURE__ */ x(P),
620
- operations: /* @__PURE__ */ x(ye)
621
- });
622
- function _e() {
623
- return { render: ge };
624
- }
625
- function ge(e, r, t) {
626
- t.textContent = "Cytoscape.js diagram goes here...";
627
- }
628
- function Ue() {
629
- return { render: he };
630
- }
631
- function he(e, r) {
632
- console.log(1111, e), console.log(2222, r), console.log(3333, r.childNodes), console.log(4444, r.children);
633
- }
634
- const V = "en-US", M = /* @__PURE__ */ new Map();
635
- function Be(e) {
636
- switch (e) {
637
- case "Edm.Binary":
638
- return "unknown";
639
- // Binary...
640
- case "Edm.Boolean":
641
- return "boolean";
642
- case "Edm.Byte":
643
- return "wholeNumber";
644
- case "Edm.DateTime":
645
- return "moment";
646
- // DateTime...
647
- case "Edm.DateTimeOffset":
648
- return "moment";
649
- // DateTimeOffset...
650
- case "Edm.Decimal":
651
- return "decimalNumber";
652
- case "Edm.Double":
653
- return "decimalNumber";
654
- case "Edm.Guid":
655
- return "string";
656
- case "Edm.Int16":
657
- return "wholeNumber";
658
- case "Edm.Int32":
659
- return "wholeNumber";
660
- case "Edm.Int64":
661
- return "wholeNumber";
662
- case "Edm.SByte":
663
- return "wholeNumber";
664
- case "Edm.Single":
665
- return "decimalNumber";
666
- case "Edm.String":
667
- return "string";
668
- case "Edm.Time":
669
- return "momentTime";
670
- // Time...
671
- default:
672
- return "unknown";
673
- }
674
- }
675
- function Ge(e) {
676
- if (e) {
677
- const r = e.lastIndexOf("/"), t = e.lastIndexOf(".", r === -1 ? e.length : r);
678
- return t === -1 ? e : e.slice(0, Math.max(0, t));
679
- }
680
- }
681
- function Pe(e) {
682
- if (e) {
683
- const r = e.lastIndexOf(".");
684
- if (r !== -1) return e.slice(Math.max(0, r + 1));
685
- }
686
- }
687
- function m(e, r = 2, t = r, n = V) {
688
- if (e == null) return "";
689
- const s = `${n}decimal${r}.${t}`;
690
- let o = M.get(s);
691
- return o || (o = new Intl.NumberFormat(n, {
692
- localeMatcher: "best fit",
693
- maximumFractionDigits: r,
694
- minimumFractionDigits: t,
695
- minimumIntegerDigits: 1,
696
- style: "decimal",
697
- useGrouping: !0
698
- }), M.set(s, o)), o.format(e);
699
- }
700
- function ze(e) {
701
- return e == null ? "" : e < 1e3 ? N(e) : e < 1e6 ? `${m(e / 1e3, 2, 0)}K` : e < 1e9 ? `${m(e / 1e6, 2, 0)}M` : e < 1e12 ? `${m(e / 1e9, 2, 0)}B` : `${m(e / 1e12, 2, 0)}T`;
702
- }
703
- function Ve(e) {
704
- return e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${N(e)} bytes` : e < 1048576 ? `${m(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${m(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${m(e / 1073741824, 2, 0)} GB` : `${m(e / 1099511627776, 2, 0)} TB`;
705
- }
706
- function He(e) {
707
- return e == null ? "" : e < 1e3 ? `${N(e)} ms` : e === 1e3 ? `${N(e)} sec` : e < 6e4 ? `${m(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${m(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${m(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${m(e / 864e5, 2, 0)} days`;
708
- }
709
- function N(e, r = V) {
710
- if (e == null) return "";
711
- const t = `${r}decimal0.0`;
712
- let n = M.get(t);
713
- return n || (n = new Intl.NumberFormat(r, {
714
- localeMatcher: "best fit",
715
- maximumFractionDigits: 0,
716
- minimumFractionDigits: 0,
717
- minimumIntegerDigits: 1,
718
- style: "decimal",
719
- useGrouping: !0
720
- }), M.set(t, n)), n.format(e);
721
- }
722
- function Ke(e) {
723
- switch (e) {
724
- case "csv":
725
- return "text/csv";
726
- case "tab":
727
- case "tsv":
728
- return "text/tab-separated-values";
729
- case "xls":
730
- return "application/vnd.ms-excel";
731
- case "xlsx":
732
- return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
733
- default:
734
- return "application/octet-stream";
735
- }
736
- }
737
- const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
738
- const n = e.get(r);
739
- if (n !== void 0) return n;
740
- if (t !== r)
741
- return e.get(t);
742
- }, ve = [
743
- { id: "dtv", labels: c({ "en-gb": "Delimited Text" }) },
744
- { id: "e/e", labels: c({ "en-gb": "Entity/Event" }) },
745
- { id: "jsonArray", labels: c({ "en-gb": "JSON Array" }) },
746
- { id: "spss", labels: c({ "en-gb": "SPSS" }) },
747
- { id: "xls", labels: c({ "en-gb": "XLS" }) },
748
- { id: "xlsx", labels: c({ "en-gb": "XLSX" }) },
749
- { id: "xml", labels: c({ "en-gb": "XML" }) }
750
- ], We = (e = I) => {
751
- const r = [];
752
- for (const t of ve) {
753
- const n = L(t.labels, e);
754
- r.push({ id: t.id, label: n ?? t.id });
755
- }
756
- return r;
757
- }, Ee = [
758
- { id: `
759
- `, labels: c({ "en-gb": "Newline" }) },
760
- { id: "\r", labels: c({ "en-gb": "Carriage Return" }) },
761
- { id: `\r
762
- `, labels: c({ "en-gb": "Carriage Return/Newline" }) }
763
- ], Xe = (e = I) => {
764
- const r = [];
765
- for (const t of Ee) {
766
- const n = L(t.labels, e);
767
- r.push({ id: t.id, label: n ?? t.id });
768
- }
769
- return r;
770
- }, xe = [
771
- { id: ":", labels: c({ "en-gb": "Colon" }) },
772
- { id: ",", labels: c({ "en-gb": "Comma" }) },
773
- { id: "!", labels: c({ "en-gb": "Exclamation Mark" }) },
774
- // { id: '', label: { 'en-gb': 'Other' } }, // TODO: Maybe set this to a 'not printing' or special ascii character when there is a user supplied delimited, rather than ''?
775
- { id: "0x1E", labels: c({ "en-gb": "Record Separator" }) },
776
- { id: ";", labels: c({ "en-gb": "Semicolon" }) },
777
- { id: " ", labels: c({ "en-gb": "Space" }) },
778
- { id: " ", labels: c({ "en-gb": "Tab" }) },
779
- { id: "_", labels: c({ "en-gb": "Underscore" }) },
780
- { id: "0x1F", labels: c({ "en-gb": "Unit Separator" }) },
781
- { id: "|", labels: c({ "en-gb": "Vertical Bar" }) }
782
- ], Je = (e = I) => {
783
- const r = [];
784
- for (const t of xe) {
785
- const n = L(t.labels, e);
786
- r.push({ id: t.id, label: n ?? t.id });
787
- }
788
- return r;
789
- }, I = "en-gb";
790
- export {
791
- Ce as APIError,
792
- w as ApplicationError,
793
- we as CONNECTOR_DESTINATION_OPERATIONS,
794
- Ie as CONNECTOR_SOURCE_OPERATIONS,
795
- I as DEFAULT_LOCALE_CODE,
796
- Me as EngineError,
797
- z as FetchError,
798
- Ae as OperationalError,
799
- be as VueError,
800
- je as WindowPromiseRejectionError,
801
- Ne as WindowRuntimeError,
802
- Re as buildFetchError,
803
- Se as componentConfigSchema,
804
- Te as concatenateSerialisedErrorMessages,
805
- De as connectorConfigSchema,
806
- Oe as contextConfigSchema,
807
- Be as convertODataTypeIdToUsageTypeId,
808
- Pe as extractExtensionFromPath,
809
- Ge as extractNameFromPath,
810
- m as formatNumberAsDecimalNumber,
811
- He as formatNumberAsDuration,
812
- ze as formatNumberAsSize,
813
- Ve as formatNumberAsStorageSize,
814
- N as formatNumberAsWholeNumber,
815
- ke as getComponentStatus,
816
- We as getDataFormats,
817
- Xe as getRecordDelimiters,
818
- Je as getValueDelimiters,
819
- Ke as lookupMimeTypeForExtension,
820
- $e as normalizeToError,
821
- Le as presenterConfigSchema,
822
- Fe as serialiseError,
823
- _e as useCytoscapeJS,
824
- Ue as useDataTable
825
- };