@getmicdrop/venue-calendar 4.2.1 → 4.2.3

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 (101) hide show
  1. package/dist/{ArrowLeftIcon-DQ-h5PcH.js → ArrowLeftIcon-CxZXP_IT.js} +1 -1
  2. package/dist/{Badge-M6qZyfTF.js → Badge-Bv_MT-Vt.js} +10 -9
  3. package/dist/BlockPlaceholder-HZ6Coko5.js +52 -0
  4. package/dist/Button-C4uFgl7L.js +2141 -0
  5. package/dist/{Calendar-BX22svpz.js → Calendar-BKefLfIt.js} +292 -290
  6. package/dist/CalendarFoundryView-tDmFCrJ3.js +22292 -0
  7. package/dist/{CalendarIcon-DR197Ioz.js → CalendarIcon-CLGR_zlO.js} +1 -1
  8. package/dist/{CartView-BIB5oib3.js → CartView-CHFlfWS9.js} +651 -644
  9. package/dist/{Checkout-CrLlfUhf.js → Checkout-C-A4t1eE.js} +92 -91
  10. package/dist/Checkout-CRX7dcRr.js +1807 -0
  11. package/dist/{CheckoutTimer-yy-GNrHb.js → CheckoutTimer-d3KUbevy.js} +5 -5
  12. package/dist/{ChevronDownIcon-C_RiK-BW.js → ChevronDownIcon-YtBeSqjf.js} +1 -1
  13. package/dist/{ClockIcon-BOJENuPq.js → ClockIcon-a9tJQ5El.js} +1 -1
  14. package/dist/{CloseIcon-Rc7tpX2a.js → CloseIcon-DSURK5co.js} +1 -1
  15. package/dist/CloseOutline-qpVa62mu.js +13 -0
  16. package/dist/{CollectionView-D7BzFcoa.js → CollectionView-BiBMllyw.js} +13 -12
  17. package/dist/CropImage-B0tj2_uN.js +404 -0
  18. package/dist/Event-1ZJVzqFN.js +3034 -0
  19. package/dist/{EventPage-BCnNHL7x.js → EventPage-C7K2yA4v.js} +168 -167
  20. package/dist/{Heading-B7VYbbfJ.js → Heading-Dfo3bjyn.js} +4 -3
  21. package/dist/Image-B3cEndLZ.js +87 -0
  22. package/dist/Input-DkYIFK4J.js +487 -0
  23. package/dist/{MailIcon-rxvK4Wga.js → MailIcon-DIrQpcGo.js} +1 -1
  24. package/dist/{Modal-BVD2O8hd.js → Modal-DrA1swbF.js} +2 -2
  25. package/dist/{ModalFooter-CfboEe1M.js → ModalFooter-r1NQNG9P.js} +59 -57
  26. package/dist/{PasswordInput-BAlq2j97.js → PasswordInput-DB4qa7kS.js} +4 -4
  27. package/dist/{ScarcityBadge-CP8-rQcJ.js → ScarcityBadge-BJOm7_Ho.js} +4 -4
  28. package/dist/{SeriesPage-CnT4J9i3.js → SeriesPage-JVmqUSax.js} +5 -5
  29. package/dist/{Spinner-ChTN7t75.js → Spinner-BwiDys7C.js} +3 -3
  30. package/dist/{Success-CN8VG2FM.js → Success-DAE6gPZM.js} +77 -76
  31. package/dist/{TagIcon-V0qMu9wS.js → TagIcon-CrTNd8qE.js} +1 -1
  32. package/dist/{ViewTicketsEmbed-Dds6VBnh.js → ViewTicketsEmbed-Zx-mvP2p.js} +60 -59
  33. package/dist/{WarningCircleIcon-D32h6VDr.js → WarningCircleIcon-C5-op3Cy.js} +1 -1
  34. package/dist/{WarningTriIcon-BPDrCiKU.js → WarningTriIcon-BxIQn7c2.js} +1 -1
  35. package/dist/{__SKIP_PATHS__-ClcRhiB_.js → __SKIP_PATHS__-DyyiXBgB.js} +1 -1
  36. package/dist/api/api.cjs +1 -1
  37. package/dist/api/api.mjs +10 -4
  38. package/dist/api/orders.d.ts +8 -1
  39. package/dist/api/types.d.ts +528 -528
  40. package/dist/{browser-25hnscei.js → browser-Um8Y6K99.js} +7 -7
  41. package/dist/{colors-BErRTaLV.js → colors-MuuDk6KF.js} +30 -29
  42. package/dist/{constants-Dcj3kgZE.js → constants-CqrJv6nM.js} +73 -73
  43. package/dist/{copyToClipboard-CNxFW3ni.js → copyToClipboard-CTS9Wtmo.js} +1 -1
  44. package/dist/{createI18n-08XGDh1_.js → createI18n-DBUVdZra.js} +1 -1
  45. package/dist/{event-Cp5D4ctZ.js → event-BrptLro8.js} +1 -1
  46. package/dist/{event-transform-BxeLDMlo.js → event-transform-jFmHl0Qp.js} +4 -4
  47. package/dist/{eventStatusStream-C2BjyARK.js → eventStatusStream-D04pcbuu.js} +2 -2
  48. package/dist/{allowlist-BiUmz2AF.js → href-C8WGnROy.js} +21 -4
  49. package/dist/{i18n-ObL7ykbT.js → i18n-CcJmTGJP.js} +11 -11
  50. package/dist/imageOptimizer-CB3wKJU8.js +47 -0
  51. package/dist/{labels-CiCqoizP.js → labels-Q4CaHsVM.js} +1 -1
  52. package/dist/{modalManager.svelte-BH-QJm9M.js → modalManager.svelte-qcVxl7C5.js} +2 -2
  53. package/dist/{order-totals-hcdvbJvw.js → order-totals-BImtvmoh.js} +15 -13
  54. package/dist/{orders-JksNMoVL.js → orders-C8kt6c-E.js} +30 -23
  55. package/dist/{Input-W-QE9nWi.js → phoneUtils-FnBDCqO0.js} +694 -1132
  56. package/dist/{pixels-Bm5wxtzo.js → pixels-MEc7WYiV.js} +8 -7
  57. package/dist/{promo-BrMcoTYh.js → promo-DtLZRskK.js} +3 -3
  58. package/dist/{serverTotals-CpRaEe9K.js → serverTotals-BO126TTd.js} +1 -1
  59. package/dist/{shareCopyFeedback.svelte-DsyhrfiP.js → shareCopyFeedback.svelte-Dko8NIbm.js} +25 -25
  60. package/dist/{showcase-state-options-B2XfybZq.js → showcase-state-options-BoJxiEsg.js} +1 -1
  61. package/dist/sortable.esm--ZtTTTPp.js +1451 -0
  62. package/dist/timezones-C5l0SSHK.js +2030 -0
  63. package/dist/{to-event-card-props-VPne8W4I.js → to-event-card-props-BAHzloEA.js} +24 -23
  64. package/dist/{utils-_8bPGqBR.js → utils-Ts4-U13Y.js} +3 -3
  65. package/dist/venue-calendar.css +1 -1
  66. package/dist/venue-calendar.es.js +200 -199
  67. package/dist/venue-calendar.iife.js +63 -62
  68. package/dist/venue-calendar.umd.js +60 -59
  69. package/dist/z-index-B0Vk_Mp1.js +27 -0
  70. package/package.json +220 -220
  71. package/dist/BlockPlaceholder-IOcqxTx2.js +0 -62
  72. package/dist/CalendarFoundryView-Ct39xn0Q.js +0 -23561
  73. package/dist/Checkout-x9__eSQT.js +0 -1805
  74. package/dist/Event-BYE0HeRg.js +0 -3040
  75. package/dist/Image-DBJAfLYe.js +0 -81
  76. package/dist/cancel-Cq2Q8qW7.js +0 -59
  77. package/dist/timezones-Cq1mLtfM.js +0 -4170
  78. /package/dist/locales/{4.2.1 → 4.2.3}/flow/de.js +0 -0
  79. /package/dist/locales/{4.2.1 → 4.2.3}/flow/es.js +0 -0
  80. /package/dist/locales/{4.2.1 → 4.2.3}/flow/fr.js +0 -0
  81. /package/dist/locales/{4.2.1 → 4.2.3}/flow/id.js +0 -0
  82. /package/dist/locales/{4.2.1 → 4.2.3}/flow/it.js +0 -0
  83. /package/dist/locales/{4.2.1 → 4.2.3}/flow/ja.js +0 -0
  84. /package/dist/locales/{4.2.1 → 4.2.3}/flow/ko.js +0 -0
  85. /package/dist/locales/{4.2.1 → 4.2.3}/flow/nl.js +0 -0
  86. /package/dist/locales/{4.2.1 → 4.2.3}/flow/pl.js +0 -0
  87. /package/dist/locales/{4.2.1 → 4.2.3}/flow/pt-br.js +0 -0
  88. /package/dist/locales/{4.2.1 → 4.2.3}/flow/tr.js +0 -0
  89. /package/dist/locales/{4.2.1 → 4.2.3}/flow/zh.js +0 -0
  90. /package/dist/locales/{4.2.1 → 4.2.3}/main/de.js +0 -0
  91. /package/dist/locales/{4.2.1 → 4.2.3}/main/es.js +0 -0
  92. /package/dist/locales/{4.2.1 → 4.2.3}/main/fr.js +0 -0
  93. /package/dist/locales/{4.2.1 → 4.2.3}/main/id.js +0 -0
  94. /package/dist/locales/{4.2.1 → 4.2.3}/main/it.js +0 -0
  95. /package/dist/locales/{4.2.1 → 4.2.3}/main/ja.js +0 -0
  96. /package/dist/locales/{4.2.1 → 4.2.3}/main/ko.js +0 -0
  97. /package/dist/locales/{4.2.1 → 4.2.3}/main/nl.js +0 -0
  98. /package/dist/locales/{4.2.1 → 4.2.3}/main/pl.js +0 -0
  99. /package/dist/locales/{4.2.1 → 4.2.3}/main/pt-br.js +0 -0
  100. /package/dist/locales/{4.2.1 → 4.2.3}/main/tr.js +0 -0
  101. /package/dist/locales/{4.2.1 → 4.2.3}/main/zh.js +0 -0
@@ -1,8 +1,12 @@
1
- import { q as e } from "./timezones-Cq1mLtfM.js";
2
- import { D as t, O as n } from "./constants-Dcj3kgZE.js";
3
- import { n as r } from "./promo-BrMcoTYh.js";
4
- var i = .25, a = .029, o = .3;
1
+ import { L as e } from "./timezones-C5l0SSHK.js";
2
+ import { D as t, O as n } from "./constants-CqrJv6nM.js";
3
+ import { n as r } from "./promo-DtLZRskK.js";
4
+ var i = .029, a = .3;
5
+ function o(e) {
6
+ return e.discountedPrice ?? e.price;
7
+ }
5
8
  function s(e, r = {}) {
9
+ if (e <= 0) return 0;
6
10
  let i = r.serviceFeePercentage ?? 5, a = (r.serviceFeeCents ?? 150) / 100;
7
11
  switch (t(r.serviceFeeChargeType)) {
8
12
  case "percentage": return n(i / 100 * e);
@@ -11,7 +15,7 @@ function s(e, r = {}) {
11
15
  }
12
16
  }
13
17
  function c(e, t) {
14
- return (a * (e + t) + o) / .971;
18
+ return (i * (e + t) + a) / .971;
15
19
  }
16
20
  function l(e = {}) {
17
21
  return e.absorbServiceFee === !0;
@@ -20,21 +24,19 @@ function u(e) {
20
24
  return n(e.serviceFee + e.cardProcessing);
21
25
  }
22
26
  function d(e, t = {}) {
23
- let r = n(e.reduce((e, t) => e + t.price * t.quantity, 0));
27
+ let r = n(e.reduce((e, t) => e + o(t) * t.quantity, 0));
24
28
  if (r <= 0 || l(t)) return {
25
29
  face: r,
26
30
  serviceFee: 0,
27
31
  cardProcessing: 0,
28
32
  total: r
29
33
  };
30
- let a = e.reduce((e, n) => e + Math.min(s(n.price, t), 10) * n.quantity, 0), o = c(r, a), u = r * i;
31
- a + o > u && (a = Math.max(0, u - o), o = c(r, a));
32
- let d = n(o), f = n(a);
33
- return f + d > u && (f = Math.max(0, Math.floor((u - d) * 100) / 100)), {
34
+ let i = e.reduce((e, n) => e + Math.min(s(o(n), t), 10) * n.quantity, 0), a = c(r, i), u = n(a), d = n(i);
35
+ return {
34
36
  face: r,
35
- serviceFee: f,
36
- cardProcessing: d,
37
- total: n(r + f + d)
37
+ serviceFee: d,
38
+ cardProcessing: u,
39
+ total: n(r + d + u)
38
40
  };
39
41
  }
40
42
  //#endregion
@@ -1,6 +1,7 @@
1
- import { P as e, h as t, m as n, nt as r, tt as i } from "./timezones-Cq1mLtfM.js";
1
+ import { S as e, x as t } from "./Button-C4uFgl7L.js";
2
+ import { a as n, i as r, w as i } from "./timezones-C5l0SSHK.js";
2
3
  //#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/ApiError.js
3
- var a = class r extends e {
4
+ var a = class e extends i {
4
5
  constructor(e, t, n = {}) {
5
6
  super(e, `API_${t}`, {
6
7
  status: t,
@@ -10,22 +11,22 @@ var a = class r extends e {
10
11
  }), this.name = "ApiError", this.endpoint = n.endpoint, this.method = n.method, this.requestId = n.requestId;
11
12
  }
12
13
  getUserMessage(e) {
13
- return t(this.status, this.message, e);
14
+ return n(this.status, this.message, e);
14
15
  }
15
16
  isRetryable() {
16
17
  return this.status >= 500 || this.status === 429;
17
18
  }
18
- static async fromResponse(e, t, i) {
19
- let a = `Request failed with status ${e.status}`, o;
19
+ static async fromResponse(t, n, i) {
20
+ let a = `Request failed with status ${t.status}`, o;
20
21
  try {
21
- let t = await e.json();
22
- a = n(t, a), o = t.details || t;
22
+ let e = await t.json();
23
+ a = r(e, a), o = e.details || e;
23
24
  } catch {}
24
- return new r(a, e.status, {
25
- endpoint: t,
25
+ return new e(a, t.status, {
26
+ endpoint: n,
26
27
  method: i,
27
28
  details: o,
28
- requestId: e.headers.get("x-request-id") || void 0
29
+ requestId: t.headers.get("x-request-id") || void 0
29
30
  });
30
31
  }
31
32
  };
@@ -57,12 +58,12 @@ function c(e, t, n) {
57
58
  }
58
59
  return s(r, n);
59
60
  }
60
- function l(e, t, n) {
61
- if (!e) return !1;
61
+ function l(t, n, r) {
62
+ if (!t) return !1;
62
63
  try {
63
- return e.setItem(t, JSON.stringify(n)), !0;
64
- } catch (e) {
65
- return r.warn(`storage: failed to write "${t}"`, e), !1;
64
+ return t.setItem(n, JSON.stringify(r)), !0;
65
+ } catch (t) {
66
+ return e.warn(`storage: failed to write "${n}"`, t), !1;
66
67
  }
67
68
  }
68
69
  function u(e, t) {
@@ -99,7 +100,7 @@ function re(e) {
99
100
  }
100
101
  //#endregion
101
102
  //#region src/lib/config.js
102
- var ie = i("VC:config", { enabled: !0 }), g = null;
103
+ var ie = t("VC:config", { enabled: !0 }), g = null;
103
104
  function ae(e) {
104
105
  let t = e || null;
105
106
  g && t && t !== g && ie.warn("[VC] setWidgetKey called again with a DIFFERENT key. The widget key is module-global, so every calendar on this page will now use the last one set — any element configured with the previous key will get 403s on its public reads and render empty. Give each element its own widget-key attribute (threaded per-instance) rather than calling setWidgetKey() more than once."), g = t;
@@ -130,7 +131,7 @@ function ue() {
130
131
  }
131
132
  //#endregion
132
133
  //#region src/lib/api/client.ts
133
- var b = i("VC"), de = "ABORTED";
134
+ var b = t("VC"), de = "ABORTED";
134
135
  function x(e, t) {
135
136
  let n = t || _();
136
137
  return n ? {
@@ -478,7 +479,7 @@ function Z() {
478
479
  }
479
480
  //#endregion
480
481
  //#region src/lib/tracking/beacon.ts
481
- var Be = i("tracking"), Ve = /* @__PURE__ */ new Set([
482
+ var Be = t("tracking"), Ve = /* @__PURE__ */ new Set([
482
483
  "chunk_load_error",
483
484
  "type_error",
484
485
  "reference_error",
@@ -604,19 +605,25 @@ function rt(e, t, n, r) {
604
605
  }
605
606
  //#endregion
606
607
  //#region src/lib/api/orders.ts
607
- var $ = i("VC");
608
- async function it(e, t, n) {
608
+ var $ = t("VC");
609
+ async function it(e, t, n, r) {
609
610
  try {
610
- let r = await D(`${w()}/cart/${e}/payment-intent`, {
611
+ let i = await D(`${w()}/cart/${e}/payment-intent`, {
611
612
  productQuantities: t,
612
613
  ...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
614
+ ...r ? {
615
+ firstName: r.firstName,
616
+ lastName: r.lastName,
617
+ email: r.email,
618
+ mailingList: r.mailingList ?? !1
619
+ } : {},
613
620
  attribution: Z()
614
621
  });
615
- if (!r.success) throw $.error("Payment intent creation failed:", r.error), new a(r.error || "Failed to create payment intent", r.statusCode ?? 0, {
622
+ if (!i.success) throw $.error("Payment intent creation failed:", i.error), new a(i.error || "Failed to create payment intent", i.statusCode ?? 0, {
616
623
  endpoint: `${w()}/cart/${e}/payment-intent`,
617
624
  method: "POST"
618
625
  });
619
- return $.debug("Payment intent created:", r.data), r.data;
626
+ return $.debug("Payment intent created:", i.data), i.data;
620
627
  } catch (e) {
621
628
  return $.error("createPaymentIntent error:", e), null;
622
629
  }