@ticketapp-dev/shop-sdk 1.0.42 → 1.0.44

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,101 +1,101 @@
1
- import { GraphQLClient as oe } from "graphql-request";
2
- import { DateTime as L } from "luxon";
3
- var _ = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(_ || {}), Y = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(Y || {}), Ee = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(Ee || {}), ye = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(ye || {}), Te = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(Te || {}), ve = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(ve || {}), ke = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(ke || {}), Oe = /* @__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))(Oe || {}), Ae = /* @__PURE__ */ ((e) => (e.FIXED = "FIXED", e.PERCENTAGE = "PERCENTAGE", e))(Ae || {}), De = /* @__PURE__ */ ((e) => (e.AddOn = "ADD_ON", e.DeliveryOption = "DELIVERY_OPTION", e.EntranceTicket = "ENTRANCE_TICKET", e))(De || {}), Ne = /* @__PURE__ */ ((e) => (e.Fixed = "FIXED", e.Percentage = "PERCENTAGE", e))(Ne || {}), H = /* @__PURE__ */ ((e) => (e.Event = "EVENT", e.Package = "PACKAGE", e))(H || {});
4
- const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1
+ import { GraphQLClient as v } from "graphql-request";
2
+ import { DateTime as A } from "luxon";
3
+ var T = /* @__PURE__ */ ((t) => (t.PACKAGE = "PACKAGE", t.PRODUCT = "PRODUCT", t.ADD_ONS = "ADD_ONS", t.DELIVERY = "DELIVERY", t.PICKUP = "PICKUP", t))(T || {}), R = /* @__PURE__ */ ((t) => (t.AdditionalEvent = "ADDITIONAL_EVENT", t.Addon = "ADDON", t.Regular = "REGULAR", t))(R || {}), K = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Concept = "CONCEPT", t.Paused = "PAUSED", t.SoldOut = "SOLD_OUT", t))(K || {}), ee = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Inactive = "INACTIVE", t))(ee || {}), te = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Inactive = "INACTIVE", t.Paused = "PAUSED", t.SoldOut = "SOLD_OUT", t))(te || {}), ne = /* @__PURE__ */ ((t) => (t.Asc = "ASC", t.Desc = "DESC", t))(ne || {}), ie = /* @__PURE__ */ ((t) => (t.AllReserved = "ALL_RESERVED", t.Available = "AVAILABLE", t.SoldOut = "SOLD_OUT", t))(ie || {}), re = /* @__PURE__ */ ((t) => (t.Addon = "ADDON", t.Delivery = "DELIVERY", t.Door = "DOOR", t.Friend = "FRIEND", t.Guest = "GUEST", t.Pickup = "PICKUP", t.Promoter = "PROMOTER", t.Ticket = "TICKET", t))(re || {}), se = /* @__PURE__ */ ((t) => (t.FIXED = "FIXED", t.PERCENTAGE = "PERCENTAGE", t))(se || {}), ae = /* @__PURE__ */ ((t) => (t.AddOn = "ADD_ON", t.DeliveryOption = "DELIVERY_OPTION", t.EntranceTicket = "ENTRANCE_TICKET", t))(ae || {}), oe = /* @__PURE__ */ ((t) => (t.Fixed = "FIXED", t.Percentage = "PERCENTAGE", t))(oe || {}), w = /* @__PURE__ */ ((t) => (t.Event = "EVENT", t.Package = "PACKAGE", t))(w || {});
4
+ const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
- BasketOrderType: _,
7
- DiscountType: Ne,
8
- EventStatus: Te,
9
- MetricsType: H,
10
- OrderItemType: De,
11
- PackageItemType: Y,
12
- PackageStatus: Ee,
13
- PackageTabType: ye,
14
- PaymentMethodFeeType: Ae,
15
- ProductStatus: ke,
16
- ProductType: Oe,
17
- SortOrder: ve
6
+ BasketOrderType: T,
7
+ DiscountType: oe,
8
+ EventStatus: te,
9
+ MetricsType: w,
10
+ OrderItemType: ae,
11
+ PackageItemType: R,
12
+ PackageStatus: K,
13
+ PackageTabType: ee,
14
+ PaymentMethodFeeType: se,
15
+ ProductStatus: ie,
16
+ ProductType: re,
17
+ SortOrder: ne
18
18
  }, Symbol.toStringTag, { value: "Module" }));
19
- var Q = function() {
20
- return Q = Object.assign || function(t) {
21
- for (var n, i = 1, r = arguments.length; i < r; i++) {
22
- n = arguments[i];
23
- for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
19
+ var F = function() {
20
+ return F = Object.assign || function(n) {
21
+ for (var e, i = 1, r = arguments.length; i < r; i++) {
22
+ e = arguments[i];
23
+ for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (n[s] = e[s]);
24
24
  }
25
- return t;
26
- }, Q.apply(this, arguments);
25
+ return n;
26
+ }, F.apply(this, arguments);
27
27
  };
28
- function z(e, t) {
29
- if (!!!e)
30
- throw new Error(t);
28
+ function U(t, n) {
29
+ if (!!!t)
30
+ throw new Error(n);
31
31
  }
32
- function Me(e) {
33
- return typeof e == "object" && e !== null;
32
+ function Ae(t) {
33
+ return typeof t == "object" && t !== null;
34
34
  }
35
- function qe(e, t) {
36
- if (!!!e)
35
+ function Ne(t, n) {
36
+ if (!!!t)
37
37
  throw new Error(
38
38
  "Unexpected invariant triggered."
39
39
  );
40
40
  }
41
- const ze = /\r\n|[\n\r]/g;
42
- function ie(e, t) {
43
- let n = 0, i = 1;
44
- for (const r of e.body.matchAll(ze)) {
45
- if (typeof r.index == "number" || qe(!1), r.index >= t)
41
+ const De = /\r\n|[\n\r]/g;
42
+ function z(t, n) {
43
+ let e = 0, i = 1;
44
+ for (const r of t.body.matchAll(De)) {
45
+ if (typeof r.index == "number" || Ne(!1), r.index >= n)
46
46
  break;
47
- n = r.index + r[0].length, i += 1;
47
+ e = r.index + r[0].length, i += 1;
48
48
  }
49
49
  return {
50
50
  line: i,
51
- column: t + 1 - n
51
+ column: n + 1 - e
52
52
  };
53
53
  }
54
- function je(e) {
55
- return xe(
56
- e.source,
57
- ie(e.source, e.start)
54
+ function ve(t) {
55
+ return ce(
56
+ t.source,
57
+ z(t.source, t.start)
58
58
  );
59
59
  }
60
- function xe(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, p = t.line === 1 ? n : 0, f = t.column + p, l = `${e.name}:${o}:${f}
62
- `, g = i.split(/\r\n|[\n\r]/g), d = g[r];
60
+ function ce(t, n) {
61
+ const e = t.locationOffset.column - 1, i = "".padStart(e) + t.body, r = n.line - 1, s = t.locationOffset.line - 1, o = n.line + s, u = n.line === 1 ? e : 0, h = n.column + u, E = `${t.name}:${o}:${h}
62
+ `, m = i.split(/\r\n|[\n\r]/g), d = m[r];
63
63
  if (d.length > 120) {
64
- const m = Math.floor(f / 80), y = f % 80, I = [];
65
- for (let D = 0; D < d.length; D += 80)
66
- I.push(d.slice(D, D + 80));
67
- return l + le([
68
- [`${o} |`, I[0]],
69
- ...I.slice(1, m + 1).map((D) => ["|", D]),
64
+ const f = Math.floor(h / 80), y = h % 80, p = [];
65
+ for (let O = 0; O < d.length; O += 80)
66
+ p.push(d.slice(O, O + 80));
67
+ return E + Q([
68
+ [`${o} |`, p[0]],
69
+ ...p.slice(1, f + 1).map((O) => ["|", O]),
70
70
  ["|", "^".padStart(y)],
71
- ["|", I[m + 1]]
71
+ ["|", p[f + 1]]
72
72
  ]);
73
73
  }
74
- return l + le([
74
+ return E + Q([
75
75
  // Lines specified like this: ["prefix", "string"],
76
- [`${o - 1} |`, g[r - 1]],
76
+ [`${o - 1} |`, m[r - 1]],
77
77
  [`${o} |`, d],
78
- ["|", "^".padStart(f)],
79
- [`${o + 1} |`, g[r + 1]]
78
+ ["|", "^".padStart(h)],
79
+ [`${o + 1} |`, m[r + 1]]
80
80
  ]);
81
81
  }
82
- function le(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(`
82
+ function Q(t) {
83
+ const n = t.filter(([i, r]) => r !== void 0), e = Math.max(...n.map(([i]) => i.length));
84
+ return n.map(([i, r]) => i.padStart(e) + (r ? " " + r : "")).join(`
85
85
  `);
86
86
  }
87
- function Ge(e) {
88
- const t = e[0];
89
- return t == null || "kind" in t || "length" in t ? {
90
- nodes: t,
91
- source: e[1],
92
- positions: e[2],
93
- path: e[3],
94
- originalError: e[4],
95
- extensions: e[5]
96
- } : t;
87
+ function Pe(t) {
88
+ const n = t[0];
89
+ return n == null || "kind" in n || "length" in n ? {
90
+ nodes: n,
91
+ source: t[1],
92
+ positions: t[2],
93
+ path: t[3],
94
+ originalError: t[4],
95
+ extensions: t[5]
96
+ } : n;
97
97
  }
98
- class ce extends Error {
98
+ class j extends Error {
99
99
  /**
100
100
  * An array of `{ line, column }` locations within the source GraphQL document
101
101
  * which correspond to this error.
@@ -134,19 +134,19 @@ class ce extends Error {
134
134
  /**
135
135
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
136
136
  */
137
- constructor(t, ...n) {
137
+ constructor(n, ...e) {
138
138
  var i, r, s;
139
- const { nodes: o, source: p, positions: f, path: l, originalError: g, extensions: d } = Ge(n);
140
- super(t), this.name = "GraphQLError", this.path = l ?? void 0, this.originalError = g ?? void 0, this.nodes = pe(
139
+ const { nodes: o, source: u, positions: h, path: E, originalError: m, extensions: d } = Pe(e);
140
+ super(n), this.name = "GraphQLError", this.path = E ?? void 0, this.originalError = m ?? void 0, this.nodes = X(
141
141
  Array.isArray(o) ? o : o ? [o] : void 0
142
142
  );
143
- const m = pe(
144
- (i = this.nodes) === null || i === void 0 ? void 0 : i.map((I) => I.loc).filter((I) => I != null)
143
+ const f = X(
144
+ (i = this.nodes) === null || i === void 0 ? void 0 : i.map((p) => p.loc).filter((p) => p != null)
145
145
  );
146
- this.source = p ?? (m == null || (r = m[0]) === null || r === void 0 ? void 0 : r.source), this.positions = f ?? m?.map((I) => I.start), this.locations = f && p ? f.map((I) => ie(p, I)) : m?.map((I) => ie(I.source, I.start));
147
- const y = Me(
148
- g?.extensions
149
- ) ? g?.extensions : void 0;
146
+ this.source = u ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? f?.map((p) => p.start), this.locations = h && u ? h.map((p) => z(u, p)) : f?.map((p) => z(p.source, p.start));
147
+ const y = Ae(
148
+ m?.extensions
149
+ ) ? m?.extensions : void 0;
150
150
  this.extensions = (s = d ?? y) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
151
151
  message: {
152
152
  writable: !0,
@@ -167,11 +167,11 @@ class ce extends Error {
167
167
  originalError: {
168
168
  enumerable: !1
169
169
  }
170
- }), g != null && g.stack ? Object.defineProperty(this, "stack", {
171
- value: g.stack,
170
+ }), m != null && m.stack ? Object.defineProperty(this, "stack", {
171
+ value: m.stack,
172
172
  writable: !0,
173
173
  configurable: !0
174
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, ce) : Object.defineProperty(this, "stack", {
174
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, j) : Object.defineProperty(this, "stack", {
175
175
  value: Error().stack,
176
176
  writable: !0,
177
177
  configurable: !0
@@ -181,36 +181,36 @@ class ce extends Error {
181
181
  return "GraphQLError";
182
182
  }
183
183
  toString() {
184
- let t = this.message;
184
+ let n = this.message;
185
185
  if (this.nodes)
186
- for (const n of this.nodes)
187
- n.loc && (t += `
186
+ for (const e of this.nodes)
187
+ e.loc && (n += `
188
188
 
189
- ` + je(n.loc));
189
+ ` + ve(e.loc));
190
190
  else if (this.source && this.locations)
191
- for (const n of this.locations)
192
- t += `
191
+ for (const e of this.locations)
192
+ n += `
193
193
 
194
- ` + xe(this.source, n);
195
- return t;
194
+ ` + ce(this.source, e);
195
+ return n;
196
196
  }
197
197
  toJSON() {
198
- const t = {
198
+ const n = {
199
199
  message: this.message
200
200
  };
201
- 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;
201
+ return this.locations != null && (n.locations = this.locations), this.path != null && (n.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (n.extensions = this.extensions), n;
202
202
  }
203
203
  }
204
- function pe(e) {
205
- return e === void 0 || e.length === 0 ? void 0 : e;
204
+ function X(t) {
205
+ return t === void 0 || t.length === 0 ? void 0 : t;
206
206
  }
207
- function v(e, t, n) {
208
- return new ce(`Syntax Error: ${n}`, {
209
- source: e,
210
- positions: [t]
207
+ function I(t, n, e) {
208
+ return new j(`Syntax Error: ${e}`, {
209
+ source: t,
210
+ positions: [n]
211
211
  });
212
212
  }
213
- class Ye {
213
+ class xe {
214
214
  /**
215
215
  * The character offset at which this Node begins.
216
216
  */
@@ -226,8 +226,8 @@ class Ye {
226
226
  /**
227
227
  * The Source document the AST represents.
228
228
  */
229
- constructor(t, n, i) {
230
- this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
229
+ constructor(n, e, i) {
230
+ this.start = n.start, this.end = e.end, this.startToken = n, this.endToken = e, this.source = i;
231
231
  }
232
232
  get [Symbol.toStringTag]() {
233
233
  return "Location";
@@ -239,7 +239,7 @@ class Ye {
239
239
  };
240
240
  }
241
241
  }
242
- class be {
242
+ class de {
243
243
  /**
244
244
  * The kind of Token.
245
245
  */
@@ -266,8 +266,8 @@ class be {
266
266
  * including ignored tokens. <SOF> is always the first node and <EOF>
267
267
  * the last.
268
268
  */
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;
269
+ constructor(n, e, i, r, s, o) {
270
+ this.kind = n, this.start = e, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
271
271
  }
272
272
  get [Symbol.toStringTag]() {
273
273
  return "Token";
@@ -281,7 +281,7 @@ class be {
281
281
  };
282
282
  }
283
283
  }
284
- const Pe = {
284
+ const be = {
285
285
  Name: [],
286
286
  Document: ["definitions"],
287
287
  OperationDefinition: [
@@ -368,74 +368,60 @@ const Pe = {
368
368
  ArgumentCoordinate: ["name", "fieldName", "argumentName"],
369
369
  DirectiveCoordinate: ["name"],
370
370
  DirectiveArgumentCoordinate: ["name", "argumentName"]
371
- }, He = new Set(Object.keys(Pe));
372
- function he(e) {
373
- const t = e?.kind;
374
- return typeof t == "string" && He.has(t);
375
- }
376
- var w;
377
- (function(e) {
378
- e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
379
- })(w || (w = {}));
380
- var re;
381
- (function(e) {
382
- 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
- })(re || (re = {}));
384
- var u;
385
- (function(e) {
386
- 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
- })(u || (u = {}));
388
- function se(e) {
389
- return e === 9 || e === 32;
390
- }
391
- function U(e) {
392
- return e >= 48 && e <= 57;
393
- }
394
- function Se(e) {
395
- return e >= 97 && e <= 122 || // A-Z
396
- e >= 65 && e <= 90;
397
- }
398
- function Ce(e) {
399
- return Se(e) || e === 95;
400
- }
401
- function Qe(e) {
402
- return Se(e) || U(e) || e === 95;
403
- }
404
- function Je(e) {
405
- var t;
406
- let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
407
- for (let o = 0; o < e.length; ++o) {
371
+ };
372
+ new Set(Object.keys(be));
373
+ var D;
374
+ (function(t) {
375
+ t.QUERY = "query", t.MUTATION = "mutation", t.SUBSCRIPTION = "subscription";
376
+ })(D || (D = {}));
377
+ var q;
378
+ (function(t) {
379
+ t.QUERY = "QUERY", t.MUTATION = "MUTATION", t.SUBSCRIPTION = "SUBSCRIPTION", t.FIELD = "FIELD", t.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", t.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", t.INLINE_FRAGMENT = "INLINE_FRAGMENT", t.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", t.SCHEMA = "SCHEMA", t.SCALAR = "SCALAR", t.OBJECT = "OBJECT", t.FIELD_DEFINITION = "FIELD_DEFINITION", t.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", t.INTERFACE = "INTERFACE", t.UNION = "UNION", t.ENUM = "ENUM", t.ENUM_VALUE = "ENUM_VALUE", t.INPUT_OBJECT = "INPUT_OBJECT", t.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
380
+ })(q || (q = {}));
381
+ var c;
382
+ (function(t) {
383
+ t.NAME = "Name", t.DOCUMENT = "Document", t.OPERATION_DEFINITION = "OperationDefinition", t.VARIABLE_DEFINITION = "VariableDefinition", t.SELECTION_SET = "SelectionSet", t.FIELD = "Field", t.ARGUMENT = "Argument", t.FRAGMENT_SPREAD = "FragmentSpread", t.INLINE_FRAGMENT = "InlineFragment", t.FRAGMENT_DEFINITION = "FragmentDefinition", t.VARIABLE = "Variable", t.INT = "IntValue", t.FLOAT = "FloatValue", t.STRING = "StringValue", t.BOOLEAN = "BooleanValue", t.NULL = "NullValue", t.ENUM = "EnumValue", t.LIST = "ListValue", t.OBJECT = "ObjectValue", t.OBJECT_FIELD = "ObjectField", t.DIRECTIVE = "Directive", t.NAMED_TYPE = "NamedType", t.LIST_TYPE = "ListType", t.NON_NULL_TYPE = "NonNullType", t.SCHEMA_DEFINITION = "SchemaDefinition", t.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", t.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", t.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", t.FIELD_DEFINITION = "FieldDefinition", t.INPUT_VALUE_DEFINITION = "InputValueDefinition", t.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", t.UNION_TYPE_DEFINITION = "UnionTypeDefinition", t.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", t.ENUM_VALUE_DEFINITION = "EnumValueDefinition", t.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", t.DIRECTIVE_DEFINITION = "DirectiveDefinition", t.SCHEMA_EXTENSION = "SchemaExtension", t.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", t.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", t.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", t.UNION_TYPE_EXTENSION = "UnionTypeExtension", t.ENUM_TYPE_EXTENSION = "EnumTypeExtension", t.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", t.TYPE_COORDINATE = "TypeCoordinate", t.MEMBER_COORDINATE = "MemberCoordinate", t.ARGUMENT_COORDINATE = "ArgumentCoordinate", t.DIRECTIVE_COORDINATE = "DirectiveCoordinate", t.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate";
384
+ })(c || (c = {}));
385
+ function Se(t) {
386
+ return t === 9 || t === 32;
387
+ }
388
+ function S(t) {
389
+ return t >= 48 && t <= 57;
390
+ }
391
+ function ue(t) {
392
+ return t >= 97 && t <= 122 || // A-Z
393
+ t >= 65 && t <= 90;
394
+ }
395
+ function le(t) {
396
+ return ue(t) || t === 95;
397
+ }
398
+ function Ce(t) {
399
+ return ue(t) || S(t) || t === 95;
400
+ }
401
+ function _e(t) {
402
+ var n;
403
+ let e = Number.MAX_SAFE_INTEGER, i = null, r = -1;
404
+ for (let o = 0; o < t.length; ++o) {
408
405
  var s;
409
- const p = e[o], f = Xe(p);
410
- f !== p.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && f < n && (n = f));
406
+ const u = t[o], h = Le(u);
407
+ h !== u.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < e && (e = h));
411
408
  }
412
- return e.map((o, p) => p === 0 ? o : o.slice(n)).slice(
413
- (t = i) !== null && t !== void 0 ? t : 0,
409
+ return t.map((o, u) => u === 0 ? o : o.slice(e)).slice(
410
+ (n = i) !== null && n !== void 0 ? n : 0,
414
411
  r + 1
415
412
  );
416
413
  }
417
- function Xe(e) {
418
- let t = 0;
419
- for (; t < e.length && se(e.charCodeAt(t)); )
420
- ++t;
421
- return t;
422
- }
423
- function We(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('\\"""'), p = e.endsWith('"') && !o, f = e.endsWith("\\"), l = p || f, g = (
425
- // add leading and trailing new lines only if it improves readability
426
- !r || e.length > 70 || l || s || o
427
- );
428
- let d = "";
429
- const m = r && se(e.charCodeAt(0));
430
- return (g && !m || s) && (d += `
431
- `), d += n, (g || l) && (d += `
432
- `), '"""' + d + '"""';
414
+ function Le(t) {
415
+ let n = 0;
416
+ for (; n < t.length && Se(t.charCodeAt(n)); )
417
+ ++n;
418
+ return n;
433
419
  }
434
420
  var a;
435
- (function(e) {
436
- 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";
421
+ (function(t) {
422
+ t.SOF = "<SOF>", t.EOF = "<EOF>", t.BANG = "!", t.DOLLAR = "$", t.AMP = "&", t.PAREN_L = "(", t.PAREN_R = ")", t.DOT = ".", t.SPREAD = "...", t.COLON = ":", t.EQUALS = "=", t.AT = "@", t.BRACKET_L = "[", t.BRACKET_R = "]", t.BRACE_L = "{", t.PIPE = "|", t.BRACE_R = "}", t.NAME = "Name", t.INT = "Int", t.FLOAT = "Float", t.STRING = "String", t.BLOCK_STRING = "BlockString", t.COMMENT = "Comment";
437
423
  })(a || (a = {}));
438
- class Ze {
424
+ class Re {
439
425
  /**
440
426
  * The previously focused non-ignored token.
441
427
  */
@@ -448,9 +434,9 @@ class Ze {
448
434
  /**
449
435
  * The character offset at which the current line begins.
450
436
  */
451
- constructor(t) {
452
- const n = new be(a.SOF, 0, 0, 0, 0);
453
- this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
437
+ constructor(n) {
438
+ const e = new de(a.SOF, 0, 0, 0, 0);
439
+ this.source = n, this.lastToken = e, this.token = e, this.line = 1, this.lineStart = 0;
454
440
  }
455
441
  get [Symbol.toStringTag]() {
456
442
  return "Lexer";
@@ -466,53 +452,53 @@ class Ze {
466
452
  * the state of Lexer.
467
453
  */
468
454
  lookahead() {
469
- let t = this.token;
470
- if (t.kind !== a.EOF)
455
+ let n = this.token;
456
+ if (n.kind !== a.EOF)
471
457
  do
472
- if (t.next)
473
- t = t.next;
458
+ if (n.next)
459
+ n = n.next;
474
460
  else {
475
- const n = et(this, t.end);
476
- t.next = n, n.prev = t, t = n;
461
+ const e = Fe(this, n.end);
462
+ n.next = e, e.prev = n, n = e;
477
463
  }
478
- while (t.kind === a.COMMENT);
479
- return t;
464
+ while (n.kind === a.COMMENT);
465
+ return n;
480
466
  }
481
467
  }
482
- function Ke(e) {
483
- 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;
468
+ function we(t) {
469
+ return t === a.BANG || t === a.DOLLAR || t === a.AMP || t === a.PAREN_L || t === a.PAREN_R || t === a.DOT || t === a.SPREAD || t === a.COLON || t === a.EQUALS || t === a.AT || t === a.BRACKET_L || t === a.BRACKET_R || t === a.BRACE_L || t === a.PIPE || t === a.BRACE_R;
484
470
  }
485
- function F(e) {
486
- return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
471
+ function P(t) {
472
+ return t >= 0 && t <= 55295 || t >= 57344 && t <= 1114111;
487
473
  }
488
- function X(e, t) {
489
- return _e(e.charCodeAt(t)) && Le(e.charCodeAt(t + 1));
474
+ function B(t, n) {
475
+ return he(t.charCodeAt(n)) && pe(t.charCodeAt(n + 1));
490
476
  }
491
- function _e(e) {
492
- return e >= 55296 && e <= 56319;
477
+ function he(t) {
478
+ return t >= 55296 && t <= 56319;
493
479
  }
494
- function Le(e) {
495
- return e >= 56320 && e <= 57343;
480
+ function pe(t) {
481
+ return t >= 56320 && t <= 57343;
496
482
  }
497
- function R(e, t) {
498
- const n = e.source.body.codePointAt(t);
499
- if (n === void 0)
483
+ function N(t, n) {
484
+ const e = t.source.body.codePointAt(n);
485
+ if (e === void 0)
500
486
  return a.EOF;
501
- if (n >= 32 && n <= 126) {
502
- const i = String.fromCodePoint(n);
487
+ if (e >= 32 && e <= 126) {
488
+ const i = String.fromCodePoint(e);
503
489
  return i === '"' ? `'"'` : `"${i}"`;
504
490
  }
505
- return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
491
+ return "U+" + e.toString(16).toUpperCase().padStart(4, "0");
506
492
  }
507
- function T(e, t, n, i, r) {
508
- const s = e.line, o = 1 + n - e.lineStart;
509
- return new be(t, n, i, s, o, r);
493
+ function g(t, n, e, i, r) {
494
+ const s = t.line, o = 1 + e - t.lineStart;
495
+ return new de(n, e, i, s, o, r);
510
496
  }
511
- function et(e, t) {
512
- const n = e.source.body, i = n.length;
513
- let r = t;
497
+ function Fe(t, n) {
498
+ const e = t.source.body, i = e.length;
499
+ let r = n;
514
500
  for (; r < i; ) {
515
- const s = n.charCodeAt(r);
501
+ const s = e.charCodeAt(r);
516
502
  switch (s) {
517
503
  // Ignored ::
518
504
  // - UnicodeBOM
@@ -542,14 +528,14 @@ function et(e, t) {
542
528
  // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
543
529
  // - "Carriage Return (U+000D)" "New Line (U+000A)"
544
530
  case 10:
545
- ++r, ++e.line, e.lineStart = r;
531
+ ++r, ++t.line, t.lineStart = r;
546
532
  continue;
547
533
  case 13:
548
- n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
534
+ e.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++t.line, t.lineStart = r;
549
535
  continue;
550
536
  // Comment
551
537
  case 35:
552
- return tt(e, r);
538
+ return $e(t, r);
553
539
  // Token ::
554
540
  // - Punctuator
555
541
  // - Name
@@ -559,207 +545,207 @@ function et(e, t) {
559
545
  //
560
546
  // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
561
547
  case 33:
562
- return T(e, a.BANG, r, r + 1);
548
+ return g(t, a.BANG, r, r + 1);
563
549
  case 36:
564
- return T(e, a.DOLLAR, r, r + 1);
550
+ return g(t, a.DOLLAR, r, r + 1);
565
551
  case 38:
566
- return T(e, a.AMP, r, r + 1);
552
+ return g(t, a.AMP, r, r + 1);
567
553
  case 40:
568
- return T(e, a.PAREN_L, r, r + 1);
554
+ return g(t, a.PAREN_L, r, r + 1);
569
555
  case 41:
570
- return T(e, a.PAREN_R, r, r + 1);
556
+ return g(t, a.PAREN_R, r, r + 1);
571
557
  case 46:
572
- if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
573
- return T(e, a.SPREAD, r, r + 3);
558
+ if (e.charCodeAt(r + 1) === 46 && e.charCodeAt(r + 2) === 46)
559
+ return g(t, a.SPREAD, r, r + 3);
574
560
  break;
575
561
  case 58:
576
- return T(e, a.COLON, r, r + 1);
562
+ return g(t, a.COLON, r, r + 1);
577
563
  case 61:
578
- return T(e, a.EQUALS, r, r + 1);
564
+ return g(t, a.EQUALS, r, r + 1);
579
565
  case 64:
580
- return T(e, a.AT, r, r + 1);
566
+ return g(t, a.AT, r, r + 1);
581
567
  case 91:
582
- return T(e, a.BRACKET_L, r, r + 1);
568
+ return g(t, a.BRACKET_L, r, r + 1);
583
569
  case 93:
584
- return T(e, a.BRACKET_R, r, r + 1);
570
+ return g(t, a.BRACKET_R, r, r + 1);
585
571
  case 123:
586
- return T(e, a.BRACE_L, r, r + 1);
572
+ return g(t, a.BRACE_L, r, r + 1);
587
573
  case 124:
588
- return T(e, a.PIPE, r, r + 1);
574
+ return g(t, a.PIPE, r, r + 1);
589
575
  case 125:
590
- return T(e, a.BRACE_R, r, r + 1);
576
+ return g(t, a.BRACE_R, r, r + 1);
591
577
  // StringValue
592
578
  case 34:
593
- return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? ot(e, r) : it(e, r);
579
+ return e.charCodeAt(r + 1) === 34 && e.charCodeAt(r + 2) === 34 ? qe(t, r) : Ve(t, r);
594
580
  }
595
- if (U(s) || s === 45)
596
- return nt(e, r, s);
597
- if (Ce(s))
598
- return ct(e, r);
599
- throw v(
600
- e.source,
581
+ if (S(s) || s === 45)
582
+ return Be(t, r, s);
583
+ if (le(s))
584
+ return Ge(t, r);
585
+ throw I(
586
+ t.source,
601
587
  r,
602
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : F(s) || X(n, r) ? `Unexpected character: ${R(e, r)}.` : `Invalid character: ${R(e, r)}.`
588
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : P(s) || B(e, r) ? `Unexpected character: ${N(t, r)}.` : `Invalid character: ${N(t, r)}.`
603
589
  );
604
590
  }
605
- return T(e, a.EOF, i, i);
591
+ return g(t, a.EOF, i, i);
606
592
  }
607
- function tt(e, t) {
608
- const n = e.source.body, i = n.length;
609
- let r = t + 1;
593
+ function $e(t, n) {
594
+ const e = t.source.body, i = e.length;
595
+ let r = n + 1;
610
596
  for (; r < i; ) {
611
- const s = n.charCodeAt(r);
597
+ const s = e.charCodeAt(r);
612
598
  if (s === 10 || s === 13)
613
599
  break;
614
- if (F(s))
600
+ if (P(s))
615
601
  ++r;
616
- else if (X(n, r))
602
+ else if (B(e, r))
617
603
  r += 2;
618
604
  else
619
605
  break;
620
606
  }
621
- return T(
622
- e,
623
- a.COMMENT,
607
+ return g(
624
608
  t,
609
+ a.COMMENT,
610
+ n,
625
611
  r,
626
- n.slice(t + 1, r)
612
+ e.slice(n + 1, r)
627
613
  );
628
614
  }
629
- function nt(e, t, n) {
630
- const i = e.source.body;
631
- let r = t, s = n, o = !1;
615
+ function Be(t, n, e) {
616
+ const i = t.source.body;
617
+ let r = n, s = e, o = !1;
632
618
  if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
633
- if (s = i.charCodeAt(++r), U(s))
634
- throw v(
635
- e.source,
619
+ if (s = i.charCodeAt(++r), S(s))
620
+ throw I(
621
+ t.source,
636
622
  r,
637
- `Invalid number, unexpected digit after 0: ${R(
638
- e,
623
+ `Invalid number, unexpected digit after 0: ${N(
624
+ t,
639
625
  r
640
626
  )}.`
641
627
  );
642
628
  } 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 || Ce(s))
645
- throw v(
646
- e.source,
629
+ r = M(t, r, s), s = i.charCodeAt(r);
630
+ if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = M(t, 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 = M(t, r, s), s = i.charCodeAt(r)), s === 46 || le(s))
631
+ throw I(
632
+ t.source,
647
633
  r,
648
- `Invalid number, expected digit but got: ${R(
649
- e,
634
+ `Invalid number, expected digit but got: ${N(
635
+ t,
650
636
  r
651
637
  )}.`
652
638
  );
653
- return T(
654
- e,
655
- o ? a.FLOAT : a.INT,
639
+ return g(
656
640
  t,
641
+ o ? a.FLOAT : a.INT,
642
+ n,
657
643
  r,
658
- i.slice(t, r)
644
+ i.slice(n, r)
659
645
  );
660
646
  }
661
- function ee(e, t, n) {
662
- if (!U(n))
663
- throw v(
664
- e.source,
665
- t,
666
- `Invalid number, expected digit but got: ${R(
667
- e,
668
- t
647
+ function M(t, n, e) {
648
+ if (!S(e))
649
+ throw I(
650
+ t.source,
651
+ n,
652
+ `Invalid number, expected digit but got: ${N(
653
+ t,
654
+ n
669
655
  )}.`
670
656
  );
671
- const i = e.source.body;
672
- let r = t + 1;
673
- for (; U(i.charCodeAt(r)); )
657
+ const i = t.source.body;
658
+ let r = n + 1;
659
+ for (; S(i.charCodeAt(r)); )
674
660
  ++r;
675
661
  return r;
676
662
  }
677
- function it(e, t) {
678
- const n = e.source.body, i = n.length;
679
- let r = t + 1, s = r, o = "";
663
+ function Ve(t, n) {
664
+ const e = t.source.body, i = e.length;
665
+ let r = n + 1, s = r, o = "";
680
666
  for (; r < i; ) {
681
- const p = n.charCodeAt(r);
682
- if (p === 34)
683
- return o += n.slice(s, r), T(e, a.STRING, t, r + 1, o);
684
- if (p === 92) {
685
- o += n.slice(s, r);
686
- const f = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? rt(e, r) : st(e, r) : at(e, r);
687
- o += f.value, r += f.size, s = r;
667
+ const u = e.charCodeAt(r);
668
+ if (u === 34)
669
+ return o += e.slice(s, r), g(t, a.STRING, n, r + 1, o);
670
+ if (u === 92) {
671
+ o += e.slice(s, r);
672
+ const h = e.charCodeAt(r + 1) === 117 ? e.charCodeAt(r + 2) === 123 ? Ue(t, r) : Me(t, r) : ze(t, r);
673
+ o += h.value, r += h.size, s = r;
688
674
  continue;
689
675
  }
690
- if (p === 10 || p === 13)
676
+ if (u === 10 || u === 13)
691
677
  break;
692
- if (F(p))
678
+ if (P(u))
693
679
  ++r;
694
- else if (X(n, r))
680
+ else if (B(e, r))
695
681
  r += 2;
696
682
  else
697
- throw v(
698
- e.source,
683
+ throw I(
684
+ t.source,
699
685
  r,
700
- `Invalid character within String: ${R(
701
- e,
686
+ `Invalid character within String: ${N(
687
+ t,
702
688
  r
703
689
  )}.`
704
690
  );
705
691
  }
706
- throw v(e.source, r, "Unterminated string.");
692
+ throw I(t.source, r, "Unterminated string.");
707
693
  }
708
- function rt(e, t) {
709
- const n = e.source.body;
694
+ function Ue(t, n) {
695
+ const e = t.source.body;
710
696
  let i = 0, r = 3;
711
697
  for (; r < 12; ) {
712
- const s = n.charCodeAt(t + r++);
698
+ const s = e.charCodeAt(n + r++);
713
699
  if (s === 125) {
714
- if (r < 5 || !F(i))
700
+ if (r < 5 || !P(i))
715
701
  break;
716
702
  return {
717
703
  value: String.fromCodePoint(i),
718
704
  size: r
719
705
  };
720
706
  }
721
- if (i = i << 4 | V(s), i < 0)
707
+ if (i = i << 4 | b(s), i < 0)
722
708
  break;
723
709
  }
724
- throw v(
725
- e.source,
726
- t,
727
- `Invalid Unicode escape sequence: "${n.slice(
728
- t,
729
- t + r
710
+ throw I(
711
+ t.source,
712
+ n,
713
+ `Invalid Unicode escape sequence: "${e.slice(
714
+ n,
715
+ n + r
730
716
  )}".`
731
717
  );
732
718
  }
733
- function st(e, t) {
734
- const n = e.source.body, i = fe(n, t + 2);
735
- if (F(i))
719
+ function Me(t, n) {
720
+ const e = t.source.body, i = W(e, n + 2);
721
+ if (P(i))
736
722
  return {
737
723
  value: String.fromCodePoint(i),
738
724
  size: 6
739
725
  };
740
- if (_e(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
741
- const r = fe(n, t + 8);
742
- if (Le(r))
726
+ if (he(i) && e.charCodeAt(n + 6) === 92 && e.charCodeAt(n + 7) === 117) {
727
+ const r = W(e, n + 8);
728
+ if (pe(r))
743
729
  return {
744
730
  value: String.fromCodePoint(i, r),
745
731
  size: 12
746
732
  };
747
733
  }
748
- throw v(
749
- e.source,
750
- t,
751
- `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
734
+ throw I(
735
+ t.source,
736
+ n,
737
+ `Invalid Unicode escape sequence: "${e.slice(n, n + 6)}".`
752
738
  );
753
739
  }
754
- function fe(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));
740
+ function W(t, n) {
741
+ return b(t.charCodeAt(n)) << 12 | b(t.charCodeAt(n + 1)) << 8 | b(t.charCodeAt(n + 2)) << 4 | b(t.charCodeAt(n + 3));
756
742
  }
757
- function V(e) {
758
- return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
743
+ function b(t) {
744
+ return t >= 48 && t <= 57 ? t - 48 : t >= 65 && t <= 70 ? t - 55 : t >= 97 && t <= 102 ? t - 87 : -1;
759
745
  }
760
- function at(e, t) {
761
- const n = e.source.body;
762
- switch (n.charCodeAt(t + 1)) {
746
+ function ze(t, n) {
747
+ const e = t.source.body;
748
+ switch (e.charCodeAt(n + 1)) {
763
749
  case 34:
764
750
  return {
765
751
  value: '"',
@@ -802,151 +788,151 @@ function at(e, t) {
802
788
  size: 2
803
789
  };
804
790
  }
805
- throw v(
806
- e.source,
807
- t,
808
- `Invalid character escape sequence: "${n.slice(
809
- t,
810
- t + 2
791
+ throw I(
792
+ t.source,
793
+ n,
794
+ `Invalid character escape sequence: "${e.slice(
795
+ n,
796
+ n + 2
811
797
  )}".`
812
798
  );
813
799
  }
814
- function ot(e, t) {
815
- const n = e.source.body, i = n.length;
816
- let r = e.lineStart, s = t + 3, o = s, p = "";
817
- const f = [];
800
+ function qe(t, n) {
801
+ const e = t.source.body, i = e.length;
802
+ let r = t.lineStart, s = n + 3, o = s, u = "";
803
+ const h = [];
818
804
  for (; s < i; ) {
819
- const l = n.charCodeAt(s);
820
- if (l === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
821
- p += n.slice(o, s), f.push(p);
822
- const g = T(
823
- e,
824
- a.BLOCK_STRING,
805
+ const E = e.charCodeAt(s);
806
+ if (E === 34 && e.charCodeAt(s + 1) === 34 && e.charCodeAt(s + 2) === 34) {
807
+ u += e.slice(o, s), h.push(u);
808
+ const m = g(
825
809
  t,
810
+ a.BLOCK_STRING,
811
+ n,
826
812
  s + 3,
827
813
  // Return a string of the lines joined with U+000A.
828
- Je(f).join(`
814
+ _e(h).join(`
829
815
  `)
830
816
  );
831
- return e.line += f.length - 1, e.lineStart = r, g;
817
+ return t.line += h.length - 1, t.lineStart = r, m;
832
818
  }
833
- if (l === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
834
- p += n.slice(o, s), o = s + 1, s += 4;
819
+ if (E === 92 && e.charCodeAt(s + 1) === 34 && e.charCodeAt(s + 2) === 34 && e.charCodeAt(s + 3) === 34) {
820
+ u += e.slice(o, s), o = s + 1, s += 4;
835
821
  continue;
836
822
  }
837
- if (l === 10 || l === 13) {
838
- p += n.slice(o, s), f.push(p), l === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, p = "", o = s, r = s;
823
+ if (E === 10 || E === 13) {
824
+ u += e.slice(o, s), h.push(u), E === 13 && e.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, r = s;
839
825
  continue;
840
826
  }
841
- if (F(l))
827
+ if (P(E))
842
828
  ++s;
843
- else if (X(n, s))
829
+ else if (B(e, s))
844
830
  s += 2;
845
831
  else
846
- throw v(
847
- e.source,
832
+ throw I(
833
+ t.source,
848
834
  s,
849
- `Invalid character within String: ${R(
850
- e,
835
+ `Invalid character within String: ${N(
836
+ t,
851
837
  s
852
838
  )}.`
853
839
  );
854
840
  }
855
- throw v(e.source, s, "Unterminated string.");
841
+ throw I(t.source, s, "Unterminated string.");
856
842
  }
857
- function ct(e, t) {
858
- const n = e.source.body, i = n.length;
859
- let r = t + 1;
843
+ function Ge(t, n) {
844
+ const e = t.source.body, i = e.length;
845
+ let r = n + 1;
860
846
  for (; r < i; ) {
861
- const s = n.charCodeAt(r);
862
- if (Qe(s))
847
+ const s = e.charCodeAt(r);
848
+ if (Ce(s))
863
849
  ++r;
864
850
  else
865
851
  break;
866
852
  }
867
- return T(
868
- e,
869
- a.NAME,
853
+ return g(
870
854
  t,
855
+ a.NAME,
856
+ n,
871
857
  r,
872
- n.slice(t, r)
858
+ e.slice(n, r)
873
859
  );
874
860
  }
875
- const dt = 10, Re = 2;
876
- function de(e) {
877
- return W(e, []);
861
+ const je = 10, me = 2;
862
+ function fe(t) {
863
+ return V(t, []);
878
864
  }
879
- function W(e, t) {
880
- switch (typeof e) {
865
+ function V(t, n) {
866
+ switch (typeof t) {
881
867
  case "string":
882
- return JSON.stringify(e);
868
+ return JSON.stringify(t);
883
869
  case "function":
884
- return e.name ? `[function ${e.name}]` : "[function]";
870
+ return t.name ? `[function ${t.name}]` : "[function]";
885
871
  case "object":
886
- return ut(e, t);
872
+ return Ye(t, n);
887
873
  default:
888
- return String(e);
874
+ return String(t);
889
875
  }
890
876
  }
891
- function ut(e, t) {
892
- if (e === null)
877
+ function Ye(t, n) {
878
+ if (t === null)
893
879
  return "null";
894
- if (t.includes(e))
880
+ if (n.includes(t))
895
881
  return "[Circular]";
896
- const n = [...t, e];
897
- if (lt(e)) {
898
- const i = e.toJSON();
899
- if (i !== e)
900
- return typeof i == "string" ? i : W(i, n);
901
- } else if (Array.isArray(e))
902
- return ht(e, n);
903
- return pt(e, n);
904
- }
905
- function lt(e) {
906
- return typeof e.toJSON == "function";
907
- }
908
- function pt(e, t) {
909
- const n = Object.entries(e);
910
- return n.length === 0 ? "{}" : t.length > Re ? "[" + ft(e) + "]" : "{ " + n.map(
911
- ([r, s]) => r + ": " + W(s, t)
882
+ const e = [...n, t];
883
+ if (He(t)) {
884
+ const i = t.toJSON();
885
+ if (i !== t)
886
+ return typeof i == "string" ? i : V(i, e);
887
+ } else if (Array.isArray(t))
888
+ return Qe(t, e);
889
+ return Je(t, e);
890
+ }
891
+ function He(t) {
892
+ return typeof t.toJSON == "function";
893
+ }
894
+ function Je(t, n) {
895
+ const e = Object.entries(t);
896
+ return e.length === 0 ? "{}" : n.length > me ? "[" + Xe(t) + "]" : "{ " + e.map(
897
+ ([r, s]) => r + ": " + V(s, n)
912
898
  ).join(", ") + " }";
913
899
  }
914
- function ht(e, t) {
915
- if (e.length === 0)
900
+ function Qe(t, n) {
901
+ if (t.length === 0)
916
902
  return "[]";
917
- if (t.length > Re)
903
+ if (n.length > me)
918
904
  return "[Array]";
919
- const n = Math.min(dt, e.length), i = e.length - n, r = [];
920
- for (let s = 0; s < n; ++s)
921
- r.push(W(e[s], t));
905
+ const e = Math.min(je, t.length), i = t.length - e, r = [];
906
+ for (let s = 0; s < e; ++s)
907
+ r.push(V(t[s], n));
922
908
  return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
923
909
  }
924
- function ft(e) {
925
- const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
926
- if (t === "Object" && typeof e.constructor == "function") {
927
- const n = e.constructor.name;
928
- if (typeof n == "string" && n !== "")
929
- return n;
910
+ function Xe(t) {
911
+ const n = Object.prototype.toString.call(t).replace(/^\[object /, "").replace(/]$/, "");
912
+ if (n === "Object" && typeof t.constructor == "function") {
913
+ const e = t.constructor.name;
914
+ if (typeof e == "string" && e !== "")
915
+ return e;
930
916
  }
931
- return t;
917
+ return n;
932
918
  }
933
- const mt = globalThis.process && // eslint-disable-next-line no-undef
934
- process.env.NODE_ENV === "production", gt = (
919
+ const We = globalThis.process && // eslint-disable-next-line no-undef
920
+ process.env.NODE_ENV === "production", Ze = (
935
921
  /* c8 ignore next 6 */
936
922
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
937
- mt ? function(t, n) {
938
- return t instanceof n;
939
- } : function(t, n) {
940
- if (t instanceof n)
923
+ We ? function(n, e) {
924
+ return n instanceof e;
925
+ } : function(n, e) {
926
+ if (n instanceof e)
941
927
  return !0;
942
- if (typeof t == "object" && t !== null) {
928
+ if (typeof n == "object" && n !== null) {
943
929
  var i;
944
- const r = n.prototype[Symbol.toStringTag], s = (
930
+ const r = e.prototype[Symbol.toStringTag], s = (
945
931
  // 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
932
+ Symbol.toStringTag in n ? n[Symbol.toStringTag] : (i = n.constructor) === null || i === void 0 ? void 0 : i.name
947
933
  );
948
934
  if (r === s) {
949
- const o = de(t);
935
+ const o = fe(n);
950
936
  throw new Error(`Cannot use ${r} "${o}" from another module or realm.
951
937
 
952
938
  Ensure that there is only one instance of "graphql" in the node_modules
@@ -964,15 +950,15 @@ spurious results.`);
964
950
  return !1;
965
951
  }
966
952
  );
967
- class we {
968
- constructor(t, n = "GraphQL request", i = {
953
+ class ge {
954
+ constructor(n, e = "GraphQL request", i = {
969
955
  line: 1,
970
956
  column: 1
971
957
  }) {
972
- typeof t == "string" || z(!1, `Body must be a string. Received: ${de(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || z(
958
+ typeof n == "string" || U(!1, `Body must be a string. Received: ${fe(n)}.`), this.body = n, this.name = e, this.locationOffset = i, this.locationOffset.line > 0 || U(
973
959
  !1,
974
960
  "line in locationOffset is 1-indexed and must be positive."
975
- ), this.locationOffset.column > 0 || z(
961
+ ), this.locationOffset.column > 0 || U(
976
962
  !1,
977
963
  "column in locationOffset is 1-indexed and must be positive."
978
964
  );
@@ -981,24 +967,24 @@ class we {
981
967
  return "Source";
982
968
  }
983
969
  }
984
- function It(e) {
985
- return gt(e, we);
970
+ function Ke(t) {
971
+ return Ze(t, ge);
986
972
  }
987
- function Et(e, t) {
988
- const n = new yt(e, t), i = n.parseDocument();
973
+ function et(t, n) {
974
+ const e = new tt(t, n), i = e.parseDocument();
989
975
  return Object.defineProperty(i, "tokenCount", {
990
976
  enumerable: !1,
991
- value: n.tokenCount
977
+ value: e.tokenCount
992
978
  }), i;
993
979
  }
994
- class yt {
995
- constructor(t, n = {}) {
996
- const { lexer: i, ...r } = n;
980
+ class tt {
981
+ constructor(n, e = {}) {
982
+ const { lexer: i, ...r } = e;
997
983
  if (i)
998
984
  this._lexer = i;
999
985
  else {
1000
- const s = It(t) ? t : new we(t);
1001
- this._lexer = new Ze(s);
986
+ const s = Ke(n) ? n : new ge(n);
987
+ this._lexer = new Re(s);
1002
988
  }
1003
989
  this._options = r, this._tokenCounter = 0;
1004
990
  }
@@ -1009,10 +995,10 @@ class yt {
1009
995
  * Converts a name lex token into a name parse node.
1010
996
  */
1011
997
  parseName() {
1012
- const t = this.expectToken(a.NAME);
1013
- return this.node(t, {
1014
- kind: u.NAME,
1015
- value: t.value
998
+ const n = this.expectToken(a.NAME);
999
+ return this.node(n, {
1000
+ kind: c.NAME,
1001
+ value: n.value
1016
1002
  });
1017
1003
  }
1018
1004
  // Implements the parsing rules in the Document section.
@@ -1021,7 +1007,7 @@ class yt {
1021
1007
  */
1022
1008
  parseDocument() {
1023
1009
  return this.node(this._lexer.token, {
1024
- kind: u.DOCUMENT,
1010
+ kind: c.DOCUMENT,
1025
1011
  definitions: this.many(
1026
1012
  a.SOF,
1027
1013
  this.parseDefinition,
@@ -1055,15 +1041,15 @@ class yt {
1055
1041
  parseDefinition() {
1056
1042
  if (this.peek(a.BRACE_L))
1057
1043
  return this.parseOperationDefinition();
1058
- const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
1059
- if (t && n.kind === a.BRACE_L)
1060
- throw v(
1044
+ const n = this.peekDescription(), e = n ? this._lexer.lookahead() : this._lexer.token;
1045
+ if (n && e.kind === a.BRACE_L)
1046
+ throw I(
1061
1047
  this._lexer.source,
1062
1048
  this._lexer.token.start,
1063
1049
  "Unexpected description, descriptions are not supported on shorthand queries."
1064
1050
  );
1065
- if (n.kind === a.NAME) {
1066
- switch (n.value) {
1051
+ if (e.kind === a.NAME) {
1052
+ switch (e.value) {
1067
1053
  case "schema":
1068
1054
  return this.parseSchemaDefinition();
1069
1055
  case "scalar":
@@ -1081,7 +1067,7 @@ class yt {
1081
1067
  case "directive":
1082
1068
  return this.parseDirectiveDefinition();
1083
1069
  }
1084
- switch (n.value) {
1070
+ switch (e.value) {
1085
1071
  case "query":
1086
1072
  case "mutation":
1087
1073
  case "subscription":
@@ -1089,16 +1075,16 @@ class yt {
1089
1075
  case "fragment":
1090
1076
  return this.parseFragmentDefinition();
1091
1077
  }
1092
- if (t)
1093
- throw v(
1078
+ if (n)
1079
+ throw I(
1094
1080
  this._lexer.source,
1095
1081
  this._lexer.token.start,
1096
1082
  "Unexpected description, only GraphQL definitions support descriptions."
1097
1083
  );
1098
- if (n.value === "extend")
1084
+ if (e.value === "extend")
1099
1085
  return this.parseTypeSystemExtension();
1100
1086
  }
1101
- throw this.unexpected(n);
1087
+ throw this.unexpected(e);
1102
1088
  }
1103
1089
  // Implements the parsing rules in the Operations section.
1104
1090
  /**
@@ -1107,23 +1093,23 @@ class yt {
1107
1093
  * - OperationType Name? VariableDefinitions? Directives? SelectionSet
1108
1094
  */
1109
1095
  parseOperationDefinition() {
1110
- const t = this._lexer.token;
1096
+ const n = this._lexer.token;
1111
1097
  if (this.peek(a.BRACE_L))
1112
- return this.node(t, {
1113
- kind: u.OPERATION_DEFINITION,
1114
- operation: w.QUERY,
1098
+ return this.node(n, {
1099
+ kind: c.OPERATION_DEFINITION,
1100
+ operation: D.QUERY,
1115
1101
  description: void 0,
1116
1102
  name: void 0,
1117
1103
  variableDefinitions: [],
1118
1104
  directives: [],
1119
1105
  selectionSet: this.parseSelectionSet()
1120
1106
  });
1121
- const n = this.parseDescription(), i = this.parseOperationType();
1107
+ const e = this.parseDescription(), i = this.parseOperationType();
1122
1108
  let r;
1123
- return this.peek(a.NAME) && (r = this.parseName()), this.node(t, {
1124
- kind: u.OPERATION_DEFINITION,
1109
+ return this.peek(a.NAME) && (r = this.parseName()), this.node(n, {
1110
+ kind: c.OPERATION_DEFINITION,
1125
1111
  operation: i,
1126
- description: n,
1112
+ description: e,
1127
1113
  name: r,
1128
1114
  variableDefinitions: this.parseVariableDefinitions(),
1129
1115
  directives: this.parseDirectives(!1),
@@ -1134,16 +1120,16 @@ class yt {
1134
1120
  * OperationType : one of query mutation subscription
1135
1121
  */
1136
1122
  parseOperationType() {
1137
- const t = this.expectToken(a.NAME);
1138
- switch (t.value) {
1123
+ const n = this.expectToken(a.NAME);
1124
+ switch (n.value) {
1139
1125
  case "query":
1140
- return w.QUERY;
1126
+ return D.QUERY;
1141
1127
  case "mutation":
1142
- return w.MUTATION;
1128
+ return D.MUTATION;
1143
1129
  case "subscription":
1144
- return w.SUBSCRIPTION;
1130
+ return D.SUBSCRIPTION;
1145
1131
  }
1146
- throw this.unexpected(t);
1132
+ throw this.unexpected(n);
1147
1133
  }
1148
1134
  /**
1149
1135
  * VariableDefinitions : ( VariableDefinition+ )
@@ -1160,7 +1146,7 @@ class yt {
1160
1146
  */
1161
1147
  parseVariableDefinition() {
1162
1148
  return this.node(this._lexer.token, {
1163
- kind: u.VARIABLE_DEFINITION,
1149
+ kind: c.VARIABLE_DEFINITION,
1164
1150
  description: this.parseDescription(),
1165
1151
  variable: this.parseVariable(),
1166
1152
  type: (this.expectToken(a.COLON), this.parseTypeReference()),
@@ -1172,9 +1158,9 @@ class yt {
1172
1158
  * Variable : $ Name
1173
1159
  */
1174
1160
  parseVariable() {
1175
- const t = this._lexer.token;
1176
- return this.expectToken(a.DOLLAR), this.node(t, {
1177
- kind: u.VARIABLE,
1161
+ const n = this._lexer.token;
1162
+ return this.expectToken(a.DOLLAR), this.node(n, {
1163
+ kind: c.VARIABLE,
1178
1164
  name: this.parseName()
1179
1165
  });
1180
1166
  }
@@ -1185,7 +1171,7 @@ class yt {
1185
1171
  */
1186
1172
  parseSelectionSet() {
1187
1173
  return this.node(this._lexer.token, {
1188
- kind: u.SELECTION_SET,
1174
+ kind: c.SELECTION_SET,
1189
1175
  selections: this.many(
1190
1176
  a.BRACE_L,
1191
1177
  this.parseSelection,
@@ -1208,10 +1194,10 @@ class yt {
1208
1194
  * Alias : Name :
1209
1195
  */
1210
1196
  parseField() {
1211
- const t = this._lexer.token, n = this.parseName();
1197
+ const n = this._lexer.token, e = this.parseName();
1212
1198
  let i, r;
1213
- return this.expectOptionalToken(a.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1214
- kind: u.FIELD,
1199
+ return this.expectOptionalToken(a.COLON) ? (i = e, r = this.parseName()) : r = e, this.node(n, {
1200
+ kind: c.FIELD,
1215
1201
  alias: i,
1216
1202
  name: r,
1217
1203
  arguments: this.parseArguments(!1),
@@ -1222,19 +1208,19 @@ class yt {
1222
1208
  /**
1223
1209
  * Arguments[Const] : ( Argument[?Const]+ )
1224
1210
  */
1225
- parseArguments(t) {
1226
- const n = t ? this.parseConstArgument : this.parseArgument;
1227
- return this.optionalMany(a.PAREN_L, n, a.PAREN_R);
1211
+ parseArguments(n) {
1212
+ const e = n ? this.parseConstArgument : this.parseArgument;
1213
+ return this.optionalMany(a.PAREN_L, e, a.PAREN_R);
1228
1214
  }
1229
1215
  /**
1230
1216
  * Argument[Const] : Name : Value[?Const]
1231
1217
  */
1232
- parseArgument(t = !1) {
1233
- const n = this._lexer.token, i = this.parseName();
1234
- return this.expectToken(a.COLON), this.node(n, {
1235
- kind: u.ARGUMENT,
1218
+ parseArgument(n = !1) {
1219
+ const e = this._lexer.token, i = this.parseName();
1220
+ return this.expectToken(a.COLON), this.node(e, {
1221
+ kind: c.ARGUMENT,
1236
1222
  name: i,
1237
- value: this.parseValueLiteral(t)
1223
+ value: this.parseValueLiteral(n)
1238
1224
  });
1239
1225
  }
1240
1226
  parseConstArgument() {
@@ -1249,16 +1235,16 @@ class yt {
1249
1235
  * InlineFragment : ... TypeCondition? Directives? SelectionSet
1250
1236
  */
1251
1237
  parseFragment() {
1252
- const t = this._lexer.token;
1238
+ const n = this._lexer.token;
1253
1239
  this.expectToken(a.SPREAD);
1254
- const n = this.expectOptionalKeyword("on");
1255
- return !n && this.peek(a.NAME) ? this.node(t, {
1256
- kind: u.FRAGMENT_SPREAD,
1240
+ const e = this.expectOptionalKeyword("on");
1241
+ return !e && this.peek(a.NAME) ? this.node(n, {
1242
+ kind: c.FRAGMENT_SPREAD,
1257
1243
  name: this.parseFragmentName(),
1258
1244
  directives: this.parseDirectives(!1)
1259
- }) : this.node(t, {
1260
- kind: u.INLINE_FRAGMENT,
1261
- typeCondition: n ? this.parseNamedType() : void 0,
1245
+ }) : this.node(n, {
1246
+ kind: c.INLINE_FRAGMENT,
1247
+ typeCondition: e ? this.parseNamedType() : void 0,
1262
1248
  directives: this.parseDirectives(!1),
1263
1249
  selectionSet: this.parseSelectionSet()
1264
1250
  });
@@ -1270,18 +1256,18 @@ class yt {
1270
1256
  * TypeCondition : NamedType
1271
1257
  */
1272
1258
  parseFragmentDefinition() {
1273
- const t = this._lexer.token, n = this.parseDescription();
1274
- return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, {
1275
- kind: u.FRAGMENT_DEFINITION,
1276
- description: n,
1259
+ const n = this._lexer.token, e = this.parseDescription();
1260
+ return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(n, {
1261
+ kind: c.FRAGMENT_DEFINITION,
1262
+ description: e,
1277
1263
  name: this.parseFragmentName(),
1278
1264
  variableDefinitions: this.parseVariableDefinitions(),
1279
1265
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1280
1266
  directives: this.parseDirectives(!1),
1281
1267
  selectionSet: this.parseSelectionSet()
1282
- }) : this.node(t, {
1283
- kind: u.FRAGMENT_DEFINITION,
1284
- description: n,
1268
+ }) : this.node(n, {
1269
+ kind: c.FRAGMENT_DEFINITION,
1270
+ description: e,
1285
1271
  name: this.parseFragmentName(),
1286
1272
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1287
1273
  directives: this.parseDirectives(!1),
@@ -1315,59 +1301,59 @@ class yt {
1315
1301
  *
1316
1302
  * EnumValue : Name but not `true`, `false` or `null`
1317
1303
  */
1318
- parseValueLiteral(t) {
1319
- const n = this._lexer.token;
1320
- switch (n.kind) {
1304
+ parseValueLiteral(n) {
1305
+ const e = this._lexer.token;
1306
+ switch (e.kind) {
1321
1307
  case a.BRACKET_L:
1322
- return this.parseList(t);
1308
+ return this.parseList(n);
1323
1309
  case a.BRACE_L:
1324
- return this.parseObject(t);
1310
+ return this.parseObject(n);
1325
1311
  case a.INT:
1326
- return this.advanceLexer(), this.node(n, {
1327
- kind: u.INT,
1328
- value: n.value
1312
+ return this.advanceLexer(), this.node(e, {
1313
+ kind: c.INT,
1314
+ value: e.value
1329
1315
  });
1330
1316
  case a.FLOAT:
1331
- return this.advanceLexer(), this.node(n, {
1332
- kind: u.FLOAT,
1333
- value: n.value
1317
+ return this.advanceLexer(), this.node(e, {
1318
+ kind: c.FLOAT,
1319
+ value: e.value
1334
1320
  });
1335
1321
  case a.STRING:
1336
1322
  case a.BLOCK_STRING:
1337
1323
  return this.parseStringLiteral();
1338
1324
  case a.NAME:
1339
- switch (this.advanceLexer(), n.value) {
1325
+ switch (this.advanceLexer(), e.value) {
1340
1326
  case "true":
1341
- return this.node(n, {
1342
- kind: u.BOOLEAN,
1327
+ return this.node(e, {
1328
+ kind: c.BOOLEAN,
1343
1329
  value: !0
1344
1330
  });
1345
1331
  case "false":
1346
- return this.node(n, {
1347
- kind: u.BOOLEAN,
1332
+ return this.node(e, {
1333
+ kind: c.BOOLEAN,
1348
1334
  value: !1
1349
1335
  });
1350
1336
  case "null":
1351
- return this.node(n, {
1352
- kind: u.NULL
1337
+ return this.node(e, {
1338
+ kind: c.NULL
1353
1339
  });
1354
1340
  default:
1355
- return this.node(n, {
1356
- kind: u.ENUM,
1357
- value: n.value
1341
+ return this.node(e, {
1342
+ kind: c.ENUM,
1343
+ value: e.value
1358
1344
  });
1359
1345
  }
1360
1346
  case a.DOLLAR:
1361
- if (t)
1347
+ if (n)
1362
1348
  if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
1363
1349
  const i = this._lexer.token.value;
1364
- throw v(
1350
+ throw I(
1365
1351
  this._lexer.source,
1366
- n.start,
1352
+ e.start,
1367
1353
  `Unexpected variable "$${i}" in constant value.`
1368
1354
  );
1369
1355
  } else
1370
- throw this.unexpected(n);
1356
+ throw this.unexpected(e);
1371
1357
  return this.parseVariable();
1372
1358
  default:
1373
1359
  throw this.unexpected();
@@ -1377,11 +1363,11 @@ class yt {
1377
1363
  return this.parseValueLiteral(!0);
1378
1364
  }
1379
1365
  parseStringLiteral() {
1380
- const t = this._lexer.token;
1381
- return this.advanceLexer(), this.node(t, {
1382
- kind: u.STRING,
1383
- value: t.value,
1384
- block: t.kind === a.BLOCK_STRING
1366
+ const n = this._lexer.token;
1367
+ return this.advanceLexer(), this.node(n, {
1368
+ kind: c.STRING,
1369
+ value: n.value,
1370
+ block: n.kind === a.BLOCK_STRING
1385
1371
  });
1386
1372
  }
1387
1373
  /**
@@ -1389,11 +1375,11 @@ class yt {
1389
1375
  * - [ ]
1390
1376
  * - [ Value[?Const]+ ]
1391
1377
  */
1392
- parseList(t) {
1393
- const n = () => this.parseValueLiteral(t);
1378
+ parseList(n) {
1379
+ const e = () => this.parseValueLiteral(n);
1394
1380
  return this.node(this._lexer.token, {
1395
- kind: u.LIST,
1396
- values: this.any(a.BRACKET_L, n, a.BRACKET_R)
1381
+ kind: c.LIST,
1382
+ values: this.any(a.BRACKET_L, e, a.BRACKET_R)
1397
1383
  });
1398
1384
  }
1399
1385
  /**
@@ -1403,33 +1389,33 @@ class yt {
1403
1389
  * - { ObjectField[?Const]+ }
1404
1390
  * ```
1405
1391
  */
1406
- parseObject(t) {
1407
- const n = () => this.parseObjectField(t);
1392
+ parseObject(n) {
1393
+ const e = () => this.parseObjectField(n);
1408
1394
  return this.node(this._lexer.token, {
1409
- kind: u.OBJECT,
1410
- fields: this.any(a.BRACE_L, n, a.BRACE_R)
1395
+ kind: c.OBJECT,
1396
+ fields: this.any(a.BRACE_L, e, a.BRACE_R)
1411
1397
  });
1412
1398
  }
1413
1399
  /**
1414
1400
  * ObjectField[Const] : Name : Value[?Const]
1415
1401
  */
1416
- parseObjectField(t) {
1417
- const n = this._lexer.token, i = this.parseName();
1418
- return this.expectToken(a.COLON), this.node(n, {
1419
- kind: u.OBJECT_FIELD,
1402
+ parseObjectField(n) {
1403
+ const e = this._lexer.token, i = this.parseName();
1404
+ return this.expectToken(a.COLON), this.node(e, {
1405
+ kind: c.OBJECT_FIELD,
1420
1406
  name: i,
1421
- value: this.parseValueLiteral(t)
1407
+ value: this.parseValueLiteral(n)
1422
1408
  });
1423
1409
  }
1424
1410
  // Implements the parsing rules in the Directives section.
1425
1411
  /**
1426
1412
  * Directives[Const] : Directive[?Const]+
1427
1413
  */
1428
- parseDirectives(t) {
1429
- const n = [];
1414
+ parseDirectives(n) {
1415
+ const e = [];
1430
1416
  for (; this.peek(a.AT); )
1431
- n.push(this.parseDirective(t));
1432
- return n;
1417
+ e.push(this.parseDirective(n));
1418
+ return e;
1433
1419
  }
1434
1420
  parseConstDirectives() {
1435
1421
  return this.parseDirectives(!0);
@@ -1439,12 +1425,12 @@ class yt {
1439
1425
  * Directive[Const] : @ Name Arguments[?Const]?
1440
1426
  * ```
1441
1427
  */
1442
- parseDirective(t) {
1443
- const n = this._lexer.token;
1444
- return this.expectToken(a.AT), this.node(n, {
1445
- kind: u.DIRECTIVE,
1428
+ parseDirective(n) {
1429
+ const e = this._lexer.token;
1430
+ return this.expectToken(a.AT), this.node(e, {
1431
+ kind: c.DIRECTIVE,
1446
1432
  name: this.parseName(),
1447
- arguments: this.parseArguments(t)
1433
+ arguments: this.parseArguments(n)
1448
1434
  });
1449
1435
  }
1450
1436
  // Implements the parsing rules in the Types section.
@@ -1455,27 +1441,27 @@ class yt {
1455
1441
  * - NonNullType
1456
1442
  */
1457
1443
  parseTypeReference() {
1458
- const t = this._lexer.token;
1459
- let n;
1444
+ const n = this._lexer.token;
1445
+ let e;
1460
1446
  if (this.expectOptionalToken(a.BRACKET_L)) {
1461
1447
  const i = this.parseTypeReference();
1462
- this.expectToken(a.BRACKET_R), n = this.node(t, {
1463
- kind: u.LIST_TYPE,
1448
+ this.expectToken(a.BRACKET_R), e = this.node(n, {
1449
+ kind: c.LIST_TYPE,
1464
1450
  type: i
1465
1451
  });
1466
1452
  } else
1467
- n = this.parseNamedType();
1468
- return this.expectOptionalToken(a.BANG) ? this.node(t, {
1469
- kind: u.NON_NULL_TYPE,
1470
- type: n
1471
- }) : n;
1453
+ e = this.parseNamedType();
1454
+ return this.expectOptionalToken(a.BANG) ? this.node(n, {
1455
+ kind: c.NON_NULL_TYPE,
1456
+ type: e
1457
+ }) : e;
1472
1458
  }
1473
1459
  /**
1474
1460
  * NamedType : Name
1475
1461
  */
1476
1462
  parseNamedType() {
1477
1463
  return this.node(this._lexer.token, {
1478
- kind: u.NAMED_TYPE,
1464
+ kind: c.NAMED_TYPE,
1479
1465
  name: this.parseName()
1480
1466
  });
1481
1467
  }
@@ -1496,16 +1482,16 @@ class yt {
1496
1482
  * ```
1497
1483
  */
1498
1484
  parseSchemaDefinition() {
1499
- const t = this._lexer.token, n = this.parseDescription();
1485
+ const n = this._lexer.token, e = this.parseDescription();
1500
1486
  this.expectKeyword("schema");
1501
1487
  const i = this.parseConstDirectives(), r = this.many(
1502
1488
  a.BRACE_L,
1503
1489
  this.parseOperationTypeDefinition,
1504
1490
  a.BRACE_R
1505
1491
  );
1506
- return this.node(t, {
1507
- kind: u.SCHEMA_DEFINITION,
1508
- description: n,
1492
+ return this.node(n, {
1493
+ kind: c.SCHEMA_DEFINITION,
1494
+ description: e,
1509
1495
  directives: i,
1510
1496
  operationTypes: r
1511
1497
  });
@@ -1514,12 +1500,12 @@ class yt {
1514
1500
  * OperationTypeDefinition : OperationType : NamedType
1515
1501
  */
1516
1502
  parseOperationTypeDefinition() {
1517
- const t = this._lexer.token, n = this.parseOperationType();
1503
+ const n = this._lexer.token, e = this.parseOperationType();
1518
1504
  this.expectToken(a.COLON);
1519
1505
  const i = this.parseNamedType();
1520
- return this.node(t, {
1521
- kind: u.OPERATION_TYPE_DEFINITION,
1522
- operation: n,
1506
+ return this.node(n, {
1507
+ kind: c.OPERATION_TYPE_DEFINITION,
1508
+ operation: e,
1523
1509
  type: i
1524
1510
  });
1525
1511
  }
@@ -1527,12 +1513,12 @@ class yt {
1527
1513
  * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
1528
1514
  */
1529
1515
  parseScalarTypeDefinition() {
1530
- const t = this._lexer.token, n = this.parseDescription();
1516
+ const n = this._lexer.token, e = this.parseDescription();
1531
1517
  this.expectKeyword("scalar");
1532
1518
  const i = this.parseName(), r = this.parseConstDirectives();
1533
- return this.node(t, {
1534
- kind: u.SCALAR_TYPE_DEFINITION,
1535
- description: n,
1519
+ return this.node(n, {
1520
+ kind: c.SCALAR_TYPE_DEFINITION,
1521
+ description: e,
1536
1522
  name: i,
1537
1523
  directives: r
1538
1524
  });
@@ -1543,12 +1529,12 @@ class yt {
1543
1529
  * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
1544
1530
  */
1545
1531
  parseObjectTypeDefinition() {
1546
- const t = this._lexer.token, n = this.parseDescription();
1532
+ const n = this._lexer.token, e = this.parseDescription();
1547
1533
  this.expectKeyword("type");
1548
1534
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1549
- return this.node(t, {
1550
- kind: u.OBJECT_TYPE_DEFINITION,
1551
- description: n,
1535
+ return this.node(n, {
1536
+ kind: c.OBJECT_TYPE_DEFINITION,
1537
+ description: e,
1552
1538
  name: i,
1553
1539
  interfaces: r,
1554
1540
  directives: s,
@@ -1580,12 +1566,12 @@ class yt {
1580
1566
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1581
1567
  */
1582
1568
  parseFieldDefinition() {
1583
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1569
+ const n = this._lexer.token, e = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1584
1570
  this.expectToken(a.COLON);
1585
1571
  const s = this.parseTypeReference(), o = this.parseConstDirectives();
1586
- return this.node(t, {
1587
- kind: u.FIELD_DEFINITION,
1588
- description: n,
1572
+ return this.node(n, {
1573
+ kind: c.FIELD_DEFINITION,
1574
+ description: e,
1589
1575
  name: i,
1590
1576
  arguments: r,
1591
1577
  type: s,
@@ -1607,15 +1593,15 @@ class yt {
1607
1593
  * - Description? Name : Type DefaultValue? Directives[Const]?
1608
1594
  */
1609
1595
  parseInputValueDef() {
1610
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1596
+ const n = this._lexer.token, e = this.parseDescription(), i = this.parseName();
1611
1597
  this.expectToken(a.COLON);
1612
1598
  const r = this.parseTypeReference();
1613
1599
  let s;
1614
1600
  this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral());
1615
1601
  const o = this.parseConstDirectives();
1616
- return this.node(t, {
1617
- kind: u.INPUT_VALUE_DEFINITION,
1618
- description: n,
1602
+ return this.node(n, {
1603
+ kind: c.INPUT_VALUE_DEFINITION,
1604
+ description: e,
1619
1605
  name: i,
1620
1606
  type: r,
1621
1607
  defaultValue: s,
@@ -1627,12 +1613,12 @@ class yt {
1627
1613
  * - Description? interface Name Directives[Const]? FieldsDefinition?
1628
1614
  */
1629
1615
  parseInterfaceTypeDefinition() {
1630
- const t = this._lexer.token, n = this.parseDescription();
1616
+ const n = this._lexer.token, e = this.parseDescription();
1631
1617
  this.expectKeyword("interface");
1632
1618
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1633
- return this.node(t, {
1634
- kind: u.INTERFACE_TYPE_DEFINITION,
1635
- description: n,
1619
+ return this.node(n, {
1620
+ kind: c.INTERFACE_TYPE_DEFINITION,
1621
+ description: e,
1636
1622
  name: i,
1637
1623
  interfaces: r,
1638
1624
  directives: s,
@@ -1644,12 +1630,12 @@ class yt {
1644
1630
  * - Description? union Name Directives[Const]? UnionMemberTypes?
1645
1631
  */
1646
1632
  parseUnionTypeDefinition() {
1647
- const t = this._lexer.token, n = this.parseDescription();
1633
+ const n = this._lexer.token, e = this.parseDescription();
1648
1634
  this.expectKeyword("union");
1649
1635
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1650
- return this.node(t, {
1651
- kind: u.UNION_TYPE_DEFINITION,
1652
- description: n,
1636
+ return this.node(n, {
1637
+ kind: c.UNION_TYPE_DEFINITION,
1638
+ description: e,
1653
1639
  name: i,
1654
1640
  directives: r,
1655
1641
  types: s
@@ -1668,12 +1654,12 @@ class yt {
1668
1654
  * - Description? enum Name Directives[Const]? EnumValuesDefinition?
1669
1655
  */
1670
1656
  parseEnumTypeDefinition() {
1671
- const t = this._lexer.token, n = this.parseDescription();
1657
+ const n = this._lexer.token, e = this.parseDescription();
1672
1658
  this.expectKeyword("enum");
1673
1659
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1674
- return this.node(t, {
1675
- kind: u.ENUM_TYPE_DEFINITION,
1676
- description: n,
1660
+ return this.node(n, {
1661
+ kind: c.ENUM_TYPE_DEFINITION,
1662
+ description: e,
1677
1663
  name: i,
1678
1664
  directives: r,
1679
1665
  values: s
@@ -1695,10 +1681,10 @@ class yt {
1695
1681
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1696
1682
  */
1697
1683
  parseEnumValueDefinition() {
1698
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1699
- return this.node(t, {
1700
- kind: u.ENUM_VALUE_DEFINITION,
1701
- description: n,
1684
+ const n = this._lexer.token, e = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1685
+ return this.node(n, {
1686
+ kind: c.ENUM_VALUE_DEFINITION,
1687
+ description: e,
1702
1688
  name: i,
1703
1689
  directives: r
1704
1690
  });
@@ -1708,10 +1694,10 @@ class yt {
1708
1694
  */
1709
1695
  parseEnumValueName() {
1710
1696
  if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
1711
- throw v(
1697
+ throw I(
1712
1698
  this._lexer.source,
1713
1699
  this._lexer.token.start,
1714
- `${q(
1700
+ `${_(
1715
1701
  this._lexer.token
1716
1702
  )} is reserved and cannot be used for an enum value.`
1717
1703
  );
@@ -1722,12 +1708,12 @@ class yt {
1722
1708
  * - Description? input Name Directives[Const]? InputFieldsDefinition?
1723
1709
  */
1724
1710
  parseInputObjectTypeDefinition() {
1725
- const t = this._lexer.token, n = this.parseDescription();
1711
+ const n = this._lexer.token, e = this.parseDescription();
1726
1712
  this.expectKeyword("input");
1727
1713
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1728
- return this.node(t, {
1729
- kind: u.INPUT_OBJECT_TYPE_DEFINITION,
1730
- description: n,
1714
+ return this.node(n, {
1715
+ kind: c.INPUT_OBJECT_TYPE_DEFINITION,
1716
+ description: e,
1731
1717
  name: i,
1732
1718
  directives: r,
1733
1719
  fields: s
@@ -1759,9 +1745,9 @@ class yt {
1759
1745
  * - InputObjectTypeDefinition
1760
1746
  */
1761
1747
  parseTypeSystemExtension() {
1762
- const t = this._lexer.lookahead();
1763
- if (t.kind === a.NAME)
1764
- switch (t.value) {
1748
+ const n = this._lexer.lookahead();
1749
+ if (n.kind === a.NAME)
1750
+ switch (n.value) {
1765
1751
  case "schema":
1766
1752
  return this.parseSchemaExtension();
1767
1753
  case "scalar":
@@ -1777,7 +1763,7 @@ class yt {
1777
1763
  case "input":
1778
1764
  return this.parseInputObjectTypeExtension();
1779
1765
  }
1780
- throw this.unexpected(t);
1766
+ throw this.unexpected(n);
1781
1767
  }
1782
1768
  /**
1783
1769
  * ```
@@ -1787,18 +1773,18 @@ class yt {
1787
1773
  * ```
1788
1774
  */
1789
1775
  parseSchemaExtension() {
1790
- const t = this._lexer.token;
1776
+ const n = this._lexer.token;
1791
1777
  this.expectKeyword("extend"), this.expectKeyword("schema");
1792
- const n = this.parseConstDirectives(), i = this.optionalMany(
1778
+ const e = this.parseConstDirectives(), i = this.optionalMany(
1793
1779
  a.BRACE_L,
1794
1780
  this.parseOperationTypeDefinition,
1795
1781
  a.BRACE_R
1796
1782
  );
1797
- if (n.length === 0 && i.length === 0)
1783
+ if (e.length === 0 && i.length === 0)
1798
1784
  throw this.unexpected();
1799
- return this.node(t, {
1800
- kind: u.SCHEMA_EXTENSION,
1801
- directives: n,
1785
+ return this.node(n, {
1786
+ kind: c.SCHEMA_EXTENSION,
1787
+ directives: e,
1802
1788
  operationTypes: i
1803
1789
  });
1804
1790
  }
@@ -1807,14 +1793,14 @@ class yt {
1807
1793
  * - extend scalar Name Directives[Const]
1808
1794
  */
1809
1795
  parseScalarTypeExtension() {
1810
- const t = this._lexer.token;
1796
+ const n = this._lexer.token;
1811
1797
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1812
- const n = this.parseName(), i = this.parseConstDirectives();
1798
+ const e = this.parseName(), i = this.parseConstDirectives();
1813
1799
  if (i.length === 0)
1814
1800
  throw this.unexpected();
1815
- return this.node(t, {
1816
- kind: u.SCALAR_TYPE_EXTENSION,
1817
- name: n,
1801
+ return this.node(n, {
1802
+ kind: c.SCALAR_TYPE_EXTENSION,
1803
+ name: e,
1818
1804
  directives: i
1819
1805
  });
1820
1806
  }
@@ -1825,14 +1811,14 @@ class yt {
1825
1811
  * - extend type Name ImplementsInterfaces
1826
1812
  */
1827
1813
  parseObjectTypeExtension() {
1828
- const t = this._lexer.token;
1814
+ const n = this._lexer.token;
1829
1815
  this.expectKeyword("extend"), this.expectKeyword("type");
1830
- const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1816
+ const e = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1831
1817
  if (i.length === 0 && r.length === 0 && s.length === 0)
1832
1818
  throw this.unexpected();
1833
- return this.node(t, {
1834
- kind: u.OBJECT_TYPE_EXTENSION,
1835
- name: n,
1819
+ return this.node(n, {
1820
+ kind: c.OBJECT_TYPE_EXTENSION,
1821
+ name: e,
1836
1822
  interfaces: i,
1837
1823
  directives: r,
1838
1824
  fields: s
@@ -1845,14 +1831,14 @@ class yt {
1845
1831
  * - extend interface Name ImplementsInterfaces
1846
1832
  */
1847
1833
  parseInterfaceTypeExtension() {
1848
- const t = this._lexer.token;
1834
+ const n = this._lexer.token;
1849
1835
  this.expectKeyword("extend"), this.expectKeyword("interface");
1850
- const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1836
+ const e = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1851
1837
  if (i.length === 0 && r.length === 0 && s.length === 0)
1852
1838
  throw this.unexpected();
1853
- return this.node(t, {
1854
- kind: u.INTERFACE_TYPE_EXTENSION,
1855
- name: n,
1839
+ return this.node(n, {
1840
+ kind: c.INTERFACE_TYPE_EXTENSION,
1841
+ name: e,
1856
1842
  interfaces: i,
1857
1843
  directives: r,
1858
1844
  fields: s
@@ -1864,14 +1850,14 @@ class yt {
1864
1850
  * - extend union Name Directives[Const]
1865
1851
  */
1866
1852
  parseUnionTypeExtension() {
1867
- const t = this._lexer.token;
1853
+ const n = this._lexer.token;
1868
1854
  this.expectKeyword("extend"), this.expectKeyword("union");
1869
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1855
+ const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1870
1856
  if (i.length === 0 && r.length === 0)
1871
1857
  throw this.unexpected();
1872
- return this.node(t, {
1873
- kind: u.UNION_TYPE_EXTENSION,
1874
- name: n,
1858
+ return this.node(n, {
1859
+ kind: c.UNION_TYPE_EXTENSION,
1860
+ name: e,
1875
1861
  directives: i,
1876
1862
  types: r
1877
1863
  });
@@ -1882,14 +1868,14 @@ class yt {
1882
1868
  * - extend enum Name Directives[Const]
1883
1869
  */
1884
1870
  parseEnumTypeExtension() {
1885
- const t = this._lexer.token;
1871
+ const n = this._lexer.token;
1886
1872
  this.expectKeyword("extend"), this.expectKeyword("enum");
1887
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1873
+ const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1888
1874
  if (i.length === 0 && r.length === 0)
1889
1875
  throw this.unexpected();
1890
- return this.node(t, {
1891
- kind: u.ENUM_TYPE_EXTENSION,
1892
- name: n,
1876
+ return this.node(n, {
1877
+ kind: c.ENUM_TYPE_EXTENSION,
1878
+ name: e,
1893
1879
  directives: i,
1894
1880
  values: r
1895
1881
  });
@@ -1900,14 +1886,14 @@ class yt {
1900
1886
  * - extend input Name Directives[Const]
1901
1887
  */
1902
1888
  parseInputObjectTypeExtension() {
1903
- const t = this._lexer.token;
1889
+ const n = this._lexer.token;
1904
1890
  this.expectKeyword("extend"), this.expectKeyword("input");
1905
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1891
+ const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1906
1892
  if (i.length === 0 && r.length === 0)
1907
1893
  throw this.unexpected();
1908
- return this.node(t, {
1909
- kind: u.INPUT_OBJECT_TYPE_EXTENSION,
1910
- name: n,
1894
+ return this.node(n, {
1895
+ kind: c.INPUT_OBJECT_TYPE_EXTENSION,
1896
+ name: e,
1911
1897
  directives: i,
1912
1898
  fields: r
1913
1899
  });
@@ -1919,14 +1905,14 @@ class yt {
1919
1905
  * ```
1920
1906
  */
1921
1907
  parseDirectiveDefinition() {
1922
- const t = this._lexer.token, n = this.parseDescription();
1908
+ const n = this._lexer.token, e = this.parseDescription();
1923
1909
  this.expectKeyword("directive"), this.expectToken(a.AT);
1924
1910
  const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1925
1911
  this.expectKeyword("on");
1926
1912
  const o = this.parseDirectiveLocations();
1927
- return this.node(t, {
1928
- kind: u.DIRECTIVE_DEFINITION,
1929
- description: n,
1913
+ return this.node(n, {
1914
+ kind: c.DIRECTIVE_DEFINITION,
1915
+ description: e,
1930
1916
  name: i,
1931
1917
  arguments: r,
1932
1918
  repeatable: s,
@@ -1969,10 +1955,10 @@ class yt {
1969
1955
  * `INPUT_FIELD_DEFINITION`
1970
1956
  */
1971
1957
  parseDirectiveLocation() {
1972
- const t = this._lexer.token, n = this.parseName();
1973
- if (Object.prototype.hasOwnProperty.call(re, n.value))
1974
- return n;
1975
- throw this.unexpected(t);
1958
+ const n = this._lexer.token, e = this.parseName();
1959
+ if (Object.prototype.hasOwnProperty.call(q, e.value))
1960
+ return e;
1961
+ throw this.unexpected(n);
1976
1962
  }
1977
1963
  // Schema Coordinates
1978
1964
  /**
@@ -1984,28 +1970,28 @@ class yt {
1984
1970
  * - \@ Name ( Name : )
1985
1971
  */
1986
1972
  parseSchemaCoordinate() {
1987
- const t = this._lexer.token, n = this.expectOptionalToken(a.AT), i = this.parseName();
1973
+ const n = this._lexer.token, e = this.expectOptionalToken(a.AT), i = this.parseName();
1988
1974
  let r;
1989
- !n && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1975
+ !e && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1990
1976
  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
- kind: u.DIRECTIVE_ARGUMENT_COORDINATE,
1977
+ return (e || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), e ? s ? this.node(n, {
1978
+ kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
1993
1979
  name: i,
1994
1980
  argumentName: s
1995
- }) : this.node(t, {
1996
- kind: u.DIRECTIVE_COORDINATE,
1981
+ }) : this.node(n, {
1982
+ kind: c.DIRECTIVE_COORDINATE,
1997
1983
  name: i
1998
- }) : r ? s ? this.node(t, {
1999
- kind: u.ARGUMENT_COORDINATE,
1984
+ }) : r ? s ? this.node(n, {
1985
+ kind: c.ARGUMENT_COORDINATE,
2000
1986
  name: i,
2001
1987
  fieldName: r,
2002
1988
  argumentName: s
2003
- }) : this.node(t, {
2004
- kind: u.MEMBER_COORDINATE,
1989
+ }) : this.node(n, {
1990
+ kind: c.MEMBER_COORDINATE,
2005
1991
  name: i,
2006
1992
  memberName: r
2007
- }) : this.node(t, {
2008
- kind: u.TYPE_COORDINATE,
1993
+ }) : this.node(n, {
1994
+ kind: c.TYPE_COORDINATE,
2009
1995
  name: i
2010
1996
  });
2011
1997
  }
@@ -2015,72 +2001,72 @@ class yt {
2015
2001
  * location object, used to identify the place in the source that created a
2016
2002
  * given parsed object.
2017
2003
  */
2018
- node(t, n) {
2019
- return this._options.noLocation !== !0 && (n.loc = new Ye(
2020
- t,
2004
+ node(n, e) {
2005
+ return this._options.noLocation !== !0 && (e.loc = new xe(
2006
+ n,
2021
2007
  this._lexer.lastToken,
2022
2008
  this._lexer.source
2023
- )), n;
2009
+ )), e;
2024
2010
  }
2025
2011
  /**
2026
2012
  * Determines if the next token is of a given kind
2027
2013
  */
2028
- peek(t) {
2029
- return this._lexer.token.kind === t;
2014
+ peek(n) {
2015
+ return this._lexer.token.kind === n;
2030
2016
  }
2031
2017
  /**
2032
2018
  * If the next token is of the given kind, return that token after advancing the lexer.
2033
2019
  * Otherwise, do not change the parser state and throw an error.
2034
2020
  */
2035
- expectToken(t) {
2036
- const n = this._lexer.token;
2037
- if (n.kind === t)
2038
- return this.advanceLexer(), n;
2039
- throw v(
2021
+ expectToken(n) {
2022
+ const e = this._lexer.token;
2023
+ if (e.kind === n)
2024
+ return this.advanceLexer(), e;
2025
+ throw I(
2040
2026
  this._lexer.source,
2041
- n.start,
2042
- `Expected ${Fe(t)}, found ${q(n)}.`
2027
+ e.start,
2028
+ `Expected ${Ie(n)}, found ${_(e)}.`
2043
2029
  );
2044
2030
  }
2045
2031
  /**
2046
2032
  * If the next token is of the given kind, return "true" after advancing the lexer.
2047
2033
  * Otherwise, do not change the parser state and return "false".
2048
2034
  */
2049
- expectOptionalToken(t) {
2050
- return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1;
2035
+ expectOptionalToken(n) {
2036
+ return this._lexer.token.kind === n ? (this.advanceLexer(), !0) : !1;
2051
2037
  }
2052
2038
  /**
2053
2039
  * If the next token is a given keyword, advance the lexer.
2054
2040
  * Otherwise, do not change the parser state and throw an error.
2055
2041
  */
2056
- expectKeyword(t) {
2057
- const n = this._lexer.token;
2058
- if (n.kind === a.NAME && n.value === t)
2042
+ expectKeyword(n) {
2043
+ const e = this._lexer.token;
2044
+ if (e.kind === a.NAME && e.value === n)
2059
2045
  this.advanceLexer();
2060
2046
  else
2061
- throw v(
2047
+ throw I(
2062
2048
  this._lexer.source,
2063
- n.start,
2064
- `Expected "${t}", found ${q(n)}.`
2049
+ e.start,
2050
+ `Expected "${n}", found ${_(e)}.`
2065
2051
  );
2066
2052
  }
2067
2053
  /**
2068
2054
  * If the next token is a given keyword, return "true" after advancing the lexer.
2069
2055
  * Otherwise, do not change the parser state and return "false".
2070
2056
  */
2071
- expectOptionalKeyword(t) {
2072
- const n = this._lexer.token;
2073
- return n.kind === a.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
2057
+ expectOptionalKeyword(n) {
2058
+ const e = this._lexer.token;
2059
+ return e.kind === a.NAME && e.value === n ? (this.advanceLexer(), !0) : !1;
2074
2060
  }
2075
2061
  /**
2076
2062
  * Helper function for creating an error when an unexpected lexed token is encountered.
2077
2063
  */
2078
- unexpected(t) {
2079
- const n = t ?? this._lexer.token;
2080
- return v(
2064
+ unexpected(n) {
2065
+ const e = n ?? this._lexer.token;
2066
+ return I(
2081
2067
  this._lexer.source,
2082
- n.start,
2083
- `Unexpected ${q(n)}.`
2068
+ e.start,
2069
+ `Unexpected ${_(e)}.`
2084
2070
  );
2085
2071
  }
2086
2072
  /**
@@ -2088,11 +2074,11 @@ class yt {
2088
2074
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2089
2075
  * Advances the parser to the next lex token after the closing token.
2090
2076
  */
2091
- any(t, n, i) {
2092
- this.expectToken(t);
2077
+ any(n, e, i) {
2078
+ this.expectToken(n);
2093
2079
  const r = [];
2094
2080
  for (; !this.expectOptionalToken(i); )
2095
- r.push(n.call(this));
2081
+ r.push(e.call(this));
2096
2082
  return r;
2097
2083
  }
2098
2084
  /**
@@ -2101,11 +2087,11 @@ class yt {
2101
2087
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
2102
2088
  * Advances the parser to the next lex token after the closing token.
2103
2089
  */
2104
- optionalMany(t, n, i) {
2105
- if (this.expectOptionalToken(t)) {
2090
+ optionalMany(n, e, i) {
2091
+ if (this.expectOptionalToken(n)) {
2106
2092
  const r = [];
2107
2093
  do
2108
- r.push(n.call(this));
2094
+ r.push(e.call(this));
2109
2095
  while (!this.expectOptionalToken(i));
2110
2096
  return r;
2111
2097
  }
@@ -2116,11 +2102,11 @@ class yt {
2116
2102
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2117
2103
  * Advances the parser to the next lex token after the closing token.
2118
2104
  */
2119
- many(t, n, i) {
2120
- this.expectToken(t);
2105
+ many(n, e, i) {
2106
+ this.expectToken(n);
2121
2107
  const r = [];
2122
2108
  do
2123
- r.push(n.call(this));
2109
+ r.push(e.call(this));
2124
2110
  while (!this.expectOptionalToken(i));
2125
2111
  return r;
2126
2112
  }
@@ -2129,645 +2115,107 @@ class yt {
2129
2115
  * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
2130
2116
  * Advances the parser to the next lex token after last item in the list.
2131
2117
  */
2132
- delimitedMany(t, n) {
2133
- this.expectOptionalToken(t);
2118
+ delimitedMany(n, e) {
2119
+ this.expectOptionalToken(n);
2134
2120
  const i = [];
2135
2121
  do
2136
- i.push(n.call(this));
2137
- while (this.expectOptionalToken(t));
2122
+ i.push(e.call(this));
2123
+ while (this.expectOptionalToken(n));
2138
2124
  return i;
2139
2125
  }
2140
2126
  advanceLexer() {
2141
- const { maxTokens: t } = this._options, n = this._lexer.advance();
2142
- if (n.kind !== a.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t))
2143
- throw v(
2127
+ const { maxTokens: n } = this._options, e = this._lexer.advance();
2128
+ if (e.kind !== a.EOF && (++this._tokenCounter, n !== void 0 && this._tokenCounter > n))
2129
+ throw I(
2144
2130
  this._lexer.source,
2145
- n.start,
2146
- `Document contains more that ${t} tokens. Parsing aborted.`
2131
+ e.start,
2132
+ `Document contains more that ${n} tokens. Parsing aborted.`
2147
2133
  );
2148
2134
  }
2149
2135
  }
2150
- function q(e) {
2151
- const t = e.value;
2152
- return Fe(e.kind) + (t != null ? ` "${t}"` : "");
2153
- }
2154
- function Fe(e) {
2155
- return Ke(e) ? `"${e}"` : e;
2156
- }
2157
- function Tt(e) {
2158
- return `"${e.replace(vt, kt)}"`;
2159
- }
2160
- const vt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2161
- function kt(e) {
2162
- return Ot[e.charCodeAt(0)];
2163
- }
2164
- const Ot = [
2165
- "\\u0000",
2166
- "\\u0001",
2167
- "\\u0002",
2168
- "\\u0003",
2169
- "\\u0004",
2170
- "\\u0005",
2171
- "\\u0006",
2172
- "\\u0007",
2173
- "\\b",
2174
- "\\t",
2175
- "\\n",
2176
- "\\u000B",
2177
- "\\f",
2178
- "\\r",
2179
- "\\u000E",
2180
- "\\u000F",
2181
- "\\u0010",
2182
- "\\u0011",
2183
- "\\u0012",
2184
- "\\u0013",
2185
- "\\u0014",
2186
- "\\u0015",
2187
- "\\u0016",
2188
- "\\u0017",
2189
- "\\u0018",
2190
- "\\u0019",
2191
- "\\u001A",
2192
- "\\u001B",
2193
- "\\u001C",
2194
- "\\u001D",
2195
- "\\u001E",
2196
- "\\u001F",
2197
- "",
2198
- "",
2199
- '\\"',
2200
- "",
2201
- "",
2202
- "",
2203
- "",
2204
- "",
2205
- "",
2206
- "",
2207
- "",
2208
- "",
2209
- "",
2210
- "",
2211
- "",
2212
- "",
2213
- // 2F
2214
- "",
2215
- "",
2216
- "",
2217
- "",
2218
- "",
2219
- "",
2220
- "",
2221
- "",
2222
- "",
2223
- "",
2224
- "",
2225
- "",
2226
- "",
2227
- "",
2228
- "",
2229
- "",
2230
- // 3F
2231
- "",
2232
- "",
2233
- "",
2234
- "",
2235
- "",
2236
- "",
2237
- "",
2238
- "",
2239
- "",
2240
- "",
2241
- "",
2242
- "",
2243
- "",
2244
- "",
2245
- "",
2246
- "",
2247
- // 4F
2248
- "",
2249
- "",
2250
- "",
2251
- "",
2252
- "",
2253
- "",
2254
- "",
2255
- "",
2256
- "",
2257
- "",
2258
- "",
2259
- "",
2260
- "\\\\",
2261
- "",
2262
- "",
2263
- "",
2264
- // 5F
2265
- "",
2266
- "",
2267
- "",
2268
- "",
2269
- "",
2270
- "",
2271
- "",
2272
- "",
2273
- "",
2274
- "",
2275
- "",
2276
- "",
2277
- "",
2278
- "",
2279
- "",
2280
- "",
2281
- // 6F
2282
- "",
2283
- "",
2284
- "",
2285
- "",
2286
- "",
2287
- "",
2288
- "",
2289
- "",
2290
- "",
2291
- "",
2292
- "",
2293
- "",
2294
- "",
2295
- "",
2296
- "",
2297
- "\\u007F",
2298
- "\\u0080",
2299
- "\\u0081",
2300
- "\\u0082",
2301
- "\\u0083",
2302
- "\\u0084",
2303
- "\\u0085",
2304
- "\\u0086",
2305
- "\\u0087",
2306
- "\\u0088",
2307
- "\\u0089",
2308
- "\\u008A",
2309
- "\\u008B",
2310
- "\\u008C",
2311
- "\\u008D",
2312
- "\\u008E",
2313
- "\\u008F",
2314
- "\\u0090",
2315
- "\\u0091",
2316
- "\\u0092",
2317
- "\\u0093",
2318
- "\\u0094",
2319
- "\\u0095",
2320
- "\\u0096",
2321
- "\\u0097",
2322
- "\\u0098",
2323
- "\\u0099",
2324
- "\\u009A",
2325
- "\\u009B",
2326
- "\\u009C",
2327
- "\\u009D",
2328
- "\\u009E",
2329
- "\\u009F"
2330
- ], At = Object.freeze({});
2331
- function Dt(e, t, n = Pe) {
2332
- const i = /* @__PURE__ */ new Map();
2333
- for (const O of Object.values(u))
2334
- i.set(O, Nt(t, O));
2335
- let r, s = Array.isArray(e), o = [e], p = -1, f = [], l = e, g, d;
2336
- const m = [], y = [];
2337
- do {
2338
- p++;
2339
- const O = p === o.length, C = O && f.length !== 0;
2340
- if (O) {
2341
- if (g = y.length === 0 ? void 0 : m[m.length - 1], l = d, d = y.pop(), C)
2342
- if (s) {
2343
- l = l.slice();
2344
- let k = 0;
2345
- for (const [A, x] of f) {
2346
- const P = A - k;
2347
- x === null ? (l.splice(P, 1), k++) : l[P] = x;
2348
- }
2349
- } else {
2350
- l = { ...l };
2351
- for (const [k, A] of f)
2352
- l[k] = A;
2353
- }
2354
- p = r.index, o = r.keys, f = r.edits, s = r.inArray, r = r.prev;
2355
- } else if (d) {
2356
- if (g = s ? p : o[p], l = d[g], l == null)
2357
- continue;
2358
- m.push(g);
2359
- }
2360
- let b;
2361
- if (!Array.isArray(l)) {
2362
- var I, D;
2363
- he(l) || z(!1, `Invalid AST Node: ${de(l)}.`);
2364
- const k = O ? (I = i.get(l.kind)) === null || I === void 0 ? void 0 : I.leave : (D = i.get(l.kind)) === null || D === void 0 ? void 0 : D.enter;
2365
- if (b = k?.call(t, l, g, d, m, y), b === At)
2366
- break;
2367
- if (b === !1) {
2368
- if (!O) {
2369
- m.pop();
2370
- continue;
2371
- }
2372
- } else if (b !== void 0 && (f.push([g, b]), !O))
2373
- if (he(b))
2374
- l = b;
2375
- else {
2376
- m.pop();
2377
- continue;
2378
- }
2379
- }
2380
- if (b === void 0 && C && f.push([g, l]), O)
2381
- m.pop();
2382
- else {
2383
- var N;
2384
- r = {
2385
- inArray: s,
2386
- index: p,
2387
- keys: o,
2388
- edits: f,
2389
- prev: r
2390
- }, s = Array.isArray(l), o = s ? l : (N = n[l.kind]) !== null && N !== void 0 ? N : [], p = -1, f = [], d && y.push(d), d = l;
2391
- }
2392
- } while (r !== void 0);
2393
- return f.length !== 0 ? f[f.length - 1][1] : e;
2394
- }
2395
- function Nt(e, t) {
2396
- const n = e[t];
2397
- return typeof n == "object" ? n : typeof n == "function" ? {
2398
- enter: n,
2399
- leave: void 0
2400
- } : {
2401
- enter: e.enter,
2402
- leave: e.leave
2403
- };
2136
+ function _(t) {
2137
+ const n = t.value;
2138
+ return Ie(t.kind) + (n != null ? ` "${n}"` : "");
2404
2139
  }
2405
- function xt(e) {
2406
- return Dt(e, Pt);
2407
- }
2408
- const bt = 80, Pt = {
2409
- Name: {
2410
- leave: (e) => e.value
2411
- },
2412
- Variable: {
2413
- leave: (e) => "$" + e.name
2414
- },
2415
- // Document
2416
- Document: {
2417
- leave: (e) => c(e.definitions, `
2418
-
2419
- `)
2420
- },
2421
- OperationDefinition: {
2422
- leave(e) {
2423
- const t = te(e.variableDefinitions) ? h(`(
2424
- `, c(e.variableDefinitions, `
2425
- `), `
2426
- )`) : h("(", c(e.variableDefinitions, ", "), ")"), n = h("", e.description, `
2427
- `) + c(
2428
- [
2429
- e.operation,
2430
- c([e.name, t]),
2431
- c(e.directives, " ")
2432
- ],
2433
- " "
2434
- );
2435
- return (n === "query" ? "" : n + " ") + e.selectionSet;
2436
- }
2437
- },
2438
- VariableDefinition: {
2439
- leave: ({ variable: e, type: t, defaultValue: n, directives: i, description: r }) => h("", r, `
2440
- `) + e + ": " + t + h(" = ", n) + h(" ", c(i, " "))
2441
- },
2442
- SelectionSet: {
2443
- leave: ({ selections: e }) => S(e)
2444
- },
2445
- Field: {
2446
- leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
2447
- const s = h("", e, ": ") + t;
2448
- let o = s + h("(", c(n, ", "), ")");
2449
- return o.length > bt && (o = s + h(`(
2450
- `, j(c(n, `
2451
- `)), `
2452
- )`)), c([o, c(i, " "), r], " ");
2453
- }
2454
- },
2455
- Argument: {
2456
- leave: ({ name: e, value: t }) => e + ": " + t
2457
- },
2458
- // Fragments
2459
- FragmentSpread: {
2460
- leave: ({ name: e, directives: t }) => "..." + e + h(" ", c(t, " "))
2461
- },
2462
- InlineFragment: {
2463
- leave: ({ typeCondition: e, directives: t, selectionSet: n }) => c(
2464
- [
2465
- "...",
2466
- h("on ", e),
2467
- c(t, " "),
2468
- n
2469
- ],
2470
- " "
2471
- )
2472
- },
2473
- FragmentDefinition: {
2474
- leave: ({
2475
- name: e,
2476
- typeCondition: t,
2477
- variableDefinitions: n,
2478
- directives: i,
2479
- selectionSet: r,
2480
- description: s
2481
- }) => h("", s, `
2482
- `) + // Note: fragment variable definitions are experimental and may be changed
2483
- // or removed in the future.
2484
- `fragment ${e}${h("(", c(n, ", "), ")")} on ${t} ${h("", c(i, " "), " ")}` + r
2485
- },
2486
- // Value
2487
- IntValue: {
2488
- leave: ({ value: e }) => e
2489
- },
2490
- FloatValue: {
2491
- leave: ({ value: e }) => e
2492
- },
2493
- StringValue: {
2494
- leave: ({ value: e, block: t }) => t ? We(e) : Tt(e)
2495
- },
2496
- BooleanValue: {
2497
- leave: ({ value: e }) => e ? "true" : "false"
2498
- },
2499
- NullValue: {
2500
- leave: () => "null"
2501
- },
2502
- EnumValue: {
2503
- leave: ({ value: e }) => e
2504
- },
2505
- ListValue: {
2506
- leave: ({ values: e }) => "[" + c(e, ", ") + "]"
2507
- },
2508
- ObjectValue: {
2509
- leave: ({ fields: e }) => "{" + c(e, ", ") + "}"
2510
- },
2511
- ObjectField: {
2512
- leave: ({ name: e, value: t }) => e + ": " + t
2513
- },
2514
- // Directive
2515
- Directive: {
2516
- leave: ({ name: e, arguments: t }) => "@" + e + h("(", c(t, ", "), ")")
2517
- },
2518
- // Type
2519
- NamedType: {
2520
- leave: ({ name: e }) => e
2521
- },
2522
- ListType: {
2523
- leave: ({ type: e }) => "[" + e + "]"
2524
- },
2525
- NonNullType: {
2526
- leave: ({ type: e }) => e + "!"
2527
- },
2528
- // Type System Definitions
2529
- SchemaDefinition: {
2530
- leave: ({ description: e, directives: t, operationTypes: n }) => h("", e, `
2531
- `) + c(["schema", c(t, " "), S(n)], " ")
2532
- },
2533
- OperationTypeDefinition: {
2534
- leave: ({ operation: e, type: t }) => e + ": " + t
2535
- },
2536
- ScalarTypeDefinition: {
2537
- leave: ({ description: e, name: t, directives: n }) => h("", e, `
2538
- `) + c(["scalar", t, c(n, " ")], " ")
2539
- },
2540
- ObjectTypeDefinition: {
2541
- leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => h("", e, `
2542
- `) + c(
2543
- [
2544
- "type",
2545
- t,
2546
- h("implements ", c(n, " & ")),
2547
- c(i, " "),
2548
- S(r)
2549
- ],
2550
- " "
2551
- )
2552
- },
2553
- FieldDefinition: {
2554
- leave: ({ description: e, name: t, arguments: n, type: i, directives: r }) => h("", e, `
2555
- `) + t + (te(n) ? h(`(
2556
- `, j(c(n, `
2557
- `)), `
2558
- )`) : h("(", c(n, ", "), ")")) + ": " + i + h(" ", c(r, " "))
2559
- },
2560
- InputValueDefinition: {
2561
- leave: ({ description: e, name: t, type: n, defaultValue: i, directives: r }) => h("", e, `
2562
- `) + c(
2563
- [t + ": " + n, h("= ", i), c(r, " ")],
2564
- " "
2565
- )
2566
- },
2567
- InterfaceTypeDefinition: {
2568
- leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => h("", e, `
2569
- `) + c(
2570
- [
2571
- "interface",
2572
- t,
2573
- h("implements ", c(n, " & ")),
2574
- c(i, " "),
2575
- S(r)
2576
- ],
2577
- " "
2578
- )
2579
- },
2580
- UnionTypeDefinition: {
2581
- leave: ({ description: e, name: t, directives: n, types: i }) => h("", e, `
2582
- `) + c(
2583
- ["union", t, c(n, " "), h("= ", c(i, " | "))],
2584
- " "
2585
- )
2586
- },
2587
- EnumTypeDefinition: {
2588
- leave: ({ description: e, name: t, directives: n, values: i }) => h("", e, `
2589
- `) + c(["enum", t, c(n, " "), S(i)], " ")
2590
- },
2591
- EnumValueDefinition: {
2592
- leave: ({ description: e, name: t, directives: n }) => h("", e, `
2593
- `) + c([t, c(n, " ")], " ")
2594
- },
2595
- InputObjectTypeDefinition: {
2596
- leave: ({ description: e, name: t, directives: n, fields: i }) => h("", e, `
2597
- `) + c(["input", t, c(n, " "), S(i)], " ")
2598
- },
2599
- DirectiveDefinition: {
2600
- leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => h("", e, `
2601
- `) + "directive @" + t + (te(n) ? h(`(
2602
- `, j(c(n, `
2603
- `)), `
2604
- )`) : h("(", c(n, ", "), ")")) + (i ? " repeatable" : "") + " on " + c(r, " | ")
2605
- },
2606
- SchemaExtension: {
2607
- leave: ({ directives: e, operationTypes: t }) => c(
2608
- ["extend schema", c(e, " "), S(t)],
2609
- " "
2610
- )
2611
- },
2612
- ScalarTypeExtension: {
2613
- leave: ({ name: e, directives: t }) => c(["extend scalar", e, c(t, " ")], " ")
2614
- },
2615
- ObjectTypeExtension: {
2616
- leave: ({ name: e, interfaces: t, directives: n, fields: i }) => c(
2617
- [
2618
- "extend type",
2619
- e,
2620
- h("implements ", c(t, " & ")),
2621
- c(n, " "),
2622
- S(i)
2623
- ],
2624
- " "
2625
- )
2626
- },
2627
- InterfaceTypeExtension: {
2628
- leave: ({ name: e, interfaces: t, directives: n, fields: i }) => c(
2629
- [
2630
- "extend interface",
2631
- e,
2632
- h("implements ", c(t, " & ")),
2633
- c(n, " "),
2634
- S(i)
2635
- ],
2636
- " "
2637
- )
2638
- },
2639
- UnionTypeExtension: {
2640
- leave: ({ name: e, directives: t, types: n }) => c(
2641
- [
2642
- "extend union",
2643
- e,
2644
- c(t, " "),
2645
- h("= ", c(n, " | "))
2646
- ],
2647
- " "
2648
- )
2649
- },
2650
- EnumTypeExtension: {
2651
- leave: ({ name: e, directives: t, values: n }) => c(["extend enum", e, c(t, " "), S(n)], " ")
2652
- },
2653
- InputObjectTypeExtension: {
2654
- leave: ({ name: e, directives: t, fields: n }) => c(["extend input", e, c(t, " "), S(n)], " ")
2655
- },
2656
- // Schema Coordinates
2657
- TypeCoordinate: {
2658
- leave: ({ name: e }) => e
2659
- },
2660
- MemberCoordinate: {
2661
- leave: ({ name: e, memberName: t }) => c([e, h(".", t)])
2662
- },
2663
- ArgumentCoordinate: {
2664
- leave: ({ name: e, fieldName: t, argumentName: n }) => c([e, h(".", t), h("(", n, ":)")])
2665
- },
2666
- DirectiveCoordinate: {
2667
- leave: ({ name: e }) => c(["@", e])
2668
- },
2669
- DirectiveArgumentCoordinate: {
2670
- leave: ({ name: e, argumentName: t }) => c(["@", e, h("(", t, ":)")])
2671
- }
2672
- };
2673
- function c(e, t = "") {
2674
- var n;
2675
- return (n = e?.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
2140
+ function Ie(t) {
2141
+ return we(t) ? `"${t}"` : t;
2676
2142
  }
2677
- function S(e) {
2678
- return h(`{
2679
- `, j(c(e, `
2680
- `)), `
2681
- }`);
2143
+ var L = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), Ee = !0, $ = !1;
2144
+ function ye(t) {
2145
+ return t.replace(/[\s,]+/g, " ").trim();
2682
2146
  }
2683
- function h(e, t, n = "") {
2684
- return t != null && t !== "" ? e + t + n : "";
2147
+ function nt(t) {
2148
+ return ye(t.source.body.substring(t.start, t.end));
2685
2149
  }
2686
- function j(e) {
2687
- return h(" ", e.replace(/\n/g, `
2688
- `));
2689
- }
2690
- function te(e) {
2691
- var t;
2692
- return (t = e?.some((n) => n.includes(`
2693
- `))) !== null && t !== void 0 ? t : !1;
2694
- }
2695
- var G = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), $e = !0, J = !1;
2696
- function Be(e) {
2697
- return e.replace(/[\s,]+/g, " ").trim();
2698
- }
2699
- function St(e) {
2700
- return Be(e.source.body.substring(e.start, e.end));
2701
- }
2702
- function Ct(e) {
2703
- var t = /* @__PURE__ */ new Set(), n = [];
2704
- return e.definitions.forEach(function(i) {
2150
+ function it(t) {
2151
+ var n = /* @__PURE__ */ new Set(), e = [];
2152
+ return t.definitions.forEach(function(i) {
2705
2153
  if (i.kind === "FragmentDefinition") {
2706
- var r = i.name.value, s = St(i.loc), o = ae.get(r);
2707
- o && !o.has(s) ? $e && console.warn("Warning: fragment with name " + r + ` already exists.
2154
+ var r = i.name.value, s = nt(i.loc), o = G.get(r);
2155
+ o && !o.has(s) ? Ee && console.warn("Warning: fragment with name " + r + ` already exists.
2708
2156
  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 || ae.set(r, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(i));
2157
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || G.set(r, o = /* @__PURE__ */ new Set()), o.add(s), n.has(s) || (n.add(s), e.push(i));
2710
2158
  } else
2711
- n.push(i);
2712
- }), Q(Q({}, e), { definitions: n });
2159
+ e.push(i);
2160
+ }), F(F({}, t), { definitions: e });
2713
2161
  }
2714
- function _t(e) {
2715
- var t = new Set(e.definitions);
2716
- t.forEach(function(i) {
2162
+ function rt(t) {
2163
+ var n = new Set(t.definitions);
2164
+ n.forEach(function(i) {
2717
2165
  i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
2718
2166
  var s = i[r];
2719
- s && typeof s == "object" && t.add(s);
2167
+ s && typeof s == "object" && n.add(s);
2720
2168
  });
2721
2169
  });
2722
- var n = e.loc;
2723
- return n && (delete n.startToken, delete n.endToken), e;
2724
- }
2725
- function Lt(e) {
2726
- var t = Be(e);
2727
- if (!G.has(t)) {
2728
- var n = Et(e, {
2729
- experimentalFragmentVariables: J,
2730
- allowLegacyFragmentVariables: J
2170
+ var e = t.loc;
2171
+ return e && (delete e.startToken, delete e.endToken), t;
2172
+ }
2173
+ function st(t) {
2174
+ var n = ye(t);
2175
+ if (!L.has(n)) {
2176
+ var e = et(t, {
2177
+ experimentalFragmentVariables: $,
2178
+ allowLegacyFragmentVariables: $
2731
2179
  });
2732
- if (!n || n.kind !== "Document")
2180
+ if (!e || e.kind !== "Document")
2733
2181
  throw new Error("Not a valid GraphQL document.");
2734
- G.set(t, _t(Ct(n)));
2182
+ L.set(n, rt(it(e)));
2735
2183
  }
2736
- return G.get(t);
2184
+ return L.get(n);
2737
2185
  }
2738
- function E(e) {
2739
- for (var t = [], n = 1; n < arguments.length; n++)
2740
- t[n - 1] = arguments[n];
2741
- 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
- }), Lt(i);
2186
+ function l(t) {
2187
+ for (var n = [], e = 1; e < arguments.length; e++)
2188
+ n[e - 1] = arguments[e];
2189
+ typeof t == "string" && (t = [t]);
2190
+ var i = t[0];
2191
+ return n.forEach(function(r, s) {
2192
+ r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += t[s + 1];
2193
+ }), st(i);
2746
2194
  }
2747
- function Rt() {
2748
- G.clear(), ae.clear();
2195
+ function at() {
2196
+ L.clear(), G.clear();
2749
2197
  }
2750
- function wt() {
2751
- $e = !1;
2198
+ function ot() {
2199
+ Ee = !1;
2752
2200
  }
2753
- function Ft() {
2754
- J = !0;
2201
+ function ct() {
2202
+ $ = !0;
2755
2203
  }
2756
- function $t() {
2757
- J = !1;
2204
+ function dt() {
2205
+ $ = !1;
2758
2206
  }
2759
- var B = {
2760
- gql: E,
2761
- resetCaches: Rt,
2762
- disableFragmentWarnings: wt,
2763
- enableExperimentalFragmentVariables: Ft,
2764
- disableExperimentalFragmentVariables: $t
2207
+ var x = {
2208
+ gql: l,
2209
+ resetCaches: at,
2210
+ disableFragmentWarnings: ot,
2211
+ enableExperimentalFragmentVariables: ct,
2212
+ disableExperimentalFragmentVariables: dt
2765
2213
  };
2766
- (function(e) {
2767
- e.gql = B.gql, e.resetCaches = B.resetCaches, e.disableFragmentWarnings = B.disableFragmentWarnings, e.enableExperimentalFragmentVariables = B.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = B.disableExperimentalFragmentVariables;
2768
- })(E || (E = {}));
2769
- E.default = E;
2770
- const Bt = E`
2214
+ (function(t) {
2215
+ t.gql = x.gql, t.resetCaches = x.resetCaches, t.disableFragmentWarnings = x.disableFragmentWarnings, t.enableExperimentalFragmentVariables = x.enableExperimentalFragmentVariables, t.disableExperimentalFragmentVariables = x.disableExperimentalFragmentVariables;
2216
+ })(l || (l = {}));
2217
+ l.default = l;
2218
+ const ut = l`
2771
2219
  query findActiveOrderById($id: String) {
2772
2220
  findOrder(id: $id) {
2773
2221
  id
@@ -2854,7 +2302,7 @@ const Bt = E`
2854
2302
  }
2855
2303
  }
2856
2304
  }
2857
- `, Vt = E`
2305
+ `, lt = l`
2858
2306
  query findOrderById($id: String, $reference: String) {
2859
2307
  findOrder(id: $id, reference: $reference) {
2860
2308
  id
@@ -2898,7 +2346,7 @@ const Bt = E`
2898
2346
  downloadCode
2899
2347
  }
2900
2348
  }
2901
- `, Ut = E`
2349
+ `, ht = l`
2902
2350
  mutation addToOrder($orderId: ID!, $productId: ID!, $shopId: ID, $additionalData: AdditionalDataInput, $trackerId: ID, $amount: Int) {
2903
2351
  reserveProduct(
2904
2352
  input: {orderId: $orderId, productId: $productId, additionalData: $additionalData, trackerId: $trackerId, shopId: $shopId, amountToIncrease: $amount}
@@ -2908,7 +2356,7 @@ const Bt = E`
2908
2356
  amountReserved
2909
2357
  }
2910
2358
  }
2911
- `, Mt = E`
2359
+ `, pt = l`
2912
2360
  mutation removeFromOrder($orderId: ID!, $productId: ID!, $additionalData: AdditionalDataInput, $amount: Int) {
2913
2361
  releaseProduct(
2914
2362
  input: {orderId: $orderId, productId: $productId, additionalData: $additionalData, amountToRelease: $amount}
@@ -2917,7 +2365,7 @@ const Bt = E`
2917
2365
  amountReleased
2918
2366
  }
2919
2367
  }
2920
- `, qt = E`
2368
+ `, mt = l`
2921
2369
  mutation configurePackage($orderId: ID!, $packageId: ID!, $amount: Int!, $items: [ReservedItem!]!, $shopId: ID, $trackerId: ID) {
2922
2370
  configurePackage(
2923
2371
  input: {orderId: $orderId, shopId: $shopId, trackerId: $trackerId, packageId: $packageId, amount: $amount, items: $items}
@@ -2927,7 +2375,7 @@ const Bt = E`
2927
2375
  amountReserved
2928
2376
  }
2929
2377
  }
2930
- `, zt = E`
2378
+ `, ft = l`
2931
2379
  mutation reserveAdditionalPackageItem($amount: Int!, $orderId: ID!, $packageId: ID!, $eventId: ID!, $packageItemId: ID!) {
2932
2380
  reserveAdditionalPackageItem(
2933
2381
  input: {amount: $amount, eventId: $eventId, orderId: $orderId, packageId: $packageId, packageItemId: $packageItemId}
@@ -2937,124 +2385,124 @@ const Bt = E`
2937
2385
  amountReserved
2938
2386
  }
2939
2387
  }
2940
- `, jt = E`
2388
+ `, gt = l`
2941
2389
  mutation configureOrderDeliveryOption($orderId: ID!, $productId: ID) {
2942
2390
  configureDeliveryOption(input: {orderId: $orderId, productId: $productId})
2943
2391
  }
2944
- `, Gt = E`
2392
+ `, It = l`
2945
2393
  mutation createOrderCustomer($orderId: ID!, $countryCode: String, $customer: CreateCustomerInput!) {
2946
2394
  createOrderCustomer(
2947
2395
  input: {id: $orderId, countryCode: $countryCode, customer: $customer}
2948
2396
  )
2949
2397
  }
2950
- `, Yt = E`
2398
+ `, Et = l`
2951
2399
  mutation deleteOrder($orderId: ID!) {
2952
2400
  cancelOrder(id: $orderId)
2953
2401
  }
2954
- `, Ht = (e, t, n, i) => e();
2955
- function Qt(e, t = Ht) {
2402
+ `, yt = (t, n, e, i) => t();
2403
+ function Ot(t, n = yt) {
2956
2404
  return {
2957
- findActiveOrderById(n, i, r) {
2958
- return t((s) => e.request({ document: Bt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", n);
2405
+ findActiveOrderById(e, i, r) {
2406
+ return n((s) => t.request({ document: ut, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", e);
2959
2407
  },
2960
- findOrderById(n, i, r) {
2961
- return t((s) => e.request({ document: Vt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", n);
2408
+ findOrderById(e, i, r) {
2409
+ return n((s) => t.request({ document: lt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", e);
2962
2410
  },
2963
- addToOrder(n, i, r) {
2964
- return t((s) => e.request({ document: Ut, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", n);
2411
+ addToOrder(e, i, r) {
2412
+ return n((s) => t.request({ document: ht, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", e);
2965
2413
  },
2966
- removeFromOrder(n, i, r) {
2967
- return t((s) => e.request({ document: Mt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", n);
2414
+ removeFromOrder(e, i, r) {
2415
+ return n((s) => t.request({ document: pt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", e);
2968
2416
  },
2969
- configurePackage(n, i, r) {
2970
- return t((s) => e.request({ document: qt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", n);
2417
+ configurePackage(e, i, r) {
2418
+ return n((s) => t.request({ document: mt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", e);
2971
2419
  },
2972
- reserveAdditionalPackageItem(n, i, r) {
2973
- return t((s) => e.request({ document: zt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", n);
2420
+ reserveAdditionalPackageItem(e, i, r) {
2421
+ return n((s) => t.request({ document: ft, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", e);
2974
2422
  },
2975
- configureOrderDeliveryOption(n, i, r) {
2976
- return t((s) => e.request({ document: jt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", n);
2423
+ configureOrderDeliveryOption(e, i, r) {
2424
+ return n((s) => t.request({ document: gt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", e);
2977
2425
  },
2978
- createOrderCustomer(n, i, r) {
2979
- return t((s) => e.request({ document: Gt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", n);
2426
+ createOrderCustomer(e, i, r) {
2427
+ return n((s) => t.request({ document: It, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", e);
2980
2428
  },
2981
- deleteOrder(n, i, r) {
2982
- return t((s) => e.request({ document: Yt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", n);
2429
+ deleteOrder(e, i, r) {
2430
+ return n((s) => t.request({ document: Et, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", e);
2983
2431
  }
2984
2432
  };
2985
2433
  }
2986
- class Jt {
2434
+ class kt {
2987
2435
  config;
2988
2436
  sdk;
2989
- constructor(t) {
2990
- this.config = t, this.sdk = Qt(new oe(t.apiUrl));
2437
+ constructor(n) {
2438
+ this.config = n, this.sdk = Ot(new v(n.apiUrl));
2991
2439
  }
2992
2440
  // Basket update functions
2993
- async addProduct(t, n) {
2441
+ async addProduct(n, e) {
2994
2442
  try {
2995
2443
  return this.debugLog("Adding product", {
2996
- productId: n.id,
2997
- orderId: t,
2998
- amount: n.amount,
2999
- seat: n.seat
2444
+ productId: e.id,
2445
+ orderId: n,
2446
+ amount: e.amount,
2447
+ seat: e.seat
3000
2448
  }), (await this.sdk.addToOrder({
3001
- productId: n.id,
3002
- orderId: t,
3003
- additionalData: n.seat ? {
2449
+ productId: e.id,
2450
+ orderId: n,
2451
+ additionalData: e.seat ? {
3004
2452
  seat: {
3005
- seatId: n.seat.id,
3006
- seatLabel: n.seat.label,
3007
- holdToken: n.seat.holdToken
2453
+ seatId: e.seat.id,
2454
+ seatLabel: e.seat.label,
2455
+ holdToken: e.seat.holdToken
3008
2456
  }
3009
2457
  } : null,
3010
2458
  trackerId: this.config.trackerId,
3011
2459
  shopId: this.config.shopId,
3012
- amount: n.amount
2460
+ amount: e.amount
3013
2461
  })).reserveProduct;
3014
2462
  } catch (i) {
3015
2463
  throw this.debugLog("Error adding product", i), this.handleError(i), i;
3016
2464
  }
3017
2465
  }
3018
- async removeProduct(t, n) {
2466
+ async removeProduct(n, e) {
3019
2467
  try {
3020
2468
  return this.debugLog("Removing product", {
3021
- productId: n.id,
3022
- orderId: t,
3023
- amount: n.amount
2469
+ productId: e.id,
2470
+ orderId: n,
2471
+ amount: e.amount
3024
2472
  }), (await this.sdk.removeFromOrder({
3025
- productId: n.id,
3026
- orderId: t,
3027
- additionalData: n.seat ? {
2473
+ productId: e.id,
2474
+ orderId: n,
2475
+ additionalData: e.seat ? {
3028
2476
  seat: {
3029
- seatId: n.seat.id,
3030
- seatLabel: n.seat.label
2477
+ seatId: e.seat.id,
2478
+ seatLabel: e.seat.label
3031
2479
  }
3032
2480
  } : null,
3033
- amount: n.amount
2481
+ amount: e.amount
3034
2482
  })).releaseProduct ?? null;
3035
2483
  } catch (i) {
3036
2484
  throw this.debugLog("Error removing product", i), this.handleError(i), i;
3037
2485
  }
3038
2486
  }
3039
- async configurePackage(t, n) {
2487
+ async configurePackage(n, e) {
3040
2488
  try {
3041
- const i = n.items.map((s) => ({
2489
+ const i = e.items.map((s) => ({
3042
2490
  packageItemId: s.packageItemId,
3043
2491
  eventId: s.eventId
3044
2492
  }));
3045
2493
  this.debugLog("Configuring package", {
3046
- packageId: n.id,
3047
- orderId: t,
3048
- amount: n.amount,
2494
+ packageId: e.id,
2495
+ orderId: n,
2496
+ amount: e.amount,
3049
2497
  items: i,
3050
2498
  shopId: this.config.shopId
3051
2499
  });
3052
2500
  const r = await this.sdk.configurePackage({
3053
2501
  trackerId: this.config.trackerId,
3054
2502
  shopId: this.config.shopId,
3055
- packageId: n.id,
3056
- orderId: t,
3057
- amount: n.amount,
2503
+ packageId: e.id,
2504
+ orderId: n,
2505
+ amount: e.amount,
3058
2506
  items: i
3059
2507
  });
3060
2508
  return this.debugLog("Configure package response"), r.configurePackage ?? null;
@@ -3062,33 +2510,33 @@ class Jt {
3062
2510
  throw this.debugLog("Error configuring package", i), this.handleError(i), i;
3063
2511
  }
3064
2512
  }
3065
- async configureCustomer(t, n) {
3066
- this.debugLog("Creating/replacing customer", { orderId: t, email: n.email });
2513
+ async configureCustomer(n, e) {
2514
+ this.debugLog("Creating/replacing customer", { orderId: n, email: e.email });
3067
2515
  try {
3068
2516
  const i = await this.sdk.createOrderCustomer({
3069
- orderId: t,
3070
- customer: n
2517
+ orderId: n,
2518
+ customer: e
3071
2519
  });
3072
2520
  this.debugLog("Customer set successfully", i);
3073
2521
  } catch (i) {
3074
2522
  throw this.debugLog("Failed to set customer", i), new Error(`Failed to set customer: ${i.message}`);
3075
2523
  }
3076
2524
  }
3077
- async reserveAdditionalPackageItem(t, n) {
2525
+ async reserveAdditionalPackageItem(n, e) {
3078
2526
  try {
3079
2527
  this.debugLog("reserve additional packageItem", {
3080
- orderId: t,
3081
- eventId: n.eventId,
3082
- amount: n.amount,
3083
- packageId: n.packageId,
3084
- packageItemId: n.packageItemId
2528
+ orderId: n,
2529
+ eventId: e.eventId,
2530
+ amount: e.amount,
2531
+ packageId: e.packageId,
2532
+ packageItemId: e.packageItemId
3085
2533
  });
3086
2534
  const i = await this.sdk.reserveAdditionalPackageItem({
3087
- orderId: t,
3088
- eventId: n.eventId,
3089
- amount: n.amount,
3090
- packageId: n.packageId,
3091
- packageItemId: n.packageItemId
2535
+ orderId: n,
2536
+ eventId: e.eventId,
2537
+ amount: e.amount,
2538
+ packageId: e.packageId,
2539
+ packageItemId: e.packageItemId
3092
2540
  });
3093
2541
  return this.debugLog("reserve additional packageItem"), i.reserveAdditionalPackageItem ?? null;
3094
2542
  } catch (i) {
@@ -3096,12 +2544,12 @@ class Jt {
3096
2544
  }
3097
2545
  }
3098
2546
  // Cancel and clear order functions
3099
- async cancelOrder(t) {
3100
- t && (this.debugLog("Cancelling order", { orderId: t }), await this.sdk.deleteOrder({ orderId: t }), this.debugLog("Order cancelled successfully"));
2547
+ async cancelOrder(n) {
2548
+ n && (this.debugLog("Cancelling order", { orderId: n }), await this.sdk.deleteOrder({ orderId: n }), this.debugLog("Order cancelled successfully"));
3101
2549
  }
3102
- async findOrder(t, n) {
2550
+ async findOrder(n, e) {
3103
2551
  try {
3104
- const i = await this.sdk.findOrderById({ id: t, reference: n });
2552
+ const i = await this.sdk.findOrderById({ id: n, reference: e });
3105
2553
  return i.findOrder ? {
3106
2554
  id: i.findOrder.id,
3107
2555
  reference: i.findOrder.reference,
@@ -3126,19 +2574,19 @@ class Jt {
3126
2574
  return this.debugLog("Error finding order", i), this.handleError(i), null;
3127
2575
  }
3128
2576
  }
3129
- async findActiveOrder(t) {
3130
- this.debugLog("Fetching order from server", { orderId: t });
2577
+ async findActiveOrder(n) {
2578
+ this.debugLog("Fetching order from server", { orderId: n });
3131
2579
  try {
3132
- const n = await this.sdk.findActiveOrderById({ id: t });
3133
- if (!n?.findOrder)
2580
+ const e = await this.sdk.findActiveOrderById({ id: n });
2581
+ if (!e?.findOrder)
3134
2582
  return null;
3135
- const i = n.findOrder;
2583
+ const i = e.findOrder;
3136
2584
  this.debugLog("Order fetched successfully", i);
3137
2585
  const r = i.items, s = r.filter((d) => d.product != null && d.amount > 0).map((d) => {
3138
- let m = _.PRODUCT;
3139
- return d.product.type === "PROMOTER" ? m = _.ADD_ONS : d.product.type === "PICKUP" ? m = _.PICKUP : d.product.type === "DELIVERY" && (m = _.DELIVERY), {
2586
+ let f = T.PRODUCT;
2587
+ return d.product.type === "PROMOTER" ? f = T.ADD_ONS : d.product.type === "PICKUP" ? f = T.PICKUP : d.product.type === "DELIVERY" && (f = T.DELIVERY), {
3140
2588
  id: d.product.id,
3141
- type: m,
2589
+ type: f,
3142
2590
  name: d.product.name,
3143
2591
  icon: d.product.icon,
3144
2592
  description: d.product.description,
@@ -3152,51 +2600,51 @@ class Jt {
3152
2600
  label: y.label
3153
2601
  }))
3154
2602
  };
3155
- }), o = r.filter((d) => d.packageItem != null && d.amount > 0).reduce((d, m) => {
2603
+ }), o = r.filter((d) => d.packageItem != null && d.amount > 0).reduce((d, f) => {
3156
2604
  const {
3157
2605
  packageItem: y,
3158
- event: I,
3159
- amount: D,
3160
- price: N,
3161
- serviceFee: O,
3162
- depositPrice: C,
3163
- originalPrice: b
3164
- } = m, k = y.package.id;
3165
- d[k] ? (d[k].price += N ?? 0, d[k].serviceFee += O ?? 0, d[k].originalPrice += b ?? 0, d[k].depositPrice += C ?? N ?? 0) : d[k] = {
2606
+ event: p,
2607
+ amount: O,
2608
+ price: C,
2609
+ serviceFee: Y,
2610
+ depositPrice: H,
2611
+ originalPrice: J
2612
+ } = f, k = y.package.id;
2613
+ d[k] ? (d[k].price += C ?? 0, d[k].serviceFee += Y ?? 0, d[k].originalPrice += J ?? 0, d[k].depositPrice += H ?? C ?? 0) : d[k] = {
3166
2614
  id: k,
3167
- type: _.PACKAGE,
2615
+ type: T.PACKAGE,
3168
2616
  name: y.package.name,
3169
- amount: D,
3170
- price: N ?? 0,
3171
- serviceFee: O ?? 0,
3172
- depositPrice: C ?? N ?? 0,
3173
- originalPrice: b ?? 0,
2617
+ amount: O,
2618
+ price: C ?? 0,
2619
+ serviceFee: Y ?? 0,
2620
+ depositPrice: H ?? C ?? 0,
2621
+ originalPrice: J ?? 0,
3174
2622
  packageItems: []
3175
2623
  };
3176
- const A = L.fromISO(I.startAt, {
3177
- zone: I.timezone
3178
- }), x = L.fromISO(I.endAt, {
3179
- zone: I.timezone
2624
+ const Oe = A.fromISO(p.startAt, {
2625
+ zone: p.timezone
2626
+ }), ke = A.fromISO(p.endAt, {
2627
+ zone: p.timezone
3180
2628
  });
3181
2629
  return d[k].packageItems.push({
3182
2630
  packageItemId: y.id,
3183
- eventId: I.id,
3184
- name: I.name,
3185
- startAt: A.toJSDate().toISOString(),
3186
- endAt: x.toJSDate().toISOString()
2631
+ eventId: p.id,
2632
+ name: p.name,
2633
+ startAt: Oe.toJSDate().toISOString(),
2634
+ endAt: ke.toJSDate().toISOString()
3187
2635
  }), d;
3188
- }, {}), p = [
2636
+ }, {}), u = [
3189
2637
  ...s,
3190
2638
  ...Object.values(o)
3191
- ], f = p.reduce((d, m) => d + (m.amount || 0), 0);
3192
- if (f === 0)
2639
+ ], h = u.reduce((d, f) => d + (f.amount || 0), 0);
2640
+ if (h === 0)
3193
2641
  return null;
3194
- const l = r.filter((d) => d.amount > 0).map((d) => new Date(d.expiredAt).getTime()), g = L.fromMillis(Math.min(...l));
2642
+ const E = r.filter((d) => d.amount > 0).map((d) => new Date(d.expiredAt).getTime()), m = A.fromMillis(Math.min(...E));
3195
2643
  return {
3196
2644
  id: i.id,
3197
2645
  currency: i.currency,
3198
- expiredAt: g?.toJSDate().toISOString(),
3199
- items: p,
2646
+ expiredAt: m?.toJSDate().toISOString(),
2647
+ items: u,
3200
2648
  customer: i.mainBooker ? {
3201
2649
  firstName: i.mainBooker.firstName,
3202
2650
  lastName: i.mainBooker.lastName,
@@ -3206,29 +2654,29 @@ class Jt {
3206
2654
  residence: i.mainBooker.residence,
3207
2655
  extraInfo: i.mainBooker.extraInfo
3208
2656
  } : null,
3209
- count: f,
2657
+ count: h,
3210
2658
  orderProtection: !1
3211
2659
  };
3212
- } catch (n) {
3213
- throw this.debugLog("Error fetching order", n), n;
2660
+ } catch (e) {
2661
+ throw this.debugLog("Error fetching order", e), e;
3214
2662
  }
3215
2663
  }
3216
- debugLog(t, n) {
3217
- this.config.debug && console.log(`[BasketService] ${t}`, n || "");
2664
+ debugLog(n, e) {
2665
+ this.config.debug && console.log(`[BasketService] ${n}`, e || "");
3218
2666
  }
3219
- handleError(t) {
3220
- const n = t;
3221
- if (n.graphQLErrors && n.graphQLErrors.length > 0) {
3222
- const i = n.graphQLErrors[0];
2667
+ handleError(n) {
2668
+ const e = n;
2669
+ if (e.graphQLErrors && e.graphQLErrors.length > 0) {
2670
+ const i = e.graphQLErrors[0];
3223
2671
  i.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), i.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
3224
2672
  }
3225
- if (n.response?.errors && n.response.errors.length > 0) {
3226
- const i = n.response.errors[0];
2673
+ if (e.response?.errors && e.response.errors.length > 0) {
2674
+ const i = e.response.errors[0];
3227
2675
  console.error("GraphQL Error:", i.message), i.extensions?.code && console.error("Error Code:", i.extensions.code);
3228
2676
  }
3229
2677
  }
3230
2678
  }
3231
- const Xt = E`
2679
+ const Tt = l`
3232
2680
  query EventOverviewPage($organizationId: ID!, $hostingIds: [String!], $locationIds: [String!], $excludedEventIds: [String!], $trackerId: String, $filterEventStatuses: [EventStatus!], $dateRange: DateRangeInput, $page: PageInput, $sorts: [SortInput!], $searchTerm: String, $priceRange: PriceRangeInput) {
3233
2681
  findAllPublicEventByOrganizationId(
3234
2682
  id: $organizationId
@@ -3273,7 +2721,7 @@ const Xt = E`
3273
2721
  count
3274
2722
  }
3275
2723
  }
3276
- `, Wt = E`
2724
+ `, At = l`
3277
2725
  query EventDetailPage($eventId: ID!) {
3278
2726
  findPublicEventById(id: $eventId) {
3279
2727
  id
@@ -3305,7 +2753,7 @@ const Xt = E`
3305
2753
  totalViews
3306
2754
  }
3307
2755
  }
3308
- `, Zt = E`
2756
+ `, Nt = l`
3309
2757
  query findProductsByEventId($eventId: ID!, $promoCode: String, $trackerId: String, $productTypes: [ProductType!]) {
3310
2758
  findPublicProductsByEventId(
3311
2759
  eventId: $eventId
@@ -3339,153 +2787,66 @@ const Xt = E`
3339
2787
  showEndSalesAtTag
3340
2788
  }
3341
2789
  }
3342
- `, Kt = (e, t, n, i) => e();
3343
- function en(e, t = Kt) {
2790
+ `, Dt = (t, n, e, i) => t();
2791
+ function vt(t, n = Dt) {
3344
2792
  return {
3345
- EventOverviewPage(n, i, r) {
3346
- return t((s) => e.request({ document: Xt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", n);
2793
+ EventOverviewPage(e, i, r) {
2794
+ return n((s) => t.request({ document: Tt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", e);
3347
2795
  },
3348
- EventDetailPage(n, i, r) {
3349
- return t((s) => e.request({ document: Wt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", n);
2796
+ EventDetailPage(e, i, r) {
2797
+ return n((s) => t.request({ document: At, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", e);
3350
2798
  },
3351
- findProductsByEventId(n, i, r) {
3352
- return t((s) => e.request({ document: Zt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", n);
2799
+ findProductsByEventId(e, i, r) {
2800
+ return n((s) => t.request({ document: Nt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", e);
3353
2801
  }
3354
2802
  };
3355
2803
  }
3356
- function tn(e) {
3357
- const t = /(query|mutation|subscription)\s+(\w+)/.exec(e);
3358
- if (!t) return { type: "unknown" };
3359
- const n = t[1], i = t[2];
3360
- return { type: n, name: i };
3361
- }
3362
- async function nn(e) {
3363
- if (typeof globalThis < "u" && globalThis.crypto?.subtle) {
3364
- const n = new TextEncoder().encode(e), i = await globalThis.crypto.subtle.digest("SHA-256", n);
3365
- return Array.from(new Uint8Array(i)).map((r) => r.toString(16).padStart(2, "0")).join("");
3366
- }
3367
- try {
3368
- const { createHash: t } = await import("./__vite-browser-external-l0sNRNKZ.js");
3369
- return t("sha256").update(e).digest("hex");
3370
- } catch {
3371
- throw new Error("SHA-256 is not available in this environment");
3372
- }
3373
- }
3374
- function rn(e) {
3375
- const t = { "content-type": "application/json" };
3376
- if (e)
3377
- for (const [n, i] of Object.entries(e))
3378
- typeof i < "u" && (t[n] = String(i));
3379
- return t;
3380
- }
3381
- function me(e, t) {
3382
- return e?.length ? e.some((n) => t.includes(n?.extensions?.code) || t.includes(n?.message)) : !1;
3383
- }
3384
- function ge(e, t, n, i, r) {
3385
- const s = new Error(e);
3386
- 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;
3387
- }
3388
- function ne(e, t, n, i, r) {
3389
- if (r.json?.errors?.length)
3390
- throw ge(`GraphQL request failed${e ? ` (${e})` : ""}`, t, n, i, r);
3391
- if (typeof r.json?.data > "u")
3392
- throw ge("GraphQL request failed: no data received", t, n, i, r);
3393
- return r.json.data;
3394
- }
3395
- class Z extends oe {
3396
- async request(t, ...n) {
3397
- let i = t, r, s, o;
3398
- 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]);
3399
- const p = typeof i == "string" ? i : xt(i), { type: f, name: l } = tn(p), g = await nn(p), d = r ?? {}, m = this.url ?? this.endpoint ?? "", y = rn(s), I = async (A) => {
3400
- const x = await fetch(m, { method: "POST", headers: y, body: JSON.stringify(A), signal: o });
3401
- let P = null;
3402
- try {
3403
- P = await x.json();
3404
- } catch {
3405
- P = null;
3406
- }
3407
- return { status: x.status, json: P };
3408
- }, D = async (A) => {
3409
- const x = new URLSearchParams();
3410
- for (const [Ve, M] of Object.entries(A))
3411
- typeof M > "u" || x.set(Ve, typeof M == "string" ? M : JSON.stringify(M));
3412
- const P = m.includes("?") ? "&" : "?", $ = `${m}${P}${x.toString()}`, ue = await fetch($, { method: "GET", headers: y, signal: o });
3413
- let K = null;
3414
- try {
3415
- K = await ue.json();
3416
- } catch {
3417
- K = null;
3418
- }
3419
- return { status: ue.status, json: K };
3420
- }, N = {
3421
- operationName: l,
3422
- variables: d,
3423
- extensions: { persistedQuery: { version: 1, sha256Hash: g } }
3424
- }, O = async (A, x, P) => {
3425
- if (me(A.json?.errors, ["PERSISTED_QUERY_NOT_FOUND", "PersistedQueryNotFound"])) {
3426
- const $ = await x();
3427
- return ne("APQ register", p, d, l, $);
3428
- }
3429
- if (me(A.json?.errors, ["PERSISTED_QUERY_NOT_SUPPORTED"])) {
3430
- const $ = await P();
3431
- return ne("no APQ support", p, d, l, $);
3432
- }
3433
- return ne("", p, d, l, A);
3434
- };
3435
- if (f === "query") {
3436
- const A = await D(N);
3437
- return O(A, () => I({ ...N, query: p }), () => I({ operationName: l, variables: d, query: p }));
3438
- }
3439
- const C = await I(N);
3440
- return O(C, () => I({ ...N, query: p }), () => I({ operationName: l, variables: d, query: p }));
3441
- }
3442
- }
3443
- class sn {
2804
+ class Pt {
3444
2805
  config;
3445
2806
  sdk;
3446
- constructor(t) {
3447
- this.config = t, this.sdk = en(new Z(t.apiUrl));
2807
+ constructor(n) {
2808
+ this.config = n, this.sdk = vt(new v(n.apiUrl));
3448
2809
  }
3449
- async getEvents(t = {}) {
2810
+ async getEvents(n = {}) {
3450
2811
  try {
3451
- t.page && (t.page = {
3452
- index: t.page.index ?? 0,
3453
- size: t.page.size ?? 20
2812
+ n.page && (n.page = {
2813
+ index: n.page.index ?? 0,
2814
+ size: n.page.size ?? 20
3454
2815
  }), this.debugLog("Fetching events with parameters", {
3455
2816
  organizationId: this.config.organizationId,
3456
- hostingIds: t.hostingIds,
3457
- filterEventStatuses: t.statuses,
3458
- dateRange: t.dateRange,
3459
- page: t.page,
3460
- sorts: t.sorts,
2817
+ hostingIds: n.hostingIds,
2818
+ filterEventStatuses: n.statuses,
2819
+ dateRange: n.dateRange,
2820
+ page: n.page,
2821
+ sorts: n.sorts,
3461
2822
  trackerId: this.config.trackerId
3462
2823
  });
3463
- const n = await this.sdk.EventOverviewPage({
2824
+ const e = await this.sdk.EventOverviewPage({
3464
2825
  organizationId: this.config.organizationId,
3465
- hostingIds: t.hostingIds,
3466
- locationIds: t.locationIds,
3467
- excludedEventIds: t.excludedEventIds,
3468
- filterEventStatuses: t.statuses,
3469
- dateRange: t.dateRange && t.dateRange.from && t.dateRange.till ? {
3470
- from: t.dateRange.from.toISO(),
3471
- till: t.dateRange.till.toISO()
2826
+ hostingIds: n.hostingIds,
2827
+ locationIds: n.locationIds,
2828
+ excludedEventIds: n.excludedEventIds,
2829
+ filterEventStatuses: n.statuses,
2830
+ dateRange: n.dateRange && n.dateRange.from && n.dateRange.till ? {
2831
+ from: n.dateRange.from.toISO(),
2832
+ till: n.dateRange.till.toISO()
3472
2833
  } : void 0,
3473
- page: t.page,
3474
- sorts: t.sorts,
2834
+ page: n.page,
2835
+ sorts: n.sorts,
3475
2836
  trackerId: this.config.trackerId,
3476
- searchTerm: t.searchTerm,
3477
- priceRange: t.priceRange
2837
+ searchTerm: n.searchTerm,
2838
+ priceRange: n.priceRange
3478
2839
  });
3479
- if (this.debugLog("Raw GraphQL response", n), n?.findAllPublicEventByOrganizationId?.data) {
3480
- const i = n.findAllPublicEventByOrganizationId.data.map((r) => ({
2840
+ if (this.debugLog("Raw GraphQL response", e), e?.findAllPublicEventByOrganizationId?.data) {
2841
+ const i = e.findAllPublicEventByOrganizationId.data.map((r) => ({
3481
2842
  id: r.id,
3482
2843
  name: r.name,
3483
2844
  icon: r.icon,
3484
2845
  banner: r.banner,
3485
2846
  description: r.description,
3486
2847
  addonDescription: r.addonDescription,
3487
- startAt: L.fromISO(r.startAt, { zone: r.timezone }).toJSDate().toISOString(),
3488
- endAt: L.fromISO(r.endAt, { zone: r.timezone }).toJSDate().toISOString(),
2848
+ startAt: A.fromISO(r.startAt, { zone: r.timezone }).toJSDate().toISOString(),
2849
+ endAt: A.fromISO(r.endAt, { zone: r.timezone }).toJSDate().toISOString(),
3489
2850
  timezone: r.timezone,
3490
2851
  startSalesAt: null,
3491
2852
  endSalesAt: null,
@@ -3505,27 +2866,27 @@ class sn {
3505
2866
  startingPrice: r.startingPrice,
3506
2867
  totalViews: r.totalViews
3507
2868
  }));
3508
- return this.debugLog("Processed events", { events: i, count: i.length }), [i, n.findAllPublicEventByOrganizationId.count ?? 0];
2869
+ return this.debugLog("Processed events", { events: i, count: i.length }), [i, e.findAllPublicEventByOrganizationId.count ?? 0];
3509
2870
  } else
3510
2871
  return this.debugLog("No events found in response"), [[], 0];
3511
- } catch (n) {
3512
- throw this.debugLog("Error fetching events", n), n;
2872
+ } catch (e) {
2873
+ throw this.debugLog("Error fetching events", e), e;
3513
2874
  }
3514
2875
  }
3515
- async getEvent(t) {
2876
+ async getEvent(n) {
3516
2877
  try {
3517
- this.debugLog("Fetching single event", { eventId: t });
3518
- const n = await this.sdk.EventDetailPage({ eventId: t });
3519
- if (this.debugLog("Raw GraphQL response", n), n?.findPublicEventById) {
3520
- const i = n.findPublicEventById, r = {
2878
+ this.debugLog("Fetching single event", { eventId: n });
2879
+ const e = await this.sdk.EventDetailPage({ eventId: n });
2880
+ if (this.debugLog("Raw GraphQL response", e), e?.findPublicEventById) {
2881
+ const i = e.findPublicEventById, r = {
3521
2882
  id: i.id,
3522
2883
  name: i.name,
3523
2884
  icon: i.icon,
3524
2885
  banner: i.banner,
3525
2886
  description: i.description,
3526
2887
  addonDescription: i.addonDescription,
3527
- startAt: L.fromISO(i.startAt, { zone: i.timezone }).toJSDate().toISOString(),
3528
- endAt: L.fromISO(i.endAt, { zone: i.timezone }).toJSDate().toISOString(),
2888
+ startAt: A.fromISO(i.startAt, { zone: i.timezone }).toJSDate().toISOString(),
2889
+ endAt: A.fromISO(i.endAt, { zone: i.timezone }).toJSDate().toISOString(),
3529
2890
  timezone: i.timezone,
3530
2891
  startSalesAt: i.startSalesAt,
3531
2892
  endSalesAt: i.endSalesAt,
@@ -3547,26 +2908,26 @@ class sn {
3547
2908
  };
3548
2909
  return this.debugLog("Processed single event", r), r;
3549
2910
  } else {
3550
- this.debugLog("No event found for id", t);
2911
+ this.debugLog("No event found for id", n);
3551
2912
  return;
3552
2913
  }
3553
- } catch (n) {
3554
- throw this.debugLog("Error fetching single event", n), n;
2914
+ } catch (e) {
2915
+ throw this.debugLog("Error fetching single event", e), e;
3555
2916
  }
3556
2917
  }
3557
- async getProducts(t, n, i) {
2918
+ async getProducts(n, e, i) {
3558
2919
  try {
3559
2920
  this.debugLog("Fetching products for event", {
3560
- eventId: t,
2921
+ eventId: n,
3561
2922
  promoCode: i,
3562
2923
  trackerId: this.config.trackerId,
3563
- productTypes: n
2924
+ productTypes: e
3564
2925
  });
3565
2926
  const r = await this.sdk.findProductsByEventId({
3566
- eventId: t,
2927
+ eventId: n,
3567
2928
  promoCode: i,
3568
2929
  trackerId: this.config.trackerId,
3569
- productTypes: n
2930
+ productTypes: e
3570
2931
  });
3571
2932
  if (r?.findPublicProductsByEventId) {
3572
2933
  const s = r.findPublicProductsByEventId.map((o) => ({
@@ -3594,21 +2955,21 @@ class sn {
3594
2955
  type: o.type
3595
2956
  }));
3596
2957
  return this.debugLog("Products fetched", {
3597
- eventId: t,
2958
+ eventId: n,
3598
2959
  count: s.length,
3599
2960
  types: s.map((o) => o.type)
3600
2961
  }), s;
3601
2962
  }
3602
2963
  return;
3603
2964
  } catch (r) {
3604
- throw this.debugLog("Error fetching products", { eventId: t, error: r }), r;
2965
+ throw this.debugLog("Error fetching products", { eventId: n, error: r }), r;
3605
2966
  }
3606
2967
  }
3607
- debugLog(t, n) {
3608
- this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${t}`, n || "");
2968
+ debugLog(n, e) {
2969
+ this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${n}`, e || "");
3609
2970
  }
3610
2971
  }
3611
- const an = E`
2972
+ const xt = l`
3612
2973
  query findPaymentMethods($orderId: ID!, $orderItemId: String, $amountOfTickets: Int, $paymentMethodId: String, $withTicketProtection: Boolean) {
3613
2974
  findPaymentDetails(
3614
2975
  orderId: $orderId
@@ -3638,40 +2999,40 @@ const an = E`
3638
2999
  protectionFee
3639
3000
  }
3640
3001
  }
3641
- `, on = E`
3002
+ `, bt = l`
3642
3003
  mutation createDigitalPayment($input: CreateDigitalOrderPaymentInput!) {
3643
3004
  createDigitalOrderPayment(input: $input)
3644
3005
  }
3645
- `, cn = (e, t, n, i) => e();
3646
- function dn(e, t = cn) {
3006
+ `, St = (t, n, e, i) => t();
3007
+ function Ct(t, n = St) {
3647
3008
  return {
3648
- findPaymentMethods(n, i, r) {
3649
- return t((s) => e.request({ document: an, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", n);
3009
+ findPaymentMethods(e, i, r) {
3010
+ return n((s) => t.request({ document: xt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", e);
3650
3011
  },
3651
- createDigitalPayment(n, i, r) {
3652
- return t((s) => e.request({ document: on, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", n);
3012
+ createDigitalPayment(e, i, r) {
3013
+ return n((s) => t.request({ document: bt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", e);
3653
3014
  }
3654
3015
  };
3655
3016
  }
3656
- class un {
3017
+ class _t {
3657
3018
  config;
3658
3019
  sdk;
3659
- constructor(t) {
3660
- this.config = t, this.sdk = dn(new oe(t.apiUrl));
3020
+ constructor(n) {
3021
+ this.config = n, this.sdk = Ct(new v(n.apiUrl));
3661
3022
  }
3662
- async getPaymentDetails(t) {
3663
- this.debugLog("Fetching payment methods", t);
3023
+ async getPaymentDetails(n) {
3024
+ this.debugLog("Fetching payment methods", n);
3664
3025
  try {
3665
- const n = await this.sdk.findPaymentMethods({
3666
- orderId: t.orderId,
3667
- orderItemId: t.orderItemId,
3668
- amountOfTickets: t.amountOfTickets,
3669
- paymentMethodId: t.paymentMethodId,
3670
- withTicketProtection: t.withTicketProtection
3026
+ const e = await this.sdk.findPaymentMethods({
3027
+ orderId: n.orderId,
3028
+ orderItemId: n.orderItemId,
3029
+ amountOfTickets: n.amountOfTickets,
3030
+ paymentMethodId: n.paymentMethodId,
3031
+ withTicketProtection: n.withTicketProtection
3671
3032
  });
3672
- if (!n?.findPaymentDetails)
3033
+ if (!e?.findPaymentDetails)
3673
3034
  throw this.debugLog("No payment details found"), new Error("No payment details found for this order");
3674
- const i = n.findPaymentDetails;
3035
+ const i = e.findPaymentDetails;
3675
3036
  return this.debugLog("Payment methods fetched successfully", {
3676
3037
  methodCount: i.methods?.length ?? 0,
3677
3038
  transactionPrice: i.transactionPrice,
@@ -3700,42 +3061,42 @@ class un {
3700
3061
  })) ?? null
3701
3062
  })) ?? null
3702
3063
  };
3703
- } catch (n) {
3704
- throw this.debugLog("Error fetching payment methods", n), n;
3064
+ } catch (e) {
3065
+ throw this.debugLog("Error fetching payment methods", e), e;
3705
3066
  }
3706
3067
  }
3707
- async createPayment(t) {
3708
- this.debugLog("Creating payment", t);
3068
+ async createPayment(n) {
3069
+ this.debugLog("Creating payment", n);
3709
3070
  try {
3710
- const n = {
3711
- orderId: t.orderId,
3712
- paymentMethodId: t.paymentMethodId,
3713
- issuerId: t.issuerId,
3714
- redirectUrl: t.redirectUrl,
3071
+ const e = {
3072
+ orderId: n.orderId,
3073
+ paymentMethodId: n.paymentMethodId,
3074
+ issuerId: n.issuerId,
3075
+ redirectUrl: n.redirectUrl,
3715
3076
  // For payment links this input in used
3716
- initiatedByUserId: t.initiatedByUserId,
3717
- initiatedByTeamId: t.initiatedByTeamId,
3718
- amountOfTickets: t.amountOfTickets,
3719
- orderItemId: t.orderItemId,
3720
- withTicketProtection: t.withTicketProtection
3077
+ initiatedByUserId: n.initiatedByUserId,
3078
+ initiatedByTeamId: n.initiatedByTeamId,
3079
+ amountOfTickets: n.amountOfTickets,
3080
+ orderItemId: n.orderItemId,
3081
+ withTicketProtection: n.withTicketProtection
3721
3082
  };
3722
- 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);
3083
+ n.customer && (e.customer = n.customer), n.products && (e.products = n.products), n.description && (e.description = n.description), n.reference && (e.reference = n.reference), n.ipAddress && (e.ipAddress = n.ipAddress);
3723
3084
  const i = await this.sdk.createDigitalPayment({
3724
- input: n
3085
+ input: e
3725
3086
  });
3726
3087
  if (!i?.createDigitalOrderPayment)
3727
3088
  throw this.debugLog("Failed to create payment"), new Error("Failed to create payment for this order");
3728
3089
  const r = i.createDigitalOrderPayment;
3729
3090
  return this.debugLog("Payment created successfully", { paymentUrl: r }), { paymentUrl: r };
3730
- } catch (n) {
3731
- throw this.debugLog("Error creating payment", n), n;
3091
+ } catch (e) {
3092
+ throw this.debugLog("Error creating payment", e), e;
3732
3093
  }
3733
3094
  }
3734
- debugLog(t, n) {
3735
- this.config.debug && console.log(`[PaymentService] ${t}`, n || "");
3095
+ debugLog(n, e) {
3096
+ this.config.debug && console.log(`[PaymentService] ${n}`, e || "");
3736
3097
  }
3737
3098
  }
3738
- const ln = E`
3099
+ const Lt = l`
3739
3100
  query findAllPublicPackagesByOrganizationId($organizationId: ID!) {
3740
3101
  findAllPublicPackagesByOrganizationId(organizationId: $organizationId) {
3741
3102
  data {
@@ -3760,7 +3121,7 @@ const ln = E`
3760
3121
  count
3761
3122
  }
3762
3123
  }
3763
- `, pn = E`
3124
+ `, Rt = l`
3764
3125
  query findPublicPackageById($packageId: ID!) {
3765
3126
  findPublicPackageById(id: $packageId) {
3766
3127
  id
@@ -3786,7 +3147,7 @@ const ln = E`
3786
3147
  }
3787
3148
  }
3788
3149
  }
3789
- `, hn = E`
3150
+ `, wt = l`
3790
3151
  query findPublicItemsByPackageId($packageId: ID!, $types: [PackageItemType!], $page: PageInput) {
3791
3152
  findPublicItemsByPackageId(packageId: $packageId, types: $types, page: $page) {
3792
3153
  data {
@@ -3821,40 +3182,40 @@ const ln = E`
3821
3182
  count
3822
3183
  }
3823
3184
  }
3824
- `, fn = (e, t, n, i) => e();
3825
- function mn(e, t = fn) {
3185
+ `, Ft = (t, n, e, i) => t();
3186
+ function $t(t, n = Ft) {
3826
3187
  return {
3827
- findAllPublicPackagesByOrganizationId(n, i, r) {
3828
- return t((s) => e.request({ document: ln, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", n);
3188
+ findAllPublicPackagesByOrganizationId(e, i, r) {
3189
+ return n((s) => t.request({ document: Lt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", e);
3829
3190
  },
3830
- findPublicPackageById(n, i, r) {
3831
- return t((s) => e.request({ document: pn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", n);
3191
+ findPublicPackageById(e, i, r) {
3192
+ return n((s) => t.request({ document: Rt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", e);
3832
3193
  },
3833
- findPublicItemsByPackageId(n, i, r) {
3834
- return t((s) => e.request({ document: hn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", n);
3194
+ findPublicItemsByPackageId(e, i, r) {
3195
+ return n((s) => t.request({ document: wt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", e);
3835
3196
  }
3836
3197
  };
3837
3198
  }
3838
- class gn {
3199
+ class Bt {
3839
3200
  config;
3840
3201
  sdk;
3841
- constructor(t) {
3842
- this.config = t, this.sdk = mn(new Z(t.apiUrl));
3202
+ constructor(n) {
3203
+ this.config = n, this.sdk = $t(new v(n.apiUrl));
3843
3204
  }
3844
- debugLog(t, n) {
3845
- this.config.debug && console.log(`[PackageService] ${t}`, n || "");
3205
+ debugLog(n, e) {
3206
+ this.config.debug && console.log(`[PackageService] ${n}`, e || "");
3846
3207
  }
3847
- async getPackages(t = {}) {
3208
+ async getPackages(n = {}) {
3848
3209
  try {
3849
- let n;
3850
- t.page && (n = {
3851
- index: t.page.index ?? 0,
3852
- size: t.page.size ?? 20
3210
+ let e;
3211
+ n.page && (e = {
3212
+ index: n.page.index ?? 0,
3213
+ size: n.page.size ?? 20
3853
3214
  }), this.debugLog("Fetching public packages", {
3854
3215
  organizationId: this.config.organizationId,
3855
- page: n,
3856
- tab: t.tab,
3857
- statuses: t.statuses
3216
+ page: e,
3217
+ tab: n.tab,
3218
+ statuses: n.statuses
3858
3219
  });
3859
3220
  const i = await this.sdk.findAllPublicPackagesByOrganizationId({
3860
3221
  organizationId: this.config.organizationId
@@ -3867,31 +3228,31 @@ class gn {
3867
3228
  }), r.data;
3868
3229
  }
3869
3230
  return null;
3870
- } catch (n) {
3871
- throw this.debugLog("Error fetching public packages", n), n;
3231
+ } catch (e) {
3232
+ throw this.debugLog("Error fetching public packages", e), e;
3872
3233
  }
3873
3234
  }
3874
- async getPackage(t) {
3235
+ async getPackage(n) {
3875
3236
  try {
3876
3237
  this.debugLog("Fetching public packages", {
3877
- packageId: t
3238
+ packageId: n
3878
3239
  });
3879
- const n = await this.sdk.findPublicPackageById({ packageId: t });
3880
- if (n?.findPublicPackageById) {
3881
- const i = n.findPublicPackageById;
3240
+ const e = await this.sdk.findPublicPackageById({ packageId: n });
3241
+ if (e?.findPublicPackageById) {
3242
+ const i = e.findPublicPackageById;
3882
3243
  return this.debugLog("Public package fetched"), i;
3883
3244
  }
3884
3245
  return null;
3885
- } catch (n) {
3886
- throw this.debugLog("Error fetching public packages", n), n;
3246
+ } catch (e) {
3247
+ throw this.debugLog("Error fetching public packages", e), e;
3887
3248
  }
3888
3249
  }
3889
- async getPackageItems(t, n = [Y.Regular, Y.AdditionalEvent]) {
3250
+ async getPackageItems(n, e = [R.Regular, R.AdditionalEvent]) {
3890
3251
  try {
3891
- this.debugLog("Fetching public package items", { packageId: t, types: n });
3252
+ this.debugLog("Fetching public package items", { packageId: n, types: e });
3892
3253
  const i = await this.sdk.findPublicItemsByPackageId({
3893
- packageId: t,
3894
- types: n,
3254
+ packageId: n,
3255
+ types: e,
3895
3256
  page: { index: 0, size: 100 }
3896
3257
  });
3897
3258
  if (i?.findPublicItemsByPackageId) {
@@ -3907,7 +3268,7 @@ class gn {
3907
3268
  }
3908
3269
  }
3909
3270
  }
3910
- const In = E`
3271
+ const Vt = l`
3911
3272
  query findAllPublicCategoriesByOrganizationId($organizationId: ID!, $dateRange: DateRangeInput) {
3912
3273
  findAllPublicLocationsByOrganizationId(id: $organizationId) {
3913
3274
  data {
@@ -3927,89 +3288,89 @@ const In = E`
3927
3288
  count
3928
3289
  }
3929
3290
  }
3930
- `, En = (e, t, n, i) => e();
3931
- function yn(e, t = En) {
3291
+ `, Ut = (t, n, e, i) => t();
3292
+ function Mt(t, n = Ut) {
3932
3293
  return {
3933
- findAllPublicCategoriesByOrganizationId(n, i, r) {
3934
- return t((s) => e.request({ document: In, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", n);
3294
+ findAllPublicCategoriesByOrganizationId(e, i, r) {
3295
+ return n((s) => t.request({ document: Vt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", e);
3935
3296
  }
3936
3297
  };
3937
3298
  }
3938
- class Tn {
3299
+ class zt {
3939
3300
  config;
3940
3301
  sdk;
3941
- constructor(t) {
3942
- this.config = t, this.sdk = yn(new Z(t.apiUrl));
3302
+ constructor(n) {
3303
+ this.config = n, this.sdk = Mt(new v(n.apiUrl));
3943
3304
  }
3944
- debugLog(t, n) {
3945
- this.config.debug && console.log(`[CategoryService] ${t}`, n || "");
3305
+ debugLog(n, e) {
3306
+ this.config.debug && console.log(`[CategoryService] ${n}`, e || "");
3946
3307
  }
3947
- async getCategories(t) {
3308
+ async getCategories(n) {
3948
3309
  try {
3949
3310
  this.debugLog("Fetching all categories", { organizationId: this.config.organizationId });
3950
- const n = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId, dateRange: t ?? null });
3951
- if (n?.findAllPublicHostingsByOrganizationId) {
3952
- const i = n.findAllPublicHostingsByOrganizationId, r = n.findAllPublicLocationsByOrganizationId;
3311
+ const e = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId, dateRange: n ?? null });
3312
+ if (e?.findAllPublicHostingsByOrganizationId) {
3313
+ const i = e.findAllPublicHostingsByOrganizationId, r = e.findAllPublicLocationsByOrganizationId;
3953
3314
  return this.debugLog("Categories fetched", { count: i.count + r.count, dataLength: i.data.length + r.data.length }), [
3954
3315
  ...i.data.map((s) => ({ id: s.id, name: s.name, icon: s.icon, activeEvents: s.amountOfActiveEvents, type: "HOSTING" })),
3955
3316
  ...r.data.map((s) => ({ id: s.id, name: s.name, activeEvents: s.amountOfActiveEvents, type: "LOCATION" }))
3956
3317
  ];
3957
3318
  }
3958
3319
  return [];
3959
- } catch (n) {
3960
- throw this.debugLog("Error fetching categories", n), n;
3320
+ } catch (e) {
3321
+ throw this.debugLog("Error fetching categories", e), e;
3961
3322
  }
3962
3323
  }
3963
3324
  }
3964
- const vn = E`
3325
+ const qt = l`
3965
3326
  mutation CreateShopView($id: ID!, $trackerLinkId: ID) {
3966
3327
  createShopView(id: $id, trackerId: $trackerLinkId)
3967
3328
  }
3968
- `, kn = E`
3329
+ `, Gt = l`
3969
3330
  mutation CreateEventView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
3970
3331
  createEventView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
3971
3332
  }
3972
- `, On = E`
3333
+ `, jt = l`
3973
3334
  mutation CreatePackageView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
3974
3335
  createPackageView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
3975
3336
  }
3976
- `, An = (e, t, n, i) => e();
3977
- function Dn(e, t = An) {
3337
+ `, Yt = (t, n, e, i) => t();
3338
+ function Ht(t, n = Yt) {
3978
3339
  return {
3979
- CreateShopView(n, i, r) {
3980
- return t((s) => e.request({ document: vn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", n);
3340
+ CreateShopView(e, i, r) {
3341
+ return n((s) => t.request({ document: qt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", e);
3981
3342
  },
3982
- CreateEventView(n, i, r) {
3983
- return t((s) => e.request({ document: kn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", n);
3343
+ CreateEventView(e, i, r) {
3344
+ return n((s) => t.request({ document: Gt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", e);
3984
3345
  },
3985
- CreatePackageView(n, i, r) {
3986
- return t((s) => e.request({ document: On, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", n);
3346
+ CreatePackageView(e, i, r) {
3347
+ return n((s) => t.request({ document: jt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", e);
3987
3348
  }
3988
3349
  };
3989
3350
  }
3990
- class Nn {
3351
+ class Jt {
3991
3352
  config;
3992
3353
  sdk;
3993
- constructor(t) {
3994
- this.config = t, this.sdk = Dn(new Z(t.apiUrl));
3354
+ constructor(n) {
3355
+ this.config = n, this.sdk = Ht(new v(n.apiUrl));
3995
3356
  }
3996
- createMetric = async (t, n, i) => {
3997
- switch (!n && !i && await this.sdk.CreateShopView({
3998
- id: t,
3357
+ createMetric = async (n, e, i) => {
3358
+ switch (!e && !i && await this.sdk.CreateShopView({
3359
+ id: n,
3999
3360
  trackerLinkId: this.config.trackerId
4000
3361
  }), i) {
4001
- case H.Event:
3362
+ case w.Event:
4002
3363
  await this.sdk.CreateEventView({
4003
- id: t,
4004
- shopId: n,
3364
+ id: n,
3365
+ shopId: e,
4005
3366
  trackerLinkId: this.config.trackerId
4006
3367
  });
4007
3368
  break;
4008
- case H.Package:
3369
+ case w.Package:
4009
3370
  await this.sdk.CreatePackageView(
4010
3371
  {
4011
- id: t,
4012
- shopId: n,
3372
+ id: n,
3373
+ shopId: e,
4013
3374
  trackerLinkId: this.config.trackerId
4014
3375
  }
4015
3376
  );
@@ -4017,8 +3378,8 @@ class Nn {
4017
3378
  }
4018
3379
  };
4019
3380
  }
4020
- const xn = "https://api.ticketapp.com/graphql", Ie = "TIC_TRACKER_ID";
4021
- class Sn {
3381
+ const Qt = "https://api.ticketapp.com/graphql", Z = "TIC_TRACKER_ID";
3382
+ class Zt {
4022
3383
  basket;
4023
3384
  event;
4024
3385
  payment;
@@ -4026,42 +3387,42 @@ class Sn {
4026
3387
  category;
4027
3388
  metric;
4028
3389
  // Attach selected public types to the SDK class
4029
- static Types = Ue;
4030
- constructor(t) {
4031
- const { organizationId: n, debug: i = !1, apiUrl: r = xn } = t, s = this.getOrInitTrackerId();
4032
- this.basket = new Jt({ debug: i, apiUrl: r, shopId: t.shopId, trackerId: s }), this.event = new sn({ organizationId: n, debug: i, apiUrl: r, trackerId: s }), this.payment = new un({ debug: i, apiUrl: r }), this.package = new gn({ organizationId: n, debug: i, apiUrl: r }), this.category = new Tn({ organizationId: n, debug: i, apiUrl: r }), this.metric = new Nn({ apiUrl: r, trackerId: s });
3390
+ static Types = Te;
3391
+ constructor(n) {
3392
+ const { organizationId: e, debug: i = !1, apiUrl: r = Qt } = n, s = this.getOrInitTrackerId();
3393
+ this.basket = new kt({ debug: i, apiUrl: r, shopId: n.shopId, trackerId: s }), this.event = new Pt({ organizationId: e, debug: i, apiUrl: r, trackerId: s }), this.payment = new _t({ debug: i, apiUrl: r }), this.package = new Bt({ organizationId: e, debug: i, apiUrl: r }), this.category = new zt({ organizationId: e, debug: i, apiUrl: r }), this.metric = new Jt({ apiUrl: r, trackerId: s });
4033
3394
  }
4034
3395
  // Resolve tracker id from (in order): explicit config, URL query, or session storage
4035
3396
  // Persist to session when found via config or URL for subsequent page loads
4036
3397
  getOrInitTrackerId() {
4037
3398
  try {
4038
- let t = null, n = null;
3399
+ let n = null, e = null;
4039
3400
  if (typeof window < "u") {
4040
3401
  try {
4041
- n = new URL(window.location.href).searchParams.get("trackerId");
3402
+ e = new URL(window.location.href).searchParams.get("trackerId");
4042
3403
  } catch {
4043
3404
  }
4044
3405
  try {
4045
- t = window.sessionStorage?.getItem(Ie) ?? null;
3406
+ n = window.sessionStorage?.getItem(Z) ?? null;
4046
3407
  } catch {
4047
3408
  }
4048
3409
  }
4049
- if (n && n.trim().length > 0) {
3410
+ if (e && e.trim().length > 0) {
4050
3411
  try {
4051
- typeof window < "u" && window.sessionStorage && sessionStorage.setItem(Ie, n);
3412
+ typeof window < "u" && window.sessionStorage && sessionStorage.setItem(Z, e);
4052
3413
  } catch {
4053
3414
  }
4054
- return n;
3415
+ return e;
4055
3416
  }
4056
- if (t && t.trim().length > 0) {
3417
+ if (n && n.trim().length > 0) {
4057
3418
  try {
4058
3419
  if (typeof window < "u") {
4059
3420
  const i = new URL(window.location.href);
4060
- i.searchParams.get("trackerId") || (i.searchParams.set("trackerId", t), window.history.replaceState({}, "", i.toString()));
3421
+ i.searchParams.get("trackerId") || (i.searchParams.set("trackerId", n), window.history.replaceState({}, "", i.toString()));
4061
3422
  }
4062
3423
  } catch {
4063
3424
  }
4064
- return t;
3425
+ return n;
4065
3426
  }
4066
3427
  return;
4067
3428
  } catch {
@@ -4070,17 +3431,17 @@ class Sn {
4070
3431
  }
4071
3432
  }
4072
3433
  export {
4073
- _ as BasketOrderType,
4074
- Ne as DiscountType,
4075
- Te as EventStatus,
4076
- H as MetricsType,
4077
- De as OrderItemType,
4078
- Y as PackageItemType,
4079
- Ee as PackageStatus,
4080
- ye as PackageTabType,
4081
- Ae as PaymentMethodFeeType,
4082
- ke as ProductStatus,
4083
- Oe as ProductType,
4084
- ve as SortOrder,
4085
- Sn as TicketappSDK
3434
+ T as BasketOrderType,
3435
+ oe as DiscountType,
3436
+ te as EventStatus,
3437
+ w as MetricsType,
3438
+ ae as OrderItemType,
3439
+ R as PackageItemType,
3440
+ K as PackageStatus,
3441
+ ee as PackageTabType,
3442
+ se as PaymentMethodFeeType,
3443
+ ie as ProductStatus,
3444
+ re as ProductType,
3445
+ ne as SortOrder,
3446
+ Zt as TicketappSDK
4086
3447
  };