@getmicdrop/venue-calendar 4.3.9 → 4.3.10

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.
Files changed (117) hide show
  1. package/dist/{ArrowLeftIcon-B6RmtBIh.js → ArrowLeftIcon-BYu_Qbkb.js} +1 -1
  2. package/dist/{Badge-DsuBHDo4.js → Badge-DCHGGod2.js} +8 -9
  3. package/dist/{BlockPlaceholder-BvArmbbO.js → BlockPlaceholder-BoPMt_9Z.js} +2 -2
  4. package/dist/{Button-CxQO7vwF.js → Button-vmWb6wKc.js} +52 -23
  5. package/dist/{Calendar-Dei3Ahdk.js → Calendar-D11ctjrD.js} +286 -260
  6. package/dist/{CalendarFoundryView-Df10CTZS.js → CalendarFoundryView-DKhpjxnV.js} +4254 -4257
  7. package/dist/{CalendarIcon-DJh5V_U9.js → CalendarIcon-C8-UVSje.js} +1 -1
  8. package/dist/CartView-IqOekmQg.js +2245 -0
  9. package/dist/{Checkout-CZGmzTDh.js → Checkout-ByQsDGg3.js} +339 -317
  10. package/dist/Checkout-C0lQ0AwV.js +1846 -0
  11. package/dist/{CheckoutTimer-BubF7ziC.js → CheckoutTimer-B0E9KnHc.js} +3 -3
  12. package/dist/{ChevronDownIcon-MTzda9yz.js → ChevronDownIcon-C1uJ2yvz.js} +1 -1
  13. package/dist/{ClockIcon-Dit8R1GZ.js → ClockIcon-Dk9q65sX.js} +1 -1
  14. package/dist/{CloseIcon-XqvbBmiA.js → CloseIcon-CyR73vpD.js} +1 -1
  15. package/dist/{CollectionView-B_rrXaQH.js → CollectionView-B-CNyf9Z.js} +8 -8
  16. package/dist/{CropImage-mVbYhD9Y.js → CropImage-4WcoXkHt.js} +163 -153
  17. package/dist/{Event-WtVZMQfA.js → Event-B4x0sGkc.js} +1002 -730
  18. package/dist/{EventPage-B14U0-Hm.js → EventPage--xwhM503.js} +244 -237
  19. package/dist/{Heading-PKl9dm72.js → Heading-Br1Yqnvg.js} +1 -1
  20. package/dist/{Image-BWo4QBld.js → Image-M5RaWbKU.js} +1 -1
  21. package/dist/{Input-Bl1wqeUH.js → Input-Bk8lP6TX.js} +53 -53
  22. package/dist/{MailIcon-DQTusrr4.js → MailIcon-Ic2SruY-.js} +1 -1
  23. package/dist/{Modal-CDIhIlu-.js → Modal-CLeZUJ_i.js} +2 -2
  24. package/dist/{ModalFooter-DwkZn9ls.js → ModalFooter-CSoG_uic.js} +47 -48
  25. package/dist/{ModalHeader-BSsyLaXY.js → ModalHeader-DpKxDJT_.js} +2 -2
  26. package/dist/{PasswordInput-CnjRiZJ7.js → PasswordInput-BHj_lokg.js} +2 -2
  27. package/dist/{shareCopyFeedback.svelte-oxKGmiOe.js → RecommendationsRail-8AVZ0aLE.js} +204 -89
  28. package/dist/{ScarcityBadge-B4e3Z_Oz.js → ScarcityBadge-DakRfDx4.js} +11 -11
  29. package/dist/{SeriesPage-DszQMCy9.js → SeriesPage-BaOeDNb6.js} +5 -5
  30. package/dist/{Spinner-BRgBJYJn.js → Spinner-a1KCKWxZ.js} +2 -2
  31. package/dist/{Success-BYVtvNeO.js → Success-BtUgc4H7.js} +277 -244
  32. package/dist/{TagIcon-BAZxGlbC.js → TagIcon-BiYfs6T7.js} +1 -1
  33. package/dist/{ViewTicketsEmbed-BHDAkYuv.js → ViewTicketsEmbed-Lxg7n02-.js} +30 -30
  34. package/dist/{WarningCircleIcon-SBK0lpqR.js → WarningCircleIcon-AuYbQdPU.js} +1 -1
  35. package/dist/{WarningTriIcon-Bj3xpe3S.js → WarningTriIcon-BzI-tSDG.js} +1 -1
  36. package/dist/{__SKIP_PATHS__-B3-kZeYN.js → __SKIP_PATHS__-B3OPLTzA.js} +1 -1
  37. package/dist/api/api.cjs +1 -1
  38. package/dist/api/api.mjs +1 -1
  39. package/dist/{api-CTiZ6rza.js → api-C1M2t6HU.js} +5 -5
  40. package/dist/{browser-CziWLQ0z.js → browser-DrfMvEfn.js} +7 -7
  41. package/dist/{labels-IV_I9087.js → constants-YG4UeBdR.js} +17 -4
  42. package/dist/{copyToClipboard-C5D-wCS_.js → copyToClipboard-3SejVveg.js} +1 -1
  43. package/dist/{de-K0-gFyNH.js → de-CzupmMIa.js} +14 -1
  44. package/dist/{defaultLabels-CpurXn7c.js → defaultLabels-CXCsTwix.js} +16 -16
  45. package/dist/{es-DsZSuXW4.js → es-B-vQxM9Z.js} +14 -1
  46. package/dist/{event-d06xVg2P.js → event-DAjJ01GM.js} +1 -1
  47. package/dist/{event-transform-BjPTqPq1.js → event-transform-DNqGTQhp.js} +47 -46
  48. package/dist/{eventStatusStream-BhQUTdOZ.js → eventStatusStream-CLLN-Rvf.js} +2 -2
  49. package/dist/{fr-BmHldIKE.js → fr-B2g-kG7i.js} +14 -1
  50. package/dist/{href-DMLDnIDe.js → href-DuxMJt4c.js} +3 -3
  51. package/dist/{i18n-CASpRf85.js → i18n-Ct9Bo-Vp.js} +158 -108
  52. package/dist/{i18n--3wPB7-n.js → i18n-KdVjJUV5.js} +2 -2
  53. package/dist/{id-CBHA4B6C.js → id-Dgu5-FC6.js} +14 -1
  54. package/dist/{imageOptimizer-D8g9XVns.js → imageOptimizer-Ba8P7ZEJ.js} +12 -13
  55. package/dist/{it-CK6ravjO.js → it-C580sMYp.js} +14 -1
  56. package/dist/{ja-COO0Ibrr.js → ja-DLki4zXU.js} +14 -1
  57. package/dist/{ko-D8YqNrZs.js → ko-BUcfb1Gi.js} +14 -1
  58. package/dist/locales/4.3.10/flow/de.js +1 -0
  59. package/dist/locales/4.3.10/flow/es.js +1 -0
  60. package/dist/locales/4.3.10/flow/fr.js +1 -0
  61. package/dist/locales/4.3.10/flow/id.js +1 -0
  62. package/dist/locales/4.3.10/flow/it.js +1 -0
  63. package/dist/locales/4.3.10/flow/ja.js +1 -0
  64. package/dist/locales/4.3.10/flow/ko.js +1 -0
  65. package/dist/locales/4.3.10/flow/nl.js +1 -0
  66. package/dist/locales/4.3.10/flow/pl.js +1 -0
  67. package/dist/locales/4.3.10/flow/pt-br.js +1 -0
  68. package/dist/locales/4.3.10/flow/tr.js +1 -0
  69. package/dist/locales/4.3.10/flow/zh.js +1 -0
  70. package/dist/{nl-Bk3DPD7e.js → nl-CivAQA0D.js} +14 -1
  71. package/dist/order-totals-DyVkHVqG.js +151 -0
  72. package/dist/{orders-BK47iONR.js → orders-rH0WZYOW.js} +18 -18
  73. package/dist/{phoneUtils-YjT5IJ25.js → phoneUtils-BFrVEwkQ.js} +1 -1
  74. package/dist/{pixels-DjK-0XYz.js → pixels-mdd6C3Bk.js} +3 -3
  75. package/dist/{pl-CPmO94ic.js → pl-C5VwFH2B.js} +14 -1
  76. package/dist/{promo-DkM9sLly.js → promo-CTRn_F4t.js} +1 -1
  77. package/dist/{pt-br-Ch6NFhW6.js → pt-br-B0w9dhVB.js} +14 -1
  78. package/dist/{constants-rFRS1lF-.js → scarcity-Ccj5RlrR.js} +2 -5
  79. package/dist/{serverTotals-CvJBYArq.js → serverTotals-Dk3z9sIA.js} +1 -1
  80. package/dist/{showcase-state-options-x_9iSBsd.js → showcase-state-options-8-egiV5-.js} +1 -1
  81. package/dist/{to-event-card-props-9y7sVBi_.js → to-event-card-props-a4k6D100.js} +9 -9
  82. package/dist/{tr-CXnalLJT.js → tr-LGkP5gpA.js} +14 -1
  83. package/dist/{utils-D80jLqKH.js → utils-BseYYrbn.js} +82 -78
  84. package/dist/venue-calendar.css +1 -1
  85. package/dist/venue-calendar.es.js +89 -91
  86. package/dist/venue-calendar.iife.js +48 -49
  87. package/dist/venue-calendar.umd.js +43 -44
  88. package/dist/{zh-CM2J1Py4.js → zh-D2ZAdq3T.js} +14 -1
  89. package/package.json +2 -2
  90. package/dist/CartView-DPzvlZwV.js +0 -2245
  91. package/dist/Checkout-CaamQTXi.js +0 -1846
  92. package/dist/keyboard-fiZFqeNA.js +0 -29
  93. package/dist/locales/4.3.9/flow/de.js +0 -1
  94. package/dist/locales/4.3.9/flow/es.js +0 -1
  95. package/dist/locales/4.3.9/flow/fr.js +0 -1
  96. package/dist/locales/4.3.9/flow/id.js +0 -1
  97. package/dist/locales/4.3.9/flow/it.js +0 -1
  98. package/dist/locales/4.3.9/flow/ja.js +0 -1
  99. package/dist/locales/4.3.9/flow/ko.js +0 -1
  100. package/dist/locales/4.3.9/flow/nl.js +0 -1
  101. package/dist/locales/4.3.9/flow/pl.js +0 -1
  102. package/dist/locales/4.3.9/flow/pt-br.js +0 -1
  103. package/dist/locales/4.3.9/flow/tr.js +0 -1
  104. package/dist/locales/4.3.9/flow/zh.js +0 -1
  105. package/dist/order-totals-Buq9HeZa.js +0 -131
  106. /package/dist/locales/{4.3.9 → 4.3.10}/main/de.js +0 -0
  107. /package/dist/locales/{4.3.9 → 4.3.10}/main/es.js +0 -0
  108. /package/dist/locales/{4.3.9 → 4.3.10}/main/fr.js +0 -0
  109. /package/dist/locales/{4.3.9 → 4.3.10}/main/id.js +0 -0
  110. /package/dist/locales/{4.3.9 → 4.3.10}/main/it.js +0 -0
  111. /package/dist/locales/{4.3.9 → 4.3.10}/main/ja.js +0 -0
  112. /package/dist/locales/{4.3.9 → 4.3.10}/main/ko.js +0 -0
  113. /package/dist/locales/{4.3.9 → 4.3.10}/main/nl.js +0 -0
  114. /package/dist/locales/{4.3.9 → 4.3.10}/main/pl.js +0 -0
  115. /package/dist/locales/{4.3.9 → 4.3.10}/main/pt-br.js +0 -0
  116. /package/dist/locales/{4.3.9 → 4.3.10}/main/tr.js +0 -0
  117. /package/dist/locales/{4.3.9 → 4.3.10}/main/zh.js +0 -0
@@ -1,25 +1,25 @@
1
- import { _ as e, v as t, x as n } from "./Button-CxQO7vwF.js";
2
- import { n as r, r as i, t as a } from "./CloseIcon-XqvbBmiA.js";
3
- import { i as o } from "./Input-Bl1wqeUH.js";
4
- import { C as s, O as c, m as l } from "./constants-rFRS1lF-.js";
5
- import { t as u } from "./TagIcon-BAZxGlbC.js";
6
- import { t as d } from "./WarningTriIcon-Bj3xpe3S.js";
1
+ import { C as e, E as t, S as n } from "./Button-vmWb6wKc.js";
2
+ import { n as r, r as i, t as a } from "./CloseIcon-CyR73vpD.js";
3
+ import { i as o } from "./Input-Bk8lP6TX.js";
4
+ import { D as s, S as c, p as l } from "./scarcity-Ccj5RlrR.js";
5
+ import { t as u } from "./TagIcon-BiYfs6T7.js";
6
+ import { t as d } from "./WarningTriIcon-BzI-tSDG.js";
7
7
  import { d as f, n as p } from "./z-index-BgKs9X9U.js";
8
- import { i as m, n as h, t as g, y as ee } from "./defaultLabels-CpurXn7c.js";
9
- import { f as te, i as _, n as v, r as y, s as b, t as x } from "./orders-BK47iONR.js";
10
- import { n as S, t as C } from "./serverTotals-CvJBYArq.js";
11
- import { a as w, i as T, n as E, r as D, t as O } from "./ModalFooter-DwkZn9ls.js";
12
- import { a as k, o as ne, s as A, v as re } from "./api-CTiZ6rza.js";
13
- import { t as ie } from "./venue-CBos8YTa.js";
14
- import { t as ae } from "./event-transform-BjPTqPq1.js";
15
- import { _ as oe, h as se, l as ce, r as j, y as le } from "./utils-D80jLqKH.js";
16
- import { a as M, n as ue } from "./promo-DkM9sLly.js";
17
- import { r as de } from "./order-totals-Buq9HeZa.js";
18
- import fe, { n as N, t as pe } from "./Checkout-CaamQTXi.js";
19
- import { n as me } from "./buyerEmail-BfCq-gDt.js";
8
+ import { I as m, i as h, k as ee, n as g, t as _, y as v } from "./defaultLabels-CXCsTwix.js";
9
+ import { f as y, i as b, n as x, r as S, s as C, t as w } from "./orders-rH0WZYOW.js";
10
+ import { n as T, t as E } from "./serverTotals-Dk3z9sIA.js";
11
+ import { a as te, i as D, n as O, r as k, t as A } from "./ModalFooter-CSoG_uic.js";
12
+ import { a as ne, o as re, s as j, v as ie } from "./api-C1M2t6HU.js";
13
+ import { t as ae } from "./venue-CBos8YTa.js";
14
+ import { t as oe } from "./event-transform-DNqGTQhp.js";
15
+ import { _ as se, h as M, l as ce, r as le, y as ue } from "./utils-BseYYrbn.js";
16
+ import { a as de, n as fe } from "./promo-CTRn_F4t.js";
17
+ import { r as pe } from "./order-totals-DyVkHVqG.js";
18
+ import me, { n as N, t as he } from "./Checkout-C0lQ0AwV.js";
19
+ import { n as ge } from "./buyerEmail-BfCq-gDt.js";
20
20
  import "svelte/internal/disclose-version";
21
21
  import * as P from "svelte/internal/client";
22
- import { onMount as he } from "svelte";
22
+ import { onMount as _e } from "svelte";
23
23
  //#region node_modules/@stripe/stripe-js/dist/index.mjs
24
24
  function F(e) {
25
25
  "@babel/helpers - typeof";
@@ -29,23 +29,23 @@ function F(e) {
29
29
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
30
30
  }, F(e);
31
31
  }
32
- var I = "dahlia", ge = function(e) {
32
+ var I = "dahlia", L = function(e) {
33
33
  return e === 3 ? "v3" : e;
34
- }, L = "https://js.stripe.com", R = `${L}/${I}/stripe.js`, z = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, B = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, V = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", H = function(e) {
34
+ }, ve = "https://js.stripe.com", R = `${ve}/${I}/stripe.js`, z = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, B = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, V = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", H = function(e) {
35
35
  return z.test(e) || B.test(e);
36
- }, _e = function() {
37
- for (var e = document.querySelectorAll(`script[src^="${L}"]`), t = 0; t < e.length; t++) {
36
+ }, U = function() {
37
+ for (var e = document.querySelectorAll(`script[src^="${ve}"]`), t = 0; t < e.length; t++) {
38
38
  var n = e[t];
39
39
  if (H(n.src)) return n;
40
40
  }
41
41
  return null;
42
- }, ve = function(e) {
42
+ }, ye = function(e) {
43
43
  var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
44
44
  n.src = `${R}${t}`;
45
45
  var r = document.head || document.body;
46
46
  if (!r) throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
47
47
  return r.appendChild(n), n;
48
- }, U = function(e, t) {
48
+ }, be = function(e, t) {
49
49
  !e || !e._registerWrapper || e._registerWrapper({
50
50
  name: "stripe-js",
51
51
  version: "9.13.0",
@@ -55,11 +55,11 @@ var I = "dahlia", ge = function(e) {
55
55
  return function(t) {
56
56
  e(Error("Failed to load Stripe.js", { cause: t }));
57
57
  };
58
- }, ye = function(e, t) {
58
+ }, J = function(e, t) {
59
59
  return function() {
60
60
  window.Stripe ? e(window.Stripe) : t(/* @__PURE__ */ Error("Stripe.js not available"));
61
61
  };
62
- }, J = function(e) {
62
+ }, xe = function(e) {
63
63
  return W === null ? (W = new Promise(function(t, n) {
64
64
  if (typeof window > "u" || typeof document > "u") {
65
65
  t(null);
@@ -70,14 +70,14 @@ var I = "dahlia", ge = function(e) {
70
70
  return;
71
71
  }
72
72
  try {
73
- var r = _e();
73
+ var r = U();
74
74
  if (r && e) console.warn(V);
75
- else if (!r) r = ve(e);
75
+ else if (!r) r = ye(e);
76
76
  else if (r && K !== null && G !== null) {
77
77
  var i;
78
- r.removeEventListener("load", K), r.removeEventListener("error", G), (i = r.parentNode) == null || i.removeChild(r), r = ve(e);
78
+ r.removeEventListener("load", K), r.removeEventListener("error", G), (i = r.parentNode) == null || i.removeChild(r), r = ye(e);
79
79
  }
80
- K = ye(t, n), G = q(n), r.addEventListener("load", K), r.addEventListener("error", G);
80
+ K = J(t, n), G = q(n), r.addEventListener("load", K), r.addEventListener("error", G);
81
81
  } catch (e) {
82
82
  n(e);
83
83
  return;
@@ -85,35 +85,35 @@ var I = "dahlia", ge = function(e) {
85
85
  }), W.catch(function(e) {
86
86
  return W = null, Promise.reject(e);
87
87
  })) : W;
88
- }, Y = function(e, t, n) {
88
+ }, Se = function(e, t, n) {
89
89
  if (e === null) return null;
90
90
  var r = t[0];
91
91
  if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${F(r)} instead.`);
92
- var i = r.match(/^pk_test/), a = ge(e.version), o = I;
92
+ var i = r.match(/^pk_test/), a = L(e.version), o = I;
93
93
  i && a !== o && console.warn(`Stripe.js@${a} was loaded on the page, but @stripe/stripe-js@9.13.0 expected Stripe.js@${o}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);
94
94
  var s = e.apply(void 0, t);
95
- return U(s, n), s;
96
- }, X, be = !1, xe = function() {
97
- return X || (X = J(null).catch(function(e) {
98
- return X = null, Promise.reject(e);
99
- }), X);
95
+ return be(s, n), s;
96
+ }, Y, X = !1, Ce = function() {
97
+ return Y || (Y = xe(null).catch(function(e) {
98
+ return Y = null, Promise.reject(e);
99
+ }), Y);
100
100
  };
101
101
  Promise.resolve().then(function() {
102
- return xe();
102
+ return Ce();
103
103
  }).catch(function(e) {
104
- be || console.warn(e);
104
+ X || console.warn(e);
105
105
  });
106
- var Se = function() {
106
+ var we = function() {
107
107
  var e = [...arguments];
108
- be = !0;
108
+ X = !0;
109
109
  var t = Date.now();
110
- return xe().then(function(n) {
111
- return Y(n, e, t);
110
+ return Ce().then(function(n) {
111
+ return Se(n, e, t);
112
112
  });
113
113
  };
114
114
  //#endregion
115
115
  //#region src/lib/utils/stripe-errors.ts
116
- function Z(e, t = g) {
116
+ function Z(e, t = _) {
117
117
  let n = e?.code || e?.decline_code || "", r = e?.type || "", i = e?.message || "";
118
118
  if (n === "card_declined" || r === "card_error") {
119
119
  let n = e?.decline_code || "";
@@ -183,100 +183,100 @@ function Z(e, t = g) {
183
183
  }
184
184
  //#endregion
185
185
  //#region src/components/Events/Checkout/GiftCardInput.svelte
186
- var Q = n("GiftCardInput"), Ce = P.from_html("<div class=\"applied-card mb-2 svelte-emw0hd\"><div class=\"flex items-center gap-3\"><div class=\"applied-icon svelte-emw0hd\"><!></div> <div class=\"flex flex-col flex-1\"><span class=\"type-caption text-status-success-text\"> </span> <span class=\"type-body font-mono text-text-primary\"> </span></div> <span class=\"type-label text-accent-success\"> </span> <!></div></div>"), we = P.from_html("<div class=\"applied-card mb-3 svelte-emw0hd\"><div><!> <span> </span></div></div>"), Te = P.from_html("<div class=\"flex items-center gap-1.5 mt-2 type-body text-accent-danger\"><!> <span> </span></div>"), Ee = P.from_html("<div class=\"input-section svelte-emw0hd\"><div class=\"flex gap-2\"><input type=\"text\" name=\"giftCardCode\" autocomplete=\"off\" autocapitalize=\"characters\"/> <!></div> <!></div>"), De = P.from_html("<div class=\"mb-4\"><!> <!> <button type=\"button\"><!> <span> </span> <span class=\"toggle-indicator svelte-emw0hd\"> </span></button> <!></div>");
187
- function Oe(n, i) {
186
+ var Q = t("GiftCardInput"), Te = P.from_html("<div class=\"applied-card mb-2 svelte-emw0hd\"><div class=\"flex items-center gap-3\"><div class=\"applied-icon svelte-emw0hd\"><!></div> <div class=\"flex flex-col flex-1\"><span class=\"type-caption text-status-success-text\"> </span> <span class=\"type-body font-mono text-text-primary\"> </span></div> <span class=\"type-label text-accent-success\"> </span> <!></div></div>"), Ee = P.from_html("<div class=\"applied-card mb-3 svelte-emw0hd\"><div><!> <span> </span></div></div>"), De = P.from_html("<div class=\"flex items-center gap-1.5 mt-2 type-body text-accent-danger\"><!> <span> </span></div>"), Oe = P.from_html("<div class=\"input-section svelte-emw0hd\"><div class=\"flex gap-2\"><input type=\"text\" name=\"giftCardCode\" autocomplete=\"off\" autocapitalize=\"characters\"/> <!></div> <!></div>"), ke = P.from_html("<div class=\"mb-4\"><!> <!> <button type=\"button\"><!> <span> </span> <span class=\"toggle-indicator svelte-emw0hd\"> </span></button> <!></div>");
187
+ function Ae(t, i) {
188
188
  P.push(i, !0);
189
- let o = P.prop(i, "onApplied", 3, () => {}), c = P.prop(i, "onRemoved", 3, () => {}), l = P.prop(i, "disabled", 3, !1), h = P.prop(i, "labels", 3, g), ee = P.prop(i, "owedTotal", 3, 0), te = P.prop(i, "serverGiftCardAmount", 3, null), _ = P.state(""), v = P.state(!1), b = P.state(""), x = P.state(P.proxy([])), S = P.state(!1), C = P.state(0);
189
+ let o = P.prop(i, "onApplied", 3, () => {}), s = P.prop(i, "onRemoved", 3, () => {}), l = P.prop(i, "disabled", 3, !1), m = P.prop(i, "labels", 3, _), ee = P.prop(i, "owedTotal", 3, 0), g = P.prop(i, "serverGiftCardAmount", 3, null), v = P.state(""), y = P.state(!1), b = P.state(""), x = P.state(P.proxy([])), C = P.state(!1), w = P.state(0);
190
190
  P.user_effect(() => {
191
- if (!i.cartId || P.get(x).length > 0 || te() === 0) return;
191
+ if (!i.cartId || P.get(x).length > 0 || g() === 0) return;
192
192
  let e = !1;
193
- return y(i.cartId).then((t) => {
193
+ return S(i.cartId).then((t) => {
194
194
  if (e || !t?.giftCards?.length) return;
195
195
  let n = t.giftCards.filter((e) => typeof e.amount == "number");
196
196
  n.length !== t.giftCards.length && Q.error("Ignored applied gift card(s) with an unusable amount while restoring the panel"), n.length !== 0 && (P.set(x, n.map((e) => ({
197
197
  giftCardId: e.giftCardId,
198
198
  code: e.maskedCode,
199
199
  giftCardAmount: e.amount
200
- })), !0), P.set(C, P.get(x).reduce((e, t) => e + (t.giftCardAmount || 0), 0) + (ee() || 0)));
200
+ })), !0), P.set(w, P.get(x).reduce((e, t) => e + (t.giftCardAmount || 0), 0) + (ee() || 0)));
201
201
  }).catch((e) => Q.error("Could not restore applied gift cards:", e)), () => {
202
202
  e = !0;
203
203
  };
204
204
  });
205
- let w = P.derived(() => P.get(x).reduce((e, t) => e + (t.giftCardAmount || 0), 0)), T = P.derived(() => Math.max(0, P.get(C) - P.get(w))), E = P.derived(() => P.get(x).length > 0 && P.get(T) <= 0);
205
+ let T = P.derived(() => P.get(x).reduce((e, t) => e + (t.giftCardAmount || 0), 0)), E = P.derived(() => Math.max(0, P.get(w) - P.get(T))), te = P.derived(() => P.get(x).length > 0 && P.get(E) <= 0);
206
206
  function D() {
207
207
  if (P.get(x).length === 0) {
208
- c()();
208
+ s()();
209
209
  return;
210
210
  }
211
211
  o()({
212
212
  code: P.get(x).map((e) => e.code).join(", "),
213
- giftCardAmount: P.get(w),
214
- stripeAmount: P.get(T),
215
- requiresStripe: P.get(T) > 0,
216
- paymentType: P.get(T) > 0 ? "split" : "gift_card_only",
217
- orderTotal: P.get(C)
213
+ giftCardAmount: P.get(T),
214
+ stripeAmount: P.get(E),
215
+ requiresStripe: P.get(E) > 0,
216
+ paymentType: P.get(E) > 0 ? "split" : "gift_card_only",
217
+ orderTotal: P.get(w)
218
218
  });
219
219
  }
220
220
  async function O() {
221
- let e = P.get(_).trim().toUpperCase();
222
- if (!(!e || P.get(v) || !i.cartId)) {
221
+ let e = P.get(v).trim().toUpperCase();
222
+ if (!(!e || P.get(y) || !i.cartId)) {
223
223
  if (P.get(x).some((t) => t.code === e)) {
224
- P.set(b, h().giftCardAlreadyApplied || "That gift card is already applied", !0);
224
+ P.set(b, m().giftCardAlreadyApplied || "That gift card is already applied", !0);
225
225
  return;
226
226
  }
227
- P.set(v, !0), P.set(b, "");
227
+ P.set(y, !0), P.set(b, "");
228
228
  try {
229
- let t = await k(i.cartId, e);
229
+ let t = await ne(i.cartId, e);
230
230
  t.valid ? (P.set(x, [...P.get(x), {
231
231
  code: t.giftCardCode || e,
232
232
  giftCardAmount: t.giftCardAmount || 0
233
- }], !0), P.set(C, P.get(w) + (t.stripeAmount || 0)), P.set(_, ""), P.set(S, !1), D()) : P.set(b, t.error || h().invalidGiftCardCode || "Invalid gift card code", !0);
233
+ }], !0), P.set(w, P.get(T) + (t.stripeAmount || 0)), P.set(v, ""), P.set(C, !1), D()) : P.set(b, t.error || m().invalidGiftCardCode || "Invalid gift card code", !0);
234
234
  } catch (e) {
235
235
  Q.error("Error applying gift card:", e);
236
236
  let t = e && typeof e == "object" && typeof e.message == "string" ? e.message : "";
237
- P.set(b, t || h().failedToApplyGiftCard || "Failed to apply gift card. Please try again", !0);
237
+ P.set(b, t || m().failedToApplyGiftCard || "Failed to apply gift card. Please try again", !0);
238
238
  }
239
- P.set(v, !1);
239
+ P.set(y, !1);
240
240
  }
241
241
  }
242
- async function ne(e) {
243
- if (!(P.get(v) || !i.cartId)) {
244
- P.set(v, !0), P.set(b, "");
242
+ async function k(e) {
243
+ if (!(P.get(y) || !i.cartId)) {
244
+ P.set(y, !0), P.set(b, "");
245
245
  try {
246
- let t = P.get(x).find((t) => t.code === e), n = await A(i.cartId, t?.giftCardId ? { giftCardId: t.giftCardId } : { code: e });
247
- n.success !== !1 && !n.error ? (P.set(x, P.get(x).filter((t) => t.code !== e), !0), typeof n.remainingTotal == "number" && P.set(C, P.get(w) + n.remainingTotal), D()) : P.set(b, n.error || h().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
246
+ let t = P.get(x).find((t) => t.code === e), n = await j(i.cartId, t?.giftCardId ? { giftCardId: t.giftCardId } : { code: e });
247
+ n.success !== !1 && !n.error ? (P.set(x, P.get(x).filter((t) => t.code !== e), !0), typeof n.remainingTotal == "number" && P.set(w, P.get(T) + n.remainingTotal), D()) : P.set(b, n.error || m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
248
248
  } catch (e) {
249
- Q.error("Error removing gift card:", e), P.set(b, h().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
249
+ Q.error("Error removing gift card:", e), P.set(b, m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
250
250
  }
251
- P.set(v, !1);
251
+ P.set(y, !1);
252
252
  }
253
253
  }
254
- function re(e) {
255
- e.key === "Enter" && !P.get(v) && O();
254
+ function A(e) {
255
+ e.key === "Enter" && !P.get(y) && O();
256
256
  }
257
- function ie() {
258
- P.set(S, !P.get(S)), P.get(S) || (P.set(_, ""), P.set(b, ""));
257
+ function re() {
258
+ P.set(C, !P.get(C)), P.get(C) || (P.set(v, ""), P.set(b, ""));
259
259
  }
260
- var ae = De(), oe = P.child(ae);
261
- P.each(oe, 17, () => P.get(x), (e) => e.code, (e, t) => {
262
- var n = Ce(), i = P.child(n), o = P.child(i), c = P.child(o);
263
- r(c, { size: "16" }), P.reset(o);
264
- var u = P.sibling(o, 2), d = P.child(u), g = P.child(d, !0);
260
+ var ie = ke(), ae = P.child(ie);
261
+ P.each(ae, 17, () => P.get(x), (e) => e.code, (e, t) => {
262
+ var n = Te(), i = P.child(n), o = P.child(i), s = P.child(o);
263
+ r(s, { size: "16" }), P.reset(o);
264
+ var u = P.sibling(o, 2), d = P.child(u), ee = P.child(d, !0);
265
265
  P.reset(d);
266
- var ee = P.sibling(d, 2), te = P.child(ee, !0);
267
- P.reset(ee), P.reset(u);
268
- var _ = P.sibling(u, 2), y = P.child(_);
269
- P.reset(_);
270
- var b = P.sibling(_, 2);
266
+ var g = P.sibling(d, 2), _ = P.child(g, !0);
267
+ P.reset(g), P.reset(u);
268
+ var v = P.sibling(u, 2), b = P.child(v);
269
+ P.reset(v);
270
+ var x = P.sibling(v, 2);
271
271
  {
272
- let e = P.derived(() => h().removeGiftCard || "Remove gift card");
273
- m(b, {
272
+ let e = P.derived(() => m().removeGiftCard || "Remove gift card");
273
+ h(x, {
274
274
  variant: "icon",
275
275
  size: "icon-sm",
276
276
  class: "rounded-full hover:bg-status-error-bg hover:text-accent-danger",
277
- onclick: () => ne(P.get(t).code),
277
+ onclick: () => k(P.get(t).code),
278
278
  get loading() {
279
- return P.get(v);
279
+ return P.get(y);
280
280
  },
281
281
  get disabled() {
282
282
  return l();
@@ -291,43 +291,43 @@ function Oe(n, i) {
291
291
  });
292
292
  }
293
293
  P.reset(i), P.reset(n), P.template_effect((e) => {
294
- P.set_text(g, h().giftCardApplied || "Gift card applied"), P.set_text(te, P.get(t).code), P.set_text(y, `-${e ?? ""}`);
295
- }, [() => s(P.get(t).giftCardAmount)]), P.transition(3, n, () => f, () => ({ duration: p.fast })), P.append(e, n);
294
+ P.set_text(ee, m().giftCardApplied || "Gift card applied"), P.set_text(_, P.get(t).code), P.set_text(b, `-${e ?? ""}`);
295
+ }, [() => c(P.get(t).giftCardAmount)]), P.transition(3, n, () => f, () => ({ duration: p.fast })), P.append(e, n);
296
296
  });
297
- var se = P.sibling(oe, 2), ce = (n) => {
298
- var i = we(), a = P.child(i), o = P.child(a);
297
+ var oe = P.sibling(ae, 2), se = (t) => {
298
+ var i = Ee(), a = P.child(i), o = P.child(a);
299
299
  r(o, { size: "16" });
300
300
  var s = P.sibling(o, 2), c = P.child(s, !0);
301
301
  P.reset(s), P.reset(a), P.reset(i), P.template_effect(() => {
302
- P.set_class(a, 1, `full-coverage-badge ${t.caption ?? ""} ${e.emphasis ?? ""}`, "svelte-emw0hd"), P.set_text(c, h().fullyCoveredByGiftCard || "Fully covered by gift card");
303
- }), P.append(n, i);
302
+ P.set_class(a, 1, `full-coverage-badge ${e.caption ?? ""} ${n.emphasis ?? ""}`, "svelte-emw0hd"), P.set_text(c, m().fullyCoveredByGiftCard || "Fully covered by gift card");
303
+ }), P.append(t, i);
304
304
  };
305
- P.if(se, (e) => {
306
- P.get(E) && e(ce);
305
+ P.if(oe, (e) => {
306
+ P.get(te) && e(se);
307
307
  });
308
- var j = P.sibling(se, 2), le = P.child(j);
309
- u(le, {
308
+ var M = P.sibling(oe, 2), ce = P.child(M);
309
+ u(ce, {
310
310
  size: "20",
311
311
  class: "gift-icon"
312
312
  });
313
- var M = P.sibling(le, 2), ue = P.child(M, !0);
314
- P.reset(M);
315
- var de = P.sibling(M, 2), fe = P.child(de, !0);
316
- P.reset(de), P.reset(j);
317
- var N = P.sibling(j, 2), pe = (e) => {
318
- var n = Ee(), r = P.child(n), i = P.child(r);
313
+ var le = P.sibling(ce, 2), ue = P.child(le, !0);
314
+ P.reset(le);
315
+ var de = P.sibling(le, 2), fe = P.child(de, !0);
316
+ P.reset(de), P.reset(M);
317
+ var pe = P.sibling(M, 2), me = (t) => {
318
+ var n = Oe(), r = P.child(n), i = P.child(r);
319
319
  P.remove_input_defaults(i);
320
320
  let a;
321
321
  var o = P.sibling(i, 2);
322
322
  {
323
- let e = P.derived(() => !P.get(_).trim() || l());
324
- m(o, {
323
+ let e = P.derived(() => !P.get(v).trim() || l());
324
+ h(o, {
325
325
  variant: "default",
326
326
  size: "sm",
327
327
  class: "min-w-16 shrink-0",
328
328
  onclick: O,
329
329
  get loading() {
330
- return P.get(v);
330
+ return P.get(y);
331
331
  },
332
332
  get disabled() {
333
333
  return P.get(e);
@@ -335,14 +335,14 @@ function Oe(n, i) {
335
335
  children: (e, t) => {
336
336
  P.next();
337
337
  var n = P.text();
338
- P.template_effect(() => P.set_text(n, h().apply || "Apply")), P.append(e, n);
338
+ P.template_effect(() => P.set_text(n, m().apply || "Apply")), P.append(e, n);
339
339
  },
340
340
  $$slots: { default: !0 }
341
341
  });
342
342
  }
343
343
  P.reset(r);
344
344
  var s = P.sibling(r, 2), c = (e) => {
345
- var t = Te(), n = P.child(t);
345
+ var t = De(), n = P.child(t);
346
346
  d(n, { size: "16" });
347
347
  var r = P.sibling(n, 2), i = P.child(r, !0);
348
348
  P.reset(r), P.reset(t), P.template_effect(() => P.set_text(i, P.get(b))), P.transition(3, t, () => f, () => ({ duration: p.micro })), P.append(e, t);
@@ -350,23 +350,23 @@ function Oe(n, i) {
350
350
  P.if(s, (e) => {
351
351
  P.get(b) && e(c);
352
352
  }), P.reset(n), P.template_effect(() => {
353
- P.set_attribute(i, "aria-label", h().enterGiftCardCode || "Enter gift card code"), P.set_attribute(i, "placeholder", h().enterGiftCardCode || "Enter gift card code"), i.disabled = P.get(v) || l(), a = P.set_class(i, 1, `gift-input ${t.body ?? ""}`, "svelte-emw0hd", a, { "has-error": !!P.get(b) });
354
- }), P.delegated("keydown", i, re), P.bind_value(i, () => P.get(_), (e) => P.set(_, e)), P.transition(3, n, () => f, () => ({ duration: p.fast })), P.append(e, n);
353
+ P.set_attribute(i, "aria-label", m().enterGiftCardCode || "Enter gift card code"), P.set_attribute(i, "placeholder", m().enterGiftCardCode || "Enter gift card code"), i.disabled = P.get(y) || l(), a = P.set_class(i, 1, `gift-input ${e.body ?? ""}`, "svelte-emw0hd", a, { "has-error": !!P.get(b) });
354
+ }), P.delegated("keydown", i, A), P.bind_value(i, () => P.get(v), (e) => P.set(v, e)), P.transition(3, n, () => f, () => ({ duration: p.fast })), P.append(t, n);
355
355
  };
356
- P.if(N, (e) => {
357
- P.get(S) && e(pe);
358
- }), P.reset(ae), P.template_effect(() => {
359
- P.set_class(j, 1, `gift-card-toggle ${t.label ?? ""}`, "svelte-emw0hd"), j.disabled = l(), P.set_attribute(j, "aria-expanded", P.get(S)), P.set_text(ue, P.get(x).length > 0 ? h().addAnotherGiftCard || "Add another gift card" : h().haveAGiftCard || "Have a gift card?"), P.set_text(fe, P.get(S) ? "-" : "+");
360
- }), P.delegated("click", j, ie), P.append(n, ae), P.pop();
356
+ P.if(pe, (e) => {
357
+ P.get(C) && e(me);
358
+ }), P.reset(ie), P.template_effect(() => {
359
+ P.set_class(M, 1, `gift-card-toggle ${e.label ?? ""}`, "svelte-emw0hd"), M.disabled = l(), P.set_attribute(M, "aria-expanded", P.get(C)), P.set_text(ue, P.get(x).length > 0 ? m().addAnotherGiftCard || "Add another gift card" : m().haveAGiftCard || "Have a gift card?"), P.set_text(fe, P.get(C) ? "-" : "+");
360
+ }), P.delegated("click", M, re), P.append(t, ie), P.pop();
361
361
  }
362
362
  P.delegate(["click", "keydown"]);
363
363
  //#endregion
364
364
  //#region src/components/Modals/EventUnavailableModal.svelte
365
- var ke = P.from_html("<div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\"><div aria-hidden=\"true\"><!></div> <h3 id=\"event-unavailable-title\"> </h3> <p id=\"event-unavailable-body\" class=\"type-body tone-secondary max-w-72\"> </p></div>"), Ae = P.from_html("<!> <!>", 1);
366
- function je(e, n) {
365
+ var je = P.from_html("<div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\"><div aria-hidden=\"true\"><!></div> <h3 id=\"event-unavailable-title\"> </h3> <p id=\"event-unavailable-body\" class=\"type-body tone-secondary max-w-72\"> </p></div>"), Me = P.from_html("<!> <!>", 1);
366
+ function Ne(t, n) {
367
367
  P.push(n, !0);
368
- let r = P.prop(n, "open", 15, !1), a = P.prop(n, "onBackToEvents", 3, () => {}), s = P.prop(n, "labels", 3, g), c = P.derived(() => n.reason === "canceled"), l = P.derived(() => P.get(c) ? s().eventCanceledTitle || "Event cancelled" : s().eventPostponedTitle || "Event postponed"), u = P.derived(() => P.get(c) ? s().eventCanceledBody || "This event was cancelled — you weren't charged" : s().eventPostponedBody || "Sales are paused while this show is rescheduled — you weren't charged"), d = P.derived(() => s().backToEvents || "Back to events");
369
- w(e, {
368
+ let r = P.prop(n, "open", 15, !1), a = P.prop(n, "onBackToEvents", 3, () => {}), s = P.prop(n, "labels", 3, _), c = P.derived(() => n.reason === "canceled"), l = P.derived(() => P.get(c) ? s().eventCanceledTitle || "Event cancelled" : s().eventPostponedTitle || "Event postponed"), u = P.derived(() => P.get(c) ? s().eventCanceledBody || "This event was cancelled — you weren't charged" : s().eventPostponedBody || "Sales are paused while this show is rescheduled — you weren't charged"), d = P.derived(() => s().backToEvents || "Back to events");
369
+ te(t, {
370
370
  size: "sm",
371
371
  role: "alertdialog",
372
372
  class: "micdrop",
@@ -376,16 +376,16 @@ function je(e, n) {
376
376
  set open(e) {
377
377
  r(e);
378
378
  },
379
- children: (e, n) => {
380
- var r = Ae(), s = P.first_child(r);
381
- T(s, {});
379
+ children: (t, n) => {
380
+ var r = Me(), s = P.first_child(r);
381
+ D(s, {});
382
382
  var f = P.sibling(s, 2);
383
- D(f, {
384
- children: (e, n) => {
385
- var r = Ae(), s = P.first_child(r);
386
- E(s, {
387
- children: (e, n) => {
388
- var r = ke(), a = P.child(r), s = P.child(a), d = (e) => {
383
+ k(f, {
384
+ children: (t, n) => {
385
+ var r = Me(), s = P.first_child(r);
386
+ O(s, {
387
+ children: (t, n) => {
388
+ var r = je(), a = P.child(r), s = P.child(a), d = (e) => {
389
389
  o(e, { size: "32" });
390
390
  }, f = (e) => {
391
391
  i(e, { size: "32" });
@@ -395,17 +395,17 @@ function je(e, n) {
395
395
  }), P.reset(a);
396
396
  var p = P.sibling(a, 2), m = P.child(p, !0);
397
397
  P.reset(p);
398
- var h = P.sibling(p, 2), g = P.child(h, !0);
398
+ var h = P.sibling(p, 2), ee = P.child(h, !0);
399
399
  P.reset(h), P.reset(r), P.template_effect(() => {
400
- P.set_class(a, 1, `w-16 h-16 rounded-full flex items-center justify-center mb-4 ${P.get(c) ? "bg-accent-danger/10 text-accent-danger" : "bg-accent-warning/10 text-accent-warning"}`), P.set_class(p, 1, `mb-2 ${t.heading ?? ""}`), P.set_text(m, P.get(l)), P.set_text(g, P.get(u));
401
- }), P.append(e, r);
400
+ P.set_class(a, 1, `w-16 h-16 rounded-full flex items-center justify-center mb-4 ${P.get(c) ? "bg-accent-danger/10 text-accent-danger" : "bg-accent-warning/10 text-accent-warning"}`), P.set_class(p, 1, `mb-2 ${e.heading ?? ""}`), P.set_text(m, P.get(l)), P.set_text(ee, P.get(u));
401
+ }), P.append(t, r);
402
402
  },
403
403
  $$slots: { default: !0 }
404
404
  });
405
405
  var f = P.sibling(s, 2);
406
- O(f, {
406
+ A(f, {
407
407
  children: (e, t) => {
408
- m(e, {
408
+ h(e, {
409
409
  size: "full",
410
410
  variant: "default",
411
411
  get onclick() {
@@ -423,22 +423,22 @@ function je(e, n) {
423
423
  });
424
424
  },
425
425
  $$slots: { default: !0 }
426
- }), P.append(e, r);
426
+ }), P.append(t, r);
427
427
  },
428
428
  $$slots: { default: !0 }
429
- }), P.append(e, r);
429
+ }), P.append(t, r);
430
430
  },
431
431
  $$slots: { default: !0 }
432
432
  }), P.pop();
433
433
  }
434
434
  //#endregion
435
435
  //#region src/components/Views/Checkout.svelte
436
- var $ = n("Checkout"), Me = P.from_html("<div class=\"p-8 text-center\"><p class=\"text-accent-danger\"> </p></div>"), Ne = P.from_html("<div class=\"p-8 text-center\"><p class=\"tone-muted\"> </p></div>"), Pe = P.from_html("<!> <!>", 1);
437
- function Fe(e, t) {
436
+ var $ = t("Checkout"), Pe = P.from_html("<div class=\"p-8 text-center\"><p class=\"text-accent-danger\"> </p></div>"), Fe = P.from_html("<div class=\"p-8 text-center\"><p class=\"tone-muted\"> </p></div>"), Ie = P.from_html("<!> <!>", 1);
437
+ function Le(e, t) {
438
438
  P.push(t, !0);
439
439
  let n = P.prop(t, "availableTickets", 23, () => []);
440
440
  P.prop(t, "value", 3, "");
441
- let r = P.prop(t, "venueId", 3, ""), i = P.prop(t, "organizationId", 3, ""), a = P.prop(t, "onNavigateBack", 3, void 0), o = P.prop(t, "initialError", 3, void 0), s = P.prop(t, "widgetId", 3, null), u = P.prop(t, "labels", 3, g), d = P.prop(t, "locale", 3, void 0);
441
+ let r = P.prop(t, "venueId", 3, ""), i = P.prop(t, "organizationId", 3, ""), a = P.prop(t, "onNavigateBack", 3, void 0), o = P.prop(t, "initialError", 3, void 0), c = P.prop(t, "widgetId", 3, null), u = P.prop(t, "labels", 3, _), d = P.prop(t, "locale", 3, void 0);
442
442
  function f(e) {
443
443
  if (!e) return {};
444
444
  let t = { ...e.venue ?? {} };
@@ -452,9 +452,9 @@ function Fe(e, t) {
452
452
  }
453
453
  let p = P.derived(() => (t.data || {}).id);
454
454
  P.derived(() => (t.data || {}).orgSlug);
455
- let m = P.derived(() => (t.data || {}).slug), y = P.derived(() => (t.data || {}).event), w = P.derived(() => ie(f(P.get(y)))), T = P.derived(() => P.get(y) ? {
456
- ...ae(P.get(y)),
457
- ...P.get(w)
455
+ let h = P.derived(() => (t.data || {}).slug), S = P.derived(() => (t.data || {}).event), te = P.derived(() => ae(f(P.get(S)))), D = P.derived(() => P.get(S) ? {
456
+ ...oe(P.get(S)),
457
+ ...P.get(te)
458
458
  } : t.data && (t.data.id || P.get(p)) ? {
459
459
  id: t.data.id || P.get(p),
460
460
  eventID: t.data.id || P.get(p),
@@ -463,27 +463,27 @@ function Fe(e, t) {
463
463
  eventTicketingType: 0,
464
464
  ticketType: 0,
465
465
  availableTickets: []
466
- } : null), E = P.state(""), D = P.state(P.proxy({})), O = P.state(P.proxy({})), k = P.state(P.proxy([])), A = P.state(""), F = P.state(0), I = P.state(!1), ge = P.state(!1), L = P.state(!1), R = P.state(null), z = P.state(""), B = P.state(void 0), V = P.state(null), H = P.state(""), _e = P.state(!1), ve = P.state(""), U = P.state(null), W = P.derived(() => P.get(U) !== null), G = P.state(null), K = P.state(null), q = null, ye = P.state(!1);
467
- function J() {
466
+ } : null), O = P.state(""), k = P.state(P.proxy({})), A = P.state(P.proxy({})), ne = P.state(P.proxy({})), j = P.state(P.proxy([])), F = P.state(""), I = P.state(0), L = P.state(!1), ve = P.state(!1), R = P.state(!1), z = P.state(null), B = P.state(""), V = P.state(void 0), H = P.state(null), U = P.state(""), ye = P.state(!1), be = P.state(""), W = P.state(null), G = P.derived(() => P.get(W) !== null), K = P.state(null), q = P.state(null), J = null, xe = P.state(!1);
467
+ function Se() {
468
468
  return {
469
- value: q?.total ?? null,
470
- currency: q?.currency || "USD"
469
+ value: J?.total ?? null,
470
+ currency: J?.currency || "USD"
471
471
  };
472
472
  }
473
- he(async () => {
474
- if (P.set(E, N(ce) || N(pe.CHECKOUT_CARTID), !0), !P.get(E)) {
475
- P.set(_e, !0), P.set(ve, u().noCheckoutSession || "No checkout session found. Please select tickets first", !0);
473
+ _e(async () => {
474
+ if (P.set(O, N(ce) || N(he.CHECKOUT_CARTID), !0), !P.get(O)) {
475
+ P.set(ye, !0), P.set(be, u().noCheckoutSession || "No checkout session found. Please select tickets first", !0);
476
476
  return;
477
477
  }
478
- te(P.get(T)?.eventID || P.get(T)?.id || P.get(p), s(), r() || P.get(T)?.venueID || P.get(T)?.venueId || null);
479
- let e = P.get(T)?.eventID || P.get(T)?.id || P.get(p);
478
+ y(P.get(D)?.eventID || P.get(D)?.id || P.get(p), c(), r() || P.get(D)?.venueID || P.get(D)?.venueId || null);
479
+ let e = P.get(D)?.eventID || P.get(D)?.id || P.get(p);
480
480
  try {
481
- let t = se(e);
482
- P.set(D, t.quantities || {}, !0), P.set(O, t.donationAmounts || {}, !0), P.set(A, t.promocode || "", !0), P.set(F, t.promoDiscountAmount || 0, !0), P.set(k, t.tickets || [], !0);
481
+ let t = M(e);
482
+ P.set(k, t.quantities || {}, !0), P.set(A, t.donationAmounts || {}, !0), P.set(ne, t.addOnQuantities || {}, !0), P.set(F, t.promocode || "", !0), P.set(I, t.promoDiscountAmount || 0, !0), P.set(j, t.tickets || [], !0);
483
483
  } catch (e) {
484
- $.error("Error loading checkout state:", e), P.set(D, {}, !0), P.set(k, [], !0);
484
+ $.error("Error loading checkout state:", e), P.set(k, {}, !0), P.set(ne, {}, !0), P.set(j, [], !0);
485
485
  }
486
- P.get(k).length > 0 && P.get(T) && (P.get(T).availableTickets = P.get(k), n(P.get(k)));
486
+ P.get(j).length > 0 && P.get(D) && (P.get(D).availableTickets = P.get(j), n(P.get(j)));
487
487
  let t = {
488
488
  serviceFeeCents: 0,
489
489
  serviceFeePercentage: 0,
@@ -493,7 +493,7 @@ function Fe(e, t) {
493
493
  taxPercentage: 0
494
494
  };
495
495
  try {
496
- let e = await j(P.get(T)?.venueID || P.get(T)?.venueId || r());
496
+ let e = await le(P.get(D)?.venueID || P.get(D)?.venueId || r());
497
497
  t = {
498
498
  serviceFeeCents: Number(e?.serviceFeeCents == null ? 0 : e.serviceFeeCents),
499
499
  serviceFeePercentage: Number(e?.serviceFeePercentage ?? 0),
@@ -505,20 +505,20 @@ function Fe(e, t) {
505
505
  } catch (e) {
506
506
  $.error("Error fetching venue data:", e);
507
507
  }
508
- let i = xe(P.get(D), P.get(k), t);
509
- Object.keys(P.get(D)).length > 0 && await X();
508
+ let i = [...Q(P.get(k), P.get(j), t), ...Te(P.get(ne), P.get(D)?.addOns)];
509
+ Object.keys(P.get(k)).length > 0 && await X();
510
510
  let a = 900, l = "";
511
- if (P.get(E)) {
512
- let e = oe(P.get(E));
511
+ if (P.get(O)) {
512
+ let e = se(P.get(O));
513
513
  if (e) {
514
514
  let t = Math.max(0, Math.floor((e - Date.now()) / 1e3));
515
515
  t > 0 && (a = t);
516
516
  }
517
517
  try {
518
- let e = await _(P.get(E));
518
+ let e = await b(P.get(O));
519
519
  if (!e.error && e.expiresAt) {
520
- let t = ee(e.expiresAt).getTime();
521
- a = Math.max(0, Math.floor((t - Date.now()) / 1e3)), l = e.expiresAt, le(P.get(E), t);
520
+ let t = v(e.expiresAt).getTime();
521
+ a = Math.max(0, Math.floor((t - Date.now()) / 1e3)), l = e.expiresAt, ue(P.get(O), t);
522
522
  }
523
523
  } catch {}
524
524
  }
@@ -529,22 +529,22 @@ function Fe(e, t) {
529
529
  } catch {
530
530
  f = [];
531
531
  }
532
- let m = c(i.filter((e) => ue(f, e.ticketId)).reduce((e, t) => e + (t.subtotal == null ? 0 : t.subtotal), 0)), h = M(m, P.get(F), d);
533
- if (P.set(K, {
534
- event: be(P.get(T), t),
532
+ let m = s(i.filter((e) => fe(f, e.ticketId)).reduce((e, t) => e + (t.subtotal == null ? 0 : t.subtotal), 0)), h = de(m, P.get(I), d);
533
+ if (P.set(q, {
534
+ event: Ce(P.get(D), t),
535
535
  lines: i,
536
536
  timerStart: a,
537
537
  ...l ? { deadlineAt: l } : {},
538
- promoApplied: !!P.get(A),
538
+ promoApplied: !!P.get(F),
539
539
  promoDiscount: h,
540
540
  forceExpired: !1,
541
- ...q ? { serverTotals: q } : {}
541
+ ...J ? { serverTotals: J } : {}
542
542
  }, !0), o()) {
543
543
  let e = Z(typeof o() == "object" ? o() : {
544
544
  code: "card_declined",
545
545
  message: "Your card was declined. Please try a different payment method."
546
546
  }, u());
547
- P.set(V, {
547
+ P.set(H, {
548
548
  message: e.message,
549
549
  suggestion: e.suggestion
550
550
  }, !0);
@@ -553,65 +553,65 @@ function Fe(e, t) {
553
553
  let Y = 0;
554
554
  async function X() {
555
555
  let e = ++Y;
556
- if (!P.get(E)) {
556
+ if (!P.get(O)) {
557
557
  $.error("Missing cartId!");
558
558
  return;
559
559
  }
560
- let t = Object.fromEntries(Object.entries(P.get(D)).filter(([e, t]) => t > 0));
560
+ let t = Object.fromEntries(Object.entries(P.get(k)).filter(([e, t]) => t > 0));
561
561
  try {
562
- let n = Object.fromEntries(Object.entries(P.get(O)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))]));
563
- if (P.get(A)) {
564
- let t = await re(P.get(E), P.get(A));
562
+ let n = Object.fromEntries(Object.entries(P.get(A)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))]));
563
+ if (P.get(F)) {
564
+ let t = await ie(P.get(O), P.get(F));
565
565
  if (e !== Y) return;
566
- t.success ? P.set(H, "") : ($.error("Failed to apply promo code to cart:", t.error), P.set(H, (u().promoCodeNotApplied || "We couldn't apply promo code {code}. It isn't included in this total — go back to re-enter it, or continue at the full price").replace("{code}", P.get(A)), !0));
566
+ t.success ? P.set(U, "") : ($.error("Failed to apply promo code to cart:", t.error), P.set(U, (u().promoCodeNotApplied || "We couldn't apply promo code {code}. It isn't included in this total — go back to re-enter it, or continue at the full price").replace("{code}", P.get(F)), !0));
567
567
  }
568
- let r = await x(P.get(E), t, Object.keys(n).length > 0 ? n : void 0, void 0, d());
568
+ let r = await w(P.get(O), t, Object.keys(n).length > 0 ? n : void 0, void 0, d());
569
569
  if (e !== Y) return;
570
570
  if (!r) {
571
- P.set(V, { message: u().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again" }, !0);
571
+ P.set(H, { message: u().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again" }, !0);
572
572
  return;
573
573
  }
574
- P.set(ye, !1), q = C(r), P.get(K) && P.set(K, {
575
- ...P.get(K),
576
- serverTotals: q
574
+ P.set(xe, !1), J = E(r), P.get(q) && P.set(q, {
575
+ ...P.get(q),
576
+ serverTotals: J
577
577
  }, !0);
578
578
  let i = r;
579
579
  if (i.requires_stripe === !1 || i.payment_type === "free") {
580
- P.set(z, "free");
580
+ P.set(B, "free");
581
581
  return;
582
582
  }
583
- P.set(ye, q === null);
583
+ P.set(xe, J === null);
584
584
  let a = r.stripe_publishable_key;
585
585
  if (!a) {
586
- $.error("No Stripe publishable key in payment intent response"), P.set(V, { message: u().paymentConfigError || "Payment configuration error. Please try again" }, !0);
586
+ $.error("No Stripe publishable key in payment intent response"), P.set(H, { message: u().paymentConfigError || "Payment configuration error. Please try again" }, !0);
587
587
  return;
588
588
  }
589
- let o = await Se(a);
589
+ let o = await we(a);
590
590
  if (e !== Y) return;
591
- P.set(R, o, !0), r.client_secret ? P.set(z, r.client_secret, !0) : P.set(V, { message: u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
591
+ P.set(z, o, !0), r.client_secret ? P.set(B, r.client_secret, !0) : P.set(H, { message: u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
592
592
  } catch (t) {
593
593
  if ($.error("Failed to initialize Stripe payment:", t), e !== Y) return;
594
- P.set(V, { message: t.message || u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
594
+ P.set(H, { message: t.message || u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
595
595
  }
596
596
  }
597
- function be(e, t) {
597
+ function Ce(e, t) {
598
598
  return e ? {
599
599
  id: e.id || e.eventID,
600
600
  title: e.name || e.title || "",
601
- slug: e.slug || P.get(m) || "",
601
+ slug: e.slug || P.get(h) || "",
602
602
  description: e.description || "",
603
603
  date: e.date || "",
604
604
  startDateTime: e.startDateTime || "",
605
605
  endDateTime: e.endDateTime || "",
606
606
  doorsOpenTime: e.doorsOpenTime || "",
607
- timezone: e.timeZone || e.timezone || h(),
607
+ timezone: e.timeZone || e.timezone || g(),
608
608
  imageUrl: e.imageUrl || e.image || "",
609
- ...P.get(w),
609
+ ...P.get(te),
610
610
  venue: {
611
611
  id: e.venueID || e.venueId || 0,
612
612
  name: e.venueName || "",
613
613
  address: e.venueAddress || "",
614
- timezone: e.timeZone || e.timezone || h(),
614
+ timezone: e.timeZone || e.timezone || g(),
615
615
  serviceFeePercentage: t.serviceFeePercentage,
616
616
  serviceFeeCents: t.serviceFeeCents,
617
617
  taxPercentage: t.taxPercentage,
@@ -620,6 +620,7 @@ function Fe(e, t) {
620
620
  absorbServiceFee: t.absorbServiceFee
621
621
  },
622
622
  performers: e.performers || [],
623
+ addOns: e.addOns || [],
623
624
  tickets: (e.availableTickets || []).map((e) => ({
624
625
  id: e.ID || e.id,
625
626
  name: e.name || "",
@@ -642,14 +643,14 @@ function Fe(e, t) {
642
643
  totalTicketsCapacity: 100
643
644
  } : null;
644
645
  }
645
- function xe(e, t, n) {
646
+ function Q(e, t, n) {
646
647
  let r = [];
647
648
  for (let [i, a] of Object.entries(e)) {
648
649
  if (a <= 0) continue;
649
650
  let e = t.find((e) => String(e.ID) === i || String(e.id) === i);
650
651
  if (!e) continue;
651
- let o = e.type === 2, s = e.price;
652
- if (!o && (s == null || !Number.isFinite(s))) {
652
+ let o = e.type === 2, c = e.price;
653
+ if (!o && (c == null || !Number.isFinite(c))) {
653
654
  r.push({
654
655
  ticketId: parseInt(i),
655
656
  ticketName: e.name || "",
@@ -661,75 +662,96 @@ function Fe(e, t) {
661
662
  });
662
663
  continue;
663
664
  }
664
- let l = s ?? 0, u = de(l, n, o);
665
+ let l = c ?? 0, u = pe(l, n, o);
665
666
  r.push({
666
667
  ticketId: parseInt(i),
667
668
  ticketName: e.name || "",
668
669
  quantity: a,
669
670
  unitPrice: l,
670
671
  fee: u,
671
- subtotal: c(l * a),
672
+ subtotal: s(l * a),
672
673
  isDonation: o
673
674
  });
674
675
  }
675
676
  return r;
676
677
  }
677
- let Q = P.derived(() => Object.values(P.get(O)).some((e) => (Number(e) || 0) > 0)), Ce = P.derived(() => !P.get(Q) && (!P.get(K) || P.get(K).lines.every((e) => e.unitPrice === 0)));
678
- async function we(e) {
679
- if (!P.get(I)) {
680
- P.set(I, !0), P.set(V, null);
678
+ function Te(e, t) {
679
+ let n = t || [], r = [];
680
+ for (let [t, i] of Object.entries(e || {})) {
681
+ if (!(i > 0)) continue;
682
+ let e = n.find((e) => String(e.id) === String(t));
683
+ if (!e) continue;
684
+ let a = ee(m(Number(e.priceCents) || 0));
685
+ r.push({
686
+ ticketId: parseInt(t, 10),
687
+ lineKey: `a:${t}`,
688
+ kind: "addon",
689
+ ticketName: e.name || "",
690
+ quantity: i,
691
+ unitPrice: a,
692
+ fee: 0,
693
+ subtotal: s(a * i),
694
+ isDonation: !1
695
+ });
696
+ }
697
+ return r;
698
+ }
699
+ let Ee = P.derived(() => Object.values(P.get(A)).some((e) => (Number(e) || 0) > 0)), De = P.derived(() => !P.get(Ee) && (!P.get(q) || P.get(q).lines.every((e) => e.unitPrice === 0)));
700
+ async function Oe(e) {
701
+ if (!P.get(L)) {
702
+ P.set(L, !0), P.set(H, null);
681
703
  try {
682
- if (P.get(L)) {
683
- P.set(V, { message: u().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0);
704
+ if (P.get(R)) {
705
+ P.set(H, { message: u().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0);
684
706
  return;
685
707
  }
686
- if (P.get(G) && !P.get(G).requiresStripe) {
687
- await Te(e);
708
+ if (P.get(K) && !P.get(K).requiresStripe) {
709
+ await ke(e);
688
710
  return;
689
711
  }
690
- if (P.get(Ce) || P.get(z) === "free" || q?.total === 0) {
691
- await Ee(e);
712
+ if (P.get(De) || P.get(B) === "free" || J?.total === 0) {
713
+ await je(e);
692
714
  return;
693
715
  }
694
- if (!P.get(B)) {
695
- P.set(V, {
716
+ if (!P.get(V)) {
717
+ P.set(H, {
696
718
  message: u().paymentFormNotReady || "Payment form is not ready. Please wait a moment and try again",
697
719
  blocking: !0
698
- }, !0), P.set(I, !1);
720
+ }, !0), P.set(L, !1);
699
721
  return;
700
722
  }
701
- if (!P.get(R)) {
702
- P.set(V, {
723
+ if (!P.get(z)) {
724
+ P.set(H, {
703
725
  message: u().paymentSystemNotInitialized || "Payment system is not initialized. Please refresh the page",
704
726
  blocking: !0
705
- }, !0), P.set(I, !1);
727
+ }, !0), P.set(L, !1);
706
728
  return;
707
729
  }
708
- let { error: n } = await P.get(B).submit();
730
+ let { error: n } = await P.get(V).submit();
709
731
  if (n) {
710
732
  let e = Z(n, u());
711
- P.set(V, {
733
+ P.set(H, {
712
734
  message: e.message,
713
735
  suggestion: e.suggestion
714
- }, !0), P.set(I, !1);
736
+ }, !0), P.set(L, !1);
715
737
  return;
716
738
  }
717
- let a = await P.get(R).confirmPayment({
718
- elements: P.get(B),
739
+ let a = await P.get(z).confirmPayment({
740
+ elements: P.get(V),
719
741
  redirect: "if_required"
720
742
  });
721
743
  if (a.error) {
722
744
  let e = Z(a.error, u());
723
- P.set(V, {
745
+ P.set(H, {
724
746
  message: e.message,
725
747
  suggestion: e.suggestion
726
- }, !0), P.set(I, !1);
748
+ }, !0), P.set(L, !1);
727
749
  return;
728
750
  }
729
751
  let o = {
730
- id: P.get(E),
752
+ id: P.get(O),
731
753
  paymentIntentId: a.paymentIntent.id,
732
- tickets: P.get(D),
754
+ tickets: P.get(k),
733
755
  firstName: e.firstName,
734
756
  lastName: e.lastName,
735
757
  email: e.email,
@@ -738,38 +760,38 @@ function Fe(e, t) {
738
760
  paymentMethod: "credit-card",
739
761
  mailingList: e.keepMeUpdated,
740
762
  saleType: "online"
741
- }, s = await b(P.get(E), o, d());
763
+ }, s = await C(P.get(O), o, d());
742
764
  if (s?.eventCanceled || s?.eventPostponed) {
743
- P.set(U, s.eventCanceled ? "canceled" : "postponed", !0), P.set(V, null);
765
+ P.set(W, s.eventCanceled ? "canceled" : "postponed", !0), P.set(H, null);
744
766
  return;
745
767
  }
746
768
  if (s?.status === "Payment succeeded") {
747
- me(P.get(E), e.email);
769
+ ge(P.get(O), e.email);
748
770
  let n = {
749
- orderId: P.get(E),
750
- eventId: P.get(T)?.id || P.get(T)?.eventID || null,
751
- event: P.get(T) || null,
752
- venueId: r() || P.get(T)?.venueId || null,
753
- organizationId: i() || P.get(T)?.organizationId || null,
754
- ...J()
771
+ orderId: P.get(O),
772
+ eventId: P.get(D)?.id || P.get(D)?.eventID || null,
773
+ event: P.get(D) || null,
774
+ venueId: r() || P.get(D)?.venueId || null,
775
+ organizationId: i() || P.get(D)?.organizationId || null,
776
+ ...Se()
755
777
  };
756
778
  t.onNavigateToSuccess && t.onNavigateToSuccess(n);
757
- } else s?.status === "Payment amount does not match the total price" ? P.set(V, { message: u().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again" }, !0) : P.set(V, { message: u().paymentValidationFailed || "Payment validation failed. Please try again" }, !0);
779
+ } else s?.status === "Payment amount does not match the total price" ? P.set(H, { message: u().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again" }, !0) : P.set(H, { message: u().paymentValidationFailed || "Payment validation failed. Please try again" }, !0);
758
780
  } catch (e) {
759
781
  $.error("Payment execution error:", e);
760
782
  let t = Z(e, u());
761
- P.set(V, {
783
+ P.set(H, {
762
784
  message: t.message,
763
785
  suggestion: t.suggestion
764
786
  }, !0);
765
787
  } finally {
766
- P.set(I, !1);
788
+ P.set(L, !1);
767
789
  }
768
790
  }
769
791
  }
770
- async function Te(e) {
792
+ async function ke(e) {
771
793
  try {
772
- let n = await ne(P.get(E), {
794
+ let n = await re(P.get(O), {
773
795
  firstName: e.firstName,
774
796
  lastName: e.lastName,
775
797
  email: e.email,
@@ -778,32 +800,32 @@ function Fe(e, t) {
778
800
  mailingList: e.keepMeUpdated
779
801
  }, d());
780
802
  if (n?.success) {
781
- me(n.orderId || P.get(E), e.email);
803
+ ge(n.orderId || P.get(O), e.email);
782
804
  let a = {
783
- orderId: n.orderId || P.get(E),
784
- eventId: P.get(T)?.id || P.get(T)?.eventID || null,
785
- event: P.get(T) || null,
786
- venueId: r() || P.get(T)?.venueId || null,
787
- organizationId: i() || P.get(T)?.organizationId || null,
805
+ orderId: n.orderId || P.get(O),
806
+ eventId: P.get(D)?.id || P.get(D)?.eventID || null,
807
+ event: P.get(D) || null,
808
+ venueId: r() || P.get(D)?.venueId || null,
809
+ organizationId: i() || P.get(D)?.organizationId || null,
788
810
  paymentType: "gift_card_only",
789
- ...J()
811
+ ...Se()
790
812
  };
791
813
  t.onNavigateToSuccess && t.onNavigateToSuccess(a);
792
- } else P.set(V, { message: n?.error || u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
814
+ } else P.set(H, { message: n?.error || u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
793
815
  } catch (e) {
794
816
  $.error("Gift card payment error:", e);
795
817
  let t = Z(e, u());
796
- P.set(V, {
818
+ P.set(H, {
797
819
  message: t.message,
798
820
  suggestion: t.suggestion
799
821
  }, !0);
800
822
  } finally {
801
- P.set(I, !1);
823
+ P.set(L, !1);
802
824
  }
803
825
  }
804
- async function Ee(e) {
826
+ async function je(e) {
805
827
  try {
806
- let n = Object.fromEntries(Object.entries(P.get(D)).filter(([e, t]) => t > 0)), a = Object.fromEntries(Object.entries(P.get(O)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])), o = await x(P.get(E), n, Object.keys(a).length > 0 ? a : void 0, {
828
+ let n = Object.fromEntries(Object.entries(P.get(k)).filter(([e, t]) => t > 0)), a = Object.fromEntries(Object.entries(P.get(A)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])), o = await w(P.get(O), n, Object.keys(a).length > 0 ? a : void 0, {
807
829
  firstName: e.firstName,
808
830
  lastName: e.lastName,
809
831
  email: e.email,
@@ -812,71 +834,71 @@ function Fe(e, t) {
812
834
  mailingList: e.keepMeUpdated
813
835
  }, d());
814
836
  if (o?.requires_stripe !== !1 && o?.payment_type !== "free" || o?.order_finalized === !1) {
815
- P.set(V, { message: u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
837
+ P.set(H, { message: u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
816
838
  return;
817
839
  }
818
- P.set(z, "free"), me(P.get(E), e.email);
840
+ P.set(B, "free"), ge(P.get(O), e.email);
819
841
  let s = {
820
- orderId: P.get(E),
821
- eventId: P.get(T)?.id || P.get(T)?.eventID || null,
822
- event: P.get(T) || null,
823
- venueId: r() || P.get(T)?.venueId || null,
824
- organizationId: i() || P.get(T)?.organizationId || null,
842
+ orderId: P.get(O),
843
+ eventId: P.get(D)?.id || P.get(D)?.eventID || null,
844
+ event: P.get(D) || null,
845
+ venueId: r() || P.get(D)?.venueId || null,
846
+ organizationId: i() || P.get(D)?.organizationId || null,
825
847
  paymentType: "free",
826
- ...J()
848
+ ...Se()
827
849
  };
828
850
  t.onNavigateToSuccess && t.onNavigateToSuccess(s);
829
851
  } catch (e) {
830
852
  $.error("Free order completion error:", e);
831
853
  let t = Z(e, u());
832
- P.set(V, {
854
+ P.set(H, {
833
855
  message: t.message,
834
856
  suggestion: t.suggestion
835
857
  }, !0);
836
858
  } finally {
837
- P.set(I, !1);
859
+ P.set(L, !1);
838
860
  }
839
861
  }
840
- async function De(e) {
841
- if (P.set(G, e, !0), P.get(K) && q && P.set(K, {
842
- ...P.get(K),
843
- serverTotals: S(q, e)
844
- }, !0), !e.requiresStripe) Y++, P.set(B, void 0), P.set(R, null), P.set(z, "");
845
- else if (P.get(E) && Object.keys(P.get(D)).length > 0) {
846
- P.set(L, !0);
862
+ async function Me(e) {
863
+ if (P.set(K, e, !0), P.get(q) && J && P.set(q, {
864
+ ...P.get(q),
865
+ serverTotals: T(J, e)
866
+ }, !0), !e.requiresStripe) Y++, P.set(V, void 0), P.set(z, null), P.set(B, "");
867
+ else if (P.get(O) && Object.keys(P.get(k)).length > 0) {
868
+ P.set(R, !0);
847
869
  try {
848
870
  await X();
849
871
  } finally {
850
- P.set(L, !1);
872
+ P.set(R, !1);
851
873
  }
852
874
  }
853
875
  }
854
- async function ke() {
855
- if (P.set(G, null), P.get(K) && q && P.set(K, {
856
- ...P.get(K),
857
- serverTotals: q
858
- }, !0), P.get(E) && Object.keys(P.get(D)).length > 0) {
859
- P.set(L, !0);
876
+ async function Le() {
877
+ if (P.set(K, null), P.get(q) && J && P.set(q, {
878
+ ...P.get(q),
879
+ serverTotals: J
880
+ }, !0), P.get(O) && Object.keys(P.get(k)).length > 0) {
881
+ P.set(R, !0);
860
882
  try {
861
883
  await X();
862
884
  } finally {
863
- P.set(L, !1);
885
+ P.set(R, !1);
864
886
  }
865
887
  }
866
888
  }
867
- function Ae() {
889
+ function Re() {
868
890
  a() ? a()() : window.history.back();
869
891
  }
870
- function Fe() {
892
+ function ze() {
871
893
  a() ? a()() : window.history.back();
872
894
  }
873
- function Ie() {
874
- P.set(U, null), Ae();
895
+ function Be() {
896
+ P.set(W, null), Re();
875
897
  }
876
- async function Le() {
877
- if (!P.get(E)) return null;
898
+ async function Ve() {
899
+ if (!P.get(O)) return null;
878
900
  try {
879
- let e = await v(P.get(E));
901
+ let e = await x(P.get(O));
880
902
  return e.success ? {
881
903
  newExpiryTime: e.newExpiryTime,
882
904
  remainingExtensions: e.remainingExtensions
@@ -885,17 +907,17 @@ function Fe(e, t) {
885
907
  return $.error("Error extending checkout session:", e), null;
886
908
  }
887
909
  }
888
- var Re = Pe(), ze = P.first_child(Re), Be = (e) => {
910
+ var He = Ie(), Ue = P.first_child(He), We = (e) => {
889
911
  {
890
912
  let t = (e) => {
891
913
  {
892
- let t = P.derived(() => P.get(I) || P.get(L)), n = P.derived(() => P.get(K)?.serverTotals?.total ?? 0), r = P.derived(() => P.get(K)?.serverTotals?.giftCardAmount ?? null);
893
- Oe(e, {
914
+ let t = P.derived(() => P.get(L) || P.get(R)), n = P.derived(() => P.get(q)?.serverTotals?.total ?? 0), r = P.derived(() => P.get(q)?.serverTotals?.giftCardAmount ?? null);
915
+ Ae(e, {
894
916
  get cartId() {
895
- return P.get(E);
917
+ return P.get(O);
896
918
  },
897
- onApplied: De,
898
- onRemoved: ke,
919
+ onApplied: Me,
920
+ onRemoved: Le,
899
921
  get disabled() {
900
922
  return P.get(t);
901
923
  },
@@ -910,23 +932,23 @@ function Fe(e, t) {
910
932
  }
911
933
  });
912
934
  }
913
- }, n = P.derived(() => P.get(V) ?? (P.get(H) ? { message: P.get(H) } : null));
914
- fe(e, {
935
+ }, n = P.derived(() => P.get(H) ?? (P.get(U) ? { message: P.get(U) } : null));
936
+ me(e, {
915
937
  get config() {
916
- return P.get(K);
938
+ return P.get(q);
917
939
  },
918
- onPlaceOrder: we,
919
- onBack: Ae,
920
- onRetryExpired: Fe,
921
- onExtendSession: Le,
940
+ onPlaceOrder: Oe,
941
+ onBack: Re,
942
+ onRetryExpired: ze,
943
+ onExtendSession: Ve,
922
944
  get stripe() {
923
- return P.get(R);
945
+ return P.get(z);
924
946
  },
925
947
  get paymentIntent() {
926
- return P.get(z);
948
+ return P.get(B);
927
949
  },
928
950
  get serverTotalsUnavailable() {
929
- return P.get(ye);
951
+ return P.get(xe);
930
952
  },
931
953
  get paymentError() {
932
954
  return P.get(n);
@@ -938,46 +960,46 @@ function Fe(e, t) {
938
960
  return d();
939
961
  },
940
962
  get elements() {
941
- return P.get(B);
963
+ return P.get(V);
942
964
  },
943
965
  set elements(e) {
944
- P.set(B, e, !0);
966
+ P.set(V, e, !0);
945
967
  },
946
968
  get eventEnded() {
947
- return P.get(ge);
969
+ return P.get(ve);
948
970
  },
949
971
  set eventEnded(e) {
950
- P.set(ge, e, !0);
972
+ P.set(ve, e, !0);
951
973
  },
952
974
  giftCard: t,
953
975
  $$slots: { giftCard: !0 }
954
976
  });
955
977
  }
956
- }, Ve = (e) => {
957
- var t = Me(), n = P.child(t), r = P.child(n, !0);
958
- P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, P.get(ve))), P.append(e, t);
959
- }, He = (e) => {
960
- var t = Ne(), n = P.child(t), r = P.child(n, !0);
978
+ }, Ge = (e) => {
979
+ var t = Pe(), n = P.child(t), r = P.child(n, !0);
980
+ P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, P.get(be))), P.append(e, t);
981
+ }, Ke = (e) => {
982
+ var t = Fe(), n = P.child(t), r = P.child(n, !0);
961
983
  P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, u().loadingSecurePaymentForm || "Loading secure payment form...")), P.append(e, t);
962
984
  };
963
- P.if(ze, (e) => {
964
- P.get(K) ? e(Be) : P.get(_e) ? e(Ve, 1) : e(He, -1);
985
+ P.if(Ue, (e) => {
986
+ P.get(q) ? e(We) : P.get(ye) ? e(Ge, 1) : e(Ke, -1);
965
987
  });
966
- var Ue = P.sibling(ze, 2), We = (e) => {
967
- je(e, {
988
+ var qe = P.sibling(Ue, 2), Je = (e) => {
989
+ Ne(e, {
968
990
  open: !0,
969
991
  get reason() {
970
- return P.get(U);
992
+ return P.get(W);
971
993
  },
972
- onBackToEvents: Ie,
994
+ onBackToEvents: Be,
973
995
  get labels() {
974
996
  return u();
975
997
  }
976
998
  });
977
999
  };
978
- P.if(Ue, (e) => {
979
- P.get(W) && e(We);
980
- }), P.append(e, Re), P.pop();
1000
+ P.if(qe, (e) => {
1001
+ P.get(G) && e(Je);
1002
+ }), P.append(e, He), P.pop();
981
1003
  }
982
1004
  //#endregion
983
- export { Fe as default };
1005
+ export { Le as default };