@ticketapp-dev/shop-sdk 1.0.72 → 1.0.74

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,6 +1,6 @@
1
1
  import { GraphQLClient as T } from "graphql-request";
2
2
  import { DateTime as De } from "luxon";
3
- var O = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(O || {}), N = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(N || {}), W = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(W || {}), Z = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(Z || {}), K = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(K || {}), ee = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(ee || {}), te = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(te || {}), ne = /* @__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))(ne || {}), re = /* @__PURE__ */ ((e) => (e.FIXED = "FIXED", e.PERCENTAGE = "PERCENTAGE", e))(re || {}), ie = /* @__PURE__ */ ((e) => (e.AddOn = "ADD_ON", e.DeliveryOption = "DELIVERY_OPTION", e.EntranceTicket = "ENTRANCE_TICKET", e))(ie || {}), se = /* @__PURE__ */ ((e) => (e.Fixed = "FIXED", e.Percentage = "PERCENTAGE", e))(se || {}), ae = /* @__PURE__ */ ((e) => (e.Default = "DEFAULT", e.Transparent = "TRANSPARENT", e))(ae || {}), oe = /* @__PURE__ */ ((e) => (e.Calendar = "CALENDAR", e.Large = "LARGE", e.Small = "SMALL", e))(oe || {}), R = /* @__PURE__ */ ((e) => (e.Event = "EVENT", e.Package = "PACKAGE", e))(R || {}), ce = /* @__PURE__ */ ((e) => (e.RADIO_BUTTON = "RADIO_BUTTON", e.DATE = "DATE", e.EMAIL = "EMAIL", e.NUMERIC = "NUMERIC", e.DROPDOWN = "DROPDOWN", e.TEXT = "TEXT", e.TEXT_AREA = "TEXT_AREA", e.TIME = "TIME", e.CHECKBOX = "CHECKBOX", e.PHONE_NUMBER = "PHONE_NUMBER", e))(ce || {}), de = /* @__PURE__ */ ((e) => (e.GENDER = "GENDER", e.FIRST_NAME = "FIRST_NAME", e.LAST_NAME = "LAST_NAME", e.EMAIL = "EMAIL", e.AGE = "AGE", e.RESIDENCE = "RESIDENCE", e.GOOGLE_PLACE = "GOOGLE_PLACE", e))(de || {}), ue = /* @__PURE__ */ ((e) => (e.ONLINE = "ONLINE", e.OFFLINE = "OFFLINE", e))(ue || {});
3
+ var O = /* @__PURE__ */ ((e) => (e.PACKAGE = "PACKAGE", e.PRODUCT = "PRODUCT", e.ADD_ONS = "ADD_ONS", e.DELIVERY = "DELIVERY", e.PICKUP = "PICKUP", e))(O || {}), N = /* @__PURE__ */ ((e) => (e.AdditionalEvent = "ADDITIONAL_EVENT", e.Addon = "ADDON", e.Regular = "REGULAR", e))(N || {}), W = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Concept = "CONCEPT", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(W || {}), Z = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e))(Z || {}), K = /* @__PURE__ */ ((e) => (e.Active = "ACTIVE", e.Inactive = "INACTIVE", e.Paused = "PAUSED", e.SoldOut = "SOLD_OUT", e))(K || {}), ee = /* @__PURE__ */ ((e) => (e.Asc = "ASC", e.Desc = "DESC", e))(ee || {}), te = /* @__PURE__ */ ((e) => (e.AllReserved = "ALL_RESERVED", e.Available = "AVAILABLE", e.SoldOut = "SOLD_OUT", e))(te || {}), ne = /* @__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))(ne || {}), ie = /* @__PURE__ */ ((e) => (e.FIXED = "FIXED", e.PERCENTAGE = "PERCENTAGE", e))(ie || {}), re = /* @__PURE__ */ ((e) => (e.AddOn = "ADD_ON", e.DeliveryOption = "DELIVERY_OPTION", e.EntranceTicket = "ENTRANCE_TICKET", e))(re || {}), se = /* @__PURE__ */ ((e) => (e.Fixed = "FIXED", e.Percentage = "PERCENTAGE", e))(se || {}), ae = /* @__PURE__ */ ((e) => (e.Default = "DEFAULT", e.Transparent = "TRANSPARENT", e))(ae || {}), oe = /* @__PURE__ */ ((e) => (e.Calendar = "CALENDAR", e.Large = "LARGE", e.Small = "SMALL", e))(oe || {}), R = /* @__PURE__ */ ((e) => (e.Event = "EVENT", e.Package = "PACKAGE", e))(R || {}), ce = /* @__PURE__ */ ((e) => (e.RADIO_BUTTON = "RADIO_BUTTON", e.DATE = "DATE", e.EMAIL = "EMAIL", e.NUMERIC = "NUMERIC", e.DROPDOWN = "DROPDOWN", e.TEXT = "TEXT", e.TEXT_AREA = "TEXT_AREA", e.TIME = "TIME", e.CHECKBOX = "CHECKBOX", e.PHONE_NUMBER = "PHONE_NUMBER", e))(ce || {}), de = /* @__PURE__ */ ((e) => (e.GENDER = "GENDER", e.FIRST_NAME = "FIRST_NAME", e.LAST_NAME = "LAST_NAME", e.EMAIL = "EMAIL", e.AGE = "AGE", e.RESIDENCE = "RESIDENCE", e.GOOGLE_PLACE = "GOOGLE_PLACE", e))(de || {}), ue = /* @__PURE__ */ ((e) => (e.ONLINE = "ONLINE", e.OFFLINE = "OFFLINE", e))(ue || {});
4
4
  const ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  BasketOrderType: O,
@@ -9,11 +9,11 @@ const ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9
9
  DiscountType: se,
10
10
  EventStatus: K,
11
11
  MetricsType: R,
12
- OrderItemType: ie,
12
+ OrderItemType: re,
13
13
  PackageItemType: N,
14
14
  PackageStatus: W,
15
15
  PackageTabType: Z,
16
- PaymentMethodFeeType: re,
16
+ PaymentMethodFeeType: ie,
17
17
  ProductStatus: te,
18
18
  ProductType: ne,
19
19
  SalesLocations: ue,
@@ -23,8 +23,8 @@ const ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23
23
  }, Symbol.toStringTag, { value: "Module" }));
24
24
  var w = function() {
25
25
  return w = Object.assign || function(t) {
26
- for (var n, r = 1, i = arguments.length; r < i; r++) {
27
- n = arguments[r];
26
+ for (var n, i = 1, r = arguments.length; i < r; i++) {
27
+ n = arguments[i];
28
28
  for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
29
29
  }
30
30
  return t;
@@ -45,14 +45,14 @@ function Pe(e, t) {
45
45
  }
46
46
  const be = /\r\n|[\n\r]/g;
47
47
  function M(e, t) {
48
- let n = 0, r = 1;
49
- for (const i of e.body.matchAll(be)) {
50
- if (typeof i.index == "number" || Pe(!1), i.index >= t)
48
+ let n = 0, i = 1;
49
+ for (const r of e.body.matchAll(be)) {
50
+ if (typeof r.index == "number" || Pe(!1), r.index >= t)
51
51
  break;
52
- n = i.index + i[0].length, r += 1;
52
+ n = r.index + r[0].length, i += 1;
53
53
  }
54
54
  return {
55
- line: r,
55
+ line: i,
56
56
  column: t + 1 - n
57
57
  };
58
58
  }
@@ -63,8 +63,8 @@ function xe(e) {
63
63
  );
64
64
  }
65
65
  function le(e, t) {
66
- const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, l = t.line === 1 ? n : 0, h = t.column + l, I = `${e.name}:${o}:${h}
67
- `, g = r.split(/\r\n|[\n\r]/g), k = g[i];
66
+ const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, l = t.line === 1 ? n : 0, h = t.column + l, I = `${e.name}:${o}:${h}
67
+ `, g = i.split(/\r\n|[\n\r]/g), k = g[r];
68
68
  if (k.length > 120) {
69
69
  const c = Math.floor(h / 80), E = h % 80, p = [];
70
70
  for (let y = 0; y < k.length; y += 80)
@@ -78,15 +78,15 @@ function le(e, t) {
78
78
  }
79
79
  return I + Q([
80
80
  // Lines specified like this: ["prefix", "string"],
81
- [`${o - 1} |`, g[i - 1]],
81
+ [`${o - 1} |`, g[r - 1]],
82
82
  [`${o} |`, k],
83
83
  ["|", "^".padStart(h)],
84
- [`${o + 1} |`, g[i + 1]]
84
+ [`${o + 1} |`, g[r + 1]]
85
85
  ]);
86
86
  }
87
87
  function Q(e) {
88
- const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
89
- return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
88
+ const t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
89
+ return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
90
90
  `);
91
91
  }
92
92
  function Se(e) {
@@ -140,15 +140,15 @@ class G extends Error {
140
140
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
141
141
  */
142
142
  constructor(t, ...n) {
143
- var r, i, s;
143
+ var i, r, s;
144
144
  const { nodes: o, source: l, positions: h, path: I, originalError: g, extensions: k } = Se(n);
145
145
  super(t), this.name = "GraphQLError", this.path = I ?? void 0, this.originalError = g ?? void 0, this.nodes = X(
146
146
  Array.isArray(o) ? o : o ? [o] : void 0
147
147
  );
148
148
  const c = X(
149
- (r = this.nodes) === null || r === void 0 ? void 0 : r.map((p) => p.loc).filter((p) => p != null)
149
+ (i = this.nodes) === null || i === void 0 ? void 0 : i.map((p) => p.loc).filter((p) => p != null)
150
150
  );
151
- this.source = l ?? (c == null || (i = c[0]) === null || i === void 0 ? void 0 : i.source), this.positions = h ?? c?.map((p) => p.start), this.locations = h && l ? h.map((p) => M(l, p)) : c?.map((p) => M(p.source, p.start));
151
+ this.source = l ?? (c == null || (r = c[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? c?.map((p) => p.start), this.locations = h && l ? h.map((p) => M(l, p)) : c?.map((p) => M(p.source, p.start));
152
152
  const E = Ne(
153
153
  g?.extensions
154
154
  ) ? g?.extensions : void 0;
@@ -231,8 +231,8 @@ class Ce {
231
231
  /**
232
232
  * The Source document the AST represents.
233
233
  */
234
- constructor(t, n, r) {
235
- this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r;
234
+ constructor(t, n, i) {
235
+ this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
236
236
  }
237
237
  get [Symbol.toStringTag]() {
238
238
  return "Location";
@@ -271,8 +271,8 @@ class he {
271
271
  * including ignored tokens. <SOF> is always the first node and <EOF>
272
272
  * the last.
273
273
  */
274
- constructor(t, n, r, i, s, o) {
275
- this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = o, this.prev = null, this.next = null;
274
+ constructor(t, n, i, r, s, o) {
275
+ this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
276
276
  }
277
277
  get [Symbol.toStringTag]() {
278
278
  return "Token";
@@ -405,15 +405,15 @@ function Re(e) {
405
405
  }
406
406
  function we(e) {
407
407
  var t;
408
- let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
408
+ let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
409
409
  for (let o = 0; o < e.length; ++o) {
410
410
  var s;
411
411
  const l = e[o], h = Fe(l);
412
- h !== l.length && (r = (s = r) !== null && s !== void 0 ? s : o, i = o, o !== 0 && h < n && (n = h));
412
+ h !== l.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < n && (n = h));
413
413
  }
414
414
  return e.map((o, l) => l === 0 ? o : o.slice(n)).slice(
415
- (t = r) !== null && t !== void 0 ? t : 0,
416
- i + 1
415
+ (t = i) !== null && t !== void 0 ? t : 0,
416
+ r + 1
417
417
  );
418
418
  }
419
419
  function Fe(e) {
@@ -490,20 +490,20 @@ function D(e, t) {
490
490
  if (n === void 0)
491
491
  return a.EOF;
492
492
  if (n >= 32 && n <= 126) {
493
- const r = String.fromCodePoint(n);
494
- return r === '"' ? `'"'` : `"${r}"`;
493
+ const i = String.fromCodePoint(n);
494
+ return i === '"' ? `'"'` : `"${i}"`;
495
495
  }
496
496
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
497
497
  }
498
- function m(e, t, n, r, i) {
498
+ function m(e, t, n, i, r) {
499
499
  const s = e.line, o = 1 + n - e.lineStart;
500
- return new he(t, n, r, s, o, i);
500
+ return new he(t, n, i, s, o, r);
501
501
  }
502
502
  function Ue(e, t) {
503
- const n = e.source.body, r = n.length;
504
- let i = t;
505
- for (; i < r; ) {
506
- const s = n.charCodeAt(i);
503
+ const n = e.source.body, i = n.length;
504
+ let r = t;
505
+ for (; r < i; ) {
506
+ const s = n.charCodeAt(r);
507
507
  switch (s) {
508
508
  // Ignored ::
509
509
  // - UnicodeBOM
@@ -526,21 +526,21 @@ function Ue(e, t) {
526
526
  case 32:
527
527
  // <space>
528
528
  case 44:
529
- ++i;
529
+ ++r;
530
530
  continue;
531
531
  // LineTerminator ::
532
532
  // - "New Line (U+000A)"
533
533
  // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
534
534
  // - "Carriage Return (U+000D)" "New Line (U+000A)"
535
535
  case 10:
536
- ++i, ++e.line, e.lineStart = i;
536
+ ++r, ++e.line, e.lineStart = r;
537
537
  continue;
538
538
  case 13:
539
- n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
539
+ n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
540
540
  continue;
541
541
  // Comment
542
542
  case 35:
543
- return Ve(e, i);
543
+ return Ve(e, r);
544
544
  // Token ::
545
545
  // - Punctuator
546
546
  // - Name
@@ -550,62 +550,62 @@ function Ue(e, t) {
550
550
  //
551
551
  // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
552
552
  case 33:
553
- return m(e, a.BANG, i, i + 1);
553
+ return m(e, a.BANG, r, r + 1);
554
554
  case 36:
555
- return m(e, a.DOLLAR, i, i + 1);
555
+ return m(e, a.DOLLAR, r, r + 1);
556
556
  case 38:
557
- return m(e, a.AMP, i, i + 1);
557
+ return m(e, a.AMP, r, r + 1);
558
558
  case 40:
559
- return m(e, a.PAREN_L, i, i + 1);
559
+ return m(e, a.PAREN_L, r, r + 1);
560
560
  case 41:
561
- return m(e, a.PAREN_R, i, i + 1);
561
+ return m(e, a.PAREN_R, r, r + 1);
562
562
  case 46:
563
- if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
564
- return m(e, a.SPREAD, i, i + 3);
563
+ if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
564
+ return m(e, a.SPREAD, r, r + 3);
565
565
  break;
566
566
  case 58:
567
- return m(e, a.COLON, i, i + 1);
567
+ return m(e, a.COLON, r, r + 1);
568
568
  case 61:
569
- return m(e, a.EQUALS, i, i + 1);
569
+ return m(e, a.EQUALS, r, r + 1);
570
570
  case 64:
571
- return m(e, a.AT, i, i + 1);
571
+ return m(e, a.AT, r, r + 1);
572
572
  case 91:
573
- return m(e, a.BRACKET_L, i, i + 1);
573
+ return m(e, a.BRACKET_L, r, r + 1);
574
574
  case 93:
575
- return m(e, a.BRACKET_R, i, i + 1);
575
+ return m(e, a.BRACKET_R, r, r + 1);
576
576
  case 123:
577
- return m(e, a.BRACE_L, i, i + 1);
577
+ return m(e, a.BRACE_L, r, r + 1);
578
578
  case 124:
579
- return m(e, a.PIPE, i, i + 1);
579
+ return m(e, a.PIPE, r, r + 1);
580
580
  case 125:
581
- return m(e, a.BRACE_R, i, i + 1);
581
+ return m(e, a.BRACE_R, r, r + 1);
582
582
  // StringValue
583
583
  case 34:
584
- return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? He(e, i) : qe(e, i);
584
+ return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? He(e, r) : qe(e, r);
585
585
  }
586
586
  if (S(s) || s === 45)
587
- return Me(e, i, s);
587
+ return Me(e, r, s);
588
588
  if (ge(s))
589
- return Ye(e, i);
589
+ return Ye(e, r);
590
590
  throw f(
591
591
  e.source,
592
- i,
593
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : P(s) || $(n, i) ? `Unexpected character: ${D(e, i)}.` : `Invalid character: ${D(e, i)}.`
592
+ r,
593
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : P(s) || $(n, r) ? `Unexpected character: ${D(e, r)}.` : `Invalid character: ${D(e, r)}.`
594
594
  );
595
595
  }
596
- return m(e, a.EOF, r, r);
596
+ return m(e, a.EOF, i, i);
597
597
  }
598
598
  function Ve(e, t) {
599
- const n = e.source.body, r = n.length;
600
- let i = t + 1;
601
- for (; i < r; ) {
602
- const s = n.charCodeAt(i);
599
+ const n = e.source.body, i = n.length;
600
+ let r = t + 1;
601
+ for (; r < i; ) {
602
+ const s = n.charCodeAt(r);
603
603
  if (s === 10 || s === 13)
604
604
  break;
605
605
  if (P(s))
606
- ++i;
607
- else if ($(n, i))
608
- i += 2;
606
+ ++r;
607
+ else if ($(n, r))
608
+ r += 2;
609
609
  else
610
610
  break;
611
611
  }
@@ -613,40 +613,40 @@ function Ve(e, t) {
613
613
  e,
614
614
  a.COMMENT,
615
615
  t,
616
- i,
617
- n.slice(t + 1, i)
616
+ r,
617
+ n.slice(t + 1, r)
618
618
  );
619
619
  }
620
620
  function Me(e, t, n) {
621
- const r = e.source.body;
622
- let i = t, s = n, o = !1;
623
- if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
624
- if (s = r.charCodeAt(++i), S(s))
621
+ const i = e.source.body;
622
+ let r = t, s = n, o = !1;
623
+ if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
624
+ if (s = i.charCodeAt(++r), S(s))
625
625
  throw f(
626
626
  e.source,
627
- i,
627
+ r,
628
628
  `Invalid number, unexpected digit after 0: ${D(
629
629
  e,
630
- i
630
+ r
631
631
  )}.`
632
632
  );
633
633
  } else
634
- i = V(e, i, s), s = r.charCodeAt(i);
635
- if (s === 46 && (o = !0, s = r.charCodeAt(++i), i = V(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (o = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = V(e, i, s), s = r.charCodeAt(i)), s === 46 || ge(s))
634
+ r = V(e, r, s), s = i.charCodeAt(r);
635
+ if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = V(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 = V(e, r, s), s = i.charCodeAt(r)), s === 46 || ge(s))
636
636
  throw f(
637
637
  e.source,
638
- i,
638
+ r,
639
639
  `Invalid number, expected digit but got: ${D(
640
640
  e,
641
- i
641
+ r
642
642
  )}.`
643
643
  );
644
644
  return m(
645
645
  e,
646
646
  o ? a.FLOAT : a.INT,
647
647
  t,
648
- i,
649
- r.slice(t, i)
648
+ r,
649
+ i.slice(t, r)
650
650
  );
651
651
  }
652
652
  function V(e, t, n) {
@@ -659,57 +659,57 @@ function V(e, t, n) {
659
659
  t
660
660
  )}.`
661
661
  );
662
- const r = e.source.body;
663
- let i = t + 1;
664
- for (; S(r.charCodeAt(i)); )
665
- ++i;
666
- return i;
662
+ const i = e.source.body;
663
+ let r = t + 1;
664
+ for (; S(i.charCodeAt(r)); )
665
+ ++r;
666
+ return r;
667
667
  }
668
668
  function qe(e, t) {
669
- const n = e.source.body, r = n.length;
670
- let i = t + 1, s = i, o = "";
671
- for (; i < r; ) {
672
- const l = n.charCodeAt(i);
669
+ const n = e.source.body, i = n.length;
670
+ let r = t + 1, s = r, o = "";
671
+ for (; r < i; ) {
672
+ const l = n.charCodeAt(r);
673
673
  if (l === 34)
674
- return o += n.slice(s, i), m(e, a.STRING, t, i + 1, o);
674
+ return o += n.slice(s, r), m(e, a.STRING, t, r + 1, o);
675
675
  if (l === 92) {
676
- o += n.slice(s, i);
677
- const h = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? ze(e, i) : Ge(e, i) : je(e, i);
678
- o += h.value, i += h.size, s = i;
676
+ o += n.slice(s, r);
677
+ const h = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? ze(e, r) : Ge(e, r) : je(e, r);
678
+ o += h.value, r += h.size, s = r;
679
679
  continue;
680
680
  }
681
681
  if (l === 10 || l === 13)
682
682
  break;
683
683
  if (P(l))
684
- ++i;
685
- else if ($(n, i))
686
- i += 2;
684
+ ++r;
685
+ else if ($(n, r))
686
+ r += 2;
687
687
  else
688
688
  throw f(
689
689
  e.source,
690
- i,
690
+ r,
691
691
  `Invalid character within String: ${D(
692
692
  e,
693
- i
693
+ r
694
694
  )}.`
695
695
  );
696
696
  }
697
- throw f(e.source, i, "Unterminated string.");
697
+ throw f(e.source, r, "Unterminated string.");
698
698
  }
699
699
  function ze(e, t) {
700
700
  const n = e.source.body;
701
- let r = 0, i = 3;
702
- for (; i < 12; ) {
703
- const s = n.charCodeAt(t + i++);
701
+ let i = 0, r = 3;
702
+ for (; r < 12; ) {
703
+ const s = n.charCodeAt(t + r++);
704
704
  if (s === 125) {
705
- if (i < 5 || !P(r))
705
+ if (r < 5 || !P(i))
706
706
  break;
707
707
  return {
708
- value: String.fromCodePoint(r),
709
- size: i
708
+ value: String.fromCodePoint(i),
709
+ size: r
710
710
  };
711
711
  }
712
- if (r = r << 4 | x(s), r < 0)
712
+ if (i = i << 4 | x(s), i < 0)
713
713
  break;
714
714
  }
715
715
  throw f(
@@ -717,22 +717,22 @@ function ze(e, t) {
717
717
  t,
718
718
  `Invalid Unicode escape sequence: "${n.slice(
719
719
  t,
720
- t + i
720
+ t + r
721
721
  )}".`
722
722
  );
723
723
  }
724
724
  function Ge(e, t) {
725
- const n = e.source.body, r = J(n, t + 2);
726
- if (P(r))
725
+ const n = e.source.body, i = J(n, t + 2);
726
+ if (P(i))
727
727
  return {
728
- value: String.fromCodePoint(r),
728
+ value: String.fromCodePoint(i),
729
729
  size: 6
730
730
  };
731
- if (me(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
732
- const i = J(n, t + 8);
733
- if (fe(i))
731
+ if (me(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
732
+ const r = J(n, t + 8);
733
+ if (fe(r))
734
734
  return {
735
- value: String.fromCodePoint(r, i),
735
+ value: String.fromCodePoint(i, r),
736
736
  size: 12
737
737
  };
738
738
  }
@@ -803,10 +803,10 @@ function je(e, t) {
803
803
  );
804
804
  }
805
805
  function He(e, t) {
806
- const n = e.source.body, r = n.length;
807
- let i = e.lineStart, s = t + 3, o = s, l = "";
806
+ const n = e.source.body, i = n.length;
807
+ let r = e.lineStart, s = t + 3, o = s, l = "";
808
808
  const h = [];
809
- for (; s < r; ) {
809
+ for (; s < i; ) {
810
810
  const I = n.charCodeAt(s);
811
811
  if (I === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
812
812
  l += n.slice(o, s), h.push(l);
@@ -819,14 +819,14 @@ function He(e, t) {
819
819
  we(h).join(`
820
820
  `)
821
821
  );
822
- return e.line += h.length - 1, e.lineStart = i, g;
822
+ return e.line += h.length - 1, e.lineStart = r, g;
823
823
  }
824
824
  if (I === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
825
825
  l += n.slice(o, s), o = s + 1, s += 4;
826
826
  continue;
827
827
  }
828
828
  if (I === 10 || I === 13) {
829
- l += n.slice(o, s), h.push(l), I === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", o = s, i = s;
829
+ l += n.slice(o, s), h.push(l), I === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", o = s, r = s;
830
830
  continue;
831
831
  }
832
832
  if (P(I))
@@ -846,12 +846,12 @@ function He(e, t) {
846
846
  throw f(e.source, s, "Unterminated string.");
847
847
  }
848
848
  function Ye(e, t) {
849
- const n = e.source.body, r = n.length;
850
- let i = t + 1;
851
- for (; i < r; ) {
852
- const s = n.charCodeAt(i);
849
+ const n = e.source.body, i = n.length;
850
+ let r = t + 1;
851
+ for (; r < i; ) {
852
+ const s = n.charCodeAt(r);
853
853
  if (Re(s))
854
- ++i;
854
+ ++r;
855
855
  else
856
856
  break;
857
857
  }
@@ -859,8 +859,8 @@ function Ye(e, t) {
859
859
  e,
860
860
  a.NAME,
861
861
  t,
862
- i,
863
- n.slice(t, i)
862
+ r,
863
+ n.slice(t, r)
864
864
  );
865
865
  }
866
866
  const Qe = 10, Ie = 2;
@@ -886,9 +886,9 @@ function Xe(e, t) {
886
886
  return "[Circular]";
887
887
  const n = [...t, e];
888
888
  if (Je(e)) {
889
- const r = e.toJSON();
890
- if (r !== e)
891
- return typeof r == "string" ? r : B(r, n);
889
+ const i = e.toJSON();
890
+ if (i !== e)
891
+ return typeof i == "string" ? i : B(i, n);
892
892
  } else if (Array.isArray(e))
893
893
  return Ze(e, n);
894
894
  return We(e, n);
@@ -899,7 +899,7 @@ function Je(e) {
899
899
  function We(e, t) {
900
900
  const n = Object.entries(e);
901
901
  return n.length === 0 ? "{}" : t.length > Ie ? "[" + Ke(e) + "]" : "{ " + n.map(
902
- ([i, s]) => i + ": " + B(s, t)
902
+ ([r, s]) => r + ": " + B(s, t)
903
903
  ).join(", ") + " }";
904
904
  }
905
905
  function Ze(e, t) {
@@ -907,10 +907,10 @@ function Ze(e, t) {
907
907
  return "[]";
908
908
  if (t.length > Ie)
909
909
  return "[Array]";
910
- const n = Math.min(Qe, e.length), r = e.length - n, i = [];
910
+ const n = Math.min(Qe, e.length), i = e.length - n, r = [];
911
911
  for (let s = 0; s < n; ++s)
912
- i.push(B(e[s], t));
913
- return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]";
912
+ r.push(B(e[s], t));
913
+ return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
914
914
  }
915
915
  function Ke(e) {
916
916
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
@@ -931,14 +931,14 @@ process.env.NODE_ENV === "production", tt = (
931
931
  if (t instanceof n)
932
932
  return !0;
933
933
  if (typeof t == "object" && t !== null) {
934
- var r;
935
- const i = n.prototype[Symbol.toStringTag], s = (
934
+ var i;
935
+ const r = n.prototype[Symbol.toStringTag], s = (
936
936
  // We still need to support constructor's name to detect conflicts with older versions of this library.
937
- Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name
937
+ Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name
938
938
  );
939
- if (i === s) {
939
+ if (r === s) {
940
940
  const o = Ee(t);
941
- throw new Error(`Cannot use ${i} "${o}" from another module or realm.
941
+ throw new Error(`Cannot use ${r} "${o}" from another module or realm.
942
942
 
943
943
  Ensure that there is only one instance of "graphql" in the node_modules
944
944
  directory. If different versions of "graphql" are the dependencies of other
@@ -956,11 +956,11 @@ spurious results.`);
956
956
  }
957
957
  );
958
958
  class ye {
959
- constructor(t, n = "GraphQL request", r = {
959
+ constructor(t, n = "GraphQL request", i = {
960
960
  line: 1,
961
961
  column: 1
962
962
  }) {
963
- typeof t == "string" || U(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || U(
963
+ typeof t == "string" || U(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || U(
964
964
  !1,
965
965
  "line in locationOffset is 1-indexed and must be positive."
966
966
  ), this.locationOffset.column > 0 || U(
@@ -975,23 +975,23 @@ class ye {
975
975
  function nt(e) {
976
976
  return tt(e, ye);
977
977
  }
978
- function rt(e, t) {
979
- const n = new it(e, t), r = n.parseDocument();
980
- return Object.defineProperty(r, "tokenCount", {
978
+ function it(e, t) {
979
+ const n = new rt(e, t), i = n.parseDocument();
980
+ return Object.defineProperty(i, "tokenCount", {
981
981
  enumerable: !1,
982
982
  value: n.tokenCount
983
- }), r;
983
+ }), i;
984
984
  }
985
- class it {
985
+ class rt {
986
986
  constructor(t, n = {}) {
987
- const { lexer: r, ...i } = n;
988
- if (r)
989
- this._lexer = r;
987
+ const { lexer: i, ...r } = n;
988
+ if (i)
989
+ this._lexer = i;
990
990
  else {
991
991
  const s = nt(t) ? t : new ye(t);
992
992
  this._lexer = new $e(s);
993
993
  }
994
- this._options = i, this._tokenCounter = 0;
994
+ this._options = r, this._tokenCounter = 0;
995
995
  }
996
996
  get tokenCount() {
997
997
  return this._tokenCounter;
@@ -1109,13 +1109,13 @@ class it {
1109
1109
  directives: [],
1110
1110
  selectionSet: this.parseSelectionSet()
1111
1111
  });
1112
- const n = this.parseDescription(), r = this.parseOperationType();
1113
- let i;
1114
- return this.peek(a.NAME) && (i = this.parseName()), this.node(t, {
1112
+ const n = this.parseDescription(), i = this.parseOperationType();
1113
+ let r;
1114
+ return this.peek(a.NAME) && (r = this.parseName()), this.node(t, {
1115
1115
  kind: d.OPERATION_DEFINITION,
1116
- operation: r,
1116
+ operation: i,
1117
1117
  description: n,
1118
- name: i,
1118
+ name: r,
1119
1119
  variableDefinitions: this.parseVariableDefinitions(),
1120
1120
  directives: this.parseDirectives(!1),
1121
1121
  selectionSet: this.parseSelectionSet()
@@ -1200,11 +1200,11 @@ class it {
1200
1200
  */
1201
1201
  parseField() {
1202
1202
  const t = this._lexer.token, n = this.parseName();
1203
- let r, i;
1204
- return this.expectOptionalToken(a.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1203
+ let i, r;
1204
+ return this.expectOptionalToken(a.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1205
1205
  kind: d.FIELD,
1206
- alias: r,
1207
- name: i,
1206
+ alias: i,
1207
+ name: r,
1208
1208
  arguments: this.parseArguments(!1),
1209
1209
  directives: this.parseDirectives(!1),
1210
1210
  selectionSet: this.peek(a.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -1221,10 +1221,10 @@ class it {
1221
1221
  * Argument[Const] : Name : Value[?Const]
1222
1222
  */
1223
1223
  parseArgument(t = !1) {
1224
- const n = this._lexer.token, r = this.parseName();
1224
+ const n = this._lexer.token, i = this.parseName();
1225
1225
  return this.expectToken(a.COLON), this.node(n, {
1226
1226
  kind: d.ARGUMENT,
1227
- name: r,
1227
+ name: i,
1228
1228
  value: this.parseValueLiteral(t)
1229
1229
  });
1230
1230
  }
@@ -1351,11 +1351,11 @@ class it {
1351
1351
  case a.DOLLAR:
1352
1352
  if (t)
1353
1353
  if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
1354
- const r = this._lexer.token.value;
1354
+ const i = this._lexer.token.value;
1355
1355
  throw f(
1356
1356
  this._lexer.source,
1357
1357
  n.start,
1358
- `Unexpected variable "$${r}" in constant value.`
1358
+ `Unexpected variable "$${i}" in constant value.`
1359
1359
  );
1360
1360
  } else
1361
1361
  throw this.unexpected(n);
@@ -1405,10 +1405,10 @@ class it {
1405
1405
  * ObjectField[Const] : Name : Value[?Const]
1406
1406
  */
1407
1407
  parseObjectField(t) {
1408
- const n = this._lexer.token, r = this.parseName();
1408
+ const n = this._lexer.token, i = this.parseName();
1409
1409
  return this.expectToken(a.COLON), this.node(n, {
1410
1410
  kind: d.OBJECT_FIELD,
1411
- name: r,
1411
+ name: i,
1412
1412
  value: this.parseValueLiteral(t)
1413
1413
  });
1414
1414
  }
@@ -1449,10 +1449,10 @@ class it {
1449
1449
  const t = this._lexer.token;
1450
1450
  let n;
1451
1451
  if (this.expectOptionalToken(a.BRACKET_L)) {
1452
- const r = this.parseTypeReference();
1452
+ const i = this.parseTypeReference();
1453
1453
  this.expectToken(a.BRACKET_R), n = this.node(t, {
1454
1454
  kind: d.LIST_TYPE,
1455
- type: r
1455
+ type: i
1456
1456
  });
1457
1457
  } else
1458
1458
  n = this.parseNamedType();
@@ -1489,7 +1489,7 @@ class it {
1489
1489
  parseSchemaDefinition() {
1490
1490
  const t = this._lexer.token, n = this.parseDescription();
1491
1491
  this.expectKeyword("schema");
1492
- const r = this.parseConstDirectives(), i = this.many(
1492
+ const i = this.parseConstDirectives(), r = this.many(
1493
1493
  a.BRACE_L,
1494
1494
  this.parseOperationTypeDefinition,
1495
1495
  a.BRACE_R
@@ -1497,8 +1497,8 @@ class it {
1497
1497
  return this.node(t, {
1498
1498
  kind: d.SCHEMA_DEFINITION,
1499
1499
  description: n,
1500
- directives: r,
1501
- operationTypes: i
1500
+ directives: i,
1501
+ operationTypes: r
1502
1502
  });
1503
1503
  }
1504
1504
  /**
@@ -1507,11 +1507,11 @@ class it {
1507
1507
  parseOperationTypeDefinition() {
1508
1508
  const t = this._lexer.token, n = this.parseOperationType();
1509
1509
  this.expectToken(a.COLON);
1510
- const r = this.parseNamedType();
1510
+ const i = this.parseNamedType();
1511
1511
  return this.node(t, {
1512
1512
  kind: d.OPERATION_TYPE_DEFINITION,
1513
1513
  operation: n,
1514
- type: r
1514
+ type: i
1515
1515
  });
1516
1516
  }
1517
1517
  /**
@@ -1520,12 +1520,12 @@ class it {
1520
1520
  parseScalarTypeDefinition() {
1521
1521
  const t = this._lexer.token, n = this.parseDescription();
1522
1522
  this.expectKeyword("scalar");
1523
- const r = this.parseName(), i = this.parseConstDirectives();
1523
+ const i = this.parseName(), r = this.parseConstDirectives();
1524
1524
  return this.node(t, {
1525
1525
  kind: d.SCALAR_TYPE_DEFINITION,
1526
1526
  description: n,
1527
- name: r,
1528
- directives: i
1527
+ name: i,
1528
+ directives: r
1529
1529
  });
1530
1530
  }
1531
1531
  /**
@@ -1536,12 +1536,12 @@ class it {
1536
1536
  parseObjectTypeDefinition() {
1537
1537
  const t = this._lexer.token, n = this.parseDescription();
1538
1538
  this.expectKeyword("type");
1539
- const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1539
+ const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1540
1540
  return this.node(t, {
1541
1541
  kind: d.OBJECT_TYPE_DEFINITION,
1542
1542
  description: n,
1543
- name: r,
1544
- interfaces: i,
1543
+ name: i,
1544
+ interfaces: r,
1545
1545
  directives: s,
1546
1546
  fields: o
1547
1547
  });
@@ -1571,14 +1571,14 @@ class it {
1571
1571
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1572
1572
  */
1573
1573
  parseFieldDefinition() {
1574
- const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
1574
+ const t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1575
1575
  this.expectToken(a.COLON);
1576
1576
  const s = this.parseTypeReference(), o = this.parseConstDirectives();
1577
1577
  return this.node(t, {
1578
1578
  kind: d.FIELD_DEFINITION,
1579
1579
  description: n,
1580
- name: r,
1581
- arguments: i,
1580
+ name: i,
1581
+ arguments: r,
1582
1582
  type: s,
1583
1583
  directives: o
1584
1584
  });
@@ -1598,17 +1598,17 @@ class it {
1598
1598
  * - Description? Name : Type DefaultValue? Directives[Const]?
1599
1599
  */
1600
1600
  parseInputValueDef() {
1601
- const t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
1601
+ const t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1602
1602
  this.expectToken(a.COLON);
1603
- const i = this.parseTypeReference();
1603
+ const r = this.parseTypeReference();
1604
1604
  let s;
1605
1605
  this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral());
1606
1606
  const o = this.parseConstDirectives();
1607
1607
  return this.node(t, {
1608
1608
  kind: d.INPUT_VALUE_DEFINITION,
1609
1609
  description: n,
1610
- name: r,
1611
- type: i,
1610
+ name: i,
1611
+ type: r,
1612
1612
  defaultValue: s,
1613
1613
  directives: o
1614
1614
  });
@@ -1620,12 +1620,12 @@ class it {
1620
1620
  parseInterfaceTypeDefinition() {
1621
1621
  const t = this._lexer.token, n = this.parseDescription();
1622
1622
  this.expectKeyword("interface");
1623
- const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1623
+ const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1624
1624
  return this.node(t, {
1625
1625
  kind: d.INTERFACE_TYPE_DEFINITION,
1626
1626
  description: n,
1627
- name: r,
1628
- interfaces: i,
1627
+ name: i,
1628
+ interfaces: r,
1629
1629
  directives: s,
1630
1630
  fields: o
1631
1631
  });
@@ -1637,12 +1637,12 @@ class it {
1637
1637
  parseUnionTypeDefinition() {
1638
1638
  const t = this._lexer.token, n = this.parseDescription();
1639
1639
  this.expectKeyword("union");
1640
- const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1640
+ const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1641
1641
  return this.node(t, {
1642
1642
  kind: d.UNION_TYPE_DEFINITION,
1643
1643
  description: n,
1644
- name: r,
1645
- directives: i,
1644
+ name: i,
1645
+ directives: r,
1646
1646
  types: s
1647
1647
  });
1648
1648
  }
@@ -1661,12 +1661,12 @@ class it {
1661
1661
  parseEnumTypeDefinition() {
1662
1662
  const t = this._lexer.token, n = this.parseDescription();
1663
1663
  this.expectKeyword("enum");
1664
- const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1664
+ const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1665
1665
  return this.node(t, {
1666
1666
  kind: d.ENUM_TYPE_DEFINITION,
1667
1667
  description: n,
1668
- name: r,
1669
- directives: i,
1668
+ name: i,
1669
+ directives: r,
1670
1670
  values: s
1671
1671
  });
1672
1672
  }
@@ -1686,12 +1686,12 @@ class it {
1686
1686
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1687
1687
  */
1688
1688
  parseEnumValueDefinition() {
1689
- const t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives();
1689
+ const t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1690
1690
  return this.node(t, {
1691
1691
  kind: d.ENUM_VALUE_DEFINITION,
1692
1692
  description: n,
1693
- name: r,
1694
- directives: i
1693
+ name: i,
1694
+ directives: r
1695
1695
  });
1696
1696
  }
1697
1697
  /**
@@ -1715,12 +1715,12 @@ class it {
1715
1715
  parseInputObjectTypeDefinition() {
1716
1716
  const t = this._lexer.token, n = this.parseDescription();
1717
1717
  this.expectKeyword("input");
1718
- const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1718
+ const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1719
1719
  return this.node(t, {
1720
1720
  kind: d.INPUT_OBJECT_TYPE_DEFINITION,
1721
1721
  description: n,
1722
- name: r,
1723
- directives: i,
1722
+ name: i,
1723
+ directives: r,
1724
1724
  fields: s
1725
1725
  });
1726
1726
  }
@@ -1780,17 +1780,17 @@ class it {
1780
1780
  parseSchemaExtension() {
1781
1781
  const t = this._lexer.token;
1782
1782
  this.expectKeyword("extend"), this.expectKeyword("schema");
1783
- const n = this.parseConstDirectives(), r = this.optionalMany(
1783
+ const n = this.parseConstDirectives(), i = this.optionalMany(
1784
1784
  a.BRACE_L,
1785
1785
  this.parseOperationTypeDefinition,
1786
1786
  a.BRACE_R
1787
1787
  );
1788
- if (n.length === 0 && r.length === 0)
1788
+ if (n.length === 0 && i.length === 0)
1789
1789
  throw this.unexpected();
1790
1790
  return this.node(t, {
1791
1791
  kind: d.SCHEMA_EXTENSION,
1792
1792
  directives: n,
1793
- operationTypes: r
1793
+ operationTypes: i
1794
1794
  });
1795
1795
  }
1796
1796
  /**
@@ -1800,13 +1800,13 @@ class it {
1800
1800
  parseScalarTypeExtension() {
1801
1801
  const t = this._lexer.token;
1802
1802
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1803
- const n = this.parseName(), r = this.parseConstDirectives();
1804
- if (r.length === 0)
1803
+ const n = this.parseName(), i = this.parseConstDirectives();
1804
+ if (i.length === 0)
1805
1805
  throw this.unexpected();
1806
1806
  return this.node(t, {
1807
1807
  kind: d.SCALAR_TYPE_EXTENSION,
1808
1808
  name: n,
1809
- directives: r
1809
+ directives: i
1810
1810
  });
1811
1811
  }
1812
1812
  /**
@@ -1818,14 +1818,14 @@ class it {
1818
1818
  parseObjectTypeExtension() {
1819
1819
  const t = this._lexer.token;
1820
1820
  this.expectKeyword("extend"), this.expectKeyword("type");
1821
- const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1822
- if (r.length === 0 && i.length === 0 && s.length === 0)
1821
+ const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1822
+ if (i.length === 0 && r.length === 0 && s.length === 0)
1823
1823
  throw this.unexpected();
1824
1824
  return this.node(t, {
1825
1825
  kind: d.OBJECT_TYPE_EXTENSION,
1826
1826
  name: n,
1827
- interfaces: r,
1828
- directives: i,
1827
+ interfaces: i,
1828
+ directives: r,
1829
1829
  fields: s
1830
1830
  });
1831
1831
  }
@@ -1838,14 +1838,14 @@ class it {
1838
1838
  parseInterfaceTypeExtension() {
1839
1839
  const t = this._lexer.token;
1840
1840
  this.expectKeyword("extend"), this.expectKeyword("interface");
1841
- const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1842
- if (r.length === 0 && i.length === 0 && s.length === 0)
1841
+ const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1842
+ if (i.length === 0 && r.length === 0 && s.length === 0)
1843
1843
  throw this.unexpected();
1844
1844
  return this.node(t, {
1845
1845
  kind: d.INTERFACE_TYPE_EXTENSION,
1846
1846
  name: n,
1847
- interfaces: r,
1848
- directives: i,
1847
+ interfaces: i,
1848
+ directives: r,
1849
1849
  fields: s
1850
1850
  });
1851
1851
  }
@@ -1857,14 +1857,14 @@ class it {
1857
1857
  parseUnionTypeExtension() {
1858
1858
  const t = this._lexer.token;
1859
1859
  this.expectKeyword("extend"), this.expectKeyword("union");
1860
- const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
1861
- if (r.length === 0 && i.length === 0)
1860
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1861
+ if (i.length === 0 && r.length === 0)
1862
1862
  throw this.unexpected();
1863
1863
  return this.node(t, {
1864
1864
  kind: d.UNION_TYPE_EXTENSION,
1865
1865
  name: n,
1866
- directives: r,
1867
- types: i
1866
+ directives: i,
1867
+ types: r
1868
1868
  });
1869
1869
  }
1870
1870
  /**
@@ -1875,14 +1875,14 @@ class it {
1875
1875
  parseEnumTypeExtension() {
1876
1876
  const t = this._lexer.token;
1877
1877
  this.expectKeyword("extend"), this.expectKeyword("enum");
1878
- const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
1879
- if (r.length === 0 && i.length === 0)
1878
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1879
+ if (i.length === 0 && r.length === 0)
1880
1880
  throw this.unexpected();
1881
1881
  return this.node(t, {
1882
1882
  kind: d.ENUM_TYPE_EXTENSION,
1883
1883
  name: n,
1884
- directives: r,
1885
- values: i
1884
+ directives: i,
1885
+ values: r
1886
1886
  });
1887
1887
  }
1888
1888
  /**
@@ -1893,14 +1893,14 @@ class it {
1893
1893
  parseInputObjectTypeExtension() {
1894
1894
  const t = this._lexer.token;
1895
1895
  this.expectKeyword("extend"), this.expectKeyword("input");
1896
- const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
1897
- if (r.length === 0 && i.length === 0)
1896
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1897
+ if (i.length === 0 && r.length === 0)
1898
1898
  throw this.unexpected();
1899
1899
  return this.node(t, {
1900
1900
  kind: d.INPUT_OBJECT_TYPE_EXTENSION,
1901
1901
  name: n,
1902
- directives: r,
1903
- fields: i
1902
+ directives: i,
1903
+ fields: r
1904
1904
  });
1905
1905
  }
1906
1906
  /**
@@ -1912,14 +1912,14 @@ class it {
1912
1912
  parseDirectiveDefinition() {
1913
1913
  const t = this._lexer.token, n = this.parseDescription();
1914
1914
  this.expectKeyword("directive"), this.expectToken(a.AT);
1915
- const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1915
+ const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1916
1916
  this.expectKeyword("on");
1917
1917
  const o = this.parseDirectiveLocations();
1918
1918
  return this.node(t, {
1919
1919
  kind: d.DIRECTIVE_DEFINITION,
1920
1920
  description: n,
1921
- name: r,
1922
- arguments: i,
1921
+ name: i,
1922
+ arguments: r,
1923
1923
  repeatable: s,
1924
1924
  locations: o
1925
1925
  });
@@ -1975,29 +1975,29 @@ class it {
1975
1975
  * - \@ Name ( Name : )
1976
1976
  */
1977
1977
  parseSchemaCoordinate() {
1978
- const t = this._lexer.token, n = this.expectOptionalToken(a.AT), r = this.parseName();
1979
- let i;
1980
- !n && this.expectOptionalToken(a.DOT) && (i = this.parseName());
1978
+ const t = this._lexer.token, n = this.expectOptionalToken(a.AT), i = this.parseName();
1979
+ let r;
1980
+ !n && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1981
1981
  let s;
1982
- return (n || i) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), n ? s ? this.node(t, {
1982
+ 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, {
1983
1983
  kind: d.DIRECTIVE_ARGUMENT_COORDINATE,
1984
- name: r,
1984
+ name: i,
1985
1985
  argumentName: s
1986
1986
  }) : this.node(t, {
1987
1987
  kind: d.DIRECTIVE_COORDINATE,
1988
- name: r
1989
- }) : i ? s ? this.node(t, {
1988
+ name: i
1989
+ }) : r ? s ? this.node(t, {
1990
1990
  kind: d.ARGUMENT_COORDINATE,
1991
- name: r,
1992
- fieldName: i,
1991
+ name: i,
1992
+ fieldName: r,
1993
1993
  argumentName: s
1994
1994
  }) : this.node(t, {
1995
1995
  kind: d.MEMBER_COORDINATE,
1996
- name: r,
1997
- memberName: i
1996
+ name: i,
1997
+ memberName: r
1998
1998
  }) : this.node(t, {
1999
1999
  kind: d.TYPE_COORDINATE,
2000
- name: r
2000
+ name: i
2001
2001
  });
2002
2002
  }
2003
2003
  // Core parsing utility functions
@@ -2079,12 +2079,12 @@ class it {
2079
2079
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2080
2080
  * Advances the parser to the next lex token after the closing token.
2081
2081
  */
2082
- any(t, n, r) {
2082
+ any(t, n, i) {
2083
2083
  this.expectToken(t);
2084
- const i = [];
2085
- for (; !this.expectOptionalToken(r); )
2086
- i.push(n.call(this));
2087
- return i;
2084
+ const r = [];
2085
+ for (; !this.expectOptionalToken(i); )
2086
+ r.push(n.call(this));
2087
+ return r;
2088
2088
  }
2089
2089
  /**
2090
2090
  * Returns a list of parse nodes, determined by the parseFn.
@@ -2092,13 +2092,13 @@ class it {
2092
2092
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
2093
2093
  * Advances the parser to the next lex token after the closing token.
2094
2094
  */
2095
- optionalMany(t, n, r) {
2095
+ optionalMany(t, n, i) {
2096
2096
  if (this.expectOptionalToken(t)) {
2097
- const i = [];
2097
+ const r = [];
2098
2098
  do
2099
- i.push(n.call(this));
2100
- while (!this.expectOptionalToken(r));
2101
- return i;
2099
+ r.push(n.call(this));
2100
+ while (!this.expectOptionalToken(i));
2101
+ return r;
2102
2102
  }
2103
2103
  return [];
2104
2104
  }
@@ -2107,13 +2107,13 @@ class it {
2107
2107
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2108
2108
  * Advances the parser to the next lex token after the closing token.
2109
2109
  */
2110
- many(t, n, r) {
2110
+ many(t, n, i) {
2111
2111
  this.expectToken(t);
2112
- const i = [];
2112
+ const r = [];
2113
2113
  do
2114
- i.push(n.call(this));
2115
- while (!this.expectOptionalToken(r));
2116
- return i;
2114
+ r.push(n.call(this));
2115
+ while (!this.expectOptionalToken(i));
2116
+ return r;
2117
2117
  }
2118
2118
  /**
2119
2119
  * Returns a non-empty list of parse nodes, determined by the parseFn.
@@ -2122,11 +2122,11 @@ class it {
2122
2122
  */
2123
2123
  delimitedMany(t, n) {
2124
2124
  this.expectOptionalToken(t);
2125
- const r = [];
2125
+ const i = [];
2126
2126
  do
2127
- r.push(n.call(this));
2127
+ i.push(n.call(this));
2128
2128
  while (this.expectOptionalToken(t));
2129
- return r;
2129
+ return i;
2130
2130
  }
2131
2131
  advanceLexer() {
2132
2132
  const { maxTokens: t } = this._options, n = this._lexer.advance();
@@ -2154,21 +2154,21 @@ function st(e) {
2154
2154
  }
2155
2155
  function at(e) {
2156
2156
  var t = /* @__PURE__ */ new Set(), n = [];
2157
- return e.definitions.forEach(function(r) {
2158
- if (r.kind === "FragmentDefinition") {
2159
- var i = r.name.value, s = st(r.loc), o = z.get(i);
2160
- o && !o.has(s) ? Ae && console.warn("Warning: fragment with name " + i + ` already exists.
2157
+ return e.definitions.forEach(function(i) {
2158
+ if (i.kind === "FragmentDefinition") {
2159
+ var r = i.name.value, s = st(i.loc), o = z.get(r);
2160
+ o && !o.has(s) ? Ae && console.warn("Warning: fragment with name " + r + ` already exists.
2161
2161
  graphql-tag enforces all fragment names across your application to be unique; read more about
2162
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || z.set(i, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(r));
2162
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || z.set(r, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(i));
2163
2163
  } else
2164
- n.push(r);
2164
+ n.push(i);
2165
2165
  }), w(w({}, e), { definitions: n });
2166
2166
  }
2167
2167
  function ot(e) {
2168
2168
  var t = new Set(e.definitions);
2169
- t.forEach(function(r) {
2170
- r.loc && delete r.loc, Object.keys(r).forEach(function(i) {
2171
- var s = r[i];
2169
+ t.forEach(function(i) {
2170
+ i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
2171
+ var s = i[r];
2172
2172
  s && typeof s == "object" && t.add(s);
2173
2173
  });
2174
2174
  });
@@ -2178,7 +2178,7 @@ function ot(e) {
2178
2178
  function ct(e) {
2179
2179
  var t = Oe(e);
2180
2180
  if (!L.has(t)) {
2181
- var n = rt(e, {
2181
+ var n = it(e, {
2182
2182
  experimentalFragmentVariables: F,
2183
2183
  allowLegacyFragmentVariables: F
2184
2184
  });
@@ -2192,10 +2192,10 @@ function u(e) {
2192
2192
  for (var t = [], n = 1; n < arguments.length; n++)
2193
2193
  t[n - 1] = arguments[n];
2194
2194
  typeof e == "string" && (e = [e]);
2195
- var r = e[0];
2196
- return t.forEach(function(i, s) {
2197
- i && i.kind === "Document" ? r += i.loc.source.body : r += i, r += e[s + 1];
2198
- }), ct(r);
2195
+ var i = e[0];
2196
+ return t.forEach(function(r, s) {
2197
+ r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += e[s + 1];
2198
+ }), ct(i);
2199
2199
  }
2200
2200
  function dt() {
2201
2201
  L.clear(), z.clear();
@@ -2250,6 +2250,7 @@ const pt = u`
2250
2250
  paymentBanner
2251
2251
  }
2252
2252
  currency
2253
+ withTicketProtection
2253
2254
  discount {
2254
2255
  code
2255
2256
  type
@@ -2334,6 +2335,7 @@ const pt = u`
2334
2335
  }
2335
2336
  }
2336
2337
  currency
2338
+ withTicketProtection
2337
2339
  items {
2338
2340
  id
2339
2341
  name
@@ -2418,38 +2420,38 @@ const pt = u`
2418
2420
  mutation deleteOrder($orderId: ID!) {
2419
2421
  cancelOrder(id: $orderId)
2420
2422
  }
2421
- `, Tt = (e, t, n, r) => e();
2423
+ `, Tt = (e, t, n, i) => e();
2422
2424
  function Dt(e, t = Tt) {
2423
2425
  return {
2424
- findActiveOrderById(n, r, i) {
2425
- return t((s) => e.request({ document: pt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findActiveOrderById", "query", n);
2426
+ findActiveOrderById(n, i, r) {
2427
+ return t((s) => e.request({ document: pt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", n);
2426
2428
  },
2427
- findOrderById(n, r, i) {
2428
- return t((s) => e.request({ document: gt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findOrderById", "query", n);
2429
+ findOrderById(n, i, r) {
2430
+ return t((s) => e.request({ document: gt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", n);
2429
2431
  },
2430
- addToOrder(n, r, i) {
2431
- return t((s) => e.request({ document: mt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "addToOrder", "mutation", n);
2432
+ addToOrder(n, i, r) {
2433
+ return t((s) => e.request({ document: mt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", n);
2432
2434
  },
2433
- removeFromOrder(n, r, i) {
2434
- return t((s) => e.request({ document: ft, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "removeFromOrder", "mutation", n);
2435
+ removeFromOrder(n, i, r) {
2436
+ return t((s) => e.request({ document: ft, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", n);
2435
2437
  },
2436
- configureDiscount(n, r, i) {
2437
- return t((s) => e.request({ document: It, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "configureDiscount", "mutation", n);
2438
+ configureDiscount(n, i, r) {
2439
+ return t((s) => e.request({ document: It, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureDiscount", "mutation", n);
2438
2440
  },
2439
- configurePackage(n, r, i) {
2440
- return t((s) => e.request({ document: Et, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "configurePackage", "mutation", n);
2441
+ configurePackage(n, i, r) {
2442
+ return t((s) => e.request({ document: Et, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", n);
2441
2443
  },
2442
- reserveAdditionalPackageItem(n, r, i) {
2443
- return t((s) => e.request({ document: yt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "reserveAdditionalPackageItem", "mutation", n);
2444
+ reserveAdditionalPackageItem(n, i, r) {
2445
+ return t((s) => e.request({ document: yt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", n);
2444
2446
  },
2445
- configureOrderDeliveryOption(n, r, i) {
2446
- return t((s) => e.request({ document: kt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "configureOrderDeliveryOption", "mutation", n);
2447
+ configureOrderDeliveryOption(n, i, r) {
2448
+ return t((s) => e.request({ document: kt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", n);
2447
2449
  },
2448
- createOrderCustomer(n, r, i) {
2449
- return t((s) => e.request({ document: At, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "createOrderCustomer", "mutation", n);
2450
+ createOrderCustomer(n, i, r) {
2451
+ return t((s) => e.request({ document: At, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", n);
2450
2452
  },
2451
- deleteOrder(n, r, i) {
2452
- return t((s) => e.request({ document: Ot, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "deleteOrder", "mutation", n);
2453
+ deleteOrder(n, i, r) {
2454
+ return t((s) => e.request({ document: Ot, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", n);
2453
2455
  }
2454
2456
  };
2455
2457
  }
@@ -2460,7 +2462,7 @@ class vt {
2460
2462
  this.config = t, this.sdk = Dt(new T(t.apiUrl));
2461
2463
  }
2462
2464
  // Basket update functions
2463
- async addProduct(t, n, r) {
2465
+ async addProduct(t, n, i) {
2464
2466
  try {
2465
2467
  return this.debugLog("Adding product", {
2466
2468
  productId: n.id,
@@ -2478,11 +2480,11 @@ class vt {
2478
2480
  }
2479
2481
  } : null,
2480
2482
  trackerId: this.config.trackerId,
2481
- shopId: r,
2483
+ shopId: i,
2482
2484
  amount: n.amount
2483
2485
  })).reserveProduct;
2484
- } catch (i) {
2485
- throw this.debugLog("Error adding product", i), this.handleError(i), i;
2486
+ } catch (r) {
2487
+ throw this.debugLog("Error adding product", r), this.handleError(r), r;
2486
2488
  }
2487
2489
  }
2488
2490
  async removeProduct(t, n) {
@@ -2502,13 +2504,13 @@ class vt {
2502
2504
  } : null,
2503
2505
  amount: n.amount
2504
2506
  })).releaseProduct ?? null;
2505
- } catch (r) {
2506
- throw this.debugLog("Error removing product", r), this.handleError(r), r;
2507
+ } catch (i) {
2508
+ throw this.debugLog("Error removing product", i), this.handleError(i), i;
2507
2509
  }
2508
2510
  }
2509
- async configurePackage(t, n, r) {
2511
+ async configurePackage(t, n, i) {
2510
2512
  try {
2511
- const i = n.items.map((o) => ({
2513
+ const r = n.items.map((o) => ({
2512
2514
  packageItemId: o.packageItemId,
2513
2515
  eventId: o.eventId
2514
2516
  }));
@@ -2516,44 +2518,44 @@ class vt {
2516
2518
  packageId: n.id,
2517
2519
  orderId: t,
2518
2520
  amount: n.amount,
2519
- items: i,
2520
- shopId: r
2521
+ items: r,
2522
+ shopId: i
2521
2523
  });
2522
2524
  const s = await this.sdk.configurePackage({
2523
2525
  trackerId: this.config.trackerId,
2524
- shopId: r,
2526
+ shopId: i,
2525
2527
  packageId: n.id,
2526
2528
  orderId: t,
2527
2529
  amount: n.amount,
2528
- items: i
2530
+ items: r
2529
2531
  });
2530
2532
  return this.debugLog("Configure package response"), s.configurePackage ?? null;
2531
- } catch (i) {
2532
- throw this.debugLog("Error configuring package", i), this.handleError(i), i;
2533
+ } catch (r) {
2534
+ throw this.debugLog("Error configuring package", r), this.handleError(r), r;
2533
2535
  }
2534
2536
  }
2535
2537
  async configureCustomer(t, n) {
2536
2538
  this.debugLog("Creating/replacing customer", { orderId: t, email: n.email });
2537
2539
  try {
2538
- const r = await this.sdk.createOrderCustomer({
2540
+ const i = await this.sdk.createOrderCustomer({
2539
2541
  orderId: t,
2540
2542
  customer: n
2541
2543
  });
2542
- this.debugLog("Customer set successfully", r);
2543
- } catch (r) {
2544
- throw this.debugLog("Failed to set customer", r), new Error(`Failed to set customer: ${r.message}`);
2544
+ this.debugLog("Customer set successfully", i);
2545
+ } catch (i) {
2546
+ throw this.debugLog("Failed to set customer", i), new Error(`Failed to set customer: ${i.message}`);
2545
2547
  }
2546
2548
  }
2547
2549
  async configureDelivery(t, n) {
2548
2550
  this.debugLog("Creating/replacing delivery option", { orderId: t, productId: n });
2549
2551
  try {
2550
- const r = await this.sdk.configureOrderDeliveryOption({
2552
+ const i = await this.sdk.configureOrderDeliveryOption({
2551
2553
  orderId: t,
2552
2554
  productId: n
2553
2555
  });
2554
- return this.debugLog("Delivery option set successfully", r), r.configureDeliveryOption ?? !1;
2555
- } catch (r) {
2556
- throw this.debugLog("Failed to set Delivery option", r), new Error(`Failed to set Delivery: ${r.message}`);
2556
+ return this.debugLog("Delivery option set successfully", i), i.configureDeliveryOption ?? !1;
2557
+ } catch (i) {
2558
+ throw this.debugLog("Failed to set Delivery option", i), new Error(`Failed to set Delivery: ${i.message}`);
2557
2559
  }
2558
2560
  }
2559
2561
  async reserveAdditionalPackageItem(t, n) {
@@ -2565,16 +2567,16 @@ class vt {
2565
2567
  packageId: n.packageId,
2566
2568
  packageItemId: n.packageItemId
2567
2569
  });
2568
- const r = await this.sdk.reserveAdditionalPackageItem({
2570
+ const i = await this.sdk.reserveAdditionalPackageItem({
2569
2571
  orderId: t,
2570
2572
  eventId: n.eventId,
2571
2573
  amount: n.amount,
2572
2574
  packageId: n.packageId,
2573
2575
  packageItemId: n.packageItemId
2574
2576
  });
2575
- return this.debugLog("reserve additional packageItem"), r.reserveAdditionalPackageItem ?? null;
2576
- } catch (r) {
2577
- throw this.debugLog("Error configuring package", r), this.handleError(r), r;
2577
+ return this.debugLog("reserve additional packageItem"), i.reserveAdditionalPackageItem ?? null;
2578
+ } catch (i) {
2579
+ throw this.debugLog("Error configuring package", i), this.handleError(i), i;
2578
2580
  }
2579
2581
  }
2580
2582
  // Cancel and clear order functions
@@ -2583,30 +2585,30 @@ class vt {
2583
2585
  }
2584
2586
  async findOrder(t, n) {
2585
2587
  try {
2586
- const r = await this.sdk.findOrderById({ id: t, reference: n });
2587
- return r.findOrder ? {
2588
- id: r.findOrder.id,
2589
- reference: r.findOrder.reference,
2590
- currency: r.findOrder.currency,
2591
- downloadCode: r.findOrder.downloadCode,
2588
+ const i = await this.sdk.findOrderById({ id: t, reference: n });
2589
+ return i.findOrder ? {
2590
+ id: i.findOrder.id,
2591
+ reference: i.findOrder.reference,
2592
+ currency: i.findOrder.currency,
2593
+ downloadCode: i.findOrder.downloadCode,
2592
2594
  organization: {
2593
- name: r.findOrder.organization.name,
2594
- paymentBanner: r.findOrder.organization.name
2595
+ name: i.findOrder.organization.name,
2596
+ paymentBanner: i.findOrder.organization.name
2595
2597
  },
2596
- customer: r.findOrder.mainBooker ? {
2597
- firstName: r.findOrder.mainBooker.firstName,
2598
- lastName: r.findOrder.mainBooker.lastName,
2599
- email: r.findOrder.mainBooker.email,
2600
- age: r.findOrder.mainBooker.age,
2601
- gender: r.findOrder.mainBooker.gender,
2602
- residence: r.findOrder.mainBooker.residence,
2603
- extraInfo: r.findOrder.mainBooker.extraInfo
2598
+ customer: i.findOrder.mainBooker ? {
2599
+ firstName: i.findOrder.mainBooker.firstName,
2600
+ lastName: i.findOrder.mainBooker.lastName,
2601
+ email: i.findOrder.mainBooker.email,
2602
+ age: i.findOrder.mainBooker.age,
2603
+ gender: i.findOrder.mainBooker.gender,
2604
+ residence: i.findOrder.mainBooker.residence,
2605
+ extraInfo: i.findOrder.mainBooker.extraInfo
2604
2606
  } : null,
2605
- items: r.findOrder.items,
2606
- discountCode: r.findOrder.discount?.code
2607
+ items: i.findOrder.items,
2608
+ discountCode: i.findOrder.discount?.code
2607
2609
  } : null;
2608
- } catch (r) {
2609
- return this.debugLog("Error finding order", r), this.handleError(r), null;
2610
+ } catch (i) {
2611
+ return this.debugLog("Error finding order", i), this.handleError(i), null;
2610
2612
  }
2611
2613
  }
2612
2614
  async configureDiscountCode(t, n) {
@@ -2617,9 +2619,9 @@ class vt {
2617
2619
  }), await this.sdk.configureDiscount({
2618
2620
  orderId: t,
2619
2621
  discountCode: n.code
2620
- }).then((r) => r.createOrderDiscount ?? null);
2621
- } catch (r) {
2622
- return this.debugLog("Error configuring discount", r), this.handleError(r), null;
2622
+ }).then((i) => i.createOrderDiscount ?? null);
2623
+ } catch (i) {
2624
+ return this.debugLog("Error configuring discount", i), this.handleError(i), null;
2623
2625
  }
2624
2626
  }
2625
2627
  async findActiveOrder(t) {
@@ -2628,9 +2630,9 @@ class vt {
2628
2630
  const n = await this.sdk.findActiveOrderById({ id: t });
2629
2631
  if (!n?.findOrder)
2630
2632
  return null;
2631
- const r = n.findOrder;
2632
- this.debugLog("Order fetched successfully", r);
2633
- const i = r.items, s = i.filter((c) => c.product != null && c.amount > 0).map((c) => {
2633
+ const i = n.findOrder;
2634
+ this.debugLog("Order fetched successfully", i);
2635
+ const r = i.items, s = r.filter((c) => c.product != null && c.amount > 0).map((c) => {
2634
2636
  let E = O.PRODUCT;
2635
2637
  return c.product.type === "ADDON" ? E = O.ADD_ONS : c.product.type === "PICKUP" ? E = O.PICKUP : c.product.type === "DELIVERY" && (E = O.DELIVERY), {
2636
2638
  id: c.product.id,
@@ -2651,7 +2653,7 @@ class vt {
2651
2653
  amount: p.amount
2652
2654
  }))
2653
2655
  };
2654
- }), o = i.filter(
2656
+ }), o = r.filter(
2655
2657
  (c) => c.packageItem != null && c.packageItem.type !== N.Regular && c.amount
2656
2658
  ).map((c) => ({
2657
2659
  id: c.packageItem.id,
@@ -2673,7 +2675,7 @@ class vt {
2673
2675
  timezone: c.event.timezone
2674
2676
  }
2675
2677
  ]
2676
- })), l = i.filter((c) => c.packageItem != null && c.amount > 0 && c.packageItem.type === N.Regular).reduce((c, E) => {
2678
+ })), l = r.filter((c) => c.packageItem != null && c.amount > 0 && c.packageItem.type === N.Regular).reduce((c, E) => {
2677
2679
  const {
2678
2680
  packageItem: p,
2679
2681
  event: y,
@@ -2708,23 +2710,23 @@ class vt {
2708
2710
  ];
2709
2711
  if (h.reduce((c, E) => c + (E.amount || 0), 0) === 0)
2710
2712
  return null;
2711
- const g = i.filter((c) => c.amount > 0).map((c) => new Date(c.expiredAt).getTime()), k = De.fromMillis(Math.min(...g));
2713
+ const g = r.filter((c) => c.amount > 0).map((c) => new Date(c.expiredAt).getTime()), k = De.fromMillis(Math.min(...g));
2712
2714
  return {
2713
- id: r.id,
2714
- currency: r.currency,
2715
+ id: i.id,
2716
+ currency: i.currency,
2715
2717
  expiredAt: k?.toJSDate().toISOString(),
2716
2718
  items: h,
2717
- customer: r.mainBooker ? {
2718
- firstName: r.mainBooker.firstName,
2719
- lastName: r.mainBooker.lastName,
2720
- email: r.mainBooker.email,
2721
- age: r.mainBooker.age,
2722
- gender: r.mainBooker.gender,
2723
- residence: r.mainBooker.residence,
2724
- extraInfo: r.mainBooker.extraInfo
2719
+ customer: i.mainBooker ? {
2720
+ firstName: i.mainBooker.firstName,
2721
+ lastName: i.mainBooker.lastName,
2722
+ email: i.mainBooker.email,
2723
+ age: i.mainBooker.age,
2724
+ gender: i.mainBooker.gender,
2725
+ residence: i.mainBooker.residence,
2726
+ extraInfo: i.mainBooker.extraInfo
2725
2727
  } : null,
2726
2728
  orderProtection: !1,
2727
- discountCode: r.discount?.code
2729
+ discountCode: i.discount?.code
2728
2730
  };
2729
2731
  } catch (n) {
2730
2732
  throw this.debugLog("Error fetching order", n), n;
@@ -2736,12 +2738,12 @@ class vt {
2736
2738
  handleError(t) {
2737
2739
  const n = t;
2738
2740
  if (n.graphQLErrors && n.graphQLErrors.length > 0) {
2739
- const r = n.graphQLErrors[0];
2740
- r.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), r.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
2741
+ const i = n.graphQLErrors[0];
2742
+ i.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), i.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
2741
2743
  }
2742
2744
  if (n.response?.errors && n.response.errors.length > 0) {
2743
- const r = n.response.errors[0];
2744
- console.error("GraphQL Error:", r.message), r.extensions?.code && console.error("Error Code:", r.extensions.code);
2745
+ const i = n.response.errors[0];
2746
+ console.error("GraphQL Error:", i.message), i.extensions?.code && console.error("Error Code:", i.extensions.code);
2745
2747
  }
2746
2748
  }
2747
2749
  }
@@ -2899,20 +2901,20 @@ const Nt = u`
2899
2901
  showEndSalesAtTag
2900
2902
  }
2901
2903
  }
2902
- `, St = (e, t, n, r) => e();
2904
+ `, St = (e, t, n, i) => e();
2903
2905
  function Ct(e, t = St) {
2904
2906
  return {
2905
- EventOverviewPage(n, r, i) {
2906
- return t((s) => e.request({ document: Nt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "EventOverviewPage", "query", n);
2907
+ EventOverviewPage(n, i, r) {
2908
+ return t((s) => e.request({ document: Nt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", n);
2907
2909
  },
2908
- EventDetailPage(n, r, i) {
2909
- return t((s) => e.request({ document: Pt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "EventDetailPage", "query", n);
2910
+ EventDetailPage(n, i, r) {
2911
+ return t((s) => e.request({ document: Pt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", n);
2910
2912
  },
2911
- FindPublicEventBySlug(n, r, i) {
2912
- return t((s) => e.request({ document: bt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "FindPublicEventBySlug", "query", n);
2913
+ FindPublicEventBySlug(n, i, r) {
2914
+ return t((s) => e.request({ document: bt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "FindPublicEventBySlug", "query", n);
2913
2915
  },
2914
- findProductsByEventId(n, r, i) {
2915
- return t((s) => e.request({ document: xt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findProductsByEventId", "query", n);
2916
+ findProductsByEventId(n, i, r) {
2917
+ return t((s) => e.request({ document: xt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", n);
2916
2918
  }
2917
2919
  };
2918
2920
  }
@@ -2939,7 +2941,7 @@ class _t {
2939
2941
  priceRange: t.priceRange,
2940
2942
  showDoorTickets: t.showDoorTickets
2941
2943
  });
2942
- const r = await this.sdk.EventOverviewPage({
2944
+ const i = await this.sdk.EventOverviewPage({
2943
2945
  organizationId: this.config.organizationId ?? n ?? "",
2944
2946
  hostingIds: t.hostingIds,
2945
2947
  locationIds: t.locationIds,
@@ -2956,8 +2958,8 @@ class _t {
2956
2958
  priceRange: t.priceRange,
2957
2959
  showDoorTickets: t.showDoorTickets
2958
2960
  });
2959
- if (this.debugLog("Raw GraphQL response", r), r?.findAllPublicEventByOrganizationId?.data) {
2960
- const i = r.findAllPublicEventByOrganizationId.data.map((s) => ({
2961
+ if (this.debugLog("Raw GraphQL response", i), i?.findAllPublicEventByOrganizationId?.data) {
2962
+ const r = i.findAllPublicEventByOrganizationId.data.map((s) => ({
2961
2963
  id: s.id,
2962
2964
  name: s.name,
2963
2965
  icon: s.icon,
@@ -2986,11 +2988,11 @@ class _t {
2986
2988
  totalViews: s.totalViews,
2987
2989
  statusTags: s.statusTags
2988
2990
  }));
2989
- return this.debugLog("Processed events", { events: i, count: i.length }), [i, r.findAllPublicEventByOrganizationId.count ?? 0];
2991
+ return this.debugLog("Processed events", { events: r, count: r.length }), [r, i.findAllPublicEventByOrganizationId.count ?? 0];
2990
2992
  } else
2991
2993
  return this.debugLog("No events found in response"), [[], 0];
2992
- } catch (r) {
2993
- throw this.debugLog("Error fetching events", r), r;
2994
+ } catch (i) {
2995
+ throw this.debugLog("Error fetching events", i), i;
2994
2996
  }
2995
2997
  }
2996
2998
  async getEvent(t) {
@@ -2998,53 +3000,7 @@ class _t {
2998
3000
  this.debugLog("Fetching single event", { eventId: t });
2999
3001
  const n = await this.sdk.EventDetailPage({ eventId: t });
3000
3002
  if (this.debugLog("Raw GraphQL response", n), n?.findPublicEventById) {
3001
- const r = n.findPublicEventById, i = {
3002
- id: r.id,
3003
- name: r.name,
3004
- icon: r.icon,
3005
- banner: r.banner,
3006
- description: r.description,
3007
- addonDescription: r.addonDescription,
3008
- startAt: r.startAt,
3009
- endAt: r.endAt,
3010
- timezone: r.timezone,
3011
- startSalesAt: r.startSalesAt,
3012
- endSalesAt: r.endSalesAt,
3013
- slug: r.slug ?? "ERROR",
3014
- facebookPixelId: r.facebookPixelId,
3015
- status: r.status,
3016
- location: r.location ? {
3017
- id: r.location.id,
3018
- name: r.location.name,
3019
- address: r.location.address
3020
- } : void 0,
3021
- hosting: r.hosting ? {
3022
- id: r.hosting.id,
3023
- name: r.hosting.name
3024
- } : void 0,
3025
- infoDescription: r.infoDescription,
3026
- startingPrice: r.startingPrice,
3027
- totalViews: r.totalViews,
3028
- seatsIoEventId: r.seatsIoEventId,
3029
- maxAmountOfTicketsPerOrder: r.maxAmountOfTicketsPerOrder,
3030
- enableDelivery: r.enableDelivery,
3031
- statusTags: r.statusTags
3032
- };
3033
- return this.debugLog("Processed single event", i), i;
3034
- } else {
3035
- this.debugLog("No event found for id", t);
3036
- return;
3037
- }
3038
- } catch (n) {
3039
- throw this.debugLog("Error fetching single event", n), n;
3040
- }
3041
- }
3042
- async getEventBySlug(t, n) {
3043
- try {
3044
- this.debugLog("Fetching single event by slug", { organizationId: t, slug: n });
3045
- const r = await this.sdk.FindPublicEventBySlug({ organizationId: t, slug: n });
3046
- if (this.debugLog("Raw GraphQL response", r), r?.findPublicEventBySlug) {
3047
- const i = r.findPublicEventBySlug, s = {
3003
+ const i = n.findPublicEventById, r = {
3048
3004
  id: i.id,
3049
3005
  name: i.name,
3050
3006
  icon: i.icon,
@@ -3066,8 +3022,7 @@ class _t {
3066
3022
  } : void 0,
3067
3023
  hosting: i.hosting ? {
3068
3024
  id: i.hosting.id,
3069
- name: i.hosting.name,
3070
- facebookPixelId: i.hosting.facebookPixelId
3025
+ name: i.hosting.name
3071
3026
  } : void 0,
3072
3027
  infoDescription: i.infoDescription,
3073
3028
  startingPrice: i.startingPrice,
@@ -3077,31 +3032,78 @@ class _t {
3077
3032
  enableDelivery: i.enableDelivery,
3078
3033
  statusTags: i.statusTags
3079
3034
  };
3035
+ return this.debugLog("Processed single event", r), r;
3036
+ } else {
3037
+ this.debugLog("No event found for id", t);
3038
+ return;
3039
+ }
3040
+ } catch (n) {
3041
+ throw this.debugLog("Error fetching single event", n), n;
3042
+ }
3043
+ }
3044
+ async getEventBySlug(t, n) {
3045
+ try {
3046
+ this.debugLog("Fetching single event by slug", { organizationId: t, slug: n });
3047
+ const i = await this.sdk.FindPublicEventBySlug({ organizationId: t, slug: n });
3048
+ if (this.debugLog("Raw GraphQL response", i), i?.findPublicEventBySlug) {
3049
+ const r = i.findPublicEventBySlug, s = {
3050
+ id: r.id,
3051
+ name: r.name,
3052
+ icon: r.icon,
3053
+ banner: r.banner,
3054
+ description: r.description,
3055
+ addonDescription: r.addonDescription,
3056
+ startAt: r.startAt,
3057
+ endAt: r.endAt,
3058
+ timezone: r.timezone,
3059
+ startSalesAt: r.startSalesAt,
3060
+ endSalesAt: r.endSalesAt,
3061
+ slug: r.slug ?? "ERROR",
3062
+ facebookPixelId: r.facebookPixelId,
3063
+ status: r.status,
3064
+ location: r.location ? {
3065
+ id: r.location.id,
3066
+ name: r.location.name,
3067
+ address: r.location.address
3068
+ } : void 0,
3069
+ hosting: r.hosting ? {
3070
+ id: r.hosting.id,
3071
+ name: r.hosting.name,
3072
+ facebookPixelId: r.hosting.facebookPixelId
3073
+ } : void 0,
3074
+ infoDescription: r.infoDescription,
3075
+ startingPrice: r.startingPrice,
3076
+ totalViews: r.totalViews,
3077
+ seatsIoEventId: r.seatsIoEventId,
3078
+ maxAmountOfTicketsPerOrder: r.maxAmountOfTicketsPerOrder,
3079
+ enableDelivery: r.enableDelivery,
3080
+ statusTags: r.statusTags
3081
+ };
3080
3082
  return this.debugLog("Processed single event", s), s;
3081
3083
  } else {
3082
3084
  this.debugLog("No event found for id by slug", { organizationId: t, slug: n });
3083
3085
  return;
3084
3086
  }
3085
- } catch (r) {
3086
- throw this.debugLog("Error fetching single event", r), r;
3087
+ } catch (i) {
3088
+ throw this.debugLog("Error fetching single event", i), i;
3087
3089
  }
3088
3090
  }
3089
- async getProducts(t, n, r) {
3091
+ async getProducts(t, n, i) {
3090
3092
  try {
3091
3093
  this.debugLog("Fetching products for event", {
3092
3094
  eventId: t,
3093
- promoCode: r,
3095
+ promoCode: i,
3094
3096
  trackerId: this.config.trackerId,
3095
3097
  productTypes: n
3096
3098
  });
3097
- const i = await this.sdk.findProductsByEventId({
3099
+ const r = await this.sdk.findProductsByEventId({
3098
3100
  eventId: t,
3099
- promoCode: r,
3101
+ promoCode: i,
3100
3102
  trackerId: this.config.trackerId,
3101
3103
  productTypes: n
3102
3104
  });
3103
- if (i?.findPublicProductsByEventId) {
3104
- const s = i.findPublicProductsByEventId.map((o) => ({
3105
+ if (r?.findPublicProductsByEventId) {
3106
+ const s = r.findPublicProductsByEventId.map((o) => ({
3105
3107
  id: o.id,
3106
3108
  name: o.name,
3107
3109
  category: o.category ? {
@@ -3134,8 +3136,8 @@ class _t {
3134
3136
  }), s;
3135
3137
  }
3136
3138
  return;
3137
- } catch (i) {
3138
- throw this.debugLog("Error fetching products", { eventId: t, error: i }), i;
3139
+ } catch (r) {
3140
+ throw this.debugLog("Error fetching products", { eventId: t, error: r }), r;
3139
3141
  }
3140
3142
  }
3141
3143
  debugLog(t, n) {
@@ -3176,14 +3178,14 @@ const Lt = u`
3176
3178
  mutation createDigitalPayment($input: CreateDigitalOrderPaymentInput!) {
3177
3179
  createDigitalOrderPayment(input: $input)
3178
3180
  }
3179
- `, wt = (e, t, n, r) => e();
3181
+ `, wt = (e, t, n, i) => e();
3180
3182
  function Ft(e, t = wt) {
3181
3183
  return {
3182
- findPaymentMethods(n, r, i) {
3183
- return t((s) => e.request({ document: Lt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findPaymentMethods", "query", n);
3184
+ findPaymentMethods(n, i, r) {
3185
+ return t((s) => e.request({ document: Lt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", n);
3184
3186
  },
3185
- createDigitalPayment(n, r, i) {
3186
- return t((s) => e.request({ document: Rt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "createDigitalPayment", "mutation", n);
3187
+ createDigitalPayment(n, i, r) {
3188
+ return t((s) => e.request({ document: Rt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", n);
3187
3189
  }
3188
3190
  };
3189
3191
  }
@@ -3205,29 +3207,29 @@ class $t {
3205
3207
  });
3206
3208
  if (!n?.findPaymentDetails)
3207
3209
  throw this.debugLog("No payment details found"), new Error("No payment details found for this order");
3208
- const r = n.findPaymentDetails;
3210
+ const i = n.findPaymentDetails;
3209
3211
  return this.debugLog("Payment methods fetched successfully", {
3210
- methodCount: r.methods?.length ?? 0,
3211
- transactionPrice: r.transactionPrice,
3212
- transactionDiscount: r.transactionDiscount,
3213
- transactionFee: r.transactionFee,
3214
- paymentSpesificTransactionFee: r.paymentSpesificTransactionFee,
3215
- protectionFee: r.protectionFee
3212
+ methodCount: i.methods?.length ?? 0,
3213
+ transactionPrice: i.transactionPrice,
3214
+ transactionDiscount: i.transactionDiscount,
3215
+ transactionFee: i.transactionFee,
3216
+ paymentSpesificTransactionFee: i.paymentSpesificTransactionFee,
3217
+ protectionFee: i.protectionFee
3216
3218
  }), {
3217
- transactionPrice: r.transactionPrice,
3218
- transactionDiscount: r.transactionDiscount,
3219
- transactionFee: r.transactionFee,
3220
- protectionFee: r.protectionFee,
3221
- paymentSpesificTransactionFee: r.paymentSpesificTransactionFee,
3222
- methods: r.methods?.map((i) => ({
3223
- id: i.id,
3224
- name: i.name,
3225
- image: i.image,
3226
- fee: i.fee ? {
3227
- type: i.fee.type,
3228
- value: i.fee.value
3219
+ transactionPrice: i.transactionPrice,
3220
+ transactionDiscount: i.transactionDiscount,
3221
+ transactionFee: i.transactionFee,
3222
+ protectionFee: i.protectionFee,
3223
+ paymentSpesificTransactionFee: i.paymentSpesificTransactionFee,
3224
+ methods: i.methods?.map((r) => ({
3225
+ id: r.id,
3226
+ name: r.name,
3227
+ image: r.image,
3228
+ fee: r.fee ? {
3229
+ type: r.fee.type,
3230
+ value: r.fee.value
3229
3231
  } : null,
3230
- issuers: i.issuers?.map((s) => ({
3232
+ issuers: r.issuers?.map((s) => ({
3231
3233
  id: s.id,
3232
3234
  name: s.name,
3233
3235
  image: s.image
@@ -3254,13 +3256,13 @@ class $t {
3254
3256
  withTicketProtection: t.withTicketProtection
3255
3257
  };
3256
3258
  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);
3257
- const r = await this.sdk.createDigitalPayment({
3259
+ const i = await this.sdk.createDigitalPayment({
3258
3260
  input: n
3259
3261
  });
3260
- if (!r?.createDigitalOrderPayment)
3262
+ if (!i?.createDigitalOrderPayment)
3261
3263
  throw this.debugLog("Failed to create payment"), new Error("Failed to create payment for this order");
3262
- const i = r.createDigitalOrderPayment;
3263
- return this.debugLog("Payment created successfully", { paymentUrl: i }), { paymentUrl: i };
3264
+ const r = i.createDigitalOrderPayment;
3265
+ return this.debugLog("Payment created successfully", { paymentUrl: r }), { paymentUrl: r };
3264
3266
  } catch (n) {
3265
3267
  throw this.debugLog("Error creating payment", n), n;
3266
3268
  }
@@ -3390,20 +3392,20 @@ const Bt = u`
3390
3392
  count
3391
3393
  }
3392
3394
  }
3393
- `, qt = (e, t, n, r) => e();
3395
+ `, qt = (e, t, n, i) => e();
3394
3396
  function zt(e, t = qt) {
3395
3397
  return {
3396
- findAllPublicPackagesByOrganizationId(n, r, i) {
3397
- return t((s) => e.request({ document: Bt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findAllPublicPackagesByOrganizationId", "query", n);
3398
+ findAllPublicPackagesByOrganizationId(n, i, r) {
3399
+ return t((s) => e.request({ document: Bt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", n);
3398
3400
  },
3399
- findPublicPackageById(n, r, i) {
3400
- return t((s) => e.request({ document: Ut, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findPublicPackageById", "query", n);
3401
+ findPublicPackageById(n, i, r) {
3402
+ return t((s) => e.request({ document: Ut, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", n);
3401
3403
  },
3402
- findPublicPackageBySlug(n, r, i) {
3403
- return t((s) => e.request({ document: Vt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findPublicPackageBySlug", "query", n);
3404
+ findPublicPackageBySlug(n, i, r) {
3405
+ return t((s) => e.request({ document: Vt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageBySlug", "query", n);
3404
3406
  },
3405
- findPublicItemsByPackageId(n, r, i) {
3406
- return t((s) => e.request({ document: Mt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findPublicItemsByPackageId", "query", n);
3407
+ findPublicItemsByPackageId(n, i, r) {
3408
+ return t((s) => e.request({ document: Mt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", n);
3407
3409
  }
3408
3410
  };
3409
3411
  }
@@ -3418,29 +3420,29 @@ class Gt {
3418
3420
  }
3419
3421
  async getPackages(t, n) {
3420
3422
  try {
3421
- let r;
3422
- t.page && (r = {
3423
+ let i;
3424
+ t.page && (i = {
3423
3425
  index: t.page.index ?? 0,
3424
3426
  size: t.page.size ?? 20
3425
3427
  }), this.debugLog("Fetching public packages", {
3426
3428
  organizationId: this.config.organizationId ?? n ?? "",
3427
- page: r,
3429
+ page: i,
3428
3430
  tab: t.tab,
3429
3431
  statuses: t.statuses
3430
3432
  });
3431
- const i = await this.sdk.findAllPublicPackagesByOrganizationId({
3433
+ const r = await this.sdk.findAllPublicPackagesByOrganizationId({
3432
3434
  organizationId: this.config.organizationId ?? n ?? ""
3433
3435
  });
3434
- if (i?.findAllPublicPackagesByOrganizationId) {
3435
- const s = i.findAllPublicPackagesByOrganizationId;
3436
+ if (r?.findAllPublicPackagesByOrganizationId) {
3437
+ const s = r.findAllPublicPackagesByOrganizationId;
3436
3438
  return this.debugLog("Public packages fetched", {
3437
3439
  count: s.count,
3438
3440
  dataLength: s.data.length
3439
3441
  }), s.data;
3440
3442
  }
3441
3443
  return null;
3442
- } catch (r) {
3443
- throw this.debugLog("Error fetching public packages", r), r;
3444
+ } catch (i) {
3445
+ throw this.debugLog("Error fetching public packages", i), i;
3444
3446
  }
3445
3447
  }
3446
3448
  async getPackage(t) {
@@ -3450,8 +3452,8 @@ class Gt {
3450
3452
  });
3451
3453
  const n = await this.sdk.findPublicPackageById({ packageId: t });
3452
3454
  if (n?.findPublicPackageById) {
3453
- const r = n.findPublicPackageById;
3454
- return this.debugLog("Public package fetched"), r;
3455
+ const i = n.findPublicPackageById;
3456
+ return this.debugLog("Public package fetched"), i;
3455
3457
  }
3456
3458
  return null;
3457
3459
  } catch (n) {
@@ -3464,34 +3466,34 @@ class Gt {
3464
3466
  organizationId: t,
3465
3467
  slug: n
3466
3468
  });
3467
- const r = await this.sdk.findPublicPackageBySlug({ organizationId: t, slug: n });
3468
- if (r?.findPublicPackageBySlug) {
3469
- const i = r.findPublicPackageBySlug;
3470
- return this.debugLog("Public package fetched"), i;
3469
+ const i = await this.sdk.findPublicPackageBySlug({ organizationId: t, slug: n });
3470
+ if (i?.findPublicPackageBySlug) {
3471
+ const r = i.findPublicPackageBySlug;
3472
+ return this.debugLog("Public package fetched"), r;
3471
3473
  }
3472
3474
  return null;
3473
- } catch (r) {
3474
- throw this.debugLog("Error fetching public packages", r), r;
3475
+ } catch (i) {
3476
+ throw this.debugLog("Error fetching public packages", i), i;
3475
3477
  }
3476
3478
  }
3477
3479
  async getPackageItems(t, n = [N.Regular, N.AdditionalEvent]) {
3478
3480
  try {
3479
3481
  this.debugLog("Fetching public package items", { packageId: t, types: n });
3480
- const r = await this.sdk.findPublicItemsByPackageId({
3482
+ const i = await this.sdk.findPublicItemsByPackageId({
3481
3483
  packageId: t,
3482
3484
  types: n,
3483
3485
  page: { index: 0, size: 100 }
3484
3486
  });
3485
- if (r?.findPublicItemsByPackageId) {
3486
- const i = r.findPublicItemsByPackageId;
3487
+ if (i?.findPublicItemsByPackageId) {
3488
+ const r = i.findPublicItemsByPackageId;
3487
3489
  return this.debugLog("Public package items fetched", {
3488
- count: i.count,
3489
- dataLength: i.data.length
3490
- }), i.data;
3490
+ count: r.count,
3491
+ dataLength: r.data.length
3492
+ }), r.data;
3491
3493
  }
3492
3494
  return null;
3493
- } catch (r) {
3494
- throw this.debugLog("Error fetching public package items", r), r;
3495
+ } catch (i) {
3496
+ throw this.debugLog("Error fetching public package items", i), i;
3495
3497
  }
3496
3498
  }
3497
3499
  }
@@ -3515,11 +3517,11 @@ const jt = u`
3515
3517
  count
3516
3518
  }
3517
3519
  }
3518
- `, Ht = (e, t, n, r) => e();
3520
+ `, Ht = (e, t, n, i) => e();
3519
3521
  function Yt(e, t = Ht) {
3520
3522
  return {
3521
- findAllPublicCategoriesByOrganizationId(n, r, i) {
3522
- return t((s) => e.request({ document: jt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findAllPublicCategoriesByOrganizationId", "query", n);
3523
+ findAllPublicCategoriesByOrganizationId(n, i, r) {
3524
+ return t((s) => e.request({ document: jt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", n);
3523
3525
  }
3524
3526
  };
3525
3527
  }
@@ -3535,17 +3537,17 @@ class Qt {
3535
3537
  async getCategories(t, n) {
3536
3538
  try {
3537
3539
  this.debugLog("Fetching all categories", { organizationId: this.config.organizationId });
3538
- const r = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId ?? n ?? "", dateRange: t ?? null });
3539
- if (r?.findAllPublicHostingsByOrganizationId) {
3540
- const i = r.findAllPublicHostingsByOrganizationId, s = r.findAllPublicLocationsByOrganizationId;
3541
- return this.debugLog("Categories fetched", { count: i.count + s.count, dataLength: i.data.length + s.data.length }), [
3542
- ...i.data.map((o) => ({ id: o.id, name: o.name, icon: o.icon, activeEvents: o.amountOfActiveEvents, type: "HOSTING" })),
3540
+ const i = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId ?? n ?? "", dateRange: t ?? null });
3541
+ if (i?.findAllPublicHostingsByOrganizationId) {
3542
+ const r = i.findAllPublicHostingsByOrganizationId, s = i.findAllPublicLocationsByOrganizationId;
3543
+ return this.debugLog("Categories fetched", { count: r.count + s.count, dataLength: r.data.length + s.data.length }), [
3544
+ ...r.data.map((o) => ({ id: o.id, name: o.name, icon: o.icon, activeEvents: o.amountOfActiveEvents, type: "HOSTING" })),
3543
3545
  ...s.data.map((o) => ({ id: o.id, name: o.name, activeEvents: o.amountOfActiveEvents, type: "LOCATION" }))
3544
3546
  ];
3545
3547
  }
3546
3548
  return [];
3547
- } catch (r) {
3548
- throw this.debugLog("Error fetching categories", r), r;
3549
+ } catch (i) {
3550
+ throw this.debugLog("Error fetching categories", i), i;
3549
3551
  }
3550
3552
  }
3551
3553
  }
@@ -3561,17 +3563,17 @@ const Xt = u`
3561
3563
  mutation CreatePackageView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
3562
3564
  createPackageView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
3563
3565
  }
3564
- `, Zt = (e, t, n, r) => e();
3566
+ `, Zt = (e, t, n, i) => e();
3565
3567
  function Kt(e, t = Zt) {
3566
3568
  return {
3567
- CreateShopView(n, r, i) {
3568
- return t((s) => e.request({ document: Xt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "CreateShopView", "mutation", n);
3569
+ CreateShopView(n, i, r) {
3570
+ return t((s) => e.request({ document: Xt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", n);
3569
3571
  },
3570
- CreateEventView(n, r, i) {
3571
- return t((s) => e.request({ document: Jt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "CreateEventView", "mutation", n);
3572
+ CreateEventView(n, i, r) {
3573
+ return t((s) => e.request({ document: Jt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", n);
3572
3574
  },
3573
- CreatePackageView(n, r, i) {
3574
- return t((s) => e.request({ document: Wt, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "CreatePackageView", "mutation", n);
3575
+ CreatePackageView(n, i, r) {
3576
+ return t((s) => e.request({ document: Wt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", n);
3575
3577
  }
3576
3578
  };
3577
3579
  }
@@ -3581,11 +3583,11 @@ class en {
3581
3583
  constructor(t) {
3582
3584
  this.config = t, this.sdk = Kt(new T(t.apiUrl));
3583
3585
  }
3584
- createMetric = async (t, n, r) => {
3585
- switch (!n && !r && await this.sdk.CreateShopView({
3586
+ createMetric = async (t, n, i) => {
3587
+ switch (!n && !i && await this.sdk.CreateShopView({
3586
3588
  id: t,
3587
3589
  trackerLinkId: this.config.trackerId
3588
- }), r) {
3590
+ }), i) {
3589
3591
  case R.Event:
3590
3592
  await this.sdk.CreateEventView({
3591
3593
  id: t,
@@ -3616,7 +3618,6 @@ const tn = u`
3616
3618
  slug
3617
3619
  enablePromoCode
3618
3620
  enableDoorTickets
3619
- enableTicketProtection
3620
3621
  removeServiceFee
3621
3622
  organization {
3622
3623
  id
@@ -3631,6 +3632,7 @@ const tn = u`
3631
3632
  facebook_pixel
3632
3633
  google_tag
3633
3634
  seatsIoWorkspaceId
3635
+ withTicketProtection
3634
3636
  }
3635
3637
  template(trackerId: $trackerLinkId) {
3636
3638
  type
@@ -3650,11 +3652,11 @@ const tn = u`
3650
3652
  blockedLanguages
3651
3653
  }
3652
3654
  }
3653
- `, nn = (e, t, n, r) => e();
3655
+ `, nn = (e, t, n, i) => e();
3654
3656
  function rn(e, t = nn) {
3655
3657
  return {
3656
- getShopBySlug(n, r, i) {
3657
- return t((s) => e.request({ document: tn, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "getShopBySlug", "query", n);
3658
+ getShopBySlug(n, i, r) {
3659
+ return t((s) => e.request({ document: tn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "getShopBySlug", "query", n);
3658
3660
  }
3659
3661
  };
3660
3662
  }
@@ -3669,8 +3671,11 @@ class sn {
3669
3671
  this.debugLog("Fetching shop", { slug: t });
3670
3672
  const n = await this.sdk.getShopBySlug({ slug: t, trackerLinkId: this.config.trackerId });
3671
3673
  if (this.debugLog("Raw GraphQL response", n), n?.findShopBySlug) {
3672
- const r = n.findShopBySlug;
3673
- return this.debugLog("Public Shop fetched"), r;
3674
+ const i = n.findShopBySlug;
3675
+ return this.debugLog("Public Shop fetched"), {
3676
+ ...i,
3677
+ enableTicketProtection: i.organization.withTicketProtection
3678
+ };
3674
3679
  }
3675
3680
  return null;
3676
3681
  } catch (n) {
@@ -3700,11 +3705,11 @@ const an = u`
3700
3705
  confirm
3701
3706
  }
3702
3707
  }
3703
- `, on = (e, t, n, r) => e();
3708
+ `, on = (e, t, n, i) => e();
3704
3709
  function cn(e, t = on) {
3705
3710
  return {
3706
- findAllCustomFieldsByOrderId(n, r, i) {
3707
- return t((s) => e.request({ document: an, variables: n, requestHeaders: { ...r, ...s }, signal: i }), "findAllCustomFieldsByOrderId", "query", n);
3711
+ findAllCustomFieldsByOrderId(n, i, r) {
3712
+ return t((s) => e.request({ document: an, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllCustomFieldsByOrderId", "query", n);
3708
3713
  }
3709
3714
  };
3710
3715
  }
@@ -3717,13 +3722,13 @@ class dn {
3717
3722
  async findByOrderId(t, n) {
3718
3723
  try {
3719
3724
  this.debugLog("Fetching custom fields for order", { orderId: t, salesLocations: n });
3720
- const r = await this.sdk.findAllCustomFieldsByOrderId({
3725
+ const i = await this.sdk.findAllCustomFieldsByOrderId({
3721
3726
  orderId: t,
3722
3727
  salesLocations: n || null
3723
3728
  });
3724
- return this.debugLog("Custom fields fetched successfully", r.findAllCustomFieldsByOrderId), r.findAllCustomFieldsByOrderId;
3725
- } catch (r) {
3726
- throw this.debugLog("Error fetching custom fields for order", r), r;
3729
+ return this.debugLog("Custom fields fetched successfully", i.findAllCustomFieldsByOrderId), i.findAllCustomFieldsByOrderId;
3730
+ } catch (i) {
3731
+ throw this.debugLog("Error fetching custom fields for order", i), i;
3727
3732
  }
3728
3733
  }
3729
3734
  debugLog(t, n) {
@@ -3743,8 +3748,8 @@ class pn {
3743
3748
  // Attach selected public types to the SDK class
3744
3749
  static Types = ve;
3745
3750
  constructor(t) {
3746
- const { organizationId: n, debug: r = !1, apiUrl: i = un } = t;
3747
- this.event = new _t({ organizationId: n, debug: r, apiUrl: i, trackerId: t.trackerId }), this.package = new Gt({ organizationId: n, debug: r, apiUrl: i }), this.category = new Qt({ organizationId: n, debug: r, apiUrl: i }), this.metric = new en({ apiUrl: i, trackerId: t.trackerId }), this.shop = new sn({ debug: r, apiUrl: i, trackerId: t.trackerId }), this.customField = new dn({ debug: r, apiUrl: i }), this.basket = new vt({ debug: r, apiUrl: i, trackerId: t.trackerId }), this.payment = new $t({ debug: r, apiUrl: i });
3751
+ const { organizationId: n, debug: i = !1, apiUrl: r = un } = t;
3752
+ this.event = new _t({ organizationId: n, debug: i, apiUrl: r, trackerId: t.trackerId }), this.package = new Gt({ organizationId: n, debug: i, apiUrl: r }), this.category = new Qt({ organizationId: n, debug: i, apiUrl: r }), this.metric = new en({ apiUrl: r, trackerId: t.trackerId }), this.shop = new sn({ debug: i, apiUrl: r, trackerId: t.trackerId }), this.customField = new dn({ debug: i, apiUrl: r }), this.basket = new vt({ debug: i, apiUrl: r, trackerId: t.trackerId }), this.payment = new $t({ debug: i, apiUrl: r });
3748
3753
  }
3749
3754
  }
3750
3755
  export {
@@ -3754,11 +3759,11 @@ export {
3754
3759
  se as DiscountType,
3755
3760
  K as EventStatus,
3756
3761
  R as MetricsType,
3757
- ie as OrderItemType,
3762
+ re as OrderItemType,
3758
3763
  N as PackageItemType,
3759
3764
  W as PackageStatus,
3760
3765
  Z as PackageTabType,
3761
- re as PaymentMethodFeeType,
3766
+ ie as PaymentMethodFeeType,
3762
3767
  te as ProductStatus,
3763
3768
  ne as ProductType,
3764
3769
  ue as SalesLocations,