@epam/statgpt-sdmx-toolkit 0.5.0-rc.19 → 0.5.0-rc.20

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/index.mjs CHANGED
@@ -12,83 +12,83 @@ const z = (t) => {
12
12
  version: ""
13
13
  };
14
14
  return e && (e.includes(":") && (n.agency = e.split(":")[0], n.id = e.split(":")[1].split("(")[0]), e.includes("(") && e.includes(")") && (n.version = e.split("(")[1]?.split(")")[0])), n;
15
- }, nt = (t) => {
15
+ }, rt = (t) => {
16
16
  const [e, n] = t.split(")."), { agency: r, id: s, version: a } = S(e + ")");
17
17
  return { childId: n, agency: r, id: s, version: a };
18
18
  }, ue = (t, e, n) => {
19
19
  const r = e === "" ? "" : `(${e})`;
20
20
  return `${n}:${t}${r}`;
21
21
  };
22
- var de = /* @__PURE__ */ ((t) => (t.DESCENDANTS = "descendants", t.NONE = "none", t.ALL = "all", t))(de || {}), rt = /* @__PURE__ */ ((t) => (t.EXACT = "exact", t.AVAILABLE = "available", t))(rt || {});
23
- function Nt(t) {
22
+ var de = /* @__PURE__ */ ((t) => (t.DESCENDANTS = "descendants", t.NONE = "none", t.ALL = "all", t))(de || {}), st = /* @__PURE__ */ ((t) => (t.EXACT = "exact", t.AVAILABLE = "available", t))(st || {});
23
+ function _t(t) {
24
24
  return {
25
25
  data: {
26
26
  codelists: t.data.codelists,
27
27
  conceptSchemes: t.data.conceptSchemes,
28
- dataConstraints: t.data.dataConstraints?.map(Rt),
28
+ dataConstraints: t.data.dataConstraints?.map(kt),
29
29
  dataflows: t.data.dataflows,
30
30
  dataStructures: t.data.dataStructures,
31
31
  metadataStructures: t.data.metadataStructures
32
32
  }
33
33
  };
34
34
  }
35
- function Rt(t) {
35
+ function kt(t) {
36
36
  return {
37
37
  ...t,
38
- cubeRegions: t.cubeRegions?.map(kt)
38
+ cubeRegions: t.cubeRegions?.map(It)
39
39
  };
40
40
  }
41
- function kt(t) {
41
+ function It(t) {
42
42
  return {
43
43
  isIncluded: t.include,
44
- memberSelection: t.keyValues.map(_t)
44
+ memberSelection: t.keyValues.map(Yt)
45
45
  };
46
46
  }
47
- function _t(t) {
47
+ function Yt(t) {
48
48
  return {
49
49
  included: t.include,
50
50
  componentId: t.id,
51
- selectionValues: t.values.map(It)
51
+ selectionValues: t.values.map(Ct)
52
52
  };
53
53
  }
54
- function It(t) {
54
+ function Ct(t) {
55
55
  return {
56
56
  memberValue: t.value
57
57
  };
58
58
  }
59
- const Yt = (t = "", e = "", n = "") => `sdmx/3.0/availability/dataflow/${t}/${e}/${n}`;
60
- class Ha {
59
+ const St = (t = "", e = "", n = "") => `sdmx/3.0/availability/dataflow/${t}/${e}/${n}`;
60
+ class Va {
61
61
  constructor(e) {
62
62
  this.client = e;
63
63
  }
64
64
  async getConstraints(e, n, r) {
65
- const { agency: s, id: a, version: o } = S(e), c = {
65
+ const { agency: s, id: a, version: o } = S(e), i = {
66
66
  filters: n || [],
67
- mode: rt.AVAILABLE,
67
+ mode: st.AVAILABLE,
68
68
  references: de.NONE
69
- }, i = Yt(s, a, o), u = !!this.client.config.sdmxProxyUrl, d = u || this.client.config.isDialProxyMode, l = u ? this.client.config.sdmxProxyUrl : this.client.config.constrainsApiUrl || this.client.config.apiUrl;
69
+ }, c = St(s, a, o), u = !!this.client.config.sdmxProxyUrl, d = u || this.client.config.isDialProxyMode, l = u ? this.client.config.sdmxProxyUrl : this.client.config.constrainsApiUrl || this.client.config.apiUrl;
70
70
  if (d) {
71
71
  const m = await this.client.postRequest(
72
- i,
73
- { body: c },
72
+ c,
73
+ { body: i },
74
74
  l,
75
75
  r
76
76
  );
77
- return Nt(m);
77
+ return _t(m);
78
78
  }
79
79
  return await this.client.postRequest(
80
- i,
81
- { body: c },
80
+ c,
81
+ { body: i },
82
82
  l,
83
83
  r
84
84
  );
85
85
  }
86
86
  }
87
- var C = /* @__PURE__ */ ((t) => (t.CSV = "csv", t.JSON = "json", t.XML = "xml", t))(C || {}), Ct = /* @__PURE__ */ ((t) => (t.ID = "id", t.NAME = "name", t.ID_NAME = "both", t))(Ct || {}), St = /* @__PURE__ */ ((t) => (t.FULL_DATASET = "full", t.DATA_IN_TABLE = "query", t))(St || {});
88
- const Lt = (t, e) => {
87
+ var C = /* @__PURE__ */ ((t) => (t.CSV = "csv", t.JSON = "json", t.XML = "xml", t))(C || {}), Lt = /* @__PURE__ */ ((t) => (t.ID = "id", t.NAME = "name", t.ID_NAME = "both", t))(Lt || {}), $t = /* @__PURE__ */ ((t) => (t.FULL_DATASET = "full", t.DATA_IN_TABLE = "query", t))($t || {});
88
+ const Wt = (t, e) => {
89
89
  switch (t) {
90
90
  case C.CSV:
91
- return _e(
91
+ return ke(
92
92
  "application/vnd.sdmx.data+csv;version=2.0.0",
93
93
  e
94
94
  );
@@ -97,12 +97,12 @@ const Lt = (t, e) => {
97
97
  case C.JSON:
98
98
  return "application/vnd.sdmx.data+json;version=2.1";
99
99
  default:
100
- return _e(
100
+ return ke(
101
101
  "application/vnd.sdmx.data+csv;version=2.0.0",
102
102
  e
103
103
  );
104
104
  }
105
- }, $t = (t) => {
105
+ }, qt = (t) => {
106
106
  switch (t) {
107
107
  case C.CSV:
108
108
  return "text/csv; charset=utf-8";
@@ -113,20 +113,20 @@ const Lt = (t, e) => {
113
113
  default:
114
114
  return "text/csv; charset=utf-8";
115
115
  }
116
- }, _e = (t, e) => `${t}; labels=${e}`;
117
- var st = /* @__PURE__ */ ((t) => (t.REFERENCE_PARTIAL = "referencepartial", t.FULL = "full", t))(st || {});
118
- const Wt = "all", qt = "sdmx/3.0/data/dataflow", Ut = "&", Ie = ":", Ht = "=", at = "+", Fa = ",", Ft = "*", Ye = (t, e, n) => {
119
- const { filterKey: r, timeFilter: s } = n, { agency: a, id: o, version: c } = S(t), i = [s || "", e].filter((d) => !!d).join(Ut);
120
- return `${`${qt}/${a}/${o}/${c}`}/${r || Ft}?${i}`;
121
- }, Qt = (t = "", e = "", n = "", r = de.DESCENDANTS) => `sdmx/3.0/structure/dataflow/${t}/${e}/${n}?references=${r}&detail=${st.REFERENCE_PARTIAL}`;
122
- class Qa {
116
+ }, ke = (t, e) => `${t}; labels=${e}`;
117
+ var at = /* @__PURE__ */ ((t) => (t.REFERENCE_PARTIAL = "referencepartial", t.FULL = "full", t))(at || {});
118
+ const Ut = "all", Ft = "sdmx/3.0/data/dataflow", Ht = "&", Ie = ":", Qt = "=", ot = "+", Ga = ",", Bt = "*", Ye = (t, e, n) => {
119
+ const { filterKey: r, timeFilter: s } = n, { agency: a, id: o, version: i } = S(t), c = [s || "", e].filter((d) => !!d).join(Ht);
120
+ return `${`${Ft}/${a}/${o}/${i}`}/${r || Bt}?${c}`;
121
+ }, Vt = (t = "", e = "", n = "", r = de.DESCENDANTS) => `sdmx/3.0/structure/dataflow/${t}/${e}/${n}?references=${r}&detail=${at.REFERENCE_PARTIAL}`;
122
+ class Xa {
123
123
  constructor(e) {
124
124
  this.client = e;
125
125
  }
126
126
  async getDataSet(e, n, r) {
127
127
  const { agency: s, id: a, version: o } = S(e);
128
128
  return await this.client.getRequest(
129
- Qt(s, a, o, n),
129
+ Vt(s, a, o, n),
130
130
  void 0,
131
131
  r
132
132
  );
@@ -135,7 +135,7 @@ class Qa {
135
135
  const s = new URLSearchParams({
136
136
  includeHistory: "false",
137
137
  limit: "1000",
138
- attributes: Wt,
138
+ attributes: Ut,
139
139
  dimensionAtObservation: "TIME_PERIOD"
140
140
  // TODO: use time dimensions
141
141
  }).toString(), a = Ye(e, s, n);
@@ -145,10 +145,10 @@ class Qa {
145
145
  r
146
146
  );
147
147
  }
148
- async downloadDataSet(e, n, r, s, a, o, c = !1, i) {
148
+ async downloadDataSet(e, n, r, s, a, o, i = !1, c) {
149
149
  const u = new URLSearchParams({
150
150
  compress: "false",
151
- attributes: c ? "all" : "none",
151
+ attributes: i ? "all" : "none",
152
152
  limit: "1000"
153
153
  }).toString(), d = Ye(e, u, a);
154
154
  return this.client.streamRequest(
@@ -156,36 +156,36 @@ class Qa {
156
156
  {
157
157
  method: "GET",
158
158
  headers: {
159
- Accept: Lt(n, s),
159
+ Accept: Wt(n, s),
160
160
  "Accept-language": r
161
161
  }
162
162
  },
163
163
  o,
164
- i,
165
- $t(n)
164
+ c,
165
+ qt(n)
166
166
  );
167
167
  }
168
168
  }
169
- const Bt = (t, e) => t.error || t.message || `${e.status} ${e.statusText}`, Vt = "application/json", Gt = "Content-Type", X = "Api-Key", Xt = "X-CONVERSATION-ID", j = "Ocp-Apim-Subscription-Key", Ce = "X-Source-Artefact-Urn";
169
+ const Gt = (t, e) => t.error || t.message || `${e.status} ${e.statusText}`, Xt = "application/json", jt = "Content-Type", X = "Api-Key", zt = "X-CONVERSATION-ID", j = "Ocp-Apim-Subscription-Key", Ce = "X-Source-Artefact-Urn";
170
170
  class Se extends Error {
171
171
  constructor(e) {
172
172
  super(e.message), this.isHttpError = !0, this.name = "HttpError", this.code = e.code, this.status = e.status, this.details = e.details, this.displayMessage = e.displayMessage;
173
173
  }
174
174
  }
175
- const ot = 6048e5, jt = 864e5, le = 6e4, fe = 36e5, zt = 1e3, Le = /* @__PURE__ */ Symbol.for("constructDateFrom");
176
- function x(t, e) {
175
+ const it = 6048e5, Kt = 864e5, le = 6e4, fe = 36e5, Jt = 1e3, Le = /* @__PURE__ */ Symbol.for("constructDateFrom");
176
+ function T(t, e) {
177
177
  return typeof t == "function" ? t(e) : t && typeof t == "object" && Le in t ? t[Le](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
178
178
  }
179
179
  function y(t, e) {
180
- return x(e || t, t);
180
+ return T(e || t, t);
181
181
  }
182
- function it(t, e, n) {
182
+ function ct(t, e, n) {
183
183
  const r = y(t, n?.in);
184
- return isNaN(e) ? x(n?.in || t, NaN) : (e && r.setDate(r.getDate() + e), r);
184
+ return isNaN(e) ? T(n?.in || t, NaN) : (e && r.setDate(r.getDate() + e), r);
185
185
  }
186
- let Kt = {};
186
+ let Zt = {};
187
187
  function W() {
188
- return Kt;
188
+ return Zt;
189
189
  }
190
190
  function I(t, e) {
191
191
  const n = W(), r = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = y(t, e?.in), a = s.getDay(), o = (a < r ? 7 : 0) + a - r;
@@ -194,13 +194,13 @@ function I(t, e) {
194
194
  function $(t, e) {
195
195
  return I(t, { ...e, weekStartsOn: 1 });
196
196
  }
197
- function ct(t, e) {
198
- const n = y(t, e?.in), r = n.getFullYear(), s = x(n, 0);
197
+ function ut(t, e) {
198
+ const n = y(t, e?.in), r = n.getFullYear(), s = T(n, 0);
199
199
  s.setFullYear(r + 1, 0, 4), s.setHours(0, 0, 0, 0);
200
- const a = $(s), o = x(n, 0);
200
+ const a = $(s), o = T(n, 0);
201
201
  o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
202
- const c = $(o);
203
- return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= c.getTime() ? r : r - 1;
202
+ const i = $(o);
203
+ return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= i.getTime() ? r : r - 1;
204
204
  }
205
205
  function K(t) {
206
206
  const e = y(t), n = new Date(
@@ -216,8 +216,8 @@ function K(t) {
216
216
  );
217
217
  return n.setUTCFullYear(e.getFullYear()), +t - +n;
218
218
  }
219
- function Jt(t, ...e) {
220
- const n = x.bind(
219
+ function en(t, ...e) {
220
+ const n = T.bind(
221
221
  null,
222
222
  e.find((r) => typeof r == "object")
223
223
  );
@@ -227,29 +227,29 @@ function $e(t, e) {
227
227
  const n = y(t, e?.in);
228
228
  return n.setHours(0, 0, 0, 0), n;
229
229
  }
230
- function Zt(t, e, n) {
231
- const [r, s] = Jt(
230
+ function tn(t, e, n) {
231
+ const [r, s] = en(
232
232
  n?.in,
233
233
  t,
234
234
  e
235
- ), a = $e(r), o = $e(s), c = +a - K(a), i = +o - K(o);
236
- return Math.round((c - i) / jt);
235
+ ), a = $e(r), o = $e(s), i = +a - K(a), c = +o - K(o);
236
+ return Math.round((i - c) / Kt);
237
237
  }
238
- function en(t, e) {
239
- const n = ct(t, e), r = x(t, 0);
238
+ function nn(t, e) {
239
+ const n = ut(t, e), r = T(t, 0);
240
240
  return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), $(r);
241
241
  }
242
- function tn(t) {
242
+ function rn(t) {
243
243
  return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
244
244
  }
245
245
  function ne(t) {
246
- return !(!tn(t) && typeof t != "number" || isNaN(+y(t)));
246
+ return !(!rn(t) && typeof t != "number" || isNaN(+y(t)));
247
247
  }
248
- function nn(t, e) {
248
+ function sn(t, e) {
249
249
  const n = y(t, e?.in);
250
250
  return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
251
251
  }
252
- const rn = {
252
+ const an = {
253
253
  lessThanXSeconds: {
254
254
  one: "less than a second",
255
255
  other: "less than {{count}} seconds"
@@ -311,9 +311,9 @@ const rn = {
311
311
  one: "almost 1 year",
312
312
  other: "almost {{count}} years"
313
313
  }
314
- }, sn = (t, e, n) => {
314
+ }, on = (t, e, n) => {
315
315
  let r;
316
- const s = rn[t];
316
+ const s = an[t];
317
317
  return typeof s == "string" ? r = s : e === 1 ? r = s.one : r = s.other.replace("{{count}}", e.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
318
318
  };
319
319
  function ee(t) {
@@ -322,66 +322,66 @@ function ee(t) {
322
322
  return t.formats[n] || t.formats[t.defaultWidth];
323
323
  };
324
324
  }
325
- const an = {
325
+ const cn = {
326
326
  full: "EEEE, MMMM do, y",
327
327
  long: "MMMM do, y",
328
328
  medium: "MMM d, y",
329
329
  short: "MM/dd/yyyy"
330
- }, on = {
330
+ }, un = {
331
331
  full: "h:mm:ss a zzzz",
332
332
  long: "h:mm:ss a z",
333
333
  medium: "h:mm:ss a",
334
334
  short: "h:mm a"
335
- }, cn = {
335
+ }, dn = {
336
336
  full: "{{date}} 'at' {{time}}",
337
337
  long: "{{date}} 'at' {{time}}",
338
338
  medium: "{{date}}, {{time}}",
339
339
  short: "{{date}}, {{time}}"
340
- }, un = {
340
+ }, ln = {
341
341
  date: ee({
342
- formats: an,
342
+ formats: cn,
343
343
  defaultWidth: "full"
344
344
  }),
345
345
  time: ee({
346
- formats: on,
346
+ formats: un,
347
347
  defaultWidth: "full"
348
348
  }),
349
349
  dateTime: ee({
350
- formats: cn,
350
+ formats: dn,
351
351
  defaultWidth: "full"
352
352
  })
353
- }, dn = {
353
+ }, fn = {
354
354
  lastWeek: "'last' eeee 'at' p",
355
355
  yesterday: "'yesterday at' p",
356
356
  today: "'today at' p",
357
357
  tomorrow: "'tomorrow at' p",
358
358
  nextWeek: "eeee 'at' p",
359
359
  other: "P"
360
- }, ln = (t, e, n, r) => dn[t];
361
- function H(t) {
360
+ }, mn = (t, e, n, r) => fn[t];
361
+ function F(t) {
362
362
  return (e, n) => {
363
363
  const r = n?.context ? String(n.context) : "standalone";
364
364
  let s;
365
365
  if (r === "formatting" && t.formattingValues) {
366
- const o = t.defaultFormattingWidth || t.defaultWidth, c = n?.width ? String(n.width) : o;
367
- s = t.formattingValues[c] || t.formattingValues[o];
366
+ const o = t.defaultFormattingWidth || t.defaultWidth, i = n?.width ? String(n.width) : o;
367
+ s = t.formattingValues[i] || t.formattingValues[o];
368
368
  } else {
369
- const o = t.defaultWidth, c = n?.width ? String(n.width) : t.defaultWidth;
370
- s = t.values[c] || t.values[o];
369
+ const o = t.defaultWidth, i = n?.width ? String(n.width) : t.defaultWidth;
370
+ s = t.values[i] || t.values[o];
371
371
  }
372
372
  const a = t.argumentCallback ? t.argumentCallback(e) : e;
373
373
  return s[a];
374
374
  };
375
375
  }
376
- const fn = {
376
+ const hn = {
377
377
  narrow: ["B", "A"],
378
378
  abbreviated: ["BC", "AD"],
379
379
  wide: ["Before Christ", "Anno Domini"]
380
- }, mn = {
380
+ }, wn = {
381
381
  narrow: ["1", "2", "3", "4"],
382
382
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
383
383
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
384
- }, hn = {
384
+ }, gn = {
385
385
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
386
386
  abbreviated: [
387
387
  "Jan",
@@ -411,7 +411,7 @@ const fn = {
411
411
  "November",
412
412
  "December"
413
413
  ]
414
- }, gn = {
414
+ }, pn = {
415
415
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
416
416
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
417
417
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -424,7 +424,7 @@ const fn = {
424
424
  "Friday",
425
425
  "Saturday"
426
426
  ]
427
- }, wn = {
427
+ }, yn = {
428
428
  narrow: {
429
429
  am: "a",
430
430
  pm: "p",
@@ -455,7 +455,7 @@ const fn = {
455
455
  evening: "evening",
456
456
  night: "night"
457
457
  }
458
- }, pn = {
458
+ }, bn = {
459
459
  narrow: {
460
460
  am: "a",
461
461
  pm: "p",
@@ -486,7 +486,7 @@ const fn = {
486
486
  evening: "in the evening",
487
487
  night: "at night"
488
488
  }
489
- }, yn = (t, e) => {
489
+ }, Dn = (t, e) => {
490
490
  const n = Number(t), r = n % 100;
491
491
  if (r > 20 || r < 10)
492
492
  switch (r % 10) {
@@ -498,43 +498,43 @@ const fn = {
498
498
  return n + "rd";
499
499
  }
500
500
  return n + "th";
501
- }, bn = {
502
- ordinalNumber: yn,
503
- era: H({
504
- values: fn,
501
+ }, En = {
502
+ ordinalNumber: Dn,
503
+ era: F({
504
+ values: hn,
505
505
  defaultWidth: "wide"
506
506
  }),
507
- quarter: H({
508
- values: mn,
507
+ quarter: F({
508
+ values: wn,
509
509
  defaultWidth: "wide",
510
510
  argumentCallback: (t) => t - 1
511
511
  }),
512
- month: H({
513
- values: hn,
512
+ month: F({
513
+ values: gn,
514
514
  defaultWidth: "wide"
515
515
  }),
516
- day: H({
517
- values: gn,
516
+ day: F({
517
+ values: pn,
518
518
  defaultWidth: "wide"
519
519
  }),
520
- dayPeriod: H({
521
- values: wn,
520
+ dayPeriod: F({
521
+ values: yn,
522
522
  defaultWidth: "wide",
523
- formattingValues: pn,
523
+ formattingValues: bn,
524
524
  defaultFormattingWidth: "wide"
525
525
  })
526
526
  };
527
- function F(t) {
527
+ function H(t) {
528
528
  return (e, n = {}) => {
529
529
  const r = n.width, s = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = e.match(s);
530
530
  if (!a)
531
531
  return null;
532
- const o = a[0], c = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], i = Array.isArray(c) ? Tn(c, (l) => l.test(o)) : (
532
+ const o = a[0], i = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(i) ? xn(i, (l) => l.test(o)) : (
533
533
  // [TODO] -- I challenge you to fix the type
534
- Dn(c, (l) => l.test(o))
534
+ Tn(i, (l) => l.test(o))
535
535
  );
536
536
  let u;
537
- u = t.valueCallback ? t.valueCallback(i) : i, u = n.valueCallback ? (
537
+ u = t.valueCallback ? t.valueCallback(c) : c, u = n.valueCallback ? (
538
538
  // [TODO] -- I challenge you to fix the type
539
539
  n.valueCallback(u)
540
540
  ) : u;
@@ -542,17 +542,17 @@ function F(t) {
542
542
  return { value: u, rest: d };
543
543
  };
544
544
  }
545
- function Dn(t, e) {
545
+ function Tn(t, e) {
546
546
  for (const n in t)
547
547
  if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
548
548
  return n;
549
549
  }
550
- function Tn(t, e) {
550
+ function xn(t, e) {
551
551
  for (let n = 0; n < t.length; n++)
552
552
  if (e(t[n]))
553
553
  return n;
554
554
  }
555
- function En(t) {
555
+ function Pn(t) {
556
556
  return (e, n = {}) => {
557
557
  const r = e.match(t.matchPattern);
558
558
  if (!r) return null;
@@ -560,27 +560,27 @@ function En(t) {
560
560
  if (!a) return null;
561
561
  let o = t.valueCallback ? t.valueCallback(a[0]) : a[0];
562
562
  o = n.valueCallback ? n.valueCallback(o) : o;
563
- const c = e.slice(s.length);
564
- return { value: o, rest: c };
563
+ const i = e.slice(s.length);
564
+ return { value: o, rest: i };
565
565
  };
566
566
  }
567
- const xn = /^(\d+)(th|st|nd|rd)?/i, Pn = /\d+/i, vn = {
567
+ const vn = /^(\d+)(th|st|nd|rd)?/i, Mn = /\d+/i, On = {
568
568
  narrow: /^(b|a)/i,
569
569
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
570
570
  wide: /^(before christ|before common era|anno domini|common era)/i
571
- }, Mn = {
571
+ }, An = {
572
572
  any: [/^b/i, /^(a|c)/i]
573
- }, On = {
573
+ }, Nn = {
574
574
  narrow: /^[1234]/i,
575
575
  abbreviated: /^q[1234]/i,
576
576
  wide: /^[1234](th|st|nd|rd)? quarter/i
577
- }, An = {
577
+ }, Rn = {
578
578
  any: [/1/i, /2/i, /3/i, /4/i]
579
- }, Nn = {
579
+ }, _n = {
580
580
  narrow: /^[jfmasond]/i,
581
581
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
582
582
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
583
- }, Rn = {
583
+ }, kn = {
584
584
  narrow: [
585
585
  /^j/i,
586
586
  /^f/i,
@@ -609,18 +609,18 @@ const xn = /^(\d+)(th|st|nd|rd)?/i, Pn = /\d+/i, vn = {
609
609
  /^n/i,
610
610
  /^d/i
611
611
  ]
612
- }, kn = {
612
+ }, In = {
613
613
  narrow: /^[smtwf]/i,
614
614
  short: /^(su|mo|tu|we|th|fr|sa)/i,
615
615
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
616
616
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
617
- }, _n = {
617
+ }, Yn = {
618
618
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
619
619
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
620
- }, In = {
620
+ }, Cn = {
621
621
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
622
622
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
623
- }, Yn = {
623
+ }, Sn = {
624
624
  any: {
625
625
  am: /^a/i,
626
626
  pm: /^p/i,
@@ -631,80 +631,80 @@ const xn = /^(\d+)(th|st|nd|rd)?/i, Pn = /\d+/i, vn = {
631
631
  evening: /evening/i,
632
632
  night: /night/i
633
633
  }
634
- }, Cn = {
635
- ordinalNumber: En({
636
- matchPattern: xn,
637
- parsePattern: Pn,
634
+ }, Ln = {
635
+ ordinalNumber: Pn({
636
+ matchPattern: vn,
637
+ parsePattern: Mn,
638
638
  valueCallback: (t) => parseInt(t, 10)
639
639
  }),
640
- era: F({
641
- matchPatterns: vn,
640
+ era: H({
641
+ matchPatterns: On,
642
642
  defaultMatchWidth: "wide",
643
- parsePatterns: Mn,
643
+ parsePatterns: An,
644
644
  defaultParseWidth: "any"
645
645
  }),
646
- quarter: F({
647
- matchPatterns: On,
646
+ quarter: H({
647
+ matchPatterns: Nn,
648
648
  defaultMatchWidth: "wide",
649
- parsePatterns: An,
649
+ parsePatterns: Rn,
650
650
  defaultParseWidth: "any",
651
651
  valueCallback: (t) => t + 1
652
652
  }),
653
- month: F({
654
- matchPatterns: Nn,
653
+ month: H({
654
+ matchPatterns: _n,
655
655
  defaultMatchWidth: "wide",
656
- parsePatterns: Rn,
656
+ parsePatterns: kn,
657
657
  defaultParseWidth: "any"
658
658
  }),
659
- day: F({
660
- matchPatterns: kn,
659
+ day: H({
660
+ matchPatterns: In,
661
661
  defaultMatchWidth: "wide",
662
- parsePatterns: _n,
662
+ parsePatterns: Yn,
663
663
  defaultParseWidth: "any"
664
664
  }),
665
- dayPeriod: F({
666
- matchPatterns: In,
665
+ dayPeriod: H({
666
+ matchPatterns: Cn,
667
667
  defaultMatchWidth: "any",
668
- parsePatterns: Yn,
668
+ parsePatterns: Sn,
669
669
  defaultParseWidth: "any"
670
670
  })
671
- }, ut = {
671
+ }, dt = {
672
672
  code: "en-US",
673
- formatDistance: sn,
674
- formatLong: un,
675
- formatRelative: ln,
676
- localize: bn,
677
- match: Cn,
673
+ formatDistance: on,
674
+ formatLong: ln,
675
+ formatRelative: mn,
676
+ localize: En,
677
+ match: Ln,
678
678
  options: {
679
679
  weekStartsOn: 0,
680
680
  firstWeekContainsDate: 1
681
681
  }
682
682
  };
683
- function Sn(t, e) {
683
+ function $n(t, e) {
684
684
  const n = y(t, e?.in);
685
- return Zt(n, nn(n)) + 1;
685
+ return tn(n, sn(n)) + 1;
686
686
  }
687
- function dt(t, e) {
688
- const n = y(t, e?.in), r = +$(n) - +en(n);
689
- return Math.round(r / ot) + 1;
687
+ function lt(t, e) {
688
+ const n = y(t, e?.in), r = +$(n) - +nn(n);
689
+ return Math.round(r / it) + 1;
690
690
  }
691
691
  function me(t, e) {
692
- const n = y(t, e?.in), r = n.getFullYear(), s = W(), a = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, o = x(e?.in || t, 0);
692
+ const n = y(t, e?.in), r = n.getFullYear(), s = W(), a = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, o = T(e?.in || t, 0);
693
693
  o.setFullYear(r + 1, 0, a), o.setHours(0, 0, 0, 0);
694
- const c = I(o, e), i = x(e?.in || t, 0);
695
- i.setFullYear(r, 0, a), i.setHours(0, 0, 0, 0);
696
- const u = I(i, e);
697
- return +n >= +c ? r + 1 : +n >= +u ? r : r - 1;
694
+ const i = I(o, e), c = T(e?.in || t, 0);
695
+ c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
696
+ const u = I(c, e);
697
+ return +n >= +i ? r + 1 : +n >= +u ? r : r - 1;
698
698
  }
699
- function Ln(t, e) {
700
- const n = W(), r = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, s = me(t, e), a = x(e?.in || t, 0);
699
+ function Wn(t, e) {
700
+ const n = W(), r = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, s = me(t, e), a = T(e?.in || t, 0);
701
701
  return a.setFullYear(s, 0, r), a.setHours(0, 0, 0, 0), I(a, e);
702
702
  }
703
- function lt(t, e) {
704
- const n = y(t, e?.in), r = +I(n, e) - +Ln(n, e);
705
- return Math.round(r / ot) + 1;
703
+ function ft(t, e) {
704
+ const n = y(t, e?.in), r = +I(n, e) - +Wn(n, e);
705
+ return Math.round(r / it) + 1;
706
706
  }
707
- function g(t, e) {
707
+ function w(t, e) {
708
708
  const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
709
709
  return n + r;
710
710
  }
@@ -712,16 +712,16 @@ const R = {
712
712
  // Year
713
713
  y(t, e) {
714
714
  const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
715
- return g(e === "yy" ? r % 100 : r, e.length);
715
+ return w(e === "yy" ? r % 100 : r, e.length);
716
716
  },
717
717
  // Month
718
718
  M(t, e) {
719
719
  const n = t.getMonth();
720
- return e === "M" ? String(n + 1) : g(n + 1, 2);
720
+ return e === "M" ? String(n + 1) : w(n + 1, 2);
721
721
  },
722
722
  // Day of the month
723
723
  d(t, e) {
724
- return g(t.getDate(), e.length);
724
+ return w(t.getDate(), e.length);
725
725
  },
726
726
  // AM or PM
727
727
  a(t, e) {
@@ -740,26 +740,26 @@ const R = {
740
740
  },
741
741
  // Hour [1-12]
742
742
  h(t, e) {
743
- return g(t.getHours() % 12 || 12, e.length);
743
+ return w(t.getHours() % 12 || 12, e.length);
744
744
  },
745
745
  // Hour [0-23]
746
746
  H(t, e) {
747
- return g(t.getHours(), e.length);
747
+ return w(t.getHours(), e.length);
748
748
  },
749
749
  // Minute
750
750
  m(t, e) {
751
- return g(t.getMinutes(), e.length);
751
+ return w(t.getMinutes(), e.length);
752
752
  },
753
753
  // Second
754
754
  s(t, e) {
755
- return g(t.getSeconds(), e.length);
755
+ return w(t.getSeconds(), e.length);
756
756
  },
757
757
  // Fraction of second
758
758
  S(t, e) {
759
759
  const n = e.length, r = t.getMilliseconds(), s = Math.trunc(
760
760
  r * Math.pow(10, n - 3)
761
761
  );
762
- return g(s, e.length);
762
+ return w(s, e.length);
763
763
  }
764
764
  }, L = {
765
765
  midnight: "midnight",
@@ -798,14 +798,14 @@ const R = {
798
798
  const s = me(t, r), a = s > 0 ? s : 1 - s;
799
799
  if (e === "YY") {
800
800
  const o = a % 100;
801
- return g(o, 2);
801
+ return w(o, 2);
802
802
  }
803
- return e === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : g(a, e.length);
803
+ return e === "Yo" ? n.ordinalNumber(a, { unit: "year" }) : w(a, e.length);
804
804
  },
805
805
  // ISO week-numbering year
806
806
  R: function(t, e) {
807
- const n = ct(t);
808
- return g(n, e.length);
807
+ const n = ut(t);
808
+ return w(n, e.length);
809
809
  },
810
810
  // Extended year. This is a single number designating the year of this calendar system.
811
811
  // The main difference between `y` and `u` localizers are B.C. years:
@@ -818,7 +818,7 @@ const R = {
818
818
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
819
819
  u: function(t, e) {
820
820
  const n = t.getFullYear();
821
- return g(n, e.length);
821
+ return w(n, e.length);
822
822
  },
823
823
  // Quarter
824
824
  Q: function(t, e, n) {
@@ -829,7 +829,7 @@ const R = {
829
829
  return String(r);
830
830
  // 01, 02, 03, 04
831
831
  case "QQ":
832
- return g(r, 2);
832
+ return w(r, 2);
833
833
  // 1st, 2nd, 3rd, 4th
834
834
  case "Qo":
835
835
  return n.ordinalNumber(r, { unit: "quarter" });
@@ -861,7 +861,7 @@ const R = {
861
861
  return String(r);
862
862
  // 01, 02, 03, 04
863
863
  case "qq":
864
- return g(r, 2);
864
+ return w(r, 2);
865
865
  // 1st, 2nd, 3rd, 4th
866
866
  case "qo":
867
867
  return n.ordinalNumber(r, { unit: "quarter" });
@@ -919,7 +919,7 @@ const R = {
919
919
  return String(r + 1);
920
920
  // 01, 02, ..., 12
921
921
  case "LL":
922
- return g(r + 1, 2);
922
+ return w(r + 1, 2);
923
923
  // 1st, 2nd, ..., 12th
924
924
  case "Lo":
925
925
  return n.ordinalNumber(r + 1, { unit: "month" });
@@ -941,13 +941,13 @@ const R = {
941
941
  },
942
942
  // Local week of year
943
943
  w: function(t, e, n, r) {
944
- const s = lt(t, r);
945
- return e === "wo" ? n.ordinalNumber(s, { unit: "week" }) : g(s, e.length);
944
+ const s = ft(t, r);
945
+ return e === "wo" ? n.ordinalNumber(s, { unit: "week" }) : w(s, e.length);
946
946
  },
947
947
  // ISO week of year
948
948
  I: function(t, e, n) {
949
- const r = dt(t);
950
- return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : g(r, e.length);
949
+ const r = lt(t);
950
+ return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : w(r, e.length);
951
951
  },
952
952
  // Day of the month
953
953
  d: function(t, e, n) {
@@ -955,8 +955,8 @@ const R = {
955
955
  },
956
956
  // Day of year
957
957
  D: function(t, e, n) {
958
- const r = Sn(t);
959
- return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : g(r, e.length);
958
+ const r = $n(t);
959
+ return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : w(r, e.length);
960
960
  },
961
961
  // Day of week
962
962
  E: function(t, e, n) {
@@ -998,7 +998,7 @@ const R = {
998
998
  return String(a);
999
999
  // Padded numerical value
1000
1000
  case "ee":
1001
- return g(a, 2);
1001
+ return w(a, 2);
1002
1002
  // 1st, 2nd, ..., 7th
1003
1003
  case "eo":
1004
1004
  return n.ordinalNumber(a, { unit: "day" });
@@ -1035,7 +1035,7 @@ const R = {
1035
1035
  return String(a);
1036
1036
  // Padded numerical value
1037
1037
  case "cc":
1038
- return g(a, e.length);
1038
+ return w(a, e.length);
1039
1039
  // 1st, 2nd, ..., 7th
1040
1040
  case "co":
1041
1041
  return n.ordinalNumber(a, { unit: "day" });
@@ -1072,7 +1072,7 @@ const R = {
1072
1072
  return String(s);
1073
1073
  // 02
1074
1074
  case "ii":
1075
- return g(s, e.length);
1075
+ return w(s, e.length);
1076
1076
  // 2nd
1077
1077
  case "io":
1078
1078
  return n.ordinalNumber(s, { unit: "day" });
@@ -1195,12 +1195,12 @@ const R = {
1195
1195
  // Hour [0-11]
1196
1196
  K: function(t, e, n) {
1197
1197
  const r = t.getHours() % 12;
1198
- return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : g(r, e.length);
1198
+ return e === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : w(r, e.length);
1199
1199
  },
1200
1200
  // Hour [1-24]
1201
1201
  k: function(t, e, n) {
1202
1202
  let r = t.getHours();
1203
- return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : g(r, e.length);
1203
+ return r === 0 && (r = 24), e === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : w(r, e.length);
1204
1204
  },
1205
1205
  // Minute
1206
1206
  m: function(t, e, n) {
@@ -1281,25 +1281,25 @@ const R = {
1281
1281
  // Seconds timestamp
1282
1282
  t: function(t, e, n) {
1283
1283
  const r = Math.trunc(+t / 1e3);
1284
- return g(r, e.length);
1284
+ return w(r, e.length);
1285
1285
  },
1286
1286
  // Milliseconds timestamp
1287
1287
  T: function(t, e, n) {
1288
- return g(+t, e.length);
1288
+ return w(+t, e.length);
1289
1289
  }
1290
1290
  };
1291
1291
  function qe(t, e = "") {
1292
1292
  const n = t > 0 ? "-" : "+", r = Math.abs(t), s = Math.trunc(r / 60), a = r % 60;
1293
- return a === 0 ? n + String(s) : n + String(s) + e + g(a, 2);
1293
+ return a === 0 ? n + String(s) : n + String(s) + e + w(a, 2);
1294
1294
  }
1295
1295
  function Ue(t, e) {
1296
- return t % 60 === 0 ? (t > 0 ? "-" : "+") + g(Math.abs(t) / 60, 2) : Y(t, e);
1296
+ return t % 60 === 0 ? (t > 0 ? "-" : "+") + w(Math.abs(t) / 60, 2) : Y(t, e);
1297
1297
  }
1298
1298
  function Y(t, e = "") {
1299
- const n = t > 0 ? "-" : "+", r = Math.abs(t), s = g(Math.trunc(r / 60), 2), a = g(r % 60, 2);
1299
+ const n = t > 0 ? "-" : "+", r = Math.abs(t), s = w(Math.trunc(r / 60), 2), a = w(r % 60, 2);
1300
1300
  return n + s + e + a;
1301
1301
  }
1302
- const He = (t, e) => {
1302
+ const Fe = (t, e) => {
1303
1303
  switch (t) {
1304
1304
  case "P":
1305
1305
  return e.date({ width: "short" });
@@ -1310,7 +1310,7 @@ const He = (t, e) => {
1310
1310
  default:
1311
1311
  return e.date({ width: "full" });
1312
1312
  }
1313
- }, ft = (t, e) => {
1313
+ }, mt = (t, e) => {
1314
1314
  switch (t) {
1315
1315
  case "p":
1316
1316
  return e.time({ width: "short" });
@@ -1321,10 +1321,10 @@ const He = (t, e) => {
1321
1321
  default:
1322
1322
  return e.time({ width: "full" });
1323
1323
  }
1324
- }, $n = (t, e) => {
1324
+ }, qn = (t, e) => {
1325
1325
  const n = t.match(/(P+)(p+)?/) || [], r = n[1], s = n[2];
1326
1326
  if (!s)
1327
- return He(t, e);
1327
+ return Fe(t, e);
1328
1328
  let a;
1329
1329
  switch (r) {
1330
1330
  case "P":
@@ -1340,78 +1340,78 @@ const He = (t, e) => {
1340
1340
  a = e.dateTime({ width: "full" });
1341
1341
  break;
1342
1342
  }
1343
- return a.replace("{{date}}", He(r, e)).replace("{{time}}", ft(s, e));
1343
+ return a.replace("{{date}}", Fe(r, e)).replace("{{time}}", mt(s, e));
1344
1344
  }, re = {
1345
- p: ft,
1346
- P: $n
1347
- }, Wn = /^D+$/, qn = /^Y+$/, Un = ["D", "DD", "YY", "YYYY"];
1348
- function mt(t) {
1349
- return Wn.test(t);
1350
- }
1345
+ p: mt,
1346
+ P: qn
1347
+ }, Un = /^D+$/, Fn = /^Y+$/, Hn = ["D", "DD", "YY", "YYYY"];
1351
1348
  function ht(t) {
1352
- return qn.test(t);
1349
+ return Un.test(t);
1350
+ }
1351
+ function wt(t) {
1352
+ return Fn.test(t);
1353
1353
  }
1354
1354
  function se(t, e, n) {
1355
- const r = Hn(t, e, n);
1356
- if (console.warn(r), Un.includes(t)) throw new RangeError(r);
1355
+ const r = Qn(t, e, n);
1356
+ if (console.warn(r), Hn.includes(t)) throw new RangeError(r);
1357
1357
  }
1358
- function Hn(t, e, n) {
1358
+ function Qn(t, e, n) {
1359
1359
  const r = t[0] === "Y" ? "years" : "days of the month";
1360
1360
  return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1361
1361
  }
1362
- const Fn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Qn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Bn = /^'([^]*?)'?$/, Vn = /''/g, Gn = /[a-zA-Z]/;
1363
- function Xn(t, e, n) {
1364
- const r = W(), s = r.locale ?? ut, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, c = y(t, n?.in);
1365
- if (!ne(c))
1362
+ const Bn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Vn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Gn = /^'([^]*?)'?$/, Xn = /''/g, jn = /[a-zA-Z]/;
1363
+ function zn(t, e, n) {
1364
+ const r = W(), s = r.locale ?? dt, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i = y(t, n?.in);
1365
+ if (!ne(i))
1366
1366
  throw new RangeError("Invalid time value");
1367
- let i = e.match(Qn).map((d) => {
1367
+ let c = e.match(Vn).map((d) => {
1368
1368
  const l = d[0];
1369
1369
  if (l === "p" || l === "P") {
1370
1370
  const m = re[l];
1371
1371
  return m(d, s.formatLong);
1372
1372
  }
1373
1373
  return d;
1374
- }).join("").match(Fn).map((d) => {
1374
+ }).join("").match(Bn).map((d) => {
1375
1375
  if (d === "''")
1376
1376
  return { isToken: !1, value: "'" };
1377
1377
  const l = d[0];
1378
1378
  if (l === "'")
1379
- return { isToken: !1, value: jn(d) };
1379
+ return { isToken: !1, value: Kn(d) };
1380
1380
  if (We[l])
1381
1381
  return { isToken: !0, value: d };
1382
- if (l.match(Gn))
1382
+ if (l.match(jn))
1383
1383
  throw new RangeError(
1384
1384
  "Format string contains an unescaped latin alphabet character `" + l + "`"
1385
1385
  );
1386
1386
  return { isToken: !1, value: d };
1387
1387
  });
1388
- s.localize.preprocessor && (i = s.localize.preprocessor(c, i));
1388
+ s.localize.preprocessor && (c = s.localize.preprocessor(i, c));
1389
1389
  const u = {
1390
1390
  firstWeekContainsDate: a,
1391
1391
  weekStartsOn: o,
1392
1392
  locale: s
1393
1393
  };
1394
- return i.map((d) => {
1394
+ return c.map((d) => {
1395
1395
  if (!d.isToken) return d.value;
1396
1396
  const l = d.value;
1397
- (ht(l) || mt(l)) && se(l, e, String(t));
1397
+ (wt(l) || ht(l)) && se(l, e, String(t));
1398
1398
  const m = We[l[0]];
1399
- return m(c, l, s.localize, u);
1399
+ return m(i, l, s.localize, u);
1400
1400
  }).join("");
1401
1401
  }
1402
- function jn(t) {
1403
- const e = t.match(Bn);
1404
- return e ? e[1].replace(Vn, "'") : t;
1402
+ function Kn(t) {
1403
+ const e = t.match(Gn);
1404
+ return e ? e[1].replace(Xn, "'") : t;
1405
1405
  }
1406
- function zn() {
1406
+ function Jn() {
1407
1407
  return Object.assign({}, W());
1408
1408
  }
1409
- function Kn(t, e) {
1409
+ function Zn(t, e) {
1410
1410
  const n = y(t, e?.in).getDay();
1411
1411
  return n === 0 ? 7 : n;
1412
1412
  }
1413
- function Jn(t, e) {
1414
- const n = Zn(e) ? new e(0) : x(e, 0);
1413
+ function er(t, e) {
1414
+ const n = tr(e) ? new e(0) : T(e, 0);
1415
1415
  return n.setFullYear(t.getFullYear(), t.getMonth(), t.getDate()), n.setHours(
1416
1416
  t.getHours(),
1417
1417
  t.getMinutes(),
@@ -1419,17 +1419,17 @@ function Jn(t, e) {
1419
1419
  t.getMilliseconds()
1420
1420
  ), n;
1421
1421
  }
1422
- function Zn(t) {
1422
+ function tr(t) {
1423
1423
  return typeof t == "function" && t.prototype?.constructor === t;
1424
1424
  }
1425
- const er = 10;
1425
+ const nr = 10;
1426
1426
  class gt {
1427
1427
  subPriority = 0;
1428
1428
  validate(e, n) {
1429
1429
  return !0;
1430
1430
  }
1431
1431
  }
1432
- class tr extends gt {
1432
+ class rr extends gt {
1433
1433
  constructor(e, n, r, s, a) {
1434
1434
  super(), this.value = e, this.validateValue = n, this.setValue = r, this.priority = s, a && (this.subPriority = a);
1435
1435
  }
@@ -1440,21 +1440,21 @@ class tr extends gt {
1440
1440
  return this.setValue(e, n, this.value, r);
1441
1441
  }
1442
1442
  }
1443
- class nr extends gt {
1444
- priority = er;
1443
+ class sr extends gt {
1444
+ priority = nr;
1445
1445
  subPriority = -1;
1446
1446
  constructor(e, n) {
1447
- super(), this.context = e || ((r) => x(n, r));
1447
+ super(), this.context = e || ((r) => T(n, r));
1448
1448
  }
1449
1449
  set(e, n) {
1450
- return n.timestampIsSet ? e : x(e, Jn(e, this.context));
1450
+ return n.timestampIsSet ? e : T(e, er(e, this.context));
1451
1451
  }
1452
1452
  }
1453
1453
  class h {
1454
1454
  run(e, n, r, s) {
1455
1455
  const a = this.parse(e, n, r, s);
1456
1456
  return a ? {
1457
- setter: new tr(
1457
+ setter: new rr(
1458
1458
  a.value,
1459
1459
  this.validate,
1460
1460
  this.set,
@@ -1468,7 +1468,7 @@ class h {
1468
1468
  return !0;
1469
1469
  }
1470
1470
  }
1471
- class rr extends h {
1471
+ class ar extends h {
1472
1472
  priority = 140;
1473
1473
  parse(e, n, r) {
1474
1474
  switch (n) {
@@ -1534,7 +1534,7 @@ const D = {
1534
1534
  extended: /^([+-])(\d{2}):(\d{2})|Z/,
1535
1535
  extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
1536
1536
  };
1537
- function T(t, e) {
1537
+ function E(t, e) {
1538
1538
  return t && {
1539
1539
  value: e(t.value),
1540
1540
  rest: t.rest
@@ -1558,11 +1558,11 @@ function N(t, e) {
1558
1558
  };
1559
1559
  const r = n[1] === "+" ? 1 : -1, s = n[2] ? parseInt(n[2], 10) : 0, a = n[3] ? parseInt(n[3], 10) : 0, o = n[5] ? parseInt(n[5], 10) : 0;
1560
1560
  return {
1561
- value: r * (s * fe + a * le + o * zt),
1561
+ value: r * (s * fe + a * le + o * Jt),
1562
1562
  rest: e.slice(n[0].length)
1563
1563
  };
1564
1564
  }
1565
- function wt(t) {
1565
+ function pt(t) {
1566
1566
  return p(D.anyDigitsSigned, t);
1567
1567
  }
1568
1568
  function b(t, e) {
@@ -1607,21 +1607,21 @@ function he(t) {
1607
1607
  return 0;
1608
1608
  }
1609
1609
  }
1610
- function pt(t, e) {
1610
+ function yt(t, e) {
1611
1611
  const n = e > 0, r = n ? e : 1 - e;
1612
1612
  let s;
1613
1613
  if (r <= 50)
1614
1614
  s = t || 100;
1615
1615
  else {
1616
- const a = r + 50, o = Math.trunc(a / 100) * 100, c = t >= a % 100;
1617
- s = t + o - (c ? 100 : 0);
1616
+ const a = r + 50, o = Math.trunc(a / 100) * 100, i = t >= a % 100;
1617
+ s = t + o - (i ? 100 : 0);
1618
1618
  }
1619
1619
  return n ? s : 1 - s;
1620
1620
  }
1621
- function yt(t) {
1621
+ function bt(t) {
1622
1622
  return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
1623
1623
  }
1624
- class sr extends h {
1624
+ class or extends h {
1625
1625
  priority = 130;
1626
1626
  incompatibleTokens = ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"];
1627
1627
  parse(e, n, r) {
@@ -1631,16 +1631,16 @@ class sr extends h {
1631
1631
  });
1632
1632
  switch (n) {
1633
1633
  case "y":
1634
- return T(b(4, e), s);
1634
+ return E(b(4, e), s);
1635
1635
  case "yo":
1636
- return T(
1636
+ return E(
1637
1637
  r.ordinalNumber(e, {
1638
1638
  unit: "year"
1639
1639
  }),
1640
1640
  s
1641
1641
  );
1642
1642
  default:
1643
- return T(b(n.length, e), s);
1643
+ return E(b(n.length, e), s);
1644
1644
  }
1645
1645
  }
1646
1646
  validate(e, n) {
@@ -1649,7 +1649,7 @@ class sr extends h {
1649
1649
  set(e, n, r) {
1650
1650
  const s = e.getFullYear();
1651
1651
  if (r.isTwoDigitYear) {
1652
- const o = pt(
1652
+ const o = yt(
1653
1653
  r.year,
1654
1654
  s
1655
1655
  );
@@ -1659,7 +1659,7 @@ class sr extends h {
1659
1659
  return e.setFullYear(a, 0, 1), e.setHours(0, 0, 0, 0), e;
1660
1660
  }
1661
1661
  }
1662
- class ar extends h {
1662
+ class ir extends h {
1663
1663
  priority = 130;
1664
1664
  parse(e, n, r) {
1665
1665
  const s = (a) => ({
@@ -1668,16 +1668,16 @@ class ar extends h {
1668
1668
  });
1669
1669
  switch (n) {
1670
1670
  case "Y":
1671
- return T(b(4, e), s);
1671
+ return E(b(4, e), s);
1672
1672
  case "Yo":
1673
- return T(
1673
+ return E(
1674
1674
  r.ordinalNumber(e, {
1675
1675
  unit: "year"
1676
1676
  }),
1677
1677
  s
1678
1678
  );
1679
1679
  default:
1680
- return T(b(n.length, e), s);
1680
+ return E(b(n.length, e), s);
1681
1681
  }
1682
1682
  }
1683
1683
  validate(e, n) {
@@ -1686,12 +1686,12 @@ class ar extends h {
1686
1686
  set(e, n, r, s) {
1687
1687
  const a = me(e, s);
1688
1688
  if (r.isTwoDigitYear) {
1689
- const c = pt(
1689
+ const i = yt(
1690
1690
  r.year,
1691
1691
  a
1692
1692
  );
1693
1693
  return e.setFullYear(
1694
- c,
1694
+ i,
1695
1695
  0,
1696
1696
  s.firstWeekContainsDate
1697
1697
  ), e.setHours(0, 0, 0, 0), I(e, s);
@@ -1715,13 +1715,13 @@ class ar extends h {
1715
1715
  "T"
1716
1716
  ];
1717
1717
  }
1718
- class or extends h {
1718
+ class cr extends h {
1719
1719
  priority = 130;
1720
1720
  parse(e, n) {
1721
1721
  return J(n === "R" ? 4 : n.length, e);
1722
1722
  }
1723
1723
  set(e, n, r) {
1724
- const s = x(e, 0);
1724
+ const s = T(e, 0);
1725
1725
  return s.setFullYear(r, 0, 4), s.setHours(0, 0, 0, 0), $(s);
1726
1726
  }
1727
1727
  incompatibleTokens = [
@@ -1742,7 +1742,7 @@ class or extends h {
1742
1742
  "T"
1743
1743
  ];
1744
1744
  }
1745
- class ir extends h {
1745
+ class ur extends h {
1746
1746
  priority = 130;
1747
1747
  parse(e, n) {
1748
1748
  return J(n === "u" ? 4 : n.length, e);
@@ -1752,7 +1752,7 @@ class ir extends h {
1752
1752
  }
1753
1753
  incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"];
1754
1754
  }
1755
- class cr extends h {
1755
+ class dr extends h {
1756
1756
  priority = 120;
1757
1757
  parse(e, n, r) {
1758
1758
  switch (n) {
@@ -1814,7 +1814,7 @@ class cr extends h {
1814
1814
  "T"
1815
1815
  ];
1816
1816
  }
1817
- class ur extends h {
1817
+ class lr extends h {
1818
1818
  priority = 120;
1819
1819
  parse(e, n, r) {
1820
1820
  switch (n) {
@@ -1876,7 +1876,7 @@ class ur extends h {
1876
1876
  "T"
1877
1877
  ];
1878
1878
  }
1879
- class dr extends h {
1879
+ class fr extends h {
1880
1880
  incompatibleTokens = [
1881
1881
  "Y",
1882
1882
  "R",
@@ -1898,16 +1898,16 @@ class dr extends h {
1898
1898
  switch (n) {
1899
1899
  // 1, 2, ..., 12
1900
1900
  case "M":
1901
- return T(
1901
+ return E(
1902
1902
  p(D.month, e),
1903
1903
  s
1904
1904
  );
1905
1905
  // 01, 02, ..., 12
1906
1906
  case "MM":
1907
- return T(b(2, e), s);
1907
+ return E(b(2, e), s);
1908
1908
  // 1st, 2nd, ..., 12th
1909
1909
  case "Mo":
1910
- return T(
1910
+ return E(
1911
1911
  r.ordinalNumber(e, {
1912
1912
  unit: "month"
1913
1913
  }),
@@ -1939,23 +1939,23 @@ class dr extends h {
1939
1939
  return e.setMonth(r, 1), e.setHours(0, 0, 0, 0), e;
1940
1940
  }
1941
1941
  }
1942
- class lr extends h {
1942
+ class mr extends h {
1943
1943
  priority = 110;
1944
1944
  parse(e, n, r) {
1945
1945
  const s = (a) => a - 1;
1946
1946
  switch (n) {
1947
1947
  // 1, 2, ..., 12
1948
1948
  case "L":
1949
- return T(
1949
+ return E(
1950
1950
  p(D.month, e),
1951
1951
  s
1952
1952
  );
1953
1953
  // 01, 02, ..., 12
1954
1954
  case "LL":
1955
- return T(b(2, e), s);
1955
+ return E(b(2, e), s);
1956
1956
  // 1st, 2nd, ..., 12th
1957
1957
  case "Lo":
1958
- return T(
1958
+ return E(
1959
1959
  r.ordinalNumber(e, {
1960
1960
  unit: "month"
1961
1961
  }),
@@ -2002,11 +2002,11 @@ class lr extends h {
2002
2002
  "T"
2003
2003
  ];
2004
2004
  }
2005
- function fr(t, e, n) {
2006
- const r = y(t, n?.in), s = lt(r, n) - e;
2005
+ function hr(t, e, n) {
2006
+ const r = y(t, n?.in), s = ft(r, n) - e;
2007
2007
  return r.setDate(r.getDate() - s * 7), y(r, n?.in);
2008
2008
  }
2009
- class mr extends h {
2009
+ class wr extends h {
2010
2010
  priority = 100;
2011
2011
  parse(e, n, r) {
2012
2012
  switch (n) {
@@ -2022,7 +2022,7 @@ class mr extends h {
2022
2022
  return n >= 1 && n <= 53;
2023
2023
  }
2024
2024
  set(e, n, r, s) {
2025
- return I(fr(e, r, s), s);
2025
+ return I(hr(e, r, s), s);
2026
2026
  }
2027
2027
  incompatibleTokens = [
2028
2028
  "y",
@@ -2040,11 +2040,11 @@ class mr extends h {
2040
2040
  "T"
2041
2041
  ];
2042
2042
  }
2043
- function hr(t, e, n) {
2044
- const r = y(t, n?.in), s = dt(r, n) - e;
2043
+ function gr(t, e, n) {
2044
+ const r = y(t, n?.in), s = lt(r, n) - e;
2045
2045
  return r.setDate(r.getDate() - s * 7), r;
2046
2046
  }
2047
- class gr extends h {
2047
+ class pr extends h {
2048
2048
  priority = 100;
2049
2049
  parse(e, n, r) {
2050
2050
  switch (n) {
@@ -2060,7 +2060,7 @@ class gr extends h {
2060
2060
  return n >= 1 && n <= 53;
2061
2061
  }
2062
2062
  set(e, n, r) {
2063
- return $(hr(e, r));
2063
+ return $(gr(e, r));
2064
2064
  }
2065
2065
  incompatibleTokens = [
2066
2066
  "y",
@@ -2079,7 +2079,7 @@ class gr extends h {
2079
2079
  "T"
2080
2080
  ];
2081
2081
  }
2082
- const wr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], pr = [
2082
+ const yr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], br = [
2083
2083
  31,
2084
2084
  29,
2085
2085
  31,
@@ -2093,7 +2093,7 @@ const wr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], pr = [
2093
2093
  30,
2094
2094
  31
2095
2095
  ];
2096
- class yr extends h {
2096
+ class Dr extends h {
2097
2097
  priority = 90;
2098
2098
  subPriority = 1;
2099
2099
  parse(e, n, r) {
@@ -2107,8 +2107,8 @@ class yr extends h {
2107
2107
  }
2108
2108
  }
2109
2109
  validate(e, n) {
2110
- const r = e.getFullYear(), s = yt(r), a = e.getMonth();
2111
- return s ? n >= 1 && n <= pr[a] : n >= 1 && n <= wr[a];
2110
+ const r = e.getFullYear(), s = bt(r), a = e.getMonth();
2111
+ return s ? n >= 1 && n <= br[a] : n >= 1 && n <= yr[a];
2112
2112
  }
2113
2113
  set(e, n, r) {
2114
2114
  return e.setDate(r), e.setHours(0, 0, 0, 0), e;
@@ -2128,7 +2128,7 @@ class yr extends h {
2128
2128
  "T"
2129
2129
  ];
2130
2130
  }
2131
- class br extends h {
2131
+ class Er extends h {
2132
2132
  priority = 90;
2133
2133
  subpriority = 1;
2134
2134
  parse(e, n, r) {
@@ -2144,7 +2144,7 @@ class br extends h {
2144
2144
  }
2145
2145
  validate(e, n) {
2146
2146
  const r = e.getFullYear();
2147
- return yt(r) ? n >= 1 && n <= 366 : n >= 1 && n <= 365;
2147
+ return bt(r) ? n >= 1 && n <= 366 : n >= 1 && n <= 365;
2148
2148
  }
2149
2149
  set(e, n, r) {
2150
2150
  return e.setMonth(0, r), e.setHours(0, 0, 0, 0), e;
@@ -2167,11 +2167,11 @@ class br extends h {
2167
2167
  "T"
2168
2168
  ];
2169
2169
  }
2170
- function ge(t, e, n) {
2171
- const r = W(), s = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = y(t, n?.in), o = a.getDay(), i = (e % 7 + 7) % 7, u = 7 - s, d = e < 0 || e > 6 ? e - (o + u) % 7 : (i + u) % 7 - (o + u) % 7;
2172
- return it(a, d, n);
2170
+ function we(t, e, n) {
2171
+ const r = W(), s = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = y(t, n?.in), o = a.getDay(), c = (e % 7 + 7) % 7, u = 7 - s, d = e < 0 || e > 6 ? e - (o + u) % 7 : (c + u) % 7 - (o + u) % 7;
2172
+ return ct(a, d, n);
2173
2173
  }
2174
- class Dr extends h {
2174
+ class Tr extends h {
2175
2175
  priority = 90;
2176
2176
  parse(e, n, r) {
2177
2177
  switch (n) {
@@ -2203,25 +2203,25 @@ class Dr extends h {
2203
2203
  return n >= 0 && n <= 6;
2204
2204
  }
2205
2205
  set(e, n, r, s) {
2206
- return e = ge(e, r, s), e.setHours(0, 0, 0, 0), e;
2206
+ return e = we(e, r, s), e.setHours(0, 0, 0, 0), e;
2207
2207
  }
2208
2208
  incompatibleTokens = ["D", "i", "e", "c", "t", "T"];
2209
2209
  }
2210
- class Tr extends h {
2210
+ class xr extends h {
2211
2211
  priority = 90;
2212
2212
  parse(e, n, r, s) {
2213
2213
  const a = (o) => {
2214
- const c = Math.floor((o - 1) / 7) * 7;
2215
- return (o + s.weekStartsOn + 6) % 7 + c;
2214
+ const i = Math.floor((o - 1) / 7) * 7;
2215
+ return (o + s.weekStartsOn + 6) % 7 + i;
2216
2216
  };
2217
2217
  switch (n) {
2218
2218
  // 3
2219
2219
  case "e":
2220
2220
  case "ee":
2221
- return T(b(n.length, e), a);
2221
+ return E(b(n.length, e), a);
2222
2222
  // 3rd
2223
2223
  case "eo":
2224
- return T(
2224
+ return E(
2225
2225
  r.ordinalNumber(e, {
2226
2226
  unit: "day"
2227
2227
  }),
@@ -2253,7 +2253,7 @@ class Tr extends h {
2253
2253
  return n >= 0 && n <= 6;
2254
2254
  }
2255
2255
  set(e, n, r, s) {
2256
- return e = ge(e, r, s), e.setHours(0, 0, 0, 0), e;
2256
+ return e = we(e, r, s), e.setHours(0, 0, 0, 0), e;
2257
2257
  }
2258
2258
  incompatibleTokens = [
2259
2259
  "y",
@@ -2273,21 +2273,21 @@ class Tr extends h {
2273
2273
  "T"
2274
2274
  ];
2275
2275
  }
2276
- class Er extends h {
2276
+ class Pr extends h {
2277
2277
  priority = 90;
2278
2278
  parse(e, n, r, s) {
2279
2279
  const a = (o) => {
2280
- const c = Math.floor((o - 1) / 7) * 7;
2281
- return (o + s.weekStartsOn + 6) % 7 + c;
2280
+ const i = Math.floor((o - 1) / 7) * 7;
2281
+ return (o + s.weekStartsOn + 6) % 7 + i;
2282
2282
  };
2283
2283
  switch (n) {
2284
2284
  // 3
2285
2285
  case "c":
2286
2286
  case "cc":
2287
- return T(b(n.length, e), a);
2287
+ return E(b(n.length, e), a);
2288
2288
  // 3rd
2289
2289
  case "co":
2290
- return T(
2290
+ return E(
2291
2291
  r.ordinalNumber(e, {
2292
2292
  unit: "day"
2293
2293
  }),
@@ -2319,7 +2319,7 @@ class Er extends h {
2319
2319
  return n >= 0 && n <= 6;
2320
2320
  }
2321
2321
  set(e, n, r, s) {
2322
- return e = ge(e, r, s), e.setHours(0, 0, 0, 0), e;
2322
+ return e = we(e, r, s), e.setHours(0, 0, 0, 0), e;
2323
2323
  }
2324
2324
  incompatibleTokens = [
2325
2325
  "y",
@@ -2339,11 +2339,11 @@ class Er extends h {
2339
2339
  "T"
2340
2340
  ];
2341
2341
  }
2342
- function xr(t, e, n) {
2343
- const r = y(t, n?.in), s = Kn(r, n), a = e - s;
2344
- return it(r, a, n);
2342
+ function vr(t, e, n) {
2343
+ const r = y(t, n?.in), s = Zn(r, n), a = e - s;
2344
+ return ct(r, a, n);
2345
2345
  }
2346
- class Pr extends h {
2346
+ class Mr extends h {
2347
2347
  priority = 90;
2348
2348
  parse(e, n, r) {
2349
2349
  const s = (a) => a === 0 ? 7 : a;
@@ -2357,7 +2357,7 @@ class Pr extends h {
2357
2357
  return r.ordinalNumber(e, { unit: "day" });
2358
2358
  // Tue
2359
2359
  case "iii":
2360
- return T(
2360
+ return E(
2361
2361
  r.day(e, {
2362
2362
  width: "abbreviated",
2363
2363
  context: "formatting"
@@ -2372,7 +2372,7 @@ class Pr extends h {
2372
2372
  );
2373
2373
  // T
2374
2374
  case "iiiii":
2375
- return T(
2375
+ return E(
2376
2376
  r.day(e, {
2377
2377
  width: "narrow",
2378
2378
  context: "formatting"
@@ -2381,7 +2381,7 @@ class Pr extends h {
2381
2381
  );
2382
2382
  // Tu
2383
2383
  case "iiiiii":
2384
- return T(
2384
+ return E(
2385
2385
  r.day(e, {
2386
2386
  width: "short",
2387
2387
  context: "formatting"
@@ -2392,7 +2392,7 @@ class Pr extends h {
2392
2392
  s
2393
2393
  );
2394
2394
  default:
2395
- return T(
2395
+ return E(
2396
2396
  r.day(e, {
2397
2397
  width: "wide",
2398
2398
  context: "formatting"
@@ -2414,7 +2414,7 @@ class Pr extends h {
2414
2414
  return n >= 1 && n <= 7;
2415
2415
  }
2416
2416
  set(e, n, r) {
2417
- return e = xr(e, r), e.setHours(0, 0, 0, 0), e;
2417
+ return e = vr(e, r), e.setHours(0, 0, 0, 0), e;
2418
2418
  }
2419
2419
  incompatibleTokens = [
2420
2420
  "y",
@@ -2434,7 +2434,7 @@ class Pr extends h {
2434
2434
  "T"
2435
2435
  ];
2436
2436
  }
2437
- class vr extends h {
2437
+ class Or extends h {
2438
2438
  priority = 80;
2439
2439
  parse(e, n, r) {
2440
2440
  switch (n) {
@@ -2471,7 +2471,7 @@ class vr extends h {
2471
2471
  }
2472
2472
  incompatibleTokens = ["b", "B", "H", "k", "t", "T"];
2473
2473
  }
2474
- class Mr extends h {
2474
+ class Ar extends h {
2475
2475
  priority = 80;
2476
2476
  parse(e, n, r) {
2477
2477
  switch (n) {
@@ -2508,7 +2508,7 @@ class Mr extends h {
2508
2508
  }
2509
2509
  incompatibleTokens = ["a", "B", "H", "k", "t", "T"];
2510
2510
  }
2511
- class Or extends h {
2511
+ class Nr extends h {
2512
2512
  priority = 80;
2513
2513
  parse(e, n, r) {
2514
2514
  switch (n) {
@@ -2545,7 +2545,7 @@ class Or extends h {
2545
2545
  }
2546
2546
  incompatibleTokens = ["a", "b", "t", "T"];
2547
2547
  }
2548
- class Ar extends h {
2548
+ class Rr extends h {
2549
2549
  priority = 70;
2550
2550
  parse(e, n, r) {
2551
2551
  switch (n) {
@@ -2566,7 +2566,7 @@ class Ar extends h {
2566
2566
  }
2567
2567
  incompatibleTokens = ["H", "K", "k", "t", "T"];
2568
2568
  }
2569
- class Nr extends h {
2569
+ class _r extends h {
2570
2570
  priority = 70;
2571
2571
  parse(e, n, r) {
2572
2572
  switch (n) {
@@ -2586,7 +2586,7 @@ class Nr extends h {
2586
2586
  }
2587
2587
  incompatibleTokens = ["a", "b", "h", "K", "k", "t", "T"];
2588
2588
  }
2589
- class Rr extends h {
2589
+ class kr extends h {
2590
2590
  priority = 70;
2591
2591
  parse(e, n, r) {
2592
2592
  switch (n) {
@@ -2606,7 +2606,7 @@ class Rr extends h {
2606
2606
  }
2607
2607
  incompatibleTokens = ["h", "H", "k", "t", "T"];
2608
2608
  }
2609
- class kr extends h {
2609
+ class Ir extends h {
2610
2610
  priority = 70;
2611
2611
  parse(e, n, r) {
2612
2612
  switch (n) {
@@ -2627,7 +2627,7 @@ class kr extends h {
2627
2627
  }
2628
2628
  incompatibleTokens = ["a", "b", "h", "H", "K", "t", "T"];
2629
2629
  }
2630
- class _r extends h {
2630
+ class Yr extends h {
2631
2631
  priority = 60;
2632
2632
  parse(e, n, r) {
2633
2633
  switch (n) {
@@ -2647,7 +2647,7 @@ class _r extends h {
2647
2647
  }
2648
2648
  incompatibleTokens = ["t", "T"];
2649
2649
  }
2650
- class Ir extends h {
2650
+ class Cr extends h {
2651
2651
  priority = 50;
2652
2652
  parse(e, n, r) {
2653
2653
  switch (n) {
@@ -2667,18 +2667,18 @@ class Ir extends h {
2667
2667
  }
2668
2668
  incompatibleTokens = ["t", "T"];
2669
2669
  }
2670
- class Yr extends h {
2670
+ class Sr extends h {
2671
2671
  priority = 30;
2672
2672
  parse(e, n) {
2673
2673
  const r = (s) => Math.trunc(s * Math.pow(10, -n.length + 3));
2674
- return T(b(n.length, e), r);
2674
+ return E(b(n.length, e), r);
2675
2675
  }
2676
2676
  set(e, n, r) {
2677
2677
  return e.setMilliseconds(r), e;
2678
2678
  }
2679
2679
  incompatibleTokens = ["t", "T"];
2680
2680
  }
2681
- class Cr extends h {
2681
+ class Lr extends h {
2682
2682
  priority = 10;
2683
2683
  parse(e, n) {
2684
2684
  switch (n) {
@@ -2704,14 +2704,14 @@ class Cr extends h {
2704
2704
  }
2705
2705
  }
2706
2706
  set(e, n, r) {
2707
- return n.timestampIsSet ? e : x(
2707
+ return n.timestampIsSet ? e : T(
2708
2708
  e,
2709
2709
  e.getTime() - K(e) - r
2710
2710
  );
2711
2711
  }
2712
2712
  incompatibleTokens = ["t", "T", "x"];
2713
2713
  }
2714
- class Sr extends h {
2714
+ class $r extends h {
2715
2715
  priority = 10;
2716
2716
  parse(e, n) {
2717
2717
  switch (n) {
@@ -2737,101 +2737,101 @@ class Sr extends h {
2737
2737
  }
2738
2738
  }
2739
2739
  set(e, n, r) {
2740
- return n.timestampIsSet ? e : x(
2740
+ return n.timestampIsSet ? e : T(
2741
2741
  e,
2742
2742
  e.getTime() - K(e) - r
2743
2743
  );
2744
2744
  }
2745
2745
  incompatibleTokens = ["t", "T", "X"];
2746
2746
  }
2747
- class Lr extends h {
2747
+ class Wr extends h {
2748
2748
  priority = 40;
2749
2749
  parse(e) {
2750
- return wt(e);
2750
+ return pt(e);
2751
2751
  }
2752
2752
  set(e, n, r) {
2753
- return [x(e, r * 1e3), { timestampIsSet: !0 }];
2753
+ return [T(e, r * 1e3), { timestampIsSet: !0 }];
2754
2754
  }
2755
2755
  incompatibleTokens = "*";
2756
2756
  }
2757
- class $r extends h {
2757
+ class qr extends h {
2758
2758
  priority = 20;
2759
2759
  parse(e) {
2760
- return wt(e);
2760
+ return pt(e);
2761
2761
  }
2762
2762
  set(e, n, r) {
2763
- return [x(e, r), { timestampIsSet: !0 }];
2763
+ return [T(e, r), { timestampIsSet: !0 }];
2764
2764
  }
2765
2765
  incompatibleTokens = "*";
2766
2766
  }
2767
- const Wr = {
2768
- G: new rr(),
2769
- y: new sr(),
2770
- Y: new ar(),
2771
- R: new or(),
2772
- u: new ir(),
2773
- Q: new cr(),
2774
- q: new ur(),
2775
- M: new dr(),
2776
- L: new lr(),
2777
- w: new mr(),
2778
- I: new gr(),
2779
- d: new yr(),
2780
- D: new br(),
2781
- E: new Dr(),
2782
- e: new Tr(),
2783
- c: new Er(),
2784
- i: new Pr(),
2785
- a: new vr(),
2786
- b: new Mr(),
2787
- B: new Or(),
2788
- h: new Ar(),
2789
- H: new Nr(),
2790
- K: new Rr(),
2791
- k: new kr(),
2792
- m: new _r(),
2793
- s: new Ir(),
2794
- S: new Yr(),
2795
- X: new Cr(),
2796
- x: new Sr(),
2797
- t: new Lr(),
2798
- T: new $r()
2799
- }, qr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ur = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Hr = /^'([^]*?)'?$/, Fr = /''/g, Qr = /\S/, Br = /[a-zA-Z]/;
2800
- function Vr(t, e, n, r) {
2801
- const s = () => x(n, NaN), a = zn(), o = a.locale ?? ut, c = a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, i = a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0;
2767
+ const Ur = {
2768
+ G: new ar(),
2769
+ y: new or(),
2770
+ Y: new ir(),
2771
+ R: new cr(),
2772
+ u: new ur(),
2773
+ Q: new dr(),
2774
+ q: new lr(),
2775
+ M: new fr(),
2776
+ L: new mr(),
2777
+ w: new wr(),
2778
+ I: new pr(),
2779
+ d: new Dr(),
2780
+ D: new Er(),
2781
+ E: new Tr(),
2782
+ e: new xr(),
2783
+ c: new Pr(),
2784
+ i: new Mr(),
2785
+ a: new Or(),
2786
+ b: new Ar(),
2787
+ B: new Nr(),
2788
+ h: new Rr(),
2789
+ H: new _r(),
2790
+ K: new kr(),
2791
+ k: new Ir(),
2792
+ m: new Yr(),
2793
+ s: new Cr(),
2794
+ S: new Sr(),
2795
+ X: new Lr(),
2796
+ x: new $r(),
2797
+ t: new Wr(),
2798
+ T: new qr()
2799
+ }, Fr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Hr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Qr = /^'([^]*?)'?$/, Br = /''/g, Vr = /\S/, Gr = /[a-zA-Z]/;
2800
+ function Xr(t, e, n, r) {
2801
+ const s = () => T(n, NaN), a = Jn(), o = a.locale ?? dt, i = a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, c = a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0;
2802
2802
  if (!e)
2803
2803
  return t ? s() : y(n, r?.in);
2804
2804
  const u = {
2805
- firstWeekContainsDate: c,
2806
- weekStartsOn: i,
2805
+ firstWeekContainsDate: i,
2806
+ weekStartsOn: c,
2807
2807
  locale: o
2808
- }, d = [new nr(r?.in, n)], l = e.match(Ur).map((f) => {
2809
- const w = f[0];
2810
- if (w in re) {
2811
- const v = re[w];
2812
- return v(f, o.formatLong);
2808
+ }, d = [new sr(r?.in, n)], l = e.match(Hr).map((f) => {
2809
+ const g = f[0];
2810
+ if (g in re) {
2811
+ const P = re[g];
2812
+ return P(f, o.formatLong);
2813
2813
  }
2814
2814
  return f;
2815
- }).join("").match(qr), m = [];
2815
+ }).join("").match(Fr), m = [];
2816
2816
  for (let f of l) {
2817
- ht(f) && se(f, e, t), mt(f) && se(f, e, t);
2818
- const w = f[0], v = Wr[w];
2819
- if (v) {
2820
- const { incompatibleTokens: O } = v;
2817
+ wt(f) && se(f, e, t), ht(f) && se(f, e, t);
2818
+ const g = f[0], P = Ur[g];
2819
+ if (P) {
2820
+ const { incompatibleTokens: O } = P;
2821
2821
  if (Array.isArray(O)) {
2822
2822
  const U = m.find(
2823
- (B) => O.includes(B.token) || B.token === w
2823
+ (B) => O.includes(B.token) || B.token === g
2824
2824
  );
2825
2825
  if (U)
2826
2826
  throw new RangeError(
2827
2827
  `The format string mustn't contain \`${U.fullToken}\` and \`${f}\` at the same time`
2828
2828
  );
2829
- } else if (v.incompatibleTokens === "*" && m.length > 0)
2829
+ } else if (P.incompatibleTokens === "*" && m.length > 0)
2830
2830
  throw new RangeError(
2831
2831
  `The format string mustn't contain \`${f}\` and any other token at the same time`
2832
2832
  );
2833
- m.push({ token: w, fullToken: f });
2834
- const q = v.run(
2833
+ m.push({ token: g, fullToken: f });
2834
+ const q = P.run(
2835
2835
  t,
2836
2836
  f,
2837
2837
  o.match,
@@ -2841,51 +2841,51 @@ function Vr(t, e, n, r) {
2841
2841
  return s();
2842
2842
  d.push(q.setter), t = q.rest;
2843
2843
  } else {
2844
- if (w.match(Br))
2844
+ if (g.match(Gr))
2845
2845
  throw new RangeError(
2846
- "Format string contains an unescaped latin alphabet character `" + w + "`"
2846
+ "Format string contains an unescaped latin alphabet character `" + g + "`"
2847
2847
  );
2848
- if (f === "''" ? f = "'" : w === "'" && (f = Gr(f)), t.indexOf(f) === 0)
2848
+ if (f === "''" ? f = "'" : g === "'" && (f = jr(f)), t.indexOf(f) === 0)
2849
2849
  t = t.slice(f.length);
2850
2850
  else
2851
2851
  return s();
2852
2852
  }
2853
2853
  }
2854
- if (t.length > 0 && Qr.test(t))
2854
+ if (t.length > 0 && Vr.test(t))
2855
2855
  return s();
2856
- const E = d.map((f) => f.priority).sort((f, w) => w - f).filter((f, w, v) => v.indexOf(f) === w).map(
2857
- (f) => d.filter((w) => w.priority === f).sort((w, v) => v.subPriority - w.subPriority)
2856
+ const v = d.map((f) => f.priority).sort((f, g) => g - f).filter((f, g, P) => P.indexOf(f) === g).map(
2857
+ (f) => d.filter((g) => g.priority === f).sort((g, P) => P.subPriority - g.subPriority)
2858
2858
  ).map((f) => f[0]);
2859
- let P = y(n, r?.in);
2860
- if (isNaN(+P)) return s();
2859
+ let x = y(n, r?.in);
2860
+ if (isNaN(+x)) return s();
2861
2861
  const M = {};
2862
- for (const f of E) {
2863
- if (!f.validate(P, u))
2862
+ for (const f of v) {
2863
+ if (!f.validate(x, u))
2864
2864
  return s();
2865
- const w = f.set(P, M, u);
2866
- Array.isArray(w) ? (P = w[0], Object.assign(M, w[1])) : P = w;
2865
+ const g = f.set(x, M, u);
2866
+ Array.isArray(g) ? (x = g[0], Object.assign(M, g[1])) : x = g;
2867
2867
  }
2868
- return P;
2868
+ return x;
2869
2869
  }
2870
- function Gr(t) {
2871
- return t.match(Hr)[1].replace(Fr, "'");
2870
+ function jr(t) {
2871
+ return t.match(Qr)[1].replace(Br, "'");
2872
2872
  }
2873
- function Xr(t, e) {
2874
- const n = () => x(e?.in, NaN), s = Jr(t);
2873
+ function zr(t, e) {
2874
+ const n = () => T(e?.in, NaN), s = es(t);
2875
2875
  let a;
2876
2876
  if (s.date) {
2877
- const u = Zr(s.date, 2);
2878
- a = es(u.restDateString, u.year);
2877
+ const u = ts(s.date, 2);
2878
+ a = ns(u.restDateString, u.year);
2879
2879
  }
2880
2880
  if (!a || isNaN(+a)) return n();
2881
2881
  const o = +a;
2882
- let c = 0, i;
2883
- if (s.time && (c = ts(s.time), isNaN(c)))
2882
+ let i = 0, c;
2883
+ if (s.time && (i = rs(s.time), isNaN(i)))
2884
2884
  return n();
2885
2885
  if (s.timezone) {
2886
- if (i = ns(s.timezone), isNaN(i)) return n();
2886
+ if (c = ss(s.timezone), isNaN(c)) return n();
2887
2887
  } else {
2888
- const u = new Date(o + c), d = y(0, e?.in);
2888
+ const u = new Date(o + i), d = y(0, e?.in);
2889
2889
  return d.setFullYear(
2890
2890
  u.getUTCFullYear(),
2891
2891
  u.getUTCMonth(),
@@ -2897,14 +2897,14 @@ function Xr(t, e) {
2897
2897
  u.getUTCMilliseconds()
2898
2898
  ), d;
2899
2899
  }
2900
- return y(o + c + i, e?.in);
2900
+ return y(o + i + c, e?.in);
2901
2901
  }
2902
2902
  const V = {
2903
2903
  dateTimeDelimiter: /[T ]/,
2904
2904
  timeZoneDelimiter: /[Z ]/i,
2905
2905
  timezone: /([Z+-].*)$/
2906
- }, jr = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, zr = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Kr = /^([+-])(\d{2})(?::?(\d{2}))?$/;
2907
- function Jr(t) {
2906
+ }, Kr = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Jr = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Zr = /^([+-])(\d{2})(?::?(\d{2}))?$/;
2907
+ function es(t) {
2908
2908
  const e = {}, n = t.split(V.dateTimeDelimiter);
2909
2909
  let r;
2910
2910
  if (n.length > 2)
@@ -2918,7 +2918,7 @@ function Jr(t) {
2918
2918
  }
2919
2919
  return e;
2920
2920
  }
2921
- function Zr(t, e) {
2921
+ function ts(t, e) {
2922
2922
  const n = new RegExp(
2923
2923
  "^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
2924
2924
  ), r = t.match(n);
@@ -2929,84 +2929,84 @@ function Zr(t, e) {
2929
2929
  restDateString: t.slice((r[1] || r[2]).length)
2930
2930
  };
2931
2931
  }
2932
- function es(t, e) {
2932
+ function ns(t, e) {
2933
2933
  if (e === null) return /* @__PURE__ */ new Date(NaN);
2934
- const n = t.match(jr);
2934
+ const n = t.match(Kr);
2935
2935
  if (!n) return /* @__PURE__ */ new Date(NaN);
2936
- const r = !!n[4], s = Q(n[1]), a = Q(n[2]) - 1, o = Q(n[3]), c = Q(n[4]), i = Q(n[5]) - 1;
2936
+ const r = !!n[4], s = Q(n[1]), a = Q(n[2]) - 1, o = Q(n[3]), i = Q(n[4]), c = Q(n[5]) - 1;
2937
2937
  if (r)
2938
- return is(e, c, i) ? rs(e, c, i) : /* @__PURE__ */ new Date(NaN);
2938
+ return us(e, i, c) ? as(e, i, c) : /* @__PURE__ */ new Date(NaN);
2939
2939
  {
2940
2940
  const u = /* @__PURE__ */ new Date(0);
2941
- return !as(e, a, o) || !os(e, s) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, a, Math.max(s, o)), u);
2941
+ return !is(e, a, o) || !cs(e, s) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, a, Math.max(s, o)), u);
2942
2942
  }
2943
2943
  }
2944
2944
  function Q(t) {
2945
2945
  return t ? parseInt(t) : 1;
2946
2946
  }
2947
- function ts(t) {
2948
- const e = t.match(zr);
2947
+ function rs(t) {
2948
+ const e = t.match(Jr);
2949
2949
  if (!e) return NaN;
2950
2950
  const n = te(e[1]), r = te(e[2]), s = te(e[3]);
2951
- return cs(n, r, s) ? n * fe + r * le + s * 1e3 : NaN;
2951
+ return ds(n, r, s) ? n * fe + r * le + s * 1e3 : NaN;
2952
2952
  }
2953
2953
  function te(t) {
2954
2954
  return t && parseFloat(t.replace(",", ".")) || 0;
2955
2955
  }
2956
- function ns(t) {
2956
+ function ss(t) {
2957
2957
  if (t === "Z") return 0;
2958
- const e = t.match(Kr);
2958
+ const e = t.match(Zr);
2959
2959
  if (!e) return 0;
2960
2960
  const n = e[1] === "+" ? -1 : 1, r = parseInt(e[2]), s = e[3] && parseInt(e[3]) || 0;
2961
- return us(r, s) ? n * (r * fe + s * le) : NaN;
2961
+ return ls(r, s) ? n * (r * fe + s * le) : NaN;
2962
2962
  }
2963
- function rs(t, e, n) {
2963
+ function as(t, e, n) {
2964
2964
  const r = /* @__PURE__ */ new Date(0);
2965
2965
  r.setUTCFullYear(t, 0, 4);
2966
2966
  const s = r.getUTCDay() || 7, a = (e - 1) * 7 + n + 1 - s;
2967
2967
  return r.setUTCDate(r.getUTCDate() + a), r;
2968
2968
  }
2969
- const ss = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2970
- function bt(t) {
2969
+ const os = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2970
+ function Dt(t) {
2971
2971
  return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
2972
2972
  }
2973
- function as(t, e, n) {
2974
- return e >= 0 && e <= 11 && n >= 1 && n <= (ss[e] || (bt(t) ? 29 : 28));
2973
+ function is(t, e, n) {
2974
+ return e >= 0 && e <= 11 && n >= 1 && n <= (os[e] || (Dt(t) ? 29 : 28));
2975
2975
  }
2976
- function os(t, e) {
2977
- return e >= 1 && e <= (bt(t) ? 366 : 365);
2976
+ function cs(t, e) {
2977
+ return e >= 1 && e <= (Dt(t) ? 366 : 365);
2978
2978
  }
2979
- function is(t, e, n) {
2979
+ function us(t, e, n) {
2980
2980
  return e >= 1 && e <= 53 && n >= 0 && n <= 6;
2981
2981
  }
2982
- function cs(t, e, n) {
2982
+ function ds(t, e, n) {
2983
2983
  return t === 24 ? e === 0 && n === 0 : n >= 0 && n < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
2984
2984
  }
2985
- function us(t, e) {
2985
+ function ls(t, e) {
2986
2986
  return e >= 0 && e <= 59;
2987
2987
  }
2988
2988
  const G = (t) => {
2989
2989
  if (!t.includes("T")) {
2990
- for (const n of ds) {
2991
- const r = Vr(t, n, /* @__PURE__ */ new Date());
2990
+ for (const n of fs) {
2991
+ const r = Xr(t, n, /* @__PURE__ */ new Date());
2992
2992
  if (ne(r))
2993
2993
  return r;
2994
2994
  }
2995
2995
  return null;
2996
2996
  }
2997
- const e = Xr(t);
2997
+ const e = zr(t);
2998
2998
  return ne(e) ? e : null;
2999
- }, ds = ["yyyy-MM-dd", "MM-dd-yyyy"], ae = (t, e, n) => {
2999
+ }, fs = ["yyyy-MM-dd", "MM-dd-yyyy"], ae = (t, e, n) => {
3000
3000
  const r = {};
3001
- return e?.contentType !== null && (r[Gt] = e?.contentType || Vt), e?.jwt ? r.Authorization = `Bearer ${e.jwt}` : t && (r[X] = t), e?.chatReference && (r[Xt] = e.chatReference), { ...r, ...n };
3002
- }, ls = (t) => {
3001
+ return e?.contentType !== null && (r[jt] = e?.contentType || Xt), e?.jwt ? r.Authorization = `Bearer ${e.jwt}` : t && (r[X] = t), e?.chatReference && (r[zt] = e.chatReference), { ...r, ...n };
3002
+ }, ms = (t) => {
3003
3003
  const e = { ...t };
3004
3004
  return e[X] && (e[X] = e[X].substring(0, 8) + "...[REDACTED]"), e.Authorization && (e.Authorization = "Bearer [REDACTED]"), e[j] && (e[j] = e[j].substring(0, 8) + "...[REDACTED]"), e;
3005
- }, Fe = async (t, e, n) => await fetch(t, {
3005
+ }, He = async (t, e, n) => await fetch(t, {
3006
3006
  method: n.method || "GET",
3007
3007
  headers: e,
3008
3008
  body: n.body ? JSON.stringify(n.body) : void 0
3009
- }), fs = async (t, e, n) => {
3009
+ }), hs = async (t, e, n) => {
3010
3010
  const r = n?.body === void 0 ? void 0 : n?.isFormData ? n.body : JSON.stringify(n.body);
3011
3011
  return await fetch(t, {
3012
3012
  method: n.method,
@@ -3015,20 +3015,20 @@ const G = (t) => {
3015
3015
  signal: n?.signal
3016
3016
  });
3017
3017
  };
3018
- class ms {
3018
+ class ws {
3019
3019
  constructor() {
3020
3020
  this.decoder = new TextDecoder();
3021
3021
  }
3022
3022
  async streamChat(e, n, r = {}, s) {
3023
- const { onMessage: a, onError: o, onComplete: c, signal: i } = r;
3023
+ const { onMessage: a, onError: o, onComplete: i, signal: c } = r;
3024
3024
  try {
3025
3025
  const u = await this.initializeStreamRequest(
3026
3026
  e,
3027
3027
  n,
3028
- i,
3028
+ c,
3029
3029
  s
3030
3030
  );
3031
- await this.processStreamData(u, a), c?.();
3031
+ await this.processStreamData(u, a), i?.();
3032
3032
  } catch (u) {
3033
3033
  this.handleStreamError(u, o);
3034
3034
  }
@@ -3036,7 +3036,7 @@ class ms {
3036
3036
  async initializeStreamRequest(e, n, r, s) {
3037
3037
  const a = ae(void 0, {
3038
3038
  jwt: s
3039
- }), o = await fs(
3039
+ }), o = await hs(
3040
3040
  e,
3041
3041
  {
3042
3042
  Accept: "text/event-stream",
@@ -3049,16 +3049,16 @@ class ms {
3049
3049
  }
3050
3050
  );
3051
3051
  if (!o.ok) {
3052
- const c = await o.text();
3053
- let i = {};
3052
+ const i = await o.text();
3053
+ let c = {};
3054
3054
  try {
3055
- i = JSON.parse(c);
3055
+ c = JSON.parse(i);
3056
3056
  } catch {
3057
- i.error = "Failed to parse error body";
3057
+ c.error = "Failed to parse error body";
3058
3058
  }
3059
3059
  throw new Se({
3060
3060
  status: o.status,
3061
- message: i.error ?? "No response body"
3061
+ message: c.error ?? "No response body"
3062
3062
  });
3063
3063
  }
3064
3064
  if (!o.body)
@@ -3079,11 +3079,11 @@ class ms {
3079
3079
  }
3080
3080
  const o = this.decoder.decode(a, { stream: !0 });
3081
3081
  r += o;
3082
- const c = r.split(`
3082
+ const i = r.split(`
3083
3083
  `);
3084
- r = c.pop() || "";
3085
- for (const i of c)
3086
- this.parseSSEDataLine(i, n);
3084
+ r = i.pop() || "";
3085
+ for (const c of i)
3086
+ this.parseSSEDataLine(c, n);
3087
3087
  }
3088
3088
  } finally {
3089
3089
  e.releaseLock();
@@ -3111,8 +3111,8 @@ class ms {
3111
3111
  }
3112
3112
  }
3113
3113
  }
3114
- new ms();
3115
- class Ba {
3114
+ new ws();
3115
+ class ja {
3116
3116
  constructor(e) {
3117
3117
  this.config = e, console.info("SdmxApiClient initialized", {
3118
3118
  apiUrl: e.apiUrl || "NOT SET"
@@ -3135,10 +3135,10 @@ class Ba {
3135
3135
  );
3136
3136
  }
3137
3137
  async streamRequest(e, n, r, s, a) {
3138
- const o = `${this.config.apiUrl}/${e}`, c = this.buildHeaders(s, n.headers), i = new ReadableStream({
3138
+ const o = `${this.config.apiUrl}/${e}`, i = this.buildHeaders(s, n.headers), c = new ReadableStream({
3139
3139
  async start(d) {
3140
3140
  try {
3141
- const l = await Fe(o, c, n);
3141
+ const l = await He(o, i, n);
3142
3142
  if (!l.ok) {
3143
3143
  const M = await l.text();
3144
3144
  throw console.error(
@@ -3147,13 +3147,13 @@ class Ba {
3147
3147
  }
3148
3148
  const m = l.body?.getReader();
3149
3149
  if (!m) throw new Error("Failed to create stream reader");
3150
- const E = new Uint8Array([239, 187, 191]);
3151
- d.enqueue(E);
3152
- const P = async () => {
3150
+ const v = new Uint8Array([239, 187, 191]);
3151
+ d.enqueue(v);
3152
+ const x = async () => {
3153
3153
  const { done: M, value: f } = await m.read();
3154
- M ? d.close() : (d.enqueue(f), await P());
3154
+ M ? d.close() : (d.enqueue(f), await x());
3155
3155
  };
3156
- P();
3156
+ x();
3157
3157
  } catch (l) {
3158
3158
  d.error(l);
3159
3159
  }
@@ -3162,44 +3162,44 @@ class Ba {
3162
3162
  "Content-Disposition": `attachment; filename=${encodeURIComponent(r)}`,
3163
3163
  ...a ? { "Content-Type": a } : {}
3164
3164
  });
3165
- return new Response(i, { headers: u });
3165
+ return new Response(c, { headers: u });
3166
3166
  }
3167
3167
  async request(e, n, r, s) {
3168
- const a = Date.now(), o = `${r || this.config.apiUrl}/${e}`, c = this.buildHeaders(s, n.headers);
3169
- this.addInfoRequestLog("API Request", o, n, c);
3168
+ const a = Date.now(), o = `${r || this.config.apiUrl}/${e}`, i = this.buildHeaders(s, n.headers);
3169
+ this.addInfoRequestLog("API Request", o, n, i);
3170
3170
  try {
3171
- const i = await Fe(o, c, n), u = Date.now() - a;
3171
+ const c = await He(o, i, n), u = Date.now() - a;
3172
3172
  let d;
3173
- const l = await i.text();
3173
+ const l = await c.text();
3174
3174
  try {
3175
3175
  d = l ? JSON.parse(l) : {};
3176
3176
  } catch {
3177
3177
  if (this.addErrorRequestParsing(
3178
3178
  o,
3179
3179
  n,
3180
- i,
3180
+ c,
3181
3181
  u,
3182
3182
  l
3183
- ), !i.ok)
3183
+ ), !c.ok)
3184
3184
  throw new Error(
3185
- `API request failed: ${i.status} ${i.statusText} - ${l.substring(0, 100)}`
3185
+ `API request failed: ${c.status} ${c.statusText} - ${l.substring(0, 100)}`
3186
3186
  );
3187
3187
  d = { data: l };
3188
3188
  }
3189
- if (!i.ok) {
3190
- this.addErrorRequestLog(o, n, i, u, d);
3191
- const m = Bt(d, i);
3189
+ if (!c.ok) {
3190
+ this.addErrorRequestLog(o, n, c, u, d);
3191
+ const m = Gt(d, c);
3192
3192
  throw new Error(`API request failed: ${m}`);
3193
3193
  }
3194
3194
  return d;
3195
- } catch (i) {
3195
+ } catch (c) {
3196
3196
  const u = Date.now() - a;
3197
3197
  throw console.error("API Request Exception", {
3198
3198
  method: n.method,
3199
3199
  url: o,
3200
3200
  duration: `${u}ms`,
3201
- error: i instanceof Error ? i.message : String(i)
3202
- }), i;
3201
+ error: c instanceof Error ? c.message : String(c)
3202
+ }), c;
3203
3203
  }
3204
3204
  }
3205
3205
  buildHeaders(e, n) {
@@ -3218,7 +3218,7 @@ class Ba {
3218
3218
  const a = {
3219
3219
  method: r.method || "GET",
3220
3220
  url: n,
3221
- headers: ls(s)
3221
+ headers: ms(s)
3222
3222
  };
3223
3223
  r.body && (a.body = r.body), console.info(e, a);
3224
3224
  }
@@ -3244,112 +3244,112 @@ class Ba {
3244
3244
  });
3245
3245
  }
3246
3246
  }
3247
- var we = /* @__PURE__ */ ((t) => (t.LAST_UPDATE_AT = "lastUpdatedAt", t.SERIES_COUNT = "series_count", t))(we || {});
3248
- function Va(t) {
3247
+ var ge = /* @__PURE__ */ ((t) => (t.LAST_UPDATE_AT = "lastUpdatedAt", t.SERIES_COUNT = "series_count", t))(ge || {});
3248
+ function za(t) {
3249
3249
  return t?.annotations?.find((e) => {
3250
- if (e.id === we.LAST_UPDATE_AT)
3250
+ if (e.id === ge.LAST_UPDATE_AT)
3251
3251
  return e;
3252
3252
  })?.value;
3253
3253
  }
3254
- const pe = (t, e) => t?.names && t?.names[e] || t?.name, Dt = (t, e, n) => {
3254
+ const pe = (t, e) => t?.names && t?.names[e] || t?.name, Et = (t, e, n) => {
3255
3255
  if (!(!t || e?.has(t?.id)) && (e?.set(t?.id, t), t?.parent)) {
3256
3256
  const r = n?.get(t?.parent);
3257
- Dt(r, e, n);
3257
+ Et(r, e, n);
3258
3258
  }
3259
- }, hs = (t, e) => {
3259
+ }, gs = (t, e) => {
3260
3260
  const n = /* @__PURE__ */ new Map(), r = new Map(t?.map((s) => [s.id, s]));
3261
3261
  return e?.forEach((s) => {
3262
- Dt(s, n, r);
3262
+ Et(s, n, r);
3263
3263
  }), Array.from(n?.values());
3264
3264
  };
3265
- var gs = /* @__PURE__ */ ((t) => (t.C = "c", t))(gs || {}), k = /* @__PURE__ */ ((t) => (t.EQUALS = "eq", t.NOT_EQUALS = "ne", t.LESS = "lt", t.LESS_OR_EQUAL = "le", t.GREATER = "gt", t.GREATER_OR_EQUAL = "ge", t.CONTAINS = "co", t.NOT_CONTAINS = "nc", t.STARTS = "sw", t.ENDS = "ew", t))(k || {}), ws = /* @__PURE__ */ ((t) => (t.BOOLEAN = "Boolean", t.DATE_TIME = "DateTime", t.DECIMAL = "Decimal", t.INTEGER = "Integer", t.OBSERVATION_TIME_PERIOD = "ObservationalTimePeriod", t.STRING = "String", t.TIME = "Time", t.TIME_RANGE = "TimeRange", t.URI = "URI", t))(ws || {}), ps = /* @__PURE__ */ ((t) => (t.ANNUAL = "A", t.QUARTERLY = "Q", t.MONTHLY = "M", t))(ps || {});
3266
- const Ga = ["FREQ", "FREQUENCY"], ys = "TIME_PERIOD", bs = "time_period_start", Ds = "time_period_end", Xa = (t) => {
3265
+ var ps = /* @__PURE__ */ ((t) => (t.C = "c", t))(ps || {}), _ = /* @__PURE__ */ ((t) => (t.EQUALS = "eq", t.NOT_EQUALS = "ne", t.LESS = "lt", t.LESS_OR_EQUAL = "le", t.GREATER = "gt", t.GREATER_OR_EQUAL = "ge", t.CONTAINS = "co", t.NOT_CONTAINS = "nc", t.STARTS = "sw", t.ENDS = "ew", t))(_ || {}), ys = /* @__PURE__ */ ((t) => (t.BOOLEAN = "Boolean", t.DATE_TIME = "DateTime", t.DECIMAL = "Decimal", t.INTEGER = "Integer", t.OBSERVATION_TIME_PERIOD = "ObservationalTimePeriod", t.STRING = "String", t.TIME = "Time", t.TIME_RANGE = "TimeRange", t.URI = "URI", t))(ys || {}), bs = /* @__PURE__ */ ((t) => (t.ANNUAL = "A", t.QUARTERLY = "Q", t.MONTHLY = "M", t))(bs || {});
3266
+ const Ka = ["FREQ", "FREQUENCY"], Ds = "TIME_PERIOD", Es = "time_period_start", Ts = "time_period_end", Ja = (t) => {
3267
3267
  const e = t?.find(
3268
- (a) => a.id === bs
3268
+ (a) => a.id === Es
3269
3269
  ), n = t?.find(
3270
- (a) => a.id === Ds
3270
+ (a) => a.id === Ts
3271
3271
  ), r = n?.title ? new Date(n?.title) : null;
3272
3272
  return {
3273
3273
  startPeriod: e?.title ? new Date(e?.title) : null,
3274
3274
  endPeriod: r
3275
3275
  };
3276
- }, Ts = (t, e) => t.id.localeCompare(e.id), Es = (t, e) => t.memberValue.localeCompare(e.memberValue), xs = (t, e) => {
3277
- const n = new Array(t.length), r = t.map((o, c) => [o, c]);
3276
+ }, xs = (t, e) => t.id.localeCompare(e.id), Ps = (t, e) => t.memberValue.localeCompare(e.memberValue), vs = (t, e) => {
3277
+ const n = new Array(t.length), r = t.map((o, i) => [o, i]);
3278
3278
  r.sort(
3279
- (o, c) => Ts(o[0], c[0])
3279
+ (o, i) => xs(o[0], i[0])
3280
3280
  );
3281
3281
  const s = [...e];
3282
- s.sort(Es);
3282
+ s.sort(Ps);
3283
3283
  let a = 0;
3284
3284
  for (const o of r) {
3285
- const c = o[0];
3286
- for (; a < s.length && s[a].memberValue.localeCompare(c.id) < 0; )
3285
+ const i = o[0];
3286
+ for (; a < s.length && s[a].memberValue.localeCompare(i.id) < 0; )
3287
3287
  a += 1;
3288
- a < s.length && s[a].memberValue === c.id && (n[o[1]] = o[0]);
3288
+ a < s.length && s[a].memberValue === i.id && (n[o[1]] = o[0]);
3289
3289
  }
3290
3290
  return n.filter((o) => o != null);
3291
- }, Ps = (t) => !!t?.some((e) => e.parent), ja = (t, e, n, r, s = []) => {
3291
+ }, Ms = (t) => !!t?.some((e) => e.parent), Za = (t, e, n, r, s = []) => {
3292
3292
  let a = t || [];
3293
- if (vs(n || [], e || "")) {
3293
+ if (Os(n || [], e || "")) {
3294
3294
  const o = (n || [])[0].cubeRegions?.find(
3295
- ({ isIncluded: c }) => c
3295
+ ({ isIncluded: i }) => i
3296
3296
  );
3297
3297
  if (o) {
3298
- const c = o.memberSelection?.find(
3299
- ({ componentId: i }) => i === e
3298
+ const i = o.memberSelection?.find(
3299
+ ({ componentId: c }) => c === e
3300
3300
  );
3301
- c ? a = a.length === 0 ? (c.selectionValues || []).map(({ memberValue: i }) => ({
3302
- id: i,
3303
- name: i
3304
- })) : xs(a, c.selectionValues) : a = [];
3301
+ i ? a = a.length === 0 ? (i.selectionValues || []).map(({ memberValue: c }) => ({
3302
+ id: c,
3303
+ name: c
3304
+ })) : vs(a, i.selectionValues) : a = [];
3305
3305
  }
3306
3306
  } else s.length !== 0 && (a = a.filter(({ id: o }) => s.includes(o)));
3307
- return Ps(t) && (a = hs(t, a)), a?.map((o) => ({
3307
+ return Ms(t) && (a = gs(t, a)), a?.map((o) => ({
3308
3308
  ...o,
3309
3309
  name: r ? pe(o, r) : o?.name
3310
3310
  }));
3311
- }, vs = (t, e) => t != null && t.length > 0 && e != null, Ms = (t) => {
3311
+ }, Os = (t, e) => t != null && t.length > 0 && e != null, As = (t) => {
3312
3312
  const e = [];
3313
3313
  return t?.filters?.forEach((n) => {
3314
- n.componentCode !== ys && e.push({
3314
+ n.componentCode !== Ds && e.push({
3315
3315
  componentCode: n.componentCode,
3316
- operator: k.EQUALS,
3316
+ operator: _.EQUALS,
3317
3317
  value: n.values.join(",")
3318
3318
  });
3319
3319
  }), e;
3320
- }, za = (t) => {
3320
+ }, eo = (t) => {
3321
3321
  const e = /* @__PURE__ */ new Map();
3322
3322
  return t?.forEach((n) => {
3323
- e.set(n.urn, Ms(n));
3323
+ e.set(n.urn, As(n));
3324
3324
  }), e;
3325
- }, Os = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Qe = (t) => {
3325
+ }, Ns = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Qe = (t) => {
3326
3326
  if (typeof t != "string")
3327
3327
  throw new TypeError("Invalid argument expected string");
3328
- const e = t.match(Os);
3328
+ const e = t.match(Ns);
3329
3329
  if (!e)
3330
3330
  throw new Error(`Invalid argument not valid semver ('${t}' received)`);
3331
3331
  return e.shift(), e;
3332
3332
  }, Be = (t) => t === "*" || t === "x" || t === "X", Ve = (t) => {
3333
3333
  const e = parseInt(t, 10);
3334
3334
  return isNaN(e) ? t : e;
3335
- }, As = (t, e) => typeof t != typeof e ? [String(t), String(e)] : [t, e], Ns = (t, e) => {
3335
+ }, Rs = (t, e) => typeof t != typeof e ? [String(t), String(e)] : [t, e], _s = (t, e) => {
3336
3336
  if (Be(t) || Be(e))
3337
3337
  return 0;
3338
- const [n, r] = As(Ve(t), Ve(e));
3338
+ const [n, r] = Rs(Ve(t), Ve(e));
3339
3339
  return n > r ? 1 : n < r ? -1 : 0;
3340
3340
  }, Ge = (t, e) => {
3341
3341
  for (let n = 0; n < Math.max(t.length, e.length); n++) {
3342
- const r = Ns(t[n] || "0", e[n] || "0");
3342
+ const r = _s(t[n] || "0", e[n] || "0");
3343
3343
  if (r !== 0)
3344
3344
  return r;
3345
3345
  }
3346
3346
  return 0;
3347
- }, Rs = (t, e) => {
3347
+ }, ks = (t, e) => {
3348
3348
  const n = Qe(t), r = Qe(e), s = n.pop(), a = r.pop(), o = Ge(n, r);
3349
3349
  return o !== 0 ? o : s && a ? Ge(s.split("."), a.split(".")) : s || a ? s ? -1 : 1 : 0;
3350
- }, ks = (t, e, n) => {
3351
- _s(n);
3352
- const r = Rs(t, e);
3350
+ }, Is = (t, e, n) => {
3351
+ Ys(n);
3352
+ const r = ks(t, e);
3353
3353
  return Tt[n].includes(r);
3354
3354
  }, Tt = {
3355
3355
  ">": [1],
@@ -3358,51 +3358,51 @@ const Ga = ["FREQ", "FREQUENCY"], ys = "TIME_PERIOD", bs = "time_period_start",
3358
3358
  "<=": [-1, 0],
3359
3359
  "<": [-1],
3360
3360
  "!=": [-1, 1]
3361
- }, Xe = Object.keys(Tt), _s = (t) => {
3361
+ }, Xe = Object.keys(Tt), Ys = (t) => {
3362
3362
  if (Xe.indexOf(t) === -1)
3363
3363
  throw new Error(`Invalid operator, expected one of ${Xe.join("|")}`);
3364
3364
  }, oe = "+", ye = (t, e) => {
3365
3365
  const { agency: n, id: r, version: s } = S(t), a = e.filter(
3366
- (i) => i.agencyID === n && i.id === r && !i?.version?.includes(oe)
3366
+ (c) => c.agencyID === n && c.id === r && !c?.version?.includes(oe)
3367
3367
  );
3368
3368
  if (a.length === 1)
3369
3369
  return a[0];
3370
3370
  if (!s?.includes(oe))
3371
- return a.find((i) => i.version === s);
3371
+ return a.find((c) => c.version === s);
3372
3372
  const o = a.map(
3373
- (i) => i.version
3374
- ), c = Is(s, o);
3373
+ (c) => c.version
3374
+ ), i = Cs(s, o);
3375
3375
  return a.find(
3376
- (i) => i.version === c[0]
3376
+ (c) => c.version === i[0]
3377
3377
  );
3378
- }, Is = (t, e) => {
3379
- const n = Ys(t, e);
3378
+ }, Cs = (t, e) => {
3379
+ const n = Ss(t, e);
3380
3380
  return n.length > 0 ? [n[0]] : [];
3381
- }, Ys = (t, e) => {
3381
+ }, Ss = (t, e) => {
3382
3382
  const n = [];
3383
3383
  return e.forEach((r) => {
3384
- Ss(t, r) && n.push(r);
3384
+ $s(t, r) && n.push(r);
3385
3385
  }), n;
3386
- }, Cs = (t) => {
3386
+ }, Ls = (t) => {
3387
3387
  const e = t.trim(), n = e.indexOf("+");
3388
3388
  if (n <= 0) return "";
3389
3389
  let r = n;
3390
3390
  for (; r > 0 && e[r - 1] >= "0" && e[r - 1] <= "9"; )
3391
3391
  r--;
3392
3392
  return r > 0 ? e.slice(0, r) : "";
3393
- }, Ss = (t, e) => {
3394
- const n = t.trim().replace(/\+/, ""), r = Cs(t);
3395
- return e.startsWith(r) && ks(e, n, ">=");
3393
+ }, $s = (t, e) => {
3394
+ const n = t.trim().replace(/\+/, ""), r = Ls(t);
3395
+ return e.startsWith(r) && Is(e, n, ">=");
3396
3396
  }, be = (t, e) => {
3397
- const { concept: n } = Ls(t, e);
3397
+ const { concept: n } = Ws(t, e);
3398
3398
  return n;
3399
- }, Ls = (t, e) => {
3399
+ }, Ws = (t, e) => {
3400
3400
  if (t == null)
3401
3401
  return {
3402
3402
  concept: void 0,
3403
3403
  scheme: void 0
3404
3404
  };
3405
- const { childId: n, agency: r, id: s, version: a } = nt(t);
3405
+ const { childId: n, agency: r, id: s, version: a } = rt(t);
3406
3406
  if (a?.includes(oe)) {
3407
3407
  const o = ye(
3408
3408
  t,
@@ -3414,7 +3414,7 @@ const Ga = ["FREQ", "FREQUENCY"], ys = "TIME_PERIOD", bs = "time_period_start",
3414
3414
  };
3415
3415
  }
3416
3416
  for (const o of e)
3417
- if ($s(o, s, r, a))
3417
+ if (qs(o, s, r, a))
3418
3418
  return {
3419
3419
  concept: je(o?.concepts || [], n),
3420
3420
  scheme: o
@@ -3423,71 +3423,71 @@ const Ga = ["FREQ", "FREQUENCY"], ys = "TIME_PERIOD", bs = "time_period_start",
3423
3423
  concept: void 0,
3424
3424
  scheme: void 0
3425
3425
  };
3426
- }, je = (t, e) => t?.find((n) => n.id === e), $s = (t, e, n, r) => t.id === e && t.agencyID === n && t.version === r, Ka = (t = [], e = [], n) => {
3426
+ }, je = (t, e) => t?.find((n) => n.id === e), qs = (t, e, n, r) => t.id === e && t.agencyID === n && t.version === r, to = (t = [], e = [], n) => {
3427
3427
  const r = n?.conceptIdentity || "", s = be(r, e), a = z(
3428
3428
  n?.localRepresentation?.enumeration
3429
3429
  ), o = z(
3430
3430
  s?.coreRepresentation?.enumeration
3431
- ), c = a || o;
3432
- if (c != null)
3433
- return ye(c, t);
3434
- }, Ws = (t, e) => {
3431
+ ), i = a || o;
3432
+ if (i != null)
3433
+ return ye(i, t);
3434
+ }, Us = (t, e) => {
3435
3435
  const n = t?.data?.dataSets?.[0], s = t?.data?.structures?.[0]?.attributes?.dimensionGroup || [], a = n?.dimensionGroupAttributes, o = {};
3436
- for (const c of s) {
3437
- const i = c.relationship.dimensions, { codedSeriesKey: u, decodedSeriesKey: d } = Et(
3436
+ for (const i of s) {
3437
+ const c = i.relationship.dimensions, { codedSeriesKey: u, decodedSeriesKey: d } = xt(
3438
3438
  t,
3439
3439
  e,
3440
- i
3440
+ c
3441
3441
  );
3442
- o[c.id] = {
3442
+ o[i.id] = {
3443
3443
  values: a?.[u] || [],
3444
3444
  decodedSeriesKey: d,
3445
3445
  codedSeriesKey: u
3446
3446
  };
3447
3447
  }
3448
3448
  return o;
3449
- }, Et = (t, e, n) => {
3449
+ }, xt = (t, e, n) => {
3450
3450
  const r = t?.data?.structures?.[0], s = [
3451
3451
  ...r?.dimensions.series || [],
3452
3452
  ...r?.dimensions.observation || []
3453
3453
  ], a = new Array(s?.length), o = new Array(s?.length);
3454
- return n?.forEach((c) => {
3455
- const i = s?.findIndex((l) => l.id === c) || 0, u = e[i], d = s[i].values.findIndex(
3454
+ return n?.forEach((i) => {
3455
+ const c = s?.findIndex((l) => l.id === i) || 0, u = e[c], d = s[c].values.findIndex(
3456
3456
  (l) => l.id === u || l.value === u
3457
3457
  ) || 0;
3458
- a[i] = d >= 0 ? d : u, o[i] = u;
3458
+ a[c] = d >= 0 ? d : u, o[c] = u;
3459
3459
  }), {
3460
3460
  codedSeriesKey: a.join(":"),
3461
3461
  decodedSeriesKey: o.join(":")
3462
3462
  };
3463
- }, Ja = (t, e, n) => {
3463
+ }, no = (t, e, n) => {
3464
3464
  const r = t?.data?.dataSets?.[0], s = t?.data?.structures?.[0], a = (s?.attributes?.dimensionGroup || []).filter(
3465
3465
  (l) => l.relationship.dimensions?.length === 1 && l.relationship.dimensions.includes(e || "")
3466
- ), o = r?.dimensionGroupAttributes, c = [
3466
+ ), o = r?.dimensionGroupAttributes, i = [
3467
3467
  ...s?.dimensions.series || [],
3468
3468
  ...s?.dimensions.observation || []
3469
- ], i = c?.findIndex((l) => l.id === e), u = new Array(c?.length);
3470
- u[i] = n || "";
3469
+ ], c = i?.findIndex((l) => l.id === e), u = new Array(i?.length);
3470
+ u[c] = n || "";
3471
3471
  const d = {};
3472
3472
  for (const l of a) {
3473
- const m = l.relationship.dimensions, { codedSeriesKey: E, decodedSeriesKey: P } = Et(
3473
+ const m = l.relationship.dimensions, { codedSeriesKey: v, decodedSeriesKey: x } = xt(
3474
3474
  t,
3475
3475
  u,
3476
3476
  m
3477
3477
  );
3478
3478
  d[l.id] = {
3479
- values: o?.[E] || [],
3480
- decodedSeriesKey: P,
3481
- codedSeriesKey: E
3479
+ values: o?.[v] || [],
3480
+ decodedSeriesKey: x,
3481
+ codedSeriesKey: v
3482
3482
  };
3483
3483
  }
3484
3484
  return d;
3485
- }, qs = (t, e) => {
3485
+ }, Fs = (t, e) => {
3486
3486
  if (e == null)
3487
3487
  return;
3488
3488
  const n = t.values?.[e];
3489
3489
  return n ?? (e instanceof Array ? { values: e } : { value: e.toString() });
3490
- }, Za = (t, e, n, r) => {
3490
+ }, ro = (t, e, n, r) => {
3491
3491
  const s = e?.find(
3492
3492
  (a) => a?.id === t?.id
3493
3493
  )?.values;
@@ -3495,7 +3495,7 @@ const Ga = ["FREQ", "FREQUENCY"], ys = "TIME_PERIOD", bs = "time_period_start",
3495
3495
  ...a,
3496
3496
  name: r ? pe(a, r) : a?.name
3497
3497
  })) || [];
3498
- }, Us = (t, e) => {
3498
+ }, Hs = (t, e) => {
3499
3499
  const n = e?.dataStructureComponents?.attributeList, r = t?.metadataStructureComponents?.metadataAttributeList;
3500
3500
  return n?.metadataAttributeUsages?.map((s) => {
3501
3501
  const a = r?.metadataAttributes?.find(
@@ -3507,55 +3507,55 @@ const Ga = ["FREQ", "FREQUENCY"], ys = "TIME_PERIOD", bs = "time_period_start",
3507
3507
  isMandatory: Number(a?.minOccurs) > 0
3508
3508
  };
3509
3509
  });
3510
- }, eo = (t = [], e, n) => {
3510
+ }, so = (t = [], e, n) => {
3511
3511
  const r = z(e?.conceptIdentity) || "", s = be(r, t);
3512
3512
  return n ? pe(s, n) : s?.name ?? s?.id ?? e?.id;
3513
3513
  };
3514
- var Hs = /* @__PURE__ */ ((t) => (t.CONDITIONAL = "Conditional", t.MANDATORY = "Mandatory", t))(Hs || {}), De = /* @__PURE__ */ ((t) => (t.DIMENSION = "Dimension", t.MEASURE_DIMENSION = "MeasureDimension", t.TIME_DIMENSION = "TimeDimension", t))(De || {}), Fs = /* @__PURE__ */ ((t) => (t.UNBOUNDED = "unbounded", t))(Fs || {});
3514
+ var Qs = /* @__PURE__ */ ((t) => (t.CONDITIONAL = "Conditional", t.MANDATORY = "Mandatory", t))(Qs || {}), De = /* @__PURE__ */ ((t) => (t.DIMENSION = "Dimension", t.MEASURE_DIMENSION = "MeasureDimension", t.TIME_DIMENSION = "TimeDimension", t))(De || {}), Bs = /* @__PURE__ */ ((t) => (t.UNBOUNDED = "unbounded", t))(Bs || {});
3515
3515
  function ze(t) {
3516
3516
  return t?.dataStructures?.[0]?.dataStructureComponents?.dimensionList;
3517
3517
  }
3518
- function to(t) {
3518
+ function ao(t) {
3519
3519
  return t?.data?.structures?.[0]?.dimensions?.series || [];
3520
3520
  }
3521
- function no(t) {
3521
+ function oo(t) {
3522
3522
  return t?.data?.structures?.[0]?.dimensions?.observation?.[0].values.map((e) => e.value ? e.value : e.id).filter((e) => e != null) || [];
3523
3523
  }
3524
- function ro(t) {
3524
+ function io(t) {
3525
3525
  return t.find(
3526
3526
  (e) => e.type === De.TIME_DIMENSION
3527
3527
  );
3528
3528
  }
3529
- const so = (t) => {
3529
+ const co = (t) => {
3530
3530
  const e = /* @__PURE__ */ new Map(), n = t?.dataStructures?.[0], r = t?.metadataStructures?.[0], s = t?.conceptSchemes || [], a = t?.codelists || [];
3531
3531
  return t && [
3532
3532
  ...ze(t)?.dimensions || [],
3533
3533
  ...ze(t)?.timeDimensions || [],
3534
- ...Us(r, n),
3534
+ ...Hs(r, n),
3535
3535
  ...n?.dataStructureComponents?.attributeList?.attributes || []
3536
3536
  ].forEach(
3537
- (c) => {
3538
- const i = be(
3539
- c?.conceptIdentity,
3537
+ (i) => {
3538
+ const c = be(
3539
+ i?.conceptIdentity,
3540
3540
  s
3541
- ), u = c?.localRepresentation?.enumeration || i?.coreRepresentation?.enumeration, d = ye(
3541
+ ), u = i?.localRepresentation?.enumeration || c?.coreRepresentation?.enumeration, d = ye(
3542
3542
  u,
3543
3543
  a
3544
3544
  );
3545
- c?.id && (u ? e.set(c?.id, {
3545
+ i?.id && (u ? e.set(i?.id, {
3546
3546
  ...d,
3547
- name: i?.name,
3548
- names: i?.names
3549
- }) : e.set(c?.id, {
3550
- id: c?.id,
3551
- name: i?.name,
3552
- names: i?.names
3547
+ name: c?.name,
3548
+ names: c?.names
3549
+ }) : e.set(i?.id, {
3550
+ id: i?.id,
3551
+ name: c?.name,
3552
+ names: c?.names
3553
3553
  }));
3554
3554
  }
3555
3555
  ), e;
3556
- }, ao = (t) => t?.find(
3557
- (e) => e.id === we.SERIES_COUNT
3558
- )?.title || "", Te = 1440 * 60 * 1e3, Ee = 7 * Te;
3556
+ }, uo = (t) => t?.find(
3557
+ (e) => e.id === ge.SERIES_COUNT
3558
+ )?.title || "", Ee = 1440 * 60 * 1e3, Te = 7 * Ee;
3559
3559
  function xe(t) {
3560
3560
  const e = `${t}-01-01`, n = new Date(e);
3561
3561
  if (n.getDay() !== 4) {
@@ -3564,7 +3564,7 @@ function xe(t) {
3564
3564
  }
3565
3565
  return n;
3566
3566
  }
3567
- function Qs(t) {
3567
+ function Vs(t) {
3568
3568
  const e = new Date(t), r = -((e.getDay() + 6) % 7) + 3;
3569
3569
  return e.setDate(e.getDate() + r), new Date(e.valueOf());
3570
3570
  }
@@ -3575,29 +3575,30 @@ function Ke(t, e = "W") {
3575
3575
  const s = `${t}-12-24`;
3576
3576
  return Z(new Date(s), e).weekNumber;
3577
3577
  }
3578
- function xt(t, e, n = "W") {
3578
+ function Pt(t, e, n = "W") {
3579
3579
  return `${t}-${n}${e < 10 ? "0" + e : e}`;
3580
3580
  }
3581
3581
  function Z(t, e = "W") {
3582
- const n = Qs(t), r = n.getFullYear(), s = xe(r), a = 1 + Math.ceil(
3583
- (n.getTime() - s.getTime()) / Ee
3582
+ const n = Vs(t), r = n.getFullYear(), s = xe(r), a = 1 + Math.ceil(
3583
+ (n.getTime() - s.getTime()) / Te
3584
3584
  );
3585
3585
  return {
3586
- code: xt(r, a, e),
3586
+ code: Pt(r, a, e),
3587
3587
  weekNumber: a,
3588
3588
  weekYear: r
3589
3589
  };
3590
3590
  }
3591
- function Bs(t) {
3592
- const [e, n] = t.split("-W"), s = xe(+e).getTime() + (+n - 1) * Ee - 3 * Te;
3591
+ function Gs(t) {
3592
+ const [e, n] = t.split("-W"), s = xe(+e).getTime() + (+n - 1) * Te - 3 * Ee;
3593
3593
  return new Date(s);
3594
3594
  }
3595
- function Vs(t) {
3596
- const [e, n] = t.split("-W"), s = xe(+e).getTime() + (+n - 1) * Ee + 3 * Te;
3595
+ function Xs(t) {
3596
+ const [e, n] = t.split("-W"), s = xe(+e).getTime() + (+n - 1) * Te + 3 * Ee;
3597
3597
  return new Date(s);
3598
3598
  }
3599
- const Gs = "/api/download", Xs = 6e4, oo = async (t, e, n, r, s, a, o, c) => {
3600
- const i = new URLSearchParams({
3599
+ const Je = "/api/download", js = 6e4, zs = /[\x00-\x1F\x7F<>:"/\\|?*]/g, vt = (t) => t.normalize("NFKC").replace(zs, "_").replace(/_+/g, "_").replace(/\s+/g, " ").replace(/^[._ ]+/, "").trim() || "download", Ks = (t, e, n, r, s, a, o) => {
3600
+ const i = new URL(Je, window.location.origin);
3601
+ if (i.search = new URLSearchParams({
3601
3602
  urn: t,
3602
3603
  format: e,
3603
3604
  compress: "false",
@@ -3606,77 +3607,89 @@ const Gs = "/api/download", Xs = 6e4, oo = async (t, e, n, r, s, a, o, c) => {
3606
3607
  attribute: r,
3607
3608
  language: n,
3608
3609
  isMetadata: o ? "true" : "none"
3609
- }).toString(), u = `${Gs}?${i}`, d = await fetch(u, {
3610
+ }).toString(), i.origin !== window.location.origin || i.pathname !== Je)
3611
+ throw new Error("Invalid download URL");
3612
+ return i.toString();
3613
+ }, Js = (t, e) => {
3614
+ const n = URL.createObjectURL(t), r = document.createElement("a");
3615
+ r.href = n, r.download = vt(e), r.rel = "noopener noreferrer", r.click(), window.setTimeout(
3616
+ () => URL.revokeObjectURL(n),
3617
+ js
3618
+ );
3619
+ }, lo = async (t, e, n, r, s, a, o, i) => {
3620
+ const c = vt(a), u = Ks(
3621
+ t,
3622
+ e,
3623
+ n,
3624
+ r,
3625
+ s,
3626
+ c,
3627
+ o
3628
+ ), d = await fetch(u, {
3610
3629
  method: "GET",
3611
3630
  credentials: "same-origin",
3612
- signal: c
3631
+ signal: i
3613
3632
  });
3614
3633
  if (!d.ok) {
3615
- const P = await d.text();
3634
+ const m = await d.text();
3616
3635
  throw new Error(
3617
- `Download request failed: ${d.status} ${d.statusText}${P ? ` - ${P}` : ""}`
3636
+ `Download request failed: ${d.status} ${d.statusText}${m ? ` - ${m}` : ""}`
3618
3637
  );
3619
3638
  }
3620
3639
  const l = await d.blob();
3621
- if (c?.aborted)
3622
- return;
3623
- const m = URL.createObjectURL(l), E = document.createElement("a");
3624
- E.href = m, E.download = a, E.style.display = "none", document.body.appendChild(E), E.click(), document.body.removeChild(E), window.setTimeout(
3625
- () => URL.revokeObjectURL(m),
3626
- Xs
3627
- );
3628
- }, io = (t, e) => {
3640
+ i?.aborted || Js(l, c);
3641
+ }, fo = (t, e) => {
3629
3642
  const n = [];
3630
3643
  for (const r of t) {
3631
3644
  if (r.type !== De.DIMENSION)
3632
3645
  continue;
3633
3646
  const s = e.find((a) => a.componentCode === r.id);
3634
- s != null && s.values?.length > 0 ? n.push(s.values?.join(at)) : n.push("*");
3647
+ s != null && s.values?.length > 0 ? n.push(s.values?.join(ot)) : n.push("*");
3635
3648
  }
3636
3649
  return n.join(".");
3637
- }, js = (t, e) => {
3650
+ }, Zs = (t, e) => {
3638
3651
  if (!t || !t.startPeriod && !t.endPeriod)
3639
3652
  return null;
3640
3653
  const n = [], { startPeriod: r, endPeriod: s } = t;
3641
3654
  if (r && n.push(
3642
- `${k.GREATER_OR_EQUAL}${Ie}${Je(r)}`
3655
+ `${_.GREATER_OR_EQUAL}${Ie}${Ze(r)}`
3643
3656
  ), s && n.push(
3644
- `${k.LESS_OR_EQUAL}${Ie}${Je(s)}`
3657
+ `${_.LESS_OR_EQUAL}${Ie}${Ze(s)}`
3645
3658
  ), n.length === 0)
3646
3659
  return null;
3647
- const a = e, o = n.join(at);
3648
- return `${encodeURIComponent(`c[${a}]`)}${Ht}${encodeURIComponent(o)}`;
3649
- }, Je = (t) => Xn(t, "yyyy-MM-dd"), co = (t, e) => {
3650
- const n = zs(t, e) || null;
3651
- return n ? js(n, e?.id) : null;
3652
- }, zs = (t, e) => {
3660
+ const a = e, o = n.join(ot);
3661
+ return `${encodeURIComponent(`c[${a}]`)}${Qt}${encodeURIComponent(o)}`;
3662
+ }, Ze = (t) => zn(t, "yyyy-MM-dd"), mo = (t, e) => {
3663
+ const n = ea(t, e) || null;
3664
+ return n ? Zs(n, e?.id) : null;
3665
+ }, ea = (t, e) => {
3653
3666
  const n = e.id, r = t?.filters?.find(
3654
- (i) => i.componentCode === n
3667
+ (c) => c.componentCode === n
3655
3668
  );
3656
3669
  if (!r || !r.values)
3657
3670
  return null;
3658
- const s = r.values?.filter((i) => !!i);
3671
+ const s = r.values?.filter((c) => !!c);
3659
3672
  if (!s.length)
3660
3673
  return null;
3661
3674
  const a = r.operator;
3662
- if (a === k.LESS_OR_EQUAL || a === k.LESS)
3675
+ if (a === _.LESS_OR_EQUAL || a === _.LESS)
3663
3676
  return { startPeriod: null, endPeriod: G(s[0]) };
3664
- if (a === k.GREATER_OR_EQUAL || a === k.GREATER)
3677
+ if (a === _.GREATER_OR_EQUAL || a === _.GREATER)
3665
3678
  return { startPeriod: G(s[0]), endPeriod: null };
3666
- const o = G(s[0]), c = G(s[1]);
3667
- return { startPeriod: o, endPeriod: c };
3668
- }, Ks = "Observation", uo = (t) => {
3679
+ const o = G(s[0]), i = G(s[1]);
3680
+ return { startPeriod: o, endPeriod: i };
3681
+ }, ta = "Observation", ho = (t) => {
3669
3682
  const e = t?.data?.dataSets, n = t?.data?.structures?.[0];
3670
3683
  if (!e || !n)
3671
3684
  return [];
3672
- const r = n.attributes, s = n.dimensions, a = r?.dimensionGroup || [], o = e[0].series || e[0].observations, c = s.series?.length ? s.series : s.observation, i = [];
3685
+ const r = n.attributes, s = n.dimensions, a = r?.dimensionGroup || [], o = e[0].series || e[0].observations, i = s.series?.length ? s.series : s.observation, c = [];
3673
3686
  for (const u in o) {
3674
- const d = [], { name: l, parsedTimeSeriesValue: m } = Js(
3687
+ const d = [], { name: l, parsedTimeSeriesValue: m } = na(
3675
3688
  u,
3676
- c
3677
- ), E = o[u], P = E.attributes || [];
3678
- if (Object.keys(E).length === 0) {
3679
- i.push({
3689
+ i
3690
+ ), v = o[u], x = v.attributes || [];
3691
+ if (Object.keys(v).length === 0) {
3692
+ c.push({
3680
3693
  name: l,
3681
3694
  parsedTimeSeriesValue: m,
3682
3695
  values: d,
@@ -3686,19 +3699,19 @@ const Gs = "/api/download", Xs = 6e4, oo = async (t, e, n, r, s, a, o, c) => {
3686
3699
  continue;
3687
3700
  }
3688
3701
  d.push(
3689
- ...na(E, n)
3702
+ ...oa(v, n)
3690
3703
  );
3691
3704
  const M = ie(
3692
3705
  r?.series || [],
3693
- (O) => P[O]
3694
- ), f = ra(
3706
+ (O) => x[O]
3707
+ ), f = ia(
3695
3708
  n.attributes?.dataSet || [],
3696
3709
  e[0].attributes?.filter((O) => O != null) || []
3697
- ), w = Ws(
3710
+ ), g = Us(
3698
3711
  t,
3699
3712
  m
3700
- ), v = a.map((O, q) => {
3701
- const U = w[O.id], B = qs(
3713
+ ), P = a.map((O, q) => {
3714
+ const U = g[O.id], B = Fs(
3702
3715
  O,
3703
3716
  U.values[q]
3704
3717
  );
@@ -3708,105 +3721,105 @@ const Gs = "/api/download", Xs = 6e4, oo = async (t, e, n, r, s, a, o, c) => {
3708
3721
  dimensionGroupData: U
3709
3722
  };
3710
3723
  });
3711
- i.push({
3724
+ c.push({
3712
3725
  name: l,
3713
3726
  parsedTimeSeriesValue: m,
3714
3727
  values: d,
3715
3728
  attributes: M,
3716
3729
  dataSetAttrs: f,
3717
- dimensionGroupAttributes: v
3730
+ dimensionGroupAttributes: P
3718
3731
  });
3719
3732
  }
3720
- return i;
3721
- }, Js = (t, e) => {
3733
+ return c;
3734
+ }, na = (t, e) => {
3722
3735
  const n = t.split(new RegExp("(?<!\\|):(?!\\||$)")), r = [];
3723
3736
  for (let s = 0; s < n.length; s++) {
3724
3737
  const a = e?.[s], o = Number(n[s]);
3725
3738
  if (o < 0 || a == null)
3726
3739
  continue;
3727
- const c = a.values[o];
3728
- if (c == null) {
3740
+ const i = a.values[o];
3741
+ if (i == null) {
3729
3742
  r.push(n[s].replace("|:", ":"));
3730
3743
  continue;
3731
3744
  }
3732
- r.push(c?.id || c?.value || "");
3745
+ r.push(i?.id || i?.value || "");
3733
3746
  }
3734
3747
  return {
3735
- name: ea(r),
3748
+ name: sa(r),
3736
3749
  parsedTimeSeriesValue: r
3737
3750
  };
3738
3751
  }, ie = (t, e) => {
3739
3752
  const n = [];
3740
3753
  for (let r = 0; r < t.length; r++) {
3741
- const s = t[r], a = e(r), o = a != null && s.values != null ? Zs(a, s) : void 0;
3754
+ const s = t[r], a = e(r), o = a != null && s.values != null ? ra(a, s) : void 0;
3742
3755
  n.push({
3743
3756
  name: s.id,
3744
3757
  value: o
3745
3758
  });
3746
3759
  }
3747
3760
  return n;
3748
- }, Zs = (t, e) => {
3761
+ }, ra = (t, e) => {
3749
3762
  const n = e.values[t];
3750
3763
  return n == null ? typeof t == "object" ? t : t.toString() : n?.id || n?.value || n?.ids || n?.values;
3751
- }, ea = (t) => t.map((e) => e ? ta(e) : "").join("."), ta = (t) => t.replace(/\./g, "|.").replace(/:/g, "|:"), na = (t, e) => {
3764
+ }, sa = (t) => t.map((e) => e ? aa(e) : "").join("."), aa = (t) => t.replace(/\./g, "|.").replace(/:/g, "|:"), oa = (t, e) => {
3752
3765
  const n = e.measures?.observation?.length;
3753
3766
  if (t.observations == null)
3754
3767
  return [
3755
3768
  {
3756
- values: Ze(t, e.measures),
3769
+ values: et(t, e.measures),
3757
3770
  obsAttributes: ie(
3758
3771
  e.attributes?.observation || [],
3759
3772
  (o) => t[o + n]
3760
3773
  ),
3761
- dimensionAtObservation: Ks
3774
+ dimensionAtObservation: ta
3762
3775
  }
3763
3776
  ];
3764
3777
  const r = t.observations, s = e.dimensions.observation?.[0], a = [];
3765
3778
  for (const o in r) {
3766
- const c = s?.values[o];
3779
+ const i = s?.values[o];
3767
3780
  a.push({
3768
- dimensionAtObservation: c?.value || c?.id,
3769
- values: Ze(
3781
+ dimensionAtObservation: i?.value || i?.id,
3782
+ values: et(
3770
3783
  r[o],
3771
3784
  e.measures
3772
3785
  ),
3773
3786
  obsAttributes: ie(
3774
3787
  e.attributes?.observation || [],
3775
- (i) => r[o][i + n]
3788
+ (c) => r[o][c + n]
3776
3789
  )
3777
3790
  });
3778
3791
  }
3779
3792
  return a;
3780
- }, Ze = (t, e) => e?.observation?.map((n, r) => ({ name: n.id, value: t[r] })) || [], ra = (t, e) => t.reduce(
3793
+ }, et = (t, e) => e?.observation?.map((n, r) => ({ name: n.id, value: t[r] })) || [], ia = (t, e) => t.reduce(
3781
3794
  (n, r, s) => {
3782
3795
  const a = e[s];
3783
- return sa(n, r, a, ""), n;
3796
+ return ca(n, r, a, ""), n;
3784
3797
  },
3785
3798
  []
3786
- ), sa = (t, e, n, r) => {
3799
+ ), ca = (t, e, n, r) => {
3787
3800
  const s = n != null ? e?.values?.length > 0 ? e.values[n]?.id || e.values[n]?.value : String(n) : r;
3788
3801
  t.push({
3789
3802
  name: e.id,
3790
3803
  value: s || ""
3791
3804
  });
3792
- }, aa = /^[0-9][0-9][0-9][0-9]-Q[1-4]$/, oa = /^[0-9][0-9][0-9][0-9]-W(0[1-9]|[1-4][0-9]|5[0-3])$/, ia = /^[0-9][0-9][0-9][0-9]-S[1-2]$/, ca = /^[0-9][0-9][0-9][0-9]$/, ua = /^[0-9][0-9][0-9][0-9]-(0[1-9]|1[0-2])-[0-9][0-9]$/, da = /^[0-9][0-9][0-9][0-9]-M(0[1-9]|(1[0-2]))$/, Pe = (t) => ca.exec(t), ve = (t) => !!Pe(t), la = (t) => ia.exec(t), Me = (t) => !!la(t), Oe = (t) => da.exec(t), Ae = (t) => !!Oe(t), Ne = (t) => aa.exec(t), Re = (t) => !!Ne(t), fa = (t) => ua.exec(t), ma = (t) => !!fa(t), ha = (t) => oa.exec(t), ke = (t) => !!ha(t);
3793
- function Pt(t) {
3794
- return ve(t) ? ga(t) : Me(t) ? pa(t) : Re(t) ? ba(t) : Ae(t) ? Ta(t) : ke(t) ? Bs(t) : xa(t);
3805
+ }, ua = /^[0-9][0-9][0-9][0-9]-Q[1-4]$/, da = /^[0-9][0-9][0-9][0-9]-W(0[1-9]|[1-4][0-9]|5[0-3])$/, la = /^[0-9][0-9][0-9][0-9]-S[1-2]$/, fa = /^[0-9][0-9][0-9][0-9]$/, ma = /^[0-9][0-9][0-9][0-9]-(0[1-9]|1[0-2])-[0-9][0-9]$/, ha = /^[0-9][0-9][0-9][0-9]-M(0[1-9]|(1[0-2]))$/, Pe = (t) => fa.exec(t), ve = (t) => !!Pe(t), wa = (t) => la.exec(t), Me = (t) => !!wa(t), Oe = (t) => ha.exec(t), Ae = (t) => !!Oe(t), Ne = (t) => ua.exec(t), Re = (t) => !!Ne(t), ga = (t) => ma.exec(t), pa = (t) => !!ga(t), ya = (t) => da.exec(t), _e = (t) => !!ya(t);
3806
+ function Mt(t) {
3807
+ return ve(t) ? ba(t) : Me(t) ? Ea(t) : Re(t) ? xa(t) : Ae(t) ? va(t) : _e(t) ? Gs(t) : Oa(t);
3795
3808
  }
3796
- function vt(t) {
3797
- return ve(t) ? wa(t) : Me(t) ? ya(t) : Re(t) ? Da(t) : Ae(t) ? Ea(t) : ke(t) ? Vs(t) : Pa(t);
3809
+ function Ot(t) {
3810
+ return ve(t) ? Da(t) : Me(t) ? Ta(t) : Re(t) ? Pa(t) : Ae(t) ? Ma(t) : _e(t) ? Xs(t) : Aa(t);
3798
3811
  }
3799
- function ga(t) {
3812
+ function ba(t) {
3800
3813
  const e = Pe(t);
3801
3814
  if (e)
3802
3815
  return new Date(Number(e[0]), 0, 1);
3803
3816
  }
3804
- function wa(t) {
3817
+ function Da(t) {
3805
3818
  const e = Pe(t);
3806
3819
  if (e)
3807
3820
  return new Date(Number(e[0]) + 1, 0, 1);
3808
3821
  }
3809
- function pa(t) {
3822
+ function Ea(t) {
3810
3823
  const [e, n] = t.split("-S");
3811
3824
  switch (+n) {
3812
3825
  case 1:
@@ -3815,7 +3828,7 @@ function pa(t) {
3815
3828
  return new Date(+e, 6, 1);
3816
3829
  }
3817
3830
  }
3818
- function ya(t) {
3831
+ function Ta(t) {
3819
3832
  const [e, n] = t.split("-S");
3820
3833
  switch (+n) {
3821
3834
  case 1:
@@ -3824,7 +3837,7 @@ function ya(t) {
3824
3837
  return new Date(+e + 1, 0, 1);
3825
3838
  }
3826
3839
  }
3827
- function ba(t) {
3840
+ function xa(t) {
3828
3841
  const e = Ne(t);
3829
3842
  if (!e)
3830
3843
  return;
@@ -3840,7 +3853,7 @@ function ba(t) {
3840
3853
  return new Date(+n, 9, 1);
3841
3854
  }
3842
3855
  }
3843
- function Da(t) {
3856
+ function Pa(t) {
3844
3857
  const e = Ne(t);
3845
3858
  if (!e)
3846
3859
  return;
@@ -3856,45 +3869,45 @@ function Da(t) {
3856
3869
  return new Date(+n + 1, 0, 1);
3857
3870
  }
3858
3871
  }
3859
- function Ta(t) {
3872
+ function va(t) {
3860
3873
  const e = Oe(t);
3861
3874
  if (!e)
3862
3875
  return;
3863
3876
  const [n, r] = e[0].split("-M");
3864
3877
  return new Date(+n, +r - 1, 1);
3865
3878
  }
3866
- function Ea(t) {
3879
+ function Ma(t) {
3867
3880
  const e = Oe(t);
3868
3881
  if (!e)
3869
3882
  return;
3870
3883
  const [n, r] = e[0].split("-M");
3871
3884
  return new Date(+n, +r, 1);
3872
3885
  }
3873
- const xa = (t) => /* @__PURE__ */ new Date(`${t}T00:00:00`), Pa = (t) => {
3886
+ const Oa = (t) => /* @__PURE__ */ new Date(`${t}T00:00:00`), Aa = (t) => {
3874
3887
  const e = /* @__PURE__ */ new Date(`${t}T23:59:00`);
3875
3888
  return e.setMinutes(e.getMinutes() + 1), e;
3876
- }, va = 1, Ma = (t, e, n, r = !0, s = "Q") => {
3877
- const a = [], o = e && e > 3 ? Ia(e, r) : 1, c = n ? Math.floor((n - 1) / 3) : 4;
3878
- for (let i = o; i <= c; i++)
3879
- a.push(`${t}-${s}${i}`);
3889
+ }, Na = 1, Ra = (t, e, n, r = !0, s = "Q") => {
3890
+ const a = [], o = e && e > 3 ? La(e, r) : 1, i = n ? Math.floor((n - 1) / 3) : 4;
3891
+ for (let c = o; c <= i; c++)
3892
+ a.push(`${t}-${s}${c}`);
3880
3893
  return a;
3881
- }, Oa = (t, e, n, r = "S") => {
3894
+ }, _a = (t, e, n, r = "S") => {
3882
3895
  const s = [];
3883
3896
  return (e || 1) < 7 && (n || 12) > 6 && s.push(`${t}-${r}1`), n == null && s.push(`${t}-${r}2`), s;
3884
- }, lo = (t) => Math.ceil(t / 3), Mt = (t, e, n = "M") => `${t}-${n}${e.toString().padStart(2, "0")}`, Aa = (t, e, n = "M") => {
3897
+ }, wo = (t) => Math.ceil(t / 3), At = (t, e, n = "M") => `${t}-${n}${e.toString().padStart(2, "0")}`, ka = (t, e, n = "M") => {
3885
3898
  const r = [];
3886
3899
  for (let s = e; s <= 12; s++)
3887
- r.push(Mt(t, s, n));
3900
+ r.push(At(t, s, n));
3888
3901
  return r;
3889
- }, Na = (t, e, n, r = "M") => {
3902
+ }, Ia = (t, e, n, r = "M") => {
3890
3903
  const s = [];
3891
3904
  for (let a = e; a < n; a++)
3892
- s.push(Mt(t, a, r));
3905
+ s.push(At(t, a, r));
3893
3906
  return s;
3894
- }, Ra = (t, e, n, r = "M") => {
3907
+ }, Ya = (t, e, n, r = "M") => {
3895
3908
  const s = e || 1, a = n == null, o = n || 12;
3896
- return a ? Aa(t, s, r) : Na(t, s, o, r);
3897
- }, fo = (t, e, n = "M") => {
3909
+ return a ? ka(t, s, r) : Ia(t, s, o, r);
3910
+ }, go = (t, e, n = "M") => {
3898
3911
  switch (e) {
3899
3912
  case 0:
3900
3913
  return [
@@ -3923,55 +3936,55 @@ const xa = (t) => /* @__PURE__ */ new Date(`${t}T00:00:00`), Pa = (t) => {
3923
3936
  default:
3924
3937
  return [];
3925
3938
  }
3926
- }, ka = (t, e) => {
3927
- const n = _(e, !0), r = _(t), s = n.getFullYear(), a = r.getFullYear(), o = n.getTime() <= r.getTime() ? a + va - s : 0;
3928
- return Array.from({ length: o }, (i, u) => s + u);
3929
- }, _ = (t, e = !1) => {
3930
- const n = _a(t, e);
3939
+ }, Ca = (t, e) => {
3940
+ const n = k(e, !0), r = k(t), s = n.getFullYear(), a = r.getFullYear(), o = n.getTime() <= r.getTime() ? a + Na - s : 0;
3941
+ return Array.from({ length: o }, (c, u) => s + u);
3942
+ }, k = (t, e = !1) => {
3943
+ const n = Sa(t, e);
3931
3944
  return n ? (n.getTimezoneOffset() > 0 && n.setMinutes(n.getMinutes() + n.getTimezoneOffset()), n) : /* @__PURE__ */ new Date();
3932
- }, _a = (t, e = !1) => {
3945
+ }, Sa = (t, e = !1) => {
3933
3946
  const n = Number(t);
3934
- return t.toString().length !== 13 ? e ? Pt(t) : vt(t) : isNaN(n) ? /* @__PURE__ */ new Date(`${t}T00:00:00.000Z`) : new Date(n);
3935
- }, Ia = (t, e) => e ? Math.floor((t + 1) / 3) : Math.ceil((t + 1) / 3), mo = (t, e) => {
3936
- const n = tt(t) - tt(e);
3947
+ return t.toString().length !== 13 ? e ? Mt(t) : Ot(t) : isNaN(n) ? /* @__PURE__ */ new Date(`${t}T00:00:00.000Z`) : new Date(n);
3948
+ }, La = (t, e) => e ? Math.floor((t + 1) / 3) : Math.ceil((t + 1) / 3), po = (t, e) => {
3949
+ const n = nt(t) - nt(e);
3937
3950
  if (n === 0 && t !== e) {
3938
- const r = et(t), s = et(e);
3951
+ const r = tt(t), s = tt(e);
3939
3952
  return r - s;
3940
3953
  }
3941
3954
  return n;
3942
- }, et = (t) => ve(t) ? 6 : Me(t) ? 5 : Re(t) ? 4 : Ae(t) ? 3 : ke(t) ? 2 : ma(t) ? 1 : 0, tt = (t, e = !1) => (e ? Pt(t) : vt(t))?.getTime() || 0, Ot = (t, e, n) => {
3943
- const r = _(e, !0), s = _(n), a = _(t, !0), o = _(t), c = r.getTime() > a.getTime() ? r : a, i = s.getTime() < o.getTime() ? s : o;
3955
+ }, tt = (t) => ve(t) ? 6 : Me(t) ? 5 : Re(t) ? 4 : Ae(t) ? 3 : _e(t) ? 2 : pa(t) ? 1 : 0, nt = (t, e = !1) => (e ? Mt(t) : Ot(t))?.getTime() || 0, Nt = (t, e, n) => {
3956
+ const r = k(e, !0), s = k(n), a = k(t, !0), o = k(t), i = r.getTime() > a.getTime() ? r : a, c = s.getTime() < o.getTime() ? s : o;
3944
3957
  return {
3945
- start: c,
3946
- end: i
3958
+ start: i,
3959
+ end: c
3947
3960
  };
3948
- }, Ya = (t, e, n, r = "W") => {
3949
- const s = +t, { start: a, end: o } = Ot(t, e, n);
3961
+ }, $a = (t, e, n, r = "W") => {
3962
+ const s = +t, { start: a, end: o } = Nt(t, e, n);
3950
3963
  if (a.getTime() > o.getTime())
3951
3964
  return [];
3952
- const c = Z(a, r), i = c.weekYear === s ? c.weekNumber : c.weekYear < s ? 1 : Ke(s, r), u = Z(o, r), d = u.weekYear === s ? u.weekNumber : u.weekYear > s ? Ke(s, r) : 1, l = [];
3953
- if (i < d)
3954
- for (let m = i; m <= d; m++)
3955
- l.push(xt(s, m, r));
3965
+ const i = Z(a, r), c = i.weekYear === s ? i.weekNumber : i.weekYear < s ? 1 : Ke(s, r), u = Z(o, r), d = u.weekYear === s ? u.weekNumber : u.weekYear > s ? Ke(s, r) : 1, l = [];
3966
+ if (c < d)
3967
+ for (let m = c; m <= d; m++)
3968
+ l.push(Pt(s, m, r));
3956
3969
  return l;
3957
- }, Ca = (t) => {
3970
+ }, Wa = (t) => {
3958
3971
  const e = new Date(t);
3959
3972
  return e.setMinutes(e.getMinutes() - e.getTimezoneOffset()), e.toISOString().slice(0, 10);
3960
- }, Sa = (t, e, n) => {
3961
- const { start: r, end: s } = Ot(t, e, n);
3973
+ }, qa = (t, e, n) => {
3974
+ const { start: r, end: s } = Nt(t, e, n);
3962
3975
  if (r.getTime() > s.getTime())
3963
3976
  return [];
3964
3977
  const a = [], o = new Date(
3965
3978
  r.getFullYear(),
3966
3979
  r.getMonth(),
3967
3980
  r.getDate()
3968
- ), c = new Date(s.getFullYear(), s.getMonth(), s.getDate());
3969
- for (; o.getTime() < c.getTime(); ) {
3970
- const i = Ca(o);
3971
- a.push(i), o.setDate(o.getDate() + 1);
3981
+ ), i = new Date(s.getFullYear(), s.getMonth(), s.getDate());
3982
+ for (; o.getTime() < i.getTime(); ) {
3983
+ const c = Wa(o);
3984
+ a.push(c), o.setDate(o.getDate() + 1);
3972
3985
  }
3973
3986
  return a;
3974
- }, La = (t) => ({
3987
+ }, Ua = (t) => ({
3975
3988
  isDailyExist: !!t?.some(({ memberValue: e }) => e === "D"),
3976
3989
  isWeeklyExist: !!t?.some(({ memberValue: e }) => e === "W"),
3977
3990
  isMonthlyExist: !!t?.some(({ memberValue: e }) => e === "M"),
@@ -3980,49 +3993,49 @@ const xa = (t) => /* @__PURE__ */ new Date(`${t}T00:00:00`), Pa = (t) => {
3980
3993
  isYearlyExist: !!t?.some(
3981
3994
  ({ memberValue: e }) => e === "A" || e === "Y"
3982
3995
  )
3983
- }), $a = (t, e, n, r) => {
3984
- const s = r === 0 ? _(e.toString(), !0)?.getMonth() + 1 : void 0, a = r === t.length - 1 ? _(n.toString())?.getMonth() + 1 || 1 : void 0;
3996
+ }), Fa = (t, e, n, r) => {
3997
+ const s = r === 0 ? k(e.toString(), !0)?.getMonth() + 1 : void 0, a = r === t.length - 1 ? k(n.toString())?.getMonth() + 1 || 1 : void 0;
3985
3998
  return { startMonth: s, endMonth: a };
3986
- }, Wa = ["FREQUENCY", "FREQ"], ho = (t, e) => {
3999
+ }, Ha = ["FREQUENCY", "FREQ"], yo = (t, e) => {
3987
4000
  const n = t?.[0]?.cubeRegions?.[0]?.memberSelection?.find(
3988
- (i) => Wa.includes(i.componentId)
3989
- )?.selectionValues, r = La(n || []), s = e?.startPeriod?.getTime() || 1, a = e?.endPeriod?.getTime() || 1, o = ka(a, s), c = [];
3990
- return o.forEach((i, u) => {
3991
- const d = [], { startMonth: l, endMonth: m } = $a(
4001
+ (c) => Ha.includes(c.componentId)
4002
+ )?.selectionValues, r = Ua(n || []), s = e?.startPeriod?.getTime() || 1, a = e?.endPeriod?.getTime() || 1, o = Ca(a, s), i = [];
4003
+ return o.forEach((c, u) => {
4004
+ const d = [], { startMonth: l, endMonth: m } = Fa(
3992
4005
  o,
3993
4006
  new Date(s),
3994
4007
  new Date(a),
3995
4008
  u
3996
4009
  ), {
3997
- isDailyExist: E,
3998
- isWeeklyExist: P,
4010
+ isDailyExist: v,
4011
+ isWeeklyExist: x,
3999
4012
  isMonthlyExist: M,
4000
4013
  isQuarterlyExist: f,
4001
- isSemiAnnualExist: w,
4002
- isYearlyExist: v
4014
+ isSemiAnnualExist: g,
4015
+ isYearlyExist: P
4003
4016
  } = r;
4004
- v && d.push(i.toString()), w && d.push(...Oa(i, l, m)), f && d.push(
4005
- ...Ma(i, l, m, !1)
4006
- ), M && d.push(...Ra(i, l, m)), P && d.push(
4007
- ...Ya(i, s.toString(), a.toString())
4008
- ), E && d.push(
4009
- ...Sa(i, s.toString(), a.toString())
4010
- ), c.push(...d);
4011
- }), c;
4017
+ P && d.push(c.toString()), g && d.push(..._a(c, l, m)), f && d.push(
4018
+ ...Ra(c, l, m, !1)
4019
+ ), M && d.push(...Ya(c, l, m)), x && d.push(
4020
+ ...$a(c, s.toString(), a.toString())
4021
+ ), v && d.push(
4022
+ ...qa(c, s.toString(), a.toString())
4023
+ ), i.push(...d);
4024
+ }), i;
4012
4025
  };
4013
- function qa(t) {
4026
+ function Qa(t) {
4014
4027
  const { urn: e } = t.details;
4015
4028
  return ue(e.resourceId, e.version, e.agencyId);
4016
4029
  }
4017
- function go(t) {
4030
+ function bo(t) {
4018
4031
  const e = {};
4019
4032
  for (const n of t.datasets) {
4020
- const r = n.dataset, s = qa(r);
4033
+ const r = n.dataset, s = Qa(r);
4021
4034
  e[s] = r.details.dimensions;
4022
4035
  }
4023
4036
  return e;
4024
4037
  }
4025
- function wo(t) {
4038
+ function Do(t) {
4026
4039
  return t?.codelists?.length ? t.codelists.map((e) => ({
4027
4040
  id: e.id,
4028
4041
  agencyID: e.agencyID ?? "",
@@ -4045,7 +4058,7 @@ function wo(t) {
4045
4058
  }))
4046
4059
  }));
4047
4060
  }
4048
- function Ua(t, e) {
4061
+ function Ba(t, e) {
4049
4062
  const n = (r) => {
4050
4063
  const s = r.indexOf("(");
4051
4064
  if (s === -1) return r;
@@ -4061,32 +4074,32 @@ function ce(t) {
4061
4074
  t.agencyID ?? ""
4062
4075
  );
4063
4076
  }
4064
- function At(t, e, n) {
4077
+ function Rt(t, e, n) {
4065
4078
  e?.forEach((r) => {
4066
- const { childId: s, agency: a, id: o, version: c } = nt(r.code), i = ue(o, c, a), u = n?.find(
4067
- (l) => Ua(i, ce(l))
4079
+ const { childId: s, agency: a, id: o, version: i } = rt(r.code), c = ue(o, i, a), u = n?.find(
4080
+ (l) => Ba(c, ce(l))
4068
4081
  ), d = u?.codes?.find((l) => l.id === s);
4069
4082
  if (d != null) {
4070
4083
  const l = r.code.replace(
4071
- i,
4084
+ c,
4072
4085
  ce(u)
4073
4086
  );
4074
4087
  t.push({ ...d, code: l });
4075
4088
  }
4076
- At(t, r.hierarchicalCodes, n);
4089
+ Rt(t, r.hierarchicalCodes, n);
4077
4090
  });
4078
4091
  }
4079
- function po(t, e) {
4092
+ function Eo(t, e) {
4080
4093
  const n = [];
4081
- return At(n, t?.hierarchicalCodes, e), n;
4094
+ return Rt(n, t?.hierarchicalCodes, e), n;
4082
4095
  }
4083
- function yo(t) {
4096
+ function To(t) {
4084
4097
  const e = {};
4085
4098
  return t?.forEach((n) => {
4086
4099
  e[ce(n)] = n.codes;
4087
4100
  }), e;
4088
4101
  }
4089
- function bo(t, e, n) {
4102
+ function xo(t, e, n) {
4090
4103
  if (!n || n.length === 0 || !e)
4091
4104
  return t;
4092
4105
  const r = n[0].cubeRegions?.find(
@@ -4100,146 +4113,147 @@ function bo(t, e, n) {
4100
4113
  const a = new Set(s.selectionValues.map((o) => o.memberValue));
4101
4114
  return t.filter((o) => a.has(o.id));
4102
4115
  }
4103
- class Do {
4116
+ class Po {
4104
4117
  constructor(e) {
4105
4118
  this.client = e;
4106
4119
  }
4107
4120
  async getAvailableHierarchies(e, n, r) {
4108
- const { agency: s, id: a, version: o } = S(e), i = `${this.client.config.sdmxProxyUrl ? this.client.config.sdmxProxyUrl : this.client.config.apiUrl}/sdmx/3.0/structure/codelist`, u = r ? { [Ce]: r } : void 0;
4121
+ const { agency: s, id: a, version: o } = S(e), c = `${this.client.config.sdmxProxyUrl ? this.client.config.sdmxProxyUrl : this.client.config.apiUrl}/sdmx/3.0/structure/codelist`, u = r ? { [Ce]: r } : void 0;
4109
4122
  return this.client.request(
4110
4123
  `${s}/${a}/${o}?references=hierarchy&detail=allcompletestubs`,
4111
4124
  { method: "GET", headers: u },
4112
- i,
4125
+ c,
4113
4126
  n
4114
4127
  );
4115
4128
  }
4116
4129
  async getHierarchy(e, n, r) {
4117
- const { agency: s, id: a, version: o } = S(e), i = `${this.client.config.sdmxProxyUrl ? this.client.config.sdmxProxyUrl : this.client.config.apiUrl}/sdmx/3.0/structure/hierarchy`, u = r ? { [Ce]: r } : void 0;
4130
+ const { agency: s, id: a, version: o } = S(e), c = `${this.client.config.sdmxProxyUrl ? this.client.config.sdmxProxyUrl : this.client.config.apiUrl}/sdmx/3.0/structure/hierarchy`, u = r ? { [Ce]: r } : void 0;
4118
4131
  return this.client.request(
4119
4132
  `${s}/${a}/${o}?references=descendants&detail=full`,
4120
4133
  { method: "GET", headers: u },
4121
- i,
4134
+ c,
4122
4135
  n
4123
4136
  );
4124
4137
  }
4125
4138
  }
4126
4139
  export {
4127
- we as Annotations,
4128
- Hs as AssignmentStatus,
4129
- Ha as AvailabilityApi,
4130
- qt as DATASET_DATA_URL,
4131
- Qa as DatasetApi,
4140
+ ge as Annotations,
4141
+ Qs as AssignmentStatus,
4142
+ Va as AvailabilityApi,
4143
+ Ft as DATASET_DATA_URL,
4144
+ Xa as DatasetApi,
4132
4145
  De as DimensionType,
4133
- St as DownloadType,
4134
- Ga as FREQUENCY_DIMENSION_ID,
4135
- Wa as FREQUENCY_DIM_ID,
4136
- Ct as FileColumnsAttribute,
4137
- Ft as GET_v3_FILTER_ALL,
4138
- Fa as GET_v3_FILTER_AND,
4139
- at as GET_v3_FILTER_OR,
4140
- Do as HierarchyApi,
4141
- Ks as OBSERVATION_KEY,
4142
- Fs as OccurrenceType,
4143
- ps as Periods,
4144
- ws as RepresentationTextType,
4145
- gs as SDMX_DATA_QUERY_PARAMS,
4146
+ $t as DownloadType,
4147
+ Ka as FREQUENCY_DIMENSION_ID,
4148
+ Ha as FREQUENCY_DIM_ID,
4149
+ Lt as FileColumnsAttribute,
4150
+ Bt as GET_v3_FILTER_ALL,
4151
+ Ga as GET_v3_FILTER_AND,
4152
+ ot as GET_v3_FILTER_OR,
4153
+ Po as HierarchyApi,
4154
+ ta as OBSERVATION_KEY,
4155
+ Bs as OccurrenceType,
4156
+ bs as Periods,
4157
+ ys as RepresentationTextType,
4158
+ ps as SDMX_DATA_QUERY_PARAMS,
4146
4159
  oe as SINGLE_WILDCARD_SYMBOL,
4147
- Ba as SdmxApiClient,
4148
- rt as SdmxAvailabilityMode,
4160
+ ja as SdmxApiClient,
4161
+ st as SdmxAvailabilityMode,
4149
4162
  C as SdmxDataFormat,
4150
- st as SdmxDetails,
4163
+ at as SdmxDetails,
4151
4164
  de as SdmxReferences,
4152
- k as SeriesFilterOperator,
4153
- ys as TIME_PERIOD,
4154
- Ds as TIME_PERIOD_END_ANNOTATION_KEY,
4155
- bs as TIME_PERIOD_START_ANNOTATION_KEY,
4156
- go as buildDatasetDimensionsMetadataMap,
4157
- ua as dailyPattern,
4158
- ta as decodeDimensionId,
4159
- Ka as findCodelistByDimension,
4165
+ _ as SeriesFilterOperator,
4166
+ Ds as TIME_PERIOD,
4167
+ Ts as TIME_PERIOD_END_ANNOTATION_KEY,
4168
+ Es as TIME_PERIOD_START_ANNOTATION_KEY,
4169
+ bo as buildDatasetDimensionsMetadataMap,
4170
+ ma as dailyPattern,
4171
+ aa as decodeDimensionId,
4172
+ to as findCodelistByDimension,
4160
4173
  Ye as generateDatasetDataRequest,
4161
4174
  ue as generateShortUrn,
4162
- ho as getAdditionalColumns,
4163
- Xa as getAnnotationPeriod,
4175
+ yo as getAdditionalColumns,
4176
+ Ja as getAnnotationPeriod,
4164
4177
  ye as getArtifactByUrnWithWildCard,
4165
- Ja as getAttachedDimensionsSeriesByDimension,
4166
- Ws as getAttachedDimensionsSeriesByTsId,
4167
- Et as getAttachedDimensionsSeriesKey,
4168
- qs as getAttributeValueFromDataQueryResponse,
4169
- Za as getAvailableCodes,
4170
- ja as getAvailableCodesFromConstrains,
4171
- nt as getChildParsedUrn,
4172
- yo as getCodeListsData,
4178
+ no as getAttachedDimensionsSeriesByDimension,
4179
+ Us as getAttachedDimensionsSeriesByTsId,
4180
+ xt as getAttachedDimensionsSeriesKey,
4181
+ Fs as getAttributeValueFromDataQueryResponse,
4182
+ ro as getAvailableCodes,
4183
+ Za as getAvailableCodesFromConstrains,
4184
+ rt as getChildParsedUrn,
4185
+ To as getCodeListsData,
4173
4186
  be as getConcept,
4174
4187
  je as getConceptByUrn,
4175
- Ls as getConceptWithScheme,
4176
- Us as getConvertedMetaAttributes,
4177
- fa as getDailyRegExp,
4178
- Sa as getDaysColumns,
4179
- eo as getDimensionTitle,
4188
+ Ws as getConceptWithScheme,
4189
+ Hs as getConvertedMetaAttributes,
4190
+ ga as getDailyRegExp,
4191
+ qa as getDaysColumns,
4192
+ so as getDimensionTitle,
4180
4193
  ze as getDimensions,
4181
- hs as getFilteredItemsWithParents,
4182
- Ms as getFiltersDtoFromDataQuery,
4183
- za as getFiltersDtoMapFromDataQuery,
4184
- bo as getHierarchyAvailableCodes,
4185
- po as getHierarchyCodes,
4194
+ gs as getFilteredItemsWithParents,
4195
+ As as getFiltersDtoFromDataQuery,
4196
+ eo as getFiltersDtoMapFromDataQuery,
4197
+ xo as getHierarchyAvailableCodes,
4198
+ Eo as getHierarchyCodes,
4186
4199
  Z as getISOWeek,
4187
4200
  z as getKeyFromUrn,
4188
- Va as getLastUpdatedTime,
4201
+ za as getLastUpdatedTime,
4189
4202
  Ke as getLastWeekNumberOfYear,
4190
4203
  pe as getLocalizedName,
4191
- Ra as getMonthlyData,
4192
- fo as getMonthlyDataByQuarter,
4204
+ Ya as getMonthlyData,
4205
+ go as getMonthlyDataByQuarter,
4193
4206
  Oe as getMonthlyRegExp,
4194
- vt as getParsedEndPeriodDate,
4195
- uo as getParsedResponse,
4196
- Pt as getParsedStartPeriodDate,
4197
- _ as getPeriodDate,
4198
- La as getPeriods,
4199
- lo as getQuarterByMonth,
4207
+ Ot as getParsedEndPeriodDate,
4208
+ ho as getParsedResponse,
4209
+ Mt as getParsedStartPeriodDate,
4210
+ k as getPeriodDate,
4211
+ Ua as getPeriods,
4212
+ wo as getQuarterByMonth,
4200
4213
  Ne as getQuarterlyRegExp,
4201
- Ma as getQuartersData,
4202
- js as getQueryTimePeriodFilters,
4203
- Lt as getRequestAcceptHeader,
4204
- Is as getResolvedVersionBySingleWildcard,
4205
- $t as getResponseContentType,
4206
- Oa as getSemiAnnualData,
4207
- la as getSemiAnnuallyRegExp,
4214
+ Ra as getQuartersData,
4215
+ Zs as getQueryTimePeriodFilters,
4216
+ Wt as getRequestAcceptHeader,
4217
+ Cs as getResolvedVersionBySingleWildcard,
4218
+ qt as getResponseContentType,
4219
+ _a as getSemiAnnualData,
4220
+ wa as getSemiAnnuallyRegExp,
4208
4221
  ie as getSeriesAttributes,
4209
- Js as getSeriesName,
4210
- so as getStructureComponentsMap,
4211
- to as getStructureDimensions,
4212
- ro as getTimeDimension,
4213
- no as getTimePeriods,
4214
- co as getTimeQueryFilter,
4215
- zs as getTimeRangeFromAttachment,
4216
- ao as getTimeSeriesCount,
4217
- io as getTimeSeriesFilterKey,
4218
- ea as getTimeSeriesId,
4219
- xt as getWeekCode,
4220
- Vs as getWeeklyPeriodEndDate,
4221
- Bs as getWeeklyPeriodStartDate,
4222
- ha as getWeeklyRegExp,
4223
- Ya as getWeeksColumns,
4224
- Cs as getWildCardPrefix,
4225
- Ot as getYearPeriod,
4222
+ na as getSeriesName,
4223
+ co as getStructureComponentsMap,
4224
+ ao as getStructureDimensions,
4225
+ io as getTimeDimension,
4226
+ oo as getTimePeriods,
4227
+ mo as getTimeQueryFilter,
4228
+ ea as getTimeRangeFromAttachment,
4229
+ uo as getTimeSeriesCount,
4230
+ fo as getTimeSeriesFilterKey,
4231
+ sa as getTimeSeriesId,
4232
+ Pt as getWeekCode,
4233
+ Xs as getWeeklyPeriodEndDate,
4234
+ Gs as getWeeklyPeriodStartDate,
4235
+ ya as getWeeklyRegExp,
4236
+ $a as getWeeksColumns,
4237
+ Ls as getWildCardPrefix,
4238
+ Nt as getYearPeriod,
4226
4239
  Pe as getYearlyRegExp,
4227
- ka as getYears,
4228
- ma as isDaily,
4240
+ Ca as getYears,
4241
+ pa as isDaily,
4229
4242
  Ae as isMonthly,
4230
4243
  Re as isQuarterly,
4231
4244
  Me as isSemiAnnually,
4232
- ke as isWeekly,
4233
- Ss as isWildCardVersionCorrect,
4245
+ _e as isWeekly,
4246
+ $s as isWildCardVersionCorrect,
4234
4247
  ve as isYearly,
4235
- da as monthlyPattern,
4236
- oo as openDownloadWindow,
4237
- aa as quarterPattern,
4238
- wo as resolveCodelistsFromResponse,
4239
- ia as semiAnnuallyPattern,
4240
- mo as sortPeriods,
4248
+ ha as monthlyPattern,
4249
+ lo as openDownloadWindow,
4250
+ ua as quarterPattern,
4251
+ Do as resolveCodelistsFromResponse,
4252
+ vt as sanitizeDownloadFilename,
4253
+ la as semiAnnuallyPattern,
4254
+ po as sortPeriods,
4241
4255
  S as splitUrn,
4242
- Ua as urnMatchesIgnoreVersion,
4243
- oa as weeklyPattern,
4244
- ca as yearlyPattern
4256
+ Ba as urnMatchesIgnoreVersion,
4257
+ da as weeklyPattern,
4258
+ fa as yearlyPattern
4245
4259
  };