@ticketapp-dev/shop-sdk 1.0.24 → 1.0.26

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/dist/index.js CHANGED
@@ -1,90 +1,91 @@
1
- import { GraphQLClient as ae } from "graphql-request";
2
- import { createSlice as He, configureStore as Qe } from "@reduxjs/toolkit";
1
+ import { GraphQLClient as de } from "graphql-request";
2
+ import { createSlice as Qe, configureStore as Je } from "@reduxjs/toolkit";
3
3
  import { DateTime as R } from "luxon";
4
- var _ = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(_ || {}), Q = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(Q || {}), ke = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(ke || {}), De = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(De || {}), xe = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(xe || {}), Ne = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(Ne || {}), be = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(be || {}), Pe = /* @__PURE__ */ ((e) => (e.Addon = "ADDON", e.Delivery = "DELIVERY", e.Door = "DOOR", e.Friend = "FRIEND", e.Guest = "GUEST", e.Pickup = "PICKUP", e.Promoter = "PROMOTER", e.Ticket = "TICKET", e))(Pe || {}), Se = /* @__PURE__ */ ((e) => (e.FIXED = "FIXED", e.PERCENTAGE = "PERCENTAGE", e))(Se || {}), Ce = /* @__PURE__ */ ((e) => (e.AddOn = "ADD_ON", e.DeliveryOption = "DELIVERY_OPTION", e.EntranceTicket = "ENTRANCE_TICKET", e))(Ce || {}), _e = /* @__PURE__ */ ((e) => (e.Fixed = "FIXED", e.Percentage = "PERCENTAGE", e))(_e || {});
5
- const Je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
+ var _ = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(_ || {}), Q = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(Q || {}), De = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(De || {}), xe = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(xe || {}), Ne = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(Ne || {}), Pe = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(Pe || {}), be = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(be || {}), Se = /* @__PURE__ */ ((e) => (e.Addon = "ADDON", e.Delivery = "DELIVERY", e.Door = "DOOR", e.Friend = "FRIEND", e.Guest = "GUEST", e.Pickup = "PICKUP", e.Promoter = "PROMOTER", e.Ticket = "TICKET", e))(Se || {}), Ce = /* @__PURE__ */ ((e) => (e.FIXED = "FIXED", e.PERCENTAGE = "PERCENTAGE", e))(Ce || {}), _e = /* @__PURE__ */ ((e) => (e.AddOn = "ADD_ON", e.DeliveryOption = "DELIVERY_OPTION", e.EntranceTicket = "ENTRANCE_TICKET", e))(_e || {}), Le = /* @__PURE__ */ ((e) => (e.Fixed = "FIXED", e.Percentage = "PERCENTAGE", e))(Le || {}), J = /* @__PURE__ */ ((e) => (e.Event = "EVENT", e.Package = "PACKAGE", e))(J || {});
5
+ const Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
6
  __proto__: null,
7
7
  BasketOrderType: _,
8
- DiscountType: _e,
9
- EventStatus: xe,
10
- OrderItemType: Ce,
8
+ DiscountType: Le,
9
+ EventStatus: Ne,
10
+ MetricsType: J,
11
+ OrderItemType: _e,
11
12
  PackageItemType: Q,
12
- PackageStatus: ke,
13
- PackageTabType: De,
14
- PaymentMethodFeeType: Se,
13
+ PackageStatus: De,
14
+ PackageTabType: xe,
15
+ PaymentMethodFeeType: Ce,
15
16
  ProductStatus: be,
16
- ProductType: Pe,
17
- SortOrder: Ne
17
+ ProductType: Se,
18
+ SortOrder: Pe
18
19
  }, Symbol.toStringTag, { value: "Module" }));
19
- var J = function() {
20
- return J = Object.assign || function(t) {
21
- for (var n, i = 1, r = arguments.length; i < r; i++) {
22
- n = arguments[i];
20
+ var X = function() {
21
+ return X = Object.assign || function(t) {
22
+ for (var n, r = 1, i = arguments.length; r < i; r++) {
23
+ n = arguments[r];
23
24
  for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
24
25
  }
25
26
  return t;
26
- }, J.apply(this, arguments);
27
+ }, X.apply(this, arguments);
27
28
  };
28
29
  function G(e, t) {
29
30
  if (!!!e)
30
31
  throw new Error(t);
31
32
  }
32
- function Xe(e) {
33
+ function Ke(e) {
33
34
  return typeof e == "object" && e !== null;
34
35
  }
35
- function Ke(e, t) {
36
+ function We(e, t) {
36
37
  if (!!!e)
37
38
  throw new Error(
38
39
  "Unexpected invariant triggered."
39
40
  );
40
41
  }
41
- const We = /\r\n|[\n\r]/g;
42
- function re(e, t) {
43
- let n = 0, i = 1;
44
- for (const r of e.body.matchAll(We)) {
45
- if (typeof r.index == "number" || Ke(!1), r.index >= t)
42
+ const Ze = /\r\n|[\n\r]/g;
43
+ function se(e, t) {
44
+ let n = 0, r = 1;
45
+ for (const i of e.body.matchAll(Ze)) {
46
+ if (typeof i.index == "number" || We(!1), i.index >= t)
46
47
  break;
47
- n = r.index + r[0].length, i += 1;
48
+ n = i.index + i[0].length, r += 1;
48
49
  }
49
50
  return {
50
- line: i,
51
+ line: r,
51
52
  column: t + 1 - n
52
53
  };
53
54
  }
54
- function Ze(e) {
55
- return Le(
55
+ function et(e) {
56
+ return Re(
56
57
  e.source,
57
- re(e.source, e.start)
58
+ se(e.source, e.start)
58
59
  );
59
60
  }
60
- function Le(e, t) {
61
- const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, u = t.line === 1 ? n : 0, h = t.column + u, p = `${e.name}:${o}:${h}
62
- `, c = i.split(/\r\n|[\n\r]/g), m = c[r];
61
+ function Re(e, t) {
62
+ const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, u = t.line === 1 ? n : 0, h = t.column + u, p = `${e.name}:${o}:${h}
63
+ `, c = r.split(/\r\n|[\n\r]/g), m = c[i];
63
64
  if (m.length > 120) {
64
65
  const g = Math.floor(h / 80), y = h % 80, I = [];
65
- for (let O = 0; O < m.length; O += 80)
66
- I.push(m.slice(O, O + 80));
67
- return p + pe([
66
+ for (let T = 0; T < m.length; T += 80)
67
+ I.push(m.slice(T, T + 80));
68
+ return p + he([
68
69
  [`${o} |`, I[0]],
69
- ...I.slice(1, g + 1).map((O) => ["|", O]),
70
+ ...I.slice(1, g + 1).map((T) => ["|", T]),
70
71
  ["|", "^".padStart(y)],
71
72
  ["|", I[g + 1]]
72
73
  ]);
73
74
  }
74
- return p + pe([
75
+ return p + he([
75
76
  // Lines specified like this: ["prefix", "string"],
76
- [`${o - 1} |`, c[r - 1]],
77
+ [`${o - 1} |`, c[i - 1]],
77
78
  [`${o} |`, m],
78
79
  ["|", "^".padStart(h)],
79
- [`${o + 1} |`, c[r + 1]]
80
+ [`${o + 1} |`, c[i + 1]]
80
81
  ]);
81
82
  }
82
- function pe(e) {
83
- const t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
84
- return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
83
+ function he(e) {
84
+ const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
85
+ return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
85
86
  `);
86
87
  }
87
- function et(e) {
88
+ function tt(e) {
88
89
  const t = e[0];
89
90
  return t == null || "kind" in t || "length" in t ? {
90
91
  nodes: t,
@@ -95,7 +96,7 @@ function et(e) {
95
96
  extensions: e[5]
96
97
  } : t;
97
98
  }
98
- class ce extends Error {
99
+ class ue extends Error {
99
100
  /**
100
101
  * An array of `{ line, column }` locations within the source GraphQL document
101
102
  * which correspond to this error.
@@ -135,16 +136,16 @@ class ce extends Error {
135
136
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
136
137
  */
137
138
  constructor(t, ...n) {
138
- var i, r, s;
139
- const { nodes: o, source: u, positions: h, path: p, originalError: c, extensions: m } = et(n);
140
- super(t), this.name = "GraphQLError", this.path = p ?? void 0, this.originalError = c ?? void 0, this.nodes = he(
139
+ var r, i, s;
140
+ const { nodes: o, source: u, positions: h, path: p, originalError: c, extensions: m } = tt(n);
141
+ super(t), this.name = "GraphQLError", this.path = p ?? void 0, this.originalError = c ?? void 0, this.nodes = fe(
141
142
  Array.isArray(o) ? o : o ? [o] : void 0
142
143
  );
143
- const g = he(
144
- (i = this.nodes) === null || i === void 0 ? void 0 : i.map((I) => I.loc).filter((I) => I != null)
144
+ const g = fe(
145
+ (r = this.nodes) === null || r === void 0 ? void 0 : r.map((I) => I.loc).filter((I) => I != null)
145
146
  );
146
- this.source = u ?? (g == null || (r = g[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? g?.map((I) => I.start), this.locations = h && u ? h.map((I) => re(u, I)) : g?.map((I) => re(I.source, I.start));
147
- const y = Xe(
147
+ this.source = u ?? (g == null || (i = g[0]) === null || i === void 0 ? void 0 : i.source), this.positions = h ?? g?.map((I) => I.start), this.locations = h && u ? h.map((I) => se(u, I)) : g?.map((I) => se(I.source, I.start));
148
+ const y = Ke(
148
149
  c?.extensions
149
150
  ) ? c?.extensions : void 0;
150
151
  this.extensions = (s = m ?? y) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
@@ -171,7 +172,7 @@ class ce extends Error {
171
172
  value: c.stack,
172
173
  writable: !0,
173
174
  configurable: !0
174
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, ce) : Object.defineProperty(this, "stack", {
175
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, ue) : Object.defineProperty(this, "stack", {
175
176
  value: Error().stack,
176
177
  writable: !0,
177
178
  configurable: !0
@@ -186,12 +187,12 @@ class ce extends Error {
186
187
  for (const n of this.nodes)
187
188
  n.loc && (t += `
188
189
 
189
- ` + Ze(n.loc));
190
+ ` + et(n.loc));
190
191
  else if (this.source && this.locations)
191
192
  for (const n of this.locations)
192
193
  t += `
193
194
 
194
- ` + Le(this.source, n);
195
+ ` + Re(this.source, n);
195
196
  return t;
196
197
  }
197
198
  toJSON() {
@@ -201,16 +202,16 @@ class ce extends Error {
201
202
  return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
202
203
  }
203
204
  }
204
- function he(e) {
205
+ function fe(e) {
205
206
  return e === void 0 || e.length === 0 ? void 0 : e;
206
207
  }
207
208
  function A(e, t, n) {
208
- return new ce(`Syntax Error: ${n}`, {
209
+ return new ue(`Syntax Error: ${n}`, {
209
210
  source: e,
210
211
  positions: [t]
211
212
  });
212
213
  }
213
- class tt {
214
+ class nt {
214
215
  /**
215
216
  * The character offset at which this Node begins.
216
217
  */
@@ -226,8 +227,8 @@ class tt {
226
227
  /**
227
228
  * The Source document the AST represents.
228
229
  */
229
- constructor(t, n, i) {
230
- this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
230
+ constructor(t, n, r) {
231
+ this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r;
231
232
  }
232
233
  get [Symbol.toStringTag]() {
233
234
  return "Location";
@@ -239,7 +240,7 @@ class tt {
239
240
  };
240
241
  }
241
242
  }
242
- class Re {
243
+ class Fe {
243
244
  /**
244
245
  * The kind of Token.
245
246
  */
@@ -266,8 +267,8 @@ class Re {
266
267
  * including ignored tokens. <SOF> is always the first node and <EOF>
267
268
  * the last.
268
269
  */
269
- constructor(t, n, i, r, s, o) {
270
- this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
270
+ constructor(t, n, r, i, s, o) {
271
+ this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = o, this.prev = null, this.next = null;
271
272
  }
272
273
  get [Symbol.toStringTag]() {
273
274
  return "Token";
@@ -281,7 +282,7 @@ class Re {
281
282
  };
282
283
  }
283
284
  }
284
- const Fe = {
285
+ const we = {
285
286
  Name: [],
286
287
  Document: ["definitions"],
287
288
  OperationDefinition: [
@@ -368,65 +369,65 @@ const Fe = {
368
369
  ArgumentCoordinate: ["name", "fieldName", "argumentName"],
369
370
  DirectiveCoordinate: ["name"],
370
371
  DirectiveArgumentCoordinate: ["name", "argumentName"]
371
- }, nt = new Set(Object.keys(Fe));
372
- function fe(e) {
372
+ }, rt = new Set(Object.keys(we));
373
+ function me(e) {
373
374
  const t = e?.kind;
374
- return typeof t == "string" && nt.has(t);
375
+ return typeof t == "string" && rt.has(t);
375
376
  }
376
377
  var w;
377
378
  (function(e) {
378
379
  e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
379
380
  })(w || (w = {}));
380
- var ie;
381
+ var oe;
381
382
  (function(e) {
382
383
  e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
383
- })(ie || (ie = {}));
384
+ })(oe || (oe = {}));
384
385
  var l;
385
386
  (function(e) {
386
387
  e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", e.TYPE_COORDINATE = "TypeCoordinate", e.MEMBER_COORDINATE = "MemberCoordinate", e.ARGUMENT_COORDINATE = "ArgumentCoordinate", e.DIRECTIVE_COORDINATE = "DirectiveCoordinate", e.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate";
387
388
  })(l || (l = {}));
388
- function se(e) {
389
+ function ae(e) {
389
390
  return e === 9 || e === 32;
390
391
  }
391
392
  function M(e) {
392
393
  return e >= 48 && e <= 57;
393
394
  }
394
- function we(e) {
395
+ function $e(e) {
395
396
  return e >= 97 && e <= 122 || // A-Z
396
397
  e >= 65 && e <= 90;
397
398
  }
398
- function $e(e) {
399
- return we(e) || e === 95;
400
- }
401
- function rt(e) {
402
- return we(e) || M(e) || e === 95;
399
+ function Be(e) {
400
+ return $e(e) || e === 95;
403
401
  }
404
402
  function it(e) {
403
+ return $e(e) || M(e) || e === 95;
404
+ }
405
+ function st(e) {
405
406
  var t;
406
- let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
407
+ let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
407
408
  for (let o = 0; o < e.length; ++o) {
408
409
  var s;
409
- const u = e[o], h = st(u);
410
- h !== u.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < n && (n = h));
410
+ const u = e[o], h = ot(u);
411
+ h !== u.length && (r = (s = r) !== null && s !== void 0 ? s : o, i = o, o !== 0 && h < n && (n = h));
411
412
  }
412
413
  return e.map((o, u) => u === 0 ? o : o.slice(n)).slice(
413
- (t = i) !== null && t !== void 0 ? t : 0,
414
- r + 1
414
+ (t = r) !== null && t !== void 0 ? t : 0,
415
+ i + 1
415
416
  );
416
417
  }
417
- function st(e) {
418
+ function ot(e) {
418
419
  let t = 0;
419
- for (; t < e.length && se(e.charCodeAt(t)); )
420
+ for (; t < e.length && ae(e.charCodeAt(t)); )
420
421
  ++t;
421
422
  return t;
422
423
  }
423
- function ot(e, t) {
424
- const n = e.replace(/"""/g, '\\"""'), i = n.split(/\r\n|[\n\r]/g), r = i.length === 1, s = i.length > 1 && i.slice(1).every((y) => y.length === 0 || se(y.charCodeAt(0))), o = n.endsWith('\\"""'), u = e.endsWith('"') && !o, h = e.endsWith("\\"), p = u || h, c = (
424
+ function at(e, t) {
425
+ const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((y) => y.length === 0 || ae(y.charCodeAt(0))), o = n.endsWith('\\"""'), u = e.endsWith('"') && !o, h = e.endsWith("\\"), p = u || h, c = (
425
426
  // add leading and trailing new lines only if it improves readability
426
- !r || e.length > 70 || p || s || o
427
+ !i || e.length > 70 || p || s || o
427
428
  );
428
429
  let m = "";
429
- const g = r && se(e.charCodeAt(0));
430
+ const g = i && ae(e.charCodeAt(0));
430
431
  return (c && !g || s) && (m += `
431
432
  `), m += n, (c || p) && (m += `
432
433
  `), '"""' + m + '"""';
@@ -435,7 +436,7 @@ var a;
435
436
  (function(e) {
436
437
  e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.DOT = ".", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
437
438
  })(a || (a = {}));
438
- class at {
439
+ class ct {
439
440
  /**
440
441
  * The previously focused non-ignored token.
441
442
  */
@@ -449,7 +450,7 @@ class at {
449
450
  * The character offset at which the current line begins.
450
451
  */
451
452
  constructor(t) {
452
- const n = new Re(a.SOF, 0, 0, 0, 0);
453
+ const n = new Fe(a.SOF, 0, 0, 0, 0);
453
454
  this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
454
455
  }
455
456
  get [Symbol.toStringTag]() {
@@ -472,23 +473,23 @@ class at {
472
473
  if (t.next)
473
474
  t = t.next;
474
475
  else {
475
- const n = dt(this, t.end);
476
+ const n = ut(this, t.end);
476
477
  t.next = n, n.prev = t, t = n;
477
478
  }
478
479
  while (t.kind === a.COMMENT);
479
480
  return t;
480
481
  }
481
482
  }
482
- function ct(e) {
483
+ function dt(e) {
483
484
  return e === a.BANG || e === a.DOLLAR || e === a.AMP || e === a.PAREN_L || e === a.PAREN_R || e === a.DOT || e === a.SPREAD || e === a.COLON || e === a.EQUALS || e === a.AT || e === a.BRACKET_L || e === a.BRACKET_R || e === a.BRACE_L || e === a.PIPE || e === a.BRACE_R;
484
485
  }
485
486
  function $(e) {
486
487
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
487
488
  }
488
- function K(e, t) {
489
- return Be(e.charCodeAt(t)) && Ue(e.charCodeAt(t + 1));
489
+ function W(e, t) {
490
+ return Ve(e.charCodeAt(t)) && Ue(e.charCodeAt(t + 1));
490
491
  }
491
- function Be(e) {
492
+ function Ve(e) {
492
493
  return e >= 55296 && e <= 56319;
493
494
  }
494
495
  function Ue(e) {
@@ -499,20 +500,20 @@ function F(e, t) {
499
500
  if (n === void 0)
500
501
  return a.EOF;
501
502
  if (n >= 32 && n <= 126) {
502
- const i = String.fromCodePoint(n);
503
- return i === '"' ? `'"'` : `"${i}"`;
503
+ const r = String.fromCodePoint(n);
504
+ return r === '"' ? `'"'` : `"${r}"`;
504
505
  }
505
506
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
506
507
  }
507
- function v(e, t, n, i, r) {
508
+ function v(e, t, n, r, i) {
508
509
  const s = e.line, o = 1 + n - e.lineStart;
509
- return new Re(t, n, i, s, o, r);
510
+ return new Fe(t, n, r, s, o, i);
510
511
  }
511
- function dt(e, t) {
512
- const n = e.source.body, i = n.length;
513
- let r = t;
514
- for (; r < i; ) {
515
- const s = n.charCodeAt(r);
512
+ function ut(e, t) {
513
+ const n = e.source.body, r = n.length;
514
+ let i = t;
515
+ for (; i < r; ) {
516
+ const s = n.charCodeAt(i);
516
517
  switch (s) {
517
518
  // Ignored ::
518
519
  // - UnicodeBOM
@@ -535,21 +536,21 @@ function dt(e, t) {
535
536
  case 32:
536
537
  // <space>
537
538
  case 44:
538
- ++r;
539
+ ++i;
539
540
  continue;
540
541
  // LineTerminator ::
541
542
  // - "New Line (U+000A)"
542
543
  // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
543
544
  // - "Carriage Return (U+000D)" "New Line (U+000A)"
544
545
  case 10:
545
- ++r, ++e.line, e.lineStart = r;
546
+ ++i, ++e.line, e.lineStart = i;
546
547
  continue;
547
548
  case 13:
548
- n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
549
+ n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
549
550
  continue;
550
551
  // Comment
551
552
  case 35:
552
- return ut(e, r);
553
+ return lt(e, i);
553
554
  // Token ::
554
555
  // - Punctuator
555
556
  // - Name
@@ -559,62 +560,62 @@ function dt(e, t) {
559
560
  //
560
561
  // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
561
562
  case 33:
562
- return v(e, a.BANG, r, r + 1);
563
+ return v(e, a.BANG, i, i + 1);
563
564
  case 36:
564
- return v(e, a.DOLLAR, r, r + 1);
565
+ return v(e, a.DOLLAR, i, i + 1);
565
566
  case 38:
566
- return v(e, a.AMP, r, r + 1);
567
+ return v(e, a.AMP, i, i + 1);
567
568
  case 40:
568
- return v(e, a.PAREN_L, r, r + 1);
569
+ return v(e, a.PAREN_L, i, i + 1);
569
570
  case 41:
570
- return v(e, a.PAREN_R, r, r + 1);
571
+ return v(e, a.PAREN_R, i, i + 1);
571
572
  case 46:
572
- if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
573
- return v(e, a.SPREAD, r, r + 3);
573
+ if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
574
+ return v(e, a.SPREAD, i, i + 3);
574
575
  break;
575
576
  case 58:
576
- return v(e, a.COLON, r, r + 1);
577
+ return v(e, a.COLON, i, i + 1);
577
578
  case 61:
578
- return v(e, a.EQUALS, r, r + 1);
579
+ return v(e, a.EQUALS, i, i + 1);
579
580
  case 64:
580
- return v(e, a.AT, r, r + 1);
581
+ return v(e, a.AT, i, i + 1);
581
582
  case 91:
582
- return v(e, a.BRACKET_L, r, r + 1);
583
+ return v(e, a.BRACKET_L, i, i + 1);
583
584
  case 93:
584
- return v(e, a.BRACKET_R, r, r + 1);
585
+ return v(e, a.BRACKET_R, i, i + 1);
585
586
  case 123:
586
- return v(e, a.BRACE_L, r, r + 1);
587
+ return v(e, a.BRACE_L, i, i + 1);
587
588
  case 124:
588
- return v(e, a.PIPE, r, r + 1);
589
+ return v(e, a.PIPE, i, i + 1);
589
590
  case 125:
590
- return v(e, a.BRACE_R, r, r + 1);
591
+ return v(e, a.BRACE_R, i, i + 1);
591
592
  // StringValue
592
593
  case 34:
593
- return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? gt(e, r) : pt(e, r);
594
+ return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? It(e, i) : ht(e, i);
594
595
  }
595
596
  if (M(s) || s === 45)
596
- return lt(e, r, s);
597
- if ($e(s))
598
- return It(e, r);
597
+ return pt(e, i, s);
598
+ if (Be(s))
599
+ return Et(e, i);
599
600
  throw A(
600
601
  e.source,
601
- r,
602
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : $(s) || K(n, r) ? `Unexpected character: ${F(e, r)}.` : `Invalid character: ${F(e, r)}.`
602
+ i,
603
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : $(s) || W(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`
603
604
  );
604
605
  }
605
- return v(e, a.EOF, i, i);
606
+ return v(e, a.EOF, r, r);
606
607
  }
607
- function ut(e, t) {
608
- const n = e.source.body, i = n.length;
609
- let r = t + 1;
610
- for (; r < i; ) {
611
- const s = n.charCodeAt(r);
608
+ function lt(e, t) {
609
+ const n = e.source.body, r = n.length;
610
+ let i = t + 1;
611
+ for (; i < r; ) {
612
+ const s = n.charCodeAt(i);
612
613
  if (s === 10 || s === 13)
613
614
  break;
614
615
  if ($(s))
615
- ++r;
616
- else if (K(n, r))
617
- r += 2;
616
+ ++i;
617
+ else if (W(n, i))
618
+ i += 2;
618
619
  else
619
620
  break;
620
621
  }
@@ -622,43 +623,43 @@ function ut(e, t) {
622
623
  e,
623
624
  a.COMMENT,
624
625
  t,
625
- r,
626
- n.slice(t + 1, r)
626
+ i,
627
+ n.slice(t + 1, i)
627
628
  );
628
629
  }
629
- function lt(e, t, n) {
630
- const i = e.source.body;
631
- let r = t, s = n, o = !1;
632
- if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
633
- if (s = i.charCodeAt(++r), M(s))
630
+ function pt(e, t, n) {
631
+ const r = e.source.body;
632
+ let i = t, s = n, o = !1;
633
+ if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
634
+ if (s = r.charCodeAt(++i), M(s))
634
635
  throw A(
635
636
  e.source,
636
- r,
637
+ i,
637
638
  `Invalid number, unexpected digit after 0: ${F(
638
639
  e,
639
- r
640
+ i
640
641
  )}.`
641
642
  );
642
643
  } else
643
- r = ee(e, r, s), s = i.charCodeAt(r);
644
- if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = ee(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = ee(e, r, s), s = i.charCodeAt(r)), s === 46 || $e(s))
644
+ i = ne(e, i, s), s = r.charCodeAt(i);
645
+ if (s === 46 && (o = !0, s = r.charCodeAt(++i), i = ne(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (o = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ne(e, i, s), s = r.charCodeAt(i)), s === 46 || Be(s))
645
646
  throw A(
646
647
  e.source,
647
- r,
648
+ i,
648
649
  `Invalid number, expected digit but got: ${F(
649
650
  e,
650
- r
651
+ i
651
652
  )}.`
652
653
  );
653
654
  return v(
654
655
  e,
655
656
  o ? a.FLOAT : a.INT,
656
657
  t,
657
- r,
658
- i.slice(t, r)
658
+ i,
659
+ r.slice(t, i)
659
660
  );
660
661
  }
661
- function ee(e, t, n) {
662
+ function ne(e, t, n) {
662
663
  if (!M(n))
663
664
  throw A(
664
665
  e.source,
@@ -668,57 +669,57 @@ function ee(e, t, n) {
668
669
  t
669
670
  )}.`
670
671
  );
671
- const i = e.source.body;
672
- let r = t + 1;
673
- for (; M(i.charCodeAt(r)); )
674
- ++r;
675
- return r;
672
+ const r = e.source.body;
673
+ let i = t + 1;
674
+ for (; M(r.charCodeAt(i)); )
675
+ ++i;
676
+ return i;
676
677
  }
677
- function pt(e, t) {
678
- const n = e.source.body, i = n.length;
679
- let r = t + 1, s = r, o = "";
680
- for (; r < i; ) {
681
- const u = n.charCodeAt(r);
678
+ function ht(e, t) {
679
+ const n = e.source.body, r = n.length;
680
+ let i = t + 1, s = i, o = "";
681
+ for (; i < r; ) {
682
+ const u = n.charCodeAt(i);
682
683
  if (u === 34)
683
- return o += n.slice(s, r), v(e, a.STRING, t, r + 1, o);
684
+ return o += n.slice(s, i), v(e, a.STRING, t, i + 1, o);
684
685
  if (u === 92) {
685
- o += n.slice(s, r);
686
- const h = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? ht(e, r) : ft(e, r) : mt(e, r);
687
- o += h.value, r += h.size, s = r;
686
+ o += n.slice(s, i);
687
+ const h = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? ft(e, i) : mt(e, i) : gt(e, i);
688
+ o += h.value, i += h.size, s = i;
688
689
  continue;
689
690
  }
690
691
  if (u === 10 || u === 13)
691
692
  break;
692
693
  if ($(u))
693
- ++r;
694
- else if (K(n, r))
695
- r += 2;
694
+ ++i;
695
+ else if (W(n, i))
696
+ i += 2;
696
697
  else
697
698
  throw A(
698
699
  e.source,
699
- r,
700
+ i,
700
701
  `Invalid character within String: ${F(
701
702
  e,
702
- r
703
+ i
703
704
  )}.`
704
705
  );
705
706
  }
706
- throw A(e.source, r, "Unterminated string.");
707
+ throw A(e.source, i, "Unterminated string.");
707
708
  }
708
- function ht(e, t) {
709
+ function ft(e, t) {
709
710
  const n = e.source.body;
710
- let i = 0, r = 3;
711
- for (; r < 12; ) {
712
- const s = n.charCodeAt(t + r++);
711
+ let r = 0, i = 3;
712
+ for (; i < 12; ) {
713
+ const s = n.charCodeAt(t + i++);
713
714
  if (s === 125) {
714
- if (r < 5 || !$(i))
715
+ if (i < 5 || !$(r))
715
716
  break;
716
717
  return {
717
- value: String.fromCodePoint(i),
718
- size: r
718
+ value: String.fromCodePoint(r),
719
+ size: i
719
720
  };
720
721
  }
721
- if (i = i << 4 | V(s), i < 0)
722
+ if (r = r << 4 | U(s), r < 0)
722
723
  break;
723
724
  }
724
725
  throw A(
@@ -726,22 +727,22 @@ function ht(e, t) {
726
727
  t,
727
728
  `Invalid Unicode escape sequence: "${n.slice(
728
729
  t,
729
- t + r
730
+ t + i
730
731
  )}".`
731
732
  );
732
733
  }
733
- function ft(e, t) {
734
- const n = e.source.body, i = me(n, t + 2);
735
- if ($(i))
734
+ function mt(e, t) {
735
+ const n = e.source.body, r = ge(n, t + 2);
736
+ if ($(r))
736
737
  return {
737
- value: String.fromCodePoint(i),
738
+ value: String.fromCodePoint(r),
738
739
  size: 6
739
740
  };
740
- if (Be(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
741
- const r = me(n, t + 8);
742
- if (Ue(r))
741
+ if (Ve(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
742
+ const i = ge(n, t + 8);
743
+ if (Ue(i))
743
744
  return {
744
- value: String.fromCodePoint(i, r),
745
+ value: String.fromCodePoint(r, i),
745
746
  size: 12
746
747
  };
747
748
  }
@@ -751,13 +752,13 @@ function ft(e, t) {
751
752
  `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
752
753
  );
753
754
  }
754
- function me(e, t) {
755
- return V(e.charCodeAt(t)) << 12 | V(e.charCodeAt(t + 1)) << 8 | V(e.charCodeAt(t + 2)) << 4 | V(e.charCodeAt(t + 3));
755
+ function ge(e, t) {
756
+ return U(e.charCodeAt(t)) << 12 | U(e.charCodeAt(t + 1)) << 8 | U(e.charCodeAt(t + 2)) << 4 | U(e.charCodeAt(t + 3));
756
757
  }
757
- function V(e) {
758
+ function U(e) {
758
759
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
759
760
  }
760
- function mt(e, t) {
761
+ function gt(e, t) {
761
762
  const n = e.source.body;
762
763
  switch (n.charCodeAt(t + 1)) {
763
764
  case 34:
@@ -811,11 +812,11 @@ function mt(e, t) {
811
812
  )}".`
812
813
  );
813
814
  }
814
- function gt(e, t) {
815
- const n = e.source.body, i = n.length;
816
- let r = e.lineStart, s = t + 3, o = s, u = "";
815
+ function It(e, t) {
816
+ const n = e.source.body, r = n.length;
817
+ let i = e.lineStart, s = t + 3, o = s, u = "";
817
818
  const h = [];
818
- for (; s < i; ) {
819
+ for (; s < r; ) {
819
820
  const p = n.charCodeAt(s);
820
821
  if (p === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
821
822
  u += n.slice(o, s), h.push(u);
@@ -825,22 +826,22 @@ function gt(e, t) {
825
826
  t,
826
827
  s + 3,
827
828
  // Return a string of the lines joined with U+000A.
828
- it(h).join(`
829
+ st(h).join(`
829
830
  `)
830
831
  );
831
- return e.line += h.length - 1, e.lineStart = r, c;
832
+ return e.line += h.length - 1, e.lineStart = i, c;
832
833
  }
833
834
  if (p === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
834
835
  u += n.slice(o, s), o = s + 1, s += 4;
835
836
  continue;
836
837
  }
837
838
  if (p === 10 || p === 13) {
838
- u += n.slice(o, s), h.push(u), p === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, r = s;
839
+ u += n.slice(o, s), h.push(u), p === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, i = s;
839
840
  continue;
840
841
  }
841
842
  if ($(p))
842
843
  ++s;
843
- else if (K(n, s))
844
+ else if (W(n, s))
844
845
  s += 2;
845
846
  else
846
847
  throw A(
@@ -854,13 +855,13 @@ function gt(e, t) {
854
855
  }
855
856
  throw A(e.source, s, "Unterminated string.");
856
857
  }
857
- function It(e, t) {
858
- const n = e.source.body, i = n.length;
859
- let r = t + 1;
860
- for (; r < i; ) {
861
- const s = n.charCodeAt(r);
862
- if (rt(s))
863
- ++r;
858
+ function Et(e, t) {
859
+ const n = e.source.body, r = n.length;
860
+ let i = t + 1;
861
+ for (; i < r; ) {
862
+ const s = n.charCodeAt(i);
863
+ if (it(s))
864
+ ++i;
864
865
  else
865
866
  break;
866
867
  }
@@ -868,58 +869,58 @@ function It(e, t) {
868
869
  e,
869
870
  a.NAME,
870
871
  t,
871
- r,
872
- n.slice(t, r)
872
+ i,
873
+ n.slice(t, i)
873
874
  );
874
875
  }
875
- const Et = 10, Ve = 2;
876
- function de(e) {
877
- return W(e, []);
876
+ const yt = 10, Me = 2;
877
+ function le(e) {
878
+ return Z(e, []);
878
879
  }
879
- function W(e, t) {
880
+ function Z(e, t) {
880
881
  switch (typeof e) {
881
882
  case "string":
882
883
  return JSON.stringify(e);
883
884
  case "function":
884
885
  return e.name ? `[function ${e.name}]` : "[function]";
885
886
  case "object":
886
- return yt(e, t);
887
+ return vt(e, t);
887
888
  default:
888
889
  return String(e);
889
890
  }
890
891
  }
891
- function yt(e, t) {
892
+ function vt(e, t) {
892
893
  if (e === null)
893
894
  return "null";
894
895
  if (t.includes(e))
895
896
  return "[Circular]";
896
897
  const n = [...t, e];
897
- if (vt(e)) {
898
- const i = e.toJSON();
899
- if (i !== e)
900
- return typeof i == "string" ? i : W(i, n);
898
+ if (At(e)) {
899
+ const r = e.toJSON();
900
+ if (r !== e)
901
+ return typeof r == "string" ? r : Z(r, n);
901
902
  } else if (Array.isArray(e))
902
903
  return Tt(e, n);
903
- return At(e, n);
904
+ return kt(e, n);
904
905
  }
905
- function vt(e) {
906
+ function At(e) {
906
907
  return typeof e.toJSON == "function";
907
908
  }
908
- function At(e, t) {
909
+ function kt(e, t) {
909
910
  const n = Object.entries(e);
910
- return n.length === 0 ? "{}" : t.length > Ve ? "[" + Ot(e) + "]" : "{ " + n.map(
911
- ([r, s]) => r + ": " + W(s, t)
911
+ return n.length === 0 ? "{}" : t.length > Me ? "[" + Ot(e) + "]" : "{ " + n.map(
912
+ ([i, s]) => i + ": " + Z(s, t)
912
913
  ).join(", ") + " }";
913
914
  }
914
915
  function Tt(e, t) {
915
916
  if (e.length === 0)
916
917
  return "[]";
917
- if (t.length > Ve)
918
+ if (t.length > Me)
918
919
  return "[Array]";
919
- const n = Math.min(Et, e.length), i = e.length - n, r = [];
920
+ const n = Math.min(yt, e.length), r = e.length - n, i = [];
920
921
  for (let s = 0; s < n; ++s)
921
- r.push(W(e[s], t));
922
- return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
922
+ i.push(Z(e[s], t));
923
+ return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]";
923
924
  }
924
925
  function Ot(e) {
925
926
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
@@ -930,24 +931,24 @@ function Ot(e) {
930
931
  }
931
932
  return t;
932
933
  }
933
- const kt = globalThis.process && // eslint-disable-next-line no-undef
934
- process.env.NODE_ENV === "production", Dt = (
934
+ const Dt = globalThis.process && // eslint-disable-next-line no-undef
935
+ process.env.NODE_ENV === "production", xt = (
935
936
  /* c8 ignore next 6 */
936
937
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
937
- kt ? function(t, n) {
938
+ Dt ? function(t, n) {
938
939
  return t instanceof n;
939
940
  } : function(t, n) {
940
941
  if (t instanceof n)
941
942
  return !0;
942
943
  if (typeof t == "object" && t !== null) {
943
- var i;
944
- const r = n.prototype[Symbol.toStringTag], s = (
944
+ var r;
945
+ const i = n.prototype[Symbol.toStringTag], s = (
945
946
  // We still need to support constructor's name to detect conflicts with older versions of this library.
946
- Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name
947
+ Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name
947
948
  );
948
- if (r === s) {
949
- const o = de(t);
950
- throw new Error(`Cannot use ${r} "${o}" from another module or realm.
949
+ if (i === s) {
950
+ const o = le(t);
951
+ throw new Error(`Cannot use ${i} "${o}" from another module or realm.
951
952
 
952
953
  Ensure that there is only one instance of "graphql" in the node_modules
953
954
  directory. If different versions of "graphql" are the dependencies of other
@@ -964,12 +965,12 @@ spurious results.`);
964
965
  return !1;
965
966
  }
966
967
  );
967
- class Me {
968
- constructor(t, n = "GraphQL request", i = {
968
+ class qe {
969
+ constructor(t, n = "GraphQL request", r = {
969
970
  line: 1,
970
971
  column: 1
971
972
  }) {
972
- typeof t == "string" || G(!1, `Body must be a string. Received: ${de(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || G(
973
+ typeof t == "string" || G(!1, `Body must be a string. Received: ${le(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || G(
973
974
  !1,
974
975
  "line in locationOffset is 1-indexed and must be positive."
975
976
  ), this.locationOffset.column > 0 || G(
@@ -981,26 +982,26 @@ class Me {
981
982
  return "Source";
982
983
  }
983
984
  }
984
- function xt(e) {
985
- return Dt(e, Me);
985
+ function Nt(e) {
986
+ return xt(e, qe);
986
987
  }
987
- function Nt(e, t) {
988
- const n = new bt(e, t), i = n.parseDocument();
989
- return Object.defineProperty(i, "tokenCount", {
988
+ function Pt(e, t) {
989
+ const n = new bt(e, t), r = n.parseDocument();
990
+ return Object.defineProperty(r, "tokenCount", {
990
991
  enumerable: !1,
991
992
  value: n.tokenCount
992
- }), i;
993
+ }), r;
993
994
  }
994
995
  class bt {
995
996
  constructor(t, n = {}) {
996
- const { lexer: i, ...r } = n;
997
- if (i)
998
- this._lexer = i;
997
+ const { lexer: r, ...i } = n;
998
+ if (r)
999
+ this._lexer = r;
999
1000
  else {
1000
- const s = xt(t) ? t : new Me(t);
1001
- this._lexer = new at(s);
1001
+ const s = Nt(t) ? t : new qe(t);
1002
+ this._lexer = new ct(s);
1002
1003
  }
1003
- this._options = r, this._tokenCounter = 0;
1004
+ this._options = i, this._tokenCounter = 0;
1004
1005
  }
1005
1006
  get tokenCount() {
1006
1007
  return this._tokenCounter;
@@ -1118,13 +1119,13 @@ class bt {
1118
1119
  directives: [],
1119
1120
  selectionSet: this.parseSelectionSet()
1120
1121
  });
1121
- const n = this.parseDescription(), i = this.parseOperationType();
1122
- let r;
1123
- return this.peek(a.NAME) && (r = this.parseName()), this.node(t, {
1122
+ const n = this.parseDescription(), r = this.parseOperationType();
1123
+ let i;
1124
+ return this.peek(a.NAME) && (i = this.parseName()), this.node(t, {
1124
1125
  kind: l.OPERATION_DEFINITION,
1125
- operation: i,
1126
+ operation: r,
1126
1127
  description: n,
1127
- name: r,
1128
+ name: i,
1128
1129
  variableDefinitions: this.parseVariableDefinitions(),
1129
1130
  directives: this.parseDirectives(!1),
1130
1131
  selectionSet: this.parseSelectionSet()
@@ -1209,11 +1210,11 @@ class bt {
1209
1210
  */
1210
1211
  parseField() {
1211
1212
  const t = this._lexer.token, n = this.parseName();
1212
- let i, r;
1213
- return this.expectOptionalToken(a.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1213
+ let r, i;
1214
+ return this.expectOptionalToken(a.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1214
1215
  kind: l.FIELD,
1215
- alias: i,
1216
- name: r,
1216
+ alias: r,
1217
+ name: i,
1217
1218
  arguments: this.parseArguments(!1),
1218
1219
  directives: this.parseDirectives(!1),
1219
1220
  selectionSet: this.peek(a.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -1230,10 +1231,10 @@ class bt {
1230
1231
  * Argument[Const] : Name : Value[?Const]
1231
1232
  */
1232
1233
  parseArgument(t = !1) {
1233
- const n = this._lexer.token, i = this.parseName();
1234
+ const n = this._lexer.token, r = this.parseName();
1234
1235
  return this.expectToken(a.COLON), this.node(n, {
1235
1236
  kind: l.ARGUMENT,
1236
- name: i,
1237
+ name: r,
1237
1238
  value: this.parseValueLiteral(t)
1238
1239
  });
1239
1240
  }
@@ -1360,11 +1361,11 @@ class bt {
1360
1361
  case a.DOLLAR:
1361
1362
  if (t)
1362
1363
  if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
1363
- const i = this._lexer.token.value;
1364
+ const r = this._lexer.token.value;
1364
1365
  throw A(
1365
1366
  this._lexer.source,
1366
1367
  n.start,
1367
- `Unexpected variable "$${i}" in constant value.`
1368
+ `Unexpected variable "$${r}" in constant value.`
1368
1369
  );
1369
1370
  } else
1370
1371
  throw this.unexpected(n);
@@ -1414,10 +1415,10 @@ class bt {
1414
1415
  * ObjectField[Const] : Name : Value[?Const]
1415
1416
  */
1416
1417
  parseObjectField(t) {
1417
- const n = this._lexer.token, i = this.parseName();
1418
+ const n = this._lexer.token, r = this.parseName();
1418
1419
  return this.expectToken(a.COLON), this.node(n, {
1419
1420
  kind: l.OBJECT_FIELD,
1420
- name: i,
1421
+ name: r,
1421
1422
  value: this.parseValueLiteral(t)
1422
1423
  });
1423
1424
  }
@@ -1458,10 +1459,10 @@ class bt {
1458
1459
  const t = this._lexer.token;
1459
1460
  let n;
1460
1461
  if (this.expectOptionalToken(a.BRACKET_L)) {
1461
- const i = this.parseTypeReference();
1462
+ const r = this.parseTypeReference();
1462
1463
  this.expectToken(a.BRACKET_R), n = this.node(t, {
1463
1464
  kind: l.LIST_TYPE,
1464
- type: i
1465
+ type: r
1465
1466
  });
1466
1467
  } else
1467
1468
  n = this.parseNamedType();
@@ -1498,7 +1499,7 @@ class bt {
1498
1499
  parseSchemaDefinition() {
1499
1500
  const t = this._lexer.token, n = this.parseDescription();
1500
1501
  this.expectKeyword("schema");
1501
- const i = this.parseConstDirectives(), r = this.many(
1502
+ const r = this.parseConstDirectives(), i = this.many(
1502
1503
  a.BRACE_L,
1503
1504
  this.parseOperationTypeDefinition,
1504
1505
  a.BRACE_R
@@ -1506,8 +1507,8 @@ class bt {
1506
1507
  return this.node(t, {
1507
1508
  kind: l.SCHEMA_DEFINITION,
1508
1509
  description: n,
1509
- directives: i,
1510
- operationTypes: r
1510
+ directives: r,
1511
+ operationTypes: i
1511
1512
  });
1512
1513
  }
1513
1514
  /**
@@ -1516,11 +1517,11 @@ class bt {
1516
1517
  parseOperationTypeDefinition() {
1517
1518
  const t = this._lexer.token, n = this.parseOperationType();
1518
1519
  this.expectToken(a.COLON);
1519
- const i = this.parseNamedType();
1520
+ const r = this.parseNamedType();
1520
1521
  return this.node(t, {
1521
1522
  kind: l.OPERATION_TYPE_DEFINITION,
1522
1523
  operation: n,
1523
- type: i
1524
+ type: r
1524
1525
  });
1525
1526
  }
1526
1527
  /**
@@ -1529,12 +1530,12 @@ class bt {
1529
1530
  parseScalarTypeDefinition() {
1530
1531
  const t = this._lexer.token, n = this.parseDescription();
1531
1532
  this.expectKeyword("scalar");
1532
- const i = this.parseName(), r = this.parseConstDirectives();
1533
+ const r = this.parseName(), i = this.parseConstDirectives();
1533
1534
  return this.node(t, {
1534
1535
  kind: l.SCALAR_TYPE_DEFINITION,
1535
1536
  description: n,
1536
- name: i,
1537
- directives: r
1537
+ name: r,
1538
+ directives: i
1538
1539
  });
1539
1540
  }
1540
1541
  /**
@@ -1545,12 +1546,12 @@ class bt {
1545
1546
  parseObjectTypeDefinition() {
1546
1547
  const t = this._lexer.token, n = this.parseDescription();
1547
1548
  this.expectKeyword("type");
1548
- const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1549
+ const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1549
1550
  return this.node(t, {
1550
1551
  kind: l.OBJECT_TYPE_DEFINITION,
1551
1552
  description: n,
1552
- name: i,
1553
- interfaces: r,
1553
+ name: r,
1554
+ interfaces: i,
1554
1555
  directives: s,
1555
1556
  fields: o
1556
1557
  });
@@ -1580,14 +1581,14 @@ class bt {
1580
1581
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1581
1582
  */
1582
1583
  parseFieldDefinition() {
1583
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1584
+ const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
1584
1585
  this.expectToken(a.COLON);
1585
1586
  const s = this.parseTypeReference(), o = this.parseConstDirectives();
1586
1587
  return this.node(t, {
1587
1588
  kind: l.FIELD_DEFINITION,
1588
1589
  description: n,
1589
- name: i,
1590
- arguments: r,
1590
+ name: r,
1591
+ arguments: i,
1591
1592
  type: s,
1592
1593
  directives: o
1593
1594
  });
@@ -1607,17 +1608,17 @@ class bt {
1607
1608
  * - Description? Name : Type DefaultValue? Directives[Const]?
1608
1609
  */
1609
1610
  parseInputValueDef() {
1610
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1611
+ const t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
1611
1612
  this.expectToken(a.COLON);
1612
- const r = this.parseTypeReference();
1613
+ const i = this.parseTypeReference();
1613
1614
  let s;
1614
1615
  this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral());
1615
1616
  const o = this.parseConstDirectives();
1616
1617
  return this.node(t, {
1617
1618
  kind: l.INPUT_VALUE_DEFINITION,
1618
1619
  description: n,
1619
- name: i,
1620
- type: r,
1620
+ name: r,
1621
+ type: i,
1621
1622
  defaultValue: s,
1622
1623
  directives: o
1623
1624
  });
@@ -1629,12 +1630,12 @@ class bt {
1629
1630
  parseInterfaceTypeDefinition() {
1630
1631
  const t = this._lexer.token, n = this.parseDescription();
1631
1632
  this.expectKeyword("interface");
1632
- const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1633
+ const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1633
1634
  return this.node(t, {
1634
1635
  kind: l.INTERFACE_TYPE_DEFINITION,
1635
1636
  description: n,
1636
- name: i,
1637
- interfaces: r,
1637
+ name: r,
1638
+ interfaces: i,
1638
1639
  directives: s,
1639
1640
  fields: o
1640
1641
  });
@@ -1646,12 +1647,12 @@ class bt {
1646
1647
  parseUnionTypeDefinition() {
1647
1648
  const t = this._lexer.token, n = this.parseDescription();
1648
1649
  this.expectKeyword("union");
1649
- const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1650
+ const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1650
1651
  return this.node(t, {
1651
1652
  kind: l.UNION_TYPE_DEFINITION,
1652
1653
  description: n,
1653
- name: i,
1654
- directives: r,
1654
+ name: r,
1655
+ directives: i,
1655
1656
  types: s
1656
1657
  });
1657
1658
  }
@@ -1670,12 +1671,12 @@ class bt {
1670
1671
  parseEnumTypeDefinition() {
1671
1672
  const t = this._lexer.token, n = this.parseDescription();
1672
1673
  this.expectKeyword("enum");
1673
- const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1674
+ const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1674
1675
  return this.node(t, {
1675
1676
  kind: l.ENUM_TYPE_DEFINITION,
1676
1677
  description: n,
1677
- name: i,
1678
- directives: r,
1678
+ name: r,
1679
+ directives: i,
1679
1680
  values: s
1680
1681
  });
1681
1682
  }
@@ -1695,12 +1696,12 @@ class bt {
1695
1696
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1696
1697
  */
1697
1698
  parseEnumValueDefinition() {
1698
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1699
+ const t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives();
1699
1700
  return this.node(t, {
1700
1701
  kind: l.ENUM_VALUE_DEFINITION,
1701
1702
  description: n,
1702
- name: i,
1703
- directives: r
1703
+ name: r,
1704
+ directives: i
1704
1705
  });
1705
1706
  }
1706
1707
  /**
@@ -1724,12 +1725,12 @@ class bt {
1724
1725
  parseInputObjectTypeDefinition() {
1725
1726
  const t = this._lexer.token, n = this.parseDescription();
1726
1727
  this.expectKeyword("input");
1727
- const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1728
+ const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1728
1729
  return this.node(t, {
1729
1730
  kind: l.INPUT_OBJECT_TYPE_DEFINITION,
1730
1731
  description: n,
1731
- name: i,
1732
- directives: r,
1732
+ name: r,
1733
+ directives: i,
1733
1734
  fields: s
1734
1735
  });
1735
1736
  }
@@ -1789,17 +1790,17 @@ class bt {
1789
1790
  parseSchemaExtension() {
1790
1791
  const t = this._lexer.token;
1791
1792
  this.expectKeyword("extend"), this.expectKeyword("schema");
1792
- const n = this.parseConstDirectives(), i = this.optionalMany(
1793
+ const n = this.parseConstDirectives(), r = this.optionalMany(
1793
1794
  a.BRACE_L,
1794
1795
  this.parseOperationTypeDefinition,
1795
1796
  a.BRACE_R
1796
1797
  );
1797
- if (n.length === 0 && i.length === 0)
1798
+ if (n.length === 0 && r.length === 0)
1798
1799
  throw this.unexpected();
1799
1800
  return this.node(t, {
1800
1801
  kind: l.SCHEMA_EXTENSION,
1801
1802
  directives: n,
1802
- operationTypes: i
1803
+ operationTypes: r
1803
1804
  });
1804
1805
  }
1805
1806
  /**
@@ -1809,13 +1810,13 @@ class bt {
1809
1810
  parseScalarTypeExtension() {
1810
1811
  const t = this._lexer.token;
1811
1812
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1812
- const n = this.parseName(), i = this.parseConstDirectives();
1813
- if (i.length === 0)
1813
+ const n = this.parseName(), r = this.parseConstDirectives();
1814
+ if (r.length === 0)
1814
1815
  throw this.unexpected();
1815
1816
  return this.node(t, {
1816
1817
  kind: l.SCALAR_TYPE_EXTENSION,
1817
1818
  name: n,
1818
- directives: i
1819
+ directives: r
1819
1820
  });
1820
1821
  }
1821
1822
  /**
@@ -1827,14 +1828,14 @@ class bt {
1827
1828
  parseObjectTypeExtension() {
1828
1829
  const t = this._lexer.token;
1829
1830
  this.expectKeyword("extend"), this.expectKeyword("type");
1830
- const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1831
- if (i.length === 0 && r.length === 0 && s.length === 0)
1831
+ const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1832
+ if (r.length === 0 && i.length === 0 && s.length === 0)
1832
1833
  throw this.unexpected();
1833
1834
  return this.node(t, {
1834
1835
  kind: l.OBJECT_TYPE_EXTENSION,
1835
1836
  name: n,
1836
- interfaces: i,
1837
- directives: r,
1837
+ interfaces: r,
1838
+ directives: i,
1838
1839
  fields: s
1839
1840
  });
1840
1841
  }
@@ -1847,14 +1848,14 @@ class bt {
1847
1848
  parseInterfaceTypeExtension() {
1848
1849
  const t = this._lexer.token;
1849
1850
  this.expectKeyword("extend"), this.expectKeyword("interface");
1850
- const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1851
- if (i.length === 0 && r.length === 0 && s.length === 0)
1851
+ const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1852
+ if (r.length === 0 && i.length === 0 && s.length === 0)
1852
1853
  throw this.unexpected();
1853
1854
  return this.node(t, {
1854
1855
  kind: l.INTERFACE_TYPE_EXTENSION,
1855
1856
  name: n,
1856
- interfaces: i,
1857
- directives: r,
1857
+ interfaces: r,
1858
+ directives: i,
1858
1859
  fields: s
1859
1860
  });
1860
1861
  }
@@ -1866,14 +1867,14 @@ class bt {
1866
1867
  parseUnionTypeExtension() {
1867
1868
  const t = this._lexer.token;
1868
1869
  this.expectKeyword("extend"), this.expectKeyword("union");
1869
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1870
- if (i.length === 0 && r.length === 0)
1870
+ const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
1871
+ if (r.length === 0 && i.length === 0)
1871
1872
  throw this.unexpected();
1872
1873
  return this.node(t, {
1873
1874
  kind: l.UNION_TYPE_EXTENSION,
1874
1875
  name: n,
1875
- directives: i,
1876
- types: r
1876
+ directives: r,
1877
+ types: i
1877
1878
  });
1878
1879
  }
1879
1880
  /**
@@ -1884,14 +1885,14 @@ class bt {
1884
1885
  parseEnumTypeExtension() {
1885
1886
  const t = this._lexer.token;
1886
1887
  this.expectKeyword("extend"), this.expectKeyword("enum");
1887
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1888
- if (i.length === 0 && r.length === 0)
1888
+ const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
1889
+ if (r.length === 0 && i.length === 0)
1889
1890
  throw this.unexpected();
1890
1891
  return this.node(t, {
1891
1892
  kind: l.ENUM_TYPE_EXTENSION,
1892
1893
  name: n,
1893
- directives: i,
1894
- values: r
1894
+ directives: r,
1895
+ values: i
1895
1896
  });
1896
1897
  }
1897
1898
  /**
@@ -1902,14 +1903,14 @@ class bt {
1902
1903
  parseInputObjectTypeExtension() {
1903
1904
  const t = this._lexer.token;
1904
1905
  this.expectKeyword("extend"), this.expectKeyword("input");
1905
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1906
- if (i.length === 0 && r.length === 0)
1906
+ const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
1907
+ if (r.length === 0 && i.length === 0)
1907
1908
  throw this.unexpected();
1908
1909
  return this.node(t, {
1909
1910
  kind: l.INPUT_OBJECT_TYPE_EXTENSION,
1910
1911
  name: n,
1911
- directives: i,
1912
- fields: r
1912
+ directives: r,
1913
+ fields: i
1913
1914
  });
1914
1915
  }
1915
1916
  /**
@@ -1921,14 +1922,14 @@ class bt {
1921
1922
  parseDirectiveDefinition() {
1922
1923
  const t = this._lexer.token, n = this.parseDescription();
1923
1924
  this.expectKeyword("directive"), this.expectToken(a.AT);
1924
- const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1925
+ const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1925
1926
  this.expectKeyword("on");
1926
1927
  const o = this.parseDirectiveLocations();
1927
1928
  return this.node(t, {
1928
1929
  kind: l.DIRECTIVE_DEFINITION,
1929
1930
  description: n,
1930
- name: i,
1931
- arguments: r,
1931
+ name: r,
1932
+ arguments: i,
1932
1933
  repeatable: s,
1933
1934
  locations: o
1934
1935
  });
@@ -1970,7 +1971,7 @@ class bt {
1970
1971
  */
1971
1972
  parseDirectiveLocation() {
1972
1973
  const t = this._lexer.token, n = this.parseName();
1973
- if (Object.prototype.hasOwnProperty.call(ie, n.value))
1974
+ if (Object.prototype.hasOwnProperty.call(oe, n.value))
1974
1975
  return n;
1975
1976
  throw this.unexpected(t);
1976
1977
  }
@@ -1984,29 +1985,29 @@ class bt {
1984
1985
  * - \@ Name ( Name : )
1985
1986
  */
1986
1987
  parseSchemaCoordinate() {
1987
- const t = this._lexer.token, n = this.expectOptionalToken(a.AT), i = this.parseName();
1988
- let r;
1989
- !n && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1988
+ const t = this._lexer.token, n = this.expectOptionalToken(a.AT), r = this.parseName();
1989
+ let i;
1990
+ !n && this.expectOptionalToken(a.DOT) && (i = this.parseName());
1990
1991
  let s;
1991
- return (n || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), n ? s ? this.node(t, {
1992
+ return (n || i) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), n ? s ? this.node(t, {
1992
1993
  kind: l.DIRECTIVE_ARGUMENT_COORDINATE,
1993
- name: i,
1994
+ name: r,
1994
1995
  argumentName: s
1995
1996
  }) : this.node(t, {
1996
1997
  kind: l.DIRECTIVE_COORDINATE,
1997
- name: i
1998
- }) : r ? s ? this.node(t, {
1998
+ name: r
1999
+ }) : i ? s ? this.node(t, {
1999
2000
  kind: l.ARGUMENT_COORDINATE,
2000
- name: i,
2001
- fieldName: r,
2001
+ name: r,
2002
+ fieldName: i,
2002
2003
  argumentName: s
2003
2004
  }) : this.node(t, {
2004
2005
  kind: l.MEMBER_COORDINATE,
2005
- name: i,
2006
- memberName: r
2006
+ name: r,
2007
+ memberName: i
2007
2008
  }) : this.node(t, {
2008
2009
  kind: l.TYPE_COORDINATE,
2009
- name: i
2010
+ name: r
2010
2011
  });
2011
2012
  }
2012
2013
  // Core parsing utility functions
@@ -2016,7 +2017,7 @@ class bt {
2016
2017
  * given parsed object.
2017
2018
  */
2018
2019
  node(t, n) {
2019
- return this._options.noLocation !== !0 && (n.loc = new tt(
2020
+ return this._options.noLocation !== !0 && (n.loc = new nt(
2020
2021
  t,
2021
2022
  this._lexer.lastToken,
2022
2023
  this._lexer.source
@@ -2039,7 +2040,7 @@ class bt {
2039
2040
  throw A(
2040
2041
  this._lexer.source,
2041
2042
  n.start,
2042
- `Expected ${qe(t)}, found ${z(n)}.`
2043
+ `Expected ${ze(t)}, found ${z(n)}.`
2043
2044
  );
2044
2045
  }
2045
2046
  /**
@@ -2088,12 +2089,12 @@ class bt {
2088
2089
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2089
2090
  * Advances the parser to the next lex token after the closing token.
2090
2091
  */
2091
- any(t, n, i) {
2092
+ any(t, n, r) {
2092
2093
  this.expectToken(t);
2093
- const r = [];
2094
- for (; !this.expectOptionalToken(i); )
2095
- r.push(n.call(this));
2096
- return r;
2094
+ const i = [];
2095
+ for (; !this.expectOptionalToken(r); )
2096
+ i.push(n.call(this));
2097
+ return i;
2097
2098
  }
2098
2099
  /**
2099
2100
  * Returns a list of parse nodes, determined by the parseFn.
@@ -2101,13 +2102,13 @@ class bt {
2101
2102
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
2102
2103
  * Advances the parser to the next lex token after the closing token.
2103
2104
  */
2104
- optionalMany(t, n, i) {
2105
+ optionalMany(t, n, r) {
2105
2106
  if (this.expectOptionalToken(t)) {
2106
- const r = [];
2107
+ const i = [];
2107
2108
  do
2108
- r.push(n.call(this));
2109
- while (!this.expectOptionalToken(i));
2110
- return r;
2109
+ i.push(n.call(this));
2110
+ while (!this.expectOptionalToken(r));
2111
+ return i;
2111
2112
  }
2112
2113
  return [];
2113
2114
  }
@@ -2116,13 +2117,13 @@ class bt {
2116
2117
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2117
2118
  * Advances the parser to the next lex token after the closing token.
2118
2119
  */
2119
- many(t, n, i) {
2120
+ many(t, n, r) {
2120
2121
  this.expectToken(t);
2121
- const r = [];
2122
+ const i = [];
2122
2123
  do
2123
- r.push(n.call(this));
2124
- while (!this.expectOptionalToken(i));
2125
- return r;
2124
+ i.push(n.call(this));
2125
+ while (!this.expectOptionalToken(r));
2126
+ return i;
2126
2127
  }
2127
2128
  /**
2128
2129
  * Returns a non-empty list of parse nodes, determined by the parseFn.
@@ -2131,11 +2132,11 @@ class bt {
2131
2132
  */
2132
2133
  delimitedMany(t, n) {
2133
2134
  this.expectOptionalToken(t);
2134
- const i = [];
2135
+ const r = [];
2135
2136
  do
2136
- i.push(n.call(this));
2137
+ r.push(n.call(this));
2137
2138
  while (this.expectOptionalToken(t));
2138
- return i;
2139
+ return r;
2139
2140
  }
2140
2141
  advanceLexer() {
2141
2142
  const { maxTokens: t } = this._options, n = this._lexer.advance();
@@ -2149,19 +2150,19 @@ class bt {
2149
2150
  }
2150
2151
  function z(e) {
2151
2152
  const t = e.value;
2152
- return qe(e.kind) + (t != null ? ` "${t}"` : "");
2153
+ return ze(e.kind) + (t != null ? ` "${t}"` : "");
2153
2154
  }
2154
- function qe(e) {
2155
- return ct(e) ? `"${e}"` : e;
2155
+ function ze(e) {
2156
+ return dt(e) ? `"${e}"` : e;
2156
2157
  }
2157
- function Pt(e) {
2158
- return `"${e.replace(St, Ct)}"`;
2158
+ function St(e) {
2159
+ return `"${e.replace(Ct, _t)}"`;
2159
2160
  }
2160
- const St = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2161
- function Ct(e) {
2162
- return _t[e.charCodeAt(0)];
2161
+ const Ct = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2162
+ function _t(e) {
2163
+ return Lt[e.charCodeAt(0)];
2163
2164
  }
2164
- const _t = [
2165
+ const Lt = [
2165
2166
  "\\u0000",
2166
2167
  "\\u0001",
2167
2168
  "\\u0002",
@@ -2327,72 +2328,72 @@ const _t = [
2327
2328
  "\\u009D",
2328
2329
  "\\u009E",
2329
2330
  "\\u009F"
2330
- ], Lt = Object.freeze({});
2331
- function Rt(e, t, n = Fe) {
2332
- const i = /* @__PURE__ */ new Map();
2333
- for (const k of Object.values(l))
2334
- i.set(k, Ft(t, k));
2335
- let r, s = Array.isArray(e), o = [e], u = -1, h = [], p = e, c, m;
2331
+ ], Rt = Object.freeze({});
2332
+ function Ft(e, t, n = we) {
2333
+ const r = /* @__PURE__ */ new Map();
2334
+ for (const O of Object.values(l))
2335
+ r.set(O, wt(t, O));
2336
+ let i, s = Array.isArray(e), o = [e], u = -1, h = [], p = e, c, m;
2336
2337
  const g = [], y = [];
2337
2338
  do {
2338
2339
  u++;
2339
- const k = u === o.length, L = k && h.length !== 0;
2340
- if (k) {
2340
+ const O = u === o.length, L = O && h.length !== 0;
2341
+ if (O) {
2341
2342
  if (c = y.length === 0 ? void 0 : g[g.length - 1], p = m, m = y.pop(), L)
2342
2343
  if (s) {
2343
2344
  p = p.slice();
2344
2345
  let N = 0;
2345
- for (const [D, b] of h) {
2346
- const P = D - N;
2347
- b === null ? (p.splice(P, 1), N++) : p[P] = b;
2346
+ for (const [D, P] of h) {
2347
+ const b = D - N;
2348
+ P === null ? (p.splice(b, 1), N++) : p[b] = P;
2348
2349
  }
2349
2350
  } else {
2350
2351
  p = { ...p };
2351
2352
  for (const [N, D] of h)
2352
2353
  p[N] = D;
2353
2354
  }
2354
- u = r.index, o = r.keys, h = r.edits, s = r.inArray, r = r.prev;
2355
+ u = i.index, o = i.keys, h = i.edits, s = i.inArray, i = i.prev;
2355
2356
  } else if (m) {
2356
2357
  if (c = s ? u : o[u], p = m[c], p == null)
2357
2358
  continue;
2358
2359
  g.push(c);
2359
2360
  }
2360
- let T;
2361
+ let k;
2361
2362
  if (!Array.isArray(p)) {
2362
- var I, O;
2363
- fe(p) || G(!1, `Invalid AST Node: ${de(p)}.`);
2364
- const N = k ? (I = i.get(p.kind)) === null || I === void 0 ? void 0 : I.leave : (O = i.get(p.kind)) === null || O === void 0 ? void 0 : O.enter;
2365
- if (T = N?.call(t, p, c, m, g, y), T === Lt)
2363
+ var I, T;
2364
+ me(p) || G(!1, `Invalid AST Node: ${le(p)}.`);
2365
+ const N = O ? (I = r.get(p.kind)) === null || I === void 0 ? void 0 : I.leave : (T = r.get(p.kind)) === null || T === void 0 ? void 0 : T.enter;
2366
+ if (k = N?.call(t, p, c, m, g, y), k === Rt)
2366
2367
  break;
2367
- if (T === !1) {
2368
- if (!k) {
2368
+ if (k === !1) {
2369
+ if (!O) {
2369
2370
  g.pop();
2370
2371
  continue;
2371
2372
  }
2372
- } else if (T !== void 0 && (h.push([c, T]), !k))
2373
- if (fe(T))
2374
- p = T;
2373
+ } else if (k !== void 0 && (h.push([c, k]), !O))
2374
+ if (me(k))
2375
+ p = k;
2375
2376
  else {
2376
2377
  g.pop();
2377
2378
  continue;
2378
2379
  }
2379
2380
  }
2380
- if (T === void 0 && L && h.push([c, p]), k)
2381
+ if (k === void 0 && L && h.push([c, p]), O)
2381
2382
  g.pop();
2382
2383
  else {
2383
2384
  var x;
2384
- r = {
2385
+ i = {
2385
2386
  inArray: s,
2386
2387
  index: u,
2387
2388
  keys: o,
2388
2389
  edits: h,
2389
- prev: r
2390
+ prev: i
2390
2391
  }, s = Array.isArray(p), o = s ? p : (x = n[p.kind]) !== null && x !== void 0 ? x : [], u = -1, h = [], m && y.push(m), m = p;
2391
2392
  }
2392
- } while (r !== void 0);
2393
+ } while (i !== void 0);
2393
2394
  return h.length !== 0 ? h[h.length - 1][1] : e;
2394
2395
  }
2395
- function Ft(e, t) {
2396
+ function wt(e, t) {
2396
2397
  const n = e[t];
2397
2398
  return typeof n == "object" ? n : typeof n == "function" ? {
2398
2399
  enter: n,
@@ -2402,10 +2403,10 @@ function Ft(e, t) {
2402
2403
  leave: e.leave
2403
2404
  };
2404
2405
  }
2405
- function wt(e) {
2406
- return Rt(e, Bt);
2406
+ function $t(e) {
2407
+ return Ft(e, Vt);
2407
2408
  }
2408
- const $t = 80, Bt = {
2409
+ const Bt = 80, Vt = {
2409
2410
  Name: {
2410
2411
  leave: (e) => e.value
2411
2412
  },
@@ -2420,7 +2421,7 @@ const $t = 80, Bt = {
2420
2421
  },
2421
2422
  OperationDefinition: {
2422
2423
  leave(e) {
2423
- const t = te(e.variableDefinitions) ? f(`(
2424
+ const t = re(e.variableDefinitions) ? f(`(
2424
2425
  `, d(e.variableDefinitions, `
2425
2426
  `), `
2426
2427
  )`) : f("(", d(e.variableDefinitions, ", "), ")"), n = f("", e.description, `
@@ -2436,20 +2437,20 @@ const $t = 80, Bt = {
2436
2437
  }
2437
2438
  },
2438
2439
  VariableDefinition: {
2439
- leave: ({ variable: e, type: t, defaultValue: n, directives: i, description: r }) => f("", r, `
2440
- `) + e + ": " + t + f(" = ", n) + f(" ", d(i, " "))
2440
+ leave: ({ variable: e, type: t, defaultValue: n, directives: r, description: i }) => f("", i, `
2441
+ `) + e + ": " + t + f(" = ", n) + f(" ", d(r, " "))
2441
2442
  },
2442
2443
  SelectionSet: {
2443
2444
  leave: ({ selections: e }) => S(e)
2444
2445
  },
2445
2446
  Field: {
2446
- leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
2447
+ leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
2447
2448
  const s = f("", e, ": ") + t;
2448
2449
  let o = s + f("(", d(n, ", "), ")");
2449
- return o.length > $t && (o = s + f(`(
2450
+ return o.length > Bt && (o = s + f(`(
2450
2451
  `, Y(d(n, `
2451
2452
  `)), `
2452
- )`)), d([o, d(i, " "), r], " ");
2453
+ )`)), d([o, d(r, " "), i], " ");
2453
2454
  }
2454
2455
  },
2455
2456
  Argument: {
@@ -2475,13 +2476,13 @@ const $t = 80, Bt = {
2475
2476
  name: e,
2476
2477
  typeCondition: t,
2477
2478
  variableDefinitions: n,
2478
- directives: i,
2479
- selectionSet: r,
2479
+ directives: r,
2480
+ selectionSet: i,
2480
2481
  description: s
2481
2482
  }) => f("", s, `
2482
2483
  `) + // Note: fragment variable definitions are experimental and may be changed
2483
2484
  // or removed in the future.
2484
- `fragment ${e}${f("(", d(n, ", "), ")")} on ${t} ${f("", d(i, " "), " ")}` + r
2485
+ `fragment ${e}${f("(", d(n, ", "), ")")} on ${t} ${f("", d(r, " "), " ")}` + i
2485
2486
  },
2486
2487
  // Value
2487
2488
  IntValue: {
@@ -2491,7 +2492,7 @@ const $t = 80, Bt = {
2491
2492
  leave: ({ value: e }) => e
2492
2493
  },
2493
2494
  StringValue: {
2494
- leave: ({ value: e, block: t }) => t ? ot(e) : Pt(e)
2495
+ leave: ({ value: e, block: t }) => t ? at(e) : St(e)
2495
2496
  },
2496
2497
  BooleanValue: {
2497
2498
  leave: ({ value: e }) => e ? "true" : "false"
@@ -2538,70 +2539,70 @@ const $t = 80, Bt = {
2538
2539
  `) + d(["scalar", t, d(n, " ")], " ")
2539
2540
  },
2540
2541
  ObjectTypeDefinition: {
2541
- leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => f("", e, `
2542
+ leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => f("", e, `
2542
2543
  `) + d(
2543
2544
  [
2544
2545
  "type",
2545
2546
  t,
2546
2547
  f("implements ", d(n, " & ")),
2547
- d(i, " "),
2548
- S(r)
2548
+ d(r, " "),
2549
+ S(i)
2549
2550
  ],
2550
2551
  " "
2551
2552
  )
2552
2553
  },
2553
2554
  FieldDefinition: {
2554
- leave: ({ description: e, name: t, arguments: n, type: i, directives: r }) => f("", e, `
2555
- `) + t + (te(n) ? f(`(
2555
+ leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => f("", e, `
2556
+ `) + t + (re(n) ? f(`(
2556
2557
  `, Y(d(n, `
2557
2558
  `)), `
2558
- )`) : f("(", d(n, ", "), ")")) + ": " + i + f(" ", d(r, " "))
2559
+ )`) : f("(", d(n, ", "), ")")) + ": " + r + f(" ", d(i, " "))
2559
2560
  },
2560
2561
  InputValueDefinition: {
2561
- leave: ({ description: e, name: t, type: n, defaultValue: i, directives: r }) => f("", e, `
2562
+ leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => f("", e, `
2562
2563
  `) + d(
2563
- [t + ": " + n, f("= ", i), d(r, " ")],
2564
+ [t + ": " + n, f("= ", r), d(i, " ")],
2564
2565
  " "
2565
2566
  )
2566
2567
  },
2567
2568
  InterfaceTypeDefinition: {
2568
- leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => f("", e, `
2569
+ leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => f("", e, `
2569
2570
  `) + d(
2570
2571
  [
2571
2572
  "interface",
2572
2573
  t,
2573
2574
  f("implements ", d(n, " & ")),
2574
- d(i, " "),
2575
- S(r)
2575
+ d(r, " "),
2576
+ S(i)
2576
2577
  ],
2577
2578
  " "
2578
2579
  )
2579
2580
  },
2580
2581
  UnionTypeDefinition: {
2581
- leave: ({ description: e, name: t, directives: n, types: i }) => f("", e, `
2582
+ leave: ({ description: e, name: t, directives: n, types: r }) => f("", e, `
2582
2583
  `) + d(
2583
- ["union", t, d(n, " "), f("= ", d(i, " | "))],
2584
+ ["union", t, d(n, " "), f("= ", d(r, " | "))],
2584
2585
  " "
2585
2586
  )
2586
2587
  },
2587
2588
  EnumTypeDefinition: {
2588
- leave: ({ description: e, name: t, directives: n, values: i }) => f("", e, `
2589
- `) + d(["enum", t, d(n, " "), S(i)], " ")
2589
+ leave: ({ description: e, name: t, directives: n, values: r }) => f("", e, `
2590
+ `) + d(["enum", t, d(n, " "), S(r)], " ")
2590
2591
  },
2591
2592
  EnumValueDefinition: {
2592
2593
  leave: ({ description: e, name: t, directives: n }) => f("", e, `
2593
2594
  `) + d([t, d(n, " ")], " ")
2594
2595
  },
2595
2596
  InputObjectTypeDefinition: {
2596
- leave: ({ description: e, name: t, directives: n, fields: i }) => f("", e, `
2597
- `) + d(["input", t, d(n, " "), S(i)], " ")
2597
+ leave: ({ description: e, name: t, directives: n, fields: r }) => f("", e, `
2598
+ `) + d(["input", t, d(n, " "), S(r)], " ")
2598
2599
  },
2599
2600
  DirectiveDefinition: {
2600
- leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => f("", e, `
2601
- `) + "directive @" + t + (te(n) ? f(`(
2601
+ leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => f("", e, `
2602
+ `) + "directive @" + t + (re(n) ? f(`(
2602
2603
  `, Y(d(n, `
2603
2604
  `)), `
2604
- )`) : f("(", d(n, ", "), ")")) + (i ? " repeatable" : "") + " on " + d(r, " | ")
2605
+ )`) : f("(", d(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + d(i, " | ")
2605
2606
  },
2606
2607
  SchemaExtension: {
2607
2608
  leave: ({ directives: e, operationTypes: t }) => d(
@@ -2613,25 +2614,25 @@ const $t = 80, Bt = {
2613
2614
  leave: ({ name: e, directives: t }) => d(["extend scalar", e, d(t, " ")], " ")
2614
2615
  },
2615
2616
  ObjectTypeExtension: {
2616
- leave: ({ name: e, interfaces: t, directives: n, fields: i }) => d(
2617
+ leave: ({ name: e, interfaces: t, directives: n, fields: r }) => d(
2617
2618
  [
2618
2619
  "extend type",
2619
2620
  e,
2620
2621
  f("implements ", d(t, " & ")),
2621
2622
  d(n, " "),
2622
- S(i)
2623
+ S(r)
2623
2624
  ],
2624
2625
  " "
2625
2626
  )
2626
2627
  },
2627
2628
  InterfaceTypeExtension: {
2628
- leave: ({ name: e, interfaces: t, directives: n, fields: i }) => d(
2629
+ leave: ({ name: e, interfaces: t, directives: n, fields: r }) => d(
2629
2630
  [
2630
2631
  "extend interface",
2631
2632
  e,
2632
2633
  f("implements ", d(t, " & ")),
2633
2634
  d(n, " "),
2634
- S(i)
2635
+ S(r)
2635
2636
  ],
2636
2637
  " "
2637
2638
  )
@@ -2672,7 +2673,7 @@ const $t = 80, Bt = {
2672
2673
  };
2673
2674
  function d(e, t = "") {
2674
2675
  var n;
2675
- return (n = e?.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
2676
+ return (n = e?.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
2676
2677
  }
2677
2678
  function S(e) {
2678
2679
  return f(`{
@@ -2687,51 +2688,51 @@ function Y(e) {
2687
2688
  return f(" ", e.replace(/\n/g, `
2688
2689
  `));
2689
2690
  }
2690
- function te(e) {
2691
+ function re(e) {
2691
2692
  var t;
2692
2693
  return (t = e?.some((n) => n.includes(`
2693
2694
  `))) !== null && t !== void 0 ? t : !1;
2694
2695
  }
2695
- var H = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ new Map(), ze = !0, X = !1;
2696
- function je(e) {
2696
+ var H = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Map(), je = !0, K = !1;
2697
+ function Ge(e) {
2697
2698
  return e.replace(/[\s,]+/g, " ").trim();
2698
2699
  }
2699
2700
  function Ut(e) {
2700
- return je(e.source.body.substring(e.start, e.end));
2701
+ return Ge(e.source.body.substring(e.start, e.end));
2701
2702
  }
2702
- function Vt(e) {
2703
+ function Mt(e) {
2703
2704
  var t = /* @__PURE__ */ new Set(), n = [];
2704
- return e.definitions.forEach(function(i) {
2705
- if (i.kind === "FragmentDefinition") {
2706
- var r = i.name.value, s = Ut(i.loc), o = oe.get(r);
2707
- o && !o.has(s) ? ze && console.warn("Warning: fragment with name " + r + ` already exists.
2705
+ return e.definitions.forEach(function(r) {
2706
+ if (r.kind === "FragmentDefinition") {
2707
+ var i = r.name.value, s = Ut(r.loc), o = ce.get(i);
2708
+ o && !o.has(s) ? je && console.warn("Warning: fragment with name " + i + ` already exists.
2708
2709
  graphql-tag enforces all fragment names across your application to be unique; read more about
2709
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || oe.set(r, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(i));
2710
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || ce.set(i, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(r));
2710
2711
  } else
2711
- n.push(i);
2712
- }), J(J({}, e), { definitions: n });
2712
+ n.push(r);
2713
+ }), X(X({}, e), { definitions: n });
2713
2714
  }
2714
- function Mt(e) {
2715
+ function qt(e) {
2715
2716
  var t = new Set(e.definitions);
2716
- t.forEach(function(i) {
2717
- i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
2718
- var s = i[r];
2717
+ t.forEach(function(r) {
2718
+ r.loc && delete r.loc, Object.keys(r).forEach(function(i) {
2719
+ var s = r[i];
2719
2720
  s && typeof s == "object" && t.add(s);
2720
2721
  });
2721
2722
  });
2722
2723
  var n = e.loc;
2723
2724
  return n && (delete n.startToken, delete n.endToken), e;
2724
2725
  }
2725
- function qt(e) {
2726
- var t = je(e);
2726
+ function zt(e) {
2727
+ var t = Ge(e);
2727
2728
  if (!H.has(t)) {
2728
- var n = Nt(e, {
2729
- experimentalFragmentVariables: X,
2730
- allowLegacyFragmentVariables: X
2729
+ var n = Pt(e, {
2730
+ experimentalFragmentVariables: K,
2731
+ allowLegacyFragmentVariables: K
2731
2732
  });
2732
2733
  if (!n || n.kind !== "Document")
2733
2734
  throw new Error("Not a valid GraphQL document.");
2734
- H.set(t, Mt(Vt(n)));
2735
+ H.set(t, qt(Mt(n)));
2735
2736
  }
2736
2737
  return H.get(t);
2737
2738
  }
@@ -2739,35 +2740,35 @@ function E(e) {
2739
2740
  for (var t = [], n = 1; n < arguments.length; n++)
2740
2741
  t[n - 1] = arguments[n];
2741
2742
  typeof e == "string" && (e = [e]);
2742
- var i = e[0];
2743
- return t.forEach(function(r, s) {
2744
- r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += e[s + 1];
2745
- }), qt(i);
2746
- }
2747
- function zt() {
2748
- H.clear(), oe.clear();
2743
+ var r = e[0];
2744
+ return t.forEach(function(i, s) {
2745
+ i && i.kind === "Document" ? r += i.loc.source.body : r += i, r += e[s + 1];
2746
+ }), zt(r);
2749
2747
  }
2750
2748
  function jt() {
2751
- ze = !1;
2749
+ H.clear(), ce.clear();
2752
2750
  }
2753
2751
  function Gt() {
2754
- X = !0;
2752
+ je = !1;
2755
2753
  }
2756
2754
  function Yt() {
2757
- X = !1;
2755
+ K = !0;
2756
+ }
2757
+ function Ht() {
2758
+ K = !1;
2758
2759
  }
2759
- var U = {
2760
+ var V = {
2760
2761
  gql: E,
2761
- resetCaches: zt,
2762
- disableFragmentWarnings: jt,
2763
- enableExperimentalFragmentVariables: Gt,
2764
- disableExperimentalFragmentVariables: Yt
2762
+ resetCaches: jt,
2763
+ disableFragmentWarnings: Gt,
2764
+ enableExperimentalFragmentVariables: Yt,
2765
+ disableExperimentalFragmentVariables: Ht
2765
2766
  };
2766
2767
  (function(e) {
2767
- e.gql = U.gql, e.resetCaches = U.resetCaches, e.disableFragmentWarnings = U.disableFragmentWarnings, e.enableExperimentalFragmentVariables = U.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = U.disableExperimentalFragmentVariables;
2768
+ e.gql = V.gql, e.resetCaches = V.resetCaches, e.disableFragmentWarnings = V.disableFragmentWarnings, e.enableExperimentalFragmentVariables = V.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = V.disableExperimentalFragmentVariables;
2768
2769
  })(E || (E = {}));
2769
2770
  E.default = E;
2770
- const Ht = E`
2771
+ const Qt = E`
2771
2772
  query findActiveOrderById($id: String) {
2772
2773
  findOrder(id: $id) {
2773
2774
  id
@@ -2854,7 +2855,7 @@ const Ht = E`
2854
2855
  }
2855
2856
  }
2856
2857
  }
2857
- `, Qt = E`
2858
+ `, Jt = E`
2858
2859
  mutation addToOrder($orderId: ID!, $productId: ID!, $shopId: ID, $additionalData: AdditionalDataInput, $trackerId: ID, $amount: Int) {
2859
2860
  reserveProduct(
2860
2861
  input: {orderId: $orderId, productId: $productId, additionalData: $additionalData, trackerId: $trackerId, shopId: $shopId, amountToIncrease: $amount}
@@ -2864,7 +2865,7 @@ const Ht = E`
2864
2865
  amountReserved
2865
2866
  }
2866
2867
  }
2867
- `, Jt = E`
2868
+ `, Xt = E`
2868
2869
  mutation removeFromOrder($orderId: ID!, $productId: ID!, $additionalData: AdditionalDataInput, $amount: Int) {
2869
2870
  releaseProduct(
2870
2871
  input: {orderId: $orderId, productId: $productId, additionalData: $additionalData, amountToRelease: $amount}
@@ -2873,7 +2874,7 @@ const Ht = E`
2873
2874
  amountReleased
2874
2875
  }
2875
2876
  }
2876
- `, Xt = E`
2877
+ `, Kt = E`
2877
2878
  mutation configurePackage($orderId: ID!, $packageId: ID!, $amount: Int!, $items: [ReservedItem!]!, $shopId: ID, $trackerId: ID) {
2878
2879
  configurePackage(
2879
2880
  input: {orderId: $orderId, shopId: $shopId, trackerId: $trackerId, packageId: $packageId, amount: $amount, items: $items}
@@ -2883,7 +2884,7 @@ const Ht = E`
2883
2884
  amountReserved
2884
2885
  }
2885
2886
  }
2886
- `, Kt = E`
2887
+ `, Wt = E`
2887
2888
  mutation reserveAdditionalPackageItem($amount: Int!, $orderId: ID!, $packageId: ID!, $eventId: ID!, $packageItemId: ID!) {
2888
2889
  reserveAdditionalPackageItem(
2889
2890
  input: {amount: $amount, eventId: $eventId, orderId: $orderId, packageId: $packageId, packageItemId: $packageItemId}
@@ -2893,56 +2894,56 @@ const Ht = E`
2893
2894
  amountReserved
2894
2895
  }
2895
2896
  }
2896
- `, Wt = E`
2897
+ `, Zt = E`
2897
2898
  mutation configureOrderDeliveryOption($orderId: ID!, $productId: ID) {
2898
2899
  configureDeliveryOption(input: {orderId: $orderId, productId: $productId})
2899
2900
  }
2900
- `, Zt = E`
2901
+ `, en = E`
2901
2902
  mutation createOrderCustomer($orderId: ID!, $countryCode: String, $customer: CreateCustomerInput!) {
2902
2903
  createOrderCustomer(
2903
2904
  input: {id: $orderId, countryCode: $countryCode, customer: $customer}
2904
2905
  )
2905
2906
  }
2906
- `, en = E`
2907
+ `, tn = E`
2907
2908
  mutation deleteOrder($orderId: ID!) {
2908
2909
  cancelOrder(id: $orderId)
2909
2910
  }
2910
- `, tn = (e, t, n, i) => e();
2911
- function nn(e, t = tn) {
2911
+ `, nn = (e, t, n, r) => e();
2912
+ function rn(e, t = nn) {
2912
2913
  return {
2913
- findActiveOrderById(n, i, r) {
2914
- return t((s) => e.request({ document: Ht, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", n);
2914
+ findActiveOrderById(n, r, i) {
2915
+ return t((s) => e.request({ document: Qt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findActiveOrderById", "query", n);
2915
2916
  },
2916
- addToOrder(n, i, r) {
2917
- return t((s) => e.request({ document: Qt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", n);
2917
+ addToOrder(n, r, i) {
2918
+ return t((s) => e.request({ document: Jt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "addToOrder", "mutation", n);
2918
2919
  },
2919
- removeFromOrder(n, i, r) {
2920
- return t((s) => e.request({ document: Jt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", n);
2920
+ removeFromOrder(n, r, i) {
2921
+ return t((s) => e.request({ document: Xt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "removeFromOrder", "mutation", n);
2921
2922
  },
2922
- configurePackage(n, i, r) {
2923
- return t((s) => e.request({ document: Xt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", n);
2923
+ configurePackage(n, r, i) {
2924
+ return t((s) => e.request({ document: Kt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "configurePackage", "mutation", n);
2924
2925
  },
2925
- reserveAdditionalPackageItem(n, i, r) {
2926
- return t((s) => e.request({ document: Kt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", n);
2926
+ reserveAdditionalPackageItem(n, r, i) {
2927
+ return t((s) => e.request({ document: Wt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "reserveAdditionalPackageItem", "mutation", n);
2927
2928
  },
2928
- configureOrderDeliveryOption(n, i, r) {
2929
- return t((s) => e.request({ document: Wt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", n);
2929
+ configureOrderDeliveryOption(n, r, i) {
2930
+ return t((s) => e.request({ document: Zt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "configureOrderDeliveryOption", "mutation", n);
2930
2931
  },
2931
- createOrderCustomer(n, i, r) {
2932
- return t((s) => e.request({ document: Zt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", n);
2932
+ createOrderCustomer(n, r, i) {
2933
+ return t((s) => e.request({ document: en, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "createOrderCustomer", "mutation", n);
2933
2934
  },
2934
- deleteOrder(n, i, r) {
2935
- return t((s) => e.request({ document: en, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", n);
2935
+ deleteOrder(n, r, i) {
2936
+ return t((s) => e.request({ document: tn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "deleteOrder", "mutation", n);
2936
2937
  }
2937
2938
  };
2938
2939
  }
2939
- const ge = {
2940
+ const Ie = {
2940
2941
  order: null,
2941
2942
  processing: !1,
2942
2943
  error: null
2943
- }, Ge = He({
2944
+ }, Ye = Qe({
2944
2945
  name: "basket",
2945
- initialState: ge,
2946
+ initialState: Ie,
2946
2947
  reducers: {
2947
2948
  setProcessing: (e, t) => {
2948
2949
  e.processing = t.payload;
@@ -2962,18 +2963,18 @@ const ge = {
2962
2963
  });
2963
2964
  },
2964
2965
  addProduct: (e, t) => {
2965
- const { input: n, amountReserved: i, expiredAt: r } = t.payload;
2966
+ const { input: n, amountReserved: r, expiredAt: i } = t.payload;
2966
2967
  if (!e.order)
2967
2968
  return;
2968
2969
  const s = e.order.items.findIndex((o) => n.seat ? o.id === n.id && o.seats?.some((u) => u.id === n.seat?.id) : o.id === n.id);
2969
2970
  if (s >= 0)
2970
- e.order.items[s].amount += i;
2971
+ e.order.items[s].amount += r;
2971
2972
  else {
2972
2973
  const o = {
2973
2974
  id: n.id,
2974
2975
  type: "PRODUCT",
2975
2976
  name: n.name,
2976
- amount: i,
2977
+ amount: r,
2977
2978
  price: n.price,
2978
2979
  depositPrice: n.depositPrice,
2979
2980
  serviceFee: n.serviceFee,
@@ -2982,40 +2983,40 @@ const ge = {
2982
2983
  };
2983
2984
  e.order.items.push(o);
2984
2985
  }
2985
- e.order.expiredAt = r;
2986
+ e.order.expiredAt = i;
2986
2987
  },
2987
2988
  removeProduct: (e, t) => {
2988
2989
  if (!e.order) return;
2989
- const { id: n, amountReleased: i, seatId: r } = t.payload, s = e.order.items.findIndex(
2990
+ const { id: n, amountReleased: r, seatId: i } = t.payload, s = e.order.items.findIndex(
2990
2991
  (o) => o.type === "PRODUCT" && o.id === n
2991
2992
  );
2992
2993
  if (s !== -1) {
2993
2994
  const o = e.order.items[s];
2994
- if (o.amount -= i, o.amount <= 0)
2995
+ if (o.amount -= r, o.amount <= 0)
2995
2996
  e.order.items.splice(s, 1);
2996
- else if (o.seats && r) {
2997
- const u = o.seats.findIndex((h) => h.id === r);
2997
+ else if (o.seats && i) {
2998
+ const u = o.seats.findIndex((h) => h.id === i);
2998
2999
  u !== -1 && o.seats.splice(u, 1);
2999
3000
  }
3000
3001
  }
3001
3002
  e.order.items.length === 0 && (e.order = null);
3002
3003
  },
3003
3004
  configurePackage: (e, t) => {
3004
- const { input: n, amountReserved: i, expiredAt: r } = t.payload;
3005
+ const { input: n, amountReserved: r, expiredAt: i } = t.payload;
3005
3006
  e.order || (e.order = {
3006
3007
  id: "",
3007
3008
  currency: n.currency,
3008
3009
  items: [],
3009
- expiredAt: r
3010
+ expiredAt: i
3010
3011
  });
3011
3012
  const s = e.order.items.find(
3012
3013
  (o) => o.type === "PACKAGE" && o.id === n.id
3013
3014
  );
3014
- s ? (s.amount = i, s.packageItems = n.items) : e.order.items.push({
3015
+ s ? (s.amount = r, s.packageItems = n.items) : e.order.items.push({
3015
3016
  id: n.id,
3016
3017
  type: "PACKAGE",
3017
3018
  name: n.name,
3018
- amount: i,
3019
+ amount: r,
3019
3020
  price: n.discountPrice ?? n.price,
3020
3021
  depositPrice: n.depositPrice,
3021
3022
  originalPrice: n.price,
@@ -3024,17 +3025,17 @@ const ge = {
3024
3025
  });
3025
3026
  },
3026
3027
  reserveAdditionalPackageItem: (e, t) => {
3027
- const { input: n, amountReserved: i, expiredAt: r } = t.payload;
3028
+ const { input: n, amountReserved: r, expiredAt: i } = t.payload;
3028
3029
  e.order || (e.order = {
3029
3030
  id: "",
3030
3031
  currency: n.currency,
3031
3032
  items: [],
3032
- expiredAt: r
3033
+ expiredAt: i
3033
3034
  });
3034
3035
  const s = e.order.items.findIndex(
3035
3036
  (u) => u.id === n.packageItemId
3036
3037
  ), o = e.order.items[s];
3037
- o ? (o.amount = i, o.packageItems = [
3038
+ o ? (o.amount = r, o.packageItems = [
3038
3039
  {
3039
3040
  packageItemId: n.packageItemId,
3040
3041
  eventId: n.eventId,
@@ -3046,7 +3047,7 @@ const ge = {
3046
3047
  id: n.packageItemId,
3047
3048
  type: _.ADD_ONS,
3048
3049
  name: n.name,
3049
- amount: i,
3050
+ amount: r,
3050
3051
  price: n.discountPrice ?? n.price,
3051
3052
  depositPrice: n.depositPrice,
3052
3053
  originalPrice: n.price,
@@ -3064,13 +3065,13 @@ const ge = {
3064
3065
  },
3065
3066
  configureDelivery: (e, t) => {
3066
3067
  if (!e.order) return;
3067
- const n = t.payload, i = e.order.items.findIndex(
3068
- (r) => r.type === "DELIVERY"
3068
+ const n = t.payload, r = e.order.items.findIndex(
3069
+ (i) => i.type === "DELIVERY"
3069
3070
  );
3070
3071
  if (n)
3071
- if (i !== -1) {
3072
- const r = e.order.items[i];
3073
- r.id = n.id, r.name = n.name, r.price = n.price, r.serviceFee = n.serviceFee;
3072
+ if (r !== -1) {
3073
+ const i = e.order.items[r];
3074
+ i.id = n.id, i.name = n.name, i.price = n.price, i.serviceFee = n.serviceFee;
3074
3075
  } else
3075
3076
  e.order.items.push({
3076
3077
  id: n.id,
@@ -3081,35 +3082,35 @@ const ge = {
3081
3082
  originalPrice: n.price,
3082
3083
  serviceFee: n.serviceFee
3083
3084
  });
3084
- else i !== -1 && e.order.items.splice(i, 1);
3085
+ else r !== -1 && e.order.items.splice(r, 1);
3085
3086
  },
3086
3087
  configureCustomer: (e, t) => {
3087
3088
  e.order && (e.order.customer = t.payload);
3088
3089
  },
3089
- clearBasket: () => ge
3090
+ clearBasket: () => Ie
3090
3091
  }
3091
3092
  }), {
3092
3093
  setProcessing: C,
3093
3094
  initializeOrder: j,
3094
- addProduct: Ie,
3095
- removeProduct: rn,
3096
- configurePackage: Ee,
3097
- configureDelivery: sn,
3098
- configureCustomer: ye,
3099
- reserveAdditionalPackageItem: on,
3100
- clearBasket: ve
3101
- } = Ge.actions;
3102
- class an {
3095
+ addProduct: Ee,
3096
+ removeProduct: sn,
3097
+ configurePackage: ye,
3098
+ configureDelivery: on,
3099
+ configureCustomer: ve,
3100
+ reserveAdditionalPackageItem: an,
3101
+ clearBasket: Ae
3102
+ } = Ye.actions;
3103
+ class cn {
3103
3104
  orderIdKey = "ORDER_ID";
3104
3105
  config;
3105
3106
  sdk;
3106
3107
  store;
3107
3108
  constructor(t) {
3108
- this.config = t, this.store = Qe({
3109
+ this.config = t, this.store = Je({
3109
3110
  reducer: {
3110
- basket: Ge.reducer
3111
+ basket: Ye.reducer
3111
3112
  }
3112
- }), this.sdk = nn(new ae(t.apiUrl)), this.restoreOrderFromSession().then(() => {
3113
+ }), this.sdk = rn(new de(t.apiUrl)), this.restoreOrderFromSession().then(() => {
3113
3114
  this.debugLog("Restore order from session");
3114
3115
  });
3115
3116
  }
@@ -3121,29 +3122,29 @@ class an {
3121
3122
  const t = this.getState();
3122
3123
  if (!t.order)
3123
3124
  return null;
3124
- const n = t.order.items.reduce((i, r) => i + (r.amount || 0), 0);
3125
+ const n = t.order.items.reduce((r, i) => r + (i.amount || 0), 0);
3125
3126
  return {
3126
3127
  ...t.order,
3127
3128
  count: n
3128
3129
  };
3129
3130
  }
3130
3131
  getSelectedPackageEvent() {
3131
- return this.getState().order?.items.flatMap((n) => n.packageItems?.map((i) => i.eventId) ?? []) ?? [];
3132
+ return this.getState().order?.items.flatMap((n) => n.packageItems?.map((r) => r.eventId) ?? []) ?? [];
3132
3133
  }
3133
3134
  // Basket update functions
3134
3135
  async addProduct(t) {
3135
3136
  this.store.dispatch(C(!0));
3136
3137
  try {
3137
- const i = this.getState().order?.id ?? sessionStorage.getItem(this.orderIdKey) ?? this.generateOrderId();
3138
+ const r = this.getState().order?.id ?? sessionStorage.getItem(this.orderIdKey) ?? this.generateOrderId();
3138
3139
  this.debugLog("Adding product", {
3139
3140
  productId: t.id,
3140
- orderId: i,
3141
+ orderId: r,
3141
3142
  amount: t.amount,
3142
3143
  seat: t.seat
3143
3144
  });
3144
- const r = await this.sdk.addToOrder({
3145
+ const i = await this.sdk.addToOrder({
3145
3146
  productId: t.id,
3146
- orderId: i,
3147
+ orderId: r,
3147
3148
  additionalData: t.seat ? {
3148
3149
  seat: {
3149
3150
  seatId: t.seat.id,
@@ -3155,16 +3156,16 @@ class an {
3155
3156
  shopId: this.config.shopId,
3156
3157
  amount: t.amount
3157
3158
  });
3158
- if (r?.reserveProduct) {
3159
- const { orderId: s, expiredAt: o, amountReserved: u } = r.reserveProduct;
3160
- this.debugLog("Product added successfully", r.reserveProduct), sessionStorage.setItem(this.orderIdKey, i), this.store.dispatch(
3159
+ if (i?.reserveProduct) {
3160
+ const { orderId: s, expiredAt: o, amountReserved: u } = i.reserveProduct;
3161
+ this.debugLog("Product added successfully", i.reserveProduct), sessionStorage.setItem(this.orderIdKey, r), this.store.dispatch(
3161
3162
  j({
3162
3163
  id: s,
3163
3164
  currency: t.currency,
3164
3165
  expiredAt: o
3165
3166
  })
3166
3167
  ), this.store.dispatch(
3167
- Ie({
3168
+ Ee({
3168
3169
  input: t,
3169
3170
  amountReserved: u,
3170
3171
  expiredAt: o
@@ -3178,18 +3179,18 @@ class an {
3178
3179
  }
3179
3180
  }
3180
3181
  async removeProduct(t) {
3181
- const i = this.getState().order;
3182
- if (i) {
3182
+ const r = this.getState().order;
3183
+ if (r) {
3183
3184
  this.store.dispatch(C(!0));
3184
3185
  try {
3185
3186
  this.debugLog("Removing product", {
3186
3187
  productId: t.id,
3187
- orderId: i.id,
3188
+ orderId: r.id,
3188
3189
  amount: t.amount
3189
3190
  });
3190
- const r = await this.sdk.removeFromOrder({
3191
+ const i = await this.sdk.removeFromOrder({
3191
3192
  productId: t.id,
3192
- orderId: i.id,
3193
+ orderId: r.id,
3193
3194
  additionalData: t.seat ? {
3194
3195
  seat: {
3195
3196
  seatId: t.seat.id,
@@ -3198,10 +3199,10 @@ class an {
3198
3199
  } : null,
3199
3200
  amount: t.amount
3200
3201
  });
3201
- if (r?.releaseProduct) {
3202
- const { amountReleased: s } = r.releaseProduct;
3203
- this.debugLog("Product removed successfully", r.releaseProduct), this.store.dispatch(
3204
- rn({
3202
+ if (i?.releaseProduct) {
3203
+ const { amountReleased: s } = i.releaseProduct;
3204
+ this.debugLog("Product removed successfully", i.releaseProduct), this.store.dispatch(
3205
+ sn({
3205
3206
  id: t.id,
3206
3207
  amountReleased: s,
3207
3208
  seatId: t.seat?.id
@@ -3210,8 +3211,8 @@ class an {
3210
3211
  const o = this.getState();
3211
3212
  (!o.order || o.order.items.length === 0) && (this.debugLog("Basket is now empty, cancelling order and clearing session"), this.clearOrderFromSession());
3212
3213
  }
3213
- } catch (r) {
3214
- throw this.debugLog("Error removing product", r), this.handleError(r), r;
3214
+ } catch (i) {
3215
+ throw this.debugLog("Error removing product", i), this.handleError(i), i;
3215
3216
  } finally {
3216
3217
  this.store.dispatch(C(!1));
3217
3218
  }
@@ -3220,35 +3221,35 @@ class an {
3220
3221
  async configurePackage(t) {
3221
3222
  this.store.dispatch(C(!0));
3222
3223
  try {
3223
- const i = this.store.getState().basket.order?.id ?? sessionStorage.getItem(this.orderIdKey) ?? this.generateOrderId(), r = t.items.map((o) => ({
3224
+ const r = this.store.getState().basket.order?.id ?? sessionStorage.getItem(this.orderIdKey) ?? this.generateOrderId(), i = t.items.map((o) => ({
3224
3225
  packageItemId: o.packageItemId,
3225
3226
  eventId: o.eventId
3226
3227
  }));
3227
3228
  this.debugLog("Configuring package", {
3228
3229
  packageId: t.id,
3229
- orderId: i,
3230
+ orderId: r,
3230
3231
  amount: t.amount,
3231
- items: r,
3232
+ items: i,
3232
3233
  shopId: this.config.shopId
3233
3234
  });
3234
3235
  const s = await this.sdk.configurePackage({
3235
3236
  trackerId: this.config.trackerId,
3236
3237
  shopId: this.config.shopId,
3237
3238
  packageId: t.id,
3238
- orderId: i,
3239
+ orderId: r,
3239
3240
  amount: t.amount,
3240
- items: r
3241
+ items: i
3241
3242
  });
3242
3243
  if (this.debugLog("Configure package response", s), s?.configurePackage && s.configurePackage.amountReserved > 0) {
3243
3244
  const { orderId: o, expiredAt: u, amountReserved: h } = s.configurePackage;
3244
- return h === 0 && (this.debugLog("Basket is now empty, cancelling order and clearing session"), this.clearOrderFromSession()), this.debugLog("Package configured successfully"), sessionStorage.setItem(this.orderIdKey, i), this.store.dispatch(
3245
+ return h === 0 && (this.debugLog("Basket is now empty, cancelling order and clearing session"), this.clearOrderFromSession()), this.debugLog("Package configured successfully"), sessionStorage.setItem(this.orderIdKey, r), this.store.dispatch(
3245
3246
  j({
3246
3247
  id: o,
3247
3248
  currency: t.currency,
3248
3249
  expiredAt: u
3249
3250
  })
3250
3251
  ), this.store.dispatch(
3251
- Ee({
3252
+ ye({
3252
3253
  input: t,
3253
3254
  amountReserved: h,
3254
3255
  expiredAt: u
@@ -3265,7 +3266,7 @@ class an {
3265
3266
  async configureDelivery(t) {
3266
3267
  this.store.dispatch(C(!0));
3267
3268
  try {
3268
- this.store.dispatch(sn(t));
3269
+ this.store.dispatch(on(t));
3269
3270
  } catch (n) {
3270
3271
  throw this.debugLog("Error setting delivery", n), this.handleError(n), n;
3271
3272
  } finally {
@@ -3273,48 +3274,48 @@ class an {
3273
3274
  }
3274
3275
  }
3275
3276
  async configureCustomer(t) {
3276
- const i = this.getState().order;
3277
- if (!i)
3277
+ const r = this.getState().order;
3278
+ if (!r)
3278
3279
  throw new Error("No active order. Add items to basket first.");
3279
- this.debugLog("Creating/replacing customer", { orderId: i.id, email: t.email });
3280
+ this.debugLog("Creating/replacing customer", { orderId: r.id, email: t.email });
3280
3281
  try {
3281
- const r = await this.sdk.createOrderCustomer({
3282
- orderId: i.id,
3282
+ const i = await this.sdk.createOrderCustomer({
3283
+ orderId: r.id,
3283
3284
  customer: t
3284
3285
  });
3285
- this.debugLog("Customer set successfully", r), this.store.dispatch(ye(t));
3286
- } catch (r) {
3287
- throw this.debugLog("Failed to set customer", r), new Error(`Failed to set customer: ${r.message}`);
3286
+ this.debugLog("Customer set successfully", i), this.store.dispatch(ve(t));
3287
+ } catch (i) {
3288
+ throw this.debugLog("Failed to set customer", i), new Error(`Failed to set customer: ${i.message}`);
3288
3289
  }
3289
3290
  }
3290
3291
  async reserveAdditionalPackageItem(t) {
3291
3292
  this.store.dispatch(C(!0));
3292
3293
  try {
3293
- const i = this.store.getState().basket.order?.id ?? sessionStorage.getItem(this.orderIdKey) ?? this.generateOrderId();
3294
+ const r = this.store.getState().basket.order?.id ?? sessionStorage.getItem(this.orderIdKey) ?? this.generateOrderId();
3294
3295
  this.debugLog("reserve additional packageItem", {
3295
- orderId: i,
3296
+ orderId: r,
3296
3297
  eventId: t.eventId,
3297
3298
  amount: t.amount,
3298
3299
  packageId: t.packageId,
3299
3300
  packageItemId: t.packageItemId
3300
3301
  });
3301
- const r = await this.sdk.reserveAdditionalPackageItem({
3302
- orderId: i,
3302
+ const i = await this.sdk.reserveAdditionalPackageItem({
3303
+ orderId: r,
3303
3304
  eventId: t.eventId,
3304
3305
  amount: t.amount,
3305
3306
  packageId: t.packageId,
3306
3307
  packageItemId: t.packageItemId
3307
3308
  });
3308
- if (this.debugLog("reserve additional packageItem", r), r?.reserveAdditionalPackageItem && r.reserveAdditionalPackageItem.amountReserved > 0) {
3309
- const { orderId: s, expiredAt: o, amountReserved: u } = r.reserveAdditionalPackageItem;
3310
- return this.debugLog("Reserve configured successfully"), sessionStorage.setItem(this.orderIdKey, i), this.store.dispatch(
3309
+ if (this.debugLog("reserve additional packageItem", i), i?.reserveAdditionalPackageItem && i.reserveAdditionalPackageItem.amountReserved > 0) {
3310
+ const { orderId: s, expiredAt: o, amountReserved: u } = i.reserveAdditionalPackageItem;
3311
+ return this.debugLog("Reserve configured successfully"), sessionStorage.setItem(this.orderIdKey, r), this.store.dispatch(
3311
3312
  j({
3312
3313
  id: s,
3313
3314
  currency: t.currency,
3314
3315
  expiredAt: o
3315
3316
  })
3316
3317
  ), this.store.dispatch(
3317
- on({
3318
+ an({
3318
3319
  input: t,
3319
3320
  amountReserved: u,
3320
3321
  expiredAt: o
@@ -3334,7 +3335,7 @@ class an {
3334
3335
  t && (this.debugLog("Cancelling order", { orderId: t }), await this.sdk.deleteOrder({ orderId: t }), this.clearOrderFromSession(), this.debugLog("Order cancelled successfully"));
3335
3336
  }
3336
3337
  clearOrderFromSession() {
3337
- this.debugLog("Clearing order from session"), sessionStorage.removeItem(this.orderIdKey), this.store.dispatch(ve());
3338
+ this.debugLog("Clearing order from session"), sessionStorage.removeItem(this.orderIdKey), this.store.dispatch(Ae());
3338
3339
  }
3339
3340
  // Private functions for fetching the current order from a session
3340
3341
  async restoreOrderFromSession() {
@@ -3356,9 +3357,9 @@ class an {
3356
3357
  this.debugLog("Order not found"), this.clearOrderFromSession();
3357
3358
  return;
3358
3359
  }
3359
- const i = n.findOrder;
3360
- this.debugLog("Order fetched successfully", i);
3361
- const r = i.items, s = r.filter((c) => c.product != null && c.amount > 0).map((c) => {
3360
+ const r = n.findOrder;
3361
+ this.debugLog("Order fetched successfully", r);
3362
+ const i = r.items, s = i.filter((c) => c.product != null && c.amount > 0).map((c) => {
3362
3363
  let m = _.PRODUCT;
3363
3364
  return c.product.type === "PROMOTER" ? m = _.ADD_ONS : c.product.type === "PICKUP" ? m = _.PICKUP : c.product.type === "DELIVERY" && (m = _.DELIVERY), {
3364
3365
  id: c.product.id,
@@ -3376,24 +3377,24 @@ class an {
3376
3377
  label: g.label
3377
3378
  }))
3378
3379
  };
3379
- }), o = r.filter((c) => c.packageItem != null && c.amount > 0).reduce((c, m) => {
3380
+ }), o = i.filter((c) => c.packageItem != null && c.amount > 0).reduce((c, m) => {
3380
3381
  const {
3381
3382
  packageItem: g,
3382
3383
  event: y,
3383
3384
  amount: I,
3384
- price: O,
3385
+ price: T,
3385
3386
  serviceFee: x,
3386
- depositPrice: k,
3387
+ depositPrice: O,
3387
3388
  originalPrice: L
3388
- } = m, T = g.package.id;
3389
- c[T] ? (c[T].price += O ?? 0, c[T].serviceFee += x ?? 0, c[T].originalPrice += L ?? 0, c[T].depositPrice += k ?? O ?? 0) : c[T] = {
3390
- id: T,
3389
+ } = m, k = g.package.id;
3390
+ c[k] ? (c[k].price += T ?? 0, c[k].serviceFee += x ?? 0, c[k].originalPrice += L ?? 0, c[k].depositPrice += O ?? T ?? 0) : c[k] = {
3391
+ id: k,
3391
3392
  type: _.PACKAGE,
3392
3393
  name: g.package.name,
3393
3394
  amount: I,
3394
- price: O ?? 0,
3395
+ price: T ?? 0,
3395
3396
  serviceFee: x ?? 0,
3396
- depositPrice: k ?? O ?? 0,
3397
+ depositPrice: O ?? T ?? 0,
3397
3398
  originalPrice: L ?? 0,
3398
3399
  packageItems: []
3399
3400
  };
@@ -3402,7 +3403,7 @@ class an {
3402
3403
  }), D = R.fromISO(y.endAt, {
3403
3404
  zone: y.timezone
3404
3405
  });
3405
- return c[T].packageItems.push({
3406
+ return c[k].packageItems.push({
3406
3407
  packageItemId: g.id,
3407
3408
  eventId: y.id,
3408
3409
  name: y.name,
@@ -3417,25 +3418,25 @@ class an {
3417
3418
  this.debugLog("All order items have zero or negative amounts, clearing session"), this.clearOrderFromSession();
3418
3419
  return;
3419
3420
  }
3420
- const h = r.filter((c) => c.amount > 0).map((c) => new Date(c.expiredAt).getTime());
3421
+ const h = i.filter((c) => c.amount > 0).map((c) => new Date(c.expiredAt).getTime());
3421
3422
  if (h.length === 0) {
3422
3423
  this.debugLog("No valid items with expiration times, clearing session"), this.clearOrderFromSession();
3423
3424
  return;
3424
3425
  }
3425
3426
  const p = R.fromMillis(Math.min(...h));
3426
- this.store.dispatch(ve()), this.store.dispatch(
3427
+ this.store.dispatch(Ae()), this.store.dispatch(
3427
3428
  j({
3428
- id: i.id,
3429
- currency: i.currency,
3429
+ id: r.id,
3430
+ currency: r.currency,
3430
3431
  expiredAt: p.toJSDate().toISOString()
3431
3432
  })
3432
3433
  ), u.forEach((c) => {
3433
3434
  c.type === _.PACKAGE ? this.store.dispatch(
3434
- Ee({
3435
+ ye({
3435
3436
  input: {
3436
3437
  id: c.id,
3437
3438
  name: c.name,
3438
- currency: i.currency,
3439
+ currency: r.currency,
3439
3440
  price: c.originalPrice ?? 0,
3440
3441
  depositPrice: c.depositPrice,
3441
3442
  discountPrice: (c.price ?? 0) < (c.originalPrice ?? 0) ? c.price : void 0,
@@ -3447,7 +3448,7 @@ class an {
3447
3448
  expiredAt: p.toJSDate().toISOString()
3448
3449
  })
3449
3450
  ) : this.store.dispatch(
3450
- Ie({
3451
+ Ee({
3451
3452
  input: {
3452
3453
  id: c.id,
3453
3454
  name: c.name,
@@ -3455,22 +3456,22 @@ class an {
3455
3456
  depositPrice: c.depositPrice,
3456
3457
  discountPrice: (c.price ?? 0) < (c.originalPrice ?? 0) ? c.price : void 0,
3457
3458
  serviceFee: c.serviceFee,
3458
- currency: i.currency,
3459
+ currency: r.currency,
3459
3460
  amount: c.amount
3460
3461
  },
3461
3462
  amountReserved: c.amount,
3462
3463
  expiredAt: p.toJSDate().toISOString()
3463
3464
  })
3464
3465
  );
3465
- }), i.mainBooker && (this.debugLog("Order has customer (mainBooker)", i.mainBooker), this.store.dispatch(
3466
- ye({
3467
- firstName: i.mainBooker.firstName ?? void 0,
3468
- lastName: i.mainBooker.lastName ?? void 0,
3469
- email: i.mainBooker.email ?? void 0,
3470
- age: i.mainBooker.age ?? void 0,
3471
- gender: i.mainBooker.gender ?? void 0,
3472
- residence: i.mainBooker.residence ?? void 0,
3473
- extraInfo: i.mainBooker.extraInfo ?? void 0
3466
+ }), r.mainBooker && (this.debugLog("Order has customer (mainBooker)", r.mainBooker), this.store.dispatch(
3467
+ ve({
3468
+ firstName: r.mainBooker.firstName ?? void 0,
3469
+ lastName: r.mainBooker.lastName ?? void 0,
3470
+ email: r.mainBooker.email ?? void 0,
3471
+ age: r.mainBooker.age ?? void 0,
3472
+ gender: r.mainBooker.gender ?? void 0,
3473
+ residence: r.mainBooker.residence ?? void 0,
3474
+ extraInfo: r.mainBooker.extraInfo ?? void 0
3474
3475
  })
3475
3476
  )), this.debugLog("Order state fully synced", this.getState());
3476
3477
  } catch (n) {
@@ -3490,19 +3491,19 @@ class an {
3490
3491
  handleError(t) {
3491
3492
  const n = t;
3492
3493
  if (n.graphQLErrors && n.graphQLErrors.length > 0) {
3493
- const i = n.graphQLErrors[0];
3494
- i.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), i.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
3494
+ const r = n.graphQLErrors[0];
3495
+ r.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), r.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
3495
3496
  }
3496
3497
  if (n.response?.errors && n.response.errors.length > 0) {
3497
- const i = n.response.errors[0];
3498
- console.error("GraphQL Error:", i.message), i.extensions?.code && console.error("Error Code:", i.extensions.code);
3498
+ const r = n.response.errors[0];
3499
+ console.error("GraphQL Error:", r.message), r.extensions?.code && console.error("Error Code:", r.extensions.code);
3499
3500
  }
3500
3501
  }
3501
3502
  getState() {
3502
3503
  return this.store.getState().basket;
3503
3504
  }
3504
3505
  }
3505
- const cn = E`
3506
+ const dn = E`
3506
3507
  query EventOverviewPage($organizationId: ID!, $hostingIds: [String!], $trackerId: String, $filterEventStatuses: [EventStatus!], $dateRange: DateRangeInput, $page: PageInput, $sorts: [SortInput!], $searchTerm: String, $priceRange: PriceRangeInput) {
3507
3508
  findAllPublicEventByOrganizationId(
3508
3509
  id: $organizationId
@@ -3540,7 +3541,7 @@ const cn = E`
3540
3541
  count
3541
3542
  }
3542
3543
  }
3543
- `, dn = E`
3544
+ `, un = E`
3544
3545
  query EventDetailPage($eventId: ID!) {
3545
3546
  findPublicEventById(id: $eventId) {
3546
3547
  id
@@ -3567,7 +3568,7 @@ const cn = E`
3567
3568
  startingPrice
3568
3569
  }
3569
3570
  }
3570
- `, un = E`
3571
+ `, ln = E`
3571
3572
  query findProductsByEventId($eventId: ID!, $promoCode: String, $trackerId: String, $productTypes: [ProductType!]) {
3572
3573
  findPublicProductsByEventId(
3573
3574
  eventId: $eventId
@@ -3601,30 +3602,30 @@ const cn = E`
3601
3602
  showEndSalesAtTag
3602
3603
  }
3603
3604
  }
3604
- `, ln = (e, t, n, i) => e();
3605
- function pn(e, t = ln) {
3605
+ `, pn = (e, t, n, r) => e();
3606
+ function hn(e, t = pn) {
3606
3607
  return {
3607
- EventOverviewPage(n, i, r) {
3608
- return t((s) => e.request({ document: cn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", n);
3608
+ EventOverviewPage(n, r, i) {
3609
+ return t((s) => e.request({ document: dn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "EventOverviewPage", "query", n);
3609
3610
  },
3610
- EventDetailPage(n, i, r) {
3611
- return t((s) => e.request({ document: dn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", n);
3611
+ EventDetailPage(n, r, i) {
3612
+ return t((s) => e.request({ document: un, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "EventDetailPage", "query", n);
3612
3613
  },
3613
- findProductsByEventId(n, i, r) {
3614
- return t((s) => e.request({ document: un, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", n);
3614
+ findProductsByEventId(n, r, i) {
3615
+ return t((s) => e.request({ document: ln, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findProductsByEventId", "query", n);
3615
3616
  }
3616
3617
  };
3617
3618
  }
3618
- function hn(e) {
3619
+ function fn(e) {
3619
3620
  const t = /(query|mutation|subscription)\s+(\w+)/.exec(e);
3620
3621
  if (!t) return { type: "unknown" };
3621
- const n = t[1], i = t[2];
3622
- return { type: n, name: i };
3622
+ const n = t[1], r = t[2];
3623
+ return { type: n, name: r };
3623
3624
  }
3624
- async function fn(e) {
3625
+ async function mn(e) {
3625
3626
  if (typeof globalThis < "u" && globalThis.crypto?.subtle) {
3626
- const n = new TextEncoder().encode(e), i = await globalThis.crypto.subtle.digest("SHA-256", n);
3627
- return Array.from(new Uint8Array(i)).map((r) => r.toString(16).padStart(2, "0")).join("");
3627
+ const n = new TextEncoder().encode(e), r = await globalThis.crypto.subtle.digest("SHA-256", n);
3628
+ return Array.from(new Uint8Array(r)).map((i) => i.toString(16).padStart(2, "0")).join("");
3628
3629
  }
3629
3630
  try {
3630
3631
  const { createHash: t } = await import("./__vite-browser-external-l0sNRNKZ.js");
@@ -3633,80 +3634,80 @@ async function fn(e) {
3633
3634
  throw new Error("SHA-256 is not available in this environment");
3634
3635
  }
3635
3636
  }
3636
- function mn(e) {
3637
+ function gn(e) {
3637
3638
  const t = { "content-type": "application/json" };
3638
3639
  if (e)
3639
- for (const [n, i] of Object.entries(e))
3640
- typeof i < "u" && (t[n] = String(i));
3640
+ for (const [n, r] of Object.entries(e))
3641
+ typeof r < "u" && (t[n] = String(r));
3641
3642
  return t;
3642
3643
  }
3643
- function Ae(e, t) {
3644
+ function ke(e, t) {
3644
3645
  return e?.length ? e.some((n) => t.includes(n?.extensions?.code) || t.includes(n?.message)) : !1;
3645
3646
  }
3646
- function Te(e, t, n, i, r) {
3647
+ function Te(e, t, n, r, i) {
3647
3648
  const s = new Error(e);
3648
- return s.response = { data: r.json?.data, errors: r.json?.errors, status: r.status }, s.request = { query: t, variables: n, operationName: i }, s.graphQLErrors = r.json?.errors, s;
3649
+ return s.response = { data: i.json?.data, errors: i.json?.errors, status: i.status }, s.request = { query: t, variables: n, operationName: r }, s.graphQLErrors = i.json?.errors, s;
3649
3650
  }
3650
- function ne(e, t, n, i, r) {
3651
- if (r.json?.errors?.length)
3652
- throw Te(`GraphQL request failed${e ? ` (${e})` : ""}`, t, n, i, r);
3653
- if (typeof r.json?.data > "u")
3654
- throw Te("GraphQL request failed: no data received", t, n, i, r);
3655
- return r.json.data;
3651
+ function ie(e, t, n, r, i) {
3652
+ if (i.json?.errors?.length)
3653
+ throw Te(`GraphQL request failed${e ? ` (${e})` : ""}`, t, n, r, i);
3654
+ if (typeof i.json?.data > "u")
3655
+ throw Te("GraphQL request failed: no data received", t, n, r, i);
3656
+ return i.json.data;
3656
3657
  }
3657
- class ue extends ae {
3658
+ class ee extends de {
3658
3659
  async request(t, ...n) {
3659
- let i = t, r, s, o;
3660
- t && typeof t == "object" && "document" in t ? (i = t.document, r = t.variables, s = t.requestHeaders, o = t.signal) : (r = n[0], s = n[1]);
3661
- const u = typeof i == "string" ? i : wt(i), { type: h, name: p } = hn(u), c = await fn(u), m = r ?? {}, g = this.url ?? this.endpoint ?? "", y = mn(s), I = async (D) => {
3662
- const b = await fetch(g, { method: "POST", headers: y, body: JSON.stringify(D), signal: o });
3663
- let P = null;
3660
+ let r = t, i, s, o;
3661
+ t && typeof t == "object" && "document" in t ? (r = t.document, i = t.variables, s = t.requestHeaders, o = t.signal) : (i = n[0], s = n[1]);
3662
+ const u = typeof r == "string" ? r : $t(r), { type: h, name: p } = fn(u), c = await mn(u), m = i ?? {}, g = this.url ?? this.endpoint ?? "", y = gn(s), I = async (D) => {
3663
+ const P = await fetch(g, { method: "POST", headers: y, body: JSON.stringify(D), signal: o });
3664
+ let b = null;
3664
3665
  try {
3665
- P = await b.json();
3666
+ b = await P.json();
3666
3667
  } catch {
3667
- P = null;
3668
+ b = null;
3668
3669
  }
3669
- return { status: b.status, json: P };
3670
- }, O = async (D) => {
3671
- const b = new URLSearchParams();
3672
- for (const [Ye, q] of Object.entries(D))
3673
- typeof q > "u" || b.set(Ye, typeof q == "string" ? q : JSON.stringify(q));
3674
- const P = g.includes("?") ? "&" : "?", B = `${g}${P}${b.toString()}`, le = await fetch(B, { method: "GET", headers: y, signal: o });
3675
- let Z = null;
3670
+ return { status: P.status, json: b };
3671
+ }, T = async (D) => {
3672
+ const P = new URLSearchParams();
3673
+ for (const [He, q] of Object.entries(D))
3674
+ typeof q > "u" || P.set(He, typeof q == "string" ? q : JSON.stringify(q));
3675
+ const b = g.includes("?") ? "&" : "?", B = `${g}${b}${P.toString()}`, pe = await fetch(B, { method: "GET", headers: y, signal: o });
3676
+ let te = null;
3676
3677
  try {
3677
- Z = await le.json();
3678
+ te = await pe.json();
3678
3679
  } catch {
3679
- Z = null;
3680
+ te = null;
3680
3681
  }
3681
- return { status: le.status, json: Z };
3682
+ return { status: pe.status, json: te };
3682
3683
  }, x = {
3683
3684
  operationName: p,
3684
3685
  variables: m,
3685
3686
  extensions: { persistedQuery: { version: 1, sha256Hash: c } }
3686
- }, k = async (D, b, P) => {
3687
- if (Ae(D.json?.errors, ["PERSISTED_QUERY_NOT_FOUND", "PersistedQueryNotFound"])) {
3688
- const B = await b();
3689
- return ne("APQ register", u, m, p, B);
3690
- }
3691
- if (Ae(D.json?.errors, ["PERSISTED_QUERY_NOT_SUPPORTED"])) {
3687
+ }, O = async (D, P, b) => {
3688
+ if (ke(D.json?.errors, ["PERSISTED_QUERY_NOT_FOUND", "PersistedQueryNotFound"])) {
3692
3689
  const B = await P();
3693
- return ne("no APQ support", u, m, p, B);
3690
+ return ie("APQ register", u, m, p, B);
3691
+ }
3692
+ if (ke(D.json?.errors, ["PERSISTED_QUERY_NOT_SUPPORTED"])) {
3693
+ const B = await b();
3694
+ return ie("no APQ support", u, m, p, B);
3694
3695
  }
3695
- return ne("", u, m, p, D);
3696
+ return ie("", u, m, p, D);
3696
3697
  };
3697
3698
  if (h === "query") {
3698
- const D = await O(x);
3699
- return k(D, () => I({ ...x, query: u }), () => I({ operationName: p, variables: m, query: u }));
3699
+ const D = await T(x);
3700
+ return O(D, () => I({ ...x, query: u }), () => I({ operationName: p, variables: m, query: u }));
3700
3701
  }
3701
3702
  const L = await I(x);
3702
- return k(L, () => I({ ...x, query: u }), () => I({ operationName: p, variables: m, query: u }));
3703
+ return O(L, () => I({ ...x, query: u }), () => I({ operationName: p, variables: m, query: u }));
3703
3704
  }
3704
3705
  }
3705
- class gn {
3706
+ class In {
3706
3707
  config;
3707
3708
  sdk;
3708
3709
  constructor(t) {
3709
- this.config = t, this.sdk = pn(new ue(t.apiUrl));
3710
+ this.config = t, this.sdk = hn(new ee(t.apiUrl));
3710
3711
  }
3711
3712
  async fetchEvents(t = {}) {
3712
3713
  try {
@@ -3737,42 +3738,7 @@ class gn {
3737
3738
  priceRange: t.priceRange
3738
3739
  });
3739
3740
  if (this.debugLog("Raw GraphQL response", n), n?.findAllPublicEventByOrganizationId?.data) {
3740
- const i = n.findAllPublicEventByOrganizationId.data.map((r) => ({
3741
- id: r.id,
3742
- name: r.name,
3743
- icon: r.icon,
3744
- banner: r.banner,
3745
- description: r.description,
3746
- addonDescription: r.addonDescription,
3747
- startAt: R.fromISO(r.startAt, { zone: r.timezone }).toJSDate().toISOString(),
3748
- endAt: R.fromISO(r.endAt, { zone: r.timezone }).toJSDate().toISOString(),
3749
- timezone: r.timezone,
3750
- startSalesAt: null,
3751
- endSalesAt: null,
3752
- slug: r.slug ?? "ERROR",
3753
- facebookPixelId: null,
3754
- status: r.status,
3755
- location: r.location ? {
3756
- id: r.location.id,
3757
- name: r.location.name,
3758
- address: r.location.address
3759
- } : void 0,
3760
- infoDescription: r.infoDescription,
3761
- startingPrice: r.startingPrice
3762
- }));
3763
- return this.debugLog("Processed events", { events: i, count: i.length }), [i, n.findAllPublicEventByOrganizationId.count ?? 0];
3764
- } else
3765
- return this.debugLog("No events found in response"), [[], 0];
3766
- } catch (n) {
3767
- throw this.debugLog("Error fetching events", n), n;
3768
- }
3769
- }
3770
- async fetchEvent(t) {
3771
- try {
3772
- this.debugLog("Fetching single event", { eventId: t });
3773
- const n = await this.sdk.EventDetailPage({ eventId: t });
3774
- if (this.debugLog("Raw GraphQL response", n), n?.findPublicEventById) {
3775
- const i = n.findPublicEventById, r = {
3741
+ const r = n.findAllPublicEventByOrganizationId.data.map((i) => ({
3776
3742
  id: i.id,
3777
3743
  name: i.name,
3778
3744
  icon: i.icon,
@@ -3782,10 +3748,10 @@ class gn {
3782
3748
  startAt: R.fromISO(i.startAt, { zone: i.timezone }).toJSDate().toISOString(),
3783
3749
  endAt: R.fromISO(i.endAt, { zone: i.timezone }).toJSDate().toISOString(),
3784
3750
  timezone: i.timezone,
3785
- startSalesAt: i.startSalesAt,
3786
- endSalesAt: i.endSalesAt,
3751
+ startSalesAt: null,
3752
+ endSalesAt: null,
3787
3753
  slug: i.slug ?? "ERROR",
3788
- facebookPixelId: i.facebookPixelId,
3754
+ facebookPixelId: null,
3789
3755
  status: i.status,
3790
3756
  location: i.location ? {
3791
3757
  id: i.location.id,
@@ -3794,8 +3760,43 @@ class gn {
3794
3760
  } : void 0,
3795
3761
  infoDescription: i.infoDescription,
3796
3762
  startingPrice: i.startingPrice
3763
+ }));
3764
+ return this.debugLog("Processed events", { events: r, count: r.length }), [r, n.findAllPublicEventByOrganizationId.count ?? 0];
3765
+ } else
3766
+ return this.debugLog("No events found in response"), [[], 0];
3767
+ } catch (n) {
3768
+ throw this.debugLog("Error fetching events", n), n;
3769
+ }
3770
+ }
3771
+ async fetchEvent(t) {
3772
+ try {
3773
+ this.debugLog("Fetching single event", { eventId: t });
3774
+ const n = await this.sdk.EventDetailPage({ eventId: t });
3775
+ if (this.debugLog("Raw GraphQL response", n), n?.findPublicEventById) {
3776
+ const r = n.findPublicEventById, i = {
3777
+ id: r.id,
3778
+ name: r.name,
3779
+ icon: r.icon,
3780
+ banner: r.banner,
3781
+ description: r.description,
3782
+ addonDescription: r.addonDescription,
3783
+ startAt: R.fromISO(r.startAt, { zone: r.timezone }).toJSDate().toISOString(),
3784
+ endAt: R.fromISO(r.endAt, { zone: r.timezone }).toJSDate().toISOString(),
3785
+ timezone: r.timezone,
3786
+ startSalesAt: r.startSalesAt,
3787
+ endSalesAt: r.endSalesAt,
3788
+ slug: r.slug ?? "ERROR",
3789
+ facebookPixelId: r.facebookPixelId,
3790
+ status: r.status,
3791
+ location: r.location ? {
3792
+ id: r.location.id,
3793
+ name: r.location.name,
3794
+ address: r.location.address
3795
+ } : void 0,
3796
+ infoDescription: r.infoDescription,
3797
+ startingPrice: r.startingPrice
3797
3798
  };
3798
- return this.debugLog("Processed single event", r), r;
3799
+ return this.debugLog("Processed single event", i), i;
3799
3800
  } else {
3800
3801
  this.debugLog("No event found for id", t);
3801
3802
  return;
@@ -3804,22 +3805,22 @@ class gn {
3804
3805
  throw this.debugLog("Error fetching single event", n), n;
3805
3806
  }
3806
3807
  }
3807
- async fetchProducts(t, n, i) {
3808
+ async fetchProducts(t, n, r) {
3808
3809
  try {
3809
3810
  this.debugLog("Fetching products for event", {
3810
3811
  eventId: t,
3811
- promoCode: i,
3812
+ promoCode: r,
3812
3813
  trackerId: this.config.trackerId,
3813
3814
  productTypes: n
3814
3815
  });
3815
- const r = await this.sdk.findProductsByEventId({
3816
+ const i = await this.sdk.findProductsByEventId({
3816
3817
  eventId: t,
3817
- promoCode: i,
3818
+ promoCode: r,
3818
3819
  trackerId: this.config.trackerId,
3819
3820
  productTypes: n
3820
3821
  });
3821
- if (r?.findPublicProductsByEventId) {
3822
- const s = r.findPublicProductsByEventId.map((o) => ({
3822
+ if (i?.findPublicProductsByEventId) {
3823
+ const s = i.findPublicProductsByEventId.map((o) => ({
3823
3824
  id: o.id,
3824
3825
  name: o.name,
3825
3826
  category: o.category ? {
@@ -3850,15 +3851,15 @@ class gn {
3850
3851
  }), s;
3851
3852
  }
3852
3853
  return;
3853
- } catch (r) {
3854
- throw this.debugLog("Error fetching products", { eventId: t, error: r }), r;
3854
+ } catch (i) {
3855
+ throw this.debugLog("Error fetching products", { eventId: t, error: i }), i;
3855
3856
  }
3856
3857
  }
3857
3858
  debugLog(t, n) {
3858
3859
  this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${t}`, n || "");
3859
3860
  }
3860
3861
  }
3861
- const In = E`
3862
+ const En = E`
3862
3863
  query findPaymentMethods($orderId: ID!, $orderItemId: String, $amountOfTickets: Int, $paymentMethodId: String) {
3863
3864
  findPaymentDetails(
3864
3865
  orderId: $orderId
@@ -3886,26 +3887,26 @@ const In = E`
3886
3887
  paymentSpesificTransactionFee
3887
3888
  }
3888
3889
  }
3889
- `, En = E`
3890
+ `, yn = E`
3890
3891
  mutation createDigitalPayment($input: CreateDigitalOrderPaymentInput!) {
3891
3892
  createDigitalOrderPayment(input: $input)
3892
3893
  }
3893
- `, yn = (e, t, n, i) => e();
3894
- function vn(e, t = yn) {
3894
+ `, vn = (e, t, n, r) => e();
3895
+ function An(e, t = vn) {
3895
3896
  return {
3896
- findPaymentMethods(n, i, r) {
3897
- return t((s) => e.request({ document: In, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", n);
3897
+ findPaymentMethods(n, r, i) {
3898
+ return t((s) => e.request({ document: En, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findPaymentMethods", "query", n);
3898
3899
  },
3899
- createDigitalPayment(n, i, r) {
3900
- return t((s) => e.request({ document: En, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", n);
3900
+ createDigitalPayment(n, r, i) {
3901
+ return t((s) => e.request({ document: yn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "createDigitalPayment", "mutation", n);
3901
3902
  }
3902
3903
  };
3903
3904
  }
3904
- class An {
3905
+ class kn {
3905
3906
  config;
3906
3907
  sdk;
3907
3908
  constructor(t) {
3908
- this.config = t, this.sdk = vn(new ae(t.apiUrl));
3909
+ this.config = t, this.sdk = An(new de(t.apiUrl));
3909
3910
  }
3910
3911
  async getPaymentDetails(t) {
3911
3912
  this.debugLog("Fetching payment methods", t);
@@ -3918,27 +3919,27 @@ class An {
3918
3919
  });
3919
3920
  if (!n?.findPaymentDetails)
3920
3921
  throw this.debugLog("No payment details found"), new Error("No payment details found for this order");
3921
- const i = n.findPaymentDetails;
3922
+ const r = n.findPaymentDetails;
3922
3923
  return this.debugLog("Payment methods fetched successfully", {
3923
- methodCount: i.methods?.length ?? 0,
3924
- transactionPrice: i.transactionPrice,
3925
- transactionDiscount: i.transactionDiscount,
3926
- transactionFee: i.transactionFee,
3927
- paymentSpesificTransactionFee: i.paymentSpesificTransactionFee
3924
+ methodCount: r.methods?.length ?? 0,
3925
+ transactionPrice: r.transactionPrice,
3926
+ transactionDiscount: r.transactionDiscount,
3927
+ transactionFee: r.transactionFee,
3928
+ paymentSpesificTransactionFee: r.paymentSpesificTransactionFee
3928
3929
  }), {
3929
- transactionPrice: i.transactionPrice,
3930
- transactionDiscount: i.transactionPrice,
3931
- transactionFee: i.transactionFee ?? null,
3932
- paymentSpesificTransactionFee: i.paymentSpesificTransactionFee ?? null,
3933
- methods: i.methods?.map((r) => ({
3934
- id: r.id,
3935
- name: r.name,
3936
- image: r.image,
3937
- fee: r.fee ? {
3938
- type: r.fee.type,
3939
- value: r.fee.value
3930
+ transactionPrice: r.transactionPrice,
3931
+ transactionDiscount: r.transactionPrice,
3932
+ transactionFee: r.transactionFee ?? null,
3933
+ paymentSpesificTransactionFee: r.paymentSpesificTransactionFee ?? null,
3934
+ methods: r.methods?.map((i) => ({
3935
+ id: i.id,
3936
+ name: i.name,
3937
+ image: i.image,
3938
+ fee: i.fee ? {
3939
+ type: i.fee.type,
3940
+ value: i.fee.value
3940
3941
  } : null,
3941
- issuers: r.issuers?.map((s) => ({
3942
+ issuers: i.issuers?.map((s) => ({
3942
3943
  id: s.id,
3943
3944
  name: s.name,
3944
3945
  image: s.image
@@ -3964,13 +3965,13 @@ class An {
3964
3965
  orderItemId: t.orderItemId
3965
3966
  };
3966
3967
  t.customer && (n.customer = t.customer), t.products && (n.products = t.products), t.description && (n.description = t.description), t.reference && (n.reference = t.reference), t.ipAddress && (n.ipAddress = t.ipAddress);
3967
- const i = await this.sdk.createDigitalPayment({
3968
+ const r = await this.sdk.createDigitalPayment({
3968
3969
  input: n
3969
3970
  });
3970
- if (!i?.createDigitalOrderPayment)
3971
+ if (!r?.createDigitalOrderPayment)
3971
3972
  throw this.debugLog("Failed to create payment"), new Error("Failed to create payment for this order");
3972
- const r = i.createDigitalOrderPayment;
3973
- return this.debugLog("Payment created successfully", { paymentUrl: r }), { paymentUrl: r };
3973
+ const i = r.createDigitalOrderPayment;
3974
+ return this.debugLog("Payment created successfully", { paymentUrl: i }), { paymentUrl: i };
3974
3975
  } catch (n) {
3975
3976
  throw this.debugLog("Error creating payment", n), n;
3976
3977
  }
@@ -4030,7 +4031,7 @@ const Tn = E`
4030
4031
  }
4031
4032
  }
4032
4033
  }
4033
- `, kn = E`
4034
+ `, Dn = E`
4034
4035
  query findPublicItemsByPackageId($packageId: ID!, $types: [PackageItemType!], $page: PageInput) {
4035
4036
  findPublicItemsByPackageId(packageId: $packageId, types: $types, page: $page) {
4036
4037
  data {
@@ -4065,25 +4066,25 @@ const Tn = E`
4065
4066
  count
4066
4067
  }
4067
4068
  }
4068
- `, Dn = (e, t, n, i) => e();
4069
- function xn(e, t = Dn) {
4069
+ `, xn = (e, t, n, r) => e();
4070
+ function Nn(e, t = xn) {
4070
4071
  return {
4071
- findAllPublicPackagesByOrganizationId(n, i, r) {
4072
- return t((s) => e.request({ document: Tn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", n);
4072
+ findAllPublicPackagesByOrganizationId(n, r, i) {
4073
+ return t((s) => e.request({ document: Tn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findAllPublicPackagesByOrganizationId", "query", n);
4073
4074
  },
4074
- findPublicPackageById(n, i, r) {
4075
- return t((s) => e.request({ document: On, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", n);
4075
+ findPublicPackageById(n, r, i) {
4076
+ return t((s) => e.request({ document: On, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findPublicPackageById", "query", n);
4076
4077
  },
4077
- findPublicItemsByPackageId(n, i, r) {
4078
- return t((s) => e.request({ document: kn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", n);
4078
+ findPublicItemsByPackageId(n, r, i) {
4079
+ return t((s) => e.request({ document: Dn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findPublicItemsByPackageId", "query", n);
4079
4080
  }
4080
4081
  };
4081
4082
  }
4082
- class Nn {
4083
+ class Pn {
4083
4084
  config;
4084
4085
  sdk;
4085
4086
  constructor(t) {
4086
- this.config = t, this.sdk = xn(new ue(t.apiUrl));
4087
+ this.config = t, this.sdk = Nn(new ee(t.apiUrl));
4087
4088
  }
4088
4089
  debugLog(t, n) {
4089
4090
  this.config.debug && console.log(`[PackageService] ${t}`, n || "");
@@ -4100,15 +4101,15 @@ class Nn {
4100
4101
  tab: t.tab,
4101
4102
  statuses: t.statuses
4102
4103
  });
4103
- const i = await this.sdk.findAllPublicPackagesByOrganizationId({
4104
+ const r = await this.sdk.findAllPublicPackagesByOrganizationId({
4104
4105
  organizationId: this.config.organizationId
4105
4106
  });
4106
- if (i?.findAllPublicPackagesByOrganizationId) {
4107
- const r = i.findAllPublicPackagesByOrganizationId;
4107
+ if (r?.findAllPublicPackagesByOrganizationId) {
4108
+ const i = r.findAllPublicPackagesByOrganizationId;
4108
4109
  return this.debugLog("Public packages fetched", {
4109
- count: r.count,
4110
- dataLength: r.data.length
4111
- }), r.data;
4110
+ count: i.count,
4111
+ dataLength: i.data.length
4112
+ }), i.data;
4112
4113
  }
4113
4114
  return null;
4114
4115
  } catch (n) {
@@ -4122,8 +4123,8 @@ class Nn {
4122
4123
  });
4123
4124
  const n = await this.sdk.findPublicPackageById({ packageId: t });
4124
4125
  if (n?.findPublicPackageById) {
4125
- const i = n.findPublicPackageById;
4126
- return this.debugLog("Public package fetched"), i;
4126
+ const r = n.findPublicPackageById;
4127
+ return this.debugLog("Public package fetched"), r;
4127
4128
  }
4128
4129
  return null;
4129
4130
  } catch (n) {
@@ -4133,21 +4134,21 @@ class Nn {
4133
4134
  async getPackageItems(t, n = [Q.Regular, Q.AdditionalEvent]) {
4134
4135
  try {
4135
4136
  this.debugLog("Fetching public package items", { packageId: t, types: n });
4136
- const i = await this.sdk.findPublicItemsByPackageId({
4137
+ const r = await this.sdk.findPublicItemsByPackageId({
4137
4138
  packageId: t,
4138
4139
  types: n,
4139
4140
  page: { index: 0, size: 100 }
4140
4141
  });
4141
- if (i?.findPublicItemsByPackageId) {
4142
- const r = i.findPublicItemsByPackageId;
4142
+ if (r?.findPublicItemsByPackageId) {
4143
+ const i = r.findPublicItemsByPackageId;
4143
4144
  return this.debugLog("Public package items fetched", {
4144
- count: r.count,
4145
- dataLength: r.data.length
4146
- }), r.data;
4145
+ count: i.count,
4146
+ dataLength: i.data.length
4147
+ }), i.data;
4147
4148
  }
4148
4149
  return null;
4149
- } catch (i) {
4150
- throw this.debugLog("Error fetching public package items", i), i;
4150
+ } catch (r) {
4151
+ throw this.debugLog("Error fetching public package items", r), r;
4151
4152
  }
4152
4153
  }
4153
4154
  }
@@ -4163,7 +4164,7 @@ const bn = E`
4163
4164
  count
4164
4165
  }
4165
4166
  }
4166
- `, Pn = E`
4167
+ `, Sn = E`
4167
4168
  query findPublicCategoryById($hostingId: ID!, $dateRange: DateRangeInput) {
4168
4169
  findPublicHostingById(id: $hostingId) {
4169
4170
  id
@@ -4172,22 +4173,22 @@ const bn = E`
4172
4173
  amountOfActiveEvents(input: $dateRange)
4173
4174
  }
4174
4175
  }
4175
- `, Sn = (e, t, n, i) => e();
4176
- function Cn(e, t = Sn) {
4176
+ `, Cn = (e, t, n, r) => e();
4177
+ function _n(e, t = Cn) {
4177
4178
  return {
4178
- findAllPublicCategoriesByOrganizationId(n, i, r) {
4179
- return t((s) => e.request({ document: bn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", n);
4179
+ findAllPublicCategoriesByOrganizationId(n, r, i) {
4180
+ return t((s) => e.request({ document: bn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findAllPublicCategoriesByOrganizationId", "query", n);
4180
4181
  },
4181
- findPublicCategoryById(n, i, r) {
4182
- return t((s) => e.request({ document: Pn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicCategoryById", "query", n);
4182
+ findPublicCategoryById(n, r, i) {
4183
+ return t((s) => e.request({ document: Sn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findPublicCategoryById", "query", n);
4183
4184
  }
4184
4185
  };
4185
4186
  }
4186
- class _n {
4187
+ class Ln {
4187
4188
  config;
4188
4189
  sdk;
4189
4190
  constructor(t) {
4190
- this.config = t, this.sdk = Cn(new ue(t.apiUrl));
4191
+ this.config = t, this.sdk = _n(new ee(t.apiUrl));
4191
4192
  }
4192
4193
  debugLog(t, n) {
4193
4194
  this.config.debug && console.log(`[CategoryService] ${t}`, n || "");
@@ -4197,8 +4198,8 @@ class _n {
4197
4198
  this.debugLog("Fetching all categories", { organizationId: this.config.organizationId });
4198
4199
  const n = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId, dateRange: t });
4199
4200
  if (n?.findAllPublicHostingsByOrganizationId) {
4200
- const i = n.findAllPublicHostingsByOrganizationId;
4201
- return this.debugLog("Categories fetched", { count: i.count, dataLength: i.data.length }), i.data.map((r) => ({ id: r.id, name: r.name, icon: r.icon, activeEvents: r.amountOfActiveEvents }));
4201
+ const r = n.findAllPublicHostingsByOrganizationId;
4202
+ return this.debugLog("Categories fetched", { count: r.count, dataLength: r.data.length }), r.data.map((i) => ({ id: i.id, name: i.name, icon: i.icon, activeEvents: i.amountOfActiveEvents }));
4202
4203
  }
4203
4204
  return [];
4204
4205
  } catch (n) {
@@ -4210,8 +4211,8 @@ class _n {
4210
4211
  this.debugLog("Fetching category", { categoryId: t });
4211
4212
  const n = await this.sdk.findPublicCategoryById({ hostingId: t });
4212
4213
  if (n?.findPublicHostingById) {
4213
- const i = n.findPublicHostingById;
4214
- return this.debugLog("Category fetched", i), { id: i.id, name: i.name, icon: i.icon, activeEvents: i.amountOfActiveEvents };
4214
+ const r = n.findPublicHostingById;
4215
+ return this.debugLog("Category fetched", r), { id: r.id, name: r.name, icon: r.icon, activeEvents: r.amountOfActiveEvents };
4215
4216
  }
4216
4217
  return null;
4217
4218
  } catch (n) {
@@ -4219,18 +4220,75 @@ class _n {
4219
4220
  }
4220
4221
  }
4221
4222
  }
4222
- const Ln = "https://api.ticketapp.com/graphql", Oe = "TIC_TRACKER_ID";
4223
- class $n {
4223
+ const Rn = E`
4224
+ mutation CreateShopView($id: ID!, $trackerLinkId: ID) {
4225
+ createShopView(id: $id, trackerId: $trackerLinkId)
4226
+ }
4227
+ `, Fn = E`
4228
+ mutation CreateEventView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
4229
+ createEventView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
4230
+ }
4231
+ `, wn = E`
4232
+ mutation CreatePackageView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
4233
+ createPackageView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
4234
+ }
4235
+ `, $n = (e, t, n, r) => e();
4236
+ function Bn(e, t = $n) {
4237
+ return {
4238
+ CreateShopView(n, r, i) {
4239
+ return t((s) => e.request({ document: Rn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "CreateShopView", "mutation", n);
4240
+ },
4241
+ CreateEventView(n, r, i) {
4242
+ return t((s) => e.request({ document: Fn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "CreateEventView", "mutation", n);
4243
+ },
4244
+ CreatePackageView(n, r, i) {
4245
+ return t((s) => e.request({ document: wn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "CreatePackageView", "mutation", n);
4246
+ }
4247
+ };
4248
+ }
4249
+ class Vn {
4250
+ config;
4251
+ sdk;
4252
+ constructor(t) {
4253
+ this.config = t, this.sdk = Bn(new ee(t.apiUrl));
4254
+ }
4255
+ createMetric = async (t, n, r) => {
4256
+ switch (!n && !r && await this.sdk.CreateShopView({
4257
+ id: t,
4258
+ trackerLinkId: this.config.trackerId
4259
+ }), r) {
4260
+ case J.Event:
4261
+ await this.sdk.CreateEventView({
4262
+ id: t,
4263
+ shopId: n,
4264
+ trackerLinkId: this.config.trackerId
4265
+ });
4266
+ break;
4267
+ case J.Package:
4268
+ await this.sdk.CreatePackageView(
4269
+ {
4270
+ id: t,
4271
+ shopId: n,
4272
+ trackerLinkId: this.config.trackerId
4273
+ }
4274
+ );
4275
+ break;
4276
+ }
4277
+ };
4278
+ }
4279
+ const Un = "https://api.ticketapp.com/graphql", Oe = "TIC_TRACKER_ID";
4280
+ class jn {
4224
4281
  basket;
4225
4282
  event;
4226
4283
  payment;
4227
4284
  package;
4228
4285
  category;
4286
+ metric;
4229
4287
  // Attach selected public types to the SDK class
4230
- static Types = Je;
4288
+ static Types = Xe;
4231
4289
  constructor(t) {
4232
- const { organizationId: n, debug: i = !1, apiUrl: r = Ln } = t, s = this.getOrInitTrackerId();
4233
- this.basket = new an({ debug: i, apiUrl: r, shopId: t.shopId, trackerId: s }), this.event = new gn({ organizationId: n, debug: i, apiUrl: r, trackerId: s }), this.payment = new An({ debug: i, apiUrl: r }), this.package = new Nn({ organizationId: n, debug: i, apiUrl: r }), this.category = new _n({ organizationId: n, debug: i, apiUrl: r });
4290
+ const { organizationId: n, debug: r = !1, apiUrl: i = Un } = t, s = this.getOrInitTrackerId();
4291
+ this.basket = new cn({ debug: r, apiUrl: i, shopId: t.shopId, trackerId: s }), this.event = new In({ organizationId: n, debug: r, apiUrl: i, trackerId: s }), this.payment = new kn({ debug: r, apiUrl: i }), this.package = new Pn({ organizationId: n, debug: r, apiUrl: i }), this.category = new Ln({ organizationId: n, debug: r, apiUrl: i }), this.metric = new Vn({ apiUrl: i, trackerId: s });
4234
4292
  }
4235
4293
  // Resolve tracker id from (in order): explicit config, URL query, or session storage
4236
4294
  // Persist to session when found via config or URL for subsequent page loads
@@ -4254,7 +4312,17 @@ class $n {
4254
4312
  }
4255
4313
  return n;
4256
4314
  }
4257
- return t && t.trim().length > 0 ? t : void 0;
4315
+ if (t && t.trim().length > 0) {
4316
+ try {
4317
+ if (typeof window < "u") {
4318
+ const r = new URL(window.location.href);
4319
+ r.searchParams.get("trackerId") || (r.searchParams.set("trackerId", t), window.history.replaceState({}, "", r.toString()));
4320
+ }
4321
+ } catch {
4322
+ }
4323
+ return t;
4324
+ }
4325
+ return;
4258
4326
  } catch {
4259
4327
  return;
4260
4328
  }
@@ -4262,15 +4330,16 @@ class $n {
4262
4330
  }
4263
4331
  export {
4264
4332
  _ as BasketOrderType,
4265
- _e as DiscountType,
4266
- xe as EventStatus,
4267
- Ce as OrderItemType,
4333
+ Le as DiscountType,
4334
+ Ne as EventStatus,
4335
+ J as MetricsType,
4336
+ _e as OrderItemType,
4268
4337
  Q as PackageItemType,
4269
- ke as PackageStatus,
4270
- De as PackageTabType,
4271
- Se as PaymentMethodFeeType,
4338
+ De as PackageStatus,
4339
+ xe as PackageTabType,
4340
+ Ce as PaymentMethodFeeType,
4272
4341
  be as ProductStatus,
4273
- Pe as ProductType,
4274
- Ne as SortOrder,
4275
- $n as TicketappSDK
4342
+ Se as ProductType,
4343
+ Pe as SortOrder,
4344
+ jn as TicketappSDK
4276
4345
  };