@getmicdrop/venue-calendar 4.3.120 → 4.3.121

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 (114) hide show
  1. package/dist/{AddOnCard-BGFpF6uw.js → AddOnCard-jj59e855.js} +5 -5
  2. package/dist/{ArrowLeftIcon-pPaJkbnp.js → ArrowLeftIcon-t-CY0sbi.js} +1 -1
  3. package/dist/{BlockPlaceholder-BgLtwJnm.js → BlockPlaceholder-BmEZ68_q.js} +1 -1
  4. package/dist/{Calendar-DFPyzgRC.js → Calendar-hxcQBkTF.js} +3 -3
  5. package/dist/{CalendarFoundryView-BI_LlpB6.js → CalendarFoundryView-CSAKDe-F.js} +19 -19
  6. package/dist/{CalendarIcon-C_6MSRyE.js → CalendarIcon-B5JWs0gm.js} +1 -1
  7. package/dist/{CartView-9YSoRvTw.js → CartView-CF2y1JDa.js} +719 -716
  8. package/dist/{CheckIcon-sr8D0z-b.js → CheckIcon-BSwoGox7.js} +1 -1
  9. package/dist/{Checkout-BLkYIKoR.js → Checkout-2h2K3-bE.js} +378 -378
  10. package/dist/{Checkout-BS3r4Qii.js → Checkout-BFu5dTw_.js} +328 -328
  11. package/dist/{CheckoutTimer-DY1NKJXP.js → CheckoutTimer-Bpt5gPyA.js} +2 -2
  12. package/dist/{ChevronDownIcon-Co6rRQp-.js → ChevronDownIcon-CVZ0usBx.js} +1 -1
  13. package/dist/{CloseIcon-DpRE5O8y.js → CloseIcon-DUnvWXUY.js} +1 -1
  14. package/dist/CollectionView-XdNMvMtn.js +141 -0
  15. package/dist/{Event-DUq4tYBE.js → Event-B_9T21du.js} +684 -680
  16. package/dist/EventPage-BMnKpciU.js +1201 -0
  17. package/dist/{Input-CsHb9Z8e.js → Input-BXZmvQ0p.js} +1 -1
  18. package/dist/{LocationIcon-Dxk7snUC.js → LocationIcon-E-7CQh4E.js} +1 -1
  19. package/dist/{PasswordInput-BlL0w_yr.js → PasswordInput-DzXNIwRc.js} +1 -1
  20. package/dist/{RecommendationsRail-Dq9t0T02.js → RecommendationsRail-DrzM8h2r.js} +124 -124
  21. package/dist/{ScarcityBadge-Bj_YMxz4.js → ScarcityBadge-DjzrzvId.js} +4 -4
  22. package/dist/{SeriesPage-CaPTQRSo.js → SeriesPage-Ds_FEEZW.js} +2 -2
  23. package/dist/{Spinner-BgdjQygI.js → Spinner-B2rdbspc.js} +1 -1
  24. package/dist/{Success-tXgS0BXp.js → Success-Dkak0iM9.js} +201 -201
  25. package/dist/{TagIcon-Kq7_bapx.js → TagIcon-BY8tK_qA.js} +1 -1
  26. package/dist/ViewTicketsEmbed-B_fqalQh.js +660 -0
  27. package/dist/{WarningCircleIcon-BdbAYYi4.js → WarningCircleIcon-C5Lc7qkF.js} +1 -1
  28. package/dist/{WarningTriIcon-D8otatZe.js → WarningTriIcon-BM8qc9xx.js} +1 -1
  29. package/dist/api/api.cjs +1 -1
  30. package/dist/api/api.mjs +258 -252
  31. package/dist/api/cart-addons.d.ts +2 -1
  32. package/dist/api/checkout-availability.d.ts +2 -25
  33. package/dist/api/client.d.ts +4 -7
  34. package/dist/api/events.d.ts +23 -22
  35. package/dist/api/gift-cards.d.ts +7 -6
  36. package/dist/api/orders.d.ts +13 -12
  37. package/dist/api/promo.d.ts +5 -4
  38. package/dist/api/surge-queue.d.ts +5 -34
  39. package/dist/api/venues.d.ts +5 -4
  40. package/dist/api/waitlist.d.ts +5 -9
  41. package/dist/{api-DG7ztpYi.js → api-BEYkGabB.js} +174 -169
  42. package/dist/{copyToClipboard-DSangJpP.js → copyToClipboard-F-akSgaF.js} +1 -1
  43. package/dist/{createErrorGate.svelte-CEBpRAmr.js → createErrorGate.svelte-CEGaIQeI.js} +1 -1
  44. package/dist/{datetime-YTw6PkGP.js → datetime-BnKG6Hjm.js} +1 -1
  45. package/dist/{de-CbwqVvg6.js → de-BHcAXwnM.js} +0 -1
  46. package/dist/{defaultLabels-CsRGNP7f.js → defaultLabels-BbNEEsF7.js} +0 -1
  47. package/dist/{defaults-UDvnrGu0.js → defaults-CgsFJvJ2.js} +2 -2
  48. package/dist/{es-Dxqulvec.js → es-DZ3yceh-.js} +0 -1
  49. package/dist/{event-CW18bU9h.js → event-DfqUhl5j.js} +1 -1
  50. package/dist/{event-transform-CyRMeKW_.js → event-transform-Bk1IoYh5.js} +4 -4
  51. package/dist/{eventStatusStream-Cf7PaLka.js → eventStatusStream-CE0PwO0c.js} +9 -9
  52. package/dist/{fr-0aCE52FE.js → fr-Dyi163Vk.js} +0 -1
  53. package/dist/{href-yqxAPbkW.js → href-CfWGAmkP.js} +3 -3
  54. package/dist/i18n-B705OXZp.js +28 -0
  55. package/dist/{i18n-MF3q-UBI.js → i18n-BoMUWcCq.js} +4 -4
  56. package/dist/{id-7ClY2Dwb.js → id-DvFRZVAm.js} +0 -1
  57. package/dist/{it-z-heX6Hy.js → it-Bh05tcLv.js} +0 -1
  58. package/dist/{ja-ecBzr5l9.js → ja-CU4PQS4j.js} +0 -1
  59. package/dist/{ko-Blnq1Wc_.js → ko-DDk6EdWm.js} +0 -1
  60. package/dist/locales/4.3.121/main/de.js +1 -0
  61. package/dist/locales/4.3.121/main/es.js +1 -0
  62. package/dist/locales/4.3.121/main/fr.js +1 -0
  63. package/dist/locales/4.3.121/main/id.js +1 -0
  64. package/dist/locales/4.3.121/main/it.js +1 -0
  65. package/dist/locales/4.3.121/main/ja.js +1 -0
  66. package/dist/locales/4.3.121/main/ko.js +1 -0
  67. package/dist/locales/4.3.121/main/nl.js +1 -0
  68. package/dist/locales/4.3.121/main/pl.js +1 -0
  69. package/dist/locales/4.3.121/main/pt-br.js +1 -0
  70. package/dist/locales/4.3.121/main/tr.js +1 -0
  71. package/dist/locales/4.3.121/main/zh.js +1 -0
  72. package/dist/{nl-Bm2Lee3j.js → nl-DOSKYHSx.js} +0 -1
  73. package/dist/{pixels-BAPQbj_Y.js → pixels-Bu5-BISs.js} +8 -8
  74. package/dist/{pl-DIp-gYhF.js → pl-CkLEymA2.js} +0 -1
  75. package/dist/{pt-br-BmcVsgbQ.js → pt-br-BHuCQSM-.js} +0 -1
  76. package/dist/{serverTotals-D57U4Nju.js → serverTotals-B8SJCzxE.js} +1 -1
  77. package/dist/{showcase-state-options-zfQoPg37.js → showcase-state-options-KO_TYk3I.js} +1 -1
  78. package/dist/{to-event-card-props-Dn1eDOiJ.js → to-event-card-props-DYIfPN8e.js} +9 -13
  79. package/dist/{tr-BshxS2DN.js → tr-Bvc34ODh.js} +0 -1
  80. package/dist/{utils-CdNe7KGe.js → utils-NMx3aPDk.js} +82 -78
  81. package/dist/venue-calendar.es.js +1444 -1444
  82. package/dist/venue-calendar.iife.js +30 -30
  83. package/dist/venue-calendar.umd.js +39 -39
  84. package/dist/{orders-BWVwv3P0.js → widget-key-context-D2zj4sp5.js} +221 -213
  85. package/dist/{zh-B06ZsUNX.js → zh-K0hOzZ3G.js} +0 -1
  86. package/package.json +1 -1
  87. package/dist/CollectionView-DyFDlCmo.js +0 -138
  88. package/dist/EventPage-m5SlifRu.js +0 -1200
  89. package/dist/ViewTicketsEmbed-BnuypZ1H.js +0 -660
  90. package/dist/i18n-B-AwhAMH.js +0 -28
  91. package/dist/locales/4.3.120/main/de.js +0 -1
  92. package/dist/locales/4.3.120/main/es.js +0 -1
  93. package/dist/locales/4.3.120/main/fr.js +0 -1
  94. package/dist/locales/4.3.120/main/id.js +0 -1
  95. package/dist/locales/4.3.120/main/it.js +0 -1
  96. package/dist/locales/4.3.120/main/ja.js +0 -1
  97. package/dist/locales/4.3.120/main/ko.js +0 -1
  98. package/dist/locales/4.3.120/main/nl.js +0 -1
  99. package/dist/locales/4.3.120/main/pl.js +0 -1
  100. package/dist/locales/4.3.120/main/pt-br.js +0 -1
  101. package/dist/locales/4.3.120/main/tr.js +0 -1
  102. package/dist/locales/4.3.120/main/zh.js +0 -1
  103. /package/dist/locales/{4.3.120 → 4.3.121}/flow/de.js +0 -0
  104. /package/dist/locales/{4.3.120 → 4.3.121}/flow/es.js +0 -0
  105. /package/dist/locales/{4.3.120 → 4.3.121}/flow/fr.js +0 -0
  106. /package/dist/locales/{4.3.120 → 4.3.121}/flow/id.js +0 -0
  107. /package/dist/locales/{4.3.120 → 4.3.121}/flow/it.js +0 -0
  108. /package/dist/locales/{4.3.120 → 4.3.121}/flow/ja.js +0 -0
  109. /package/dist/locales/{4.3.120 → 4.3.121}/flow/ko.js +0 -0
  110. /package/dist/locales/{4.3.120 → 4.3.121}/flow/nl.js +0 -0
  111. /package/dist/locales/{4.3.120 → 4.3.121}/flow/pl.js +0 -0
  112. /package/dist/locales/{4.3.120 → 4.3.121}/flow/pt-br.js +0 -0
  113. /package/dist/locales/{4.3.120 → 4.3.121}/flow/tr.js +0 -0
  114. /package/dist/locales/{4.3.120 → 4.3.121}/flow/zh.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { g as e } from "./sizing-B7ixYndz.js";
2
- import { $ as t, F as n, M as r, P as i, Z as a, rt as o, tt as s, z as c } from "./orders-BWVwv3P0.js";
3
- import "./event-transform-CyRMeKW_.js";
2
+ import { $ as t, I as n, L as r, P as i, V as a, at as o, rt as s, tt as c } from "./widget-key-context-D2zj4sp5.js";
3
+ import "./event-transform-Bk1IoYh5.js";
4
4
  //#region node_modules/js-cookie/dist/js.cookie.mjs
5
5
  function l(e) {
6
6
  for (var t = 1; t < arguments.length; t++) {
@@ -82,19 +82,19 @@ function E() {
82
82
  };
83
83
  }
84
84
  function D(e) {
85
- let n = {}, r = {}, i = [], o = "", c = 0, l = {};
85
+ let n = {}, r = {}, i = [], a = "", o = 0, l = {};
86
86
  if (typeof window > "u") return {
87
87
  quantities: n,
88
88
  donationAmounts: r,
89
89
  addOnQuantities: l,
90
- promocode: o,
91
- promoDiscountAmount: c,
90
+ promocode: a,
91
+ promoDiscountAmount: o,
92
92
  tickets: i
93
93
  };
94
- let u = a(y(e), null);
94
+ let u = t(y(e), null);
95
95
  if (!u) {
96
- let n = a(b(e), null);
97
- n && (u = n, s(y(e), n), t(b(e)));
96
+ let n = t(b(e), null);
97
+ n && (u = n, s(y(e), n), c(b(e)));
98
98
  }
99
99
  if (u) return {
100
100
  quantities: u.quantities || {},
@@ -114,19 +114,19 @@ function D(e) {
114
114
  } catch (e) {
115
115
  g.warn("Failed to parse checkout tickets cookie:", e), i = [];
116
116
  }
117
- return o = m(`checkout-promocode-${e}`) || "", c = parseFloat(m(`checkout-promo-discount-${e}`) || "0"), (Object.keys(n).length > 0 || i.length > 0 || o) && (A({
117
+ return a = m(`checkout-promocode-${e}`) || "", o = parseFloat(m(`checkout-promo-discount-${e}`) || "0"), (Object.keys(n).length > 0 || i.length > 0 || a) && (A({
118
118
  eventID: e,
119
119
  quantities: n,
120
120
  donationAmounts: r,
121
- promocode: o,
122
- promoDiscountAmount: c,
121
+ promocode: a,
122
+ promoDiscountAmount: o,
123
123
  tickets: i
124
124
  }), O(e)), {
125
125
  quantities: n,
126
126
  donationAmounts: r,
127
127
  addOnQuantities: l,
128
- promocode: o,
129
- promoDiscountAmount: c,
128
+ promocode: a,
129
+ promoDiscountAmount: o,
130
130
  tickets: i
131
131
  };
132
132
  }
@@ -134,7 +134,7 @@ function O(e) {
134
134
  h(`checkout-quantities-${e}`), h(`checkout-tickets-${e}`), h(`checkout-promocode-${e}`), h(`checkout-promo-discount-${e}`);
135
135
  }
136
136
  function k(e) {
137
- t(y(e)), t(b(e)), O(e), h(`checkout-promo-discount-type-${e}`), h(`checkout-promo-reveal-${e}`), h(`checkout-promo-reveal-ids-${e}`), h(`checkout-promo-ticket-ids-${e}`);
137
+ c(y(e)), c(b(e)), O(e), h(`checkout-promo-discount-type-${e}`), h(`checkout-promo-reveal-${e}`), h(`checkout-promo-reveal-ids-${e}`), h(`checkout-promo-ticket-ids-${e}`);
138
138
  }
139
139
  function A({ eventID: e, quantities: t, donationAmounts: n, addOnQuantities: r, promocode: i, promoDiscountAmount: a, tickets: o }) {
140
140
  if (typeof window > "u") return;
@@ -158,18 +158,18 @@ function A({ eventID: e, quantities: t, donationAmounts: n, addOnQuantities: r,
158
158
  }
159
159
  function j(e) {
160
160
  if (!e) return null;
161
- let n = a(x(e), null);
161
+ let n = t(x(e), null);
162
162
  if (n != null) return P(n);
163
- let r = a(S(e), null);
163
+ let r = t(S(e), null);
164
164
  if (r == null) return null;
165
165
  let i = P(r);
166
- return i != null && (s(x(e), i), t(S(e))), i;
166
+ return i != null && (s(x(e), i), c(S(e))), i;
167
167
  }
168
168
  function M(e, t) {
169
169
  !e || !Number.isFinite(t) || s(x(e), t);
170
170
  }
171
171
  function N(e) {
172
- e && (t(x(e)), t(S(e)));
172
+ e && (c(x(e)), c(S(e)));
173
173
  }
174
174
  function P(e) {
175
175
  let t = typeof e == "number" ? e : parseInt(e, 10);
@@ -187,13 +187,13 @@ async function te(e) {
187
187
  }
188
188
  var F = (e) => _(`queue-token-${e}`);
189
189
  function I(e) {
190
- return a(F(e), null);
190
+ return t(F(e), null);
191
191
  }
192
192
  function L(e, t) {
193
193
  t && s(F(e), t);
194
194
  }
195
195
  function R(e) {
196
- t(F(e));
196
+ c(F(e));
197
197
  }
198
198
  //#endregion
199
199
  //#region src/lib/api/surge-queue.ts
@@ -227,36 +227,36 @@ function J(e) {
227
227
  expiresAt: typeof e?.expiresAt == "string" ? e.expiresAt : ""
228
228
  };
229
229
  }
230
- async function Y(e) {
230
+ async function Y(e, t) {
231
231
  try {
232
- let t = await i(`/events/${e}/queue`);
233
- return t.success ? {
234
- armed: t.data?.armed === !0,
235
- mode: G(t.data?.mode),
236
- waiting: W(t.data?.waiting),
237
- etaSeconds: W(t.data?.etaSeconds)
232
+ let r = await n(`/events/${e}/queue`, { widgetKey: t?.widgetKey });
233
+ return r.success ? {
234
+ armed: r.data?.armed === !0,
235
+ mode: G(r.data?.mode),
236
+ waiting: W(r.data?.waiting),
237
+ etaSeconds: W(r.data?.etaSeconds)
238
238
  } : V;
239
239
  } catch (e) {
240
240
  return z.error("getQueueState error:", e), V;
241
241
  }
242
242
  }
243
- async function X(e) {
243
+ async function X(e, t) {
244
244
  try {
245
- let t = await n(`/events/${e}/queue/join`, {});
246
- if (!t.success) return {
245
+ let n = await r(`/events/${e}/queue/join`, {}, { widgetKey: t?.widgetKey });
246
+ if (!n.success) return {
247
247
  success: !1,
248
- errorCode: t.errorCode || "queue_unavailable",
249
- statusCode: t.statusCode
248
+ errorCode: n.errorCode || "queue_unavailable",
249
+ statusCode: n.statusCode
250
250
  };
251
- let r = J(t.data);
252
- return r ? {
251
+ let i = J(n.data);
252
+ return i ? {
253
253
  success: !0,
254
- entry: r,
255
- statusCode: t.statusCode
254
+ entry: i,
255
+ statusCode: n.statusCode
256
256
  } : {
257
257
  success: !1,
258
258
  errorCode: B,
259
- statusCode: t.statusCode
259
+ statusCode: n.statusCode
260
260
  };
261
261
  } catch (e) {
262
262
  return z.error("joinQueue error:", e), {
@@ -265,27 +265,27 @@ async function X(e) {
265
265
  };
266
266
  }
267
267
  }
268
- async function Z(e, t) {
268
+ async function Z(e, t, r) {
269
269
  if (!t) return {
270
270
  success: !1,
271
271
  errorCode: B
272
272
  };
273
273
  try {
274
- let n = await i(`/events/${e}/queue/status?token=${encodeURIComponent(t)}`);
275
- if (!n.success) return {
274
+ let i = await n(`/events/${e}/queue/status?token=${encodeURIComponent(t)}`, { widgetKey: r?.widgetKey });
275
+ if (!i.success) return {
276
276
  success: !1,
277
- errorCode: n.errorCode || "queue_unavailable",
278
- statusCode: n.statusCode
277
+ errorCode: i.errorCode || "queue_unavailable",
278
+ statusCode: i.statusCode
279
279
  };
280
- let r = J(n.data);
281
- return r ? {
280
+ let a = J(i.data);
281
+ return a ? {
282
282
  success: !0,
283
- entry: r,
284
- statusCode: n.statusCode
283
+ entry: a,
284
+ statusCode: i.statusCode
285
285
  } : {
286
286
  success: !1,
287
287
  errorCode: B,
288
- statusCode: n.statusCode
288
+ statusCode: i.statusCode
289
289
  };
290
290
  } catch (e) {
291
291
  return z.error("getQueueStatus error:", e), {
@@ -294,12 +294,13 @@ async function Z(e, t) {
294
294
  };
295
295
  }
296
296
  }
297
- async function ne(e, t) {
297
+ async function ne(e, t, n) {
298
298
  if (!t) return { released: !1 };
299
299
  try {
300
- return { released: (await n(`/events/${e}/queue/leave`, { token: t }, {
300
+ return { released: (await r(`/events/${e}/queue/leave`, { token: t }, {
301
301
  keepalive: !0,
302
- suppressOnError: !0
302
+ suppressOnError: !0,
303
+ widgetKey: n?.widgetKey
303
304
  })).data?.released === !0 };
304
305
  } catch (e) {
305
306
  return z.error("leaveQueue error:", e), { released: !1 };
@@ -328,30 +329,33 @@ function ie(e) {
328
329
  async function ae() {
329
330
  return null;
330
331
  }
331
- async function oe(e) {
332
+ async function oe(e, t) {
332
333
  try {
333
- let t = await i(`/venues/${e}`);
334
- if (!t.success) throw new o(t.error ?? `API error: ${t.statusCode}`, t.statusCode ?? 0, {
334
+ let r = await n(`/venues/${e}`, { widgetKey: t?.widgetKey });
335
+ if (!r.success) throw new o(r.error ?? `API error: ${r.statusCode}`, r.statusCode ?? 0, {
335
336
  endpoint: `/venues/${e}`,
336
337
  method: "GET"
337
338
  });
338
- return t.data;
339
+ return r.data;
339
340
  } catch (e) {
340
341
  throw Q.error("getVenueDetails error:", e), e;
341
342
  }
342
343
  }
343
- async function $(e = {}, t) {
344
+ async function $(e = {}, t, n) {
344
345
  try {
345
- let r = await ae(), { eventID: i, quantities: a, donationAmounts: o, ...s } = e, c = a ? Object.fromEntries(Object.entries(a).map(([e, t]) => [parseInt(e, 10), t])) : {}, l = o ? Object.fromEntries(Object.entries(o).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])) : void 0, u = {
346
- purchaserIP: r,
347
- eventID: i ? parseInt(String(i), 10) : void 0,
348
- quantities: c,
349
- ...l && Object.keys(l).length > 0 ? { donationAmounts: l } : {},
350
- ...s
351
- }, d = await n("/orders/create", u, t ? { headers: { "X-Queue-Token": t } } : void 0), f = d.data ?? {};
352
- if (!d.success || f.error) {
353
- let e = re(f.error) || (typeof f.message == "string" ? f.message : "") || d.error || "Order creation failed";
354
- if ((d.errorCode || ie(f.error)) === "QUEUE_REQUIRED") return {
346
+ let i = await ae(), { eventID: a, quantities: o, donationAmounts: s, ...c } = e, l = o ? Object.fromEntries(Object.entries(o).map(([e, t]) => [parseInt(e, 10), t])) : {}, u = s ? Object.fromEntries(Object.entries(s).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])) : void 0, d = {
347
+ purchaserIP: i,
348
+ eventID: a ? parseInt(String(a), 10) : void 0,
349
+ quantities: l,
350
+ ...u && Object.keys(u).length > 0 ? { donationAmounts: u } : {},
351
+ ...c
352
+ }, f = await r("/orders/create", d, t ? {
353
+ headers: { "X-Queue-Token": t },
354
+ widgetKey: n?.widgetKey
355
+ } : { widgetKey: n?.widgetKey }), p = f.data ?? {};
356
+ if (!f.success || p.error) {
357
+ let e = re(p.error) || (typeof p.message == "string" ? p.message : "") || f.error || "Order creation failed";
358
+ if ((f.errorCode || ie(p.error)) === "QUEUE_REQUIRED") return {
355
359
  success: !1,
356
360
  error: e,
357
361
  errorType: "queue"
@@ -360,14 +364,14 @@ async function $(e = {}, t) {
360
364
  return {
361
365
  success: !1,
362
366
  error: e,
363
- errorType: t.includes("inventory") || t.includes("sold out") || t.includes("not available") || t.includes("insufficient") || d.statusCode === 409 ? "inventory" : "server"
367
+ errorType: t.includes("inventory") || t.includes("sold out") || t.includes("not available") || t.includes("insufficient") || f.statusCode === 409 ? "inventory" : "server"
364
368
  };
365
369
  }
366
- return ee(f.uuid || f.cartUUID), {
370
+ return ee(p.uuid || p.cartUUID), {
367
371
  success: !0,
368
- uuid: f.uuid || f.cartUUID,
369
- serviceFee: f.serviceFee ?? 0,
370
- subtotal: f.subtotal ?? 0
372
+ uuid: p.uuid || p.cartUUID,
373
+ serviceFee: p.serviceFee ?? 0,
374
+ subtotal: p.subtotal ?? 0
371
375
  };
372
376
  } catch (e) {
373
377
  let t = e instanceof Error ? e.message : "Network error";
@@ -378,17 +382,17 @@ async function $(e = {}, t) {
378
382
  };
379
383
  }
380
384
  }
381
- async function se(e) {
385
+ async function se(e, t) {
382
386
  try {
383
- let t = await i(`/orders/${e}`);
384
- if (!t.success) {
385
- let n = t.error ?? `Failed to fetch order (${t.statusCode})`;
386
- throw Q.error("getOrder error response:", n), new o(n, t.statusCode ?? 0, {
387
+ let r = await n(`/orders/${e}`, { widgetKey: t?.widgetKey });
388
+ if (!r.success) {
389
+ let t = r.error ?? `Failed to fetch order (${r.statusCode})`;
390
+ throw Q.error("getOrder error response:", t), new o(t, r.statusCode ?? 0, {
387
391
  endpoint: `/orders/${e}`,
388
392
  method: "GET"
389
393
  });
390
394
  }
391
- return t.data;
395
+ return r.data;
392
396
  } catch (e) {
393
397
  throw Q.error("getOrder error:", e), e;
394
398
  }
@@ -397,9 +401,9 @@ async function se(e) {
397
401
  //#region src/lib/utils/utm.ts
398
402
  var ce = e("utm");
399
403
  async function le(e) {
400
- let t = new URLSearchParams(window.location.search), n = r(t.get("utm_source")) || "direct";
404
+ let t = new URLSearchParams(window.location.search), n = i(t.get("utm_source")) || "direct";
401
405
  try {
402
- await fetch(`${c()}/utm/${e}/${encodeURIComponent(n)}`);
406
+ await fetch(`${a()}/utm/${e}/${encodeURIComponent(n)}`);
403
407
  } catch (e) {
404
408
  ce.error("UTM tracking failed:", e);
405
409
  }